@fluid-topics/ft-reader-feedback 1.2.7 → 1.2.9
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
|
-
"use strict";(()=>{var Ld=Object.create;var ha=Object.defineProperty;var kd=Object.getOwnPropertyDescriptor;var Pd=Object.getOwnPropertyNames;var $d=Object.getPrototypeOf,Dd=Object.prototype.hasOwnProperty;var dr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Bd=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Pd(t))!Dd.call(e,n)&&n!==o&&ha(e,n,{get:()=>t[n],enumerable:!(i=kd(t,n))||i.enumerable});return e};var g=(e,t,o)=>(o=e!=null?Ld($d(e)):{},Bd(t||!e||!e.__esModule?ha(o,"default",{value:e,enumerable:!0}):o,e));var R=dr((du,ya)=>{ya.exports=ftGlobals.wcUtils});var B=dr((pu,ma)=>{ma.exports=ftGlobals.lit});var Z=dr((uu,ga)=>{ga.exports=ftGlobals.litDecorators});var Ne=dr((Gm,Us)=>{Us.exports=ftGlobals.litClassMap});var gc=dr((_g,mc)=>{mc.exports=ftGlobals.litUnsafeHTML});var Fc=dr((Yb,Mc)=>{Mc.exports=ftGlobals.litRepeat});var nd=dr((ar,id)=>{var wi=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,Ei=function(){function e(){this.fetch=!1,this.DOMException=wi.DOMException}return e.prototype=wi,new e}();(function(e){var t=function(o){var i=typeof e<"u"&&e||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(y){return y&&DataView.prototype.isPrototypeOf(y)}if(n.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(y){return y&&s.indexOf(Object.prototype.toString.call(y))>-1};function u(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(y)||y==="")throw new TypeError('Invalid character in header field name: "'+y+'"');return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function h(y){var v={next:function(){var k=y.shift();return{done:k===void 0,value:k}}};return n.iterable&&(v[Symbol.iterator]=function(){return v}),v}function m(y){this.map={},y instanceof m?y.forEach(function(v,k){this.append(k,v)},this):Array.isArray(y)?y.forEach(function(v){if(v.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+v.length);this.append(v[0],v[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(v){this.append(v,y[v])},this)}m.prototype.append=function(y,v){y=u(y),v=p(v);var k=this.map[y];this.map[y]=k?k+", "+v:v},m.prototype.delete=function(y){delete this.map[u(y)]},m.prototype.get=function(y){return y=u(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(u(y))},m.prototype.set=function(y,v){this.map[u(y)]=p(v)},m.prototype.forEach=function(y,v){for(var k in this.map)this.map.hasOwnProperty(k)&&y.call(v,this.map[k],k,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(v,k){y.push(k)}),h(y)},m.prototype.values=function(){var y=[];return this.forEach(function(v){y.push(v)}),h(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(v,k){y.push([k,v])}),h(y)},n.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function b(y){if(!y._noBody){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}}function x(y){return new Promise(function(v,k){y.onload=function(){v(y.result)},y.onerror=function(){k(y.error)}})}function S(y){var v=new FileReader,k=x(v);return v.readAsArrayBuffer(y),k}function O(y){var v=new FileReader,k=x(v),Y=/charset=([A-Za-z0-9_-]+)/.exec(y.type),
|
|
2
|
-
`)===0?Y.substr(1,Y.length):Y}).forEach(function(Y){var
|
|
1
|
+
"use strict";(()=>{var Ld=Object.create;var ha=Object.defineProperty;var kd=Object.getOwnPropertyDescriptor;var Pd=Object.getOwnPropertyNames;var $d=Object.getPrototypeOf,Dd=Object.prototype.hasOwnProperty;var dr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Bd=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Pd(t))!Dd.call(e,n)&&n!==o&&ha(e,n,{get:()=>t[n],enumerable:!(i=kd(t,n))||i.enumerable});return e};var g=(e,t,o)=>(o=e!=null?Ld($d(e)):{},Bd(t||!e||!e.__esModule?ha(o,"default",{value:e,enumerable:!0}):o,e));var R=dr((du,ya)=>{ya.exports=ftGlobals.wcUtils});var B=dr((pu,ma)=>{ma.exports=ftGlobals.lit});var Z=dr((uu,ga)=>{ga.exports=ftGlobals.litDecorators});var Ne=dr((Gm,Us)=>{Us.exports=ftGlobals.litClassMap});var gc=dr((_g,mc)=>{mc.exports=ftGlobals.litUnsafeHTML});var Fc=dr((Yb,Mc)=>{Mc.exports=ftGlobals.litRepeat});var nd=dr((ar,id)=>{var wi=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,Ei=function(){function e(){this.fetch=!1,this.DOMException=wi.DOMException}return e.prototype=wi,new e}();(function(e){var t=function(o){var i=typeof e<"u"&&e||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(y){return y&&DataView.prototype.isPrototypeOf(y)}if(n.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(y){return y&&s.indexOf(Object.prototype.toString.call(y))>-1};function u(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(y)||y==="")throw new TypeError('Invalid character in header field name: "'+y+'"');return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function h(y){var v={next:function(){var k=y.shift();return{done:k===void 0,value:k}}};return n.iterable&&(v[Symbol.iterator]=function(){return v}),v}function m(y){this.map={},y instanceof m?y.forEach(function(v,k){this.append(k,v)},this):Array.isArray(y)?y.forEach(function(v){if(v.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+v.length);this.append(v[0],v[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(v){this.append(v,y[v])},this)}m.prototype.append=function(y,v){y=u(y),v=p(v);var k=this.map[y];this.map[y]=k?k+", "+v:v},m.prototype.delete=function(y){delete this.map[u(y)]},m.prototype.get=function(y){return y=u(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(u(y))},m.prototype.set=function(y,v){this.map[u(y)]=p(v)},m.prototype.forEach=function(y,v){for(var k in this.map)this.map.hasOwnProperty(k)&&y.call(v,this.map[k],k,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(v,k){y.push(k)}),h(y)},m.prototype.values=function(){var y=[];return this.forEach(function(v){y.push(v)}),h(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(v,k){y.push([k,v])}),h(y)},n.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function b(y){if(!y._noBody){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}}function x(y){return new Promise(function(v,k){y.onload=function(){v(y.result)},y.onerror=function(){k(y.error)}})}function S(y){var v=new FileReader,k=x(v);return v.readAsArrayBuffer(y),k}function O(y){var v=new FileReader,k=x(v),Y=/charset=([A-Za-z0-9_-]+)/.exec(y.type),st=Y?Y[1]:"utf-8";return v.readAsText(y,st),k}function _(y){for(var v=new Uint8Array(y),k=new Array(v.length),Y=0;Y<v.length;Y++)k[Y]=String.fromCharCode(v[Y]);return k.join("")}function I(y){if(y.slice)return y.slice(0);var v=new Uint8Array(y.byteLength);return v.set(new Uint8Array(y)),v.buffer}function T(){return this.bodyUsed=!1,this._initBody=function(y){this.bodyUsed=this.bodyUsed,this._bodyInit=y,y?typeof y=="string"?this._bodyText=y:n.blob&&Blob.prototype.isPrototypeOf(y)?this._bodyBlob=y:n.formData&&FormData.prototype.isPrototypeOf(y)?this._bodyFormData=y:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this._bodyText=y.toString():n.arrayBuffer&&n.blob&&a(y)?(this._bodyArrayBuffer=I(y.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||l(y))?this._bodyArrayBuffer=I(y):this._bodyText=y=Object.prototype.toString.call(y):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof y=="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(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var y=b(this);if(y)return y;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 y=b(this);return y||(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(S);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var y=b(this);if(y)return y;if(this._bodyBlob)return O(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(_(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(Vt)}),this.json=function(){return this.text().then(JSON.parse)},this}var D=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function U(y){var v=y.toUpperCase();return D.indexOf(v)>-1?v:y}function z(y,v){if(!(this instanceof z))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');v=v||{};var k=v.body;if(y instanceof z){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,v.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!k&&y._bodyInit!=null&&(k=y._bodyInit,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=v.credentials||this.credentials||"same-origin",(v.headers||!this.headers)&&(this.headers=new m(v.headers)),this.method=U(v.method||this.method||"GET"),this.mode=v.mode||this.mode||null,this.signal=v.signal||this.signal||function(){if("AbortController"in i){var H=new AbortController;return H.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&k)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(k),(this.method==="GET"||this.method==="HEAD")&&(v.cache==="no-store"||v.cache==="no-cache")){var Y=/([?&])_=[^&]*/;if(Y.test(this.url))this.url=this.url.replace(Y,"$1_="+new Date().getTime());else{var st=/\?/;this.url+=(st.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}z.prototype.clone=function(){return new z(this,{body:this._bodyInit})};function Vt(y){var v=new FormData;return y.trim().split("&").forEach(function(k){if(k){var Y=k.split("="),st=Y.shift().replace(/\+/g," "),H=Y.join("=").replace(/\+/g," ");v.append(decodeURIComponent(st),decodeURIComponent(H))}}),v}function be(y){var v=new m,k=y.replace(/\r?\n[\t ]+/g," ");return k.split("\r").map(function(Y){return Y.indexOf(`
|
|
2
|
+
`)===0?Y.substr(1,Y.length):Y}).forEach(function(Y){var st=Y.split(":"),H=st.shift().trim();if(H){var Ao=st.join(":").trim();try{v.append(H,Ao)}catch(ji){console.warn("Response "+ji.message)}}}),v}T.call(z.prototype);function Ft(y,v){if(!(this instanceof Ft))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(v||(v={}),this.type="default",this.status=v.status===void 0?200:v.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=v.statusText===void 0?"":""+v.statusText,this.headers=new m(v.headers),this.url=v.url||"",this._initBody(y)}T.call(Ft.prototype),Ft.prototype.clone=function(){return new Ft(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},Ft.error=function(){var y=new Ft(null,{status:200,statusText:""});return y.ok=!1,y.status=0,y.type="error",y};var ve=[301,302,303,307,308];Ft.redirect=function(y,v){if(ve.indexOf(v)===-1)throw new RangeError("Invalid status code");return new Ft(null,{status:v,headers:{location:y}})},o.DOMException=i.DOMException;try{new o.DOMException}catch{o.DOMException=function(v,k){this.message=v,this.name=k;var Y=Error(v);this.stack=Y.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function At(y,v){return new Promise(function(k,Y){var st=new z(y,v);if(st.signal&&st.signal.aborted)return Y(new o.DOMException("Aborted","AbortError"));var H=new XMLHttpRequest;function Ao(){H.abort()}H.onload=function(){var Rt={statusText:H.statusText,headers:be(H.getAllResponseHeaders()||"")};st.url.indexOf("file://")===0&&(H.status<200||H.status>599)?Rt.status=200:Rt.status=H.status,Rt.url="responseURL"in H?H.responseURL:Rt.headers.get("X-Request-URL");var lr="response"in H?H.response:H.responseText;setTimeout(function(){k(new Ft(lr,Rt))},0)},H.onerror=function(){setTimeout(function(){Y(new TypeError("Network request failed"))},0)},H.ontimeout=function(){setTimeout(function(){Y(new TypeError("Network request timed out"))},0)},H.onabort=function(){setTimeout(function(){Y(new o.DOMException("Aborted","AbortError"))},0)};function ji(Rt){try{return Rt===""&&i.location.href?i.location.href:Rt}catch{return Rt}}if(H.open(st.method,ji(st.url),!0),st.credentials==="include"?H.withCredentials=!0:st.credentials==="omit"&&(H.withCredentials=!1),"responseType"in H&&(n.blob?H.responseType="blob":n.arrayBuffer&&(H.responseType="arraybuffer")),v&&typeof v.headers=="object"&&!(v.headers instanceof m||i.Headers&&v.headers instanceof i.Headers)){var fa=[];Object.getOwnPropertyNames(v.headers).forEach(function(Rt){fa.push(u(Rt)),H.setRequestHeader(Rt,p(v.headers[Rt]))}),st.headers.forEach(function(Rt,lr){fa.indexOf(lr)===-1&&H.setRequestHeader(lr,Rt)})}else st.headers.forEach(function(Rt,lr){H.setRequestHeader(lr,Rt)});st.signal&&(st.signal.addEventListener("abort",Ao),H.onreadystatechange=function(){H.readyState===4&&st.signal.removeEventListener("abort",Ao)}),H.send(typeof st._bodyInit>"u"?null:st._bodyInit)})}return At.polyfill=!0,i.fetch||(i.fetch=At,i.Headers=m,i.Request=z,i.Response=Ft),o.Headers=m,o.Request=z,o.Response=Ft,o.fetch=At,o}({})})(Ei);Ei.fetch.ponyfill=!0;delete Ei.fetch.polyfill;var Yr=wi.fetch?wi:Ei;ar=Yr.fetch;ar.default=Yr.fetch;ar.fetch=Yr.fetch;ar.Headers=Yr.Headers;ar.Request=Yr.Request;ar.Response=Yr.Response;id.exports=ar});var ua=g(R());var Nd=g(B()),Jt=g(Z()),Bt=g(R());var ba=g(R()),va=g(Z());var oe;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(oe||(oe={}));var Md=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},Zi=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Ki=Symbol("registerInterval");function Fd(e){var t;class o extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var n;return(n=this.stateManager)===null||n===void 0?void 0:n.service}connectedCallback(){super.connectedCallback(),this[Ki]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Ki]):this.dispatchEvent(new Zi)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=Ki,Md([(0,va.state)()],o.prototype,"stateManager",void 0),o}var Fe=class extends Fd(ba.FtLitElementRedux){};var yt=g(B()),mt=g(Z()),Hi=g(R());var bs=g(B()),J=g(R());var ms=g(B()),M=g(R());var Ea=g(B()),gt=g(R()),xa=gt.FtCssVariableFactory.extend("--ft-ripple-color","",gt.designSystemVariables.colorContent),w={color:xa,backgroundColor:gt.FtCssVariableFactory.extend("--ft-ripple-background-color","",xa),opacityContentOnSurfacePressed:gt.FtCssVariableFactory.external(gt.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:gt.FtCssVariableFactory.external(gt.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:gt.FtCssVariableFactory.external(gt.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:gt.FtCssVariableFactory.external(gt.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:gt.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Sa=gt.FtCssVariableFactory.extend("--ft-ripple-color","",gt.designSystemVariables.colorPrimary),Oa={color:Sa,backgroundColor:gt.FtCssVariableFactory.extend("--ft-ripple-background-color","",Sa)},Ca=gt.FtCssVariableFactory.extend("--ft-ripple-color","",gt.designSystemVariables.colorSecondary),wa={color:Ca,backgroundColor:gt.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ca)},Aa=Ea.css`
|
|
3
3
|
:host {
|
|
4
4
|
display: contents;
|
|
5
5
|
}
|
|
@@ -594,12 +594,12 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
594
594
|
</div>
|
|
595
595
|
</div>
|
|
596
596
|
</div>
|
|
597
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(o=>t.has(o))&&this.visible&&this.positionTooltip()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(o=>o.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Uo(this.slottedElement,this.tooltip,this.position).then(({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)})),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout(()=>window.addEventListener("touchstart",t=>{t.composedPath().includes(this.container)||this.onOut()},{once:!0}),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}};ot.elementDefinitions={"ft-typography":ft};ot.styles=Gs;Kt([(0,St.property)()],ot.prototype,"text",void 0);Kt([(0,St.property)({type:Boolean})],ot.prototype,"manual",void 0);Kt([(0,St.property)({type:Boolean})],ot.prototype,"inline",void 0);Kt([(0,St.property)({type:Number})],ot.prototype,"delay",void 0);Kt([(0,St.property)()],ot.prototype,"position",void 0);Kt([(0,St.queryAssignedNodes)()],ot.prototype,"slotNodes",void 0);Kt([(0,St.query)(".ft-tooltip--container")],ot.prototype,"container",void 0);Kt([(0,St.query)(".ft-tooltip")],ot.prototype,"tooltip",void 0);Kt([(0,St.query)(".ft-tooltip--content")],ot.prototype,"tooltipContent",void 0);Kt([(0,St.state)()],ot.prototype,"visible",void 0);Kt([(0,St.eventOptions)({passive:!0})],ot.prototype,"onTouch",null);Kt([(0,St.eventOptions)({passive:!0})],ot.prototype,"onHover",null);Kt([(0,St.eventOptions)({passive:!0})],ot.prototype,"onOut",null);Kt([(0,St.eventOptions)({passive:!0})],ot.prototype,"onClick",null);(0,yc.customElement)("ft-tooltip")(ot);var xc=g(R());var uo=g(B()),gr=g(Z()),bc=g(R()),vc=g(gc());var mr;(function(e){e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.BOOKS="",e.MENU="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.HOME="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.EXPORT="",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.USER="",e.EXTLINK="",e.CALENDAR="",e.OFFLINE="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.STAR_PLAIN="",e.TOPICS="",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.CLOSE="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN="",e.ADMIN_KHUB="",e.ADMIN_THEME="",e.ADMIN_USERS="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.INFO="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.FACET_HAS_DESCENDANT="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.THIN_ARROW="",e.SIGN_IN="",e.LOGOUT="",e.TRANSLATE="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.ARTICLE="",e.COLUMNS="",e.ANALYTICS="",e.COLLECTIONS="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.SEARCH_IN_PUBLICATION="",e.COPY_TO_CLIPBOARD="",e.SHARED_PBK="",e.ATTACHMENTS="",e.STRIPE_ARROW_LEFT="",e.STRIPE_ARROW_RIGHT="",e.FILTERS="",e.DOT="",e.MINUS="",e.PLUS="",e.MAILS_AND_NOTIFICATIONS="",e.SAVE="",e.LOCKER="",e.ADMIN_INTEGRATION="",e.SYNC="",e.TAG="",e.BOOK_PLAIN="",e.UPLOAD="",e.ONLINE="",e.TAG_PLAIN="",e.ACCOUNT_SETTINGS="",e.PRINT="",e.DEFAULT_ROLES="",e.SHORTCUT_MENU="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.PAUSE="",e.PLAY="",e.ADMIN_PORTAL="",e.STAR="",e.THUMBS_DOWN="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_UP="",e.THUMBS_UP_PLAIN="",e.FEEDBACK_PLAIN="",e.RATE_PLAIN="",e.RATE="",e.OFFLINE_SETTINGS="",e.MY_COLLECTIONS="",e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.RESET="",e.MY_LIBRARY="",e.UNSTRUCTURED_DOC="",e.CONTEXTUAL="",e.THIN_ARROW_UP="",e.ARROW_RIGHT_TO_LINE="",e.DESKTOP="",e.TABLET_LANDSCAPE="",e.TABLET_PORTRAIT="",e.MOBILE_LANDSCAPE="",e.MOBILE_PORTRAIT="",e.DIAGRAM_SUNBURST="",e.DIAGRAM_SANKEY="",e.COMMENT_QUESTION="",e.COMMENT_QUESTION_PLAIN="",e.MESSAGE_BOT="",e.CHART_SIMPLE="",e.BARS_PROGRESS="",e.BOOK_OPEN_GEAR="",e.BOOK_OPEN_GEAR_SLASH="",e.LINE_CHART="",e.STACKED_CHART="",e.CHART_BAR_STACKED="",e.CHART_BAR_GROUPED="",e.EYE_SLASH="",e.X_MARK="",e.EXPAND_WIDE="",e.PIP="",e.PIP_WIDE="",e.LIFE_RING="",e.GLOBE="",e.PIGGY_BANK="",e.EXTLINK_LIGHT="",e.CLONE="",e.CLONE_LINK_SIMPLE="",e.CHART_BAR_NORMALIZED="",e.CONSUMER="",e.OCTAGON_XMARK="",e.HOURGLASS_HALF="",e.CLOCK="",e.CLOCK_THREE="",e.CALENDAR_DAY="",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="",e.WAND_MAGIC_SPARKLES="",e.PAPER_PLANE="",e.CIRCLE_STOP="",e.ARROW_ROTATE_RIGHT="",e.ARROWS_ROTATE="",e.ALIGN_RIGHT="",e.FORMAT_CLEAR="",e.ALIGN_CENTER="",e.ALIGN_LEFT="",e.PALETTE="",e.BOLD="",e.ITALIC="",e.UNDERLINE="",e.STRIKETHROUGH="",e.LINK_SIMPLE_SLASH="",e.LINK_SIMPLE="",e.ROUTE="",e.CIRCLE_USER_SLASH="",e.CIRCLE_USER_CHECK="",e.LIST_MAGNIFYING_GLASS="",e.MEDAL="",e.THUMBS_UP_THUMBS_DOWN_SOLID="",e.ARROW_TURN_DOWN_RIGHT="",e.FLASK="",e.LOCK_KEYHOLE_OPEN_SOLID="",e.HOURGLASS_END="",e.CIRCLE_QUESTION="",e.EYE="",e.SHARE="󨃱",e.GRIP_LINES_SOLID="",e.TRANSLATE_SPARKLE_SOLID="",e.CODE=""})(mr||(mr={}));var E;(function(e){e.UNKNOWN="",e.ABW="",e.AUDIO="",e.AVI="",e.CHM="",e.CODE="",e.CSV="",e.DITA="",e.EPUB="",e.EXCEL="",e.FLAC="",e.GIF="",e.GZIP="",e.HTML="",e.IMAGE="",e.JPEG="",e.JSON="",e.M4A="",e.MOV="",e.MP3="",e.MP4="",e.OGG="",e.PDF="",e.PNG="",e.POWERPOINT="",e.RAR="",e.STP="",e.TEXT="",e.VIDEO="",e.WAV="",e.WMA="",e.WORD="",e.XML="",e.YAML="",e.ZIP=""})(E||(E={}));var Lg=new Map([...["abw"].map(e=>[e,E.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,E.AUDIO]),...["avi"].map(e=>[e,E.AVI]),...["chm","xhs"].map(e=>[e,E.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,E.CODE]),...["csv"].map(e=>[e,E.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,E.DITA]),...["epub"].map(e=>[e,E.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,E.EXCEL]),...["flac"].map(e=>[e,E.FLAC]),...["gif"].map(e=>[e,E.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,E.GZIP]),...["html","htm","xhtml"].map(e=>[e,E.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,E.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,E.JPEG]),...["json"].map(e=>[e,E.JSON]),...["m4a","m4p"].map(e=>[e,E.M4A]),...["mov","qt"].map(e=>[e,E.MOV]),...["mp3"].map(e=>[e,E.MP3]),...["mp4","m4v"].map(e=>[e,E.MP4]),...["ogg","oga"].map(e=>[e,E.OGG]),...["pdf","ps"].map(e=>[e,E.PDF]),...["png"].map(e=>[e,E.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,E.POWERPOINT]),...["rar"].map(e=>[e,E.RAR]),...["stp"].map(e=>[e,E.STP]),...["txt","rtf","md","mdown"].map(e=>[e,E.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,E.VIDEO]),...["wav"].map(e=>[e,E.WAV]),...["wma"].map(e=>[e,E.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,E.WORD]),...["xml","xsl","rdf"].map(e=>[e,E.XML]),...["yaml","yml","x-yaml"].map(e=>[e,E.YAML]),...["zip"].map(e=>[e,E.ZIP])]);var kg={[E.ABW]:"#91ABC6",[E.AUDIO]:"#1795E3",[E.AVI]:"#E63324",[E.CHM]:"#71C3EB",[E.CODE]:"#71C3EB",[E.CSV]:"#1F7345",[E.DITA]:"#71C3EB",[E.EPUB]:"#85B926",[E.EXCEL]:"#1F7345",[E.FLAC]:"#1795E3",[E.GIF]:"#59B031",[E.GZIP]:"#F8AB36",[E.HTML]:"#71C3EB",[E.IMAGE]:"#59B031",[E.JPEG]:"#59B031",[E.JSON]:"#71C3EB",[E.M4A]:"#1795E3",[E.MOV]:"#E63324",[E.MP3]:"#1795E3",[E.MP4]:"#E63324",[E.OGG]:"#1795E3",[E.PDF]:"#E44948",[E.PNG]:"#59B031",[E.POWERPOINT]:"#B54A2B",[E.RAR]:"#F8AB36",[E.STP]:"#3764B1",[E.TEXT]:"#3162AB",[E.UNKNOWN]:"#999999",[E.VIDEO]:"#E63324",[E.WAV]:"#1795E3",[E.WMA]:"#1795E3",[E.WORD]:"#3162AB",[E.XML]:"#71C3EB",[E.YAML]:"#71C3EB",[E.ZIP]:"#F8AB36"};var Lt;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(Lt||(Lt={}));var Wo=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},vt=class extends bc.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=uo.nothing}render(){let t=this.variant&&Object.values(Lt).includes(this.variant)?this.variant:Lt.fluid_topics,o=t!==Lt.material||!!this.value;return uo.html`
|
|
597
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(o=>t.has(o))&&this.visible&&this.positionTooltip()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(o=>o.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Uo(this.slottedElement,this.tooltip,this.position).then(({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)})),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout(()=>window.addEventListener("touchstart",t=>{t.composedPath().includes(this.container)||this.onOut()},{once:!0}),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}};ot.elementDefinitions={"ft-typography":ft};ot.styles=Gs;Kt([(0,St.property)()],ot.prototype,"text",void 0);Kt([(0,St.property)({type:Boolean})],ot.prototype,"manual",void 0);Kt([(0,St.property)({type:Boolean})],ot.prototype,"inline",void 0);Kt([(0,St.property)({type:Number})],ot.prototype,"delay",void 0);Kt([(0,St.property)()],ot.prototype,"position",void 0);Kt([(0,St.queryAssignedNodes)()],ot.prototype,"slotNodes",void 0);Kt([(0,St.query)(".ft-tooltip--container")],ot.prototype,"container",void 0);Kt([(0,St.query)(".ft-tooltip")],ot.prototype,"tooltip",void 0);Kt([(0,St.query)(".ft-tooltip--content")],ot.prototype,"tooltipContent",void 0);Kt([(0,St.state)()],ot.prototype,"visible",void 0);Kt([(0,St.eventOptions)({passive:!0})],ot.prototype,"onTouch",null);Kt([(0,St.eventOptions)({passive:!0})],ot.prototype,"onHover",null);Kt([(0,St.eventOptions)({passive:!0})],ot.prototype,"onOut",null);Kt([(0,St.eventOptions)({passive:!0})],ot.prototype,"onClick",null);(0,yc.customElement)("ft-tooltip")(ot);var xc=g(R());var uo=g(B()),gr=g(Z()),bc=g(R()),vc=g(gc());var mr;(function(e){e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.BOOKS="",e.MENU="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.HOME="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.EXPORT="",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.USER="",e.EXTLINK="",e.CALENDAR="",e.OFFLINE="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.STAR_PLAIN="",e.TOPICS="",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.CLOSE="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN="",e.ADMIN_KHUB="",e.ADMIN_THEME="",e.ADMIN_USERS="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.INFO="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.FACET_HAS_DESCENDANT="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.THIN_ARROW="",e.SIGN_IN="",e.LOGOUT="",e.TRANSLATE="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.ARTICLE="",e.COLUMNS="",e.ANALYTICS="",e.COLLECTIONS="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.SEARCH_IN_PUBLICATION="",e.COPY_TO_CLIPBOARD="",e.SHARED_PBK="",e.ATTACHMENTS="",e.STRIPE_ARROW_LEFT="",e.STRIPE_ARROW_RIGHT="",e.FILTERS="",e.DOT="",e.MINUS="",e.PLUS="",e.MAILS_AND_NOTIFICATIONS="",e.SAVE="",e.LOCKER="",e.ADMIN_INTEGRATION="",e.SYNC="",e.TAG="",e.BOOK_PLAIN="",e.UPLOAD="",e.ONLINE="",e.TAG_PLAIN="",e.ACCOUNT_SETTINGS="",e.PRINT="",e.DEFAULT_ROLES="",e.SHORTCUT_MENU="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.PAUSE="",e.PLAY="",e.ADMIN_PORTAL="",e.STAR="",e.THUMBS_DOWN="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_UP="",e.THUMBS_UP_PLAIN="",e.FEEDBACK_PLAIN="",e.RATE_PLAIN="",e.RATE="",e.OFFLINE_SETTINGS="",e.MY_COLLECTIONS="",e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.RESET="",e.MY_LIBRARY="",e.UNSTRUCTURED_DOC="",e.CONTEXTUAL="",e.THIN_ARROW_UP="",e.ARROW_RIGHT_TO_LINE="",e.DESKTOP="",e.TABLET_LANDSCAPE="",e.TABLET_PORTRAIT="",e.MOBILE_LANDSCAPE="",e.MOBILE_PORTRAIT="",e.DIAGRAM_SUNBURST="",e.DIAGRAM_SANKEY="",e.COMMENT_QUESTION="",e.COMMENT_QUESTION_PLAIN="",e.MESSAGE_BOT="",e.CHART_SIMPLE="",e.BARS_PROGRESS="",e.BOOK_OPEN_GEAR="",e.BOOK_OPEN_GEAR_SLASH="",e.LINE_CHART="",e.STACKED_CHART="",e.CHART_BAR_STACKED="",e.CHART_BAR_GROUPED="",e.EYE_SLASH="",e.X_MARK="",e.EXPAND_WIDE="",e.PIP="",e.PIP_WIDE="",e.LIFE_RING="",e.GLOBE="",e.PIGGY_BANK="",e.EXTLINK_LIGHT="",e.CLONE="",e.CLONE_LINK_SIMPLE="",e.CHART_BAR_NORMALIZED="",e.CONSUMER="",e.OCTAGON_XMARK="",e.HOURGLASS_HALF="",e.CLOCK="",e.CLOCK_THREE="",e.CALENDAR_DAY="",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="",e.WAND_MAGIC_SPARKLES="",e.PAPER_PLANE="",e.CIRCLE_STOP="",e.ARROW_ROTATE_RIGHT="",e.ARROWS_ROTATE="",e.ALIGN_RIGHT="",e.FORMAT_CLEAR="",e.ALIGN_CENTER="",e.ALIGN_LEFT="",e.PALETTE="",e.BOLD="",e.ITALIC="",e.UNDERLINE="",e.STRIKETHROUGH="",e.LINK_SIMPLE_SLASH="",e.LINK_SIMPLE="",e.ROUTE="",e.CIRCLE_USER_SLASH="",e.CIRCLE_USER_CHECK="",e.LIST_MAGNIFYING_GLASS="",e.MEDAL="",e.THUMBS_UP_THUMBS_DOWN_SOLID="",e.ARROW_TURN_DOWN_RIGHT="",e.FLASK="",e.LOCK_KEYHOLE_OPEN_SOLID="",e.HOURGLASS_END="",e.CIRCLE_QUESTION="",e.EYE="",e.SHARE="󨃱",e.GRIP_LINES_SOLID="",e.TRANSLATE_SPARKLE_SOLID="",e.CODE=""})(mr||(mr={}));var E;(function(e){e.UNKNOWN="",e.ABW="",e.AUDIO="",e.AVI="",e.CHM="",e.CODE="",e.CSV="",e.DITA="",e.EPUB="",e.EXCEL="",e.FLAC="",e.GIF="",e.GZIP="",e.HTML="",e.IMAGE="",e.JPEG="",e.JSON="",e.M4A="",e.MOV="",e.MP3="",e.MP4="",e.OGG="",e.PDF="",e.PNG="",e.POWERPOINT="",e.RAR="",e.STP="",e.TEXT="",e.VIDEO="",e.WAV="",e.WMA="",e.WORD="",e.XML="",e.YAML="",e.ZIP=""})(E||(E={}));var Lg=new Map([...["abw"].map(e=>[e,E.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,E.AUDIO]),...["avi"].map(e=>[e,E.AVI]),...["chm","xhs"].map(e=>[e,E.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,E.CODE]),...["csv"].map(e=>[e,E.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,E.DITA]),...["epub"].map(e=>[e,E.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,E.EXCEL]),...["flac"].map(e=>[e,E.FLAC]),...["gif"].map(e=>[e,E.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,E.GZIP]),...["html","htm","xhtml"].map(e=>[e,E.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,E.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,E.JPEG]),...["json"].map(e=>[e,E.JSON]),...["m4a","m4p"].map(e=>[e,E.M4A]),...["mov","qt"].map(e=>[e,E.MOV]),...["mp3"].map(e=>[e,E.MP3]),...["mp4","m4v"].map(e=>[e,E.MP4]),...["ogg","oga"].map(e=>[e,E.OGG]),...["pdf","ps"].map(e=>[e,E.PDF]),...["png"].map(e=>[e,E.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,E.POWERPOINT]),...["rar"].map(e=>[e,E.RAR]),...["stp"].map(e=>[e,E.STP]),...["txt","rtf","md","mdown"].map(e=>[e,E.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,E.VIDEO]),...["wav"].map(e=>[e,E.WAV]),...["wma"].map(e=>[e,E.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,E.WORD]),...["xml","xsl","rdf"].map(e=>[e,E.XML]),...["yaml","yml","x-yaml"].map(e=>[e,E.YAML]),...["zip"].map(e=>[e,E.ZIP])]);var kg={[E.ABW]:"#91ABC6",[E.AUDIO]:"#1795E3",[E.AVI]:"#E63324",[E.CHM]:"#71C3EB",[E.CODE]:"#71C3EB",[E.CSV]:"#1F7345",[E.DITA]:"#71C3EB",[E.EPUB]:"#85B926",[E.EXCEL]:"#1F7345",[E.FLAC]:"#1795E3",[E.GIF]:"#59B031",[E.GZIP]:"#F8AB36",[E.HTML]:"#71C3EB",[E.IMAGE]:"#59B031",[E.JPEG]:"#59B031",[E.JSON]:"#71C3EB",[E.M4A]:"#1795E3",[E.MOV]:"#E63324",[E.MP3]:"#1795E3",[E.MP4]:"#E63324",[E.OGG]:"#1795E3",[E.PDF]:"#E44948",[E.PNG]:"#59B031",[E.POWERPOINT]:"#B54A2B",[E.RAR]:"#F8AB36",[E.STP]:"#3764B1",[E.TEXT]:"#3162AB",[E.UNKNOWN]:"#999999",[E.VIDEO]:"#E63324",[E.WAV]:"#1795E3",[E.WMA]:"#1795E3",[E.WORD]:"#3162AB",[E.XML]:"#71C3EB",[E.YAML]:"#71C3EB",[E.ZIP]:"#F8AB36"};var kt;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(kt||(kt={}));var Wo=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},vt=class extends bc.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=uo.nothing}render(){let t=this.variant&&Object.values(kt).includes(this.variant)?this.variant:kt.fluid_topics,o=t!==kt.material||!!this.value;return uo.html`
|
|
598
598
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
599
599
|
${(0,vc.unsafeHTML)(this.resolvedIcon)}
|
|
600
600
|
<slot ?hidden=${o}></slot>
|
|
601
601
|
</i>
|
|
602
|
-
`}get textContent(){var t,o;return(o=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&o!==void 0?o:""}update(t){super.update(t),["value","variant"].some(o=>t.has(o))&&this.resolveIcon()}resolveIcon(){var t,o;let i=this.value||this.textContent;switch(this.variant){case
|
|
602
|
+
`}get textContent(){var t,o;return(o=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&o!==void 0?o:""}update(t){super.update(t),["value","variant"].some(o=>t.has(o))&&this.resolveIcon()}resolveIcon(){var t,o;let i=this.value||this.textContent;switch(this.variant){case kt.file_format:this.resolvedIcon=(t=E[i.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:i;break;case kt.material:this.resolvedIcon=this.value||uo.nothing;break;default:this.resolvedIcon=(o=mr[i.replace("-","_").toUpperCase()])!==null&&o!==void 0?o:i;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};vt.elementDefinitions={};vt.styles=fs;Wo([(0,gr.property)()],vt.prototype,"variant",void 0);Wo([(0,gr.property)()],vt.prototype,"value",void 0);Wo([(0,gr.state)()],vt.prototype,"resolvedIcon",void 0);Wo([(0,gr.query)("slot")],vt.prototype,"slottedContent",void 0);(0,xc.customElement)("ft-icon")(vt);var Sc=g(B()),Wt=g(R());var Ot={borderRadiusLeft:Wt.FtCssVariableFactory.extend("--ft-switch-option-border-radius-left","",Wt.designSystemVariables.borderRadiusL),borderRadiusRight:Wt.FtCssVariableFactory.extend("--ft-switch-option-border-radius-right","",Wt.designSystemVariables.borderRadiusL),borderWidthLeft:Wt.FtCssVariableFactory.create("--ft-switch-option-border-width-left","","SIZE","1px"),borderWidthRight:Wt.FtCssVariableFactory.create("--ft-switch-option-border-width-right","","SIZE","1px"),borderWidthVertical:Wt.FtCssVariableFactory.create("--ft-switch-option-border-width-vertical","","SIZE","1px")},Oc=Sc.css`
|
|
603
603
|
.ft-switch-option {
|
|
604
604
|
position: relative;
|
|
605
605
|
display: inline-block;
|
|
@@ -770,7 +770,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
770
770
|
.ft-resizer:hover ft-icon {
|
|
771
771
|
color: ${Ec.colorOnSurfaceMedium};
|
|
772
772
|
}
|
|
773
|
-
`;var Ke=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},Sn=class extends CustomEvent{constructor(t,o){super("resize",{detail:{width:t,height:o}})}},
|
|
773
|
+
`;var Ke=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},Sn=class extends CustomEvent{constructor(t,o){super("resize",{detail:{width:t,height:o}})}},Pt=class extends Vo.FtLitElement{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.iconVariant=kt.material,this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return Ho.html`
|
|
774
774
|
<style>
|
|
775
775
|
.ft-resizer {
|
|
776
776
|
cursor: ${(0,Ho.unsafeCSS)(this.cursor)}
|
|
@@ -781,7 +781,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
781
781
|
@touchstart=${this.initDragFromTouch}>
|
|
782
782
|
<ft-icon .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon>
|
|
783
783
|
</div>
|
|
784
|
-
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,o){this.dragging=!0,this.startX=t,this.startY=o,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,o){let i=this.fixedWidth+t-this.startX,n=this.fixedHeight+o-this.startY;this.dispatchEvent(new Sn(i,n))}};
|
|
784
|
+
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,o){this.dragging=!0,this.startX=t,this.startY=o,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,o){let i=this.fixedWidth+t-this.startX,n=this.fixedHeight+o-this.startY;this.dispatchEvent(new Sn(i,n))}};Pt.elementDefinitions={"ft-icon":vt};Pt.styles=[Vo.noTextSelect,Rc];Ke([(0,ue.property)({type:Number})],Pt.prototype,"initialWidth",void 0);Ke([(0,ue.property)({type:Number})],Pt.prototype,"initialHeight",void 0);Ke([(0,ue.property)()],Pt.prototype,"icon",void 0);Ke([(0,ue.property)()],Pt.prototype,"iconVariant",void 0);Ke([(0,ue.property)()],Pt.prototype,"cursor",void 0);Ke([(0,ue.state)()],Pt.prototype,"dragging",void 0);Ke([(0,ue.eventOptions)({passive:!0})],Pt.prototype,"initDragFromMouse",null);Ke([(0,ue.eventOptions)({passive:!0})],Pt.prototype,"initDragFromTouch",null);(0,Ic.customElement)("ft-resizer")(Pt);var kc=g(R());var On=g(B()),Hr=g(Z()),_c=g(Ne()),Lc=g(R());var Nc=g(B()),et=g(R());var P={fontSize:et.FtCssVariableFactory.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:et.FtCssVariableFactory.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:et.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:et.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:et.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:et.FtCssVariableFactory.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:et.FtCssVariableFactory.extend("--ft-input-label-border-color","",et.designSystemVariables.colorOutline),textColor:et.FtCssVariableFactory.extend("--ft-input-label-text-color","",et.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:et.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color","",et.designSystemVariables.colorOnSurfaceDisabled),colorSurface:et.FtCssVariableFactory.external(et.designSystemVariables.colorSurface,"Design system"),borderRadiusS:et.FtCssVariableFactory.external(et.designSystemVariables.borderRadiusS,"Design system"),colorError:et.FtCssVariableFactory.external(et.designSystemVariables.colorError,"Design system")},Tc=Nc.css`
|
|
785
785
|
.ft-input-label {
|
|
786
786
|
position: absolute;
|
|
787
787
|
inset: 0;
|
|
@@ -1054,14 +1054,14 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1054
1054
|
${this.helper}
|
|
1055
1055
|
</ft-typography>`:void 0}
|
|
1056
1056
|
</div>
|
|
1057
|
-
`}setValue(t,o=!1){this.value=t,this.setFormValue(t),o&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(t){(t.key==="Enter"||t.key===" ")&&t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=((t=this.textarea)===null||t===void 0?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}};Nt.elementDefinitions={"ft-input-label":Ht,"ft-resizer":
|
|
1057
|
+
`}setValue(t,o=!1){this.value=t,this.setFormValue(t),o&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(t){(t.key==="Enter"||t.key===" ")&&t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=((t=this.textarea)===null||t===void 0?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}};Nt.elementDefinitions={"ft-input-label":Ht,"ft-resizer":Pt,"ft-ripple":j,"ft-typography":ft};Nt.styles=[kr,$c];$e([(0,ae.property)({type:String})],Nt.prototype,"label",void 0);$e([(0,ae.property)({reflect:!0})],Nt.prototype,"value",void 0);$e([(0,ae.property)({type:String})],Nt.prototype,"helper",void 0);$e([(0,ae.property)({type:Boolean})],Nt.prototype,"outlined",void 0);$e([(0,ae.property)({type:Boolean})],Nt.prototype,"disabled",void 0);$e([(0,ae.property)({type:Boolean})],Nt.prototype,"error",void 0);$e([(0,ae.property)({type:Number,reflect:!0})],Nt.prototype,"height",void 0);$e([(0,ae.query)("textarea")],Nt.prototype,"textarea",void 0);$e([(0,ae.state)()],Nt.prototype,"focused",void 0);(0,Bc.customElement)("ft-text-area")(Nt);var Id=g(Fc());var wn=g(R());var ho=g(Z()),Hc=g(R());var qe=g(R());var zc=g(R());var Uc=g(B()),Wc=g(R());var vr=class extends Wc.FtLitElement{render(){return Uc.html`
|
|
1058
1058
|
<div class="ft-loader">
|
|
1059
1059
|
<div></div>
|
|
1060
1060
|
<div></div>
|
|
1061
1061
|
<div></div>
|
|
1062
1062
|
<div></div>
|
|
1063
1063
|
</div>
|
|
1064
|
-
`}};vr.styles=ps;(0,zc.customElement)("ft-loader")(vr);var Ze=g(B()),Cn=g(Ne()),
|
|
1064
|
+
`}};vr.styles=ps;(0,zc.customElement)("ft-loader")(vr);var Ze=g(B()),Cn=g(Ne()),Ct=g(Z()),Tt=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},it=class extends(0,qe.toFtFormComponent)(qe.FtLitElement,"button"){get buttonClasses(){return{}}get typographyVariant(){return""}constructor(){super(),this.href=void 0,this.target=void 0,this.role="button",this.type="button",this.disabled=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.ariaLabel=null,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.addEventListener("click",t=>{var o;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):this.type=="submit"&&((o=this.form)===null||o===void 0||o.requestSubmit())})}render(){var t,o,i;let n=Ze.html`
|
|
1065
1065
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
1066
1066
|
<ft-typography part="label"
|
|
1067
1067
|
variant=${this.typographyVariant}
|
|
@@ -1098,7 +1098,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1098
1098
|
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon>
|
|
1099
1099
|
`:Ze.html`
|
|
1100
1100
|
<slot part="icon" name="icon"></slot>
|
|
1101
|
-
`}focus(){var t;(t=this.button)===null||t===void 0||t.focus()}click(){var t;(t=this.button)===null||t===void 0||t.click()}getLabel(){return this.label||this.textContent}get textContent(){return(0,qe.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};
|
|
1101
|
+
`}focus(){var t;(t=this.button)===null||t===void 0||t.focus()}focusWithoutTooltip(){var t;this.setTooltipManual(!0),(t=this.button)===null||t===void 0||t.focus(),this.setTooltipManual(!1)}setTooltipManual(t){this.tooltip&&(this.tooltip.manual=t)}click(){var t;(t=this.button)===null||t===void 0||t.click()}getLabel(){return this.label||this.textContent}get textContent(){return(0,qe.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};it.elementDefinitions={"ft-ripple":j,"ft-tooltip":ot,"ft-typography":ft,"ft-icon":vt,"ft-loader":vr};Tt([(0,Ct.property)()],it.prototype,"href",void 0);Tt([(0,Ct.property)()],it.prototype,"target",void 0);Tt([(0,Ct.property)({type:String,reflect:!0})],it.prototype,"role",void 0);Tt([(0,Ct.property)()],it.prototype,"type",void 0);Tt([(0,Ct.property)({type:Boolean})],it.prototype,"disabled",void 0);Tt([(0,Ct.property)()],it.prototype,"label",void 0);Tt([(0,Ct.property)()],it.prototype,"icon",void 0);Tt([(0,Ct.property)()],it.prototype,"iconVariant",void 0);Tt([(0,Ct.property)({type:Boolean})],it.prototype,"trailingIcon",void 0);Tt([(0,Ct.property)({type:Boolean})],it.prototype,"loading",void 0);Tt([(0,Ct.property)({attribute:"aria-label"})],it.prototype,"ariaLabel",void 0);Tt([(0,Ct.property)()],it.prototype,"tooltipPosition",void 0);Tt([(0,Ct.property)({type:Boolean})],it.prototype,"hideTooltip",void 0);Tt([(0,Ct.property)({type:Boolean})],it.prototype,"forceTooltip",void 0);Tt([(0,Ct.query)(".ft-button")],it.prototype,"button",void 0);Tt([(0,Ct.query)(".ft-button--label slot")],it.prototype,"slottedContent",void 0);Tt([(0,Ct.query)("[part=tooltip]")],it.prototype,"tooltip",void 0);var Ko=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},fe=class extends it{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}get typographyVariant(){return"button"}};fe.styles=[Hc.safariEllipsisFix,gs];Ko([(0,ho.property)({type:Boolean})],fe.prototype,"primary",void 0);Ko([(0,ho.property)({type:Boolean})],fe.prototype,"outlined",void 0);Ko([(0,ho.property)({type:Boolean})],fe.prototype,"dense",void 0);Ko([(0,ho.property)({type:Boolean})],fe.prototype,"round",void 0);var yo=g(Z());var qo=g(R());var Vc=g(B()),C=g(R());var Gc=[Vc.css`
|
|
1102
1102
|
:host {
|
|
1103
1103
|
display: inline-block;
|
|
1104
1104
|
max-width: 100%;
|
|
@@ -1564,11 +1564,11 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1564
1564
|
.ftds--size-small.ft-button--icon-only {
|
|
1565
1565
|
width: ${f.smallIconOnlyWidth};
|
|
1566
1566
|
}
|
|
1567
|
-
`,C.noTextSelect];var Zo=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},De=class extends(0,qo.toFtdsBase)(
|
|
1567
|
+
`,C.noTextSelect];var Zo=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},De=class extends(0,qo.toFtdsBase)(it){constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.round=!1,this.family=Io.brand,this.iconVariant=kt.fluid_topics}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon,"ft-button--round":this.round,...this.getDesignSystemBaseClasses()}}get typographyVariant(){switch(this.size){case Rr.large:return Ve.body2medium;case Rr.medium:return Ve.caption1medium;case Rr.small:return Ve.caption2medium}}};De.styles=[qo.safariEllipsisFix,Gc];Zo([(0,yo.property)({type:Boolean})],De.prototype,"primary",void 0);Zo([(0,yo.property)({type:Boolean})],De.prototype,"secondary",void 0);Zo([(0,yo.property)({type:Boolean})],De.prototype,"tertiary",void 0);Zo([(0,yo.property)({type:Boolean})],De.prototype,"round",void 0);(0,wn.customElement)("ft-button")(fe);(0,wn.customElement)("ftds-button")(De);var Kl=g(R());var bi=g(B()),vi=g(Z()),xi=g(R());var jc=g(B());var Kc=jc.css`
|
|
1568
1568
|
`;var gi=g(R());var Vl=g(R());var Qc=g(B()),qt=g(Z()),he=g(R());var Zc=g(B());var qc=Zc.css`
|
|
1569
1569
|
`;var Yo=g(R()),up="ft-app-info",En=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},fp={session:(e,t)=>{(0,Yo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>N.dispatchEvent(new En(t.payload)),0))}},N=Yo.FtReduxStore.get({name:up,reducers:fp,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Ye=g(R());var An=g(R());var xr=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:i}=N.getState(),n=t??i;if(o&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,n,!0)}static await(t){return new Promise(o=>{let i=e.get(t);if(i)o(i);else{let n=N.subscribe(()=>{i=e.get(t),i&&(n(),o(i))})}})}};var we=class{constructor(t=!0,o){var i;this.overrideApi=o;let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new An.CacheRegistry,this.cache=t?n.commonCache:new An.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:xr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):xr.await()}clearCache(){this.cache.clearAll()}};var Yc,hp=Symbol("clearAfterUnitTest"),Xo=class extends we{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Yc]=()=>{this.defaultMessages={},this.cache=new Ye.CacheRegistry,this.listeners={}},this.currentUiLocale=N.getState().uiLocale,N.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=N.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var i;if(t=t.toLowerCase(),Object.keys(o).length>0){let n={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...o};(0,Ye.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}await this.fetchContext(t)}resolveContext(t){var o,i;return this.fetchContext(t),(i=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,o){let i=t.toLowerCase();return this.resolveContext(i)[o]}resolveMessage(t,o,...i){var n;let a=t.toLowerCase(),s=this.resolveContext(a);return new Ye.ParametrizedLabelResolver((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(o,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(o){console.error(o)}}subscribe(t,o){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(o),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,Ye.delay)(0).then(()=>o()).catch(()=>null)))}};Yc=hp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Xo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Xo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Sr=window.FluidTopicsI18nService,Xc=window.FluidTopicsCustomI18nService;var $t=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},dt=class extends he.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",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.messageContexts=[],this.cache=new he.CacheRegistry,this.cleanSessionDebouncer=new he.Debouncer}render(){return Qc.html`
|
|
1570
1570
|
<slot></slot>
|
|
1571
|
-
`}update(t){var o,i,n,a,s;super.update(t),t.has("baseUrl")&&(N.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&N.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&N.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&N.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&N.actions.noCustom(this.noCustom),t.has("editorMode")&&N.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&N.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&N.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>Sr.addContext(l)),t.has("openExternalDocumentInNewTab")&&N.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&N.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&N.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(N.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),N.actions.availableUiLocales((n=(i=this.localesConfiguration)===null||i===void 0?void 0:i.availableUiLocales)!==null&&n!==void 0?n:[]),N.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};dt.elementDefinitions={};dt.styles=qc;$t([(0,qt.property)()],dt.prototype,"baseUrl",void 0);$t([(0,qt.property)()],dt.prototype,"apiIntegrationIdentifier",void 0);$t([(0,qt.property)()],dt.prototype,"uiLocale",void 0);$t([(0,he.jsonProperty)(null)],dt.prototype,"availableUiLocales",void 0);$t([(0,he.jsonProperty)(null)],dt.prototype,"metadataConfiguration",void 0);$t([(0,qt.property)({type:Boolean})],dt.prototype,"editorMode",void 0);$t([(0,qt.property)({type:Boolean})],dt.prototype,"noCustom",void 0);$t([(0,qt.property)({type:Boolean})],dt.prototype,"openExternalDocumentInNewTab",void 0);$t([(0,qt.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],dt.prototype,"noCustomComponent",void 0);$t([(0,qt.property)({type:Boolean})],dt.prototype,"withManualResources",void 0);$t([(0,qt.property)({type:Boolean})],dt.prototype,"navigatorOnline",void 0);$t([(0,qt.property)({type:Boolean})],dt.prototype,"forcedOffline",void 0);$t([(0,qt.property)({type:Object})],dt.prototype,"apiProvider",void 0);$t([(0,he.jsonProperty)([])],dt.prototype,"messageContexts",void 0);$t([(0,he.jsonProperty)(void 0)],dt.prototype,"session",void 0);$t([(0,qt.state)()],dt.prototype,"localesConfiguration",void 0);var eu=g(Z());function yp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var o,i,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(i=o;i--!==0;)if(!Qo(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Qo(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(i=o;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(i=o;i--!==0;){var a=n[i];if(!Qo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Qo(e,t){try{return yp(e,t)}catch{return!1}}function Rn(e,t){return!Qo(e,t)}var mp=g(Z(),1);var Jo=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(i=>i.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(i=>i.type===t);return o&&(this.queue=this.queue.filter(i=>i!==o)),o}};var mo=g(Z(),1);var Jc=g(Z(),1);function tl(e,t){let o=()=>JSON.parse(JSON.stringify(e));return(0,Jc.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:Rn,...t??{}})}var ti=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,i)=>{this.resolvePromise=o,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let i=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of i)try{await s()}catch(l){n(l);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 rl=g(B(),1);var ei=window,gp=ei.ShadowRoot&&(ei.ShadyCSS===void 0||ei.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ix=Symbol();var el=(e,t)=>{gp?e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let i=document.createElement("style"),n=ei.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=o.cssText,e.appendChild(i)})};var ri=class extends rl.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([n,a])=>t.registry.define(n,a)));let o={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(o);return el(i,t.elementStyles),i}};var oi=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},al,ol=Symbol("constructorPrototype"),il=Symbol("constructorName"),sl=Symbol("exportpartsDebouncer"),nl=Symbol("dynamicDependenciesLoaded"),Xe=class extends ri{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[al]=new ti(5),this[il]=this.constructor.name,this[ol]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[il]&&Object.setPrototypeOf(this,this[ol])}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 t=this.constructor;t[nl]||(t[nl]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){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(t.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 t,o,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&i!==void 0&&i)&&this[sl].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(t){var o,i,n,a,s,l;let u=b=>b!=null&&b.trim().length>0,p=t.filter(u).map(b=>b.trim());if(p.length===0){this.removeAttribute("exportparts");return}let h=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 x=(a=(n=b.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&a!==void 0?a:[],S=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[];new Array(...x,...S).filter(u).map(O=>O.trim()).forEach(O=>h.add(O))}if(h.size===0){this.removeAttribute("exportparts");return}let m=[...h.values()].flatMap(b=>p.map(x=>`${b}:${x}--${b}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};al=sl;oi([(0,mo.property)()],Xe.prototype,"exportpartsPrefix",void 0);oi([tl([])],Xe.prototype,"exportpartsPrefixes",void 0);oi([(0,mo.property)()],Xe.prototype,"customStylesheet",void 0);oi([(0,mo.state)()],Xe.prototype,"useAdoptedStyleSheets",void 0);function go(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var cl,ll,dl,ii=Symbol("internalReduxEventsUnsubscribers"),Qe=Symbol("internalStoresUnsubscribers"),Or=Symbol("internalStores"),bo=class extends Xe{constructor(){super(...arguments),this[cl]=new Map,this[ll]=new Map,this[dl]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Or].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Or].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[Or].get(t)}addStore(t,o){var i;o=(i=o??(go(t)?t.name:void 0))!==null&&i!==void 0?i:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[Or].delete(o)}setupStore(t,o){this[Or].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Or].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let i=this.constructor.getPropertyOptions(o);if(!i?.attribute||!this.hasAttribute(typeof i?.attribute=="string"?i.attribute:o)){let n=this.getStore(t.store);n&&(t.store?this[Qe].has(t.store):this[Qe].size>0)&&(this[o]=t.selector(n.getState(),this))}})}subscribeToStore(t,o){var i;this[Qe].set(t,o.subscribe(()=>this.updateFromStores())),go(o)&&o.eventBus&&((i=this.reduxConstructor.reduxEventListeners)===null||i===void 0||i.forEach((n,a)=>{if(typeof this[a]=="function"&&(!n.store||o.name===n.store)){let s=l=>this[a](l);o.addEventListener(n.eventName,s),this[ii].push(()=>o.removeEventListener(n.eventName,s))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Qe].forEach((t,o)=>this.unsubscribeFromStore(o)),this[ii].forEach(t=>t()),this[ii]=[]}unsubscribeFromStore(t){this[Qe].has(t)&&this[Qe].get(t)(),this[Qe].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};cl=Qe,ll=Or,dl=ii;bo.reduxProperties=new Map;bo.reduxReactiveProperties=new Set;bo.reduxEventListeners=new Map;function se(e){for(var t=arguments.length,o=Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];if(0)var n,a;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Be(e){return!!e&&!!e[it]}function ye(e){var t;return!!e&&(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)===Ep}(e)||Array.isArray(e)||!!e[gl]||!!(!((t=e.constructor)===null||t===void 0)&&t[gl])||Dn(e)||Bn(e))}function Cr(e,t,o){o===void 0&&(o=!1),jr(e)===0?(o?Object.keys:Gr)(e).forEach(function(i){o&&typeof i=="symbol"||t(i,e[i],e)}):e.forEach(function(i,n){return t(n,i,e)})}function jr(e){var t=e[it];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Dn(e)?2:Bn(e)?3:0}function Vr(e,t){return jr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function bp(e,t){return jr(e)===2?e.get(t):e[t]}function bl(e,t,o){var i=jr(e);i===2?e.set(t,o):i===3?e.add(o):e[t]=o}function vl(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Dn(e){return Cp&&e instanceof Map}function Bn(e){return wp&&e instanceof Set}function Je(e){return e.o||e.t}function Mn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ol(e);delete t[it];for(var o=Gr(t),i=0;i<o.length;i++){var n=o[i],a=t[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function Fn(e,t){return t===void 0&&(t=!1),Un(e)||Be(e)||!ye(e)||(jr(e)>1&&(e.set=e.add=e.clear=e.delete=vp),Object.freeze(e),t&&Cr(e,function(o,i){return Fn(i,!0)},!0)),e}function vp(){se(2)}function Un(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ee(e){var t=$n[e];return t||se(18,e),t}function xp(e,t){$n[e]||($n[e]=t)}function Ln(){return xo}function In(e,t){t&&(Ee("Patches"),e.u=[],e.s=[],e.v=t)}function ni(e){kn(e),e.p.forEach(Sp),e.p=null}function kn(e){e===xo&&(xo=e.l)}function pl(e){return xo={p:[],l:xo,h:e,m:!0,_:0}}function Sp(e){var t=e[it];t.i===0||t.i===1?t.j():t.g=!0}function Nn(e,t){t._=t.p.length;var o=t.p[0],i=e!==void 0&&e!==o;return t.h.O||Ee("ES5").S(t,e,i),i?(o[it].P&&(ni(t),se(4)),ye(e)&&(e=ai(t,e),t.l||si(t,e)),t.u&&Ee("Patches").M(o[it].t,e,t.u,t.s)):e=ai(t,o,[]),ni(t),t.u&&t.v(t.u,t.s),e!==Sl?e:void 0}function ai(e,t,o){if(Un(t))return t;var i=t[it];if(!i)return Cr(t,function(l,u){return ul(e,i,t,l,u,o)},!0),t;if(i.A!==e)return t;if(!i.P)return si(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=Mn(i.k):i.o,a=n,s=!1;i.i===3&&(a=new Set(n),n.clear(),s=!0),Cr(a,function(l,u){return ul(e,i,n,l,u,o,s)}),si(e,n,!1),o&&e.u&&Ee("Patches").N(i,o,e.u,e.s)}return i.o}function ul(e,t,o,i,n,a,s){if(Be(n)){var l=ai(e,n,a&&t&&t.i!==3&&!Vr(t.R,i)?a.concat(i):void 0);if(bl(o,i,l),!Be(l))return;e.m=!1}else s&&o.add(n);if(ye(n)&&!Un(n)){if(!e.h.D&&e._<1)return;ai(e,n),t&&t.A.l||si(e,n)}}function si(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&Fn(t,o)}function Tn(e,t){var o=e[it];return(o?Je(o):e)[t]}function fl(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var i=Object.getOwnPropertyDescriptor(o,t);if(i)return i;o=Object.getPrototypeOf(o)}}function tr(e){e.P||(e.P=!0,e.l&&tr(e.l))}function _n(e){e.o||(e.o=Mn(e.t))}function Pn(e,t,o){var i=Dn(t)?Ee("MapSet").F(t,o):Bn(t)?Ee("MapSet").T(t,o):e.O?function(n,a){var s=Array.isArray(n),l={i:s?1:0,A:a?a.A:Ln(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},u=l,p=So;s&&(u=[l],p=vo);var h=Proxy.revocable(u,p),m=h.revoke,b=h.proxy;return l.k=b,l.j=m,b}(t,o):Ee("ES5").J(t,o);return(o?o.A:Ln()).p.push(i),i}function Op(e){return Be(e)||se(22,e),function t(o){if(!ye(o))return o;var i,n=o[it],a=jr(o);if(n){if(!n.P&&(n.i<4||!Ee("ES5").K(n)))return n.t;n.I=!0,i=hl(o,a),n.I=!1}else i=hl(o,a);return Cr(i,function(s,l){n&&bp(n.t,s)===l||bl(i,s,t(l))}),a===3?new Set(i):i}(e)}function hl(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Mn(e)}function xl(){function e(s,l){var u=a[s];return u?u.enumerable=l:a[s]=u={configurable:!0,enumerable:l,get:function(){var p=this[it];return So.get(p,s)},set:function(p){var h=this[it];So.set(h,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][it];if(!u.P)switch(u.i){case 5:i(u)&&tr(u);break;case 4:o(u)&&tr(u)}}}function o(s){for(var l=s.t,u=s.k,p=Gr(u),h=p.length-1;h>=0;h--){var m=p[h];if(m!==it){var b=l[m];if(b===void 0&&!Vr(l,m))return!0;var x=u[m],S=x&&x[it];if(S?S.t!==b:!vl(x,b))return!0}}var O=!!l[it];return p.length!==Gr(l).length+(O?0:1)}function i(s){var l=s.k;if(l.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function n(s){s.g&&se(3,JSON.stringify(Je(s)))}var a={};xp("ES5",{J:function(s,l){var u=Array.isArray(s),p=function(m,b){if(m){for(var x=Array(b.length),S=0;S<b.length;S++)Object.defineProperty(x,""+S,e(S,!0));return x}var O=Ol(b);delete O[it];for(var _=Gr(O),I=0;I<_.length;I++){var T=_[I];O[T]=e(T,m||!!O[T].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(u,s),h={i:u?5:4,A:l?l.A:Ln(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,it,{value:h,writable:!0}),p},S:function(s,l,u){u?Be(l)&&l[it].A===s&&t(s.p):(s.u&&function p(h){if(h&&typeof h=="object"){var m=h[it];if(m){var b=m.t,x=m.k,S=m.R,O=m.i;if(O===4)Cr(x,function(U){U!==it&&(b[U]!==void 0||Vr(b,U)?S[U]||p(x[U]):(S[U]=!0,tr(m)))}),Cr(b,function(U){x[U]!==void 0||Vr(x,U)||(S[U]=!1,tr(m))});else if(O===5){if(i(m)&&(tr(m),S.length=!0),x.length<b.length)for(var _=x.length;_<b.length;_++)S[_]=!1;else for(var I=b.length;I<x.length;I++)S[I]=!0;for(var T=Math.min(x.length,b.length),D=0;D<T;D++)x.hasOwnProperty(D)||(S[D]=!0),S[D]===void 0&&p(x[D])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):i(s)}})}var yl,xo,Wn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Cp=typeof Map<"u",wp=typeof Set<"u",ml=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Sl=Wn?Symbol.for("immer-nothing"):((yl={})["immer-nothing"]=!0,yl),gl=Wn?Symbol.for("immer-draftable"):"__$immer_draftable",it=Wn?Symbol.for("immer-state"):"__$immer_state";var Ep=""+Object.prototype.constructor,Gr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ol=Object.getOwnPropertyDescriptors||function(e){var t={};return Gr(e).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)}),t},$n={},So={get:function(e,t){if(t===it)return e;var o=Je(e);if(!Vr(o,t))return function(n,a,s){var l,u=fl(a,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(n.k):void 0}(e,o,t);var i=o[t];return e.I||!ye(i)?i:i===Tn(e.t,t)?(_n(e),e.o[t]=Pn(e.A.h,i,e)):i},has:function(e,t){return t in Je(e)},ownKeys:function(e){return Reflect.ownKeys(Je(e))},set:function(e,t,o){var i=fl(Je(e),t);if(i?.set)return i.set.call(e.k,o),!0;if(!e.P){var n=Tn(Je(e),t),a=n?.[it];if(a&&a.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(vl(o,n)&&(o!==void 0||Vr(e.t,t)))return!0;_n(e),tr(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return Tn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,_n(e),tr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=Je(e),i=Reflect.getOwnPropertyDescriptor(o,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:o[t]}},defineProperty:function(){se(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){se(12)}},vo={};Cr(So,function(e,t){vo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),vo.deleteProperty=function(e,t){return vo.set.call(this,e,t,void 0)},vo.set=function(e,t,o){return So.set.call(this,e[0],t,o,e[0])};var Ap=function(){function e(o){var i=this;this.O=ml,this.D=!0,this.produce=function(n,a,s){if(typeof n=="function"&&typeof a!="function"){var l=a;a=n;var u=i;return function(O){var _=this;O===void 0&&(O=l);for(var I=arguments.length,T=Array(I>1?I-1:0),D=1;D<I;D++)T[D-1]=arguments[D];return u.produce(O,function(U){var z;return(z=a).call.apply(z,[_,U].concat(T))})}}var p;if(typeof a!="function"&&se(6),s!==void 0&&typeof s!="function"&&se(7),ye(n)){var h=pl(i),m=Pn(i,n,void 0),b=!0;try{p=a(m),b=!1}finally{b?ni(h):kn(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(O){return In(h,s),Nn(O,h)},function(O){throw ni(h),O}):(In(h,s),Nn(p,h))}if(!n||typeof n!="object"){if((p=a(n))===void 0&&(p=n),p===Sl&&(p=void 0),i.D&&Fn(p,!0),s){var x=[],S=[];Ee("Patches").M(n,p,x,S),s(x,S)}return p}se(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(p){for(var h=arguments.length,m=Array(h>1?h-1:0),b=1;b<h;b++)m[b-1]=arguments[b];return i.produceWithPatches(p,function(x){return n.apply(void 0,[x].concat(m))})};var s,l,u=i.produce(n,a,function(p,h){s=p,l=h});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,s,l]}):[u,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){ye(o)||se(8),Be(o)&&(o=Op(o));var i=pl(this),n=Pn(this,o,void 0);return n[it].C=!0,kn(i),n},t.finishDraft=function(o,i){var n=o&&o[it],a=n.A;return In(a,i),Nn(void 0,a)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!ml&&se(20),this.O=o},t.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=Ee("Patches").$;return Be(o)?s(o,i):this.produce(o,function(l){return s(l,i)})},e}(),re=new Ap,Rp=re.produce,mx=re.produceWithPatches.bind(re),gx=re.setAutoFreeze.bind(re),bx=re.setUseProxies.bind(re),vx=re.applyPatches.bind(re),xx=re.createDraft.bind(re),Sx=re.finishDraft.bind(re),ci=Rp;function er(e){"@babel/helpers - typeof";return er=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},er(e)}function zn(e,t){if(er(e)!=="object"||e===null)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var i=o.call(e,t||"default");if(er(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hn(e){var t=zn(e,"string");return er(t)==="symbol"?t:String(t)}function Vn(e,t,o){return t=Hn(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Cl(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),o.push.apply(o,i)}return o}function li(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Cl(Object(o),!0).forEach(function(i){Vn(e,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Cl(Object(o)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i))})}return e}function Dt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var wl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Gn=function(){return Math.random().toString(36).substring(7).split("").join(".")},di={INIT:"@@redux/INIT"+Gn(),REPLACE:"@@redux/REPLACE"+Gn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Gn()}};function Ip(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function jn(e,t,o){var i;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Dt(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Dt(1));return o(jn)(e,t)}if(typeof e!="function")throw new Error(Dt(2));var n=e,a=t,s=[],l=s,u=!1;function p(){l===s&&(l=s.slice())}function h(){if(u)throw new Error(Dt(3));return a}function m(O){if(typeof O!="function")throw new Error(Dt(4));if(u)throw new Error(Dt(5));var _=!0;return p(),l.push(O),function(){if(_){if(u)throw new Error(Dt(6));_=!1,p();var T=l.indexOf(O);l.splice(T,1),s=null}}}function b(O){if(!Ip(O))throw new Error(Dt(7));if(typeof O.type>"u")throw new Error(Dt(8));if(u)throw new Error(Dt(9));try{u=!0,a=n(a,O)}finally{u=!1}for(var _=s=l,I=0;I<_.length;I++){var T=_[I];T()}return O}function x(O){if(typeof O!="function")throw new Error(Dt(10));n=O,b({type:di.REPLACE})}function S(){var O,_=m;return O={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(Dt(11));function D(){T.next&&T.next(h())}D();var U=_(D);return{unsubscribe:U}}},O[wl]=function(){return this},O}return b({type:di.INIT}),i={dispatch:b,subscribe:m,getState:h,replaceReducer:x},i[wl]=S,i}function Np(e){Object.keys(e).forEach(function(t){var o=e[t],i=o(void 0,{type:di.INIT});if(typeof i>"u")throw new Error(Dt(12));if(typeof o(void 0,{type:di.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Dt(13))})}function El(e){for(var t=Object.keys(e),o={},i=0;i<t.length;i++){var n=t[i];typeof e[n]=="function"&&(o[n]=e[n])}var a=Object.keys(o),s,l;try{Np(o)}catch(u){l=u}return function(p,h){if(p===void 0&&(p={}),l)throw l;if(0)var m;for(var b=!1,x={},S=0;S<a.length;S++){var O=a[S],_=o[O],I=p[O],T=_(I,h);if(typeof T>"u"){var D=h&&h.type;throw new Error(Dt(14))}x[O]=T,b=b||T!==I}return b=b||a.length!==Object.keys(p).length,b?x:p}}function Kr(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(i){return i}:t.length===1?t[0]:t.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function Al(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(i){return function(){var n=i.apply(void 0,arguments),a=function(){throw new Error(Dt(15))},s={getState:n.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return a=Kr.apply(void 0,l)(n.dispatch),li(li({},n),{},{dispatch:a})}}}function Rl(e){var t=function(i){var n=i.dispatch,a=i.getState;return function(s){return function(l){return typeof l=="function"?l(n,a,e):s(l)}}};return t}var Il=Rl();Il.withExtraArgument=Rl;var Kn=Il;var kl=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function i(){this.constructor=t}t.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)}}(),Tp=function(e,t){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:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(h){return u([p,h])}}function u(p){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(a=p[0]&2?n.return:p[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,p[1])).done)return a;switch(n=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,n=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){o.label=p[1];break}if(p[0]===6&&o.label<a[1]){o.label=a[1],a=p;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(p);break}a[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(h){p=[6,h],n=0}finally{i=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Zr=function(e,t){for(var o=0,i=t.length,n=e.length;o<i;o++,n++)e[n]=t[o];return e},_p=Object.defineProperty,Lp=Object.defineProperties,kp=Object.getOwnPropertyDescriptors,Nl=Object.getOwnPropertySymbols,Pp=Object.prototype.hasOwnProperty,$p=Object.prototype.propertyIsEnumerable,Tl=function(e,t,o){return t in e?_p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},rr=function(e,t){for(var o in t||(t={}))Pp.call(t,o)&&Tl(e,o,t[o]);if(Nl)for(var i=0,n=Nl(t);i<n.length;i++){var o=n[i];$p.call(t,o)&&Tl(e,o,t[o])}return e},Zn=function(e,t){return Lp(e,kp(t))},Dp=function(e,t,o){return new Promise(function(i,n){var a=function(u){try{l(o.next(u))}catch(p){n(p)}},s=function(u){try{l(o.throw(u))}catch(p){n(p)}},l=function(u){return u.done?i(u.value):Promise.resolve(u.value).then(a,s)};l((o=o.apply(e,t)).next())})};var Bp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Kr:Kr.apply(null,arguments)},Fx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Mp(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var Fp=function(e){kl(t,e);function t(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var n=e.apply(this,o)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return e.prototype.concat.apply(this,o)},t.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(t.bind.apply(t,Zr([void 0],o[0].concat(this)))):new(t.bind.apply(t,Zr([void 0],o.concat(this))))},t}(Array),Up=function(e){kl(t,e);function t(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var n=e.apply(this,o)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return e.prototype.concat.apply(this,o)},t.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(t.bind.apply(t,Zr([void 0],o[0].concat(this)))):new(t.bind.apply(t,Zr([void 0],o.concat(this))))},t}(Array);function Xn(e){return ye(e)?ci(e,function(){}):e}function Wp(e){return typeof e=="boolean"}function zp(){return function(t){return Hp(t)}}function Hp(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,i=e.immutableCheck,n=i===void 0?!0:i,a=e.serializableCheck,s=a===void 0?!0:a,l=new Fp;if(o&&(Wp(o)?l.push(Kn):l.push(Kn.withExtraArgument(o.extraArgument))),0){if(n)var u;if(s)var p}return l}var qn=!0;function Pl(e){var t=zp(),o=e||{},i=o.reducer,n=i===void 0?void 0:i,a=o.middleware,s=a===void 0?t():a,l=o.devTools,u=l===void 0?!0:l,p=o.preloadedState,h=p===void 0?void 0:p,m=o.enhancers,b=m===void 0?void 0:m,x;if(typeof n=="function")x=n;else if(Mp(n))x=El(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 S=s;if(typeof S=="function"&&(S=S(t),!qn&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!qn&&S.some(function(U){return typeof U!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Al.apply(void 0,S),_=Kr;u&&(_=Bp(rr({trace:!qn},typeof u=="object"&&u)));var I=new Up(O),T=I;Array.isArray(b)?T=Zr([O],b):typeof b=="function"&&(T=b(I));var D=_.apply(void 0,T);return jn(x,h,D)}function or(e,t){function o(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(t){var a=t.apply(void 0,i);if(!a)throw new Error("prepareAction did not return an object");return rr(rr({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:i[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(i){return i.type===e},o}function $l(e){var t={},o=[],i,n={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,n},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),n},addDefaultCase:function(a){return i=a,n}};return e(n),[t,o,i]}function Vp(e){return typeof e=="function"}function Gp(e,t,o,i){o===void 0&&(o=[]);var n=typeof t=="function"?$l(t):[t,o,i],a=n[0],s=n[1],l=n[2],u;if(Vp(e))u=function(){return Xn(e())};else{var p=Xn(e);u=function(){return p}}function h(m,b){m===void 0&&(m=u());var x=Zr([a[b.type]],s.filter(function(S){var O=S.matcher;return O(b)}).map(function(S){var O=S.reducer;return O}));return x.filter(function(S){return!!S}).length===0&&(x=[l]),x.reduce(function(S,O){if(O)if(Be(S)){var _=S,I=O(_,b);return I===void 0?S:I}else{if(ye(S))return ci(S,function(T){return O(T,b)});var I=O(S,b);if(I===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return S},m)}return h.getInitialState=u,h}function jp(e,t){return e+"/"+t}function Dl(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:Xn(e.initialState),i=e.reducers||{},n=Object.keys(i),a={},s={},l={};n.forEach(function(h){var m=i[h],b=jp(t,h),x,S;"reducer"in m?(x=m.reducer,S=m.prepare):x=m,a[h]=x,s[b]=x,l[h]=S?or(b,S):or(b)});function u(){var h=typeof e.extraReducers=="function"?$l(e.extraReducers):[e.extraReducers],m=h[0],b=m===void 0?{}:m,x=h[1],S=x===void 0?[]:x,O=h[2],_=O===void 0?void 0:O,I=rr(rr({},b),s);return Gp(o,function(T){for(var D in I)T.addCase(D,I[D]);for(var U=0,z=S;U<z.length;U++){var Vt=z[U];T.addMatcher(Vt.matcher,Vt.reducer)}_&&T.addDefaultCase(_)})}var p;return{name:t,reducer:function(h,m){return p||(p=u()),p(h,m)},actions:l,caseReducers:a,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Kp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Zp=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=Kp[Math.random()*64|0];return t},qp=["name","message","stack","code"],Yn=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),_l=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),Yp=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,i=qp;o<i.length;o++){var n=i[o];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},Hx=function(){function e(t,o,i){var n=or(t+"/fulfilled",function(h,m,b,x){return{payload:h,meta:Zn(rr({},x||{}),{arg:b,requestId:m,requestStatus:"fulfilled"})}}),a=or(t+"/pending",function(h,m,b){return{payload:void 0,meta:Zn(rr({},b||{}),{arg:m,requestId:h,requestStatus:"pending"})}}),s=or(t+"/rejected",function(h,m,b,x,S){return{payload:x,error:(i&&i.serializeError||Yp)(h||"Rejected"),meta:Zn(rr({},S||{}),{arg:b,requestId:m,rejectedWithValue:!!x,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(m,b,x){var S=i?.idGenerator?i.idGenerator(h):Zp(),O=new u,_,I=!1;function T(U){_=U,O.abort()}var D=function(){return Dp(this,null,function(){var U,z,Vt,be,Ft,ve,At;return Tp(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),be=(U=i?.condition)==null?void 0:U.call(i,h,{getState:b,extra:x}),Qp(be)?[4,be]:[3,2];case 1:be=y.sent(),y.label=2;case 2:if(be===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=!0,Ft=new Promise(function(v,k){return O.signal.addEventListener("abort",function(){return k({name:"AbortError",message:_||"Aborted"})})}),m(a(S,h,(z=i?.getPendingMeta)==null?void 0:z.call(i,{requestId:S,arg:h},{getState:b,extra:x}))),[4,Promise.race([Ft,Promise.resolve(o(h,{dispatch:m,getState:b,extra:x,requestId:S,signal:O.signal,abort:T,rejectWithValue:function(v,k){return new Yn(v,k)},fulfillWithValue:function(v,k){return new _l(v,k)}})).then(function(v){if(v instanceof Yn)throw v;return v instanceof _l?n(v.payload,S,h,v.meta):n(v,S,h)})])];case 3:return Vt=y.sent(),[3,5];case 4:return ve=y.sent(),Vt=ve instanceof Yn?s(null,S,h,ve.payload,ve.meta):s(ve,S,h),[3,5];case 5:return At=i&&!i.dispatchConditionRejection&&s.match(Vt)&&Vt.meta.condition,At||m(Vt),[2,Vt]}})})}();return Object.assign(D,{abort:T,requestId:S,arg:h,unwrap:function(){return D.then(Xp)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e}();function Xp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Qp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Bl="listener",Ml="completed",Fl="cancelled",Vx="task-"+Fl,Gx="task-"+Ml,jx=Bl+"-"+Fl,Kx=Bl+"-"+Ml;var Qn="listenerMiddleware";var Zx=or(Qn+"/add"),qx=or(Qn+"/removeAll"),Yx=or(Qn+"/remove");var Ll,Xx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Ll||(Ll=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Jp=function(e){return function(t){setTimeout(t,e)}},Qx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Jp(10);xl();function tu(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??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 pi=class extends tu(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ul=class e extends pi{static get(t){var o;let i=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,a=window.ftReduxStores[i];if(go(a))return a;if(n==null)return;let s=Dl({...n,reducers:(o=n.reducers)!==null&&o!==void 0?o:{}}),l=Pl({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:s.reducer(u,p)});return window.ftReduxStores[n.name]=new e(s,l)}constructor(t,o){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Jo,this.actions=new Proxy(this.reduxSlice.actions,{get:(i,n,a)=>{let s=n,l=i[s];return l?(...u)=>{let p=l(...u);return this.reduxStore.dispatch(p),p}:u=>{this.setState({[s]:u})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var yi=g(R());var ui=class extends we{async listMySearches(){let t=N.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var fi=class extends we{async listMyBookmarks(){let t=N.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ru="ft-user-assets",hi=yi.FtReduxStore.get({name:ru,initialState:{savedSearches:void 0,bookmarks:void 0}}),Jn=class{constructor(){this.currentSession=N.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new fi,this.savedSearchesService=new ui,N.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=N.getState();(0,yi.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),hi.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),hi.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();hi.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;hi.actions.bookmarks(o)}}},Wl=new Jn;var ta=class{addCommand(t,o=!1){N.commands.add(t,o)}consumeCommand(t){return N.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ta;var zl=g(R()),ea=class{highlightHtml(t,o,i){(0,zl.highlightHtml)(t,o,i)}};window.FluidTopicsHighlightHtmlService=new ea;var Hl=g(R());var ra=class{isDate(t){var o,i,n,a;return(a=(n=((i=(o=N.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]).find(l=>l.key===t))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(t,o){var i,n,a;return Hl.DateFormatter.format(t,(i=o?.locale)!==null&&i!==void 0?i:N.getState().uiLocale,(n=o?.longFormat)!==null&&n!==void 0?n:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new ra;var ou=g(R());(0,Vl.customElement)("ft-app-context")(dt);var jl=g(Z()),iu=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},oa=Symbol("i18nAttributes"),ia=Symbol("i18nListAttributes"),wr=Symbol("i18nProperties"),Oo=Symbol("i18nUnsubs");function ir(e){var t;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?Xc:Sr}i18n(n,a,...s){var l;if(typeof n=="string")return this.i18nService.resolveMessage(n,a,...s);let u=(l=n.args)!==null&&l!==void 0?l:n.argsProvider?n.argsProvider(this):[];return this.i18nService.resolveMessage(n.context,n.key,...u)}onI18nUpdate(n){var a,s,l;(a=this[oa])===null||a===void 0||a.forEach((u,p)=>{let h=this.getI18nAttributeValue(p);h&&(this[p]=this.getI18nAttributeMessage(h,u,n))}),(s=this[ia])===null||s===void 0||s.forEach((u,p)=>{let h=this.getI18nListAttributeValues(p);this[p]=h?.map(m=>this.getI18nAttributeMessage(m,u,n))}),(l=this[wr])===null||l===void 0||l.forEach((u,p)=>{u.context.toLowerCase()===n.toLowerCase()&&(this[p]=this.i18n(u))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(n,a){return{...n,message:this.i18n({context:n.context,key:n.key,...a})}}getI18nAttributeMessage(n,a,s){var l;let u=!s||((l=n.context)===null||l===void 0?void 0:l.toLowerCase())===s.toLowerCase();return n.context&&n.key&&u?this.buildI18nAttributeMessage(n,a):n}update(n){var a,s,l;super.update(n),(a=this[oa])===null||a===void 0||a.forEach((u,p)=>{let h=this.getI18nAttributeValue(p);h?.context&&h.key&&(n.has(p)||u.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,n,p),this[p]=this.getI18nAttributeMessage(h,u))}),(s=this[ia])===null||s===void 0||s.forEach((u,p)=>{let h=this.getI18nListAttributeValues(p);(n.has(p)||u.argsProvider!=null)&&(this[p]=h?.map(m=>(this.addI18nContextIfNeeded(m,n,p),this.getI18nAttributeMessage(m,u))))}),(l=this[wr])===null||l===void 0||l.forEach((u,p)=>{u.argsProvider!=null&&(this[p]=this.i18n(u))})}getI18nAttributeValue(n){return this[n]}getI18nListAttributeValues(n){return this[n]}addI18nContextIfNeeded(n,a,s){n.context&&n.key&&a.has(s)&&this.addI18nContext(n.context)}connectedCallback(){var n,a,s,l,u,p;super.connectedCallback(),new Set([...(a=(n=this[wr])===null||n===void 0?void 0:n.values())!==null&&a!==void 0?a:[],...[...(l=(s=this[oa])===null||s===void 0?void 0:s.keys())!==null&&l!==void 0?l:[]].map(h=>this.getI18nAttributeValue(h)),...[...(p=(u=this[ia])===null||u===void 0?void 0:u.keys())!==null&&p!==void 0?p:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h))}addI18nMessages(n,a){n=n.toLowerCase(),this[Oo].has(n)||this[Oo].set(n,this.i18nService.subscribe(n,()=>this.onI18nUpdate(n))),this.i18nService.prepareContext(n,a??{}),this.onI18nUpdate(n)}addI18nContext(n,a){this.addI18nMessages(typeof n=="string"?n:n.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[Oo].forEach(n=>n()),this[Oo].clear()}}return t=Oo,iu([(0,jl.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var Gl=class extends ir(gi.FtLitElement){},mi=class extends ir(gi.FtLitElementRedux){};var Co=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},me=class extends mi{constructor(){super(),this.editorMode=!1,this.addStore(N)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":bi.nothing:bi.html`
|
|
1571
|
+
`}update(t){var o,i,n,a,s;super.update(t),t.has("baseUrl")&&(N.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&N.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&N.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&N.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&N.actions.noCustom(this.noCustom),t.has("editorMode")&&N.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&N.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&N.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>Sr.addContext(l)),t.has("openExternalDocumentInNewTab")&&N.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&N.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&N.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(N.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),N.actions.availableUiLocales((n=(i=this.localesConfiguration)===null||i===void 0?void 0:i.availableUiLocales)!==null&&n!==void 0?n:[]),N.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};dt.elementDefinitions={};dt.styles=qc;$t([(0,qt.property)()],dt.prototype,"baseUrl",void 0);$t([(0,qt.property)()],dt.prototype,"apiIntegrationIdentifier",void 0);$t([(0,qt.property)()],dt.prototype,"uiLocale",void 0);$t([(0,he.jsonProperty)(null)],dt.prototype,"availableUiLocales",void 0);$t([(0,he.jsonProperty)(null)],dt.prototype,"metadataConfiguration",void 0);$t([(0,qt.property)({type:Boolean})],dt.prototype,"editorMode",void 0);$t([(0,qt.property)({type:Boolean})],dt.prototype,"noCustom",void 0);$t([(0,qt.property)({type:Boolean})],dt.prototype,"openExternalDocumentInNewTab",void 0);$t([(0,qt.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],dt.prototype,"noCustomComponent",void 0);$t([(0,qt.property)({type:Boolean})],dt.prototype,"withManualResources",void 0);$t([(0,qt.property)({type:Boolean})],dt.prototype,"navigatorOnline",void 0);$t([(0,qt.property)({type:Boolean})],dt.prototype,"forcedOffline",void 0);$t([(0,qt.property)({type:Object})],dt.prototype,"apiProvider",void 0);$t([(0,he.jsonProperty)([])],dt.prototype,"messageContexts",void 0);$t([(0,he.jsonProperty)(void 0)],dt.prototype,"session",void 0);$t([(0,qt.state)()],dt.prototype,"localesConfiguration",void 0);var eu=g(Z());function yp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var o,i,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(i=o;i--!==0;)if(!Qo(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Qo(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(i=o;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(i=o;i--!==0;){var a=n[i];if(!Qo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Qo(e,t){try{return yp(e,t)}catch{return!1}}function Rn(e,t){return!Qo(e,t)}var mp=g(Z(),1);var Jo=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(i=>i.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(i=>i.type===t);return o&&(this.queue=this.queue.filter(i=>i!==o)),o}};var mo=g(Z(),1);var Jc=g(Z(),1);function tl(e,t){let o=()=>JSON.parse(JSON.stringify(e));return(0,Jc.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:Rn,...t??{}})}var ti=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,i)=>{this.resolvePromise=o,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let i=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of i)try{await s()}catch(l){n(l);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 rl=g(B(),1);var ei=window,gp=ei.ShadowRoot&&(ei.ShadyCSS===void 0||ei.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ix=Symbol();var el=(e,t)=>{gp?e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let i=document.createElement("style"),n=ei.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=o.cssText,e.appendChild(i)})};var ri=class extends rl.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([n,a])=>t.registry.define(n,a)));let o={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(o);return el(i,t.elementStyles),i}};var oi=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},al,ol=Symbol("constructorPrototype"),il=Symbol("constructorName"),sl=Symbol("exportpartsDebouncer"),nl=Symbol("dynamicDependenciesLoaded"),Xe=class extends ri{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[al]=new ti(5),this[il]=this.constructor.name,this[ol]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[il]&&Object.setPrototypeOf(this,this[ol])}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 t=this.constructor;t[nl]||(t[nl]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){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(t.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 t,o,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&i!==void 0&&i)&&this[sl].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(t){var o,i,n,a,s,l;let u=b=>b!=null&&b.trim().length>0,p=t.filter(u).map(b=>b.trim());if(p.length===0){this.removeAttribute("exportparts");return}let h=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 x=(a=(n=b.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&a!==void 0?a:[],S=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[];new Array(...x,...S).filter(u).map(O=>O.trim()).forEach(O=>h.add(O))}if(h.size===0){this.removeAttribute("exportparts");return}let m=[...h.values()].flatMap(b=>p.map(x=>`${b}:${x}--${b}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};al=sl;oi([(0,mo.property)()],Xe.prototype,"exportpartsPrefix",void 0);oi([tl([])],Xe.prototype,"exportpartsPrefixes",void 0);oi([(0,mo.property)()],Xe.prototype,"customStylesheet",void 0);oi([(0,mo.state)()],Xe.prototype,"useAdoptedStyleSheets",void 0);function go(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var cl,ll,dl,ii=Symbol("internalReduxEventsUnsubscribers"),Qe=Symbol("internalStoresUnsubscribers"),Or=Symbol("internalStores"),bo=class extends Xe{constructor(){super(...arguments),this[cl]=new Map,this[ll]=new Map,this[dl]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Or].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Or].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[Or].get(t)}addStore(t,o){var i;o=(i=o??(go(t)?t.name:void 0))!==null&&i!==void 0?i:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[Or].delete(o)}setupStore(t,o){this[Or].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Or].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let i=this.constructor.getPropertyOptions(o);if(!i?.attribute||!this.hasAttribute(typeof i?.attribute=="string"?i.attribute:o)){let n=this.getStore(t.store);n&&(t.store?this[Qe].has(t.store):this[Qe].size>0)&&(this[o]=t.selector(n.getState(),this))}})}subscribeToStore(t,o){var i;this[Qe].set(t,o.subscribe(()=>this.updateFromStores())),go(o)&&o.eventBus&&((i=this.reduxConstructor.reduxEventListeners)===null||i===void 0||i.forEach((n,a)=>{if(typeof this[a]=="function"&&(!n.store||o.name===n.store)){let s=l=>this[a](l);o.addEventListener(n.eventName,s),this[ii].push(()=>o.removeEventListener(n.eventName,s))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Qe].forEach((t,o)=>this.unsubscribeFromStore(o)),this[ii].forEach(t=>t()),this[ii]=[]}unsubscribeFromStore(t){this[Qe].has(t)&&this[Qe].get(t)(),this[Qe].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};cl=Qe,ll=Or,dl=ii;bo.reduxProperties=new Map;bo.reduxReactiveProperties=new Set;bo.reduxEventListeners=new Map;function se(e){for(var t=arguments.length,o=Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];if(0)var n,a;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Be(e){return!!e&&!!e[nt]}function ye(e){var t;return!!e&&(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)===Ep}(e)||Array.isArray(e)||!!e[gl]||!!(!((t=e.constructor)===null||t===void 0)&&t[gl])||Dn(e)||Bn(e))}function Cr(e,t,o){o===void 0&&(o=!1),jr(e)===0?(o?Object.keys:Gr)(e).forEach(function(i){o&&typeof i=="symbol"||t(i,e[i],e)}):e.forEach(function(i,n){return t(n,i,e)})}function jr(e){var t=e[nt];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Dn(e)?2:Bn(e)?3:0}function Vr(e,t){return jr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function bp(e,t){return jr(e)===2?e.get(t):e[t]}function bl(e,t,o){var i=jr(e);i===2?e.set(t,o):i===3?e.add(o):e[t]=o}function vl(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Dn(e){return Cp&&e instanceof Map}function Bn(e){return wp&&e instanceof Set}function Je(e){return e.o||e.t}function Mn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ol(e);delete t[nt];for(var o=Gr(t),i=0;i<o.length;i++){var n=o[i],a=t[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function Fn(e,t){return t===void 0&&(t=!1),Un(e)||Be(e)||!ye(e)||(jr(e)>1&&(e.set=e.add=e.clear=e.delete=vp),Object.freeze(e),t&&Cr(e,function(o,i){return Fn(i,!0)},!0)),e}function vp(){se(2)}function Un(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ee(e){var t=$n[e];return t||se(18,e),t}function xp(e,t){$n[e]||($n[e]=t)}function Ln(){return xo}function In(e,t){t&&(Ee("Patches"),e.u=[],e.s=[],e.v=t)}function ni(e){kn(e),e.p.forEach(Sp),e.p=null}function kn(e){e===xo&&(xo=e.l)}function pl(e){return xo={p:[],l:xo,h:e,m:!0,_:0}}function Sp(e){var t=e[nt];t.i===0||t.i===1?t.j():t.g=!0}function Nn(e,t){t._=t.p.length;var o=t.p[0],i=e!==void 0&&e!==o;return t.h.O||Ee("ES5").S(t,e,i),i?(o[nt].P&&(ni(t),se(4)),ye(e)&&(e=ai(t,e),t.l||si(t,e)),t.u&&Ee("Patches").M(o[nt].t,e,t.u,t.s)):e=ai(t,o,[]),ni(t),t.u&&t.v(t.u,t.s),e!==Sl?e:void 0}function ai(e,t,o){if(Un(t))return t;var i=t[nt];if(!i)return Cr(t,function(l,u){return ul(e,i,t,l,u,o)},!0),t;if(i.A!==e)return t;if(!i.P)return si(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=Mn(i.k):i.o,a=n,s=!1;i.i===3&&(a=new Set(n),n.clear(),s=!0),Cr(a,function(l,u){return ul(e,i,n,l,u,o,s)}),si(e,n,!1),o&&e.u&&Ee("Patches").N(i,o,e.u,e.s)}return i.o}function ul(e,t,o,i,n,a,s){if(Be(n)){var l=ai(e,n,a&&t&&t.i!==3&&!Vr(t.R,i)?a.concat(i):void 0);if(bl(o,i,l),!Be(l))return;e.m=!1}else s&&o.add(n);if(ye(n)&&!Un(n)){if(!e.h.D&&e._<1)return;ai(e,n),t&&t.A.l||si(e,n)}}function si(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&Fn(t,o)}function Tn(e,t){var o=e[nt];return(o?Je(o):e)[t]}function fl(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var i=Object.getOwnPropertyDescriptor(o,t);if(i)return i;o=Object.getPrototypeOf(o)}}function tr(e){e.P||(e.P=!0,e.l&&tr(e.l))}function _n(e){e.o||(e.o=Mn(e.t))}function Pn(e,t,o){var i=Dn(t)?Ee("MapSet").F(t,o):Bn(t)?Ee("MapSet").T(t,o):e.O?function(n,a){var s=Array.isArray(n),l={i:s?1:0,A:a?a.A:Ln(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},u=l,p=So;s&&(u=[l],p=vo);var h=Proxy.revocable(u,p),m=h.revoke,b=h.proxy;return l.k=b,l.j=m,b}(t,o):Ee("ES5").J(t,o);return(o?o.A:Ln()).p.push(i),i}function Op(e){return Be(e)||se(22,e),function t(o){if(!ye(o))return o;var i,n=o[nt],a=jr(o);if(n){if(!n.P&&(n.i<4||!Ee("ES5").K(n)))return n.t;n.I=!0,i=hl(o,a),n.I=!1}else i=hl(o,a);return Cr(i,function(s,l){n&&bp(n.t,s)===l||bl(i,s,t(l))}),a===3?new Set(i):i}(e)}function hl(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Mn(e)}function xl(){function e(s,l){var u=a[s];return u?u.enumerable=l:a[s]=u={configurable:!0,enumerable:l,get:function(){var p=this[nt];return So.get(p,s)},set:function(p){var h=this[nt];So.set(h,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][nt];if(!u.P)switch(u.i){case 5:i(u)&&tr(u);break;case 4:o(u)&&tr(u)}}}function o(s){for(var l=s.t,u=s.k,p=Gr(u),h=p.length-1;h>=0;h--){var m=p[h];if(m!==nt){var b=l[m];if(b===void 0&&!Vr(l,m))return!0;var x=u[m],S=x&&x[nt];if(S?S.t!==b:!vl(x,b))return!0}}var O=!!l[nt];return p.length!==Gr(l).length+(O?0:1)}function i(s){var l=s.k;if(l.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function n(s){s.g&&se(3,JSON.stringify(Je(s)))}var a={};xp("ES5",{J:function(s,l){var u=Array.isArray(s),p=function(m,b){if(m){for(var x=Array(b.length),S=0;S<b.length;S++)Object.defineProperty(x,""+S,e(S,!0));return x}var O=Ol(b);delete O[nt];for(var _=Gr(O),I=0;I<_.length;I++){var T=_[I];O[T]=e(T,m||!!O[T].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(u,s),h={i:u?5:4,A:l?l.A:Ln(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,nt,{value:h,writable:!0}),p},S:function(s,l,u){u?Be(l)&&l[nt].A===s&&t(s.p):(s.u&&function p(h){if(h&&typeof h=="object"){var m=h[nt];if(m){var b=m.t,x=m.k,S=m.R,O=m.i;if(O===4)Cr(x,function(U){U!==nt&&(b[U]!==void 0||Vr(b,U)?S[U]||p(x[U]):(S[U]=!0,tr(m)))}),Cr(b,function(U){x[U]!==void 0||Vr(x,U)||(S[U]=!1,tr(m))});else if(O===5){if(i(m)&&(tr(m),S.length=!0),x.length<b.length)for(var _=x.length;_<b.length;_++)S[_]=!1;else for(var I=b.length;I<x.length;I++)S[I]=!0;for(var T=Math.min(x.length,b.length),D=0;D<T;D++)x.hasOwnProperty(D)||(S[D]=!0),S[D]===void 0&&p(x[D])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):i(s)}})}var yl,xo,Wn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Cp=typeof Map<"u",wp=typeof Set<"u",ml=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Sl=Wn?Symbol.for("immer-nothing"):((yl={})["immer-nothing"]=!0,yl),gl=Wn?Symbol.for("immer-draftable"):"__$immer_draftable",nt=Wn?Symbol.for("immer-state"):"__$immer_state";var Ep=""+Object.prototype.constructor,Gr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ol=Object.getOwnPropertyDescriptors||function(e){var t={};return Gr(e).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)}),t},$n={},So={get:function(e,t){if(t===nt)return e;var o=Je(e);if(!Vr(o,t))return function(n,a,s){var l,u=fl(a,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(n.k):void 0}(e,o,t);var i=o[t];return e.I||!ye(i)?i:i===Tn(e.t,t)?(_n(e),e.o[t]=Pn(e.A.h,i,e)):i},has:function(e,t){return t in Je(e)},ownKeys:function(e){return Reflect.ownKeys(Je(e))},set:function(e,t,o){var i=fl(Je(e),t);if(i?.set)return i.set.call(e.k,o),!0;if(!e.P){var n=Tn(Je(e),t),a=n?.[nt];if(a&&a.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(vl(o,n)&&(o!==void 0||Vr(e.t,t)))return!0;_n(e),tr(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return Tn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,_n(e),tr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=Je(e),i=Reflect.getOwnPropertyDescriptor(o,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:o[t]}},defineProperty:function(){se(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){se(12)}},vo={};Cr(So,function(e,t){vo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),vo.deleteProperty=function(e,t){return vo.set.call(this,e,t,void 0)},vo.set=function(e,t,o){return So.set.call(this,e[0],t,o,e[0])};var Ap=function(){function e(o){var i=this;this.O=ml,this.D=!0,this.produce=function(n,a,s){if(typeof n=="function"&&typeof a!="function"){var l=a;a=n;var u=i;return function(O){var _=this;O===void 0&&(O=l);for(var I=arguments.length,T=Array(I>1?I-1:0),D=1;D<I;D++)T[D-1]=arguments[D];return u.produce(O,function(U){var z;return(z=a).call.apply(z,[_,U].concat(T))})}}var p;if(typeof a!="function"&&se(6),s!==void 0&&typeof s!="function"&&se(7),ye(n)){var h=pl(i),m=Pn(i,n,void 0),b=!0;try{p=a(m),b=!1}finally{b?ni(h):kn(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(O){return In(h,s),Nn(O,h)},function(O){throw ni(h),O}):(In(h,s),Nn(p,h))}if(!n||typeof n!="object"){if((p=a(n))===void 0&&(p=n),p===Sl&&(p=void 0),i.D&&Fn(p,!0),s){var x=[],S=[];Ee("Patches").M(n,p,x,S),s(x,S)}return p}se(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(p){for(var h=arguments.length,m=Array(h>1?h-1:0),b=1;b<h;b++)m[b-1]=arguments[b];return i.produceWithPatches(p,function(x){return n.apply(void 0,[x].concat(m))})};var s,l,u=i.produce(n,a,function(p,h){s=p,l=h});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,s,l]}):[u,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){ye(o)||se(8),Be(o)&&(o=Op(o));var i=pl(this),n=Pn(this,o,void 0);return n[nt].C=!0,kn(i),n},t.finishDraft=function(o,i){var n=o&&o[nt],a=n.A;return In(a,i),Nn(void 0,a)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!ml&&se(20),this.O=o},t.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=Ee("Patches").$;return Be(o)?s(o,i):this.produce(o,function(l){return s(l,i)})},e}(),re=new Ap,Rp=re.produce,mx=re.produceWithPatches.bind(re),gx=re.setAutoFreeze.bind(re),bx=re.setUseProxies.bind(re),vx=re.applyPatches.bind(re),xx=re.createDraft.bind(re),Sx=re.finishDraft.bind(re),ci=Rp;function er(e){"@babel/helpers - typeof";return er=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},er(e)}function zn(e,t){if(er(e)!=="object"||e===null)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var i=o.call(e,t||"default");if(er(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hn(e){var t=zn(e,"string");return er(t)==="symbol"?t:String(t)}function Vn(e,t,o){return t=Hn(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Cl(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),o.push.apply(o,i)}return o}function li(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Cl(Object(o),!0).forEach(function(i){Vn(e,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Cl(Object(o)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i))})}return e}function Dt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var wl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Gn=function(){return Math.random().toString(36).substring(7).split("").join(".")},di={INIT:"@@redux/INIT"+Gn(),REPLACE:"@@redux/REPLACE"+Gn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Gn()}};function Ip(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function jn(e,t,o){var i;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Dt(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Dt(1));return o(jn)(e,t)}if(typeof e!="function")throw new Error(Dt(2));var n=e,a=t,s=[],l=s,u=!1;function p(){l===s&&(l=s.slice())}function h(){if(u)throw new Error(Dt(3));return a}function m(O){if(typeof O!="function")throw new Error(Dt(4));if(u)throw new Error(Dt(5));var _=!0;return p(),l.push(O),function(){if(_){if(u)throw new Error(Dt(6));_=!1,p();var T=l.indexOf(O);l.splice(T,1),s=null}}}function b(O){if(!Ip(O))throw new Error(Dt(7));if(typeof O.type>"u")throw new Error(Dt(8));if(u)throw new Error(Dt(9));try{u=!0,a=n(a,O)}finally{u=!1}for(var _=s=l,I=0;I<_.length;I++){var T=_[I];T()}return O}function x(O){if(typeof O!="function")throw new Error(Dt(10));n=O,b({type:di.REPLACE})}function S(){var O,_=m;return O={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(Dt(11));function D(){T.next&&T.next(h())}D();var U=_(D);return{unsubscribe:U}}},O[wl]=function(){return this},O}return b({type:di.INIT}),i={dispatch:b,subscribe:m,getState:h,replaceReducer:x},i[wl]=S,i}function Np(e){Object.keys(e).forEach(function(t){var o=e[t],i=o(void 0,{type:di.INIT});if(typeof i>"u")throw new Error(Dt(12));if(typeof o(void 0,{type:di.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Dt(13))})}function El(e){for(var t=Object.keys(e),o={},i=0;i<t.length;i++){var n=t[i];typeof e[n]=="function"&&(o[n]=e[n])}var a=Object.keys(o),s,l;try{Np(o)}catch(u){l=u}return function(p,h){if(p===void 0&&(p={}),l)throw l;if(0)var m;for(var b=!1,x={},S=0;S<a.length;S++){var O=a[S],_=o[O],I=p[O],T=_(I,h);if(typeof T>"u"){var D=h&&h.type;throw new Error(Dt(14))}x[O]=T,b=b||T!==I}return b=b||a.length!==Object.keys(p).length,b?x:p}}function Kr(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(i){return i}:t.length===1?t[0]:t.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function Al(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(i){return function(){var n=i.apply(void 0,arguments),a=function(){throw new Error(Dt(15))},s={getState:n.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return a=Kr.apply(void 0,l)(n.dispatch),li(li({},n),{},{dispatch:a})}}}function Rl(e){var t=function(i){var n=i.dispatch,a=i.getState;return function(s){return function(l){return typeof l=="function"?l(n,a,e):s(l)}}};return t}var Il=Rl();Il.withExtraArgument=Rl;var Kn=Il;var kl=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function i(){this.constructor=t}t.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)}}(),Tp=function(e,t){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:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(h){return u([p,h])}}function u(p){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(a=p[0]&2?n.return:p[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,p[1])).done)return a;switch(n=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,n=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){o.label=p[1];break}if(p[0]===6&&o.label<a[1]){o.label=a[1],a=p;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(p);break}a[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(h){p=[6,h],n=0}finally{i=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Zr=function(e,t){for(var o=0,i=t.length,n=e.length;o<i;o++,n++)e[n]=t[o];return e},_p=Object.defineProperty,Lp=Object.defineProperties,kp=Object.getOwnPropertyDescriptors,Nl=Object.getOwnPropertySymbols,Pp=Object.prototype.hasOwnProperty,$p=Object.prototype.propertyIsEnumerable,Tl=function(e,t,o){return t in e?_p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},rr=function(e,t){for(var o in t||(t={}))Pp.call(t,o)&&Tl(e,o,t[o]);if(Nl)for(var i=0,n=Nl(t);i<n.length;i++){var o=n[i];$p.call(t,o)&&Tl(e,o,t[o])}return e},Zn=function(e,t){return Lp(e,kp(t))},Dp=function(e,t,o){return new Promise(function(i,n){var a=function(u){try{l(o.next(u))}catch(p){n(p)}},s=function(u){try{l(o.throw(u))}catch(p){n(p)}},l=function(u){return u.done?i(u.value):Promise.resolve(u.value).then(a,s)};l((o=o.apply(e,t)).next())})};var Bp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Kr:Kr.apply(null,arguments)},Fx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Mp(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var Fp=function(e){kl(t,e);function t(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var n=e.apply(this,o)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return e.prototype.concat.apply(this,o)},t.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(t.bind.apply(t,Zr([void 0],o[0].concat(this)))):new(t.bind.apply(t,Zr([void 0],o.concat(this))))},t}(Array),Up=function(e){kl(t,e);function t(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var n=e.apply(this,o)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return e.prototype.concat.apply(this,o)},t.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(t.bind.apply(t,Zr([void 0],o[0].concat(this)))):new(t.bind.apply(t,Zr([void 0],o.concat(this))))},t}(Array);function Xn(e){return ye(e)?ci(e,function(){}):e}function Wp(e){return typeof e=="boolean"}function zp(){return function(t){return Hp(t)}}function Hp(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,i=e.immutableCheck,n=i===void 0?!0:i,a=e.serializableCheck,s=a===void 0?!0:a,l=new Fp;if(o&&(Wp(o)?l.push(Kn):l.push(Kn.withExtraArgument(o.extraArgument))),0){if(n)var u;if(s)var p}return l}var qn=!0;function Pl(e){var t=zp(),o=e||{},i=o.reducer,n=i===void 0?void 0:i,a=o.middleware,s=a===void 0?t():a,l=o.devTools,u=l===void 0?!0:l,p=o.preloadedState,h=p===void 0?void 0:p,m=o.enhancers,b=m===void 0?void 0:m,x;if(typeof n=="function")x=n;else if(Mp(n))x=El(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 S=s;if(typeof S=="function"&&(S=S(t),!qn&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!qn&&S.some(function(U){return typeof U!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Al.apply(void 0,S),_=Kr;u&&(_=Bp(rr({trace:!qn},typeof u=="object"&&u)));var I=new Up(O),T=I;Array.isArray(b)?T=Zr([O],b):typeof b=="function"&&(T=b(I));var D=_.apply(void 0,T);return jn(x,h,D)}function or(e,t){function o(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(t){var a=t.apply(void 0,i);if(!a)throw new Error("prepareAction did not return an object");return rr(rr({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:i[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(i){return i.type===e},o}function $l(e){var t={},o=[],i,n={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,n},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),n},addDefaultCase:function(a){return i=a,n}};return e(n),[t,o,i]}function Vp(e){return typeof e=="function"}function Gp(e,t,o,i){o===void 0&&(o=[]);var n=typeof t=="function"?$l(t):[t,o,i],a=n[0],s=n[1],l=n[2],u;if(Vp(e))u=function(){return Xn(e())};else{var p=Xn(e);u=function(){return p}}function h(m,b){m===void 0&&(m=u());var x=Zr([a[b.type]],s.filter(function(S){var O=S.matcher;return O(b)}).map(function(S){var O=S.reducer;return O}));return x.filter(function(S){return!!S}).length===0&&(x=[l]),x.reduce(function(S,O){if(O)if(Be(S)){var _=S,I=O(_,b);return I===void 0?S:I}else{if(ye(S))return ci(S,function(T){return O(T,b)});var I=O(S,b);if(I===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return S},m)}return h.getInitialState=u,h}function jp(e,t){return e+"/"+t}function Dl(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:Xn(e.initialState),i=e.reducers||{},n=Object.keys(i),a={},s={},l={};n.forEach(function(h){var m=i[h],b=jp(t,h),x,S;"reducer"in m?(x=m.reducer,S=m.prepare):x=m,a[h]=x,s[b]=x,l[h]=S?or(b,S):or(b)});function u(){var h=typeof e.extraReducers=="function"?$l(e.extraReducers):[e.extraReducers],m=h[0],b=m===void 0?{}:m,x=h[1],S=x===void 0?[]:x,O=h[2],_=O===void 0?void 0:O,I=rr(rr({},b),s);return Gp(o,function(T){for(var D in I)T.addCase(D,I[D]);for(var U=0,z=S;U<z.length;U++){var Vt=z[U];T.addMatcher(Vt.matcher,Vt.reducer)}_&&T.addDefaultCase(_)})}var p;return{name:t,reducer:function(h,m){return p||(p=u()),p(h,m)},actions:l,caseReducers:a,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Kp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Zp=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=Kp[Math.random()*64|0];return t},qp=["name","message","stack","code"],Yn=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),_l=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),Yp=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,i=qp;o<i.length;o++){var n=i[o];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},Hx=function(){function e(t,o,i){var n=or(t+"/fulfilled",function(h,m,b,x){return{payload:h,meta:Zn(rr({},x||{}),{arg:b,requestId:m,requestStatus:"fulfilled"})}}),a=or(t+"/pending",function(h,m,b){return{payload:void 0,meta:Zn(rr({},b||{}),{arg:m,requestId:h,requestStatus:"pending"})}}),s=or(t+"/rejected",function(h,m,b,x,S){return{payload:x,error:(i&&i.serializeError||Yp)(h||"Rejected"),meta:Zn(rr({},S||{}),{arg:b,requestId:m,rejectedWithValue:!!x,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(m,b,x){var S=i?.idGenerator?i.idGenerator(h):Zp(),O=new u,_,I=!1;function T(U){_=U,O.abort()}var D=function(){return Dp(this,null,function(){var U,z,Vt,be,Ft,ve,At;return Tp(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),be=(U=i?.condition)==null?void 0:U.call(i,h,{getState:b,extra:x}),Qp(be)?[4,be]:[3,2];case 1:be=y.sent(),y.label=2;case 2:if(be===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=!0,Ft=new Promise(function(v,k){return O.signal.addEventListener("abort",function(){return k({name:"AbortError",message:_||"Aborted"})})}),m(a(S,h,(z=i?.getPendingMeta)==null?void 0:z.call(i,{requestId:S,arg:h},{getState:b,extra:x}))),[4,Promise.race([Ft,Promise.resolve(o(h,{dispatch:m,getState:b,extra:x,requestId:S,signal:O.signal,abort:T,rejectWithValue:function(v,k){return new Yn(v,k)},fulfillWithValue:function(v,k){return new _l(v,k)}})).then(function(v){if(v instanceof Yn)throw v;return v instanceof _l?n(v.payload,S,h,v.meta):n(v,S,h)})])];case 3:return Vt=y.sent(),[3,5];case 4:return ve=y.sent(),Vt=ve instanceof Yn?s(null,S,h,ve.payload,ve.meta):s(ve,S,h),[3,5];case 5:return At=i&&!i.dispatchConditionRejection&&s.match(Vt)&&Vt.meta.condition,At||m(Vt),[2,Vt]}})})}();return Object.assign(D,{abort:T,requestId:S,arg:h,unwrap:function(){return D.then(Xp)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e}();function Xp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Qp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Bl="listener",Ml="completed",Fl="cancelled",Vx="task-"+Fl,Gx="task-"+Ml,jx=Bl+"-"+Fl,Kx=Bl+"-"+Ml;var Qn="listenerMiddleware";var Zx=or(Qn+"/add"),qx=or(Qn+"/removeAll"),Yx=or(Qn+"/remove");var Ll,Xx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Ll||(Ll=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Jp=function(e){return function(t){setTimeout(t,e)}},Qx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Jp(10);xl();function tu(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??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 pi=class extends tu(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ul=class e extends pi{static get(t){var o;let i=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,a=window.ftReduxStores[i];if(go(a))return a;if(n==null)return;let s=Dl({...n,reducers:(o=n.reducers)!==null&&o!==void 0?o:{}}),l=Pl({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:s.reducer(u,p)});return window.ftReduxStores[n.name]=new e(s,l)}constructor(t,o){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Jo,this.actions=new Proxy(this.reduxSlice.actions,{get:(i,n,a)=>{let s=n,l=i[s];return l?(...u)=>{let p=l(...u);return this.reduxStore.dispatch(p),p}:u=>{this.setState({[s]:u})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var yi=g(R());var ui=class extends we{async listMySearches(){let t=N.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var fi=class extends we{async listMyBookmarks(){let t=N.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ru="ft-user-assets",hi=yi.FtReduxStore.get({name:ru,initialState:{savedSearches:void 0,bookmarks:void 0}}),Jn=class{constructor(){this.currentSession=N.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new fi,this.savedSearchesService=new ui,N.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=N.getState();(0,yi.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),hi.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),hi.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();hi.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;hi.actions.bookmarks(o)}}},Wl=new Jn;var ta=class{addCommand(t,o=!1){N.commands.add(t,o)}consumeCommand(t){return N.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ta;var zl=g(R()),ea=class{highlightHtml(t,o,i){(0,zl.highlightHtml)(t,o,i)}};window.FluidTopicsHighlightHtmlService=new ea;var Hl=g(R());var ra=class{isDate(t){var o,i,n,a;return(a=(n=((i=(o=N.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]).find(l=>l.key===t))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(t,o){var i,n,a;return Hl.DateFormatter.format(t,(i=o?.locale)!==null&&i!==void 0?i:N.getState().uiLocale,(n=o?.longFormat)!==null&&n!==void 0?n:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new ra;var ou=g(R());(0,Vl.customElement)("ft-app-context")(dt);var jl=g(Z()),iu=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},oa=Symbol("i18nAttributes"),ia=Symbol("i18nListAttributes"),wr=Symbol("i18nProperties"),Oo=Symbol("i18nUnsubs");function ir(e){var t;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?Xc:Sr}i18n(n,a,...s){var l;if(typeof n=="string")return this.i18nService.resolveMessage(n,a,...s);let u=(l=n.args)!==null&&l!==void 0?l:n.argsProvider?n.argsProvider(this):[];return this.i18nService.resolveMessage(n.context,n.key,...u)}onI18nUpdate(n){var a,s,l;(a=this[oa])===null||a===void 0||a.forEach((u,p)=>{let h=this.getI18nAttributeValue(p);h&&(this[p]=this.getI18nAttributeMessage(h,u,n))}),(s=this[ia])===null||s===void 0||s.forEach((u,p)=>{let h=this.getI18nListAttributeValues(p);this[p]=h?.map(m=>this.getI18nAttributeMessage(m,u,n))}),(l=this[wr])===null||l===void 0||l.forEach((u,p)=>{u.context.toLowerCase()===n.toLowerCase()&&(this[p]=this.i18n(u))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(n,a){return{...n,message:this.i18n({context:n.context,key:n.key,...a})}}getI18nAttributeMessage(n,a,s){var l;let u=!s||((l=n.context)===null||l===void 0?void 0:l.toLowerCase())===s.toLowerCase();return n.context&&n.key&&u?this.buildI18nAttributeMessage(n,a):n}update(n){var a,s,l;super.update(n),(a=this[oa])===null||a===void 0||a.forEach((u,p)=>{let h=this.getI18nAttributeValue(p);h?.context&&h.key&&(n.has(p)||u.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,n,p),this[p]=this.getI18nAttributeMessage(h,u))}),(s=this[ia])===null||s===void 0||s.forEach((u,p)=>{let h=this.getI18nListAttributeValues(p);(n.has(p)||u.argsProvider!=null)&&(this[p]=h?.map(m=>(this.addI18nContextIfNeeded(m,n,p),this.getI18nAttributeMessage(m,u))))}),(l=this[wr])===null||l===void 0||l.forEach((u,p)=>{u.argsProvider!=null&&(this[p]=this.i18n(u))})}getI18nAttributeValue(n){return this[n]}getI18nListAttributeValues(n){return this[n]}addI18nContextIfNeeded(n,a,s){n.context&&n.key&&a.has(s)&&this.addI18nContext(n.context)}connectedCallback(){var n,a,s,l,u,p;super.connectedCallback(),new Set([...(a=(n=this[wr])===null||n===void 0?void 0:n.values())!==null&&a!==void 0?a:[],...[...(l=(s=this[oa])===null||s===void 0?void 0:s.keys())!==null&&l!==void 0?l:[]].map(h=>this.getI18nAttributeValue(h)),...[...(p=(u=this[ia])===null||u===void 0?void 0:u.keys())!==null&&p!==void 0?p:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h))}addI18nMessages(n,a){n=n.toLowerCase(),this[Oo].has(n)||this[Oo].set(n,this.i18nService.subscribe(n,()=>this.onI18nUpdate(n))),this.i18nService.prepareContext(n,a??{}),this.onI18nUpdate(n)}addI18nContext(n,a){this.addI18nMessages(typeof n=="string"?n:n.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[Oo].forEach(n=>n()),this[Oo].clear()}}return t=Oo,iu([(0,jl.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var Gl=class extends ir(gi.FtLitElement){},mi=class extends ir(gi.FtLitElementRedux){};var Co=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},me=class extends mi{constructor(){super(),this.editorMode=!1,this.addStore(N)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":bi.nothing:bi.html`
|
|
1572
1572
|
<span class="ft-i18n">
|
|
1573
1573
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1574
1574
|
</span>
|
|
@@ -1832,15 +1832,15 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1832
1832
|
.variant=${this.iconVariant}
|
|
1833
1833
|
.value=${this.icon}
|
|
1834
1834
|
@click=${()=>{var t;return(t=this.input)===null||t===void 0?void 0:t.focus()}}></ft-icon>
|
|
1835
|
-
`:Yt.nothing}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&t.get("value")!=null&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&t.get("dispatchedValue")!=null&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach(t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase())),this.visibleSuggestions=this.suggestions.filter(t=>!t.hidden)):this.visibleSuggestions=this.suggestions,this.newValueSuggestion&&(this.visibleSuggestions=[...this.visibleSuggestions,this.newValueSuggestion])}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&(this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px",Uo(this.mainPanel,this.suggestionsContainer,"bottom").then(({x:o,y:i})=>{this.suggestionsContainer.style.left=`${o}px`,this.suggestionsContainer.style.top=`${i}px`}))}setValue(t,o=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),o&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var o;let i=((o=this.input)===null||o===void 0?void 0:o.value)||"";this.setValue(i,t.key=="Escape"||t.key=="Enter")}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var o;if(t.key==="ArrowDown"||t.key==="ArrowUp"){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;let i=this.visibleSuggestions.findIndex(a=>a.matches(":focus-within")),n;t.key==="ArrowDown"?n=i<this.visibleSuggestions.length-1?i+1:0:n=i>0?i-1:this.visibleSuggestions.length-1,(o=this.visibleSuggestions[n])===null||o===void 0||o.focus()}(t.key=="Escape"||t.key=="Enter")&&(this.hideSuggestions=!0)}onSuggestionSelected(t){var o;this.setValue(t.detail,!0),(o=this.input)===null||o===void 0||o.focus(),setTimeout(()=>this.hideSuggestions=!0,0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,o;!((t=this.mainPanel)===null||t===void 0)&&t.matches(":focus-within")||(this.focused=!1,this.setValue(((o=this.input)===null||o===void 0?void 0:o.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}};W.elementDefinitions={"ft-input-label":Ht,"ft-ripple":j,"ft-typography":ft,"ft-icon":vt,"ft-text-field-suggestion":ce};W.styles=[kr,qr.noTextInputDefaultClearButton,Yl];q([(0,G.property)()],W.prototype,"label",void 0);q([(0,G.property)({noAccessor:!0})],W.prototype,"value",null);q([(0,G.state)()],W.prototype,"dispatchedValue",void 0);q([(0,G.property)()],W.prototype,"helper",void 0);q([(0,G.property)()],W.prototype,"suggestionsHelper",void 0);q([(0,G.property)({type:Boolean})],W.prototype,"outlined",void 0);q([(0,G.property)({type:Boolean})],W.prototype,"disabled",void 0);q([(0,G.property)({type:Boolean})],W.prototype,"error",void 0);q([(0,G.property)({type:Boolean})],W.prototype,"fixedMenuPosition",void 0);q([(0,G.property)()],W.prototype,"prefix",void 0);q([(0,G.property)()],W.prototype,"icon",void 0);q([(0,G.property)()],W.prototype,"name",void 0);q([(0,G.property)()],W.prototype,"type",void 0);q([(0,G.property)()],W.prototype,"passwordHiddenIcon",void 0);q([(0,G.property)()],W.prototype,"passwordRevealedIcon",void 0);q([(0,G.property)()],W.prototype,"iconVariant",void 0);q([(0,G.property)({type:Boolean})],W.prototype,"filterSuggestions",void 0);q([(0,G.property)({type:Number})],W.prototype,"maxLength",void 0);q([(0,G.property)({type:Boolean})],W.prototype,"password",void 0);q([(0,G.state)()],W.prototype,"focused",void 0);q([(0,G.state)()],W.prototype,"hidePassword",void 0);q([(0,G.state)()],W.prototype,"hideSuggestions",void 0);q([(0,G.state)()],W.prototype,"visibleSuggestions",void 0);q([(0,G.query)(".ft-text-field--main-panel")],W.prototype,"mainPanel",void 0);q([(0,G.query)(".ft-text-field--input")],W.prototype,"input",void 0);q([(0,G.query)(".ft-text-field-suggestion--new-value")],W.prototype,"newValueSuggestion",void 0);q([(0,G.query)(".ft-text-field--suggestions")],W.prototype,"suggestionsContainer",void 0);q([(0,G.queryAssignedElements)({selector:"ft-text-field-suggestion"})],W.prototype,"suggestions",void 0);(0,sa.customElement)("ft-text-field")(W);(0,sa.customElement)("ft-text-field-suggestion")(ce);var Rd=g(R());var Eo=g(B()),sr=g(Z()),Xt=g(R());var ge=g(R());var rd=g(R()),od=e=>rd.FtReduxStore.get({name:"ft-reader-"+e,initialState:{mapId:void 0,visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0}});var ca=class{constructor(t,o){this.mapId=t,this.paginatedToc=o,this.nodeByTocId={},this.nodeByUrl={},this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,o,i){return t.flatMap(n=>(n.pageConfiguration&&this.registerPage(this.buildPage(n,i)),n.tocId==null?this.extractPagesToc(n.children,o,i):[{tocId:n.tocId,title:n.title,depth:o,children:this.extractPagesToc(n.children,o+1,n.tocId)}]))}convertNodes(t,o,i){return t.flatMap(n=>{var a,s,l;if(n.tocId==null)return[...this.convertSectionNodes((a=n.pageToc)!==null&&a!==void 0?a:[],o,n.tocId),...this.convertNodes(n.children,o,n.tocId)];let u=(s=n.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),p={tocId:n.tocId,contentId:n.contentId,title:n.title,hasRating:n.hasRating,origin:n.origin,prettyUrl:u,depth:o,parentTocId:i,children:[]};this.register(p);let h=this.convertSectionNodes((l=n.pageToc)!==null&&l!==void 0?l:[],o+1,n.tocId),m=this.convertNodes(n.children,o+1,p.tocId);return p.children=[...h,...m],[p]})}convertSectionNodes(t,o,i){return t.flatMap(n=>{var a;let s=(a=n.prettyUrl)===null||a===void 0?void 0:a.replace(/^\//,""),l={...n,prettyUrl:s,depth:o,parentTocId:i,children:[]};return this.register(l),l.children=this.convertSectionNodes(n.children,o+1,n.tocId),[l]})}buildPage(t,o){var i,n,a,s,l,u;let p={number:this.pages.length+1,title:(i=t.title)!==null&&i!==void 0?i:"",rootTocId:(n=t.tocId)!==null&&n!==void 0?n:"root",toc:((a=t.pageToc)!==null&&a!==void 0?a:[]).map(b=>this.nodeByTocId[b.tocId]),topics:[],hiddenTopics:[],breadcrumb:o?this.buildBreadcrumb(this.nodeByTocId[o]):[]},h=(b,x)=>(x?p.topics:p.hiddenTopics).push(b),m=(l=(s=t.pageConfiguration)===null||s===void 0?void 0:s.parentsVisibility)!==null&&l!==void 0?l:[];return p.breadcrumb.forEach((b,x)=>{h(b,m[x])}),t.tocId&&h(t.tocId,t.pageConfiguration.isVisible),p.topics.push(...this.tocIds((u=t.pageToc)!==null&&u!==void 0?u:[])),p}registerPage(t){for(let o of[...t.topics,...t.hiddenTopics])this.pageByTocId[o]||(this.pageByTocId[o]=t);this.pages.push(t)}tocIds(t){return t.flatMap(o=>[o.tocId,...this.tocIds(o.children)])}buildBreadcrumb(t){let o=[t.tocId];for(;t?.parentTocId;)o.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return o}register(t){t.prettyUrl&&(this.nodeByUrl[t.prettyUrl]==null?this.nodeByUrl[t.prettyUrl]=t:this.duplicatedPrettyUrls.add(t.prettyUrl)),this.nodeByUrl[`${this.mapId}/${t.tocId}`]=t,this.nodeByTocId[t.tocId]=t}},Ci=class{convertPaginatedToc(t,o){return new ca(t,o).build()}};var au=g(nd(),1);var ad;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(ad||(ad={}));var sd;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(sd||(sd={}));var cd;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(cd||(cd={}));var ld;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT"})(ld||(ld={}));var dd;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(dd||(dd={}));var pd;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(pd||(pd={}));var ud;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ud||(ud={}));var Me;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Me||(Me={}));var fd;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(fd||(fd={}));var hd;(function(e){e.ASC="ASC",e.DESC="DESC"})(hd||(hd={}));var yd;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(yd||(yd={}));var md;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(md||(md={}));var gd;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK"})(gd||(gd={}));var bd;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(bd||(bd={}));var vd;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK"})(vd||(vd={}));var xd;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(xd||(xd={}));var Sd;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC"})(Sd||(Sd={}));var Od;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS"})(Od||(Od={}));var nt;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN",e.DEVELOPER="DEVELOPER"})(nt||(nt={}));var Cd;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Cd||(Cd={}));var nu={[nt.PERSONAL_BOOK_SHARE_USER]:[nt.PERSONAL_BOOK_USER],[nt.HTML_EXPORT_USER]:[nt.PERSONAL_BOOK_USER],[nt.PDF_EXPORT_USER]:[nt.PERSONAL_BOOK_USER],[nt.KHUB_ADMIN]:[nt.CONTENT_PUBLISHER],[nt.ADMIN]:[nt.KHUB_ADMIN,nt.USERS_ADMIN,nt.PORTAL_ADMIN],[nt.DEVELOPER]:[nt.BETA_USER,nt.DEBUG_USER]};function wd(e,t){return e===t||(nu[e]??[]).some(o=>wd(o,t))}function Ar(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(i=>wd(i,t))}var Ai=class extends we{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,o,i){super(!1,o),this.converter=t,this._mapId=i,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.registerFinal("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(t=>this.fetchMap(t))),this.cache.register("enrichedToc",()=>this.withMapId(t=>this.fetchPages(t).then(o=>this.converter.convertPaginatedToc(t,o)))),this.cache.register("ratingSummary",()=>{var t,o;return Ar((o=(t=N.getState().session)===null||t===void 0?void 0:t.profile.roles)!==null&&o!==void 0?o:[],"RATING_USER")?this.withMapId(n=>this.fetchMapRating(n)):Promise.resolve()})}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getMapNow(){return this.cache.getNow("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var o;return(o=this.enrichedToc)===null||o===void 0?void 0:o.nodeByTocId[t]}getTocNodeNowByUrl(t){var o,i;let n=this.getMapNow();return n?.prettyUrl==t||`${n?.id}/root`===t?(o=this.enrichedToc)===null||o===void 0?void 0:o.toc[0]:(i=this.enrichedToc)===null||i===void 0?void 0:i.nodeByUrl[t]}async getPage(t){let o=await this.getEnrichedToc();return o.pages[t-1]||o.pages[0]}async getPageByTocId(t){let o=await this.getEnrichedToc();return o.pageByTocId[t]||o.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,()=>this.fetchTopicMetadata(t))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,()=>this.fetchTopicHTMLContent(t))}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}getRelativesForDocument(t,o){return this.cache.get("document-relatives-"+t+"-"+o.join("-"),()=>this.fetchRelativesForDocument(t,o))}getRelativesForTopicInMap(t,o,i){return this.cache.get("topic-relatives-"+[t,o,...i].join("-"),()=>this.fetchRelativesForTopicInMap(t,o,i))}getAttachmentDownloadLink(t){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(t).content}?download=true`)}getLink(t,o,i){let n=this.getNavigationData(t,o,i),a=this.getReaderLinkPrefix()+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),s=new URL(a,this.api.tenantBaseUrl);return n.page!=null&&s.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&s.searchParams.set("tocId",n.tocId),n.section!=null&&s.searchParams.set("section",n.section),s.href}getNavigationData(t,o,i){var n,a;t=t||"root";let s=this.enrichedToc,l=s?.pageByTocId[t],u=s?.nodeByTocId[t],p=u?.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:(n=u?.title)!==null&&n!==void 0?n:"",page:o&&l&&l.number!==o?o:void 0,prettyUrl:p?.replace(/^r\//,""),prettyUrlDuplicated:(a=s?.duplicatedPrettyUrls.has(p??""))!==null&&a!==void 0?a:!1,section:i}}async getAccurateNavigationData(t,o,i){return await this.getEnrichedToc(),this.getNavigationData(t,o,i)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(t=>t?.publication)}getTopicRating(t){return this.getRatingSummary().then(o=>{var i;return o?{type:o.topics.type,rating:(i=o.topics)===null||i===void 0?void 0:i.ratings.find(n=>n.tocId===t)}:void 0})}rateMap(t,o){return this.makeRateMapRequest(t,o).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(t,o){return this.makeMapFeedbackRequest(t,o)}rateTopic(t,o,i){return this.makeRateTopicRequest(t,o,i).then(()=>this.clearRatingIfNecessary())}unrateTopic(t){return this.makeUnrateTopicRequest(t).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let t=N.getState().session;t?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,o,i){return this.makeTopicFeedbackRequest(t,o,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t){let o=this.getTocNodeNow(t),i=[{tocId:o.tocId,title:o.title}],n=this.getTocNodeNow(o.parentTocId);for(;n;)i.unshift({tocId:n.tocId,title:n.title}),n=this.getTocNodeNow(n.parentTocId);return i}isFeatureAccessible(t,{session:o,ratingType:i}){var n;if(!this.isFeatureAvailable(t))return!1;switch(t){case oe.FEEDBACK:return Ar(o??[],nt.FEEDBACK_USER);case oe.RATING:return Ar(o??[],nt.RATING_USER)&&i!=null&&i!==Me.NO_RATING;case oe.PRINT:return Ar(o??[],nt.PRINT_USER);case oe.BOOKMARK:return!!o?.sessionAuthenticated;case oe.COLLECTIONS:return Ar(o??[],nt.COLLECTION_USER);case oe.PERSONAL_BOOKS:return Ar(o??[],nt.PERSONAL_BOOK_USER)&&!(!((n=this.getMapNow())===null||n===void 0)&&n.pbkConfidential);default:return!1}}makeAbsolute(t){return this.api.makeAbsolute(t)}};var Ri=class e extends Ai{static async build(t){return new e(new Ci,void 0,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t){let o=await this.api.getMap(t);return this.fingerprint=o.fingerprint,o}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t){return await this.getMap(),this.api.getPages(t,this.fingerprint)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(t,o){let i={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:t,valueFilter:{negative:!1,values:o}}],sort:[],facets:[]};return this.api.search(i)}fetchRelativesForTopicInMap(t,o,i){let n={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:o,valueFilter:{negative:!1,values:i}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[t]}}],sort:[],facets:[]};return this.api.search(n)}makeMapFeedbackRequest(t,o){return this.api.sendMapFeedback(this.mapId,t,o)}makeRateMapRequest(t,o){return this.api.rateMap(this.mapId,t,o)}makeRateTopicRequest(t,o,i){return this.api.rateTopic(this.mapId,t,o,i)}makeTopicFeedbackRequest(t,o,i){return this.api.sendTopicFeedback(this.mapId,t,o,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}};var Ii=class e{static build(t,o){return new e(od(t.trim()||"context"),o??Ri.build)}loaded(){return(0,ge.waitUntil)(()=>this._loaded)}constructor(t,o,i){this.store=t,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new ge.Debouncer(10),this.initService(o)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){return(0,ge.waitFor)(()=>this.service)}async navigateToTopic(t,o,i){await this.loaded();let n=await this.awaitService(),a=await(i!=null?n.getPage(i):n.getPageByTocId(t??"root"));this.store.actions.currentPage(a),this.store.actions.scrollTarget({tocId:this.resolveValidNonRootTocId(t,a),section:o})}resolveValidNonRootTocId(t,o){var i,n,a;let s=(i=t==="root"?void 0:t)!==null&&i!==void 0?i:o.rootTocId;return o.topics.includes(s)?s:(a=(n=o.topics[0])!==null&&n!==void 0?n:o.hiddenTopics[0])!==null&&a!==void 0?a:"root"}async navigateToPage(t){await this.loaded();let i=await(await this.awaitService()).getPage(t);this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var t;!((t=this.service)===null||t===void 0)&&t.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData())}clear(){var t;this._loaded=!1,this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),(t=this.service)===null||t===void 0||t.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(){var t,o,i,n,a;try{await Promise.all([(t=this.service)===null||t===void 0?void 0:t.getConfiguration().then(s=>this.store.actions.configuration(s)),(o=this.service)===null||o===void 0?void 0:o.getMap().then(s=>this.store.actions.map(s)),(i=this.service)===null||i===void 0?void 0:i.getToc().then(s=>this.store.actions.toc(s)),(n=this.service)===null||n===void 0?void 0:n.getPagesToc().then(s=>this.store.actions.pagesToc(s)),(a=this.service)===null||a===void 0?void 0:a.getPaginationConfiguration().then(s=>this.store.actions.paginationConfiguration(s))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0}catch(s){this.errorHandler&&!(s instanceof ge.CanceledPromiseError)&&this.errorHandler(s)}}fetchRelatives(){var t,o,i;let n=(t=this.store.getState().map)===null||t===void 0?void 0:t.metadata.filter(a=>{var s;return a.key==((s=this.store.getState().configuration)===null||s===void 0?void 0:s.relativePivotMetadata)}).flatMap(a=>a.values);n!==void 0&&n.length>0?(o=this.service)===null||o===void 0||o.getRelativesForDocument((i=this.store.getState().configuration)===null||i===void 0?void 0:i.relativePivotMetadata,n).then(a=>{let s=a.results.flatMap(l=>l.entries);this.store.actions.relatives(s),this.updateClusteringHelper()}):this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new CustomEvent("clustering-helper-created"))}createClusteringHelper(){var t,o;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let i=this.store.getState().relatives;if(i){let n=i.find(s=>{var l;return((l=s.map)===null||l===void 0?void 0:l.mapId)==this.store.getState().mapId}),a=(o=(t=N.getState().metadataConfiguration)===null||t===void 0?void 0:t.descriptors)!==null&&o!==void 0?o:[];return new ge.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,a)}}async navigateToRelativeTopicIfFound(t){var o,i,n;await this.loaded();let a=await(0,ge.waitFor)(()=>{var p;return(p=this.store.getState().configuration)===null||p===void 0?void 0:p.relativeTopicPivotMetadata}),s=this.store.getState().mapId,u=await(await this.awaitService()).getRelativesForTopicInMap(s,a,[t]);if(!((n=(i=(o=u?.results)===null||o===void 0?void 0:o[0])===null||i===void 0?void 0:i.entries)===null||n===void 0)&&n[0]){let p=u.results[0].entries[0].topic.tocId;return await this.navigateToTopic(p),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(t){this.store.actions.searchInDocumentQuery(t)}registerMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.add(t),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.delete(t),this.updateClusteringHelper()}};var Ed=g(B());var Ad=Ed.css`
|
|
1836
|
-
`;var Ni=class extends CustomEvent{constructor(t,o){super("ft-reader-map-loaded",{detail:{map:t,toc:o}})}},Ti=class extends CustomEvent{constructor(t,o){super("ft-reader-visible-topics-change",{detail:{visibleTopics:o}})}},_i=class extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}},Li=class extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}},ki=class extends Event{constructor(){super("ft-reader-map-not-found")}},Pi=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},$i=class extends Event{constructor(){super("ft-reader-map-forbidden")}},Di=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var Bi=class{constructor(t){this.stateManager=t}searchInDocument(t){this.stateManager.setSearchInDocumentQuery(t??"")}};var Qt=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},su=e=>t=>+(t??"NaN")>0?+t:e,
|
|
1835
|
+
`:Yt.nothing}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&t.get("value")!=null&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&t.get("dispatchedValue")!=null&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach(t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase())),this.visibleSuggestions=this.suggestions.filter(t=>!t.hidden)):this.visibleSuggestions=this.suggestions,this.newValueSuggestion&&(this.visibleSuggestions=[...this.visibleSuggestions,this.newValueSuggestion])}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&(this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px",Uo(this.mainPanel,this.suggestionsContainer,"bottom").then(({x:o,y:i})=>{this.suggestionsContainer.style.left=`${o}px`,this.suggestionsContainer.style.top=`${i}px`}))}setValue(t,o=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),o&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var o;let i=((o=this.input)===null||o===void 0?void 0:o.value)||"";this.setValue(i,t.key=="Escape"||t.key=="Enter")}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var o;if(t.key==="ArrowDown"||t.key==="ArrowUp"){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;let i=this.visibleSuggestions.findIndex(a=>a.matches(":focus-within")),n;t.key==="ArrowDown"?n=i<this.visibleSuggestions.length-1?i+1:0:n=i>0?i-1:this.visibleSuggestions.length-1,(o=this.visibleSuggestions[n])===null||o===void 0||o.focus()}(t.key=="Escape"||t.key=="Enter")&&(this.hideSuggestions=!0)}onSuggestionSelected(t){var o;this.setValue(t.detail,!0),(o=this.input)===null||o===void 0||o.focus(),setTimeout(()=>this.hideSuggestions=!0,0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,o;!((t=this.mainPanel)===null||t===void 0)&&t.matches(":focus-within")||(this.focused=!1,this.setValue(((o=this.input)===null||o===void 0?void 0:o.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}};W.elementDefinitions={"ft-input-label":Ht,"ft-ripple":j,"ft-typography":ft,"ft-icon":vt,"ft-text-field-suggestion":ce};W.styles=[kr,qr.noTextInputDefaultClearButton,Yl];q([(0,G.property)()],W.prototype,"label",void 0);q([(0,G.property)({noAccessor:!0})],W.prototype,"value",null);q([(0,G.state)()],W.prototype,"dispatchedValue",void 0);q([(0,G.property)()],W.prototype,"helper",void 0);q([(0,G.property)()],W.prototype,"suggestionsHelper",void 0);q([(0,G.property)({type:Boolean})],W.prototype,"outlined",void 0);q([(0,G.property)({type:Boolean})],W.prototype,"disabled",void 0);q([(0,G.property)({type:Boolean})],W.prototype,"error",void 0);q([(0,G.property)({type:Boolean})],W.prototype,"fixedMenuPosition",void 0);q([(0,G.property)()],W.prototype,"prefix",void 0);q([(0,G.property)()],W.prototype,"icon",void 0);q([(0,G.property)()],W.prototype,"name",void 0);q([(0,G.property)()],W.prototype,"type",void 0);q([(0,G.property)()],W.prototype,"passwordHiddenIcon",void 0);q([(0,G.property)()],W.prototype,"passwordRevealedIcon",void 0);q([(0,G.property)()],W.prototype,"iconVariant",void 0);q([(0,G.property)({type:Boolean})],W.prototype,"filterSuggestions",void 0);q([(0,G.property)({type:Number})],W.prototype,"maxLength",void 0);q([(0,G.property)({type:Boolean})],W.prototype,"password",void 0);q([(0,G.state)()],W.prototype,"focused",void 0);q([(0,G.state)()],W.prototype,"hidePassword",void 0);q([(0,G.state)()],W.prototype,"hideSuggestions",void 0);q([(0,G.state)()],W.prototype,"visibleSuggestions",void 0);q([(0,G.query)(".ft-text-field--main-panel")],W.prototype,"mainPanel",void 0);q([(0,G.query)(".ft-text-field--input")],W.prototype,"input",void 0);q([(0,G.query)(".ft-text-field-suggestion--new-value")],W.prototype,"newValueSuggestion",void 0);q([(0,G.query)(".ft-text-field--suggestions")],W.prototype,"suggestionsContainer",void 0);q([(0,G.queryAssignedElements)({selector:"ft-text-field-suggestion"})],W.prototype,"suggestions",void 0);(0,sa.customElement)("ft-text-field")(W);(0,sa.customElement)("ft-text-field-suggestion")(ce);var Rd=g(R());var Eo=g(B()),sr=g(Z()),Xt=g(R());var ge=g(R());var rd=g(R()),od=e=>rd.FtReduxStore.get({name:"ft-reader-"+e,initialState:{mapId:void 0,visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0}});var ca=class{constructor(t,o){this.mapId=t,this.paginatedToc=o,this.nodeByTocId={},this.nodeByUrl={},this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,o,i){return t.flatMap(n=>(n.pageConfiguration&&this.registerPage(this.buildPage(n,i)),n.tocId==null?this.extractPagesToc(n.children,o,i):[{tocId:n.tocId,title:n.title,depth:o,children:this.extractPagesToc(n.children,o+1,n.tocId)}]))}convertNodes(t,o,i){return t.flatMap(n=>{var a,s,l;if(n.tocId==null)return[...this.convertSectionNodes((a=n.pageToc)!==null&&a!==void 0?a:[],o,n.tocId),...this.convertNodes(n.children,o,n.tocId)];let u=(s=n.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),p={tocId:n.tocId,contentId:n.contentId,title:n.title,hasRating:n.hasRating,origin:n.origin,prettyUrl:u,depth:o,parentTocId:i,children:[]};this.register(p);let h=this.convertSectionNodes((l=n.pageToc)!==null&&l!==void 0?l:[],o+1,n.tocId),m=this.convertNodes(n.children,o+1,p.tocId);return p.children=[...h,...m],[p]})}convertSectionNodes(t,o,i){return t.flatMap(n=>{var a;let s=(a=n.prettyUrl)===null||a===void 0?void 0:a.replace(/^\//,""),l={...n,prettyUrl:s,depth:o,parentTocId:i,children:[]};return this.register(l),l.children=this.convertSectionNodes(n.children,o+1,n.tocId),[l]})}buildPage(t,o){var i,n,a,s,l,u;let p={number:this.pages.length+1,title:(i=t.title)!==null&&i!==void 0?i:"",rootTocId:(n=t.tocId)!==null&&n!==void 0?n:"root",toc:((a=t.pageToc)!==null&&a!==void 0?a:[]).map(b=>this.nodeByTocId[b.tocId]),topics:[],hiddenTopics:[],breadcrumb:o?this.buildBreadcrumb(this.nodeByTocId[o]):[]},h=(b,x)=>(x?p.topics:p.hiddenTopics).push(b),m=(l=(s=t.pageConfiguration)===null||s===void 0?void 0:s.parentsVisibility)!==null&&l!==void 0?l:[];return p.breadcrumb.forEach((b,x)=>{h(b,m[x])}),t.tocId&&h(t.tocId,t.pageConfiguration.isVisible),p.topics.push(...this.tocIds((u=t.pageToc)!==null&&u!==void 0?u:[])),p}registerPage(t){for(let o of[...t.topics,...t.hiddenTopics])this.pageByTocId[o]||(this.pageByTocId[o]=t);this.pages.push(t)}tocIds(t){return t.flatMap(o=>[o.tocId,...this.tocIds(o.children)])}buildBreadcrumb(t){let o=[t.tocId];for(;t?.parentTocId;)o.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return o}register(t){t.prettyUrl&&(this.nodeByUrl[t.prettyUrl]==null?this.nodeByUrl[t.prettyUrl]=t:this.duplicatedPrettyUrls.add(t.prettyUrl)),this.nodeByUrl[`${this.mapId}/${t.tocId}`]=t,this.nodeByTocId[t.tocId]=t}},Ci=class{convertPaginatedToc(t,o){return new ca(t,o).build()}};var au=g(nd(),1);var ad;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(ad||(ad={}));var sd;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(sd||(sd={}));var cd;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(cd||(cd={}));var ld;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT"})(ld||(ld={}));var dd;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(dd||(dd={}));var pd;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(pd||(pd={}));var ud;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ud||(ud={}));var Me;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Me||(Me={}));var fd;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(fd||(fd={}));var hd;(function(e){e.ASC="ASC",e.DESC="DESC"})(hd||(hd={}));var yd;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(yd||(yd={}));var md;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(md||(md={}));var gd;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK"})(gd||(gd={}));var bd;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(bd||(bd={}));var vd;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK"})(vd||(vd={}));var xd;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(xd||(xd={}));var Sd;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC"})(Sd||(Sd={}));var Od;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS"})(Od||(Od={}));var at;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN",e.DEVELOPER="DEVELOPER"})(at||(at={}));var Cd;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Cd||(Cd={}));var nu={[at.PERSONAL_BOOK_SHARE_USER]:[at.PERSONAL_BOOK_USER],[at.HTML_EXPORT_USER]:[at.PERSONAL_BOOK_USER],[at.PDF_EXPORT_USER]:[at.PERSONAL_BOOK_USER],[at.KHUB_ADMIN]:[at.CONTENT_PUBLISHER],[at.ADMIN]:[at.KHUB_ADMIN,at.USERS_ADMIN,at.PORTAL_ADMIN],[at.DEVELOPER]:[at.BETA_USER,at.DEBUG_USER]};function wd(e,t){return e===t||(nu[e]??[]).some(o=>wd(o,t))}function Ar(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(i=>wd(i,t))}var Ai=class extends we{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,o,i){super(!1,o),this.converter=t,this._mapId=i,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.registerFinal("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(t=>this.fetchMap(t))),this.cache.register("enrichedToc",()=>this.withMapId(t=>this.fetchPages(t).then(o=>this.converter.convertPaginatedToc(t,o)))),this.cache.register("ratingSummary",()=>{var t,o;return Ar((o=(t=N.getState().session)===null||t===void 0?void 0:t.profile.roles)!==null&&o!==void 0?o:[],"RATING_USER")?this.withMapId(n=>this.fetchMapRating(n)):Promise.resolve()})}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getMapNow(){return this.cache.getNow("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var o;return(o=this.enrichedToc)===null||o===void 0?void 0:o.nodeByTocId[t]}getTocNodeNowByUrl(t){var o,i;let n=this.getMapNow();return n?.prettyUrl==t||`${n?.id}/root`===t?(o=this.enrichedToc)===null||o===void 0?void 0:o.toc[0]:(i=this.enrichedToc)===null||i===void 0?void 0:i.nodeByUrl[t]}async getPage(t){let o=await this.getEnrichedToc();return o.pages[t-1]||o.pages[0]}async getPageByTocId(t){let o=await this.getEnrichedToc();return o.pageByTocId[t]||o.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,()=>this.fetchTopicMetadata(t))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,()=>this.fetchTopicHTMLContent(t))}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}getRelativesForDocument(t,o){return this.cache.get("document-relatives-"+t+"-"+o.join("-"),()=>this.fetchRelativesForDocument(t,o))}getRelativesForTopicInMap(t,o,i){return this.cache.get("topic-relatives-"+[t,o,...i].join("-"),()=>this.fetchRelativesForTopicInMap(t,o,i))}getAttachmentDownloadLink(t){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(t).content}?download=true`)}getLink(t,o,i){let n=this.getNavigationData(t,o,i),a=this.getReaderLinkPrefix()+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),s=new URL(a,this.api.tenantBaseUrl);return n.page!=null&&s.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&s.searchParams.set("tocId",n.tocId),n.section!=null&&s.searchParams.set("section",n.section),s.href}getNavigationData(t,o,i){var n,a;t=t||"root";let s=this.enrichedToc,l=s?.pageByTocId[t],u=s?.nodeByTocId[t],p=u?.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:(n=u?.title)!==null&&n!==void 0?n:"",page:o&&l&&l.number!==o?o:void 0,prettyUrl:p?.replace(/^r\//,""),prettyUrlDuplicated:(a=s?.duplicatedPrettyUrls.has(p??""))!==null&&a!==void 0?a:!1,section:i}}async getAccurateNavigationData(t,o,i){return await this.getEnrichedToc(),this.getNavigationData(t,o,i)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(t=>t?.publication)}getTopicRating(t){return this.getRatingSummary().then(o=>{var i;return o?{type:o.topics.type,rating:(i=o.topics)===null||i===void 0?void 0:i.ratings.find(n=>n.tocId===t)}:void 0})}rateMap(t,o){return this.makeRateMapRequest(t,o).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(t,o){return this.makeMapFeedbackRequest(t,o)}rateTopic(t,o,i){return this.makeRateTopicRequest(t,o,i).then(()=>this.clearRatingIfNecessary())}unrateTopic(t){return this.makeUnrateTopicRequest(t).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let t=N.getState().session;t?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,o,i){return this.makeTopicFeedbackRequest(t,o,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t){let o=this.getTocNodeNow(t),i=[{tocId:o.tocId,title:o.title}],n=this.getTocNodeNow(o.parentTocId);for(;n;)i.unshift({tocId:n.tocId,title:n.title}),n=this.getTocNodeNow(n.parentTocId);return i}isFeatureAccessible(t,{session:o,ratingType:i}){var n;if(!this.isFeatureAvailable(t))return!1;switch(t){case oe.FEEDBACK:return Ar(o??[],at.FEEDBACK_USER);case oe.RATING:return Ar(o??[],at.RATING_USER)&&i!=null&&i!==Me.NO_RATING;case oe.PRINT:return Ar(o??[],at.PRINT_USER);case oe.BOOKMARK:return!!o?.sessionAuthenticated;case oe.COLLECTIONS:return Ar(o??[],at.COLLECTION_USER);case oe.PERSONAL_BOOKS:return Ar(o??[],at.PERSONAL_BOOK_USER)&&!(!((n=this.getMapNow())===null||n===void 0)&&n.pbkConfidential);default:return!1}}makeAbsolute(t){return this.api.makeAbsolute(t)}};var Ri=class e extends Ai{static async build(t){return new e(new Ci,void 0,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t){let o=await this.api.getMap(t);return this.fingerprint=o.fingerprint,o}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t){return await this.getMap(),this.api.getPages(t,this.fingerprint)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(t,o){let i={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:t,valueFilter:{negative:!1,values:o}}],sort:[],facets:[]};return this.api.search(i)}fetchRelativesForTopicInMap(t,o,i){let n={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:o,valueFilter:{negative:!1,values:i}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[t]}}],sort:[],facets:[]};return this.api.search(n)}makeMapFeedbackRequest(t,o){return this.api.sendMapFeedback(this.mapId,t,o)}makeRateMapRequest(t,o){return this.api.rateMap(this.mapId,t,o)}makeRateTopicRequest(t,o,i){return this.api.rateTopic(this.mapId,t,o,i)}makeTopicFeedbackRequest(t,o,i){return this.api.sendTopicFeedback(this.mapId,t,o,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}};var Ii=class e{static build(t,o){return new e(od(t.trim()||"context"),o??Ri.build)}loaded(){return(0,ge.waitUntil)(()=>this._loaded)}constructor(t,o,i){this.store=t,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new ge.Debouncer(10),this.initService(o)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){return(0,ge.waitFor)(()=>this.service)}async navigateToTopic(t,o,i){await this.loaded();let n=await this.awaitService(),a=await(i!=null?n.getPage(i):n.getPageByTocId(t??"root"));this.store.actions.currentPage(a),this.store.actions.scrollTarget({tocId:this.resolveValidNonRootTocId(t,a),section:o})}resolveValidNonRootTocId(t,o){var i,n,a;let s=(i=t==="root"?void 0:t)!==null&&i!==void 0?i:o.rootTocId;return o.topics.includes(s)?s:(a=(n=o.topics[0])!==null&&n!==void 0?n:o.hiddenTopics[0])!==null&&a!==void 0?a:"root"}async navigateToPage(t){await this.loaded();let i=await(await this.awaitService()).getPage(t);this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var t;!((t=this.service)===null||t===void 0)&&t.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData())}clear(){var t;this._loaded=!1,this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),(t=this.service)===null||t===void 0||t.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(){var t,o,i,n,a;try{await Promise.all([(t=this.service)===null||t===void 0?void 0:t.getConfiguration().then(s=>this.store.actions.configuration(s)),(o=this.service)===null||o===void 0?void 0:o.getMap().then(s=>this.store.actions.map(s)),(i=this.service)===null||i===void 0?void 0:i.getToc().then(s=>this.store.actions.toc(s)),(n=this.service)===null||n===void 0?void 0:n.getPagesToc().then(s=>this.store.actions.pagesToc(s)),(a=this.service)===null||a===void 0?void 0:a.getPaginationConfiguration().then(s=>this.store.actions.paginationConfiguration(s))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0}catch(s){this.errorHandler&&!(s instanceof ge.CanceledPromiseError)&&this.errorHandler(s)}}fetchRelatives(){var t,o,i;let n=(t=this.store.getState().map)===null||t===void 0?void 0:t.metadata.filter(a=>{var s;return a.key==((s=this.store.getState().configuration)===null||s===void 0?void 0:s.relativePivotMetadata)}).flatMap(a=>a.values);n!==void 0&&n.length>0?(o=this.service)===null||o===void 0||o.getRelativesForDocument((i=this.store.getState().configuration)===null||i===void 0?void 0:i.relativePivotMetadata,n).then(a=>{let s=a.results.flatMap(l=>l.entries);this.store.actions.relatives(s),this.updateClusteringHelper()}):this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new CustomEvent("clustering-helper-created"))}createClusteringHelper(){var t,o;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let i=this.store.getState().relatives;if(i){let n=i.find(s=>{var l;return((l=s.map)===null||l===void 0?void 0:l.mapId)==this.store.getState().mapId}),a=(o=(t=N.getState().metadataConfiguration)===null||t===void 0?void 0:t.descriptors)!==null&&o!==void 0?o:[];return new ge.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,a)}}async navigateToRelativeTopicIfFound(t){var o,i,n;await this.loaded();let a=await(0,ge.waitFor)(()=>{var p;return(p=this.store.getState().configuration)===null||p===void 0?void 0:p.relativeTopicPivotMetadata}),s=this.store.getState().mapId,u=await(await this.awaitService()).getRelativesForTopicInMap(s,a,[t]);if(!((n=(i=(o=u?.results)===null||o===void 0?void 0:o[0])===null||i===void 0?void 0:i.entries)===null||n===void 0)&&n[0]){let p=u.results[0].entries[0].topic.tocId;return await this.navigateToTopic(p),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(t){this.store.actions.searchInDocumentQuery(t)}registerMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.add(t),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.delete(t),this.updateClusteringHelper()}};var Ed=g(B());var Ad=Ed.css`
|
|
1836
|
+
`;var Ni=class extends CustomEvent{constructor(t,o){super("ft-reader-map-loaded",{detail:{map:t,toc:o}})}},Ti=class extends CustomEvent{constructor(t,o){super("ft-reader-visible-topics-change",{detail:{visibleTopics:o}})}},_i=class extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}},Li=class extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}},ki=class extends Event{constructor(){super("ft-reader-map-not-found")}},Pi=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},$i=class extends Event{constructor(){super("ft-reader-map-forbidden")}},Di=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var Bi=class{constructor(t){this.stateManager=t}searchInDocument(t){this.stateManager.setSearchInDocumentQuery(t??"")}};var Qt=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},su=e=>t=>+(t??"NaN")>0?+t:e,wt=class extends Xt.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.scrollToTargetDebouncer=new Xt.Debouncer(5),this.navigationDebouncer=new Xt.Debouncer(10),this.mapLoadedEventDebouncer=new Xt.Debouncer(50),this.addStore(N)}render(){return Eo.html`
|
|
1837
1837
|
${this.importStyleIfNeeded()}
|
|
1838
1838
|
<slot @register-ft-reader-component=${this.registerComponent}></slot>
|
|
1839
1839
|
`}importStyleIfNeeded(){var t,o;let i=(t=this.stateManager.service)===null||t===void 0?void 0:t.themeStylesheet();return!i||window.location.href.startsWith((o=this.baseUrl)!==null&&o!==void 0?o:"")?Eo.nothing:Eo.html`
|
|
1840
1840
|
<style>
|
|
1841
1841
|
@import "${i}"
|
|
1842
1842
|
</style>
|
|
1843
|
-
`}get stateManager(){return this._stateManager==null&&(this._stateManager=Ii.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),this.readerServiceProvider),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then(t=>{let o=t.fontsStylesheet();if(o&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${o}"]`)){let i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",o),document.head.append(i)}window.FluidTopicsReaderService=new Bi(this.stateManager)})}update(t){super.update(t),t.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),t.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),t.has("searchInDocumentQuery")&&this.searchInDocumentQuery!=null&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId","topicPivot"].some(o=>t.has(o))&&this.mapId&&this.navigateToTarget(),t.has("session")&&this.reload()}contentAvailableCallback(t){var o,i;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.sendLoadedEventIfLoaded(),t.has("scrollTarget")&&((o=this.scrollTarget)===null||o===void 0?void 0:o.tocId)==null){let n=t.get("scrollTarget");n?.tocId!=null&&this.scrollToTargetDebouncer.run(()=>{var a;return this.stateManager.service.getAccurateNavigationData(n.tocId,(a=this.currentPage)===null||a===void 0?void 0:a.number,n.section).then(s=>this.dispatchEvent(new _i(s)))})}(t.has("visibleTopics")||t.has("scrollTarget"))&&((i=this.scrollTarget)===null||i===void 0?void 0:i.tocId)==null&&Promise.all(this.visibleTopics.map(n=>{var a;return this.stateManager.service.getAccurateNavigationData(n,(a=this.currentPage)===null||a===void 0?void 0:a.number)})).then(n=>{let a=n.filter(s=>s!=null&&s.topicTitle!=="").map(s=>{var l;return{tocId:s.tocId,title:s.topicTitle,page:s.page,prettyUrl:s.prettyUrl,prettyUrlDuplicated:s.prettyUrlDuplicated,breadcrumb:(l=this.stateManager.service)===null||l===void 0?void 0:l.buildBreadcrumb(s.tocId)}});this.dispatchEvent(new Ti(this.map,a))})}clear(){this.stateManager.clear()}async reload(){await this.stateManager.reload()}async navigateToTarget(){await this.navigationDebouncer.run(async()=>{this.topicPivot!=null?!await this.stateManager.navigateToRelativeTopicIfFound(this.topicPivot)&&this.lastNotifiedNotFoundRelative!==this.mapId+this.topicPivot?(this.dispatchEvent(new Di),this.lastNotifiedNotFoundRelative=this.mapId+this.topicPivot):this.lastNotifiedNotFoundRelative=void 0:this.tocId!=null?await this.stateManager.navigateToTopic(this.tocId,this.section,this.page):this.page!=null&&await this.stateManager.navigateToPage(this.page)})}registerComponent(t){t.stopPropagation();let o=t.composedPath()[0];this.register(o)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){let o=t;o.status===401?this.dispatchEvent(new Pi):o.status===403?this.dispatchEvent(new $i):o.status===404?this.dispatchEvent(new ki):this.dispatchEvent(new Li(t))}reloadBookmarks(){Wl.reloadBookmarks()}async reloadRating(){var t,o;await((t=this.stateManager.service)===null||t===void 0?void 0:t.reloadRating()),(o=this.stateManager.store)===null||o===void 0||o.dispatchEvent(new CustomEvent("rating-changed"))}sendLoadedEventIfLoaded(){this.mapLoadedEventDebouncer.run(()=>{this.map&&this.toc&&this.dispatchEvent(new Ni(this.map,this.toc))})}};
|
|
1843
|
+
`}get stateManager(){return this._stateManager==null&&(this._stateManager=Ii.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),this.readerServiceProvider),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then(t=>{let o=t.fontsStylesheet();if(o&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${o}"]`)){let i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",o),document.head.append(i)}window.FluidTopicsReaderService=new Bi(this.stateManager)})}update(t){super.update(t),t.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),t.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),t.has("searchInDocumentQuery")&&this.searchInDocumentQuery!=null&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId","topicPivot"].some(o=>t.has(o))&&this.mapId&&this.navigateToTarget(),t.has("session")&&this.reload()}contentAvailableCallback(t){var o,i;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.sendLoadedEventIfLoaded(),t.has("scrollTarget")&&((o=this.scrollTarget)===null||o===void 0?void 0:o.tocId)==null){let n=t.get("scrollTarget");n?.tocId!=null&&this.scrollToTargetDebouncer.run(()=>{var a;return this.stateManager.service.getAccurateNavigationData(n.tocId,(a=this.currentPage)===null||a===void 0?void 0:a.number,n.section).then(s=>this.dispatchEvent(new _i(s)))})}(t.has("visibleTopics")||t.has("scrollTarget"))&&((i=this.scrollTarget)===null||i===void 0?void 0:i.tocId)==null&&Promise.all(this.visibleTopics.map(n=>{var a;return this.stateManager.service.getAccurateNavigationData(n,(a=this.currentPage)===null||a===void 0?void 0:a.number)})).then(n=>{let a=n.filter(s=>s!=null&&s.topicTitle!=="").map(s=>{var l;return{tocId:s.tocId,title:s.topicTitle,page:s.page,prettyUrl:s.prettyUrl,prettyUrlDuplicated:s.prettyUrlDuplicated,breadcrumb:(l=this.stateManager.service)===null||l===void 0?void 0:l.buildBreadcrumb(s.tocId)}});this.dispatchEvent(new Ti(this.map,a))})}clear(){this.stateManager.clear()}async reload(){await this.stateManager.reload()}async navigateToTarget(){await this.navigationDebouncer.run(async()=>{this.topicPivot!=null?!await this.stateManager.navigateToRelativeTopicIfFound(this.topicPivot)&&this.lastNotifiedNotFoundRelative!==this.mapId+this.topicPivot?(this.dispatchEvent(new Di),this.lastNotifiedNotFoundRelative=this.mapId+this.topicPivot):this.lastNotifiedNotFoundRelative=void 0:this.tocId!=null?await this.stateManager.navigateToTopic(this.tocId,this.section,this.page):this.page!=null&&await this.stateManager.navigateToPage(this.page)})}registerComponent(t){t.stopPropagation();let o=t.composedPath()[0];this.register(o)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){let o=t;o.status===401?this.dispatchEvent(new Pi):o.status===403?this.dispatchEvent(new $i):o.status===404?this.dispatchEvent(new ki):this.dispatchEvent(new Li(t))}reloadBookmarks(){Wl.reloadBookmarks()}async reloadRating(){var t,o;await((t=this.stateManager.service)===null||t===void 0?void 0:t.reloadRating()),(o=this.stateManager.store)===null||o===void 0||o.dispatchEvent(new CustomEvent("rating-changed"))}sendLoadedEventIfLoaded(){this.mapLoadedEventDebouncer.run(()=>{this.map&&this.toc&&this.dispatchEvent(new Ni(this.map,this.toc))})}};wt.styles=Ad;Qt([(0,Xt.redux)({store:N.name})],wt.prototype,"baseUrl",void 0);Qt([(0,Xt.redux)({store:N.name})],wt.prototype,"session",void 0);Qt([(0,sr.property)()],wt.prototype,"mapId",void 0);Qt([(0,sr.property)()],wt.prototype,"tocId",void 0);Qt([(0,sr.property)()],wt.prototype,"section",void 0);Qt([(0,sr.property)()],wt.prototype,"topicPivot",void 0);Qt([(0,sr.property)()],wt.prototype,"searchInDocumentQuery",void 0);Qt([(0,sr.property)({type:Number,converter:{fromAttribute:su()}})],wt.prototype,"page",void 0);Qt([(0,Xt.redux)({store:"reader"})],wt.prototype,"map",void 0);Qt([(0,Xt.redux)({store:"reader"})],wt.prototype,"toc",void 0);Qt([(0,Xt.redux)({store:"reader"})],wt.prototype,"visibleTopics",void 0);Qt([(0,Xt.redux)({store:"reader"})],wt.prototype,"currentPage",void 0);Qt([(0,Xt.redux)({store:"reader"})],wt.prototype,"scrollTarget",void 0);Qt([(0,sr.property)({attribute:!1})],wt.prototype,"readerServiceProvider",void 0);(0,Rd.customElement)("ft-reader-context")(wt);var Mi=class extends CustomEvent{constructor(t){super("send-feedback",{detail:t})}},Fi=class extends CustomEvent{constructor(t){super("ft-reader-topic-feedback",{composed:!0,bubbles:!0,detail:t})}},Ui=class extends CustomEvent{constructor(t){super("ft-reader-feedback",{composed:!0,bubbles:!0,detail:t})}},Wi=class extends CustomEvent{constructor(t){super("ft-reader-mailer-topic-feedback",{composed:!0,bubbles:!0,detail:{topic:t}})}},zi=class extends CustomEvent{constructor(){super("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0})}};var Et=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},Q=class extends ir(Fe){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.withMoreOptionsButton=!1,this.ratingAllowed=!1,this.from="",this.feedbackMessage="",this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.addI18nContext(V,Zl)}get canAccessFeedback(){var t;return(t=this.service)===null||t===void 0?void 0:t.isFeatureAccessible(oe.FEEDBACK,{session:this.session})}get canAccessRating(){var t,o;return(t=this.service)===null||t===void 0?void 0:t.isFeatureAccessible(oe.RATING,{session:this.session,ratingType:(o=this.ratingSummary)===null||o===void 0?void 0:o.type})}get configuredRatingType(){var t,o;return(o=this.ratingAllowed?(t=this.ratingSummary)===null||t===void 0?void 0:t.type:"NO_RATING")!==null&&o!==void 0?o:"NO_RATING"}get ratingType(){var t,o,i;return(i=(o=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||o===void 0?void 0:o.type)!==null&&i!==void 0?i:"NO_RATING"}get ratingValue(){var t,o,i;return(i=(o=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||o===void 0?void 0:o.value)!==null&&i!==void 0?i:-1}get ratingDate(){var t,o;let i=(o=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||o===void 0?void 0:o.date;return typeof i=="string"?(0,Hi.parseDate)(i):i}render(){return!this.canAccessFeedback&&!this.canAccessRating?yt.nothing:yt.html`
|
|
1844
1844
|
<div class="ft-reader-feedback">
|
|
1845
1845
|
${this.hideTitle?yt.nothing:yt.html`
|
|
1846
1846
|
<ft-typography variant="title" part="main-title">
|
|
@@ -1951,7 +1951,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1951
1951
|
${l}
|
|
1952
1952
|
</div>
|
|
1953
1953
|
</form>
|
|
1954
|
-
`}return yt.nothing}onFormSubmitEvent(t,o){t.preventDefault(),o?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var t,o,i;let n=/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;return!(((o=(t=this.session)===null||t===void 0?void 0:t.profile)===null||o===void 0?void 0:o.userId)==null&&(!((i=this.configuration)===null||i===void 0)&&i.mailsSentByFluidTopicsForUnauthenticatedUsers))||n.test(this.from)}sendFeedback(){var t;this.dispatchEvent(new Mi({message:this.feedbackInput.value,...((t=this.configuration)===null||t===void 0?void 0:t.mailsSentByFluidTopicsForUnauthenticatedUsers)&&{from:this.from}}))}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}onOpenMoreDetails(){this.dispatchEvent(new CustomEvent("open-more-options"))}clearFeedbackInput(){setTimeout(()=>this.feedbackInput.value="",0)}};Q.elementDefinitions={"ft-button":fe,"ft-typography":ft,"ft-switch":zt,"ft-switch-option":ht,"ft-text-area":Nt,"ft-text-field":W};Q.styles=vs;
|
|
1954
|
+
`}return yt.nothing}onFormSubmitEvent(t,o){t.preventDefault(),o?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var t,o,i;let n=/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;return!(((o=(t=this.session)===null||t===void 0?void 0:t.profile)===null||o===void 0?void 0:o.userId)==null&&(!((i=this.configuration)===null||i===void 0)&&i.mailsSentByFluidTopicsForUnauthenticatedUsers))||n.test(this.from)}sendFeedback(){var t;this.dispatchEvent(new Mi({message:this.feedbackInput.value,...((t=this.configuration)===null||t===void 0?void 0:t.mailsSentByFluidTopicsForUnauthenticatedUsers)&&{from:this.from}}))}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}onOpenMoreDetails(){this.dispatchEvent(new CustomEvent("open-more-options"))}clearFeedbackInput(){setTimeout(()=>this.feedbackInput.value="",0)}};Q.elementDefinitions={"ft-button":fe,"ft-typography":ft,"ft-switch":zt,"ft-switch-option":ht,"ft-text-area":Nt,"ft-text-field":W};Q.styles=vs;Et([(0,mt.property)({type:Boolean})],Q.prototype,"editorMode",void 0);Et([(0,mt.property)({type:Boolean})],Q.prototype,"hideTitle",void 0);Et([(0,mt.property)({type:Boolean})],Q.prototype,"withMoreOptionsButton",void 0);Et([(0,mt.property)({type:Boolean})],Q.prototype,"ratingAllowed",void 0);Et([(0,mt.property)({attribute:!1})],Q.prototype,"i18nProperties",void 0);Et([(0,mt.property)({attribute:!1})],Q.prototype,"ratingSummary",void 0);Et([(0,mt.property)({attribute:!1})],Q.prototype,"session",void 0);Et([(0,mt.query)(".ft-reader-feedback--feedback-input")],Q.prototype,"feedbackInput",void 0);Et([(0,mt.state)()],Q.prototype,"from",void 0);Et([(0,mt.state)()],Q.prototype,"feedbackMessage",void 0);Et([(0,mt.property)()],Q.prototype,"iconVariant",void 0);Et([(0,mt.property)()],Q.prototype,"emptyStarIcon",void 0);Et([(0,mt.property)()],Q.prototype,"filledStarIcon",void 0);Et([(0,mt.property)()],Q.prototype,"emptyLikeIcon",void 0);Et([(0,mt.property)()],Q.prototype,"filledLikeIcon",void 0);Et([(0,mt.property)()],Q.prototype,"emptyDislikeIcon",void 0);Et([(0,mt.property)()],Q.prototype,"filledDislikeIcon",void 0);Et([(0,Hi.redux)({store:"reader",selector:e=>{var t;return(t=e.configuration)===null||t===void 0?void 0:t.feedback}})],Q.prototype,"configuration",void 0);Et([(0,mt.property)()],Q.prototype,"feedbackMailLinkBuilder",void 0);var Xr=nr.fromGwt("server");var Qr=class{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(t,o,i,n,a){var s;this.subject=t,this.url=o,this.configuration=n,this.isAuthenticated=a,this.subjectMetadata=this.filterMetadata(i,n.subjectMetadataIds).map(l=>"["+l.values[l.values.length-1]+"]").join(""),this.bodyMetadata=this.filterMetadata(i,(s=n.bodyMetadataIds)!==null&&s!==void 0?s:[]).map(l=>"["+l.values.join(", ")+"]").join(" ")}filterMetadata(t,o){return o.map(i=>t.find(n=>n.key===i)).filter(i=>i!=null&&i.values.length>0)}shouldUseMailer(){var t,o;let i=this.isAuthenticated&&!(!((t=this.configuration)===null||t===void 0)&&t.mailsSentByFluidTopics),n=!this.isAuthenticated&&!(!((o=this.configuration)===null||o===void 0)&&o.mailsSentByFluidTopicsForUnauthenticatedUsers);return i||n}build(t){var o;if(t!=null&&t.length===0||!this.shouldUseMailer())return;let i=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`
|
|
1955
1955
|
${this.bodyMetadata}
|
|
1956
1956
|
${this.url}
|
|
1957
1957
|
_________________________________________________________________
|
|
@@ -1959,7 +1959,7 @@ _________________________________________________________________
|
|
|
1959
1959
|
${t??""}
|
|
1960
1960
|
|
|
1961
1961
|
_________________________________________________________________
|
|
1962
|
-
${Xr.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(o=this.configuration)===null||o===void 0?void 0:o.recipients.join(",")}?subject=${i}&body=${n}`}};var cr=nr.build("inDesignerFeedbackComponent"),Vi={feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."};var
|
|
1962
|
+
${Xr.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(o=this.configuration)===null||o===void 0?void 0:o.recipients.join(",")}?subject=${i}&body=${n}`}};var cr=nr.build("inDesignerFeedbackComponent"),Vi={feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."};var _t=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},pt=class extends ir(Fe){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.withMoreOptionsButton=!1,this.iconVariant=kt.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new Qr,this.i18nProperties={feedbackMainTitle:V.properties.mapFeedbackMainTitle(),ratingSectionTitle:V.properties.mapRatingSectionTitle(),dichotomousRatingSectionTitle:V.properties.mapDichotomousRatingSectionTitle(),feedbackSectionTitle:V.properties.mapFeedbackSectionTitle()},this.updateDebouncer=new Bt.Debouncer(100),this.sendRatingDebouncer=new Bt.Debouncer(500),this.addStore(N)}render(){return Nd.html`
|
|
1963
1963
|
<ft-reader-feedback
|
|
1964
1964
|
ratingAllowed
|
|
1965
1965
|
.i18nProperties=${this.i18nProperties}
|
|
@@ -1981,7 +1981,7 @@ ${Xr.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(o=this.configura
|
|
|
1981
1981
|
@mailer-feedback=${this.onMailerFeedbackSent}
|
|
1982
1982
|
@open-more-options=${this.openMoreOptions}
|
|
1983
1983
|
></ft-reader-feedback>
|
|
1984
|
-
`}update(t){var o,i,n,a;super.update(t),t.has("map")&&this.map&&this.updateData(),t.has("editorMode")&&this.editorMode&&this.addI18nContext(cr,Vi),["map","configuration","user","mailSubject"].some(s=>t.has(s))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,(i=(o=this.service)===null||o===void 0?void 0:o.getLink())!==null&&i!==void 0?i:"",this.map.metadata,this.configuration,((a=(n=this.session)===null||n===void 0?void 0:n.profile)===null||a===void 0?void 0:a.userId)!=null)}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run(async()=>{var t,o;this.map&&(!((o=(t=this.session)===null||t===void 0?void 0:t.profile)===null||o===void 0)&&o.userId||this.ratingSummary==null)&&await this.fetchRatingSummary()})}async fetchRatingSummary(){var t;this.ratingSummary=await((t=this.service)===null||t===void 0?void 0:t.getMapRating())}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:t.detail==null?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run(()=>this.sendRating(t.detail)))}async sendRating(t){var o,i,n;if(!this.editorMode&&this.ratingSummary){try{t==null?await((o=this.service)===null||o===void 0?void 0:o.unrateMap()):await((i=this.service)===null||i===void 0?void 0:i.rateMap((n=this.ratingSummary)===null||n===void 0?void 0:n.type,t))}catch{this.dispatchEvent(new Bt.FtNotificationEvent({type:"error",message:V.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new Bt.FtNotificationEvent({type:"info",message:cr.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var o;try{this.editorMode?this.dispatchEvent(new Bt.FtNotificationEvent({type:"info",message:cr.messages.feedbackAndRatingDisabledInEditor()})):(await((o=this.service)===null||o===void 0?void 0:o.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new Bt.FtNotificationEvent({type:"info",message:V.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new Bt.FtNotificationEvent({type:"error",message:V.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new zi)}openMoreOptions(){var t,o,i;this.dispatchEvent(new Ui({mapId:this.map.id,mapTitle:this.map.title,mapMetadata:((t=this.map)===null||t===void 0?void 0:t.metadata)||[],ratingType:((o=this.ratingSummary)===null||o===void 0?void 0:o.type)||Me.NO_RATING,ratingValue:(i=this.ratingSummary)===null||i===void 0?void 0:i.rating}))}};pt.elementDefinitions={"ft-reader-feedback":Q};
|
|
1984
|
+
`}update(t){var o,i,n,a;super.update(t),t.has("map")&&this.map&&this.updateData(),t.has("editorMode")&&this.editorMode&&this.addI18nContext(cr,Vi),["map","configuration","user","mailSubject"].some(s=>t.has(s))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,(i=(o=this.service)===null||o===void 0?void 0:o.getLink())!==null&&i!==void 0?i:"",this.map.metadata,this.configuration,((a=(n=this.session)===null||n===void 0?void 0:n.profile)===null||a===void 0?void 0:a.userId)!=null)}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run(async()=>{var t,o;this.map&&(!((o=(t=this.session)===null||t===void 0?void 0:t.profile)===null||o===void 0)&&o.userId||this.ratingSummary==null)&&await this.fetchRatingSummary()})}async fetchRatingSummary(){var t;this.ratingSummary=await((t=this.service)===null||t===void 0?void 0:t.getMapRating())}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:t.detail==null?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run(()=>this.sendRating(t.detail)))}async sendRating(t){var o,i,n;if(!this.editorMode&&this.ratingSummary){try{t==null?await((o=this.service)===null||o===void 0?void 0:o.unrateMap()):await((i=this.service)===null||i===void 0?void 0:i.rateMap((n=this.ratingSummary)===null||n===void 0?void 0:n.type,t))}catch{this.dispatchEvent(new Bt.FtNotificationEvent({type:"error",message:V.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new Bt.FtNotificationEvent({type:"info",message:cr.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var o;try{this.editorMode?this.dispatchEvent(new Bt.FtNotificationEvent({type:"info",message:cr.messages.feedbackAndRatingDisabledInEditor()})):(await((o=this.service)===null||o===void 0?void 0:o.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new Bt.FtNotificationEvent({type:"info",message:V.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new Bt.FtNotificationEvent({type:"error",message:V.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new zi)}openMoreOptions(){var t,o,i;this.dispatchEvent(new Ui({mapId:this.map.id,mapTitle:this.map.title,mapMetadata:((t=this.map)===null||t===void 0?void 0:t.metadata)||[],ratingType:((o=this.ratingSummary)===null||o===void 0?void 0:o.type)||Me.NO_RATING,ratingValue:(i=this.ratingSummary)===null||i===void 0?void 0:i.rating}))}};pt.elementDefinitions={"ft-reader-feedback":Q};_t([(0,Bt.redux)({store:N.name})],pt.prototype,"session",void 0);_t([(0,Bt.redux)({store:"reader"})],pt.prototype,"map",void 0);_t([(0,Bt.redux)({store:N.name})],pt.prototype,"editorMode",void 0);_t([(0,Bt.redux)({store:"reader",selector:e=>{var t;return(t=e.configuration)===null||t===void 0?void 0:t.feedback}})],pt.prototype,"configuration",void 0);_t([(0,Jt.state)()],pt.prototype,"ratingSummary",void 0);_t([(0,Jt.property)({type:Boolean})],pt.prototype,"hideTitle",void 0);_t([(0,Jt.property)({type:Boolean})],pt.prototype,"withMoreOptionsButton",void 0);_t([(0,Jt.property)()],pt.prototype,"iconVariant",void 0);_t([(0,Jt.property)()],pt.prototype,"emptyStarIcon",void 0);_t([(0,Jt.property)()],pt.prototype,"filledStarIcon",void 0);_t([(0,Jt.property)()],pt.prototype,"emptyLikeIcon",void 0);_t([(0,Jt.property)()],pt.prototype,"filledLikeIcon",void 0);_t([(0,Jt.property)()],pt.prototype,"emptyDislikeIcon",void 0);_t([(0,Jt.property)()],pt.prototype,"filledDislikeIcon",void 0);_t([(0,Jt.query)("ft-reader-feedback")],pt.prototype,"readerFeedback",void 0);_t([Si(Xr.properties["mail.map_feedback.subject"](e=>{var t;return[(t=e.map)===null||t===void 0?void 0:t.title]}))],pt.prototype,"mailSubject",void 0);_t([(0,Bt.reduxEventListener)({eventName:"rating-changed"})],pt.prototype,"fetchRatingSummary",null);var _d=g(B()),te=g(Z()),Mt=g(R());var da=g(Z());var Td=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},pa=class extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}},la=Symbol("registerInterval");function cu(e){var t;class o extends e{constructor(){super(...arguments),this.disableContextInteractions=!1,this[t]=0}connectedCallback(){super.connectedCallback(),this[la]=window.setInterval(()=>this.tryToRegisterToTopicContext(),50)}tryToRegisterToTopicContext(){this.tocNode!=null?window.clearInterval(this[la]):this.dispatchEvent(new pa)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return t=la,Td([(0,da.state)()],o.prototype,"tocNode",void 0),Td([(0,da.state)()],o.prototype,"disableContextInteractions",void 0),o}var Gi=class extends cu(Fe){};var Lt=function(e,t,o,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n<3?s(a):n>3?s(t,o,a):s(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a},ut=class extends ir(Gi){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.withMoreOptionsButton=!1,this.iconVariant=kt.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new Qr,this.i18nProperties={feedbackMainTitle:V.properties.topicFeedbackMainTitle(),ratingSectionTitle:V.properties.topicRatingSectionTitle(),dichotomousRatingSectionTitle:V.properties.topicDichotomousRatingSectionTitle(),feedbackSectionTitle:V.properties.topicFeedbackSectionTitle()},this.updateDebouncer=new Mt.Debouncer(100),this.sendRatingDebouncer=new Mt.Debouncer(500),this.addStore(N)}render(){var t;return _d.html`
|
|
1985
1985
|
<ft-reader-feedback
|
|
1986
1986
|
.i18nProperties=${this.i18nProperties}
|
|
1987
1987
|
?ratingAllowed=${(t=this.tocNode)===null||t===void 0?void 0:t.hasRating}
|
|
@@ -2003,7 +2003,7 @@ ${Xr.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(o=this.configura
|
|
|
2003
2003
|
@mailer-feedback=${this.onMailerFeedbackSent}
|
|
2004
2004
|
@open-more-options=${this.openMoreOptions}
|
|
2005
2005
|
></ft-reader-feedback>
|
|
2006
|
-
`}update(t){var o,i,n,a;super.update(t),["tocNode","user"].some(s=>t.has(s))&&this.tocNode&&this.updateData(),t.has("editorMode")&&this.editorMode&&this.addI18nContext(cr,Vi),["map","tocNode","configuration","user","mailSubject"].some(s=>t.has(s))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,(i=(o=this.service)===null||o===void 0?void 0:o.getLink(this.tocNode.tocId))!==null&&i!==void 0?i:"",this.map.metadata,this.configuration,((a=(n=this.session)===null||n===void 0?void 0:n.profile)===null||a===void 0?void 0:a.userId)!=null)}connectedCallback(){super.connectedCallback(),this.updateData()}updateData(){this.updateDebouncer.run(async()=>{var t,o;this.tocNode&&(!((o=(t=this.session)===null||t===void 0?void 0:t.profile)===null||o===void 0)&&o.userId||this.ratingSummary==null)&&await this.fetchRatingSummary()})}async fetchRatingSummary(){var t;this.ratingSummary=await((t=this.service)===null||t===void 0?void 0:t.getTopicRating(this.tocNode.tocId))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:t.detail==null?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run(()=>this.sendRating(t.detail)))}async sendRating(t){var o,i,n;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{t==null?await((o=this.service)===null||o===void 0?void 0:o.unrateTopic(this.tocNode.tocId)):await((i=this.service)===null||i===void 0?void 0:i.rateTopic(this.tocNode.tocId,(n=this.ratingSummary)===null||n===void 0?void 0:n.type,t))}catch{this.dispatchEvent(new Mt.FtNotificationEvent({type:"error",message:V.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new Mt.FtNotificationEvent({type:"info",message:cr.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var o;try{!this.editorMode&&this.tocNode?(await((o=this.service)===null||o===void 0?void 0:o.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new Mt.FtNotificationEvent({type:"info",message:V.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new Mt.FtNotificationEvent({type:"info",message:cr.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new Mt.FtNotificationEvent({type:"error",message:V.messages.feedbackFailure()}))}}onMailerFeedbackSent(){let t=this.tocNode;this.dispatchEvent(new Wi(t))}openMoreOptions(){var t,o,i,n,a,s,l,u;this.dispatchEvent(new Fi({mapId:this.map.id,mapTitle:this.map.title,tocId:this.tocNode.tocId,topicTitle:this.tocNode.title,topicUrl:(o=(t=this.service)===null||t===void 0?void 0:t.getLink(this.tocNode.tocId))!==null&&o!==void 0?o:"",mapMetadata:((i=this.map)===null||i===void 0?void 0:i.metadata)||[],breadcrumb:((a=(n=this.stateManager)===null||n===void 0?void 0:n.service)===null||a===void 0?void 0:a.buildBreadcrumb(this.tocNode.tocId))||[],ratingType:(!((s=this.tocNode)===null||s===void 0)&&s.hasRating?(l=this.ratingSummary)===null||l===void 0?void 0:l.type:Me.NO_RATING)||Me.NO_RATING,ratingValue:(u=this.ratingSummary)===null||u===void 0?void 0:u.rating}))}};ut.elementDefinitions={"ft-reader-feedback":Q};
|
|
2006
|
+
`}update(t){var o,i,n,a;super.update(t),["tocNode","user"].some(s=>t.has(s))&&this.tocNode&&this.updateData(),t.has("editorMode")&&this.editorMode&&this.addI18nContext(cr,Vi),["map","tocNode","configuration","user","mailSubject"].some(s=>t.has(s))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,(i=(o=this.service)===null||o===void 0?void 0:o.getLink(this.tocNode.tocId))!==null&&i!==void 0?i:"",this.map.metadata,this.configuration,((a=(n=this.session)===null||n===void 0?void 0:n.profile)===null||a===void 0?void 0:a.userId)!=null)}connectedCallback(){super.connectedCallback(),this.updateData()}updateData(){this.updateDebouncer.run(async()=>{var t,o;this.tocNode&&(!((o=(t=this.session)===null||t===void 0?void 0:t.profile)===null||o===void 0)&&o.userId||this.ratingSummary==null)&&await this.fetchRatingSummary()})}async fetchRatingSummary(){var t;this.ratingSummary=await((t=this.service)===null||t===void 0?void 0:t.getTopicRating(this.tocNode.tocId))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:t.detail==null?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run(()=>this.sendRating(t.detail)))}async sendRating(t){var o,i,n;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{t==null?await((o=this.service)===null||o===void 0?void 0:o.unrateTopic(this.tocNode.tocId)):await((i=this.service)===null||i===void 0?void 0:i.rateTopic(this.tocNode.tocId,(n=this.ratingSummary)===null||n===void 0?void 0:n.type,t))}catch{this.dispatchEvent(new Mt.FtNotificationEvent({type:"error",message:V.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new Mt.FtNotificationEvent({type:"info",message:cr.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var o;try{!this.editorMode&&this.tocNode?(await((o=this.service)===null||o===void 0?void 0:o.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new Mt.FtNotificationEvent({type:"info",message:V.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new Mt.FtNotificationEvent({type:"info",message:cr.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new Mt.FtNotificationEvent({type:"error",message:V.messages.feedbackFailure()}))}}onMailerFeedbackSent(){let t=this.tocNode;this.dispatchEvent(new Wi(t))}openMoreOptions(){var t,o,i,n,a,s,l,u;this.dispatchEvent(new Fi({mapId:this.map.id,mapTitle:this.map.title,tocId:this.tocNode.tocId,topicTitle:this.tocNode.title,topicUrl:(o=(t=this.service)===null||t===void 0?void 0:t.getLink(this.tocNode.tocId))!==null&&o!==void 0?o:"",mapMetadata:((i=this.map)===null||i===void 0?void 0:i.metadata)||[],breadcrumb:((a=(n=this.stateManager)===null||n===void 0?void 0:n.service)===null||a===void 0?void 0:a.buildBreadcrumb(this.tocNode.tocId))||[],ratingType:(!((s=this.tocNode)===null||s===void 0)&&s.hasRating?(l=this.ratingSummary)===null||l===void 0?void 0:l.type:Me.NO_RATING)||Me.NO_RATING,ratingValue:(u=this.ratingSummary)===null||u===void 0?void 0:u.rating}))}};ut.elementDefinitions={"ft-reader-feedback":Q};Lt([(0,Mt.redux)({store:N.name})],ut.prototype,"session",void 0);Lt([(0,Mt.redux)({store:"reader"})],ut.prototype,"map",void 0);Lt([(0,Mt.redux)({store:N.name})],ut.prototype,"editorMode",void 0);Lt([(0,Mt.redux)({store:"reader",selector:e=>{var t;return(t=e.configuration)===null||t===void 0?void 0:t.feedback}})],ut.prototype,"configuration",void 0);Lt([(0,te.state)()],ut.prototype,"ratingSummary",void 0);Lt([(0,te.property)({type:Boolean})],ut.prototype,"hideTitle",void 0);Lt([(0,te.property)({type:Boolean})],ut.prototype,"withMoreOptionsButton",void 0);Lt([(0,te.property)()],ut.prototype,"iconVariant",void 0);Lt([(0,te.property)()],ut.prototype,"emptyStarIcon",void 0);Lt([(0,te.property)()],ut.prototype,"filledStarIcon",void 0);Lt([(0,te.property)()],ut.prototype,"emptyLikeIcon",void 0);Lt([(0,te.property)()],ut.prototype,"filledLikeIcon",void 0);Lt([(0,te.property)()],ut.prototype,"emptyDislikeIcon",void 0);Lt([(0,te.property)()],ut.prototype,"filledDislikeIcon",void 0);Lt([(0,te.query)("ft-reader-feedback")],ut.prototype,"readerFeedback",void 0);Lt([Si(Xr.properties["mail.feedback.subject"](e=>{var t,o;return[(t=e.tocNode)===null||t===void 0?void 0:t.title,(o=e.map)===null||o===void 0?void 0:o.title]}))],ut.prototype,"mailSubject",void 0);Lt([(0,Mt.reduxEventListener)({eventName:"rating-changed"})],ut.prototype,"fetchRatingSummary",null);(0,ua.customElement)("ft-reader-map-feedback")(pt);(0,ua.customElement)("ft-reader-topic-feedback")(ut);})();
|
|
2007
2007
|
/*! Bundled license information:
|
|
2008
2008
|
|
|
2009
2009
|
lit-html/lit-html.js:
|