@fluid-topics/ft-viewer 2.1.19 → 2.1.21

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.
Files changed (40) hide show
  1. package/build/asset/ft-asset-viewer-context.js +1 -1
  2. package/build/common/model/FtViewerReduxStore.js +4 -0
  3. package/build/common/model/ft-viewer.models.d.ts +6 -1
  4. package/build/common/utils/MetadataValueLocalizer.d.ts +8 -0
  5. package/build/common/utils/MetadataValueLocalizer.js +20 -0
  6. package/build/definitions.d.ts +3 -1
  7. package/build/definitions.js +3 -1
  8. package/build/ft-viewer.light.js +1795 -217
  9. package/build/ft-viewer.min.js +1753 -182
  10. package/build/index.d.ts +1 -0
  11. package/build/index.js +1 -0
  12. package/build/ud/components/ft-ud-viewer-feedback.d.ts +53 -0
  13. package/build/ud/components/ft-ud-viewer-feedback.js +257 -0
  14. package/build/ud/components/ft-ud-viewer-feedback.styles.d.ts +2 -0
  15. package/build/ud/components/ft-ud-viewer-feedback.styles.js +13 -0
  16. package/build/ud/components/ft-ud-viewer-metadata.d.ts +37 -0
  17. package/build/ud/components/ft-ud-viewer-metadata.js +231 -0
  18. package/build/ud/components/ft-ud-viewer-metadata.properties.d.ts +10 -0
  19. package/build/ud/components/ft-ud-viewer-metadata.properties.js +1 -0
  20. package/build/ud/components/ft-ud-viewer-metadata.styles.d.ts +2 -0
  21. package/build/ud/components/ft-ud-viewer-metadata.styles.js +24 -0
  22. package/build/ud/components/ft-viewer-feedback.d.ts +4 -0
  23. package/build/ud/components/ft-viewer-feedback.js +6 -0
  24. package/build/ud/components/registration.d.ts +1 -0
  25. package/build/ud/components/registration.js +11 -0
  26. package/build/ud/ft-ud-viewer-context.d.ts +1 -0
  27. package/build/ud/ft-ud-viewer-context.js +18 -2
  28. package/build/ud/ft-ud-viewer.messages.d.ts +1 -0
  29. package/build/ud/ft-ud-viewer.messages.js +1 -0
  30. package/build/ud/index.d.ts +4 -0
  31. package/build/ud/index.js +4 -0
  32. package/build/ud/model/FtUdViewerService.d.ts +10 -3
  33. package/build/ud/model/FtUdViewerService.js +48 -2
  34. package/build/ud/model/FtUdViewerStateManager.d.ts +16 -1
  35. package/build/ud/model/FtUdViewerStateManager.js +79 -5
  36. package/build/ud/model/ft-ud-viewer.models.d.ts +11 -1
  37. package/build/ud/model/ft-ud-viewer.models.js +7 -0
  38. package/build/utils/events.d.ts +14 -0
  39. package/build/utils/events.js +17 -0
  40. package/package.json +10 -8
@@ -1,9 +1,9 @@
1
- "use strict";(()=>{var su=Object.create;var Uo=Object.defineProperty;var au=Object.getOwnPropertyDescriptor;var lu=Object.getOwnPropertyNames;var cu=Object.getPrototypeOf,uu=Object.prototype.hasOwnProperty;var Nt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var du=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of lu(e))!uu.call(t,i)&&i!==r&&Uo(t,i,{get:()=>e[i],enumerable:!(n=au(e,i))||n.enumerable});return t};var f=(t,e,r)=>(r=t!=null?su(cu(t)):{},du(e||!t||!t.__esModule?Uo(r,"default",{value:t,enumerable:!0}):r,t));var A=Nt((Fd,$o)=>{$o.exports=ftGlobals.wcUtils});var N=Nt((Wd,Ho)=>{Ho.exports=ftGlobals.litDecorators});var T=Nt((mp,Fo)=>{Fo.exports=ftGlobals.lit});var eo=Nt((Sv,za)=>{za.exports=ftGlobals.litRepeat});var mo=Nt((rg,Tl)=>{Tl.exports=ftGlobals.litUnsafeHTML});var Do=Nt((Ab,Uc)=>{Uc.exports=ftGlobals.litClassMap});var ou=f(A());var Bo=f(A()),Vo=f(N());var Ie=class extends Event{constructor(e,r,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=n,this.subscribe=i??!1}};var Pt=class{constructor(e,r,n,i){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(o,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=o,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(o,s)),this.unsubscribe=s},this.host=e,r.context!==void 0){let o=r;this.context=o.context,this.callback=o.callback,this.subscribe=o.subscribe??!1}else this.context=r,this.callback=n,this.subscribe=i??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Ie(this.context,this.host,this.t,this.subscribe))}};var Yr=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,r=!1){let n=r||!Object.is(e,this.o);this.o=e,n&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(let[r,{disposer:n}]of this.subscriptions)r(this.o,n)},e!==void 0&&(this.value=e)}addCallback(e,r,n){if(!n)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:r});let{disposer:i}=this.subscriptions.get(e);e(this.value,i)}clearCallbacks(){this.subscriptions.clear()}};var vi=class extends Event{constructor(e,r){super("context-provider",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r}},Mt=class extends Yr{constructor(e,r,n){super(r.context!==void 0?r.initialValue:n),this.onContextRequest=i=>{if(i.context!==this.context)return;let o=i.contextTarget??i.composedPath()[0];o!==this.host&&(i.stopPropagation(),this.addCallback(i.callback,o,i.subscribe))},this.onProviderRequest=i=>{if(i.context!==this.context||(i.contextTarget??i.composedPath()[0])===this.host)return;let o=new Set;for(let[s,{consumerHost:a}]of this.subscriptions)o.has(s)||(o.add(s),a.dispatchEvent(new Ie(this.context,a,s,!0)));i.stopPropagation()},this.host=e,r.context!==void 0?this.context=r.context:this.context=r,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new vi(this.context,this.host))}};var gr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:n}=r;for(let{elementRef:i,callbackRef:o}of n){let s=i.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Ie(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],n=e.callback,i=this.pendingContextRequests.get(e.context);i===void 0&&this.pendingContextRequests.set(e.context,i={callbacks:new WeakMap,requests:[]});let o=i.callbacks.get(r);o===void 0&&i.callbacks.set(r,o=new WeakSet),o.has(n)||(o.add(n),i.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};function yr({context:t}){return(e,r)=>{let n=new WeakMap;if(typeof r=="object")return{get(){return e.get.call(this)},set(i){return n.get(this).setValue(i),e.set.call(this,i)},init(i){return n.set(this,new Mt(this,{context:t,initialValue:i})),i}};{e.constructor.addInitializer((s=>{n.set(s,new Mt(s,{context:t}))}));let i=Object.getOwnPropertyDescriptor(e,r),o;if(i===void 0){let s=new WeakMap;o={get(){return s.get(this)},set(a){n.get(this).setValue(a),s.set(this,a)},configurable:!0,enumerable:!0}}else{let s=i.set;o={...i,set(a){n.get(this).setValue(a),s?.call(this,a)}}}return void Object.defineProperty(e,r,o)}}}function xr({context:t,subscribe:e}){return(r,n)=>{typeof n=="object"?n.addInitializer((function(){new Pt(this,{context:t,callback:i=>{r.set.call(this,i)},subscribe:e})})):r.constructor.addInitializer((i=>{new Pt(i,{context:t,callback:o=>{i[n]=o},subscribe:e})}))}}var pu=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},gi=Symbol("asset-viewer-state-manager"),oe=(0,Bo.applyMixinOnce)(Symbol("toFtAssetViewerComponent"),function(t){class e extends t{willUpdate(n){super.willUpdate(n),n.has("viewerStateManager")&&(this.viewerStateManager?this.addStore(this.viewerStateManager.store,"viewer"):this.removeStore("viewer"))}connectedCallback(){super.connectedCallback(),this.viewerStateManager&&this.addStore(this.viewerStateManager.store,"viewer")}disconnectedCallback(){super.disconnectedCallback(),this.removeStore("viewer")}}return pu([xr({context:gi,subscribe:!0}),(0,Vo.state)()],e.prototype,"viewerStateManager",void 0),e});var ja=f(T()),zt=f(A());var Wo=f(A()),fu={setZoom:(t,e)=>{t.contentModifiers.zoom=e.payload},setRotation:(t,e)=>{t.contentModifiers.rotation=e.payload}},Xr=t=>Wo.FtReduxStore.get({name:"ft-viewer-"+t,initialState:{documentId:void 0,unstructuredDocument:void 0,document:void 0,assetId:void 0,origin:void 0,descriptor:void 0,contentModifiers:{zoom:void 0,rotation:0},watermark:void 0},reducers:fu});var zo=f(A()),It=class extends zo.FtStateManager{constructor(e){super(),this.store=e}setZoom(e){this.store.actions.setZoom(e)}setRotation(e){this.store.actions.setRotation(e)}};var Fi=f(N());var Ko=f(N(),1);var yi=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Go(t,e){return(0,Ko.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return br(t);try{return JSON.parse(r)}catch{return br(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ar,...e??{}})}function hu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Zr(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Zr(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let i=s=>Object.keys(s).filter(a=>s[a]!=null),o=i(t);if(r=o.length,r!==i(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[n]))return!1;for(n=r;n--!==0;){let s=o[n];if(!Zr(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Zr(t,e){try{return hu(t,e)}catch{return!1}}function Ar(t,e){return!Zr(t,e)}function br(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Jr(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let i=e(n);return i[t]=!0,i}}var qo=f(N(),1);var xi=t=>{let e=t??{};return(r,n)=>{var i;let o={hasChanged:Ar,attribute:!1,...e};(0,qo.property)(o)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:(a=>a[n]),store:e.store})}};var Qr=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var ut=f(N(),1);var en=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(a){i(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Xo=f(T(),1);var tn=globalThis,mu=tn.ShadowRoot&&(tn.ShadyCSS===void 0||tn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Yo=(t,e)=>{if(mu)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),i=tn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}};var rn=class extends Xo.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Yo(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){yi(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Zo(t,e,...r){var n;let i=t.querySelector(e);for(let o of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(o);return i}var kt=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},ts,Jo=Symbol("constructorPrototype"),Qo=Symbol("constructorName"),rs=Symbol("exportpartsDebouncer"),es=Symbol("dynamicDependenciesLoaded"),Dt=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Dt.eventName="exportparts-updated";var Oe=class extends rn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ts]=new en(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[rs].run(()=>{var i,o;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Qo]=this.constructor.name,this[Jo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Qo]&&Object.setPrototypeOf(this,this[Jo])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[es]||(r[es]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Dt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Dt.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Dt)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let o=[...i??[],n];r=Zo(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,n,i,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let h=(o=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],v=[...h,...m].filter(l).map(x=>x.trim());for(let x of v)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(h=>`${p}:${h}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};ts=rs;kt([(0,ut.property)()],Oe.prototype,"exportpartsPrefix",void 0);kt([Go([])],Oe.prototype,"exportpartsPrefixes",void 0);kt([(0,ut.property)({reflect:!0})],Oe.prototype,"exportparts",void 0);kt([(0,ut.property)()],Oe.prototype,"customStylesheet",void 0);kt([(0,ut.property)()],Oe.prototype,"elementToFocus",void 0);kt([(0,ut.state)()],Oe.prototype,"useAdoptedStyleSheets",void 0);function nn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Er=Symbol("internalReduxEventsUnsubscribers"),Ge=Symbol("internalStoresUnsubscribers"),dt=Symbol("internalStores"),vu=Jr(Symbol("withRedux"),function(t){var e,r,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[dt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[dt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[dt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[dt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[dt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[dt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[Ge].has(s.store):this[Ge].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[Ge].set(s,a.subscribe(()=>this.updateFromStores())),this[Er].set(s,[]),nn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[Er].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ge].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[Ge].has(s)&&this[Ge].get(s)(),this[Ge].delete(s),(a=this[Er].get(s))===null||a===void 0||a.forEach(l=>l()),this[Er].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Ge,r=dt,n=Er,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),ns=class extends vu(Oe){};function se(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,o;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function De(t){return!!t&&!!t[_]}function me(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===wu})(t)||Array.isArray(t)||!!t[us]||!!(!((e=t.constructor)===null||e===void 0)&&e[us])||_i(t)||Ri(t))}function pt(t,e,r){r===void 0&&(r=!1),Ht(t)===0?(r?Object.keys:$t)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,i){return e(i,n,t)}))}function Ht(t){var e=t[_];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:_i(t)?2:Ri(t)?3:0}function Ut(t,e){return Ht(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function gu(t,e){return Ht(t)===2?t.get(e):t[e]}function ds(t,e,r){var n=Ht(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function ps(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function _i(t){return Eu&&t instanceof Map}function Ri(t){return Su&&t instanceof Set}function qe(t){return t.o||t.t}function Li(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ms(t);delete e[_];for(var r=$t(e),n=0;n<r.length;n++){var i=r[n],o=e[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Ni(t,e){return e===void 0&&(e=!1),Pi(t)||De(t)||!me(t)||(Ht(t)>1&&(t.set=t.add=t.clear=t.delete=yu),Object.freeze(t),e&&pt(t,(function(r,n){return Ni(n,!0)}),!0)),t}function yu(){se(2)}function Pi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Te(t){var e=Ti[t];return e||se(18,t),e}function xu(t,e){Ti[t]||(Ti[t]=e)}function wi(){return wr}function bi(t,e){e&&(Te("Patches"),t.u=[],t.s=[],t.v=e)}function on(t){Ci(t),t.p.forEach(bu),t.p=null}function Ci(t){t===wr&&(wr=t.l)}function is(t){return wr={p:[],l:wr,h:t,m:!0,_:0}}function bu(t){var e=t[_];e.i===0||e.i===1?e.j():e.g=!0}function Ai(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||Te("ES5").S(e,t,n),n?(r[_].P&&(on(e),se(4)),me(t)&&(t=sn(e,t),e.l||an(e,t)),e.u&&Te("Patches").M(r[_].t,t,e.u,e.s)):t=sn(e,r,[]),on(e),e.u&&e.v(e.u,e.s),t!==hs?t:void 0}function sn(t,e,r){if(Pi(e))return e;var n=e[_];if(!n)return pt(e,(function(a,l){return os(t,n,e,a,l,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return an(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Li(n.k):n.o,o=i,s=!1;n.i===3&&(o=new Set(i),i.clear(),s=!0),pt(o,(function(a,l){return os(t,n,i,a,l,r,s)})),an(t,i,!1),r&&t.u&&Te("Patches").N(n,r,t.u,t.s)}return n.o}function os(t,e,r,n,i,o,s){if(De(i)){var a=sn(t,i,o&&e&&e.i!==3&&!Ut(e.R,n)?o.concat(n):void 0);if(ds(r,n,a),!De(a))return;t.m=!1}else s&&r.add(i);if(me(i)&&!Pi(i)){if(!t.h.D&&t._<1)return;sn(t,i),e&&e.A.l||an(t,i)}}function an(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Ni(e,r)}function Ei(t,e){var r=t[_];return(r?qe(r):t)[e]}function ss(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Ye(t){t.P||(t.P=!0,t.l&&Ye(t.l))}function Si(t){t.o||(t.o=Li(t.t))}function Oi(t,e,r){var n=_i(e)?Te("MapSet").F(e,r):Ri(e)?Te("MapSet").T(e,r):t.O?(function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:wi(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=Cr;s&&(l=[a],c=Sr);var u=Proxy.revocable(l,c),d=u.revoke,p=u.proxy;return a.k=p,a.j=d,p})(e,r):Te("ES5").J(e,r);return(r?r.A:wi()).p.push(n),n}function Au(t){return De(t)||se(22,t),(function e(r){if(!me(r))return r;var n,i=r[_],o=Ht(r);if(i){if(!i.P&&(i.i<4||!Te("ES5").K(i)))return i.t;i.I=!0,n=as(r,o),i.I=!1}else n=as(r,o);return pt(n,(function(s,a){i&&gu(i.t,s)===a||ds(n,s,e(a))})),o===3?new Set(n):n})(t)}function as(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Li(t)}function fs(){function t(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[_];return Cr.get(c,s)},set:function(c){var u=this[_];Cr.set(u,s,c)}},l}function e(s){for(var a=s.length-1;a>=0;a--){var l=s[a][_];if(!l.P)switch(l.i){case 5:n(l)&&Ye(l);break;case 4:r(l)&&Ye(l)}}}function r(s){for(var a=s.t,l=s.k,c=$t(l),u=c.length-1;u>=0;u--){var d=c[u];if(d!==_){var p=a[d];if(p===void 0&&!Ut(a,d))return!0;var h=l[d],m=h&&h[_];if(m?m.t!==p:!ps(h,p))return!0}}var v=!!a[_];return c.length!==$t(a).length+(v?0:1)}function n(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function i(s){s.g&&se(3,JSON.stringify(qe(s)))}var o={};xu("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(d,p){if(d){for(var h=Array(p.length),m=0;m<p.length;m++)Object.defineProperty(h,""+m,t(m,!0));return h}var v=ms(p);delete v[_];for(var x=$t(v),b=0;b<x.length;b++){var E=x[b];v[E]=t(E,d||!!v[E].enumerable)}return Object.create(Object.getPrototypeOf(p),v)})(l,s),u={i:l?5:4,A:a?a.A:wi(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,_,{value:u,writable:!0}),c},S:function(s,a,l){l?De(a)&&a[_].A===s&&e(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var d=u[_];if(d){var p=d.t,h=d.k,m=d.R,v=d.i;if(v===4)pt(h,(function(O){O!==_&&(p[O]!==void 0||Ut(p,O)?m[O]||c(h[O]):(m[O]=!0,Ye(d)))})),pt(p,(function(O){h[O]!==void 0||Ut(h,O)||(m[O]=!1,Ye(d))}));else if(v===5){if(n(d)&&(Ye(d),m.length=!0),h.length<p.length)for(var x=h.length;x<p.length;x++)m[x]=!1;else for(var b=p.length;b<h.length;b++)m[b]=!0;for(var E=Math.min(h.length,p.length),C=0;C<E;C++)h.hasOwnProperty(C)||(m[C]=!0),m[C]===void 0&&c(h[C])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var ls,wr,Mi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Eu=typeof Map<"u",Su=typeof Set<"u",cs=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",hs=Mi?Symbol.for("immer-nothing"):((ls={})["immer-nothing"]=!0,ls),us=Mi?Symbol.for("immer-draftable"):"__$immer_draftable",_=Mi?Symbol.for("immer-state"):"__$immer_state";var wu=""+Object.prototype.constructor,$t=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ms=Object.getOwnPropertyDescriptors||function(t){var e={};return $t(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Ti={},Cr={get:function(t,e){if(e===_)return t;var r=qe(t);if(!Ut(r,e))return(function(i,o,s){var a,l=ss(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(i.k):void 0})(t,r,e);var n=r[e];return t.I||!me(n)?n:n===Ei(t.t,e)?(Si(t),t.o[e]=Oi(t.A.h,n,t)):n},has:function(t,e){return e in qe(t)},ownKeys:function(t){return Reflect.ownKeys(qe(t))},set:function(t,e,r){var n=ss(qe(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var i=Ei(qe(t),e),o=i?.[_];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(ps(r,i)&&(r!==void 0||Ut(t.t,e)))return!0;Si(t),Ye(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Ei(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Si(t),Ye(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=qe(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){se(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){se(12)}},Sr={};pt(Cr,(function(t,e){Sr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Sr.deleteProperty=function(t,e){return Sr.set.call(this,t,e,void 0)},Sr.set=function(t,e,r){return Cr.set.call(this,t[0],e,r,t[0])};var Cu=(function(){function t(r){var n=this;this.O=cs,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var l=n;return function(v){var x=this;v===void 0&&(v=a);for(var b=arguments.length,E=Array(b>1?b-1:0),C=1;C<b;C++)E[C-1]=arguments[C];return l.produce(v,(function(O){var k;return(k=o).call.apply(k,[x,O].concat(E))}))}}var c;if(typeof o!="function"&&se(6),s!==void 0&&typeof s!="function"&&se(7),me(i)){var u=is(n),d=Oi(n,i,void 0),p=!0;try{c=o(d),p=!1}finally{p?on(u):Ci(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(v){return bi(u,s),Ai(v,u)}),(function(v){throw on(u),v})):(bi(u,s),Ai(c,u))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===hs&&(c=void 0),n.D&&Ni(c,!0),s){var h=[],m=[];Te("Patches").M(i,c,h,m),s(h,m)}return c}se(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];return n.produceWithPatches(c,(function(h){return i.apply(void 0,[h].concat(d))}))};var s,a,l=n.produce(i,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){me(r)||se(8),De(r)&&(r=Au(r));var n=is(this),i=Oi(this,r,void 0);return i[_].C=!0,Ci(n),i},e.finishDraft=function(r,n){var i=r&&r[_],o=i.A;return bi(o,n),Ai(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!cs&&se(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var s=Te("Patches").$;return De(r)?s(r,n):this.produce(r,(function(a){return s(a,n)}))},t})(),re=new Cu,Ou=re.produce,Vp=re.produceWithPatches.bind(re),Fp=re.setAutoFreeze.bind(re),Wp=re.setUseProxies.bind(re),zp=re.applyPatches.bind(re),Kp=re.createDraft.bind(re),Gp=re.finishDraft.bind(re),ln=Ou;function ft(t){"@babel/helpers - typeof";return ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(t)}function vs(t,e){if(ft(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ft(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gs(t){var e=vs(t,"string");return ft(e)=="symbol"?e:e+""}function ys(t,e,r){return(e=gs(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xs(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ii(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xs(Object(r),!0).forEach(function(n){ys(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xs(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function G(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var bs=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Di=function(){return Math.random().toString(36).substring(7).split("").join(".")},cn={INIT:"@@redux/INIT"+Di(),REPLACE:"@@redux/REPLACE"+Di(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Di()}};function Tu(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function ki(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(G(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(G(1));return r(ki)(t,e)}if(typeof t!="function")throw new Error(G(2));var i=t,o=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(G(3));return o}function d(v){if(typeof v!="function")throw new Error(G(4));if(l)throw new Error(G(5));var x=!0;return c(),a.push(v),function(){if(x){if(l)throw new Error(G(6));x=!1,c();var E=a.indexOf(v);a.splice(E,1),s=null}}}function p(v){if(!Tu(v))throw new Error(G(7));if(typeof v.type>"u")throw new Error(G(8));if(l)throw new Error(G(9));try{l=!0,o=i(o,v)}finally{l=!1}for(var x=s=a,b=0;b<x.length;b++){var E=x[b];E()}return v}function h(v){if(typeof v!="function")throw new Error(G(10));i=v,p({type:cn.REPLACE})}function m(){var v,x=d;return v={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(G(11));function C(){E.next&&E.next(u())}C();var O=x(C);return{unsubscribe:O}}},v[bs]=function(){return this},v}return p({type:cn.INIT}),n={dispatch:p,subscribe:d,getState:u,replaceReducer:h},n[bs]=m,n}function _u(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:cn.INIT});if(typeof n>"u")throw new Error(G(12));if(typeof r(void 0,{type:cn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(G(13))})}function As(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var o=Object.keys(r),s,a;try{_u(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var d;for(var p=!1,h={},m=0;m<o.length;m++){var v=o[m],x=r[v],b=c[v],E=x(b,u);if(typeof E>"u"){var C=u&&u.type;throw new Error(G(14))}h[v]=E,p=p||E!==b}return p=p||o.length!==Object.keys(c).length,p?h:c}}function jt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Es(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),o=function(){throw new Error(G(15))},s={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=e.map(function(l){return l(s)});return o=jt.apply(void 0,a)(i.dispatch),Ii(Ii({},i),{},{dispatch:o})}}}function Ss(t){var e=function(n){var i=n.dispatch,o=n.getState;return function(s){return function(a){return typeof a=="function"?a(i,o,t):s(a)}}};return e}var ws=Ss();ws.withExtraArgument=Ss;var Ui=ws;var Rs=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ru=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Bt=function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},Lu=Object.defineProperty,Nu=Object.defineProperties,Pu=Object.getOwnPropertyDescriptors,Cs=Object.getOwnPropertySymbols,Mu=Object.prototype.hasOwnProperty,Iu=Object.prototype.propertyIsEnumerable,Os=function(t,e,r){return e in t?Lu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Xe=function(t,e){for(var r in e||(e={}))Mu.call(e,r)&&Os(t,r,e[r]);if(Cs)for(var n=0,i=Cs(e);n<i.length;n++){var r=i[n];Iu.call(e,r)&&Os(t,r,e[r])}return t},$i=function(t,e){return Nu(t,Pu(e))},Du=function(t,e,r){return new Promise(function(n,i){var o=function(l){try{a(r.next(l))}catch(c){i(c)}},s=function(l){try{a(r.throw(l))}catch(c){i(c)}},a=function(l){return l.done?n(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(t,e)).next())})};var ku=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?jt:jt.apply(null,arguments)},pf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Uu(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Ze(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var o=e.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return Xe(Xe({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}var $u=(function(t){Rs(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Bt([void 0],r[0].concat(this)))):new(e.bind.apply(e,Bt([void 0],r.concat(this))))},e})(Array),Hu=(function(t){Rs(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Bt([void 0],r[0].concat(this)))):new(e.bind.apply(e,Bt([void 0],r.concat(this))))},e})(Array);function Bi(t){return me(t)?ln(t,function(){}):t}function ju(t){return typeof t=="boolean"}function Bu(){return function(e){return Vu(e)}}function Vu(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,o=t.serializableCheck,s=o===void 0?!0:o,a=t.actionCreatorCheck,l=a===void 0?!0:a,c=new $u;if(r&&(ju(r)?c.push(Ui):c.push(Ui.withExtraArgument(r.extraArgument))),0){if(i)var u;if(s)var d;if(l)var p}return c}var Hi=!0;function Ls(t){var e=Bu(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,o=r.middleware,s=o===void 0?e():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,d=r.enhancers,p=d===void 0?void 0:d,h;if(typeof i=="function")h=i;else if(Uu(i))h=As(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(e),!Hi&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Hi&&m.some(function(O){return typeof O!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Es.apply(void 0,m),x=jt;l&&(x=ku(Xe({trace:!Hi},typeof l=="object"&&l)));var b=new Hu(v),E=b;Array.isArray(p)?E=Bt([v],p):typeof p=="function"&&(E=p(b));var C=x.apply(void 0,E);return ki(h,u,C)}function Ns(t){var e={},r=[],n,i={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[a]=s,i},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase:function(o){return n=o,i}};return t(i),[e,r,n]}function Fu(t){return typeof t=="function"}function Wu(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?Ns(e):[e,r,n],o=i[0],s=i[1],a=i[2],l;if(Fu(t))l=function(){return Bi(t())};else{var c=Bi(t);l=function(){return c}}function u(d,p){d===void 0&&(d=l());var h=Bt([o[p.type]],s.filter(function(m){var v=m.matcher;return v(p)}).map(function(m){var v=m.reducer;return v}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,v){if(v)if(De(m)){var x=m,b=v(x,p);return b===void 0?m:b}else{if(me(m))return ln(m,function(E){return v(E,p)});var b=v(m,p);if(b===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return b}return m},d)}return u.getInitialState=l,u}function zu(t,e){return t+"/"+e}function Ps(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Bi(t.initialState),n=t.reducers||{},i=Object.keys(n),o={},s={},a={};i.forEach(function(u){var d=n[u],p=zu(e,u),h,m;"reducer"in d?(h=d.reducer,m=d.prepare):h=d,o[u]=h,s[p]=h,a[u]=m?Ze(p,m):Ze(p)});function l(){var u=typeof t.extraReducers=="function"?Ns(t.extraReducers):[t.extraReducers],d=u[0],p=d===void 0?{}:d,h=u[1],m=h===void 0?[]:h,v=u[2],x=v===void 0?void 0:v,b=Xe(Xe({},p),s);return Wu(r,function(E){for(var C in b)E.addCase(C,b[C]);for(var O=0,k=m;O<k.length;O++){var M=k[O];E.addMatcher(M.matcher,M.reducer)}x&&E.addDefaultCase(x)})}var c;return{name:e,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var Ku="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Gu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Ku[Math.random()*64|0];return e},qu=["name","message","stack","code"],ji=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Ts=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Yu=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=qu;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},vf=(function(){function t(e,r,n){var i=Ze(e+"/fulfilled",function(u,d,p,h){return{payload:u,meta:$i(Xe({},h||{}),{arg:p,requestId:d,requestStatus:"fulfilled"})}}),o=Ze(e+"/pending",function(u,d,p){return{payload:void 0,meta:$i(Xe({},p||{}),{arg:d,requestId:u,requestStatus:"pending"})}}),s=Ze(e+"/rejected",function(u,d,p,h,m){return{payload:h,error:(n&&n.serializeError||Yu)(u||"Rejected"),meta:$i(Xe({},m||{}),{arg:p,requestId:d,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(d,p,h){var m=n?.idGenerator?n.idGenerator(u):Gu(),v=new l,x,b=!1;function E(O){x=O,v.abort()}var C=(function(){return Du(this,null,function(){var O,k,M,ze,mi,Ke,ee;return Ru(this,function(ie){switch(ie.label){case 0:return ie.trys.push([0,4,,5]),ze=(O=n?.condition)==null?void 0:O.call(n,u,{getState:p,extra:h}),Zu(ze)?[4,ze]:[3,2];case 1:ze=ie.sent(),ie.label=2;case 2:if(ze===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=!0,mi=new Promise(function(te,ct){return v.signal.addEventListener("abort",function(){return ct({name:"AbortError",message:x||"Aborted"})})}),d(o(m,u,(k=n?.getPendingMeta)==null?void 0:k.call(n,{requestId:m,arg:u},{getState:p,extra:h}))),[4,Promise.race([mi,Promise.resolve(r(u,{dispatch:d,getState:p,extra:h,requestId:m,signal:v.signal,abort:E,rejectWithValue:function(te,ct){return new ji(te,ct)},fulfillWithValue:function(te,ct){return new Ts(te,ct)}})).then(function(te){if(te instanceof ji)throw te;return te instanceof Ts?i(te.payload,m,u,te.meta):i(te,m,u)})])];case 3:return M=ie.sent(),[3,5];case 4:return Ke=ie.sent(),M=Ke instanceof ji?s(null,m,u,Ke.payload,Ke.meta):s(Ke,m,u),[3,5];case 5:return ee=n&&!n.dispatchConditionRejection&&s.match(M)&&M.meta.condition,ee||d(M),[2,M]}})})})();return Object.assign(C,{abort:E,requestId:m,arg:u,unwrap:function(){return C.then(Xu)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t})();function Xu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Zu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ms="listener",Is="completed",Ds="cancelled",gf="task-"+Ds,yf="task-"+Is,xf=Ms+"-"+Ds,bf=Ms+"-"+Is;var Vi="listenerMiddleware";var Af=Ze(Vi+"/add"),Ef=Ze(Vi+"/removeAll"),Sf=Ze(Vi+"/remove");var _s,wf=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(_s||(_s=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Ju=function(t){return function(e){setTimeout(e,t)}},Cf=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ju(10);fs();var Qu=Jr(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),un=class extends Qu(Object){};window.ftReduxStores||(window.ftReduxStores={});var ks=class t extends un{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,o=window.ftReduxStores[n];if(nn(o))return o;if(i==null)return;let s=Ps({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=Ls({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=br(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[i.name]=new t(s,a,i.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Qr;let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(i));return this.reduxStore.dispatch(d),d}:u=>{this.setState({[l]:i(u)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var dn=class{static format(e,r,n,i,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,i,!!o)):this.getIntlDateTime(e,r,n,i,!!o)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,i,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:i?`${a} ${l}`:a}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var pn=f(A()),ed="ft-app-info",_e=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};_e.eventName="authentication-change";var Or=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Or.eventName="ui-locale-changed";var td={session:(t,e)=>{(0,pn.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>w.dispatchEvent(new _e(e.payload)),0))}},w=pn.FtReduxStore.get({name:ed,reducers:td,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Us=f(A()),fn=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Qf=(0,Us.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,o;return((o=(i=this.metadataDescriptors.find(a=>a.key===n))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1)?a=>dn.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return fn([(0,Fi.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),fn([(0,Fi.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),fn([xi({store:w.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),fn([xi({store:w.name})],e.prototype,"uiLocale",void 0),e});var $s;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})($s||($s={}));var Hs;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Hs||(Hs={}));var js;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(js||(js={}));var Bs;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Bs||(Bs={}));var Vs;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Vs||(Vs={}));var Fs;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Fs||(Fs={}));var Ws;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Ws||(Ws={}));var zs;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(zs||(zs={}));var Ks;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Ks||(Ks={}));var Gs;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Gs||(Gs={}));var qs;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(qs||(qs={}));var Ys;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ys||(Ys={}));var Xs;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Xs||(Xs={}));var Zs;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Zs||(Zs={}));var Js;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Js||(Js={}));var Qs;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Qs||(Qs={}));var ea;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(ea||(ea={}));var ta;(function(t){t.ASC="ASC",t.DESC="DESC"})(ta||(ta={}));var ra;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(ra||(ra={}));var na;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(na||(na={}));var ia;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(ia||(ia={}));var oa;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(oa||(oa={}));var sa;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(sa||(sa={}));var aa;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(aa||(aa={}));var la;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(la||(la={}));var ca;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ca||(ca={}));var ua;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(ua||(ua={}));var I;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(I||(I={}));var ae;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ae||(ae={}));var da;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(da||(da={}));var pa;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(pa||(pa={}));var fa;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(fa||(fa={}));var ha;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(ha||(ha={}));var ma;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(ma||(ma={}));var va;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(va||(va={}));var ga;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(ga||(ga={}));var ya;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(ya||(ya={}));var xa;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(xa||(xa={}));var ba;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(ba||(ba={}));var Aa;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(Aa||(Aa={}));var hn;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(hn||(hn={}));var rd={[I.PERSONAL_BOOK_SHARE_USER]:[I.PERSONAL_BOOK_USER],[I.HTML_EXPORT_USER]:[I.PERSONAL_BOOK_USER],[I.PDF_EXPORT_USER]:[I.PERSONAL_BOOK_USER],[I.KHUB_ADMIN]:[I.CONTENT_PUBLISHER],[I.ADMIN]:[I.KHUB_ADMIN,I.USERS_ADMIN,I.PORTAL_ADMIN,I.BEHAVIOR_DATA_USER],[I.GENERATIVE_AI_EXPORT_USER]:[I.GENERATIVE_AI_USER]};function Ea(t,e){return t===e||(rd[t]??[]).some(r=>Ea(r,e))}function Sa(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>Ea(n,e))}var xn=f(A());var Wi=f(A());var le=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=w.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let i=w.subscribe(()=>{n=t.get(e),n&&(i(),r(n))})}})}};var Vt=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:le.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):le.await()}};var B=class extends Vt{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Wi.CacheRegistry,this.cache=e?i.commonCache:new Wi.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var mn=class extends B{async listMySearches(){let{session:e}=w.getState();return Sa(e,I.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var vn=class extends B{async listMyBookmarks(){let e=w.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var gn=class extends B{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=w.getState().session;return!!e?.sessionAuthenticated}};var yn=class extends B{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=w.getState().session;return!!e?.sessionAuthenticated}};var nd="ft-user-assets",id={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(ae).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:i}=e.payload;Ki(t,r,[...zi(t,r),i]),wa(t,r,1,n),Ca(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;Ki(t,r,zi(t,r).map(i=>i.id===n.id?n:i)),Ca(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:i}=e.payload;Ki(t,r,zi(t,r).filter(o=>o.id!==i)),wa(t,r,-1,n)}},Oa={[ae.SEARCHES]:"savedSearches",[ae.BOOKMARKS]:"bookmarks",[ae.BOOKS]:void 0,[ae.COLLECTIONS]:void 0},zi=(t,e)=>{var r;let n=Oa[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},Ki=(t,e,r)=>{let n=Oa[e];n&&(t[n]=r)},wa=(t,e,r,n)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===ae.BOOKMARKS&&n)){let o=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,o+r)}},Ca=(t,e)=>{let r=t.assetLabels.map(i=>i.title),n=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...n)},q=xn.FtReduxStore.get({name:nd,reducers:id,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ae).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Gi=class{constructor(e=new gn,r=new yn){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new vn,this.savedSearchesService=new mn,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=w.getState();(0,xn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),q.actions.clearAssetCount(),q.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),q.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),q.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();q.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();q.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&q.getState().assetCounts.allAsset[e]!==r.count&&q.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&q.getState().assetCounts.bookmarkByMap[e]!==r.count&&q.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(q.getState().assetCounts.bookmarkByMap).length!==0;e===ae.BOOKMARKS&&r&&q.actions.clearBookmarkCountByMap(),q.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;q.actions.bookmarks(r)}}},od=new Gi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=od);var qi=class{addCommand(e,r=!1){w.commands.add(e,r)}consumeCommand(e){return w.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new qi;var ce=f(A());var Ta,Ft=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},sd=Symbol("clearAfterUnitTest"),bn=class extends(0,ce.withEventBus)(B){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ta]=()=>{this.defaultMessages={},this.cache=new ce.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=w.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,ce.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var i;let o=e.toLowerCase(),s=this.resolveContext(o);return new ce.ParametrizedLabelResolver((i=this.defaultMessages[o])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(i){!(i instanceof ce.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Ft({loadedContexts:e})),this.dispatchEvent(new Ft({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Ft({loadedContexts:[e]})),this.dispatchEvent(new Ft({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,ce.delay)(0).then(()=>n()).catch(()=>null)))}};Ta=sd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends bn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends bn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Wt=window.FluidTopicsI18nService,An=window.FluidTopicsCustomI18nService;var _a=f(A()),Yi=class{highlightHtml(e,r,n){(0,_a.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new Yi;var Ra=f(A());var Xi=class{isDate(e){var r,n,i,o;return(o=(i=((n=(r=w.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===e))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1}format(e,r){var n,i,o,s;if(e==null)return"";try{return Ra.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Xi;var La=f(A());var Tr=class{static get(e,r){var n,i,o,s;let a=w.getState(),{lang:l,region:c}=(o=(i=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new La.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var Zi=class{urlToSearchRequest(e){return Tr.get().parse(e)}searchRequestToUrl(e){return Tr.get().serialize(e)}};window.FluidTopicsUrlService=new Zi;var ke=f(A());var ht=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};ht.eventName="change";var Ji=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Na=new Ji;var En=class t extends ke.WithEventBus{static build(){return new t(window.history,Na,()=>window.location,!1)}constructor(e,r,n,i){var o,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ke.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ht(this.currentItem())),0)}installProxies(){let e=r=>(n,i,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};n.apply(i,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(ht.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(ht.eventName,e)}currentItem(){return(0,ke.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ke.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,ke.deepCopy)(r.find(n=>e(n)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,ke.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let i=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,n);)this.hasState(o)&&(i=o),o++;return i}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let i=r??this.currentState.majorStateId,o=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return o==null||o!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=En.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var Pa=f(T());var Ma=Pa.css`
2
- `;var ka=f(T()),Y=f(N()),vt=f(A());var mt=f(A());function Ia(t,e){let{authenticationRequired:r,session:n}=w.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var Sn=class extends Vt{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Qi=class t extends mt.FtStateManager{static build(e){return new t(w,e)}constructor(e,r){super(),this.store=e,this.cache=new mt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Sn,this.cleanSessionDebouncer=new mt.Debouncer,this.reloadDebouncer=new mt.Debouncer(500),this.apiProvider=r??(()=>le.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(_e.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>Ia(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Or(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},Da=Qi.build();var V=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},R=class extends vt.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Da,this.contextRoot=new gr}render(){return ka.html`
1
+ "use strict";(()=>{var Yf=Object.create;var ul=Object.defineProperty;var Xf=Object.getOwnPropertyDescriptor;var Jf=Object.getOwnPropertyNames;var Qf=Object.getPrototypeOf,th=Object.prototype.hasOwnProperty;var ci=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var eh=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Jf(t))!th.call(e,n)&&n!==r&&ul(e,n,{get:()=>t[n],enumerable:!(i=Xf(t,n))||i.enumerable});return e};var u=(e,t,r)=>(r=e!=null?Yf(Qf(e)):{},eh(t||!e||!e.__esModule?ul(r,"default",{value:e,enumerable:!0}):r,e));var g=ci(($m,dl)=>{dl.exports=ftGlobals.wcUtils});var $=ci((Nm,pl)=>{pl.exports=ftGlobals.litDecorators});var A=ci((lg,gl)=>{gl.exports=ftGlobals.lit});var Ci=ci((hx,mu)=>{mu.exports=ftGlobals.litRepeat});var Da=ci((Gx,Yu)=>{Yu.exports=ftGlobals.litUnsafeHTML});var oe=ci((mA,np)=>{np.exports=ftGlobals.litClassMap});var Zf=u(g());var hl=u(g()),ml=u($());var Ze=class extends Event{constructor(t,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var ui=class{constructor(t,r,i,n){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(o,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=o,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(o,s)),this.unsubscribe=s},this.host=t,r.context!==void 0){let o=r;this.context=o.context,this.callback=o.callback,this.subscribe=o.subscribe??!1}else this.context=r,this.callback=i,this.subscribe=n??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Ze(this.context,this.host,this.t,this.subscribe))}};var Vn=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,r=!1){let i=r||!Object.is(t,this.o);this.o=t,i&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[r,{disposer:i}]of this.subscriptions)r(this.o,i)},t!==void 0&&(this.value=t)}addCallback(t,r,i){if(!i)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:r});let{disposer:n}=this.subscriptions.get(t);t(this.value,n)}clearCallbacks(){this.subscriptions.clear()}};var Ns=class extends Event{constructor(t,r){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r}},di=class extends Vn{constructor(t,r,i){super(r.context!==void 0?r.initialValue:i),this.onContextRequest=n=>{if(n.context!==this.context)return;let o=n.contextTarget??n.composedPath()[0];o!==this.host&&(n.stopPropagation(),this.addCallback(n.callback,o,n.subscribe))},this.onProviderRequest=n=>{if(n.context!==this.context||(n.contextTarget??n.composedPath()[0])===this.host)return;let o=new Set;for(let[s,{consumerHost:a}]of this.subscriptions)o.has(s)||(o.add(s),a.dispatchEvent(new Ze(this.context,a,s,!0)));n.stopPropagation()},this.host=t,r.context!==void 0?this.context=r.context:this.context=r,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Ns(this.context,this.host))}};var Qi=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:o}of i){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Ze(t.context,s,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],i=t.callback,n=this.pendingContextRequests.get(t.context);n===void 0&&this.pendingContextRequests.set(t.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(r);o===void 0&&n.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};function tn({context:e}){return(t,r)=>{let i=new WeakMap;if(typeof r=="object")return{get(){return t.get.call(this)},set(n){return i.get(this).setValue(n),t.set.call(this,n)},init(n){return i.set(this,new di(this,{context:e,initialValue:n})),n}};{t.constructor.addInitializer((s=>{i.set(s,new di(s,{context:e}))}));let n=Object.getOwnPropertyDescriptor(t,r),o;if(n===void 0){let s=new WeakMap;o={get(){return s.get(this)},set(a){i.get(this).setValue(a),s.set(this,a)},configurable:!0,enumerable:!0}}else{let s=n.set;o={...n,set(a){i.get(this).setValue(a),s?.call(this,a)}}}return void Object.defineProperty(t,r,o)}}}function en({context:e,subscribe:t}){return(r,i)=>{typeof i=="object"?i.addInitializer((function(){new ui(this,{context:e,callback:n=>{r.set.call(this,n)},subscribe:t})})):r.constructor.addInitializer((n=>{new ui(n,{context:e,callback:o=>{n[i]=o},subscribe:t})}))}}var rh=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Us=Symbol("asset-viewer-state-manager"),de=(0,hl.applyMixinOnce)(Symbol("toFtAssetViewerComponent"),function(e){class t extends e{willUpdate(i){super.willUpdate(i),i.has("viewerStateManager")&&(this.viewerStateManager?this.addStore(this.viewerStateManager.store,"viewer"):this.removeStore("viewer"))}connectedCallback(){super.connectedCallback(),this.viewerStateManager&&this.addStore(this.viewerStateManager.store,"viewer")}disconnectedCallback(){super.disconnectedCallback(),this.removeStore("viewer")}}return rh([en({context:Us,subscribe:!0}),(0,ml.state)()],t.prototype,"viewerStateManager",void 0),t});var uu=u(A()),Ei=u(g());var vl=u(g()),ih={setZoom:(e,t)=>{e.contentModifiers.zoom=t.payload},setRotation:(e,t)=>{e.contentModifiers.rotation=t.payload}},Bn=e=>vl.FtReduxStore.get({name:"ft-viewer-"+e,initialState:{documentId:void 0,unstructuredDocument:void 0,document:void 0,assetId:void 0,origin:void 0,descriptor:void 0,contentModifiers:{zoom:void 0,rotation:0},watermark:void 0,configuration:void 0,documentRating:void 0,assetRating:void 0,relatives:void 0},reducers:ih});var yl=u(g()),pi=class extends yl.FtStateManager{constructor(t){super(),this.store=t}setZoom(t){this.store.actions.setZoom(t)}setRotation(t){this.store.actions.setRotation(t)}};var ua=u($());var bl=u($(),1);var Fs=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function xl(e,t){return(0,bl.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return rn(e);try{return JSON.parse(r)}catch{return rn(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:nn,...t??{}})}function nh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!Hn(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Hn(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(e);if(r=o.length,r!==n(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!Hn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Hn(e,t){try{return nh(e,t)}catch{return!1}}function nn(e,t){return!Hn(e,t)}function rn(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function jn(e,t){let r=i=>i[e]===!0;return i=>{if(r(i))return i;let n=t(i);return n[e]=!0,n}}var Sl=u($(),1);var Vs=e=>{let t=e??{};return(r,i)=>{var n;let o={hasChanged:nn,attribute:!1,...t};(0,Sl.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=t.selector)!==null&&n!==void 0?n:(a=>a[i]),store:t.store})}};var zn=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(i=>i.type===t);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Mr=u($(),1);var Wn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let i=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Al=u(A(),1);var Kn=globalThis,oh=Kn.ShadowRoot&&(Kn.ShadyCSS===void 0||Kn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var wl=(e,t)=>{if(oh)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),n=Kn.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,e.appendChild(i)}};var Gn=class extends Al.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return wl(i,t.elementStyles),i}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(t,r){Fs(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function El(e,t,...r){var i;let n=e.querySelector(t);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var hi=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ol,Cl=Symbol("constructorPrototype"),_l=Symbol("constructorName"),Rl=Symbol("exportpartsDebouncer"),Tl=Symbol("dynamicDependenciesLoaded"),fi=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};fi.eventName="exportparts-updated";var Fe=class extends Gn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ol]=new Wn(5),this.scheduleExportpartsUpdate=()=>{var t,r,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Rl].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[_l]=this.constructor.name,this[Cl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[_l]&&Object.setPrototypeOf(this,this[Cl])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Tl]||(r[Tl]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(fi.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(fi.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new fi)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=El(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(t){var r,i,n,o,s,a;let l=f=>f!=null&&f.trim().length>0,c=t.filter(l).map(f=>f.trim());if(c.length===0){this.exportparts=void 0;return}let d=new Set;for(let f of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],v=[...h,...m].filter(l).map(x=>x.trim());for(let x of v)d.add(x)}if(d.size===0){this.exportparts=void 0;return}let p=[...d.values()].flatMap(f=>c.map(h=>`${f}:${h}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};Ol=Rl;hi([(0,Mr.property)()],Fe.prototype,"exportpartsPrefix",void 0);hi([xl([])],Fe.prototype,"exportpartsPrefixes",void 0);hi([(0,Mr.property)({reflect:!0})],Fe.prototype,"exportparts",void 0);hi([(0,Mr.property)()],Fe.prototype,"customStylesheet",void 0);hi([(0,Mr.property)()],Fe.prototype,"elementToFocus",void 0);hi([(0,Mr.state)()],Fe.prototype,"useAdoptedStyleSheets",void 0);function qn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var on=Symbol("internalReduxEventsUnsubscribers"),dr=Symbol("internalStoresUnsubscribers"),$r=Symbol("internalStores"),sh=jn(Symbol("withRedux"),function(e){var t,r,i;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[$r].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[$r].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[$r].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[$r].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[$r].delete(a)}setupStores(){this.unsubscribeFromStores(),this[$r].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[dr].has(s.store):this[dr].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[dr].set(s,a.subscribe(()=>this.updateFromStores())),this[on].set(s,[]),qn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,d)=>{if(typeof this[d]=="function"&&(!c.store||a.name===c.store)){let p=f=>this[d](f);a.addEventListener(c.eventName,p),this[on].get(s).push(()=>a.removeEventListener(c.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[dr].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[dr].has(s)&&this[dr].get(s)(),this[dr].delete(s),(a=this[on].get(s))===null||a===void 0||a.forEach(l=>l()),this[on].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=dr,r=$r,i=on,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Ll=class extends sh(Fe){};function pe(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(0)var n,o;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ye(e){return!!e&&!!e[Z]}function Ee(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===hh})(e)||Array.isArray(e)||!!e[Nl]||!!(!((t=e.constructor)===null||t===void 0)&&t[Nl])||Zs(e)||Ys(e))}function Nr(e,t,r){r===void 0&&(r=!1),vi(e)===0?(r?Object.keys:gi)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,n){return t(n,i,e)}))}function vi(e){var t=e[Z];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Zs(e)?2:Ys(e)?3:0}function mi(e,t){return vi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ah(e,t){return vi(e)===2?e.get(t):e[t]}function Ul(e,t,r){var i=vi(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function Fl(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Zs(e){return ph&&e instanceof Map}function Ys(e){return fh&&e instanceof Set}function pr(e){return e.o||e.t}function Xs(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Hl(e);delete t[Z];for(var r=gi(t),i=0;i<r.length;i++){var n=r[i],o=t[n];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function Js(e,t){return t===void 0&&(t=!1),Qs(e)||Ye(e)||!Ee(e)||(vi(e)>1&&(e.set=e.add=e.clear=e.delete=lh),Object.freeze(e),t&&Nr(e,(function(r,i){return Js(i,!0)}),!0)),e}function lh(){pe(2)}function Qs(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ve(e){var t=qs[e];return t||pe(18,e),t}function ch(e,t){qs[e]||(qs[e]=t)}function Ws(){return an}function Bs(e,t){t&&(Ve("Patches"),e.u=[],e.s=[],e.v=t)}function Zn(e){Ks(e),e.p.forEach(uh),e.p=null}function Ks(e){e===an&&(an=e.l)}function Pl(e){return an={p:[],l:an,h:e,m:!0,_:0}}function uh(e){var t=e[Z];t.i===0||t.i===1?t.j():t.g=!0}function Hs(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||Ve("ES5").S(t,e,i),i?(r[Z].P&&(Zn(t),pe(4)),Ee(e)&&(e=Yn(t,e),t.l||Xn(t,e)),t.u&&Ve("Patches").M(r[Z].t,e,t.u,t.s)):e=Yn(t,r,[]),Zn(t),t.u&&t.v(t.u,t.s),e!==Bl?e:void 0}function Yn(e,t,r){if(Qs(t))return t;var i=t[Z];if(!i)return Nr(t,(function(a,l){return Il(e,i,t,a,l,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return Xn(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=Xs(i.k):i.o,o=n,s=!1;i.i===3&&(o=new Set(n),n.clear(),s=!0),Nr(o,(function(a,l){return Il(e,i,n,a,l,r,s)})),Xn(e,n,!1),r&&e.u&&Ve("Patches").N(i,r,e.u,e.s)}return i.o}function Il(e,t,r,i,n,o,s){if(Ye(n)){var a=Yn(e,n,o&&t&&t.i!==3&&!mi(t.R,i)?o.concat(i):void 0);if(Ul(r,i,a),!Ye(a))return;e.m=!1}else s&&r.add(n);if(Ee(n)&&!Qs(n)){if(!e.h.D&&e._<1)return;Yn(e,n),t&&t.A.l||Xn(e,n)}}function Xn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Js(t,r)}function js(e,t){var r=e[Z];return(r?pr(r):e)[t]}function kl(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function fr(e){e.P||(e.P=!0,e.l&&fr(e.l))}function zs(e){e.o||(e.o=Xs(e.t))}function Gs(e,t,r){var i=Zs(t)?Ve("MapSet").F(t,r):Ys(t)?Ve("MapSet").T(t,r):e.O?(function(n,o){var s=Array.isArray(n),a={i:s?1:0,A:o?o.A:Ws(),P:!1,I:!1,R:{},l:o,t:n,k:null,o:null,j:null,C:!1},l=a,c=ln;s&&(l=[a],c=sn);var d=Proxy.revocable(l,c),p=d.revoke,f=d.proxy;return a.k=f,a.j=p,f})(t,r):Ve("ES5").J(t,r);return(r?r.A:Ws()).p.push(i),i}function dh(e){return Ye(e)||pe(22,e),(function t(r){if(!Ee(r))return r;var i,n=r[Z],o=vi(r);if(n){if(!n.P&&(n.i<4||!Ve("ES5").K(n)))return n.t;n.I=!0,i=Dl(r,o),n.I=!1}else i=Dl(r,o);return Nr(i,(function(s,a){n&&ah(n.t,s)===a||Ul(i,s,t(a))})),o===3?new Set(i):i})(e)}function Dl(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Xs(e)}function Vl(){function e(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[Z];return ln.get(c,s)},set:function(c){var d=this[Z];ln.set(d,s,c)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][Z];if(!l.P)switch(l.i){case 5:i(l)&&fr(l);break;case 4:r(l)&&fr(l)}}}function r(s){for(var a=s.t,l=s.k,c=gi(l),d=c.length-1;d>=0;d--){var p=c[d];if(p!==Z){var f=a[p];if(f===void 0&&!mi(a,p))return!0;var h=l[p],m=h&&h[Z];if(m?m.t!==f:!Fl(h,f))return!0}}var v=!!a[Z];return c.length!==gi(a).length+(v?0:1)}function i(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function n(s){s.g&&pe(3,JSON.stringify(pr(s)))}var o={};ch("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(p,f){if(p){for(var h=Array(f.length),m=0;m<f.length;m++)Object.defineProperty(h,""+m,e(m,!0));return h}var v=Hl(f);delete v[Z];for(var x=gi(v),S=0;S<x.length;S++){var E=x[S];v[E]=e(E,p||!!v[E].enumerable)}return Object.create(Object.getPrototypeOf(f),v)})(l,s),d={i:l?5:4,A:a?a.A:Ws(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,Z,{value:d,writable:!0}),c},S:function(s,a,l){l?Ye(a)&&a[Z].A===s&&t(s.p):(s.u&&(function c(d){if(d&&typeof d=="object"){var p=d[Z];if(p){var f=p.t,h=p.k,m=p.R,v=p.i;if(v===4)Nr(h,(function(P){P!==Z&&(f[P]!==void 0||mi(f,P)?m[P]||c(h[P]):(m[P]=!0,fr(p)))})),Nr(f,(function(P){h[P]!==void 0||mi(h,P)||(m[P]=!1,fr(p))}));else if(v===5){if(i(p)&&(fr(p),m.length=!0),h.length<f.length)for(var x=h.length;x<f.length;x++)m[x]=!1;else for(var S=f.length;S<h.length;S++)m[S]=!0;for(var E=Math.min(h.length,f.length),R=0;R<E;R++)h.hasOwnProperty(R)||(m[R]=!0),m[R]===void 0&&c(h[R])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var Ml,an,ta=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ph=typeof Map<"u",fh=typeof Set<"u",$l=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Bl=ta?Symbol.for("immer-nothing"):((Ml={})["immer-nothing"]=!0,Ml),Nl=ta?Symbol.for("immer-draftable"):"__$immer_draftable",Z=ta?Symbol.for("immer-state"):"__$immer_state";var hh=""+Object.prototype.constructor,gi=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Hl=Object.getOwnPropertyDescriptors||function(e){var t={};return gi(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},qs={},ln={get:function(e,t){if(t===Z)return e;var r=pr(e);if(!mi(r,t))return(function(n,o,s){var a,l=kl(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(n.k):void 0})(e,r,t);var i=r[t];return e.I||!Ee(i)?i:i===js(e.t,t)?(zs(e),e.o[t]=Gs(e.A.h,i,e)):i},has:function(e,t){return t in pr(e)},ownKeys:function(e){return Reflect.ownKeys(pr(e))},set:function(e,t,r){var i=kl(pr(e),t);if(i?.set)return i.set.call(e.k,r),!0;if(!e.P){var n=js(pr(e),t),o=n?.[Z];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Fl(r,n)&&(r!==void 0||mi(e.t,t)))return!0;zs(e),fr(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return js(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,zs(e),fr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=pr(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){pe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){pe(12)}},sn={};Nr(ln,(function(e,t){sn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),sn.deleteProperty=function(e,t){return sn.set.call(this,e,t,void 0)},sn.set=function(e,t,r){return ln.set.call(this,e[0],t,r,e[0])};var mh=(function(){function e(r){var i=this;this.O=$l,this.D=!0,this.produce=function(n,o,s){if(typeof n=="function"&&typeof o!="function"){var a=o;o=n;var l=i;return function(v){var x=this;v===void 0&&(v=a);for(var S=arguments.length,E=Array(S>1?S-1:0),R=1;R<S;R++)E[R-1]=arguments[R];return l.produce(v,(function(P){var gt;return(gt=o).call.apply(gt,[x,P].concat(E))}))}}var c;if(typeof o!="function"&&pe(6),s!==void 0&&typeof s!="function"&&pe(7),Ee(n)){var d=Pl(i),p=Gs(i,n,void 0),f=!0;try{c=o(p),f=!1}finally{f?Zn(d):Ks(d)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(v){return Bs(d,s),Hs(v,d)}),(function(v){throw Zn(d),v})):(Bs(d,s),Hs(c,d))}if(!n||typeof n!="object"){if((c=o(n))===void 0&&(c=n),c===Bl&&(c=void 0),i.D&&Js(c,!0),s){var h=[],m=[];Ve("Patches").M(n,c,h,m),s(h,m)}return c}pe(21,n)},this.produceWithPatches=function(n,o){if(typeof n=="function")return function(c){for(var d=arguments.length,p=Array(d>1?d-1:0),f=1;f<d;f++)p[f-1]=arguments[f];return i.produceWithPatches(c,(function(h){return n.apply(void 0,[h].concat(p))}))};var s,a,l=i.produce(n,o,(function(c,d){s=c,a=d}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Ee(r)||pe(8),Ye(r)&&(r=dh(r));var i=Pl(this),n=Gs(this,r,void 0);return n[Z].C=!0,Ks(i),n},t.finishDraft=function(r,i){var n=r&&r[Z],o=n.A;return Bs(o,i),Hs(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!$l&&pe(20),this.O=r},t.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var o=i[n];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}n>-1&&(i=i.slice(n+1));var s=Ve("Patches").$;return Ye(r)?s(r,i):this.produce(r,(function(a){return s(a,i)}))},e})(),re=new mh,gh=re.produce,Mg=re.produceWithPatches.bind(re),$g=re.setAutoFreeze.bind(re),Ng=re.setUseProxies.bind(re),Ug=re.applyPatches.bind(re),Fg=re.createDraft.bind(re),Vg=re.finishDraft.bind(re),Jn=gh;function Ur(e){"@babel/helpers - typeof";return Ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ur(e)}function jl(e,t){if(Ur(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(Ur(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zl(e){var t=jl(e,"string");return Ur(t)=="symbol"?t:t+""}function Wl(e,t,r){return(t=zl(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function ea(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kl(Object(r),!0).forEach(function(i){Wl(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kl(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Pt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Gl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),ra=function(){return Math.random().toString(36).substring(7).split("").join(".")},Qn={INIT:"@@redux/INIT"+ra(),REPLACE:"@@redux/REPLACE"+ra(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ra()}};function vh(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ia(e,t,r){var i;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Pt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Pt(1));return r(ia)(e,t)}if(typeof e!="function")throw new Error(Pt(2));var n=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function d(){if(l)throw new Error(Pt(3));return o}function p(v){if(typeof v!="function")throw new Error(Pt(4));if(l)throw new Error(Pt(5));var x=!0;return c(),a.push(v),function(){if(x){if(l)throw new Error(Pt(6));x=!1,c();var E=a.indexOf(v);a.splice(E,1),s=null}}}function f(v){if(!vh(v))throw new Error(Pt(7));if(typeof v.type>"u")throw new Error(Pt(8));if(l)throw new Error(Pt(9));try{l=!0,o=n(o,v)}finally{l=!1}for(var x=s=a,S=0;S<x.length;S++){var E=x[S];E()}return v}function h(v){if(typeof v!="function")throw new Error(Pt(10));n=v,f({type:Qn.REPLACE})}function m(){var v,x=p;return v={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(Pt(11));function R(){E.next&&E.next(d())}R();var P=x(R);return{unsubscribe:P}}},v[Gl]=function(){return this},v}return f({type:Qn.INIT}),i={dispatch:f,subscribe:p,getState:d,replaceReducer:h},i[Gl]=m,i}function yh(e){Object.keys(e).forEach(function(t){var r=e[t],i=r(void 0,{type:Qn.INIT});if(typeof i>"u")throw new Error(Pt(12));if(typeof r(void 0,{type:Qn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Pt(13))})}function ql(e){for(var t=Object.keys(e),r={},i=0;i<t.length;i++){var n=t[i];typeof e[n]=="function"&&(r[n]=e[n])}var o=Object.keys(r),s,a;try{yh(r)}catch(l){a=l}return function(c,d){if(c===void 0&&(c={}),a)throw a;if(0)var p;for(var f=!1,h={},m=0;m<o.length;m++){var v=o[m],x=r[v],S=c[v],E=x(S,d);if(typeof E>"u"){var R=d&&d.type;throw new Error(Pt(14))}h[v]=E,f=f||E!==S}return f=f||o.length!==Object.keys(c).length,f?h:c}}function yi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(i){return i}:t.length===1?t[0]:t.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function Zl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),o=function(){throw new Error(Pt(15))},s={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return o=yi.apply(void 0,a)(n.dispatch),ea(ea({},n),{},{dispatch:o})}}}function Yl(e){var t=function(i){var n=i.dispatch,o=i.getState;return function(s){return function(a){return typeof a=="function"?a(n,o,e):s(a)}}};return t}var Xl=Yl();Xl.withExtraArgument=Yl;var na=Xl;var rc=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),bh=function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(d){c=[6,d],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},bi=function(e,t){for(var r=0,i=t.length,n=e.length;r<i;r++,n++)e[n]=t[r];return e},xh=Object.defineProperty,Sh=Object.defineProperties,wh=Object.getOwnPropertyDescriptors,Jl=Object.getOwnPropertySymbols,Ah=Object.prototype.hasOwnProperty,Eh=Object.prototype.propertyIsEnumerable,Ql=function(e,t,r){return t in e?xh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},hr=function(e,t){for(var r in t||(t={}))Ah.call(t,r)&&Ql(e,r,t[r]);if(Jl)for(var i=0,n=Jl(t);i<n.length;i++){var r=n[i];Eh.call(t,r)&&Ql(e,r,t[r])}return e},oa=function(e,t){return Sh(e,wh(t))},Ch=function(e,t,r){return new Promise(function(i,n){var o=function(l){try{a(r.next(l))}catch(c){n(c)}},s=function(l){try{a(r.throw(l))}catch(c){n(c)}},a=function(l){return l.done?i(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(e,t)).next())})};var _h=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?yi:yi.apply(null,arguments)},nv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Th(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function mr(e,t){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(t){var o=t.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return hr(hr({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:i[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(i){return i.type===e},r}var Oh=(function(e){rc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,bi([void 0],r[0].concat(this)))):new(t.bind.apply(t,bi([void 0],r.concat(this))))},t})(Array),Rh=(function(e){rc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,bi([void 0],r[0].concat(this)))):new(t.bind.apply(t,bi([void 0],r.concat(this))))},t})(Array);function la(e){return Ee(e)?Jn(e,function(){}):e}function Lh(e){return typeof e=="boolean"}function Ph(){return function(t){return Ih(t)}}function Ih(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,i=e.immutableCheck,n=i===void 0?!0:i,o=e.serializableCheck,s=o===void 0?!0:o,a=e.actionCreatorCheck,l=a===void 0?!0:a,c=new Oh;if(r&&(Lh(r)?c.push(na):c.push(na.withExtraArgument(r.extraArgument))),0){if(n)var d;if(s)var p;if(l)var f}return c}var sa=!0;function ic(e){var t=Ph(),r=e||{},i=r.reducer,n=i===void 0?void 0:i,o=r.middleware,s=o===void 0?t():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,d=c===void 0?void 0:c,p=r.enhancers,f=p===void 0?void 0:p,h;if(typeof n=="function")h=n;else if(Th(n))h=ql(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(t),!sa&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!sa&&m.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Zl.apply(void 0,m),x=yi;l&&(x=_h(hr({trace:!sa},typeof l=="object"&&l)));var S=new Rh(v),E=S;Array.isArray(f)?E=bi([v],f):typeof f=="function"&&(E=f(S));var R=x.apply(void 0,E);return ia(h,d,R)}function nc(e){var t={},r=[],i,n={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[a]=s,n},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase:function(o){return i=o,n}};return e(n),[t,r,i]}function kh(e){return typeof e=="function"}function Dh(e,t,r,i){r===void 0&&(r=[]);var n=typeof t=="function"?nc(t):[t,r,i],o=n[0],s=n[1],a=n[2],l;if(kh(e))l=function(){return la(e())};else{var c=la(e);l=function(){return c}}function d(p,f){p===void 0&&(p=l());var h=bi([o[f.type]],s.filter(function(m){var v=m.matcher;return v(f)}).map(function(m){var v=m.reducer;return v}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,v){if(v)if(Ye(m)){var x=m,S=v(x,f);return S===void 0?m:S}else{if(Ee(m))return Jn(m,function(E){return v(E,f)});var S=v(m,f);if(S===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return m},p)}return d.getInitialState=l,d}function Mh(e,t){return e+"/"+t}function oc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:la(e.initialState),i=e.reducers||{},n=Object.keys(i),o={},s={},a={};n.forEach(function(d){var p=i[d],f=Mh(t,d),h,m;"reducer"in p?(h=p.reducer,m=p.prepare):h=p,o[d]=h,s[f]=h,a[d]=m?mr(f,m):mr(f)});function l(){var d=typeof e.extraReducers=="function"?nc(e.extraReducers):[e.extraReducers],p=d[0],f=p===void 0?{}:p,h=d[1],m=h===void 0?[]:h,v=d[2],x=v===void 0?void 0:v,S=hr(hr({},f),s);return Dh(r,function(E){for(var R in S)E.addCase(R,S[R]);for(var P=0,gt=m;P<gt.length;P++){var dt=gt[P];E.addMatcher(dt.matcher,dt.reducer)}x&&E.addDefaultCase(x)})}var c;return{name:t,reducer:function(d,p){return c||(c=l()),c(d,p)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var $h="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Nh=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=$h[Math.random()*64|0];return t},Uh=["name","message","stack","code"],aa=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),tc=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Fh=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,i=Uh;r<i.length;r++){var n=i[r];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},lv=(function(){function e(t,r,i){var n=mr(t+"/fulfilled",function(d,p,f,h){return{payload:d,meta:oa(hr({},h||{}),{arg:f,requestId:p,requestStatus:"fulfilled"})}}),o=mr(t+"/pending",function(d,p,f){return{payload:void 0,meta:oa(hr({},f||{}),{arg:p,requestId:d,requestStatus:"pending"})}}),s=mr(t+"/rejected",function(d,p,f,h,m){return{payload:h,error:(i&&i.serializeError||Fh)(d||"Rejected"),meta:oa(hr({},m||{}),{arg:f,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function d(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return d.prototype.abort=function(){},d})();function c(d){return function(p,f,h){var m=i?.idGenerator?i.idGenerator(d):Nh(),v=new l,x,S=!1;function E(P){x=P,v.abort()}var R=(function(){return Ch(this,null,function(){var P,gt,dt,cr,$s,ur,te;return bh(this,function(ue){switch(ue.label){case 0:return ue.trys.push([0,4,,5]),cr=(P=i?.condition)==null?void 0:P.call(i,d,{getState:f,extra:h}),Bh(cr)?[4,cr]:[3,2];case 1:cr=ue.sent(),ue.label=2;case 2:if(cr===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,$s=new Promise(function(ee,Dr){return v.signal.addEventListener("abort",function(){return Dr({name:"AbortError",message:x||"Aborted"})})}),p(o(m,d,(gt=i?.getPendingMeta)==null?void 0:gt.call(i,{requestId:m,arg:d},{getState:f,extra:h}))),[4,Promise.race([$s,Promise.resolve(r(d,{dispatch:p,getState:f,extra:h,requestId:m,signal:v.signal,abort:E,rejectWithValue:function(ee,Dr){return new aa(ee,Dr)},fulfillWithValue:function(ee,Dr){return new tc(ee,Dr)}})).then(function(ee){if(ee instanceof aa)throw ee;return ee instanceof tc?n(ee.payload,m,d,ee.meta):n(ee,m,d)})])];case 3:return dt=ue.sent(),[3,5];case 4:return ur=ue.sent(),dt=ur instanceof aa?s(null,m,d,ur.payload,ur.meta):s(ur,m,d),[3,5];case 5:return te=i&&!i.dispatchConditionRejection&&s.match(dt)&&dt.meta.condition,te||p(dt),[2,dt]}})})})();return Object.assign(R,{abort:E,requestId:m,arg:d,unwrap:function(){return R.then(Vh)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e})();function Vh(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Bh(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var sc="listener",ac="completed",lc="cancelled",cv="task-"+lc,uv="task-"+ac,dv=sc+"-"+lc,pv=sc+"-"+ac;var ca="listenerMiddleware";var fv=mr(ca+"/add"),hv=mr(ca+"/removeAll"),mv=mr(ca+"/remove");var ec,gv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(ec||(ec=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Hh=function(e){return function(t){setTimeout(t,e)}},vv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Hh(10);Vl();var jh=jn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),to=class extends jh(Object){};window.ftReduxStores||(window.ftReduxStores={});var cc=class e extends to{static get(t){var r;let i=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,o=window.ftReduxStores[i];if(qn(o))return o;if(n==null)return;let s=oc({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=ic({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let d=rn(s.getInitialState());for(let p of c.keeping)d[p]=(l??d)[p];return d}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new e(s,a,n.eventBus)}constructor(t,r,i){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new zn;let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...d)=>{let p=c(...d.map(n));return this.reduxStore.dispatch(p),p}:d=>{this.setState({[l]:n(d)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var eo=class{static format(t,r,i,n,o){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(t,r,i,n,!!o)}static getMomentDateFormat(t,r,i){return i?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,i,n,o){let s=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let t=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var ro=u(g()),zh="ft-app-info",Be=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Be.eventName="authentication-change";var Fr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Fr.eventName="ui-locale-changed";var Wh={session:(e,t)=>{(0,ro.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>w.dispatchEvent(new Be(t.payload)),0))}},w=ro.FtReduxStore.get({name:zh,reducers:Wh,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var uc=u(g()),io=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},dc=(0,uc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>eo.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return io([(0,ua.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),io([(0,ua.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),io([Vs({store:w.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),io([Vs({store:w.name})],t.prototype,"uiLocale",void 0),t});var pc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(pc||(pc={}));var fc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(fc||(fc={}));var hc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(hc||(hc={}));var mc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(mc||(mc={}));var gc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(gc||(gc={}));var vc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(vc||(vc={}));var yc;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(yc||(yc={}));var bc;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(bc||(bc={}));var xc;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(xc||(xc={}));var Sc;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Sc||(Sc={}));var wc;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(wc||(wc={}));var Ac;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ac||(Ac={}));var Ec;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Ec||(Ec={}));var Cc;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Cc||(Cc={}));var At;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(At||(At={}));var _c;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(_c||(_c={}));var Tc;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Tc||(Tc={}));var Oc;(function(e){e.ASC="ASC",e.DESC="DESC"})(Oc||(Oc={}));var Rc;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Rc||(Rc={}));var Lc;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Lc||(Lc={}));var Pc;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Pc||(Pc={}));var no;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(no||(no={}));var Ic;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ic||(Ic={}));var kc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(kc||(kc={}));var Dc;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Dc||(Dc={}));var Mc;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Mc||(Mc={}));var $c;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})($c||($c={}));var tt;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(tt||(tt={}));var fe;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(fe||(fe={}));var Nc;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Nc||(Nc={}));var Uc;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Uc||(Uc={}));var Fc;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Fc||(Fc={}));var Vc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Vc||(Vc={}));var Bc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Bc||(Bc={}));var Hc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Hc||(Hc={}));var jc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(jc||(jc={}));var zc;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(zc||(zc={}));var Wc;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Wc||(Wc={}));var Kc;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Kc||(Kc={}));var Gc;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Gc||(Gc={}));var oo;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(oo||(oo={}));var Kh={[tt.PERSONAL_BOOK_SHARE_USER]:[tt.PERSONAL_BOOK_USER],[tt.HTML_EXPORT_USER]:[tt.PERSONAL_BOOK_USER],[tt.PDF_EXPORT_USER]:[tt.PERSONAL_BOOK_USER],[tt.KHUB_ADMIN]:[tt.CONTENT_PUBLISHER],[tt.ADMIN]:[tt.KHUB_ADMIN,tt.USERS_ADMIN,tt.PORTAL_ADMIN,tt.BEHAVIOR_DATA_USER],[tt.GENERATIVE_AI_EXPORT_USER]:[tt.GENERATIVE_AI_USER]};function qc(e,t){return e===t||(Kh[e]??[]).some(r=>qc(r,t))}function cn(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(i=>qc(i,t))}var uo=u(g());var da=u(g());var He=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:i}=w.getState(),n=t??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let i=e.get(t);if(i)r(i);else{let n=w.subscribe(()=>{i=e.get(t),i&&(n(),r(i))})}})}};var xi=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:He.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):He.await()}};var Ct=class extends xi{constructor(t=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new da.CacheRegistry,this.cache=t?n.commonCache:new da.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var so=class extends Ct{async listMySearches(){let{session:t}=w.getState();return cn(t,tt.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var ao=class extends Ct{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var lo=class extends Ct{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var co=class extends Ct{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var Gh="ft-user-assets",qh={setAssetCount:(e,t)=>{let{userAssetType:r,count:i}=t.payload.assetCount;e.assetCounts.allAsset[r]=i},clearAssetCount:e=>{Object.values(fe).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:i,asset:n}=t.payload;fa(e,r,[...pa(e,r),n]),Zc(e,r,1,i),Yc(e,n)},editAsset:(e,t)=>{let{assetType:r,asset:i}=t.payload;fa(e,r,pa(e,r).map(n=>n.id===i.id?i:n)),Yc(e,i)},removeAsset:(e,t)=>{let{assetType:r,mapId:i,assetId:n}=t.payload;fa(e,r,pa(e,r).filter(o=>o.id!==n)),Zc(e,r,-1,i)}},Xc={[fe.SEARCHES]:"savedSearches",[fe.BOOKMARKS]:"bookmarks",[fe.BOOKS]:void 0,[fe.COLLECTIONS]:void 0},pa=(e,t)=>{var r;let i=Xc[t];return i?(r=e[i])!==null&&r!==void 0?r:[]:[]},fa=(e,t,r)=>{let i=Xc[t];i&&(e[i]=r)},Zc=(e,t,r,i)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+r),t===fe.BOOKMARKS&&i)){let o=e.assetCounts.bookmarkByMap[i];e.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Yc=(e,t)=>{let r=e.assetLabels.map(n=>n.title),i=t.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));e.assetLabels.push(...i)},Ut=uo.FtReduxStore.get({name:Gh,reducers:qh,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(fe).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ha=class{constructor(t=new lo,r=new co){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ao,this.savedSearchesService=new so,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=w.getState();(0,uo.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ut.actions.clearAssetCount(),Ut.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ut.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ut.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ut.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ut.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ut.getState().assetCounts.allAsset[t]!==r.count&&Ut.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ut.getState().assetCounts.bookmarkByMap[t]!==r.count&&Ut.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ut.getState().assetCounts.bookmarkByMap).length!==0;t===fe.BOOKMARKS&&r&&Ut.actions.clearBookmarkCountByMap(),Ut.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ut.actions.bookmarks(r)}}},Zh=new ha;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Zh);var ma=class{addCommand(t,r=!1){w.commands.add(t,r)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ma;var he=u(g());var Jc,Si=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Yh=Symbol("clearAfterUnitTest"),po=class extends(0,he.withEventBus)(Ct){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Jc]=()=>{this.defaultMessages={},this.cache=new he.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var i;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...r};(0,he.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,i;return this.fetchContext(t),(i=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,r){let i=t.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(t,r,...i){var n;let o=t.toLowerCase(),s=this.resolveContext(o);return new he.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(t){let r=!this.cache.has(t),i;try{i=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof he.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(t,r){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Si({loadedContexts:t})),this.dispatchEvent(new Si({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Si({loadedContexts:[t]})),this.dispatchEvent(new Si({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(i=>(0,he.delay)(0).then(()=>i()).catch(()=>null)))}};Jc=Yh;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends po{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends po{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var wi=window.FluidTopicsI18nService,fo=window.FluidTopicsCustomI18nService;var Qc=u(g()),ga=class{highlightHtml(t,r,i){(0,Qc.highlightHtml)(t,r,i)}};window.FluidTopicsHighlightHtmlService=new ga;var tu=u(g());var va=class{isDate(t){var r,i,n,o;return(o=(n=((i=(r=w.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(t,r){var i,n,o,s;if(t==null)return"";try{return tu.DateFormatter.format(t,(i=r?.locale)!==null&&i!==void 0?i:w.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new va;var eu=u(g());var un=class{static get(t,r){var i,n,o,s;let a=w.getState(),{lang:l,region:c}=(o=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new eu.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var ya=class{urlToSearchRequest(t){return un.get().parse(t)}searchRequestToUrl(t){return un.get().serialize(t)}};window.FluidTopicsUrlService=new ya;var Xe=u(g());var Vr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Vr.eventName="change";var ba=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},ru=new ba;var ho=class e extends Xe.WithEventBus{static build(){return new e(window.history,ru,()=>window.location,!1)}constructor(t,r,i,n){var o,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(o=t.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let i=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Xe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Vr(this.currentItem())),0)}installProxies(){let t=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let i={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(t){this.addEventListener(Vr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Vr.eventName,t)}currentItem(){return(0,Xe.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Xe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Xe.deepCopy)(r.find(i=>t(i)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Xe.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let i=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!i)return t;let n=t,o=t+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var i;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[t])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ho.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var mo=class{constructor(){this.storeListeners=[]}store(t,r){if(this.isAuthenticated())return;let i=JSON.stringify(r);window.localStorage.setItem(t,i),window.dispatchEvent(new StorageEvent("storage",{key:t,newValue:i,storageArea:window.localStorage}))}get(t){var r,i;if(!this.isAuthenticated())return(i=JSON.parse((r=window.localStorage.getItem(t))!==null&&r!==void 0?r:"null"))!==null&&i!==void 0?i:void 0}addStoreListener(t,r){let i=n=>{n.key===t()&&!this.isAuthenticated()&&r()};this.storeListeners.push(i),window.addEventListener("storage",i)}clearStoreListeners(){this.storeListeners.forEach(t=>window.removeEventListener("storage",t)),this.storeListeners.length=0}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var iu=u(A());var nu=iu.css`
2
+ `;var su=u(A()),zt=u($()),Hr=u(g());var Br=u(g());function ou(e,t){let{authenticationRequired:r,session:i}=w.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(t):e()}var go=class extends xi{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var xa=class e extends Br.FtStateManager{static build(t){return new e(w,t)}constructor(t,r){super(),this.store=t,this.cache=new Br.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new go,this.cleanSessionDebouncer=new Br.Debouncer,this.reloadDebouncer=new Br.Debouncer(500),this.apiProvider=r??(()=>He.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(Be.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>ou(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Fr(i)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Ai=xa.build();var _t=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},et=class extends Hr.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Ai,this.contextRoot=new Qi}render(){return su.html`
3
3
  <slot></slot>
4
- `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Wt.addContext(n)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};R.elementDefinitions={};R.styles=Ma;V([(0,Y.property)()],R.prototype,"baseUrl",void 0);V([(0,Y.property)()],R.prototype,"tenantId",void 0);V([(0,Y.property)()],R.prototype,"apiIntegrationIdentifier",void 0);V([(0,Y.property)()],R.prototype,"apiIntegrationAppVersion",void 0);V([(0,Y.property)()],R.prototype,"uiLocale",void 0);V([(0,vt.jsonProperty)(null)],R.prototype,"availableUiLocales",void 0);V([(0,vt.jsonProperty)(null)],R.prototype,"metadataConfiguration",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"editorMode",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"noCustom",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"openExternalDocumentInNewTab",void 0);V([(0,Y.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],R.prototype,"noCustomComponent",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"withManualResources",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"navigatorOnline",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"forcedOffline",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"authenticationRequired",void 0);V([(0,vt.jsonProperty)([])],R.prototype,"messageContexts",void 0);V([(0,vt.jsonProperty)(void 0)],R.prototype,"session",void 0);var $a=f(A());var Ua={"ft-app-context":R};(0,$a.customElements)(Ua);var Ha=f(A()),Je;(function(t){t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.UD_ATTACHMENT="UD_ATTACHMENT",t.RESOURCE="RESOURCE"})(Je||(Je={}));var Re;(function(t){t.FIT_TO_CONTAINER="fit-to-container",t.ZOOM_REAL_SIZE="zoom-real-size",t.ZOOM_IN="zoom-in",t.ZOOM_OUT="zoom-out",t.ROTATE_LEFT="rotate-left",t.ROTATE_RIGHT="rotate-right"})(Re||(Re={}));var gt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:(0,Ha.deepCopy)(e),composed:!0,bubbles:!0})}};gt.eventName="ft-viewer-loaded";var wn=class extends B{getAsset(e,r,n){let i={[Je.MAP_ATTACHMENT]:()=>this.api.getMapAttachment(e,r),[Je.UD_ATTACHMENT]:()=>this.api.getUdAttachment(e,r),[Je.RESOURCE]:()=>this.api.getMapResource(e,r)};return this.cache.get(r,i[n])}};var Cn=class t extends It{static build(e){return new t(Xr(e),new wn)}constructor(e,r){super(e),this.store=e,this.service=r}async load(){let{documentId:e,assetId:r,origin:n}=this.store.getState();if(e&&r&&n){let i=await this.service.getAsset(e,r,n);this.store.actions.document(i.holder),this.store.actions.descriptor({id:i.id,portalUrl:i.portalUrl,filename:i.filename,fingerprint:i.fingerprint,displayName:i.displayName,alt:i.displayName,mimeType:i.mimeType,size:i.size,viewableInCurrentBrowser:i.viewableInCurrentBrowser,contentUrl:i.contentUrl}),this.store.actions.watermark(i.watermark)}}clear(){this.store.clearKeeping("documentId","assetId","origin")}reload(){return this.clear(),this.load()}async init(e,r,n){return this.store.actions.documentId(e),this.store.actions.assetId(r),this.store.actions.origin(n),await this.reload(),this.store.getState()}};var On=f(N());var _r=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Ue=class extends zt.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=Cn.build(this.id||(0,zt.randomId)(6))}render(){return ja.html`
4
+ `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>wi.addContext(i)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};et.elementDefinitions={};et.styles=nu;_t([(0,zt.property)()],et.prototype,"baseUrl",void 0);_t([(0,zt.property)()],et.prototype,"tenantId",void 0);_t([(0,zt.property)()],et.prototype,"apiIntegrationIdentifier",void 0);_t([(0,zt.property)()],et.prototype,"apiIntegrationAppVersion",void 0);_t([(0,zt.property)()],et.prototype,"uiLocale",void 0);_t([(0,Hr.jsonProperty)(null)],et.prototype,"availableUiLocales",void 0);_t([(0,Hr.jsonProperty)(null)],et.prototype,"metadataConfiguration",void 0);_t([(0,zt.property)({type:Boolean})],et.prototype,"editorMode",void 0);_t([(0,zt.property)({type:Boolean})],et.prototype,"noCustom",void 0);_t([(0,zt.property)({type:Boolean})],et.prototype,"openExternalDocumentInNewTab",void 0);_t([(0,zt.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],et.prototype,"noCustomComponent",void 0);_t([(0,zt.property)({type:Boolean})],et.prototype,"withManualResources",void 0);_t([(0,zt.property)({type:Boolean})],et.prototype,"navigatorOnline",void 0);_t([(0,zt.property)({type:Boolean})],et.prototype,"forcedOffline",void 0);_t([(0,zt.property)({type:Boolean})],et.prototype,"authenticationRequired",void 0);_t([(0,Hr.jsonProperty)([])],et.prototype,"messageContexts",void 0);_t([(0,Hr.jsonProperty)(void 0)],et.prototype,"session",void 0);var lu=u(g());var au={"ft-app-context":et};(0,lu.customElements)(au);var cu=u(g()),gr;(function(e){e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.MAP_ATTACHMENT="MAP_ATTACHMENT",e.UD_ATTACHMENT="UD_ATTACHMENT",e.RESOURCE="RESOURCE"})(gr||(gr={}));var je;(function(e){e.FIT_TO_CONTAINER="fit-to-container",e.ZOOM_REAL_SIZE="zoom-real-size",e.ZOOM_IN="zoom-in",e.ZOOM_OUT="zoom-out",e.ROTATE_LEFT="rotate-left",e.ROTATE_RIGHT="rotate-right"})(je||(je={}));var jr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:(0,cu.deepCopy)(t),composed:!0,bubbles:!0})}};jr.eventName="ft-viewer-loaded";var vo=class extends Ct{getAsset(t,r,i){let n={[gr.MAP_ATTACHMENT]:()=>this.api.getMapAttachment(t,r),[gr.UD_ATTACHMENT]:()=>this.api.getUdAttachment(t,r),[gr.RESOURCE]:()=>this.api.getMapResource(t,r)};return this.cache.get(r,n[i])}};var yo=class e extends pi{static build(t){return new e(Bn(t),new vo)}constructor(t,r){super(t),this.store=t,this.service=r}async load(){let{documentId:t,assetId:r,origin:i}=this.store.getState();if(t&&r&&i){let n=await this.service.getAsset(t,r,i);this.store.actions.document(n.holder),this.store.actions.descriptor({id:n.id,portalUrl:n.portalUrl,filename:n.filename,fingerprint:n.fingerprint,displayName:n.displayName,alt:n.displayName,mimeType:n.mimeType,size:n.size,viewableInCurrentBrowser:n.viewableInCurrentBrowser,contentUrl:n.contentUrl}),this.store.actions.watermark(n.watermark)}}clear(){this.store.clearKeeping("documentId","assetId","origin")}reload(){return this.clear(),this.load()}async init(t,r,i){return this.store.actions.documentId(t),this.store.actions.assetId(r),this.store.actions.origin(i),await this.reload(),this.store.getState()}};var bo=u($());var dn=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Je=class extends Ei.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=yo.build(this.id||(0,Ei.randomId)(6))}render(){return uu.html`
5
5
  <slot></slot>
6
- `}willUpdate(e){super.willUpdate(e),(e.has("documentId")||e.has("assetId")||e.has("origin"))&&this.initStateManager()}async initStateManager(){let e=await this.viewerStateManager.init(this.documentId,this.assetId,this.origin);this.documentId&&this.assetId&&this.origin&&this.dispatchEvent(new gt(e))}connectedCallback(){super.connectedCallback(),this.addStore(w)}onAuthenticationChange(){this.viewerStateManager.reload()}};_r([(0,On.property)()],Ue.prototype,"documentId",void 0);_r([(0,On.property)()],Ue.prototype,"assetId",void 0);_r([(0,On.property)()],Ue.prototype,"origin",void 0);_r([yr({context:gi})],Ue.prototype,"viewerStateManager",void 0);_r([(0,zt.reduxEventListener)({eventName:_e.eventName})],Ue.prototype,"onAuthenticationChange",null);var Ba=f(A()),X=class extends Ba.FtLitElementRedux{};var ge=f(T()),Et=f(A()),ye=f(N());var Va=f(T()),Fa=f(A()),ad={position:Fa.FtCssVariableFactory.create("--ft-content-watermark-position","Position property of the watermark container","POSITION","sticky")},Wa=Va.css`
6
+ `}willUpdate(t){super.willUpdate(t),(t.has("documentId")||t.has("assetId")||t.has("origin"))&&this.initStateManager()}async initStateManager(){let t=await this.viewerStateManager.init(this.documentId,this.assetId,this.origin);this.documentId&&this.assetId&&this.origin&&this.dispatchEvent(new jr(t))}connectedCallback(){super.connectedCallback(),this.addStore(w)}onAuthenticationChange(){this.viewerStateManager.reload()}};dn([(0,bo.property)()],Je.prototype,"documentId",void 0);dn([(0,bo.property)()],Je.prototype,"assetId",void 0);dn([(0,bo.property)()],Je.prototype,"origin",void 0);dn([tn({context:Us})],Je.prototype,"viewerStateManager",void 0);dn([(0,Ei.reduxEventListener)({eventName:Be.eventName})],Je.prototype,"onAuthenticationChange",null);var du=u(g()),It=class extends du.FtLitElementRedux{};var _e=u(A()),qr=u(g()),Te=u($());var pu=u(A()),fu=u(g()),Xh={position:fu.FtCssVariableFactory.create("--ft-content-watermark-position","Position property of the watermark container","POSITION","sticky")},hu=pu.css`
7
7
  :host {
8
8
  position: absolute;
9
9
  top: 0;
@@ -14,7 +14,7 @@
14
14
  }
15
15
 
16
16
  .ft-watermark-container {
17
- position: ${ad.position};
17
+ position: ${Xh.position};
18
18
  top: 0;
19
19
  text-align: center;
20
20
  }
@@ -22,112 +22,112 @@
22
22
  .ft-watermark {
23
23
  z-index: 79;
24
24
  }
25
- `;var ir=f(T()),At=f(N());var Sl=f(eo()),wl=f(A());var ao=globalThis,Ka=t=>t,Tn=ao.trustedTypes,Ga=Tn?Tn.createPolicy("lit-html",{createHTML:t=>t}):void 0,Qa="$lit$",Qe=`lit$${Math.random().toFixed(9).slice(2)}$`,el="?"+Qe,ld=`<${el}>`,bt=document,_n=()=>bt.createComment(""),Lr=t=>t===null||typeof t!="object"&&typeof t!="function",lo=Array.isArray,cd=t=>lo(t)||typeof t?.[Symbol.iterator]=="function",to=`[
26
- \f\r]`,Rr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,qa=/-->/g,Ya=/>/g,yt=RegExp(`>|${to}(?:([^\\s"'>=/]+)(${to}*=${to}*(?:[^
27
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Xa=/'/g,Za=/"/g,tl=/^(?:script|style|textarea|title)$/i,co=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),rl=co(1),nl=co(2),il=co(3),Nr=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),Ja=new WeakMap,xt=bt.createTreeWalker(bt,129);function ol(t,e){if(!lo(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ga!==void 0?Ga.createHTML(e):e}var ud=(t,e)=>{let r=t.length-1,n=[],i,o=e===2?"<svg>":e===3?"<math>":"",s=Rr;for(let a=0;a<r;a++){let l=t[a],c,u,d=-1,p=0;for(;p<l.length&&(s.lastIndex=p,u=s.exec(l),u!==null);)p=s.lastIndex,s===Rr?u[1]==="!--"?s=qa:u[1]!==void 0?s=Ya:u[2]!==void 0?(tl.test(u[2])&&(i=RegExp("</"+u[2],"g")),s=yt):u[3]!==void 0&&(s=yt):s===yt?u[0]===">"?(s=i??Rr,d=-1):u[1]===void 0?d=-2:(d=s.lastIndex-u[2].length,c=u[1],s=u[3]===void 0?yt:u[3]==='"'?Za:Xa):s===Za||s===Xa?s=yt:s===qa||s===Ya?s=Rr:(s=yt,i=void 0);let h=s===yt&&t[a+1].startsWith("/>")?" ":"";o+=s===Rr?l+ld:d>=0?(n.push(c),l.slice(0,d)+Qa+l.slice(d)+Qe+h):l+Qe+(d===-2?a:h)}return[ol(t,o+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},Pr=class t{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let o=0,s=0,a=e.length-1,l=this.parts,[c,u]=ud(e,r);if(this.el=t.createElement(c,n),xt.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=xt.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let d of i.getAttributeNames())if(d.endsWith(Qa)){let p=u[s++],h=i.getAttribute(d).split(Qe),m=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:m[2],strings:h,ctor:m[1]==="."?no:m[1]==="?"?io:m[1]==="@"?oo:Gt}),i.removeAttribute(d)}else d.startsWith(Qe)&&(l.push({type:6,index:o}),i.removeAttribute(d));if(tl.test(i.tagName)){let d=i.textContent.split(Qe),p=d.length-1;if(p>0){i.textContent=Tn?Tn.emptyScript:"";for(let h=0;h<p;h++)i.append(d[h],_n()),xt.nextNode(),l.push({type:2,index:++o});i.append(d[p],_n())}}}else if(i.nodeType===8)if(i.data===el)l.push({type:2,index:o});else{let d=-1;for(;(d=i.data.indexOf(Qe,d+1))!==-1;)l.push({type:7,index:o}),d+=Qe.length-1}o++}}static createElement(e,r){let n=bt.createElement("template");return n.innerHTML=e,n}};function Kt(t,e,r=t,n){if(e===Nr)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,o=Lr(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(e=Kt(t,i._$AS(t,e.values),i,n)),e}var ro=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,i=(e?.creationScope??bt).importNode(r,!0);xt.currentNode=i;let o=xt.nextNode(),s=0,a=0,l=n[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new Rn(o,o.nextSibling,this,e):l.type===1?c=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(c=new so(o,this,e)),this._$AV.push(c),l=n[++a]}s!==l?.index&&(o=xt.nextNode(),s++)}return xt.currentNode=bt,i}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},Rn=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Kt(this,e,r),Lr(e)?e===j||e==null||e===""?(this._$AH!==j&&this._$AR(),this._$AH=j):e!==this._$AH&&e!==Nr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):cd(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==j&&Lr(this._$AH)?this._$AA.nextSibling.data=e:this.T(bt.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=Pr.createElement(ol(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let o=new ro(i,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(e){let r=Ja.get(e.strings);return r===void 0&&Ja.set(e.strings,r=new Pr(e)),r}k(e){lo(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let o of e)i===r.length?r.push(n=new t(this.O(_n()),this.O(_n()),this,this.options)):n=r[i],n._$AI(o),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let n=Ka(e).nextSibling;Ka(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Gt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,o){this.type=1,this._$AH=j,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=j}_$AI(e,r=this,n,i){let o=this.strings,s=!1;if(o===void 0)e=Kt(this,e,r,0),s=!Lr(e)||e!==this._$AH&&e!==Nr,s&&(this._$AH=e);else{let a=e,l,c;for(e=o[0],l=0;l<o.length-1;l++)c=Kt(this,a[n+l],r,l),c===Nr&&(c=this._$AH[l]),s||=!Lr(c)||c!==this._$AH[l],c===j?e=j:e!==j&&(e+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!i&&this.j(e)}j(e){e===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},no=class extends Gt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===j?void 0:e}},io=class extends Gt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==j)}},oo=class extends Gt{constructor(e,r,n,i,o){super(e,r,n,i,o),this.type=5}_$AI(e,r=this){if((e=Kt(this,e,r,0)??j)===Nr)return;let n=this._$AH,i=e===j&&n!==j||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==j&&(n===j||i);i&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},so=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Kt(this,e)}};var dd=ao.litHtmlPolyfillSupport;dd?.(Pr,Rn),(ao.litHtmlVersions??=[]).push("3.3.3");var al=Symbol.for(""),pd=t=>{if(t?.r===al)return t?._$litStatic$},uo=t=>({_$litStatic$:t,r:al});var sl=new Map,po=t=>(e,...r)=>{let n=r.length,i,o,s=[],a=[],l,c=0,u=!1;for(;c<n;){for(l=e[c];c<n&&(o=r[c],(i=pd(o))!==void 0);)l+=i+e[++c],u=!0;c!==n&&a.push(o),s.push(l),c++}if(c===n&&s.push(e[n]),u){let d=s.join("$$lit$$");(e=sl.get(d))===void 0&&(s.raw=s,sl.set(d,e=s)),r=a}return t(e,...r)},fo=po(rl),Ov=po(nl),Tv=po(il);var ho=f(N()),bl=f(A());var Z;(function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"})(Z||(Z={}));var ue=f(T()),y=f(A()),ll=y.FtCssVariableFactory.extend("--ft-typography-font-family","",y.designSystemVariables.titleFont),$e=y.FtCssVariableFactory.extend("--ft-typography-font-family","",y.designSystemVariables.contentFont),S={fontFamily:$e,fontSize:y.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:y.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:y.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:y.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:y.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},qt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-title-font-family","",ll),fontSize:y.FtCssVariableFactory.extend("--ft-typography-title-font-size","",S.fontSize,"20px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",S.letterSpacing,"0.15px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-title-line-height","",S.lineHeight,"1.2"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",S.textTransform,"inherit")},Yt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",ll),fontSize:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",S.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",S.letterSpacing,"0.105px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",S.lineHeight,"1.7"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",S.textTransform,"inherit")},Xt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",S.fontSize,"16px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",S.fontWeight,"600"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",S.letterSpacing,"0.144px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",S.lineHeight,"1.5"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",S.textTransform,"inherit")},Zt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",S.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",S.letterSpacing,"0.098px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",S.lineHeight,"1.7"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",S.textTransform,"inherit")},Jt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",S.fontSize,"16px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",S.letterSpacing,"0.496px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",S.lineHeight,"1.5"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",S.textTransform,"inherit")},Qt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",S.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",S.letterSpacing,"0.252px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",S.lineHeight,"1.4"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",S.textTransform,"inherit")},er={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",S.fontSize,"12px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",S.letterSpacing,"0.396px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",S.lineHeight,"1.33"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",S.textTransform,"inherit")},tr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",S.fontSize,"10px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",S.letterSpacing,"0.33px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",S.lineHeight,"1.6"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",S.textTransform,"inherit")},rr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",S.fontSize,"10px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",S.letterSpacing,"1.5px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",S.lineHeight,"1.6"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",S.textTransform,"uppercase")},nr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-button-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-button-font-size","",S.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",S.fontWeight,"600"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",S.letterSpacing,"1.246px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-button-line-height","",S.lineHeight,"1.15"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",S.textTransform,"uppercase")},cl=ue.css`
25
+ `;var Ii=u(A()),Gr=u($());var Ku=u(Ci()),Gu=u(g());var Ta=globalThis,gu=e=>e,xo=Ta.trustedTypes,vu=xo?xo.createPolicy("lit-html",{createHTML:e=>e}):void 0,Au="$lit$",vr=`lit$${Math.random().toFixed(9).slice(2)}$`,Eu="?"+vr,Jh=`<${Eu}>`,Kr=document,So=()=>Kr.createComment(""),fn=e=>e===null||typeof e!="object"&&typeof e!="function",Oa=Array.isArray,Qh=e=>Oa(e)||typeof e?.[Symbol.iterator]=="function",Sa=`[
26
+ \f\r]`,pn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yu=/-->/g,bu=/>/g,zr=RegExp(`>|${Sa}(?:([^\\s"'>=/]+)(${Sa}*=${Sa}*(?:[^
27
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),xu=/'/g,Su=/"/g,Cu=/^(?:script|style|textarea|title)$/i,Ra=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),_u=Ra(1),Tu=Ra(2),Ou=Ra(3),hn=Symbol.for("lit-noChange"),pt=Symbol.for("lit-nothing"),wu=new WeakMap,Wr=Kr.createTreeWalker(Kr,129);function Ru(e,t){if(!Oa(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return vu!==void 0?vu.createHTML(t):t}var tm=(e,t)=>{let r=e.length-1,i=[],n,o=t===2?"<svg>":t===3?"<math>":"",s=pn;for(let a=0;a<r;a++){let l=e[a],c,d,p=-1,f=0;for(;f<l.length&&(s.lastIndex=f,d=s.exec(l),d!==null);)f=s.lastIndex,s===pn?d[1]==="!--"?s=yu:d[1]!==void 0?s=bu:d[2]!==void 0?(Cu.test(d[2])&&(n=RegExp("</"+d[2],"g")),s=zr):d[3]!==void 0&&(s=zr):s===zr?d[0]===">"?(s=n??pn,p=-1):d[1]===void 0?p=-2:(p=s.lastIndex-d[2].length,c=d[1],s=d[3]===void 0?zr:d[3]==='"'?Su:xu):s===Su||s===xu?s=zr:s===yu||s===bu?s=pn:(s=zr,n=void 0);let h=s===zr&&e[a+1].startsWith("/>")?" ":"";o+=s===pn?l+Jh:p>=0?(i.push(c),l.slice(0,p)+Au+l.slice(p)+vr+h):l+vr+(p===-2?a:h)}return[Ru(e,o+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},mn=class e{constructor({strings:t,_$litType$:r},i){let n;this.parts=[];let o=0,s=0,a=t.length-1,l=this.parts,[c,d]=tm(t,r);if(this.el=e.createElement(c,i),Wr.currentNode=this.el.content,r===2||r===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(n=Wr.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let p of n.getAttributeNames())if(p.endsWith(Au)){let f=d[s++],h=n.getAttribute(p).split(vr),m=/([.?@])?(.*)/.exec(f);l.push({type:1,index:o,name:m[2],strings:h,ctor:m[1]==="."?Aa:m[1]==="?"?Ea:m[1]==="@"?Ca:Ti}),n.removeAttribute(p)}else p.startsWith(vr)&&(l.push({type:6,index:o}),n.removeAttribute(p));if(Cu.test(n.tagName)){let p=n.textContent.split(vr),f=p.length-1;if(f>0){n.textContent=xo?xo.emptyScript:"";for(let h=0;h<f;h++)n.append(p[h],So()),Wr.nextNode(),l.push({type:2,index:++o});n.append(p[f],So())}}}else if(n.nodeType===8)if(n.data===Eu)l.push({type:2,index:o});else{let p=-1;for(;(p=n.data.indexOf(vr,p+1))!==-1;)l.push({type:7,index:o}),p+=vr.length-1}o++}}static createElement(t,r){let i=Kr.createElement("template");return i.innerHTML=t,i}};function _i(e,t,r=e,i){if(t===hn)return t;let n=i!==void 0?r._$Co?.[i]:r._$Cl,o=fn(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(e),n._$AT(e,r,i)),i!==void 0?(r._$Co??=[])[i]=n:r._$Cl=n),n!==void 0&&(t=_i(e,n._$AS(e,t.values),n,i)),t}var wa=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:i}=this._$AD,n=(t?.creationScope??Kr).importNode(r,!0);Wr.currentNode=n;let o=Wr.nextNode(),s=0,a=0,l=i[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new wo(o,o.nextSibling,this,t):l.type===1?c=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(c=new _a(o,this,t)),this._$AV.push(c),l=i[++a]}s!==l?.index&&(o=Wr.nextNode(),s++)}return Wr.currentNode=Kr,n}p(t){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,r),r+=i.strings.length-2):i._$AI(t[r])),r++}},wo=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,i,n){this.type=2,this._$AH=pt,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=_i(this,t,r),fn(t)?t===pt||t==null||t===""?(this._$AH!==pt&&this._$AR(),this._$AH=pt):t!==this._$AH&&t!==hn&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Qh(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==pt&&fn(this._$AH)?this._$AA.nextSibling.data=t:this.T(Kr.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=mn.createElement(Ru(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let o=new wa(n,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(t){let r=wu.get(t.strings);return r===void 0&&wu.set(t.strings,r=new mn(t)),r}k(t){Oa(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let o of t)n===r.length?r.push(i=new e(this.O(So()),this.O(So()),this,this.options)):i=r[n],i._$AI(o),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let i=gu(t).nextSibling;gu(t).remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Ti=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,i,n,o){this.type=1,this._$AH=pt,this._$AN=void 0,this.element=t,this.name=r,this._$AM=n,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=pt}_$AI(t,r=this,i,n){let o=this.strings,s=!1;if(o===void 0)t=_i(this,t,r,0),s=!fn(t)||t!==this._$AH&&t!==hn,s&&(this._$AH=t);else{let a=t,l,c;for(t=o[0],l=0;l<o.length-1;l++)c=_i(this,a[i+l],r,l),c===hn&&(c=this._$AH[l]),s||=!fn(c)||c!==this._$AH[l],c===pt?t=pt:t!==pt&&(t+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!n&&this.j(t)}j(t){t===pt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Aa=class extends Ti{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===pt?void 0:t}},Ea=class extends Ti{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==pt)}},Ca=class extends Ti{constructor(t,r,i,n,o){super(t,r,i,n,o),this.type=5}_$AI(t,r=this){if((t=_i(this,t,r,0)??pt)===hn)return;let i=this._$AH,n=t===pt&&i!==pt||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==pt&&(i===pt||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},_a=class{constructor(t,r,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){_i(this,t)}};var em=Ta.litHtmlPolyfillSupport;em?.(mn,wo),(Ta.litHtmlVersions??=[]).push("3.3.3");var Pu=Symbol.for(""),rm=e=>{if(e?.r===Pu)return e?._$litStatic$},La=e=>({_$litStatic$:e,r:Pu});var Lu=new Map,Pa=e=>(t,...r)=>{let i=r.length,n,o,s=[],a=[],l,c=0,d=!1;for(;c<i;){for(l=t[c];c<i&&(o=r[c],(n=rm(o))!==void 0);)l+=n+t[++c],d=!0;c!==i&&a.push(o),s.push(l),c++}if(c===i&&s.push(t[i]),d){let p=s.join("$$lit$$");(t=Lu.get(p))===void 0&&(s.raw=s,Lu.set(p,t=s)),r=a}return e(t,...r)},Ia=Pa(_u),vx=Pa(Tu),yx=Pa(Ou);var ka=u($()),ju=u(g());var H;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(H||(H={}));var ve=u(A()),b=u(g()),Iu=b.FtCssVariableFactory.extend("--ft-typography-font-family","",b.designSystemVariables.titleFont),Qe=b.FtCssVariableFactory.extend("--ft-typography-font-family","",b.designSystemVariables.contentFont),C={fontFamily:Qe,fontSize:b.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:b.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:b.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:b.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:b.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},yr={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Iu),fontSize:b.FtCssVariableFactory.extend("--ft-typography-title-font-size","",C.fontSize,"20px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",C.letterSpacing,"0.15px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-title-line-height","",C.lineHeight,"1.2"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",C.textTransform,"inherit")},br={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Iu),fontSize:b.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",C.fontSize,"14px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",C.letterSpacing,"0.105px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",C.lineHeight,"1.7"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",C.textTransform,"inherit")},Oi={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",C.fontSize,"16px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",C.fontWeight,"600"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",C.letterSpacing,"0.144px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",C.lineHeight,"1.5"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",C.textTransform,"inherit")},Ri={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",C.fontSize,"14px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",C.letterSpacing,"0.098px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",C.lineHeight,"1.7"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",C.textTransform,"inherit")},me={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",C.fontSize,"16px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",C.letterSpacing,"0.496px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",C.lineHeight,"1.5"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",C.textTransform,"inherit")},ge={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",C.fontSize,"14px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",C.letterSpacing,"0.252px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",C.lineHeight,"1.4"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",C.textTransform,"inherit")},ie={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",C.fontSize,"12px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",C.letterSpacing,"0.396px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",C.lineHeight,"1.33"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",C.textTransform,"inherit")},Li={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",C.fontSize,"10px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",C.letterSpacing,"0.33px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",C.lineHeight,"1.6"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",C.textTransform,"inherit")},Pi={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",C.fontSize,"10px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",C.letterSpacing,"1.5px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",C.lineHeight,"1.6"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",C.textTransform,"uppercase")},Ft={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-button-font-size","",C.fontSize,"14px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",C.fontWeight,"600"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",C.letterSpacing,"1.246px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-button-line-height","",C.lineHeight,"1.15"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",C.textTransform,"uppercase")},ku=ve.css`
28
28
  .ft-typography--title {
29
- font-family: ${qt.fontFamily};
30
- font-size: ${qt.fontSize};
31
- font-weight: ${qt.fontWeight};
32
- letter-spacing: ${qt.letterSpacing};
33
- line-height: ${qt.lineHeight};
34
- text-transform: ${qt.textTransform};
35
- }
36
- `,ul=ue.css`
29
+ font-family: ${yr.fontFamily};
30
+ font-size: ${yr.fontSize};
31
+ font-weight: ${yr.fontWeight};
32
+ letter-spacing: ${yr.letterSpacing};
33
+ line-height: ${yr.lineHeight};
34
+ text-transform: ${yr.textTransform};
35
+ }
36
+ `,Du=ve.css`
37
37
  .ft-typography--title-dense {
38
- font-family: ${Yt.fontFamily};
39
- font-size: ${Yt.fontSize};
40
- font-weight: ${Yt.fontWeight};
41
- letter-spacing: ${Yt.letterSpacing};
42
- line-height: ${Yt.lineHeight};
43
- text-transform: ${Yt.textTransform};
44
- }
45
- `,dl=ue.css`
38
+ font-family: ${br.fontFamily};
39
+ font-size: ${br.fontSize};
40
+ font-weight: ${br.fontWeight};
41
+ letter-spacing: ${br.letterSpacing};
42
+ line-height: ${br.lineHeight};
43
+ text-transform: ${br.textTransform};
44
+ }
45
+ `,Mu=ve.css`
46
46
  .ft-typography--subtitle1 {
47
- font-family: ${Xt.fontFamily};
48
- font-size: ${Xt.fontSize};
49
- font-weight: ${Xt.fontWeight};
50
- letter-spacing: ${Xt.letterSpacing};
51
- line-height: ${Xt.lineHeight};
52
- text-transform: ${Xt.textTransform};
53
- }
54
- `,pl=ue.css`
47
+ font-family: ${Oi.fontFamily};
48
+ font-size: ${Oi.fontSize};
49
+ font-weight: ${Oi.fontWeight};
50
+ letter-spacing: ${Oi.letterSpacing};
51
+ line-height: ${Oi.lineHeight};
52
+ text-transform: ${Oi.textTransform};
53
+ }
54
+ `,$u=ve.css`
55
55
  .ft-typography--subtitle2 {
56
- font-family: ${Zt.fontFamily};
57
- font-size: ${Zt.fontSize};
58
- font-weight: ${Zt.fontWeight};
59
- letter-spacing: ${Zt.letterSpacing};
60
- line-height: ${Zt.lineHeight};
61
- text-transform: ${Zt.textTransform};
56
+ font-family: ${Ri.fontFamily};
57
+ font-size: ${Ri.fontSize};
58
+ font-weight: ${Ri.fontWeight};
59
+ letter-spacing: ${Ri.letterSpacing};
60
+ line-height: ${Ri.lineHeight};
61
+ text-transform: ${Ri.textTransform};
62
62
  }
63
63
 
64
- `,Ln=ue.css`
64
+ `,xr=ve.css`
65
65
  .ft-typography--body1 {
66
- font-family: ${Jt.fontFamily};
67
- font-size: ${Jt.fontSize};
68
- font-weight: ${Jt.fontWeight};
69
- letter-spacing: ${Jt.letterSpacing};
70
- line-height: ${Jt.lineHeight};
71
- text-transform: ${Jt.textTransform};
72
- }
73
- `,fl=ue.css`
66
+ font-family: ${me.fontFamily};
67
+ font-size: ${me.fontSize};
68
+ font-weight: ${me.fontWeight};
69
+ letter-spacing: ${me.letterSpacing};
70
+ line-height: ${me.lineHeight};
71
+ text-transform: ${me.textTransform};
72
+ }
73
+ `,Nu=ve.css`
74
74
  .ft-typography--body2 {
75
- font-family: ${Qt.fontFamily};
76
- font-size: ${Qt.fontSize};
77
- font-weight: ${Qt.fontWeight};
78
- letter-spacing: ${Qt.letterSpacing};
79
- line-height: ${Qt.lineHeight};
80
- text-transform: ${Qt.textTransform};
81
- }
82
- `,hl=ue.css`
75
+ font-family: ${ge.fontFamily};
76
+ font-size: ${ge.fontSize};
77
+ font-weight: ${ge.fontWeight};
78
+ letter-spacing: ${ge.letterSpacing};
79
+ line-height: ${ge.lineHeight};
80
+ text-transform: ${ge.textTransform};
81
+ }
82
+ `,Ao=ve.css`
83
83
  .ft-typography--caption {
84
- font-family: ${er.fontFamily};
85
- font-size: ${er.fontSize};
86
- font-weight: ${er.fontWeight};
87
- letter-spacing: ${er.letterSpacing};
88
- line-height: ${er.lineHeight};
89
- text-transform: ${er.textTransform};
90
- }
91
- `,ml=ue.css`
84
+ font-family: ${ie.fontFamily};
85
+ font-size: ${ie.fontSize};
86
+ font-weight: ${ie.fontWeight};
87
+ letter-spacing: ${ie.letterSpacing};
88
+ line-height: ${ie.lineHeight};
89
+ text-transform: ${ie.textTransform};
90
+ }
91
+ `,Uu=ve.css`
92
92
  .ft-typography--breadcrumb {
93
- font-family: ${tr.fontFamily};
94
- font-size: ${tr.fontSize};
95
- font-weight: ${tr.fontWeight};
96
- letter-spacing: ${tr.letterSpacing};
97
- line-height: ${tr.lineHeight};
98
- text-transform: ${tr.textTransform};
99
- }
100
- `,vl=ue.css`
93
+ font-family: ${Li.fontFamily};
94
+ font-size: ${Li.fontSize};
95
+ font-weight: ${Li.fontWeight};
96
+ letter-spacing: ${Li.letterSpacing};
97
+ line-height: ${Li.lineHeight};
98
+ text-transform: ${Li.textTransform};
99
+ }
100
+ `,Fu=ve.css`
101
101
  .ft-typography--overline {
102
- font-family: ${rr.fontFamily};
103
- font-size: ${rr.fontSize};
104
- font-weight: ${rr.fontWeight};
105
- letter-spacing: ${rr.letterSpacing};
106
- line-height: ${rr.lineHeight};
107
- text-transform: ${rr.textTransform};
108
- }
109
- `,gl=ue.css`
102
+ font-family: ${Pi.fontFamily};
103
+ font-size: ${Pi.fontSize};
104
+ font-weight: ${Pi.fontWeight};
105
+ letter-spacing: ${Pi.letterSpacing};
106
+ line-height: ${Pi.lineHeight};
107
+ text-transform: ${Pi.textTransform};
108
+ }
109
+ `,Vu=ve.css`
110
110
  .ft-typography--button {
111
- font-family: ${nr.fontFamily};
112
- font-size: ${nr.fontSize};
113
- font-weight: ${nr.fontWeight};
114
- letter-spacing: ${nr.letterSpacing};
115
- line-height: ${nr.lineHeight};
116
- text-transform: ${nr.textTransform};
117
- }
118
- `,yl=ue.css`
111
+ font-family: ${Ft.fontFamily};
112
+ font-size: ${Ft.fontSize};
113
+ font-weight: ${Ft.fontWeight};
114
+ letter-spacing: ${Ft.letterSpacing};
115
+ line-height: ${Ft.lineHeight};
116
+ text-transform: ${Ft.textTransform};
117
+ }
118
+ `,Bu=ve.css`
119
119
  .ft-typography {
120
120
  vertical-align: inherit;
121
121
  }
122
- `;var xl=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},F=class extends bl.FtLitElement{constructor(){super(...arguments),this.variant=Z.body1}render(){return this.element?fo`
123
- <${uo(this.element)}
122
+ `;var Hu=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},N=class extends ju.FtLitElement{constructor(){super(...arguments),this.variant=H.body1}render(){return this.element?Ia`
123
+ <${La(this.element)}
124
124
  part="text"
125
125
  class="ft-typography ft-typography--${this.variant}">
126
126
  <slot></slot>
127
- </${uo(this.element)}>
128
- `:fo`
127
+ </${La(this.element)}>
128
+ `:Ia`
129
129
  <slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
130
- `}};F.styles=[cl,ul,dl,pl,Ln,fl,hl,ml,vl,gl,yl];xl([(0,ho.property)()],F.prototype,"element",void 0);xl([(0,ho.property)()],F.prototype,"variant",void 0);var El=f(A());var Al={"ft-typography":F};(0,El.customElements)(Al);var Nn=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},ve=class extends wl.FtLitElement{constructor(){super(...arguments),this.height=0,this.resizeObserver=new ResizeObserver(([e])=>{this.height=Math.min(e.contentRect.height,e.contentRect.width)})}render(){var e,r,n;return this.watermark?ir.html`
130
+ `}};N.styles=[ku,Du,Mu,$u,xr,Nu,Ao,Uu,Fu,Vu,Bu];Hu([(0,ka.property)()],N.prototype,"element",void 0);Hu([(0,ka.property)()],N.prototype,"variant",void 0);var Wu=u(g());var zu={"ft-typography":N};(0,Wu.customElements)(zu);var Eo=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ce=class extends Gu.FtLitElement{constructor(){super(...arguments),this.height=0,this.resizeObserver=new ResizeObserver(([t])=>{this.height=Math.min(t.contentRect.height,t.contentRect.width)})}render(){var t,r,i;return this.watermark?Ii.html`
131
131
  <style>
132
132
  .ft-watermark {
133
133
  height: ${this.height}px;
@@ -140,40 +140,40 @@
140
140
  <text x="0" y="0"
141
141
  text-anchor="middle"
142
142
  transform="rotate(-45)"
143
- fill="${(e=this.watermark)===null||e===void 0?void 0:e.color}"
143
+ fill="${(t=this.watermark)===null||t===void 0?void 0:t.color}"
144
144
  fill-opacity="${(r=this.watermark)===null||r===void 0?void 0:r.opacity}%">
145
- ${(0,Sl.repeat)(((n=this.watermark)===null||n===void 0?void 0:n.text)||[],i=>ir.svg`<tspan x="0" dy="1.2em">${i}</tspan>`)}
145
+ ${(0,Ku.repeat)(((i=this.watermark)===null||i===void 0?void 0:i.text)||[],n=>Ii.svg`<tspan x="0" dy="1.2em">${n}</tspan>`)}
146
146
  </text>
147
147
  </svg>
148
148
  </div>
149
- `:ir.nothing}updated(e){if(super.updated(e),e.has("watermark")&&this.watermark){let r=this.svg.getBBox({stroke:!0});this.svg.setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height)}e.has("heightReference")&&this.heightReference&&(this.resizeObserver.disconnect(),this.resizeObserver.observe(this.heightReference))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect()}};ve.styles=[Wa,Ln];Nn([(0,At.query)(".ft-watermark")],ve.prototype,"svg",void 0);Nn([(0,At.property)({attribute:!1})],ve.prototype,"watermark",void 0);Nn([(0,At.property)({attribute:!1})],ve.prototype,"heightReference",void 0);Nn([(0,At.state)()],ve.prototype,"height",void 0);var Ol=f(A());var Cl={"ft-content-watermark":ve};(0,Ol.customElements)(Cl);var _l=f(mo()),ne=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},P=class extends(0,Et.withConditionalVisibility)(X){constructor(){super(...arguments),this.viewerType="none",this.inlineSvgAllowed=!1}render(){return ge.html`
149
+ `:Ii.nothing}updated(t){if(super.updated(t),t.has("watermark")&&this.watermark){let r=this.svg.getBBox({stroke:!0});this.svg.setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height)}t.has("heightReference")&&this.heightReference&&(this.resizeObserver.disconnect(),this.resizeObserver.observe(this.heightReference))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect()}};Ce.styles=[hu,xr];Eo([(0,Gr.query)(".ft-watermark")],Ce.prototype,"svg",void 0);Eo([(0,Gr.property)({attribute:!1})],Ce.prototype,"watermark",void 0);Eo([(0,Gr.property)({attribute:!1})],Ce.prototype,"heightReference",void 0);Eo([(0,Gr.state)()],Ce.prototype,"height",void 0);var Zu=u(g());var qu={"ft-content-watermark":Ce};(0,Zu.customElements)(qu);var Xu=u(Da()),ne=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},st=class extends(0,qr.withConditionalVisibility)(It){constructor(){super(...arguments),this.viewerType="none",this.inlineSvgAllowed=!1}render(){return _e.html`
150
150
  ${this.renderContent()}
151
151
  <ft-content-watermark part="watermark"
152
152
  .watermark=${this.watermark}
153
153
  .exportpartsPrefixes=${["watermark"]}
154
154
  .heightReference=${this}></ft-content-watermark>
155
- `}renderContent(){var e;switch(this.viewerType){case"image":return this.renderImageViewer();case"inline-svg":return this.renderImageViewer();case"video":return this.renderVideoViewer();case"pdf":return this.renderPdfViewer();case"iframe":return this.renderIframeViewer((e=this.descriptor)===null||e===void 0?void 0:e.contentUrl);default:return ge.nothing}}renderImageViewer(){var e,r;return ge.html`
155
+ `}renderContent(){var t;switch(this.viewerType){case"image":return this.renderImageViewer();case"inline-svg":return this.renderImageViewer();case"video":return this.renderVideoViewer();case"pdf":return this.renderPdfViewer();case"iframe":return this.renderIframeViewer((t=this.descriptor)===null||t===void 0?void 0:t.contentUrl);default:return _e.nothing}}renderImageViewer(){var t,r;return _e.html`
156
156
  <div class="image-viewer">
157
157
  <div class="image-viewer-content">
158
158
  <div class="image-container">
159
- ${this.viewerType==="image"?ge.html`
160
- <img src="${(e=this.descriptor)===null||e===void 0?void 0:e.contentUrl}"
159
+ ${this.viewerType==="image"?_e.html`
160
+ <img src="${(t=this.descriptor)===null||t===void 0?void 0:t.contentUrl}"
161
161
  alt="${(r=this.descriptor)===null||r===void 0?void 0:r.alt}"
162
162
  @load=${this.onImageLoad}>
163
- `:ge.html`
164
- ${(0,_l.unsafeHTML)(this.svgContent)}
163
+ `:_e.html`
164
+ ${(0,Xu.unsafeHTML)(this.svgContent)}
165
165
  `}
166
166
 
167
167
  </div>
168
168
  </div>
169
169
  </div>
170
- `}onImageLoad(){var e;this.initialImageHeight=this.image.naturalHeight===0?this.image.clientHeight:this.image.naturalHeight,this.initialImageWidth=this.image.naturalWidth===0?this.image.clientWidth:this.image.naturalWidth,(e=this.viewerStateManager)===null||e===void 0||e.setZoom(Math.min(1,this.getImageToViewerRatio()))}onSvgLoad(){var e;(this.svg.clientWidth===0||this.svg.clientHeight===0)&&(this.svg.style.width="90vw",this.svg.style.height="90vh"),this.initialImageHeight=this.svg.viewBox.baseVal.height===0?this.svg.clientHeight:this.svg.viewBox.baseVal.height,this.initialImageWidth=this.svg.viewBox.baseVal.width===0?this.svg.clientWidth:this.svg.viewBox.baseVal.width,(e=this.viewerStateManager)===null||e===void 0||e.setZoom(Math.min(1,this.getImageToViewerRatio()))}getImageToViewerRatio(){if(this.initialImageHeight!=null&&this.initialImageWidth!=null){let e=this.initialImageHeight/this.initialImageWidth,r=this.clientHeight/this.clientWidth;return e>r?this.clientHeight/this.initialImageHeight:this.clientWidth/this.initialImageWidth}}renderVideoViewer(){var e;return ge.html`
171
- <video src="${(e=this.descriptor)===null||e===void 0?void 0:e.contentUrl}" controls></video>
172
- `}renderPdfViewer(){var e;let r=new URLSearchParams({file:this.descriptor.contentUrl});return this.renderIframeViewer(`${(e=le.get())===null||e===void 0?void 0:e.makeAbsolute("/pdf-viewer")}?${r}`)}renderIframeViewer(e){var r;return ge.html`
173
- <iframe src="${e}"
170
+ `}onImageLoad(){var t;this.initialImageHeight=this.image.naturalHeight===0?this.image.clientHeight:this.image.naturalHeight,this.initialImageWidth=this.image.naturalWidth===0?this.image.clientWidth:this.image.naturalWidth,(t=this.viewerStateManager)===null||t===void 0||t.setZoom(Math.min(1,this.getImageToViewerRatio()))}onSvgLoad(){var t;(this.svg.clientWidth===0||this.svg.clientHeight===0)&&(this.svg.style.width="90vw",this.svg.style.height="90vh"),this.initialImageHeight=this.svg.viewBox.baseVal.height===0?this.svg.clientHeight:this.svg.viewBox.baseVal.height,this.initialImageWidth=this.svg.viewBox.baseVal.width===0?this.svg.clientWidth:this.svg.viewBox.baseVal.width,(t=this.viewerStateManager)===null||t===void 0||t.setZoom(Math.min(1,this.getImageToViewerRatio()))}getImageToViewerRatio(){if(this.initialImageHeight!=null&&this.initialImageWidth!=null){let t=this.initialImageHeight/this.initialImageWidth,r=this.clientHeight/this.clientWidth;return t>r?this.clientHeight/this.initialImageHeight:this.clientWidth/this.initialImageWidth}}renderVideoViewer(){var t;return _e.html`
171
+ <video src="${(t=this.descriptor)===null||t===void 0?void 0:t.contentUrl}" controls></video>
172
+ `}renderPdfViewer(){var t;let r=new URLSearchParams({file:this.descriptor.contentUrl});return this.renderIframeViewer(`${(t=He.get())===null||t===void 0?void 0:t.makeAbsolute("/pdf-viewer")}?${r}`)}renderIframeViewer(t){var r;return _e.html`
173
+ <iframe src="${t}"
174
174
  title="${(r=this.descriptor)===null||r===void 0?void 0:r.alt}"
175
175
  ></iframe>
176
- `}willUpdate(e){var r,n,i;super.willUpdate(e),e.has("descriptor")&&(this.isVisible=!!(!((r=this.descriptor)===null||r===void 0)&&r.viewableInCurrentBrowser),this.initialImageHeight=void 0,this.initialImageWidth=void 0,this.imageHeight=void 0,this.imageWidth=void 0,(n=this.viewerStateManager)===null||n===void 0||n.setZoom(void 0),(i=this.viewerStateManager)===null||i===void 0||i.setRotation(0),this.svgContent=void 0),e.has("zoom")&&(this.imageHeight=this.zoom&&this.initialImageHeight?this.initialImageHeight*this.zoom:void 0,this.imageWidth=this.zoom&&this.initialImageWidth?this.initialImageWidth*this.zoom:void 0)}updated(e){var r,n,i,o,s,a;super.updated(e),!(!((r=this.descriptor)===null||r===void 0)&&r.viewableInCurrentBrowser)||!(!((n=this.descriptor)===null||n===void 0)&&n.contentUrl)?this.viewerType="none":this.inlineSvgAllowed&&(!((i=this.descriptor)===null||i===void 0)&&i.mimeType.startsWith("image/svg"))?this.viewerType="inline-svg":!((o=this.descriptor)===null||o===void 0)&&o.mimeType.startsWith("image/")?this.viewerType="image":!((s=this.descriptor)===null||s===void 0)&&s.mimeType.startsWith("video/")?this.viewerType="video":((a=this.descriptor)===null||a===void 0?void 0:a.mimeType)==="application/pdf"?this.viewerType="pdf":this.viewerType="iframe"}contentAvailableCallback(e){var r,n,i,o;if(super.contentAvailableCallback(e),(this.viewerType==="image"||this.viewerType==="inline-svg")&&(e.has("zoom")&&this.zoom==null&&((r=this.viewerStateManager)===null||r===void 0||r.setZoom(this.getImageToViewerRatio())),e.has("zoom")||e.has("rotation"))){let s=this.image||this.svg;if(s&&(s.style.transform=`scaleX(${this.zoom}) scaleY(${this.zoom}) rotate(${this.rotation}deg)`),this.imageViewer&&this.imageContainer&&s){let a=(this.imageViewer.scrollTop+this.imageViewer.clientHeight/2)/this.imageViewer.scrollHeight,l=(this.imageViewer.scrollLeft+this.imageViewer.clientWidth/2)/this.imageViewer.scrollWidth,{height:c,width:u}=s.getClientRects()[0];this.imageContainer.style.height=`${c}px`,this.imageContainer.style.width=`${u}px`,this.imageViewer.scrollTop=a*this.imageViewer.scrollHeight-this.imageViewer.clientHeight/2,this.imageViewer.scrollLeft=l*this.imageViewer.scrollWidth-this.imageViewer.clientWidth/2}}this.viewerType==="inline-svg"&&(e.has("descriptor")&&(!((n=this.descriptor)===null||n===void 0)&&n.contentUrl)&&((i=le.get())===null||i===void 0||i.fetch((o=this.descriptor)===null||o===void 0?void 0:o.contentUrl).then(s=>s.text()).then(s=>this.svgContent=s)),e.has("svgContent")&&this.svgContent&&this.onSvgLoad())}};P.elementDefinitions={"ft-content-watermark":ve};P.styles=ge.css`
176
+ `}willUpdate(t){var r,i,n;super.willUpdate(t),t.has("descriptor")&&(this.isVisible=!!(!((r=this.descriptor)===null||r===void 0)&&r.viewableInCurrentBrowser),this.initialImageHeight=void 0,this.initialImageWidth=void 0,this.imageHeight=void 0,this.imageWidth=void 0,(i=this.viewerStateManager)===null||i===void 0||i.setZoom(void 0),(n=this.viewerStateManager)===null||n===void 0||n.setRotation(0),this.svgContent=void 0),t.has("zoom")&&(this.imageHeight=this.zoom&&this.initialImageHeight?this.initialImageHeight*this.zoom:void 0,this.imageWidth=this.zoom&&this.initialImageWidth?this.initialImageWidth*this.zoom:void 0)}updated(t){var r,i,n,o,s,a;super.updated(t),!(!((r=this.descriptor)===null||r===void 0)&&r.viewableInCurrentBrowser)||!(!((i=this.descriptor)===null||i===void 0)&&i.contentUrl)?this.viewerType="none":this.inlineSvgAllowed&&(!((n=this.descriptor)===null||n===void 0)&&n.mimeType.startsWith("image/svg"))?this.viewerType="inline-svg":!((o=this.descriptor)===null||o===void 0)&&o.mimeType.startsWith("image/")?this.viewerType="image":!((s=this.descriptor)===null||s===void 0)&&s.mimeType.startsWith("video/")?this.viewerType="video":((a=this.descriptor)===null||a===void 0?void 0:a.mimeType)==="application/pdf"?this.viewerType="pdf":this.viewerType="iframe"}contentAvailableCallback(t){var r,i,n,o;if(super.contentAvailableCallback(t),(this.viewerType==="image"||this.viewerType==="inline-svg")&&(t.has("zoom")&&this.zoom==null&&((r=this.viewerStateManager)===null||r===void 0||r.setZoom(this.getImageToViewerRatio())),t.has("zoom")||t.has("rotation"))){let s=this.image||this.svg;if(s&&(s.style.transform=`scaleX(${this.zoom}) scaleY(${this.zoom}) rotate(${this.rotation}deg)`),this.imageViewer&&this.imageContainer&&s){let a=(this.imageViewer.scrollTop+this.imageViewer.clientHeight/2)/this.imageViewer.scrollHeight,l=(this.imageViewer.scrollLeft+this.imageViewer.clientWidth/2)/this.imageViewer.scrollWidth,{height:c,width:d}=s.getClientRects()[0];this.imageContainer.style.height=`${c}px`,this.imageContainer.style.width=`${d}px`,this.imageViewer.scrollTop=a*this.imageViewer.scrollHeight-this.imageViewer.clientHeight/2,this.imageViewer.scrollLeft=l*this.imageViewer.scrollWidth-this.imageViewer.clientWidth/2}}this.viewerType==="inline-svg"&&(t.has("descriptor")&&(!((i=this.descriptor)===null||i===void 0)&&i.contentUrl)&&((n=He.get())===null||n===void 0||n.fetch((o=this.descriptor)===null||o===void 0?void 0:o.contentUrl).then(s=>s.text()).then(s=>this.svgContent=s)),t.has("svgContent")&&this.svgContent&&this.onSvgLoad())}};st.elementDefinitions={"ft-content-watermark":Ce};st.styles=_e.css`
177
177
  :host {
178
178
  display: block;
179
179
  min-height: 100px;
@@ -215,12 +215,12 @@
215
215
  max-height: 100%;
216
216
  border: none;
217
217
  }
218
- `;ne([(0,Et.redux)({store:"viewer"})],P.prototype,"descriptor",void 0);ne([(0,ye.state)()],P.prototype,"viewerType",void 0);ne([(0,ye.state)()],P.prototype,"inlineSvgAllowed",void 0);ne([(0,Et.redux)({store:"viewer",selector:({contentModifiers:t})=>t.zoom})],P.prototype,"zoom",void 0);ne([(0,Et.redux)({store:"viewer",selector:({contentModifiers:t})=>t.rotation})],P.prototype,"rotation",void 0);ne([(0,Et.redux)({store:"viewer"})],P.prototype,"watermark",void 0);ne([(0,ye.query)("img")],P.prototype,"image",void 0);ne([(0,ye.query)("svg")],P.prototype,"svg",void 0);ne([(0,ye.query)(".image-viewer")],P.prototype,"imageViewer",void 0);ne([(0,ye.query)(".image-container")],P.prototype,"imageContainer",void 0);ne([(0,ye.state)()],P.prototype,"imageHeight",void 0);ne([(0,ye.state)()],P.prototype,"imageWidth",void 0);ne([(0,ye.state)()],P.prototype,"svgContent",void 0);var Pn=class extends oe(P){};var lt=f(N());var Pe=f(A()),ur=f(T());var et=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?An:Wt}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let o=i;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...o)=>this.service.resolveMessage(this.name,i,...o)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var sr=f(A());var Rl=f(N());var vo=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,n]=e.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},or=new vo;var fd=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Ir=Symbol("i18nAttributes"),Ll=Symbol("i18nListAttributes"),Nl=Symbol("i18nProperties"),Mn=Symbol("i18nContexts"),Mr=Symbol("i18nUnsubs"),tt=(0,sr.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?An:Wt}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:d}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(s,a,...p)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(or.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&o(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(s=this[Ir])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[Ll])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(h=>c(u,d,h))})}updateI18nProperties(o){var s;(s=this[Nl])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[Mn].set(l,{isCustomContext:a}),this[Mr].has(l)||this[Mr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[Mn].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Mn].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Mr].forEach(o=>o()),this[Mr].clear()}}return e=Mn,r=Mr,fd([(0,Rl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),In=class extends tt(sr.FtLitElement){},Dn=class extends tt(sr.FtLitElementRedux){};var Pl=f(T());var Ml=Pl.css`
219
- `;var kn=f(T()),Un=f(N()),$n=f(A());var Dr=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},xe=class extends Dn{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":kn.nothing:kn.html`
218
+ `;ne([(0,qr.redux)({store:"viewer"})],st.prototype,"descriptor",void 0);ne([(0,Te.state)()],st.prototype,"viewerType",void 0);ne([(0,Te.state)()],st.prototype,"inlineSvgAllowed",void 0);ne([(0,qr.redux)({store:"viewer",selector:({contentModifiers:e})=>e.zoom})],st.prototype,"zoom",void 0);ne([(0,qr.redux)({store:"viewer",selector:({contentModifiers:e})=>e.rotation})],st.prototype,"rotation",void 0);ne([(0,qr.redux)({store:"viewer"})],st.prototype,"watermark",void 0);ne([(0,Te.query)("img")],st.prototype,"image",void 0);ne([(0,Te.query)("svg")],st.prototype,"svg",void 0);ne([(0,Te.query)(".image-viewer")],st.prototype,"imageViewer",void 0);ne([(0,Te.query)(".image-container")],st.prototype,"imageContainer",void 0);ne([(0,Te.state)()],st.prototype,"imageHeight",void 0);ne([(0,Te.state)()],st.prototype,"imageWidth",void 0);ne([(0,Te.state)()],st.prototype,"svgContent",void 0);var Co=class extends de(st){};var Tr=u($());var We=u(g()),Ui=u(A());var Wt=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?fo:wi}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(i,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(i,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),this.rawMessages=new Proxy({},{get:(i,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(i,n)=>()=>n}),this.attributes=new Proxy({},{get:(i,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var Di=u(g());var Ju=u($());var Ma=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,i]=t.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},ki=new Ma;var im=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},vn=Symbol("i18nAttributes"),Qu=Symbol("i18nListAttributes"),yn=Symbol("i18nProperties"),_o=Symbol("i18nContexts"),gn=Symbol("i18nUnsubs"),Kt=(0,Di.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class i extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?fo:wi}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:d,argsProvider:p}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let f=d??(p?p(this):[]);return this.getI18nService(c).resolveMessage(s,a,...f)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(ki.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(d,p,f)=>f?.context&&f.key&&o(d,p,f)?{...f,message:this.i18n({context:f.context,key:f.key,custom:f.custom,...d})}:f;(s=this[vn])===null||s===void 0||s.forEach((d,p)=>l[p]=c(d,p,l[p])),(a=this[Qu])===null||a===void 0||a.forEach((d,p)=>{var f;return l[p]=(f=l[p])===null||f===void 0?void 0:f.map(h=>c(d,p,h))})}updateI18nProperties(o){var s;(s=this[yn])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[_o].set(l,{isCustomContext:a}),this[gn].has(l)||this[gn].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[_o].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[_o].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[gn].forEach(o=>o()),this[gn].clear()}}return t=_o,r=gn,im([(0,Ju.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),To=class extends Kt(Di.FtLitElement){},Oo=class extends Kt(Di.FtLitElementRedux){};var Ro=(e,t)=>(r,i)=>{var n,o;r.constructor.createProperty(i,t??{attribute:!1,type:String});let s={...e,key:(n=e.key)!==null&&n!==void 0?n:i};r[yn]=(o=r[yn])!==null&&o!==void 0?o:new Map,r[yn].set(i,s)};var td=u(A());var ed=td.css`
219
+ `;var Lo=u(A()),Po=u($()),Io=u(g());var bn=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Oe=class extends Oo{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Lo.nothing:Lo.html`
220
220
  <span class="ft-i18n">
221
221
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
222
222
  </span>
223
- `}update(e){var r;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};xe.elementDefinitions={};xe.styles=Ml;Dr([(0,$n.redux)()],xe.prototype,"editorMode",void 0);Dr([(0,Un.property)()],xe.prototype,"context",void 0);Dr([(0,Un.property)()],xe.prototype,"key",void 0);Dr([(0,$n.jsonProperty)([])],xe.prototype,"args",void 0);Dr([(0,Un.property)()],xe.prototype,"defaultMessage",void 0);var Dl=f(A());var Il={"ft-i18n":xe};(0,Dl.customElements)(Il);var kl=f(T()),be=f(A()),de={size:be.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:be.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:be.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:be.FtCssVariableFactory.extend("--ft-icon-material-font-family","",be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:be.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Ul=[kl.css`
223
+ `}update(t){var r;super.update(t),["context","key","defaultMessage"].some(i=>t.has(i))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Oe.elementDefinitions={};Oe.styles=ed;bn([(0,Io.redux)()],Oe.prototype,"editorMode",void 0);bn([(0,Po.property)()],Oe.prototype,"context",void 0);bn([(0,Po.property)()],Oe.prototype,"key",void 0);bn([(0,Io.jsonProperty)([])],Oe.prototype,"args",void 0);bn([(0,Po.property)()],Oe.prototype,"defaultMessage",void 0);var id=u(g());var rd={"ft-i18n":Oe};(0,id.customElements)(rd);var nd=u(A()),Re=u(g()),ft={size:Re.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:Re.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",Re.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:Re.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",Re.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:Re.FtCssVariableFactory.extend("--ft-icon-material-font-family","",Re.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:Re.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},od=[nd.css`
224
224
  :host, i.ft-icon {
225
225
  display: inline-flex;
226
226
  align-items: center;
@@ -229,14 +229,14 @@
229
229
  }
230
230
 
231
231
  :host {
232
- width: ${de.size};
233
- height: ${de.size};
232
+ width: ${ft.size};
233
+ height: ${ft.size};
234
234
  }
235
235
 
236
236
  i.ft-icon {
237
237
  width: 100%;
238
238
  height: 100%;
239
- font-size: ${de.size};
239
+ font-size: ${ft.size};
240
240
  line-height: 1;
241
241
  font-weight: normal;
242
242
  text-transform: none;
@@ -247,33 +247,33 @@
247
247
  text-rendering: auto;
248
248
  -webkit-font-smoothing: antialiased;
249
249
  -moz-osx-font-smoothing: grayscale;
250
- vertical-align: ${de.verticalAlign};
250
+ vertical-align: ${ft.verticalAlign};
251
251
  }
252
252
 
253
253
  i.ft-icon.ft-icon--fluid-topics {
254
- font-family: ${de.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
254
+ font-family: ${ft.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
255
255
 
256
256
  /* Ugly fix because font is broken */
257
- font-size: calc(0.75 * ${de.size});
258
- line-height: ${de.size};
257
+ font-size: calc(0.75 * ${ft.size});
258
+ line-height: ${ft.size};
259
259
  position: relative;
260
260
  top: -4%;
261
261
  justify-content: center;
262
262
  }
263
263
 
264
264
  .ft-icon--file-format {
265
- font-family: ${de.fileFormatFontFamily}, ft-mime, sans-serif;
265
+ font-family: ${ft.fileFormatFontFamily}, ft-mime, sans-serif;
266
266
  }
267
267
 
268
268
  .ft-icon--material {
269
- font-family: ${de.materialFontFamily}, "Material Icons", sans-serif;
269
+ font-family: ${ft.materialFontFamily}, "Material Icons", sans-serif;
270
270
  }
271
- `,be.noTextSelect];var Le;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Le||(Le={}));var kr=f(T()),rt=f(N()),$l=f(A()),Hl=f(mo());var Ae;(function(t){t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.BOOKS="&#xe806;",t.MENU="&#xe807;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.HOME="&#xe80b;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.EXPORT="&#xe80f;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.USER="&#xe813;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.OFFLINE="&#xe816;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.STAR_PLAIN="&#xe900;",t.TOPICS="&#xe901;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN="&#xe90f;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_THEME="&#xe911;",t.ADMIN_USERS="&#xe912;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.INFO="&#xe919;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.THIN_ARROW="&#xe921;",t.SIGN_IN="&#xe922;",t.LOGOUT="&#xe923;",t.TRANSLATE="&#xe924;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.ARTICLE="&#xe927;",t.COLUMNS="&#xe928;",t.ANALYTICS="&#xe929;",t.COLLECTIONS="&#xe92a;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.COPY_TO_CLIPBOARD="&#xe930;",t.SHARED_PBK="&#xe931;",t.ATTACHMENTS="&#xe932;",t.STRIPE_ARROW_LEFT="&#xe933;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.FILTERS="&#xe935;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.SAVE="&#xe93a;",t.LOCKER="&#xe93b;",t.ADMIN_INTEGRATION="&#xe93c;",t.SYNC="&#xe93d;",t.TAG="&#xe93e;",t.BOOK_PLAIN="&#xe93f;",t.UPLOAD="&#xe940;",t.ONLINE="&#xe941;",t.TAG_PLAIN="&#xe942;",t.ACCOUNT_SETTINGS="&#xe943;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.SHORTCUT_MENU="&#xe946;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.ADMIN_PORTAL="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.FEEDBACK_PLAIN="&#xe951;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_COLLECTIONS="&#xe955;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.RESET="&#xe958;",t.MY_LIBRARY="&#xe959;",t.UNSTRUCTURED_DOC="&#xe95a;",t.CONTEXTUAL="&#xe95b;",t.THIN_ARROW_UP="&#xe95c;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.DESKTOP="&#xe95e;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_STACKED="&#xe96e;",t.CHART_BAR_GROUPED="&#xe96f;",t.EYE_SLASH="&#xe970;",t.X_MARK="&#xe971;",t.EXPAND_WIDE="&#xe972;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.EXTLINK_LIGHT="&#xe978;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.CONSUMER="&#xe97c;",t.OCTAGON_XMARK="&#xe97d;",t.HOURGLASS_HALF="&#xe97e;",t.CLOCK="&#xe97f;",t.CLOCK_THREE="&#xe97f;",t.CALENDAR_DAY="&#xe980;",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",t.WAND_MAGIC_SPARKLES="&#xe982;",t.PAPER_PLANE="&#xe983;",t.CIRCLE_STOP="&#xe984;",t.ARROW_ROTATE_RIGHT="&#xe985;",t.ARROWS_ROTATE="&#xe986;",t.ALIGN_RIGHT="&#xe987;",t.FORMAT_CLEAR="&#xe988;",t.ALIGN_CENTER="&#xe989;",t.ALIGN_LEFT="&#xe98a;",t.PALETTE="&#xe98b;",t.BOLD="&#xe98c;",t.ITALIC="&#xe98d;",t.UNDERLINE="&#xe98e;",t.STRIKETHROUGH="&#xe98f;",t.LINK_SIMPLE_SLASH="&#xe990;",t.LINK_SIMPLE="&#xe991;",t.ROUTE="&#xe992;",t.CIRCLE_USER_SLASH="&#xe993;",t.CIRCLE_USER_CHECK="&#xe994;",t.LIST_MAGNIFYING_GLASS="&#xe995;",t.MEDAL="&#xe996;",t.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",t.ARROW_TURN_DOWN_RIGHT="&#xe998;",t.FLASK="&#xe999;",t.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",t.HOURGLASS_END="&#xe99b;",t.CIRCLE_QUESTION="&#xe99c;",t.GRIP_LINES_SOLID="&#xe99d;",t.TRANSLATE_SPARKLE_SOLID="&#xe99e;",t.CODE="&#xe99f;",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",t.PAPER_PLANE_SLASH="&#xe9a1;",t.COMPRESS="&#xe9a2;",t.EXPAND="&#xe9a3;",t.ARROW_ROTATE_LEFT="&#xe9a4;",t.MOBILE_SMALL="&#xe9a5;",t.SPARKLES="&#xe9a6;",t.HAND_SOLID="&#xe9a7;",t.CLOCK_SOLID="&#xe9a8;",t.CONTEXT_MENU_CURSOR="&#xe9a9;",t.LANGUAGE_SLASH="&#xe9aa;",t.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",t.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",t.BOOKMARK_SLASH="&#xe9ad;",t.CIRCLE_PAUSE="&#xe9ae;",t.CIRCLE_PLAY="&#xe9af;",t.CIRCLE_STOP_PLAIN="&#xe9b0;",t.CIRCLE_ARROW_DOWN="&#xe9b1;",t.SHARE_NODES="&#xe9b2;",t.BELL="&#xe9b3;",t.BELL_SLASH="&#xe9b4;",t.FILE="&#xe9b5;",t.HAND="&#xe9b6;",t.SQUARE_INFO_SOLID="&#xe9b7;",t.FILE_CODE="&#xe9b8;",t.BOX_CODE="&#xe9b9;",t.TOPICS_SOLID="&#xe9ba;",t.PHOTO_FILM="&#xe9bb;",t.HYPHEN_SOLID="&#xe9bc;",t.CROSSHAIRS="&#xe9bd;",t.PERSON_CHALKBOARD="&#xe9be;",t.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",t.BOOK_OPEN_COVER="&#xe9c0;",t.LIGHTBULB="&#xe9c1;",t.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",t.CHART_LINE_USER="&#xe9c3;",t.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",t.EYE="&#xf06e;",t.SHARE="&#xe80f1;"})(Ae||(Ae={}));var g;(function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"})(g||(g={}));var go=new Map([...["abw"].map(t=>[t,g.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(t=>[t,g.AUDIO]),...["avi"].map(t=>[t,g.AVI]),...["chm","xhs"].map(t=>[t,g.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(t=>[t,g.CODE]),...["csv"].map(t=>[t,g.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,g.DITA]),...["epub"].map(t=>[t,g.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,g.EXCEL]),...["flac"].map(t=>[t,g.FLAC]),...["gif"].map(t=>[t,g.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,g.GZIP]),...["html","htm","xhtml"].map(t=>[t,g.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(t=>[t,g.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,g.JPEG]),...["json"].map(t=>[t,g.JSON]),...["m4a","m4p"].map(t=>[t,g.M4A]),...["mov","qt"].map(t=>[t,g.MOV]),...["mp3"].map(t=>[t,g.MP3]),...["mp4","m4v"].map(t=>[t,g.MP4]),...["ogg","oga"].map(t=>[t,g.OGG]),...["pdf","ps"].map(t=>[t,g.PDF]),...["png"].map(t=>[t,g.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,g.POWERPOINT]),...["rar"].map(t=>[t,g.RAR]),...["stp"].map(t=>[t,g.STP]),...["txt","rtf","md","mdown"].map(t=>[t,g.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(t=>[t,g.VIDEO]),...["wav"].map(t=>[t,g.WAV]),...["wma"].map(t=>[t,g.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,g.WORD]),...["xml","xsl","rdf"].map(t=>[t,g.XML]),...["yaml","yml","x-yaml"].map(t=>[t,g.YAML]),...["zip"].map(t=>[t,g.ZIP])]),hd=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);function Hn(t,e){var r,n,i,o;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,a]=(((r=hd.get(t))!==null&&r!==void 0?r:t)+"/").split("/");return(o=(i=(n=go.get(a))!==null&&n!==void 0?n:go.get(e))!==null&&i!==void 0?i:go.get(s))!==null&&o!==void 0?o:g.UNKNOWN}var yo={[g.ABW]:"#91ABC6",[g.AUDIO]:"#1795E3",[g.AVI]:"#E63324",[g.CHM]:"#71C3EB",[g.CODE]:"#71C3EB",[g.CSV]:"#1F7345",[g.DITA]:"#71C3EB",[g.EPUB]:"#85B926",[g.EXCEL]:"#1F7345",[g.FLAC]:"#1795E3",[g.GIF]:"#59B031",[g.GZIP]:"#F8AB36",[g.HTML]:"#71C3EB",[g.IMAGE]:"#59B031",[g.JPEG]:"#59B031",[g.JSON]:"#71C3EB",[g.M4A]:"#1795E3",[g.MOV]:"#E63324",[g.MP3]:"#1795E3",[g.MP4]:"#E63324",[g.OGG]:"#1795E3",[g.PDF]:"#E44948",[g.PNG]:"#59B031",[g.POWERPOINT]:"#B54A2B",[g.RAR]:"#F8AB36",[g.STP]:"#3764B1",[g.TEXT]:"#3162AB",[g.UNKNOWN]:"#999999",[g.VIDEO]:"#E63324",[g.WAV]:"#1795E3",[g.WMA]:"#1795E3",[g.WORD]:"#3162AB",[g.XML]:"#71C3EB",[g.YAML]:"#71C3EB",[g.ZIP]:"#F8AB36"};var Ur=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},W=class extends $l.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=kr.nothing}render(){let e=this.variant&&Object.values(Le).includes(this.variant)?this.variant:Le.fluid_topics,r=e!==Le.material||!!this.value;return kr.html`
272
- <i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
273
- ${(0,Hl.unsafeHTML)(this.resolvedIcon)}
271
+ `,Re.noTextSelect];var kt;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(kt||(kt={}));var xn=u(A()),Sr=u($()),sd=u(g()),ad=u(Da());var Gt;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.CIRCLE_QUESTION="&#xe99c;",e.GRIP_LINES_SOLID="&#xe99d;",e.TRANSLATE_SPARKLE_SOLID="&#xe99e;",e.CODE="&#xe99f;",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",e.PAPER_PLANE_SLASH="&#xe9a1;",e.COMPRESS="&#xe9a2;",e.EXPAND="&#xe9a3;",e.ARROW_ROTATE_LEFT="&#xe9a4;",e.MOBILE_SMALL="&#xe9a5;",e.SPARKLES="&#xe9a6;",e.HAND_SOLID="&#xe9a7;",e.CLOCK_SOLID="&#xe9a8;",e.CONTEXT_MENU_CURSOR="&#xe9a9;",e.LANGUAGE_SLASH="&#xe9aa;",e.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",e.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",e.BOOKMARK_SLASH="&#xe9ad;",e.CIRCLE_PAUSE="&#xe9ae;",e.CIRCLE_PLAY="&#xe9af;",e.CIRCLE_STOP_PLAIN="&#xe9b0;",e.CIRCLE_ARROW_DOWN="&#xe9b1;",e.SHARE_NODES="&#xe9b2;",e.BELL="&#xe9b3;",e.BELL_SLASH="&#xe9b4;",e.FILE="&#xe9b5;",e.HAND="&#xe9b6;",e.SQUARE_INFO_SOLID="&#xe9b7;",e.FILE_CODE="&#xe9b8;",e.BOX_CODE="&#xe9b9;",e.TOPICS_SOLID="&#xe9ba;",e.PHOTO_FILM="&#xe9bb;",e.HYPHEN_SOLID="&#xe9bc;",e.CROSSHAIRS="&#xe9bd;",e.PERSON_CHALKBOARD="&#xe9be;",e.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",e.BOOK_OPEN_COVER="&#xe9c0;",e.LIGHTBULB="&#xe9c1;",e.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",e.CHART_LINE_USER="&#xe9c3;",e.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;"})(Gt||(Gt={}));var y;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(y||(y={}));var $a=new Map([...["abw"].map(e=>[e,y.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,y.AUDIO]),...["avi"].map(e=>[e,y.AVI]),...["chm","xhs"].map(e=>[e,y.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,y.CODE]),...["csv"].map(e=>[e,y.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,y.DITA]),...["epub"].map(e=>[e,y.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,y.EXCEL]),...["flac"].map(e=>[e,y.FLAC]),...["gif"].map(e=>[e,y.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,y.GZIP]),...["html","htm","xhtml"].map(e=>[e,y.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,y.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,y.JPEG]),...["json"].map(e=>[e,y.JSON]),...["m4a","m4p"].map(e=>[e,y.M4A]),...["mov","qt"].map(e=>[e,y.MOV]),...["mp3"].map(e=>[e,y.MP3]),...["mp4","m4v"].map(e=>[e,y.MP4]),...["ogg","oga"].map(e=>[e,y.OGG]),...["pdf","ps"].map(e=>[e,y.PDF]),...["png"].map(e=>[e,y.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,y.POWERPOINT]),...["rar"].map(e=>[e,y.RAR]),...["stp"].map(e=>[e,y.STP]),...["txt","rtf","md","mdown"].map(e=>[e,y.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,y.VIDEO]),...["wav"].map(e=>[e,y.WAV]),...["wma"].map(e=>[e,y.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,y.WORD]),...["xml","xsl","rdf"].map(e=>[e,y.XML]),...["yaml","yml","x-yaml"].map(e=>[e,y.YAML]),...["zip"].map(e=>[e,y.ZIP])]),nm=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);function ko(e,t){var r,i,n,o;e=(e??"").toLowerCase(),t=(t??"").toLowerCase();let[s,a]=(((r=nm.get(e))!==null&&r!==void 0?r:e)+"/").split("/");return(o=(n=(i=$a.get(a))!==null&&i!==void 0?i:$a.get(t))!==null&&n!==void 0?n:$a.get(s))!==null&&o!==void 0?o:y.UNKNOWN}var Na={[y.ABW]:"#91ABC6",[y.AUDIO]:"#1795E3",[y.AVI]:"#E63324",[y.CHM]:"#71C3EB",[y.CODE]:"#71C3EB",[y.CSV]:"#1F7345",[y.DITA]:"#71C3EB",[y.EPUB]:"#85B926",[y.EXCEL]:"#1F7345",[y.FLAC]:"#1795E3",[y.GIF]:"#59B031",[y.GZIP]:"#F8AB36",[y.HTML]:"#71C3EB",[y.IMAGE]:"#59B031",[y.JPEG]:"#59B031",[y.JSON]:"#71C3EB",[y.M4A]:"#1795E3",[y.MOV]:"#E63324",[y.MP3]:"#1795E3",[y.MP4]:"#E63324",[y.OGG]:"#1795E3",[y.PDF]:"#E44948",[y.PNG]:"#59B031",[y.POWERPOINT]:"#B54A2B",[y.RAR]:"#F8AB36",[y.STP]:"#3764B1",[y.TEXT]:"#3162AB",[y.UNKNOWN]:"#999999",[y.VIDEO]:"#E63324",[y.WAV]:"#1795E3",[y.WMA]:"#1795E3",[y.WORD]:"#3162AB",[y.XML]:"#71C3EB",[y.YAML]:"#71C3EB",[y.ZIP]:"#F8AB36"};var Sn=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},V=class extends sd.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=xn.nothing}render(){let t=this.variant&&Object.values(kt).includes(this.variant)?this.variant:kt.fluid_topics,r=t!==kt.material||!!this.value;return xn.html`
272
+ <i class="ft-icon ft-icon--${t} ft-no-text-select" part="icon icon-${t}">
273
+ ${(0,ad.unsafeHTML)(this.resolvedIcon)}
274
274
  <slot ?hidden=${r}></slot>
275
275
  </i>
276
- `}getTextContent(){var e,r;return(r=(e=this.slottedContent)===null||e===void 0?void 0:e.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(e){super.update(e),["value","variant"].some(r=>e.has(r))&&this.resolveIcon()}resolveIcon(){var e,r;let n=this.value||this.getTextContent();switch(this.variant){case Le.file_format:this.resolvedIcon=(e=g[n.replace("-","_").toUpperCase()])!==null&&e!==void 0?e:n;break;case Le.material:this.resolvedIcon=this.value||kr.nothing;break;default:this.resolvedIcon=(r=Ae[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(e){super.firstUpdated(e),setTimeout(()=>this.resolveIcon())}};W.elementDefinitions={};W.styles=Ul;Ur([(0,rt.property)()],W.prototype,"variant",void 0);Ur([(0,rt.property)()],W.prototype,"value",void 0);Ur([(0,rt.property)({reflect:!0,attribute:"aria-hidden"})],W.prototype,"ariaHidden",void 0);Ur([(0,rt.state)()],W.prototype,"resolvedIcon",void 0);Ur([(0,rt.query)("slot")],W.prototype,"slottedContent",void 0);var Bl=f(A());var jl={"ft-icon":W};(0,Bl.customElements)(jl);var bc=f(T()),fe=f(N()),pe=f(A());var Vl=f(T()),nt=f(A()),$r={distance:nt.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:nt.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:nt.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:nt.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",nt.designSystemVariables.borderRadiusS),maxWidth:nt.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},Fl=Vl.css`
276
+ `}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let i=this.value||this.getTextContent();switch(this.variant){case kt.file_format:this.resolvedIcon=(t=y[i.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:i;break;case kt.material:this.resolvedIcon=this.value||xn.nothing;break;default:this.resolvedIcon=(r=Gt[i.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:i;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};V.elementDefinitions={};V.styles=od;Sn([(0,Sr.property)()],V.prototype,"variant",void 0);Sn([(0,Sr.property)()],V.prototype,"value",void 0);Sn([(0,Sr.property)({reflect:!0,attribute:"aria-hidden"})],V.prototype,"ariaHidden",void 0);Sn([(0,Sr.state)()],V.prototype,"resolvedIcon",void 0);Sn([(0,Sr.query)("slot")],V.prototype,"slottedContent",void 0);var cd=u(g());var ld={"ft-icon":V};(0,cd.customElements)(ld);var Bd=u(A()),be=u($()),ye=u(g());var ud=u(A()),wr=u(g()),wn={distance:wr.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:wr.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:wr.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:wr.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",wr.designSystemVariables.borderRadiusS),maxWidth:wr.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},dd=ud.css`
277
277
  .ft-tooltip--container {
278
278
  display: block;
279
279
  }
@@ -291,20 +291,20 @@
291
291
  box-sizing: border-box;
292
292
  overflow: hidden;
293
293
  width: max-content;
294
- max-width: ${$r.maxWidth};
294
+ max-width: ${wn.maxWidth};
295
295
  text-align: center;
296
- padding: ${$r.distance};
296
+ padding: ${wn.distance};
297
297
  }
298
298
 
299
299
  .ft-tooltip--content {
300
300
  padding: 4px 8px;
301
- border-radius: ${$r.borderRadiusS};
302
- background-color: ${$r.backgroundColor};
303
- color: ${$r.color};
301
+ border-radius: ${wn.borderRadiusS};
302
+ background-color: ${wn.backgroundColor};
303
+ color: ${wn.color};
304
304
  position: relative;
305
305
  word-break: break-word;
306
306
  }
307
- `;var zl=["top","right","bottom","left"],Wl=["start","end"],bo=zl.reduce((t,e)=>t.concat(e,e+"-"+Wl[0],e+"-"+Wl[1]),[]),Hr=Math.min,it=Math.max,jr=Math.round;var Ne=t=>({x:t,y:t}),md={left:"right",right:"left",bottom:"top",top:"bottom"};function Kl(t,e,r){return it(t,Hr(e,r))}function jn(t,e){return typeof t=="function"?t(e):t}function Br(t){return t.split("-")[0]}function ot(t){return t.split("-")[1]}function Ao(t){return t==="x"?"y":"x"}function Eo(t){return t==="y"?"height":"width"}function Bn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function So(t){return Ao(Bn(t))}function Gl(t,e,r){r===void 0&&(r=!1);let n=ot(t),i=So(t),o=Eo(i),s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=xo(s)),[s,xo(s)]}function ql(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function xo(t){let e=Br(t);return md[e]+t.slice(e.length)}function vd(t){var e,r,n,i;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(n=t.bottom)!=null?n:0,left:(i=t.left)!=null?i:0}}function Yl(t){return typeof t!="number"?vd(t):{top:t,right:t,bottom:t,left:t}}function St(t){let{x:e,y:r,width:n,height:i}=t;return{width:n,height:i,top:r,left:e,right:e+n,bottom:r+i,x:e,y:r}}function Xl(t,e,r){let{reference:n,floating:i}=t,o=Bn(e),s=So(e),a=Eo(s),l=Br(e),c=o==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2,h;switch(l){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-i.width,y:d};break;default:h={x:n.x,y:n.y}}let m=ot(e);return m&&(h[s]+=p*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function Zl(t,e){var r;e===void 0&&(e={});let{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=jn(e,t),m=Yl(h),x=a[p?d==="floating"?"reference":"floating":d],b=St(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),E=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),O=await(o.isElement==null?void 0:o.isElement(C))&&await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1},k=St(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:C,strategy:l}):E);return{top:(b.top-k.top+m.top)/O.y,bottom:(k.bottom-b.bottom+m.bottom)/O.y,left:(b.left-k.left+m.left)/O.x,right:(k.right-b.right+m.right)/O.x}}var gd=50,Jl=async(t,e,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Zl},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=Xl(c,n,l),p=n,h=0,m={};for(let v=0;v<o.length;v++){let x=o[v];if(!x)continue;let{name:b,fn:E}=x,{x:C,y:O,data:k,reset:M}=await E({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:e}});u=C??u,d=O??d,m[b]={...m[b],...k},M&&h<gd&&(h++,typeof M=="object"&&(M.placement&&(p=M.placement),M.rects&&(c=M.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):M.rects),{x:u,y:d}=Xl(c,p,l)),v=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:m}};function yd(t,e,r){return(t?[...r.filter(i=>ot(i)===t),...r.filter(i=>ot(i)!==t)]:r.filter(i=>Br(i)===i)).filter(i=>t?ot(i)===t||(e?ql(i)!==i:!1):!0)}var Ql=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,n,i;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:p=bo,autoAlignment:h=!0,...m}=jn(t,e),v=d!==void 0||p===bo?yd(d||null,h,p):p,x=((r=s.autoPlacement)==null?void 0:r.index)||0,b=v[x];if(b==null)return{};if(a!==b)return{reset:{placement:v[0]}};let E=await l.detectOverflow(e,m),C=Gl(b,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),O=[E[Br(b)],E[C[0]],E[C[1]]],k=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:b,overflows:O}],M=v[x+1];if(M)return{data:{index:x+1,overflows:k},reset:{placement:M}};let ze=k.map(ee=>{let ie=ot(ee.placement);return[ee.placement,ie&&u?ee.overflows.slice(0,2).reduce((te,ct)=>te+ct,0):ee.overflows[0],ee.overflows]}).sort((ee,ie)=>ee[1]-ie[1]),Ke=((i=ze.filter(ee=>ee[2].slice(0,ot(ee[0])?2:3).every(ie=>ie<=0))[0])==null?void 0:i[0])||ze[0][0];return Ke!==a?{data:{index:x+1,overflows:k},reset:{placement:Ke}}:{}}}};var ec=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:n,placement:i,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:E=>{let{x:C,y:O}=E;return{x:C,y:O}}},...c}=jn(t,e),u={x:r,y:n},d=await o.detectOverflow(e,c),p=Bn(i),h=Ao(p),m=u[h],v=u[p],x=(E,C)=>Kl(C+d[E==="y"?"top":"left"],C,C-d[E==="y"?"bottom":"right"]);s&&(m=x(h,m)),a&&(v=x(p,v));let b=l.fn({...e,[h]:m,[p]:v});return{...b,data:{x:b.x-r,y:b.y-n,enabled:{[h]:s,[p]:a}}}}}};function Fn(){return typeof window<"u"}function Ct(t){return rc(t)?(t.nodeName||"").toLowerCase():"#document"}function J(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function He(t){var e;return(e=(rc(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function rc(t){return Fn()?t instanceof Node||t instanceof J(t).Node:!1}function Ee(t){return Fn()?t instanceof Element||t instanceof J(t).Element:!1}function je(t){return Fn()?t instanceof HTMLElement||t instanceof J(t).HTMLElement:!1}function tc(t){return!Fn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof J(t).ShadowRoot}function Vr(t){let{overflow:e,overflowX:r,overflowY:n,display:i}=Se(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&i!=="inline"&&i!=="contents"}function nc(t){return/^(table|td|th)$/.test(Ct(t))}function Fr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var xd=/transform|translate|scale|rotate|perspective|filter/,bd=/paint|layout|strict|content/,wt=t=>!!t&&t!=="none",wo;function ar(t){let e=Ee(t)?Se(t):t;return wt(e.transform)||wt(e.translate)||wt(e.scale)||wt(e.rotate)||wt(e.perspective)||!Wn()&&(wt(e.backdropFilter)||wt(e.filter))||xd.test(e.willChange||"")||bd.test(e.contain||"")}function ic(t){let e=st(t);for(;je(e)&&!lr(e);){if(ar(e))return e;if(Fr(e))return null;e=st(e)}return null}function Wn(){return wo==null&&(wo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wo}function lr(t){return/^(html|body|#document)$/.test(Ct(t))}function Se(t){return J(t).getComputedStyle(t)}function Wr(t){return Ee(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function st(t){if(Ct(t)==="html")return t;let e=t.assignedSlot||t.parentNode||tc(t)&&t.host||He(t);return tc(e)?e.host:e}function oc(t){let e=st(t);return lr(e)?(t.ownerDocument||t).body:je(e)&&Vr(e)?e:oc(e)}function Vn(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);let i=oc(t),o=i===((n=t.ownerDocument)==null?void 0:n.body),s=J(i);if(o){let a=zn(s);return e.concat(s,s.visualViewport||[],Vr(i)?i:[],a&&r?Vn(a):[])}else return e.concat(i,Vn(i,[],r))}function zn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function lc(t){let e=Se(t),r=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=je(t),o=i?t.offsetWidth:r,s=i?t.offsetHeight:n,a=jr(r)!==o||jr(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function cc(t){return Ee(t)?t:t.contextElement}function cr(t){let e=cc(t);if(!je(e))return Ne(1);let r=e.getBoundingClientRect(),{width:n,height:i,$:o}=lc(e),s=(o?jr(r.width):r.width)/n,a=(o?jr(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Ad=Ne(0);function uc(t){let e=J(t);return!Wn()||!e.visualViewport?Ad:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ed(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===J(t)}function zr(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let i=t.getBoundingClientRect(),o=cc(t),s=Ne(1);e&&(n?Ee(n)&&(s=cr(n)):s=cr(t));let a=Ed(o,r,n)?uc(o):Ne(0),l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o&&n){let p=J(o),h=Ee(n)?J(n):n,m=p,v=zn(m);for(;v&&h!==m;){let x=cr(v),b=v.getBoundingClientRect(),E=Se(v),C=b.left+(v.clientLeft+parseFloat(E.paddingLeft))*x.x,O=b.top+(v.clientTop+parseFloat(E.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=C,c+=O,m=J(v),v=zn(m)}}return St({width:u,height:d,x:l,y:c})}function Kn(t,e){let r=Wr(t).scrollLeft;return e?e.left+r:zr(He(t)).left+r}function dc(t,e){let r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Kn(t,r),i=r.top+e.scrollTop;return{x:n,y:i}}function Sd(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t,o=i==="fixed",s=He(n),a=e?Fr(e.floating):!1;if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Ne(1),u=Ne(0),d=je(n);if((d||!o)&&((Ct(n)!=="body"||Vr(s))&&(l=Wr(n)),d)){let h=zr(n);c=cr(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}let p=s&&!d&&!o?dc(s,l):Ne(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function wd(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Cd(t){let e=Wr(t),r=t.ownerDocument.body,n=it(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=it(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-e.scrollLeft+Kn(t),s=-e.scrollTop;return Se(r).direction==="rtl"&&(o+=it(t.clientWidth,r.clientWidth)-n),{width:n,height:i,x:o,y:s}}var Od=25;function Td(t,e,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",i=J(t),o=He(t),s=i.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let p=!Wn()||e==="fixed";n?p||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,p&&(c=s.offsetLeft,u=s.offsetTop))}if(Kn(o)<=0){let p=o.ownerDocument,h=p.body,m=getComputedStyle(h),v=p.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(o.clientWidth-h.clientWidth-v),b=getComputedStyle(o).scrollbarGutter==="stable both-edges"?x/2:x;b<=Od&&(a-=b)}return{width:a,height:l,x:c,y:u}}function _d(t,e){let r=zr(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,o=cr(t),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,c=n*o.y;return{width:s,height:a,x:l,y:c}}function sc(t,e,r){let n;if(e==="viewport"||e==="layoutViewport")n=Td(t,r,e);else if(e==="document")n=Cd(He(t));else if(Ee(e))n=_d(e,r);else{let i=uc(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return St(n)}function Rd(t,e){let r=e.get(t);if(r)return r;let n=Vn(t,[],!1).filter(a=>Ee(a)&&Ct(a)!=="body"),i=null,o=Se(t).position==="fixed",s=o?st(t):t;for(;Ee(s)&&!lr(s);){let a=Se(s),l=ar(s),c=i?i.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(d=>d!==s):i=a,s=st(s)}return e.set(t,n),n}function Ld(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t,s=[...r==="clippingAncestors"?Fr(e)?[]:Rd(e,this._c):[].concat(r),n],a=sc(e,s[0],i),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let h=sc(e,s[p],i);l=it(h.top,l),c=Hr(h.right,c),u=Hr(h.bottom,u),d=it(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Nd(t){let{width:e,height:r}=lc(t);return{width:e,height:r}}function Pd(t,e,r){let n=je(e),i=He(e),o=r==="fixed",s=zr(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Ne(0);if((n||!o)&&((Ct(e)!=="body"||Vr(i))&&(a=Wr(e)),n)){let p=zr(e,!0,o,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}!n&&i&&(l.x=Kn(i));let c=i&&!n&&!o?dc(i,a):Ne(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function Co(t){return Se(t).position==="static"}function ac(t,e){if(!je(t)||Se(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return He(t)===r&&(r=r.ownerDocument.body),r}function pc(t,e){let r=J(t);if(Fr(t))return r;if(!je(t)){let i=st(t);for(;i&&!lr(i);){if(Ee(i)&&!Co(i))return i;i=st(i)}return r}let n=ac(t,e);for(;n&&nc(n)&&Co(n);)n=ac(n,e);return n&&lr(n)&&Co(n)&&!ar(n)?r:n||ic(t)||r}var Md=async function(t){let e=this.getOffsetParent||pc,r=this.getDimensions,n=await r(t.floating);return{reference:Pd(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Id(t){return Se(t).direction==="rtl"}var Gn={convertOffsetParentRelativeRectToViewportRelativeRect:Sd,getDocumentElement:He,getClippingRect:Ld,getOffsetParent:pc,getElementRects:Md,getClientRects:wd,getDimensions:Nd,getScale:cr,isElement:Ee,isRTL:Id};var fc=Ql,hc=ec;var mc=(t,e,r)=>{let n=new Map,i=r??{},o={...Gn,...i.platform,_c:n};return Jl(t,e,{...i,platform:o})};function vc(t){return Dd(t)}function Oo(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Dd(t){for(let e=t;e;e=Oo(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Oo(t);e;e=Oo(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||ar(r)||e.tagName==="BODY"))return e}return null}async function gc(t,e,r){let n;return typeof r=="object"?n=r:n={placement:r},mc(t,e,{strategy:n.strategy,platform:{...Gn,getOffsetParent:i=>Gn.getOffsetParent(i,vc)},middleware:[hc({crossAxis:!0}),fc({allowedPlacements:[n.placement]})]})}var yc=f(A());var To=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(n=>typeof n=="string"?or.fromAttribute(n):n):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},kd=new To;var xc=(t,e)=>(r,n)=>{var i;r.constructor.createProperty(n,{type:Object,hasChanged:yc.hasChanged,converter:or,...e}),r[Ir]=(i=r[Ir])!==null&&i!==void 0?i:new Map,r[Ir].set(n,t??{})};var we=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},U=class extends In{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new pe.Debouncer,this.revealDebouncer=new pe.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=e=>{this.isIgnored(e)?this.matchesIgnored(e)&&this.hide():this.show()},this.onFocusIn=e=>{!this.isIgnored(e)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var e,r;return bc.html`
307
+ `;var fd=["top","right","bottom","left"],pd=["start","end"],Fa=fd.reduce((e,t)=>e.concat(t,t+"-"+pd[0],t+"-"+pd[1]),[]),An=Math.min,Ar=Math.max,En=Math.round;var ze=e=>({x:e,y:e}),om={left:"right",right:"left",bottom:"top",top:"bottom"};function hd(e,t,r){return Ar(e,An(t,r))}function Do(e,t){return typeof e=="function"?e(t):e}function Cn(e){return e.split("-")[0]}function Er(e){return e.split("-")[1]}function Va(e){return e==="x"?"y":"x"}function Ba(e){return e==="y"?"height":"width"}function Mo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ha(e){return Va(Mo(e))}function md(e,t,r){r===void 0&&(r=!1);let i=Er(e),n=Ha(e),o=Ba(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Ua(s)),[s,Ua(s)]}function gd(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Ua(e){let t=Cn(e);return om[t]+e.slice(t.length)}function sm(e){var t,r,i,n;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}}function vd(e){return typeof e!="number"?sm(e):{top:e,right:e,bottom:e,left:e}}function Zr(e){let{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function yd(e,t,r){let{reference:i,floating:n}=e,o=Mo(t),s=Ha(t),a=Ba(s),l=Cn(t),c=o==="y",d=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,f=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:d,y:i.y-n.height};break;case"bottom":h={x:d,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:p};break;case"left":h={x:i.x-n.width,y:p};break;default:h={x:i.x,y:i.y}}let m=Er(t);return m&&(h[s]+=f*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function bd(e,t){var r;t===void 0&&(t={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:f=!1,padding:h=0}=Do(t,e),m=vd(h),x=a[f?p==="floating"?"reference":"floating":p],S=Zr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),E=p==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),P=await(o.isElement==null?void 0:o.isElement(R))&&await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1},gt=Zr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:R,strategy:l}):E);return{top:(S.top-gt.top+m.top)/P.y,bottom:(gt.bottom-S.bottom+m.bottom)/P.y,left:(S.left-gt.left+m.left)/P.x,right:(gt.right-S.right+m.right)/P.x}}var am=50,xd=async(e,t,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:bd},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:p}=yd(c,i,l),f=i,h=0,m={};for(let v=0;v<o.length;v++){let x=o[v];if(!x)continue;let{name:S,fn:E}=x,{x:R,y:P,data:gt,reset:dt}=await E({x:d,y:p,initialPlacement:i,placement:f,strategy:n,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});d=R??d,p=P??p,m[S]={...m[S],...gt},dt&&h<am&&(h++,typeof dt=="object"&&(dt.placement&&(f=dt.placement),dt.rects&&(c=dt.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):dt.rects),{x:d,y:p}=yd(c,f,l)),v=-1)}return{x:d,y:p,placement:f,strategy:n,middlewareData:m}};function lm(e,t,r){return(e?[...r.filter(n=>Er(n)===e),...r.filter(n=>Er(n)!==e)]:r.filter(n=>Cn(n)===n)).filter(n=>e?Er(n)===e||(t?gd(n)!==n:!1):!0)}var Sd=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:d=!1,alignment:p,allowedPlacements:f=Fa,autoAlignment:h=!0,...m}=Do(e,t),v=p!==void 0||f===Fa?lm(p||null,h,f):f,x=((r=s.autoPlacement)==null?void 0:r.index)||0,S=v[x];if(S==null)return{};if(a!==S)return{reset:{placement:v[0]}};let E=await l.detectOverflow(t,m),R=md(S,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),P=[E[Cn(S)],E[R[0]],E[R[1]]],gt=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:S,overflows:P}],dt=v[x+1];if(dt)return{data:{index:x+1,overflows:gt},reset:{placement:dt}};let cr=gt.map(te=>{let ue=Er(te.placement);return[te.placement,ue&&d?te.overflows.slice(0,2).reduce((ee,Dr)=>ee+Dr,0):te.overflows[0],te.overflows]}).sort((te,ue)=>te[1]-ue[1]),ur=((n=cr.filter(te=>te[2].slice(0,Er(te[0])?2:3).every(ue=>ue<=0))[0])==null?void 0:n[0])||cr[0][0];return ur!==a?{data:{index:x+1,overflows:gt},reset:{placement:ur}}:{}}}};var wd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:n,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:E=>{let{x:R,y:P}=E;return{x:R,y:P}}},...c}=Do(e,t),d={x:r,y:i},p=await o.detectOverflow(t,c),f=Mo(n),h=Va(f),m=d[h],v=d[f],x=(E,R)=>hd(R+p[E==="y"?"top":"left"],R,R-p[E==="y"?"bottom":"right"]);s&&(m=x(h,m)),a&&(v=x(f,v));let S=l.fn({...t,[h]:m,[f]:v});return{...S,data:{x:S.x-r,y:S.y-i,enabled:{[h]:s,[f]:a}}}}}};function No(){return typeof window<"u"}function Xr(e){return Ed(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tr(e){var t;return(t=(Ed(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ed(e){return No()?e instanceof Node||e instanceof qt(e).Node:!1}function Le(e){return No()?e instanceof Element||e instanceof qt(e).Element:!1}function er(e){return No()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Ad(e){return!No()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}function _n(e){let{overflow:t,overflowX:r,overflowY:i,display:n}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&n!=="inline"&&n!=="contents"}function Cd(e){return/^(table|td|th)$/.test(Xr(e))}function Tn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var cm=/transform|translate|scale|rotate|perspective|filter/,um=/paint|layout|strict|content/,Yr=e=>!!e&&e!=="none",ja;function Mi(e){let t=Le(e)?Pe(e):e;return Yr(t.transform)||Yr(t.translate)||Yr(t.scale)||Yr(t.rotate)||Yr(t.perspective)||!Uo()&&(Yr(t.backdropFilter)||Yr(t.filter))||cm.test(t.willChange||"")||um.test(t.contain||"")}function _d(e){let t=Cr(e);for(;er(t)&&!$i(t);){if(Mi(t))return t;if(Tn(t))return null;t=Cr(t)}return null}function Uo(){return ja==null&&(ja=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ja}function $i(e){return/^(html|body|#document)$/.test(Xr(e))}function Pe(e){return qt(e).getComputedStyle(e)}function On(e){return Le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cr(e){if(Xr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ad(e)&&e.host||tr(e);return Ad(t)?t.host:t}function Td(e){let t=Cr(e);return $i(t)?(e.ownerDocument||e).body:er(t)&&_n(t)?t:Td(t)}function $o(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=Td(e),o=n===((i=e.ownerDocument)==null?void 0:i.body),s=qt(n);if(o){let a=Fo(s);return t.concat(s,s.visualViewport||[],_n(n)?n:[],a&&r?$o(a):[])}else return t.concat(n,$o(n,[],r))}function Fo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ld(e){let t=Pe(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=er(e),o=n?e.offsetWidth:r,s=n?e.offsetHeight:i,a=En(r)!==o||En(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Pd(e){return Le(e)?e:e.contextElement}function Ni(e){let t=Pd(e);if(!er(t))return ze(1);let r=t.getBoundingClientRect(),{width:i,height:n,$:o}=Ld(t),s=(o?En(r.width):r.width)/i,a=(o?En(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var dm=ze(0);function Id(e){let t=qt(e);return!Uo()||!t.visualViewport?dm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pm(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===qt(e)}function Rn(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),o=Pd(e),s=ze(1);t&&(i?Le(i)&&(s=Ni(i)):s=Ni(e));let a=pm(o,r,i)?Id(o):ze(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,d=n.width/s.x,p=n.height/s.y;if(o&&i){let f=qt(o),h=Le(i)?qt(i):i,m=f,v=Fo(m);for(;v&&h!==m;){let x=Ni(v),S=v.getBoundingClientRect(),E=Pe(v),R=S.left+(v.clientLeft+parseFloat(E.paddingLeft))*x.x,P=S.top+(v.clientTop+parseFloat(E.paddingTop))*x.y;l*=x.x,c*=x.y,d*=x.x,p*=x.y,l+=R,c+=P,m=qt(v),v=Fo(m)}}return Zr({width:d,height:p,x:l,y:c})}function Vo(e,t){let r=On(e).scrollLeft;return t?t.left+r:Rn(tr(e)).left+r}function kd(e,t){let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-Vo(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function fm(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e,o=n==="fixed",s=tr(i),a=t?Tn(t.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=ze(1),d=ze(0),p=er(i);if((p||!o)&&((Xr(i)!=="body"||_n(s))&&(l=On(i)),p)){let h=Rn(i);c=Ni(i),d.x=h.x+i.clientLeft,d.y=h.y+i.clientTop}let f=s&&!p&&!o?kd(s,l):ze(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-l.scrollTop*c.y+d.y+f.y}}function hm(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function mm(e){let t=On(e),r=e.ownerDocument.body,i=Ar(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),n=Ar(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),o=-t.scrollLeft+Vo(e),s=-t.scrollTop;return Pe(r).direction==="rtl"&&(o+=Ar(e.clientWidth,r.clientWidth)-i),{width:i,height:n,x:o,y:s}}var gm=25;function vm(e,t,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=qt(e),o=tr(e),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,d=0;if(s){let f=!Uo()||t==="fixed";i?f||(c=-s.offsetLeft,d=-s.offsetTop):(a=s.width,l=s.height,f&&(c=s.offsetLeft,d=s.offsetTop))}if(Vo(o)<=0){let f=o.ownerDocument,h=f.body,m=getComputedStyle(h),v=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(o.clientWidth-h.clientWidth-v),S=getComputedStyle(o).scrollbarGutter==="stable both-edges"?x/2:x;S<=gm&&(a-=S)}return{width:a,height:l,x:c,y:d}}function ym(e,t){let r=Rn(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,o=Ni(e),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function Od(e,t,r){let i;if(t==="viewport"||t==="layoutViewport")i=vm(e,r,t);else if(t==="document")i=mm(tr(e));else if(Le(t))i=ym(t,r);else{let n=Id(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Zr(i)}function bm(e,t){let r=t.get(e);if(r)return r;let i=$o(e,[],!1).filter(a=>Le(a)&&Xr(a)!=="body"),n=null,o=Pe(e).position==="fixed",s=o?Cr(e):e;for(;Le(s)&&!$i(s);){let a=Pe(s),l=Mi(s),c=n?n.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(p=>p!==s):n=a,s=Cr(s)}return t.set(e,i),i}function xm(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e,s=[...r==="clippingAncestors"?Tn(t)?[]:bm(t,this._c):[].concat(r),i],a=Od(t,s[0],n),l=a.top,c=a.right,d=a.bottom,p=a.left;for(let f=1;f<s.length;f++){let h=Od(t,s[f],n);l=Ar(h.top,l),c=An(h.right,c),d=An(h.bottom,d),p=Ar(h.left,p)}return{width:c-p,height:d-l,x:p,y:l}}function Sm(e){let{width:t,height:r}=Ld(e);return{width:t,height:r}}function wm(e,t,r){let i=er(t),n=tr(t),o=r==="fixed",s=Rn(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=ze(0);if((i||!o)&&((Xr(t)!=="body"||_n(n))&&(a=On(t)),i)){let f=Rn(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!i&&n&&(l.x=Vo(n));let c=n&&!i&&!o?kd(n,a):ze(0),d=s.left+a.scrollLeft-l.x-c.x,p=s.top+a.scrollTop-l.y-c.y;return{x:d,y:p,width:s.width,height:s.height}}function za(e){return Pe(e).position==="static"}function Rd(e,t){if(!er(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return tr(e)===r&&(r=r.ownerDocument.body),r}function Dd(e,t){let r=qt(e);if(Tn(e))return r;if(!er(e)){let n=Cr(e);for(;n&&!$i(n);){if(Le(n)&&!za(n))return n;n=Cr(n)}return r}let i=Rd(e,t);for(;i&&Cd(i)&&za(i);)i=Rd(i,t);return i&&$i(i)&&za(i)&&!Mi(i)?r:i||_d(e)||r}var Am=async function(e){let t=this.getOffsetParent||Dd,r=this.getDimensions,i=await r(e.floating);return{reference:wm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Em(e){return Pe(e).direction==="rtl"}var Bo={convertOffsetParentRelativeRectToViewportRelativeRect:fm,getDocumentElement:tr,getClippingRect:xm,getOffsetParent:Dd,getElementRects:Am,getClientRects:hm,getDimensions:Sm,getScale:Ni,isElement:Le,isRTL:Em};var Md=Sd,$d=wd;var Nd=(e,t,r)=>{let i=new Map,n=r??{},o={...Bo,...n.platform,_c:i};return xd(e,t,{...n,platform:o})};function Ud(e){return Cm(e)}function Wa(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Cm(e){for(let t=e;t;t=Wa(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Wa(e);t;t=Wa(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||Mi(r)||t.tagName==="BODY"))return t}return null}async function Ho(e,t,r){let i;return typeof r=="object"?i=r:i={placement:r},Nd(e,t,{strategy:i.strategy,platform:{...Bo,getOffsetParent:n=>Bo.getOffsetParent(n,Ud)},middleware:[$d({crossAxis:!0}),Md({allowedPlacements:[i.placement]})]})}var Fd=u(g());var Ka=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(i=>typeof i=="string"?ki.fromAttribute(i):i):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},_m=new Ka;var Vd=(e,t)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:Fd.hasChanged,converter:ki,...t}),r[vn]=(n=r[vn])!==null&&n!==void 0?n:new Map,r[vn].set(i,e??{})};var Ie=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},K=class extends To{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new ye.Debouncer,this.revealDebouncer=new ye.Debouncer,this.onTouch=t=>{this.isIgnored(t)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=t=>{this.isIgnored(t)?this.matchesIgnored(t)&&this.hide():this.show()},this.onFocusIn=t=>{!this.isIgnored(t)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var t,r;return Bd.html`
308
308
  <div part="container"
309
309
  class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
310
310
  <slot part="slot"></slot>
@@ -313,19 +313,19 @@
313
313
  popover="manual">
314
314
  <div part="tooltip-content" class="ft-tooltip--content">
315
315
  <slot name="text"></slot>
316
- <ft-typography variant="${Z.caption}" ?hidden=${!(!((e=this.text)===null||e===void 0)&&e.message)}>
316
+ <ft-typography variant="${H.caption}" ?hidden=${!(!((t=this.text)===null||t===void 0)&&t.message)}>
317
317
  ${(r=this.text)===null||r===void 0?void 0:r.message}
318
318
  </ft-typography>
319
319
  </div>
320
320
  </div>
321
321
  </div>
322
- `}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,n;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(n=this.tooltip)===null||n===void 0||n.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let n=this.manual;this.manual=!0;let i=this.text;this.text={message:e},await this.show(r),this.text=i,this.manual=n}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&gc(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${pe.designSystemVariables.transitionDuration}, left ${pe.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(e){return(0,pe.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(e){return this.manual||this.matchesIgnored(e)}};U.elementDefinitions={"ft-typography":F};U.styles=Fl;we([xc()],U.prototype,"text",void 0);we([(0,fe.property)({type:Boolean})],U.prototype,"manual",void 0);we([(0,fe.property)({type:Boolean})],U.prototype,"inline",void 0);we([(0,pe.numberProperty)()],U.prototype,"delay",void 0);we([(0,fe.property)()],U.prototype,"position",void 0);we([(0,pe.jsonProperty)([])],U.prototype,"ignoreMatchingElements",void 0);we([(0,fe.queryAssignedNodes)()],U.prototype,"slotNodes",void 0);we([(0,fe.query)(".ft-tooltip--container")],U.prototype,"container",void 0);we([(0,fe.query)(".ft-tooltip")],U.prototype,"tooltip",void 0);we([(0,fe.query)(".ft-tooltip--content")],U.prototype,"tooltipContent",void 0);we([(0,fe.state)()],U.prototype,"visible",void 0);var Ec=f(A());var Ac={"ft-tooltip":U};(0,Ec.customElements)(Ac);var at=et.build("designedViewer"),Sc={fitToContainerAriaLabel:"Fill available space",zoomRealSizeAriaLabel:"Display content at original size",zoomInAriaLabel:"Zoom in",zoomOutAriaLabel:"Zoom out",rotateLeftAriaLabel:"Rotate left",rotateRightAriaLabel:"Rotate right"};var Be=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},z=class extends(0,Pe.withConditionalVisibility)(tt(X)){constructor(){super(...arguments),this.disabled=!1,this.tabindex=0,this.role="button",this.ariaLabel="",this.control=Re.FIT_TO_CONTAINER,this.controlDefinitions={[Re.FIT_TO_CONTAINER]:{ariaLabel:()=>at.messages.fitToContainerAriaLabel(),icon:Ae.ZOOM_FULLSCREEN,run:()=>{var e;return(e=this.viewerStateManager)===null||e===void 0?void 0:e.setZoom(void 0)}},[Re.ZOOM_REAL_SIZE]:{ariaLabel:()=>at.messages.zoomRealSizeAriaLabel(),icon:Ae.ZOOM_REALSIZE,run:()=>{var e;return(e=this.viewerStateManager)===null||e===void 0?void 0:e.setZoom(1)}},[Re.ZOOM_IN]:{ariaLabel:()=>at.messages.zoomInAriaLabel(),icon:Ae.ZOOM_IN,disabled:()=>{var e;return((e=this.zoom)!==null&&e!==void 0?e:1)>20},run:()=>{var e,r;return(e=this.viewerStateManager)===null||e===void 0?void 0:e.setZoom(((r=this.zoom)!==null&&r!==void 0?r:1)*1.2)}},[Re.ZOOM_OUT]:{ariaLabel:()=>at.messages.zoomOutAriaLabel(),icon:Ae.ZOOM_OUT,disabled:()=>{var e;return((e=this.zoom)!==null&&e!==void 0?e:1)<.05},run:()=>{var e,r;return(e=this.viewerStateManager)===null||e===void 0?void 0:e.setZoom(((r=this.zoom)!==null&&r!==void 0?r:1)/1.2)}},[Re.ROTATE_LEFT]:{ariaLabel:()=>at.messages.rotateLeftAriaLabel(),icon:Ae.ARROW_ROTATE_LEFT,run:()=>{var e;return(e=this.viewerStateManager)===null||e===void 0?void 0:e.setRotation(this.rotation-90)}},[Re.ROTATE_RIGHT]:{ariaLabel:()=>at.messages.rotateRightAriaLabel(),icon:Ae.ARROW_ROTATE_RIGHT,run:()=>{var e;return(e=this.viewerStateManager)===null||e===void 0?void 0:e.setRotation(this.rotation+90)}}},this.modifyContent=()=>{var e;(e=this.controlDefinitions[this.control])===null||e===void 0||e.run()}}render(){var e;return this.isVisible?ur.html`
322
+ `}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(t){var r,i;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(i=this.tooltip)===null||i===void 0||i.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(r=>t.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,r){let i=this.manual;this.manual=!0;let n=this.text;this.text={message:t},await this.show(r),this.text=n,this.manual=i}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&Ho(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${ye.designSystemVariables.transitionDuration}, left ${ye.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(t){return(0,ye.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(t){return this.manual||this.matchesIgnored(t)}};K.elementDefinitions={"ft-typography":N};K.styles=dd;Ie([Vd()],K.prototype,"text",void 0);Ie([(0,be.property)({type:Boolean})],K.prototype,"manual",void 0);Ie([(0,be.property)({type:Boolean})],K.prototype,"inline",void 0);Ie([(0,ye.numberProperty)()],K.prototype,"delay",void 0);Ie([(0,be.property)()],K.prototype,"position",void 0);Ie([(0,ye.jsonProperty)([])],K.prototype,"ignoreMatchingElements",void 0);Ie([(0,be.queryAssignedNodes)()],K.prototype,"slotNodes",void 0);Ie([(0,be.query)(".ft-tooltip--container")],K.prototype,"container",void 0);Ie([(0,be.query)(".ft-tooltip")],K.prototype,"tooltip",void 0);Ie([(0,be.query)(".ft-tooltip--content")],K.prototype,"tooltipContent",void 0);Ie([(0,be.state)()],K.prototype,"visible",void 0);var jd=u(g());var Hd={"ft-tooltip":K};(0,jd.customElements)(Hd);var _r=Wt.build("designedViewer"),zd={fitToContainerAriaLabel:"Fill available space",zoomRealSizeAriaLabel:"Display content at original size",zoomInAriaLabel:"Zoom in",zoomOutAriaLabel:"Zoom out",rotateLeftAriaLabel:"Rotate left",rotateRightAriaLabel:"Rotate right"};var rr=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Tt=class extends(0,We.withConditionalVisibility)(Kt(It)){constructor(){super(...arguments),this.disabled=!1,this.tabindex=0,this.role="button",this.ariaLabel="",this.control=je.FIT_TO_CONTAINER,this.controlDefinitions={[je.FIT_TO_CONTAINER]:{ariaLabel:()=>_r.messages.fitToContainerAriaLabel(),icon:Gt.ZOOM_FULLSCREEN,run:()=>{var t;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setZoom(void 0)}},[je.ZOOM_REAL_SIZE]:{ariaLabel:()=>_r.messages.zoomRealSizeAriaLabel(),icon:Gt.ZOOM_REALSIZE,run:()=>{var t;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setZoom(1)}},[je.ZOOM_IN]:{ariaLabel:()=>_r.messages.zoomInAriaLabel(),icon:Gt.ZOOM_IN,disabled:()=>{var t;return((t=this.zoom)!==null&&t!==void 0?t:1)>20},run:()=>{var t,r;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setZoom(((r=this.zoom)!==null&&r!==void 0?r:1)*1.2)}},[je.ZOOM_OUT]:{ariaLabel:()=>_r.messages.zoomOutAriaLabel(),icon:Gt.ZOOM_OUT,disabled:()=>{var t;return((t=this.zoom)!==null&&t!==void 0?t:1)<.05},run:()=>{var t,r;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setZoom(((r=this.zoom)!==null&&r!==void 0?r:1)/1.2)}},[je.ROTATE_LEFT]:{ariaLabel:()=>_r.messages.rotateLeftAriaLabel(),icon:Gt.ARROW_ROTATE_LEFT,run:()=>{var t;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setRotation(this.rotation-90)}},[je.ROTATE_RIGHT]:{ariaLabel:()=>_r.messages.rotateRightAriaLabel(),icon:Gt.ARROW_ROTATE_RIGHT,run:()=>{var t;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setRotation(this.rotation+90)}}},this.modifyContent=()=>{var t;(t=this.controlDefinitions[this.control])===null||t===void 0||t.run()}}render(){var t;return this.isVisible?Ui.html`
323
323
  <slot>
324
324
  <ft-tooltip text="${this.ariaLabel}">
325
- <ft-icon value="${(e=this.controlDefinitions[this.control])===null||e===void 0?void 0:e.icon}"></ft-icon>
325
+ <ft-icon value="${(t=this.controlDefinitions[this.control])===null||t===void 0?void 0:t.icon}"></ft-icon>
326
326
  </ft-tooltip>
327
327
  </slot>
328
- `:ur.nothing}willUpdate(e){var r,n,i,o;super.willUpdate(e),this.updateAriaLabel(),this.disabled=(i=(n=(r=this.controlDefinitions[this.control])===null||r===void 0?void 0:r.disabled)===null||n===void 0?void 0:n.call(r))!==null&&i!==void 0?i:!1,this.isVisible=!!(!((o=this.descriptor)===null||o===void 0)&&o.viewableInCurrentBrowser)&&this.descriptor.mimeType.startsWith("image/")}onI18nUpdate(e){super.onI18nUpdate(e),this.updateAriaLabel()}updateAriaLabel(){var e;this.ariaLabel=(e=this.controlDefinitions[this.control])===null||e===void 0?void 0:e.ariaLabel()}connectedCallback(){super.connectedCallback(),this.addI18nContext(at,Sc),this.updateComplete.then(()=>{var e;return(e=this.tooltip)===null||e===void 0?void 0:e.setupFor(this)}),this.addEventListener("click",this.modifyContent)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.modifyContent)}};z.elementDefinitions={"ft-icon":W,"ft-tooltip":U};z.styles=ur.css`
328
+ `:Ui.nothing}willUpdate(t){var r,i,n,o;super.willUpdate(t),this.updateAriaLabel(),this.disabled=(n=(i=(r=this.controlDefinitions[this.control])===null||r===void 0?void 0:r.disabled)===null||i===void 0?void 0:i.call(r))!==null&&n!==void 0?n:!1,this.isVisible=!!(!((o=this.descriptor)===null||o===void 0)&&o.viewableInCurrentBrowser)&&this.descriptor.mimeType.startsWith("image/")}onI18nUpdate(t){super.onI18nUpdate(t),this.updateAriaLabel()}updateAriaLabel(){var t;this.ariaLabel=(t=this.controlDefinitions[this.control])===null||t===void 0?void 0:t.ariaLabel()}connectedCallback(){super.connectedCallback(),this.addI18nContext(_r,zd),this.updateComplete.then(()=>{var t;return(t=this.tooltip)===null||t===void 0?void 0:t.setupFor(this)}),this.addEventListener("click",this.modifyContent)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.modifyContent)}};Tt.elementDefinitions={"ft-icon":V,"ft-tooltip":K};Tt.styles=Ui.css`
329
329
  :host {
330
330
  display: inline-block;
331
331
  opacity: 1;
@@ -348,48 +348,48 @@
348
348
  width: 40px;
349
349
  height: 40px;
350
350
  border-radius: 50%;
351
- background-color: ${Pe.designSystemVariables.colorPrimary};
352
- color: ${Pe.designSystemVariables.colorOnPrimary};
351
+ background-color: ${We.designSystemVariables.colorPrimary};
352
+ color: ${We.designSystemVariables.colorOnPrimary};
353
353
  cursor: pointer;
354
354
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
355
355
  }
356
356
 
357
357
  :host:hover, :host:focus-within {
358
358
  ft-icon {
359
- background-color: hsl(from ${Pe.designSystemVariables.colorPrimary} h s calc(l + 30));
359
+ background-color: hsl(from ${We.designSystemVariables.colorPrimary} h s calc(l + 30));
360
360
  }
361
361
  }
362
- `;Be([(0,lt.property)({type:Boolean,reflect:!0})],z.prototype,"disabled",void 0);Be([(0,lt.property)({reflect:!0})],z.prototype,"tabindex",void 0);Be([(0,lt.property)({reflect:!0})],z.prototype,"role",void 0);Be([(0,lt.property)({reflect:!0,attribute:"aria-label"})],z.prototype,"ariaLabel",void 0);Be([(0,lt.property)()],z.prototype,"control",void 0);Be([(0,Pe.redux)({store:"viewer"})],z.prototype,"descriptor",void 0);Be([(0,Pe.redux)({store:"viewer",selector:({contentModifiers:t})=>t.zoom})],z.prototype,"zoom",void 0);Be([(0,Pe.redux)({store:"viewer",selector:({contentModifiers:t})=>t.rotation})],z.prototype,"rotation",void 0);Be([(0,lt.query)("ft-tooltip")],z.prototype,"tooltip",void 0);var qn=class extends oe(z){};var wc=f(A()),dr=f(T());var Ud=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Ve=class extends X{render(){return this.filename?dr.html`
363
- <ft-typography variant="${Z.body1}" part="filename">
362
+ `;rr([(0,Tr.property)({type:Boolean,reflect:!0})],Tt.prototype,"disabled",void 0);rr([(0,Tr.property)({reflect:!0})],Tt.prototype,"tabindex",void 0);rr([(0,Tr.property)({reflect:!0})],Tt.prototype,"role",void 0);rr([(0,Tr.property)({reflect:!0,attribute:"aria-label"})],Tt.prototype,"ariaLabel",void 0);rr([(0,Tr.property)()],Tt.prototype,"control",void 0);rr([(0,We.redux)({store:"viewer"})],Tt.prototype,"descriptor",void 0);rr([(0,We.redux)({store:"viewer",selector:({contentModifiers:e})=>e.zoom})],Tt.prototype,"zoom",void 0);rr([(0,We.redux)({store:"viewer",selector:({contentModifiers:e})=>e.rotation})],Tt.prototype,"rotation",void 0);rr([(0,Tr.query)("ft-tooltip")],Tt.prototype,"tooltip",void 0);var jo=class extends de(Tt){};var Wd=u(g()),Fi=u(A());var Tm=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ir=class extends It{render(){return this.filename?Fi.html`
363
+ <ft-typography variant="${H.body1}" part="filename">
364
364
  ${this.filename}
365
365
  </ft-typography>
366
- `:dr.nothing}};Ve.elementDefinitions={"ft-typography":F};Ve.styles=dr.css`
366
+ `:Fi.nothing}};ir.elementDefinitions={"ft-typography":N};ir.styles=Fi.css`
367
367
  [part="filename"]::part(text) {
368
368
  margin: unset;
369
369
  }
370
- `;Ud([(0,wc.redux)({store:"viewer",selector:({descriptor:t})=>t?.filename})],Ve.prototype,"filename",void 0);var Yn=class extends oe(Ve){};var Cc=f(A()),pr=f(T());var $d=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Ot=class extends X{render(){return this.displayName?pr.html`
371
- <ft-typography variant="${Z.title}" part="display-name" element="h2">
370
+ `;Tm([(0,Wd.redux)({store:"viewer",selector:({descriptor:e})=>e?.filename})],ir.prototype,"filename",void 0);var zo=class extends de(ir){};var Kd=u(g()),Vi=u(A());var Om=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Jr=class extends It{render(){return this.displayName?Vi.html`
371
+ <ft-typography variant="${H.title}" part="display-name" element="h2">
372
372
  ${this.displayName}
373
373
  </ft-typography>
374
- `:pr.nothing}};Ot.elementDefinitions={"ft-typography":F};Ot.styles=pr.css`
374
+ `:Vi.nothing}};Jr.elementDefinitions={"ft-typography":N};Jr.styles=Vi.css`
375
375
  [part="display-name"]::part(text) {
376
376
  margin: unset;
377
377
  }
378
- `;$d([(0,Cc.redux)({store:"viewer",selector:({descriptor:t})=>t?.displayName})],Ot.prototype,"displayName",void 0);var Xn=class extends oe(Ot){};var Kr=f(A()),Zn=f(T());var Oc=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Fe=class extends X{render(){var e,r;return this.mimeType?Zn.html`
378
+ `;Om([(0,Kd.redux)({store:"viewer",selector:({descriptor:e})=>e?.displayName})],Jr.prototype,"displayName",void 0);var Wo=class extends de(Jr){};var Ln=u(g()),Ko=u(A());var Gd=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},nr=class extends It{render(){var t,r;return this.mimeType?Ko.html`
379
379
  <ft-icon part="icon"
380
- variant="${Le.file_format}"
381
- value="${Hn(this.mimeType,(0,Kr.last)((r=(e=this.filename)===null||e===void 0?void 0:e.split("."))!==null&&r!==void 0?r:[]))}"></ft-icon>
382
- `:Zn.nothing}};Fe.elementDefinitions={"ft-icon":W};Oc([(0,Kr.redux)({store:"viewer",selector:({descriptor:t})=>t?.mimeType})],Fe.prototype,"mimeType",void 0);Oc([(0,Kr.redux)({store:"viewer",selector:({descriptor:t})=>t?.filename})],Fe.prototype,"filename",void 0);var Jn=class extends oe(Fe){};var Tc=f(A()),fr=f(T());var Hd=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},We=class extends X{render(){return this.documentTitle?fr.html`
383
- <ft-typography variant="${Z.title}" part="title" element="h1">
380
+ variant="${kt.file_format}"
381
+ value="${ko(this.mimeType,(0,Ln.last)((r=(t=this.filename)===null||t===void 0?void 0:t.split("."))!==null&&r!==void 0?r:[]))}"></ft-icon>
382
+ `:Ko.nothing}};nr.elementDefinitions={"ft-icon":V};Gd([(0,Ln.redux)({store:"viewer",selector:({descriptor:e})=>e?.mimeType})],nr.prototype,"mimeType",void 0);Gd([(0,Ln.redux)({store:"viewer",selector:({descriptor:e})=>e?.filename})],nr.prototype,"filename",void 0);var Go=class extends de(nr){};var qd=u(g()),Bi=u(A());var Rm=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},or=class extends It{render(){return this.documentTitle?Bi.html`
383
+ <ft-typography variant="${H.title}" part="title" element="h1">
384
384
  ${this.documentTitle}
385
385
  </ft-typography>
386
- `:fr.nothing}};We.elementDefinitions={"ft-typography":F};We.styles=fr.css`
386
+ `:Bi.nothing}};or.elementDefinitions={"ft-typography":N};or.styles=Bi.css`
387
387
  [part="title"]::part(text) {
388
388
  margin: unset;
389
389
  }
390
- `;Hd([(0,Tc.redux)({store:"viewer",selector:({document:t})=>t?.title})],We.prototype,"documentTitle",void 0);var Qn=class extends oe(We){};var Rc=f(T()),Lc=f(N());var hr=f(A());var ei=class extends B{getDocument(e){return this.cache.get(e,()=>this.api.getUnstructuredDocument(e))}getAttachments(e){return this.cache.get(`${e}-attachments`,()=>this.api.getUdAttachments(e))}getAttachmentDownloadLink(e,r){return this.makeAbsolute(`${this.api.endpoints.khub.documents.documentId(e).attachments.attachmentId(r).content}?download=true&locationValue=viewer`)}makeAbsolute(e){return this.api.makeAbsolute(e)}async getDocumentRating(e){}async rateDocument(e,r,n){}async unrateDocument(e){}async sendDocumentFeedback(e,r){}};var ti=class t extends It{static build(e){return new t(Xr(e),new ei)}constructor(e,r){super(e),this.store=e,this.service=r,e.actions.origin(Je.UNSTRUCTURED_DOCUMENT)}async load(){var e,r;let{documentId:n}=this.store.getState();if(n){let i=await this.service.getDocument(n);this.store.actions.unstructuredDocument(i),this.store.actions.document({type:hn.UNSTRUCTURED_DOCUMENT,id:i.id,lang:(e=i.lang)!==null&&e!==void 0?e:"en-US",title:i.title,metadata:i.metadata,portalUrl:i.viewerUrl});let o=await le.await();this.store.actions.descriptor({id:i.id,portalUrl:i.viewerUrl,filename:i.filename,fingerprint:i.lastEdition,displayName:i.title,alt:(r=i.description)!==null&&r!==void 0?r:i.title,mimeType:i.mimeType,size:0,viewableInCurrentBrowser:i.viewableInCurrentBrowser,contentUrl:o.makeAbsolute(i.contentApiEndpoint)}),this.store.actions.watermark(i.watermark)}return this.store.getState()}clear(){this.store.clearKeeping("documentId","origin")}reload(){return this.clear(),this.load()}setDocumentId(e){return this.store.actions.documentId(e),this.reload()}};var ri=f(A()),_o=f(N());var _c=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Ro=Symbol("ud-viewer-state-manager"),he=(0,ri.applyMixinOnce)(Symbol("toFtUdViewerComponent"),function(t){class e extends t{constructor(){super(...arguments),this.neededUdvRequests=[]}get service(){var n;return(n=this.viewerStateManager)===null||n===void 0?void 0:n.service}willUpdate(n){var i,o,s;super.willUpdate(n),n.has("viewerStateManager")&&(this.unregisterFromUdvStateManager(n.get("viewerStateManager")),this.registerToUdvStateManager(this.viewerStateManager)),n.has("neededUdvRequests")&&((i=this.viewerStateManager)===null||i===void 0||i.unregisterComponent(this,(o=n.get("neededUdvRequests"))!==null&&o!==void 0?o:[]),(s=this.viewerStateManager)===null||s===void 0||s.registerComponent(this,this.neededUdvRequests))}registerToUdvStateManager(n){n&&(n.registerComponent(this,this.neededUdvRequests),this.addStore(n.store,"viewer"))}unregisterFromUdvStateManager(n){n&&(n.unregisterComponent(this,this.neededUdvRequests),this.removeStore("viewer"))}connectedCallback(){super.connectedCallback(),this.registerToUdvStateManager(this.viewerStateManager)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterFromUdvStateManager(this.viewerStateManager)}}return _c([xr({context:Ro,subscribe:!0}),(0,_o.state)()],e.prototype,"viewerStateManager",void 0),_c([(0,_o.state)({hasChanged:ri.hasChanged})],e.prototype,"neededUdvRequests",void 0),e});var Lo=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Tt=class extends hr.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=ti.build(this.id||(0,hr.randomId)(6))}render(){return Rc.html`
390
+ `;Rm([(0,qd.redux)({store:"viewer",selector:({document:e})=>e?.title})],or.prototype,"documentTitle",void 0);var qo=class extends de(or){};var Xd=u(A()),Jd=u($());var ti=u(g());var Zd;(function(e){e.RATING="RATING"})(Zd||(Zd={}));var Or;(function(e){e.udAttachmentsUpdate="ud-attachments-update",e.udRatingUpdate="ud-rating-update",e.clusteringHelperCreated="clustering-helper-created"})(Or||(Or={}));var Rr;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING"})(Rr||(Rr={}));var Zo=class extends Ct{getDocument(t){return this.cache.get(t,()=>this.api.getUnstructuredDocument(t))}getAttachments(t){return this.cache.get(`${t}-attachments`,()=>this.api.getUdAttachments(t))}getAttachmentDownloadLink(t,r){return this.makeAbsolute(`${this.api.endpoints.khub.documents.documentId(t).attachments.attachmentId(r).content}?download=true&locationValue=viewer`)}makeAbsolute(t){return this.api.makeAbsolute(t)}async awaitMakeAbsolute(t){return(await this.awaitApi).makeAbsolute(t)}async getDocumentRating(t){return(await this.api.getDocumentRating(t)).publication}async rateDocument(t,r,i){return this.api.rateDocument(t,r,i)}async unrateDocument(t){return this.api.unrateDocument(t)}async sendDocumentFeedback(t,r,i){return this.api.sendDocumentFeedback(t,r,i)}isFeatureAccessible(t,{session:r}){switch(t){case Rr.FEEDBACK:return cn(r??[],tt.FEEDBACK_USER);case Rr.RATING:return cn(r??[],tt.RATING_USER);default:return!1}}getConfiguration(){return this.cache.get("configuration",()=>this.api.getViewerConfiguration())}clearConfiguration(){this.cache.clear("configuration")}fetchRelativesForDocument(t,r){let i={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:t,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(i)}getRelativesForDocument(t,r){return this.cache.get("document-relatives-"+t+"-"+r.join("-"),()=>this.fetchRelativesForDocument(t,r))}};var Qr=u(g());var Yo=class e extends pi{static build(t){return new e(Bn(t),new Zo)}constructor(t,r,i){super(t),this.store=t,this.service=r,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,t.actions.origin(gr.UNSTRUCTURED_DOCUMENT)}async load(){var t,r;let{documentId:i}=this.store.getState();if(i){let[n]=await Promise.all([this.service.getDocument(i),this.loadConfiguration()]);this.store.actions.unstructuredDocument(n),this.store.actions.document({type:oo.UNSTRUCTURED_DOCUMENT,id:n.id,lang:(t=n.lang)!==null&&t!==void 0?t:"en-US",title:n.title,metadata:n.metadata,portalUrl:n.viewerUrl});let o=await this.service.awaitMakeAbsolute(n.contentApiEndpoint);this.store.actions.descriptor({id:n.id,portalUrl:n.viewerUrl,filename:n.filename,fingerprint:n.lastEdition,displayName:n.title,alt:(r=n.description)!==null&&r!==void 0?r:n.title,mimeType:n.mimeType,size:0,viewableInCurrentBrowser:n.viewableInCurrentBrowser,contentUrl:o}),this.store.actions.watermark(n.watermark),this.fetchMapRating(),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives()}return this.store.getState()}async fetchMapRating(){var t;let{documentId:r}=this.store.getState();r&&this.store.actions.documentRating(await((t=this.service)===null||t===void 0?void 0:t.getDocumentRating(r)))}clear(){this.store.clearKeeping("documentId","origin")}reload(){var t;return this.clear(),(t=this.service)===null||t===void 0||t.clearConfiguration(),this.load()}setDocumentId(t){return this.store.actions.documentId(t),this.reload()}async loadConfiguration(){var t;return(t=this.service)===null||t===void 0?void 0:t.getConfiguration().then(r=>this.store.actions.configuration(r))}async fetchRelatives(){var t,r;let i=(t=this.store.getState().document)===null||t===void 0?void 0:t.metadata.filter(n=>{var o;return n.key==((o=this.store.getState().configuration)===null||o===void 0?void 0:o.relativePivotMetadata)}).flatMap(n=>n.values);if(i!==void 0&&i.length>0){let n=await((r=this.service)===null||r===void 0?void 0:r.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,i)),o=n?.results.flatMap(s=>s.entries);this.store.actions.relatives(o)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(Or.clusteringHelperCreated))}createClusteringHelper(){var t,r;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let i=this.store.getState().relatives;if(i){let n=i.find(s=>(0,Qr.accessResultId)(s)==this.store.getState().documentId),o=(r=(t=w.getState().metadataConfiguration)===null||t===void 0?void 0:t.descriptors)!==null&&r!==void 0?r:[];return new Qr.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,o)}}registerMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.add(t),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.delete(t),this.updateClusteringHelper()}async getRelativeDocumentUrlForLocale(t){var r;this.store.getState().relatives==null&&await this.fetchRelatives();let i=Qr.ClusteringHelper.findResultWithMetadataValue((r=this.store.getState().relatives)!==null&&r!==void 0?r:[],"ft:locale",t);return(0,Qr.accessResultUrl)(i)}};var Xo=u(g()),Ga=u($());var Yd=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},qa=Symbol("ud-viewer-state-manager"),Dt=(0,Xo.applyMixinOnce)(Symbol("toFtUdViewerComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededUdvRequests=[]}get service(){var i;return(i=this.viewerStateManager)===null||i===void 0?void 0:i.service}willUpdate(i){var n,o,s;super.willUpdate(i),i.has("viewerStateManager")&&(this.unregisterFromUdvStateManager(i.get("viewerStateManager")),this.registerToUdvStateManager(this.viewerStateManager)),i.has("neededUdvRequests")&&((n=this.viewerStateManager)===null||n===void 0||n.unregisterComponent(this,(o=i.get("neededUdvRequests"))!==null&&o!==void 0?o:[]),(s=this.viewerStateManager)===null||s===void 0||s.registerComponent(this,this.neededUdvRequests))}setUdvStateManager(i){this.clearStateManager(),this.viewerStateManager=i,this.addStore(i.store,"viewer")}clearStateManager(){this.viewerStateManager&&(this.removeStore("viewer"),this.viewerStateManager=void 0)}registerToUdvStateManager(i){i&&(i.registerComponent(this,this.neededUdvRequests),this.addStore(i.store,"viewer"))}unregisterFromUdvStateManager(i){i&&(i.unregisterComponent(this,this.neededUdvRequests),this.removeStore("viewer"))}connectedCallback(){super.connectedCallback(),this.registerToUdvStateManager(this.viewerStateManager)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterFromUdvStateManager(this.viewerStateManager)}}return Yd([en({context:qa,subscribe:!0}),(0,Ga.state)()],t.prototype,"viewerStateManager",void 0),Yd([(0,Ga.state)({hasChanged:Xo.hasChanged})],t.prototype,"neededUdvRequests",void 0),t});var Jo=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Lr=class extends ti.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=Yo.build(this.id||(0,ti.randomId)(6))}render(){return Xd.html`
391
391
  <slot></slot>
392
- `}willUpdate(e){super.willUpdate(e),e.has("documentId")&&this.initStateManager()}async initStateManager(){let e=await this.viewerStateManager.setDocumentId(this.documentId);this.documentId&&this.dispatchEvent(new gt(e))}connectedCallback(){super.connectedCallback(),this.addStore(w)}onAuthenticationChange(){this.viewerStateManager.reload()}};Lo([(0,Lc.property)()],Tt.prototype,"documentId",void 0);Lo([yr({context:Ro})],Tt.prototype,"viewerStateManager",void 0);Lo([(0,hr.reduxEventListener)({eventName:_e.eventName})],Tt.prototype,"onAuthenticationChange",null);var Nc;(function(t){t.RATING="RATING"})(Nc||(Nc={}));var ni;(function(t){t.udAttachmentsUpdate="ud-attachments-update"})(ni||(ni={}));var ii=class extends he(P){};var oi=class extends he(z){};var si=class extends he(Ve){};var ai=class extends he(We){};var li=class extends he(Fe){};var hi=f(A());var $=f(A()),Pc={itemsGap:$.FtCssVariableFactory.create("--ft-reader-attachments-items-gap","","SIZE","8px"),itemPadding:$.FtCssVariableFactory.create("--ft-reader-attachments-item-padding","","SIZE","8px"),itemBorderWidth:$.FtCssVariableFactory.create("--ft-reader-attachments-item-border-width","","SIZE","1px"),itemBorderColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-color","",$.designSystemVariables.colorOutline),itemBorderRadius:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-radius","",$.designSystemVariables.borderRadiusS),itemBackgroundColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-background-color","",$.designSystemVariables.colorSurface),itemTextColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-text-color","",$.designSystemVariables.colorOnSurfaceMedium),itemHoverBackgroundColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-background-color","",$.designSystemVariables.colorPrimary),itemHoverTextColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-text-color","",$.designSystemVariables.colorOnSurfaceHigh),fileFormatIconSize:$.FtCssVariableFactory.create("--ft-reader-attachments-file-format-icon-size","","SIZE","30px"),downloadIconSize:$.FtCssVariableFactory.create("--ft-reader-attachments-down-icon-size","","SIZE","20px")};var fi=f(A());var ui=f(A()),Dc=f(N());var ci;(function(t){t.clusteringHelperCreated="clustering-helper-created",t.mapAttachmentsUpdate="map-attachments-update",t.visibleTopicChange="visible-topic-change",t.requestedTopicNotFound="requested-topic-not-found"})(ci||(ci={}));var Mc;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Mc||(Mc={}));var jd=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Po=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},No=Symbol("registerInterval"),Mo=(0,ui.applyMixinOnce)(Symbol("toFtReaderComponent"),function(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var i;return(i=this.stateManager)===null||i===void 0?void 0:i.service}connectedCallback(){super.connectedCallback(),this[No]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[No]):this.dispatchEvent(new Po)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=No,jd([(0,Dc.state)()],r.prototype,"stateManager",void 0),r}),Ic=class extends Mo(ui.FtLitElementRedux){};var Io=et.build("designedReaderAttachments"),kc={download:"Download \u201C{0}\u201D"};var _t=f(T()),mr=f(N()),vr=f(A()),Yc=f(eo());var Xc=f(Do());var zc=f(T()),K=f(N()),Kc=f(Do()),Gr=f(A());var Fc=f(T()),D=f(A()),$c=D.FtCssVariableFactory.extend("--ft-ripple-color","",D.designSystemVariables.colorContent),Me={color:$c,backgroundColor:D.FtCssVariableFactory.extend("--ft-ripple-background-color","",$c),opacityContentOnSurfacePressed:D.FtCssVariableFactory.external(D.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:D.FtCssVariableFactory.external(D.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:D.FtCssVariableFactory.external(D.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:D.FtCssVariableFactory.external(D.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:D.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Hc=D.FtCssVariableFactory.extend("--ft-ripple-color","",D.designSystemVariables.colorPrimary),jc={color:Hc,backgroundColor:D.FtCssVariableFactory.extend("--ft-ripple-background-color","",Hc)},Bc=D.FtCssVariableFactory.extend("--ft-ripple-color","",D.designSystemVariables.colorSecondary),Vc={color:Bc,backgroundColor:D.FtCssVariableFactory.extend("--ft-ripple-background-color","",Bc)},Wc=Fc.css`
392
+ `}willUpdate(t){super.willUpdate(t),t.has("documentId")&&this.initStateManager()}async initStateManager(){let t=await this.viewerStateManager.setDocumentId(this.documentId);this.documentId&&this.dispatchEvent(new jr(t))}connectedCallback(){super.connectedCallback(),this.addStore(w)}onAuthenticationChange(){this.viewerStateManager.reload()}async reactToUiLocaleChanged(t){var r;if(!((r=w.getState().localesConfiguration)===null||r===void 0)&&r.uiLanguageSetsReaderLanguage){Ai===null||Ai===void 0||Ai.stopReloadDebouncer();let i=await this.viewerStateManager.getRelativeDocumentUrlForLocale(t.detail.uiLocale);i?window.location.assign(i):window.location.reload()}}};Jo([(0,Jd.property)()],Lr.prototype,"documentId",void 0);Jo([tn({context:qa})],Lr.prototype,"viewerStateManager",void 0);Jo([(0,ti.reduxEventListener)({eventName:Be.eventName})],Lr.prototype,"onAuthenticationChange",null);Jo([(0,ti.reduxEventListener)({store:w.name,eventName:Fr.eventName})],Lr.prototype,"reactToUiLocaleChanged",null);var Qo=class extends Dt(st){};var ts=class extends Dt(Tt){};var es=class extends Dt(ir){};var rs=class extends Dt(or){};var is=class extends Dt(nr){};var cs=u(g());var vt=u(g()),Qd={itemsGap:vt.FtCssVariableFactory.create("--ft-reader-attachments-items-gap","","SIZE","8px"),itemPadding:vt.FtCssVariableFactory.create("--ft-reader-attachments-item-padding","","SIZE","8px"),itemBorderWidth:vt.FtCssVariableFactory.create("--ft-reader-attachments-item-border-width","","SIZE","1px"),itemBorderColor:vt.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-color","",vt.designSystemVariables.colorOutline),itemBorderRadius:vt.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-radius","",vt.designSystemVariables.borderRadiusS),itemBackgroundColor:vt.FtCssVariableFactory.extend("--ft-reader-attachments-item-background-color","",vt.designSystemVariables.colorSurface),itemTextColor:vt.FtCssVariableFactory.extend("--ft-reader-attachments-item-text-color","",vt.designSystemVariables.colorOnSurfaceMedium),itemHoverBackgroundColor:vt.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-background-color","",vt.designSystemVariables.colorPrimary),itemHoverTextColor:vt.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-text-color","",vt.designSystemVariables.colorOnSurfaceHigh),fileFormatIconSize:vt.FtCssVariableFactory.create("--ft-reader-attachments-file-format-icon-size","","SIZE","30px"),downloadIconSize:vt.FtCssVariableFactory.create("--ft-reader-attachments-down-icon-size","","SIZE","20px")};var ls=u(g());var os=u(g()),rp=u($());var ns;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change",e.requestedTopicNotFound="requested-topic-not-found"})(ns||(ns={}));var tp;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(tp||(tp={}));var Lm=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ya=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Za=Symbol("registerInterval"),Xa=(0,os.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var n;return(n=this.stateManager)===null||n===void 0?void 0:n.service}connectedCallback(){super.connectedCallback(),this[Za]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Za]):this.dispatchEvent(new Ya)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=Za,Lm([(0,rp.state)()],r.prototype,"stateManager",void 0),r}),ep=class extends Xa(os.FtLitElementRedux){};var Ja=Wt.build("designedReaderAttachments"),ip={download:"Download \u201C{0}\u201D"};var ei=u(A()),Hi=u($()),ji=u(g()),gp=u(Ci());var vp=u(oe());var pp=u(A()),Ot=u($()),fp=u(oe()),Pn=u(g());var up=u(A()),ht=u(g()),op=ht.FtCssVariableFactory.extend("--ft-ripple-color","",ht.designSystemVariables.colorContent),W={color:op,backgroundColor:ht.FtCssVariableFactory.extend("--ft-ripple-background-color","",op),opacityContentOnSurfacePressed:ht.FtCssVariableFactory.external(ht.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ht.FtCssVariableFactory.external(ht.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ht.FtCssVariableFactory.external(ht.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ht.FtCssVariableFactory.external(ht.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:ht.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},sp=ht.FtCssVariableFactory.extend("--ft-ripple-color","",ht.designSystemVariables.colorPrimary),ap={color:sp,backgroundColor:ht.FtCssVariableFactory.extend("--ft-ripple-background-color","",sp)},lp=ht.FtCssVariableFactory.extend("--ft-ripple-color","",ht.designSystemVariables.colorSecondary),cp={color:lp,backgroundColor:ht.FtCssVariableFactory.extend("--ft-ripple-background-color","",lp)},dp=up.css`
393
393
  :host {
394
394
  display: contents;
395
395
  }
@@ -402,7 +402,7 @@
402
402
 
403
403
  .ft-ripple:not(.ft-ripple--unbounded) {
404
404
  overflow: hidden;
405
- border-radius: ${Me.borderRadius};
405
+ border-radius: ${W.borderRadius};
406
406
  }
407
407
 
408
408
  .ft-ripple .ft-ripple--background,
@@ -436,27 +436,27 @@
436
436
  }
437
437
 
438
438
  .ft-ripple .ft-ripple--background {
439
- background-color: ${Me.backgroundColor};
439
+ background-color: ${W.backgroundColor};
440
440
  }
441
441
 
442
442
  .ft-ripple .ft-ripple--effect {
443
- background-color: ${Me.color};
443
+ background-color: ${W.color};
444
444
  }
445
445
 
446
446
  .ft-ripple.ft-ripple--secondary .ft-ripple--background {
447
- background-color: ${Vc.backgroundColor};
447
+ background-color: ${cp.backgroundColor};
448
448
  }
449
449
 
450
450
  .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
451
- background-color: ${Vc.color};
451
+ background-color: ${cp.color};
452
452
  }
453
453
 
454
454
  .ft-ripple.ft-ripple--primary .ft-ripple--background {
455
- background-color: ${jc.backgroundColor};
455
+ background-color: ${ap.backgroundColor};
456
456
  }
457
457
 
458
458
  .ft-ripple.ft-ripple--primary .ft-ripple--effect {
459
- background-color: ${jc.color};
459
+ background-color: ${ap.color};
460
460
  }
461
461
 
462
462
  .ft-ripple .ft-ripple--background {
@@ -486,35 +486,35 @@
486
486
  }
487
487
 
488
488
  .ft-ripple.ft-ripple--hovered .ft-ripple--background {
489
- opacity: ${Me.opacityContentOnSurfaceHover};
489
+ opacity: ${W.opacityContentOnSurfaceHover};
490
490
  }
491
491
 
492
492
  .ft-ripple.ft-ripple--selected .ft-ripple--background {
493
- opacity: ${Me.opacityContentOnSurfaceSelected};
493
+ opacity: ${W.opacityContentOnSurfaceSelected};
494
494
  }
495
495
 
496
496
  .ft-ripple.ft-ripple--focused .ft-ripple--background {
497
- opacity: ${Me.opacityContentOnSurfaceFocused};
497
+ opacity: ${W.opacityContentOnSurfaceFocused};
498
498
  }
499
499
 
500
500
  .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
501
- opacity: ${Me.opacityContentOnSurfacePressed};
501
+ opacity: ${W.opacityContentOnSurfacePressed};
502
502
  transform: translate(-50%, -50%) scale(1);
503
503
  }
504
- `;var Q=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},L=class extends Gr.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new Gr.Debouncer(1e3),this.onTransitionStart=e=>{e.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=e=>{e.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new Gr.Debouncer(10),this.moveRipple=e=>{var r,n;let{x:i,y:o}=this.getCoordinates(e),s=(n=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&n!==void 0?n:{x:0,y:0,width:0,height:0};this.originX=Math.round(i!=null?i-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=e=>{this.moveRipple(e),this.pressed=!this.isIgnored(e)},this.endPress=()=>{this.pressed=!1},this.startHover=e=>{this.hovered=!this.isIgnored(e)},this.endHover=()=>{this.hovered=!1},this.startFocus=e=>{this.focused=this.isFocusVisible(e?.target)&&!this.isIgnored(e)},this.endFocus=()=>{this.focused=!1}}render(){let e={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return zc.html`
504
+ `;var Zt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},D=class extends Pn.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new Pn.Debouncer(1e3),this.onTransitionStart=t=>{t.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=t=>{t.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new Pn.Debouncer(10),this.moveRipple=t=>{var r,i;let{x:n,y:o}=this.getCoordinates(t),s=(i=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&i!==void 0?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(n!=null?n-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(t?.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return pp.html`
505
505
  <style>
506
506
  .ft-ripple .ft-ripple--effect {
507
507
  left: ${this.originX}px;
508
508
  top: ${this.originY}px;
509
509
  }
510
510
  </style>
511
- <div class="${(0,Kc.classMap)(e)}">
511
+ <div class="${(0,fp.classMap)(t)}">
512
512
  <div class="ft-ripple--background"></div>
513
513
  <div class="ft-ripple--effect"></div>
514
514
  </div>
515
- `}contentAvailableCallback(e){super.contentAvailableCallback(e),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(e){var r,n;super.update(e),e.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(n=this.target)===null||n===void 0||n.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var e,r;let n=(e=this.shadowRoot)===null||e===void 0?void 0:e.host.parentElement;n&&this.setupFor((r=this.target)!==null&&r!==void 0?r:n)}forceFocusUpdate(){var e;!((e=this.target)===null||e===void 0)&&e.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(e){if(this.setupDebouncer.cancel(),this.target===e)return;this.onDisconnect&&this.onDisconnect(),this.target=e,e.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},n=r("mouseup","contextmenu"),i=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};e.addEventListener("mouseover",this.startHover,s),e.addEventListener("mousemove",this.moveRipple,s),e.addEventListener("mouseleave",this.endHover,s),e.addEventListener("mousedown",n,s),e.addEventListener("touchstart",i,s),e.addEventListener("touchmove",this.moveRipple,s),e.addEventListener("keydown",o,s),e.addEventListener("focus",this.startFocus,s),e.addEventListener("blur",this.endFocus,s),e.addEventListener("focusin",this.startFocus,s),e.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{e.removeAttribute("data-is-ft-ripple-target"),e.removeEventListener("mouseover",this.startHover,s),e.removeEventListener("mousemove",this.moveRipple,s),e.removeEventListener("mouseleave",this.endHover,s),e.removeEventListener("mousedown",n,s),e.removeEventListener("touchstart",i,s),e.removeEventListener("touchmove",this.moveRipple,s),e.removeEventListener("keydown",o,s),e.removeEventListener("focus",this.startFocus,s),e.removeEventListener("blur",this.endFocus,s),e.removeEventListener("focusin",this.startFocus,s),e.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(e){let r=e,n=e,i,o;return r.x!=null?{x:i,y:o}=r:n.touches!=null&&(i=n.touches[0].clientX,o=n.touches[0].clientY),{x:i,y:o}}isFocusVisible(e){return e instanceof HTMLElement?e.matches(":focus-visible"):!0}isIgnored(e){if(this.disabled)return!0;if(e!=null)for(let r of e.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};L.elementDefinitions={};L.styles=Wc;Q([(0,K.property)({type:Boolean})],L.prototype,"primary",void 0);Q([(0,K.property)({type:Boolean})],L.prototype,"secondary",void 0);Q([(0,K.property)({type:Boolean})],L.prototype,"unbounded",void 0);Q([(0,K.property)({type:Boolean})],L.prototype,"activated",void 0);Q([(0,K.property)({type:Boolean})],L.prototype,"selected",void 0);Q([(0,K.property)({type:Boolean})],L.prototype,"disabled",void 0);Q([(0,K.state)()],L.prototype,"hovered",void 0);Q([(0,K.state)()],L.prototype,"focused",void 0);Q([(0,K.state)()],L.prototype,"pressed",void 0);Q([(0,K.state)()],L.prototype,"rippling",void 0);Q([(0,K.state)()],L.prototype,"originX",void 0);Q([(0,K.state)()],L.prototype,"originY",void 0);Q([(0,K.query)(".ft-ripple")],L.prototype,"ripple",void 0);Q([(0,K.query)(".ft-ripple--effect")],L.prototype,"rippleEffect",void 0);var qc=f(A());var Gc={"ft-ripple":L};(0,qc.customElements)(Gc);var di=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Bd={"attachment-viewed":{label:"Opening attachment",defaultEventName:"attachment-open",defaultComponentId:"ft-reader-attachments"},"attachment-downloaded":{label:"Downloading attachment",defaultEventName:"attachment-download",defaultComponentId:"ft-reader-attachments"}},Ce=class extends(0,vr.withAnalytics)(vr.FtLitElementRedux,Bd){constructor(){super(...arguments),this.hideFileFormatIcon=!1,this.hideFilename=!1,this.hideDownloadIcon=!1}render(){if(this.canRender()){let e={"hide-file-format-icon":this.hideFileFormatIcon,"hide-filename":this.hideFilename,"hide-download-icon":this.hideDownloadIcon};return _t.html`
516
- <div part="container" class="${(0,Xc.classMap)(e)}">
517
- ${(0,Yc.repeat)(this.attachments,r=>r.id,r=>{var n;let i=Hn(r.mimeType,(0,vr.last)(r.file.split(".")));return _t.html`
515
+ `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var r,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,r;let i=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;i&&this.setupFor((r=this.target)!==null&&r!==void 0?r:i)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},i=r("mouseup","contextmenu"),n=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",i,s),t.addEventListener("touchstart",n,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",o,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",i,s),t.removeEventListener("touchstart",n,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",o,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let r=t,i=t,n,o;return r.x!=null?{x:n,y:o}=r:i.touches!=null&&(n=i.touches[0].clientX,o=i.touches[0].clientY),{x:n,y:o}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let r of t.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};D.elementDefinitions={};D.styles=dp;Zt([(0,Ot.property)({type:Boolean})],D.prototype,"primary",void 0);Zt([(0,Ot.property)({type:Boolean})],D.prototype,"secondary",void 0);Zt([(0,Ot.property)({type:Boolean})],D.prototype,"unbounded",void 0);Zt([(0,Ot.property)({type:Boolean})],D.prototype,"activated",void 0);Zt([(0,Ot.property)({type:Boolean})],D.prototype,"selected",void 0);Zt([(0,Ot.property)({type:Boolean})],D.prototype,"disabled",void 0);Zt([(0,Ot.state)()],D.prototype,"hovered",void 0);Zt([(0,Ot.state)()],D.prototype,"focused",void 0);Zt([(0,Ot.state)()],D.prototype,"pressed",void 0);Zt([(0,Ot.state)()],D.prototype,"rippling",void 0);Zt([(0,Ot.state)()],D.prototype,"originX",void 0);Zt([(0,Ot.state)()],D.prototype,"originY",void 0);Zt([(0,Ot.query)(".ft-ripple")],D.prototype,"ripple",void 0);Zt([(0,Ot.query)(".ft-ripple--effect")],D.prototype,"rippleEffect",void 0);var mp=u(g());var hp={"ft-ripple":D};(0,mp.customElements)(hp);var ss=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Pm={"attachment-viewed":{label:"Opening attachment",defaultEventName:"attachment-open",defaultComponentId:"ft-reader-attachments"},"attachment-downloaded":{label:"Downloading attachment",defaultEventName:"attachment-download",defaultComponentId:"ft-reader-attachments"}},ke=class extends(0,ji.withAnalytics)(ji.FtLitElementRedux,Pm){constructor(){super(...arguments),this.hideFileFormatIcon=!1,this.hideFilename=!1,this.hideDownloadIcon=!1}render(){if(this.canRender()){let t={"hide-file-format-icon":this.hideFileFormatIcon,"hide-filename":this.hideFilename,"hide-download-icon":this.hideDownloadIcon};return ei.html`
516
+ <div part="container" class="${(0,vp.classMap)(t)}">
517
+ ${(0,gp.repeat)(this.attachments,r=>r.id,r=>{var i;let n=ko(r.mimeType,(0,ji.last)(r.file.split(".")));return ei.html`
518
518
  <div part="attachment">
519
519
  <a part="viewer-link" href="${this.getAttachmentViewerLink(r)}"
520
520
  aria-label="${this.getAttachmentAriaLabel(r)}"
@@ -522,11 +522,11 @@
522
522
  <ft-ripple part="ripple viewer-link-ripple"></ft-ripple>
523
523
  <ft-icon part="file-format-icon"
524
524
  variant="file-format"
525
- value="${i}"
526
- style="color: ${(n=yo[i])!==null&&n!==void 0?n:yo[g.UNKNOWN]}"></ft-icon>
527
- <ft-typography part="name" variant="${Z.body2}">${r.name}</ft-typography>
525
+ value="${n}"
526
+ style="color: ${(i=Na[n])!==null&&i!==void 0?i:Na[y.UNKNOWN]}"></ft-icon>
527
+ <ft-typography part="name" variant="${H.body2}">${r.name}</ft-typography>
528
528
  </a>
529
- ${r.externalLink?_t.nothing:_t.html`
529
+ ${r.externalLink?ei.nothing:ei.html`
530
530
  <a part="download-link"
531
531
  target="_blank"
532
532
  href="${this.getAttachmentDownloadLink(r)}"
@@ -539,19 +539,19 @@
539
539
  </div>
540
540
  `})}
541
541
  </div>
542
- `}return _t.nothing}getAttachmentAriaLabel(e){var r;let n=e.name,i=e.file;if(n===i)return i;let o=(r=i.includes(".")?i.split(".").pop():e.mimeType)!==null&&r!==void 0?r:"";return n+" "+o}canRender(){var e,r;return((r=(e=this.attachments)===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)>0}getAttachmentDownloadLink(e){throw new Error("Not implemented")}getAttachmentDownloadLinkAriaLabel(e){throw new Error("Not implemented")}getAttachmentViewerLink(e){throw new Error("Not implemented")}};Ce.elementDefinitions={"ft-icon":W,"ft-ripple":L,"ft-typography":F};di([(0,mr.property)({type:Boolean})],Ce.prototype,"hideFileFormatIcon",void 0);di([(0,mr.property)({type:Boolean})],Ce.prototype,"hideFilename",void 0);di([(0,mr.property)({type:Boolean})],Ce.prototype,"hideDownloadIcon",void 0);di([(0,mr.state)()],Ce.prototype,"attachments",void 0);var Zc=f(T()),qr=f(A());function pi(t){return Zc.css`
542
+ `}return ei.nothing}getAttachmentAriaLabel(t){var r;let i=t.name,n=t.file;if(i===n)return n;let o=(r=n.includes(".")?n.split(".").pop():t.mimeType)!==null&&r!==void 0?r:"";return i+" "+o}canRender(){var t,r;return((r=(t=this.attachments)===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)>0}getAttachmentDownloadLink(t){throw new Error("Not implemented")}getAttachmentDownloadLinkAriaLabel(t){throw new Error("Not implemented")}getAttachmentViewerLink(t){throw new Error("Not implemented")}};ke.elementDefinitions={"ft-icon":V,"ft-ripple":D,"ft-typography":N};ss([(0,Hi.property)({type:Boolean})],ke.prototype,"hideFileFormatIcon",void 0);ss([(0,Hi.property)({type:Boolean})],ke.prototype,"hideFilename",void 0);ss([(0,Hi.property)({type:Boolean})],ke.prototype,"hideDownloadIcon",void 0);ss([(0,Hi.state)()],ke.prototype,"attachments",void 0);var yp=u(A()),In=u(g());function as(e){return yp.css`
543
543
  [part="container"] {
544
544
  display: flex;
545
545
  flex-direction: column;
546
- gap: ${t.itemsGap};
546
+ gap: ${e.itemsGap};
547
547
  }
548
548
 
549
549
  [part="attachment"] {
550
550
  border-style: solid;
551
- border-width: ${t.itemBorderWidth};
552
- border-color: ${t.itemBorderColor};
553
- border-radius: ${t.itemBorderRadius};
554
- background-color: ${t.itemBackgroundColor};
551
+ border-width: ${e.itemBorderWidth};
552
+ border-color: ${e.itemBorderColor};
553
+ border-radius: ${e.itemBorderRadius};
554
+ background-color: ${e.itemBackgroundColor};
555
555
  }
556
556
 
557
557
  [part="attachment"], [part="viewer-link"], [part="download-link"] {
@@ -561,14 +561,14 @@
561
561
 
562
562
  [part="viewer-link"], [part="download-link"] {
563
563
  position: relative;
564
- color: ${t.itemTextColor};
564
+ color: ${e.itemTextColor};
565
565
  text-decoration: none;
566
- padding: ${t.itemPadding};
566
+ padding: ${e.itemPadding};
567
567
  align-items: center;
568
568
  }
569
569
 
570
570
  [part="viewer-link"]:hover, [part="download-link"]:hover {
571
- color: ${t.itemHoverTextColor};
571
+ color: ${e.itemHoverTextColor};
572
572
  }
573
573
 
574
574
  [part="viewer-link"] {
@@ -583,16 +583,16 @@
583
583
  }
584
584
 
585
585
  [part~="ripple"] {
586
- ${(0,qr.setVariable)(Me.color,t.itemHoverBackgroundColor)};
587
- ${(0,qr.setVariable)(Me.borderRadius,t.itemBorderRadius)};
586
+ ${(0,In.setVariable)(W.color,e.itemHoverBackgroundColor)};
587
+ ${(0,In.setVariable)(W.borderRadius,e.itemBorderRadius)};
588
588
  }
589
589
 
590
590
  [part="file-format-icon"] {
591
- ${(0,qr.setVariable)(de.size,t.fileFormatIconSize)};
591
+ ${(0,In.setVariable)(ft.size,e.fileFormatIconSize)};
592
592
  }
593
593
 
594
594
  [part="download-icon"] {
595
- ${(0,qr.setVariable)(de.size,t.downloadIconSize)};
595
+ ${(0,In.setVariable)(ft.size,e.downloadIconSize)};
596
596
  }
597
597
 
598
598
  .hide-file-format-icon [part="file-format-icon"] {
@@ -606,47 +606,1625 @@
606
606
  .hide-download-icon [part="download-link"] {
607
607
  display: none;
608
608
  }
609
- `}var Jc=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Rt=class extends Mo(tt(Ce)){constructor(){super(),this.addI18nContext(Io,kc)}update(e){super.update(e),e.has("map")&&this.updateAttachments()}updateAttachments(){var e;this.map?(e=this.service)===null||e===void 0||e.getAttachments().then(r=>this.attachments=r):this.attachments=void 0}getAttachmentDownloadLink(e){var r,n;return(n=(r=this.service)===null||r===void 0?void 0:r.getAttachmentDownloadLink(e.id))!==null&&n!==void 0?n:""}getAttachmentDownloadLinkAriaLabel(e){return Io.messages.download(this.getAttachmentAriaLabel(e))}getAttachmentViewerLink(e){var r,n;return e.externalLink?e.viewerUrl:(r=this.service)===null||r===void 0?void 0:r.makeAbsolute((n=e.viewerUrl)!==null&&n!==void 0?n:"")}};Rt.styles=pi(Pc);Jc([(0,fi.redux)({store:"reader"})],Rt.prototype,"map",void 0);Jc([(0,fi.reduxEventListener)({eventName:ci.mapAttachmentsUpdate})],Rt.prototype,"updateAttachments",null);var eu=f(A());var Qc={"ft-reader-attachments":Rt};(0,eu.customElements)(Qc);var H=f(A()),tu={itemsGap:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-items-gap","","SIZE","8px"),itemPadding:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-item-padding","","SIZE","8px"),itemBorderWidth:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-item-border-width","","SIZE","1px"),itemBorderColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-border-color","",H.designSystemVariables.colorOutline),itemBorderRadius:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-border-radius","",H.designSystemVariables.borderRadiusS),itemBackgroundColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-background-color","",H.designSystemVariables.colorSurface),itemTextColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-text-color","",H.designSystemVariables.colorOnSurfaceMedium),itemHoverBackgroundColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-hover-background-color","",H.designSystemVariables.colorPrimary),itemHoverTextColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-hover-text-color","",H.designSystemVariables.colorOnSurfaceHigh),fileFormatIconSize:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-file-format-icon-size","","SIZE","30px"),downloadIconSize:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-down-icon-size","","SIZE","20px")};var ko=et.build("designedUdViewer"),ru={download:"Download {0}"};var nu=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Lt=class extends he(tt(Ce)){constructor(){super(),this.addI18nContext(ko,ru)}update(e){super.update(e),e.has("document")&&this.updateAttachments()}updateAttachments(){var e;this.document?(e=this.service)===null||e===void 0||e.getAttachments(this.document.id).then(r=>this.attachments=r):this.attachments=void 0}canRender(){return!!this.document&&super.canRender()}getAttachmentDownloadLink(e){var r,n;return(n=(r=this.service)===null||r===void 0?void 0:r.getAttachmentDownloadLink(this.document.id,e.id))!==null&&n!==void 0?n:""}getAttachmentDownloadLinkAriaLabel(e){return ko.messages.download(this.getAttachmentAriaLabel(e))}getAttachmentViewerLink(e){var r,n;return e.externalLink?e.viewerUrl:(r=this.service)===null||r===void 0?void 0:r.makeAbsolute((n=e.viewerUrl)!==null&&n!==void 0?n:"")}};Lt.styles=pi(tu);nu([(0,hi.redux)({store:"viewer"})],Lt.prototype,"document",void 0);nu([(0,hi.reduxEventListener)({eventName:ni.udAttachmentsUpdate})],Lt.prototype,"updateAttachments",null);var iu={"ft-asset-viewer-content":Pn,"ft-asset-viewer-content-control":qn,"ft-asset-viewer-context":Ue,"ft-asset-viewer-document-title":Qn,"ft-asset-viewer-filename":Yn,"ft-asset-viewer-mime-type-icon":Jn,"ft-asset-viewer-title":Xn,"ft-ud-viewer-attachments":Lt,"ft-ud-viewer-content":ii,"ft-ud-viewer-content-control":oi,"ft-ud-viewer-context":Tt,"ft-ud-viewer-filename":si,"ft-ud-viewer-mime-type-icon":li,"ft-ud-viewer-title":ai};(0,ou.customElements)(iu);})();
610
- /*! Bundled license information:
609
+ `}var bp=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ri=class extends Xa(Kt(ke)){constructor(){super(),this.addI18nContext(Ja,ip)}update(t){super.update(t),t.has("map")&&this.updateAttachments()}updateAttachments(){var t;this.map?(t=this.service)===null||t===void 0||t.getAttachments().then(r=>this.attachments=r):this.attachments=void 0}getAttachmentDownloadLink(t){var r,i;return(i=(r=this.service)===null||r===void 0?void 0:r.getAttachmentDownloadLink(t.id))!==null&&i!==void 0?i:""}getAttachmentDownloadLinkAriaLabel(t){return Ja.messages.download(this.getAttachmentAriaLabel(t))}getAttachmentViewerLink(t){var r,i;return t.externalLink?t.viewerUrl:(r=this.service)===null||r===void 0?void 0:r.makeAbsolute((i=t.viewerUrl)!==null&&i!==void 0?i:"")}};ri.styles=as(Qd);bp([(0,ls.redux)({store:"reader"})],ri.prototype,"map",void 0);bp([(0,ls.reduxEventListener)({eventName:ns.mapAttachmentsUpdate})],ri.prototype,"updateAttachments",null);var Sp=u(g());var xp={"ft-reader-attachments":ri};(0,Sp.customElements)(xp);var yt=u(g()),wp={itemsGap:yt.FtCssVariableFactory.create("--ft-ud-viewer-attachments-items-gap","","SIZE","8px"),itemPadding:yt.FtCssVariableFactory.create("--ft-ud-viewer-attachments-item-padding","","SIZE","8px"),itemBorderWidth:yt.FtCssVariableFactory.create("--ft-ud-viewer-attachments-item-border-width","","SIZE","1px"),itemBorderColor:yt.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-border-color","",yt.designSystemVariables.colorOutline),itemBorderRadius:yt.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-border-radius","",yt.designSystemVariables.borderRadiusS),itemBackgroundColor:yt.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-background-color","",yt.designSystemVariables.colorSurface),itemTextColor:yt.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-text-color","",yt.designSystemVariables.colorOnSurfaceMedium),itemHoverBackgroundColor:yt.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-hover-background-color","",yt.designSystemVariables.colorPrimary),itemHoverTextColor:yt.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-hover-text-color","",yt.designSystemVariables.colorOnSurfaceHigh),fileFormatIconSize:yt.FtCssVariableFactory.create("--ft-ud-viewer-attachments-file-format-icon-size","","SIZE","30px"),downloadIconSize:yt.FtCssVariableFactory.create("--ft-ud-viewer-attachments-down-icon-size","","SIZE","20px")};var zi=Wt.build("designedUdViewer"),Ap={download:"Download {0}",itemWithNoValueForSwitchToRelatives:"No value"};var Ep=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ii=class extends Dt(Kt(ke)){constructor(){super(),this.addI18nContext(zi,Ap)}update(t){super.update(t),t.has("document")&&this.updateAttachments()}updateAttachments(){var t;this.document?(t=this.service)===null||t===void 0||t.getAttachments(this.document.id).then(r=>this.attachments=r):this.attachments=void 0}canRender(){return!!this.document&&super.canRender()}getAttachmentDownloadLink(t){var r,i;return(i=(r=this.service)===null||r===void 0?void 0:r.getAttachmentDownloadLink(this.document.id,t.id))!==null&&i!==void 0?i:""}getAttachmentDownloadLinkAriaLabel(t){return zi.messages.download(this.getAttachmentAriaLabel(t))}getAttachmentViewerLink(t){var r,i;return t.externalLink?t.viewerUrl:(r=this.service)===null||r===void 0?void 0:r.makeAbsolute((i=t.viewerUrl)!==null&&i!==void 0?i:"")}};ii.styles=as(wp);Ep([(0,cs.redux)({store:"viewer"})],ii.prototype,"document",void 0);Ep([(0,cs.reduxEventListener)({eventName:Or.udAttachmentsUpdate})],ii.prototype,"updateAttachments",null);var wf=u(A()),Ne=u($()),Xt=u(g());var us=class extends CustomEvent{constructor(t){super("ft-ud-viewer-feedback",{composed:!0,bubbles:!0,detail:t})}},ds=class extends CustomEvent{constructor(){super("ft-viewer-mailer-ud-feedback",{composed:!0,bubbles:!0})}};var xe=u(g());var Cp=u(A()),kn=u(g()),ni={color:kn.FtCssVariableFactory.extend("--ft-loader-color","",kn.designSystemVariables.colorPrimary),size:kn.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},_p=Cp.css`
610
+ :host {
611
+ line-height: 0;
612
+ }
611
613
 
612
- @lit/context/lib/context-request-event.js:
613
- @lit/context/lib/create-context.js:
614
- @lit/context/lib/controllers/context-consumer.js:
615
- @lit/context/lib/value-notifier.js:
616
- @lit/context/lib/controllers/context-provider.js:
617
- @lit/context/lib/context-root.js:
618
- (**
619
- * @license
620
- * Copyright 2021 Google LLC
621
- * SPDX-License-Identifier: BSD-3-Clause
622
- *)
614
+ .ft-loader {
615
+ display: inline-block;
616
+ position: relative;
623
617
 
624
- @lit/context/lib/decorators/provide.js:
625
- lit-html/lit-html.js:
626
- (**
627
- * @license
628
- * Copyright 2017 Google LLC
629
- * SPDX-License-Identifier: BSD-3-Clause
630
- *)
618
+ width: ${ni.size};
619
+ height: ${ni.size};
620
+ }
631
621
 
632
- @lit/context/lib/decorators/consume.js:
633
- (**
634
- * @license
635
- * Copyright 2022 Google LLC
636
- * SPDX-License-Identifier: BSD-3-Clause
637
- *)
622
+ .ft-loader div {
623
+ position: absolute;
624
+ top: 37.5%;
625
+ width: 25%;
626
+ height: 25%;
627
+ border-radius: 50%;
628
+ background: ${ni.color};
629
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
630
+ }
638
631
 
639
- @lit/reactive-element/css-tag.js:
640
- (**
641
- * @license
642
- * Copyright 2019 Google LLC
643
- * SPDX-License-Identifier: BSD-3-Clause
644
- *)
632
+ .ft-loader div:nth-child(1) {
633
+ left: 2.5%;
634
+ animation: appear 0.6s infinite;
635
+ }
645
636
 
646
- lit-html/static.js:
647
- (**
648
- * @license
649
- * Copyright 2020 Google LLC
637
+ .ft-loader div:nth-child(2) {
638
+ left: 2.5%;
639
+ animation: move 0.6s infinite;
640
+ }
641
+
642
+ .ft-loader div:nth-child(3) {
643
+ left: 37.5%;
644
+ animation: move 0.6s infinite;
645
+ }
646
+
647
+ .ft-loader div:nth-child(4) {
648
+ left: 72.5%;
649
+ animation: disappear 0.6s infinite;
650
+ }
651
+
652
+ @keyframes appear {
653
+ 0% {
654
+ transform: scale(0);
655
+ }
656
+ 100% {
657
+ transform: scale(1);
658
+ }
659
+ }
660
+
661
+ @keyframes disappear {
662
+ 0% {
663
+ transform: scale(1);
664
+ }
665
+ 100% {
666
+ transform: scale(0);
667
+ }
668
+ }
669
+
670
+ @keyframes move {
671
+ 0% {
672
+ transform: translate(0, 0);
673
+ }
674
+ 100% {
675
+ transform: translate(calc(0.35 * ${ni.size}), 0);
676
+ }
677
+ }
678
+ `;var Tp=u(A()),Op=u(g());var oi=class extends Op.FtLitElement{render(){return Tp.html`
679
+ <div class="ft-loader">
680
+ <div></div>
681
+ <div></div>
682
+ <div></div>
683
+ <div></div>
684
+ </div>
685
+ `}};oi.styles=_p;var Lp=u(g());var Rp={"ft-loader":oi};(0,Lp.customElements)(Rp);var Pr=u(A()),tl=u(oe()),G=u($());var sr=e=>e??pt;var kp=u(A()),L=u(g());var Pp=L.FtCssVariableFactory.extend("--ft-button-color","",L.designSystemVariables.colorPrimary),B={backgroundColor:L.FtCssVariableFactory.extend("--ft-button-background-color","",L.designSystemVariables.colorSurface),borderRadius:L.FtCssVariableFactory.extend("--ft-button-border-radius","",L.designSystemVariables.borderRadiusL),color:Pp,fontSize:L.FtCssVariableFactory.extend("--ft-button-font-size","",Ft.fontSize),iconSize:L.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:L.FtCssVariableFactory.extend("--ft-button-ripple-color","",Pp),verticalPadding:L.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:L.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:L.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:L.FtCssVariableFactory.external(L.designSystemVariables.colorOpacityDisabled,"Design system")},Ip=L.FtCssVariableFactory.extend("--ft-button-primary-color","",L.FtCssVariableFactory.extend("--ft-button-color","",L.designSystemVariables.colorOnPrimary)),Qa={backgroundColor:L.FtCssVariableFactory.extend("--ft-button-primary-background-color","",L.FtCssVariableFactory.extend("--ft-button-background-color","",L.designSystemVariables.colorPrimary)),color:Ip,rippleColor:L.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",Ip)},De={borderRadius:L.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",L.FtCssVariableFactory.extend("--ft-button-border-radius","",L.designSystemVariables.borderRadiusM)),verticalPadding:L.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),horizontalPadding:L.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),iconPadding:L.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px")},Dp=kp.css`
686
+ :host {
687
+ display: inline-block;
688
+ max-width: 100%;
689
+ pointer-events: none;
690
+ }
691
+
692
+ .ft-button {
693
+ box-shadow: 0px 0px 0px transparent;
694
+ border: 0px solid transparent;
695
+ text-shadow: 0px 0px 0px transparent;
696
+ font-size: ${B.fontSize};
697
+ text-decoration: none;
698
+ }
699
+
700
+ .ft-button:hover {
701
+ box-shadow: 0px 0px 0px transparent;
702
+ border: 0px solid transparent;
703
+ text-shadow: 0px 0px 0px transparent;
704
+ }
705
+
706
+ .ft-button:active {
707
+ outline: none;
708
+ border: none;
709
+ }
710
+
711
+ .ft-button:focus {
712
+ outline: none;
713
+ }
714
+
715
+ .ft-button:focus-visible {
716
+ outline: 2px solid ${L.designSystemVariables.colorPrimary};
717
+ outline-offset: 2px;
718
+ }
719
+
720
+ .ft-button {
721
+ position: relative;
722
+ display: flex;
723
+ justify-content: center;
724
+ align-items: center;
725
+ width: 100%;
726
+ box-sizing: border-box;
727
+ border: none;
728
+ pointer-events: auto;
729
+
730
+ --button-internal-line-height: max(calc(${B.fontSize} + 2px), ${B.iconSize});
731
+ --button-internal-color: ${B.color};
732
+ ${(0,L.setVariable)(ft.size,B.iconSize)};
733
+ ${(0,L.setVariable)(W.color,B.rippleColor)};
734
+ ${(0,L.setVariable)(W.borderRadius,B.borderRadius)};
735
+
736
+ border-radius: ${B.borderRadius};
737
+ padding: ${B.verticalPadding} ${B.horizontalPadding};
738
+ background-color: ${B.backgroundColor};
739
+ color: var(--button-internal-color);
740
+ }
741
+
742
+ .ft-button.ft-button--outlined {
743
+ border: 1px solid var(--button-internal-color);
744
+ padding: calc(${B.verticalPadding} - 1px) calc(${B.horizontalPadding} - 1px);
745
+ }
746
+
747
+ .ft-button.ft-button--dense {
748
+ padding: ${De.verticalPadding} ${De.horizontalPadding};
749
+ border-radius: ${De.borderRadius};
750
+ gap: ${De.iconPadding};
751
+ ${(0,L.setVariable)(W.borderRadius,De.borderRadius)};
752
+ }
753
+
754
+ .ft-button.ft-button--dense.ft-button--outlined {
755
+ padding: calc(${De.verticalPadding} - 1px) calc(${De.horizontalPadding} - 1px);
756
+ }
757
+
758
+ .ft-button:not([disabled]):hover {
759
+ cursor: pointer;
760
+ }
761
+
762
+ .ft-button--round {
763
+ border-radius: calc(var(--button-internal-line-height) / 2 + ${B.verticalPadding});
764
+ }
765
+
766
+ .ft-button--round.ft-button--dense {
767
+ border-radius: calc(var(--button-internal-line-height) / 2 + ${De.verticalPadding});
768
+ }
769
+
770
+ .ft-button[disabled] {
771
+ filter: grayscale(1);
772
+ opacity: ${B.opacityDisabled};
773
+ }
774
+
775
+ .ft-button.ft-button--primary {
776
+ background-color: ${Qa.backgroundColor};
777
+ --button-internal-color: ${Qa.color};
778
+ ${(0,L.setVariable)(W.color,Qa.rippleColor)};
779
+ }
780
+
781
+ .ft-button--label {
782
+ position: relative;
783
+ overflow: hidden;
784
+ white-space: nowrap;
785
+ text-overflow: ellipsis;
786
+ display: block;
787
+ margin: 0 ${B.iconPadding};
788
+ ${(0,L.setVariable)(Ft.fontSize,"1em")};
789
+ ${(0,L.setVariable)(Ft.lineHeight,"var(--button-internal-line-height)")};
790
+ }
791
+
792
+ .ft-button--dense .ft-button--label {
793
+ margin: 0 ${De.iconPadding};
794
+ }
795
+
796
+ .ft-button--label[hidden] {
797
+ display: none;
798
+ }
799
+
800
+ [part="icon"] {
801
+ flex-shrink: 0;
802
+ position: relative;
803
+ }
804
+
805
+ .ft-button--label[hidden] + [part="icon"] {
806
+ margin: 0 calc(${B.horizontalPadding} * -1);
807
+ padding: 0 ${B.verticalPadding};
808
+ }
809
+
810
+ .ft-button--dense .ft-button--label[hidden] + [part="icon"] {
811
+ margin: 0 calc(${De.horizontalPadding} * -1);
812
+ padding: 0 ${De.verticalPadding};
813
+ }
814
+
815
+ .ft-button:not(.ft-button--trailing-icon) [part="label"] {
816
+ order: 2;
817
+ }
818
+
819
+ ft-loader {
820
+ ${(0,L.setVariable)(ni.size,B.iconSize)};
821
+ ${(0,L.setVariable)(ni.color,"var(--button-internal-color)")};
822
+ }
823
+ `;var rt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},U=class extends(0,xe.toFtFormComponent)(xe.FtLitElement){get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}constructor(){super(),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1,this.disabled=!1,this.icon=void 0,this.trailingIcon=!1,this.label="",this.type="button",this.href=void 0,this.target=void 0,this.loading=!1,this.ariaLabel=null,this.ariaHasPopup=null,this.ariaPressed=null,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.activated=!1,this.addEventListener("click",t=>{var r;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):this.type=="submit"&&((r=this.form)===null||r===void 0||r.requestSubmit())})}render(){var t,r,i;let n=Pr.html`
824
+ <ft-ripple part="ripple"
825
+ ?disabled=${this.isDisabled()}
826
+ ?activated=${this.activated}
827
+ ></ft-ripple>
828
+ <ft-typography part="label"
829
+ variant="${H.button}"
830
+ element="span"
831
+ class="ft-button--label ${xe.isSafari?"ft-safari-ellipsis-fix":""}"
832
+ ?hidden=${!this.hasTextContent()}>
833
+ <slot @slotchange=${this.onSlotchange}></slot>
834
+ </ft-typography>
835
+ ${this.resolveIcon()}
836
+ `,o=this.href!=null&&this.href.trim().length>0?this.href:void 0;return this.addTooltipIfNeeded(o?Pr.html`
837
+ <a href="${o}"
838
+ target="${(t=this.target)!==null&&t!==void 0?t:"_self"}"
839
+ part="button"
840
+ class="${(0,tl.classMap)(this.buttonClasses)}"
841
+ aria-label="${(r=this.ariaLabel)!==null&&r!==void 0?r:this.getLabel()}"
842
+ ?disabled=${this.isDisabled()}>
843
+ ${n}
844
+ </a>
845
+ `:Pr.html`
846
+ <button part="button"
847
+ class="${(0,tl.classMap)(this.buttonClasses)}"
848
+ aria-label="${(i=this.ariaLabel)!==null&&i!==void 0?i:this.getLabel()}"
849
+ aria-haspopup="${sr(this.ariaHasPopup)}"
850
+ aria-pressed="${sr(this.ariaPressed)}"
851
+ ?disabled=${this.isDisabled()}>
852
+ ${n}
853
+ </button>
854
+ `)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?Pr.html`
855
+ <ft-tooltip part="tooltip"
856
+ text="${this.getLabel()}"
857
+ position="${this.tooltipPosition}">
858
+ ${t}
859
+ </ft-tooltip>
860
+ `:t}resolveIcon(){return this.loading?Pr.html`
861
+ <ft-loader part="loader icon"></ft-loader> `:this.icon?Pr.html`
862
+ <ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
863
+ `:Pr.html`
864
+ <slot part="icon" name="icon"></slot>
865
+ `}focus(){var t;(t=this.button)===null||t===void 0||t.focus()}showTooltip(){var t;(t=this.tooltip)===null||t===void 0||t.show()}showTemporaryTooltip(t,r){var i;return(i=this.tooltip)===null||i===void 0?void 0:i.showTemporaryText(t,r)}setTooltipManual(t){this.tooltip&&(this.tooltip.manual=t)}click(){var t;(t=this.button)===null||t===void 0||t.click()}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,xe.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};U.elementDefinitions={"ft-ripple":D,"ft-tooltip":K,"ft-icon":V,"ft-loader":oi,"ft-typography":N};U.styles=[xe.safariEllipsisFix,Dp,xe.noTextSelect];rt([(0,G.property)({type:Boolean})],U.prototype,"primary",void 0);rt([(0,G.property)({type:Boolean})],U.prototype,"outlined",void 0);rt([(0,G.property)({type:Boolean})],U.prototype,"dense",void 0);rt([(0,G.property)({type:Boolean})],U.prototype,"round",void 0);rt([(0,G.property)({type:Boolean})],U.prototype,"disabled",void 0);rt([(0,G.property)()],U.prototype,"icon",void 0);rt([(0,G.property)()],U.prototype,"iconVariant",void 0);rt([(0,G.property)({type:Boolean})],U.prototype,"trailingIcon",void 0);rt([(0,G.property)()],U.prototype,"label",void 0);rt([(0,G.property)()],U.prototype,"type",void 0);rt([(0,G.property)()],U.prototype,"href",void 0);rt([(0,G.property)()],U.prototype,"target",void 0);rt([(0,G.property)({type:Boolean})],U.prototype,"loading",void 0);rt([(0,G.property)({attribute:"aria-label"})],U.prototype,"ariaLabel",void 0);rt([(0,G.property)()],U.prototype,"ariaHasPopup",void 0);rt([(0,G.property)({attribute:"aria-pressed"})],U.prototype,"ariaPressed",void 0);rt([(0,G.property)()],U.prototype,"tooltipPosition",void 0);rt([(0,G.property)({type:Boolean})],U.prototype,"hideTooltip",void 0);rt([(0,G.property)({type:Boolean})],U.prototype,"forceTooltip",void 0);rt([(0,G.property)({type:Boolean})],U.prototype,"activated",void 0);rt([(0,G.query)(".ft-button")],U.prototype,"button",void 0);rt([(0,G.query)(".ft-button--label slot")],U.prototype,"slottedContent",void 0);rt([(0,G.query)("[part=tooltip]")],U.prototype,"tooltip",void 0);var $p=u(g());var Mp={"ft-button":U};(0,$p.customElements)(Mp);var ps=u(A()),Ke=u($()),Vp=u(oe()),ar=u(g());var Wi=u(A()),Yt=u($()),Ki=u(g());var Fp=u(oe());var Np=u(A()),Vt=u(g());var nt=u(g());var ot={textColor:nt.FtCssVariableFactory.extend("--ft-switch-text-color","",nt.designSystemVariables.colorOnSurfaceHigh),backgroundColor:nt.FtCssVariableFactory.extend("--ft-switch-background-color","",nt.designSystemVariables.colorSurface),selectedTextColor:nt.FtCssVariableFactory.extend("--ft-switch-selected-text-color","",nt.designSystemVariables.colorPrimary),selectedBackgroundColor:nt.FtCssVariableFactory.extend("--ft-switch-selected-background-color","",nt.designSystemVariables.colorPrimary),borderColor:nt.FtCssVariableFactory.extend("--ft-switch-border-color","",nt.designSystemVariables.colorOutline),borderRadius:nt.FtCssVariableFactory.extend("--ft-switch-border-radius","",nt.designSystemVariables.borderRadiusL),fontSize:nt.FtCssVariableFactory.extend("--ft-switch-font-size","",Ft.fontSize),iconSize:nt.FtCssVariableFactory.create("--ft-switch-icon-size","","SIZE","24px"),iconColor:nt.FtCssVariableFactory.extend("--ft-switch-text-color","",nt.designSystemVariables.colorOnSurfaceMedium),rippleColor:nt.FtCssVariableFactory.extend("--ft-switch-ripple-color","",nt.designSystemVariables.colorPrimary),outlineColor:nt.FtCssVariableFactory.extend("--ft-switch-outline-color","",nt.designSystemVariables.colorPrimary)};var bt={borderRadiusLeft:Vt.FtCssVariableFactory.extend("--ft-switch-option-border-radius-left","",Vt.designSystemVariables.borderRadiusL),borderRadiusRight:Vt.FtCssVariableFactory.extend("--ft-switch-option-border-radius-right","",Vt.designSystemVariables.borderRadiusL),borderWidthLeft:Vt.FtCssVariableFactory.create("--ft-switch-option-border-width-left","","SIZE","1px"),borderWidthRight:Vt.FtCssVariableFactory.create("--ft-switch-option-border-width-right","","SIZE","1px"),borderWidthVertical:Vt.FtCssVariableFactory.create("--ft-switch-option-border-width-vertical","","SIZE","1px")},Up=Np.css`
866
+ .ft-switch-option {
867
+ position: relative;
868
+ display: inline-block;
869
+ }
870
+
871
+ .ft-switch-option--input {
872
+ position: absolute;
873
+ opacity: 0;
874
+ width: 0;
875
+ height: 0;
876
+ }
877
+
878
+ .ft-switch-option--content {
879
+ --switch-option-internal-line-height: calc(${ot.fontSize} + 2px);
880
+ --switch-option-internal-content-height: max(var(--switch-option-internal-line-height), ${ot.iconSize});
881
+
882
+ border-style: solid;
883
+ border-color: ${ot.borderColor};
884
+ border-width: ${bt.borderWidthVertical} ${bt.borderWidthRight} ${bt.borderWidthVertical} ${bt.borderWidthLeft};
885
+ border-radius: ${bt.borderRadiusLeft} ${bt.borderRadiusRight} ${bt.borderRadiusRight} ${bt.borderRadiusLeft};
886
+ display: flex;
887
+ align-items: center;
888
+ justify-content: center;
889
+ overflow: hidden;
890
+ ${(0,Vt.setVariable)(ft.size,ot.iconSize)};
891
+ padding: var(--switch-internal-vertical-padding, 6px) var(--switch-internal-horizontal-padding, 8px);
892
+ background-color: ${ot.backgroundColor};
893
+ -webkit-mask-image: radial-gradient(white, black);
894
+ }
895
+
896
+ .ft-switch-option--content > *:not(ft-ripple) {
897
+ position: relative;
898
+ }
899
+
900
+ .ft-switch-option--selected .ft-switch-option--content:before {
901
+ background-color: ${ot.selectedBackgroundColor};
902
+ border-radius: ${bt.borderRadiusLeft} ${bt.borderRadiusRight} ${bt.borderRadiusRight} ${bt.borderRadiusLeft};
903
+ position: absolute;
904
+ inset: 0;
905
+ content: "";
906
+ z-index: 1;
907
+ opacity: ${Vt.designSystemVariables.opacityPrimaryOnSurfaceSelected};
908
+ }
909
+
910
+ .ft-switch-option--label {
911
+ color: ${ot.textColor};
912
+ overflow: hidden;
913
+ white-space: nowrap;
914
+ text-overflow: ellipsis;
915
+ display: block;
916
+ margin: 0 8px;
917
+ ${(0,Vt.setVariable)(Ft.fontSize,ot.fontSize)};
918
+ ${(0,Vt.setVariable)(Ft.lineHeight,"var(--switch-option-internal-content-height)")}
919
+ }
920
+
921
+ .ft-switch-option--selected .ft-switch-option--label {
922
+ color: ${ot.selectedTextColor};
923
+ }
924
+
925
+ .ft-switch-option--focused {
926
+ outline: 1px solid ${ot.outlineColor};
927
+ }
928
+
929
+ .ft-switch-option--label[hidden] {
930
+ display: none;
931
+ }
932
+
933
+ .ft-switch-option--ripple {
934
+ ${(0,Vt.setVariable)(W.color,ot.rippleColor)};
935
+ }
936
+
937
+ ft-icon, ft-ripple, ft-typography {
938
+ z-index: 2;
939
+ }
940
+
941
+ .ft-switch-option:not(.ft-switch-option--trailing-icon) ft-icon {
942
+ order: -1;
943
+ }
944
+
945
+ ft-icon {
946
+ flex-shrink: 0;
947
+ color: ${ot.iconColor};
948
+ }
949
+
950
+ .ft-switch-option--selected ft-icon {
951
+ color: ${ot.selectedTextColor};
952
+ }
953
+ `;var Me=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},el=class extends CustomEvent{constructor(t){super("option-change-by-user",{detail:t,bubbles:!0,composed:!0})}},rl=class extends CustomEvent{constructor(t){super("option-change",{detail:t,bubbles:!0,composed:!0})}},at=class extends Ki.FtLitElement{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1,this.isFocused=!1}focus(){this.input.focus()}update(t){super.update(t),t.has("selected")&&this.dispatchEvent(new rl(this.selected))}render(){let t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon,"ft-switch-option--selected":this.selected,"ft-switch-option--focused":this.isFocused};return this.addTooltip(Wi.html`
954
+ <label part="label" for="input" class="${(0,Fp.classMap)(t)}"
955
+ @click=${this.onChange}>
956
+ <div class="ft-switch-option--content">
957
+ <ft-ripple part="ripple" class="ft-switch-option--ripple"></ft-ripple>
958
+ <ft-typography part="text"
959
+ variant="button"
960
+ class="ft-switch-option--label ${Ki.isSafari?"ft-safari-ellipsis-fix":""}"
961
+ ?hidden=${!this.hasTextContent()}>
962
+ <slot @slotchange=${this.onSlotchange}></slot>
963
+ </ft-typography>
964
+ ${this.resolveIcon()}
965
+ </div>
966
+ </label>
967
+ <input id="input" type="radio" class="ft-switch-option--input"
968
+ .checked=${this.selected}>
969
+ `)}addTooltip(t){return this.getLabel().trim().length===0?t:Wi.html`
970
+ <ft-tooltip part="tooltip"
971
+ text="${this.getLabel()}"
972
+ position="${this.tooltipPosition}">
973
+ ${t}
974
+ </ft-tooltip>
975
+ `}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.onFocusout)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusout",this.onFocusout)}onFocusout(){this.isFocused=!1}onChange(){this.selected=this.unselectable?!this.selected:!0,this.dispatchEvent(new el(this.selected))}getLabel(){return this.label||this.getTextContent()}resolveIcon(){return this.icon?Wi.html`
976
+ <ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
977
+ `:Wi.nothing}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}};at.elementDefinitions={"ft-ripple":D,"ft-typography":N,"ft-tooltip":K,"ft-icon":V};at.styles=[Ki.safariEllipsisFix,Up];Me([(0,Yt.property)()],at.prototype,"value",void 0);Me([(0,Yt.property)()],at.prototype,"icon",void 0);Me([(0,Yt.property)()],at.prototype,"iconVariant",void 0);Me([(0,Yt.property)()],at.prototype,"label",void 0);Me([(0,Yt.property)()],at.prototype,"tooltipPosition",void 0);Me([(0,Yt.property)({type:Boolean,reflect:!0})],at.prototype,"selected",void 0);Me([(0,Yt.property)({type:Boolean})],at.prototype,"trailingIcon",void 0);Me([(0,Yt.property)({type:Boolean})],at.prototype,"unselectable",void 0);Me([(0,Yt.query)(".ft-switch-option--content slot")],at.prototype,"slottedContent",void 0);Me([(0,Yt.query)(".ft-switch-option--input")],at.prototype,"input",void 0);Me([(0,Yt.state)()],at.prototype,"isFocused",void 0);var si=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},il=class extends CustomEvent{constructor(t){super("change",{detail:t})}},Bt=class extends ar.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.displayFocusWhenUsingKeyboard=!1,this.options=[]}get value(){var t;return(t=this.selectedOption)===null||t===void 0?void 0:t.value}update(t){super.update(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach(r=>r.unselectable=this.unselectable)}render(){let t={"ft-switch":!0,"ft-switch--dense":this.dense};return ps.html`
978
+ <div @keydown=${this.onKeyDown} tabindex="-1" class="${(0,Vp.classMap)(t)}" role="radiogroup" aria-label="${this.label}">
979
+ <slot @slotchange=${this.onSlotchange}
980
+ @option-change=${this.onOptionChangeByScript}
981
+ @option-change-by-user=${this.onOptionChangeByUser}
982
+ ></slot>
983
+ </div>
984
+ `}onKeyDown(t){let r;(t.key=="ArrowDown"||t.key=="ArrowRight")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),(t.key=="ArrowUp"||t.key=="ArrowLeft")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),t.key==" "&&(r=this.options.indexOf(t.target)),r!=null&&(t.preventDefault(),this.options[this.fixIndex(r)].focus(),this.displayFocusWhenUsingKeyboard=!0,this.options[this.fixIndex(r)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],(t=this.slottedContent)===null||t===void 0||t.assignedElements().forEach(r=>{r instanceof at&&this.registerOption(r)}),this.selectedOption=this.options.find(r=>r.selected)}registerOption(t){var r;(r=t.shadowRoot)===null||r===void 0||r.querySelectorAll("input").forEach(i=>{i.setAttribute("tabindex","-1")}),t.setAttribute("tabindex","0"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let r=t.target;this.onOptionChange(r)}onOptionChangeByUser(t){var r;t.stopPropagation(),this.displayFocusWhenUsingKeyboard=!1,this.onOptionChange(t.target),this.dispatchEvent(new il((r=this.selectedOption)===null||r===void 0?void 0:r.value))}onOptionChange(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find(r=>r.selected)}private(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find(r=>r.selected)}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach(t=>{t.selected=t===this.selectedOption,this.displayFocusWhenUsingKeyboard&&(t.isFocused=t===this.selectedOption)})}};Bt.elementDefinitions={};Bt.styles=ps.css`
985
+ :host {
986
+ display: inline-block;
987
+ }
988
+
989
+ .ft-switch {
990
+ border-radius: ${ot.borderRadius};
991
+ outline-color: ${ot.outlineColor};
992
+ }
993
+
994
+ .ft-switch slot {
995
+ display: flex;
996
+ align-items: stretch;
997
+ }
998
+
999
+ .ft-switch slot::slotted(ft-switch-option) {
1000
+ ${(0,ar.setVariable)(bt.borderRadiusLeft,"0")};
1001
+ ${(0,ar.setVariable)(bt.borderRadiusRight,"0")};
1002
+ ${(0,ar.setVariable)(bt.borderWidthLeft,"0")};
1003
+ }
1004
+
1005
+ .ft-switch slot::slotted(ft-switch-option:first-child) {
1006
+ ${(0,ar.setVariable)(bt.borderRadiusLeft,ot.borderRadius)};
1007
+ ${(0,ar.setVariable)(bt.borderWidthLeft,"1px")};
1008
+ }
1009
+
1010
+ .ft-switch slot::slotted(ft-switch-option:last-child) {
1011
+ ${(0,ar.setVariable)(bt.borderRadiusRight,ot.borderRadius)};
1012
+ }
1013
+
1014
+ .ft-switch--dense slot::slotted(ft-switch-option) {
1015
+ --switch-internal-vertical-padding: 2px;
1016
+ --switch-internal-horizontal-padding: 4px;
1017
+ }
1018
+ `;si([(0,Ke.property)({type:Boolean})],Bt.prototype,"dense",void 0);si([(0,Ke.property)({type:Boolean})],Bt.prototype,"unselectable",void 0);si([(0,Ke.property)()],Bt.prototype,"label",void 0);si([(0,Ke.query)(".ft-switch slot")],Bt.prototype,"slottedContent",void 0);si([(0,Ke.state)()],Bt.prototype,"selectedOption",void 0);si([(0,Ke.state)()],Bt.prototype,"displayFocusWhenUsingKeyboard",void 0);si([(0,Ke.query)(".ft-switch")],Bt.prototype,"ftSwitchDiv",void 0);var Hp=u(g());var Bp={"ft-switch":Bt,"ft-switch-option":at};(0,Hp.customElements)(Bp);var lr=u(g()),jp=u(A());function fs(e){return jp.css`
1019
+ [part="container"] {
1020
+ box-sizing: border-box;
1021
+ display: flex;
1022
+ flex-direction: column;
1023
+ gap: 16px;
1024
+ }
1025
+
1026
+ [part="rating rating-stars"] {
1027
+ display: flex;
1028
+ flex-direction: row;
1029
+ align-items: center;
1030
+ margin-left: -6px;
1031
+ ${(0,lr.setVariable)(B.backgroundColor,e.starsBackgroundColor)}
1032
+ }
1033
+
1034
+ [part="rating-container"],
1035
+ [part="feedback-container"] {
1036
+ display: flex;
1037
+ flex-direction: column;
1038
+ }
1039
+
1040
+ [part="rating-container"] [part="section-title"] {
1041
+ margin-bottom: 8px;
1042
+ }
1043
+
1044
+ [part="rating-container"] {
1045
+ ${(0,lr.setVariable)(B.color,e.emptyRatingColor)};
1046
+ ${(0,lr.setVariable)(B.rippleColor,e.filledRatingColor)};
1047
+ ${(0,lr.setVariable)(ot.textColor,e.emptyRatingColor)};
1048
+ ${(0,lr.setVariable)(ot.selectedTextColor,e.filledRatingColor)};
1049
+ }
1050
+
1051
+ [part="rating-container"] .rating-stars--active {
1052
+ ${(0,lr.setVariable)(B.color,e.filledRatingColor)};
1053
+ }
1054
+
1055
+ [part="feedback-container"] {
1056
+ gap: 8px;
1057
+ }
1058
+
1059
+ [part="rating-date"] {
1060
+ color: ${e.ratedDateColor};
1061
+ }
1062
+
1063
+ [part="feedback-container"] ft-text-area {
1064
+ min-width: ${e.feedbackInputMinWidth};
1065
+ }
1066
+
1067
+
1068
+ [part="send-feedback"],
1069
+ [part="send-feedback-link"] {
1070
+ ${(0,lr.setVariable)(B.color,e.sendFeedbackColor)};
1071
+ ${(0,lr.setVariable)(B.backgroundColor,e.sendFeedbackBackgroundColor)};
1072
+ }
1073
+
1074
+ [part="buttons-container"] {
1075
+ align-self: flex-end;
1076
+ }
1077
+ `}var Rt=u(g());var hs={feedbackInputMinWidth:Rt.FtCssVariableFactory.create("--ft-viewer-feedback-input-min-width","","SIZE","300px"),ratedDateColor:Rt.FtCssVariableFactory.external(Rt.designSystemVariables.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:Rt.FtCssVariableFactory.extend("--ft-viewer-feedback-send-feedback-color","",Rt.designSystemVariables.colorOnPrimary),sendFeedbackBackgroundColor:Rt.FtCssVariableFactory.extend("--ft-viewer-feedback-send-feedback-background-color","",Rt.designSystemVariables.colorPrimary),filledRatingColor:Rt.FtCssVariableFactory.extend("--ft-viewer-feedback-filled-rating-color","",Rt.designSystemVariables.colorPrimary),emptyRatingColor:Rt.FtCssVariableFactory.extend("--ft-viewer-feedback-empty-rating-color","",Rt.designSystemVariables.colorOnSurfaceMedium),mainTitleFontSize:Rt.FtCssVariableFactory.external(yr.fontSize,"Typography"),sectionTitleFontSize:Rt.FtCssVariableFactory.external(br.fontSize,"Typography"),starsBackgroundColor:Rt.FtCssVariableFactory.create("--ft-viewer-feedback-stars-background-color","","COLOR",Rt.designSystemVariables.colorSurface)};var lt=u(A()),ct=u($()),qi=u(g());var Kp=u(A()),j=u(g());var zp=u(A()),q=u(g());var _={fontSize:q.FtCssVariableFactory.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:q.FtCssVariableFactory.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:q.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:q.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:q.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:q.FtCssVariableFactory.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:q.FtCssVariableFactory.extend("--ft-input-label-border-color","",q.designSystemVariables.colorOutline),textColor:q.FtCssVariableFactory.extend("--ft-input-label-text-color","",q.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:q.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color","",q.designSystemVariables.colorOnSurfaceDisabled),backgroundColor:q.FtCssVariableFactory.extend("--ft-input-label-background-color","",q.designSystemVariables.colorSurface),borderRadius:q.FtCssVariableFactory.extend("--ft-input-label-border-radius","",q.designSystemVariables.borderRadiusS),colorError:q.FtCssVariableFactory.external(q.designSystemVariables.colorError,"Design system")},Wp=zp.css`
1078
+ .ft-input-label {
1079
+ position: absolute;
1080
+ inset: 0;
1081
+ display: flex;
1082
+ background-color: ${_.backgroundColor};
1083
+ border-radius: ${_.borderRadius} ${_.borderRadius} 0 0;
1084
+ }
1085
+
1086
+ .ft-input-label--outlined {
1087
+ border-radius: ${_.borderRadius};
1088
+ }
1089
+
1090
+ .ft-input-label {
1091
+ border-color: ${_.borderColor};
1092
+ }
1093
+
1094
+ .ft-input-label.ft-input-label--in-error {
1095
+ border-color: ${_.colorError}
1096
+ }
1097
+
1098
+ .ft-input-label:before,
1099
+ .ft-input-label:after {
1100
+ content: "";
1101
+ display: flex;
1102
+ border-bottom-width: 1px;
1103
+ border-bottom-style: solid;
1104
+ border-color: inherit;
1105
+ }
1106
+
1107
+ .ft-input-label:before {
1108
+ width: calc(${_.horizontalSpacing} - 4px);
1109
+ flex-shrink: 0;
1110
+ }
1111
+
1112
+ .ft-input-label:after {
1113
+ flex-grow: 1;
1114
+ flex-shrink: 1;
1115
+ }
1116
+
1117
+ .ft-input-label--text {
1118
+ display: flex;
1119
+ flex-shrink: 1;
1120
+ position: relative;
1121
+ border-bottom-width: 1px;
1122
+ border-bottom-style: solid;
1123
+ border-color: inherit;
1124
+ color: ${_.textColor};
1125
+ transition: font-size 250ms, line-height 250ms, color 250ms;
1126
+ max-width: calc(${_.labelMaxWidth} - 2 * (${_.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
1127
+ text-overflow: ellipsis;
1128
+ ${(0,q.setVariable)(ie.fontSize,_.fontSize)};
1129
+ ${(0,q.setVariable)(ie.lineHeight,_.fontSize)};
1130
+ }
1131
+
1132
+ .ft-input-label--in-error .ft-input-label--text {
1133
+ color: ${_.colorError}
1134
+ }
1135
+
1136
+ .ft-input-label--disabled .ft-input-label--text {
1137
+ color: ${_.disabledTextColor};
1138
+ }
1139
+
1140
+ .ft-input-label--hidden-text {
1141
+ padding: 0 4px;
1142
+ opacity: 0;
1143
+ max-width: 100%;
1144
+ box-sizing: border-box;
1145
+ }
1146
+
1147
+ .ft-input-label--floating-text {
1148
+ position: absolute;
1149
+ top: calc(50% - ${ie.lineHeight} / 2);
1150
+ transition: top 250ms;
1151
+ overflow: hidden;
1152
+ white-space: nowrap;
1153
+ text-overflow: ellipsis;
1154
+ padding: ${_.verticalSpacing} 4px;
1155
+ margin: calc(${_.verticalSpacing} * -1) 0;
1156
+ max-width: 100%;
1157
+ box-sizing: border-box;
1158
+ }
1159
+
1160
+ .ft-input-label--raised .ft-input-label--text {
1161
+ ${(0,q.setVariable)(ie.fontSize,_.raisedFontSize)};
1162
+ ${(0,q.setVariable)(ie.lineHeight,_.raisedFontSize)};
1163
+ }
1164
+
1165
+ .ft-input-label--raised .ft-input-label--floating-text {
1166
+ top: ${_.verticalSpacing};
1167
+ }
1168
+
1169
+ .ft-input-label--outlined .ft-input-label--text,
1170
+ .ft-input-label--outlined:before,
1171
+ .ft-input-label--outlined:after {
1172
+ border-top-width: 1px;
1173
+ border-top-style: solid;
1174
+ }
1175
+
1176
+ .ft-input-label--outlined:before {
1177
+ border-left-width: 1px;
1178
+ border-left-style: solid;
1179
+ border-radius: ${_.borderRadius} 0 0 ${_.borderRadius};
1180
+ }
1181
+
1182
+ .ft-input-label--outlined:after {
1183
+ border-right-width: 1px;
1184
+ border-right-style: solid;
1185
+ border-radius: 0 ${_.borderRadius} ${_.borderRadius} 0;
1186
+ }
1187
+
1188
+ .ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
1189
+ padding: 2px 4px;
1190
+ z-index: ${_.raisedZIndex};
1191
+ background-color: ${_.backgroundColor};
1192
+ border-radius: ${_.borderRadius};
1193
+ top: calc((${ie.lineHeight} / -2) + 2px);
1194
+ }
1195
+
1196
+ .ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
1197
+ border-top: none;
1198
+ }
1199
+ `;var z={fontSize:j.FtCssVariableFactory.create("--ft-text-area-font-size","","SIZE","14px"),labelSize:j.FtCssVariableFactory.create("--ft-text-area-label-size","","SIZE","11px"),verticalSpacing:j.FtCssVariableFactory.create("--ft-text-area-vertical-spacing","","SIZE","4px"),horizontalSpacing:j.FtCssVariableFactory.create("--ft-text-area-horizontal-spacing","","SIZE","16px"),helperColor:j.FtCssVariableFactory.extend("--ft-text-area-helper-color","",j.designSystemVariables.colorOnSurfaceMedium),colorPrimary:j.FtCssVariableFactory.external(j.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:j.FtCssVariableFactory.external(j.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:j.FtCssVariableFactory.external(j.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:j.FtCssVariableFactory.external(j.designSystemVariables.borderRadiusS,"Design system"),colorError:j.FtCssVariableFactory.external(j.designSystemVariables.colorError,"Design system")},Gp=Kp.css`
1200
+ *:focus {
1201
+ outline: none;
1202
+ }
1203
+
1204
+ .ft-text-area {
1205
+ display: flex;
1206
+ flex-direction: column;
1207
+ align-items: stretch;
1208
+ }
1209
+
1210
+ ft-input-label {
1211
+ ${(0,j.setVariable)(_.fontSize,z.fontSize)};
1212
+ ${(0,j.setVariable)(_.raisedFontSize,z.labelSize)};
1213
+ ${(0,j.setVariable)(_.verticalSpacing,z.verticalSpacing)};
1214
+ ${(0,j.setVariable)(_.horizontalSpacing,z.horizontalSpacing)};
1215
+ }
1216
+
1217
+ .ft-text-area--main-panel {
1218
+ position: relative;
1219
+ display: flex;
1220
+ }
1221
+
1222
+ .ft-text-area--input-panel {
1223
+ flex-grow: 1;
1224
+ position: relative;
1225
+ display: flex;
1226
+ align-items: center;
1227
+ overflow: hidden;
1228
+ gap: 8px;
1229
+ }
1230
+
1231
+ .ft-text-area--input-panel ft-ripple {
1232
+ ${(0,j.setVariable)(W.opacityContentOnSurfaceHover,"0.08")};
1233
+ ${(0,j.setVariable)(W.opacityContentOnSurfacePressed,"0.04")};
1234
+ }
1235
+
1236
+ .ft-text-area--input {
1237
+ display: block;
1238
+ position: relative;
1239
+ flex-grow: 1;
1240
+ flex-shrink: 1;
1241
+ min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
1242
+ align-self: stretch;
1243
+ resize: none;
1244
+
1245
+ ${(0,j.setVariable)(me.fontSize,z.fontSize)};
1246
+ ${(0,j.setVariable)(me.lineHeight,z.fontSize)};
1247
+ color: ${z.colorOnSurface};
1248
+
1249
+ padding: 0 ${z.horizontalSpacing};
1250
+ margin: calc(${z.verticalSpacing} + ${z.labelSize} / 2) 0 ${z.verticalSpacing} 0;
1251
+
1252
+ border: none;
1253
+ background: none;
1254
+
1255
+ line-height: 1.4;
1256
+ }
1257
+
1258
+ .ft-text-area--disabled .ft-text-area--input {
1259
+ color: ${z.colorOnSurfaceDisabled};
1260
+ }
1261
+
1262
+ .ft-text-area:not(.ft-text-area--disabled) .ft-text-area--input-panel {
1263
+ cursor: pointer;
1264
+ }
1265
+
1266
+ .ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
1267
+ ${(0,j.setVariable)(_.borderColor,z.colorPrimary)};
1268
+ ${(0,j.setVariable)(_.textColor,z.colorPrimary)};
1269
+ }
1270
+
1271
+ .ft-text-area--filled .ft-text-area--input-panel {
1272
+ border-radius: ${z.borderRadiusS} ${z.borderRadiusS} 0 0;
1273
+ }
1274
+
1275
+ .ft-text-area--filled:not(.ft-text-area--no-label) .ft-text-area--input {
1276
+ align-self: stretch;
1277
+ margin-bottom: ${z.verticalSpacing};
1278
+ margin-top: calc(${z.labelSize} + 2 * ${z.verticalSpacing});
1279
+ }
1280
+
1281
+ .ft-text-area--outlined .ft-text-area--input-panel {
1282
+ border-radius: ${z.borderRadiusS};
1283
+ }
1284
+
1285
+ .ft-text-area--helper-text {
1286
+ padding: 0 12px 0 ${z.horizontalSpacing};
1287
+ color: ${z.helperColor};
1288
+ }
1289
+
1290
+ .ft-text-area--in-error .ft-text-area--input,
1291
+ .ft-text-area--in-error .ft-text-area--helper-text {
1292
+ color: ${z.colorError};
1293
+ }
1294
+
1295
+ ft-resizer {
1296
+ position: absolute;
1297
+ bottom: 0;
1298
+ }
1299
+ `;var bs=u(A()),$e=u($()),sf=u(oe()),qe=u(g());var gs=u(A()),se=u($()),vs=u(g());var Zp=u(A()),Gi=u(g()),qp={colorOutline:Gi.FtCssVariableFactory.external(Gi.designSystemVariables.colorOutline,"Design system"),colorOnSurfaceMedium:Gi.FtCssVariableFactory.external(Gi.designSystemVariables.colorOnSurfaceMedium,"Design system")},Yp=Zp.css`
1300
+ :host {
1301
+ display: block;
1302
+ }
1303
+
1304
+ .ft-resizer {
1305
+ display: flex;
1306
+ }
1307
+
1308
+ ft-icon {
1309
+ transform: rotate(-45deg);
1310
+ color: ${qp.colorOutline};
1311
+ }
1312
+
1313
+ .ft-resizer--dragging ft-icon,
1314
+ .ft-resizer:hover ft-icon,
1315
+ [role="button"][aria-pressed="true"] ft-icon{
1316
+ color: ${qp.colorOnSurfaceMedium};
1317
+ }
1318
+ `;var Ge=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ms=class extends CustomEvent{constructor(t,r){super("resize",{detail:{width:t,height:r}})}},Et=class extends vs.FtLitElement{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.iconVariant=kt.material,this.cursor="nwse-resize",this.ariaLabel="",this.dragging=!1,this.isAriaPressed=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return gs.html`
1319
+ <style>
1320
+ .ft-resizer {
1321
+ cursor: ${(0,gs.unsafeCSS)(this.cursor)}
1322
+ }
1323
+ </style>
1324
+ <div class="ft-resizer ft-no-text-select ${this.dragging?"ft-resizer--dragging":""}"
1325
+ role="button"
1326
+ tabindex="0"
1327
+ aria-label="${this.ariaLabel}"
1328
+ @mousedown=${this.initDragFromMouse}
1329
+ @touchstart=${this.initDragFromTouch}
1330
+ @keydown=${this.initKeydownPress}>
1331
+ <ft-icon .variant=${this.iconVariant} .value=${this.icon} focusable="false" aria-hidden="true"></ft-icon>
1332
+ </div>
1333
+ `}initDragFromMouse(t){t.detail>0&&this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initKeydownPress(t){let r=t.key;["Enter"," ","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&(t.preventDefault(),t.stopPropagation()),this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight;let n=t.currentTarget;r==="Enter"||r===" "?(this.isAriaPressed=!this.isAriaPressed,n.setAttribute("aria-pressed",this.isAriaPressed.toString())):r==="Escape"&&(this.isAriaPressed=!1,n.setAttribute("aria-pressed",this.isAriaPressed.toString())),this.isAriaPressed&&(r==="ArrowLeft"?this.fixedWidth-=10:r==="ArrowRight"?this.fixedWidth+=10:r==="ArrowUp"?this.fixedHeight-=10:r==="ArrowDown"&&(this.fixedHeight+=10),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&this.dispatchEvent(new ms(this.fixedWidth,this.fixedHeight)))}initDrag(t,r){this.dragging=!0,this.startX=t,this.startY=r,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,r){let i=this.fixedWidth+t-this.startX,n=this.fixedHeight+r-this.startY;this.dispatchEvent(new ms(i,n))}};Et.elementDefinitions={"ft-icon":V};Et.styles=[vs.noTextSelect,Yp];Ge([(0,se.property)({type:Number})],Et.prototype,"initialWidth",void 0);Ge([(0,se.property)({type:Number})],Et.prototype,"initialHeight",void 0);Ge([(0,se.property)()],Et.prototype,"icon",void 0);Ge([(0,se.property)()],Et.prototype,"iconVariant",void 0);Ge([(0,se.property)()],Et.prototype,"cursor",void 0);Ge([(0,se.property)()],Et.prototype,"ariaLabel",void 0);Ge([(0,se.state)()],Et.prototype,"dragging",void 0);Ge([(0,se.state)()],Et.prototype,"isAriaPressed",void 0);Ge([(0,se.eventOptions)({passive:!0})],Et.prototype,"initDragFromMouse",null);Ge([(0,se.eventOptions)({passive:!0})],Et.prototype,"initDragFromTouch",null);var Jp=u(g());var Xp={"ft-resizer":Et};(0,Jp.customElements)(Xp);var ys=u($());var nl=u(A()),ol=u($());function Qp(e,t,r){return e?t(e):r?.(e)}var ef=u(oe()),rf=u(g()),tf=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ai=class extends rf.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1}get inputLabelClasses(){return{}}render(){return nl.html`
1334
+ <div class="${(0,ef.classMap)(this.inputLabelClasses)}">
1335
+ ${Qp(this.text,()=>nl.html`
1336
+ <div class="ft-input-label--text ft-typography--caption">
1337
+ <label class="ft-input-label--floating-text">${this.text}</label>
1338
+ <span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
1339
+ </div>
1340
+ `)}
1341
+ </div>
1342
+ `}};ai.elementDefinitions={};tf([(0,ol.property)({type:String})],ai.prototype,"text",void 0);tf([(0,ol.property)({type:Boolean})],ai.prototype,"raised",void 0);var sl=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ae=class extends ai{constructor(){super(...arguments),this.outlined=!1,this.error=!1,this.disabled=!1}get inputLabelClasses(){return{"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error}}};ae.elementDefinitions={};ae.styles=[Ao,Wp];sl([(0,ys.property)({type:Boolean})],ae.prototype,"outlined",void 0);sl([(0,ys.property)({type:Boolean})],ae.prototype,"error",void 0);sl([(0,ys.property)({type:Boolean})],ae.prototype,"disabled",void 0);var of=u(g());var nf={"ft-input-label":ae};(0,of.customElements)(nf);var Se=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},mt=class extends(0,qe.toFtFormComponent)(qe.FtLitElement){constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.height=50,this.focused=!1}render(){let t={"ft-text-area":!0,"ft-text-area--filled":!this.outlined,"ft-text-area--outlined":this.outlined,"ft-text-area--disabled":this.disabled,"ft-text-area--has-value":!!this.value,"ft-text-area--no-label":!this.label,"ft-text-area--in-error":this.error};return bs.html`
1343
+ <style>
1344
+ .ft-text-area--main-panel {
1345
+ height: calc(4 * ${z.verticalSpacing} + ${z.labelSize} + ${z.fontSize} + ${this.height}px);
1346
+ }
1347
+
1348
+ ft-resizer {
1349
+ right: ${this.textarea!=null?this.textarea.offsetWidth-this.textarea.clientWidth:0}px;
1350
+ }
1351
+ </style>
1352
+ <div class="${(0,sf.classMap)(t)}">
1353
+ <div class="ft-text-area--main-panel">
1354
+ <ft-input-label text="${this.label}"
1355
+ ?disabled=${this.disabled}
1356
+ ?outlined=${this.outlined}
1357
+ ?raised=${this.focused||this.value!=""}
1358
+ ?error=${this.error}
1359
+ aria-hidden="true"
1360
+ ></ft-input-label>
1361
+ <div class="ft-text-area--input-panel">
1362
+ ${this.outlined?null:bs.html`
1363
+ <ft-ripple ?disabled=${this.disabled} activated></ft-ripple>
1364
+ `}
1365
+ <textarea
1366
+ aria-label="${this.label}"
1367
+ class="ft-typography--body1 ft-text-area--input"
1368
+ ?disabled=${this.disabled}
1369
+ .value=${this.value}
1370
+ @change=${this.updateValueFromInputField}
1371
+ @keydown=${this.onKeyDown}
1372
+ @keyup=${this.liveUpdateValueFromInputField}
1373
+ @focus=${()=>this.focused=!0}
1374
+ @focusout=${()=>this.focused=!1}>
1375
+ </textarea>
1376
+ </div>
1377
+ <ft-resizer @resize=${this.onResize}
1378
+ initialHeight="${this.height}"
1379
+ cursor="ns-resize"
1380
+ ariaLabel="Resize text area"></ft-resizer>
1381
+ </div>
1382
+ ${this.helper?bs.html`
1383
+ <ft-typography class="ft-text-area--helper-text" variant="${H.caption}">
1384
+ ${this.helper}
1385
+ </ft-typography>`:void 0}
1386
+ </div>
1387
+ `}setValue(t,r=!1){this.value=t,this.setFormValue(t),r&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(t){(t.key==="Enter"||t.key===" ")&&t.stopPropagation()}updateValueFromInputField(){var t;this.value=((t=this.textarea)===null||t===void 0?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=((t=this.textarea)===null||t===void 0?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(!this.maxHeight||this.maxHeight>0&&t.detail.height<this.maxHeight)&&(this.height=t.detail.height)}};mt.elementDefinitions={"ft-input-label":ae,"ft-resizer":Et,"ft-ripple":D,"ft-typography":N};mt.styles=[xr,Gp];Se([(0,$e.property)({type:String})],mt.prototype,"label",void 0);Se([(0,$e.property)({reflect:!0})],mt.prototype,"value",void 0);Se([(0,$e.property)({type:String})],mt.prototype,"helper",void 0);Se([(0,$e.property)({type:Boolean})],mt.prototype,"outlined",void 0);Se([(0,$e.property)({type:Boolean})],mt.prototype,"disabled",void 0);Se([(0,$e.property)({type:Boolean})],mt.prototype,"error",void 0);Se([(0,qe.numberProperty)({reflect:!0})],mt.prototype,"height",void 0);Se([(0,qe.numberProperty)()],mt.prototype,"maxHeight",void 0);Se([(0,$e.query)("textarea")],mt.prototype,"textarea",void 0);Se([(0,$e.state)()],mt.prototype,"focused",void 0);Se([(0,qe.ignoreComposingEvents)()],mt.prototype,"onKeyDown",null);Se([(0,qe.ignoreComposingEvents)()],mt.prototype,"liveUpdateValueFromInputField",null);var lf=u(g());var af={"ft-text-area":mt};(0,lf.customElements)(af);var xf=u(Ci());var Y=Wt.build("integratedFeedbackComponent"),cf={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",feedbackfromEmail:"Your email",feedbackfromEmailInvalid:"Please enter a valid email address",okButton:"Send feedback",cancelButton:"Cancel",moreOptionsButton:"More options",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later.",mapFeedbackMainTitle:"Send feedback",mapRatingSectionTitle:"Rate this document",mapDichotomousRatingSectionTitle:"Did it solve your problem?",mapFeedbackSectionTitle:"Write your review",topicFeedbackMainTitle:"Send feedback",topicRatingSectionTitle:"Rate this content",topicDichotomousRatingSectionTitle:"Did this content solve your problem?",topicFeedbackSectionTitle:"Write your review",viewerFeedbackMainTitle:"Send feedback",viewerRatingSectionTitle:"Rate this content",viewerDichotomousRatingSectionTitle:"Did this content solve your problem?",viewerFeedbackSectionTitle:"Write your review"};var xs=class extends CustomEvent{constructor(t){super("live-change",{detail:t})}},Ss=class extends CustomEvent{constructor(t){super("change",{detail:t})}},ws=class extends CustomEvent{constructor(t){super("invalid",{detail:t})}};var uf=u(A()),T=u(g());var I={fontSize:T.FtCssVariableFactory.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:T.FtCssVariableFactory.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:T.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:T.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:T.FtCssVariableFactory.extend("--ft-text-field-helper-color","",T.designSystemVariables.colorOnSurfaceMedium),colorPrimary:T.FtCssVariableFactory.external(T.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:T.FtCssVariableFactory.external(T.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:T.FtCssVariableFactory.external(T.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:T.FtCssVariableFactory.external(T.designSystemVariables.borderRadiusS,"Design system"),colorError:T.FtCssVariableFactory.external(T.designSystemVariables.colorError,"Design system"),prefixColor:T.FtCssVariableFactory.extend("--ft-text-field-prefix-color","",T.designSystemVariables.colorOnSurfaceMedium),iconColor:T.FtCssVariableFactory.extend("--ft-text-field-icon-color","",T.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:T.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),backgroundColor:T.FtCssVariableFactory.extend("--ft-text-field-background-color","",T.designSystemVariables.colorSurface),colorOutline:T.FtCssVariableFactory.external(T.designSystemVariables.colorOutline,"Design system"),elevation02:T.FtCssVariableFactory.external(T.designSystemVariables.elevation02,"Design system"),suggestSize:T.FtCssVariableFactory.create("--ft-text-field-suggest-size","","SIZE","300px")},df=uf.css`
1388
+ *:focus {
1389
+ outline: none;
1390
+ }
1391
+
1392
+ .ft-text-field {
1393
+ display: flex;
1394
+ flex-direction: column;
1395
+ align-items: stretch;
1396
+ position: relative;
1397
+ --text-field-internal-suggest-size: ${I.suggestSize};
1398
+ }
1399
+
1400
+ ft-input-label {
1401
+ ${(0,T.setVariable)(_.fontSize,I.fontSize)};
1402
+ ${(0,T.setVariable)(_.raisedFontSize,I.labelSize)};
1403
+ ${(0,T.setVariable)(_.verticalSpacing,I.verticalSpacing)};
1404
+ ${(0,T.setVariable)(_.horizontalSpacing,I.horizontalSpacing)};
1405
+ ${(0,T.setVariable)(_.backgroundColor,I.backgroundColor)};
1406
+ }
1407
+
1408
+ .ft-text-field--main-panel {
1409
+ position: relative;
1410
+ display: flex;
1411
+ height: calc(4 * ${I.verticalSpacing} + ${I.labelSize} + ${I.fontSize});
1412
+ }
1413
+
1414
+ .ft-text-field--input-panel {
1415
+ flex-grow: 1;
1416
+ position: relative;
1417
+ display: flex;
1418
+ align-items: center;
1419
+ overflow: hidden;
1420
+ padding: 0 ${I.horizontalSpacing};
1421
+
1422
+ ${(0,T.setVariable)(me.fontSize,I.fontSize)};
1423
+ ${(0,T.setVariable)(me.lineHeight,I.fontSize)};
1424
+ }
1425
+
1426
+ .ft-text-field--input-panel ft-ripple {
1427
+ ${(0,T.setVariable)(W.opacityContentOnSurfaceHover,"0.08")};
1428
+ ${(0,T.setVariable)(W.opacityContentOnSurfacePressed,"0.04")};
1429
+ }
1430
+
1431
+ .ft-text-field--filled.ft-text-field--with-label .ft-text-field--input-panel {
1432
+ align-items: flex-end;
1433
+ padding: 0 ${I.horizontalSpacing} ${I.verticalSpacing} ${I.horizontalSpacing};
1434
+ }
1435
+
1436
+ .ft-text-field--prefix {
1437
+ color: ${I.prefixColor};
1438
+ margin-right: 2px;
1439
+ flex-shrink: 1;
1440
+ overflow: hidden;
1441
+ white-space: nowrap;
1442
+ text-overflow: ellipsis;
1443
+ }
1444
+
1445
+ .ft-text-field--with-label:not(.ft-text-field--raised-label) .ft-text-field--prefix {
1446
+ display: none;
1447
+ }
1448
+
1449
+ .ft-text-field--input {
1450
+ display: block;
1451
+ position: relative;
1452
+ flex-grow: 1;
1453
+ flex-shrink: 1;
1454
+ min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
1455
+
1456
+ color: ${I.colorOnSurface};
1457
+ padding: calc(2 * ${I.verticalSpacing}) 0;
1458
+ border: none;
1459
+ background: none;
1460
+
1461
+ &:-webkit-autofill,
1462
+ &:-webkit-autofill:hover,
1463
+ &:-webkit-autofill:focus {
1464
+ -webkit-text-fill-color: ${I.colorOnSurface};
1465
+ transition: background-color 50000000s ease-in-out 100000s;
1466
+ }
1467
+ }
1468
+
1469
+ .ft-text-field--filled.ft-text-field--with-label .ft-text-field--input {
1470
+ padding-bottom: 0;
1471
+ padding-top: calc(${I.labelSize} + 2 * ${I.verticalSpacing});
1472
+ }
1473
+
1474
+ .ft-text-field--input::-webkit-calendar-picker-indicator,
1475
+ .ft-text-field--input::-webkit-list-button {
1476
+ display: none !important;
1477
+ }
1478
+
1479
+ .ft-text-field--disabled .ft-text-field--input {
1480
+ color: ${I.colorOnSurfaceDisabled};
1481
+ }
1482
+
1483
+ .ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
1484
+ ${(0,T.setVariable)(_.borderColor,I.colorPrimary)};
1485
+ ${(0,T.setVariable)(_.textColor,I.colorPrimary)};
1486
+ }
1487
+
1488
+ .ft-text-field--filled .ft-text-field--input-panel {
1489
+ border-radius: ${I.borderRadiusS} ${I.borderRadiusS} 0 0;
1490
+ }
1491
+
1492
+ .ft-text-field--outlined .ft-text-field--input-panel {
1493
+ border-radius: ${I.borderRadiusS};
1494
+ }
1495
+
1496
+ .ft-text-field--helper-text {
1497
+ padding: 0 12px 0 ${I.horizontalSpacing};
1498
+ color: ${I.helperColor};
1499
+ }
1500
+
1501
+ .ft-text-field--in-error .ft-text-field--input,
1502
+ .ft-text-field--in-error .ft-text-field--helper-text,
1503
+ .ft-text-field--in-error .ft-text-field--prefix {
1504
+ color: ${I.colorError};
1505
+ }
1506
+
1507
+ .ft-text-field--icon {
1508
+ align-self: center;
1509
+ margin-left: 8px;
1510
+ color: ${I.iconColor};
1511
+ }
1512
+
1513
+ .ft-text-field--container {
1514
+ position: relative;
1515
+ }
1516
+
1517
+ .ft-text-field--suggestions {
1518
+ display: none;
1519
+ flex-direction: column;
1520
+ position: absolute;
1521
+ z-index: ${I.floatingZIndex};
1522
+ background: ${I.backgroundColor};
1523
+ border: 1px solid ${I.colorOutline};
1524
+ border-radius: 0 0 ${I.borderRadiusS} ${I.borderRadiusS};
1525
+ box-shadow: ${I.elevation02};
1526
+ outline: none;
1527
+ max-height: var(--text-field-internal-suggest-size);
1528
+ overflow-y: auto;
1529
+ }
1530
+
1531
+ .ft-text-field--fixed .ft-text-field--suggestions {
1532
+ position: fixed;
1533
+ }
1534
+
1535
+ .ft-text-field:not(.ft-text-field--hide-suggestions):focus-within .ft-text-field--suggestions {
1536
+ display: flex;
1537
+ }
1538
+
1539
+ .ft-text-field--with-icon {
1540
+ ${(0,T.setVariable)(_.labelMaxWidth,`calc(100% - ${ft.size} - ${_.horizontalSpacing})`)};
1541
+ }
1542
+
1543
+ .ft-text-field--with-password ft-icon:hover {
1544
+ cursor: pointer;
1545
+ }
1546
+ `;var xt=u(A()),M=u($()),gf=u(Ci()),vf=u(oe());var le=u(g());var hf=u(g()),Dn=u(A()),li=u($());var pf=u(A());var ff=pf.css`
1547
+ .ft-text-field-suggestion {
1548
+ position: relative;
1549
+ padding: 8px 16px;
1550
+ cursor: pointer;
1551
+ min-height: 44px;
1552
+ box-sizing: border-box;
1553
+ outline: none;
1554
+ }
1555
+
1556
+ .ft-text-field-suggestion,
1557
+ .ft-text-field-suggestion--label {
1558
+ display: flex;
1559
+ align-items: center;
1560
+ gap: 8px;
1561
+ }
1562
+
1563
+ .ft-text-field-suggestion--label {
1564
+ flex-grow: 1;
1565
+ flex-shrink: 1;
1566
+ }
1567
+
1568
+ .ft-text-field-suggestion--with-helper {
1569
+ display: flex;
1570
+ flex-direction: column;
1571
+ align-items: flex-start;
1572
+ gap: 0;
1573
+ }
1574
+
1575
+ .ft-text-field-suggestion--helper-text {
1576
+ color: ${I.helperColor};
1577
+ }
1578
+
1579
+ slot {
1580
+ pointer-events: none;
1581
+ }
1582
+ `;var mf=u(oe()),As=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},al=class extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}},we=class extends hf.FtLitElement{render(){let t={"ft-text-field-suggestion":!0,"ft-text-field-suggestion--with-helper":!!this.helper};return Dn.html`
1583
+ <div class="${(0,mf.classMap)(t)}"
1584
+ tabindex="-1"
1585
+ @keydown=${this.onKeyDown}
1586
+ @click=${this.confirmSuggestion}>
1587
+ <ft-ripple></ft-ripple>
1588
+ ${this.helper?Dn.html`
1589
+ <ft-typography class="ft-text-field-suggestion--helper-text" variant="caption">
1590
+ ${this.helper}
1591
+ </ft-typography>`:Dn.nothing}
1592
+ <ft-typography part="label"
1593
+ variant="body1"
1594
+ class="ft-text-field-suggestion--label">
1595
+ <slot></slot>
1596
+ </ft-typography>
1597
+ </div>
1598
+ `}focus(t){var r;(r=this.container)===null||r===void 0||r.focus(t)}click(){var t;(t=this.container)===null||t===void 0||t.click()}confirmSuggestion(){this.dispatchEvent(new al(this.getValue()))}getValue(){return this.value||this.getTextContent()}getTextContent(){return this.assignedNodes.map(t=>t.textContent).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}};we.elementDefinitions={"ft-ripple":D,"ft-typography":N,"ft-icon":V};we.styles=ff;As([(0,li.property)()],we.prototype,"value",void 0);As([(0,li.property)()],we.prototype,"helper",void 0);As([(0,li.query)(".ft-text-field-suggestion")],we.prototype,"container",void 0);As([(0,li.queryAssignedNodes)()],we.prototype,"assignedNodes",void 0);var F=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},O=class extends(0,le.toFtFormComponent)(le.FtLitElement){constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.prefix=null,this.passwordHiddenIcon=Gt.EYE_SLASH,this.passwordRevealedIcon=Gt.EYE,this.filterSuggestions=!1,this.password=!1,this.focused=!1,this.inputValid=!0,this.hidePassword=!0,this.hideSuggestions=!1,this.visibleSuggestions=[],this.providedSuggestions=[]}get value(){return this._value||""}set value(t){this.setInternalValue(t||""),this.dispatchedValue=t||""}setInternalValue(t){let r=this._value;this._value=t||"",this.setFormValue(this._value),this.requestUpdate("value",r)}focus(){var t;(t=this.input)===null||t===void 0||t.focus()}blur(){var t;(t=this.input)===null||t===void 0||t.blur()}render(){var t;let r={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":!this.inputValid||this.error,"ft-text-field--fixed":this.fixedMenuPosition,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":!this.suggestionsShouldBeDisplayed(),"ft-text-field--raised-label":this.focused||this.value!="","ft-text-field--with-icon":!!this.icon,"ft-text-field--with-password":this.isPasswordField()},i=this.suggestionsProvider&&this.value&&this.value!=""&&!this.providedSuggestions.map(a=>a.label).includes(this.value),o=!this.suggestionsProvider&&this.filterSuggestions&&this.value&&this.value!=""||i,s=this.inputValid?this.helper:(t=this.input)===null||t===void 0?void 0:t.validationMessage;return xt.html`
1599
+ <div class="${(0,vf.classMap)(r)}">
1600
+ <div class="ft-text-field--main-panel"
1601
+ @keydown=${this.handleKeyboardNavigation}
1602
+ @focusout=${this.onMainPanelBlur}>
1603
+ <ft-input-label text="${this.label}"
1604
+ ?disabled=${this.disabled}
1605
+ ?outlined=${this.outlined}
1606
+ ?raised=${this.focused||this.value!=""}
1607
+ ?error=${!this.inputValid||this.error}></ft-input-label>
1608
+ <div class="ft-text-field--input-panel">
1609
+ ${this.outlined?xt.nothing:xt.html`
1610
+ <ft-ripple ?disabled=${this.disabled} activated></ft-ripple>
1611
+ `}
1612
+ ${this.prefix?xt.html`
1613
+ <ft-typography class="ft-text-field--prefix" variant="body1">
1614
+ ${this.prefix}
1615
+ </ft-typography>
1616
+ `:xt.nothing}
1617
+ <input type="${this.resolveInputType()}"
1618
+ name="${sr(this.name)}"
1619
+ maxlength="${sr(this.maxLength||void 0)}"
1620
+ aria-label="${this.label}"
1621
+ aria-describedby="${sr(this.helper?"helper":void 0)}"
1622
+ aria-invalid="${this.error}"
1623
+ autocomplete="${sr(this.autocomplete)}"
1624
+ class="ft-typography--body1 ft-text-field--input"
1625
+ part="input"
1626
+ ?disabled=${this.disabled}
1627
+ .value=${this.value}
1628
+ @click=${this.handleClick}
1629
+ @keydown=${this.handleInput}
1630
+ @keyup=${this.catchComposingEvents}
1631
+ @focus=${this.onFocus}
1632
+ />
1633
+ ${this.renderIcon()}
1634
+ </div>
1635
+ <div class="ft-text-field--suggestions"
1636
+ @suggestion-selected=${this.onSuggestionSelected}>
1637
+ ${this.renderSuggestions()}
1638
+ ${o?xt.html`
1639
+ <ft-text-field-suggestion class="ft-text-field-suggestion--new-value" helper="${this.suggestionsHelper}">
1640
+ ${this.value}
1641
+ </ft-text-field-suggestion>
1642
+ `:xt.nothing}
1643
+ </div>
1644
+ </div>
1645
+ ${s?xt.html`
1646
+ <ft-typography class="ft-text-field--helper-text" variant="${H.caption}" id="helper" role="alert">
1647
+ ${s}
1648
+ </ft-typography>
1649
+ `:xt.nothing}
1650
+ </div>
1651
+ `}resolveInputType(){var t;return this.isPasswordField()?this.hidePassword?"password":"text":(t=this.type)!==null&&t!==void 0?t:"text"}renderSuggestions(){return this.suggestionsProvider?xt.html`
1652
+ ${(0,gf.repeat)(this.providedSuggestions,t=>xt.html`
1653
+ <ft-text-field-suggestion value="${t.value}" @click=${r=>this.onSuggestionClick(r,t.clickHandler)}>
1654
+ ${t.icon?xt.html`
1655
+ <ft-icon .value=${t.icon}></ft-icon>
1656
+ `:xt.nothing}
1657
+ ${t.label}
1658
+ </ft-text-field-suggestion>
1659
+ `)}
1660
+ `:xt.html`
1661
+ <slot @slotchange=${()=>this.filterSuggestionsIfNeeded()}></slot>
1662
+ `}onSuggestionClick(t,r){r&&(t.preventDefault(),r(t))}renderPasswordIcon(){return xt.html`
1663
+ <ft-icon class="ft-text-field--icon"
1664
+ .variant=${this.iconVariant}
1665
+ .value=${this.hidePassword?this.passwordHiddenIcon:this.passwordRevealedIcon}
1666
+ @click=${()=>this.togglePasswordVisibility()}></ft-icon>
1667
+ `}renderIcon(){return this.isPasswordField()?this.renderPasswordIcon():this.icon?xt.html`
1668
+ <ft-icon class="ft-text-field--icon"
1669
+ .variant=${this.iconVariant}
1670
+ .value=${this.icon}
1671
+ @click=${()=>{var t;return(t=this.input)===null||t===void 0?void 0:t.focus()}}></ft-icon>
1672
+ `:xt.nothing}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions")||t.has("suggestionsProvider"))&&this.updateSuggestions(),t.has("value")&&t.get("value")!=null&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&t.get("dispatchedValue")!=null&&(this.hideSuggestions=!0)}async updateSuggestions(){this.suggestionsProvider?this.providedSuggestions=await this.suggestionsProvider(this.value):this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.slottedSuggestions.forEach(t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase())),this.visibleSuggestions=this.slottedSuggestions.filter(t=>!t.hidden)):this.visibleSuggestions=this.slottedSuggestions,this.newValueSuggestion&&(this.visibleSuggestions=[...this.visibleSuggestions,this.newValueSuggestion]),this.hideSuggestions=this.visibleSuggestions.length<=0}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&this.setSuggestionPosition(),t.has("value")&&this.suggestionsProvider&&(this.visibleSuggestions=[...this.providedSuggestionsInDom]),t.has("autocomplete")&&this.setupWatchAutofill(),this.suggestionsShouldBeDisplayed()&&this.setSuggestionPosition()}setupWatchAutofill(){var t;this.clearWatchAutofill(),((t=this.autocomplete)!==null&&t!==void 0?t:"off")!=="off"&&(this.watchAutofillInterval=setInterval(()=>{var r,i,n;!((r=this.input)===null||r===void 0)&&r.matches(":autofill")&&this.dispatchedValue!==((i=this.input)===null||i===void 0?void 0:i.value)&&this.setValue((n=this.input)===null||n===void 0?void 0:n.value,!0)},200))}clearWatchAutofill(){this.watchAutofillInterval&&clearInterval(this.watchAutofillInterval)}connectedCallback(){super.connectedCallback(),this.setupWatchAutofill()}disconnectedCallback(){super.disconnectedCallback(),this.clearWatchAutofill()}setValue(t,r=!1){var i,n;this.value!==t&&(this.inputValid=!0,this.setInternalValue(t),this.dispatchEvent(new xs(t))),r&&this.dispatchedValue!==t&&(this.inputValid=(n=(i=this.input)===null||i===void 0?void 0:i.checkValidity())!==null&&n!==void 0?n:!0,this.inputValid?(this.dispatchedValue=t,this.dispatchEvent(new Ss(t))):this.dispatchEvent(new ws(this.input.validationMessage)))}handleInput(t){var r;let i=((r=this.input)===null||r===void 0?void 0:r.value)||"";this.setValue(i,t.key=="Escape"||t.key=="Enter")}catchComposingEvents(t){}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var r;if(t.key==="ArrowDown"||t.key==="ArrowUp"){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;let i=this.visibleSuggestions.findIndex(o=>o.matches(":focus-within")),n;t.key==="ArrowDown"?n=i<this.visibleSuggestions.length-1?i+1:0:n=i>0?i-1:this.visibleSuggestions.length-1,(r=this.visibleSuggestions[n])===null||r===void 0||r.focus()}(t.key=="Escape"||t.key=="Enter")&&(this.hideSuggestions=!0)}onSuggestionSelected(t){var r;this.setValue(t.detail,!0),(r=this.input)===null||r===void 0||r.focus(),setTimeout(()=>this.hideSuggestions=!0,0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,r;!((t=this.mainPanel)===null||t===void 0)&&t.matches(":focus-within")||(this.focused=!1,this.setValue(((r=this.input)===null||r===void 0?void 0:r.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}isPasswordField(){return this.password||this.type==="password"}setSuggestionPosition(){this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px";let t=["bottom","top"];(0,le.computeOffsetAutoPosition)(this.mainPanel,this.suggestionsContainer,"bottom",t,"fixed","--text-field-internal-suggest-size",0).then(({x:r,y:i})=>{this.suggestionsContainer.style.left=`${r}px`,this.suggestionsContainer.style.top=`${i}px`})}suggestionsShouldBeDisplayed(){return!this.hideSuggestions&&(this.visibleSuggestions.length||this.providedSuggestions.length)}};O.elementDefinitions={"ft-input-label":ae,"ft-ripple":D,"ft-typography":N,"ft-icon":V,"ft-text-field-suggestion":we};O.styles=[xr,le.noTextInputDefaultClearButton,df];F([(0,M.property)()],O.prototype,"label",void 0);F([(0,M.property)({noAccessor:!0})],O.prototype,"value",null);F([(0,M.state)()],O.prototype,"dispatchedValue",void 0);F([(0,M.property)()],O.prototype,"helper",void 0);F([(0,M.property)()],O.prototype,"suggestionsHelper",void 0);F([(0,M.property)({type:Boolean})],O.prototype,"outlined",void 0);F([(0,M.property)({type:Boolean})],O.prototype,"disabled",void 0);F([(0,M.property)({type:Boolean})],O.prototype,"error",void 0);F([(0,M.property)({type:Boolean})],O.prototype,"fixedMenuPosition",void 0);F([(0,M.property)()],O.prototype,"prefix",void 0);F([(0,M.property)()],O.prototype,"icon",void 0);F([(0,M.property)()],O.prototype,"name",void 0);F([(0,M.property)()],O.prototype,"type",void 0);F([(0,M.property)()],O.prototype,"passwordHiddenIcon",void 0);F([(0,M.property)()],O.prototype,"passwordRevealedIcon",void 0);F([(0,M.property)()],O.prototype,"iconVariant",void 0);F([(0,M.property)({type:Boolean})],O.prototype,"filterSuggestions",void 0);F([(0,le.numberProperty)()],O.prototype,"maxLength",void 0);F([(0,M.property)({type:Boolean})],O.prototype,"password",void 0);F([(0,M.property)({type:String})],O.prototype,"autocomplete",void 0);F([(0,M.property)({attribute:!1})],O.prototype,"suggestionsProvider",void 0);F([(0,M.state)()],O.prototype,"focused",void 0);F([(0,M.state)()],O.prototype,"inputValid",void 0);F([(0,M.state)()],O.prototype,"hidePassword",void 0);F([(0,M.state)()],O.prototype,"hideSuggestions",void 0);F([(0,M.state)()],O.prototype,"visibleSuggestions",void 0);F([(0,M.state)()],O.prototype,"providedSuggestions",void 0);F([(0,M.query)(".ft-text-field--main-panel")],O.prototype,"mainPanel",void 0);F([(0,M.query)(".ft-text-field--input")],O.prototype,"input",void 0);F([(0,M.query)(".ft-text-field-suggestion--new-value")],O.prototype,"newValueSuggestion",void 0);F([(0,M.query)(".ft-text-field--suggestions")],O.prototype,"suggestionsContainer",void 0);F([(0,M.queryAll)("ft-text-field-suggestion")],O.prototype,"providedSuggestionsInDom",void 0);F([(0,M.queryAssignedElements)({selector:"ft-text-field-suggestion"})],O.prototype,"slottedSuggestions",void 0);F([(0,le.ignoreComposingEvents)()],O.prototype,"handleInput",null);F([(0,le.ignoreComposingEvents)()],O.prototype,"catchComposingEvents",null);var bf=u(g());var yf={"ft-text-field":O,"ft-text-field-suggestion":we};(0,bf.customElements)(yf);var Es=class extends CustomEvent{constructor(t){super("send-feedback",{detail:t})}};var St=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},X=class extends Kt(qi.FtLitElementRedux){constructor(){super(),this.hideTitle=!1,this.withMoreOptionsButton=!1,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.canAccessFeedback=!1,this.canRateThisContent=!1,this.from="",this.feedbackMessage="",this.addI18nContext(Y,cf),this.addStore(w)}get configuredRatingType(){var t,r;return(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.type)!==null&&r!==void 0?r:At.NO_RATING}get ratingTypeOfDoneRatingOfThisContent(){var t,r,i;return(i=(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||r===void 0?void 0:r.type)!==null&&i!==void 0?i:At.NO_RATING}get ratingValue(){var t,r,i;return(i=(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||r===void 0?void 0:r.value)!==null&&i!==void 0?i:-1}get ratingDate(){var t,r;let i=(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||r===void 0?void 0:r.date;return typeof i=="string"?(0,qi.parseDate)(i):i}render(){return!this.canAccessFeedback&&!this.canRateThisContent?lt.nothing:lt.html`
1673
+ <div part="container">
1674
+ ${this.hideTitle?lt.nothing:lt.html`
1675
+ <ft-typography variant="${H.title}" part="main-title">
1676
+ ${this.i18n(this.i18nProperties.feedbackMainTitle)}
1677
+ </ft-typography>
1678
+ `}
1679
+ ${this.renderRatingSection()}
1680
+ ${this.renderFeedbackSection()}
1681
+ </div>
1682
+ `}renderRatingSection(){var t;return this.canRateThisContent?lt.html`
1683
+ <div part="rating-container">
1684
+ <ft-typography variant="${H.title_dense}" part="section-title">
1685
+ ${this.i18n(((t=this.ratingSummary)===null||t===void 0?void 0:t.type)===At.DICHOTOMOUS?this.i18nProperties.dichotomousRatingSectionTitle:this.i18nProperties.ratingSectionTitle)}
1686
+ </ft-typography>
1687
+ ${this.renderRating()}
1688
+ <ft-typography variant="${H.caption}" part="rating-date">
1689
+ ${this.renderRatingDate()}
1690
+ </ft-typography>
1691
+ </div>
1692
+ `:lt.nothing}renderRatingDate(){let t=this.ratingDate;if(t==null)return Y.messages.notRated();if(t.getTime()>new Date().getTime()-6e4)return Y.messages.ratedNow();let r=new Date().toLocaleDateString(),i=t.toLocaleDateString();return r===i?Y.messages.ratedToday():Y.messages.ratedOn(t)}renderRating(){switch(this.configuredRatingType){case At.STARS:return lt.html`
1693
+ <div part="rating rating-stars">
1694
+ ${(0,xf.repeat)(new Array(5),(t,r)=>r,(t,r)=>{let i=this.ratingTypeOfDoneRatingOfThisContent===At.STARS&&this.ratingValue>r,n=r+1;return lt.html`
1695
+ <ft-button round part="rating-stars-${n}"
1696
+ label="${Y.messages.starsRating(n)}"
1697
+ tooltipPosition="top"
1698
+ .iconVariant=${this.iconVariant}
1699
+ icon="${i?this.filledStarIcon:this.emptyStarIcon}"
1700
+ class="rating-stars--${i?"active":"inactive"}"
1701
+ @click=${()=>this.rate(this.ratingValue===n?void 0:n)}
1702
+ ></ft-button>
1703
+ `})}
1704
+ </div>
1705
+ `;case At.LIKE:{let t=this.ratingTypeOfDoneRatingOfThisContent===At.LIKE&&this.ratingValue===0,r=this.ratingTypeOfDoneRatingOfThisContent===At.LIKE&&this.ratingValue===1;return lt.html`
1706
+ <ft-switch unselectable
1707
+ @change=${i=>this.rate(i.detail)}
1708
+ part="rating rating-like"
1709
+ label="${this.i18n(this.i18nProperties.ratingSectionTitle)}">
1710
+ <ft-switch-option .value=${1}
1711
+ ?selected=${r}
1712
+ .iconVariant=${this.iconVariant}
1713
+ icon="${r?this.filledLikeIcon:this.emptyLikeIcon}"
1714
+ role="radio">
1715
+ ${Y.messages.like()}
1716
+ </ft-switch-option>
1717
+ <ft-switch-option .value=${0}
1718
+ ?selected=${t}
1719
+ .iconVariant=${this.iconVariant}
1720
+ icon="${t?this.filledDislikeIcon:this.emptyDislikeIcon}"
1721
+ role="radio">
1722
+ ${Y.messages.dislike()}
1723
+ </ft-switch-option>
1724
+ </ft-switch>
1725
+ `}case At.DICHOTOMOUS:{let t=this.ratingTypeOfDoneRatingOfThisContent===At.DICHOTOMOUS&&this.ratingValue===0,r=this.ratingTypeOfDoneRatingOfThisContent===At.DICHOTOMOUS&&this.ratingValue===1;return lt.html`
1726
+ <ft-switch unselectable
1727
+ @change=${i=>this.rate(i.detail)}
1728
+ part="rating rating-dichotomous">
1729
+ <ft-switch-option .value=${1}
1730
+ ?selected=${r}>
1731
+ ${Y.messages.dichotomousYes()}
1732
+ </ft-switch-option>
1733
+ <ft-switch-option .value=${0}
1734
+ ?selected=${t}>
1735
+ ${Y.messages.dichotomousNo()}
1736
+ </ft-switch-option>
1737
+ </ft-switch>
1738
+ `}}return lt.nothing}rate(t){(t??-1)!==this.ratingValue&&this.dispatchEvent(new CustomEvent("rate",{detail:t}))}renderFeedbackSection(){var t,r,i,n,o;if(this.canAccessFeedback){let s=this.feedbackMailLinkBuilder(this.feedbackMessage),a=lt.html`
1739
+ <ft-button primary
1740
+ type="submit" name="submit"
1741
+ ?disabled=${!this.feedbackMessage||!this.validFromEmail()}
1742
+ part="send-feedback">
1743
+ ${Y.messages.okButton()}
1744
+ </ft-button>
1745
+ `;s&&(a=lt.html`
1746
+ <a part="send-feedback-link" href="${s}">
1747
+ ${a}
1748
+ </a>
1749
+ `);let l=this.withMoreOptionsButton&&(!((t=this.configuration)===null||t===void 0)&&t.mailsSentByFluidTopics||!((r=this.configuration)===null||r===void 0)&&r.mailsSentByFluidTopicsForUnauthenticatedUsers)?lt.html`
1750
+ <ft-button outlined
1751
+ type="button" name="more-options"
1752
+ @click=${this.onOpenMoreDetails}
1753
+ part="more-options">
1754
+ ${Y.messages.moreOptionsButton()}
1755
+ </ft-button>
1756
+ `:lt.nothing;return lt.html`
1757
+ <form part="feedback-container" autocomplete="on"
1758
+ @submit=${c=>this.onFormSubmitEvent(c,!!s)}>
1759
+ <ft-typography variant="${H.title_dense}" part="section-title">
1760
+ ${this.i18n(this.i18nProperties.feedbackSectionTitle)}
1761
+ </ft-typography>
1762
+ ${((n=(i=this.session)===null||i===void 0?void 0:i.profile)===null||n===void 0?void 0:n.userId)==null&&(!((o=this.configuration)===null||o===void 0)&&o.mailsSentByFluidTopicsForUnauthenticatedUsers)?lt.html`
1763
+ <ft-text-field outlined name="email" type="email" autocomplete="email"
1764
+ part="feedback-from-input"
1765
+ label="${Y.messages.feedbackfromEmail()}"
1766
+ @change=${c=>this.from=c.detail.trim()}
1767
+ ?error=${this.from&&!this.validFromEmail()}
1768
+ helper="${this.from&&!this.validFromEmail()?Y.messages.feedbackfromEmailInvalid():""}"
1769
+ ></ft-text-field>
1770
+ `:lt.nothing}
1771
+ <ft-text-area outlined
1772
+ part="feedback-input"
1773
+ label="${Y.messages.feedbackInputLabel()}"
1774
+ @live-change=${c=>this.feedbackMessage=c.detail.trim()}
1775
+ ></ft-text-area>
1776
+ <div part="buttons-container">
1777
+ ${l}
1778
+ ${a}
1779
+ </div>
1780
+ </form>
1781
+ `}return lt.nothing}onFormSubmitEvent(t,r){t.preventDefault(),r?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var t,r,i;let n=/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;return!(((r=(t=this.session)===null||t===void 0?void 0:t.profile)===null||r===void 0?void 0:r.userId)==null&&(!((i=this.configuration)===null||i===void 0)&&i.mailsSentByFluidTopicsForUnauthenticatedUsers))||n.test(this.from)}sendFeedback(){var t;this.dispatchEvent(new Es({message:this.feedbackInput.value,...((t=this.configuration)===null||t===void 0?void 0:t.mailsSentByFluidTopicsForUnauthenticatedUsers)&&{from:this.from}}))}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}onOpenMoreDetails(){this.dispatchEvent(new CustomEvent("open-more-options"))}clearFeedbackInput(){setTimeout(()=>this.feedbackInput.setValue("",!0),0)}};X.elementDefinitions={"ft-button":U,"ft-typography":N,"ft-switch":Bt,"ft-switch-option":at,"ft-text-area":mt,"ft-text-field":O};St([(0,ct.property)({type:Boolean})],X.prototype,"hideTitle",void 0);St([(0,ct.property)({type:Boolean})],X.prototype,"withMoreOptionsButton",void 0);St([(0,ct.property)()],X.prototype,"iconVariant",void 0);St([(0,ct.property)()],X.prototype,"emptyStarIcon",void 0);St([(0,ct.property)()],X.prototype,"filledStarIcon",void 0);St([(0,ct.property)()],X.prototype,"emptyLikeIcon",void 0);St([(0,ct.property)()],X.prototype,"filledLikeIcon",void 0);St([(0,ct.property)()],X.prototype,"emptyDislikeIcon",void 0);St([(0,ct.property)()],X.prototype,"filledDislikeIcon",void 0);St([(0,ct.property)({type:Boolean})],X.prototype,"canAccessFeedback",void 0);St([(0,ct.property)({type:Boolean})],X.prototype,"canRateThisContent",void 0);St([(0,ct.property)({attribute:!1})],X.prototype,"i18nProperties",void 0);St([(0,ct.property)({attribute:!1})],X.prototype,"ratingSummary",void 0);St([(0,ct.property)()],X.prototype,"configuration",void 0);St([(0,ct.property)()],X.prototype,"feedbackMailLinkBuilder",void 0);St([(0,qi.redux)({store:w.name})],X.prototype,"session",void 0);St([(0,ct.query)("[part='feedback-input']")],X.prototype,"feedbackInput",void 0);St([(0,ct.state)()],X.prototype,"from",void 0);St([(0,ct.state)()],X.prototype,"feedbackMessage",void 0);var Mn=class extends X{};Mn.styles=fs(hs);var ll=Wt.build("inDesignerFeedbackComponent"),Sf={feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."};var Cs=Wt.fromGwt("server");var _s=class{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(t,r,i,n,o){var s;this.subject=t,this.url=r,this.configuration=n,this.isAuthenticated=o,this.subjectMetadata=this.filterMetadata(i,n.subjectMetadataIds).map(a=>"["+a.values[a.values.length-1]+"]").join(""),this.bodyMetadata=this.filterMetadata(i,(s=n.bodyMetadataIds)!==null&&s!==void 0?s:[]).map(a=>"["+a.values.join(", ")+"]").join(" ")}filterMetadata(t,r){return r.map(i=>t.find(n=>n.key===i)).filter(i=>i!=null&&i.values.length>0)}shouldUseMailer(){var t,r;let i=this.isAuthenticated&&!(!((t=this.configuration)===null||t===void 0)&&t.mailsSentByFluidTopics),n=!this.isAuthenticated&&!(!((r=this.configuration)===null||r===void 0)&&r.mailsSentByFluidTopicsForUnauthenticatedUsers);return i||n}build(t){var r;if(t!=null&&t.length===0||!this.shouldUseMailer())return;let i=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`
1782
+ ${this.bodyMetadata}
1783
+ ${this.url}
1784
+ _________________________________________________________________
1785
+
1786
+ ${t??""}
1787
+
1788
+ _________________________________________________________________
1789
+ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configuration)===null||r===void 0?void 0:r.recipients.join(",")}?subject=${i}&body=${n}`}};var Mt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},J=class extends Dt(Kt(It)){get canAccessFeedback(){var t;return(t=this.service)===null||t===void 0?void 0:t.isFeatureAccessible(Rr.FEEDBACK,{session:this.session})}get canRateThisContent(){var t;return((t=this.service)===null||t===void 0?void 0:t.isFeatureAccessible(Rr.RATING,{session:this.session}))&&this.configuredRatingType!=At.NO_RATING}get configuredRatingType(){var t,r;return(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.type)!==null&&r!==void 0?r:At.NO_RATING}constructor(t=new mo){super(),this.guestStorage=t,this.editorMode=!1,this.hideTitle=!1,this.iconVariant=kt.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new _s,this.i18nProperties={feedbackMainTitle:Y.properties.viewerFeedbackMainTitle(),ratingSectionTitle:Y.properties.viewerRatingSectionTitle(),dichotomousRatingSectionTitle:Y.properties.viewerDichotomousRatingSectionTitle(),feedbackSectionTitle:Y.properties.viewerFeedbackSectionTitle()},this.loadGuestRating=()=>{let r=this.guestStorage.get(this.guestRatingKey());r&&(this.ratingSummary=r)},this.guestRatingKey=()=>{var r;return"ft-viewer-document-feedback-guest-rating-"+((r=this.document)===null||r===void 0?void 0:r.id)},this.sendRatingDebouncer=new Xt.Debouncer(500),this.addStore(w)}render(){return wf.html`
1790
+ <ft-viewer-feedback
1791
+ ?hideTitle=${this.hideTitle}
1792
+ iconVariant="${this.iconVariant}"
1793
+ emptyStarIcon="${this.emptyStarIcon}"
1794
+ filledStarIcon="${this.filledStarIcon}"
1795
+ emptyLikeIcon="${this.emptyLikeIcon}"
1796
+ filledLikeIcon="${this.filledLikeIcon}"
1797
+ emptyDislikeIcon="${this.emptyDislikeIcon}"
1798
+ filledDislikeIcon="${this.filledDislikeIcon}"
1799
+ ?canAccessFeedback=${this.canAccessFeedback}
1800
+ ?canRateThisContent=${this.canRateThisContent}
1801
+ .i18nProperties=${this.i18nProperties}
1802
+ .ratingSummary=${this.ratingSummary}
1803
+ .configuration=${this.configuration}
1804
+ .feedbackMailLinkBuilder=${t=>this.feedbackLinkBuilder.build(t)}
1805
+ @rate=${this.rate}
1806
+ @send-feedback=${this.sendFeedback}
1807
+ @mailer-feedback=${this.onMailerFeedbackSent}
1808
+ @open-more-options=${this.openMoreOptions}
1809
+ ></ft-viewer-feedback>
1810
+ `}willUpdate(t){var r,i,n;super.willUpdate(t),t.has("editorMode")&&this.editorMode&&this.addI18nContext(ll,Sf),["document","configuration","user","mailSubject"].some(o=>t.has(o))&&this.document&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,(r=this.document.prettyUrl)!==null&&r!==void 0?r:"",this.document.metadata,this.configuration,((n=(i=this.session)===null||i===void 0?void 0:i.profile)===null||n===void 0?void 0:n.userId)!=null),["session","document"].some(o=>t.has(o))&&this.session&&this.document&&this.loadGuestRating()}connectedCallback(){super.connectedCallback(),this.guestStorage.addStoreListener(this.guestRatingKey,this.loadGuestRating)}disconnectedCallback(){super.disconnectedCallback(),this.guestStorage.clearStoreListeners()}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:t.detail==null?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.guestStorage.store(this.guestRatingKey(),this.ratingSummary),this.sendRatingDebouncer.run(()=>this.sendRating(t.detail)))}async sendRating(t){var r,i,n;if(!this.editorMode&&this.ratingSummary)try{t==null?await((r=this.service)===null||r===void 0?void 0:r.unrateDocument(this.document.id)):await((i=this.service)===null||i===void 0?void 0:i.rateDocument(this.document.id,(n=this.ratingSummary)===null||n===void 0?void 0:n.type,t))}catch{this.dispatchEvent(new Xt.FtNotificationEvent({type:"error",message:Y.messages.ratingFailure()}))}}async sendFeedback(t){var r;try{this.editorMode?this.dispatchEvent(new Xt.FtNotificationEvent({type:"info",message:ll.messages.feedbackAndRatingDisabledInEditor()})):(await((r=this.service)===null||r===void 0?void 0:r.sendDocumentFeedback(this.document.id,t.detail.message,t.detail.from)),this.dispatchEvent(new Xt.FtNotificationEvent({type:"info",message:Y.messages.feedbackSuccess()}))),this.viewerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new Xt.FtNotificationEvent({type:"error",message:Y.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new ds)}openMoreOptions(){var t,r;this.dispatchEvent(new us({documentId:this.document.id,documentTitle:this.displayName||"",ratingType:((t=this.ratingSummary)===null||t===void 0?void 0:t.type)||At.NO_RATING,ratingValue:(r=this.ratingSummary)===null||r===void 0?void 0:r.rating}))}};J.styles=fs(hs);J.elementDefinitions={"ft-viewer-feedback":Mn};J.storedRatingIfAuthenticated=(e,t)=>{var r,i;return!((r=t.session)===null||r===void 0)&&r.sessionAuthenticated?e.documentRating:(i=t.ratingSummary)!==null&&i!==void 0?i:e.documentRating};Mt([(0,Xt.redux)({store:w.name})],J.prototype,"session",void 0);Mt([(0,Xt.redux)({store:"viewer"})],J.prototype,"document",void 0);Mt([(0,Xt.redux)({store:w.name})],J.prototype,"editorMode",void 0);Mt([(0,Xt.redux)({store:"viewer",selector:e=>{var t;return(t=e.configuration)===null||t===void 0?void 0:t.feedback}})],J.prototype,"configuration",void 0);Mt([(0,Xt.redux)({store:"viewer",selector:J.storedRatingIfAuthenticated})],J.prototype,"ratingSummary",void 0);Mt([(0,Ne.property)({type:Boolean})],J.prototype,"hideTitle",void 0);Mt([(0,Ne.property)()],J.prototype,"iconVariant",void 0);Mt([(0,Ne.property)()],J.prototype,"emptyStarIcon",void 0);Mt([(0,Ne.property)()],J.prototype,"filledStarIcon",void 0);Mt([(0,Ne.property)()],J.prototype,"emptyLikeIcon",void 0);Mt([(0,Ne.property)()],J.prototype,"filledLikeIcon",void 0);Mt([(0,Ne.property)()],J.prototype,"emptyDislikeIcon",void 0);Mt([(0,Ne.property)()],J.prototype,"filledDislikeIcon",void 0);Mt([(0,Ne.query)("ft-viewer-feedback")],J.prototype,"viewerFeedback",void 0);Mt([Ro(Cs.properties["mail.file_feedback.subject"](e=>{var t,r;return[((t=e.document)===null||t===void 0?void 0:t.title)||"Document",((r=e.document)===null||r===void 0?void 0:r.filename)||"Filename"]}))],J.prototype,"mailSubject",void 0);Mt([(0,Xt.redux)({store:"viewer",selector:({descriptor:e})=>e?.displayName})],J.prototype,"displayName",void 0);var Af=u(g());var Ts=class extends Dt(Af.FtLitElementRedux){};var Ae=u(g()),Ue=u($());var Ef=u(A());var Cf=Ef.css`
1811
+ :host {
1812
+ display: inline-block;
1813
+ }
1814
+
1815
+ .ft-ud-viewer-metadata--container {
1816
+ position: relative;
1817
+ }
1818
+
1819
+ [part="tooltip"]:not(.ft-ud-viewer-metadata-multi-line),
1820
+ [part="tooltip"]:not(.ft-ud-viewer-metadata-multi-line) [part="floating-menu-container"],
1821
+ [part="tooltip"]:not(.ft-ud-viewer-metadata-multi-line) [part="floating-menu"],
1822
+ [part="tooltip"]:not(.ft-ud-viewer-metadata-multi-line) [part="chip"] {
1823
+ max-width: 100%;
1824
+ }
1825
+
1826
+ a {
1827
+ all: unset;
1828
+ position: relative;
1829
+ }
1830
+ `;var Os=u(A()),Lt=u($()),Lf=u(oe()),Zi=u(g());var $n=u(A()),k=u(g());var _f=k.FtCssVariableFactory.extend("--ft-chip-color","",k.designSystemVariables.colorOnSurface),Jt={backgroundColor:k.FtCssVariableFactory.extend("--ft-chip-background-color","",k.designSystemVariables.colorSurface),color:_f,fontSize:k.FtCssVariableFactory.extend("--ft-chip-font-size","",ge.fontSize),fontWeight:k.FtCssVariableFactory.extend("--ft-chip-font-weight","",ge.fontWeight),iconSize:k.FtCssVariableFactory.create("--ft-chip-icon-size","","SIZE","18px"),borderRadius:k.FtCssVariableFactory.create("--ft-chip-border-radius","","SIZE",""),rippleColor:k.FtCssVariableFactory.extend("--ft-chip-ripple-color","",_f),horizontalPadding:k.FtCssVariableFactory.create("--ft-chip-horizontal-padding","","SIZE","6px"),verticalPadding:k.FtCssVariableFactory.create("--ft-chip-vertical-padding","","SIZE","6px"),borderColor:k.FtCssVariableFactory.extend("--ft-chip-border-color","",k.designSystemVariables.colorOutline),opacityDisabled:k.FtCssVariableFactory.external(k.designSystemVariables.colorOpacityDisabled,"Design system")},Tf=k.FtCssVariableFactory.extend("--ft-chip-highlighted-color","",k.FtCssVariableFactory.extend("--ft-chip-color","",k.designSystemVariables.colorOnPrimary)),cl={backgroundColor:k.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color","",k.FtCssVariableFactory.extend("--ft-chip-background-color","",k.designSystemVariables.colorPrimary)),color:Tf,rippleColor:k.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",Tf)},Of={horizontalPadding:k.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),verticalPadding:k.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","","SIZE","4px")},Rf=[k.noTextSelect,$n.css`
1831
+ :host {
1832
+ display: inline-block;
1833
+ max-width: 100%;
1834
+ pointer-events: none;
1835
+ }
1836
+
1837
+ .ft-chip {
1838
+ position: relative;
1839
+ display: flex;
1840
+ justify-content: center;
1841
+ align-items: center;
1842
+ width: 100%;
1843
+ box-sizing: border-box;
1844
+ pointer-events: auto;
1845
+
1846
+ --chip-internal-font-size: ${Jt.fontSize};
1847
+ --chip-internal-font-weight: ${Jt.fontWeight};
1848
+ --chip-internal-line-height: max(20px, calc(var(--chip-internal-font-size) + 2px));
1849
+ ${(0,k.setVariable)(ft.size,Jt.iconSize)};
1850
+ --chip-internal-vertical-padding: ${Jt.verticalPadding};
1851
+ --chip-internal-horizontal-padding: ${Jt.horizontalPadding};
1852
+ --chip-internal-icon-padding: 3px;
1853
+ --chip-internal-content-height: max(var(--chip-internal-line-height), ${Jt.iconSize});
1854
+
1855
+ border: 1px solid ${Jt.borderColor};
1856
+ color: ${Jt.color};
1857
+ ${(0,k.setVariable)(W.color,Jt.rippleColor)};
1858
+ border-radius: var(${(0,$n.unsafeCSS)(Jt.borderRadius.name)}, calc(var(--chip-internal-content-height) / 2 + var(--chip-internal-vertical-padding)));
1859
+ padding: calc(var(--chip-internal-vertical-padding) - 1px) calc(var(--chip-internal-horizontal-padding) - 1px);
1860
+ background-color: ${Jt.backgroundColor};
1861
+ line-height: var(--chip-internal-content-height);
1862
+ }
1863
+
1864
+ .ft-chip > *:not(ft-ripple) {
1865
+ position: relative;
1866
+ }
1867
+
1868
+ .ft-chip--dense {
1869
+ --chip-internal-icon-padding: 3px;
1870
+ --chip-internal-vertical-padding: ${Of.verticalPadding};
1871
+ --chip-internal-horizontal-padding: ${Of.horizontalPadding};
1872
+ --chip-internal-line-height: max(16px, calc(var(--chip-internal-font-size) + 2px));
1873
+ }
1874
+
1875
+ .ft-chip--no-content {
1876
+ --chip-internal-horizontal-padding: ${Jt.horizontalPadding.get($n.css`var(--chip-internal-vertical-padding)`)};
1877
+ }
1878
+
1879
+ .ft-chip--disabled {
1880
+ cursor: default;
1881
+ pointer-events: none;
1882
+ filter: grayscale(1);
1883
+ opacity: ${Jt.opacityDisabled};
1884
+ }
1885
+
1886
+ .ft-chip--highlighted {
1887
+ border: none;
1888
+ padding: var(--chip-internal-vertical-padding) var(--chip-internal-horizontal-padding);
1889
+ background-color: ${cl.backgroundColor};
1890
+ ${(0,k.setVariable)(W.color,cl.rippleColor)};
1891
+ color: ${cl.color};
1892
+ }
1893
+
1894
+ .ft-chip--clickable {
1895
+ cursor: pointer;
1896
+ overflow: hidden
1897
+ }
1898
+
1899
+ .ft-chip:focus {
1900
+ outline: 2px solid ${k.designSystemVariables.colorPrimary};
1901
+ outline-offset: 2px;
1902
+ }
1903
+
1904
+ .ft-chip--icon-container {
1905
+ display: inline-flex;
1906
+ position: relative;
1907
+ overflow: hidden;
1908
+ border-radius: 100%;
1909
+ justify-content: center;
1910
+ align-items: center;
1911
+ flex-shrink: 0;
1912
+
1913
+ padding: var(--chip-internal-icon-padding);
1914
+ margin: calc((-1) * var(--chip-internal-icon-padding));
1915
+ }
1916
+
1917
+ .ft-chip--icon-container > *:not(ft-ripple) {
1918
+ position: relative;
1919
+ }
1920
+
1921
+ .ft-chip--icon-button {
1922
+ ${(0,k.setVariable)(B.iconSize,Jt.iconSize)};
1923
+ ${(0,k.setVariable)(B.horizontalPadding,"var(--chip-internal-icon-padding)")};
1924
+ ${(0,k.setVariable)(B.verticalPadding,"var(--chip-internal-icon-padding)")};
1925
+ margin: calc((-1) * var(--chip-internal-icon-padding));
1926
+ }
1927
+
1928
+ .ft-chip--label {
1929
+ vertical-align: bottom;
1930
+ display: block;
1931
+ margin: 0 var(--chip-internal-horizontal-padding);
1932
+ ${(0,k.setVariable)(ge.fontSize,"var(--chip-internal-font-size)")};
1933
+ ${(0,k.setVariable)(ge.fontWeight,"var(--chip-internal-font-weight)")};
1934
+ ${(0,k.setVariable)(ge.lineHeight,"var(--chip-internal-content-height)")};
1935
+ }
1936
+
1937
+ .ft-chip--safari-fix .ft-chip--label {
1938
+ margin-right: 0;
1939
+ }
1940
+
1941
+ .ft-chip:not(.ft-chip--multi-line) .ft-chip--label {
1942
+ overflow: hidden;
1943
+ white-space: nowrap;
1944
+ text-overflow: ellipsis;
1945
+ }
1946
+
1947
+ .ft-chip--safari-fix:not(.ft-chip--multi-line) .ft-chip--label:after {
1948
+ content: "\\0000a0";
1949
+ display: inline-block;
1950
+ width: 0;
1951
+ }
1952
+
1953
+ .ft-chip--no-content .ft-chip--label {
1954
+ display: none;
1955
+ }
1956
+
1957
+ .ft-chip--no-content .ft-chip--label + .ft-chip--icon-container {
1958
+ width: var(--chip-internal-content-height);
1959
+ height: var(--chip-internal-content-height);
1960
+ }
1961
+
1962
+ .ft-chip--icon-container:focus {
1963
+ outline: none;
1964
+ }
1965
+
1966
+ .ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container,
1967
+ .ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-button {
1968
+ order: -1;
1969
+ }
1970
+ `];var Ht=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Rs=class extends CustomEvent{constructor(){super("icon-click")}},it=class extends Zi.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.iconLabel="",this.hideIconTooltip=!1,this.icon=void 0,this.trailingIcon=!1}render(){var t;let r={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":Zi.isSafari};return Os.html`
1971
+ <div class="${(0,Lf.classMap)(r)}"
1972
+ aria-label="${this.getLabel()}"
1973
+ tabindex="${this.interactionsOnChip?0:-1}"
1974
+ @keyup=${this.onKeyUp}
1975
+ part="chip">
1976
+ <ft-ripple ?disabled=${!this.interactionsOnChip}></ft-ripple>
1977
+ <ft-typography variant="${(t=this.typographyVariant)!==null&&t!==void 0?t:"body2"}" element="span" class="ft-chip--label" part="label">
1978
+ <slot @slotchange=${this.onSlotchange}></slot>
1979
+ </ft-typography>
1980
+ ${this.internalIcon?this.renderIcon():null}
1981
+ </div>
1982
+ `}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return this.interactionsOnIcon?Os.html`
1983
+ <ft-button round
1984
+ class="ft-chip--icon-button"
1985
+ @click=${this.onIconClick}
1986
+ .iconVariant=${this.iconVariant}
1987
+ icon="${this.internalIcon}"
1988
+ label="${this.iconLabel}"
1989
+ tooltipposition="top"
1990
+ part="icon-button"
1991
+ ?hideTooltip=${this.hideIconTooltip}
1992
+ ></ft-button>
1993
+ `:Os.html`
1994
+ <div class="ft-chip--icon-container ft-no-text-select" part="icon-container">
1995
+ <ft-icon .variant=${this.iconVariant} .value=${this.internalIcon} part="icon"></ft-icon>
1996
+ </div>
1997
+ `}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Rs))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Rs))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,Zi.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};it.elementDefinitions={"ft-ripple":D,"ft-typography":N,"ft-icon":V,"ft-button":U};it.styles=Rf;Ht([(0,Lt.property)({type:Boolean})],it.prototype,"highlighted",void 0);Ht([(0,Lt.property)({type:Boolean})],it.prototype,"removable",void 0);Ht([(0,Lt.property)({type:Boolean})],it.prototype,"disabled",void 0);Ht([(0,Lt.property)({type:Boolean})],it.prototype,"clickable",void 0);Ht([(0,Lt.property)({type:Boolean})],it.prototype,"iconClickable",void 0);Ht([(0,Lt.property)({type:Boolean})],it.prototype,"dense",void 0);Ht([(0,Lt.property)({type:Boolean})],it.prototype,"multiLine",void 0);Ht([(0,Lt.property)()],it.prototype,"label",void 0);Ht([(0,Lt.property)()],it.prototype,"iconLabel",void 0);Ht([(0,Lt.property)({type:Boolean})],it.prototype,"hideIconTooltip",void 0);Ht([(0,Lt.property)()],it.prototype,"icon",void 0);Ht([(0,Lt.property)()],it.prototype,"iconVariant",void 0);Ht([(0,Lt.property)({type:Boolean})],it.prototype,"trailingIcon",void 0);Ht([(0,Lt.property)()],it.prototype,"typographyVariant",void 0);Ht([(0,Lt.query)("ft-typography slot")],it.prototype,"slottedContent",void 0);var If=u(g());var Pf={"ft-chip":it};(0,If.customElements)(Pf);var Uf=u(A()),wt=u($()),Ji=u(g());var Ff=u(oe());var Nn=u(A()),Xi=u($()),Is=u(g());var kf=u(A()),Ls=u(g()),Im={iconColor:Ls.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",Ls.designSystemVariables.colorOnSurfaceMedium)},Df=kf.css`
1998
+ .ft-floating-menu-item {
1999
+ cursor: pointer;
2000
+ display: flex;
2001
+ position: relative;
2002
+ align-items: center;
2003
+ justify-content: flex-start;
2004
+ overflow: hidden;
2005
+ padding: 4px 16px;
2006
+ outline: none;
2007
+ min-height: 48px;
2008
+ gap: 16px;
2009
+ }
2010
+
2011
+ .ft-floating-menu-item--disabled {
2012
+ cursor: default;
2013
+ opacity: 0.4;
2014
+ }
2015
+
2016
+ .ft-floating-menu-item ft-icon {
2017
+ color: ${Im.iconColor};
2018
+ margin-left: 0;
2019
+ flex-shrink: 0;
2020
+ flex-grow: 0;
2021
+ }
2022
+
2023
+ .ft-floating-menu-item ft-typography {
2024
+ flex-shrink: 1;
2025
+ flex-grow: 1;
2026
+ width: max-content;
2027
+ text-overflow: ellipsis;
2028
+ overflow: hidden;
2029
+ word-break: break-word;
2030
+ hyphens: auto;
2031
+ }
2032
+ `;var Mf=u(oe()),Yi=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ps=class extends CustomEvent{constructor(t){super("ft-floating-menu-item-select",{detail:t,bubbles:!0,composed:!0})}},$t=class extends Is.FtLitElement{constructor(){super(...arguments),this.value="",this.notFocusable=!1,this.disabled=!1}get floatingClasses(){return{"ft-floating-menu-item":!0,"ft-floating-menu-item--disabled":this.disabled}}render(){return Nn.html`
2033
+ <div class="${(0,Mf.classMap)(this.floatingClasses)}"
2034
+ tabindex="${this.notFocusable||this.disabled?"-1":"0"}"
2035
+ aria-disabled="${this.disabled}"
2036
+ @keydown=${t=>this.onKeyDown(t)}
2037
+ @click=${this.onClick}>
2038
+ <ft-ripple
2039
+ ?disabled=${this.disabled}
2040
+ ></ft-ripple>
2041
+ ${this.icon?Nn.html`
2042
+ <ft-icon .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
2043
+ `:Nn.nothing}
2044
+ <ft-typography variant="${H.body2}">
2045
+ <slot></slot>
2046
+ </ft-typography>
2047
+ </div>
2048
+ `}onClick(t){this.disabled?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):this.dispatchEvent(new Ps(this.value))}onKeyDown(t){(t.key=="Enter"||t.key==" ")&&(t.preventDefault(),this.dispatchEvent(new Ps(this.value)))}};$t.elementDefinitions={"ft-icon":V,"ft-ripple":D,"ft-typography":N};$t.styles=Df;Yi([(0,Xi.property)()],$t.prototype,"iconVariant",void 0);Yi([(0,Xi.property)()],$t.prototype,"icon",void 0);Yi([(0,Xi.property)()],$t.prototype,"value",void 0);Yi([(0,Xi.property)({type:Boolean})],$t.prototype,"notFocusable",void 0);Yi([(0,Xi.property)({type:Boolean})],$t.prototype,"disabled",void 0);Yi([(0,Is.ignoreComposingEvents)()],$t.prototype,"onKeyDown",null);var $f=u(A()),ce=u(g()),Ir={zIndex:ce.FtCssVariableFactory.create("--ft-floating-menu-z-index","","NUMBER","8"),maxWidth:ce.FtCssVariableFactory.create("--ft-floating-menu-max-width","","SIZE","300px"),maxHeight:ce.FtCssVariableFactory.create("--ft-floating-menu-max-height","","SIZE","500px"),textColor:ce.FtCssVariableFactory.extend("--ft-floating-menu-text-color","",ce.designSystemVariables.colorOnSurfaceHigh),colorSurface:ce.FtCssVariableFactory.external(ce.designSystemVariables.colorSurface,"Design system"),menuElevation:ce.FtCssVariableFactory.external(ce.designSystemVariables.elevation02,"Design system"),borderRadiusS:ce.FtCssVariableFactory.external(ce.designSystemVariables.borderRadiusS,"Design system")},Nf=$f.css`
2049
+ .ft-floating-menu {
2050
+ color: ${Ir.textColor};
2051
+ display: contents;
2052
+ }
2053
+
2054
+ .ft-floating-menu--wrapper {
2055
+ position: absolute;
2056
+ visibility: hidden;
2057
+ }
2058
+
2059
+ .ft-floating-menu--wrapper.ft-floating-menu--wrapper-positioned {
2060
+ visibility: visible;
2061
+ }
2062
+
2063
+ .ft-floating-menu--options {
2064
+ display: none;
2065
+ position: relative;
2066
+ overflow: auto;
2067
+ max-width: ${Ir.maxWidth};
2068
+ max-height: ${Ir.maxHeight};
2069
+ box-shadow: ${Ir.menuElevation};
2070
+ background-color: ${Ir.colorSurface};
2071
+ border-radius: ${Ir.borderRadiusS};
2072
+ color: ${Ir.textColor};
2073
+ z-index: ${Ir.zIndex};
2074
+ }
2075
+
2076
+ .ft-floating-menu--open .ft-floating-menu--options {
2077
+ display: block;
2078
+ }
2079
+ `;var Nt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ks=class extends CustomEvent{constructor(t){super("change",{detail:{open:t}})}};var Ds=class extends CustomEvent{constructor(t){super("select",{detail:t})}},Q=class extends Ji.FtLitElement{constructor(){super(...arguments),this.horizontalAlignment="left",this.verticalAlignment="bottom",this.closeMenuMatchers=[],this.primary=!1,this.icon="SHORTCUT_MENU",this.iconVariant=kt.fluid_topics,this.disabled=!1,this.menuOpen=!1,this.forceMenuOpen=!1,this.hideOptionsOnClickOutside=t=>{this.menuOpen=this.menuOpen&&t.composedPath().includes(this.container)}}updated(t){super.updated(t),t.has("menuOpen")&&this.dispatchEvent(new ks(this.menuOpen))}render(){let t={"ft-floating-menu":!0,"ft-floating-menu--open":this.forceMenuOpen||this.menuOpen,["ft-floating-menu--"+this.horizontalAlignment.toLowerCase()]:!0,["ft-floating-menu--"+this.verticalAlignment.toLowerCase()]:!0};return Uf.html`
2080
+ <div part="container" class="${(0,Ff.classMap)(t)}" @keydown=${this.onKeyDown}>
2081
+ <slot name="toggle"
2082
+ part="toggle"
2083
+ @click=${this.toggleMenu}
2084
+ aria-controls="ft-floating-menu-options"
2085
+ aria-expanded="${this.forceMenuOpen||this.menuOpen}">
2086
+ <ft-button id="actions-button"
2087
+ part="button"
2088
+ ?primary=${this.primary}
2089
+ dense round
2090
+ icon="${this.icon}"
2091
+ .iconVariant=${this.iconVariant}
2092
+ .label=${this.label}
2093
+ .tooltipPosition=${this.tooltipPosition}
2094
+ ?disabled=${this.disabled}>
2095
+ ${this.text}
2096
+ </ft-button>
2097
+ </slot>
2098
+ <div part="options-wrapper" class="ft-floating-menu--wrapper">
2099
+ <div id="ft-floating-menu-options"
2100
+ class="ft-floating-menu--options"
2101
+ part="options"
2102
+ @ft-floating-menu-item-select=${this.onItemSelect}>
2103
+ <slot id="ft-floating-menu-content"
2104
+ @click=${this.onContentClick}
2105
+ @close-ft-floating-menu=${this.onCloseEvent}
2106
+ ></slot>
2107
+ </div>
2108
+ </div>
2109
+ </div>
2110
+ `}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(t){t.stopPropagation(),this.closeMenu()}onItemSelect(t){t.stopPropagation(),this.dispatchEvent(new Ds(t.detail)),this.closeMenu()}onContentClick(t){(0,Ji.eventPathContainsMatchingElement)(t,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let t=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:r,y:i}=await Ho(t,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${r}px`,this.menuWrapper.style.top=`${i}px`,this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(t){t.key=="Escape"&&(this.closeMenu(),t.stopPropagation())}};Q.elementDefinitions={"ft-floating-menu-item":$t,"ft-button":U};Q.styles=Nf;Nt([(0,wt.property)()],Q.prototype,"horizontalAlignment",void 0);Nt([(0,wt.property)()],Q.prototype,"verticalAlignment",void 0);Nt([(0,Ji.jsonProperty)([])],Q.prototype,"closeMenuMatchers",void 0);Nt([(0,wt.property)({type:Boolean})],Q.prototype,"primary",void 0);Nt([(0,wt.property)()],Q.prototype,"label",void 0);Nt([(0,wt.property)()],Q.prototype,"tooltipPosition",void 0);Nt([(0,wt.property)()],Q.prototype,"icon",void 0);Nt([(0,wt.property)()],Q.prototype,"iconVariant",void 0);Nt([(0,wt.property)()],Q.prototype,"text",void 0);Nt([(0,wt.property)({type:Boolean})],Q.prototype,"disabled",void 0);Nt([(0,wt.state)()],Q.prototype,"menuOpen",void 0);Nt([(0,wt.state)()],Q.prototype,"forceMenuOpen",void 0);Nt([(0,wt.query)(".ft-floating-menu")],Q.prototype,"container",void 0);Nt([(0,wt.query)(".ft-floating-menu--wrapper")],Q.prototype,"menuWrapper",void 0);Nt([(0,wt.query)("#actions-button")],Q.prototype,"actionButton",void 0);Nt([(0,wt.queryAssignedElements)({slot:"toggle"})],Q.prototype,"customToggle",void 0);var Vf=u(A()),Ms=u(g()),km={color:Ms.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",Ms.designSystemVariables.colorOnSurfaceMedium)},Bf=Vf.css`
2111
+ .ft-floating-menu-label {
2112
+ padding: 4px 8px;
2113
+ }
2114
+
2115
+ .ft-floating-menu-label ft-typography {
2116
+ flex-shrink: 1;
2117
+ flex-grow: 1;
2118
+ width: max-content;
2119
+ text-overflow: ellipsis;
2120
+ overflow: hidden;
2121
+ color: ${km.color}
2122
+ }
2123
+ `;var Hf=u(A()),jf=u(g());var kr=class extends jf.FtLitElement{render(){return Hf.html`
2124
+ <div class="ft-floating-menu-label">
2125
+ <ft-typography variant="${H.caption}">
2126
+ <slot></slot>
2127
+ </ft-typography>
2128
+ </div>
2129
+ `}};kr.elementDefinitions={"ft-typography":N};kr.styles=Bf;var Wf=u(g());var zf={"ft-floating-menu":Q,"ft-floating-menu-item":$t,"ft-floating-menu-label":kr};(0,Wf.customElements)(zf);var Qt=u(A()),Gf=u(Ci());var Un=u(g());function Dm(e){var t;return((t=(0,Un.accessResult)(e))===null||t===void 0?void 0:t.openMode)===no.EXTERNAL}function Kf(e){return Dm(e)?(0,Un.accessResult)(e).originUrl:(0,Un.accessResultUrl)(e)}var Fn=class{constructor(t){this.contentLocales=t}localize(t){var r,i;return t?.key!=="ft:locale"?t:{...t,displayValue:(r=this.findLocaleValue(t))!==null&&r!==void 0?r:t.displayValue,displayTooltipValue:(i=this.findLocaleValue(t))!==null&&i!==void 0?i:t.displayTooltipValue}}findLocaleValue(t){var r;return(r=this.contentLocales.find(i=>i.lang===t.value))===null||r===void 0?void 0:r.label}};var jt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ut=class extends dc(Kt(Ts)){get metadataValue(){return this.flatMetadata?this.flatMetadata.displayValue:this.editorMode?this.key?`no value for ${this.key}`:"no metadata selected":this.noValueMessage}get metadataLabel(){var t,r,i,n,o,s;return this.metadata?this.metadata.label:(s=(n=(i=(r=(t=this.viewerStateManager)===null||t===void 0?void 0:t.clusteringHelper)===null||r===void 0?void 0:r.getMetadataDescriptor(this.key))===null||i===void 0?void 0:i.label)!==null&&n!==void 0?n:(o=this.relatives.find(a=>a.metadata.value))===null||o===void 0?void 0:o.metadata.label)!==null&&s!==void 0?s:this.key}setUdvStateManager(t){super.setUdvStateManager(t),this.key&&this.useForSwitchingToRelatives&&t.registerMetadataForSwitchToRelatives(this.key)}constructor(){super(),this.multiLine=!1,this.useForSwitchingToRelatives=!1,this.displayLabel=!1,this.hierarchicalValueTruncatingLevel=3,this.forceTooltip=!1,this.editorMode=!1,this.translateValues=!1,this.relatives=[],this.noValueMessage="No value",this.addI18nContext(zi)}willUpdate(t){var r,i,n,o,s;super.willUpdate(t),t.has("key")&&this.useForSwitchingToRelatives&&(t.get("key")&&((r=this.viewerStateManager)===null||r===void 0||r.unregisterMetadataForSwitchToRelatives(t.get("key"))),this.key&&((i=this.viewerStateManager)===null||i===void 0||i.registerMetadataForSwitchToRelatives(this.key))),t.has("useForSwitchingToRelatives")&&this.key&&(this.useForSwitchingToRelatives?(n=this.viewerStateManager)===null||n===void 0||n.registerMetadataForSwitchToRelatives(this.key):(o=this.viewerStateManager)===null||o===void 0||o.unregisterMetadataForSwitchToRelatives(this.key)),(t.has("translateValues")||t.has("metadata")||t.has("hierarchicalValueTruncatingLevel")||t.has("availableContentLocales")||this.dateFormatOptionsChanged(t))&&(this.flatMetadata=this.metadata?Ae.ClusteringHelper.flattenMetadata(this.metadata,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.metadata.key)):void 0,this.translateValues&&(this.flatMetadata=new Fn((s=this.availableContentLocales)!==null&&s!==void 0?s:[]).localize(this.flatMetadata)))}updateRelatives(){var t,r,i,n;this.useForSwitchingToRelatives&&this.key?this.relatives=(n=(r=(t=this.viewerStateManager)===null||t===void 0?void 0:t.clusteringHelper)===null||r===void 0?void 0:r.computeClustersItemsForMetadata(this.key,((i=this.document)===null||i===void 0?void 0:i.lang)||"en",this.noValueMessage,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.key)))!==null&&n!==void 0?n:[]:this.relatives=[]}render(){return Qt.html`
2130
+ ${this.useForSwitchingToRelatives&&this.relatives.length>0?this.renderSwitchToRelatives():this.renderChip()}
2131
+ ${this.hideIfEmpty()}
2132
+ `}hideIfEmpty(){let t=this.flatMetadata==null&&(this.useForSwitchingToRelatives?this.relatives.length===0:!0);return!this.editorMode&&t?Qt.html`
2133
+ <style>
2134
+ :host {
2135
+ display: none !important;
2136
+ }
2137
+ </style>
2138
+ `:Qt.nothing}renderSwitchToRelatives(){return Qt.html`
2139
+ <div part="floating-menu-container" class="ft-ud-viewer-metadata--container">
2140
+ <ft-floating-menu part="floating-menu" text="Toggle collapsible" trailingIcon>
2141
+ ${this.renderChip(!0)}
2142
+ <ft-floating-menu-label>${this.metadataLabel}</ft-floating-menu-label>
2143
+ ${(0,Gf.repeat)(this.relatives,t=>t.metadata.value,t=>this.renderRelativeItem(t.result,t.metadata))}
2144
+ </ft-floating-menu>
2145
+ </div>
2146
+ `}renderRelativeItem(t,r){var i,n;let o=this.translateValues&&(n=new Fn((i=this.availableContentLocales)!==null&&i!==void 0?i:[]).localize(r))!==null&&n!==void 0?n:r,s=Kf(t);return Qt.html`
2147
+ <a part="relative-item-link"
2148
+ href="${s}" >
2149
+ <ft-ripple part="relative-item-ripple"></ft-ripple>
2150
+ <ft-floating-menu-item part="relative-item" value="${o.value}" notFocusable>
2151
+ ${o.value==null||o.value===o.displayValue?o.displayValue:Qt.html`
2152
+ <ft-tooltip part="relative-item-tooltip" text="${o.value}">
2153
+ ${o.displayValue}
2154
+ </ft-tooltip>
2155
+ `}
2156
+ </ft-floating-menu-item>
2157
+ </a>
2158
+ `}renderChip(t=!1){var r,i,n,o,s,a;let l=!this.forceTooltip&&this.displayLabel&&((r=this.flatMetadata)===null||r===void 0?void 0:r.displayTooltipValue)==((i=this.flatMetadata)===null||i===void 0?void 0:i.displayValue),c=`${this.metadataLabel}: ${(o=(n=this.flatMetadata)===null||n===void 0?void 0:n.displayTooltipValue)!==null&&o!==void 0?o:this.noValueMessage}`,d=Qt.html`
2159
+ <ft-chip part="chip"
2160
+ exportpartsPrefix="chip"
2161
+ label="${c}"
2162
+ slot="${l&&t?"toggle":""}"
2163
+ trailingIcon icon="${t?"thin_arrow":""}"
2164
+ ?clickable=${t}
2165
+ ?multiLine=${this.multiLine}>
2166
+ ${this.displayLabel?Qt.html`
2167
+ <span part="label">${(a=(s=this.metadata)===null||s===void 0?void 0:s.label)!==null&&a!==void 0?a:this.key}: </span>
2168
+ `:Qt.nothing}
2169
+ ${this.metadataValue.length===0?Qt.nothing:Qt.html`
2170
+ <span part="values">${this.metadataValue}</span>
2171
+ `}
2172
+ </ft-chip>`;return l?d:Qt.html`
2173
+ <ft-tooltip part="tooltip"
2174
+ slot="${t?"toggle":""}"
2175
+ class="${this.multiLine?"ft-ud-viewer-metadata-multi-line":""}"
2176
+ text="${c}">
2177
+ ${d}
2178
+ </ft-tooltip>
2179
+ `}};ut.elementDefinitions={"ft-chip":it,"ft-floating-menu":Q,"ft-floating-menu-item":$t,"ft-floating-menu-label":kr,"ft-ripple":D,"ft-tooltip":K};ut.styles=Cf;jt([(0,Ue.property)(),(0,Ae.reduxReactive)()],ut.prototype,"key",void 0);jt([(0,Ue.property)({type:Boolean})],ut.prototype,"multiLine",void 0);jt([(0,Ue.property)({type:Boolean})],ut.prototype,"useForSwitchingToRelatives",void 0);jt([(0,Ue.property)({type:Boolean})],ut.prototype,"displayLabel",void 0);jt([(0,Ae.numberProperty)()],ut.prototype,"hierarchicalValueTruncatingLevel",void 0);jt([(0,Ue.property)({type:Boolean})],ut.prototype,"forceTooltip",void 0);jt([(0,Ue.property)({attribute:!1})],ut.prototype,"editorMode",void 0);jt([(0,Ue.property)({type:Boolean})],ut.prototype,"translateValues",void 0);jt([(0,Ae.redux)({store:"viewer",selector:(e,t)=>{var r,i;return(i=(r=e.document)===null||r===void 0?void 0:r.metadata)===null||i===void 0?void 0:i.find(n=>n.key===t.key)}})],ut.prototype,"metadata",void 0);jt([(0,Ue.state)()],ut.prototype,"flatMetadata",void 0);jt([(0,Ae.redux)({store:"viewer"})],ut.prototype,"document",void 0);jt([(0,Ue.state)()],ut.prototype,"relatives",void 0);jt([(0,Ae.redux)({store:w.name})],ut.prototype,"availableContentLocales",void 0);jt([Ro(zi.properties.itemWithNoValueForSwitchToRelatives())],ut.prototype,"noValueMessage",void 0);jt([(0,Ae.reduxEventListener)({eventName:Or.clusteringHelperCreated})],ut.prototype,"updateRelatives",null);var qf={"ft-asset-viewer-content":Co,"ft-asset-viewer-content-control":jo,"ft-asset-viewer-context":Je,"ft-asset-viewer-document-title":qo,"ft-asset-viewer-filename":zo,"ft-asset-viewer-mime-type-icon":Go,"ft-asset-viewer-title":Wo,"ft-ud-viewer-attachments":ii,"ft-ud-viewer-content":Qo,"ft-ud-viewer-content-control":ts,"ft-ud-viewer-context":Lr,"ft-ud-viewer-filename":es,"ft-ud-viewer-metadata":ut,"ft-ud-viewer-mime-type-icon":is,"ft-ud-viewer-title":rs,"ft-ud-viewer-feedback":J};(0,Zf.customElements)(qf);})();
2180
+ /*! Bundled license information:
2181
+
2182
+ @lit/context/lib/context-request-event.js:
2183
+ @lit/context/lib/create-context.js:
2184
+ @lit/context/lib/controllers/context-consumer.js:
2185
+ @lit/context/lib/value-notifier.js:
2186
+ @lit/context/lib/controllers/context-provider.js:
2187
+ @lit/context/lib/context-root.js:
2188
+ lit-html/directives/when.js:
2189
+ (**
2190
+ * @license
2191
+ * Copyright 2021 Google LLC
2192
+ * SPDX-License-Identifier: BSD-3-Clause
2193
+ *)
2194
+
2195
+ @lit/context/lib/decorators/provide.js:
2196
+ lit-html/lit-html.js:
2197
+ (**
2198
+ * @license
2199
+ * Copyright 2017 Google LLC
2200
+ * SPDX-License-Identifier: BSD-3-Clause
2201
+ *)
2202
+
2203
+ @lit/context/lib/decorators/consume.js:
2204
+ (**
2205
+ * @license
2206
+ * Copyright 2022 Google LLC
2207
+ * SPDX-License-Identifier: BSD-3-Clause
2208
+ *)
2209
+
2210
+ @lit/reactive-element/css-tag.js:
2211
+ (**
2212
+ * @license
2213
+ * Copyright 2019 Google LLC
2214
+ * SPDX-License-Identifier: BSD-3-Clause
2215
+ *)
2216
+
2217
+ lit-html/static.js:
2218
+ (**
2219
+ * @license
2220
+ * Copyright 2020 Google LLC
2221
+ * SPDX-License-Identifier: BSD-3-Clause
2222
+ *)
2223
+
2224
+ lit-html/directives/if-defined.js:
2225
+ (**
2226
+ * @license
2227
+ * Copyright 2018 Google LLC
650
2228
  * SPDX-License-Identifier: BSD-3-Clause
651
2229
  *)
652
2230
  */