@fluid-topics/ft-search-context 0.3.65 → 0.3.67
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
!function(t,s,e,i){const a=e.css`
|
|
2
2
|
`,n={setRequestQuery:(t,s)=>{t.request.query=s.payload},setRequestContentLocale:(t,s)=>{t.request.contentLocale=s.payload},setPageSize:(t,s)=>{t.request.paging.perPage=s.payload},setRequestSort:(t,s)=>{t.request.sort=s.payload},setRequestFilters:(t,s)=>{t.request.filters=s.payload},setRequestFacets:(t,s)=>{t.request.facets=s.payload},setResults:(t,s)=>{t.results=s.payload},setFacets:(t,s)=>{t.facets=s.payload},setPaging:(t,s)=>{t.paging=s.payload},setLiveQuery:(t,s)=>{t.liveQuery=s.payload},setSuggestResults:(t,s)=>{t.suggestResults=s.payload}},o=e.css`
|
|
3
|
-
`,h=s.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,s)=>{t.baseUrl=s.payload},setApiIntegrationIdentifier:(t,s)=>{t.apiIntegrationIdentifier=s.payload},setUiLocale:(t,s)=>{t.uiLocale=s.payload},setAvailableUiLocales:(t,s)=>{t.availableUiLocales=s.payload},setEditorMode:(t,s)=>{t.editorMode=s.payload},setNoCustom:(t,s)=>{t.noCustom=s.payload},setNoCustomComponent:(t,s)=>{t.noCustomComponent=s.payload},setSession:(t,s)=>{t.session=s.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class r{static build(t){const{baseUrl:s,apiIntegrationIdentifier:e}=h.getState(),i=null!=t?t:e;if(s&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(s,i,!0)}static get(t){var s;return null!=t?r.build(t):null!==(s=r.API)&&void 0!==s?s:r.API=r.build()}static await(t){return new Promise((s=>{let e=r.get(t);if(e)s(e);else{const i=h.subscribe((()=>{e=r.get(t),e&&(i(),s(e))}))}}))}}var l;const c=Symbol("clearAfterUnitTest");class u{constructor(t){this.
|
|
3
|
+
`,h=s.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,s)=>{t.baseUrl=s.payload},setApiIntegrationIdentifier:(t,s)=>{t.apiIntegrationIdentifier=s.payload},setUiLocale:(t,s)=>{t.uiLocale=s.payload},setAvailableUiLocales:(t,s)=>{t.availableUiLocales=s.payload},setEditorMode:(t,s)=>{t.editorMode=s.payload},setNoCustom:(t,s)=>{t.noCustom=s.payload},setNoCustomComponent:(t,s)=>{t.noCustomComponent=s.payload},setSession:(t,s)=>{t.session=s.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class r{static build(t){const{baseUrl:s,apiIntegrationIdentifier:e}=h.getState(),i=null!=t?t:e;if(s&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(s,i,!0)}static get(t){var s;return null!=t?r.build(t):null!==(s=r.API)&&void 0!==s?s:r.API=r.build()}static await(t){return new Promise((s=>{let e=r.get(t);if(e)s(e);else{const i=h.subscribe((()=>{e=r.get(t),e&&(i(),s(e))}))}}))}}var l;const c=Symbol("clearAfterUnitTest");class u{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new s.CacheRegistry,this.listeners={},this.currentUiLocale="",this[l]=()=>{this.defaultMessages={},this.cache=new s.CacheRegistry,this.listeners={}},this.currentUiLocale=h.getState().uiLocale,h.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=h.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const s=t.name.toLowerCase();this.cache.setFinal(s,t),this.notify(s)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const a={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};s.deepEqual(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var a,n,o;t=t.toLowerCase(),this.fetchContext(t);const h=null!==(n=null===(a=this.cache.getNow(t))||void 0===a?void 0:a.messages)&&void 0!==n?n:{};return new s.ParametrizedLabelResolver(null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},h).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,s){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(s),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(s)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>s.delay(0).then((()=>t())).catch((()=>null)))))}}l=c,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new u((async(t,s)=>(await r.await()).getFluidTopicsMessageContext(t,s)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new u((async(t,s)=>(await r.await()).getCustomMessageContext(t,s))));const d=window.FluidTopicsI18nService;var v=function(t,s,e,i){for(var a,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i,h=t.length-1;h>=0;h--)(a=t[h])&&(o=(n<3?a(o):n>3?a(s,e,o):a(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class w extends s.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>r.get(),this.cache=new s.CacheRegistry,this.cleanSessionDebouncer=new s.Debouncer}render(){return e.html`
|
|
4
4
|
<slot></slot>
|
|
5
5
|
`}updated(t){super.updated(t),t.has("baseUrl")&&h.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&h.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&h.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&h.actions.setNoCustom(this.noCustom),t.has("editorMode")&&h.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&h.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&h.actions.setSession(this.session),t.has("availableUiLocales")&&h.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>d.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const s=await t.getCurrentSession();return s.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),s.idleTimeoutInMillis),s}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}w.elementDefinitions={},w.styles=o,v([i.property()],w.prototype,"baseUrl",void 0),v([i.property()],w.prototype,"apiIntegrationIdentifier",void 0),v([i.property()],w.prototype,"uiLocale",void 0),v([s.jsonProperty([])],w.prototype,"availableUiLocales",void 0),v([i.property({type:Boolean})],w.prototype,"editorMode",void 0),v([i.property({type:Boolean})],w.prototype,"noCustom",void 0),v([i.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],w.prototype,"noCustomComponent",void 0),v([i.property({type:Boolean})],w.prototype,"withManualResources",void 0),v([s.jsonProperty([])],w.prototype,"messageContexts",void 0),v([s.jsonProperty(void 0)],w.prototype,"session",void 0),v([i.property({type:Object})],w.prototype,"apiProvider",void 0),s.customElement("ft-app-context")(w);class g{constructor(t){this.api=t}static async build(){return new g(await r.await())}async launchSearch(t){return this.api.search(t)}async launchSuggest(t){return this.api.getSuggestions(t)}}class f{constructor(t,e){this.store=t,this.searchDebouncer=new s.Debouncer(10),this.suggestDebouncer=new s.Debouncer(300),this.initService(e)}static build(t){return new f((t=>s.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",filters:[],facets:[],sort:[],paging:{page:1,perPage:10}},results:[],facets:[],paging:{totalResultsCount:0,totalClustersCount:0,isLastPage:!1},liveQuery:"",suggestResults:[]},reducers:n}))(t.trim()||"context"),g.build)}async initService(t){this.service=await t(),this.launchSearch()}async awaitService(){for(;null==this.service;)await s.delay(5);return this.service}setQuery(t){this.store.actions.setRequestQuery(t),this.store.actions.setLiveQuery(t),this.launchSearch()}setContentLocale(t){this.store.actions.setRequestContentLocale(t),this.launchSearch()}setPageSize(t){this.store.actions.setPageSize(t),this.launchSearch()}setSort(t){this.store.actions.setRequestSort(t),this.launchSearch()}setFilters(t){this.store.actions.setRequestFilters(t),this.launchSearch()}addFacet(t){this.facetIds=[...this.facetIds,t],this.launchSearch()}replaceFacet(t,s){let e=this.facetIds.filter((s=>s!=t));s&&e.push(s),this.facetIds=e,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map((t=>t.id))}set facetIds(t){let s=[...new Set(t)].map((t=>({id:t})));this.store.actions.setRequestFacets(s)}setFilter(t,s){let e=this.store.getState().request.filters,i={key:t,values:s,negative:!1},a=[...e.filter((s=>s.key!==t)),i];this.setFilters(a)}setLiveQuery(t){this.store.actions.setLiveQuery(t),this.launchSuggest()}async launchSearch(){await this.awaitService(),this.searchDebouncer.run((()=>this.fetchSearchData()))}async launchSuggest(){await this.awaitService(),this.suggestDebouncer.run((()=>this.fetchSuggestData()))}async fetchSearchData(){try{let t=await this.service.launchSearch(this.store.getState().request);if(t.paging.currentPage<=1)this.store.actions.setResults(t.results),this.store.actions.setFacets(t.facets),this.store.actions.setPaging({totalResultsCount:t.paging.totalResultsCount,totalClustersCount:t.paging.totalClustersCount,isLastPage:t.paging.lastPage});else{let s=this.store.getState().results.concat(t.results);this.store.actions.setResults(s),this.store.actions.setPaging({totalResultsCount:t.paging.totalResultsCount,totalClustersCount:t.paging.totalClustersCount,isLastPage:t.paging.lastPage})}}catch(t){this.errorHandler&&this.errorHandler(t)}}async fetchSuggestData(){try{let t={input:this.store.getState().liveQuery,filters:this.store.getState().request.filters,sort:this.store.getState().request.sort,contentLocale:this.store.getState().request.contentLocale},s=await this.service.launchSuggest(t);this.store.actions.setSuggestResults(s.suggestions)}catch(t){this.errorHandler&&this.errorHandler(t)}}}var p=function(t,s,e,i){for(var a,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i,h=t.length-1;h>=0;h--)(a=t[h])&&(o=(n<3?a(o):n>3?a(s,e,o):a(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class y extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const b=Symbol("registerInterval");class C extends(function(t){var s;class e extends t{constructor(){super(...arguments),this[s]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[b]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[b]):this.dispatchEvent(new y)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return s=b,p([i.state()],e.prototype,"stateManager",void 0),e}(s.FtLitElementRedux)){}var m=function(t,s,e,i){for(var a,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i,h=t.length-1;h>=0;h--)(a=t[h])&&(o=(n<3?a(o):n>3?a(s,e,o):a(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class S extends CustomEvent{constructor(t){super("ft-search-load-error",{detail:t})}}class L extends CustomEvent{constructor(t){super("ft-search-request-change",{detail:t})}}class x extends s.FtLitElementRedux{constructor(){super(...arguments),this.query="",this.contentLocale="en-US",this.pageSize=10,this.filters=[],this.sort=[]}get stateManager(){return null==this._stateManager&&(this._stateManager=f.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0")),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"search")),this._stateManager}render(){return e.html`
|
|
6
6
|
<slot @register-ft-search-component=${this.registerComponent}></slot>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,n=window.customElements,r=new WeakMap,s=new WeakMap,o=new WeakMap,a=new WeakMap;let u;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=r.prototype.attributeChangedCallback,u=new Set(r.observedAttributes||[]);f(r,u,a);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:u};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let l=i.call(n,t);l||(l=h(t),e.call(n,t,l)),this===window.customElements&&(o.set(r,c),c.standInClass=l);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)s.delete(t),v(t,c,!0)}const p=this._whenDefinedPromises.get(t);return void 0!==p&&(p.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){b.push(this),n.upgrade.apply(n,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let n=this._awaitingUpgrade.get(e);n||this._awaitingUpgrade.set(e,n=new Set),i?n.add(t):n.delete(t)}},window.HTMLElement=function(){let e=u;if(e)return u=void 0,e;const i=o.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,l=t=>{let e=t.getRootNode();if(!c(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},h=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const n=l(i)||window.customElements,r=n._getDefinition(e);return r?v(i,r):s.set(i,n),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){r.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const n=t.prototype.setAttribute;n&&(t.prototype.setAttribute=function(t,r){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);n.call(this,s,r),i.call(this,s,t,r)}else n.call(this,s,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);r.call(this,n),i.call(this,n,t,null)}else r.call(this,n)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},v=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),u=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=p.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,n=window.customElements,r=new WeakMap,s=new WeakMap,o=new WeakMap,a=new WeakMap;let u;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=r.prototype.attributeChangedCallback,u=new Set(r.observedAttributes||[]);f(r,u,a);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:u};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let l=i.call(n,t);l||(l=h(t),e.call(n,t,l)),this===window.customElements&&(o.set(r,c),c.standInClass=l);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)s.delete(t),v(t,c,!0)}const p=this._whenDefinedPromises.get(t);return void 0!==p&&(p.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){b.push(this),n.upgrade.apply(n,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let n=this._awaitingUpgrade.get(e);n||this._awaitingUpgrade.set(e,n=new Set),i?n.add(t):n.delete(t)}},window.HTMLElement=function(){let e=u;if(e)return u=void 0,e;const i=o.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,l=t=>{let e=t.getRootNode();if(!c(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},h=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const n=l(i)||window.customElements,r=n._getDefinition(e);return r?v(i,r):s.set(i,n),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){r.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const n=t.prototype.setAttribute;n&&(t.prototype.setAttribute=function(t,r){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);n.call(this,s,r),i.call(this,s,t,r)}else n.call(this,s,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);r.call(this,n),i.call(this,n,t,null)}else r.call(this,n)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},v=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),u=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=p.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const w=(t,e,i)=>{const n=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=n.apply(i||this,arguments);return void 0!==t&&a.set(t,this),b.pop(),t}};w(ShadowRoot,"createElement",document),w(ShadowRoot,"importNode",document),w(Element,"insertAdjacentHTML");const y=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){b.push(this),i.set.call(this,t),b.pop()}})};if(y(Element,"innerHTML"),y(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const n=e.call(this,...i);return t.set(n,this),n},i.forEach((e=>{const i=window.ElementInternals.prototype,n=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==r.get(i).formAssociated)throw new DOMException(`Failed to execute ${n} on 'ElementInternals': The target element is not a form-associated custom element.`);n?.call(this,...e)}}));class n extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const n=t.getAttribute("name"),r=e.get(n)||[];this[+i]=t,r.push(t),e.set(n,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new n(t))}))}namedItem(t){return this[t]}}const o=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=o.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(t){const e=window.customElements.define;window.customElements.define=(t,i,n)=>{try{e.bind(window.customElements)(t,i,n)}catch(e){console.info(t,i,n,e)}}}class e extends Promise{constructor(t){super(((e,i)=>t((t=>{this.isCanceled?i(new Error("Promise has been canceled")):e(t)}),(t=>{this.isCanceled?i(new Error("Promise has been canceled")):i(t)})))),this.isCanceled=!1}cancel(){this.isCanceled=!0}}class i{constructor(){this.loaders={},this.content={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||this.forceClear(t)}forceClear(t){this.content[t]instanceof e&&this.content[t].cancel(),delete this.content[t]}set(t,e){this.forceClear(t),this.register(t,(async()=>e)),this.content[t]=e}setFinal(t,e){this.forceClear(t),this.registerFinal(t,(async()=>e)),this.content[t]=e}async get(t,i){if(void 0===this.content[t]){if(null==(i=null!=i?i:this.loaders[t]))throw new Error("Unknown cache key "+t);const r=(n=i(),new e(((t,e)=>n.then(t).catch(e))));return this.content[t]=r,r.then((e=>(this.content[t]=e,e)))}var n;if(this.content[t]instanceof Error)throw this.content[t];return this.content[t]}isResolvedValue(t){return!(null==t||t instanceof Promise||t instanceof Error)}getNow(t){if(this.isResolvedValue(this.content[t]))return this.content[t]}has(t){return null!=this.content[t]}resolvedKeys(){return Object.keys(this.content).filter((t=>this.isResolvedValue(this.content[t])))}resolvedValues(){return Object.values(this.content).filter((t=>this.isResolvedValue(t)))}keys(){return Object.keys(this.content)}values(){return Object.values(this.content)}}class n{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const n=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void n(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -34,7 +34,7 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright 2019 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
-
*/,f=window,d=f.ShadowRoot&&(void 0===f.ShadyCSS||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),p=new WeakMap;class b{constructor(t,e,i){if(this._$cssResult$=!0,i!==v)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(d&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=p.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&p.set(e,t))}return t}toString(){return this.cssText}}const
|
|
37
|
+
*/,f=window,d=f.ShadowRoot&&(void 0===f.ShadyCSS||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),p=new WeakMap;class b{constructor(t,e,i){if(this._$cssResult$=!0,i!==v)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(d&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=p.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&p.set(e,t))}return t}toString(){return this.cssText}}const w=t=>new b("string"==typeof t?t:t+"",void 0,v),y=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new b(i,t,v)},m=(t,e)=>{d?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=f.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))},g=d?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return w(e)})(t):t
|
|
38
38
|
/**
|
|
39
39
|
* @license
|
|
40
40
|
* Copyright 2017 Google LLC
|
|
@@ -51,7 +51,7 @@ var A;M.finalized=!0,M.elementProperties=new Map,M.elementStyles=[],M.shadowRoot
|
|
|
51
51
|
* Copyright 2017 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
53
|
*/
|
|
54
|
-
var lt,ht;class ft extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var n,r;const s=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let o=s._$litPart$;if(void 0===o){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=o=new it(e.insertBefore(T(),t),t,void 0,null!=i?i:{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Z}}ft.finalized=!0,ft._$litElement$=!0,null===(lt=globalThis.litElementHydrateSupport)||void 0===lt||lt.call(globalThis,{LitElement:ft});const dt=globalThis.litElementPolyfillSupport;null==dt||dt({LitElement:ft}),(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.2.2");class vt{static create(t,e,i){let n=t=>
|
|
54
|
+
var lt,ht;class ft extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var n,r;const s=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let o=s._$litPart$;if(void 0===o){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=o=new it(e.insertBefore(T(),t),t,void 0,null!=i?i:{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Z}}ft.finalized=!0,ft._$litElement$=!0,null===(lt=globalThis.litElementHydrateSupport)||void 0===lt||lt.call(globalThis,{LitElement:ft});const dt=globalThis.litElementPolyfillSupport;null==dt||dt({LitElement:ft}),(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.2.2");class vt{static create(t,e,i){let n=t=>w(null!=t?t:i),r=y`var(${w(t)}, ${n(i)})`;return r.name=t,r.category=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>y`var(${w(t)}, ${n(e)})`,r.breadcrumb=()=>[],r.lastResortDefaultValue=()=>i,r}static extend(t,e,i){let n=t=>e.get(null!=t?t:i),r=y`var(${w(t)}, ${n(i)})`;return r.name=t,r.category=e.category,r.fallbackVariable=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>y`var(${w(t)}, ${n(e)})`,r.breadcrumb=()=>[e.name,...e.breadcrumb()],r.lastResortDefaultValue=()=>i,r}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):w(null!=e?e:t.defaultValue),n=y`var(${w(t.name)}, ${i(t.defaultValue)})`;return n.name=t.name,n.category=t.category,n.fallbackVariable=t.fallbackVariable,n.defaultValue=t.defaultValue,n.context=e,n.defaultCssValue=i,n.get=e=>y`var(${w(t.name)}, ${i(e)})`,n.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],n.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},n}}vt.create("--ft-color-primary","COLOR","#2196F3"),vt.create("--ft-color-primary-variant","COLOR","#1976D2"),vt.create("--ft-color-secondary","COLOR","#FFCC80"),vt.create("--ft-color-secondary-variant","COLOR","#F57C00"),vt.create("--ft-color-surface","COLOR","#FFFFFF"),vt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),vt.create("--ft-color-error","COLOR","#B00020"),vt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),vt.create("--ft-color-opacity-high","NUMBER","1"),vt.create("--ft-color-opacity-medium","NUMBER","0.74"),vt.create("--ft-color-opacity-disabled","NUMBER","0.38"),vt.create("--ft-color-on-primary","COLOR","#FFFFFF"),vt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),vt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),vt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),vt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),vt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),vt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),vt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),vt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),vt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),vt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),vt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),vt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),vt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),vt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),vt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),vt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),vt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),vt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),vt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),vt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),vt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),vt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),vt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),vt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),vt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),vt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),vt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),vt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),vt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),vt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),vt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),vt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),vt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),vt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),vt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),vt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),vt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),vt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),vt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),vt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),vt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),vt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),vt.create("--ft-border-radius-S","SIZE","4px"),vt.create("--ft-border-radius-M","SIZE","8px"),vt.create("--ft-border-radius-L","SIZE","12px"),vt.create("--ft-border-radius-XL","SIZE","16px"),vt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),vt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),vt.create("--ft-transition-duration","UNKNOWN","250ms"),vt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");var pt=function(t,e,i,n){for(var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class bt extends(
|
|
55
55
|
/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2021 Google LLC
|
|
@@ -62,7 +62,7 @@ function(t){return class extends t{createRenderRoot(){const t=this.constructor,{
|
|
|
62
62
|
<style>${t}</style>
|
|
63
63
|
`))}
|
|
64
64
|
${this.getTemplate()}
|
|
65
|
-
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,n,r,s,o;const a=t=>null!=t&&t.trim().length>0,u=t.filter(a).map((t=>t.trim()));if(0===u.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(n=t.getAttribute("part"))||void 0===n?void 0:n.split(" "))&&void 0!==r?r:[],i=null!==(o=null===(s=t.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==o?o:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const l=[...c.values()].flatMap((t=>u.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...l].join(", "))}}pt([s()],bt.prototype,"exportpartsPrefix",void 0),pt([l([])],bt.prototype,"exportpartsPrefixes",void 0),pt([s()],bt.prototype,"customStylesheet",void 0),
|
|
65
|
+
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,n,r,s,o;const a=t=>null!=t&&t.trim().length>0,u=t.filter(a).map((t=>t.trim()));if(0===u.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(n=t.getAttribute("part"))||void 0===n?void 0:n.split(" "))&&void 0!==r?r:[],i=null!==(o=null===(s=t.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==o?o:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const l=[...c.values()].flatMap((t=>u.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...l].join(", "))}}pt([s()],bt.prototype,"exportpartsPrefix",void 0),pt([l([])],bt.prototype,"exportpartsPrefixes",void 0),pt([s()],bt.prototype,"customStylesheet",void 0),y`
|
|
66
66
|
.ft-no-text-select {
|
|
67
67
|
-webkit-touch-callout: none;
|
|
68
68
|
-webkit-user-select: none;
|
|
@@ -71,7 +71,7 @@ function(t){return class extends t{createRenderRoot(){const t=this.constructor,{
|
|
|
71
71
|
-ms-user-select: none;
|
|
72
72
|
user-select: none;
|
|
73
73
|
}
|
|
74
|
-
`,
|
|
74
|
+
`,y`
|
|
75
75
|
.ft-word-wrap {
|
|
76
76
|
white-space: normal;
|
|
77
77
|
word-wrap: break-word;
|
|
@@ -83,7 +83,7 @@ function(t){return class extends t{createRenderRoot(){const t=this.constructor,{
|
|
|
83
83
|
-webkit-hyphens: auto;
|
|
84
84
|
hyphens: auto
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,y`
|
|
87
87
|
.ft-safari-ellipsis-fix {
|
|
88
88
|
margin-right: 0;
|
|
89
89
|
|
|
@@ -94,10 +94,10 @@ function(t){return class extends t{createRenderRoot(){const t=this.constructor,{
|
|
|
94
94
|
display: inline-block;
|
|
95
95
|
width: 0;
|
|
96
96
|
}
|
|
97
|
-
`;class yt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,n;t=this.resolvePluralKey(t,e);let r=null!==(n=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==n?n:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),r}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${t}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function wt(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function mt(t){return!!t&&!!t[se]}function gt(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===oe}(t)||Array.isArray(t)||!!t[re]||!!t.constructor[re]||Et(t)||Rt(t))}function xt(t,e,i){void 0===i&&(i=!1),0===Ot(t)?(i?Object.keys:ae)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Ot(t){var e=t[se];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Et(t)?2:Rt(t)?3:0}function St(t,e){return 2===Ot(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ct(t,e,i){var n=Ot(t);2===n?t.set(e,i):3===n?(t.delete(e),t.add(i)):t[e]=i}function jt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Et(t){return te&&t instanceof Map}function Rt(t){return ee&&t instanceof Set}function Nt(t){return t.o||t.t}function Mt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ue(t);delete e[se];for(var i=ae(e),n=0;n<i.length;n++){var r=i[n],s=e[r];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(e[r]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function At(t,e){return void 0===e&&(e=!1),kt(t)||mt(t)||!gt(t)||(Ot(t)>1&&(t.set=t.add=t.clear=t.delete=Ut),Object.freeze(t),e&&xt(t,(function(t,e){return At(e,!0)}),!0)),t}function Ut(){wt(2)}function kt(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function $t(t){var e=ce[t];return e||wt(18,t),e}function Lt(){return Gt}function Ft(t,e){e&&($t("Patches"),t.u=[],t.s=[],t.v=e)}function Pt(t){_t(t),t.p.forEach(It),t.p=null}function _t(t){t===Gt&&(Gt=t.l)}function Tt(t){return Gt={p:[],l:Gt,h:t,m:!0,_:0}}function It(t){var e=t[se];0===e.i||1===e.i?e.j():e.O=!0}function Bt(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.g||$t("ES5").S(e,t,n),n?(i[se].P&&(Pt(e),wt(4)),gt(t)&&(t=Wt(e,t),e.l||Dt(e,t)),e.u&&$t("Patches").M(i[se].t,t,e.u,e.s)):t=Wt(e,i,[]),Pt(e),e.u&&e.v(e.u,e.s),t!==ne?t:void 0}function Wt(t,e,i){if(kt(e))return e;var n=e[se];if(!n)return xt(e,(function(r,s){return Kt(t,n,e,r,s,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return Dt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=Mt(n.k):n.o;xt(3===n.i?new Set(r):r,(function(e,s){return Kt(t,n,r,e,s,i)})),Dt(t,r,!1),i&&t.u&&$t("Patches").R(n,i,t.u,t.s)}return n.o}function Kt(t,e,i,n,r,s){if(mt(r)){var o=Wt(t,r,s&&e&&3!==e.i&&!St(e.D,n)?s.concat(n):void 0);if(Ct(i,n,o),!mt(o))return;t.m=!1}if(gt(r)&&!kt(r)){if(!t.h.F&&t._<1)return;Wt(t,r),e&&e.A.l||Dt(t,r)}}function Dt(t,e,i){void 0===i&&(i=!1),t.h.F&&t.m&&At(e,i)}function qt(t,e){var i=t[se];return(i?Nt(i):t)[e]}function zt(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function Ht(t){t.P||(t.P=!0,t.l&&Ht(t.l))}function Vt(t){t.o||(t.o=Mt(t.t))}function Jt(t,e,i){var n=Et(e)?$t("MapSet").N(e,i):Rt(e)?$t("MapSet").T(e,i):t.g?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:Lt(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},r=n,s=le;i&&(r=[n],s=he);var o=Proxy.revocable(r,s),a=o.revoke,u=o.proxy;return n.k=u,n.j=a,u}(e,i):$t("ES5").J(e,i);return(i?i.A:Lt()).p.push(n),n}function Zt(t){return mt(t)||wt(22,t),function t(e){if(!gt(e))return e;var i,n=e[se],r=Ot(e);if(n){if(!n.P&&(n.i<4||!$t("ES5").K(n)))return n.t;n.I=!0,i=Qt(e,r),n.I=!1}else i=Qt(e,r);return xt(i,(function(e,r){n&&function(t,e){return 2===Ot(t)?t.get(e):t[e]}(n.t,e)===r||Ct(i,e,t(r))})),3===r?new Set(i):i}(t)}function Qt(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Mt(t)}var Xt,Gt,Yt="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),te="undefined"!=typeof Map,ee="undefined"!=typeof Set,ie="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ne=Yt?Symbol.for("immer-nothing"):((Xt={})["immer-nothing"]=!0,Xt),re=Yt?Symbol.for("immer-draftable"):"__$immer_draftable",se=Yt?Symbol.for("immer-state"):"__$immer_state",oe=""+Object.prototype.constructor,ae="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ue=Object.getOwnPropertyDescriptors||function(t){var e={};return ae(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},ce={},le={get:function(t,e){if(e===se)return t;var i=Nt(t);if(!St(i,e))return function(t,e,i){var n,r=zt(e,i);return r?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!gt(n)?n:n===qt(t.t,e)?(Vt(t),t.o[e]=Jt(t.A.h,n,t)):n},has:function(t,e){return e in Nt(t)},ownKeys:function(t){return Reflect.ownKeys(Nt(t))},set:function(t,e,i){var n=zt(Nt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var r=qt(Nt(t),e),s=null==r?void 0:r[se];if(s&&s.t===i)return t.o[e]=i,t.D[e]=!1,!0;if(jt(i,r)&&(void 0!==i||St(t.t,e)))return!0;Vt(t),Ht(t)}return t.o[e]===i&&"number"!=typeof i&&(void 0!==i||e in t.o)||(t.o[e]=i,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==qt(t.t,e)||e in t.t?(t.D[e]=!1,Vt(t),Ht(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=Nt(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){wt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){wt(12)}},he={};xt(le,(function(t,e){he[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),he.deleteProperty=function(t,e){return he.set.call(this,t,e,void 0)},he.set=function(t,e,i){return le.set.call(this,t[0],e,i,t[0])};var fe=function(){function t(t){var e=this;this.g=ie,this.F=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var s=e;return function(t){var e=this;void 0===t&&(t=r);for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return s.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(o))}))}}var o;if("function"!=typeof i&&wt(6),void 0!==n&&"function"!=typeof n&&wt(7),gt(t)){var a=Tt(e),u=Jt(e,t,void 0),c=!0;try{o=i(u),c=!1}finally{c?Pt(a):_t(a)}return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return Ft(a,n),Bt(t,a)}),(function(t){throw Pt(a),t})):(Ft(a,n),Bt(o,a))}if(!t||"object"!=typeof t){if(void 0===(o=i(t))&&(o=t),o===ne&&(o=void 0),e.F&&At(o,!0),n){var l=[],h=[];$t("Patches").M(t,o,l,h),n(l,h)}return o}wt(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var n,r,s=e.produce(t,i,(function(t,e){n=t,r=e}));return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return[t,n,r]})):[s,n,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){gt(t)||wt(8),mt(t)&&(t=Zt(t));var e=Tt(this),i=Jt(this,t,void 0);return i[se].C=!0,_t(e),i},e.finishDraft=function(t,e){var i=(t&&t[se]).A;return Ft(i,e),Bt(void 0,i)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!ie&&wt(20),this.g=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var r=$t("Patches").$;return mt(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),de=new fe,ve=de.produce;de.produceWithPatches.bind(de),de.setAutoFreeze.bind(de),de.setUseProxies.bind(de),de.applyPatches.bind(de),de.createDraft.bind(de),de.finishDraft.bind(de);var pe=ve;function be(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ye(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function we(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ye(Object(i),!0).forEach((function(e){be(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ye(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function me(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 ge="function"==typeof Symbol&&Symbol.observable||"@@observable",xe=function(){return Math.random().toString(36).substring(7).split("").join(".")},Oe={INIT:"@@redux/INIT"+xe(),REPLACE:"@@redux/REPLACE"+xe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+xe()}};function Se(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ce(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(me(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(me(1));return i(Ce)(t,e)}if("function"!=typeof t)throw new Error(me(2));var r=t,s=e,o=[],a=o,u=!1;function c(){a===o&&(a=o.slice())}function l(){if(u)throw new Error(me(3));return s}function h(t){if("function"!=typeof t)throw new Error(me(4));if(u)throw new Error(me(5));var e=!0;return c(),a.push(t),function(){if(e){if(u)throw new Error(me(6));e=!1,c();var i=a.indexOf(t);a.splice(i,1),o=null}}}function f(t){if(!Se(t))throw new Error(me(7));if(void 0===t.type)throw new Error(me(8));if(u)throw new Error(me(9));try{u=!0,s=r(s,t)}finally{u=!1}for(var e=o=a,i=0;i<e.length;i++){(0,e[i])()}return t}function d(t){if("function"!=typeof t)throw new Error(me(10));r=t,f({type:Oe.REPLACE})}function v(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(me(11));function i(){t.next&&t.next(l())}return i(),{unsubscribe:e(i)}}})[ge]=function(){return this},t}return f({type:Oe.INIT}),(n={dispatch:f,subscribe:h,getState:l,replaceReducer:d})[ge]=v,n}function je(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var r=e[n];"function"==typeof t[r]&&(i[r]=t[r])}var s,o=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:Oe.INIT}))throw new Error(me(12));if(void 0===i(void 0,{type:Oe.PROBE_UNKNOWN_ACTION()}))throw new Error(me(13))}))}(i)}catch(t){s=t}return function(t,e){if(void 0===t&&(t={}),s)throw s;for(var n=!1,r={},a=0;a<o.length;a++){var u=o[a],c=i[u],l=t[u],h=c(l,e);if(void 0===h)throw e&&e.type,new Error(me(14));r[u]=h,n=n||h!==l}return(n=n||o.length!==Object.keys(t).length)?r:t}}function Ee(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Re(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),n=function(){throw new Error(me(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},s=e.map((function(t){return t(r)}));return n=Ee.apply(void 0,s)(i.dispatch),we(we({},i),{},{dispatch:n})}}}function Ne(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,n,t):e(r)}}}}var Me=Ne();Me.withExtraArgument=Ne;var Ae,Ue=Me,ke=(Ae=function(t,e){return Ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},Ae(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}Ae(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),$e=function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t},Le=Object.defineProperty,Fe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Te=function(t,e,i){return e in t?Le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Ie=function(t,e){for(var i in e||(e={}))Pe.call(e,i)&&Te(t,i,e[i]);if(Fe)for(var n=0,r=Fe(e);n<r.length;n++){i=r[n];_e.call(e,i)&&Te(t,i,e[i])}return t},Be="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Ee:Ee.apply(null,arguments)};var We=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return ke(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,$e([void 0],t[0].concat(this)))):new(e.bind.apply(e,$e([void 0],t.concat(this))))},e}(Array);function Ke(t){return gt(t)?pe(t,(function(){})):t}function De(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new We;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(Ue.withExtraArgument(i.extraArgument)):n.push(Ue));return n}(t)}}function qe(t){var e,i=De(),n=t||{},r=n.reducer,s=void 0===r?void 0:r,o=n.middleware,a=void 0===o?i():o,u=n.devTools,c=void 0===u||u,l=n.preloadedState,h=void 0===l?void 0:l,f=n.enhancers,d=void 0===f?void 0:f;if("function"==typeof s)e=s;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(s))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=je(s)}var v=a;"function"==typeof v&&(v=v(i));var p=Re.apply(void 0,v),b=Ee;c&&(b=Be(Ie({trace:!1},"object"==typeof c&&c)));var y=[p];return Array.isArray(d)?y=$e([p],d):"function"==typeof d&&(y=d(y)),Ce(e,h,b.apply(void 0,y))}function ze(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Ie(Ie({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function He(t){var e,i={},n=[],r={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,r},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,n,e]}function Ve(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:Ke(t.initialState),r=t.reducers||{},s=Object.keys(r),o={},a={},u={};function c(){var e="function"==typeof t.extraReducers?He(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,s=e[1],o=void 0===s?[]:s,u=e[2],c=void 0===u?void 0:u,l=Ie(Ie({},r),a);return function(t,e,i,n){void 0===i&&(i=[]);var r,s="function"==typeof e?He(e):[e,i,n],o=s[0],a=s[1],u=s[2];if(function(t){return"function"==typeof t}(t))r=function(){return Ke(t())};else{var c=Ke(t);r=function(){return c}}function l(t,e){void 0===t&&(t=r());var i=$e([o[e.type]],a.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[u]),i.reduce((function(t,i){if(i){var n;if(mt(t))return void 0===(n=i(t,e))?t:n;if(gt(t))return pe(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return l.getInitialState=r,l}(n,l,o,c)}return s.forEach((function(t){var i,n,s=r[t],c=e+"/"+t;"reducer"in s?(i=s.reducer,n=s.prepare):i=s,o[t]=i,a[c]=i,u[t]=n?ze(c,n):ze(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:u,caseReducers:o,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var Je="listenerMiddleware";ze(Je+"/add"),ze(Je+"/removeAll"),ze(Je+"/remove"),function(){function t(t,e){var i=r[t];return i?i.enumerable=e:r[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[se];return le.get(e,t)},set:function(e){var i=this[se];le.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][se];if(!r.P)switch(r.i){case 5:n(r)&&Ht(r);break;case 4:i(r)&&Ht(r)}}}function i(t){for(var e=t.t,i=t.k,n=ae(i),r=n.length-1;r>=0;r--){var s=n[r];if(s!==se){var o=e[s];if(void 0===o&&!St(e,s))return!0;var a=i[s],u=a&&a[se];if(u?u.t!==o:!jt(a,o))return!0}}var c=!!e[se];return n.length!==ae(e).length+(c?0:1)}function n(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var r={};!function(t,e){ce[t]||(ce[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),r=function(e,i){if(e){for(var n=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(n,""+r,t(r,!0));return n}var s=ue(i);delete s[se];for(var o=ae(s),a=0;a<o.length;a++){var u=o[a];s[u]=t(u,e||!!s[u].enumerable)}return Object.create(Object.getPrototypeOf(i),s)}(n,e),s={i:n?5:4,A:i?i.A:Lt(),P:!1,I:!1,D:{},l:i,t:e,k:r,o:null,O:!1,C:!1};return Object.defineProperty(r,se,{value:s,writable:!0}),r},S:function(t,i,r){r?mt(i)&&i[se].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[se];if(i){var r=i.t,s=i.k,o=i.D,a=i.i;if(4===a)xt(s,(function(e){e!==se&&(void 0!==r[e]||St(r,e)?o[e]||t(s[e]):(o[e]=!0,Ht(i)))})),xt(r,(function(t){void 0!==s[t]||St(s,t)||(o[t]=!1,Ht(i))}));else if(5===a){if(n(i)&&(Ht(i),o.length=!0),s.length<r.length)for(var u=s.length;u<r.length;u++)o[u]=!1;else for(var c=r.length;c<s.length;c++)o[c]=!0;for(var l=Math.min(s.length,r.length),h=0;h<l;h++)s.hasOwnProperty(h)||(o[h]=!0),void 0===o[h]&&t(s[h])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}();const Ze=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged||null!=t.attribute);class Qe extends bt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:Xe(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:Xe(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function Xe(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}class Ge{constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=t[e];if(n)return(...t)=>{const e=n(...t);return this.reduxStore.dispatch(e),e}}})}static get(t){window.ftReduxStores||(window.ftReduxStores={});const e="string"==typeof t?t:t.name,i="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(Xe(n))return n;if(null==i)return;const r=Ve(i);if(n)return new Ge(r,n);const s=qe({reducer:r.reducer});return window.ftReduxStores[i.name]=new Ge(r,s)}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 Ye,ti;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(ti=null===(Ye=window.safari)||void 0===Ye?void 0:Ye.pushNotification)||void 0===ti||ti.toString());const ei=w`
|
|
98
|
-
`,ii={setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{t.request.paging.perPage=e.payload},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.filters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setResults:(t,e)=>{t.results=e.payload},setFacets:(t,e)=>{t.facets=e.payload},setPaging:(t,e)=>{t.paging=e.payload},setLiveQuery:(t,e)=>{t.liveQuery=e.payload},setSuggestResults:(t,e)=>{t.suggestResults=e.payload}},ni=
|
|
99
|
-
`,ri=Ge.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class si{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=ri.getState(),n=null!=t?t:i;if(e&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,n,!0)}static get(t){var e;return null!=t?si.build(t):null!==(e=si.API)&&void 0!==e?e:si.API=si.build()}static await(t){return new Promise((e=>{let i=si.get(t);if(i)e(i);else{const n=ri.subscribe((()=>{i=si.get(t),i&&(n(),e(i))}))}}))}}var oi;const ai=Symbol("clearAfterUnitTest");class ui{constructor(t){this.
|
|
97
|
+
`;class wt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,n;t=this.resolvePluralKey(t,e);let r=null!==(n=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==n?n:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),r}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${t}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function yt(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function mt(t){return!!t&&!!t[se]}function gt(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===oe}(t)||Array.isArray(t)||!!t[re]||!!t.constructor[re]||Et(t)||Rt(t))}function xt(t,e,i){void 0===i&&(i=!1),0===Ot(t)?(i?Object.keys:ae)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Ot(t){var e=t[se];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Et(t)?2:Rt(t)?3:0}function St(t,e){return 2===Ot(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ct(t,e,i){var n=Ot(t);2===n?t.set(e,i):3===n?(t.delete(e),t.add(i)):t[e]=i}function jt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Et(t){return te&&t instanceof Map}function Rt(t){return ee&&t instanceof Set}function Nt(t){return t.o||t.t}function Mt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ue(t);delete e[se];for(var i=ae(e),n=0;n<i.length;n++){var r=i[n],s=e[r];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(e[r]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function At(t,e){return void 0===e&&(e=!1),kt(t)||mt(t)||!gt(t)||(Ot(t)>1&&(t.set=t.add=t.clear=t.delete=Ut),Object.freeze(t),e&&xt(t,(function(t,e){return At(e,!0)}),!0)),t}function Ut(){yt(2)}function kt(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function $t(t){var e=ce[t];return e||yt(18,t),e}function Lt(){return Gt}function Ft(t,e){e&&($t("Patches"),t.u=[],t.s=[],t.v=e)}function Pt(t){_t(t),t.p.forEach(It),t.p=null}function _t(t){t===Gt&&(Gt=t.l)}function Tt(t){return Gt={p:[],l:Gt,h:t,m:!0,_:0}}function It(t){var e=t[se];0===e.i||1===e.i?e.j():e.O=!0}function Bt(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.g||$t("ES5").S(e,t,n),n?(i[se].P&&(Pt(e),yt(4)),gt(t)&&(t=Wt(e,t),e.l||Dt(e,t)),e.u&&$t("Patches").M(i[se].t,t,e.u,e.s)):t=Wt(e,i,[]),Pt(e),e.u&&e.v(e.u,e.s),t!==ne?t:void 0}function Wt(t,e,i){if(kt(e))return e;var n=e[se];if(!n)return xt(e,(function(r,s){return Kt(t,n,e,r,s,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return Dt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=Mt(n.k):n.o;xt(3===n.i?new Set(r):r,(function(e,s){return Kt(t,n,r,e,s,i)})),Dt(t,r,!1),i&&t.u&&$t("Patches").R(n,i,t.u,t.s)}return n.o}function Kt(t,e,i,n,r,s){if(mt(r)){var o=Wt(t,r,s&&e&&3!==e.i&&!St(e.D,n)?s.concat(n):void 0);if(Ct(i,n,o),!mt(o))return;t.m=!1}if(gt(r)&&!kt(r)){if(!t.h.F&&t._<1)return;Wt(t,r),e&&e.A.l||Dt(t,r)}}function Dt(t,e,i){void 0===i&&(i=!1),t.h.F&&t.m&&At(e,i)}function qt(t,e){var i=t[se];return(i?Nt(i):t)[e]}function zt(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function Ht(t){t.P||(t.P=!0,t.l&&Ht(t.l))}function Vt(t){t.o||(t.o=Mt(t.t))}function Jt(t,e,i){var n=Et(e)?$t("MapSet").N(e,i):Rt(e)?$t("MapSet").T(e,i):t.g?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:Lt(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},r=n,s=le;i&&(r=[n],s=he);var o=Proxy.revocable(r,s),a=o.revoke,u=o.proxy;return n.k=u,n.j=a,u}(e,i):$t("ES5").J(e,i);return(i?i.A:Lt()).p.push(n),n}function Zt(t){return mt(t)||yt(22,t),function t(e){if(!gt(e))return e;var i,n=e[se],r=Ot(e);if(n){if(!n.P&&(n.i<4||!$t("ES5").K(n)))return n.t;n.I=!0,i=Qt(e,r),n.I=!1}else i=Qt(e,r);return xt(i,(function(e,r){n&&function(t,e){return 2===Ot(t)?t.get(e):t[e]}(n.t,e)===r||Ct(i,e,t(r))})),3===r?new Set(i):i}(t)}function Qt(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Mt(t)}var Xt,Gt,Yt="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),te="undefined"!=typeof Map,ee="undefined"!=typeof Set,ie="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ne=Yt?Symbol.for("immer-nothing"):((Xt={})["immer-nothing"]=!0,Xt),re=Yt?Symbol.for("immer-draftable"):"__$immer_draftable",se=Yt?Symbol.for("immer-state"):"__$immer_state",oe=""+Object.prototype.constructor,ae="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ue=Object.getOwnPropertyDescriptors||function(t){var e={};return ae(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},ce={},le={get:function(t,e){if(e===se)return t;var i=Nt(t);if(!St(i,e))return function(t,e,i){var n,r=zt(e,i);return r?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!gt(n)?n:n===qt(t.t,e)?(Vt(t),t.o[e]=Jt(t.A.h,n,t)):n},has:function(t,e){return e in Nt(t)},ownKeys:function(t){return Reflect.ownKeys(Nt(t))},set:function(t,e,i){var n=zt(Nt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var r=qt(Nt(t),e),s=null==r?void 0:r[se];if(s&&s.t===i)return t.o[e]=i,t.D[e]=!1,!0;if(jt(i,r)&&(void 0!==i||St(t.t,e)))return!0;Vt(t),Ht(t)}return t.o[e]===i&&"number"!=typeof i&&(void 0!==i||e in t.o)||(t.o[e]=i,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==qt(t.t,e)||e in t.t?(t.D[e]=!1,Vt(t),Ht(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=Nt(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){yt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){yt(12)}},he={};xt(le,(function(t,e){he[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),he.deleteProperty=function(t,e){return he.set.call(this,t,e,void 0)},he.set=function(t,e,i){return le.set.call(this,t[0],e,i,t[0])};var fe=function(){function t(t){var e=this;this.g=ie,this.F=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var s=e;return function(t){var e=this;void 0===t&&(t=r);for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return s.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(o))}))}}var o;if("function"!=typeof i&&yt(6),void 0!==n&&"function"!=typeof n&&yt(7),gt(t)){var a=Tt(e),u=Jt(e,t,void 0),c=!0;try{o=i(u),c=!1}finally{c?Pt(a):_t(a)}return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return Ft(a,n),Bt(t,a)}),(function(t){throw Pt(a),t})):(Ft(a,n),Bt(o,a))}if(!t||"object"!=typeof t){if(void 0===(o=i(t))&&(o=t),o===ne&&(o=void 0),e.F&&At(o,!0),n){var l=[],h=[];$t("Patches").M(t,o,l,h),n(l,h)}return o}yt(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var n,r,s=e.produce(t,i,(function(t,e){n=t,r=e}));return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return[t,n,r]})):[s,n,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){gt(t)||yt(8),mt(t)&&(t=Zt(t));var e=Tt(this),i=Jt(this,t,void 0);return i[se].C=!0,_t(e),i},e.finishDraft=function(t,e){var i=(t&&t[se]).A;return Ft(i,e),Bt(void 0,i)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!ie&&yt(20),this.g=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var r=$t("Patches").$;return mt(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),de=new fe,ve=de.produce;de.produceWithPatches.bind(de),de.setAutoFreeze.bind(de),de.setUseProxies.bind(de),de.applyPatches.bind(de),de.createDraft.bind(de),de.finishDraft.bind(de);var pe=ve;function be(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function we(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ye(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?we(Object(i),!0).forEach((function(e){be(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):we(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function me(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 ge="function"==typeof Symbol&&Symbol.observable||"@@observable",xe=function(){return Math.random().toString(36).substring(7).split("").join(".")},Oe={INIT:"@@redux/INIT"+xe(),REPLACE:"@@redux/REPLACE"+xe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+xe()}};function Se(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ce(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(me(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(me(1));return i(Ce)(t,e)}if("function"!=typeof t)throw new Error(me(2));var r=t,s=e,o=[],a=o,u=!1;function c(){a===o&&(a=o.slice())}function l(){if(u)throw new Error(me(3));return s}function h(t){if("function"!=typeof t)throw new Error(me(4));if(u)throw new Error(me(5));var e=!0;return c(),a.push(t),function(){if(e){if(u)throw new Error(me(6));e=!1,c();var i=a.indexOf(t);a.splice(i,1),o=null}}}function f(t){if(!Se(t))throw new Error(me(7));if(void 0===t.type)throw new Error(me(8));if(u)throw new Error(me(9));try{u=!0,s=r(s,t)}finally{u=!1}for(var e=o=a,i=0;i<e.length;i++){(0,e[i])()}return t}function d(t){if("function"!=typeof t)throw new Error(me(10));r=t,f({type:Oe.REPLACE})}function v(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(me(11));function i(){t.next&&t.next(l())}return i(),{unsubscribe:e(i)}}})[ge]=function(){return this},t}return f({type:Oe.INIT}),(n={dispatch:f,subscribe:h,getState:l,replaceReducer:d})[ge]=v,n}function je(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var r=e[n];"function"==typeof t[r]&&(i[r]=t[r])}var s,o=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:Oe.INIT}))throw new Error(me(12));if(void 0===i(void 0,{type:Oe.PROBE_UNKNOWN_ACTION()}))throw new Error(me(13))}))}(i)}catch(t){s=t}return function(t,e){if(void 0===t&&(t={}),s)throw s;for(var n=!1,r={},a=0;a<o.length;a++){var u=o[a],c=i[u],l=t[u],h=c(l,e);if(void 0===h)throw e&&e.type,new Error(me(14));r[u]=h,n=n||h!==l}return(n=n||o.length!==Object.keys(t).length)?r:t}}function Ee(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Re(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),n=function(){throw new Error(me(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},s=e.map((function(t){return t(r)}));return n=Ee.apply(void 0,s)(i.dispatch),ye(ye({},i),{},{dispatch:n})}}}function Ne(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,n,t):e(r)}}}}var Me=Ne();Me.withExtraArgument=Ne;var Ae,Ue=Me,ke=(Ae=function(t,e){return Ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},Ae(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}Ae(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),$e=function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t},Le=Object.defineProperty,Fe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Te=function(t,e,i){return e in t?Le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Ie=function(t,e){for(var i in e||(e={}))Pe.call(e,i)&&Te(t,i,e[i]);if(Fe)for(var n=0,r=Fe(e);n<r.length;n++){i=r[n];_e.call(e,i)&&Te(t,i,e[i])}return t},Be="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Ee:Ee.apply(null,arguments)};var We=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return ke(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,$e([void 0],t[0].concat(this)))):new(e.bind.apply(e,$e([void 0],t.concat(this))))},e}(Array);function Ke(t){return gt(t)?pe(t,(function(){})):t}function De(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new We;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(Ue.withExtraArgument(i.extraArgument)):n.push(Ue));return n}(t)}}function qe(t){var e,i=De(),n=t||{},r=n.reducer,s=void 0===r?void 0:r,o=n.middleware,a=void 0===o?i():o,u=n.devTools,c=void 0===u||u,l=n.preloadedState,h=void 0===l?void 0:l,f=n.enhancers,d=void 0===f?void 0:f;if("function"==typeof s)e=s;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(s))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=je(s)}var v=a;"function"==typeof v&&(v=v(i));var p=Re.apply(void 0,v),b=Ee;c&&(b=Be(Ie({trace:!1},"object"==typeof c&&c)));var w=[p];return Array.isArray(d)?w=$e([p],d):"function"==typeof d&&(w=d(w)),Ce(e,h,b.apply(void 0,w))}function ze(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Ie(Ie({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function He(t){var e,i={},n=[],r={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,r},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,n,e]}function Ve(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:Ke(t.initialState),r=t.reducers||{},s=Object.keys(r),o={},a={},u={};function c(){var e="function"==typeof t.extraReducers?He(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,s=e[1],o=void 0===s?[]:s,u=e[2],c=void 0===u?void 0:u,l=Ie(Ie({},r),a);return function(t,e,i,n){void 0===i&&(i=[]);var r,s="function"==typeof e?He(e):[e,i,n],o=s[0],a=s[1],u=s[2];if(function(t){return"function"==typeof t}(t))r=function(){return Ke(t())};else{var c=Ke(t);r=function(){return c}}function l(t,e){void 0===t&&(t=r());var i=$e([o[e.type]],a.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[u]),i.reduce((function(t,i){if(i){var n;if(mt(t))return void 0===(n=i(t,e))?t:n;if(gt(t))return pe(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return l.getInitialState=r,l}(n,l,o,c)}return s.forEach((function(t){var i,n,s=r[t],c=e+"/"+t;"reducer"in s?(i=s.reducer,n=s.prepare):i=s,o[t]=i,a[c]=i,u[t]=n?ze(c,n):ze(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:u,caseReducers:o,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var Je="listenerMiddleware";ze(Je+"/add"),ze(Je+"/removeAll"),ze(Je+"/remove"),function(){function t(t,e){var i=r[t];return i?i.enumerable=e:r[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[se];return le.get(e,t)},set:function(e){var i=this[se];le.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][se];if(!r.P)switch(r.i){case 5:n(r)&&Ht(r);break;case 4:i(r)&&Ht(r)}}}function i(t){for(var e=t.t,i=t.k,n=ae(i),r=n.length-1;r>=0;r--){var s=n[r];if(s!==se){var o=e[s];if(void 0===o&&!St(e,s))return!0;var a=i[s],u=a&&a[se];if(u?u.t!==o:!jt(a,o))return!0}}var c=!!e[se];return n.length!==ae(e).length+(c?0:1)}function n(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var r={};!function(t,e){ce[t]||(ce[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),r=function(e,i){if(e){for(var n=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(n,""+r,t(r,!0));return n}var s=ue(i);delete s[se];for(var o=ae(s),a=0;a<o.length;a++){var u=o[a];s[u]=t(u,e||!!s[u].enumerable)}return Object.create(Object.getPrototypeOf(i),s)}(n,e),s={i:n?5:4,A:i?i.A:Lt(),P:!1,I:!1,D:{},l:i,t:e,k:r,o:null,O:!1,C:!1};return Object.defineProperty(r,se,{value:s,writable:!0}),r},S:function(t,i,r){r?mt(i)&&i[se].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[se];if(i){var r=i.t,s=i.k,o=i.D,a=i.i;if(4===a)xt(s,(function(e){e!==se&&(void 0!==r[e]||St(r,e)?o[e]||t(s[e]):(o[e]=!0,Ht(i)))})),xt(r,(function(t){void 0!==s[t]||St(s,t)||(o[t]=!1,Ht(i))}));else if(5===a){if(n(i)&&(Ht(i),o.length=!0),s.length<r.length)for(var u=s.length;u<r.length;u++)o[u]=!1;else for(var c=r.length;c<s.length;c++)o[c]=!0;for(var l=Math.min(s.length,r.length),h=0;h<l;h++)s.hasOwnProperty(h)||(o[h]=!0),void 0===o[h]&&t(s[h])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}();const Ze=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged||null!=t.attribute);class Qe extends bt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:Xe(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:Xe(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function Xe(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}class Ge{constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=t[e];if(n)return(...t)=>{const e=n(...t);return this.reduxStore.dispatch(e),e}}})}static get(t){window.ftReduxStores||(window.ftReduxStores={});const e="string"==typeof t?t:t.name,i="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(Xe(n))return n;if(null==i)return;const r=Ve(i);if(n)return new Ge(r,n);const s=qe({reducer:r.reducer});return window.ftReduxStores[i.name]=new Ge(r,s)}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 Ye,ti;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(ti=null===(Ye=window.safari)||void 0===Ye?void 0:Ye.pushNotification)||void 0===ti||ti.toString());const ei=y`
|
|
98
|
+
`,ii={setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{t.request.paging.perPage=e.payload},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.filters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setResults:(t,e)=>{t.results=e.payload},setFacets:(t,e)=>{t.facets=e.payload},setPaging:(t,e)=>{t.paging=e.payload},setLiveQuery:(t,e)=>{t.liveQuery=e.payload},setSuggestResults:(t,e)=>{t.suggestResults=e.payload}},ni=y`
|
|
99
|
+
`,ri=Ge.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class si{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=ri.getState(),n=null!=t?t:i;if(e&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,n,!0)}static get(t){var e;return null!=t?si.build(t):null!==(e=si.API)&&void 0!==e?e:si.API=si.build()}static await(t){return new Promise((e=>{let i=si.get(t);if(i)e(i);else{const n=ri.subscribe((()=>{i=si.get(t),i&&(n(),e(i))}))}}))}}var oi;const ai=Symbol("clearAfterUnitTest");class ui{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new i,this.listeners={},this.currentUiLocale="",this[oi]=()=>{this.defaultMessages={},this.cache=new i,this.listeners={}},this.currentUiLocale=ri.getState().uiLocale,ri.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=ri.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const n={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};u(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var n,r,s;t=t.toLowerCase(),this.fetchContext(t);const o=null!==(r=null===(n=this.cache.getNow(t))||void 0===n?void 0:n.messages)&&void 0!==r?r:{};return new wt(null!==(s=this.defaultMessages[t])&&void 0!==s?s:{},o).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>h(0).then((()=>t())).catch((()=>null)))))}}oi=ai,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new ui((async(t,e)=>(await si.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new ui((async(t,e)=>(await si.await()).getCustomMessageContext(t,e))));const ci=window.FluidTopicsI18nService;var li=function(t,e,i,n){for(var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class hi extends bt{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>si.get(),this.cache=new i,this.cleanSessionDebouncer=new n}render(){return J`
|
|
100
100
|
<slot></slot>
|
|
101
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&ri.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&ri.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&ri.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&ri.actions.setNoCustom(this.noCustom),t.has("editorMode")&&ri.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&ri.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&ri.actions.setSession(this.session),t.has("availableUiLocales")&&ri.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>ci.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}hi.elementDefinitions={},hi.styles=ni,li([s()],hi.prototype,"baseUrl",void 0),li([s()],hi.prototype,"apiIntegrationIdentifier",void 0),li([s()],hi.prototype,"uiLocale",void 0),li([l([])],hi.prototype,"availableUiLocales",void 0),li([s({type:Boolean})],hi.prototype,"editorMode",void 0),li([s({type:Boolean})],hi.prototype,"noCustom",void 0),li([s({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],hi.prototype,"noCustomComponent",void 0),li([s({type:Boolean})],hi.prototype,"withManualResources",void 0),li([l([])],hi.prototype,"messageContexts",void 0),li([l(void 0)],hi.prototype,"session",void 0),li([s({type:Object})],hi.prototype,"apiProvider",void 0),c("ft-app-context")(hi);class fi{constructor(t){this.api=t}static async build(){return new fi(await si.await())}async launchSearch(t){return this.api.search(t)}async launchSuggest(t){return this.api.getSuggestions(t)}}class di{constructor(t,e){this.store=t,this.searchDebouncer=new n(10),this.suggestDebouncer=new n(300),this.initService(e)}static build(t){return new di((t=>Ge.get({name:"ft-search-"+t,initialState:{request:{query:"",filters:[],facets:[],sort:[],paging:{page:1,perPage:10}},results:[],facets:[],paging:{totalResultsCount:0,totalClustersCount:0,isLastPage:!1},liveQuery:"",suggestResults:[]},reducers:ii}))(t.trim()||"context"),fi.build)}async initService(t){this.service=await t(),this.launchSearch()}async awaitService(){for(;null==this.service;)await h(5);return this.service}setQuery(t){this.store.actions.setRequestQuery(t),this.store.actions.setLiveQuery(t),this.launchSearch()}setContentLocale(t){this.store.actions.setRequestContentLocale(t),this.launchSearch()}setPageSize(t){this.store.actions.setPageSize(t),this.launchSearch()}setSort(t){this.store.actions.setRequestSort(t),this.launchSearch()}setFilters(t){this.store.actions.setRequestFilters(t),this.launchSearch()}addFacet(t){this.facetIds=[...this.facetIds,t],this.launchSearch()}replaceFacet(t,e){let i=this.facetIds.filter((e=>e!=t));e&&i.push(e),this.facetIds=i,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map((t=>t.id))}set facetIds(t){let e=[...new Set(t)].map((t=>({id:t})));this.store.actions.setRequestFacets(e)}setFilter(t,e){let i=this.store.getState().request.filters,n={key:t,values:e,negative:!1},r=[...i.filter((e=>e.key!==t)),n];this.setFilters(r)}setLiveQuery(t){this.store.actions.setLiveQuery(t),this.launchSuggest()}async launchSearch(){await this.awaitService(),this.searchDebouncer.run((()=>this.fetchSearchData()))}async launchSuggest(){await this.awaitService(),this.suggestDebouncer.run((()=>this.fetchSuggestData()))}async fetchSearchData(){try{let t=await this.service.launchSearch(this.store.getState().request);if(t.paging.currentPage<=1)this.store.actions.setResults(t.results),this.store.actions.setFacets(t.facets),this.store.actions.setPaging({totalResultsCount:t.paging.totalResultsCount,totalClustersCount:t.paging.totalClustersCount,isLastPage:t.paging.lastPage});else{let e=this.store.getState().results.concat(t.results);this.store.actions.setResults(e),this.store.actions.setPaging({totalResultsCount:t.paging.totalResultsCount,totalClustersCount:t.paging.totalClustersCount,isLastPage:t.paging.lastPage})}}catch(t){this.errorHandler&&this.errorHandler(t)}}async fetchSuggestData(){try{let t={input:this.store.getState().liveQuery,filters:this.store.getState().request.filters,sort:this.store.getState().request.sort,contentLocale:this.store.getState().request.contentLocale},e=await this.service.launchSuggest(t);this.store.actions.setSuggestResults(e.suggestions)}catch(t){this.errorHandler&&this.errorHandler(t)}}}var vi=function(t,e,i,n){for(var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class pi extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const bi=Symbol("registerInterval");class
|
|
101
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&ri.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&ri.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&ri.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&ri.actions.setNoCustom(this.noCustom),t.has("editorMode")&&ri.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&ri.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&ri.actions.setSession(this.session),t.has("availableUiLocales")&&ri.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>ci.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}hi.elementDefinitions={},hi.styles=ni,li([s()],hi.prototype,"baseUrl",void 0),li([s()],hi.prototype,"apiIntegrationIdentifier",void 0),li([s()],hi.prototype,"uiLocale",void 0),li([l([])],hi.prototype,"availableUiLocales",void 0),li([s({type:Boolean})],hi.prototype,"editorMode",void 0),li([s({type:Boolean})],hi.prototype,"noCustom",void 0),li([s({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],hi.prototype,"noCustomComponent",void 0),li([s({type:Boolean})],hi.prototype,"withManualResources",void 0),li([l([])],hi.prototype,"messageContexts",void 0),li([l(void 0)],hi.prototype,"session",void 0),li([s({type:Object})],hi.prototype,"apiProvider",void 0),c("ft-app-context")(hi);class fi{constructor(t){this.api=t}static async build(){return new fi(await si.await())}async launchSearch(t){return this.api.search(t)}async launchSuggest(t){return this.api.getSuggestions(t)}}class di{constructor(t,e){this.store=t,this.searchDebouncer=new n(10),this.suggestDebouncer=new n(300),this.initService(e)}static build(t){return new di((t=>Ge.get({name:"ft-search-"+t,initialState:{request:{query:"",filters:[],facets:[],sort:[],paging:{page:1,perPage:10}},results:[],facets:[],paging:{totalResultsCount:0,totalClustersCount:0,isLastPage:!1},liveQuery:"",suggestResults:[]},reducers:ii}))(t.trim()||"context"),fi.build)}async initService(t){this.service=await t(),this.launchSearch()}async awaitService(){for(;null==this.service;)await h(5);return this.service}setQuery(t){this.store.actions.setRequestQuery(t),this.store.actions.setLiveQuery(t),this.launchSearch()}setContentLocale(t){this.store.actions.setRequestContentLocale(t),this.launchSearch()}setPageSize(t){this.store.actions.setPageSize(t),this.launchSearch()}setSort(t){this.store.actions.setRequestSort(t),this.launchSearch()}setFilters(t){this.store.actions.setRequestFilters(t),this.launchSearch()}addFacet(t){this.facetIds=[...this.facetIds,t],this.launchSearch()}replaceFacet(t,e){let i=this.facetIds.filter((e=>e!=t));e&&i.push(e),this.facetIds=i,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map((t=>t.id))}set facetIds(t){let e=[...new Set(t)].map((t=>({id:t})));this.store.actions.setRequestFacets(e)}setFilter(t,e){let i=this.store.getState().request.filters,n={key:t,values:e,negative:!1},r=[...i.filter((e=>e.key!==t)),n];this.setFilters(r)}setLiveQuery(t){this.store.actions.setLiveQuery(t),this.launchSuggest()}async launchSearch(){await this.awaitService(),this.searchDebouncer.run((()=>this.fetchSearchData()))}async launchSuggest(){await this.awaitService(),this.suggestDebouncer.run((()=>this.fetchSuggestData()))}async fetchSearchData(){try{let t=await this.service.launchSearch(this.store.getState().request);if(t.paging.currentPage<=1)this.store.actions.setResults(t.results),this.store.actions.setFacets(t.facets),this.store.actions.setPaging({totalResultsCount:t.paging.totalResultsCount,totalClustersCount:t.paging.totalClustersCount,isLastPage:t.paging.lastPage});else{let e=this.store.getState().results.concat(t.results);this.store.actions.setResults(e),this.store.actions.setPaging({totalResultsCount:t.paging.totalResultsCount,totalClustersCount:t.paging.totalClustersCount,isLastPage:t.paging.lastPage})}}catch(t){this.errorHandler&&this.errorHandler(t)}}async fetchSuggestData(){try{let t={input:this.store.getState().liveQuery,filters:this.store.getState().request.filters,sort:this.store.getState().request.sort,contentLocale:this.store.getState().request.contentLocale},e=await this.service.launchSuggest(t);this.store.actions.setSuggestResults(e.suggestions)}catch(t){this.errorHandler&&this.errorHandler(t)}}}var vi=function(t,e,i,n){for(var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class pi extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const bi=Symbol("registerInterval");class wi extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[bi]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[bi]):this.dispatchEvent(new pi)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=bi,vi([o()],i.prototype,"stateManager",void 0),i}(Qe)){}var yi=function(t,e,i,n){for(var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class mi extends CustomEvent{constructor(t){super("ft-search-load-error",{detail:t})}}class gi extends CustomEvent{constructor(t){super("ft-search-request-change",{detail:t})}}class xi extends Qe{constructor(){super(...arguments),this.query="",this.contentLocale="en-US",this.pageSize=10,this.filters=[],this.sort=[]}get stateManager(){return null==this._stateManager&&(this._stateManager=di.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0")),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"search")),this._stateManager}render(){return J`
|
|
102
102
|
<slot @register-ft-search-component=${this.registerComponent}></slot>
|
|
103
|
-
`}updated(t){super.updated(t),t.has("query")&&void 0!==this.query&&this.stateManager.setQuery(this.query),t.has("contentLocale")&&void 0!==this.contentLocale&&this.stateManager.setContentLocale(this.contentLocale),t.has("filters")&&void 0!==this.filters&&this.stateManager.setFilters(this.filters),t.has("sort")&&void 0!==this.sort&&this.stateManager.setSort(this.sort),t.has("pageSize")&&void 0!==this.pageSize&&this.stateManager.setPageSize(this.pageSize)}connectedCallback(){super.connectedCallback(),this.stateManager.setQuery(this.query),this.stateManager.setContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort)}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("request")&&this.request&&this.dispatchEvent(new gi(this.request))}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){t.setSearchStateManager(this.stateManager)}handleLoadError(t){this.dispatchEvent(new mi(t))}}xi.elementDefinitions={},xi.styles=ei,
|
|
103
|
+
`}updated(t){super.updated(t),t.has("query")&&void 0!==this.query&&this.stateManager.setQuery(this.query),t.has("contentLocale")&&void 0!==this.contentLocale&&this.stateManager.setContentLocale(this.contentLocale),t.has("filters")&&void 0!==this.filters&&this.stateManager.setFilters(this.filters),t.has("sort")&&void 0!==this.sort&&this.stateManager.setSort(this.sort),t.has("pageSize")&&void 0!==this.pageSize&&this.stateManager.setPageSize(this.pageSize)}connectedCallback(){super.connectedCallback(),this.stateManager.setQuery(this.query),this.stateManager.setContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort)}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("request")&&this.request&&this.dispatchEvent(new gi(this.request))}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){t.setSearchStateManager(this.stateManager)}handleLoadError(t){this.dispatchEvent(new mi(t))}}xi.elementDefinitions={},xi.styles=ei,yi([s()],xi.prototype,"query",void 0),yi([s()],xi.prototype,"contentLocale",void 0),yi([s({type:Number})],xi.prototype,"pageSize",void 0),yi([l([])],xi.prototype,"filters",void 0),yi([l([])],xi.prototype,"sort",void 0),yi([((t,e)=>{var i;const n=Ze(t)?t:{};return e=null!==(i=null!=e?e:n.hasChanged)&&void 0!==i?i:(t,e)=>!u(t,e),(i,r)=>{var s,o;i.constructor.createProperty(r,{hasChanged:e,attribute:null!==(s=n.attribute)&&void 0!==s&&s});const a=i;a.reduxProperties=a.reduxProperties||new Map;const u=null!==(o=Ze(t)?n.selector:t)&&void 0!==o?o:t=>t[r];a.reduxProperties.set(r,{selector:u,store:n.store})}})({store:"search"})],xi.prototype,"request",void 0),c("ft-search-context")(xi),t.FtSearchContext=xi,t.FtSearchContextCssVariables={},t.LoadErrorEvent=mi,t.SearchRequestChangeEvent=gi,t.styles=ei,Object.defineProperty(t,"U",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-context",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.67",
|
|
4
4
|
"description": "Context block for integrated search components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-app-context": "0.3.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-app-context": "0.3.67",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "0.3.67",
|
|
24
24
|
"lit": "2.2.8"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@fluid-topics/public-api": "1.0.33"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "9db69a3abe84d6fb5ec11e29164f2ceaa7369352"
|
|
33
33
|
}
|