@equinor/fusion-framework-cli 9.5.8 → 9.5.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.5.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @equinor/fusion-framework-react-components-people-provider@1.1.11
9
+
3
10
  ## 9.5.8
4
11
 
5
12
  ### Patch Changes
@@ -410,7 +410,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
410
410
  class="progress">
411
411
  </circle>
412
412
  </svg>
413
- `}}y([P({type:String,reflect:!0})],lf.prototype,"size",void 0);y([P({type:String,reflect:!0})],lf.prototype,"color",void 0);lf.styles=pW;const RA="fwc-circular-progress";let h9=class extends lf{};h9=y([I0(RA)],h9);const mW=Wo(sf,AA);Wo(lf,RA);Wo(cf,TA);const PA=({children:r,text:e})=>_.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh",overflow:"hidden"},children:_.jsx(mW,{text:e,children:r})});var vW=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},gW=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},cm;class yW{constructor(e,t={}){this.config=t,cm.set(this,void 0),vW(this,cm,e,"f")}requireInstance(e){return gW(this,cm,"f").requireInstance(e)}setAppClient(e,t=1*60*1e3){this.config.client={getAppManifest:typeof e.getAppManifest=="function"?{key:({appKey:n})=>n,client:{fn:e.getAppManifest},expire:t}:e.getAppManifest,getAppManifests:typeof e.getAppManifests=="function"?{key:()=>"app_manifests",client:{fn:e.getAppManifests},expire:t}:e.getAppManifests,getAppConfig:typeof e.getAppConfig=="function"?{key:n=>JSON.stringify(n),client:{fn:e.getAppConfig},expire:t}:e.getAppConfig}}}cm=new WeakMap;const _W=()=>({setManifest:kr("set_manifest",(r,e)=>({payload:r,meta:{created:Date.now(),update:e}})),fetchManifest:$o("fetch_manifest",(r,e)=>({payload:r,meta:{update:e}}),r=>({payload:r}),r=>({payload:r})),setConfig:kr("set_config",r=>({payload:r})),fetchConfig:$o("fetch_config",r=>({payload:r}),r=>({payload:r}),r=>({payload:r})),setModule:kr("set_module",r=>({payload:r})),importApp:$o("import_app",r=>({payload:r}),r=>({payload:r}),r=>({payload:r})),setInstance:kr("set_instance",r=>({payload:r})),initialize:$o("initialize_app",()=>({payload:null}),()=>({payload:null}),r=>({payload:r}))}),Ue=_W();xz();const bW=r=>tu(Object.assign(Object.assign({},r),{status:new Set}),e=>e.addCase(Ue.setManifest,(t,n)=>{n.meta.update?t.manifest=Object.assign(Object.assign({},t.manifest),n.payload):t.manifest=n.payload}).addCase(Ue.setConfig,(t,n)=>{t.config=n.payload}).addCase(Ue.setModule,(t,n)=>{t.modules=n.payload}).addCase(Ue.setInstance,(t,n)=>{t.instance=n.payload}).addMatcher(Tz,(t,n)=>{t.status.add(y8(n))}).addMatcher(Mz,(t,n)=>{t.status.delete(y8(n))})),wW="modulepreload",xW=function(r){return"/"+r},f9={},L_=function(e,t,n){let i=Promise.resolve();if(t&&t.length>0){const o=document.getElementsByTagName("link");i=Promise.all(t.map(a=>{if(a=xW(a),a in f9)return;f9[a]=!0;const s=a.endsWith(".css"),c=s?'[rel="stylesheet"]':"";if(!!n)for(let u=o.length-1;u>=0;u--){const h=o[u];if(h.href===a&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${c}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":wW,s||(d.as="script",d.crossOrigin=""),d.href=a,document.head.appendChild(d),s)return new Promise((u,h)=>{d.addEventListener("load",u),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>e()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})},CW=r=>e=>e.pipe(Je(Ue.fetchManifest.match),kt(t=>{const{payload:n,meta:{update:i}}=t,o=Gt(r.getAppManifest(n)).pipe(Je(a=>!!a),x0());return wd(o.pipe(Ze(a=>Ue.setManifest(a,i))),o.pipe(tf(),Ze(a=>Ue.fetchManifest.success(a)))).pipe(lr(a=>vn(Ue.fetchManifest.failure(a))))})),EW=r=>e=>e.pipe(Je(Ue.fetchConfig.match),kt(({payload:t})=>{const n=Gt(r.getAppConfig(t)).pipe(Je(i=>!!i),x0());return wd(n.pipe(Ze(i=>Ue.setConfig(i))),n.pipe(tf(),Ze(i=>Ue.fetchConfig.success(i)))).pipe(lr(i=>vn(Ue.fetchConfig.failure(i))))})),kW=()=>r=>r.pipe(Je(Ue.importApp.match),kt(({payload:e})=>Gt(L_(()=>import(e),__vite__mapDeps([]))).pipe(Ze(Ue.importApp.success),lr(t=>vn(Ue.importApp.failure(t)))))),SW=(r,e)=>{const t=bW(r),n=new nf(t);return n.addFlow(CW(e)),n.addFlow(EW(e)),n.addFlow(kW()),n};var IW=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})},Se=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},AW=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},iy,ke,MA;function ph(){return Je(r=>r!=null)}class TW{get manifest$(){return Se(this,ke,"f").pipe(Ze(({manifest:e})=>e),ph())}get config$(){return Se(this,ke,"f").pipe(Ze(({config:e})=>e),ph())}get modules$(){return Se(this,ke,"f").pipe(Ze(({modules:e})=>e),ph())}get instance$(){return Se(this,ke,"f").pipe(Ze(({instance:e})=>e),ph())}get state(){return Se(this,ke,"f").value}get appKey(){return Se(this,ke,"f").value.appKey}get manifest(){return this.state.manifest}get manifestAsync(){return Wr(this.manifest$)}get config(){return this.state.config}get configAsync(){return Wr(this.config$)}get instance(){return Se(this,ke,"f").value.instance}constructor(e,t){iy.add(this),ke.set(this,void 0),AW(this,ke,SW(e,t.provider),"f");const{appKey:n}=e,{event:i}=t;i&&Se(this,iy,"m",MA).call(this,i);const o=new Dr;i&&(o.add(()=>{i.dispatchEvent("onAppDispose",{detail:{appKey:n}})}),o.add(i.addEventListener("onAppModulesLoaded",a=>{a.detail.appKey===n&&Se(this,ke,"f").next(Ue.setInstance(a.detail.modules))}))),this.dispose=()=>{o==null||o.unsubscribe(),Se(this,ke,"f").value.instance&&Se(this,ke,"f").value.instance.dispose(),Se(this,ke,"f").complete()}}initialize(){return new Fe(e=>{Se(this,ke,"f").next(Ue.initialize()),e.add(NN([this.getManifest(),this.getAppModule(),this.getConfig()]).subscribe({next:([t,n,i])=>e.next({manifest:t,script:n,config:i}),error:t=>{e.error(t),Se(this,ke,"f").next(Ue.initialize.failure(t))},complete:()=>{Se(this,ke,"f").next(Ue.initialize.success()),e.complete()}}))})}loadConfig(){Se(this,ke,"f").next(Ue.fetchConfig(this.appKey))}loadManifest(e){Se(this,ke,"f").next(Ue.fetchManifest(this.appKey,e))}updateManifest(e,t){Se(this,ke,"f").next(Ue.setManifest(e,!t))}loadAppModule(e=!0){return IW(this,void 0,void 0,function*(){const t=yield this.getManifestAsync(e);Se(this,ke,"f").next(Ue.importApp(t.entry))})}getConfig(e=!1){return new Fe(t=>{if(Se(this,ke,"f").value.config&&(t.next(Se(this,ke,"f").value.config),!e))return t.complete();t.add(Se(this,ke,"f").addEffect("set_config",({payload:n})=>{t.next(n)})),t.add(Se(this,ke,"f").addEffect("fetch_config::success",({payload:n})=>{t.next(n),t.complete()})),t.add(Se(this,ke,"f").addEffect("fetch_config::failure",({payload:n})=>{t.error(Error("failed to load application config",{cause:n}))})),this.loadConfig()})}getConfigAsync(e=!0){return(e?Wr:Sr)(this.getConfig(!e))}getManifest(e=!1){return new Fe(t=>{if(Se(this,ke,"f").value.manifest&&(t.next(Se(this,ke,"f").value.manifest),!e))return t.complete();t.add(Se(this,ke,"f").addEffect("set_manifest",({payload:n})=>{t.next(n)})),t.add(Se(this,ke,"f").addEffect("fetch_manifest::success",({payload:n})=>{t.next(n),t.complete()})),t.add(Se(this,ke,"f").addEffect("fetch_manifest::failure",({payload:n})=>{t.error(Error("failed to load application manifest",{cause:n}))})),this.loadManifest()})}getManifestAsync(e=!0){return(e?Wr:Sr)(this.getManifest(!e))}getAppModule(e=!1){return new Fe(t=>{if(Se(this,ke,"f").value.modules&&(t.next(Se(this,ke,"f").value.modules),!e))return t.complete();t.add(Se(this,ke,"f").addEffect("set_module",({payload:n})=>{t.next(n)})),t.add(Se(this,ke,"f").addEffect("import_app::success",({payload:n})=>{t.next(n),t.complete()})),t.add(Se(this,ke,"f").addEffect("import_app::failure",({payload:n})=>{t.error(Error("failed to load application modules from script",{cause:n}))})),t.add(this.getManifest().subscribe(n=>vn(Se(this,ke,"f").next(Ue.importApp(n.entry)))))})}getAppModuleAsync(e=!0){return(e?Wr:Sr)(this.getAppModule(!e))}}ke=new WeakMap,iy=new WeakSet,MA=function(e){const{appKey:t}=this;Se(this,ke,"f").addEffect(Ue.fetchManifest.type,()=>{e.dispatchEvent("onAppManifestLoad",{detail:{appKey:t},source:this})}),Se(this,ke,"f").addEffect(Ue.fetchManifest.success.type,n=>{e.dispatchEvent("onAppManifestLoaded",{detail:{appKey:t,manifest:n.payload},source:this})}),Se(this,ke,"f").addEffect(Ue.fetchManifest.failure.type,n=>{e.dispatchEvent("onAppManifestFailure",{detail:{appKey:t,error:n.payload},source:this})}),Se(this,ke,"f").addEffect(Ue.fetchConfig.type,()=>{e.dispatchEvent("onAppConfigLoad",{detail:{appKey:t},source:this})}),Se(this,ke,"f").addEffect(Ue.fetchConfig.success.type,n=>{e.dispatchEvent("onAppConfigLoaded",{detail:{appKey:t,config:n.payload},source:this})}),Se(this,ke,"f").addEffect(Ue.fetchConfig.failure.type,n=>{e.dispatchEvent("onAppConfigFailure",{detail:{appKey:t,error:n.payload},source:this})}),Se(this,ke,"f").addEffect(Ue.importApp.type,()=>{e.dispatchEvent("onAppScriptLoad",{detail:{appKey:t},source:this})}),Se(this,ke,"f").addEffect(Ue.importApp.success.type,n=>{e.dispatchEvent("onAppScriptLoaded",{detail:{appKey:t,script:n.payload},source:this})}),Se(this,ke,"f").addEffect(Ue.importApp.failure.type,n=>{e.dispatchEvent("onAppScriptFailure",{detail:{appKey:t,error:n.payload},source:this})}),Se(this,ke,"f").addEffect(Ue.initialize.type,()=>{e.dispatchEvent("onAppInitialize",{detail:{appKey:t},source:this})}),Se(this,ke,"f").addEffect(Ue.initialize.success.type,()=>{e.dispatchEvent("onAppInitialized",{detail:{appKey:t},source:this})}),Se(this,ke,"f").addEffect(Ue.initialize.failure.type,({payload:n})=>{e.dispatchEvent("onAppInitializeFailure",{detail:{appKey:t,error:n},source:this})})};class vs extends Error{static fromHttpResponse(e,t){switch(e.status){case 401:return new vs("unauthorized","failed to load application manifest, request not authorized",t);case 404:return new vs("not_found","application manifest not found",t)}return new vs("unknown",`failed to load application manifest, status code ${e.status}`,t)}constructor(e,t,n){super(t,n),this.type=e}}class $c extends Error{static fromHttpResponse(e,t){switch(e.status){case 401:return new $c("unauthorized","failed to load application config, request not authorized",t);case 404:return new $c("not_found","application config not found",t)}return new $c("unknown",`failed to load application config, status code ${e.status}`,t)}constructor(e,t,n){super(t,n),this.type=e}}var sn=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},dp=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},mh,vh,Ka,Ya,lm;class RW{static compareAppManifest(e,t){return JSON.stringify(e)===JSON.stringify(t)}get current(){return sn(this,Ka,"f").value}get current$(){return sn(this,Ka,"f").pipe(l_((e,t)=>e&&t?e.appKey===t.appKey:e===t))}constructor(e){mh.set(this,void 0),vh.set(this,void 0),Ka.set(this,void 0),Ya.set(this,new Dr),lm.set(this,void 0);const{event:t,config:n}=e;dp(this,lm,t,"f"),dp(this,Ka,new Qd(void 0),"f"),this.appClient=new qr(n.client.getAppManifest),dp(this,mh,new qr(n.client.getAppManifests),"f"),dp(this,vh,new qr(n.client.getAppConfig),"f"),sn(this,Ya,"f").add(()=>this.appClient.complete()),sn(this,Ya,"f").add(()=>sn(this,mh,"f").complete()),sn(this,Ya,"f").add(()=>sn(this,vh,"f").complete()),sn(this,Ya,"f").add(this.current$.pipe(C5(),eI(()=>!!t)).subscribe(([i,o])=>{t==null||t.dispatchEvent("onCurrentAppChanged",{source:this,detail:{previous:i,next:o}})})),sn(this,Ya,"f").add(sn(this,Ka,"f").pipe(C5(),Ze(([i])=>i),ph()).subscribe(i=>i.dispose()))}getAppManifest(e){return qr.extractQueryValue(this.appClient.query({appKey:e}).pipe(lr(t=>{const{cause:n}=t;throw n instanceof vs?n:n instanceof k1?vs.fromHttpResponse(n.response,{cause:n}):new vs("unknown","failed to load manifest",{cause:n})})))}getAllAppManifests(){return qr.extractQueryValue(sn(this,mh,"f").query())}getAppConfig(e,t){return qr.extractQueryValue(sn(this,vh,"f").query({appKey:e,tag:t}).pipe(lr(n=>{const{cause:i}=n;throw i instanceof $c?i:i instanceof k1?$c.fromHttpResponse(i.response,{cause:i}):new $c("unknown","failed to load config",{cause:i})})))}setCurrentApp(e){const t=typeof e=="string"?this.createApp({appKey:e}):e;sn(this,Ka,"f").next(t)}clearCurrentApp(){sn(this,Ka,"f").next(null)}createApp(e){return console.warn(),new TW(e,{provider:this,event:sn(this,lm,"f")})}dispose(){sn(this,Ya,"f").unsubscribe()}}mh=new WeakMap,vh=new WeakMap,Ka=new WeakMap,Ya=new WeakMap,lm=new WeakMap;var PW=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})};const oy="app",MW={name:oy,configure:()=>new $W,initialize:r=>PW(void 0,void 0,void 0,function*(){const e=yield r.config.createConfig(r),t=yield r.requireInstance("event").catch(()=>{});return new RW({config:e,event:t})}),dispose:r=>{r.instance.dispose()}};var up=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})},p9=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},dm;class $W{constructor(){this.defaultExpireTime=1*60*1e3,dm.set(this,[])}addConfigBuilder(e){p9(this,dm,"f").push(e)}_createHttpClient(e){return up(this,void 0,void 0,function*(){const t=yield e.requireInstance("http");if(t.hasClient(oy))return t.createClient(oy);{const n=yield e.requireInstance("serviceDiscovery");try{return yield n.createClient("app")}catch{return yield n.createClient("portal")}}})}createConfig(e){var t;return up(this,void 0,void 0,function*(){const n=yield p9(this,dm,"f").reduce((i,o)=>up(this,void 0,void 0,function*(){const a=new yW(e,yield i);return yield Promise.resolve(o(a)),Object.assign(i,a.config)}),Promise.resolve({}));return(t=n.client)!==null&&t!==void 0||(n.client=yield up(this,void 0,void 0,function*(){const i=yield this._createHttpClient(e);return{getAppManifest:{client:{fn:({appKey:o})=>i.json$(`/api/apps/${o}`)},key:({appKey:o})=>o,expire:this.defaultExpireTime},getAppManifests:{client:{fn:()=>i.json$("/api/apps")},key:()=>"manifests",expire:this.defaultExpireTime},getAppConfig:{client:{fn:({appKey:o,tag:a})=>i.json$(`/api/apps/${o}/config${a?`?tag=${a}`:""}`)},key:o=>JSON.stringify(o),expire:this.defaultExpireTime}}})),n})}}dm=new WeakMap;const HW=(r,e)=>{r.addConfig({module:MW,configure:t=>{e&&t.addConfigBuilder(e)}})},OW="bookmarkId",ZW=()=>new URLSearchParams(document.location.search).get(OW);var LW=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},NW=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},um;class DW{constructor(e,t={}){this.config=t,um.set(this,void 0),LW(this,um,e,"f")}requireInstance(e){return NW(this,um,"f").requireInstance(e)}setSourceSystem(e){this.config.sourceSystem=e}setBookmarkIdResolver(e){this.config.resolveBookmarkId=e}serCustomBookmarkApiClient(e){this.config.clientConfiguration&&(this.config.clientConfiguration.client=e)}setContextIdResolver(e){this.config.getContextId=e}setCurrentAppIdResolver(e){this.config.getCurrentAppIdentification=e}setEventProvider(e){this.config.event=e}setBookmarkQueryClient(e){this.config.clientConfiguration&&(this.config.clientConfiguration.queryClientConfig={getAllBookmarks:typeof e.getAllBookmarks=="function"?{key:()=>"all-bookmarks",client:{fn:e.getAllBookmarks},validate:({args:n})=>n.isValid}:e.getAllBookmarks,getBookmarkById:typeof e.getBookmarkById=="function"?{key:({id:n})=>n,client:{fn:e.getBookmarkById},expire:6e4,validate:()=>!1}:e.getBookmarkById})}}um=new WeakMap;var Ks=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})},Vg=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},ay,hm,$A;class VW{constructor(){ay.add(this),this.defaultExpireTime=1*60*1e3,hm.set(this,[])}addConfigBuilder(e){Vg(this,hm,"f").push(e)}createConfig(e,t){return Ks(this,void 0,void 0,function*(){const n=yield Vg(this,hm,"f").reduce((o,a)=>Ks(this,void 0,void 0,function*(){const s=new DW(e,yield o);return yield Promise.resolve(a(s)),Object.assign(o,s.config)}),Promise.resolve({})),i=yield this._getAppProvider(e);if(Vg(this,ay,"m",$A).call(this,t,n),n.resolveBookmarkId||(n.resolveBookmarkId=ZW),n.getCurrentAppIdentification||(n.getCurrentAppIdentification=()=>{var o;return(o=i.current)===null||o===void 0?void 0:o.appKey}),!n.getContextId){const o=yield this._getContextProvider(e);n.getContextId=()=>{var a;return(a=o.currentContext)===null||a===void 0?void 0:a.id}}if(!n.event){const o=yield this._getEventProvider(e);n.event=o}if(n.clientConfiguration=yield this._createClientConfiguration(e,n.clientConfiguration),!n.sourceSystem)throw Error("missing sourceSystem configuration");return n})}_createClientConfiguration(e,t={}){return Ks(this,void 0,void 0,function*(){if(!t.client){const n=yield this._getServiceProvider(e);t.client=yield n.createBookmarksClient("fetch")}if(!t.queryClientConfig){const i=yield(yield this._getServiceProvider(e)).createBookmarksClient("json$");t.queryClientConfig=Object.assign({getBookmarkById:{client:{fn:o=>i.get("v1",o)},key:({id:o})=>o,expire:this.defaultExpireTime},getAllBookmarks:{client:{fn:()=>i.getAll("v1")},key:()=>"all-bookmarks",validate:({args:o})=>o.isValid,expire:this.defaultExpireTime}},i)}return t})}_getServiceProvider(e){var t;return Ks(this,void 0,void 0,function*(){if(e.hasModule("services"))return e.requireInstance("services");{const n=(t=e.ref)===null||t===void 0?void 0:t.services;if(n)return n;throw Error("[BookmarkConfigurator] No service provider configures [ServicesModule] ")}})}_getContextProvider(e){var t;return Ks(this,void 0,void 0,function*(){if(e.hasModule("context"))return e.requireInstance("context");{const n=(t=e.ref)===null||t===void 0?void 0:t.context;if(n)return n;throw Error("[BookmarkConfigurator] No context provider configures [ContextModule]")}})}_getAppProvider(e){var t;return Ks(this,void 0,void 0,function*(){if(e.hasModule("app"))return e.requireInstance("app");{const n=(t=e.ref)===null||t===void 0?void 0:t.app;if(n)return n;throw Error("[BookmarkConfigurator] No app provider configures [AppModule]")}})}_getEventProvider(e){var t;return Ks(this,void 0,void 0,function*(){if(e.hasModule("event"))return e.requireInstance("event");{const n=(t=e.ref)===null||t===void 0?void 0:t.event;if(n)return n;throw Error("[BookmarkConfigurator] No event provider configures [EventModule]")}})}}hm=new WeakMap,ay=new WeakSet,$A=function(e,t){e&&(t.clientConfiguration=e.config.clientConfiguration,t.sourceSystem=e.config.sourceSystem,t.getContextId=e.config.getContextId,t.getCurrentAppIdentification=e.config.getCurrentAppIdentification)};const dn={getAll:$o("getAll",r=>({payload:r}),r=>({payload:r}),r=>({payload:r})),delete:$o("delete",r=>({payload:r}),r=>({payload:r})),addFavorite:$o("addFavorite",r=>({payload:r}),r=>({payload:r})),removeFavorite:$o("removeFavorite",r=>({payload:r}),r=>({payload:r})),update:$o("update",r=>({payload:r}),r=>({payload:r})),create:$o("create",r=>({payload:r}),r=>({payload:r}),r=>({payload:r}))},zW={bookmarks:{}},FW=tu(zW,r=>{r.addCase(dn.create.success,(e,{payload:t})=>{e.bookmarks[t.id]=t}).addCase(dn.getAll.success,(e,{payload:t})=>{t.forEach(n=>{e.bookmarks[n.id]=n})}).addCase(dn.delete.success,(e,{payload:t})=>{delete e.bookmarks[t]}).addCase(dn.removeFavorite,(e,{payload:t})=>{delete e.bookmarks[t]}).addCase(dn.addFavorite,(e,{payload:t})=>{e.bookmarks[t.id]=t}).addCase(dn.update.success,(e,{payload:t})=>{e.bookmarks[t.id]=t})});var N_=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})};const jW=(r,e)=>t=>t.pipe(eu(dn.getAll.type),kt(n=>r.query({isValid:n.payload}).pipe(tf(),Ze(i=>dn.getAll.success(i.value.filter(o=>o.sourceSystem.identifier===e))),lr(()=>Dt)))),UW=r=>e=>e.pipe(eu(dn.create.type),kt(t=>N_(void 0,void 0,void 0,function*(){const n=yield r.post("v1",t.payload);return dn.create.success(yield n.json())}))),m9=r=>e=>e.pipe(eu(dn.update.type),kt(t=>N_(void 0,void 0,void 0,function*(){const n=yield r.patch("v1",t.payload);return dn.update.success(yield n.json())}))),BW=r=>e=>e.pipe(eu(dn.delete.type),kt(t=>N_(void 0,void 0,void 0,function*(){return(yield r.delete("v1",{id:t.payload})).ok,dn.delete.success(t.payload)})));var bo=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})},Ys=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},ge=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},fm,Ll,aa,to,Wi,M2,fa,Mt,ua,HA,OA;class qW{constructor(e,t,n){fm.add(this),Ll.set(this,void 0),aa.set(this,void 0),to.set(this,void 0),Wi.set(this,void 0),M2.set(this,void 0),fa.set(this,void 0),Mt.set(this,void 0),ua.set(this,new Dr),Ys(this,Wi,new Qd(void 0),"f"),Ys(this,to,e.client,"f"),Ys(this,Ll,new qr(e.queryClientConfig.getBookmarkById),"f"),Ys(this,aa,new qr(e.queryClientConfig.getAllBookmarks),"f"),Ys(this,M2,t,"f"),Ys(this,fa,n,"f"),Ys(this,Mt,Oz(dn,FW),"f"),ge(this,fm,"m",OA).call(this),ge(this,fm,"m",HA).call(this),n&&ge(this,ua,"f").add(ge(this,Wi,"f").subscribe(i=>{n.dispatchEvent("onBookmarkChanged",{detail:i,canBubble:!0,source:this})}))}get currentBookmark$(){return ge(this,Wi,"f").asObservable()}get bookmarks$(){return ge(this,Mt,"f").subject.pipe(Ze(e=>Object.values(e.bookmarks).map(t=>t)))}setCurrentBookmark(e){return bo(this,void 0,void 0,function*(){if(!e)return ge(this,Wi,"f").next(void 0);if(typeof e=="string"){const t=yield this.resolverBookmarkAsync(e);return this.setBookmark(t)}else if(e!==ge(this,Wi,"f").value)return this.setBookmark(e)})}setBookmark(e){return bo(this,void 0,void 0,function*(){ge(this,fa,"f")?(yield ge(this,fa,"f").dispatchEvent("onBookmarkChange",{detail:e,cancelable:!0,canBubble:!0,source:this})).canceled||ge(this,Wi,"f").next(e):ge(this,Wi,"f").next(e)})}resolverBookmark(e){return ge(this,Ll,"f").query({id:e}).pipe(Ze(t=>t.value))}resolverBookmarkAsync(e){return Sr(this.resolverBookmark(e))}getAllBookmarks(e={isValid:!1}){const{isValid:t}=e;return new Fe(n=>{ge(this,Mt,"f").dispatch.getAll(t),n.add(ge(this,Mt,"f").subject.addEffect("getAll::success",i=>{var o;n.next(i.payload),n.complete(),(o=ge(this,fa,"f"))===null||o===void 0||o.dispatchEvent("onBookmarksChanged",{detail:i.payload,source:this})}))})}getAllBookmarksAsync(e={isValid:!1}){return bo(this,void 0,void 0,function*(){return Sr(this.getAllBookmarks(e))})}getBookmarkById(e){return bo(this,void 0,void 0,function*(){return yield(yield ge(this,to,"f").get("v1",{id:e})).json()})}createBookmark(e){return new Fe(t=>{ge(this,Mt,"f").dispatch.create(e),t.add(ge(this,Mt,"f").subject.addEffect("create::success",n=>{t.next(n.payload),t.complete()})),t.add(ge(this,Mt,"f").subject.addEffect("create::failure",n=>{t.error(n.payload)}))})}createBookmarkAsync(e){return bo(this,void 0,void 0,function*(){return Sr(this.createBookmark(e))})}updateBookmark(e){return new Fe(t=>{ge(this,Mt,"f").dispatch.update(e),t.add(ge(this,Mt,"f").subject.addEffect("update::success",n=>{t.next(n.payload),t.complete(),ge(this,Ll,"f").cache.invalidate(n.payload.id)}))})}updateBookmarkAsync(e){return bo(this,void 0,void 0,function*(){return Sr(this.updateBookmark(e))})}deleteBookmarkById(e){return new Fe(t=>{ge(this,Mt,"f").dispatch.delete(e),t.add(ge(this,Mt,"f").subject.addEffect("delete::success",n=>{t.next(n.payload),t.complete(),ge(this,Ll,"f").cache.invalidate(n.payload)}))})}deleteBookmarkByIdAsync(e){return bo(this,void 0,void 0,function*(){return Sr(this.deleteBookmarkById(e))})}addBookmarkFavoriteAsync(e){return bo(this,void 0,void 0,function*(){(yield ge(this,to,"f").addFavorite("v1",{bookmarkId:e})).ok&&ge(this,Wi,"f").value&&ge(this,Mt,"f").dispatch.addFavorite(ge(this,Wi,"f").value)})}removeBookmarkFavoriteAsync(e){return bo(this,void 0,void 0,function*(){(yield ge(this,to,"f").removeFavorite("v1",{bookmarkId:e})).ok&&ge(this,Mt,"f").dispatch.removeFavorite(e)})}verifyBookmarkFavoriteAsync(e){return bo(this,void 0,void 0,function*(){return!!(yield ge(this,to,"f").verifyFavorite("v1",{bookmarkId:e})).ok})}dispose(){ge(this,ua,"f").unsubscribe()}}Ll=new WeakMap,aa=new WeakMap,to=new WeakMap,Wi=new WeakMap,M2=new WeakMap,fa=new WeakMap,Mt=new WeakMap,ua=new WeakMap,fm=new WeakSet,HA=function(){ge(this,Mt,"f").subject.addEffect("create::success",e=>{var t;ge(this,aa,"f").cache.invalidate("all-bookmarks"),(t=ge(this,fa,"f"))===null||t===void 0||t.dispatchEvent("onBookmarkCreated",{detail:e.payload,canBubble:!0,source:this})}),ge(this,Mt,"f").subject.addEffect("delete::success",e=>{var t;console.log("here"),ge(this,aa,"f").cache.invalidate("all-bookmarks"),(t=ge(this,fa,"f"))===null||t===void 0||t.dispatchEvent("onBookmarkDeleted",{detail:e.payload,canBubble:!0,source:this})}),ge(this,Mt,"f").subject.addEffect("update::success",e=>{var t;ge(this,aa,"f").cache.invalidate("all-bookmarks"),(t=ge(this,fa,"f"))===null||t===void 0||t.dispatchEvent("onBookmarkUpdated",{detail:e.payload,canBubble:!0,source:this})}),ge(this,Mt,"f").subject.addEffect("addFavorite::request",()=>{ge(this,aa,"f").cache.invalidate("all-bookmarks")}),ge(this,Mt,"f").subject.addEffect("removeFavorite::request",()=>{ge(this,aa,"f").cache.invalidate("all-bookmarks")})},OA=function(){ge(this,ua,"f").add(ge(this,Mt,"f").subject.addFlow(jW(ge(this,aa,"f"),ge(this,M2,"f").identifier))),ge(this,ua,"f").add(ge(this,Mt,"f").subject.addFlow(UW(ge(this,to,"f")))),ge(this,ua,"f").add(ge(this,Mt,"f").subject.addFlow(BW(ge(this,to,"f")))),ge(this,ua,"f").add(ge(this,Mt,"f").subject.addFlow(m9(ge(this,to,"f")))),ge(this,ua,"f").add(ge(this,Mt,"f").subject.addFlow(m9(ge(this,to,"f"))))};var Ro=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})},WW=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},Ui=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},Nl,lc,pm,sy,cy,ly;class GW{get currentBookmark$(){return this._bookmarkClient.currentBookmark$}get bookmarks$(){return this._bookmarkClient.bookmarks$}constructor(e,t){Nl.add(this),lc.set(this,void 0),pm.set(this,new Dr),this.bookmarkCreators={},sy.set(this,()=>{this.bookmarkCreators={}}),this.config=e,WW(this,lc,e.event,"f"),this._bookmarkClient=t?t._bookmarkClient:new qW(e.clientConfiguration,e.sourceSystem,e.event);const n=e.resolveBookmarkId&&e.resolveBookmarkId();n&&this._bookmarkClient.setCurrentBookmark(n),Ui(this,lc,"f")&&Ui(this,pm,"f").add(Ui(this,lc,"f").addEventListener("onCurrentAppChanged",Ui(this,sy,"f")))}getBookmarkById(e){return Ro(this,void 0,void 0,function*(){return yield this._bookmarkClient.getBookmarkById(e)})}setCurrentBookmark(e){return Ro(this,void 0,void 0,function*(){this._bookmarkClient.setCurrentBookmark(e)})}getAllBookmarks(){return this._bookmarkClient.getAllBookmarks()}getAllBookmarksAsync(){return Ro(this,void 0,void 0,function*(){return this._bookmarkClient.getAllBookmarksAsync()})}updateBookmark(e){return this._bookmarkClient.updateBookmark(e)}updateBookmarkAsync(e,t){return Ro(this,void 0,void 0,function*(){if(Ui(this,Nl,"m",ly).call(this)===e.appKey){if(t!=null&&t.updatePayload){const n=yield Ui(this,Nl,"m",cy).call(this);e=Object.assign(Object.assign({},e),{payload:n})}return this._bookmarkClient.updateBookmarkAsync(e)}})}deleteBookmarkById(e){return this._bookmarkClient.deleteBookmarkById(e)}deleteBookmarkByIdAsync(e){return this._bookmarkClient.deleteBookmarkByIdAsync(e)}addBookmarkFavoriteAsync(e){return Ro(this,void 0,void 0,function*(){yield this._bookmarkClient.addBookmarkFavoriteAsync(e)})}removeBookmarkFavoriteAsync(e){return Ro(this,void 0,void 0,function*(){yield this._bookmarkClient.removeBookmarkFavoriteAsync(e)})}verifyBookmarkFavoriteAsync(e){return Ro(this,void 0,void 0,function*(){return yield this._bookmarkClient.verifyBookmarkFavoriteAsync(e)})}addStateCreator(e,t){var n;const i=t||"#creator";return Ui(this,lc,"f")&&((n=Ui(this,lc,"f"))===null||n===void 0||n.dispatchEvent("onAddCreator",{source:this,canBubble:!0,detail:{key:t,cb:e}})),this.bookmarkCreators[i]=e,()=>{delete this.bookmarkCreators[i]}}createBookmark(e){return Ro(this,void 0,void 0,function*(){const t=yield Ui(this,Nl,"m",cy).call(this),n=this.config.getContextId&&this.config.getContextId(),i=Ui(this,Nl,"m",ly).call(this),o=Object.assign(Object.assign({},e),{appKey:i,contextId:n,sourceSystem:this.config.sourceSystem,payload:t});return this._bookmarkClient.createBookmarkAsync(o)})}dispose(){Ui(this,pm,"f").unsubscribe(),this._bookmarkClient.dispose()}}lc=new WeakMap,pm=new WeakMap,sy=new WeakMap,Nl=new WeakSet,cy=function(){return Ro(this,void 0,void 0,function*(){const e=this.bookmarkCreators;if(!e||Object.keys(e).length===0)throw Error("No creator registered on this BookmarkProvider");return typeof e["#creator"]=="function"?e["#creator"]():yield Object.entries(e).reduce((t,[n,i])=>Ro(this,void 0,void 0,function*(){return Object.assign(yield t,{[n]:yield i()})}),Promise.resolve({}))})},ly=function(){const e=this.config.getCurrentAppIdentification&&this.config.getCurrentAppIdentification();if(!e)throw new Error("There is noe current application selected, can't create bookmark.");return e};var KW=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})};const YW="bookmark",QW={name:YW,configure:()=>new VW,initialize:r=>KW(void 0,void 0,void 0,function*(){var e;const t=(e=r.ref)===null||e===void 0?void 0:e.bookmark,n=yield r.config.createConfig(r,t);return new GW(n,t)}),dispose:r=>{r.instance.dispose()}},XW=(r,e)=>{r.addConfig({module:QW,configure:t=>{e&&t.addConfigBuilder(e)}})};class JW{}/**
413
+ `}}y([P({type:String,reflect:!0})],lf.prototype,"size",void 0);y([P({type:String,reflect:!0})],lf.prototype,"color",void 0);lf.styles=pW;const RA="fwc-circular-progress";let h9=class extends lf{};h9=y([I0(RA)],h9);const mW=Wo(sf,AA);Wo(lf,RA);Wo(cf,TA);const PA=({children:r,text:e})=>_.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh",overflow:"hidden"},children:_.jsx(mW,{text:e,children:r})});var vW=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},gW=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},cm;class yW{constructor(e,t={}){this.config=t,cm.set(this,void 0),vW(this,cm,e,"f")}requireInstance(e){return gW(this,cm,"f").requireInstance(e)}setAppClient(e,t=1*60*1e3){this.config.client={getAppManifest:typeof e.getAppManifest=="function"?{key:({appKey:n})=>n,client:{fn:e.getAppManifest},expire:t}:e.getAppManifest,getAppManifests:typeof e.getAppManifests=="function"?{key:()=>"app_manifests",client:{fn:e.getAppManifests},expire:t}:e.getAppManifests,getAppConfig:typeof e.getAppConfig=="function"?{key:n=>JSON.stringify(n),client:{fn:e.getAppConfig},expire:t}:e.getAppConfig}}}cm=new WeakMap;const _W=()=>({setManifest:kr("set_manifest",(r,e)=>({payload:r,meta:{created:Date.now(),update:e}})),fetchManifest:$o("fetch_manifest",(r,e)=>({payload:r,meta:{update:e}}),r=>({payload:r}),r=>({payload:r})),setConfig:kr("set_config",r=>({payload:r})),fetchConfig:$o("fetch_config",r=>({payload:r}),r=>({payload:r}),r=>({payload:r})),setModule:kr("set_module",r=>({payload:r})),importApp:$o("import_app",r=>({payload:r}),r=>({payload:r}),r=>({payload:r})),setInstance:kr("set_instance",r=>({payload:r})),initialize:$o("initialize_app",()=>({payload:null}),()=>({payload:null}),r=>({payload:r}))}),Ue=_W();xz();const bW=r=>tu(Object.assign(Object.assign({},r),{status:new Set}),e=>e.addCase(Ue.setManifest,(t,n)=>{n.meta.update?t.manifest=Object.assign(Object.assign({},t.manifest),n.payload):t.manifest=n.payload}).addCase(Ue.setConfig,(t,n)=>{t.config=n.payload}).addCase(Ue.setModule,(t,n)=>{t.modules=n.payload}).addCase(Ue.setInstance,(t,n)=>{t.instance=n.payload}).addMatcher(Tz,(t,n)=>{t.status.add(y8(n))}).addMatcher(Mz,(t,n)=>{t.status.delete(y8(n))})),wW="modulepreload",xW=function(r){return"/"+r},f9={},L_=function(e,t,n){let i=Promise.resolve();if(t&&t.length>0){const o=document.getElementsByTagName("link");i=Promise.all(t.map(a=>{if(a=xW(a),a in f9)return;f9[a]=!0;const s=a.endsWith(".css"),c=s?'[rel="stylesheet"]':"";if(!!n)for(let u=o.length-1;u>=0;u--){const h=o[u];if(h.href===a&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${c}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":wW,s||(d.as="script",d.crossOrigin=""),d.href=a,document.head.appendChild(d),s)return new Promise((u,h)=>{d.addEventListener("load",u),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>e()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})},CW=r=>e=>e.pipe(Je(Ue.fetchManifest.match),kt(t=>{const{payload:n,meta:{update:i}}=t,o=Gt(r.getAppManifest(n)).pipe(Je(a=>!!a),x0());return wd(o.pipe(Ze(a=>Ue.setManifest(a,i))),o.pipe(tf(),Ze(a=>Ue.fetchManifest.success(a)))).pipe(lr(a=>vn(Ue.fetchManifest.failure(a))))})),EW=r=>e=>e.pipe(Je(Ue.fetchConfig.match),kt(({payload:t})=>{const n=Gt(r.getAppConfig(t)).pipe(Je(i=>!!i),x0());return wd(n.pipe(Ze(i=>Ue.setConfig(i))),n.pipe(tf(),Ze(i=>Ue.fetchConfig.success(i)))).pipe(lr(i=>vn(Ue.fetchConfig.failure(i))))})),kW=()=>r=>r.pipe(Je(Ue.importApp.match),kt(({payload:e})=>Gt(L_(()=>import(e),__vite__mapDeps([]))).pipe(Ze(Ue.importApp.success),lr(t=>vn(Ue.importApp.failure(t)))))),SW=(r,e)=>{const t=bW(r),n=new nf(t);return n.addFlow(CW(e)),n.addFlow(EW(e)),n.addFlow(kW()),n};var IW=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})},Se=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},AW=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},iy,ke,MA;function ph(){return Je(r=>r!=null)}class TW{get manifest$(){return Se(this,ke,"f").pipe(Ze(({manifest:e})=>e),ph())}get config$(){return Se(this,ke,"f").pipe(Ze(({config:e})=>e),ph())}get modules$(){return Se(this,ke,"f").pipe(Ze(({modules:e})=>e),ph())}get instance$(){return Se(this,ke,"f").pipe(Ze(({instance:e})=>e),ph())}get state(){return Se(this,ke,"f").value}get appKey(){return Se(this,ke,"f").value.appKey}get manifest(){return this.state.manifest}get manifestAsync(){return Wr(this.manifest$)}get config(){return this.state.config}get configAsync(){return Wr(this.config$)}get instance(){return Se(this,ke,"f").value.instance}constructor(e,t){iy.add(this),ke.set(this,void 0),AW(this,ke,SW(e,t.provider),"f");const{appKey:n}=e,{event:i}=t;i&&Se(this,iy,"m",MA).call(this,i);const o=new Dr;i&&(o.add(()=>{i.dispatchEvent("onAppDispose",{detail:{appKey:n}})}),o.add(i.addEventListener("onAppModulesLoaded",a=>{a.detail.appKey===n&&Se(this,ke,"f").next(Ue.setInstance(a.detail.modules))}))),this.dispose=()=>{o==null||o.unsubscribe(),Se(this,ke,"f").value.instance&&Se(this,ke,"f").value.instance.dispose(),Se(this,ke,"f").complete()}}initialize(){return new Fe(e=>{Se(this,ke,"f").next(Ue.initialize()),e.add(NN([this.getManifest(),this.getAppModule(),this.getConfig()]).subscribe({next:([t,n,i])=>e.next({manifest:t,script:n,config:i}),error:t=>{e.error(t),Se(this,ke,"f").next(Ue.initialize.failure(t))},complete:()=>{Se(this,ke,"f").next(Ue.initialize.success()),e.complete()}}))})}loadConfig(){Se(this,ke,"f").next(Ue.fetchConfig(this.appKey))}loadManifest(e){Se(this,ke,"f").next(Ue.fetchManifest(this.appKey,e))}updateManifest(e,t){Se(this,ke,"f").next(Ue.setManifest(e,!t))}loadAppModule(e=!0){return IW(this,void 0,void 0,function*(){const t=yield this.getManifestAsync(e);Se(this,ke,"f").next(Ue.importApp(t.entry))})}getConfig(e=!1){return new Fe(t=>{if(Se(this,ke,"f").value.config&&(t.next(Se(this,ke,"f").value.config),!e))return t.complete();t.add(Se(this,ke,"f").addEffect("set_config",({payload:n})=>{t.next(n)})),t.add(Se(this,ke,"f").addEffect("fetch_config::success",({payload:n})=>{t.next(n),t.complete()})),t.add(Se(this,ke,"f").addEffect("fetch_config::failure",({payload:n})=>{t.error(Error("failed to load application config",{cause:n}))})),this.loadConfig()})}getConfigAsync(e=!0){return(e?Wr:Sr)(this.getConfig(!e))}getManifest(e=!1){return new Fe(t=>{if(Se(this,ke,"f").value.manifest&&(t.next(Se(this,ke,"f").value.manifest),!e))return t.complete();t.add(Se(this,ke,"f").addEffect("set_manifest",({payload:n})=>{t.next(n)})),t.add(Se(this,ke,"f").addEffect("fetch_manifest::success",({payload:n})=>{t.next(n),t.complete()})),t.add(Se(this,ke,"f").addEffect("fetch_manifest::failure",({payload:n})=>{t.error(Error("failed to load application manifest",{cause:n}))})),this.loadManifest()})}getManifestAsync(e=!0){return(e?Wr:Sr)(this.getManifest(!e))}getAppModule(e=!1){return new Fe(t=>{if(Se(this,ke,"f").value.modules&&(t.next(Se(this,ke,"f").value.modules),!e))return t.complete();t.add(Se(this,ke,"f").addEffect("set_module",({payload:n})=>{t.next(n)})),t.add(Se(this,ke,"f").addEffect("import_app::success",({payload:n})=>{t.next(n),t.complete()})),t.add(Se(this,ke,"f").addEffect("import_app::failure",({payload:n})=>{t.error(Error("failed to load application modules from script",{cause:n}))})),t.add(this.getManifest().subscribe(n=>vn(Se(this,ke,"f").next(Ue.importApp(n.entry)))))})}getAppModuleAsync(e=!0){return(e?Wr:Sr)(this.getAppModule(!e))}}ke=new WeakMap,iy=new WeakSet,MA=function(e){const{appKey:t}=this;Se(this,ke,"f").addEffect(Ue.fetchManifest.type,()=>{e.dispatchEvent("onAppManifestLoad",{detail:{appKey:t},source:this})}),Se(this,ke,"f").addEffect(Ue.fetchManifest.success.type,n=>{e.dispatchEvent("onAppManifestLoaded",{detail:{appKey:t,manifest:n.payload},source:this})}),Se(this,ke,"f").addEffect(Ue.fetchManifest.failure.type,n=>{e.dispatchEvent("onAppManifestFailure",{detail:{appKey:t,error:n.payload},source:this})}),Se(this,ke,"f").addEffect(Ue.fetchConfig.type,()=>{e.dispatchEvent("onAppConfigLoad",{detail:{appKey:t},source:this})}),Se(this,ke,"f").addEffect(Ue.fetchConfig.success.type,n=>{e.dispatchEvent("onAppConfigLoaded",{detail:{appKey:t,config:n.payload},source:this})}),Se(this,ke,"f").addEffect(Ue.fetchConfig.failure.type,n=>{e.dispatchEvent("onAppConfigFailure",{detail:{appKey:t,error:n.payload},source:this})}),Se(this,ke,"f").addEffect(Ue.importApp.type,()=>{e.dispatchEvent("onAppScriptLoad",{detail:{appKey:t},source:this})}),Se(this,ke,"f").addEffect(Ue.importApp.success.type,n=>{e.dispatchEvent("onAppScriptLoaded",{detail:{appKey:t,script:n.payload},source:this})}),Se(this,ke,"f").addEffect(Ue.importApp.failure.type,n=>{e.dispatchEvent("onAppScriptFailure",{detail:{appKey:t,error:n.payload},source:this})}),Se(this,ke,"f").addEffect(Ue.initialize.type,()=>{e.dispatchEvent("onAppInitialize",{detail:{appKey:t},source:this})}),Se(this,ke,"f").addEffect(Ue.initialize.success.type,()=>{e.dispatchEvent("onAppInitialized",{detail:{appKey:t},source:this})}),Se(this,ke,"f").addEffect(Ue.initialize.failure.type,({payload:n})=>{e.dispatchEvent("onAppInitializeFailure",{detail:{appKey:t,error:n},source:this})})};class vs extends Error{static fromHttpResponse(e,t){switch(e.status){case 401:return new vs("unauthorized","failed to load application manifest, request not authorized",t);case 404:return new vs("not_found","application manifest not found",t)}return new vs("unknown",`failed to load application manifest, status code ${e.status}`,t)}constructor(e,t,n){super(t,n),this.type=e}}class $c extends Error{static fromHttpResponse(e,t){switch(e.status){case 401:return new $c("unauthorized","failed to load application config, request not authorized",t);case 404:return new $c("not_found","application config not found",t)}return new $c("unknown",`failed to load application config, status code ${e.status}`,t)}constructor(e,t,n){super(t,n),this.type=e}}var sn=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},dp=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},mh,vh,Ka,Ya,lm;class RW{static compareAppManifest(e,t){return JSON.stringify(e)===JSON.stringify(t)}get current(){return sn(this,Ka,"f").value}get current$(){return sn(this,Ka,"f").pipe(l_((e,t)=>e&&t?e.appKey===t.appKey:e===t))}constructor(e){mh.set(this,void 0),vh.set(this,void 0),Ka.set(this,void 0),Ya.set(this,new Dr),lm.set(this,void 0);const{event:t,config:n}=e;dp(this,lm,t,"f"),dp(this,Ka,new Qd(void 0),"f"),this.appClient=new qr(n.client.getAppManifest),dp(this,mh,new qr(n.client.getAppManifests),"f"),dp(this,vh,new qr(n.client.getAppConfig),"f"),sn(this,Ya,"f").add(()=>this.appClient.complete()),sn(this,Ya,"f").add(()=>sn(this,mh,"f").complete()),sn(this,Ya,"f").add(()=>sn(this,vh,"f").complete()),sn(this,Ya,"f").add(this.current$.pipe(C5(),eI(()=>!!t)).subscribe(([i,o])=>{t==null||t.dispatchEvent("onCurrentAppChanged",{source:this,detail:{previous:i,next:o}})})),sn(this,Ya,"f").add(sn(this,Ka,"f").pipe(C5(),Ze(([i])=>i),ph()).subscribe(i=>i.dispose()))}getAppManifest(e){return qr.extractQueryValue(this.appClient.query({appKey:e}).pipe(lr(t=>{const{cause:n}=t;throw n instanceof vs?n:n instanceof k1?vs.fromHttpResponse(n.response,{cause:n}):new vs("unknown","failed to load manifest",{cause:n})})))}getAllAppManifests(){return qr.extractQueryValue(sn(this,mh,"f").query())}getAppConfig(e,t){return qr.extractQueryValue(sn(this,vh,"f").query({appKey:e,tag:t}).pipe(lr(n=>{const{cause:i}=n;throw i instanceof $c?i:i instanceof k1?$c.fromHttpResponse(i.response,{cause:i}):new $c("unknown","failed to load config",{cause:i})})))}setCurrentApp(e){const t=typeof e=="string"?this.createApp({appKey:e}):e;sn(this,Ka,"f").next(t)}clearCurrentApp(){sn(this,Ka,"f").next(null)}createApp(e){return console.warn(),new TW(e,{provider:this,event:sn(this,lm,"f")})}dispose(){sn(this,Ya,"f").unsubscribe()}}mh=new WeakMap,vh=new WeakMap,Ka=new WeakMap,Ya=new WeakMap,lm=new WeakMap;var PW=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})};const oy="app",MW={name:oy,configure:()=>new $W,initialize:r=>PW(void 0,void 0,void 0,function*(){const e=yield r.config.createConfig(r),t=yield r.requireInstance("event").catch(()=>{});return new RW({config:e,event:t})}),dispose:r=>{r.instance.dispose()}};var up=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})},p9=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},dm;class $W{constructor(){this.defaultExpireTime=1*60*1e3,dm.set(this,[])}addConfigBuilder(e){p9(this,dm,"f").push(e)}_createHttpClient(e){return up(this,void 0,void 0,function*(){const t=yield e.requireInstance("http");if(t.hasClient(oy))return t.createClient(oy);{const n=yield e.requireInstance("serviceDiscovery");try{return yield n.createClient("app")}catch{return yield n.createClient("portal")}}})}createConfig(e){var t;return up(this,void 0,void 0,function*(){const n=yield p9(this,dm,"f").reduce((i,o)=>up(this,void 0,void 0,function*(){const a=new yW(e,yield i);return yield Promise.resolve(o(a)),Object.assign(i,a.config)}),Promise.resolve({}));return(t=n.client)!==null&&t!==void 0||(n.client=yield up(this,void 0,void 0,function*(){const i=yield this._createHttpClient(e);return{getAppManifest:{client:{fn:({appKey:o})=>i.json$(`/api/apps/${o}`)},key:({appKey:o})=>o,expire:this.defaultExpireTime},getAppManifests:{client:{fn:()=>i.json$("/api/apps")},key:()=>"manifests",expire:this.defaultExpireTime},getAppConfig:{client:{fn:({appKey:o,tag:a})=>i.json$(`/api/apps/${o}/config${a?`?tag=${a}`:""}`)},key:o=>JSON.stringify(o),expire:this.defaultExpireTime}}})),n})}}dm=new WeakMap;const HW=(r,e)=>{r.addConfig({module:MW,configure:t=>{e&&t.addConfigBuilder(e)}})},OW="bookmarkId",ZW=()=>new URLSearchParams(document.location.search).get(OW);var LW=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},NW=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},um;class DW{constructor(e,t={}){this.config=t,um.set(this,void 0),LW(this,um,e,"f")}requireInstance(e){return NW(this,um,"f").requireInstance(e)}setSourceSystem(e){this.config.sourceSystem=e}setBookmarkIdResolver(e){this.config.resolveBookmarkId=e}serCustomBookmarkApiClient(e){this.config.clientConfiguration&&(this.config.clientConfiguration.client=e)}setContextIdResolver(e){this.config.getContextId=e}setCurrentAppIdResolver(e){this.config.getCurrentAppIdentification=e}setEventProvider(e){this.config.event=e}setBookmarkQueryClient(e){this.config.clientConfiguration&&(this.config.clientConfiguration.queryClientConfig={getAllBookmarks:typeof e.getAllBookmarks=="function"?{key:()=>"all-bookmarks",client:{fn:e.getAllBookmarks},validate:({args:n})=>n.isValid}:e.getAllBookmarks,getBookmarkById:typeof e.getBookmarkById=="function"?{key:({id:n})=>n,client:{fn:e.getBookmarkById},expire:6e4,validate:()=>!1}:e.getBookmarkById})}}um=new WeakMap;var Ks=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})},Vg=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},ay,hm,$A;class VW{constructor(){ay.add(this),this.defaultExpireTime=1*60*1e3,hm.set(this,[])}addConfigBuilder(e){Vg(this,hm,"f").push(e)}createConfig(e,t){return Ks(this,void 0,void 0,function*(){const n=yield Vg(this,hm,"f").reduce((o,a)=>Ks(this,void 0,void 0,function*(){const s=new DW(e,yield o);return yield Promise.resolve(a(s)),Object.assign(o,s.config)}),Promise.resolve({})),i=yield this._getAppProvider(e);if(Vg(this,ay,"m",$A).call(this,t,n),n.resolveBookmarkId||(n.resolveBookmarkId=ZW),n.getCurrentAppIdentification||(n.getCurrentAppIdentification=()=>{var o;return(o=i.current)===null||o===void 0?void 0:o.appKey}),!n.getContextId){const o=yield this._getContextProvider(e);n.getContextId=()=>{var a;return(a=o.currentContext)===null||a===void 0?void 0:a.id}}if(!n.event){const o=yield this._getEventProvider(e);n.event=o}return n.clientConfiguration=yield this._createClientConfiguration(e,n.clientConfiguration),n})}_createClientConfiguration(e,t={}){return Ks(this,void 0,void 0,function*(){if(!t.client){const n=yield this._getServiceProvider(e);t.client=yield n.createBookmarksClient("fetch")}if(!t.queryClientConfig){const i=yield(yield this._getServiceProvider(e)).createBookmarksClient("json$");t.queryClientConfig=Object.assign({getBookmarkById:{client:{fn:o=>i.get("v1",o)},key:({id:o})=>o,expire:this.defaultExpireTime},getAllBookmarks:{client:{fn:()=>i.getAll("v1")},key:()=>"all-bookmarks",validate:({args:o})=>o.isValid,expire:this.defaultExpireTime}},i)}return t})}_getServiceProvider(e){var t;return Ks(this,void 0,void 0,function*(){if(e.hasModule("services"))return e.requireInstance("services");{const n=(t=e.ref)===null||t===void 0?void 0:t.services;if(n)return n;throw Error("[BookmarkConfigurator] No service provider configures [ServicesModule] ")}})}_getContextProvider(e){var t;return Ks(this,void 0,void 0,function*(){if(e.hasModule("context"))return e.requireInstance("context");{const n=(t=e.ref)===null||t===void 0?void 0:t.context;if(n)return n;throw Error("[BookmarkConfigurator] No context provider configures [ContextModule]")}})}_getAppProvider(e){var t;return Ks(this,void 0,void 0,function*(){if(e.hasModule("app"))return e.requireInstance("app");{const n=(t=e.ref)===null||t===void 0?void 0:t.app;if(n)return n;throw Error("[BookmarkConfigurator] No app provider configures [AppModule]")}})}_getEventProvider(e){var t;return Ks(this,void 0,void 0,function*(){if(e.hasModule("event"))return e.requireInstance("event");{const n=(t=e.ref)===null||t===void 0?void 0:t.event;if(n)return n;throw Error("[BookmarkConfigurator] No event provider configures [EventModule]")}})}}hm=new WeakMap,ay=new WeakSet,$A=function(e,t){e&&(t.clientConfiguration=e.config.clientConfiguration,t.sourceSystem=e.config.sourceSystem,t.getContextId=e.config.getContextId,t.getCurrentAppIdentification=e.config.getCurrentAppIdentification)};const dn={getAll:$o("getAll",r=>({payload:r}),r=>({payload:r}),r=>({payload:r})),delete:$o("delete",r=>({payload:r}),r=>({payload:r})),addFavorite:$o("addFavorite",r=>({payload:r}),r=>({payload:r})),removeFavorite:$o("removeFavorite",r=>({payload:r}),r=>({payload:r})),update:$o("update",r=>({payload:r}),r=>({payload:r})),create:$o("create",r=>({payload:r}),r=>({payload:r}),r=>({payload:r}))},zW={bookmarks:{}},FW=tu(zW,r=>{r.addCase(dn.create.success,(e,{payload:t})=>{e.bookmarks[t.id]=t}).addCase(dn.getAll.success,(e,{payload:t})=>{t.forEach(n=>{e.bookmarks[n.id]=n})}).addCase(dn.delete.success,(e,{payload:t})=>{delete e.bookmarks[t]}).addCase(dn.removeFavorite,(e,{payload:t})=>{delete e.bookmarks[t]}).addCase(dn.addFavorite,(e,{payload:t})=>{e.bookmarks[t.id]=t}).addCase(dn.update.success,(e,{payload:t})=>{e.bookmarks[t.id]=t})});var N_=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})};const jW=(r,e)=>t=>t.pipe(eu(dn.getAll.type),kt(n=>r.query({isValid:n.payload}).pipe(tf(),Ze(i=>dn.getAll.success(i.value.filter(o=>{var a;return((a=o.sourceSystem)===null||a===void 0?void 0:a.identifier)===e}))),lr(()=>Dt)))),UW=r=>e=>e.pipe(eu(dn.create.type),kt(t=>N_(void 0,void 0,void 0,function*(){const n=yield r.post("v1",t.payload);return dn.create.success(yield n.json())}))),m9=r=>e=>e.pipe(eu(dn.update.type),kt(t=>N_(void 0,void 0,void 0,function*(){const n=yield r.patch("v1",t.payload);return dn.update.success(yield n.json())}))),BW=r=>e=>e.pipe(eu(dn.delete.type),kt(t=>N_(void 0,void 0,void 0,function*(){return(yield r.delete("v1",{id:t.payload})).ok,dn.delete.success(t.payload)})));var bo=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})},Ys=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},ge=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},fm,Ll,aa,to,Wi,M2,fa,Mt,ua,HA,OA;class qW{constructor(e,t,n){fm.add(this),Ll.set(this,void 0),aa.set(this,void 0),to.set(this,void 0),Wi.set(this,void 0),M2.set(this,void 0),fa.set(this,void 0),Mt.set(this,void 0),ua.set(this,new Dr),Ys(this,Wi,new Qd(void 0),"f"),Ys(this,to,e.client,"f"),Ys(this,Ll,new qr(e.queryClientConfig.getBookmarkById),"f"),Ys(this,aa,new qr(e.queryClientConfig.getAllBookmarks),"f"),Ys(this,M2,t,"f"),Ys(this,fa,n,"f"),Ys(this,Mt,Oz(dn,FW),"f"),ge(this,fm,"m",OA).call(this),ge(this,fm,"m",HA).call(this),n&&ge(this,ua,"f").add(ge(this,Wi,"f").subscribe(i=>{n.dispatchEvent("onBookmarkChanged",{detail:i,canBubble:!0,source:this})}))}get currentBookmark$(){return ge(this,Wi,"f").asObservable()}get bookmarks$(){return ge(this,Mt,"f").subject.pipe(Ze(e=>Object.values(e.bookmarks).map(t=>t)))}setCurrentBookmark(e){return bo(this,void 0,void 0,function*(){if(!e)return ge(this,Wi,"f").next(void 0);if(typeof e=="string"){const t=yield this.resolverBookmarkAsync(e);return this.setBookmark(t)}else if(e!==ge(this,Wi,"f").value)return this.setBookmark(e)})}setBookmark(e){return bo(this,void 0,void 0,function*(){ge(this,fa,"f")?(yield ge(this,fa,"f").dispatchEvent("onBookmarkChange",{detail:e,cancelable:!0,canBubble:!0,source:this})).canceled||ge(this,Wi,"f").next(e):ge(this,Wi,"f").next(e)})}resolverBookmark(e){return ge(this,Ll,"f").query({id:e}).pipe(Ze(t=>t.value))}resolverBookmarkAsync(e){return Sr(this.resolverBookmark(e))}getAllBookmarks(e={isValid:!1}){const{isValid:t}=e;return new Fe(n=>{ge(this,Mt,"f").dispatch.getAll(t),n.add(ge(this,Mt,"f").subject.addEffect("getAll::success",i=>{var o;n.next(i.payload),n.complete(),(o=ge(this,fa,"f"))===null||o===void 0||o.dispatchEvent("onBookmarksChanged",{detail:i.payload,source:this})}))})}getAllBookmarksAsync(e={isValid:!1}){return bo(this,void 0,void 0,function*(){return Sr(this.getAllBookmarks(e))})}getBookmarkById(e){return bo(this,void 0,void 0,function*(){return yield(yield ge(this,to,"f").get("v1",{id:e})).json()})}createBookmark(e){return new Fe(t=>{ge(this,Mt,"f").dispatch.create(e),t.add(ge(this,Mt,"f").subject.addEffect("create::success",n=>{t.next(n.payload),t.complete()})),t.add(ge(this,Mt,"f").subject.addEffect("create::failure",n=>{t.error(n.payload)}))})}createBookmarkAsync(e){return bo(this,void 0,void 0,function*(){return Sr(this.createBookmark(e))})}updateBookmark(e){return new Fe(t=>{ge(this,Mt,"f").dispatch.update(e),t.add(ge(this,Mt,"f").subject.addEffect("update::success",n=>{t.next(n.payload),t.complete(),ge(this,Ll,"f").cache.invalidate(n.payload.id)}))})}updateBookmarkAsync(e){return bo(this,void 0,void 0,function*(){return Sr(this.updateBookmark(e))})}deleteBookmarkById(e){return new Fe(t=>{ge(this,Mt,"f").dispatch.delete(e),t.add(ge(this,Mt,"f").subject.addEffect("delete::success",n=>{t.next(n.payload),t.complete(),ge(this,Ll,"f").cache.invalidate(n.payload)}))})}deleteBookmarkByIdAsync(e){return bo(this,void 0,void 0,function*(){return Sr(this.deleteBookmarkById(e))})}addBookmarkFavoriteAsync(e){return bo(this,void 0,void 0,function*(){(yield ge(this,to,"f").addFavorite("v1",{bookmarkId:e})).ok&&ge(this,Wi,"f").value&&ge(this,Mt,"f").dispatch.addFavorite(ge(this,Wi,"f").value)})}removeBookmarkFavoriteAsync(e){return bo(this,void 0,void 0,function*(){(yield ge(this,to,"f").removeFavorite("v1",{bookmarkId:e})).ok&&ge(this,Mt,"f").dispatch.removeFavorite(e)})}verifyBookmarkFavoriteAsync(e){return bo(this,void 0,void 0,function*(){return!!(yield ge(this,to,"f").verifyFavorite("v1",{bookmarkId:e})).ok})}dispose(){ge(this,ua,"f").unsubscribe()}}Ll=new WeakMap,aa=new WeakMap,to=new WeakMap,Wi=new WeakMap,M2=new WeakMap,fa=new WeakMap,Mt=new WeakMap,ua=new WeakMap,fm=new WeakSet,HA=function(){ge(this,Mt,"f").subject.addEffect("create::success",e=>{var t;ge(this,aa,"f").cache.invalidate("all-bookmarks"),(t=ge(this,fa,"f"))===null||t===void 0||t.dispatchEvent("onBookmarkCreated",{detail:e.payload,canBubble:!0,source:this})}),ge(this,Mt,"f").subject.addEffect("delete::success",e=>{var t;console.log("here"),ge(this,aa,"f").cache.invalidate("all-bookmarks"),(t=ge(this,fa,"f"))===null||t===void 0||t.dispatchEvent("onBookmarkDeleted",{detail:e.payload,canBubble:!0,source:this})}),ge(this,Mt,"f").subject.addEffect("update::success",e=>{var t;ge(this,aa,"f").cache.invalidate("all-bookmarks"),(t=ge(this,fa,"f"))===null||t===void 0||t.dispatchEvent("onBookmarkUpdated",{detail:e.payload,canBubble:!0,source:this})}),ge(this,Mt,"f").subject.addEffect("addFavorite::request",()=>{ge(this,aa,"f").cache.invalidate("all-bookmarks")}),ge(this,Mt,"f").subject.addEffect("removeFavorite::request",()=>{ge(this,aa,"f").cache.invalidate("all-bookmarks")})},OA=function(){var e;ge(this,ua,"f").add(ge(this,Mt,"f").subject.addFlow(jW(ge(this,aa,"f"),(e=ge(this,M2,"f"))===null||e===void 0?void 0:e.identifier))),ge(this,ua,"f").add(ge(this,Mt,"f").subject.addFlow(UW(ge(this,to,"f")))),ge(this,ua,"f").add(ge(this,Mt,"f").subject.addFlow(BW(ge(this,to,"f")))),ge(this,ua,"f").add(ge(this,Mt,"f").subject.addFlow(m9(ge(this,to,"f")))),ge(this,ua,"f").add(ge(this,Mt,"f").subject.addFlow(m9(ge(this,to,"f"))))};var Ro=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})},WW=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},Ui=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},Nl,lc,pm,sy,cy,ly;class GW{get currentBookmark$(){return this._bookmarkClient.currentBookmark$}get bookmarks$(){return this._bookmarkClient.bookmarks$}constructor(e,t){Nl.add(this),lc.set(this,void 0),pm.set(this,new Dr),this.bookmarkCreators={},sy.set(this,()=>{this.bookmarkCreators={}}),this.config=e,WW(this,lc,e.event,"f"),this._bookmarkClient=t?t._bookmarkClient:new qW(e.clientConfiguration,e.sourceSystem,e.event);const n=e.resolveBookmarkId&&e.resolveBookmarkId();n&&this._bookmarkClient.setCurrentBookmark(n),Ui(this,lc,"f")&&Ui(this,pm,"f").add(Ui(this,lc,"f").addEventListener("onCurrentAppChanged",Ui(this,sy,"f")))}getBookmarkById(e){return Ro(this,void 0,void 0,function*(){return yield this._bookmarkClient.getBookmarkById(e)})}setCurrentBookmark(e){return Ro(this,void 0,void 0,function*(){this._bookmarkClient.setCurrentBookmark(e)})}getAllBookmarks(){return this._bookmarkClient.getAllBookmarks()}getAllBookmarksAsync(){return Ro(this,void 0,void 0,function*(){return this._bookmarkClient.getAllBookmarksAsync()})}updateBookmark(e){return this._bookmarkClient.updateBookmark(e)}updateBookmarkAsync(e,t){return Ro(this,void 0,void 0,function*(){if(Ui(this,Nl,"m",ly).call(this)===e.appKey){if(t!=null&&t.updatePayload){const n=yield Ui(this,Nl,"m",cy).call(this);e=Object.assign(Object.assign({},e),{payload:n})}return this._bookmarkClient.updateBookmarkAsync(e)}})}deleteBookmarkById(e){return this._bookmarkClient.deleteBookmarkById(e)}deleteBookmarkByIdAsync(e){return this._bookmarkClient.deleteBookmarkByIdAsync(e)}addBookmarkFavoriteAsync(e){return Ro(this,void 0,void 0,function*(){yield this._bookmarkClient.addBookmarkFavoriteAsync(e)})}removeBookmarkFavoriteAsync(e){return Ro(this,void 0,void 0,function*(){yield this._bookmarkClient.removeBookmarkFavoriteAsync(e)})}verifyBookmarkFavoriteAsync(e){return Ro(this,void 0,void 0,function*(){return yield this._bookmarkClient.verifyBookmarkFavoriteAsync(e)})}addStateCreator(e,t){var n;const i=t||"#creator";return Ui(this,lc,"f")&&((n=Ui(this,lc,"f"))===null||n===void 0||n.dispatchEvent("onAddCreator",{source:this,canBubble:!0,detail:{key:t,cb:e}})),this.bookmarkCreators[i]=e,()=>{delete this.bookmarkCreators[i]}}createBookmark(e){return Ro(this,void 0,void 0,function*(){const t=yield Ui(this,Nl,"m",cy).call(this),n=this.config.getContextId&&this.config.getContextId(),i=Ui(this,Nl,"m",ly).call(this),o=Object.assign(Object.assign({},e),{appKey:i,contextId:n,sourceSystem:this.config.sourceSystem,payload:t});return this._bookmarkClient.createBookmarkAsync(o)})}dispose(){Ui(this,pm,"f").unsubscribe(),this._bookmarkClient.dispose()}}lc=new WeakMap,pm=new WeakMap,sy=new WeakMap,Nl=new WeakSet,cy=function(){return Ro(this,void 0,void 0,function*(){const e=this.bookmarkCreators;if(!e||Object.keys(e).length===0)throw Error("No creator registered on this BookmarkProvider");return typeof e["#creator"]=="function"?e["#creator"]():yield Object.entries(e).reduce((t,[n,i])=>Ro(this,void 0,void 0,function*(){return Object.assign(yield t,{[n]:yield i()})}),Promise.resolve({}))})},ly=function(){const e=this.config.getCurrentAppIdentification&&this.config.getCurrentAppIdentification();if(!e)throw new Error("There is noe current application selected, can't create bookmark.");return e};var KW=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(r,e||[])).next())})};const YW="bookmark",QW={name:YW,configure:()=>new VW,initialize:r=>KW(void 0,void 0,void 0,function*(){var e;const t=(e=r.ref)===null||e===void 0?void 0:e.bookmark,n=yield r.config.createConfig(r,t);return new GW(n,t)}),dispose:r=>{r.instance.dispose()}},XW=(r,e)=>{r.addConfig({module:QW,configure:t=>{e&&t.addConfigBuilder(e)}})};class JW{}/**
414
414
  * @remix-run/router v1.9.0
415
415
  *
416
416
  * Copyright (c) Remix Software Inc.
@@ -32,7 +32,7 @@
32
32
  }
33
33
  </style>
34
34
 
35
- <script type="module" crossorigin src="/assets/index-SPsaO-lN.js"></script>
35
+ <script type="module" crossorigin src="/assets/index-Fc8FwESN.js"></script>
36
36
 
37
37
  <body>
38
38
  <div id="root"></div>
@@ -1 +1 @@
1
- export declare const version = "9.5.8";
1
+ export declare const version = "9.5.9";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const version = '9.5.8';
1
+ export const version = '9.5.9';
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-cli",
3
- "version": "9.5.8",
3
+ "version": "9.5.9",
4
4
  "keywords": [
5
5
  "Fusion",
6
6
  "Fusion Framework",
@@ -50,9 +50,9 @@
50
50
  "vite-plugin-restart": "^0.4.0",
51
51
  "vite-tsconfig-paths": "^4.2.0",
52
52
  "@equinor/fusion-framework-app": "^7.1.15",
53
- "@equinor/fusion-observable": "^8.1.4",
54
53
  "@equinor/fusion-framework-module-feature-flag": "^0.0.1",
55
- "@equinor/fusion-framework-react-components-people-provider": "^1.1.10"
54
+ "@equinor/fusion-framework-react-components-people-provider": "^1.1.11",
55
+ "@equinor/fusion-observable": "^8.1.4"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@equinor/eds-core-react": "^0.34.0",
@@ -79,18 +79,18 @@
79
79
  "styled-components": "^6.0.7",
80
80
  "types": "link:./types",
81
81
  "typescript": "^5.1.3",
82
- "@equinor/fusion-framework": "^7.0.28",
83
82
  "@equinor/fusion-framework-app": "^7.1.15",
84
- "@equinor/fusion-framework-module-bookmark": "^1.0.17",
85
83
  "@equinor/fusion-framework-module-app": "^5.2.12",
84
+ "@equinor/fusion-framework": "^7.0.28",
85
+ "@equinor/fusion-framework-module-bookmark": "^1.1.0",
86
+ "@equinor/fusion-framework-module-context": "^4.0.19",
86
87
  "@equinor/fusion-framework-module-http": "^5.1.5",
87
88
  "@equinor/fusion-framework-module-msal": "^3.0.9",
88
89
  "@equinor/fusion-framework-module-navigation": "^3.1.3",
89
90
  "@equinor/fusion-framework-module-services": "^3.2.3",
90
- "@equinor/fusion-framework-module-context": "^4.0.19",
91
+ "@equinor/fusion-framework-react-components-bookmark": "^0.3.4",
91
92
  "@equinor/fusion-framework-react": "^5.3.9",
92
- "@equinor/fusion-framework-react-components-bookmark": "^0.3.3",
93
- "@equinor/fusion-framework-react-module-bookmark": "^2.0.28",
93
+ "@equinor/fusion-framework-react-module-bookmark": "^2.0.29",
94
94
  "@equinor/fusion-query": "^4.0.5"
95
95
  },
96
96
  "scripts": {