@fluid-topics/ft-search-input 1.3.12 → 1.3.13

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,5 +1,5 @@
1
1
  "use strict";(()=>{var Pu=Object.create;var ns=Object.defineProperty;var Nu=Object.getOwnPropertyDescriptor;var _u=Object.getOwnPropertyNames;var Bu=Object.getPrototypeOf,Du=Object.prototype.hasOwnProperty;var Ur=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fu=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of _u(e))!Du.call(t,n)&&n!==o&&ns(t,n,{get:()=>e[n],enumerable:!(i=Nu(e,n))||i.enumerable});return t};var f=(t,e,o)=>(o=t!=null?Pu(Bu(t)):{},Fu(e||!t||!t.__esModule?ns(o,"default",{value:t,enumerable:!0}):o,t));var w=Ur((mh,as)=>{as.exports=ftGlobals.wcUtils});var I=Ur((bh,ss)=>{ss.exports=ftGlobals.lit});var Q=Ur((xh,ls)=>{ls.exports=ftGlobals.litDecorators});var ft=Ur((Wb,al)=>{al.exports=ftGlobals.litClassMap});var ic=Ur((Kx,oc)=>{oc.exports=ftGlobals.litUnsafeHTML});var bc=Ur((wr,mc)=>{var Ti=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,Pi=function(){function t(){this.fetch=!1,this.DOMException=Ti.DOMException}return t.prototype=Ti,new t}();(function(t){var e=function(o){var i=typeof t<"u"&&t||typeof self<"u"&&self||typeof global<"u"&&global||{},n={searchParams:"URLSearchParams"in i,iterable:"Symbol"in i&&"iterator"in Symbol,blob:"FileReader"in i&&"Blob"in i&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in i,arrayBuffer:"ArrayBuffer"in i};function a(m){return m&&DataView.prototype.isPrototypeOf(m)}if(n.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(m){return m&&s.indexOf(Object.prototype.toString.call(m))>-1};function p(m){if(typeof m!="string"&&(m=String(m)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(m)||m==="")throw new TypeError('Invalid character in header field name: "'+m+'"');return m.toLowerCase()}function u(m){return typeof m!="string"&&(m=String(m)),m}function y(m){var x={next:function(){var _=m.shift();return{done:_===void 0,value:_}}};return n.iterable&&(x[Symbol.iterator]=function(){return x}),x}function g(m){this.map={},m instanceof g?m.forEach(function(x,_){this.append(_,x)},this):Array.isArray(m)?m.forEach(function(x){if(x.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+x.length);this.append(x[0],x[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(x){this.append(x,m[x])},this)}g.prototype.append=function(m,x){m=p(m),x=u(x);var _=this.map[m];this.map[m]=_?_+", "+x:x},g.prototype.delete=function(m){delete this.map[p(m)]},g.prototype.get=function(m){return m=p(m),this.has(m)?this.map[m]:null},g.prototype.has=function(m){return this.map.hasOwnProperty(p(m))},g.prototype.set=function(m,x){this.map[p(m)]=u(x)},g.prototype.forEach=function(m,x){for(var _ in this.map)this.map.hasOwnProperty(_)&&m.call(x,this.map[_],_,this)},g.prototype.keys=function(){var m=[];return this.forEach(function(x,_){m.push(_)}),y(m)},g.prototype.values=function(){var m=[];return this.forEach(function(x){m.push(x)}),y(m)},g.prototype.entries=function(){var m=[];return this.forEach(function(x,_){m.push([_,x])}),y(m)},n.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function b(m){if(!m._noBody){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}}function S(m){return new Promise(function(x,_){m.onload=function(){x(m.result)},m.onerror=function(){_(m.error)}})}function v(m){var x=new FileReader,_=S(x);return x.readAsArrayBuffer(m),_}function E(m){var x=new FileReader,_=S(x),ie=/charset=([A-Za-z0-9_-]+)/.exec(m.type),xe=ie?ie[1]:"utf-8";return x.readAsText(m,xe),_}function P(m){for(var x=new Uint8Array(m),_=new Array(x.length),ie=0;ie<x.length;ie++)_[ie]=String.fromCharCode(x[ie]);return _.join("")}function k(m){if(m.slice)return m.slice(0);var x=new Uint8Array(m.byteLength);return x.set(new Uint8Array(m)),x.buffer}function $(){return this.bodyUsed=!1,this._initBody=function(m){this.bodyUsed=this.bodyUsed,this._bodyInit=m,m?typeof m=="string"?this._bodyText=m:n.blob&&Blob.prototype.isPrototypeOf(m)?this._bodyBlob=m:n.formData&&FormData.prototype.isPrototypeOf(m)?this._bodyFormData=m:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)?this._bodyText=m.toString():n.arrayBuffer&&n.blob&&a(m)?(this._bodyArrayBuffer=k(m.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(m)||c(m))?this._bodyArrayBuffer=k(m):this._bodyText=m=Object.prototype.toString.call(m):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof m=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var m=b(this);if(m)return m;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var m=b(this);return m||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(n.blob)return this.blob().then(v);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var m=b(this);if(m)return m;if(this._bodyBlob)return E(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(P(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n.formData&&(this.formData=function(){return this.text().then(it)}),this.json=function(){return this.text().then(JSON.parse)},this}var z=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function q(m){var x=m.toUpperCase();return z.indexOf(x)>-1?x:m}function Y(m,x){if(!(this instanceof Y))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');x=x||{};var _=x.body;if(m instanceof Y){if(m.bodyUsed)throw new TypeError("Already read");this.url=m.url,this.credentials=m.credentials,x.headers||(this.headers=new g(m.headers)),this.method=m.method,this.mode=m.mode,this.signal=m.signal,!_&&m._bodyInit!=null&&(_=m._bodyInit,m.bodyUsed=!0)}else this.url=String(m);if(this.credentials=x.credentials||this.credentials||"same-origin",(x.headers||!this.headers)&&(this.headers=new g(x.headers)),this.method=q(x.method||this.method||"GET"),this.mode=x.mode||this.mode||null,this.signal=x.signal||this.signal||function(){if("AbortController"in i){var X=new AbortController;return X.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&_)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(_),(this.method==="GET"||this.method==="HEAD")&&(x.cache==="no-store"||x.cache==="no-cache")){var ie=/([?&])_=[^&]*/;if(ie.test(this.url))this.url=this.url.replace(ie,"$1_="+new Date().getTime());else{var xe=/\?/;this.url+=(xe.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Y.prototype.clone=function(){return new Y(this,{body:this._bodyInit})};function it(m){var x=new FormData;return m.trim().split("&").forEach(function(_){if(_){var ie=_.split("="),xe=ie.shift().replace(/\+/g," "),X=ie.join("=").replace(/\+/g," ");x.append(decodeURIComponent(xe),decodeURIComponent(X))}}),x}function Ht(m){var x=new g,_=m.replace(/\r?\n[\t ]+/g," ");return _.split("\r").map(function(ie){return ie.indexOf(`
2
- `)===0?ie.substr(1,ie.length):ie}).forEach(function(ie){var xe=ie.split(":"),X=xe.shift().trim();if(X){var gi=xe.join(":").trim();try{x.append(X,gi)}catch(Rn){console.warn("Response "+Rn.message)}}}),x}$.call(Y.prototype);function Qe(m,x){if(!(this instanceof Qe))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(x||(x={}),this.type="default",this.status=x.status===void 0?200:x.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=x.statusText===void 0?"":""+x.statusText,this.headers=new g(x.headers),this.url=x.url||"",this._initBody(m)}$.call(Qe.prototype),Qe.prototype.clone=function(){return new Qe(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},Qe.error=function(){var m=new Qe(null,{status:200,statusText:""});return m.ok=!1,m.status=0,m.type="error",m};var Wt=[301,302,303,307,308];Qe.redirect=function(m,x){if(Wt.indexOf(x)===-1)throw new RangeError("Invalid status code");return new Qe(null,{status:x,headers:{location:m}})},o.DOMException=i.DOMException;try{new o.DOMException}catch{o.DOMException=function(x,_){this.message=x,this.name=_;var ie=Error(x);this.stack=ie.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function De(m,x){return new Promise(function(_,ie){var xe=new Y(m,x);if(xe.signal&&xe.signal.aborted)return ie(new o.DOMException("Aborted","AbortError"));var X=new XMLHttpRequest;function gi(){X.abort()}X.onload=function(){var Fe={statusText:X.statusText,headers:Ht(X.getAllResponseHeaders()||"")};xe.url.indexOf("file://")===0&&(X.status<200||X.status>599)?Fe.status=200:Fe.status=X.status,Fe.url="responseURL"in X?X.responseURL:Fe.headers.get("X-Request-URL");var zr="response"in X?X.response:X.responseText;setTimeout(function(){_(new Qe(zr,Fe))},0)},X.onerror=function(){setTimeout(function(){ie(new TypeError("Network request failed"))},0)},X.ontimeout=function(){setTimeout(function(){ie(new TypeError("Network request timed out"))},0)},X.onabort=function(){setTimeout(function(){ie(new o.DOMException("Aborted","AbortError"))},0)};function Rn(Fe){try{return Fe===""&&i.location.href?i.location.href:Fe}catch{return Fe}}if(X.open(xe.method,Rn(xe.url),!0),xe.credentials==="include"?X.withCredentials=!0:xe.credentials==="omit"&&(X.withCredentials=!1),"responseType"in X&&(n.blob?X.responseType="blob":n.arrayBuffer&&(X.responseType="arraybuffer")),x&&typeof x.headers=="object"&&!(x.headers instanceof g||i.Headers&&x.headers instanceof i.Headers)){var is=[];Object.getOwnPropertyNames(x.headers).forEach(function(Fe){is.push(p(Fe)),X.setRequestHeader(Fe,u(x.headers[Fe]))}),xe.headers.forEach(function(Fe,zr){is.indexOf(zr)===-1&&X.setRequestHeader(zr,Fe)})}else xe.headers.forEach(function(Fe,zr){X.setRequestHeader(zr,Fe)});xe.signal&&(xe.signal.addEventListener("abort",gi),X.onreadystatechange=function(){X.readyState===4&&xe.signal.removeEventListener("abort",gi)}),X.send(typeof xe._bodyInit>"u"?null:xe._bodyInit)})}return De.polyfill=!0,i.fetch||(i.fetch=De,i.Headers=g,i.Request=Y,i.Response=Qe),o.Headers=g,o.Request=Y,o.Response=Qe,o.fetch=De,o}({})})(Pi);Pi.fetch.ponyfill=!0;delete Pi.fetch.polyfill;var Eo=Ti.fetch?Ti:Pi;wr=Eo.fetch;wr.default=Eo.fetch;wr.fetch=Eo.fetch;wr.Headers=Eo.Headers;wr.Request=Eo.Request;wr.Response=Eo.Response;mc.exports=wr});var Tr=Ur((WC,ip)=>{ip.exports=ftGlobals.litRepeat});var Tu=f(w());var po=f(I()),Mr=f(w());var hc=f(I()),oe=f(w());var ta=f(w());var Qo=f(Q()),pc=f(w());var il=f(I()),W=f(w());var hs=f(I()),we=f(w()),cs=we.FtCssVariableFactory.extend("--ft-ripple-color","",we.designSystemVariables.colorContent),O={color:cs,backgroundColor:we.FtCssVariableFactory.extend("--ft-ripple-background-color","",cs),opacityContentOnSurfacePressed:we.FtCssVariableFactory.external(we.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:we.FtCssVariableFactory.external(we.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:we.FtCssVariableFactory.external(we.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:we.FtCssVariableFactory.external(we.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:we.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},ds=we.FtCssVariableFactory.extend("--ft-ripple-color","",we.designSystemVariables.colorPrimary),ps={color:ds,backgroundColor:we.FtCssVariableFactory.extend("--ft-ripple-background-color","",ds)},us=we.FtCssVariableFactory.extend("--ft-ripple-color","",we.designSystemVariables.colorSecondary),fs={color:us,backgroundColor:we.FtCssVariableFactory.extend("--ft-ripple-background-color","",us)},gs=hs.css`
2
+ `)===0?ie.substr(1,ie.length):ie}).forEach(function(ie){var xe=ie.split(":"),X=xe.shift().trim();if(X){var gi=xe.join(":").trim();try{x.append(X,gi)}catch(Rn){console.warn("Response "+Rn.message)}}}),x}$.call(Y.prototype);function Qe(m,x){if(!(this instanceof Qe))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(x||(x={}),this.type="default",this.status=x.status===void 0?200:x.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=x.statusText===void 0?"":""+x.statusText,this.headers=new g(x.headers),this.url=x.url||"",this._initBody(m)}$.call(Qe.prototype),Qe.prototype.clone=function(){return new Qe(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},Qe.error=function(){var m=new Qe(null,{status:200,statusText:""});return m.ok=!1,m.status=0,m.type="error",m};var Wt=[301,302,303,307,308];Qe.redirect=function(m,x){if(Wt.indexOf(x)===-1)throw new RangeError("Invalid status code");return new Qe(null,{status:x,headers:{location:m}})},o.DOMException=i.DOMException;try{new o.DOMException}catch{o.DOMException=function(x,_){this.message=x,this.name=_;var ie=Error(x);this.stack=ie.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function De(m,x){return new Promise(function(_,ie){var xe=new Y(m,x);if(xe.signal&&xe.signal.aborted)return ie(new o.DOMException("Aborted","AbortError"));var X=new XMLHttpRequest;function gi(){X.abort()}X.onload=function(){var Fe={statusText:X.statusText,headers:Ht(X.getAllResponseHeaders()||"")};xe.url.indexOf("file://")===0&&(X.status<200||X.status>599)?Fe.status=200:Fe.status=X.status,Fe.url="responseURL"in X?X.responseURL:Fe.headers.get("X-Request-URL");var zr="response"in X?X.response:X.responseText;setTimeout(function(){_(new Qe(zr,Fe))},0)},X.onerror=function(){setTimeout(function(){ie(new TypeError("Network request failed"))},0)},X.ontimeout=function(){setTimeout(function(){ie(new TypeError("Network request timed out"))},0)},X.onabort=function(){setTimeout(function(){ie(new o.DOMException("Aborted","AbortError"))},0)};function Rn(Fe){try{return Fe===""&&i.location.href?i.location.href:Fe}catch{return Fe}}if(X.open(xe.method,Rn(xe.url),!0),xe.credentials==="include"?X.withCredentials=!0:xe.credentials==="omit"&&(X.withCredentials=!1),"responseType"in X&&(n.blob?X.responseType="blob":n.arrayBuffer&&(X.responseType="arraybuffer")),x&&typeof x.headers=="object"&&!(x.headers instanceof g||i.Headers&&x.headers instanceof i.Headers)){var is=[];Object.getOwnPropertyNames(x.headers).forEach(function(Fe){is.push(p(Fe)),X.setRequestHeader(Fe,u(x.headers[Fe]))}),xe.headers.forEach(function(Fe,zr){is.indexOf(zr)===-1&&X.setRequestHeader(zr,Fe)})}else xe.headers.forEach(function(Fe,zr){X.setRequestHeader(zr,Fe)});xe.signal&&(xe.signal.addEventListener("abort",gi),X.onreadystatechange=function(){X.readyState===4&&xe.signal.removeEventListener("abort",gi)}),X.send(typeof xe._bodyInit>"u"?null:xe._bodyInit)})}return De.polyfill=!0,i.fetch||(i.fetch=De,i.Headers=g,i.Request=Y,i.Response=Qe),o.Headers=g,o.Request=Y,o.Response=Qe,o.fetch=De,o}({})})(Pi);Pi.fetch.ponyfill=!0;delete Pi.fetch.polyfill;var Eo=Ti.fetch?Ti:Pi;wr=Eo.fetch;wr.default=Eo.fetch;wr.fetch=Eo.fetch;wr.Headers=Eo.Headers;wr.Request=Eo.Request;wr.Response=Eo.Response;mc.exports=wr});var Tr=Ur((jC,ip)=>{ip.exports=ftGlobals.litRepeat});var Tu=f(w());var po=f(I()),Mr=f(w());var hc=f(I()),oe=f(w());var ta=f(w());var Qo=f(Q()),pc=f(w());var il=f(I()),W=f(w());var hs=f(I()),we=f(w()),cs=we.FtCssVariableFactory.extend("--ft-ripple-color","",we.designSystemVariables.colorContent),O={color:cs,backgroundColor:we.FtCssVariableFactory.extend("--ft-ripple-background-color","",cs),opacityContentOnSurfacePressed:we.FtCssVariableFactory.external(we.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:we.FtCssVariableFactory.external(we.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:we.FtCssVariableFactory.external(we.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:we.FtCssVariableFactory.external(we.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:we.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},ds=we.FtCssVariableFactory.extend("--ft-ripple-color","",we.designSystemVariables.colorPrimary),ps={color:ds,backgroundColor:we.FtCssVariableFactory.extend("--ft-ripple-background-color","",ds)},us=we.FtCssVariableFactory.extend("--ft-ripple-color","",we.designSystemVariables.colorSecondary),fs={color:us,backgroundColor:we.FtCssVariableFactory.extend("--ft-ripple-background-color","",us)},gs=hs.css`
3
3
  :host {
4
4
  display: contents;
5
5
  }
@@ -1139,7 +1139,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
1139
1139
  `;var Kd=f(w()),Zd=f(Q());var rn=f(w());var yc=f(w());var gf=f(bc(),1);var xc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(xc||(xc={}));var vc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(vc||(vc={}));var Sc;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE"})(Sc||(Sc={}));var Oc;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE"})(Oc||(Oc={}));var Cc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Cc||(Cc={}));var wc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(wc||(wc={}));var Ec;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Ec||(Ec={}));var Ac;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Ac||(Ac={}));var Rc;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(Rc||(Rc={}));var Lc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Lc||(Lc={}));var Ic;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Ic||(Ic={}));var kc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(kc||(kc={}));var $c;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})($c||($c={}));var Tc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Tc||(Tc={}));var Pc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Pc||(Pc={}));var Nc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Nc||(Nc={}));var ra;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(ra||(ra={}));var _c;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(_c||(_c={}));var Bc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Bc||(Bc={}));var Dc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Dc||(Dc={}));var Fc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Fc||(Fc={}));var Mc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Mc||(Mc={}));var oa;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(oa||(oa={}));var $e;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})($e||($e={}));var qr;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(qr||(qr={}));var zc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(zc||(zc={}));var Uc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Uc||(Uc={}));var Hc;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Hc||(Hc={}));var hf={[$e.PERSONAL_BOOK_SHARE_USER]:[$e.PERSONAL_BOOK_USER],[$e.HTML_EXPORT_USER]:[$e.PERSONAL_BOOK_USER],[$e.PDF_EXPORT_USER]:[$e.PERSONAL_BOOK_USER],[$e.KHUB_ADMIN]:[$e.CONTENT_PUBLISHER],[$e.ADMIN]:[$e.KHUB_ADMIN,$e.USERS_ADMIN,$e.PORTAL_ADMIN],[$e.GENERATIVE_AI_EXPORT_USER]:[$e.GENERATIVE_AI_USER]};function Wc(t,e){return t===e||(hf[t]??[]).some(o=>Wc(o,e))}function Vc(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(i=>Wc(i,e))}var Gd=f(w());var ed=f(I()),Ue=f(Q()),Tt=f(w());var Gc=f(I());var jc=Gc.css`
1140
1140
  `;var Ni=f(w()),yf="ft-app-info",Yr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Yr.eventName="authentication-change";var mf={session:(t,e)=>{(0,Ni.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>T.dispatchEvent(new Yr(e.payload)),0))}},T=Ni.FtReduxStore.get({name:yf,reducers:mf,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var ia=f(w());var Xr=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:i}=T.getState(),n=e??i;if(o&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,n,!0)}static await(e){return new Promise(o=>{let i=t.get(e);if(i)o(i);else{let n=T.subscribe(()=>{i=t.get(e),i&&(n(),o(i))})}})}};var _i=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Xr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Xr.await()}};var Ot=class extends _i{constructor(e=!0,o){var i;super(o),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[p])=>c.localeCompare(p)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new ia.CacheRegistry,this.cache=e?n.commonCache:new ia.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((o,i)=>0|31*o+i.charCodeAt(0),0))}};var Bi=class extends Ot{async listMyBookmarks(){let e=T.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var na=class{addCommand(e,o=!1){T.commands.add(e,o)}consumeCommand(e){return T.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new na;var qt=f(w());var Kc,bf=Symbol("clearAfterUnitTest"),Di=class extends Ot{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Kc]=()=>{this.defaultMessages={},this.cache=new qt.CacheRegistry,this.listeners={}},this.currentUiLocale=T.getState().uiLocale,T.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=T.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var i;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...o};(0,qt.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,i;return this.fetchContext(e),(i=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,o){let i=e.toLowerCase();return this.resolveContext(i)[o]}resolveMessage(e,o,...i){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new qt.ParametrizedLabelResolver((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(o,...i)}async fetchContext(e){let o=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),o&&await this.notify(e)}catch(n){!(n instanceof qt.CanceledPromiseError)&&o&&console.error(n)}return i}subscribe(e,o){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(o),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,qt.delay)(0).then(()=>o()).catch(()=>null)))}};Kc=bf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Di{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Di{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Ao=window.FluidTopicsI18nService,Fi=window.FluidTopicsCustomI18nService;var Zc=f(w()),aa=class{highlightHtml(e,o,i){(0,Zc.highlightHtml)(e,o,i)}};window.FluidTopicsHighlightHtmlService=new aa;var Mi=class extends Ot{async listMySearches(){let{session:e}=T.getState();return Vc(e,$e.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var qc=f(w());var sa=class{isDate(e){var o,i,n,a;return(a=(n=((i=(o=T.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]).find(c=>c.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,o){var i,n,a;return qc.DateFormatter.format(e,(i=o?.locale)!==null&&i!==void 0?i:T.getState().uiLocale,(n=o?.longFormat)!==null&&n!==void 0?n:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new sa;var Yc=f(w());var pr=class{static get(e,o){var i,n,a,s;let c=T.getState(),{lang:p,region:u}=(n=(i=c.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Yc.SearchPlaceConverter(c.baseUrl,(s=(a=window.FluidTopicsClientConfiguration)===null||a===void 0?void 0:a.predefinedSorts)!==null&&s!==void 0?s:{},e??20,c.searchInAllLanguagesAllowed,o??`${p}-${u}`)}};var la=class{urlToSearchRequest(e){return pr.get().parse(e)}searchRequestToUrl(e){return pr.get().serialize(e)}};window.FluidTopicsUrlService=new la;var Er=f(w());var Qr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Qr.eventName="change";var ca=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},Xc=new ca;var zi=class t extends Er.WithEventBus{static build(){return new t(window.history,Xc,()=>window.location,!1)}constructor(e,o,i,n){var a,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,o=!1){let i=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Er.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Qr(this.currentItem())),0)}installProxies(){let e=o=>(i,n,[a,s,c])=>{let p=o(),u={...p===this.currentIndex?this.currentState:void 0,...a,index:p,href:typeof c=="string"?c:(c??this.windowLocation()).href};i.apply(n,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e){var o;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(Qr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Qr.eventName,e)}currentItem(){return(0,Er.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Er.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Er.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!i)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,i);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,o){var i;if(!this.hasState(e))return!1;let n=o??this.currentState.majorStateId,a=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return a==null||a!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=zi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var Qc=T;function Jc(t,e){var o;return Qc.getState().authenticationRequired&&!(!((o=Qc.getState().session)===null||o===void 0)&&o.sessionAuthenticated)?Promise.resolve(e):t()}var Te=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},de=class extends Tt.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Xr.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Tt.CacheRegistry,this.cleanSessionDebouncer=new Tt.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return ed.html`
1141
1141
  <slot></slot>
1142
- `}connectedCallback(){super.connectedCallback(),T.addEventListener(Yr.eventName,this.reloadConfiguration)}disconnectedCallback(){T.addEventListener(Yr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var o,i,n,a,s,c,p;super.update(e),e.has("baseUrl")&&(T.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&T.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&T.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&T.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&T.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&T.actions.noCustom(this.noCustom),e.has("editorMode")&&T.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&T.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&T.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>Ao.addContext(u)),e.has("openExternalDocumentInNewTab")&&T.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&T.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&T.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(T.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),T.actions.availableUiLocales((n=(i=this.localesConfiguration)===null||i===void 0?void 0:i.availableUiLocales)!==null&&n!==void 0?n:[]),T.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&T.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&T.actions.availableContentLocales((p=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&p!==void 0?p:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Jc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};de.elementDefinitions={};de.styles=jc;Te([(0,Ue.property)()],de.prototype,"baseUrl",void 0);Te([(0,Ue.property)()],de.prototype,"apiIntegrationIdentifier",void 0);Te([(0,Ue.property)()],de.prototype,"apiIntegrationAppVersion",void 0);Te([(0,Ue.property)()],de.prototype,"uiLocale",void 0);Te([(0,Tt.jsonProperty)(null)],de.prototype,"availableUiLocales",void 0);Te([(0,Tt.jsonProperty)(null)],de.prototype,"metadataConfiguration",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"editorMode",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"noCustom",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"openExternalDocumentInNewTab",void 0);Te([(0,Ue.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],de.prototype,"noCustomComponent",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"withManualResources",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"navigatorOnline",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"forcedOffline",void 0);Te([(0,Ue.property)({type:Object})],de.prototype,"apiProvider",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"authenticationRequired",void 0);Te([(0,Tt.jsonProperty)([])],de.prototype,"messageContexts",void 0);Te([(0,Tt.jsonProperty)(void 0)],de.prototype,"session",void 0);Te([(0,Ue.state)()],de.prototype,"localesConfiguration",void 0);Te([(0,Ue.state)()],de.prototype,"availableContentLocales",void 0);var ah=f(Q());function xf(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,i,n;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(i=o;i--!==0;)if(!Ui(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Ui(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(n=a(t),o=n.length,o!==a(e).length)return!1;for(i=o;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=o;i--!==0;){let s=n[i];if(!Ui(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Ui(t,e){try{return xf(t,e)}catch{return!1}}function Hi(t,e){return!Ui(t,e)}var vf=f(Q(),1);var Wi=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(i=>i.type===e);return o&&(this.queue=this.queue.filter(i=>i!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var Ro=f(Q(),1);var td=f(Q(),1);function rd(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,td.property)({type:Object,converter:{fromAttribute:i=>{if(i==null)return o();try{return JSON.parse(i)}catch{return o()}},toAttribute:i=>JSON.stringify(i)},hasChanged:Hi,...e??{}})}var Vi=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,i)=>{this.resolvePromise=o,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of i)try{await s()}catch(c){n(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var id=f(I(),1);var Gi=globalThis,Sf=Gi.ShadowRoot&&(Gi.ShadyCSS===void 0||Gi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mS=Symbol();var od=(t,e)=>{if(Sf)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let i=document.createElement("style"),n=Gi.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=o.cssText,t.appendChild(i)}};var ji=class extends id.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([n,a])=>e.registry.define(n,a)));let o={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(o);return od(i,e.elementStyles),i}};function nd(t,e,...o){var i;let n=t.querySelector(e);for(let a of o)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(a);return n}var ei=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},cd,ad=Symbol("constructorPrototype"),sd=Symbol("constructorName"),dd=Symbol("exportpartsDebouncer"),ld=Symbol("dynamicDependenciesLoaded"),ur=class extends ji{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[cd]=new Vi(5),this[sd]=this.constructor.name,this[ad]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[sd]&&Object.setPrototypeOf(this,this[ad])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[ld]||(e[ld]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let a=[...n??[],i];o=nd(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,i,n;if(((i=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&i!==void 0&&i)&&this[dd].run(()=>{var n,a;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,i,n,a,s,c;let p=b=>b!=null&&b.trim().length>0,u=e.filter(p).map(b=>b.trim());if(u.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let b of(i=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let S=(a=(n=b.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&a!==void 0?a:[],v=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(E=>E.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(p).map(E=>E.trim()).forEach(E=>y.add(E))}if(y.size===0){this.removeAttribute("exportparts");return}let g=[...y.values()].flatMap(b=>u.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...g].join(", "))}};cd=dd;ei([(0,Ro.property)()],ur.prototype,"exportpartsPrefix",void 0);ei([rd([])],ur.prototype,"exportpartsPrefixes",void 0);ei([(0,Ro.property)()],ur.prototype,"customStylesheet",void 0);ei([(0,Ro.property)()],ur.prototype,"elementToFocus",void 0);ei([(0,Ro.state)()],ur.prototype,"useAdoptedStyleSheets",void 0);function Ki(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ti=Symbol("internalReduxEventsUnsubscribers"),Ar=Symbol("internalStoresUnsubscribers"),Jr=Symbol("internalStores");function Of(t){var e,o,i;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[o]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Jr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Jr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Jr].get(s)}addStore(s,c){var p;c=(p=c??s.name)!==null&&p!==void 0?p:"default-store",this.unsubscribeFromStore(c),this[Jr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Jr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Jr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let p=this.constructor.getPropertyOptions(c);if(!p?.attribute||!this.hasAttribute(typeof p?.attribute=="string"?p.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[Ar].has(s.store):this[Ar].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var p;this[Ar].set(s,c.subscribe(()=>this.updateFromStores())),this[ti].set(s,[]),Ki(c)&&c.eventBus&&((p=this.reduxConstructor.reduxEventListeners)===null||p===void 0||p.forEach((u,y)=>{if(typeof this[y]=="function"&&(!u.store||c.name===u.store)){let g=b=>this[y](b);c.addEventListener(u.eventName,g),this[ti].get(s).push(()=>c.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ar].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Ar].has(s)&&this[Ar].get(s)(),this[Ar].delete(s),(c=this[ti].get(s))===null||c===void 0||c.forEach(p=>p()),this[ti].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Ar,o=Jr,i=ti,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}var pd=class extends Of(ur){};function Ct(t){for(var e=arguments.length,o=Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];if(0)var n,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function fr(t){return!!t&&!!t[ye]}function Pt(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var i=Object.getPrototypeOf(o);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===kf}(t)||Array.isArray(t)||!!t[bd]||!!(!((e=t.constructor)===null||e===void 0)&&e[bd])||ba(t)||xa(t))}function eo(t,e,o){o===void 0&&(o=!1),ko(t)===0?(o?Object.keys:Io)(t).forEach(function(i){o&&typeof i=="symbol"||e(i,t[i],t)}):t.forEach(function(i,n){return e(n,i,t)})}function ko(t){var e=t[ye];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ba(t)?2:xa(t)?3:0}function Lo(t,e){return ko(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Cf(t,e){return ko(t)===2?t.get(e):t[e]}function xd(t,e,o){var i=ko(t);i===2?t.set(e,o):i===3?t.add(o):t[e]=o}function vd(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ba(t){return Lf&&t instanceof Map}function xa(t){return If&&t instanceof Set}function Rr(t){return t.o||t.t}function va(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Cd(t);delete e[ye];for(var o=Io(e),i=0;i<o.length;i++){var n=o[i],a=e[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function Sa(t,e){return e===void 0&&(e=!1),Oa(t)||fr(t)||!Pt(t)||(ko(t)>1&&(t.set=t.add=t.clear=t.delete=wf),Object.freeze(t),e&&eo(t,function(o,i){return Sa(i,!0)},!0)),t}function wf(){Ct(2)}function Oa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Yt(t){var e=ma[t];return e||Ct(18,t),e}function Ef(t,e){ma[t]||(ma[t]=e)}function ha(){return oi}function da(t,e){e&&(Yt("Patches"),t.u=[],t.s=[],t.v=e)}function Zi(t){ga(t),t.p.forEach(Af),t.p=null}function ga(t){t===oi&&(oi=t.l)}function ud(t){return oi={p:[],l:oi,h:t,m:!0,_:0}}function Af(t){var e=t[ye];e.i===0||e.i===1?e.j():e.g=!0}function pa(t,e){e._=e.p.length;var o=e.p[0],i=t!==void 0&&t!==o;return e.h.O||Yt("ES5").S(e,t,i),i?(o[ye].P&&(Zi(e),Ct(4)),Pt(t)&&(t=qi(e,t),e.l||Yi(e,t)),e.u&&Yt("Patches").M(o[ye].t,t,e.u,e.s)):t=qi(e,o,[]),Zi(e),e.u&&e.v(e.u,e.s),t!==Od?t:void 0}function qi(t,e,o){if(Oa(e))return e;var i=e[ye];if(!i)return eo(e,function(c,p){return fd(t,i,e,c,p,o)},!0),e;if(i.A!==t)return e;if(!i.P)return Yi(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=va(i.k):i.o,a=n,s=!1;i.i===3&&(a=new Set(n),n.clear(),s=!0),eo(a,function(c,p){return fd(t,i,n,c,p,o,s)}),Yi(t,n,!1),o&&t.u&&Yt("Patches").N(i,o,t.u,t.s)}return i.o}function fd(t,e,o,i,n,a,s){if(fr(n)){var c=qi(t,n,a&&e&&e.i!==3&&!Lo(e.R,i)?a.concat(i):void 0);if(xd(o,i,c),!fr(c))return;t.m=!1}else s&&o.add(n);if(Pt(n)&&!Oa(n)){if(!t.h.D&&t._<1)return;qi(t,n),e&&e.A.l||Yi(t,n)}}function Yi(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&Sa(e,o)}function ua(t,e){var o=t[ye];return(o?Rr(o):t)[e]}function hd(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var i=Object.getOwnPropertyDescriptor(o,e);if(i)return i;o=Object.getPrototypeOf(o)}}function Lr(t){t.P||(t.P=!0,t.l&&Lr(t.l))}function fa(t){t.o||(t.o=va(t.t))}function ya(t,e,o){var i=ba(e)?Yt("MapSet").F(e,o):xa(e)?Yt("MapSet").T(e,o):t.O?function(n,a){var s=Array.isArray(n),c={i:s?1:0,A:a?a.A:ha(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},p=c,u=ii;s&&(p=[c],u=ri);var y=Proxy.revocable(p,u),g=y.revoke,b=y.proxy;return c.k=b,c.j=g,b}(e,o):Yt("ES5").J(e,o);return(o?o.A:ha()).p.push(i),i}function Rf(t){return fr(t)||Ct(22,t),function e(o){if(!Pt(o))return o;var i,n=o[ye],a=ko(o);if(n){if(!n.P&&(n.i<4||!Yt("ES5").K(n)))return n.t;n.I=!0,i=gd(o,a),n.I=!1}else i=gd(o,a);return eo(i,function(s,c){n&&Cf(n.t,s)===c||xd(i,s,e(c))}),a===3?new Set(i):i}(t)}function gd(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return va(t)}function Sd(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[ye];return ii.get(u,s)},set:function(u){var y=this[ye];ii.set(y,s,u)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][ye];if(!p.P)switch(p.i){case 5:i(p)&&Lr(p);break;case 4:o(p)&&Lr(p)}}}function o(s){for(var c=s.t,p=s.k,u=Io(p),y=u.length-1;y>=0;y--){var g=u[y];if(g!==ye){var b=c[g];if(b===void 0&&!Lo(c,g))return!0;var S=p[g],v=S&&S[ye];if(v?v.t!==b:!vd(S,b))return!0}}var E=!!c[ye];return u.length!==Io(c).length+(E?0:1)}function i(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function n(s){s.g&&Ct(3,JSON.stringify(Rr(s)))}var a={};Ef("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(g,b){if(g){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var E=Cd(b);delete E[ye];for(var P=Io(E),k=0;k<P.length;k++){var $=P[k];E[$]=t($,g||!!E[$].enumerable)}return Object.create(Object.getPrototypeOf(b),E)}(p,s),y={i:p?5:4,A:c?c.A:ha(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ye,{value:y,writable:!0}),u},S:function(s,c,p){p?fr(c)&&c[ye].A===s&&e(s.p):(s.u&&function u(y){if(y&&typeof y=="object"){var g=y[ye];if(g){var b=g.t,S=g.k,v=g.R,E=g.i;if(E===4)eo(S,function(q){q!==ye&&(b[q]!==void 0||Lo(b,q)?v[q]||u(S[q]):(v[q]=!0,Lr(g)))}),eo(b,function(q){S[q]!==void 0||Lo(S,q)||(v[q]=!1,Lr(g))});else if(E===5){if(i(g)&&(Lr(g),v.length=!0),S.length<b.length)for(var P=S.length;P<b.length;P++)v[P]=!1;else for(var k=b.length;k<S.length;k++)v[k]=!0;for(var $=Math.min(S.length,b.length),z=0;z<$;z++)S.hasOwnProperty(z)||(v[z]=!0),v[z]===void 0&&u(S[z])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):i(s)}})}var yd,oi,Ca=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Lf=typeof Map<"u",If=typeof Set<"u",md=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Od=Ca?Symbol.for("immer-nothing"):((yd={})["immer-nothing"]=!0,yd),bd=Ca?Symbol.for("immer-draftable"):"__$immer_draftable",ye=Ca?Symbol.for("immer-state"):"__$immer_state";var kf=""+Object.prototype.constructor,Io=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Cd=Object.getOwnPropertyDescriptors||function(t){var e={};return Io(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},ma={},ii={get:function(t,e){if(e===ye)return t;var o=Rr(t);if(!Lo(o,e))return function(n,a,s){var c,p=hd(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(n.k):void 0}(t,o,e);var i=o[e];return t.I||!Pt(i)?i:i===ua(t.t,e)?(fa(t),t.o[e]=ya(t.A.h,i,t)):i},has:function(t,e){return e in Rr(t)},ownKeys:function(t){return Reflect.ownKeys(Rr(t))},set:function(t,e,o){var i=hd(Rr(t),e);if(i?.set)return i.set.call(t.k,o),!0;if(!t.P){var n=ua(Rr(t),e),a=n?.[ye];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(vd(o,n)&&(o!==void 0||Lo(t.t,e)))return!0;fa(t),Lr(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return ua(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,fa(t),Lr(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Rr(t),i=Reflect.getOwnPropertyDescriptor(o,e);return i&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:i.enumerable,value:o[e]}},defineProperty:function(){Ct(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ct(12)}},ri={};eo(ii,function(t,e){ri[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ri.deleteProperty=function(t,e){return ri.set.call(this,t,e,void 0)},ri.set=function(t,e,o){return ii.set.call(this,t[0],e,o,t[0])};var $f=function(){function t(o){var i=this;this.O=md,this.D=!0,this.produce=function(n,a,s){if(typeof n=="function"&&typeof a!="function"){var c=a;a=n;var p=i;return function(E){var P=this;E===void 0&&(E=c);for(var k=arguments.length,$=Array(k>1?k-1:0),z=1;z<k;z++)$[z-1]=arguments[z];return p.produce(E,function(q){var Y;return(Y=a).call.apply(Y,[P,q].concat($))})}}var u;if(typeof a!="function"&&Ct(6),s!==void 0&&typeof s!="function"&&Ct(7),Pt(n)){var y=ud(i),g=ya(i,n,void 0),b=!0;try{u=a(g),b=!1}finally{b?Zi(y):ga(y)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(E){return da(y,s),pa(E,y)},function(E){throw Zi(y),E}):(da(y,s),pa(u,y))}if(!n||typeof n!="object"){if((u=a(n))===void 0&&(u=n),u===Od&&(u=void 0),i.D&&Sa(u,!0),s){var S=[],v=[];Yt("Patches").M(n,u,S,v),s(S,v)}return u}Ct(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(u){for(var y=arguments.length,g=Array(y>1?y-1:0),b=1;b<y;b++)g[b-1]=arguments[b];return i.produceWithPatches(u,function(S){return n.apply(void 0,[S].concat(g))})};var s,c,p=i.produce(n,a,function(u,y){s=u,c=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){Pt(o)||Ct(8),fr(o)&&(o=Rf(o));var i=ud(this),n=ya(this,o,void 0);return n[ye].C=!0,ga(i),n},e.finishDraft=function(o,i){var n=o&&o[ye],a=n.A;return da(a,i),pa(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!md&&Ct(20),this.O=o},e.applyPatches=function(o,i){var n;for(n=i.length-1;n>=0;n--){var a=i[n];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}n>-1&&(i=i.slice(n+1));var s=Yt("Patches").$;return fr(o)?s(o,i):this.produce(o,function(c){return s(c,i)})},t}(),gt=new $f,Tf=gt.produce,$S=gt.produceWithPatches.bind(gt),TS=gt.setAutoFreeze.bind(gt),PS=gt.setUseProxies.bind(gt),NS=gt.applyPatches.bind(gt),_S=gt.createDraft.bind(gt),BS=gt.finishDraft.bind(gt),Xi=Tf;function to(t){"@babel/helpers - typeof";return to=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},to(t)}function wd(t,e){if(to(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var i=o.call(t,e||"default");if(to(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ed(t){var e=wd(t,"string");return to(e)=="symbol"?e:e+""}function Ad(t,e,o){return(e=Ed(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Rd(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),o.push.apply(o,i)}return o}function wa(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Rd(Object(o),!0).forEach(function(i){Ad(t,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Rd(Object(o)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(o,i))})}return t}function je(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 Ld=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ea=function(){return Math.random().toString(36).substring(7).split("").join(".")},Qi={INIT:"@@redux/INIT"+Ea(),REPLACE:"@@redux/REPLACE"+Ea(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ea()}};function Pf(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Aa(t,e,o){var i;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(je(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(je(1));return o(Aa)(t,e)}if(typeof t!="function")throw new Error(je(2));var n=t,a=e,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function y(){if(p)throw new Error(je(3));return a}function g(E){if(typeof E!="function")throw new Error(je(4));if(p)throw new Error(je(5));var P=!0;return u(),c.push(E),function(){if(P){if(p)throw new Error(je(6));P=!1,u();var $=c.indexOf(E);c.splice($,1),s=null}}}function b(E){if(!Pf(E))throw new Error(je(7));if(typeof E.type>"u")throw new Error(je(8));if(p)throw new Error(je(9));try{p=!0,a=n(a,E)}finally{p=!1}for(var P=s=c,k=0;k<P.length;k++){var $=P[k];$()}return E}function S(E){if(typeof E!="function")throw new Error(je(10));n=E,b({type:Qi.REPLACE})}function v(){var E,P=g;return E={subscribe:function($){if(typeof $!="object"||$===null)throw new Error(je(11));function z(){$.next&&$.next(y())}z();var q=P(z);return{unsubscribe:q}}},E[Ld]=function(){return this},E}return b({type:Qi.INIT}),i={dispatch:b,subscribe:g,getState:y,replaceReducer:S},i[Ld]=v,i}function Nf(t){Object.keys(t).forEach(function(e){var o=t[e],i=o(void 0,{type:Qi.INIT});if(typeof i>"u")throw new Error(je(12));if(typeof o(void 0,{type:Qi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(je(13))})}function Id(t){for(var e=Object.keys(t),o={},i=0;i<e.length;i++){var n=e[i];typeof t[n]=="function"&&(o[n]=t[n])}var a=Object.keys(o),s,c;try{Nf(o)}catch(p){c=p}return function(u,y){if(u===void 0&&(u={}),c)throw c;if(0)var g;for(var b=!1,S={},v=0;v<a.length;v++){var E=a[v],P=o[E],k=u[E],$=P(k,y);if(typeof $>"u"){var z=y&&y.type;throw new Error(je(14))}S[E]=$,b=b||$!==k}return b=b||a.length!==Object.keys(u).length,b?S:u}}function $o(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(i){return i}:e.length===1?e[0]:e.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function kd(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(i){return function(){var n=i.apply(void 0,arguments),a=function(){throw new Error(je(15))},s={getState:n.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=$o.apply(void 0,c)(n.dispatch),wa(wa({},n),{},{dispatch:a})}}}function $d(t){var e=function(i){var n=i.dispatch,a=i.getState;return function(s){return function(c){return typeof c=="function"?c(n,a,t):s(c)}}};return e}var Td=$d();Td.withExtraArgument=$d;var Ra=Td;var Dd=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(i[a]=n[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function i(){this.constructor=e}e.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)}}(),_f=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(y){return p([u,y])}}function p(u){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(a=u[0]&2?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(y){u=[6,y],n=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},To=function(t,e){for(var o=0,i=e.length,n=t.length;o<i;o++,n++)t[n]=e[o];return t},Bf=Object.defineProperty,Df=Object.defineProperties,Ff=Object.getOwnPropertyDescriptors,Pd=Object.getOwnPropertySymbols,Mf=Object.prototype.hasOwnProperty,zf=Object.prototype.propertyIsEnumerable,Nd=function(t,e,o){return e in t?Bf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Ir=function(t,e){for(var o in e||(e={}))Mf.call(e,o)&&Nd(t,o,e[o]);if(Pd)for(var i=0,n=Pd(e);i<n.length;i++){var o=n[i];zf.call(e,o)&&Nd(t,o,e[o])}return t},La=function(t,e){return Df(t,Ff(e))},Uf=function(t,e,o){return new Promise(function(i,n){var a=function(p){try{c(o.next(p))}catch(u){n(u)}},s=function(p){try{c(o.throw(p))}catch(u){n(u)}},c=function(p){return p.done?i(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var Hf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$o:$o.apply(null,arguments)},eO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Wf(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var Vf=function(t){Dd(e,t);function e(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var n=t.apply(this,o)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,To([void 0],o[0].concat(this)))):new(e.bind.apply(e,To([void 0],o.concat(this))))},e}(Array),Gf=function(t){Dd(e,t);function e(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var n=t.apply(this,o)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,To([void 0],o[0].concat(this)))):new(e.bind.apply(e,To([void 0],o.concat(this))))},e}(Array);function $a(t){return Pt(t)?Xi(t,function(){}):t}function jf(t){return typeof t=="boolean"}function Kf(){return function(e){return Zf(e)}}function Zf(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,i=t.immutableCheck,n=i===void 0?!0:i,a=t.serializableCheck,s=a===void 0?!0:a,c=new Vf;if(o&&(jf(o)?c.push(Ra):c.push(Ra.withExtraArgument(o.extraArgument))),0){if(n)var p;if(s)var u}return c}var Ia=!0;function Fd(t){var e=Kf(),o=t||{},i=o.reducer,n=i===void 0?void 0:i,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,y=u===void 0?void 0:u,g=o.enhancers,b=g===void 0?void 0:g,S;if(typeof n=="function")S=n;else if(Wf(n))S=Id(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(e),!Ia&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ia&&v.some(function(q){return typeof q!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=kd.apply(void 0,v),P=$o;p&&(P=Hf(Ir({trace:!Ia},typeof p=="object"&&p)));var k=new Gf(E),$=k;Array.isArray(b)?$=To([E],b):typeof b=="function"&&($=b(k));var z=P.apply(void 0,$);return Aa(S,y,z)}function kr(t,e){function o(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var a=e.apply(void 0,i);if(!a)throw new Error("prepareAction did not return an object");return Ir(Ir({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:i[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(i){return i.type===t},o}function Md(t){var e={},o=[],i,n={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,n},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),n},addDefaultCase:function(a){return i=a,n}};return t(n),[e,o,i]}function qf(t){return typeof t=="function"}function Yf(t,e,o,i){o===void 0&&(o=[]);var n=typeof e=="function"?Md(e):[e,o,i],a=n[0],s=n[1],c=n[2],p;if(qf(t))p=function(){return $a(t())};else{var u=$a(t);p=function(){return u}}function y(g,b){g===void 0&&(g=p());var S=To([a[b.type]],s.filter(function(v){var E=v.matcher;return E(b)}).map(function(v){var E=v.reducer;return E}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,E){if(E)if(fr(v)){var P=v,k=E(P,b);return k===void 0?v:k}else{if(Pt(v))return Xi(v,function($){return E($,b)});var k=E(v,b);if(k===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return v},g)}return y.getInitialState=p,y}function Xf(t,e){return t+"/"+e}function zd(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:$a(t.initialState),i=t.reducers||{},n=Object.keys(i),a={},s={},c={};n.forEach(function(y){var g=i[y],b=Xf(e,y),S,v;"reducer"in g?(S=g.reducer,v=g.prepare):S=g,a[y]=S,s[b]=S,c[y]=v?kr(b,v):kr(b)});function p(){var y=typeof t.extraReducers=="function"?Md(t.extraReducers):[t.extraReducers],g=y[0],b=g===void 0?{}:g,S=y[1],v=S===void 0?[]:S,E=y[2],P=E===void 0?void 0:E,k=Ir(Ir({},b),s);return Yf(o,function($){for(var z in k)$.addCase(z,k[z]);for(var q=0,Y=v;q<Y.length;q++){var it=Y[q];$.addMatcher(it.matcher,it.reducer)}P&&$.addDefaultCase(P)})}var u;return{name:e,reducer:function(y,g){return u||(u=p()),u(y,g)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var Qf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Jf=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Qf[Math.random()*64|0];return e},eh=["name","message","stack","code"],ka=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),_d=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),th=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,i=eh;o<i.length;o++){var n=i[o];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},iO=function(){function t(e,o,i){var n=kr(e+"/fulfilled",function(y,g,b,S){return{payload:y,meta:La(Ir({},S||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),a=kr(e+"/pending",function(y,g,b){return{payload:void 0,meta:La(Ir({},b||{}),{arg:g,requestId:y,requestStatus:"pending"})}}),s=kr(e+"/rejected",function(y,g,b,S,v){return{payload:S,error:(i&&i.serializeError||th)(y||"Rejected"),meta:La(Ir({},v||{}),{arg:b,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function u(y){return function(g,b,S){var v=i?.idGenerator?i.idGenerator(y):Jf(),E=new p,P,k=!1;function $(q){P=q,E.abort()}var z=function(){return Uf(this,null,function(){var q,Y,it,Ht,Qe,Wt,De;return _f(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),Ht=(q=i?.condition)==null?void 0:q.call(i,y,{getState:b,extra:S}),oh(Ht)?[4,Ht]:[3,2];case 1:Ht=m.sent(),m.label=2;case 2:if(Ht===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,Qe=new Promise(function(x,_){return E.signal.addEventListener("abort",function(){return _({name:"AbortError",message:P||"Aborted"})})}),g(a(v,y,(Y=i?.getPendingMeta)==null?void 0:Y.call(i,{requestId:v,arg:y},{getState:b,extra:S}))),[4,Promise.race([Qe,Promise.resolve(o(y,{dispatch:g,getState:b,extra:S,requestId:v,signal:E.signal,abort:$,rejectWithValue:function(x,_){return new ka(x,_)},fulfillWithValue:function(x,_){return new _d(x,_)}})).then(function(x){if(x instanceof ka)throw x;return x instanceof _d?n(x.payload,v,y,x.meta):n(x,v,y)})])];case 3:return it=m.sent(),[3,5];case 4:return Wt=m.sent(),it=Wt instanceof ka?s(null,v,y,Wt.payload,Wt.meta):s(Wt,v,y),[3,5];case 5:return De=i&&!i.dispatchConditionRejection&&s.match(it)&&it.meta.condition,De||g(it),[2,it]}})})}();return Object.assign(z,{abort:$,requestId:v,arg:y,unwrap:function(){return z.then(rh)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t}();function rh(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function oh(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ud="listener",Hd="completed",Wd="cancelled",nO="task-"+Wd,aO="task-"+Hd,sO=Ud+"-"+Wd,lO=Ud+"-"+Hd;var Ta="listenerMiddleware";var cO=kr(Ta+"/add"),dO=kr(Ta+"/removeAll"),pO=kr(Ta+"/remove");var Bd,uO=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Bd||(Bd=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},ih=function(t){return function(e){setTimeout(e,t)}},fO=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ih(10);Sd();function nh(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,i,n){this.eventBus.addEventListener(o,i,n)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,i,n){this.eventBus.removeEventListener(o,i,n)}}}var Ji=class extends nh(Object){};window.ftReduxStores||(window.ftReduxStores={});var Vd=class t extends Ji{static get(e){var o;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,a=window.ftReduxStores[i];if(Ki(a))return a;if(n==null)return;let s=zd({...n,reducers:(o=n.reducers)!==null&&o!==void 0?o:{}}),c=Fd({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[n.name]=new t(s,c,n.eventBus)}constructor(e,o,i){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Wi;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let p=s,u=a[p];return u?(...y)=>{let g=u(...y.map(n));return this.reduxStore.dispatch(g),g}:y=>{this.setState({[p]:n(y)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var tn=f(w());var en=class extends Ot{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=T.getState().session;return!!e?.sessionAuthenticated}};var sh="ft-user-assets",lh={setAssetCount:(t,e)=>{let{userAssetType:o,count:i}=e.payload.assetCount;t.assetCounts.allAsset[o]=i},clearAssetCount:t=>{Object.values(qr).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let o=e.payload.mapId;t.assetCounts.bookmarkByMap[o]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}}},wt=tn.FtReduxStore.get({name:sh,reducers:lh,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(qr).map(t=>[t,void 0])),bookmarkByMap:{}}}}),Pa=class{constructor(e=new en){this.assetCountsService=e,this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bi,this.savedSearchesService=new Mi,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=T.getState();(0,tn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts())}clearUserAssetCounts(){wt.actions.clearAssetCount(),wt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),wt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),wt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();wt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async loadAssetCount(e){let o=await this.assetCountsService.getUserAssetCount(e);o&&wt.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(e){let o=await this.assetCountsService.getUserBookmarkCountByMap(e);o&&wt.actions.setBookmarkCountByMap({count:o.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let o=Object.keys(wt.getState().assetCounts.bookmarkByMap).length!==0;e===qr.BOOKMARKS&&o&&wt.actions.clearBookmarkCountByMap(),wt.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;wt.actions.bookmarks(o)}}},ch=new Pa;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ch);(0,Gd.customElement)("ft-app-context")(de);var Na=class t extends Event{constructor(){super(t.eventName)}};Na.eventName="search-context-clear-all-filters";var dh=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Ba=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},jd=Symbol("registerInterval"),_a=Symbol("registerAttempts"),ph=40;function uh(t){class e extends t{setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[_a]=0,this[jd]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[_a]>ph?window.clearInterval(this[jd]):(this[_a]++,this.dispatchEvent(new Ba))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return dh([(0,Zd.state)()],e.prototype,"stateManager",void 0),e}var on=class extends uh(Kd.FtLitElementRedux){};var op=f(w());var cn=f(I()),dn=f(Q()),pn=f(w());var qd=f(I());var Yd=qd.css`
1142
+ `}connectedCallback(){super.connectedCallback(),T.addEventListener(Yr.eventName,this.reloadConfiguration)}disconnectedCallback(){T.addEventListener(Yr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var o,i,n,a,s,c,p;super.update(e),e.has("baseUrl")&&(T.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&T.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&T.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&T.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&T.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&T.actions.noCustom(this.noCustom),e.has("editorMode")&&T.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&T.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&T.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>Ao.addContext(u)),e.has("openExternalDocumentInNewTab")&&T.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&T.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&T.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(T.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),T.actions.availableUiLocales((n=(i=this.localesConfiguration)===null||i===void 0?void 0:i.availableUiLocales)!==null&&n!==void 0?n:[]),T.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&T.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&T.actions.availableContentLocales((p=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&p!==void 0?p:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Jc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};de.elementDefinitions={};de.styles=jc;Te([(0,Ue.property)()],de.prototype,"baseUrl",void 0);Te([(0,Ue.property)()],de.prototype,"apiIntegrationIdentifier",void 0);Te([(0,Ue.property)()],de.prototype,"apiIntegrationAppVersion",void 0);Te([(0,Ue.property)()],de.prototype,"uiLocale",void 0);Te([(0,Tt.jsonProperty)(null)],de.prototype,"availableUiLocales",void 0);Te([(0,Tt.jsonProperty)(null)],de.prototype,"metadataConfiguration",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"editorMode",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"noCustom",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"openExternalDocumentInNewTab",void 0);Te([(0,Ue.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],de.prototype,"noCustomComponent",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"withManualResources",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"navigatorOnline",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"forcedOffline",void 0);Te([(0,Ue.property)({type:Object})],de.prototype,"apiProvider",void 0);Te([(0,Ue.property)({type:Boolean})],de.prototype,"authenticationRequired",void 0);Te([(0,Tt.jsonProperty)([])],de.prototype,"messageContexts",void 0);Te([(0,Tt.jsonProperty)(void 0)],de.prototype,"session",void 0);Te([(0,Ue.state)()],de.prototype,"localesConfiguration",void 0);Te([(0,Ue.state)()],de.prototype,"availableContentLocales",void 0);var ah=f(Q());function xf(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,i,n;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(i=o;i--!==0;)if(!Ui(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Ui(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(n=a(t),o=n.length,o!==a(e).length)return!1;for(i=o;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=o;i--!==0;){let s=n[i];if(!Ui(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Ui(t,e){try{return xf(t,e)}catch{return!1}}function Hi(t,e){return!Ui(t,e)}var vf=f(Q(),1);var Wi=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(i=>i.type===e);return o&&(this.queue=this.queue.filter(i=>i!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var Ro=f(Q(),1);var td=f(Q(),1);function rd(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,td.property)({type:Object,converter:{fromAttribute:i=>{if(i==null)return o();try{return JSON.parse(i)}catch{return o()}},toAttribute:i=>JSON.stringify(i)},hasChanged:Hi,...e??{}})}var Vi=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,i)=>{this.resolvePromise=o,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of i)try{await s()}catch(c){n(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var id=f(I(),1);var Gi=globalThis,Sf=Gi.ShadowRoot&&(Gi.ShadyCSS===void 0||Gi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vS=Symbol();var od=(t,e)=>{if(Sf)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let i=document.createElement("style"),n=Gi.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=o.cssText,t.appendChild(i)}};var ji=class extends id.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([n,a])=>e.registry.define(n,a)));let o={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(o);return od(i,e.elementStyles),i}};function nd(t,e,...o){var i;let n=t.querySelector(e);for(let a of o)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(a);return n}var ei=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},cd,ad=Symbol("constructorPrototype"),sd=Symbol("constructorName"),dd=Symbol("exportpartsDebouncer"),ld=Symbol("dynamicDependenciesLoaded"),ur=class extends ji{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[cd]=new Vi(5),this[sd]=this.constructor.name,this[ad]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[sd]&&Object.setPrototypeOf(this,this[ad])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[ld]||(e[ld]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let a=[...n??[],i];o=nd(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,i,n;if(((i=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&i!==void 0&&i)&&this[dd].run(()=>{var n,a;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,i,n,a,s,c;let p=b=>b!=null&&b.trim().length>0,u=e.filter(p).map(b=>b.trim());if(u.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let b of(i=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let S=(a=(n=b.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&a!==void 0?a:[],v=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(E=>E.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(p).map(E=>E.trim()).forEach(E=>y.add(E))}if(y.size===0){this.removeAttribute("exportparts");return}let g=[...y.values()].flatMap(b=>u.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...g].join(", "))}};cd=dd;ei([(0,Ro.property)()],ur.prototype,"exportpartsPrefix",void 0);ei([rd([])],ur.prototype,"exportpartsPrefixes",void 0);ei([(0,Ro.property)()],ur.prototype,"customStylesheet",void 0);ei([(0,Ro.property)()],ur.prototype,"elementToFocus",void 0);ei([(0,Ro.state)()],ur.prototype,"useAdoptedStyleSheets",void 0);function Ki(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ti=Symbol("internalReduxEventsUnsubscribers"),Ar=Symbol("internalStoresUnsubscribers"),Jr=Symbol("internalStores");function Of(t){var e,o,i;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[o]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Jr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Jr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Jr].get(s)}addStore(s,c){var p;c=(p=c??s.name)!==null&&p!==void 0?p:"default-store",this.unsubscribeFromStore(c),this[Jr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Jr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Jr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let p=this.constructor.getPropertyOptions(c);if(!p?.attribute||!this.hasAttribute(typeof p?.attribute=="string"?p.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[Ar].has(s.store):this[Ar].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var p;this[Ar].set(s,c.subscribe(()=>this.updateFromStores())),this[ti].set(s,[]),Ki(c)&&c.eventBus&&((p=this.reduxConstructor.reduxEventListeners)===null||p===void 0||p.forEach((u,y)=>{if(typeof this[y]=="function"&&(!u.store||c.name===u.store)){let g=b=>this[y](b);c.addEventListener(u.eventName,g),this[ti].get(s).push(()=>c.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ar].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Ar].has(s)&&this[Ar].get(s)(),this[Ar].delete(s),(c=this[ti].get(s))===null||c===void 0||c.forEach(p=>p()),this[ti].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Ar,o=Jr,i=ti,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}var pd=class extends Of(ur){};function Ct(t){for(var e=arguments.length,o=Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];if(0)var n,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function fr(t){return!!t&&!!t[ye]}function Pt(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var i=Object.getPrototypeOf(o);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===kf}(t)||Array.isArray(t)||!!t[bd]||!!(!((e=t.constructor)===null||e===void 0)&&e[bd])||ba(t)||xa(t))}function eo(t,e,o){o===void 0&&(o=!1),ko(t)===0?(o?Object.keys:Io)(t).forEach(function(i){o&&typeof i=="symbol"||e(i,t[i],t)}):t.forEach(function(i,n){return e(n,i,t)})}function ko(t){var e=t[ye];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ba(t)?2:xa(t)?3:0}function Lo(t,e){return ko(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Cf(t,e){return ko(t)===2?t.get(e):t[e]}function xd(t,e,o){var i=ko(t);i===2?t.set(e,o):i===3?t.add(o):t[e]=o}function vd(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ba(t){return Lf&&t instanceof Map}function xa(t){return If&&t instanceof Set}function Rr(t){return t.o||t.t}function va(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Cd(t);delete e[ye];for(var o=Io(e),i=0;i<o.length;i++){var n=o[i],a=e[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function Sa(t,e){return e===void 0&&(e=!1),Oa(t)||fr(t)||!Pt(t)||(ko(t)>1&&(t.set=t.add=t.clear=t.delete=wf),Object.freeze(t),e&&eo(t,function(o,i){return Sa(i,!0)},!0)),t}function wf(){Ct(2)}function Oa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Yt(t){var e=ma[t];return e||Ct(18,t),e}function Ef(t,e){ma[t]||(ma[t]=e)}function ha(){return oi}function da(t,e){e&&(Yt("Patches"),t.u=[],t.s=[],t.v=e)}function Zi(t){ga(t),t.p.forEach(Af),t.p=null}function ga(t){t===oi&&(oi=t.l)}function ud(t){return oi={p:[],l:oi,h:t,m:!0,_:0}}function Af(t){var e=t[ye];e.i===0||e.i===1?e.j():e.g=!0}function pa(t,e){e._=e.p.length;var o=e.p[0],i=t!==void 0&&t!==o;return e.h.O||Yt("ES5").S(e,t,i),i?(o[ye].P&&(Zi(e),Ct(4)),Pt(t)&&(t=qi(e,t),e.l||Yi(e,t)),e.u&&Yt("Patches").M(o[ye].t,t,e.u,e.s)):t=qi(e,o,[]),Zi(e),e.u&&e.v(e.u,e.s),t!==Od?t:void 0}function qi(t,e,o){if(Oa(e))return e;var i=e[ye];if(!i)return eo(e,function(c,p){return fd(t,i,e,c,p,o)},!0),e;if(i.A!==t)return e;if(!i.P)return Yi(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=va(i.k):i.o,a=n,s=!1;i.i===3&&(a=new Set(n),n.clear(),s=!0),eo(a,function(c,p){return fd(t,i,n,c,p,o,s)}),Yi(t,n,!1),o&&t.u&&Yt("Patches").N(i,o,t.u,t.s)}return i.o}function fd(t,e,o,i,n,a,s){if(fr(n)){var c=qi(t,n,a&&e&&e.i!==3&&!Lo(e.R,i)?a.concat(i):void 0);if(xd(o,i,c),!fr(c))return;t.m=!1}else s&&o.add(n);if(Pt(n)&&!Oa(n)){if(!t.h.D&&t._<1)return;qi(t,n),e&&e.A.l||Yi(t,n)}}function Yi(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&Sa(e,o)}function ua(t,e){var o=t[ye];return(o?Rr(o):t)[e]}function hd(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var i=Object.getOwnPropertyDescriptor(o,e);if(i)return i;o=Object.getPrototypeOf(o)}}function Lr(t){t.P||(t.P=!0,t.l&&Lr(t.l))}function fa(t){t.o||(t.o=va(t.t))}function ya(t,e,o){var i=ba(e)?Yt("MapSet").F(e,o):xa(e)?Yt("MapSet").T(e,o):t.O?function(n,a){var s=Array.isArray(n),c={i:s?1:0,A:a?a.A:ha(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},p=c,u=ii;s&&(p=[c],u=ri);var y=Proxy.revocable(p,u),g=y.revoke,b=y.proxy;return c.k=b,c.j=g,b}(e,o):Yt("ES5").J(e,o);return(o?o.A:ha()).p.push(i),i}function Rf(t){return fr(t)||Ct(22,t),function e(o){if(!Pt(o))return o;var i,n=o[ye],a=ko(o);if(n){if(!n.P&&(n.i<4||!Yt("ES5").K(n)))return n.t;n.I=!0,i=gd(o,a),n.I=!1}else i=gd(o,a);return eo(i,function(s,c){n&&Cf(n.t,s)===c||xd(i,s,e(c))}),a===3?new Set(i):i}(t)}function gd(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return va(t)}function Sd(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[ye];return ii.get(u,s)},set:function(u){var y=this[ye];ii.set(y,s,u)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][ye];if(!p.P)switch(p.i){case 5:i(p)&&Lr(p);break;case 4:o(p)&&Lr(p)}}}function o(s){for(var c=s.t,p=s.k,u=Io(p),y=u.length-1;y>=0;y--){var g=u[y];if(g!==ye){var b=c[g];if(b===void 0&&!Lo(c,g))return!0;var S=p[g],v=S&&S[ye];if(v?v.t!==b:!vd(S,b))return!0}}var E=!!c[ye];return u.length!==Io(c).length+(E?0:1)}function i(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function n(s){s.g&&Ct(3,JSON.stringify(Rr(s)))}var a={};Ef("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(g,b){if(g){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var E=Cd(b);delete E[ye];for(var P=Io(E),k=0;k<P.length;k++){var $=P[k];E[$]=t($,g||!!E[$].enumerable)}return Object.create(Object.getPrototypeOf(b),E)}(p,s),y={i:p?5:4,A:c?c.A:ha(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ye,{value:y,writable:!0}),u},S:function(s,c,p){p?fr(c)&&c[ye].A===s&&e(s.p):(s.u&&function u(y){if(y&&typeof y=="object"){var g=y[ye];if(g){var b=g.t,S=g.k,v=g.R,E=g.i;if(E===4)eo(S,function(q){q!==ye&&(b[q]!==void 0||Lo(b,q)?v[q]||u(S[q]):(v[q]=!0,Lr(g)))}),eo(b,function(q){S[q]!==void 0||Lo(S,q)||(v[q]=!1,Lr(g))});else if(E===5){if(i(g)&&(Lr(g),v.length=!0),S.length<b.length)for(var P=S.length;P<b.length;P++)v[P]=!1;else for(var k=b.length;k<S.length;k++)v[k]=!0;for(var $=Math.min(S.length,b.length),z=0;z<$;z++)S.hasOwnProperty(z)||(v[z]=!0),v[z]===void 0&&u(S[z])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):i(s)}})}var yd,oi,Ca=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Lf=typeof Map<"u",If=typeof Set<"u",md=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Od=Ca?Symbol.for("immer-nothing"):((yd={})["immer-nothing"]=!0,yd),bd=Ca?Symbol.for("immer-draftable"):"__$immer_draftable",ye=Ca?Symbol.for("immer-state"):"__$immer_state";var kf=""+Object.prototype.constructor,Io=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Cd=Object.getOwnPropertyDescriptors||function(t){var e={};return Io(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},ma={},ii={get:function(t,e){if(e===ye)return t;var o=Rr(t);if(!Lo(o,e))return function(n,a,s){var c,p=hd(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(n.k):void 0}(t,o,e);var i=o[e];return t.I||!Pt(i)?i:i===ua(t.t,e)?(fa(t),t.o[e]=ya(t.A.h,i,t)):i},has:function(t,e){return e in Rr(t)},ownKeys:function(t){return Reflect.ownKeys(Rr(t))},set:function(t,e,o){var i=hd(Rr(t),e);if(i?.set)return i.set.call(t.k,o),!0;if(!t.P){var n=ua(Rr(t),e),a=n?.[ye];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(vd(o,n)&&(o!==void 0||Lo(t.t,e)))return!0;fa(t),Lr(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return ua(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,fa(t),Lr(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Rr(t),i=Reflect.getOwnPropertyDescriptor(o,e);return i&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:i.enumerable,value:o[e]}},defineProperty:function(){Ct(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ct(12)}},ri={};eo(ii,function(t,e){ri[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ri.deleteProperty=function(t,e){return ri.set.call(this,t,e,void 0)},ri.set=function(t,e,o){return ii.set.call(this,t[0],e,o,t[0])};var $f=function(){function t(o){var i=this;this.O=md,this.D=!0,this.produce=function(n,a,s){if(typeof n=="function"&&typeof a!="function"){var c=a;a=n;var p=i;return function(E){var P=this;E===void 0&&(E=c);for(var k=arguments.length,$=Array(k>1?k-1:0),z=1;z<k;z++)$[z-1]=arguments[z];return p.produce(E,function(q){var Y;return(Y=a).call.apply(Y,[P,q].concat($))})}}var u;if(typeof a!="function"&&Ct(6),s!==void 0&&typeof s!="function"&&Ct(7),Pt(n)){var y=ud(i),g=ya(i,n,void 0),b=!0;try{u=a(g),b=!1}finally{b?Zi(y):ga(y)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(E){return da(y,s),pa(E,y)},function(E){throw Zi(y),E}):(da(y,s),pa(u,y))}if(!n||typeof n!="object"){if((u=a(n))===void 0&&(u=n),u===Od&&(u=void 0),i.D&&Sa(u,!0),s){var S=[],v=[];Yt("Patches").M(n,u,S,v),s(S,v)}return u}Ct(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(u){for(var y=arguments.length,g=Array(y>1?y-1:0),b=1;b<y;b++)g[b-1]=arguments[b];return i.produceWithPatches(u,function(S){return n.apply(void 0,[S].concat(g))})};var s,c,p=i.produce(n,a,function(u,y){s=u,c=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){Pt(o)||Ct(8),fr(o)&&(o=Rf(o));var i=ud(this),n=ya(this,o,void 0);return n[ye].C=!0,ga(i),n},e.finishDraft=function(o,i){var n=o&&o[ye],a=n.A;return da(a,i),pa(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!md&&Ct(20),this.O=o},e.applyPatches=function(o,i){var n;for(n=i.length-1;n>=0;n--){var a=i[n];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}n>-1&&(i=i.slice(n+1));var s=Yt("Patches").$;return fr(o)?s(o,i):this.produce(o,function(c){return s(c,i)})},t}(),gt=new $f,Tf=gt.produce,NS=gt.produceWithPatches.bind(gt),_S=gt.setAutoFreeze.bind(gt),BS=gt.setUseProxies.bind(gt),DS=gt.applyPatches.bind(gt),FS=gt.createDraft.bind(gt),MS=gt.finishDraft.bind(gt),Xi=Tf;function to(t){"@babel/helpers - typeof";return to=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},to(t)}function wd(t,e){if(to(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var i=o.call(t,e||"default");if(to(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ed(t){var e=wd(t,"string");return to(e)=="symbol"?e:e+""}function Ad(t,e,o){return(e=Ed(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Rd(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),o.push.apply(o,i)}return o}function wa(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Rd(Object(o),!0).forEach(function(i){Ad(t,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Rd(Object(o)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(o,i))})}return t}function je(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 Ld=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ea=function(){return Math.random().toString(36).substring(7).split("").join(".")},Qi={INIT:"@@redux/INIT"+Ea(),REPLACE:"@@redux/REPLACE"+Ea(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ea()}};function Pf(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Aa(t,e,o){var i;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(je(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(je(1));return o(Aa)(t,e)}if(typeof t!="function")throw new Error(je(2));var n=t,a=e,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function y(){if(p)throw new Error(je(3));return a}function g(E){if(typeof E!="function")throw new Error(je(4));if(p)throw new Error(je(5));var P=!0;return u(),c.push(E),function(){if(P){if(p)throw new Error(je(6));P=!1,u();var $=c.indexOf(E);c.splice($,1),s=null}}}function b(E){if(!Pf(E))throw new Error(je(7));if(typeof E.type>"u")throw new Error(je(8));if(p)throw new Error(je(9));try{p=!0,a=n(a,E)}finally{p=!1}for(var P=s=c,k=0;k<P.length;k++){var $=P[k];$()}return E}function S(E){if(typeof E!="function")throw new Error(je(10));n=E,b({type:Qi.REPLACE})}function v(){var E,P=g;return E={subscribe:function($){if(typeof $!="object"||$===null)throw new Error(je(11));function z(){$.next&&$.next(y())}z();var q=P(z);return{unsubscribe:q}}},E[Ld]=function(){return this},E}return b({type:Qi.INIT}),i={dispatch:b,subscribe:g,getState:y,replaceReducer:S},i[Ld]=v,i}function Nf(t){Object.keys(t).forEach(function(e){var o=t[e],i=o(void 0,{type:Qi.INIT});if(typeof i>"u")throw new Error(je(12));if(typeof o(void 0,{type:Qi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(je(13))})}function Id(t){for(var e=Object.keys(t),o={},i=0;i<e.length;i++){var n=e[i];typeof t[n]=="function"&&(o[n]=t[n])}var a=Object.keys(o),s,c;try{Nf(o)}catch(p){c=p}return function(u,y){if(u===void 0&&(u={}),c)throw c;if(0)var g;for(var b=!1,S={},v=0;v<a.length;v++){var E=a[v],P=o[E],k=u[E],$=P(k,y);if(typeof $>"u"){var z=y&&y.type;throw new Error(je(14))}S[E]=$,b=b||$!==k}return b=b||a.length!==Object.keys(u).length,b?S:u}}function $o(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(i){return i}:e.length===1?e[0]:e.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function kd(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(i){return function(){var n=i.apply(void 0,arguments),a=function(){throw new Error(je(15))},s={getState:n.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=$o.apply(void 0,c)(n.dispatch),wa(wa({},n),{},{dispatch:a})}}}function $d(t){var e=function(i){var n=i.dispatch,a=i.getState;return function(s){return function(c){return typeof c=="function"?c(n,a,t):s(c)}}};return e}var Td=$d();Td.withExtraArgument=$d;var Ra=Td;var Dd=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(i[a]=n[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function i(){this.constructor=e}e.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)}}(),_f=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(y){return p([u,y])}}function p(u){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(a=u[0]&2?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(y){u=[6,y],n=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},To=function(t,e){for(var o=0,i=e.length,n=t.length;o<i;o++,n++)t[n]=e[o];return t},Bf=Object.defineProperty,Df=Object.defineProperties,Ff=Object.getOwnPropertyDescriptors,Pd=Object.getOwnPropertySymbols,Mf=Object.prototype.hasOwnProperty,zf=Object.prototype.propertyIsEnumerable,Nd=function(t,e,o){return e in t?Bf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Ir=function(t,e){for(var o in e||(e={}))Mf.call(e,o)&&Nd(t,o,e[o]);if(Pd)for(var i=0,n=Pd(e);i<n.length;i++){var o=n[i];zf.call(e,o)&&Nd(t,o,e[o])}return t},La=function(t,e){return Df(t,Ff(e))},Uf=function(t,e,o){return new Promise(function(i,n){var a=function(p){try{c(o.next(p))}catch(u){n(u)}},s=function(p){try{c(o.throw(p))}catch(u){n(u)}},c=function(p){return p.done?i(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var Hf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$o:$o.apply(null,arguments)},oO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Wf(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var Vf=function(t){Dd(e,t);function e(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var n=t.apply(this,o)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,To([void 0],o[0].concat(this)))):new(e.bind.apply(e,To([void 0],o.concat(this))))},e}(Array),Gf=function(t){Dd(e,t);function e(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var n=t.apply(this,o)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,To([void 0],o[0].concat(this)))):new(e.bind.apply(e,To([void 0],o.concat(this))))},e}(Array);function $a(t){return Pt(t)?Xi(t,function(){}):t}function jf(t){return typeof t=="boolean"}function Kf(){return function(e){return Zf(e)}}function Zf(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,i=t.immutableCheck,n=i===void 0?!0:i,a=t.serializableCheck,s=a===void 0?!0:a,c=new Vf;if(o&&(jf(o)?c.push(Ra):c.push(Ra.withExtraArgument(o.extraArgument))),0){if(n)var p;if(s)var u}return c}var Ia=!0;function Fd(t){var e=Kf(),o=t||{},i=o.reducer,n=i===void 0?void 0:i,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,y=u===void 0?void 0:u,g=o.enhancers,b=g===void 0?void 0:g,S;if(typeof n=="function")S=n;else if(Wf(n))S=Id(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(e),!Ia&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ia&&v.some(function(q){return typeof q!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=kd.apply(void 0,v),P=$o;p&&(P=Hf(Ir({trace:!Ia},typeof p=="object"&&p)));var k=new Gf(E),$=k;Array.isArray(b)?$=To([E],b):typeof b=="function"&&($=b(k));var z=P.apply(void 0,$);return Aa(S,y,z)}function kr(t,e){function o(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var a=e.apply(void 0,i);if(!a)throw new Error("prepareAction did not return an object");return Ir(Ir({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:i[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(i){return i.type===t},o}function Md(t){var e={},o=[],i,n={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,n},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),n},addDefaultCase:function(a){return i=a,n}};return t(n),[e,o,i]}function qf(t){return typeof t=="function"}function Yf(t,e,o,i){o===void 0&&(o=[]);var n=typeof e=="function"?Md(e):[e,o,i],a=n[0],s=n[1],c=n[2],p;if(qf(t))p=function(){return $a(t())};else{var u=$a(t);p=function(){return u}}function y(g,b){g===void 0&&(g=p());var S=To([a[b.type]],s.filter(function(v){var E=v.matcher;return E(b)}).map(function(v){var E=v.reducer;return E}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,E){if(E)if(fr(v)){var P=v,k=E(P,b);return k===void 0?v:k}else{if(Pt(v))return Xi(v,function($){return E($,b)});var k=E(v,b);if(k===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return v},g)}return y.getInitialState=p,y}function Xf(t,e){return t+"/"+e}function zd(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:$a(t.initialState),i=t.reducers||{},n=Object.keys(i),a={},s={},c={};n.forEach(function(y){var g=i[y],b=Xf(e,y),S,v;"reducer"in g?(S=g.reducer,v=g.prepare):S=g,a[y]=S,s[b]=S,c[y]=v?kr(b,v):kr(b)});function p(){var y=typeof t.extraReducers=="function"?Md(t.extraReducers):[t.extraReducers],g=y[0],b=g===void 0?{}:g,S=y[1],v=S===void 0?[]:S,E=y[2],P=E===void 0?void 0:E,k=Ir(Ir({},b),s);return Yf(o,function($){for(var z in k)$.addCase(z,k[z]);for(var q=0,Y=v;q<Y.length;q++){var it=Y[q];$.addMatcher(it.matcher,it.reducer)}P&&$.addDefaultCase(P)})}var u;return{name:e,reducer:function(y,g){return u||(u=p()),u(y,g)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var Qf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Jf=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Qf[Math.random()*64|0];return e},eh=["name","message","stack","code"],ka=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),_d=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),th=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,i=eh;o<i.length;o++){var n=i[o];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},sO=function(){function t(e,o,i){var n=kr(e+"/fulfilled",function(y,g,b,S){return{payload:y,meta:La(Ir({},S||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),a=kr(e+"/pending",function(y,g,b){return{payload:void 0,meta:La(Ir({},b||{}),{arg:g,requestId:y,requestStatus:"pending"})}}),s=kr(e+"/rejected",function(y,g,b,S,v){return{payload:S,error:(i&&i.serializeError||th)(y||"Rejected"),meta:La(Ir({},v||{}),{arg:b,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function u(y){return function(g,b,S){var v=i?.idGenerator?i.idGenerator(y):Jf(),E=new p,P,k=!1;function $(q){P=q,E.abort()}var z=function(){return Uf(this,null,function(){var q,Y,it,Ht,Qe,Wt,De;return _f(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),Ht=(q=i?.condition)==null?void 0:q.call(i,y,{getState:b,extra:S}),oh(Ht)?[4,Ht]:[3,2];case 1:Ht=m.sent(),m.label=2;case 2:if(Ht===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,Qe=new Promise(function(x,_){return E.signal.addEventListener("abort",function(){return _({name:"AbortError",message:P||"Aborted"})})}),g(a(v,y,(Y=i?.getPendingMeta)==null?void 0:Y.call(i,{requestId:v,arg:y},{getState:b,extra:S}))),[4,Promise.race([Qe,Promise.resolve(o(y,{dispatch:g,getState:b,extra:S,requestId:v,signal:E.signal,abort:$,rejectWithValue:function(x,_){return new ka(x,_)},fulfillWithValue:function(x,_){return new _d(x,_)}})).then(function(x){if(x instanceof ka)throw x;return x instanceof _d?n(x.payload,v,y,x.meta):n(x,v,y)})])];case 3:return it=m.sent(),[3,5];case 4:return Wt=m.sent(),it=Wt instanceof ka?s(null,v,y,Wt.payload,Wt.meta):s(Wt,v,y),[3,5];case 5:return De=i&&!i.dispatchConditionRejection&&s.match(it)&&it.meta.condition,De||g(it),[2,it]}})})}();return Object.assign(z,{abort:$,requestId:v,arg:y,unwrap:function(){return z.then(rh)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t}();function rh(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function oh(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ud="listener",Hd="completed",Wd="cancelled",lO="task-"+Wd,cO="task-"+Hd,dO=Ud+"-"+Wd,pO=Ud+"-"+Hd;var Ta="listenerMiddleware";var uO=kr(Ta+"/add"),fO=kr(Ta+"/removeAll"),hO=kr(Ta+"/remove");var Bd,gO=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Bd||(Bd=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},ih=function(t){return function(e){setTimeout(e,t)}},yO=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ih(10);Sd();function nh(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,i,n){this.eventBus.addEventListener(o,i,n)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,i,n){this.eventBus.removeEventListener(o,i,n)}}}var Ji=class extends nh(Object){};window.ftReduxStores||(window.ftReduxStores={});var Vd=class t extends Ji{static get(e){var o;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,a=window.ftReduxStores[i];if(Ki(a))return a;if(n==null)return;let s=zd({...n,reducers:(o=n.reducers)!==null&&o!==void 0?o:{}}),c=Fd({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[n.name]=new t(s,c,n.eventBus)}constructor(e,o,i){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Wi;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let p=s,u=a[p];return u?(...y)=>{let g=u(...y.map(n));return this.reduxStore.dispatch(g),g}:y=>{this.setState({[p]:n(y)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var tn=f(w());var en=class extends Ot{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=T.getState().session;return!!e?.sessionAuthenticated}};var sh="ft-user-assets",lh={setAssetCount:(t,e)=>{let{userAssetType:o,count:i}=e.payload.assetCount;t.assetCounts.allAsset[o]=i},clearAssetCount:t=>{Object.values(qr).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let o=e.payload.mapId;t.assetCounts.bookmarkByMap[o]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}}},wt=tn.FtReduxStore.get({name:sh,reducers:lh,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(qr).map(t=>[t,void 0])),bookmarkByMap:{}}}}),Pa=class{constructor(e=new en){this.assetCountsService=e,this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bi,this.savedSearchesService=new Mi,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=T.getState();(0,tn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts())}clearUserAssetCounts(){wt.actions.clearAssetCount(),wt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),wt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),wt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();wt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async loadAssetCount(e){let o=await this.assetCountsService.getUserAssetCount(e);o&&wt.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(e){let o=await this.assetCountsService.getUserBookmarkCountByMap(e);o&&wt.actions.setBookmarkCountByMap({count:o.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let o=Object.keys(wt.getState().assetCounts.bookmarkByMap).length!==0;e===qr.BOOKMARKS&&o&&wt.actions.clearBookmarkCountByMap(),wt.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;wt.actions.bookmarks(o)}}},ch=new Pa;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ch);(0,Gd.customElement)("ft-app-context")(de);var Na=class t extends Event{constructor(){super(t.eventName)}};Na.eventName="search-context-clear-all-filters";var dh=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Ba=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},jd=Symbol("registerInterval"),_a=Symbol("registerAttempts"),ph=40;function uh(t){class e extends t{setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[_a]=0,this[jd]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[_a]>ph?window.clearInterval(this[jd]):(this[_a]++,this.dispatchEvent(new Ba))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return dh([(0,Zd.state)()],e.prototype,"stateManager",void 0),e}var on=class extends uh(Kd.FtLitElementRedux){};var op=f(w());var cn=f(I()),dn=f(Q()),pn=f(w());var qd=f(I());var Yd=qd.css`
1143
1143
  `;var sn=f(w());var tp=f(Q());var fh=f(w());function Xd(t){return t.match(/^[\w-]+\.[\w-]+$/)}var hh=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Qd=Symbol("i18nAttributes"),Jd=Symbol("i18nListAttributes"),rp=Symbol("i18nProperties"),nn=Symbol("i18nContexts"),ni=Symbol("i18nUnsubs");function ln(t){var e,o;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?Fi:Ao}i18n(a){var s;this.hasI18nContext(a.context)||this.addI18nContext(a.context,void 0,a.custom);let c=(s=a.args)!==null&&s!==void 0?s:a.argsProvider?a.argsProvider(this):[];return this.getI18nService(a.custom).resolveMessage(a.context,a.key,...c)}customI18n(a,s){if(Xd(a)){let[c,p]=a.split(".");return this.i18n({custom:!0,context:c,key:p,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,c,p)=>a.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,c,p)=>{var u;return((u=p?.context)===null||u===void 0?void 0:u.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,c;let p=this,u=(y,g,b)=>b?.context&&b.key&&a(y,g,b)?{...b,message:this.i18n({context:b.context,key:b.key,...y})}:b;(s=this[Qd])===null||s===void 0||s.forEach((y,g)=>p[g]=u(y,g,p[g])),(c=this[Jd])===null||c===void 0||c.forEach((y,g)=>{var b;return p[g]=(b=p[g])===null||b===void 0?void 0:b.map(S=>u(y,g,S))})}updateI18nProperties(a){var s;(s=this[rp])===null||s===void 0||s.forEach((c,p)=>{a(c,p)&&(this[p]=this.i18n(c))})}addI18nMessages(a,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,c)}addI18nContext(a,s,c){let p=(typeof a=="string"?a:a.name).toLowerCase();c=typeof a=="string"?c:a.custom,this[nn].set(p,{isCustomContext:c}),this[ni].has(p)||this[ni].set(p,this.getI18nService(c).subscribe(p,()=>this.onI18nUpdate(p))),this.getI18nService(c).prepareContext(p,s)}hasI18nContext(a){return this[nn].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[nn].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[ni].forEach(a=>a()),this[ni].clear()}}return e=nn,o=ni,hh([(0,tp.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}var ep=class extends ln(sn.FtLitElement){},an=class extends ln(sn.FtLitElementRedux){};var ai=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Nt=class extends an{constructor(){super(),this.editorMode=!1,this.addStore(T)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":cn.nothing:cn.html`
1144
1144
  <span class="ft-i18n">
1145
1145
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}