@qaecy/cue-ui 0.0.61 → 0.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/1051.js +1 -1
- package/3036.js +1 -1
- package/3418.js +1 -1
- package/3523.js +1 -1
- package/6419.js +1 -1
- package/6586.js +1 -1
- package/7193.js +1 -1
- package/9396.js +1 -1
- package/package.json +1 -1
package/6586.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[6586],{6586(U,V,b){b.d(V,{MarkdownViewer:()=>rt});var A=b(467),d=b(5802),T=b(7705),S=b(5547),H=b(4226),M=b(2771),w=b(7673),E=b(4572),D=b(1397),j=b(8141),m=b(9437);const I=(0,b(1853).L)(c=>function(){c(this),this.name="EmptyError",this.message="no elements in sequence"});var O=b(5964),R=b(6697),W=b(9974),Z=b(4360);function Ie(c=Se){return(0,W.N)((p,e)=>{let t=!1;p.subscribe((0,Z._)(e,n=>{t=!0,e.next(n)},()=>t?e.complete():e.error(c())))})}function Se(){return new I}var Te=b(3669);function ae(c,p){const e=arguments.length>=2;return t=>t.pipe(c?(0,O.p)((n,o)=>c(n,o,t)):Te.D,(0,R.s)(1),e?function $(c){return(0,W.N)((p,e)=>{let t=!1;p.subscribe((0,Z._)(e,n=>{t=!0,e.next(n)},()=>{t||e.next(c),e.complete()}))})}(p):Ie(()=>new I))}var we=b(6354),G=b(177),Ee=b(345);const le=new d.nKC("All of the settings registered in the whole app."),Y=new d.nKC("The settings collected from all ancestor injectors"),ue=new d.nKC("The settings for the currently loaded module."),q="__ngx_dynamic_hooks_content",ee="dynamic-component-anchor",B="__ngx_dynamic_hooks_anchor_id",P="__ngx_dynamic_hooks_anchor_parsetoken",Be=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];var te=function(c){return c[c.All=0]="All",c[c.Linear=1]="Linear",c[c.None=2]="None",c}(te||{});const x={},pe="[a-zA-Z_$]+[a-zA-Z0-9_$]*",ne="[a-zA-Z$\\-_:][a-zA-Z$\\-_:0-9\\.]*";function N(c,p){if(!p.global)throw Error("TypeError: matchAll called with a non-global RegExp argument");const e=[];let t=p.exec(c);for(;null!==t;)e.push(t),t=p.exec(c);return p.lastIndex=0,e}function oe(c){return void 0!==c?.__ngContext__}x.attributeNameNoBracketsRegex="("+ne+")",x.attributeNameBracketsRegex="\\[("+ne+")\\]",x.attributeNameRoundBracketsRegex="\\(("+ne+")\\)",x.attributeNameRegex="(?:"+x.attributeNameNoBracketsRegex+"|"+x.attributeNameBracketsRegex+"|"+x.attributeNameRoundBracketsRegex+")",x.attributeValueDoubleQuotesRegex='"((?:\\\\.|[^"])*?)"',x.attributeValueSingleQuotesRegex="'((?:\\\\.|[^'])*?)'",x.variablePathDotNotation="\\."+pe,x.variableBracketsNotation="\\[[^\\]]*\\]",x.variablePathFunctionCall="\\([^\\)]*\\)",x.variablePathPartRegex="(?:"+x.variablePathDotNotation+"|"+x.variableBracketsNotation+"|"+x.variablePathFunctionCall+")",x.contextVariableRegex="context"+x.variablePathPartRegex+"*",x.placeholderVariablePathDotNotation="\\@@@cxtDot@@@"+pe,x.placeholderVariableBracketsNotation="@@@cxtOpenSquareBracket@@@[^\\]]*@@@cxtCloseSquareBracket@@@",x.placeholderVariablePathFunctionCall="@@@cxtOpenRoundBracket@@@[^\\)]*@@@cxtCloseRoundBracket@@@",x.placeholderVariablePathPartRegex="(?:"+x.placeholderVariablePathDotNotation+"|"+x.placeholderVariableBracketsNotation+"|"+x.placeholderVariablePathFunctionCall+")",x.placeholderContextVariableRegex="__CXT__"+x.placeholderVariablePathPartRegex+"*";class Ae{constructor(p,e,t,n){this.configResolver=e,this.tagHookFinder=t,this.bindingsValueManager=n,this.savedBindings={},this.config=this.configResolver.processConfig(p),this.name=this.config.name}findHooks(p,e,t){let n=this.config.enclosing?this.tagHookFinder.findEnclosingTags(p,this.config.selector,this.config.bracketStyle,t):this.tagHookFinder.findSingleTags(p,this.config.selector,this.config.bracketStyle,t);return this.config.allowSelfClosing&&(n=[...n,...this.tagHookFinder.findSelfClosingTags(p,this.config.selector,this.config.bracketStyle,t)],n.sort((o,r)=>o.openingTagStartIndex-r.openingTagStartIndex)),n}loadComponent(p,e,t,n,o){return{component:this.config.component,hostElementTag:this.config.hostElementTag||this.config.selector,injector:this.config.injector,environmentInjector:this.config.environmentInjector}}getBindings(p,e,t,n){let o=this.savedBindings[p];return void 0===o&&(o=this.createBindings(e.openingTag),this.savedBindings[p]=o),this.bindingsValueManager.checkInputBindings(o.inputs,t,this.config,n),this.bindingsValueManager.checkOutputBindings(o.outputs,this.config,n),{inputs:this.getValuesFromSavedBindings(o.inputs),outputs:this.getValuesFromSavedBindings(o.outputs)}}createBindings(p){const e=this.collectRawInputs(p),t={};for(const[r,s]of Object.entries(e))t[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};const n=this.collectRawOutputs(p),o={};for(const[r,s]of Object.entries(n))o[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};return{inputs:t,outputs:o}}collectRawInputs(p){const e=this.getBindingsFromOpeningTag(p,"noBracketInputs",this.config.inputsBlacklist||null,this.config.inputsWhitelist||null),t=this.getBindingsFromOpeningTag(p,"bracketInputs",this.config.inputsBlacklist||null,this.config.inputsWhitelist||null);for(const[n,o]of Object.entries(e))e[n]="'"+o+"'";return{...e,...t}}collectRawOutputs(p){return this.getBindingsFromOpeningTag(p,"outputs",this.config.outputsBlacklist||null,this.config.outputsWhitelist||null)}getBindingsFromOpeningTag(p,e,t,n){const o={},r="(?:"+x.attributeValueDoubleQuotesRegex+"|"+x.attributeValueSingleQuotesRegex+")";let s;switch(e){case"noBracketInputs":s=x.attributeNameNoBracketsRegex;break;case"bracketInputs":s=x.attributeNameBracketsRegex;break;case"outputs":s=x.attributeNameRoundBracketsRegex}const l=N(p,new RegExp(s+"="+r,"gim"));for(const u of l){let h=u[2]||u[3];void 0===h&&"noBracketInputs"===e&&(h=""),o[u[1]]=h}const g={};for(const[u,h]of Object.entries(o))t&&t.includes(u)||n&&!n.includes(u)||(g[u]=h);return g}getValuesFromSavedBindings(p){const e={};for(const[t,n]of Object.entries(p))e[t]=n.value;return e}}class Ne{constructor(p,e,t,n){this.configResolver=e,this.platformService=t,this.bindingsValueManager=n,this.savedBindings={},this.config=this.configResolver.processConfig(p),this.name=this.config.name}findHookElements(p,e,t){return Array.from(this.platformService.querySelectorAll(p,this.config.selector))}loadComponent(p,e,t,n,o){return this.scrubAngularBindingAttrs(e.element),{component:this.config.component,hostElementTag:this.config.hostElementTag,injector:this.config.injector,environmentInjector:this.config.environmentInjector}}getBindings(p,e,t,n){let o=this.savedBindings[p];return void 0===o&&(o=this.createBindings(e.elementSnapshot),this.savedBindings[p]=o),this.bindingsValueManager.checkInputBindings(o.inputs,t,this.config,n),this.bindingsValueManager.checkOutputBindings(o.outputs,this.config,n),{inputs:this.getValuesFromSavedBindings(o.inputs),outputs:this.getValuesFromSavedBindings(o.outputs)}}scrubAngularBindingAttrs(p){const e=Array.from(p.attributes).map(t=>t.name).filter(t=>t.startsWith("[")&&t.endsWith("]")||t.startsWith("(")&&t.endsWith(")"));for(const t of e)this.platformService.removeAttribute(p,t)}createBindings(p){const e=this.collectRawBindings(p,"inputs",this.config.inputsBlacklist||null,this.config.inputsWhitelist||null),t={};for(const[r,s]of Object.entries(e))t[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};const n=this.collectRawBindings(p,"outputs",this.config.outputsBlacklist||null,this.config.outputsWhitelist||null),o={};for(const[r,s]of Object.entries(n))o[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};return{inputs:t,outputs:o}}collectRawBindings(p,e,t,n){const o={},r=this.platformService.getAttributeNames(p);for(let i of r)if("inputs"===e&&(!i.startsWith("(")||!i.endsWith(")"))||"outputs"===e&&i.startsWith("(")&&i.endsWith(")")){let a=this.platformService.getAttribute(p,i);"inputs"===e&&i.startsWith("[")&&i.endsWith("]")&&""===a&&(a=void 0),"inputs"===e&&(!i.startsWith("[")||!i.endsWith("]"))&&(a=`'${a}'`),i=i.replace(/^\[|^\(|\]$|\)$/g,""),o[i]=a}const s={};for(const[i,a]of Object.entries(o))t&&t.includes(i)||n&&!n.includes(i)||(s[i]=a);return s}getValuesFromSavedBindings(p){const e={};for(const[t,n]of Object.entries(p))e[t]=n.value;return e}}const Pe={component:void 0,name:void 0,parseWithRegex:!1,selector:void 0,hostElementTag:void 0,injector:void 0,allowSelfClosing:!0,enclosing:!0,bracketStyle:{opening:"<",closing:">"},parseInputs:!0,unescapeStrings:!0,inputsBlacklist:void 0,inputsWhitelist:void 0,outputsBlacklist:void 0,outputsWhitelist:void 0,allowContextInBindings:!0,allowContextFunctionCalls:!0};let De=(()=>{class c{constructor(){}processConfig(e){const t=JSON.parse(JSON.stringify(Pe));if(!e||!e.hasOwnProperty("component"))throw Error('Missing the required "component" property for the SelectorHookParserConfig. Must be either the component class or a LazyLoadComponentConfig.');if(t.component=e.component,e.component.hasOwnProperty("prototype")){const n=(0,T.HJs)(e.component);t.selector=n.selector}else{if(!e.component.hasOwnProperty("importPromise")||!e.component.hasOwnProperty("importName"))throw Error('The "component" property in the SelectorHookParserConfig must either contain the component class or a LazyLoadComponentConfig.');if(!e.hasOwnProperty("selector"))throw Error('When using lazy-loaded dynamic components, you have to specify the "selector" property in the parser config, as the real selector can\'t be known before the component is loaded.')}if(e.hasOwnProperty("name")){if("string"!=typeof e.name)throw Error('The submitted "name" property in the SelectorHookParserConfig must be of type string, was '+typeof e.name);t.name=e.name}if(e.hasOwnProperty("selector")){if("string"!=typeof e.selector)throw Error('The submitted "selector" property in the SelectorHookParserConfig must be of type string, was '+typeof e.selector);t.selector=e.selector}if(e.hasOwnProperty("hostElementTag")){if("string"!=typeof e.hostElementTag)throw Error('The submitted "hostElementTag" property in the SelectorHookParserConfig must be of type string, was '+typeof e.hostElementTag);t.hostElementTag=e.hostElementTag}if(e.hasOwnProperty("parseWithRegex")){if("boolean"!=typeof e.parseWithRegex)throw Error('The submitted "parseWithRegex" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.parseWithRegex);t.parseWithRegex=e.parseWithRegex}if(e.hasOwnProperty("allowSelfClosing")){if("boolean"!=typeof e.allowSelfClosing)throw Error('The submitted "allowSelfClosing" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.allowSelfClosing);t.allowSelfClosing=e.allowSelfClosing}if(e.hasOwnProperty("enclosing")){if("boolean"!=typeof e.enclosing)throw Error('The submitted "enclosing" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.enclosing);t.enclosing=e.enclosing}if(e.hasOwnProperty("bracketStyle")){if("object"!=typeof e.bracketStyle||"string"!=typeof e.bracketStyle.opening||"string"!=typeof e.bracketStyle.closing)throw Error('The submitted "bracketStyle" property in the SelectorHookParserConfig must have the form {opening: string, closing: string}');t.bracketStyle=e.bracketStyle}if(e.hasOwnProperty("injector")&&(t.injector=e.injector),e.hasOwnProperty("environmentInjector")&&(t.environmentInjector=e.environmentInjector),e.hasOwnProperty("unescapeStrings")){if("boolean"!=typeof e.unescapeStrings)throw Error('The submitted "unescapeStrings" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.unescapeStrings);t.unescapeStrings=e.unescapeStrings}if(e.hasOwnProperty("parseInputs")){if("boolean"!=typeof e.parseInputs)throw Error('The submitted "parseInputs" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.parseInputs);t.parseInputs=e.parseInputs}if(e.hasOwnProperty("inputsBlacklist")){if(!Array.isArray(e.inputsBlacklist))throw Error('The submitted "inputsBlacklist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.inputsBlacklist)if("string"!=typeof n)throw Error('All entries of the submitted "inputsBlacklist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.inputsBlacklist=e.inputsBlacklist}if(e.hasOwnProperty("inputsWhitelist")){if(!Array.isArray(e.inputsWhitelist))throw Error('The submitted "inputsWhitelist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.inputsWhitelist)if("string"!=typeof n)throw Error('All entries of the submitted "inputsWhitelist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.inputsWhitelist=e.inputsWhitelist}if(e.hasOwnProperty("outputsBlacklist")){if(!Array.isArray(e.outputsBlacklist))throw Error('The submitted "outputsBlacklist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.outputsBlacklist)if("string"!=typeof n)throw Error('All entries of the submitted "outputsBlacklist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.outputsBlacklist=e.outputsBlacklist}if(e.hasOwnProperty("outputsWhitelist")){if(!Array.isArray(e.outputsWhitelist))throw Error('The submitted "outputsWhitelist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.outputsWhitelist)if("string"!=typeof n)throw Error('All entries of the submitted "outputsWhitelist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.outputsWhitelist=e.outputsWhitelist}if(e.hasOwnProperty("allowContextInBindings")){if("boolean"!=typeof e.allowContextInBindings)throw Error('The submitted "allowContextInBindings" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.allowContextInBindings);t.allowContextInBindings=e.allowContextInBindings}if(e.hasOwnProperty("allowContextFunctionCalls")){if("boolean"!=typeof e.allowContextFunctionCalls)throw Error('The submitted "allowContextFunctionCalls" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.allowContextFunctionCalls);t.allowContextFunctionCalls=e.allowContextFunctionCalls}return t}static{this.\u0275fac=function(t){return new(t||c)}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();const de=new d.nKC("An injection token to retrieve an optionally user-provided PlatformService");let Ve=(()=>{class c{constructor(e,t,n){this.document=e,this.rendererFactory=t,this.sanitizer=n,this.renderer=this.rendererFactory.createRenderer(null,null)}getNgVersion(){if(typeof this.document<"u"){const t=this.querySelectorAll(this.document,"[ng-version]")?.[0]?.getAttribute("ng-version");if(t)return parseInt(t,10)}return null}sanitize(e){return this.sanitizer.sanitize(S.WPN.HTML,e)||""}createElement(e){return this.renderer.createElement(e)}sortElements(e,t){return e===t?0:e.compareDocumentPosition?2&e.compareDocumentPosition(t)?1:-1:e.sourceIndex-t.sourceIndex}cloneElement(e){return e.cloneNode(!0)}getTagName(e){return e.tagName}getOpeningTag(e){const n=e.outerHTML.length;return e.outerHTML.slice(0,"/"===e.outerHTML[n-2]?n:n-e.innerHTML.length-e.tagName.length-3)}getClosingTag(e){return e.outerHTML.slice(e.outerHTML.length-e.tagName.length-3)}getAttributeNames(e){return"function"==typeof e.getAttributeNames?e.getAttributeNames():[]}getAttribute(e,t){return"function"==typeof e.getAttribute?e.getAttribute(t):null}setAttribute(e,t,n){this.renderer.setAttribute(e,t,n)}removeAttribute(e,t){this.renderer.removeAttribute(e,t)}getParentNode(e){try{return this.renderer.parentNode(e)}catch{return null}}querySelectorAll(e,t){return Array.from(e.querySelectorAll(t))}getChildNodes(e){return Array.prototype.slice.call(e.childNodes)}appendChild(e,t){this.renderer.appendChild(e,t)}insertBefore(e,t,n){this.renderer.insertBefore(e,t,n)}clearChildNodes(e){if(e)for(;e.firstChild;)this.removeChild(e,e.firstChild)}removeChild(e,t){e.removeChild(t)}getInnerContent(e){return e.innerHTML}setInnerContent(e,t){e&&(e.innerHTML=t)}isTextNode(e){return e.nodeType===Node.TEXT_NODE}createTextNode(e){return document.createTextNode(e)}getTextContent(e){return e.textContent}dispatchEvent(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0}))}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(d.qQL),d.KVO(S._9s),d.KVO(Ee.up))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),K=(()=>{class c{constructor(e,t){this.userPlatformService=e,this.defaultPlatformService=t}getFor(e){return this.userPlatformService&&"function"==typeof this.userPlatformService[e]?this.userPlatformService:this.defaultPlatformService}getNgVersion(){return this.getFor("getNgVersion").getNgVersion()}sanitize(e){return this.getFor("sanitize").sanitize(e)}createElement(e){return this.getFor("createElement").createElement(e)}sortElements(e,t){return this.getFor("sortElements").sortElements(e,t)}cloneElement(e){return this.getFor("cloneElement").cloneElement(e)}getTagName(e){return this.getFor("getTagName").getTagName(e)}getOpeningTag(e){return this.getFor("getOpeningTag").getOpeningTag(e)}getClosingTag(e){return this.getFor("getClosingTag").getClosingTag(e)}getAttributeNames(e){return this.getFor("getAttributeNames").getAttributeNames(e)}getAttribute(e,t){return this.getFor("getAttribute").getAttribute(e,t)}setAttribute(e,t,n){return this.getFor("setAttribute").setAttribute(e,t,n)}removeAttribute(e,t){return this.getFor("removeAttribute").removeAttribute(e,t)}getParentNode(e){return this.getFor("getParentNode").getParentNode(e)}querySelectorAll(e,t){return this.getFor("querySelectorAll").querySelectorAll(e,t)}getChildNodes(e){return this.getFor("getChildNodes").getChildNodes(e)}appendChild(e,t){return this.getFor("appendChild").appendChild(e,t)}insertBefore(e,t,n){return this.getFor("insertBefore").insertBefore(e,t,n)}clearChildNodes(e){return this.getFor("clearChildNodes").clearChildNodes(e)}removeChild(e,t){return this.getFor("removeChild").removeChild(e,t)}getInnerContent(e){return this.getFor("getInnerContent").getInnerContent(e)}setInnerContent(e,t){return this.getFor("setInnerContent").setInnerContent(e,t)}isTextNode(e){return this.getFor("isTextNode").isTextNode(e)}createTextNode(e){return this.getFor("createTextNode").createTextNode(e)}getTextContent(e){return this.getFor("getTextContent").getTextContent(e)}dispatchEvent(e,t,n){return this.getFor("dispatchEvent").dispatchEvent(e,t,n)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(de,8),d.KVO(Ve))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),F=(()=>{class c{constructor(e){this.platformId=e}log(e,t){this.handleLog(e,t,"log")}warn(e,t){this.handleLog(e,t,"warn")}error(e,t){this.handleLog(e,t,"error")}handleLog(e,t,n){(t.logOptions?.dev&&this.isDevMode()&&(0,G.UE)(this.platformId)||t.logOptions?.prod&&!this.isDevMode()&&(0,G.UE)(this.platformId)||t.logOptions?.ssr&&!(0,G.UE)(this.platformId))&&console[n](...e)}isDevMode(){return(0,T.naY)()}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(S.Agw))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Me=(()=>{class c{constructor(e){this.logger=e}find(e,t,n,o,r={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){return n?this.findEnclosingHooks(e,t,n,o,r):this.findSingletagHooks(e,t)}findSingletagHooks(e,t){const n=[],o=N(e,t);for(const r of o)n.push({openingTagStartIndex:r.index,openingTagEndIndex:r.index+r[0].length,closingTagStartIndex:null,closingTagEndIndex:null});return n}findEnclosingHooks(e,t,n,o,r={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){const s=[],i=[],a=N(e,t);for(const u of a)s.push({isOpening:!0,value:u[0],startIndex:u.index,endIndex:u.index+u[0].length});const l=N(e,n);for(const u of l)s.push({isOpening:!1,value:u[0],startIndex:u.index,endIndex:u.index+u[0].length});s.sort((u,h)=>u.startIndex-h.startIndex);const g=[];for(const[u,h]of s.entries())if(u>0&&h.startIndex<s[u-1].endIndex)this.logger.warn(['Syntax error - New tag "'+h.value+'" started at position '+h.startIndex+' before previous tag "'+s[u-1].value+'" ended at position '+s[u-1].endIndex+". Ignoring."],r);else if(h.isOpening)g.push(h);else{if(0===g.length){this.logger.warn(['Syntax error - Closing tag without preceding opening tag found: "'+h.value+'". Ignoring.'],r);continue}if(!1===o&&g.length>1){g.pop();continue}const f=g[g.length-1];i.push({openingTagStartIndex:f.startIndex,openingTagEndIndex:f.startIndex+f.value.length,closingTagStartIndex:h.startIndex,closingTagEndIndex:h.startIndex+h.value.length}),g.pop()}return g.length>0&&this.logger.warn(["Syntax error - Opening tags without corresponding closing tags found."],r),i}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),He=(()=>{class c{constructor(e){this.hookFinder=e}findSingleTags(e,t,n={opening:"<",closing:">"},o){const r=this.generateOpeningTagRegex(t,n);return this.hookFinder.find(e,r,void 0,void 0,o)}findEnclosingTags(e,t,n={opening:"<",closing:">"},o){const r=this.generateOpeningTagRegex(t,n),s=this.generateClosingTagRegex(t,n);return this.hookFinder.find(e,r,s,!0,o)}findSelfClosingTags(e,t,n={opening:"<",closing:">"},o){const r=this.generateOpeningTagRegex(t,n,!0);return this.hookFinder.find(e,r,void 0,void 0,o)}generateOpeningTagRegex(e,t={opening:"<",closing:">"},n=!1){const o=this.escapeRegex(t.opening),r=this.escapeRegex(e),s=(n?"\\/":"")+this.escapeRegex(t.closing);return new RegExp(o+r+"(?:\\s*"+s+"|(?:\\s+"+x.attributeNameRegex+"=(?:"+x.attributeValueDoubleQuotesRegex+"|"+x.attributeValueSingleQuotesRegex+"))+\\s*"+s+")","gim")}generateClosingTagRegex(e,t={opening:"<",closing:">"}){const n=this.escapeRegex(t.opening)+"/",o=this.escapeRegex(e),r=this.escapeRegex(t.closing);return new RegExp(n+o+r,"gim")}escapeRegex(e){return e.replace(new RegExp("[-\\/\\\\^$*+?.()|[\\]{}]","g"),"\\$&")}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(Me))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Fe=(()=>{class c{encodeSubstrings(e){const r=[...N(e,/'/gm).filter(l=>0===l.index||"\\"!==e[l.index-1]),...N(e,/"/gm).filter(l=>0===l.index||"\\"!==e[l.index-1]),...N(e,/`/gm).filter(l=>0===l.index||"\\"!==e[l.index-1])];r.sort((l,g)=>l.index-g.index);const s=[];let i=null;for(const l of r)i?i[0]===l[0]&&(s.push({startIndex:i.index+1,endIndex:l.index}),i=null):i=l;if(null!==i)throw Error("Input parse error. String was opened, but not closed.");return this.encodeTextSegments(e,s,this.encodeStringSpecialChars)}encodeStringSpecialChars(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/'/g,"@@@singlequote@@@")).replace(/"/g,"@@@doublequote@@@")).replace(/`/g,"@@@gravequote@@@")).replace(/:/g,"@@@colon@@@")).replace(/;/g,"@@@semicolon@@@")).replace(/\./g,"@@@dot@@@")).replace(/,/g,"@@@comma@@@")).replace(/\\/g,"@@@backslash@@@")).replace(/\(/g,"@@@openRoundBracket@@@")).replace(/\)/g,"@@@closeRoundBracket@@@")).replace(/\[/g,"@@@openSquareBracket@@@")).replace(/\]/g,"@@@closeSquareBracket@@@")).replace(/\{/g,"@@@openCurlyBracket@@@")).replace(/\}/g,"@@@closeCurlyBracket@@@")}decodeStringSpecialChars(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/@@@singlequote@@@/g,"'")).replace(/@@@doublequote@@@/g,'"')).replace(/@@@gravequote@@@/g,"`")).replace(/@@@colon@@@/g,":")).replace(/@@@semicolon@@@/g,";")).replace(/@@@dot@@@/g,".")).replace(/@@@comma@@@/g,",")).replace(/@@@backslash@@@/g,"\\")).replace(/@@@openRoundBracket@@@/g,"(")).replace(/@@@closeRoundBracket@@@/g,")")).replace(/@@@openSquareBracket@@@/g,"[")).replace(/@@@closeSquareBracket@@@/g,"]")).replace(/@@@openCurlyBracket@@@/g,"{")).replace(/@@@closeCurlyBracket@@@/g,"}")}encodeSubfunctions(e){const o=[...N(e,/\(/gm),...N(e,/\)/gm)];o.sort((a,l)=>a.index-l.index);const r=[],s=[];for(const a of o)if("("===a[0])s.push(a);else{if(0===s.length)throw Error("Input parse error. Closed function bracket without opening it first.");1===s.length&&r.push({startIndex:s[0].index+1,endIndex:a.index}),s.pop()}if(0!==s.length)throw Error("Input parse error. Opened function bracket without closing it.");return this.encodeTextSegments(e,r,this.encodeFunctionBrackets)}encodeFunctionBrackets(e){return(e=e.replace(/\(/g,"@@@fnOpenBracket@@@")).replace(/\)/g,"@@@fnCloseBracket@@@")}decodeFunctionBrackets(e){return(e=e.replace(/@@@fnOpenBracket@@@/g,"(")).replace(/@@@fnCloseBracket@@@/g,")")}encodeVariableSubbrackets(e){const o=N(e,new RegExp("(?:[a-zA-Z_$\\])])(\\[)","gm")),r=[];for(const a of o){const l=e.substring(a.index+2),h=[...N(l,/\[/gm),...N(l,/\]/gm)];h.sort((v,C)=>v.index-C.index);let f=1;for(const v of h)if(f="]"===v[0]?f-1:f+1,0===f){r.push({startIndex:a.index+2,endIndex:a.index+2+v.index});break}if(0!==f)throw Error("Input parse error. Opened bracket without closing it.")}const s=[];for(const a of r)(0===s.length||s[s.length-1].endIndex<a.startIndex)&&s.push(a);return this.encodeTextSegments(e,s,this.encodeVariableBrackets)}encodeVariableBrackets(e){return(e=e.replace(/\[/g,"@@@variableOpeningBracket@@@")).replace(/\]/g,"@@@variableClosingBracket@@@")}decodeVariableBrackets(e){return(e=e.replace(/@@@variableOpeningBracket@@@/g,"[")).replace(/@@@variableClosingBracket@@@/g,"]")}transformContextVarIntoPlacerholder(e){return(e=(e=(e=(e=(e=(e="__CXT__"+e.substring(7)).replace(/\"/g,"@@@cxtDoubleQuote@@@")).replace(/\./g,"@@@cxtDot@@@")).replace(/\[/g,"@@@cxtOpenSquareBracket@@@")).replace(/\]/g,"@@@cxtCloseSquareBracket@@@")).replace(/\(/g,"@@@cxtOpenRoundBracket@@@")).replace(/\)/g,"@@@cxtCloseRoundBracket@@@")}transformPlaceholderIntoContextVar(e){return(e=(e=(e=(e=(e=(e="context"+e.substring(7)).replace(/@@@cxtDoubleQuote@@@/g,'"')).replace(/@@@cxtDot@@@/g,".")).replace(/@@@cxtOpenSquareBracket@@@/g,"[")).replace(/@@@cxtCloseSquareBracket@@@/g,"]")).replace(/@@@cxtOpenRoundBracket@@@/g,"(")).replace(/@@@cxtCloseRoundBracket@@@/g,")")}encodeTextSegments(e,t,n){const o=[];for(const i of t){const a=0===o.length?0:o[o.length-1].endIndex;o.push({type:"text",startIndex:a,endIndex:i.startIndex,string:e.substring(a,i.startIndex)}),o.push({type:"special",startIndex:i.startIndex,endIndex:i.endIndex,string:e.substring(i.startIndex,i.endIndex)})}const r=0===o.length?0:o[o.length-1].endIndex;o.push({type:"text",startIndex:r,endIndex:e.length-1,string:e.substring(r)});for(const i of o)"special"===i.type&&(i.string=n(i.string));let s="";for(const i of o)s+=i.string;return s}stripSlashes(e){return e.replace(/\\(.)/g,"$1")}escapeDoubleQuotes(e){return e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}static{this.\u0275fac=function(t){return new(t||c)}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),je=(()=>{class c{constructor(e,t){this.dataTypeEncoder=e,this.logger=t}evaluate(e,t={},n,o=!0,r={},s=!0,i={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){if("null"===e)return null;if("undefined"!==e){if("true"===e)return!0;if("false"===e)return!1;if(!isNaN(e))return parseInt(e,10);if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")||e.startsWith("`")&&e.endsWith("`")){let a=e.substring(1,e.length-1);return a=o?this.dataTypeEncoder.stripSlashes(a):a,a}if((e=this.encodeDataTypeString(e)).startsWith("{")&&e.endsWith("}")||e.startsWith("[")&&e.endsWith("]")){const a=this.parseAsJSON(e,o);return this.loadJSONVariables(a,t,n,o,r,s,i)}if("$event"===e)return n;if(e.match(new RegExp("^\\s*"+x.contextVariableRegex+"\\s*$","gm")))return this.loadContextVariable(e,t,n,o,r,s,i);throw Error('Data type for following input was not recognized and could not be parsed: "'+e+'"')}}encodeDataTypeString(e){return e=this.dataTypeEncoder.encodeSubstrings(e),e=this.dataTypeEncoder.encodeSubfunctions(e),this.dataTypeEncoder.encodeVariableSubbrackets(e)}decodeDataTypeString(e){return e=this.dataTypeEncoder.decodeStringSpecialChars(e),e=this.dataTypeEncoder.decodeFunctionBrackets(e),(e=this.dataTypeEncoder.decodeVariableBrackets(e)).trim()}parseAsJSON(e,t){if((e=(e=(e=e.replace(/\'(\\.|[^\'])*?\'/gm,i=>'"'+i.slice(1,-1)+'"')).replace(/\`(\\.|[^\`])*?\`/gm,i=>'"'+i.slice(1,-1)+'"')).replace(/"?([a-z0-9A-Z_]+)"?\s*:/g,'"$1": ')).match(/"?__proto__"?\s*:/g))throw Error('Setting the "__proto__" property in a hook input object is not allowed.');if(e.match(/"?prototype"?\s*:/g))throw Error('Setting the "prototype" property in a hook input object is not allowed.');if(e.match(/"?constructor"?\s*:/g))throw Error('Setting the "constructor" property in a hook input object is not allowed.');e=this.replaceValuesInJSONString(e,"undefined",i=>"null"),e=this.replaceValuesInJSONString(e,x.contextVariableRegex,i=>'"'+this.dataTypeEncoder.transformContextVarIntoPlacerholder(i)+'"'),e=this.replaceValuesInJSONString(e,"\\$event",i=>'"__EVENT__"');const s=JSON.parse(e);return this.decodeJSONStrings(s,t),s}replaceValuesInJSONString(e,t,n){return e.replace(new RegExp("(?:(:\\s*)("+t+")(?=\\s*[,}])|([\\[,]\\s*)("+t+")(?=\\s*[\\],]))","gm"),(s,i,a,l,g)=>(i||l)+n(a||g))}decodeJSONStrings(e,t){for(const n in e)if("string"==typeof e[n]){if('__EVENT__"'===e[n]||e[n].match(new RegExp("^\\s*"+x.placeholderContextVariableRegex+"\\s*$","gm")))continue;let o=this.decodeDataTypeString(e[n]);o=t?this.dataTypeEncoder.stripSlashes(o):o,e[n]=o}else"object"==typeof e[n]&&this.decodeJSONStrings(e[n],t)}loadJSONVariables(e,t,n,o,r,s,i){for(const a in e)if("string"==typeof e[a]){if("__EVENT__"===e[a])e[a]=n;else if(e[a].match(new RegExp("^\\s*"+x.placeholderContextVariableRegex+"\\s*$","gm"))){const l=this.dataTypeEncoder.transformPlaceholderIntoContextVar(e[a].trim());e[a]=this.loadContextVariable(l,t,n,o,r,s,i)}}else"object"==typeof e[a]&&this.loadJSONVariables(e[a],t,n,o,r,s,i);return e}loadContextVariable(e,t={},n,o=!0,r={},s=!0,i={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){try{const a=e.substring(7);if(""===a.trim())return t;const l=[],g=N(a,new RegExp(x.variablePathPartRegex,"gm"));for(const u of g){if(u[0].startsWith(".")&&l.push({type:"property",value:u[0].substring(1)}),u[0].startsWith("[")&&u[0].endsWith("]")){let h=u[0].substring(1,u[0].length-1);h=this.decodeDataTypeString(h),h=this.evaluate(h,t,n,o,r,s),l.push({type:"property",value:h})}if(u[0].startsWith("(")&&u[0].endsWith(")")){if(!s)throw Error("Tried to call a function in a context variable. This has been disallowed in the current config.");const h=u[0].substring(1,u[0].length-1),f=[];if(""!==h)for(const v of h.split(",")){let C=this.decodeDataTypeString(v);C=this.evaluate(C,t,n,o,r,s),f.push(C)}l.push({type:"function",value:f})}}try{const u=this.fetchContextVariable(t,l);return r[this.decodeDataTypeString(e)]=u,u}catch{throw Error('The required context variable "'+this.decodeDataTypeString(e)+'" could not be found in the context object. Returning undefined instead.')}}catch(a){return this.logger.warn([a],i),void(r[this.decodeDataTypeString(e)]=void 0)}}fetchContextVariable(e,t){if("__proto__"===t[0].value)throw Error("Accessing the __proto__ property through a context variable is not allowed.");if("prototype"===t[0].value)throw Error("Accessing the prototype property through a context variable is not allowed.");if("constructor"===t[0].value)throw Error("Accessing the constructor property through a context variable is not allowed.");if(void 0===e)throw Error("Context variable path could not be resolved. Trying to access "+("property"===t[0].type?'property "'+t[0].value+'" of undefined.':"undefined function."));let n;return"property"===t[0].type?e.hasOwnProperty(t[0].value)?(n=e[t[0].value],"function"==typeof n&&(n=n.bind(e))):e.__proto__.hasOwnProperty(t[0].value)?(n=e.__proto__[t[0].value],"function"==typeof n&&(n=n.bind(e))):n=void 0:"function"===t[0].type&&(n=e(...t[0].value)),t.shift(),t.length>0&&(n=this.fetchContextVariable(n,t)),n}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(Fe),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),We=(()=>{class c{constructor(e,t){this.dataTypeParser=e,this.logger=t}checkInputBindings(e,t,n,o){for(const[r,s]of Object.entries(e))if(n.parseInputs)if(s.parsed)this.updateInputBindingIfStale(s,t,n);else try{s.value=this.dataTypeParser.evaluate(s.raw,n.allowContextInBindings?t:{},void 0,n.unescapeStrings,s.boundContextVariables,n.allowContextFunctionCalls,o),s.parsed=!0}catch(i){this.logger.error(["Hook input parsing error\nselector: "+n.selector+"\ninput: "+r+'\nvalue: "'+s.value+'"'],o),this.logger.error([i.stack],o),delete e[r]}else s.value=s.raw}updateInputBindingIfStale(e,t,n){if(Object.keys(e.boundContextVariables).length>0){let o=!1;for(const[r,s]of Object.entries(e.boundContextVariables)){const i=this.dataTypeParser.encodeDataTypeString(r);if(this.dataTypeParser.loadContextVariable(i,t,void 0,n.unescapeStrings,{},n.allowContextFunctionCalls)!==s){o=!0;break}}o&&(e.boundContextVariables={},e.value=this.dataTypeParser.evaluate(e.raw,n.allowContextInBindings?t:{},void 0,n.unescapeStrings,e.boundContextVariables,n.allowContextFunctionCalls))}}checkOutputBindings(e,t,n){for(const[o,r]of Object.entries(e))r.parsed||(r.value=(s,i)=>{try{this.dataTypeParser.evaluate(r.raw,t.allowContextInBindings?i:{},s,t.unescapeStrings,r.boundContextVariables,t.allowContextFunctionCalls)}catch(a){this.logger.error(["Hook output parsing error\nselector: "+t.selector+"\noutput: "+o+'\nvalue: "'+r.value+'"'],n),this.logger.error([a.stack],n)}},r.parsed=!0)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(je),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),$e=(()=>{class c{constructor(e,t,n,o,r,s){this.injector=e,this.parserResolver=t,this.platformService=n,this.tagHookFinder=o,this.bindingsValueManager=r,this.logger=s}resolve(e,t,n,o,r){const s=[];for(const l of e){const g=this.resolveEntry(l,t,r);g&&s.push(g)}const i=this.validateParserFunctions(s,r);if(this.checkParserNames(i,r),!n&&!o)return i;this.checkBlackAndWhitelist(i,n,o,r);const a=[];for(const l of i)l.hasOwnProperty("name")&&"string"==typeof l.name&&(n&&n.includes(l.name)||o&&!o.includes(l.name))||a.push(l);return a}resolveEntry(e,t,n){if(e.hasOwnProperty("prototype")){if((0,T.HJs)(e))return this.createSelectorHookParser({component:e});try{return t.get(e)}catch{return new e}}else if("object"==typeof e){if("Object"!==e.constructor.name)return e;try{return this.createSelectorHookParser(e)}catch(o){return this.logger.error(["Invalid parser config - "+o.message,e],n),null}}return this.logger.error(["Invalid parser config - ",e],n),null}createSelectorHookParser(e){return e.hasOwnProperty("parseWithRegex")&&e.parseWithRegex||e.hasOwnProperty("enclosing")&&!e.enclosing||e.hasOwnProperty("bracketStyle")&&e.bracketStyle?new Ae(e,this.parserResolver,this.tagHookFinder,this.bindingsValueManager):new Ne(e,this.parserResolver,this.platformService,this.bindingsValueManager)}validateParserFunctions(e,t){const n=[];for(const o of e)"function"==typeof o.findHooks||"function"==typeof o.findHookElements?"function"==typeof o.loadComponent?"function"==typeof o.getBindings?n.push(o):this.logger.error(['Submitted parser does not implement "getBindings()". Removing from list of active parsers:',o],t):this.logger.error(['Submitted parser does not implement "loadComponent()". Removing from list of active parsers:',o],t):this.logger.error(['Submitted parser neither implements "findHooks()" nor "findHookElements()". One is required. Removing from list of active parsers:',o],t);return n}checkParserNames(e,t){const n=e.map(s=>s.name).filter(s=>void 0!==s),o=[],r=[];for(const s of n)o.includes(s)&&!r.includes(s)&&(this.logger.warn(['Parser name "'+s+'" is not unique and appears multiple times in the list of active parsers.'],t),r.push(s)),o.push(s)}checkBlackAndWhitelist(e,t,n,o){const r=e.map(s=>s.name).filter(s=>void 0!==s);if(t)for(const s of t)r.includes(s)||this.logger.warn(['Blacklisted parser name "'+s+'" does not appear in the list of global parsers names. Make sure both spellings are identical.'],o);if(n)for(const s of n)r.includes(s)||this.logger.warn(['Whitelisted parser name "'+s+'" does not appear in the list of global parsers names. Make sure both spellings are identical.'],o)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(d.zZn),d.KVO(De),d.KVO(K),d.KVO(He),d.KVO(We),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Le=(()=>{class c{constructor(e){this.parserEntryResolver=e}resolve(e,t,n,o,r,s=null,i=null,a=null,l=null){let g={};n=n||[],o=o||[];const u={options:{sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}};g=(r=r||{}).hasOwnProperty("inheritance")&&r.inheritance!==te.Linear?this.mergeSettings(r.inheritance===te.All?[u,...n,...o,{options:i||void 0}]:[u,r||{},{options:i||void 0}]):this.mergeSettings([u,...o,{parsers:s||void 0,options:i||void 0}]);const h=g.options;t&&"string"!=typeof t&&(h.sanitize=!1);let f=[];return s?f=this.parserEntryResolver.resolve(s,e,null,null,h):g.parsers&&(f=this.parserEntryResolver.resolve(g.parsers,e,a,l,h)),{parsers:f,options:h}}mergeSettings(e){const t={};for(const n of e){if(void 0!==n.parsers){void 0===t.parsers&&(t.parsers=[]);for(const o of n.parsers)t.parsers.includes(o)||t.parsers.push(o)}void 0!==n.options&&(void 0===t.options&&(t.options={}),t.options=this.recursiveAssign(t.options,n.options))}return t}recursiveAssign(e,t){if(Object(t)!==t)return t;Object(e)!==e&&(e={});for(const n in t)e[n]=this.recursiveAssign(e[n],t[n]);return e}static{this.\u0275fac=function(t){return new(t||c)(d.KVO($e))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();const he="_ngx_dynamic_hooks_node_placeholder";let ze=(()=>{class c{constructor(e,t){this.platformService=e,this.logger=t}findInElement(e,t,n,o,r,s){for(const i of n)if("function"==typeof i.findHooks){this.checkElement(e,t,n,o,r,s);break}}checkElement(e,t,n,o,r,s,i={counter:0,nodes:{}}){let a=this.platformService.getChildNodes(e),l="";const g={};for(const f of a)if(this.platformService.isTextNode(f))l+=this.platformService.getTextContent(f);else{const v=i.counter++;l+=`${he}__${v}__`,g[v]=f}const u=Object.keys(s).length,h=this.find(l,t,n,o,r,s);if(Object.keys(s).length>u&&(this.platformService.clearChildNodes(e),this.platformService.setInnerContent(e,h.content),a=this.platformService.getChildNodes(e),i.nodes={...i.nodes,...g}),Object.keys(i.nodes).length)for(const f of a)if(this.platformService.isTextNode(f)){let v=this.platformService.getTextContent(f);if(v){const C=N(v,new RegExp(`${he}__(\\d*)__`,"g"));if(C.length){const k=[];let z=0;for(const _ of C){const xe=v.substring(z,_.index),X=parseInt(_[1]);xe&&k.push(this.platformService.createTextNode(xe)),X&&i.nodes[X]&&(k.push(i.nodes[X]),delete i.nodes[X]),z=_.index+_[0].length}const be=v.substring(z);be&&k.push(this.platformService.createTextNode(be));const ie=this.platformService.getParentNode(f);for(const _ of k)this.platformService.insertBefore(ie,_,f);this.platformService.removeChild(ie,f),a=this.platformService.getChildNodes(ie)}}}for(const f of a)f.nodeType!==Node.TEXT_NODE&&this.checkElement(f,t,n,o,r,s,i)}find(e,t,n,o,r,s){if(""===e)return{content:e,hookIndex:s};r.convertHTMLEntities&&(e=this.convertHTMLEntities(e));let i=[];for(const l of n)if("function"==typeof l.findHooks)for(const g of l.findHooks(e,t,r))i.push({parser:l,hookPosition:g});i.sort((l,g)=>l.hookPosition.openingTagStartIndex-g.hookPosition.openingTagStartIndex),i=this.validateHookPositions(i,e,r);const a=[];for(const l of i){const g=Object.keys(s).length+1,u=this.getHookSegments(l.hookPosition,e);if(a.push({startIndex:l.hookPosition.openingTagStartIndex,endIndex:l.hookPosition.openingTagEndIndex,replacement:`<${ee} ${B}="${g}" ${P}="${o}">`}),a.push({startIndex:u.enclosing?l.hookPosition.closingTagStartIndex:l.hookPosition.openingTagEndIndex,endIndex:u.enclosing?l.hookPosition.closingTagEndIndex:l.hookPosition.openingTagEndIndex,replacement:`</${ee}>`}),s[g]={id:g,parser:l.parser,value:{openingTag:u.openingTag,closingTag:u.closingTag,element:null,elementSnapshot:null},data:null,isLazy:!1,bindings:null,previousBindings:null,componentRef:null,dirtyInputs:new Set,outputSubscriptions:{},htmlEventSubscriptions:{}},u.enclosing&&r.fixParagraphTags){const h=this.removeTagArtifacts(u.textBefore,"<p>","</p>",u.innerValue,"</p>","<p>");u.textBefore=h.firstText,u.innerValue=h.secondText;const f=this.removeTagArtifacts(u.innerValue,"<p>","</p>",u.textAfter,"</p>","<p>");u.innerValue=f.firstText,u.textAfter=f.secondText,e=u.textBefore+u.openingTag+u.innerValue+u.closingTag+u.textAfter}}a.sort((l,g)=>{let u=g.startIndex-l.startIndex;return 0===u&&(u=g.endIndex-l.endIndex),u});for(const l of a){const g=e.substring(0,l.startIndex),u=e.substring(l.endIndex);e=g+l.replacement+u}return{content:e,hookIndex:s}}getHookSegments(e,t){const n=Number.isInteger(e.closingTagStartIndex)&&Number.isInteger(e.closingTagEndIndex);return{enclosing:n,textBefore:t.substring(0,e.openingTagStartIndex),openingTag:t.substring(e.openingTagStartIndex,e.openingTagEndIndex),innerValue:n?t.substring(e.openingTagEndIndex,e.closingTagStartIndex):null,closingTag:n?t.substring(e.closingTagStartIndex,e.closingTagEndIndex):null,textAfter:t.substring(n?e.closingTagEndIndex:e.openingTagEndIndex)}}validateHookPositions(e,t,n){const o=[];e:for(const[r,s]of e.entries()){const i=Number.isInteger(s.hookPosition.closingTagStartIndex)&&Number.isInteger(s.hookPosition.closingTagEndIndex),a=s.hookPosition;if(a.openingTagStartIndex>=a.openingTagEndIndex){this.logger.warn(["Text hook error: openingTagEndIndex has to be greater than openingTagStartIndex. Ignoring.",a],n);continue}if(i&&a.openingTagEndIndex>a.closingTagStartIndex){this.logger.warn(["Text hook error: closingTagStartIndex has to be greater than openingTagEndIndex. Ignoring.",a],n);continue}if(i&&a.closingTagStartIndex>=a.closingTagEndIndex){this.logger.warn(["Text hook error: closingTagEndIndex has to be greater than closingTagStartIndex. Ignoring.",a],n);continue}const l=e.slice(0,r);for(const g of l){const u=g.hookPosition,h=Number.isInteger(u.closingTagStartIndex)&&Number.isInteger(u.closingTagEndIndex);if(a.openingTagStartIndex===u.openingTagStartIndex&&a.openingTagEndIndex===u.openingTagEndIndex&&(!i||!h||a.closingTagStartIndex===u.closingTagStartIndex&&a.closingTagEndIndex===u.closingTagEndIndex)){this.generateHookPosWarning("A text hook with the same position as another text hook was found. There may be multiple parsers looking for the same text pattern. Ignoring duplicates.",a,u,t,n);continue e}if(a.openingTagStartIndex<u.openingTagEndIndex){this.generateHookPosWarning("Text hook error: Hook opening tag starts before previous hook opening tag ends. Ignoring.",a,u,t,n);continue e}if(h&&!(a.openingTagEndIndex<=u.closingTagStartIndex||a.openingTagStartIndex>=u.closingTagEndIndex)){this.generateHookPosWarning("Text hook error: Opening tag of hook overlaps with closing tag of previous hook. Ignoring.",a,u,t,n);continue e}if(h&&i&&!(a.closingTagEndIndex<=u.closingTagStartIndex||a.closingTagStartIndex>=u.closingTagEndIndex)){this.generateHookPosWarning("Text hook error: Closing tag of hook overlaps with closing tag of previous hook. Ignoring.",a,u,t,n);continue e}if(i&&h&&a.openingTagEndIndex<=u.closingTagStartIndex&&a.closingTagStartIndex>=u.closingTagEndIndex){this.generateHookPosWarning("Text hook error: The closing tag of a nested hook lies beyond the closing tag of the outer hook. Ignoring.",a,u,t,n);continue e}}o.push(s)}return o}generateHookPosWarning(e,t,n,o,r){const s=this.getHookSegments(n,o),i=this.getHookSegments(t,o);this.logger.warn([e+"\nFirst hook: ",{openingTag:s.openingTag,openingTagStartIndex:n.openingTagStartIndex,openingTagEndIndex:n.openingTagEndIndex,closingTag:s.closingTag,closingTagStartIndex:n.closingTagStartIndex,closingTagEndIndex:n.closingTagEndIndex},"\nSecond hook:",{openingTag:i.openingTag,openingTagStartIndex:t.openingTagStartIndex,openingTagEndIndex:t.openingTagEndIndex,closingTag:i.closingTag,closingTagStartIndex:t.closingTagStartIndex,closingTagEndIndex:t.closingTagEndIndex}],r)}removeTagArtifacts(e,t,n,o,r,s){let i=!1,a=!1;const l=e.lastIndexOf(t),g=e.lastIndexOf(n);(l>=0&&-1===g||l>g)&&(i=!0);const u=o.indexOf(r),h=o.indexOf(s);return(u>=0&&-1===h||u<h)&&(a=!0),i&&a&&(e=e.substring(0,l)+" ".repeat(t.length)+e.substring(l+t.length),o=o.substring(0,u)+" ".repeat(r.length)+o.substring(u+r.length)),{firstText:e,secondText:o}}convertHTMLEntities(e){const t=this.platformService.createElement("div");return e.replace(/&[#A-Za-z0-9]+;/gi,o=>" "===o?" ":(this.platformService.setInnerContent(t,o),this.platformService.getTextContent(t)))}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(K),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Ke=(()=>{class c{constructor(e,t){this.platformService=e,this.logger=t}find(e,t,n,o,r,s){let i=[];for(const a of n)if("function"==typeof a.findHookElements)for(const l of a.findHookElements(e,t,r))i.push({parser:a,hookElement:l});i=function Re(c,p,e){return[...c].sort(function(n,o){return"function"==typeof e&&(n=e(n),o=e(o)),p(n,o)})}(i,this.platformService.sortElements.bind(this.platformService),a=>a.hookElement),i=this.validateHookElements(i,e,r);for(const a of i){const l=Object.keys(s).length+1;s[l]={id:l,parser:a.parser,value:{openingTag:this.platformService.getOpeningTag(a.hookElement),closingTag:this.platformService.getClosingTag(a.hookElement),element:a.hookElement,elementSnapshot:this.platformService.cloneElement(a.hookElement)},data:null,isLazy:!1,bindings:null,previousBindings:null,componentRef:null,dirtyInputs:new Set,outputSubscriptions:{},htmlEventSubscriptions:{}},this.platformService.setAttribute(a.hookElement,B,l.toString()),this.platformService.setAttribute(a.hookElement,P,o)}return s}validateHookElements(e,t,n){const o=[];for(const[r,s]of e.entries())o.slice(0,r).findIndex(l=>l.hookElement===s.hookElement)>=0||this.platformService.getAttributeNames(s.hookElement).includes(B)||this.platformService.getAttributeNames(s.hookElement).includes(P)?this.logger.warn(["An element hook tried to use an element that was found by another hook before. There may be multiple parsers looking for the same elements. Ignoring duplicates.",s.hookElement],n):oe(s.hookElement)||o.push(s);return o}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(K),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();const re="dynamic-hooks-sanitization-placeholder",_e=new RegExp(`</?${re}.*?>`,"g");let Ue=(()=>{class c{constructor(e){this.platformService=e,this.attrWhitelist=[B,P,"class","href","src"]}sanitize(e,t,n){const o={};for(const a of Object.values(t)){const l=this.platformService.querySelectorAll(e,`[${B}="${a.id}"][${P}="${n}"]`)?.[0];if(l){o[a.id]=l;const g=this.platformService.getParentNode(l),u=this.platformService.getChildNodes(l),h=this.platformService.createElement(re);this.platformService.setAttribute(h,B,a.id.toString()),this.platformService.setAttribute(h,P,n),this.platformService.insertBefore(g,h,l),this.platformService.removeChild(g,l);for(const f of u)this.platformService.appendChild(h,f)}}let r=this.platformService.getInnerContent(e);r=this.findAndEncodeTags(r,_e);const s=console.warn;console.warn=()=>{};let i=this.platformService.sanitize(r);console.warn=s,i=this.decodeTagString(i),e.innerHTML=i||"";for(const[a,l]of Object.entries(o)){const g=this.platformService.querySelectorAll(e,`${re}[${B}="${a}"]`)?.[0];if(g){const u=this.platformService.getParentNode(g),h=this.platformService.getChildNodes(g);this.platformService.insertBefore(u,l,g),this.platformService.removeChild(u,g);for(const f of h)this.platformService.appendChild(l,f);this.sanitizeElementAttrs(l)}}return e}sanitizeElementAttrs(e){const t=this.platformService.getAttributeNames(e),n=this.platformService.createElement("div"),o=this.platformService.createElement("span");this.platformService.appendChild(n,o);for(const i of t){try{this.platformService.setAttribute(o,i,this.platformService.getAttribute(e,i))}catch{}try{i!==B&&i!==P&&this.platformService.removeAttribute(e,i)}catch{}}n.innerHTML=this.platformService.sanitize(this.platformService.getInnerContent(n));const r=this.platformService.querySelectorAll(n,"span")[0],s=this.platformService.getAttributeNames(r);for(const i of s)try{this.platformService.setAttribute(e,i,this.platformService.getAttribute(r,i))}catch{}return e}findAndEncodeTags(e,t){let n=e;const o=N(e,t);o.sort((r,s)=>s.index-r.index);for(const r of o){const s=r.index,i=r.index+r[0].length,a=n.substring(0,s),l=this.encodeTagString(n.substring(s,i)),g=n.substring(i);n=a+l+g}return n}encodeTagString(e){return(e=(e=e.replace(/</g,"@@@hook-lt@@@")).replace(/>/g,"@@@hook-gt@@@")).replace(/"/g,"@@@hook-dq@@@")}decodeTagString(e){return(e=(e=e.replace(/@@@hook-lt@@@/g,"<")).replace(/@@@hook-gt@@@/g,">")).replace(/@@@hook-dq@@@/g,'"')}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(K))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),qe=(()=>{class c{constructor(e){this.logger=e}isEqual(e,t,n,o={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){const r=this.detailedStringify(e,n),s=this.detailedStringify(t,n);return null===r.result||null===s.result?(this.logger.warn(["Objects could not be compared by value as one or both of them could not be stringified. Returning false. \n","Objects:",e,t],o),!1):r.result===s.result}detailedStringify(e,t){try{const n={count:0},o=this.decycle(e,[],t,n);return{result:JSON.stringify(o,(s,i)=>void 0===i?"undefined":"function"==typeof i||"symbol"==typeof i?i.toString():i),depthReachedCount:n.count}}catch{return{result:null,depthReachedCount:0}}}decycle(e,t=[],n=5,o){if(t.length>n)return o.count++,null;if(!e||"object"!=typeof e||e instanceof Date)return e;for(const s of t)if(this.objEqualsProperties(e,s))return null;const r=t.concat([e]);if(Array.isArray(e)){const s=[];for(const i of e)s.push(this.decycle(i,r,n,o));return s}{const s={};for(const i of Object.keys(e))s[i]=this.decycle(e[i],r,n,o);return s}}objEqualsProperties(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),ge=(()=>{class c{constructor(e,t){this.deepComparer=e,this.logger=t}refresh(e,t,n,o){for(const[r,s]of Object.entries(e))this.updateBindings(s,t,n);if(o)for(const r of Object.values(e)){if(!r.componentRef)return;"function"==typeof r.componentRef.instance.onDynamicChanges&&r.componentRef.instance.onDynamicChanges({context:t})}}updateBindings(e,t,n){e.componentRef&&(e.bindings=e.parser.getBindings(e.id,e.value,t,n),this.updateComponentWithNewInputs(e,n),this.updateComponentWithNewOutputs(e,t,n),e.previousBindings={inputs:this.savePreviousBindings(e,"inputs",n.compareInputsByValue,n.compareByValueDepth),outputs:this.savePreviousBindings(e,"outputs",n.compareOutputsByValue,n.compareByValueDepth)})}savePreviousBindings(e,t,n,o){const r={};if(e.bindings.hasOwnProperty(t))for(const[s,i]of Object.entries(e.bindings[t]))r[s]={reference:i,stringified:n?this.deepComparer.detailedStringify(i,o):null};return r}updateComponentWithNewInputs(e,t){const n=e.componentRef.instance,o=this.getChangedBindings(e,"inputs",t),r=[],s=(0,T.HJs)(e.componentRef.componentType);for(const[i,a]of Object.entries(o)){const l=t.ignoreInputAliases?"propName":"templateName",g=s.inputs.find(u=>i===u[l])||s.inputs.find(u=>i.toLowerCase()===u[l].toLowerCase())||s.inputs.find(u=>i.replace(/-/g,"")===u[l])||s.inputs.find(u=>i.replace(/-/g,"").toLowerCase()===u[l].toLowerCase());if(g)r.push({propName:g.propName,templateName:g.templateName,value:a});else if(t.acceptInputsForAnyProperty){const h=Object.getOwnPropertyNames(n).find(f=>i===f)||Object.getOwnPropertyNames(n).find(f=>i.toLowerCase()===f.toLowerCase())||i;if(["__proto__","prototype","constructor"].includes(h)){this.logger.error(['Tried to overwrite a __proto__, prototype or constructor property with input "'+h+'" for hook "'+e.componentRef.componentType.name+'". This is not allowed.'],t);continue}r.push({propName:h,templateName:null,value:a})}}for(const{propName:i,templateName:a,value:l}of r)a?e.componentRef?.setInput(a,l):i&&(e.componentRef.instance[i]=l);r.length&&e.componentRef?.changeDetectorRef.detectChanges()}updateComponentWithNewOutputs(e,t,n){const o=e.componentRef.instance,r=this.getChangedBindings(e,"outputs",n),s=[],i=(0,T.HJs)(e.componentRef.componentType);for(const[a,l]of Object.entries(r)){const g=n.ignoreOutputAliases?"propName":"templateName",u=i.outputs.find(h=>a===h[g])||i.outputs.find(h=>a.toLowerCase()===h[g].toLowerCase())||i.outputs.find(h=>a.replace(/-/g,"")===h[g])||i.outputs.find(h=>a.replace(/-/g,"").toLowerCase()===h[g].toLowerCase());if(u)s.push({propName:u.propName,templateName:u.templateName,value:l});else if(n.acceptOutputsForAnyObservable){let h=Object.getOwnPropertyNames(o).find(f=>o[f]instanceof H.c&&a===f)||Object.getOwnPropertyNames(o).find(f=>o[f]instanceof H.c&&a.toLowerCase()===f.toLowerCase());h&&s.push({propName:h,templateName:null,value:l})}}for(const{propName:a,value:g}of s)e.outputSubscriptions[a]&&e.outputSubscriptions[a].unsubscribe(),e.outputSubscriptions[a]=e.componentRef.instance[a].subscribe(u=>{g(u,t)})}getChangedBindings(e,t,n){const o={};if(e.bindings.hasOwnProperty(t))for(const[r,s]of Object.entries(e.bindings[t]))if(e.previousBindings&&e.previousBindings[t].hasOwnProperty(r))if("inputs"===t?n.compareInputsByValue:n.compareOutputsByValue){const i=this.deepComparer.detailedStringify(s,n.compareByValueDepth);this.checkDetailedStringifyResultPair(r,e.componentRef.componentType.name,n,e.previousBindings[t][r].stringified,i)?i.result!==e.previousBindings[t][r].stringified.result&&(o[r]=s):s!==e.previousBindings[t][r].reference&&(o[r]=s)}else s!==e.previousBindings[t][r].reference&&(o[r]=s);else o[r]=s;return o}checkDetailedStringifyResultPair(e,t,n,o,r){return null===o.result&&null===r.result?(this.logger.warn(['Could stringify neither new nor old value for hook binding "'+e+'" for component "'+t+'" to compare by value. Defaulting to comparison by reference instead.'],n),!1):null===o.result?(this.logger.warn(['Could not stringify old value for hook binding "'+e+'" for component "'+t+'" to compare by value. Defaulting to comparison by reference instead.'],n),!1):null===r.result?(this.logger.warn(['Could not stringify new value for hook binding "'+e+'" for component "'+t+'" to compare by value. Defaulting to comparison by reference instead.'],n),!1):(o.depthReachedCount>0&&r.depthReachedCount>0?this.logger.warn(["Maximum compareByValueDepth of "+n.compareByValueDepth+" reached "+r.depthReachedCount+" time(s) for new value and "+o.depthReachedCount+' time(s) for old value while comparing binding "'+e+'" for component "'+t+".\n","If this impacts performance, consider simplifying this binding, reducing comparison depth or setting compareInputsByValue/compareOutputsByValue to false."],n):o.depthReachedCount>0?this.logger.warn(["Maximum compareByValueDepth of "+n.compareByValueDepth+" reached "+o.depthReachedCount+' time(s) for old value while comparing binding "'+e+'" for component "'+t+".\n","If this impacts performance, consider simplifying this binding, reducing comparison depth or setting compareInputsByValue/compareOutputsByValue to false."],n):r.depthReachedCount>0&&this.logger.warn(["Maximum compareByValueDepth of "+n.compareByValueDepth+" reached "+r.depthReachedCount+' time(s) for new value while comparing binding "'+e+'" for component "'+t+".\n","If this impacts performance, consider simplifying this binding, reducing comparison depth or setting compareInputsByValue/compareOutputsByValue to false."],n),!0)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(qe),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Qe=(()=>{class c{constructor(e,t,n,o,r){this.platformId=e,this.appRef=t,this.componentUpdater=n,this.platformService=o,this.logger=r}init(e,t,n,o,r,s,i){const a=new M.m(1),l=[],g={};if(0===Object.keys(t).length)return a.next(!0),a;for(let h of this.platformService.querySelectorAll(e,`[${B}][${P}]`)){const f=parseInt(this.platformService.getAttribute(h,B));if(0===this.platformService.querySelectorAll(e,`[${B}="${f}"][${P}="${n}"]`).length){delete t[f];continue}const v=t[f];v.data=v.parser.loadComponent(v.id,v.value,o,this.platformService.getChildNodes(h),r),v.isLazy=v.data.component.hasOwnProperty("importPromise")&&v.data.component.hasOwnProperty("importName"),(0,G.UE)(this.platformId)||!v.isLazy?(!v.data.hostElementTag&&Be.includes(this.platformService.getTagName(h).toLowerCase())&&(v.data.hostElementTag=ee),v.data.hostElementTag&&(h=this.useCustomHostElement(h,v.data.hostElementTag),v.value.element=h),this.createContentSlotElements(h,v,n),g[f]=h):delete t[f]}const u=Object.keys(g).map(h=>parseInt(h));for(const[h,f]of Object.entries(t))u.includes(parseInt(h))||(this.logger.warn(["Error when trying to load components - The anchor element for the following hook was found initially, but could not be found again for loading the component. Ignoring.",f],r),delete t[h]);for(const[h,f]of Object.entries(g)){const v=t[h];l.push((0,w.of)(!0).pipe((0,D.Z)(()=>this.loadComponentClass(v.data.component))).pipe((0,j.M)(C=>{const k=this.extractContentSlotElements(f,n);this.createComponent(v,o,f,k,r,C,s,i)})).pipe((0,m.W)(C=>(this.logger.error([C.stack],r),delete t[v.id],(0,w.of)(null)))))}return 0===l.length?(a.next(!0),a):((0,E.z)([...l]).pipe(ae()).subscribe(()=>{for(const h of Object.values(t)){const f=[];("function"==typeof h.componentRef.instance.onDynamicMount||"function"==typeof h.componentRef.instance.onDynamicChanges)&&this.findContentChildren(h.componentRef.location.nativeElement,f,t,n),"function"==typeof h.componentRef.instance.onDynamicChanges&&h.componentRef.instance.onDynamicChanges({contentChildren:f}),"function"==typeof h.componentRef.instance.onDynamicMount&&h.componentRef.instance.onDynamicMount({context:o,contentChildren:f})}for(const h of Object.values(g))this.platformService.removeAttribute(h,B),this.platformService.removeAttribute(h,P),this.platformService.removeAttribute(h,"ng-version");a.next(!0)}),a)}useCustomHostElement(e,t){const n=this.platformService.createElement(t);this.platformService.setAttribute(n,B,this.platformService.getAttribute(e,B)),this.platformService.setAttribute(n,P,this.platformService.getAttribute(e,P)),this.platformService.removeAttribute(e,B),this.platformService.removeAttribute(e,P);const o=this.platformService.getChildNodes(e);for(const r of o)this.platformService.appendChild(n,r);return this.platformService.insertBefore(this.platformService.getParentNode(e),n,e),this.platformService.removeChild(this.platformService.getParentNode(e),e),n}createContentSlotElements(e,t,n){let o;o=t.data.hasOwnProperty("content")&&Array.isArray(t.data.content)?t.data.content:[this.platformService.getChildNodes(e)],this.platformService.clearChildNodes(e);for(const[r,s]of o.entries())if(null!=s){const i=this.platformService.createElement("dynamic-component-contentslot");this.platformService.setAttribute(i,"slotIndex",r.toString()),this.platformService.setAttribute(i,"parsetoken",n);for(const a of s)this.platformService.appendChild(i,a);this.platformService.appendChild(e,i)}}extractContentSlotElements(e,t){const n=[],o=this.platformService.getChildNodes(e).filter(r=>"DYNAMIC-COMPONENT-CONTENTSLOT"===this.platformService.getTagName(r)&&this.platformService.getAttribute(r,"parsetoken")===t);for(const r of o){const s=this.platformService.getAttribute(r,"slotIndex");n[parseInt(s)]=this.platformService.getChildNodes(r)}return this.platformService.clearChildNodes(e),n}loadComponentClass(e){const t=new M.m(1);if(e.hasOwnProperty("prototype"))t.next(e);else if("function"==typeof e)e().then(n=>{t.next(n)});else{if(!e.hasOwnProperty("importPromise")||!e.hasOwnProperty("importName"))throw Error('The "component" property of a returned HookData object must either contain the component class, a function that returns a promise with the component class or an explicit LazyLoadComponentConfig');if(e.importPromise instanceof Promise)throw Error('When lazy-loading a component, the "importPromise"-field must contain a function returning the import-promise, but it contained the promise itself.');e.importPromise().then(n=>{const o=e.importName,r=Object.prototype.hasOwnProperty.call(n,o)?n[o]:n.default;t.next(r)})}return t}createComponent(e,t,n,o,r,s,i,a){const l=(0,T.a0P)(s,{hostElement:n,environmentInjector:e.data.environmentInjector||i,elementInjector:e.data.injector||a,projectableNodes:o});e.componentRef=l,this.mapOutputsToHTMLEvents(e,r),this.componentUpdater.updateBindings(e,t,r),"function"==typeof e.componentRef.instance.onDynamicChanges&&void 0!==t&&e.componentRef.instance.onDynamicChanges({context:t}),this.appRef.attachView(l.hostView),l.changeDetectorRef.detectChanges()}mapOutputsToHTMLEvents(e,t){const n=(0,T.HJs)(e.componentRef.componentType);for(const o of n.outputs){const r=t.ignoreOutputAliases?o.propName:o.templateName;e.htmlEventSubscriptions[r]=e.componentRef.instance[o.propName].subscribe(s=>{t.triggerDOMEvents&&this.platformService.dispatchEvent(e.componentRef?.location.nativeElement,r,s)})}}findContentChildren(e,t=[],n,o){const r=this.platformService.getChildNodes(e);null!=r&&r.length>0&&r.forEach((s,i)=>{let a=!1;const l=this.platformService.getAttribute(s,P);if(null!==l&&l===o&&this.platformService.getAttribute(s,B)){const u=parseInt(this.platformService.getAttribute(s,B),10);n.hasOwnProperty(u)&&(t.push({componentRef:n[u].componentRef,contentChildren:[],hookValue:n[u].value}),a=!0)}this.findContentChildren(s,a?t[t.length-1].contentChildren:t,n,o)})}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(S.Agw),d.KVO(S.o8S),d.KVO(ge),d.KVO(K),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),fe=(()=>{class c{constructor(e,t,n,o,r,s,i,a,l,g,u){this.allSettings=e,this.ancestorSettings=t,this.moduleSettings=n,this.settingsResolver=o,this.textHookFinder=r,this.elementHookFinder=s,this.contentSanitizer=i,this.componentCreator=a,this.platformService=l,this.environmentInjector=g,this.injector=u}parse(e=null,t=null,n=null,o=null,r=null,s=null,i=null,a={},l=null,g=null){const u=l||this.environmentInjector,h=g||this.injector,{parsers:f,options:v}=this.settingsResolver.resolve(h,e,this.allSettings,this.ancestorSettings,this.moduleSettings,t,o,r,s);if(!e)return(0,w.of)({element:i||this.platformService.createElement("div"),hookIndex:a,context:n,usedParsers:f,usedOptions:v,usedInjector:h,usedEnvironmentInjector:u,destroy:()=>this.destroy(a)});const C=Math.random().toString(36).substring(2,12);let k="string"==typeof e?this.platformService.createElement("div"):e;if(this.platformService.setAttribute(k,q,"1"),"string"==typeof e){const z=this.textHookFinder.find(e,n,f,C,v,a);this.platformService.setInnerContent(k,z.content)}else this.textHookFinder.findInElement(k,n,f,C,v,a);if(a=this.elementHookFinder.find(k,n,f,C,v,a),v?.sanitize&&this.contentSanitizer.sanitize(k,a,C),i&&i!==k){this.platformService.removeAttribute(k,q),this.platformService.setAttribute(i,q,"1"),this.platformService.clearChildNodes(i);for(const z of this.platformService.getChildNodes(k))this.platformService.appendChild(i,z);k=i}return this.componentCreator.init(k,a,C,n,v,u,h).pipe(ae()).pipe((0,we.T)(z=>(this.platformService.removeAttribute(k,q),{element:k,hookIndex:a,context:n,usedParsers:f,usedOptions:v,usedInjector:h,usedEnvironmentInjector:u,destroy:()=>this.destroy(a)})))}destroy(e){if(e){for(const t of Object.values(e))t.componentRef&&t.componentRef.destroy();for(const t of Object.values(e)){for(const n of Object.values(t.outputSubscriptions))n&&n.unsubscribe();for(const n of Object.values(t.htmlEventSubscriptions))n&&n.unsubscribe()}}}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(le,8),d.KVO(Y,8),d.KVO(ue,8),d.KVO(Le),d.KVO(ze),d.KVO(Ke),d.KVO(Ue),d.KVO(Qe),d.KVO(K),d.KVO(d.uvJ),d.KVO(d.zZn))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),tt=(()=>{class c{constructor(e,t,n,o,r,s){this.hostElement=e,this.dynamicHooksService=t,this.componentUpdater=n,this.platformService=o,this.environmentInjector=r,this.injector=s,this.content=null,this.context=null,this.globalParsersBlacklist=null,this.globalParsersWhitelist=null,this.parsers=null,this.options=null,this.componentsLoaded=new d.bkB,this.hookIndex={},this.activeOptions={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}},this.activeParsers=[],this.token=Math.random().toString(36).substring(2,12),this.initialized=!1}ngDoCheck(){this.activeOptions.updateOnPushOnly||this.refresh(!1)}ngOnChanges(e){e.hasOwnProperty("content")||e.hasOwnProperty("globalParsersBlacklist")||e.hasOwnProperty("globalParsersWhitelist")||e.hasOwnProperty("parsers")||e.hasOwnProperty("options")?(this.reset(),this.parse(this.content)):e.hasOwnProperty("context")&&this.refresh(!0)}ngAfterViewInit(){}ngAfterViewChecked(){}ngOnDestroy(){this.reset()}reset(){this.dynamicHooksService.destroy(this.hookIndex),this.platformService.setInnerContent(this.hostElement.nativeElement,""),this.hookIndex={},this.activeOptions={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}},this.activeParsers=[],this.initialized=!1}parse(e){this.dynamicHooksService.parse(e,this.parsers,this.context,this.options,this.globalParsersBlacklist,this.globalParsersWhitelist,this.hostElement.nativeElement,this.hookIndex,this.environmentInjector,this.injector).subscribe(t=>{this.activeParsers=t.usedParsers,this.activeOptions=t.usedOptions,this.initialized=!0;const n=Object.values(this.hookIndex).map(o=>({hookId:o.id,hookValue:o.value,hookParser:o.parser,componentRef:o.componentRef}));this.componentsLoaded.emit(n)})}refresh(e){this.initialized&&this.componentUpdater.refresh(this.hookIndex,this.context,this.activeOptions,e)}static{this.\u0275fac=function(t){return new(t||c)(S.rXU(S.aKT),S.rXU(fe),S.rXU(ge),S.rXU(K),S.rXU(d.uvJ),S.rXU(d.zZn))}}static{this.\u0275cmp=S.VBU({type:c,selectors:[["ngx-dynamic-hooks"]],inputs:{content:"content",context:"context",globalParsersBlacklist:"globalParsersBlacklist",globalParsersWhitelist:"globalParsersWhitelist",parsers:"parsers",options:"options"},outputs:{componentsLoaded:"componentsLoaded"},features:[S.OA$],decls:0,vars:0,template:function(t,n){},encapsulation:2})}}return c})();var me=b(222),ye=b(58),ve=b(2306),nt=b(140);class ot extends me.A4{baseSize;documentListHandlers;entityListHandlers;_handlers;context={};counters={};getIndex(p){const e=this.counters[p]||0;return this.counters[p]=e+1,e}constructor(p="m",e){super(),this.baseSize=p,this._handlers=e,this.documentListHandlers=e?.documentList,this.entityListHandlers=e?.entityList,this.setupRenderers()}resetContext(){this.context={},this.counters={}}getContext(){return this.context}scaleSize(p){const e=["xs","s","m","l","xl"],t=e.indexOf(this.baseSize),n=e.indexOf(p);return e[Math.max(0,Math.min(e.length-1,n+(t-2)))]}setupRenderers(){this.heading=({tokens:p,depth:e})=>{const r=this.scaleSize({1:"xl",2:"l",3:"l",4:"m",5:"m",6:"s"}[e]),s={1:"bold",2:"semibold",3:"semibold",4:"semibold",5:"medium",6:"medium"}[e],i=this.parser?.parseInline(p)||"";return`<cue-typography size="${r}" weight="${s}"${this.getIndex("heading")>0?' style="margin-top: 24px; display: block;"':' style="display: block;"'}>${i}</cue-typography>\n`},this.paragraph=({tokens:p})=>{const e=this.scaleSize("m"),t=this.parser?.parseInline(p)||"";return/^(?:\s*,?\s*<cue-href-chip\b[^>]*><\/cue-href-chip>)+\s*$/.test(t)?`<div style="display: flex; gap: 6px; flex-wrap: wrap;">${t.replace(/(<\/cue-href-chip>)\s*,?\s*/g,"$1").trim()}</div>\n`:`<div class="cue-md-p"><cue-typography size="${e}" weight="regular">${t}</cue-typography></div>\n`},this.listitem=({tokens:p})=>{const e=this.scaleSize("m");return`<li class="cue-md-li" style="font-size: var(--cue-font-${e}-size);"><cue-typography size="${e}" weight="regular">${this.parser?.parseInline(p)||""}</cue-typography></li>`},this.tablecell=({tokens:p,header:e,align:t})=>{const n=e?"th":"td",r=e?"semibold":"regular";return`<${n}${t?` style="text-align: ${t}"`:""}><cue-typography size="${this.scaleSize("m")}" weight="${r}">${this.parser?.parseInline(p)||""}</cue-typography></${n}>`},this.blockquote=({text:p,tokens:e})=>/^\[!(NOTE|WARNING|IMPORTANT|TIP|CAUTION)\]/i.test(p.trimStart())?"":`<blockquote class="cue-md-blockquote"><cue-typography size="${this.scaleSize("m")}" weight="regular">${this.parser?.parse(e)||""}</cue-typography></blockquote>`,this.link=({href:p,title:e,tokens:t})=>{const n=this.parser?.parseInline(t)||"";if(!p){const r=this.getIndex("hrefchip"),s=`hrefchip_menuitems_${r}`,i=`hrefchip_id_${r}`,a=`hrefchip_click_${r}`,l=n.replace(/<[^>]*>/g,"");return this.context[i]=l,this.context[s]=()=>this._handlers?.hrefChip?.menuItems?.(l)??[],this.context[a]=()=>{this._handlers?.hrefChip?.clicked?.(l)},`<cue-href-chip [label]="context.${i}" [menuItems]="context.${s}()" (clicked)="context.${a}()"></cue-href-chip>`}return`<a href="${p}"${e?` title="${e}"`:""} target="_blank" rel="noopener noreferrer">${n}</a>`},this.codespan=({text:p})=>`<code class="cue-code-inline">${p}</code>`,this.code=p=>{const e="36px";if("document-list"===p.lang){const t=p.documentRefs;if(!t||0===t.length)return"";const o=`doc_refs_${this.getIndex("doc")}`;return this.context[o]=t,this._handlers?.availableContentCategories&&(this.context.availableContentCategories=this._handlers.availableContentCategories),`<cue-document-list [documentRefs]="context.${o}" [documentdata]="context.documentdata" [handlers]="context.documentlisthandlers" [availableContentCategories]="context.availableContentCategories" (clickedDocument)="context.documentclickedrow($event)" style="margin-bottom: ${e};"></cue-document-list>`}if("entity-list"===p.lang){const t=p.iris;if(!t)return"";const o=`entity_iris_${this.getIndex("entity")}`;return this.context[o]=t,this._handlers?.availableEntityCategories&&(this.context.availableEntityCategories=this._handlers.availableEntityCategories),this._handlers?.availableEntityRelationships&&(this.context.availableEntityRelationships=this._handlers.availableEntityRelationships),`<cue-ent-list-inner [entities]="context.${o}" [entitydata]="context.entitydata" [entityLocations]="context.entitylocations" [handlers]="context.entitylisthandlers" [availableEntityCategories]="context.availableEntityCategories" [availableEntityRelationships]="context.availableEntityRelationships" [mapboxToken]="context.mapboxToken" (rowClicked)="context.entityclickedrow($event)" style="margin-bottom: ${e};"></cue-ent-list-inner>`}if("map"===p.lang){const t=p.mapData;if(!t||!t.layers)return"";const n=this.getIndex("map"),o=`map_layers_${n}`,r=`map_settings_${n}`;return this.context[o]=t.layers,this.context[r]=t.settings,`<cue-card style="height: 300px; display: block; margin-bottom: ${e};" [padded]="false"><cue-map [layers]="context.${o}" [settings]="context.${r}"></cue-map></cue-card>`}return`<div style="margin-bottom: ${e};">${super.code(p)}</div>`}}walkTokens(p){return(0,A.A)(function*(){if("code"===p.type&&"document-list"===p.lang){const e=p.text.split("\n").filter(o=>o.trim().length>0),t=new Map,n=[];for(const o of e){const r=o.trim(),s=r.match(/^(.+)\?page=(\d+)$/);if(s){const i=s[1],a=s[2];t.has(i)||(t.set(i,{id:i,pages:[]}),n.push(i));const l=t.get(i);l.pages||(l.pages=[]),l.pages.push({id:r,page:a,relevance:0})}else t.has(r)||(t.set(r,{id:r}),n.push(r))}p.documentRefs=n.map(o=>t.get(o))}if("code"===p.type&&"entity-list"===p.lang){const e=p.text.split("\n").filter(t=>t.trim().length>0);p.iris=e}if("code"===p.type&&"map"===p.lang){const e=p.text.split("\n").filter(i=>i.trim().length>0),t=e[0]?.trim()||"",n=e.slice(1),o={};n.forEach(i=>{const a=i.split(";"),l=a[0]?.trim(),g=a[1]?.trim(),u=a[2]?.trim();if(!l||!g)return;const h=(0,ye.S)(g);if(!h)return;const f=(0,ye.n)(h);let v={};if(u)try{v=JSON.parse(u)}catch{}o[l]||(o[l]=[]),o[l].push({type:"Feature",properties:v,geometry:f})});const r=[];Object.keys(o).forEach(i=>{const a=new ve.ux(i);a.collection=new nt.o(o[i]),r.push(a)});const s=new ve.yY;s.mapboxToken=t,s.contextMenu.showFlyTo=!1,p.mapData={layers:r,settings:s}}})()}}let rt=(()=>{class c{envInjector=(0,d.WQX)(d.uvJ);fileURL=T.hFB.required();html=(0,d.vPA)("");hookOptions={sanitize:!1,globalParsersBlueprint:{environmentInjector:this.envInjector}};parsers=[{component:{importPromise:()=>Promise.resolve().then(b.bind(b,2245)),importName:"Typography"},selector:"cue-typography"}];onFile=(0,d.QZP)((()=>{var e=this;return(0,A.A)(function*(){const n=yield(yield fetch(e.fileURL())).text(),o=new ot("m");o.resetContext();const r=yield me.xI.parse(n,{gfm:!0,breaks:!1,renderer:o,async:!0,walkTokens:o.walkTokens.bind(o)});e.html.set(r)})})());static \u0275fac=function(t){return new(t||c)};static \u0275cmp=S.VBU({type:c,selectors:[["cue-md-viewer"]],inputs:{fileURL:[1,"fileURL"]},decls:2,vars:3,consts:[[1,"page"],[3,"parsers","content","options"]],template:function(t,n){1&t&&(S.j41(0,"div",0),S.nrm(1,"ngx-dynamic-hooks",1),S.k0s()),2&t&&(S.R7$(),S.Y8G("parsers",n.parsers)("content",n.html())("options",n.hookOptions))},dependencies:[tt],styles:[".page[_ngcontent-%COMP%]{overflow-y:auto;height:100%;padding:16px;box-sizing:border-box}[_nghost-%COMP%] cue-typography{display:inline-block}[_nghost-%COMP%] .cue-md-p{margin-bottom:24px;opacity:.9;line-height:1.6;display:block}[_nghost-%COMP%] .cue-md-p:last-child{margin-bottom:0}[_nghost-%COMP%] .cue-md-blockquote{margin-bottom:24px;opacity:.9;border-left:4px solid var(--cue-border-color);padding-left:16px}[_nghost-%COMP%] ul, [_nghost-%COMP%] ol{margin-bottom:24px;padding-left:28px;font-family:var(--cue-font-family);opacity:.9;line-height:1.6}[_nghost-%COMP%] li.cue-md-li{margin-bottom:12px}[_nghost-%COMP%] table{margin-bottom:24px;border-collapse:collapse;width:100%}[_nghost-%COMP%] th, [_nghost-%COMP%] td{padding:8px 12px;border-bottom:1px solid var(--cue-border-color, #eee);text-align:left}[_nghost-%COMP%] th cue-typography{font-weight:var(--cue-font-weight-semibold)}[_nghost-%COMP%] .cue-code-inline{background-color:var(--cue-border-color);padding:0 4px;border-radius:4px;font-family:monospace;font-size:1.1em;font-weight:500;color:var(--cue-main-foreground)}"],changeDetection:0})}return c})()},2306(U,V,b){b.d(V,{AA:()=>S,ux:()=>H,yY:()=>T});var A=b(140),d=b(8402);class T{mapboxToken;contextMenu={showProperties:!0,showFlyTo:!0};toolbar=new S}class S{hidden=!1;position="bottom";margin="20px";displayZoom=!0;displayGeofenceDraw=!1;displayLayerToggle=!0;clearGeofenceAfterDraw=!0}class H{label;id;collection=new A.o;color;visible=!0;cluster=!0;zoomToFit=!0;category;constructor(w,E=(0,d.A)()){this.label=w,this.id=E}}},140(U,V,b){b.d(V,{o:()=>A});class A{type="FeatureCollection";features=[];bbox;id;constructor(T=[]){this.features=T}addFeature(T){this.features.push(T)}removeFeature(T){return this.features.splice(T,1)[0]}getFeatureCount(){return this.features.length}clear(){this.features=[]}}},58(U,V,b){function A(m){let y=0,I=-1,O=-1;for(let R=0;R<m.length;R++)if("("===m[R])y++,1===y&&(I=R+1);else if(")"===m[R]&&(y--,0===y)){O=R;break}return-1!==I&&-1!==O?m.substring(I,O):null}b.d(V,{S:()=>D,n:()=>j});class d{x;y;z;constructor(y,I,O){this.x=y,this.y=I,this.z=O}}class T{points;constructor(y){this.points=y}}class S{lines;constructor(y){this.lines=y}}function D(m){if(m){if((m=m.trim().toUpperCase()).startsWith("POINT"))return function M(m){m=m.trim().toUpperCase();const I=A(m)?.split(" ")??[];return m.includes("POINT Z")?new d(parseFloat(I[0]),parseFloat(I[1]),parseFloat(I[2])):new d(parseFloat(I[0]),parseFloat(I[1]))}(m);if(m.startsWith("LINESTRING"))return function H(m){const y=A(m=m.trim().toUpperCase()),I=[];return y?.split(",").map(O=>O.trim().split(" ").map(R=>parseFloat(R))).map(O=>{I.push(new d(O[0],O[1],O[2]))}),new T(I)}(m);if(m.startsWith("POLYGON"))return function w(m){const y=A(m=m.trim().toUpperCase());if(!y)return new S([]);const I=y.match(/\(([^)]+)\)/g);if(!I)return new S([]);const O=I.map(R=>{const W=A(R);return W?W.split(",").map(Z=>{const $=Z.trim().split(" ");return $.length>=3?new d(parseFloat($[0]),parseFloat($[1]),parseFloat($[2])):new d(parseFloat($[0]),parseFloat($[1]))}):[]});return new S(O)}(m)}}function j(m){if(m instanceof d)return{type:"Point",coordinates:void 0!==m.z?[m.x,m.y,m.z]:[m.x,m.y]};if(m instanceof T)return{type:"LineString",coordinates:m.points.map(y=>void 0!==y.z?[y.x,y.y,y.z]:[y.x,y.y])};if(m instanceof S)return{type:"Polygon",coordinates:m.lines.map(y=>y.map(I=>void 0!==I.z?[I.x,I.y,I.z]:[I.x,I.y]))};throw new Error("Unknown WKT type")}},5332(U,V,b){b.d(V,{k:()=>S});for(var d=[],T=0;T<256;++T)d.push((T+256).toString(16).slice(1));function S(w,E=0){return(d[w[E+0]]+d[w[E+1]]+d[w[E+2]]+d[w[E+3]]+"-"+d[w[E+4]]+d[w[E+5]]+"-"+d[w[E+6]]+d[w[E+7]]+"-"+d[w[E+8]]+d[w[E+9]]+"-"+d[w[E+10]]+d[w[E+11]]+d[w[E+12]]+d[w[E+13]]+d[w[E+14]]+d[w[E+15]]).toLowerCase()}},8402(U,V,b){b.d(V,{A:()=>E});const d={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var T,S=new Uint8Array(16);function H(){if(!T&&!(T=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return T(S)}var M=b(5332);const E=function w(D,j,m){if(d.randomUUID&&!j&&!D)return d.randomUUID();var y=(D=D||{}).random||(D.rng||H)();if(y[6]=15&y[6]|64,y[8]=63&y[8]|128,j){m=m||0;for(var I=0;I<16;++I)j[m+I]=y[I];return j}return(0,M.k)(y)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[6586],{6586(U,V,b){b.d(V,{MarkdownViewer:()=>rt});var A=b(467),d=b(5802),T=b(7705),S=b(5547),H=b(4226),M=b(2771),w=b(7673),E=b(4572),D=b(1397),j=b(8141),m=b(9437);const I=(0,b(1853).L)(c=>function(){c(this),this.name="EmptyError",this.message="no elements in sequence"});var O=b(5964),R=b(6697),W=b(9974),Z=b(4360);function Ie(c=Se){return(0,W.N)((p,e)=>{let t=!1;p.subscribe((0,Z._)(e,n=>{t=!0,e.next(n)},()=>t?e.complete():e.error(c())))})}function Se(){return new I}var Te=b(3669);function ae(c,p){const e=arguments.length>=2;return t=>t.pipe(c?(0,O.p)((n,o)=>c(n,o,t)):Te.D,(0,R.s)(1),e?function $(c){return(0,W.N)((p,e)=>{let t=!1;p.subscribe((0,Z._)(e,n=>{t=!0,e.next(n)},()=>{t||e.next(c),e.complete()}))})}(p):Ie(()=>new I))}var we=b(6354),G=b(177),Ee=b(345);const le=new d.nKC("All of the settings registered in the whole app."),Y=new d.nKC("The settings collected from all ancestor injectors"),ue=new d.nKC("The settings for the currently loaded module."),q="__ngx_dynamic_hooks_content",ee="dynamic-component-anchor",B="__ngx_dynamic_hooks_anchor_id",P="__ngx_dynamic_hooks_anchor_parsetoken",Be=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];var te=function(c){return c[c.All=0]="All",c[c.Linear=1]="Linear",c[c.None=2]="None",c}(te||{});const x={},pe="[a-zA-Z_$]+[a-zA-Z0-9_$]*",ne="[a-zA-Z$\\-_:][a-zA-Z$\\-_:0-9\\.]*";function N(c,p){if(!p.global)throw Error("TypeError: matchAll called with a non-global RegExp argument");const e=[];let t=p.exec(c);for(;null!==t;)e.push(t),t=p.exec(c);return p.lastIndex=0,e}function oe(c){return void 0!==c?.__ngContext__}x.attributeNameNoBracketsRegex="("+ne+")",x.attributeNameBracketsRegex="\\[("+ne+")\\]",x.attributeNameRoundBracketsRegex="\\(("+ne+")\\)",x.attributeNameRegex="(?:"+x.attributeNameNoBracketsRegex+"|"+x.attributeNameBracketsRegex+"|"+x.attributeNameRoundBracketsRegex+")",x.attributeValueDoubleQuotesRegex='"((?:\\\\.|[^"])*?)"',x.attributeValueSingleQuotesRegex="'((?:\\\\.|[^'])*?)'",x.variablePathDotNotation="\\."+pe,x.variableBracketsNotation="\\[[^\\]]*\\]",x.variablePathFunctionCall="\\([^\\)]*\\)",x.variablePathPartRegex="(?:"+x.variablePathDotNotation+"|"+x.variableBracketsNotation+"|"+x.variablePathFunctionCall+")",x.contextVariableRegex="context"+x.variablePathPartRegex+"*",x.placeholderVariablePathDotNotation="\\@@@cxtDot@@@"+pe,x.placeholderVariableBracketsNotation="@@@cxtOpenSquareBracket@@@[^\\]]*@@@cxtCloseSquareBracket@@@",x.placeholderVariablePathFunctionCall="@@@cxtOpenRoundBracket@@@[^\\)]*@@@cxtCloseRoundBracket@@@",x.placeholderVariablePathPartRegex="(?:"+x.placeholderVariablePathDotNotation+"|"+x.placeholderVariableBracketsNotation+"|"+x.placeholderVariablePathFunctionCall+")",x.placeholderContextVariableRegex="__CXT__"+x.placeholderVariablePathPartRegex+"*";class Ae{constructor(p,e,t,n){this.configResolver=e,this.tagHookFinder=t,this.bindingsValueManager=n,this.savedBindings={},this.config=this.configResolver.processConfig(p),this.name=this.config.name}findHooks(p,e,t){let n=this.config.enclosing?this.tagHookFinder.findEnclosingTags(p,this.config.selector,this.config.bracketStyle,t):this.tagHookFinder.findSingleTags(p,this.config.selector,this.config.bracketStyle,t);return this.config.allowSelfClosing&&(n=[...n,...this.tagHookFinder.findSelfClosingTags(p,this.config.selector,this.config.bracketStyle,t)],n.sort((o,r)=>o.openingTagStartIndex-r.openingTagStartIndex)),n}loadComponent(p,e,t,n,o){return{component:this.config.component,hostElementTag:this.config.hostElementTag||this.config.selector,injector:this.config.injector,environmentInjector:this.config.environmentInjector}}getBindings(p,e,t,n){let o=this.savedBindings[p];return void 0===o&&(o=this.createBindings(e.openingTag),this.savedBindings[p]=o),this.bindingsValueManager.checkInputBindings(o.inputs,t,this.config,n),this.bindingsValueManager.checkOutputBindings(o.outputs,this.config,n),{inputs:this.getValuesFromSavedBindings(o.inputs),outputs:this.getValuesFromSavedBindings(o.outputs)}}createBindings(p){const e=this.collectRawInputs(p),t={};for(const[r,s]of Object.entries(e))t[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};const n=this.collectRawOutputs(p),o={};for(const[r,s]of Object.entries(n))o[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};return{inputs:t,outputs:o}}collectRawInputs(p){const e=this.getBindingsFromOpeningTag(p,"noBracketInputs",this.config.inputsBlacklist||null,this.config.inputsWhitelist||null),t=this.getBindingsFromOpeningTag(p,"bracketInputs",this.config.inputsBlacklist||null,this.config.inputsWhitelist||null);for(const[n,o]of Object.entries(e))e[n]="'"+o+"'";return{...e,...t}}collectRawOutputs(p){return this.getBindingsFromOpeningTag(p,"outputs",this.config.outputsBlacklist||null,this.config.outputsWhitelist||null)}getBindingsFromOpeningTag(p,e,t,n){const o={},r="(?:"+x.attributeValueDoubleQuotesRegex+"|"+x.attributeValueSingleQuotesRegex+")";let s;switch(e){case"noBracketInputs":s=x.attributeNameNoBracketsRegex;break;case"bracketInputs":s=x.attributeNameBracketsRegex;break;case"outputs":s=x.attributeNameRoundBracketsRegex}const l=N(p,new RegExp(s+"="+r,"gim"));for(const u of l){let h=u[2]||u[3];void 0===h&&"noBracketInputs"===e&&(h=""),o[u[1]]=h}const g={};for(const[u,h]of Object.entries(o))t&&t.includes(u)||n&&!n.includes(u)||(g[u]=h);return g}getValuesFromSavedBindings(p){const e={};for(const[t,n]of Object.entries(p))e[t]=n.value;return e}}class Ne{constructor(p,e,t,n){this.configResolver=e,this.platformService=t,this.bindingsValueManager=n,this.savedBindings={},this.config=this.configResolver.processConfig(p),this.name=this.config.name}findHookElements(p,e,t){return Array.from(this.platformService.querySelectorAll(p,this.config.selector))}loadComponent(p,e,t,n,o){return this.scrubAngularBindingAttrs(e.element),{component:this.config.component,hostElementTag:this.config.hostElementTag,injector:this.config.injector,environmentInjector:this.config.environmentInjector}}getBindings(p,e,t,n){let o=this.savedBindings[p];return void 0===o&&(o=this.createBindings(e.elementSnapshot),this.savedBindings[p]=o),this.bindingsValueManager.checkInputBindings(o.inputs,t,this.config,n),this.bindingsValueManager.checkOutputBindings(o.outputs,this.config,n),{inputs:this.getValuesFromSavedBindings(o.inputs),outputs:this.getValuesFromSavedBindings(o.outputs)}}scrubAngularBindingAttrs(p){const e=Array.from(p.attributes).map(t=>t.name).filter(t=>t.startsWith("[")&&t.endsWith("]")||t.startsWith("(")&&t.endsWith(")"));for(const t of e)this.platformService.removeAttribute(p,t)}createBindings(p){const e=this.collectRawBindings(p,"inputs",this.config.inputsBlacklist||null,this.config.inputsWhitelist||null),t={};for(const[r,s]of Object.entries(e))t[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};const n=this.collectRawBindings(p,"outputs",this.config.outputsBlacklist||null,this.config.outputsWhitelist||null),o={};for(const[r,s]of Object.entries(n))o[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};return{inputs:t,outputs:o}}collectRawBindings(p,e,t,n){const o={},r=this.platformService.getAttributeNames(p);for(let i of r)if("inputs"===e&&(!i.startsWith("(")||!i.endsWith(")"))||"outputs"===e&&i.startsWith("(")&&i.endsWith(")")){let a=this.platformService.getAttribute(p,i);"inputs"===e&&i.startsWith("[")&&i.endsWith("]")&&""===a&&(a=void 0),"inputs"===e&&(!i.startsWith("[")||!i.endsWith("]"))&&(a=`'${a}'`),i=i.replace(/^\[|^\(|\]$|\)$/g,""),o[i]=a}const s={};for(const[i,a]of Object.entries(o))t&&t.includes(i)||n&&!n.includes(i)||(s[i]=a);return s}getValuesFromSavedBindings(p){const e={};for(const[t,n]of Object.entries(p))e[t]=n.value;return e}}const Pe={component:void 0,name:void 0,parseWithRegex:!1,selector:void 0,hostElementTag:void 0,injector:void 0,allowSelfClosing:!0,enclosing:!0,bracketStyle:{opening:"<",closing:">"},parseInputs:!0,unescapeStrings:!0,inputsBlacklist:void 0,inputsWhitelist:void 0,outputsBlacklist:void 0,outputsWhitelist:void 0,allowContextInBindings:!0,allowContextFunctionCalls:!0};let De=(()=>{class c{constructor(){}processConfig(e){const t=JSON.parse(JSON.stringify(Pe));if(!e||!e.hasOwnProperty("component"))throw Error('Missing the required "component" property for the SelectorHookParserConfig. Must be either the component class or a LazyLoadComponentConfig.');if(t.component=e.component,e.component.hasOwnProperty("prototype")){const n=(0,T.HJs)(e.component);t.selector=n.selector}else{if(!e.component.hasOwnProperty("importPromise")||!e.component.hasOwnProperty("importName"))throw Error('The "component" property in the SelectorHookParserConfig must either contain the component class or a LazyLoadComponentConfig.');if(!e.hasOwnProperty("selector"))throw Error('When using lazy-loaded dynamic components, you have to specify the "selector" property in the parser config, as the real selector can\'t be known before the component is loaded.')}if(e.hasOwnProperty("name")){if("string"!=typeof e.name)throw Error('The submitted "name" property in the SelectorHookParserConfig must be of type string, was '+typeof e.name);t.name=e.name}if(e.hasOwnProperty("selector")){if("string"!=typeof e.selector)throw Error('The submitted "selector" property in the SelectorHookParserConfig must be of type string, was '+typeof e.selector);t.selector=e.selector}if(e.hasOwnProperty("hostElementTag")){if("string"!=typeof e.hostElementTag)throw Error('The submitted "hostElementTag" property in the SelectorHookParserConfig must be of type string, was '+typeof e.hostElementTag);t.hostElementTag=e.hostElementTag}if(e.hasOwnProperty("parseWithRegex")){if("boolean"!=typeof e.parseWithRegex)throw Error('The submitted "parseWithRegex" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.parseWithRegex);t.parseWithRegex=e.parseWithRegex}if(e.hasOwnProperty("allowSelfClosing")){if("boolean"!=typeof e.allowSelfClosing)throw Error('The submitted "allowSelfClosing" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.allowSelfClosing);t.allowSelfClosing=e.allowSelfClosing}if(e.hasOwnProperty("enclosing")){if("boolean"!=typeof e.enclosing)throw Error('The submitted "enclosing" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.enclosing);t.enclosing=e.enclosing}if(e.hasOwnProperty("bracketStyle")){if("object"!=typeof e.bracketStyle||"string"!=typeof e.bracketStyle.opening||"string"!=typeof e.bracketStyle.closing)throw Error('The submitted "bracketStyle" property in the SelectorHookParserConfig must have the form {opening: string, closing: string}');t.bracketStyle=e.bracketStyle}if(e.hasOwnProperty("injector")&&(t.injector=e.injector),e.hasOwnProperty("environmentInjector")&&(t.environmentInjector=e.environmentInjector),e.hasOwnProperty("unescapeStrings")){if("boolean"!=typeof e.unescapeStrings)throw Error('The submitted "unescapeStrings" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.unescapeStrings);t.unescapeStrings=e.unescapeStrings}if(e.hasOwnProperty("parseInputs")){if("boolean"!=typeof e.parseInputs)throw Error('The submitted "parseInputs" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.parseInputs);t.parseInputs=e.parseInputs}if(e.hasOwnProperty("inputsBlacklist")){if(!Array.isArray(e.inputsBlacklist))throw Error('The submitted "inputsBlacklist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.inputsBlacklist)if("string"!=typeof n)throw Error('All entries of the submitted "inputsBlacklist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.inputsBlacklist=e.inputsBlacklist}if(e.hasOwnProperty("inputsWhitelist")){if(!Array.isArray(e.inputsWhitelist))throw Error('The submitted "inputsWhitelist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.inputsWhitelist)if("string"!=typeof n)throw Error('All entries of the submitted "inputsWhitelist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.inputsWhitelist=e.inputsWhitelist}if(e.hasOwnProperty("outputsBlacklist")){if(!Array.isArray(e.outputsBlacklist))throw Error('The submitted "outputsBlacklist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.outputsBlacklist)if("string"!=typeof n)throw Error('All entries of the submitted "outputsBlacklist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.outputsBlacklist=e.outputsBlacklist}if(e.hasOwnProperty("outputsWhitelist")){if(!Array.isArray(e.outputsWhitelist))throw Error('The submitted "outputsWhitelist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.outputsWhitelist)if("string"!=typeof n)throw Error('All entries of the submitted "outputsWhitelist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.outputsWhitelist=e.outputsWhitelist}if(e.hasOwnProperty("allowContextInBindings")){if("boolean"!=typeof e.allowContextInBindings)throw Error('The submitted "allowContextInBindings" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.allowContextInBindings);t.allowContextInBindings=e.allowContextInBindings}if(e.hasOwnProperty("allowContextFunctionCalls")){if("boolean"!=typeof e.allowContextFunctionCalls)throw Error('The submitted "allowContextFunctionCalls" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.allowContextFunctionCalls);t.allowContextFunctionCalls=e.allowContextFunctionCalls}return t}static{this.\u0275fac=function(t){return new(t||c)}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();const de=new d.nKC("An injection token to retrieve an optionally user-provided PlatformService");let Ve=(()=>{class c{constructor(e,t,n){this.document=e,this.rendererFactory=t,this.sanitizer=n,this.renderer=this.rendererFactory.createRenderer(null,null)}getNgVersion(){if(typeof this.document<"u"){const t=this.querySelectorAll(this.document,"[ng-version]")?.[0]?.getAttribute("ng-version");if(t)return parseInt(t,10)}return null}sanitize(e){return this.sanitizer.sanitize(S.WPN.HTML,e)||""}createElement(e){return this.renderer.createElement(e)}sortElements(e,t){return e===t?0:e.compareDocumentPosition?2&e.compareDocumentPosition(t)?1:-1:e.sourceIndex-t.sourceIndex}cloneElement(e){return e.cloneNode(!0)}getTagName(e){return e.tagName}getOpeningTag(e){const n=e.outerHTML.length;return e.outerHTML.slice(0,"/"===e.outerHTML[n-2]?n:n-e.innerHTML.length-e.tagName.length-3)}getClosingTag(e){return e.outerHTML.slice(e.outerHTML.length-e.tagName.length-3)}getAttributeNames(e){return"function"==typeof e.getAttributeNames?e.getAttributeNames():[]}getAttribute(e,t){return"function"==typeof e.getAttribute?e.getAttribute(t):null}setAttribute(e,t,n){this.renderer.setAttribute(e,t,n)}removeAttribute(e,t){this.renderer.removeAttribute(e,t)}getParentNode(e){try{return this.renderer.parentNode(e)}catch{return null}}querySelectorAll(e,t){return Array.from(e.querySelectorAll(t))}getChildNodes(e){return Array.prototype.slice.call(e.childNodes)}appendChild(e,t){this.renderer.appendChild(e,t)}insertBefore(e,t,n){this.renderer.insertBefore(e,t,n)}clearChildNodes(e){if(e)for(;e.firstChild;)this.removeChild(e,e.firstChild)}removeChild(e,t){e.removeChild(t)}getInnerContent(e){return e.innerHTML}setInnerContent(e,t){e&&(e.innerHTML=t)}isTextNode(e){return e.nodeType===Node.TEXT_NODE}createTextNode(e){return document.createTextNode(e)}getTextContent(e){return e.textContent}dispatchEvent(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0}))}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(d.qQL),d.KVO(S._9s),d.KVO(Ee.up))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),K=(()=>{class c{constructor(e,t){this.userPlatformService=e,this.defaultPlatformService=t}getFor(e){return this.userPlatformService&&"function"==typeof this.userPlatformService[e]?this.userPlatformService:this.defaultPlatformService}getNgVersion(){return this.getFor("getNgVersion").getNgVersion()}sanitize(e){return this.getFor("sanitize").sanitize(e)}createElement(e){return this.getFor("createElement").createElement(e)}sortElements(e,t){return this.getFor("sortElements").sortElements(e,t)}cloneElement(e){return this.getFor("cloneElement").cloneElement(e)}getTagName(e){return this.getFor("getTagName").getTagName(e)}getOpeningTag(e){return this.getFor("getOpeningTag").getOpeningTag(e)}getClosingTag(e){return this.getFor("getClosingTag").getClosingTag(e)}getAttributeNames(e){return this.getFor("getAttributeNames").getAttributeNames(e)}getAttribute(e,t){return this.getFor("getAttribute").getAttribute(e,t)}setAttribute(e,t,n){return this.getFor("setAttribute").setAttribute(e,t,n)}removeAttribute(e,t){return this.getFor("removeAttribute").removeAttribute(e,t)}getParentNode(e){return this.getFor("getParentNode").getParentNode(e)}querySelectorAll(e,t){return this.getFor("querySelectorAll").querySelectorAll(e,t)}getChildNodes(e){return this.getFor("getChildNodes").getChildNodes(e)}appendChild(e,t){return this.getFor("appendChild").appendChild(e,t)}insertBefore(e,t,n){return this.getFor("insertBefore").insertBefore(e,t,n)}clearChildNodes(e){return this.getFor("clearChildNodes").clearChildNodes(e)}removeChild(e,t){return this.getFor("removeChild").removeChild(e,t)}getInnerContent(e){return this.getFor("getInnerContent").getInnerContent(e)}setInnerContent(e,t){return this.getFor("setInnerContent").setInnerContent(e,t)}isTextNode(e){return this.getFor("isTextNode").isTextNode(e)}createTextNode(e){return this.getFor("createTextNode").createTextNode(e)}getTextContent(e){return this.getFor("getTextContent").getTextContent(e)}dispatchEvent(e,t,n){return this.getFor("dispatchEvent").dispatchEvent(e,t,n)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(de,8),d.KVO(Ve))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),F=(()=>{class c{constructor(e){this.platformId=e}log(e,t){this.handleLog(e,t,"log")}warn(e,t){this.handleLog(e,t,"warn")}error(e,t){this.handleLog(e,t,"error")}handleLog(e,t,n){(t.logOptions?.dev&&this.isDevMode()&&(0,G.UE)(this.platformId)||t.logOptions?.prod&&!this.isDevMode()&&(0,G.UE)(this.platformId)||t.logOptions?.ssr&&!(0,G.UE)(this.platformId))&&console[n](...e)}isDevMode(){return(0,T.naY)()}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(S.Agw))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Me=(()=>{class c{constructor(e){this.logger=e}find(e,t,n,o,r={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){return n?this.findEnclosingHooks(e,t,n,o,r):this.findSingletagHooks(e,t)}findSingletagHooks(e,t){const n=[],o=N(e,t);for(const r of o)n.push({openingTagStartIndex:r.index,openingTagEndIndex:r.index+r[0].length,closingTagStartIndex:null,closingTagEndIndex:null});return n}findEnclosingHooks(e,t,n,o,r={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){const s=[],i=[],a=N(e,t);for(const u of a)s.push({isOpening:!0,value:u[0],startIndex:u.index,endIndex:u.index+u[0].length});const l=N(e,n);for(const u of l)s.push({isOpening:!1,value:u[0],startIndex:u.index,endIndex:u.index+u[0].length});s.sort((u,h)=>u.startIndex-h.startIndex);const g=[];for(const[u,h]of s.entries())if(u>0&&h.startIndex<s[u-1].endIndex)this.logger.warn(['Syntax error - New tag "'+h.value+'" started at position '+h.startIndex+' before previous tag "'+s[u-1].value+'" ended at position '+s[u-1].endIndex+". Ignoring."],r);else if(h.isOpening)g.push(h);else{if(0===g.length){this.logger.warn(['Syntax error - Closing tag without preceding opening tag found: "'+h.value+'". Ignoring.'],r);continue}if(!1===o&&g.length>1){g.pop();continue}const f=g[g.length-1];i.push({openingTagStartIndex:f.startIndex,openingTagEndIndex:f.startIndex+f.value.length,closingTagStartIndex:h.startIndex,closingTagEndIndex:h.startIndex+h.value.length}),g.pop()}return g.length>0&&this.logger.warn(["Syntax error - Opening tags without corresponding closing tags found."],r),i}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),He=(()=>{class c{constructor(e){this.hookFinder=e}findSingleTags(e,t,n={opening:"<",closing:">"},o){const r=this.generateOpeningTagRegex(t,n);return this.hookFinder.find(e,r,void 0,void 0,o)}findEnclosingTags(e,t,n={opening:"<",closing:">"},o){const r=this.generateOpeningTagRegex(t,n),s=this.generateClosingTagRegex(t,n);return this.hookFinder.find(e,r,s,!0,o)}findSelfClosingTags(e,t,n={opening:"<",closing:">"},o){const r=this.generateOpeningTagRegex(t,n,!0);return this.hookFinder.find(e,r,void 0,void 0,o)}generateOpeningTagRegex(e,t={opening:"<",closing:">"},n=!1){const o=this.escapeRegex(t.opening),r=this.escapeRegex(e),s=(n?"\\/":"")+this.escapeRegex(t.closing);return new RegExp(o+r+"(?:\\s*"+s+"|(?:\\s+"+x.attributeNameRegex+"=(?:"+x.attributeValueDoubleQuotesRegex+"|"+x.attributeValueSingleQuotesRegex+"))+\\s*"+s+")","gim")}generateClosingTagRegex(e,t={opening:"<",closing:">"}){const n=this.escapeRegex(t.opening)+"/",o=this.escapeRegex(e),r=this.escapeRegex(t.closing);return new RegExp(n+o+r,"gim")}escapeRegex(e){return e.replace(new RegExp("[-\\/\\\\^$*+?.()|[\\]{}]","g"),"\\$&")}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(Me))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Fe=(()=>{class c{encodeSubstrings(e){const r=[...N(e,/'/gm).filter(l=>0===l.index||"\\"!==e[l.index-1]),...N(e,/"/gm).filter(l=>0===l.index||"\\"!==e[l.index-1]),...N(e,/`/gm).filter(l=>0===l.index||"\\"!==e[l.index-1])];r.sort((l,g)=>l.index-g.index);const s=[];let i=null;for(const l of r)i?i[0]===l[0]&&(s.push({startIndex:i.index+1,endIndex:l.index}),i=null):i=l;if(null!==i)throw Error("Input parse error. String was opened, but not closed.");return this.encodeTextSegments(e,s,this.encodeStringSpecialChars)}encodeStringSpecialChars(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/'/g,"@@@singlequote@@@")).replace(/"/g,"@@@doublequote@@@")).replace(/`/g,"@@@gravequote@@@")).replace(/:/g,"@@@colon@@@")).replace(/;/g,"@@@semicolon@@@")).replace(/\./g,"@@@dot@@@")).replace(/,/g,"@@@comma@@@")).replace(/\\/g,"@@@backslash@@@")).replace(/\(/g,"@@@openRoundBracket@@@")).replace(/\)/g,"@@@closeRoundBracket@@@")).replace(/\[/g,"@@@openSquareBracket@@@")).replace(/\]/g,"@@@closeSquareBracket@@@")).replace(/\{/g,"@@@openCurlyBracket@@@")).replace(/\}/g,"@@@closeCurlyBracket@@@")}decodeStringSpecialChars(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/@@@singlequote@@@/g,"'")).replace(/@@@doublequote@@@/g,'"')).replace(/@@@gravequote@@@/g,"`")).replace(/@@@colon@@@/g,":")).replace(/@@@semicolon@@@/g,";")).replace(/@@@dot@@@/g,".")).replace(/@@@comma@@@/g,",")).replace(/@@@backslash@@@/g,"\\")).replace(/@@@openRoundBracket@@@/g,"(")).replace(/@@@closeRoundBracket@@@/g,")")).replace(/@@@openSquareBracket@@@/g,"[")).replace(/@@@closeSquareBracket@@@/g,"]")).replace(/@@@openCurlyBracket@@@/g,"{")).replace(/@@@closeCurlyBracket@@@/g,"}")}encodeSubfunctions(e){const o=[...N(e,/\(/gm),...N(e,/\)/gm)];o.sort((a,l)=>a.index-l.index);const r=[],s=[];for(const a of o)if("("===a[0])s.push(a);else{if(0===s.length)throw Error("Input parse error. Closed function bracket without opening it first.");1===s.length&&r.push({startIndex:s[0].index+1,endIndex:a.index}),s.pop()}if(0!==s.length)throw Error("Input parse error. Opened function bracket without closing it.");return this.encodeTextSegments(e,r,this.encodeFunctionBrackets)}encodeFunctionBrackets(e){return(e=e.replace(/\(/g,"@@@fnOpenBracket@@@")).replace(/\)/g,"@@@fnCloseBracket@@@")}decodeFunctionBrackets(e){return(e=e.replace(/@@@fnOpenBracket@@@/g,"(")).replace(/@@@fnCloseBracket@@@/g,")")}encodeVariableSubbrackets(e){const o=N(e,new RegExp("(?:[a-zA-Z_$\\])])(\\[)","gm")),r=[];for(const a of o){const l=e.substring(a.index+2),h=[...N(l,/\[/gm),...N(l,/\]/gm)];h.sort((v,C)=>v.index-C.index);let f=1;for(const v of h)if(f="]"===v[0]?f-1:f+1,0===f){r.push({startIndex:a.index+2,endIndex:a.index+2+v.index});break}if(0!==f)throw Error("Input parse error. Opened bracket without closing it.")}const s=[];for(const a of r)(0===s.length||s[s.length-1].endIndex<a.startIndex)&&s.push(a);return this.encodeTextSegments(e,s,this.encodeVariableBrackets)}encodeVariableBrackets(e){return(e=e.replace(/\[/g,"@@@variableOpeningBracket@@@")).replace(/\]/g,"@@@variableClosingBracket@@@")}decodeVariableBrackets(e){return(e=e.replace(/@@@variableOpeningBracket@@@/g,"[")).replace(/@@@variableClosingBracket@@@/g,"]")}transformContextVarIntoPlacerholder(e){return(e=(e=(e=(e=(e=(e="__CXT__"+e.substring(7)).replace(/\"/g,"@@@cxtDoubleQuote@@@")).replace(/\./g,"@@@cxtDot@@@")).replace(/\[/g,"@@@cxtOpenSquareBracket@@@")).replace(/\]/g,"@@@cxtCloseSquareBracket@@@")).replace(/\(/g,"@@@cxtOpenRoundBracket@@@")).replace(/\)/g,"@@@cxtCloseRoundBracket@@@")}transformPlaceholderIntoContextVar(e){return(e=(e=(e=(e=(e=(e="context"+e.substring(7)).replace(/@@@cxtDoubleQuote@@@/g,'"')).replace(/@@@cxtDot@@@/g,".")).replace(/@@@cxtOpenSquareBracket@@@/g,"[")).replace(/@@@cxtCloseSquareBracket@@@/g,"]")).replace(/@@@cxtOpenRoundBracket@@@/g,"(")).replace(/@@@cxtCloseRoundBracket@@@/g,")")}encodeTextSegments(e,t,n){const o=[];for(const i of t){const a=0===o.length?0:o[o.length-1].endIndex;o.push({type:"text",startIndex:a,endIndex:i.startIndex,string:e.substring(a,i.startIndex)}),o.push({type:"special",startIndex:i.startIndex,endIndex:i.endIndex,string:e.substring(i.startIndex,i.endIndex)})}const r=0===o.length?0:o[o.length-1].endIndex;o.push({type:"text",startIndex:r,endIndex:e.length-1,string:e.substring(r)});for(const i of o)"special"===i.type&&(i.string=n(i.string));let s="";for(const i of o)s+=i.string;return s}stripSlashes(e){return e.replace(/\\(.)/g,"$1")}escapeDoubleQuotes(e){return e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}static{this.\u0275fac=function(t){return new(t||c)}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),je=(()=>{class c{constructor(e,t){this.dataTypeEncoder=e,this.logger=t}evaluate(e,t={},n,o=!0,r={},s=!0,i={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){if("null"===e)return null;if("undefined"!==e){if("true"===e)return!0;if("false"===e)return!1;if(!isNaN(e))return parseInt(e,10);if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")||e.startsWith("`")&&e.endsWith("`")){let a=e.substring(1,e.length-1);return a=o?this.dataTypeEncoder.stripSlashes(a):a,a}if((e=this.encodeDataTypeString(e)).startsWith("{")&&e.endsWith("}")||e.startsWith("[")&&e.endsWith("]")){const a=this.parseAsJSON(e,o);return this.loadJSONVariables(a,t,n,o,r,s,i)}if("$event"===e)return n;if(e.match(new RegExp("^\\s*"+x.contextVariableRegex+"\\s*$","gm")))return this.loadContextVariable(e,t,n,o,r,s,i);throw Error('Data type for following input was not recognized and could not be parsed: "'+e+'"')}}encodeDataTypeString(e){return e=this.dataTypeEncoder.encodeSubstrings(e),e=this.dataTypeEncoder.encodeSubfunctions(e),this.dataTypeEncoder.encodeVariableSubbrackets(e)}decodeDataTypeString(e){return e=this.dataTypeEncoder.decodeStringSpecialChars(e),e=this.dataTypeEncoder.decodeFunctionBrackets(e),(e=this.dataTypeEncoder.decodeVariableBrackets(e)).trim()}parseAsJSON(e,t){if((e=(e=(e=e.replace(/\'(\\.|[^\'])*?\'/gm,i=>'"'+i.slice(1,-1)+'"')).replace(/\`(\\.|[^\`])*?\`/gm,i=>'"'+i.slice(1,-1)+'"')).replace(/"?([a-z0-9A-Z_]+)"?\s*:/g,'"$1": ')).match(/"?__proto__"?\s*:/g))throw Error('Setting the "__proto__" property in a hook input object is not allowed.');if(e.match(/"?prototype"?\s*:/g))throw Error('Setting the "prototype" property in a hook input object is not allowed.');if(e.match(/"?constructor"?\s*:/g))throw Error('Setting the "constructor" property in a hook input object is not allowed.');e=this.replaceValuesInJSONString(e,"undefined",i=>"null"),e=this.replaceValuesInJSONString(e,x.contextVariableRegex,i=>'"'+this.dataTypeEncoder.transformContextVarIntoPlacerholder(i)+'"'),e=this.replaceValuesInJSONString(e,"\\$event",i=>'"__EVENT__"');const s=JSON.parse(e);return this.decodeJSONStrings(s,t),s}replaceValuesInJSONString(e,t,n){return e.replace(new RegExp("(?:(:\\s*)("+t+")(?=\\s*[,}])|([\\[,]\\s*)("+t+")(?=\\s*[\\],]))","gm"),(s,i,a,l,g)=>(i||l)+n(a||g))}decodeJSONStrings(e,t){for(const n in e)if("string"==typeof e[n]){if('__EVENT__"'===e[n]||e[n].match(new RegExp("^\\s*"+x.placeholderContextVariableRegex+"\\s*$","gm")))continue;let o=this.decodeDataTypeString(e[n]);o=t?this.dataTypeEncoder.stripSlashes(o):o,e[n]=o}else"object"==typeof e[n]&&this.decodeJSONStrings(e[n],t)}loadJSONVariables(e,t,n,o,r,s,i){for(const a in e)if("string"==typeof e[a]){if("__EVENT__"===e[a])e[a]=n;else if(e[a].match(new RegExp("^\\s*"+x.placeholderContextVariableRegex+"\\s*$","gm"))){const l=this.dataTypeEncoder.transformPlaceholderIntoContextVar(e[a].trim());e[a]=this.loadContextVariable(l,t,n,o,r,s,i)}}else"object"==typeof e[a]&&this.loadJSONVariables(e[a],t,n,o,r,s,i);return e}loadContextVariable(e,t={},n,o=!0,r={},s=!0,i={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){try{const a=e.substring(7);if(""===a.trim())return t;const l=[],g=N(a,new RegExp(x.variablePathPartRegex,"gm"));for(const u of g){if(u[0].startsWith(".")&&l.push({type:"property",value:u[0].substring(1)}),u[0].startsWith("[")&&u[0].endsWith("]")){let h=u[0].substring(1,u[0].length-1);h=this.decodeDataTypeString(h),h=this.evaluate(h,t,n,o,r,s),l.push({type:"property",value:h})}if(u[0].startsWith("(")&&u[0].endsWith(")")){if(!s)throw Error("Tried to call a function in a context variable. This has been disallowed in the current config.");const h=u[0].substring(1,u[0].length-1),f=[];if(""!==h)for(const v of h.split(",")){let C=this.decodeDataTypeString(v);C=this.evaluate(C,t,n,o,r,s),f.push(C)}l.push({type:"function",value:f})}}try{const u=this.fetchContextVariable(t,l);return r[this.decodeDataTypeString(e)]=u,u}catch{throw Error('The required context variable "'+this.decodeDataTypeString(e)+'" could not be found in the context object. Returning undefined instead.')}}catch(a){return this.logger.warn([a],i),void(r[this.decodeDataTypeString(e)]=void 0)}}fetchContextVariable(e,t){if("__proto__"===t[0].value)throw Error("Accessing the __proto__ property through a context variable is not allowed.");if("prototype"===t[0].value)throw Error("Accessing the prototype property through a context variable is not allowed.");if("constructor"===t[0].value)throw Error("Accessing the constructor property through a context variable is not allowed.");if(void 0===e)throw Error("Context variable path could not be resolved. Trying to access "+("property"===t[0].type?'property "'+t[0].value+'" of undefined.':"undefined function."));let n;return"property"===t[0].type?e.hasOwnProperty(t[0].value)?(n=e[t[0].value],"function"==typeof n&&(n=n.bind(e))):e.__proto__.hasOwnProperty(t[0].value)?(n=e.__proto__[t[0].value],"function"==typeof n&&(n=n.bind(e))):n=void 0:"function"===t[0].type&&(n=e(...t[0].value)),t.shift(),t.length>0&&(n=this.fetchContextVariable(n,t)),n}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(Fe),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),We=(()=>{class c{constructor(e,t){this.dataTypeParser=e,this.logger=t}checkInputBindings(e,t,n,o){for(const[r,s]of Object.entries(e))if(n.parseInputs)if(s.parsed)this.updateInputBindingIfStale(s,t,n);else try{s.value=this.dataTypeParser.evaluate(s.raw,n.allowContextInBindings?t:{},void 0,n.unescapeStrings,s.boundContextVariables,n.allowContextFunctionCalls,o),s.parsed=!0}catch(i){this.logger.error(["Hook input parsing error\nselector: "+n.selector+"\ninput: "+r+'\nvalue: "'+s.value+'"'],o),this.logger.error([i.stack],o),delete e[r]}else s.value=s.raw}updateInputBindingIfStale(e,t,n){if(Object.keys(e.boundContextVariables).length>0){let o=!1;for(const[r,s]of Object.entries(e.boundContextVariables)){const i=this.dataTypeParser.encodeDataTypeString(r);if(this.dataTypeParser.loadContextVariable(i,t,void 0,n.unescapeStrings,{},n.allowContextFunctionCalls)!==s){o=!0;break}}o&&(e.boundContextVariables={},e.value=this.dataTypeParser.evaluate(e.raw,n.allowContextInBindings?t:{},void 0,n.unescapeStrings,e.boundContextVariables,n.allowContextFunctionCalls))}}checkOutputBindings(e,t,n){for(const[o,r]of Object.entries(e))r.parsed||(r.value=(s,i)=>{try{this.dataTypeParser.evaluate(r.raw,t.allowContextInBindings?i:{},s,t.unescapeStrings,r.boundContextVariables,t.allowContextFunctionCalls)}catch(a){this.logger.error(["Hook output parsing error\nselector: "+t.selector+"\noutput: "+o+'\nvalue: "'+r.value+'"'],n),this.logger.error([a.stack],n)}},r.parsed=!0)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(je),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),$e=(()=>{class c{constructor(e,t,n,o,r,s){this.injector=e,this.parserResolver=t,this.platformService=n,this.tagHookFinder=o,this.bindingsValueManager=r,this.logger=s}resolve(e,t,n,o,r){const s=[];for(const l of e){const g=this.resolveEntry(l,t,r);g&&s.push(g)}const i=this.validateParserFunctions(s,r);if(this.checkParserNames(i,r),!n&&!o)return i;this.checkBlackAndWhitelist(i,n,o,r);const a=[];for(const l of i)l.hasOwnProperty("name")&&"string"==typeof l.name&&(n&&n.includes(l.name)||o&&!o.includes(l.name))||a.push(l);return a}resolveEntry(e,t,n){if(e.hasOwnProperty("prototype")){if((0,T.HJs)(e))return this.createSelectorHookParser({component:e});try{return t.get(e)}catch{return new e}}else if("object"==typeof e){if("Object"!==e.constructor.name)return e;try{return this.createSelectorHookParser(e)}catch(o){return this.logger.error(["Invalid parser config - "+o.message,e],n),null}}return this.logger.error(["Invalid parser config - ",e],n),null}createSelectorHookParser(e){return e.hasOwnProperty("parseWithRegex")&&e.parseWithRegex||e.hasOwnProperty("enclosing")&&!e.enclosing||e.hasOwnProperty("bracketStyle")&&e.bracketStyle?new Ae(e,this.parserResolver,this.tagHookFinder,this.bindingsValueManager):new Ne(e,this.parserResolver,this.platformService,this.bindingsValueManager)}validateParserFunctions(e,t){const n=[];for(const o of e)"function"==typeof o.findHooks||"function"==typeof o.findHookElements?"function"==typeof o.loadComponent?"function"==typeof o.getBindings?n.push(o):this.logger.error(['Submitted parser does not implement "getBindings()". Removing from list of active parsers:',o],t):this.logger.error(['Submitted parser does not implement "loadComponent()". Removing from list of active parsers:',o],t):this.logger.error(['Submitted parser neither implements "findHooks()" nor "findHookElements()". One is required. Removing from list of active parsers:',o],t);return n}checkParserNames(e,t){const n=e.map(s=>s.name).filter(s=>void 0!==s),o=[],r=[];for(const s of n)o.includes(s)&&!r.includes(s)&&(this.logger.warn(['Parser name "'+s+'" is not unique and appears multiple times in the list of active parsers.'],t),r.push(s)),o.push(s)}checkBlackAndWhitelist(e,t,n,o){const r=e.map(s=>s.name).filter(s=>void 0!==s);if(t)for(const s of t)r.includes(s)||this.logger.warn(['Blacklisted parser name "'+s+'" does not appear in the list of global parsers names. Make sure both spellings are identical.'],o);if(n)for(const s of n)r.includes(s)||this.logger.warn(['Whitelisted parser name "'+s+'" does not appear in the list of global parsers names. Make sure both spellings are identical.'],o)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(d.zZn),d.KVO(De),d.KVO(K),d.KVO(He),d.KVO(We),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Le=(()=>{class c{constructor(e){this.parserEntryResolver=e}resolve(e,t,n,o,r,s=null,i=null,a=null,l=null){let g={};n=n||[],o=o||[];const u={options:{sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}};g=(r=r||{}).hasOwnProperty("inheritance")&&r.inheritance!==te.Linear?this.mergeSettings(r.inheritance===te.All?[u,...n,...o,{options:i||void 0}]:[u,r||{},{options:i||void 0}]):this.mergeSettings([u,...o,{parsers:s||void 0,options:i||void 0}]);const h=g.options;t&&"string"!=typeof t&&(h.sanitize=!1);let f=[];return s?f=this.parserEntryResolver.resolve(s,e,null,null,h):g.parsers&&(f=this.parserEntryResolver.resolve(g.parsers,e,a,l,h)),{parsers:f,options:h}}mergeSettings(e){const t={};for(const n of e){if(void 0!==n.parsers){void 0===t.parsers&&(t.parsers=[]);for(const o of n.parsers)t.parsers.includes(o)||t.parsers.push(o)}void 0!==n.options&&(void 0===t.options&&(t.options={}),t.options=this.recursiveAssign(t.options,n.options))}return t}recursiveAssign(e,t){if(Object(t)!==t)return t;Object(e)!==e&&(e={});for(const n in t)e[n]=this.recursiveAssign(e[n],t[n]);return e}static{this.\u0275fac=function(t){return new(t||c)(d.KVO($e))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();const he="_ngx_dynamic_hooks_node_placeholder";let ze=(()=>{class c{constructor(e,t){this.platformService=e,this.logger=t}findInElement(e,t,n,o,r,s){for(const i of n)if("function"==typeof i.findHooks){this.checkElement(e,t,n,o,r,s);break}}checkElement(e,t,n,o,r,s,i={counter:0,nodes:{}}){let a=this.platformService.getChildNodes(e),l="";const g={};for(const f of a)if(this.platformService.isTextNode(f))l+=this.platformService.getTextContent(f);else{const v=i.counter++;l+=`${he}__${v}__`,g[v]=f}const u=Object.keys(s).length,h=this.find(l,t,n,o,r,s);if(Object.keys(s).length>u&&(this.platformService.clearChildNodes(e),this.platformService.setInnerContent(e,h.content),a=this.platformService.getChildNodes(e),i.nodes={...i.nodes,...g}),Object.keys(i.nodes).length)for(const f of a)if(this.platformService.isTextNode(f)){let v=this.platformService.getTextContent(f);if(v){const C=N(v,new RegExp(`${he}__(\\d*)__`,"g"));if(C.length){const k=[];let z=0;for(const _ of C){const xe=v.substring(z,_.index),X=parseInt(_[1]);xe&&k.push(this.platformService.createTextNode(xe)),X&&i.nodes[X]&&(k.push(i.nodes[X]),delete i.nodes[X]),z=_.index+_[0].length}const be=v.substring(z);be&&k.push(this.platformService.createTextNode(be));const ie=this.platformService.getParentNode(f);for(const _ of k)this.platformService.insertBefore(ie,_,f);this.platformService.removeChild(ie,f),a=this.platformService.getChildNodes(ie)}}}for(const f of a)f.nodeType!==Node.TEXT_NODE&&this.checkElement(f,t,n,o,r,s,i)}find(e,t,n,o,r,s){if(""===e)return{content:e,hookIndex:s};r.convertHTMLEntities&&(e=this.convertHTMLEntities(e));let i=[];for(const l of n)if("function"==typeof l.findHooks)for(const g of l.findHooks(e,t,r))i.push({parser:l,hookPosition:g});i.sort((l,g)=>l.hookPosition.openingTagStartIndex-g.hookPosition.openingTagStartIndex),i=this.validateHookPositions(i,e,r);const a=[];for(const l of i){const g=Object.keys(s).length+1,u=this.getHookSegments(l.hookPosition,e);if(a.push({startIndex:l.hookPosition.openingTagStartIndex,endIndex:l.hookPosition.openingTagEndIndex,replacement:`<${ee} ${B}="${g}" ${P}="${o}">`}),a.push({startIndex:u.enclosing?l.hookPosition.closingTagStartIndex:l.hookPosition.openingTagEndIndex,endIndex:u.enclosing?l.hookPosition.closingTagEndIndex:l.hookPosition.openingTagEndIndex,replacement:`</${ee}>`}),s[g]={id:g,parser:l.parser,value:{openingTag:u.openingTag,closingTag:u.closingTag,element:null,elementSnapshot:null},data:null,isLazy:!1,bindings:null,previousBindings:null,componentRef:null,dirtyInputs:new Set,outputSubscriptions:{},htmlEventSubscriptions:{}},u.enclosing&&r.fixParagraphTags){const h=this.removeTagArtifacts(u.textBefore,"<p>","</p>",u.innerValue,"</p>","<p>");u.textBefore=h.firstText,u.innerValue=h.secondText;const f=this.removeTagArtifacts(u.innerValue,"<p>","</p>",u.textAfter,"</p>","<p>");u.innerValue=f.firstText,u.textAfter=f.secondText,e=u.textBefore+u.openingTag+u.innerValue+u.closingTag+u.textAfter}}a.sort((l,g)=>{let u=g.startIndex-l.startIndex;return 0===u&&(u=g.endIndex-l.endIndex),u});for(const l of a){const g=e.substring(0,l.startIndex),u=e.substring(l.endIndex);e=g+l.replacement+u}return{content:e,hookIndex:s}}getHookSegments(e,t){const n=Number.isInteger(e.closingTagStartIndex)&&Number.isInteger(e.closingTagEndIndex);return{enclosing:n,textBefore:t.substring(0,e.openingTagStartIndex),openingTag:t.substring(e.openingTagStartIndex,e.openingTagEndIndex),innerValue:n?t.substring(e.openingTagEndIndex,e.closingTagStartIndex):null,closingTag:n?t.substring(e.closingTagStartIndex,e.closingTagEndIndex):null,textAfter:t.substring(n?e.closingTagEndIndex:e.openingTagEndIndex)}}validateHookPositions(e,t,n){const o=[];e:for(const[r,s]of e.entries()){const i=Number.isInteger(s.hookPosition.closingTagStartIndex)&&Number.isInteger(s.hookPosition.closingTagEndIndex),a=s.hookPosition;if(a.openingTagStartIndex>=a.openingTagEndIndex){this.logger.warn(["Text hook error: openingTagEndIndex has to be greater than openingTagStartIndex. Ignoring.",a],n);continue}if(i&&a.openingTagEndIndex>a.closingTagStartIndex){this.logger.warn(["Text hook error: closingTagStartIndex has to be greater than openingTagEndIndex. Ignoring.",a],n);continue}if(i&&a.closingTagStartIndex>=a.closingTagEndIndex){this.logger.warn(["Text hook error: closingTagEndIndex has to be greater than closingTagStartIndex. Ignoring.",a],n);continue}const l=e.slice(0,r);for(const g of l){const u=g.hookPosition,h=Number.isInteger(u.closingTagStartIndex)&&Number.isInteger(u.closingTagEndIndex);if(a.openingTagStartIndex===u.openingTagStartIndex&&a.openingTagEndIndex===u.openingTagEndIndex&&(!i||!h||a.closingTagStartIndex===u.closingTagStartIndex&&a.closingTagEndIndex===u.closingTagEndIndex)){this.generateHookPosWarning("A text hook with the same position as another text hook was found. There may be multiple parsers looking for the same text pattern. Ignoring duplicates.",a,u,t,n);continue e}if(a.openingTagStartIndex<u.openingTagEndIndex){this.generateHookPosWarning("Text hook error: Hook opening tag starts before previous hook opening tag ends. Ignoring.",a,u,t,n);continue e}if(h&&!(a.openingTagEndIndex<=u.closingTagStartIndex||a.openingTagStartIndex>=u.closingTagEndIndex)){this.generateHookPosWarning("Text hook error: Opening tag of hook overlaps with closing tag of previous hook. Ignoring.",a,u,t,n);continue e}if(h&&i&&!(a.closingTagEndIndex<=u.closingTagStartIndex||a.closingTagStartIndex>=u.closingTagEndIndex)){this.generateHookPosWarning("Text hook error: Closing tag of hook overlaps with closing tag of previous hook. Ignoring.",a,u,t,n);continue e}if(i&&h&&a.openingTagEndIndex<=u.closingTagStartIndex&&a.closingTagStartIndex>=u.closingTagEndIndex){this.generateHookPosWarning("Text hook error: The closing tag of a nested hook lies beyond the closing tag of the outer hook. Ignoring.",a,u,t,n);continue e}}o.push(s)}return o}generateHookPosWarning(e,t,n,o,r){const s=this.getHookSegments(n,o),i=this.getHookSegments(t,o);this.logger.warn([e+"\nFirst hook: ",{openingTag:s.openingTag,openingTagStartIndex:n.openingTagStartIndex,openingTagEndIndex:n.openingTagEndIndex,closingTag:s.closingTag,closingTagStartIndex:n.closingTagStartIndex,closingTagEndIndex:n.closingTagEndIndex},"\nSecond hook:",{openingTag:i.openingTag,openingTagStartIndex:t.openingTagStartIndex,openingTagEndIndex:t.openingTagEndIndex,closingTag:i.closingTag,closingTagStartIndex:t.closingTagStartIndex,closingTagEndIndex:t.closingTagEndIndex}],r)}removeTagArtifacts(e,t,n,o,r,s){let i=!1,a=!1;const l=e.lastIndexOf(t),g=e.lastIndexOf(n);(l>=0&&-1===g||l>g)&&(i=!0);const u=o.indexOf(r),h=o.indexOf(s);return(u>=0&&-1===h||u<h)&&(a=!0),i&&a&&(e=e.substring(0,l)+" ".repeat(t.length)+e.substring(l+t.length),o=o.substring(0,u)+" ".repeat(r.length)+o.substring(u+r.length)),{firstText:e,secondText:o}}convertHTMLEntities(e){const t=this.platformService.createElement("div");return e.replace(/&[#A-Za-z0-9]+;/gi,o=>" "===o?" ":(this.platformService.setInnerContent(t,o),this.platformService.getTextContent(t)))}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(K),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Ke=(()=>{class c{constructor(e,t){this.platformService=e,this.logger=t}find(e,t,n,o,r,s){let i=[];for(const a of n)if("function"==typeof a.findHookElements)for(const l of a.findHookElements(e,t,r))i.push({parser:a,hookElement:l});i=function Re(c,p,e){return[...c].sort(function(n,o){return"function"==typeof e&&(n=e(n),o=e(o)),p(n,o)})}(i,this.platformService.sortElements.bind(this.platformService),a=>a.hookElement),i=this.validateHookElements(i,e,r);for(const a of i){const l=Object.keys(s).length+1;s[l]={id:l,parser:a.parser,value:{openingTag:this.platformService.getOpeningTag(a.hookElement),closingTag:this.platformService.getClosingTag(a.hookElement),element:a.hookElement,elementSnapshot:this.platformService.cloneElement(a.hookElement)},data:null,isLazy:!1,bindings:null,previousBindings:null,componentRef:null,dirtyInputs:new Set,outputSubscriptions:{},htmlEventSubscriptions:{}},this.platformService.setAttribute(a.hookElement,B,l.toString()),this.platformService.setAttribute(a.hookElement,P,o)}return s}validateHookElements(e,t,n){const o=[];for(const[r,s]of e.entries())o.slice(0,r).findIndex(l=>l.hookElement===s.hookElement)>=0||this.platformService.getAttributeNames(s.hookElement).includes(B)||this.platformService.getAttributeNames(s.hookElement).includes(P)?this.logger.warn(["An element hook tried to use an element that was found by another hook before. There may be multiple parsers looking for the same elements. Ignoring duplicates.",s.hookElement],n):oe(s.hookElement)||o.push(s);return o}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(K),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();const re="dynamic-hooks-sanitization-placeholder",_e=new RegExp(`</?${re}.*?>`,"g");let Ue=(()=>{class c{constructor(e){this.platformService=e,this.attrWhitelist=[B,P,"class","href","src"]}sanitize(e,t,n){const o={};for(const a of Object.values(t)){const l=this.platformService.querySelectorAll(e,`[${B}="${a.id}"][${P}="${n}"]`)?.[0];if(l){o[a.id]=l;const g=this.platformService.getParentNode(l),u=this.platformService.getChildNodes(l),h=this.platformService.createElement(re);this.platformService.setAttribute(h,B,a.id.toString()),this.platformService.setAttribute(h,P,n),this.platformService.insertBefore(g,h,l),this.platformService.removeChild(g,l);for(const f of u)this.platformService.appendChild(h,f)}}let r=this.platformService.getInnerContent(e);r=this.findAndEncodeTags(r,_e);const s=console.warn;console.warn=()=>{};let i=this.platformService.sanitize(r);console.warn=s,i=this.decodeTagString(i),e.innerHTML=i||"";for(const[a,l]of Object.entries(o)){const g=this.platformService.querySelectorAll(e,`${re}[${B}="${a}"]`)?.[0];if(g){const u=this.platformService.getParentNode(g),h=this.platformService.getChildNodes(g);this.platformService.insertBefore(u,l,g),this.platformService.removeChild(u,g);for(const f of h)this.platformService.appendChild(l,f);this.sanitizeElementAttrs(l)}}return e}sanitizeElementAttrs(e){const t=this.platformService.getAttributeNames(e),n=this.platformService.createElement("div"),o=this.platformService.createElement("span");this.platformService.appendChild(n,o);for(const i of t){try{this.platformService.setAttribute(o,i,this.platformService.getAttribute(e,i))}catch{}try{i!==B&&i!==P&&this.platformService.removeAttribute(e,i)}catch{}}n.innerHTML=this.platformService.sanitize(this.platformService.getInnerContent(n));const r=this.platformService.querySelectorAll(n,"span")[0],s=this.platformService.getAttributeNames(r);for(const i of s)try{this.platformService.setAttribute(e,i,this.platformService.getAttribute(r,i))}catch{}return e}findAndEncodeTags(e,t){let n=e;const o=N(e,t);o.sort((r,s)=>s.index-r.index);for(const r of o){const s=r.index,i=r.index+r[0].length,a=n.substring(0,s),l=this.encodeTagString(n.substring(s,i)),g=n.substring(i);n=a+l+g}return n}encodeTagString(e){return(e=(e=e.replace(/</g,"@@@hook-lt@@@")).replace(/>/g,"@@@hook-gt@@@")).replace(/"/g,"@@@hook-dq@@@")}decodeTagString(e){return(e=(e=e.replace(/@@@hook-lt@@@/g,"<")).replace(/@@@hook-gt@@@/g,">")).replace(/@@@hook-dq@@@/g,'"')}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(K))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),qe=(()=>{class c{constructor(e){this.logger=e}isEqual(e,t,n,o={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){const r=this.detailedStringify(e,n),s=this.detailedStringify(t,n);return null===r.result||null===s.result?(this.logger.warn(["Objects could not be compared by value as one or both of them could not be stringified. Returning false. \n","Objects:",e,t],o),!1):r.result===s.result}detailedStringify(e,t){try{const n={count:0},o=this.decycle(e,[],t,n);return{result:JSON.stringify(o,(s,i)=>void 0===i?"undefined":"function"==typeof i||"symbol"==typeof i?i.toString():i),depthReachedCount:n.count}}catch{return{result:null,depthReachedCount:0}}}decycle(e,t=[],n=5,o){if(t.length>n)return o.count++,null;if(!e||"object"!=typeof e||e instanceof Date)return e;for(const s of t)if(this.objEqualsProperties(e,s))return null;const r=t.concat([e]);if(Array.isArray(e)){const s=[];for(const i of e)s.push(this.decycle(i,r,n,o));return s}{const s={};for(const i of Object.keys(e))s[i]=this.decycle(e[i],r,n,o);return s}}objEqualsProperties(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),ge=(()=>{class c{constructor(e,t){this.deepComparer=e,this.logger=t}refresh(e,t,n,o){for(const[r,s]of Object.entries(e))this.updateBindings(s,t,n);if(o)for(const r of Object.values(e)){if(!r.componentRef)return;"function"==typeof r.componentRef.instance.onDynamicChanges&&r.componentRef.instance.onDynamicChanges({context:t})}}updateBindings(e,t,n){e.componentRef&&(e.bindings=e.parser.getBindings(e.id,e.value,t,n),this.updateComponentWithNewInputs(e,n),this.updateComponentWithNewOutputs(e,t,n),e.previousBindings={inputs:this.savePreviousBindings(e,"inputs",n.compareInputsByValue,n.compareByValueDepth),outputs:this.savePreviousBindings(e,"outputs",n.compareOutputsByValue,n.compareByValueDepth)})}savePreviousBindings(e,t,n,o){const r={};if(e.bindings.hasOwnProperty(t))for(const[s,i]of Object.entries(e.bindings[t]))r[s]={reference:i,stringified:n?this.deepComparer.detailedStringify(i,o):null};return r}updateComponentWithNewInputs(e,t){const n=e.componentRef.instance,o=this.getChangedBindings(e,"inputs",t),r=[],s=(0,T.HJs)(e.componentRef.componentType);for(const[i,a]of Object.entries(o)){const l=t.ignoreInputAliases?"propName":"templateName",g=s.inputs.find(u=>i===u[l])||s.inputs.find(u=>i.toLowerCase()===u[l].toLowerCase())||s.inputs.find(u=>i.replace(/-/g,"")===u[l])||s.inputs.find(u=>i.replace(/-/g,"").toLowerCase()===u[l].toLowerCase());if(g)r.push({propName:g.propName,templateName:g.templateName,value:a});else if(t.acceptInputsForAnyProperty){const h=Object.getOwnPropertyNames(n).find(f=>i===f)||Object.getOwnPropertyNames(n).find(f=>i.toLowerCase()===f.toLowerCase())||i;if(["__proto__","prototype","constructor"].includes(h)){this.logger.error(['Tried to overwrite a __proto__, prototype or constructor property with input "'+h+'" for hook "'+e.componentRef.componentType.name+'". This is not allowed.'],t);continue}r.push({propName:h,templateName:null,value:a})}}for(const{propName:i,templateName:a,value:l}of r)a?e.componentRef?.setInput(a,l):i&&(e.componentRef.instance[i]=l);r.length&&e.componentRef?.changeDetectorRef.detectChanges()}updateComponentWithNewOutputs(e,t,n){const o=e.componentRef.instance,r=this.getChangedBindings(e,"outputs",n),s=[],i=(0,T.HJs)(e.componentRef.componentType);for(const[a,l]of Object.entries(r)){const g=n.ignoreOutputAliases?"propName":"templateName",u=i.outputs.find(h=>a===h[g])||i.outputs.find(h=>a.toLowerCase()===h[g].toLowerCase())||i.outputs.find(h=>a.replace(/-/g,"")===h[g])||i.outputs.find(h=>a.replace(/-/g,"").toLowerCase()===h[g].toLowerCase());if(u)s.push({propName:u.propName,templateName:u.templateName,value:l});else if(n.acceptOutputsForAnyObservable){let h=Object.getOwnPropertyNames(o).find(f=>o[f]instanceof H.c&&a===f)||Object.getOwnPropertyNames(o).find(f=>o[f]instanceof H.c&&a.toLowerCase()===f.toLowerCase());h&&s.push({propName:h,templateName:null,value:l})}}for(const{propName:a,value:g}of s)e.outputSubscriptions[a]&&e.outputSubscriptions[a].unsubscribe(),e.outputSubscriptions[a]=e.componentRef.instance[a].subscribe(u=>{g(u,t)})}getChangedBindings(e,t,n){const o={};if(e.bindings.hasOwnProperty(t))for(const[r,s]of Object.entries(e.bindings[t]))if(e.previousBindings&&e.previousBindings[t].hasOwnProperty(r))if("inputs"===t?n.compareInputsByValue:n.compareOutputsByValue){const i=this.deepComparer.detailedStringify(s,n.compareByValueDepth);this.checkDetailedStringifyResultPair(r,e.componentRef.componentType.name,n,e.previousBindings[t][r].stringified,i)?i.result!==e.previousBindings[t][r].stringified.result&&(o[r]=s):s!==e.previousBindings[t][r].reference&&(o[r]=s)}else s!==e.previousBindings[t][r].reference&&(o[r]=s);else o[r]=s;return o}checkDetailedStringifyResultPair(e,t,n,o,r){return null===o.result&&null===r.result?(this.logger.warn(['Could stringify neither new nor old value for hook binding "'+e+'" for component "'+t+'" to compare by value. Defaulting to comparison by reference instead.'],n),!1):null===o.result?(this.logger.warn(['Could not stringify old value for hook binding "'+e+'" for component "'+t+'" to compare by value. Defaulting to comparison by reference instead.'],n),!1):null===r.result?(this.logger.warn(['Could not stringify new value for hook binding "'+e+'" for component "'+t+'" to compare by value. Defaulting to comparison by reference instead.'],n),!1):(o.depthReachedCount>0&&r.depthReachedCount>0?this.logger.warn(["Maximum compareByValueDepth of "+n.compareByValueDepth+" reached "+r.depthReachedCount+" time(s) for new value and "+o.depthReachedCount+' time(s) for old value while comparing binding "'+e+'" for component "'+t+".\n","If this impacts performance, consider simplifying this binding, reducing comparison depth or setting compareInputsByValue/compareOutputsByValue to false."],n):o.depthReachedCount>0?this.logger.warn(["Maximum compareByValueDepth of "+n.compareByValueDepth+" reached "+o.depthReachedCount+' time(s) for old value while comparing binding "'+e+'" for component "'+t+".\n","If this impacts performance, consider simplifying this binding, reducing comparison depth or setting compareInputsByValue/compareOutputsByValue to false."],n):r.depthReachedCount>0&&this.logger.warn(["Maximum compareByValueDepth of "+n.compareByValueDepth+" reached "+r.depthReachedCount+' time(s) for new value while comparing binding "'+e+'" for component "'+t+".\n","If this impacts performance, consider simplifying this binding, reducing comparison depth or setting compareInputsByValue/compareOutputsByValue to false."],n),!0)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(qe),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Qe=(()=>{class c{constructor(e,t,n,o,r){this.platformId=e,this.appRef=t,this.componentUpdater=n,this.platformService=o,this.logger=r}init(e,t,n,o,r,s,i){const a=new M.m(1),l=[],g={};if(0===Object.keys(t).length)return a.next(!0),a;for(let h of this.platformService.querySelectorAll(e,`[${B}][${P}]`)){const f=parseInt(this.platformService.getAttribute(h,B));if(0===this.platformService.querySelectorAll(e,`[${B}="${f}"][${P}="${n}"]`).length){delete t[f];continue}const v=t[f];v.data=v.parser.loadComponent(v.id,v.value,o,this.platformService.getChildNodes(h),r),v.isLazy=v.data.component.hasOwnProperty("importPromise")&&v.data.component.hasOwnProperty("importName"),(0,G.UE)(this.platformId)||!v.isLazy?(!v.data.hostElementTag&&Be.includes(this.platformService.getTagName(h).toLowerCase())&&(v.data.hostElementTag=ee),v.data.hostElementTag&&(h=this.useCustomHostElement(h,v.data.hostElementTag),v.value.element=h),this.createContentSlotElements(h,v,n),g[f]=h):delete t[f]}const u=Object.keys(g).map(h=>parseInt(h));for(const[h,f]of Object.entries(t))u.includes(parseInt(h))||(this.logger.warn(["Error when trying to load components - The anchor element for the following hook was found initially, but could not be found again for loading the component. Ignoring.",f],r),delete t[h]);for(const[h,f]of Object.entries(g)){const v=t[h];l.push((0,w.of)(!0).pipe((0,D.Z)(()=>this.loadComponentClass(v.data.component))).pipe((0,j.M)(C=>{const k=this.extractContentSlotElements(f,n);this.createComponent(v,o,f,k,r,C,s,i)})).pipe((0,m.W)(C=>(this.logger.error([C.stack],r),delete t[v.id],(0,w.of)(null)))))}return 0===l.length?(a.next(!0),a):((0,E.z)([...l]).pipe(ae()).subscribe(()=>{for(const h of Object.values(t)){const f=[];("function"==typeof h.componentRef.instance.onDynamicMount||"function"==typeof h.componentRef.instance.onDynamicChanges)&&this.findContentChildren(h.componentRef.location.nativeElement,f,t,n),"function"==typeof h.componentRef.instance.onDynamicChanges&&h.componentRef.instance.onDynamicChanges({contentChildren:f}),"function"==typeof h.componentRef.instance.onDynamicMount&&h.componentRef.instance.onDynamicMount({context:o,contentChildren:f})}for(const h of Object.values(g))this.platformService.removeAttribute(h,B),this.platformService.removeAttribute(h,P),this.platformService.removeAttribute(h,"ng-version");a.next(!0)}),a)}useCustomHostElement(e,t){const n=this.platformService.createElement(t);this.platformService.setAttribute(n,B,this.platformService.getAttribute(e,B)),this.platformService.setAttribute(n,P,this.platformService.getAttribute(e,P)),this.platformService.removeAttribute(e,B),this.platformService.removeAttribute(e,P);const o=this.platformService.getChildNodes(e);for(const r of o)this.platformService.appendChild(n,r);return this.platformService.insertBefore(this.platformService.getParentNode(e),n,e),this.platformService.removeChild(this.platformService.getParentNode(e),e),n}createContentSlotElements(e,t,n){let o;o=t.data.hasOwnProperty("content")&&Array.isArray(t.data.content)?t.data.content:[this.platformService.getChildNodes(e)],this.platformService.clearChildNodes(e);for(const[r,s]of o.entries())if(null!=s){const i=this.platformService.createElement("dynamic-component-contentslot");this.platformService.setAttribute(i,"slotIndex",r.toString()),this.platformService.setAttribute(i,"parsetoken",n);for(const a of s)this.platformService.appendChild(i,a);this.platformService.appendChild(e,i)}}extractContentSlotElements(e,t){const n=[],o=this.platformService.getChildNodes(e).filter(r=>"DYNAMIC-COMPONENT-CONTENTSLOT"===this.platformService.getTagName(r)&&this.platformService.getAttribute(r,"parsetoken")===t);for(const r of o){const s=this.platformService.getAttribute(r,"slotIndex");n[parseInt(s)]=this.platformService.getChildNodes(r)}return this.platformService.clearChildNodes(e),n}loadComponentClass(e){const t=new M.m(1);if(e.hasOwnProperty("prototype"))t.next(e);else if("function"==typeof e)e().then(n=>{t.next(n)});else{if(!e.hasOwnProperty("importPromise")||!e.hasOwnProperty("importName"))throw Error('The "component" property of a returned HookData object must either contain the component class, a function that returns a promise with the component class or an explicit LazyLoadComponentConfig');if(e.importPromise instanceof Promise)throw Error('When lazy-loading a component, the "importPromise"-field must contain a function returning the import-promise, but it contained the promise itself.');e.importPromise().then(n=>{const o=e.importName,r=Object.prototype.hasOwnProperty.call(n,o)?n[o]:n.default;t.next(r)})}return t}createComponent(e,t,n,o,r,s,i,a){const l=(0,T.a0P)(s,{hostElement:n,environmentInjector:e.data.environmentInjector||i,elementInjector:e.data.injector||a,projectableNodes:o});e.componentRef=l,this.mapOutputsToHTMLEvents(e,r),this.componentUpdater.updateBindings(e,t,r),"function"==typeof e.componentRef.instance.onDynamicChanges&&void 0!==t&&e.componentRef.instance.onDynamicChanges({context:t}),this.appRef.attachView(l.hostView),l.changeDetectorRef.detectChanges()}mapOutputsToHTMLEvents(e,t){const n=(0,T.HJs)(e.componentRef.componentType);for(const o of n.outputs){const r=t.ignoreOutputAliases?o.propName:o.templateName;e.htmlEventSubscriptions[r]=e.componentRef.instance[o.propName].subscribe(s=>{t.triggerDOMEvents&&this.platformService.dispatchEvent(e.componentRef?.location.nativeElement,r,s)})}}findContentChildren(e,t=[],n,o){const r=this.platformService.getChildNodes(e);null!=r&&r.length>0&&r.forEach((s,i)=>{let a=!1;const l=this.platformService.getAttribute(s,P);if(null!==l&&l===o&&this.platformService.getAttribute(s,B)){const u=parseInt(this.platformService.getAttribute(s,B),10);n.hasOwnProperty(u)&&(t.push({componentRef:n[u].componentRef,contentChildren:[],hookValue:n[u].value}),a=!0)}this.findContentChildren(s,a?t[t.length-1].contentChildren:t,n,o)})}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(S.Agw),d.KVO(S.o8S),d.KVO(ge),d.KVO(K),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),fe=(()=>{class c{constructor(e,t,n,o,r,s,i,a,l,g,u){this.allSettings=e,this.ancestorSettings=t,this.moduleSettings=n,this.settingsResolver=o,this.textHookFinder=r,this.elementHookFinder=s,this.contentSanitizer=i,this.componentCreator=a,this.platformService=l,this.environmentInjector=g,this.injector=u}parse(e=null,t=null,n=null,o=null,r=null,s=null,i=null,a={},l=null,g=null){const u=l||this.environmentInjector,h=g||this.injector,{parsers:f,options:v}=this.settingsResolver.resolve(h,e,this.allSettings,this.ancestorSettings,this.moduleSettings,t,o,r,s);if(!e)return(0,w.of)({element:i||this.platformService.createElement("div"),hookIndex:a,context:n,usedParsers:f,usedOptions:v,usedInjector:h,usedEnvironmentInjector:u,destroy:()=>this.destroy(a)});const C=Math.random().toString(36).substring(2,12);let k="string"==typeof e?this.platformService.createElement("div"):e;if(this.platformService.setAttribute(k,q,"1"),"string"==typeof e){const z=this.textHookFinder.find(e,n,f,C,v,a);this.platformService.setInnerContent(k,z.content)}else this.textHookFinder.findInElement(k,n,f,C,v,a);if(a=this.elementHookFinder.find(k,n,f,C,v,a),v?.sanitize&&this.contentSanitizer.sanitize(k,a,C),i&&i!==k){this.platformService.removeAttribute(k,q),this.platformService.setAttribute(i,q,"1"),this.platformService.clearChildNodes(i);for(const z of this.platformService.getChildNodes(k))this.platformService.appendChild(i,z);k=i}return this.componentCreator.init(k,a,C,n,v,u,h).pipe(ae()).pipe((0,we.T)(z=>(this.platformService.removeAttribute(k,q),{element:k,hookIndex:a,context:n,usedParsers:f,usedOptions:v,usedInjector:h,usedEnvironmentInjector:u,destroy:()=>this.destroy(a)})))}destroy(e){if(e){for(const t of Object.values(e))t.componentRef&&t.componentRef.destroy();for(const t of Object.values(e)){for(const n of Object.values(t.outputSubscriptions))n&&n.unsubscribe();for(const n of Object.values(t.htmlEventSubscriptions))n&&n.unsubscribe()}}}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(le,8),d.KVO(Y,8),d.KVO(ue,8),d.KVO(Le),d.KVO(ze),d.KVO(Ke),d.KVO(Ue),d.KVO(Qe),d.KVO(K),d.KVO(d.uvJ),d.KVO(d.zZn))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),tt=(()=>{class c{constructor(e,t,n,o,r,s){this.hostElement=e,this.dynamicHooksService=t,this.componentUpdater=n,this.platformService=o,this.environmentInjector=r,this.injector=s,this.content=null,this.context=null,this.globalParsersBlacklist=null,this.globalParsersWhitelist=null,this.parsers=null,this.options=null,this.componentsLoaded=new d.bkB,this.hookIndex={},this.activeOptions={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}},this.activeParsers=[],this.token=Math.random().toString(36).substring(2,12),this.initialized=!1}ngDoCheck(){this.activeOptions.updateOnPushOnly||this.refresh(!1)}ngOnChanges(e){e.hasOwnProperty("content")||e.hasOwnProperty("globalParsersBlacklist")||e.hasOwnProperty("globalParsersWhitelist")||e.hasOwnProperty("parsers")||e.hasOwnProperty("options")?(this.reset(),this.parse(this.content)):e.hasOwnProperty("context")&&this.refresh(!0)}ngAfterViewInit(){}ngAfterViewChecked(){}ngOnDestroy(){this.reset()}reset(){this.dynamicHooksService.destroy(this.hookIndex),this.platformService.setInnerContent(this.hostElement.nativeElement,""),this.hookIndex={},this.activeOptions={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}},this.activeParsers=[],this.initialized=!1}parse(e){this.dynamicHooksService.parse(e,this.parsers,this.context,this.options,this.globalParsersBlacklist,this.globalParsersWhitelist,this.hostElement.nativeElement,this.hookIndex,this.environmentInjector,this.injector).subscribe(t=>{this.activeParsers=t.usedParsers,this.activeOptions=t.usedOptions,this.initialized=!0;const n=Object.values(this.hookIndex).map(o=>({hookId:o.id,hookValue:o.value,hookParser:o.parser,componentRef:o.componentRef}));this.componentsLoaded.emit(n)})}refresh(e){this.initialized&&this.componentUpdater.refresh(this.hookIndex,this.context,this.activeOptions,e)}static{this.\u0275fac=function(t){return new(t||c)(S.rXU(S.aKT),S.rXU(fe),S.rXU(ge),S.rXU(K),S.rXU(d.uvJ),S.rXU(d.zZn))}}static{this.\u0275cmp=S.VBU({type:c,selectors:[["ngx-dynamic-hooks"]],inputs:{content:"content",context:"context",globalParsersBlacklist:"globalParsersBlacklist",globalParsersWhitelist:"globalParsersWhitelist",parsers:"parsers",options:"options"},outputs:{componentsLoaded:"componentsLoaded"},features:[S.OA$],decls:0,vars:0,template:function(t,n){},encapsulation:2})}}return c})();var me=b(222),ye=b(58),ve=b(2306),nt=b(140);class ot extends me.A4{baseSize;documentListHandlers;entityListHandlers;_handlers;context={};counters={};getIndex(p){const e=this.counters[p]||0;return this.counters[p]=e+1,e}constructor(p="m",e){super(),this.baseSize=p,this._handlers=e,this.documentListHandlers=e?.documentList,this.entityListHandlers=e?.entityList,this.setupRenderers()}resetContext(){this.context={},this.counters={}}getContext(){return this.context}scaleSize(p){const e=["xs","s","m","l","xl"],t=e.indexOf(this.baseSize),n=e.indexOf(p);return e[Math.max(0,Math.min(e.length-1,n+(t-2)))]}setupRenderers(){this.heading=({tokens:p,depth:e})=>{const r=this.scaleSize({1:"xl",2:"l",3:"l",4:"m",5:"m",6:"s"}[e]),s={1:"bold",2:"semibold",3:"semibold",4:"semibold",5:"medium",6:"medium"}[e],i=this.parser?.parseInline(p)||"";return`<cue-typography size="${r}" weight="${s}"${this.getIndex("heading")>0?' style="margin-top: 24px; display: block;"':' style="display: block;"'}>${i}</cue-typography>\n`},this.paragraph=({tokens:p})=>{const e=this.scaleSize("m"),t=this.parser?.parseInline(p)||"";return/^(?:\s*,?\s*<cue-href-chip\b[^>]*><\/cue-href-chip>)+\s*$/.test(t)?`<div style="display: flex; gap: 6px; flex-wrap: wrap;">${t.replace(/(<\/cue-href-chip>)\s*,?\s*/g,"$1").trim()}</div>\n`:`<div class="cue-md-p"><cue-typography size="${e}" weight="regular">${t}</cue-typography></div>\n`},this.listitem=({tokens:p})=>{const e=this.scaleSize("m");return`<li class="cue-md-li" style="font-size: var(--cue-font-${e}-size);"><cue-typography size="${e}" weight="regular">${this.parser?.parseInline(p)||""}</cue-typography></li>`},this.tablecell=({tokens:p,header:e,align:t})=>{const n=e?"th":"td",r=e?"semibold":"regular";return`<${n}${t?` style="text-align: ${t}"`:""}><cue-typography size="${this.scaleSize("m")}" weight="${r}">${this.parser?.parseInline(p)||""}</cue-typography></${n}>`},this.blockquote=({text:p,tokens:e})=>/^\[!(NOTE|WARNING|IMPORTANT|TIP|CAUTION)\]/i.test(p.trimStart())?"":`<blockquote class="cue-md-blockquote"><cue-typography size="${this.scaleSize("m")}" weight="regular">${this.parser?.parse(e)||""}</cue-typography></blockquote>`,this.link=({href:p,title:e,tokens:t})=>{const n=this.parser?.parseInline(t)||"";if(!p){const r=this.getIndex("hrefchip"),s=`hrefchip_menuitems_${r}`,i=`hrefchip_id_${r}`,a=`hrefchip_click_${r}`,l=n.replace(/<[^>]*>/g,"");return this.context[i]=l,this.context[s]=()=>this._handlers?.hrefChip?.menuItems?.(l)??[],this.context[a]=()=>{this._handlers?.hrefChip?.clicked?.(l)},`<cue-href-chip [label]="context.${i}" [menuItems]="context.${s}()" (clicked)="context.${a}()"></cue-href-chip>`}return`<a href="${p}"${e?` title="${e}"`:""} target="_blank" rel="noopener noreferrer">${n}</a>`},this.codespan=({text:p})=>`<code class="cue-code-inline">${p}</code>`,this.code=p=>{const e="36px";if("document-list"===p.lang){const t=p.documentRefs;if(!t||0===t.length)return"";const o=`doc_refs_${this.getIndex("doc")}`;return this.context[o]=t,this._handlers?.availableContentCategories&&(this.context.availableContentCategories=this._handlers.availableContentCategories),`<cue-document-list [documentRefs]="context.${o}" [documentdata]="context.documentdata" [handlers]="context.documentlisthandlers" [availableContentCategories]="context.availableContentCategories" (clickedDocument)="context.documentclickedrow($event)" style="margin-bottom: ${e};"></cue-document-list>`}if("entity-list"===p.lang){const t=p.iris;if(!t)return"";const o=`entity_iris_${this.getIndex("entity")}`;return this.context[o]=t,this._handlers?.availableEntityCategories&&(this.context.availableEntityCategories=this._handlers.availableEntityCategories),this._handlers?.availableEntityRelationships&&(this.context.availableEntityRelationships=this._handlers.availableEntityRelationships),`<cue-ent-list-inner [entities]="context.${o}" [entitydata]="context.entitydata" [entityLocations]="context.entitylocations" [handlers]="context.entitylisthandlers" [availableEntityCategories]="context.availableEntityCategories" [availableEntityRelationships]="context.availableEntityRelationships" [mapboxToken]="context.mapboxToken" (rowClicked)="context.entityclickedrow($event)" style="margin-bottom: ${e};"></cue-ent-list-inner>`}if("map"===p.lang){const t=p.mapData;if(!t||!t.layers)return"";const n=this.getIndex("map"),o=`map_layers_${n}`,r=`map_settings_${n}`;return this.context[o]=t.layers,this.context[r]=t.settings,`<cue-card style="height: 300px; display: block; margin-bottom: ${e};" [padded]="false"><cue-map [layers]="context.${o}" [settings]="context.${r}"></cue-map></cue-card>`}return`<div style="margin-bottom: ${e};">${super.code(p)}</div>`}}walkTokens(p){return(0,A.A)(function*(){if("code"===p.type&&"document-list"===p.lang){const e=p.text.split("\n").filter(o=>o.trim().length>0),t=new Map,n=[];for(const o of e){const r=o.trim(),s=r.match(/^(.+)\?page=(\d+)$/);if(s){const i=s[1],a=s[2];t.has(i)||(t.set(i,{id:i,pages:[]}),n.push(i));const l=t.get(i);l.pages||(l.pages=[]),l.pages.push({id:r,page:a,relevance:0})}else t.has(r)||(t.set(r,{id:r}),n.push(r))}p.documentRefs=n.map(o=>t.get(o))}if("code"===p.type&&"entity-list"===p.lang){const e=p.text.split("\n").filter(t=>t.trim().length>0);p.iris=e}if("code"===p.type&&"map"===p.lang){const e=p.text.split("\n").filter(i=>i.trim().length>0),t=e[0]?.trim()||"",n=e.slice(1),o={};n.forEach(i=>{const a=i.split(";"),l=a[0]?.trim(),g=a[1]?.trim(),u=a[2]?.trim();if(!l||!g)return;const h=(0,ye.S)(g);if(!h)return;const f=(0,ye.n)(h);let v={};if(u)try{v=JSON.parse(u)}catch{}o[l]||(o[l]=[]),o[l].push({type:"Feature",properties:v,geometry:f})});const r=[];Object.keys(o).forEach(i=>{const a=new ve.ux(i);a.collection=new nt.o(o[i]),r.push(a)});const s=new ve.yY;s.mapboxToken=t,s.contextMenu.showFlyTo=!1,p.mapData={layers:r,settings:s}}})()}}let rt=(()=>{class c{envInjector=(0,d.WQX)(d.uvJ);fileURL=T.hFB.required();bytes=(0,T.hFB)(void 0);html=(0,d.vPA)("");hookOptions={sanitize:!1,globalParsersBlueprint:{environmentInjector:this.envInjector}};parsers=[{component:{importPromise:()=>Promise.resolve().then(b.bind(b,2245)),importName:"Typography"},selector:"cue-typography"}];onFile=(0,d.QZP)((()=>{var e=this;return(0,A.A)(function*(){const t=e.bytes(),n=t?(new TextDecoder).decode(t):yield(yield fetch(e.fileURL())).text(),o=new ot("m");o.resetContext();const r=yield me.xI.parse(n,{gfm:!0,breaks:!1,renderer:o,async:!0,walkTokens:o.walkTokens.bind(o)});e.html.set(r)})})());static \u0275fac=function(t){return new(t||c)};static \u0275cmp=S.VBU({type:c,selectors:[["cue-md-viewer"]],inputs:{fileURL:[1,"fileURL"],bytes:[1,"bytes"]},decls:2,vars:3,consts:[[1,"page"],[3,"parsers","content","options"]],template:function(t,n){1&t&&(S.j41(0,"div",0),S.nrm(1,"ngx-dynamic-hooks",1),S.k0s()),2&t&&(S.R7$(),S.Y8G("parsers",n.parsers)("content",n.html())("options",n.hookOptions))},dependencies:[tt],styles:[".page[_ngcontent-%COMP%]{overflow-y:auto;height:100%;padding:16px;box-sizing:border-box}[_nghost-%COMP%] cue-typography{display:inline-block}[_nghost-%COMP%] .cue-md-p{margin-bottom:24px;opacity:.9;line-height:1.6;display:block}[_nghost-%COMP%] .cue-md-p:last-child{margin-bottom:0}[_nghost-%COMP%] .cue-md-blockquote{margin-bottom:24px;opacity:.9;border-left:4px solid var(--cue-border-color);padding-left:16px}[_nghost-%COMP%] ul, [_nghost-%COMP%] ol{margin-bottom:24px;padding-left:28px;font-family:var(--cue-font-family);opacity:.9;line-height:1.6}[_nghost-%COMP%] li.cue-md-li{margin-bottom:12px}[_nghost-%COMP%] table{margin-bottom:24px;border-collapse:collapse;width:100%}[_nghost-%COMP%] th, [_nghost-%COMP%] td{padding:8px 12px;border-bottom:1px solid var(--cue-border-color, #eee);text-align:left}[_nghost-%COMP%] th cue-typography{font-weight:var(--cue-font-weight-semibold)}[_nghost-%COMP%] .cue-code-inline{background-color:var(--cue-border-color);padding:0 4px;border-radius:4px;font-family:monospace;font-size:1.1em;font-weight:500;color:var(--cue-main-foreground)}"],changeDetection:0})}return c})()},2306(U,V,b){b.d(V,{AA:()=>S,ux:()=>H,yY:()=>T});var A=b(140),d=b(8402);class T{mapboxToken;contextMenu={showProperties:!0,showFlyTo:!0};toolbar=new S}class S{hidden=!1;position="bottom";margin="20px";displayZoom=!0;displayGeofenceDraw=!1;displayLayerToggle=!0;clearGeofenceAfterDraw=!0}class H{label;id;collection=new A.o;color;visible=!0;cluster=!0;zoomToFit=!0;category;constructor(w,E=(0,d.A)()){this.label=w,this.id=E}}},140(U,V,b){b.d(V,{o:()=>A});class A{type="FeatureCollection";features=[];bbox;id;constructor(T=[]){this.features=T}addFeature(T){this.features.push(T)}removeFeature(T){return this.features.splice(T,1)[0]}getFeatureCount(){return this.features.length}clear(){this.features=[]}}},58(U,V,b){function A(m){let y=0,I=-1,O=-1;for(let R=0;R<m.length;R++)if("("===m[R])y++,1===y&&(I=R+1);else if(")"===m[R]&&(y--,0===y)){O=R;break}return-1!==I&&-1!==O?m.substring(I,O):null}b.d(V,{S:()=>D,n:()=>j});class d{x;y;z;constructor(y,I,O){this.x=y,this.y=I,this.z=O}}class T{points;constructor(y){this.points=y}}class S{lines;constructor(y){this.lines=y}}function D(m){if(m){if((m=m.trim().toUpperCase()).startsWith("POINT"))return function M(m){m=m.trim().toUpperCase();const I=A(m)?.split(" ")??[];return m.includes("POINT Z")?new d(parseFloat(I[0]),parseFloat(I[1]),parseFloat(I[2])):new d(parseFloat(I[0]),parseFloat(I[1]))}(m);if(m.startsWith("LINESTRING"))return function H(m){const y=A(m=m.trim().toUpperCase()),I=[];return y?.split(",").map(O=>O.trim().split(" ").map(R=>parseFloat(R))).map(O=>{I.push(new d(O[0],O[1],O[2]))}),new T(I)}(m);if(m.startsWith("POLYGON"))return function w(m){const y=A(m=m.trim().toUpperCase());if(!y)return new S([]);const I=y.match(/\(([^)]+)\)/g);if(!I)return new S([]);const O=I.map(R=>{const W=A(R);return W?W.split(",").map(Z=>{const $=Z.trim().split(" ");return $.length>=3?new d(parseFloat($[0]),parseFloat($[1]),parseFloat($[2])):new d(parseFloat($[0]),parseFloat($[1]))}):[]});return new S(O)}(m)}}function j(m){if(m instanceof d)return{type:"Point",coordinates:void 0!==m.z?[m.x,m.y,m.z]:[m.x,m.y]};if(m instanceof T)return{type:"LineString",coordinates:m.points.map(y=>void 0!==y.z?[y.x,y.y,y.z]:[y.x,y.y])};if(m instanceof S)return{type:"Polygon",coordinates:m.lines.map(y=>y.map(I=>void 0!==I.z?[I.x,I.y,I.z]:[I.x,I.y]))};throw new Error("Unknown WKT type")}},5332(U,V,b){b.d(V,{k:()=>S});for(var d=[],T=0;T<256;++T)d.push((T+256).toString(16).slice(1));function S(w,E=0){return(d[w[E+0]]+d[w[E+1]]+d[w[E+2]]+d[w[E+3]]+"-"+d[w[E+4]]+d[w[E+5]]+"-"+d[w[E+6]]+d[w[E+7]]+"-"+d[w[E+8]]+d[w[E+9]]+"-"+d[w[E+10]]+d[w[E+11]]+d[w[E+12]]+d[w[E+13]]+d[w[E+14]]+d[w[E+15]]).toLowerCase()}},8402(U,V,b){b.d(V,{A:()=>E});const d={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var T,S=new Uint8Array(16);function H(){if(!T&&!(T=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return T(S)}var M=b(5332);const E=function w(D,j,m){if(d.randomUUID&&!j&&!D)return d.randomUUID();var y=(D=D||{}).random||(D.rng||H)();if(y[6]=15&y[6]|64,y[8]=63&y[8]|128,j){m=m||0;for(var I=0;I<16;++I)j[m+I]=y[I];return j}return(0,M.k)(y)}}}]);
|
package/7193.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[7193],{329(w,g,
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[7193],{329(w,g,u){u.d(g,{CodeViewer:()=>f});var d=u(467),i=u(7705),s=u(5802),l=u(2538),_=u(5547);let f=(()=>{class p{fileURL=i.hFB.required();codeType=(0,i.hFB)("text");bytes=(0,i.hFB)(void 0);content=(0,s.vPA)("");onFile=(0,s.QZP)((()=>{var n=this;return(0,d.A)(function*(){const c=n.bytes(),a=c?(new TextDecoder).decode(c):yield(yield fetch(n.fileURL())).text();if("json"===n.codeType()||"jsonld"===n.codeType())try{return void n.content.set(JSON.parse(a))}catch{}n.content.set(a)})})());static \u0275fac=function(c){return new(c||p)};static \u0275cmp=_.VBU({type:p,selectors:[["cue-code-viewer"]],inputs:{fileURL:[1,"fileURL"],codeType:[1,"codeType"],bytes:[1,"bytes"]},decls:1,vars:3,consts:[[2,"height","100%","width","100%","display","block",3,"type","content","readonly"]],template:function(c,a){1&c&&_.nrm(0,"cue-code-editor",0),2&c&&_.Y8G("type",a.codeType())("content",a.content())("readonly",!0)},dependencies:[l.B],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return p})()},639(w,g,u){u.d(g,{A:()=>l});const d="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i="http://www.w3.org/2001/XMLSchema#",s="http://www.w3.org/2000/10/swap/",l={xsd:{decimal:`${i}decimal`,boolean:`${i}boolean`,double:`${i}double`,integer:`${i}integer`,string:`${i}string`},rdf:{type:`${d}type`,nil:`${d}nil`,first:`${d}first`,rest:`${d}rest`,langString:`${d}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${s}reify#forSome`,forAll:`${s}reify#forAll`},log:{implies:`${s}log#implies`,isImpliedBy:`${s}log#isImpliedBy`}}},6353(w,g,u){u.d(g,{Ay:()=>O,x1:()=>n});var d=u(639);const{rdf:i,xsd:s}=d.A;let l,_=0;const O={namedNode:N,blankNode:v,variable:D,literal:$,defaultGraph:function L(){return l},quad:T,triple:T,fromTerm:h,fromQuad:E};class n{constructor(t){this.id=t}get value(){return this.id}equals(t){return t instanceof n?this.id===t.id:!!t&&this.termType===t.termType&&this.value===t.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class c extends n{get termType(){return"NamedNode"}}class a extends n{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const t=this.id;let r=t.lastIndexOf('"')+1;return r<t.length&&"@"===t[r++]?t.substr(r).toLowerCase():""}get datatype(){return new c(this.datatypeString)}get datatypeString(){const t=this.id,r=t.lastIndexOf('"')+1,o=r<t.length?t[r]:"";return"^"===o?t.substr(r+2):"@"!==o?s.string:i.langString}equals(t){return t instanceof a?this.id===t.id:!!t&&!!t.datatype&&this.termType===t.termType&&this.value===t.value&&this.language===t.language&&this.datatype.value===t.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class A extends n{constructor(t){super(`_:${t}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class P extends n{constructor(t){super(`?${t}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}l=new class j extends n{constructor(){return super(""),l||this}get termType(){return"DefaultGraph"}equals(t){return this===t||!!t&&this.termType===t.termType}};class m extends n{constructor(t,r,o,S){super(""),this._subject=t,this._predicate=r,this._object=o,this._graph=S||l}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(t){return!!t&&this._subject.equals(t.subject)&&this._predicate.equals(t.predicate)&&this._object.equals(t.object)&&this._graph.equals(t.graph)}}function N(e){return new c(e)}function v(e){return new A(e||"n3-"+_++)}function $(e,t){if("string"==typeof t)return new a(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";return""===r&&("boolean"==typeof e?r=s.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?s.integer:s.double:(r=s.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),new a(""===r||r===s.string?`"${e}"`:`"${e}"^^${r}`)}function D(e){return new P(e)}function T(e,t,r,o){return new m(e,t,r,o)}function h(e){if(e instanceof n)return e;switch(e.termType){case"NamedNode":return N(e.value);case"BlankNode":return v(e.value);case"Variable":return D(e.value);case"DefaultGraph":return l;case"Literal":return $(e.value,e.language||e.datatype);case"Quad":return E(e);default:throw new Error(`Unexpected termType: ${e.termType}`)}}function E(e){if(e instanceof m)return e;if("Quad"!==e.termType)throw new Error(`Unexpected termType: ${e.termType}`);return T(h(e.subject),h(e.predicate),h(e.object),h(e.graph))}}}]);
|
package/9396.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9396],{9396(Z,D,s){s.d(D,{CueContextViewer:()=>Q});var g=s(467),d=s(7705),a=s(5802),r=s(2271),h=s(4400),p=s(3656),w=s(2839),x=s(4631),C=s(1625),f=s(6455),y=s(8334),I=s(9352),v=s(7851),b=s(5971),M=s(5448),k=s(2014),t=s(5547);function V(c,u){1&c&&(t.j41(0,"div",1),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&c&&(t.R7$(),t.JRh(t.bMT(2,1,"components.contextViewer.infoNoContext")))}function j(c,u){if(1&c){const e=t.RV6();t.j41(0,"cue-tabs",2)(1,"cue-tab",6),t.nI1(2,"transloco"),t.j41(3,"cue-doc-list",7),t.bIt("clickedDocument",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocumentClicked(i))})("selectionChanged",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocSelectionChanged(i))})("viewMarkdown",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocumentViewMarkdown(i))}),t.k0s()(),t.j41(4,"cue-tab",6),t.nI1(5,"transloco"),t.j41(6,"cue-ent-list-inner",8),t.bIt("rowClicked",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntityRowClicked(i))})("selectionChanged",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntitySelectionChanged(i))})("viewMarkdown",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntityViewMarkdown(i))}),t.k0s()()()}if(2&c){const e=t.XpG();t.R7$(),t.Y8G("label",t.bMT(2,12,"components.contextViewer.tabDocuments")),t.R7$(2),t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())("selectable",e.selectable()),t.R7$(),t.Y8G("label",t.bMT(5,14,"components.contextViewer.tabEntities")),t.R7$(2),t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())("variant",e.variant())("selectable",e.selectable())}}function E(c,u){if(1&c){const e=t.RV6();t.nrm(0,"cue-document-info",9),t.j41(1,"cue-doc-list",10),t.bIt("viewMarkdown",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocumentViewMarkdown(i))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("subject",e.singleDocumentSubject())("handlers",e._docInfoHandlers)("contentCategories",e.singleDocument().categories)("fileLocations",e.singleDocumentFileLocations()),t.R7$(),t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())}}function N(c,u){if(1&c){const e=t.RV6();t.j41(0,"cue-doc-list",7),t.bIt("clickedDocument",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocumentClicked(i))})("selectionChanged",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocSelectionChanged(i))})("viewMarkdown",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocumentViewMarkdown(i))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())("selectable",e.selectable())}}function R(c,u){if(1&c){const e=t.RV6();t.nrm(0,"cue-entity-info",11),t.j41(1,"cue-ent-list-inner",12),t.bIt("viewMarkdown",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntityViewMarkdown(i))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("entity",e.singleEntity())("handlers",e._entityInfoHandlers),t.R7$(),t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())}}function G(c,u){if(1&c){const e=t.RV6();t.j41(0,"cue-ent-list-inner",13),t.bIt("rowClicked",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntityRowClicked(i))})("selectionChanged",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntitySelectionChanged(i))})("viewMarkdown",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntityViewMarkdown(i))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())("variant",e.variant())("selectable",e.selectable())}}function T(c,u){1&c&&(t.j41(0,"div",1),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&c&&(t.R7$(),t.JRh(t.bMT(2,1,"components.contextViewer.infoNoItems")))}function B(c,u){if(1&c){const e=t.RV6();t.j41(0,"div",5)(1,"cue-button",14),t.bIt("click",function(){a.eBV(e);const i=t.XpG();return a.Njj(i.onAddSelectionClicked())}),t.nrm(2,"cue-button-padder"),t.j41(3,"cue-button-label"),t.EFF(4),t.nI1(5,"transloco"),t.k0s(),t.nrm(6,"cue-button-padder"),t.k0s()()}if(2&c){const e=t.XpG();t.R7$(),t.Y8G("loading",e.adding())("disabled",e.adding()),t.R7$(3),t.Lme(" ",t.bMT(5,4,"components.contextViewer.buttonAddSelection")," (",e.selectedIndices().length,") ")}}let L=(()=>{class c{contextId=(0,d.hFB)(void 0);handlers=(0,d.hFB)(void 0);variant=(0,d.hFB)("none");contextDoc=(0,d.hFB)(void 0);documentData=(0,d.hFB)({});entityData=(0,d.hFB)({});selectable=(0,d.hFB)(!0);adding=(0,d.hFB)(!1);itemRowClicked=(0,d.CGW)();viewMarkdown=(0,d.CGW)();addSelection=(0,d.CGW)();loading=(0,r.EW)(()=>!!this.contextId()&&!this.contextDoc());_docItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"document"===e.type));_entityItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"entity"===e.type));hasDocuments=(0,r.EW)(()=>this._docItems().length>0);hasEntities=(0,r.EW)(()=>this._entityItems().length>0);hasBoth=(0,r.EW)(()=>this.hasDocuments()&&this.hasEntities());documentRefs=(0,r.EW)(()=>this._docItems().map(e=>({id:e.id,relevance:e.relevance})));entityIris=(0,r.EW)(()=>this._entityItems().map(e=>e.id));singleDocument=(0,r.EW)(()=>{if(1===this._docItems().length)return this.documentData()[this._docItems()[0].id]});isSingleDocument=(0,r.EW)(()=>this.hasDocuments()&&!this.hasEntities()&&!!this.singleDocument());singleDocumentSubject=(0,r.EW)(()=>this.singleDocument()?.subject||this.singleDocument()?.path||"");singleDocumentFileLocations=(0,r.EW)(()=>{const e=this.singleDocument();return e?[{iri:e.id,path:e.path,providerId:e.providerId}]:[]});_docInfoHandlers={};singleEntity=(0,r.EW)(()=>{if(1!==this._entityItems().length)return;const e=this._entityItems()[0].id,n=this.entityData()[e];return n?{iri:e,value:n.value,categories:n.categories}:void 0});isSingleEntity=(0,r.EW)(()=>this.hasEntities()&&!this.hasDocuments()&&!!this.singleEntity());_entityInfoHandlers={};_docHandlers=(0,r.EW)(()=>({requestData:e=>this.handlers()?.requestDocumentData?.(e),requestDownload:e=>this.handlers()?.requestDownloadDocument?.(e),requestOpen:(e,n)=>this.handlers()?.requestOpenDocument?.(e,n),requestOpenInDir:(e,n)=>this.handlers()?.requestOpenDocumentInDir?.(e,n)}));_entityHandlers=(0,r.EW)(()=>({requestData:(e,n)=>this.handlers()?.requestEntityData?.(e,n),requestOpen:e=>this.handlers()?.requestOpenEntity?.(e)}));onEntityRowClicked({row:e}){this.itemRowClicked.emit({type:"entity",row:e,index:this._originalIndex(e.entity)})}onDocumentClicked(e){this.itemRowClicked.emit({type:"document",row:e,index:this._originalIndex(e.id)})}_selectedDocIndices=(0,a.vPA)([]);_selectedEntityIndices=(0,a.vPA)([]);selectedIndices=(0,r.EW)(()=>Array.from(new Set([...this._selectedDocIndices(),...this._selectedEntityIndices()])).sort((e,n)=>e-n));onDocSelectionChanged(e){this._selectedDocIndices.set(e.map(n=>this._originalIndex(n.id)).filter(n=>n>=0))}onEntitySelectionChanged(e){this._selectedEntityIndices.set(e.map(n=>this._originalIndex(n.entity)).filter(n=>n>=0))}onAddSelectionClicked(){const e=this.selectedIndices();e.length>0&&this.addSelection.emit(e)}onDocumentViewMarkdown(e){this.viewMarkdown.emit({type:"document",markdown:e})}onEntityViewMarkdown(e){this.viewMarkdown.emit({type:"entity",markdown:e})}_originalIndex(e){return(this.contextDoc()?.items??[]).findIndex(n=>n.id===e)}constructor(){let e;(0,a.QZP)(()=>{const n=this.contextId();n&&this.handlers()?.requestContext?.(n)}),(0,a.QZP)(()=>{const n=this.contextDoc()?.id;n!==e&&(e=n,this._selectedDocIndices.set([]),this._selectedEntityIndices.set([]))})}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=t.VBU({type:c,selectors:[["cue-context-viewer-inner"]],inputs:{contextId:[1,"contextId"],handlers:[1,"handlers"],variant:[1,"variant"],contextDoc:[1,"contextDoc"],documentData:[1,"documentData"],entityData:[1,"entityData"],selectable:[1,"selectable"],adding:[1,"adding"]},outputs:{itemRowClicked:"itemRowClicked",viewMarkdown:"viewMarkdown",addSelection:"addSelection"},decls:10,vars:6,consts:[[2,"position","relative","width","100%",3,"cueLogoLoader","cueLogoLoaderMessage"],[1,"cv-status"],[2,"height","440px"],[3,"documentRefs","documentData","handlers","variant","selectable"],[2,"height","400px",3,"entities","entityData","handlers","variant","selectable"],[1,"cv-add-selection"],[3,"label"],[3,"clickedDocument","selectionChanged","viewMarkdown","documentRefs","documentData","handlers","variant","selectable"],[2,"height","100%",3,"rowClicked","selectionChanged","viewMarkdown","entities","entityData","handlers","variant","selectable"],[3,"subject","handlers","contentCategories","fileLocations"],[2,"display","none",3,"viewMarkdown","documentRefs","documentData","handlers","variant"],[3,"entity","handlers"],[2,"display","none",3,"viewMarkdown","entities","entityData","handlers"],[2,"height","400px",3,"rowClicked","selectionChanged","viewMarkdown","entities","entityData","handlers","variant","selectable"],["variant","primary",3,"click","loading","disabled"]],template:function(n,i){1&n&&(t.j41(0,"div",0),t.nI1(1,"transloco"),t.nVh(2,V,3,3,"div",1)(3,j,7,16,"cue-tabs",2)(4,E,2,8)(5,N,1,5,"cue-doc-list",3)(6,R,2,5)(7,G,1,5,"cue-ent-list-inner",4)(8,T,3,3,"div",1),t.nVh(9,B,7,6,"div",5),t.k0s()),2&n&&(t.Y8G("cueLogoLoader",i.loading())("cueLogoLoaderMessage",t.bMT(1,4,"components.contextViewer.infoLoading")),t.R7$(2),t.vxM(i.contextDoc()?i.hasBoth()?3:i.isSingleDocument()?4:i.hasDocuments()?5:i.isSingleEntity()?6:i.hasEntities()?7:8:2),t.R7$(7),t.vxM(i.selectable()&&i.selectedIndices().length>0?9:-1))},dependencies:[p.g,w.u,x.G,C.U,f.t,y.o,v.k,b.Button,M.ButtonLabel,k.ButtonPadder,I.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%}.cv-status[_ngcontent-%COMP%]{padding:16px;color:var(--cue-color-midgray, #888);font-size:13px}.cv-add-selection[_ngcontent-%COMP%]{position:fixed;right:24px;bottom:24px;z-index:20}"],changeDetection:0})}return c})();var X=s(5381),F=s(2245),S=s(7293),W=s(7727),P=s(3202);function Y(c,u){if(1&c&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2),t.k0s()()),2&c){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function A(c,u){1&c&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),t.EFF(2," No project connected. "),t.k0s()())}function $(c,u){if(1&c){const e=t.RV6();t.nrm(0,"cue-document-viewer-wc",4),t.j41(1,"cue-context-viewer-inner",5),t.bIt("viewMarkdown",function(i){a.eBV(e);const o=t.XpG(2);return a.Njj(o.viewMarkdown.emit(i))}),t.k0s()}if(2&c){const e=t.XpG(2);t.Y8G("cue",e.cue())("projectId",e.projectId())("uuid",u)("showLogo",e.showLogo())("variant",e.variant()),t.R7$(),t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())}}function H(c,u){if(1&c){const e=t.RV6();t.nrm(0,"cue-entity-viewer-wc",6),t.j41(1,"cue-context-viewer-inner",5),t.bIt("viewMarkdown",function(i){a.eBV(e);const o=t.XpG(2);return a.Njj(o.viewMarkdown.emit(i))}),t.k0s()}if(2&c){const e=t.XpG(2);t.Y8G("cue",e.cue())("projectId",e.projectId())("iri",u)("showLogo",e.showLogo())("variant",e.variant()),t.R7$(),t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())}}function O(c,u){if(1&c&&t.nrm(0,"cue-logo-link",8),2&c){const e=t.XpG(3);t.Y8G("projectId",e.projectId())}}function z(c,u){if(1&c){const e=t.RV6();t.j41(0,"cue-context-viewer-inner",7),t.bIt("itemRowClicked",function(i){a.eBV(e);const o=t.XpG(2);return a.Njj(o.itemRowClicked.emit(i))})("addSelection",function(i){a.eBV(e);const o=t.XpG(2);return a.Njj(o.onAddSelection(i))})("viewMarkdown",function(i){a.eBV(e);const o=t.XpG(2);return a.Njj(o.viewMarkdown.emit(i))}),t.k0s(),t.nVh(1,O,1,1,"cue-logo-link",8)}if(2&c){const e=t.XpG(2);t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())("adding",e.adding()),t.R7$(),t.vxM(e.showLogo()?1:-1)}}function U(c,u){if(1&c&&(t.j41(0,"div",1),t.nVh(1,$,2,10)(2,H,2,10)(3,z,2,7),t.k0s()),2&c){let e;const n=t.XpG();t.Y8G("cueLogoLoader","loading"===n.state()),t.R7$(),t.vxM((e=n._singleDocumentUuid())?1:(e=n._singleEntityIri())?2:3,e)}}function K(c){return{id:c.id,contentIRI:c.contentIRI??c.id,path:c.path??"",suffix:c.suffix??"",size:c.size??0,tags:c.tags??[],summary:c.summary??"",categories:c.categories??[],subject:c.subject,providerId:c.providerId,relevance:0}}let Q=(()=>{class c{cue=(0,d.hFB)(void 0);projectId=(0,d.hFB)(void 0);contextId=(0,d.hFB)(void 0);variant=(0,d.hFB)("none");showLogo=(0,d.hFB)(!1,{transform:d.L39});itemRowClicked=(0,d.CGW)();selectionResult=(0,d.CGW)();viewMarkdown=(0,d.CGW)();adding=(0,a.vPA)(!1);state=(0,a.vPA)("idle");errorMessage=(0,a.vPA)(null);contextDoc=(0,a.vPA)(void 0);documentData=(0,a.vPA)({});entityData=(0,a.vPA)({});_documents=(0,a.vPA)(void 0);_entities=(0,a.vPA)(void 0);_unsubDocs;_unsubEntities;_inputWarningTimer;_singleDocumentUuid=(0,r.EW)(()=>{const e=this.contextDoc()?.items??[],n=e.filter(o=>"document"===o.type),i=e.filter(o=>"entity"===o.type);return 1===n.length&&0===i.length?n[0].id:void 0});_singleEntityIri=(0,r.EW)(()=>{const e=this.contextDoc()?.items??[],n=e.filter(l=>"document"===l.type),i=e.filter(l=>"entity"===l.type);if(1!==i.length||0!==n.length)return;const o=i[0].id;return this._entities()?.entityIri(o)??void 0});_handlers=(0,r.EW)(()=>({requestDocumentData:e=>this._documents()?.requestDocumentData(e),requestEntityData:(e,n)=>this._entities()?.requestEntityData(e,n)}));onAddSelection(e){var n=this;return(0,g.A)(function*(){const i=n.cue(),o=n.projectId(),l=n.contextId();if(i&&o&&l&&0!==e.length){n.adding.set(!0);try{const _=yield i.api.mcp.callTool("select",{ctx:l,column:"index",value:e,space_id:o});n.selectionResult.emit(_)}catch(_){console.error('[cue-context-viewer] "select" MCP call failed',_)}finally{n.adding.set(!1)}}})()}constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-context-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.projectId()||console.warn('[cue-context-viewer] Required input "projectId" is not set.'),this.contextId()||console.warn('[cue-context-viewer] Required input "contextId" is not set.')},3e3),(0,a.QZP)(()=>{this._load(this.cue(),this.projectId(),this.contextId())})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_load(e,n,i){var o=this;return(0,g.A)(function*(){if(o._teardown(),o.contextDoc.set(void 0),o.documentData.set({}),o.entityData.set({}),e&&n&&i){o.state.set("loading"),o.errorMessage.set(null);try{const l=yield e.api.contexts.getContext(n,i);o.contextDoc.set(l);const _=new h.f$(e.api,n),m=new h.g8(e.api,n);o._documents.set(_),o._entities.set(m),o._unsubDocs=_.documentInfoMap.subscribe(()=>o._syncDocumentData(_)),o._unsubEntities=m.entityInfoMap.subscribe(()=>o._syncEntityData(m)),o.state.set("ready")}catch(l){console.error("[cue-context-viewer] Failed to load context",l),o.errorMessage.set(l instanceof Error?l.message:"Failed to load context."),o.state.set("error")}}else o.state.set("idle")})()}_syncDocumentData(e){const n=e.documentInfoMap.get(),i={};for(const[o,l]of Object.entries(n))i[o]=K(l);this.documentData.set(i)}_syncEntityData(e){const n=e.entityInfoMap.get(),i={};for(const[o,l]of Object.entries(n))i[o]={value:l.value??o,categories:l.categories??[],mentionCount:l.mentionCount};this.entityData.set(i)}_teardown(){this._unsubDocs?.(),this._unsubEntities?.(),this._unsubDocs=void 0,this._unsubEntities=void 0,this._documents.set(void 0),this._entities.set(void 0)}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=t.VBU({type:c,selectors:[["cue-context-viewer"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],contextId:[1,"contextId"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{itemRowClicked:"itemRowClicked",selectionResult:"selectionResult",viewMarkdown:"viewMarkdown"},decls:3,vars:1,consts:[["direction","column","align","center","justify","center",2,"min-height","200px","width","100%","padding","8px"],[2,"position","relative","width","100%","min-height","200px",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],[2,"height","600px","display","block",3,"cue","projectId","uuid","showLogo","variant"],[2,"display","none",3,"viewMarkdown","contextDoc","documentData","entityData","handlers","variant"],[2,"height","600px","display","block",3,"cue","projectId","iri","showLogo","variant"],[2,"height","100%",3,"itemRowClicked","addSelection","viewMarkdown","contextDoc","documentData","entityData","handlers","variant","adding"],[2,"position","absolute","bottom","12px","right","12px","z-index","5",3,"projectId"]],template:function(n,i){1&n&&t.nVh(0,Y,3,1,"cue-flexcontainer",0)(1,A,3,0,"cue-flexcontainer",0)(2,U,4,2,"div",1),2&n&&t.vxM("error"===i.state()?0:"idle"===i.state()?1:2)},dependencies:[L,X.FlexContainer,F.Typography,v.k,S.x,W.CueDocumentViewer,P.CueEntityViewer],styles:["[_nghost-%COMP%]{display:block;width:100%}"],changeDetection:0})}return c})()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9396],{9396(Z,D,s){s.d(D,{CueContextViewer:()=>Q});var g=s(467),d=s(7705),a=s(5802),r=s(2271),h=s(4400),p=s(3656),x=s(2839),w=s(4631),C=s(1625),f=s(6455),y=s(8334),I=s(9352),v=s(7851),b=s(5971),M=s(5448),k=s(2014),t=s(5547);function V(c,u){1&c&&(t.j41(0,"div",1),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&c&&(t.R7$(),t.JRh(t.bMT(2,1,"components.contextViewer.infoNoContext")))}function j(c,u){if(1&c){const e=t.RV6();t.j41(0,"cue-tabs",2)(1,"cue-tab",6),t.nI1(2,"transloco"),t.j41(3,"cue-doc-list",7),t.bIt("clickedDocument",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocumentClicked(i))})("selectionChanged",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocSelectionChanged(i))})("viewMarkdown",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocumentViewMarkdown(i))}),t.k0s()(),t.j41(4,"cue-tab",6),t.nI1(5,"transloco"),t.j41(6,"cue-ent-list-inner",8),t.bIt("rowClicked",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntityRowClicked(i))})("selectionChanged",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntitySelectionChanged(i))})("viewMarkdown",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntityViewMarkdown(i))}),t.k0s()()()}if(2&c){const e=t.XpG();t.R7$(),t.Y8G("label",t.bMT(2,12,"components.contextViewer.tabDocuments")),t.R7$(2),t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())("selectable",e.selectable()),t.R7$(),t.Y8G("label",t.bMT(5,14,"components.contextViewer.tabEntities")),t.R7$(2),t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())("variant",e.variant())("selectable",e.selectable())}}function E(c,u){if(1&c){const e=t.RV6();t.nrm(0,"cue-document-info",9),t.j41(1,"cue-doc-list",10),t.bIt("viewMarkdown",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocumentViewMarkdown(i))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("subject",e.singleDocumentSubject())("handlers",e._docInfoHandlers)("contentCategories",e.singleDocument().categories)("fileLocations",e.singleDocumentFileLocations()),t.R7$(),t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())}}function N(c,u){if(1&c){const e=t.RV6();t.j41(0,"cue-doc-list",7),t.bIt("clickedDocument",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocumentClicked(i))})("selectionChanged",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocSelectionChanged(i))})("viewMarkdown",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocumentViewMarkdown(i))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())("selectable",e.selectable())}}function R(c,u){if(1&c){const e=t.RV6();t.nrm(0,"cue-entity-info",11),t.j41(1,"cue-ent-list-inner",12),t.bIt("viewMarkdown",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntityViewMarkdown(i))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("entity",e.singleEntity())("handlers",e._entityInfoHandlers),t.R7$(),t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())}}function G(c,u){if(1&c){const e=t.RV6();t.j41(0,"cue-ent-list-inner",13),t.bIt("rowClicked",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntityRowClicked(i))})("selectionChanged",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntitySelectionChanged(i))})("viewMarkdown",function(i){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntityViewMarkdown(i))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())("variant",e.variant())("selectable",e.selectable())}}function T(c,u){1&c&&(t.j41(0,"div",1),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&c&&(t.R7$(),t.JRh(t.bMT(2,1,"components.contextViewer.infoNoItems")))}function B(c,u){if(1&c){const e=t.RV6();t.j41(0,"div",5)(1,"cue-button",14),t.bIt("click",function(){a.eBV(e);const i=t.XpG();return a.Njj(i.onAddSelectionClicked())}),t.nrm(2,"cue-button-padder"),t.j41(3,"cue-button-label"),t.EFF(4),t.nI1(5,"transloco"),t.k0s(),t.nrm(6,"cue-button-padder"),t.k0s()()}if(2&c){const e=t.XpG();t.R7$(),t.Y8G("loading",e.adding())("disabled",e.adding()),t.R7$(3),t.Lme(" ",t.bMT(5,4,"components.contextViewer.buttonAddSelection")," (",e.selectedIndices().length,") ")}}let L=(()=>{class c{contextId=(0,d.hFB)(void 0);handlers=(0,d.hFB)(void 0);variant=(0,d.hFB)("none");contextDoc=(0,d.hFB)(void 0);documentData=(0,d.hFB)({});entityData=(0,d.hFB)({});selectable=(0,d.hFB)(!0);adding=(0,d.hFB)(!1);itemRowClicked=(0,d.CGW)();viewMarkdown=(0,d.CGW)();addSelection=(0,d.CGW)();loading=(0,r.EW)(()=>!!this.contextId()&&!this.contextDoc());_docItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"document"===e.type));_entityItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"entity"===e.type));hasDocuments=(0,r.EW)(()=>this._docItems().length>0);hasEntities=(0,r.EW)(()=>this._entityItems().length>0);hasBoth=(0,r.EW)(()=>this.hasDocuments()&&this.hasEntities());documentRefs=(0,r.EW)(()=>this._docItems().map(e=>({id:e.id,relevance:e.relevance})));entityIris=(0,r.EW)(()=>this._entityItems().map(e=>e.id));singleDocument=(0,r.EW)(()=>{if(1===this._docItems().length)return this.documentData()[this._docItems()[0].id]});isSingleDocument=(0,r.EW)(()=>this.hasDocuments()&&!this.hasEntities()&&!!this.singleDocument());singleDocumentSubject=(0,r.EW)(()=>this.singleDocument()?.subject||this.singleDocument()?.path||"");singleDocumentFileLocations=(0,r.EW)(()=>{const e=this.singleDocument();return e?[{iri:e.id,path:e.path,providerId:e.providerId}]:[]});_docInfoHandlers={};singleEntity=(0,r.EW)(()=>{if(1!==this._entityItems().length)return;const e=this._entityItems()[0].id,n=this.entityData()[e];return n?{iri:e,value:n.value,categories:n.categories}:void 0});isSingleEntity=(0,r.EW)(()=>this.hasEntities()&&!this.hasDocuments()&&!!this.singleEntity());_entityInfoHandlers={};_docHandlers=(0,r.EW)(()=>({requestData:e=>this.handlers()?.requestDocumentData?.(e),requestDownload:e=>this.handlers()?.requestDownloadDocument?.(e),requestOpen:(e,n)=>this.handlers()?.requestOpenDocument?.(e,n),requestOpenInDir:(e,n)=>this.handlers()?.requestOpenDocumentInDir?.(e,n)}));_entityHandlers=(0,r.EW)(()=>({requestData:(e,n)=>this.handlers()?.requestEntityData?.(e,n),requestOpen:e=>this.handlers()?.requestOpenEntity?.(e)}));onEntityRowClicked({row:e}){this.itemRowClicked.emit({type:"entity",row:e,index:this._originalIndex(e.entity)})}onDocumentClicked(e){this.itemRowClicked.emit({type:"document",row:e,index:this._originalIndex(e.id)})}_selectedDocIndices=(0,a.vPA)([]);_selectedEntityIndices=(0,a.vPA)([]);selectedIndices=(0,r.EW)(()=>Array.from(new Set([...this._selectedDocIndices(),...this._selectedEntityIndices()])).sort((e,n)=>e-n));onDocSelectionChanged(e){this._selectedDocIndices.set(e.map(n=>this._originalIndex(n.id)).filter(n=>n>=0))}onEntitySelectionChanged(e){this._selectedEntityIndices.set(e.map(n=>this._originalIndex(n.entity)).filter(n=>n>=0))}onAddSelectionClicked(){const e=this.selectedIndices();e.length>0&&this.addSelection.emit(e)}onDocumentViewMarkdown(e){this.viewMarkdown.emit({type:"document",markdown:e})}onEntityViewMarkdown(e){this.viewMarkdown.emit({type:"entity",markdown:e})}_originalIndex(e){return(this.contextDoc()?.items??[]).findIndex(n=>n.id===e)}constructor(){let e;(0,a.QZP)(()=>{const n=this.contextId();n&&this.handlers()?.requestContext?.(n)}),(0,a.QZP)(()=>{const n=this.contextDoc()?.id;n!==e&&(e=n,this._selectedDocIndices.set([]),this._selectedEntityIndices.set([]))})}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=t.VBU({type:c,selectors:[["cue-context-viewer-inner"]],inputs:{contextId:[1,"contextId"],handlers:[1,"handlers"],variant:[1,"variant"],contextDoc:[1,"contextDoc"],documentData:[1,"documentData"],entityData:[1,"entityData"],selectable:[1,"selectable"],adding:[1,"adding"]},outputs:{itemRowClicked:"itemRowClicked",viewMarkdown:"viewMarkdown",addSelection:"addSelection"},decls:10,vars:6,consts:[[2,"position","relative","width","100%",3,"cueLogoLoader","cueLogoLoaderMessage"],[1,"cv-status"],[2,"height","440px"],[3,"documentRefs","documentData","handlers","variant","selectable"],[2,"height","400px",3,"entities","entityData","handlers","variant","selectable"],[1,"cv-add-selection"],[3,"label"],[3,"clickedDocument","selectionChanged","viewMarkdown","documentRefs","documentData","handlers","variant","selectable"],[2,"height","100%",3,"rowClicked","selectionChanged","viewMarkdown","entities","entityData","handlers","variant","selectable"],[3,"subject","handlers","contentCategories","fileLocations"],[2,"display","none",3,"viewMarkdown","documentRefs","documentData","handlers","variant"],[3,"entity","handlers"],[2,"display","none",3,"viewMarkdown","entities","entityData","handlers"],[2,"height","400px",3,"rowClicked","selectionChanged","viewMarkdown","entities","entityData","handlers","variant","selectable"],["variant","primary",3,"click","loading","disabled"]],template:function(n,i){1&n&&(t.j41(0,"div",0),t.nI1(1,"transloco"),t.nVh(2,V,3,3,"div",1)(3,j,7,16,"cue-tabs",2)(4,E,2,8)(5,N,1,5,"cue-doc-list",3)(6,R,2,5)(7,G,1,5,"cue-ent-list-inner",4)(8,T,3,3,"div",1),t.nVh(9,B,7,6,"div",5),t.k0s()),2&n&&(t.Y8G("cueLogoLoader",i.loading())("cueLogoLoaderMessage",t.bMT(1,4,"components.contextViewer.infoLoading")),t.R7$(2),t.vxM(i.contextDoc()?i.hasBoth()?3:i.isSingleDocument()?4:i.hasDocuments()?5:i.isSingleEntity()?6:i.hasEntities()?7:8:2),t.R7$(7),t.vxM(i.selectable()&&i.selectedIndices().length>0?9:-1))},dependencies:[p.g,x.u,w.G,C.U,f.t,y.o,v.k,b.Button,M.ButtonLabel,k.ButtonPadder,I.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%}.cv-status[_ngcontent-%COMP%]{padding:16px;color:var(--cue-color-midgray, #888);font-size:13px}.cv-add-selection[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;width:100%;box-sizing:border-box;padding:12px 16px 8px}"],changeDetection:0})}return c})();var X=s(5381),F=s(2245),S=s(7293),W=s(7727),P=s(3202);function Y(c,u){if(1&c&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2),t.k0s()()),2&c){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function A(c,u){1&c&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),t.EFF(2," No project connected. "),t.k0s()())}function $(c,u){if(1&c){const e=t.RV6();t.nrm(0,"cue-document-viewer-wc",4),t.j41(1,"cue-context-viewer-inner",5),t.bIt("viewMarkdown",function(i){a.eBV(e);const o=t.XpG(2);return a.Njj(o.viewMarkdown.emit(i))}),t.k0s()}if(2&c){const e=t.XpG(2);t.Y8G("cue",e.cue())("projectId",e.projectId())("uuid",u)("showLogo",e.showLogo())("variant",e.variant()),t.R7$(),t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())}}function H(c,u){if(1&c){const e=t.RV6();t.nrm(0,"cue-entity-viewer-wc",6),t.j41(1,"cue-context-viewer-inner",5),t.bIt("viewMarkdown",function(i){a.eBV(e);const o=t.XpG(2);return a.Njj(o.viewMarkdown.emit(i))}),t.k0s()}if(2&c){const e=t.XpG(2);t.Y8G("cue",e.cue())("projectId",e.projectId())("iri",u)("showLogo",e.showLogo())("variant",e.variant()),t.R7$(),t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())}}function O(c,u){if(1&c&&t.nrm(0,"cue-logo-link",8),2&c){const e=t.XpG(3);t.Y8G("projectId",e.projectId())}}function z(c,u){if(1&c){const e=t.RV6();t.j41(0,"cue-context-viewer-inner",7),t.bIt("itemRowClicked",function(i){a.eBV(e);const o=t.XpG(2);return a.Njj(o.itemRowClicked.emit(i))})("addSelection",function(i){a.eBV(e);const o=t.XpG(2);return a.Njj(o.onAddSelection(i))})("viewMarkdown",function(i){a.eBV(e);const o=t.XpG(2);return a.Njj(o.viewMarkdown.emit(i))}),t.k0s(),t.nVh(1,O,1,1,"cue-logo-link",8)}if(2&c){const e=t.XpG(2);t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())("adding",e.adding()),t.R7$(),t.vxM(e.showLogo()?1:-1)}}function U(c,u){if(1&c&&(t.j41(0,"div",1),t.nVh(1,$,2,10)(2,H,2,10)(3,z,2,7),t.k0s()),2&c){let e;const n=t.XpG();t.Y8G("cueLogoLoader","loading"===n.state()),t.R7$(),t.vxM((e=n._singleDocumentUuid())?1:(e=n._singleEntityIri())?2:3,e)}}function K(c){return{id:c.id,contentIRI:c.contentIRI??c.id,path:c.path??"",suffix:c.suffix??"",size:c.size??0,tags:c.tags??[],summary:c.summary??"",categories:c.categories??[],subject:c.subject,providerId:c.providerId,relevance:0}}let Q=(()=>{class c{cue=(0,d.hFB)(void 0);projectId=(0,d.hFB)(void 0);contextId=(0,d.hFB)(void 0);variant=(0,d.hFB)("none");showLogo=(0,d.hFB)(!1,{transform:d.L39});itemRowClicked=(0,d.CGW)();selectionResult=(0,d.CGW)();viewMarkdown=(0,d.CGW)();adding=(0,a.vPA)(!1);state=(0,a.vPA)("idle");errorMessage=(0,a.vPA)(null);contextDoc=(0,a.vPA)(void 0);documentData=(0,a.vPA)({});entityData=(0,a.vPA)({});_documents=(0,a.vPA)(void 0);_entities=(0,a.vPA)(void 0);_unsubDocs;_unsubEntities;_inputWarningTimer;_singleDocumentUuid=(0,r.EW)(()=>{const e=this.contextDoc()?.items??[],n=e.filter(o=>"document"===o.type),i=e.filter(o=>"entity"===o.type);return 1===n.length&&0===i.length?n[0].id:void 0});_singleEntityIri=(0,r.EW)(()=>{const e=this.contextDoc()?.items??[],n=e.filter(l=>"document"===l.type),i=e.filter(l=>"entity"===l.type);if(1!==i.length||0!==n.length)return;const o=i[0].id;return this._entities()?.entityIri(o)??void 0});_handlers=(0,r.EW)(()=>({requestDocumentData:e=>this._documents()?.requestDocumentData(e),requestEntityData:(e,n)=>this._entities()?.requestEntityData(e,n)}));onAddSelection(e){var n=this;return(0,g.A)(function*(){const i=n.cue(),o=n.projectId(),l=n.contextId();if(i&&o&&l&&0!==e.length){n.adding.set(!0);try{const _=yield i.api.mcp.callTool("select",{ctx:l,column:"index",value:e,space_id:o});n.selectionResult.emit(_)}catch(_){console.error('[cue-context-viewer] "select" MCP call failed',_)}finally{n.adding.set(!1)}}})()}constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-context-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.projectId()||console.warn('[cue-context-viewer] Required input "projectId" is not set.'),this.contextId()||console.warn('[cue-context-viewer] Required input "contextId" is not set.')},3e3),(0,a.QZP)(()=>{this._load(this.cue(),this.projectId(),this.contextId())})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_load(e,n,i){var o=this;return(0,g.A)(function*(){if(o._teardown(),o.contextDoc.set(void 0),o.documentData.set({}),o.entityData.set({}),e&&n&&i){o.state.set("loading"),o.errorMessage.set(null);try{const l=yield e.api.contexts.getContext(n,i);o.contextDoc.set(l);const _=new h.f$(e.api,n),m=new h.g8(e.api,n);o._documents.set(_),o._entities.set(m),o._unsubDocs=_.documentInfoMap.subscribe(()=>o._syncDocumentData(_)),o._unsubEntities=m.entityInfoMap.subscribe(()=>o._syncEntityData(m)),o.state.set("ready")}catch(l){console.error("[cue-context-viewer] Failed to load context",l),o.errorMessage.set(l instanceof Error?l.message:"Failed to load context."),o.state.set("error")}}else o.state.set("idle")})()}_syncDocumentData(e){const n=e.documentInfoMap.get(),i={};for(const[o,l]of Object.entries(n))i[o]=K(l);this.documentData.set(i)}_syncEntityData(e){const n=e.entityInfoMap.get(),i={};for(const[o,l]of Object.entries(n))i[o]={value:l.value??o,categories:l.categories??[],mentionCount:l.mentionCount};this.entityData.set(i)}_teardown(){this._unsubDocs?.(),this._unsubEntities?.(),this._unsubDocs=void 0,this._unsubEntities=void 0,this._documents.set(void 0),this._entities.set(void 0)}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=t.VBU({type:c,selectors:[["cue-context-viewer"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],contextId:[1,"contextId"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{itemRowClicked:"itemRowClicked",selectionResult:"selectionResult",viewMarkdown:"viewMarkdown"},decls:3,vars:1,consts:[["direction","column","align","center","justify","center",2,"min-height","200px","width","100%","padding","8px"],[2,"position","relative","width","100%","min-height","200px",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],[2,"height","600px","display","block",3,"cue","projectId","uuid","showLogo","variant"],[2,"display","none",3,"viewMarkdown","contextDoc","documentData","entityData","handlers","variant"],[2,"height","600px","display","block",3,"cue","projectId","iri","showLogo","variant"],[2,"height","100%",3,"itemRowClicked","addSelection","viewMarkdown","contextDoc","documentData","entityData","handlers","variant","adding"],[2,"position","absolute","bottom","12px","left","12px","z-index","5",3,"projectId"]],template:function(n,i){1&n&&t.nVh(0,Y,3,1,"cue-flexcontainer",0)(1,A,3,0,"cue-flexcontainer",0)(2,U,4,2,"div",1),2&n&&t.vxM("error"===i.state()?0:"idle"===i.state()?1:2)},dependencies:[L,X.FlexContainer,F.Typography,v.k,S.x,W.CueDocumentViewer,P.CueEntityViewer],styles:["[_nghost-%COMP%]{display:block;width:100%}"],changeDetection:0})}return c})()}}]);
|