@pod-os/elements 0.24.2-rc.f1a6ca3.0 → 0.24.2-rc.fd22901.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/cjs/elements.cjs.js +1 -1
  2. package/dist/cjs/ion-badge_8.cjs.entry.js +1 -1
  3. package/dist/cjs/{ion-card_32.cjs.entry.js → ion-card_34.cjs.entry.js} +47 -19
  4. package/dist/cjs/ion-card_34.cjs.entry.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/pos-app-generic.cjs.entry.js +1 -1
  7. package/dist/cjs/pos-app-ldp-container.cjs.entry.js +1 -1
  8. package/dist/cjs/pos-app-rdf-document.cjs.entry.js +1 -1
  9. package/dist/collection/apps/pos-app-browser/pos-app-browser.css +13 -0
  10. package/dist/collection/apps/pos-app-browser/pos-app-browser.js +1 -1
  11. package/dist/collection/apps/pos-app-browser/pos-app-browser.js.map +1 -1
  12. package/dist/collection/apps/pos-app-dashboard/pos-app-dashboard.js +1 -1
  13. package/dist/collection/apps/pos-app-dashboard/pos-example-resources/pos-example-resources.js +1 -1
  14. package/dist/collection/apps/pos-app-dashboard/pos-getting-started/pos-getting-started.js +1 -1
  15. package/dist/collection/apps/pos-app-generic/pos-app-generic.js +1 -1
  16. package/dist/collection/apps/pos-app-ldp-container/pos-app-ldp-container.js +1 -1
  17. package/dist/collection/apps/pos-app-rdf-document/pos-app-rdf-document.js +1 -1
  18. package/dist/collection/apps/pos-app-settings/pos-app-settings.css +11 -0
  19. package/dist/collection/apps/pos-app-settings/pos-app-settings.js +19 -0
  20. package/dist/collection/apps/pos-app-settings/pos-app-settings.js.map +1 -0
  21. package/dist/collection/apps/pos-app-settings/pos-getting-started/pos-setting-offline-cache.css +28 -0
  22. package/dist/collection/apps/pos-app-settings/pos-getting-started/pos-setting-offline-cache.js +20 -0
  23. package/dist/collection/apps/pos-app-settings/pos-getting-started/pos-setting-offline-cache.js.map +1 -0
  24. package/dist/collection/collection-manifest.json +2 -0
  25. package/dist/collection/components/pos-add-new-thing/pos-add-new-thing.js +1 -1
  26. package/dist/collection/components/pos-app/pos-app.js +1 -1
  27. package/dist/collection/components/pos-dialog/pos-dialog.js +1 -1
  28. package/dist/collection/components/pos-error-toast/pos-error-toast.js +1 -1
  29. package/dist/collection/components/pos-internal-router/pos-internal-router.js +1 -1
  30. package/dist/collection/components/pos-internal-router/pos-internal-router.js.map +1 -1
  31. package/dist/collection/components/pos-literals/pos-literals.js +1 -1
  32. package/dist/collection/components/pos-login/pos-login.js +1 -1
  33. package/dist/collection/components/pos-login-form/pos-login-form.js +1 -1
  34. package/dist/collection/components/pos-navigation-bar/pos-navigation-bar.js +1 -1
  35. package/dist/collection/components/pos-new-thing-form/pos-new-thing-form.js +1 -1
  36. package/dist/collection/components/pos-rich-link/pos-rich-link.js +2 -2
  37. package/dist/collection/components/pos-router/pos-router.js +1 -1
  38. package/dist/collection/components/pos-select-term/pos-select-term.js +1 -1
  39. package/dist/components/index11.js +170 -172
  40. package/dist/components/index11.js.map +1 -1
  41. package/dist/components/index12.js +198 -0
  42. package/dist/components/index12.js.map +1 -0
  43. package/dist/components/ion-app.js +1 -1
  44. package/dist/components/pos-add-new-thing2.js +1 -1
  45. package/dist/components/pos-app-browser.js +74 -62
  46. package/dist/components/pos-app-browser.js.map +1 -1
  47. package/dist/components/pos-app-dashboard2.js +1 -1
  48. package/dist/components/pos-app-generic.js +1 -1
  49. package/dist/components/pos-app-ldp-container.js +1 -1
  50. package/dist/components/pos-app-rdf-document.js +1 -1
  51. package/dist/components/pos-app-settings.d.ts +11 -0
  52. package/dist/components/pos-app-settings.js +8 -0
  53. package/dist/components/pos-app-settings.js.map +1 -0
  54. package/dist/components/pos-app-settings2.js +39 -0
  55. package/dist/components/pos-app-settings2.js.map +1 -0
  56. package/dist/components/pos-app2.js +3 -26
  57. package/dist/components/pos-app2.js.map +1 -1
  58. package/dist/components/pos-dialog2.js +1 -1
  59. package/dist/components/pos-error-toast2.js +1 -1
  60. package/dist/components/pos-example-resources2.js +1 -1
  61. package/dist/components/pos-getting-started2.js +1 -1
  62. package/dist/components/pos-internal-router2.js +37 -25
  63. package/dist/components/pos-internal-router2.js.map +1 -1
  64. package/dist/components/pos-literals2.js +1 -1
  65. package/dist/components/pos-login-form2.js +1 -1
  66. package/dist/components/pos-login2.js +1 -1
  67. package/dist/components/pos-navigation-bar2.js +1 -1
  68. package/dist/components/pos-new-thing-form2.js +1 -1
  69. package/dist/components/pos-rich-link2.js +2 -2
  70. package/dist/components/pos-router2.js +1 -1
  71. package/dist/components/pos-select-term2.js +1 -1
  72. package/dist/components/pos-setting-offline-cache.d.ts +11 -0
  73. package/dist/components/pos-setting-offline-cache.js +8 -0
  74. package/dist/components/pos-setting-offline-cache.js.map +1 -0
  75. package/dist/components/pos-setting-offline-cache2.js +34 -0
  76. package/dist/components/pos-setting-offline-cache2.js.map +1 -0
  77. package/dist/components/session.js +2 -193
  78. package/dist/components/session.js.map +1 -1
  79. package/dist/components/settings.js +29 -0
  80. package/dist/components/settings.js.map +1 -0
  81. package/dist/elements/elements.esm.js +1 -1
  82. package/dist/elements/elements.esm.js.map +1 -1
  83. package/dist/elements/p-48f2cf16.entry.js +2 -0
  84. package/dist/elements/p-6e0e0f54.entry.js +2 -0
  85. package/dist/elements/p-8cea7540.entry.js +20 -0
  86. package/dist/elements/p-8cea7540.entry.js.map +1 -0
  87. package/dist/elements/{p-c0876b5d.entry.js → p-8eb66b39.entry.js} +2 -2
  88. package/dist/elements/p-b58b6be4.entry.js +2 -0
  89. package/dist/esm/elements.js +1 -1
  90. package/dist/esm/ion-badge_8.entry.js +1 -1
  91. package/dist/esm/{ion-card_32.entry.js → ion-card_34.entry.js} +46 -20
  92. package/dist/esm/ion-card_34.entry.js.map +1 -0
  93. package/dist/esm/loader.js +1 -1
  94. package/dist/esm/pos-app-generic.entry.js +1 -1
  95. package/dist/esm/pos-app-ldp-container.entry.js +1 -1
  96. package/dist/esm/pos-app-rdf-document.entry.js +1 -1
  97. package/dist/types/apps/pos-app-settings/pos-app-settings.d.ts +3 -0
  98. package/dist/types/apps/pos-app-settings/pos-getting-started/pos-setting-offline-cache.d.ts +3 -0
  99. package/dist/types/components.d.ts +26 -0
  100. package/package.json +1 -1
  101. package/dist/cjs/ion-card_32.cjs.entry.js.map +0 -1
  102. package/dist/elements/p-2417f72e.entry.js +0 -20
  103. package/dist/elements/p-2417f72e.entry.js.map +0 -1
  104. package/dist/elements/p-52678615.entry.js +0 -2
  105. package/dist/elements/p-a1fbbc32.entry.js +0 -2
  106. package/dist/elements/p-c7b331ce.entry.js +0 -2
  107. package/dist/esm/ion-card_32.entry.js.map +0 -1
  108. /package/dist/elements/{p-a1fbbc32.entry.js.map → p-48f2cf16.entry.js.map} +0 -0
  109. /package/dist/elements/{p-52678615.entry.js.map → p-6e0e0f54.entry.js.map} +0 -0
  110. /package/dist/elements/{p-c0876b5d.entry.js.map → p-8eb66b39.entry.js.map} +0 -0
  111. /package/dist/elements/{p-c7b331ce.entry.js.map → p-b58b6be4.entry.js.map} +0 -0
@@ -1,20 +0,0 @@
1
- import{r as t,h as e,H as r,d as n,e as i,f as o,w as s,i as a,j as c,k as l}from"./p-7a6a7690.js";import{i as d,c as h,d as u,a as b,r as p,g as f}from"./p-25270f1a.js";import{o as g,c as m,h as v,g as y}from"./p-669fab6c.js";import{g as w,c as x}from"./p-866a6047.js";import{i as k}from"./p-4d0cb38d.js";import{a as z,c as C,b as I,s as j,d as S}from"./p-0ee8b7a7.js";import{E as _,s as D}from"./p-46b6ae86.js";import{c as L}from"./p-3a4d289f.js";import{p as T}from"./p-d6769f21.js";import{O as P,c as O,a as B,i as $,p as M,s as X,b as E,d as A,e as W,f as U,G as R,t as Y}from"./p-278bf69e.js";import{c as F}from"./p-592177e8.js";import{w as H}from"./p-7efd6867.js";import{createGesture as N}from"./p-b943833e.js";import{c as G,s as K,B as q}from"./p-39c4990d.js";import{P as V,N as Z,L as J}from"./p-be37bf2c.js";import{s as Q}from"./p-f6671856.js";import"./p-98c00bd2.js";import{s as tt}from"./p-182f722d.js";import"./p-7a33ba37.js";import"./p-8206b1f1.js";const et=":host{--ion-safe-area-left:0px;--ion-safe-area-right:0px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;position:relative;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);contain:content;overflow:hidden}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.card-disabled){cursor:default;opacity:0.3;pointer-events:none}.card-native{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;min-height:var(--min-height);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:inherit}.card-native::-moz-focus-inner{border:0}button,a{cursor:pointer;user-select:none;-webkit-user-drag:none}ion-ripple-effect{color:var(--ripple-color)}:host{--background:var(--ion-card-background, var(--ion-item-background, var(--ion-background-color, #fff)));--color:var(--ion-card-color, var(--ion-item-color, var(--ion-color-step-600, #666666)));-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:24px;margin-bottom:24px;border-radius:8px;transition:transform 500ms cubic-bezier(0.12, 0.72, 0.29, 1);font-size:0.875rem;box-shadow:0 4px 16px rgba(0, 0, 0, 0.12)}:host(.ion-activated){transform:scale3d(0.97, 0.97, 1)}";const rt=et;const nt=":host{--ion-safe-area-left:0px;--ion-safe-area-right:0px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;position:relative;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);contain:content;overflow:hidden}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.card-disabled){cursor:default;opacity:0.3;pointer-events:none}.card-native{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;min-height:var(--min-height);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:inherit}.card-native::-moz-focus-inner{border:0}button,a{cursor:pointer;user-select:none;-webkit-user-drag:none}ion-ripple-effect{color:var(--ripple-color)}:host{--background:var(--ion-card-background, var(--ion-item-background, var(--ion-background-color, #fff)));--color:var(--ion-card-color, var(--ion-item-color, var(--ion-color-step-550, #737373)));-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:10px;margin-inline-end:10px;margin-top:10px;margin-bottom:10px;border-radius:4px;font-size:0.875rem;box-shadow:0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)}";const it=nt;const ot=class{constructor(e){t(this,e);this.inheritedAriaAttributes={};this.color=undefined;this.button=false;this.type="button";this.disabled=false;this.download=undefined;this.href=undefined;this.rel=undefined;this.routerDirection="forward";this.routerAnimation=undefined;this.target=undefined}componentWillLoad(){this.inheritedAriaAttributes=d(this.el,["aria-label"])}isClickable(){return this.href!==undefined||this.button}renderCard(t){const r=this.isClickable();if(!r){return[e("slot",null)]}const{href:n,routerAnimation:i,routerDirection:o,inheritedAriaAttributes:s}=this;const a=r?n===undefined?"button":"a":"div";const c=a==="button"?{type:this.type}:{download:this.download,href:this.href,rel:this.rel,target:this.target};return e(a,Object.assign({},c,s,{class:"card-native",part:"native",disabled:this.disabled,onClick:t=>g(n,t,o,i)}),e("slot",null),r&&t==="md"&&e("ion-ripple-effect",null))}render(){const t=w(this);return e(r,{key:"b92792294360fd974324b31ed2d3db00d3e2f8cd",class:m(this.color,{[t]:true,"card-disabled":this.disabled,"ion-activatable":this.isClickable()})},this.renderCard(t))}get el(){return n(this)}};ot.style={ios:rt,md:it};const st="ion-card-content{display:block;position:relative}.card-content-ios{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;font-size:1rem;line-height:1.4}.card-content-ios h1{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:1.5rem;font-weight:normal}.card-content-ios h2{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:1rem;font-weight:normal}.card-content-ios h3,.card-content-ios h4,.card-content-ios h5,.card-content-ios h6{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:0.875rem;font-weight:normal}.card-content-ios p{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:0.875rem}ion-card-header+.card-content-ios{padding-top:0}";const at=st;const ct="ion-card-content{display:block;position:relative}.card-content-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:13px;padding-bottom:13px;font-size:0.875rem;line-height:1.5}.card-content-md h1{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:1.5rem;font-weight:normal}.card-content-md h2{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:1rem;font-weight:normal}.card-content-md h3,.card-content-md h4,.card-content-md h5,.card-content-md h6{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:0.875rem;font-weight:normal}.card-content-md p{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:0.875rem;font-weight:normal;line-height:1.5}ion-card-header+.card-content-md{padding-top:0}";const lt=ct;const dt=class{constructor(e){t(this,e)}render(){const t=w(this);return e(r,{key:"dd95806f042fcd124b18126679f671be6e32a021",class:{[t]:true,[`card-content-${t}`]:true}})}};dt.style={ios:at,md:lt};const ht=":host{--background:transparent;--color:inherit;display:flex;position:relative;flex-direction:column;background:var(--background);color:var(--color)}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}:host{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:16px;flex-direction:column-reverse}@supports (backdrop-filter: blur(0)){:host(.card-header-translucent){background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.9);backdrop-filter:saturate(180%) blur(30px)}}";const ut=ht;const bt=":host{--background:transparent;--color:inherit;display:flex;position:relative;flex-direction:column;background:var(--background);color:var(--color)}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}:host{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px}::slotted(ion-card-title:not(:first-child)),::slotted(ion-card-subtitle:not(:first-child)){margin-top:8px}";const pt=bt;const ft=class{constructor(e){t(this,e);this.color=undefined;this.translucent=false}render(){const t=w(this);return e(r,{key:"44077ad8e3edf7726d0f7a039046e32dc56a83c9",class:m(this.color,{"card-header-translucent":this.translucent,"ion-inherit-color":true,[t]:true})},e("slot",{key:"51b6f4048d25521ece18d79e5361c762af41cae7"}))}};ft.style={ios:ut,md:pt};let gt;const mt=()=>{if(typeof window==="undefined"){return new Map}else{if(!gt){const t=window;t.Ionicons=t.Ionicons||{};gt=t.Ionicons.map=t.Ionicons.map||new Map}return gt}};const vt=t=>{let e=xt(t.src);if(e){return e}e=wt(t.name,t.icon,t.mode,t.ios,t.md);if(e){return yt(e,t)}if(t.icon){e=xt(t.icon);if(e){return e}e=xt(t.icon[t.mode]);if(e){return e}}return null};const yt=(t,e)=>{const r=mt().get(t);if(r){return r}try{return i(`svg/${t}.svg`)}catch(r){console.warn(`[Ionicons Warning]: Could not load icon with name "${t}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`,e)}};const wt=(t,e,r,n,i)=>{r=(r&&Ct(r))==="ios"?"ios":"md";if(n&&r==="ios"){t=Ct(n)}else if(i&&r==="md"){t=Ct(i)}else{if(!t&&e&&!kt(e)){t=e}if(zt(t)){t=Ct(t)}}if(!zt(t)||t.trim()===""){return null}const o=t.replace(/[a-z]|-|\d/gi,"");if(o!==""){return null}return t};const xt=t=>{if(zt(t)){t=t.trim();if(kt(t)){return t}}return null};const kt=t=>t.length>0&&/(\/|\.)/.test(t);const zt=t=>typeof t==="string";const Ct=t=>t.toLowerCase();const It=(t,e=[])=>{const r={};e.forEach((e=>{if(t.hasAttribute(e)){const n=t.getAttribute(e);if(n!==null){r[e]=t.getAttribute(e)}t.removeAttribute(e)}}));return r};const jt=t=>{if(t){if(t.dir!==""){return t.dir.toLowerCase()==="rtl"}}return(document===null||document===void 0?void 0:document.dir.toLowerCase())==="rtl"};const St=t=>{const e=document.createElement("div");e.innerHTML=t;for(let t=e.childNodes.length-1;t>=0;t--){if(e.childNodes[t].nodeName.toLowerCase()!=="svg"){e.removeChild(e.childNodes[t])}}const r=e.firstElementChild;if(r&&r.nodeName.toLowerCase()==="svg"){const t=r.getAttribute("class")||"";r.setAttribute("class",(t+" s-ion-icon").trim());if(_t(r)){return e.innerHTML}}return""};const _t=t=>{if(t.nodeType===1){if(t.nodeName.toLowerCase()==="script"){return false}for(let e=0;e<t.attributes.length;e++){const r=t.attributes[e].name;if(zt(r)&&r.toLowerCase().indexOf("on")===0){return false}}for(let e=0;e<t.childNodes.length;e++){if(!_t(t.childNodes[e])){return false}}}return true};const Dt=t=>t.startsWith("data:image/svg+xml");const Lt=t=>t.indexOf(";utf8,")!==-1;const Tt=new Map;const Pt=new Map;let Ot;const Bt=(t,e)=>{let r=Pt.get(t);if(!r){if(typeof fetch!=="undefined"&&typeof document!=="undefined"){if(Dt(t)&&Lt(t)){if(!Ot){Ot=new DOMParser}const e=Ot.parseFromString(t,"text/html");const r=e.querySelector("svg");if(r){Tt.set(t,r.outerHTML)}return Promise.resolve()}else{r=fetch(t).then((r=>{if(r.ok){return r.text().then((r=>{if(r&&e!==false){r=St(r)}Tt.set(t,r||"")}))}Tt.set(t,"")}));Pt.set(t,r)}}else{Tt.set(t,"");return Promise.resolve()}}return r};const $t=":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:32px;stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}";const Mt=$t;const Xt=class{constructor(e){t(this,e);this.iconName=null;this.inheritedAttributes={};this.didLoadIcon=false;this.svgContent=undefined;this.isVisible=false;this.mode=Et();this.color=undefined;this.ios=undefined;this.md=undefined;this.flipRtl=undefined;this.name=undefined;this.src=undefined;this.icon=undefined;this.size=undefined;this.lazy=false;this.sanitize=true}componentWillLoad(){this.inheritedAttributes=It(this.el,["aria-label"])}connectedCallback(){this.waitUntilVisible(this.el,"50px",(()=>{this.isVisible=true;this.loadIcon()}))}componentDidLoad(){if(!this.didLoadIcon){this.loadIcon()}}disconnectedCallback(){if(this.io){this.io.disconnect();this.io=undefined}}waitUntilVisible(t,e,r){if(this.lazy&&typeof window!=="undefined"&&window.IntersectionObserver){const n=this.io=new window.IntersectionObserver((t=>{if(t[0].isIntersecting){n.disconnect();this.io=undefined;r()}}),{rootMargin:e});n.observe(t)}else{r()}}loadIcon(){if(this.isVisible){const t=vt(this);if(t){if(Tt.has(t)){this.svgContent=Tt.get(t)}else{Bt(t,this.sanitize).then((()=>this.svgContent=Tt.get(t)))}this.didLoadIcon=true}}this.iconName=wt(this.name,this.icon,this.mode,this.ios,this.md)}render(){const{flipRtl:t,iconName:n,inheritedAttributes:i,el:o}=this;const s=this.mode||"md";const a=n?(n.includes("arrow")||n.includes("chevron"))&&t!==false:false;const c=t||a;return e(r,Object.assign({role:"img",class:Object.assign(Object.assign({[s]:true},At(this.color)),{[`icon-${this.size}`]:!!this.size,"flip-rtl":c,"icon-rtl":c&&jt(o)})},i),this.svgContent?e("div",{class:"icon-inner",innerHTML:this.svgContent}):e("div",{class:"icon-inner"}))}static get assetsDirs(){return["svg"]}get el(){return n(this)}static get watchers(){return{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"],ios:["loadIcon"],md:["loadIcon"]}}};const Et=()=>typeof document!=="undefined"&&document.documentElement.getAttribute("mode")||"md";const At=t=>t?{"ion-color":true,[`ion-color-${t}`]:true}:null;Xt.style=Mt;const Wt=":host{--background:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.3);--progress-background:var(--ion-color-primary, #3880ff);--buffer-background:var(--background);display:block;position:relative;width:100%;contain:strict;direction:ltr;overflow:hidden}.progress,.progress-indeterminate,.indeterminate-bar-primary,.indeterminate-bar-secondary,.progress-buffer-bar{left:0;right:0;top:0;bottom:0;position:absolute;width:100%;height:100%}.buffer-circles-container,.buffer-circles{left:0;right:0;top:0;bottom:0;position:absolute}.buffer-circles{right:-10px;left:-10px;}.progress,.progress-buffer-bar,.buffer-circles-container{transform-origin:left top;transition:transform 150ms linear}.progress,.progress-indeterminate{background:var(--progress-background);z-index:2}.progress-buffer-bar{background:var(--buffer-background);z-index:1}.buffer-circles-container{overflow:hidden}.indeterminate-bar-primary{top:0;right:0;bottom:0;left:-145.166611%;animation:primary-indeterminate-translate 2s infinite linear}.indeterminate-bar-primary .progress-indeterminate{animation:primary-indeterminate-scale 2s infinite linear;animation-play-state:inherit}.indeterminate-bar-secondary{top:0;right:0;bottom:0;left:-54.888891%;animation:secondary-indeterminate-translate 2s infinite linear}.indeterminate-bar-secondary .progress-indeterminate{animation:secondary-indeterminate-scale 2s infinite linear;animation-play-state:inherit}.buffer-circles{background-image:radial-gradient(ellipse at center, var(--buffer-background) 0%, var(--buffer-background) 30%, transparent 30%);background-repeat:repeat-x;background-position:5px center;background-size:10px 10px;z-index:0;animation:buffering 450ms infinite linear}:host(.progress-bar-reversed){transform:scaleX(-1)}:host(.progress-paused) .indeterminate-bar-secondary,:host(.progress-paused) .indeterminate-bar-primary,:host(.progress-paused) .buffer-circles{animation-play-state:paused}:host(.ion-color) .progress-buffer-bar{background:rgba(var(--ion-color-base-rgb), 0.3)}:host(.ion-color) .buffer-circles{background-image:radial-gradient(ellipse at center, rgba(var(--ion-color-base-rgb), 0.3) 0%, rgba(var(--ion-color-base-rgb), 0.3) 30%, transparent 30%)}:host(.ion-color) .progress,:host(.ion-color) .progress-indeterminate{background:var(--ion-color-base)}@keyframes primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{to{transform:translateX(-10px)}}:host{height:3px}";const Ut=Wt;const Rt=":host{--background:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.3);--progress-background:var(--ion-color-primary, #3880ff);--buffer-background:var(--background);display:block;position:relative;width:100%;contain:strict;direction:ltr;overflow:hidden}.progress,.progress-indeterminate,.indeterminate-bar-primary,.indeterminate-bar-secondary,.progress-buffer-bar{left:0;right:0;top:0;bottom:0;position:absolute;width:100%;height:100%}.buffer-circles-container,.buffer-circles{left:0;right:0;top:0;bottom:0;position:absolute}.buffer-circles{right:-10px;left:-10px;}.progress,.progress-buffer-bar,.buffer-circles-container{transform-origin:left top;transition:transform 150ms linear}.progress,.progress-indeterminate{background:var(--progress-background);z-index:2}.progress-buffer-bar{background:var(--buffer-background);z-index:1}.buffer-circles-container{overflow:hidden}.indeterminate-bar-primary{top:0;right:0;bottom:0;left:-145.166611%;animation:primary-indeterminate-translate 2s infinite linear}.indeterminate-bar-primary .progress-indeterminate{animation:primary-indeterminate-scale 2s infinite linear;animation-play-state:inherit}.indeterminate-bar-secondary{top:0;right:0;bottom:0;left:-54.888891%;animation:secondary-indeterminate-translate 2s infinite linear}.indeterminate-bar-secondary .progress-indeterminate{animation:secondary-indeterminate-scale 2s infinite linear;animation-play-state:inherit}.buffer-circles{background-image:radial-gradient(ellipse at center, var(--buffer-background) 0%, var(--buffer-background) 30%, transparent 30%);background-repeat:repeat-x;background-position:5px center;background-size:10px 10px;z-index:0;animation:buffering 450ms infinite linear}:host(.progress-bar-reversed){transform:scaleX(-1)}:host(.progress-paused) .indeterminate-bar-secondary,:host(.progress-paused) .indeterminate-bar-primary,:host(.progress-paused) .buffer-circles{animation-play-state:paused}:host(.ion-color) .progress-buffer-bar{background:rgba(var(--ion-color-base-rgb), 0.3)}:host(.ion-color) .buffer-circles{background-image:radial-gradient(ellipse at center, rgba(var(--ion-color-base-rgb), 0.3) 0%, rgba(var(--ion-color-base-rgb), 0.3) 30%, transparent 30%)}:host(.ion-color) .progress,:host(.ion-color) .progress-indeterminate{background:var(--ion-color-base)}@keyframes primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{to{transform:translateX(-10px)}}:host{height:4px}";const Yt=Rt;const Ft=class{constructor(e){t(this,e);this.type="determinate";this.reversed=false;this.value=0;this.buffer=1;this.color=undefined}render(){const{color:t,type:n,reversed:i,value:o,buffer:s}=this;const a=x.getBoolean("_testing");const c=w(this);return e(r,{key:"944b79ed6fce1b2c0ed48681cd8517a5abbddd80",role:"progressbar","aria-valuenow":n==="determinate"?o:null,"aria-valuemin":"0","aria-valuemax":"1",class:m(t,{[c]:true,[`progress-bar-${n}`]:true,"progress-paused":a,"progress-bar-reversed":document.dir==="rtl"?!i:i})},n==="indeterminate"?Ht():Nt(o,s))}};const Ht=()=>e("div",{part:"track",class:"progress-buffer-bar"},e("div",{class:"indeterminate-bar-primary"},e("span",{part:"progress",class:"progress-indeterminate"})),e("div",{class:"indeterminate-bar-secondary"},e("span",{part:"progress",class:"progress-indeterminate"})));const Nt=(t,r)=>{const n=h(0,t,1);const i=h(0,r,1);return[e("div",{part:"progress",class:"progress",style:{transform:`scaleX(${n})`}}),e("div",{class:{"buffer-circles-container":true,"ion-hide":i===1},style:{transform:`translateX(${i*100}%)`}},e("div",{class:"buffer-circles-container",style:{transform:`translateX(-${i*100}%)`}},e("div",{part:"stream",class:"buffer-circles"}))),e("div",{part:"track",class:"progress-buffer-bar",style:{transform:`scaleX(${i})`}})]};Ft.style={ios:Ut,md:Yt};const Gt=":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:strict;pointer-events:none}:host(.unbounded){contain:layout size style}.ripple-effect{border-radius:50%;position:absolute;background-color:currentColor;color:inherit;contain:strict;opacity:0;animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;will-change:transform, opacity;pointer-events:none}.fade-out{transform:translate(var(--translate-end)) scale(var(--final-scale, 1));animation:150ms fadeOutAnimation forwards}@keyframes rippleAnimation{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:scale(1)}to{transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@keyframes fadeInAnimation{from{animation-timing-function:linear;opacity:0}to{opacity:0.16}}@keyframes fadeOutAnimation{from{animation-timing-function:linear;opacity:0.16}to{opacity:0}}";const Kt=Gt;const qt=class{constructor(e){t(this,e);this.type="bounded"}async addRipple(t,e){return new Promise((r=>{o((()=>{const n=this.el.getBoundingClientRect();const i=n.width;const o=n.height;const a=Math.sqrt(i*i+o*o);const c=Math.max(o,i);const l=this.unbounded?c:a+Zt;const d=Math.floor(c*Jt);const h=l/d;let u=t-n.left;let b=e-n.top;if(this.unbounded){u=i*.5;b=o*.5}const p=u-d*.5;const f=b-d*.5;const g=i*.5-u;const m=o*.5-b;s((()=>{const t=document.createElement("div");t.classList.add("ripple-effect");const e=t.style;e.top=f+"px";e.left=p+"px";e.width=e.height=d+"px";e.setProperty("--final-scale",`${h}`);e.setProperty("--translate-end",`${g}px, ${m}px`);const n=this.el.shadowRoot||this.el;n.appendChild(t);setTimeout((()=>{r((()=>{Vt(t)}))}),225+100)}))}))}))}get unbounded(){return this.type==="unbounded"}render(){const t=w(this);return e(r,{key:"f1129019a6d556b008c754aeb79618c69baea9f8",role:"presentation",class:{[t]:true,unbounded:this.unbounded}})}get el(){return n(this)}};const Vt=t=>{t.classList.add("fade-out");setTimeout((()=>{t.remove()}),200)};const Zt=10;const Jt=.5;qt.style=Kt;const Qt=".sc-ion-searchbar-ios-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.6;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);box-sizing:border-box}.ion-color.sc-ion-searchbar-ios-h{color:var(--ion-color-contrast)}.ion-color.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{background:var(--ion-color-base)}.ion-color.sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios,.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.ion-color.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{color:inherit}.searchbar-search-icon.sc-ion-searchbar-ios{color:var(--icon-color);pointer-events:none}.searchbar-input-container.sc-ion-searchbar-ios{display:block;position:relative;flex-shrink:1;width:100%}.searchbar-input.sc-ion-searchbar-ios{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;border-radius:var(--border-radius);display:block;width:100%;min-height:inherit;border:0;outline:none;background:var(--background);font-family:inherit;box-shadow:var(--box-shadow);box-sizing:border-box;appearance:none}.searchbar-input.sc-ion-searchbar-ios::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::-webkit-search-cancel-button,.searchbar-input.sc-ion-searchbar-ios::-ms-clear{display:none}.searchbar-cancel-button.sc-ion-searchbar-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:none;height:100%;border:0;outline:none;color:var(--cancel-button-color);cursor:pointer;appearance:none}.searchbar-cancel-button.sc-ion-searchbar-ios>div.sc-ion-searchbar-ios{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.searchbar-clear-button.sc-ion-searchbar-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:none;min-height:0;outline:none;color:var(--clear-button-color);appearance:none}.searchbar-clear-button.sc-ion-searchbar-ios:focus{opacity:0.5}.searchbar-has-value.searchbar-should-show-clear.sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios{display:block}.searchbar-disabled.sc-ion-searchbar-ios-h{cursor:default;opacity:0.4;pointer-events:none}.sc-ion-searchbar-ios-h{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.07);--border-radius:10px;--box-shadow:none;--cancel-button-color:var(--ion-color-primary, #3880ff);--clear-button-color:var(--ion-color-step-600, #666666);--color:var(--ion-text-color, #000);--icon-color:var(--ion-color-step-600, #666666);-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:12px;padding-bottom:12px;min-height:60px;contain:content}.searchbar-input-container.sc-ion-searchbar-ios{min-height:36px}.searchbar-search-icon.sc-ion-searchbar-ios{-webkit-margin-start:calc(50% - 60px);margin-inline-start:calc(50% - 60px);top:0;position:absolute;width:1.375rem;height:100%;contain:strict}@supports (inset-inline-start: 0){.searchbar-search-icon.sc-ion-searchbar-ios{inset-inline-start:5px}}@supports not (inset-inline-start: 0){.searchbar-search-icon.sc-ion-searchbar-ios{left:5px}[dir=rtl].sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,[dir=rtl] .sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{left:unset;right:unset;right:5px}[dir=rtl].sc-ion-searchbar-ios .searchbar-search-icon.sc-ion-searchbar-ios{left:unset;right:unset;right:5px}@supports selector(:dir(rtl)){.searchbar-search-icon.sc-ion-searchbar-ios:dir(rtl){left:unset;right:unset;right:5px}}}.searchbar-input.sc-ion-searchbar-ios{-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:6px;padding-bottom:6px;height:100%;font-size:1.0625rem;font-weight:400;contain:strict}.searchbar-has-value.searchbar-should-show-clear.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{-webkit-padding-start:1.75rem;padding-inline-start:1.75rem;-webkit-padding-end:1.75rem;padding-inline-end:1.75rem}.searchbar-clear-button.sc-ion-searchbar-ios{top:0;background-position:center;position:absolute;width:1.875rem;height:100%;border:0;background-color:transparent}@supports (inset-inline-start: 0){.searchbar-clear-button.sc-ion-searchbar-ios{inset-inline-end:0}}@supports not (inset-inline-start: 0){.searchbar-clear-button.sc-ion-searchbar-ios{right:0}[dir=rtl].sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios,[dir=rtl] .sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios{left:unset;right:unset;left:0}[dir=rtl].sc-ion-searchbar-ios .searchbar-clear-button.sc-ion-searchbar-ios{left:unset;right:unset;left:0}@supports selector(:dir(rtl)){.searchbar-clear-button.sc-ion-searchbar-ios:dir(rtl){left:unset;right:unset;left:0}}}.searchbar-clear-icon.sc-ion-searchbar-ios{width:1.125rem;height:100%}.searchbar-cancel-button.sc-ion-searchbar-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;flex-shrink:0;background-color:transparent;font-size:16px}.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{-webkit-margin-start:0;margin-inline-start:0}.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{-webkit-padding-start:1.875rem;padding-inline-start:1.875rem}.searchbar-has-focus.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-should-show-cancel.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{display:block}.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{transition:all 300ms ease}.searchbar-animated.searchbar-has-focus.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-animated.searchbar-should-show-cancel.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{opacity:1;pointer-events:auto}.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{-webkit-margin-end:-100%;margin-inline-end:-100%;transform:translate3d(0, 0, 0);transition:all 300ms ease;opacity:0;pointer-events:none}.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios,.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{transition-duration:0ms}.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{color:var(--ion-color-base)}@media (any-hover: hover){.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios:hover{color:var(--ion-color-tint)}}ion-toolbar.sc-ion-searchbar-ios-h,ion-toolbar .sc-ion-searchbar-ios-h{padding-top:1px;padding-bottom:15px;min-height:52px}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color),ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color){color:inherit}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-cancel-button.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-cancel-button.sc-ion-searchbar-ios{color:currentColor}ion-toolbar.ion-color.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{color:currentColor;opacity:0.5}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-input.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-input.sc-ion-searchbar-ios{background:rgba(var(--ion-color-contrast-rgb), 0.07);color:currentColor}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-clear-button.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-clear-button.sc-ion-searchbar-ios{color:currentColor;opacity:0.5}";const te=Qt;const ee=".sc-ion-searchbar-md-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.6;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);box-sizing:border-box}.ion-color.sc-ion-searchbar-md-h{color:var(--ion-color-contrast)}.ion-color.sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md{background:var(--ion-color-base)}.ion-color.sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md,.ion-color.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,.ion-color.sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{color:inherit}.searchbar-search-icon.sc-ion-searchbar-md{color:var(--icon-color);pointer-events:none}.searchbar-input-container.sc-ion-searchbar-md{display:block;position:relative;flex-shrink:1;width:100%}.searchbar-input.sc-ion-searchbar-md{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;border-radius:var(--border-radius);display:block;width:100%;min-height:inherit;border:0;outline:none;background:var(--background);font-family:inherit;box-shadow:var(--box-shadow);box-sizing:border-box;appearance:none}.searchbar-input.sc-ion-searchbar-md::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::-webkit-search-cancel-button,.searchbar-input.sc-ion-searchbar-md::-ms-clear{display:none}.searchbar-cancel-button.sc-ion-searchbar-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:none;height:100%;border:0;outline:none;color:var(--cancel-button-color);cursor:pointer;appearance:none}.searchbar-cancel-button.sc-ion-searchbar-md>div.sc-ion-searchbar-md{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.searchbar-clear-button.sc-ion-searchbar-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:none;min-height:0;outline:none;color:var(--clear-button-color);appearance:none}.searchbar-clear-button.sc-ion-searchbar-md:focus{opacity:0.5}.searchbar-has-value.searchbar-should-show-clear.sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md{display:block}.searchbar-disabled.sc-ion-searchbar-md-h{cursor:default;opacity:0.4;pointer-events:none}.sc-ion-searchbar-md-h{--background:var(--ion-background-color, #fff);--border-radius:2px;--box-shadow:0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);--cancel-button-color:var(--ion-color-step-900, #1a1a1a);--clear-button-color:initial;--color:var(--ion-color-step-850, #262626);--icon-color:var(--ion-color-step-600, #666666);-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;background:inherit}.searchbar-search-icon.sc-ion-searchbar-md{top:11px;width:1.3125rem;height:1.3125rem}@supports (inset-inline-start: 0){.searchbar-search-icon.sc-ion-searchbar-md{inset-inline-start:16px}}@supports not (inset-inline-start: 0){.searchbar-search-icon.sc-ion-searchbar-md{left:16px}[dir=rtl].sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{left:unset;right:unset;right:16px}[dir=rtl].sc-ion-searchbar-md .searchbar-search-icon.sc-ion-searchbar-md{left:unset;right:unset;right:16px}@supports selector(:dir(rtl)){.searchbar-search-icon.sc-ion-searchbar-md:dir(rtl){left:unset;right:unset;right:16px}}}.searchbar-cancel-button.sc-ion-searchbar-md{top:0;background-color:transparent;font-size:1.5em}@supports (inset-inline-start: 0){.searchbar-cancel-button.sc-ion-searchbar-md{inset-inline-start:9px}}@supports not (inset-inline-start: 0){.searchbar-cancel-button.sc-ion-searchbar-md{left:9px}[dir=rtl].sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md{left:unset;right:unset;right:9px}[dir=rtl].sc-ion-searchbar-md .searchbar-cancel-button.sc-ion-searchbar-md{left:unset;right:unset;right:9px}@supports selector(:dir(rtl)){.searchbar-cancel-button.sc-ion-searchbar-md:dir(rtl){left:unset;right:unset;right:9px}}}.searchbar-search-icon.sc-ion-searchbar-md,.searchbar-cancel-button.sc-ion-searchbar-md{position:absolute}.searchbar-search-icon.ion-activated.sc-ion-searchbar-md,.searchbar-cancel-button.ion-activated.sc-ion-searchbar-md{background-color:transparent}.searchbar-input.sc-ion-searchbar-md{-webkit-padding-start:3.4375rem;padding-inline-start:3.4375rem;-webkit-padding-end:3.4375rem;padding-inline-end:3.4375rem;padding-top:0.375rem;padding-bottom:0.375rem;background-position:left 8px center;height:auto;font-size:1rem;font-weight:400;line-height:30px}[dir=rtl].sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md{background-position:right 8px center}[dir=rtl].sc-ion-searchbar-md .searchbar-input.sc-ion-searchbar-md{background-position:right 8px center}@supports selector(:dir(rtl)){.searchbar-input.sc-ion-searchbar-md:dir(rtl){background-position:right 8px center}}.searchbar-clear-button.sc-ion-searchbar-md{top:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;position:absolute;height:100%;border:0;background-color:transparent}@supports (inset-inline-start: 0){.searchbar-clear-button.sc-ion-searchbar-md{inset-inline-end:13px}}@supports not (inset-inline-start: 0){.searchbar-clear-button.sc-ion-searchbar-md{right:13px}[dir=rtl].sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md{left:unset;right:unset;left:13px}[dir=rtl].sc-ion-searchbar-md .searchbar-clear-button.sc-ion-searchbar-md{left:unset;right:unset;left:13px}@supports selector(:dir(rtl)){.searchbar-clear-button.sc-ion-searchbar-md:dir(rtl){left:unset;right:unset;left:13px}}}.searchbar-clear-button.ion-activated.sc-ion-searchbar-md{background-color:transparent}.searchbar-clear-icon.sc-ion-searchbar-md{width:1.375rem;height:100%}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{display:block}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,.searchbar-should-show-cancel.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md{display:block}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md+.searchbar-search-icon.sc-ion-searchbar-md,.searchbar-should-show-cancel.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md+.searchbar-search-icon.sc-ion-searchbar-md{display:none}ion-toolbar.sc-ion-searchbar-md-h,ion-toolbar .sc-ion-searchbar-md-h{-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:7px;padding-inline-end:7px;padding-top:3px;padding-bottom:3px}";const re=ee;const ne=class{constructor(e){t(this,e);this.ionInput=a(this,"ionInput",7);this.ionChange=a(this,"ionChange",7);this.ionCancel=a(this,"ionCancel",7);this.ionClear=a(this,"ionClear",7);this.ionBlur=a(this,"ionBlur",7);this.ionFocus=a(this,"ionFocus",7);this.ionStyle=a(this,"ionStyle",7);this.isCancelVisible=false;this.shouldAlignLeft=true;this.inputId=`ion-searchbar-${ie++}`;this.inheritedAttributes={};this.onClearInput=async t=>{this.ionClear.emit();return new Promise((e=>{setTimeout((()=>{const r=this.getValue();if(r!==""){this.value="";this.emitInputChange();if(t&&!this.focused){this.setFocus();this.focusedValue=r}}e()}),16*4)}))};this.onCancelSearchbar=async t=>{if(t){t.preventDefault();t.stopPropagation()}this.ionCancel.emit();const e=this.getValue();const r=this.focused;await this.onClearInput();if(e&&!r){this.emitValueChange(t)}if(this.nativeInput){this.nativeInput.blur()}};this.onInput=t=>{const e=t.target;if(e){this.value=e.value}this.emitInputChange(t)};this.onChange=t=>{this.emitValueChange(t)};this.onBlur=t=>{this.focused=false;this.ionBlur.emit();this.positionElements();if(this.focusedValue!==this.value){this.emitValueChange(t)}this.focusedValue=undefined};this.onFocus=()=>{this.focused=true;this.focusedValue=this.value;this.ionFocus.emit();this.positionElements()};this.focused=false;this.noAnimate=true;this.color=undefined;this.animated=false;this.autocapitalize="default";this.autocomplete="off";this.autocorrect="off";this.cancelButtonIcon=x.get("backButtonIcon",z);this.cancelButtonText="Cancel";this.clearIcon=undefined;this.debounce=undefined;this.disabled=false;this.inputmode=undefined;this.enterkeyhint=undefined;this.maxlength=undefined;this.minlength=undefined;this.name=this.inputId;this.placeholder="Search";this.searchIcon=undefined;this.showCancelButton="never";this.showClearButton="always";this.spellcheck=false;this.type="search";this.value=""}onLangChanged(t){this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{lang:t});c(this)}onDirChanged(t){this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{dir:t});c(this)}debounceChanged(){const{ionInput:t,debounce:e,originalIonInput:r}=this;this.ionInput=e===undefined?r!==null&&r!==void 0?r:t:u(t,e)}valueChanged(){const t=this.nativeInput;const e=this.getValue();if(t&&t.value!==e){t.value=e}}showCancelButtonChanged(){requestAnimationFrame((()=>{this.positionElements();c(this)}))}connectedCallback(){this.emitStyle()}componentWillLoad(){this.inheritedAttributes=Object.assign({},d(this.el,["lang","dir"]))}componentDidLoad(){this.originalIonInput=this.ionInput;this.positionElements();this.debounceChanged();setTimeout((()=>{this.noAnimate=false}),300)}emitStyle(){this.ionStyle.emit({searchbar:true})}async setFocus(){if(this.nativeInput){this.nativeInput.focus()}}async getInputElement(){if(!this.nativeInput){await new Promise((t=>b(this.el,t)))}return Promise.resolve(this.nativeInput)}emitValueChange(t){const{value:e}=this;const r=e==null?e:e.toString();this.focusedValue=r;this.ionChange.emit({value:r,event:t})}emitInputChange(t){const{value:e}=this;this.ionInput.emit({value:e,event:t})}positionElements(){const t=this.getValue();const e=this.shouldAlignLeft;const r=w(this);const n=!this.animated||t.trim()!==""||!!this.focused;this.shouldAlignLeft=n;if(r!=="ios"){return}if(e!==n){this.positionPlaceholder()}if(this.animated){this.positionCancelButton()}}positionPlaceholder(){const t=this.nativeInput;if(!t){return}const e=k(this.el);const r=(this.el.shadowRoot||this.el).querySelector(".searchbar-search-icon");if(this.shouldAlignLeft){t.removeAttribute("style");r.removeAttribute("style")}else{const n=document;const i=n.createElement("span");i.innerText=this.placeholder||"";n.body.appendChild(i);p((()=>{const n=i.offsetWidth;i.remove();const o="calc(50% - "+n/2+"px)";const s="calc(50% - "+(n/2+r.clientWidth+8)+"px)";if(e){t.style.paddingRight=o;r.style.marginRight=s}else{t.style.paddingLeft=o;r.style.marginLeft=s}}))}}positionCancelButton(){const t=k(this.el);const e=(this.el.shadowRoot||this.el).querySelector(".searchbar-cancel-button");const r=this.shouldShowCancelButton();if(e!==null&&r!==this.isCancelVisible){const n=e.style;this.isCancelVisible=r;if(r){if(t){n.marginLeft="0"}else{n.marginRight="0"}}else{const r=e.offsetWidth;if(r>0){if(t){n.marginLeft=-r+"px"}else{n.marginRight=-r+"px"}}}}}getValue(){return this.value||""}hasValue(){return this.getValue()!==""}shouldShowCancelButton(){if(this.showCancelButton==="never"||this.showCancelButton==="focus"&&!this.focused){return false}return true}shouldShowClearButton(){if(this.showClearButton==="never"||this.showClearButton==="focus"&&!this.focused){return false}return true}render(){const{cancelButtonText:t,autocapitalize:n}=this;const i=this.animated&&x.getBoolean("animated",true);const o=w(this);const s=this.clearIcon||(o==="ios"?C:I);const a=this.searchIcon||(o==="ios"?j:S);const c=this.shouldShowCancelButton();const l=this.showCancelButton!=="never"&&e("button",{key:"9c7b4d2e86d9bcd12e57c9a96723d3da598a3773","aria-label":t,"aria-hidden":c?undefined:"true",type:"button",tabIndex:o==="ios"&&!c?-1:undefined,onMouseDown:this.onCancelSearchbar,onTouchStart:this.onCancelSearchbar,class:"searchbar-cancel-button"},e("div",{key:"1c25268a776134cccd29eb752898cb8ac0eed30f","aria-hidden":"true"},o==="md"?e("ion-icon",{"aria-hidden":"true",mode:o,icon:this.cancelButtonIcon,lazy:false}):t));return e(r,{key:"feef9fc7e405656e134a76dc037aaaa1a4ce36b4",role:"search","aria-disabled":this.disabled?"true":null,class:m(this.color,{[o]:true,"searchbar-animated":i,"searchbar-disabled":this.disabled,"searchbar-no-animate":i&&this.noAnimate,"searchbar-has-value":this.hasValue(),"searchbar-left-aligned":this.shouldAlignLeft,"searchbar-has-focus":this.focused,"searchbar-should-show-clear":this.shouldShowClearButton(),"searchbar-should-show-cancel":this.shouldShowCancelButton()})},e("div",{key:"92e3925dc0de468e5665705902153837105dfa57",class:"searchbar-input-container"},e("input",Object.assign({key:"fb74faf81b347a62338ccdac981525df1c52b322","aria-label":"search text",disabled:this.disabled,ref:t=>this.nativeInput=t,class:"searchbar-input",inputMode:this.inputmode,enterKeyHint:this.enterkeyhint,name:this.name,onInput:this.onInput,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,minLength:this.minlength,maxLength:this.maxlength,placeholder:this.placeholder,type:this.type,value:this.getValue(),autoCapitalize:n==="default"?undefined:n,autoComplete:this.autocomplete,autoCorrect:this.autocorrect,spellcheck:this.spellcheck},this.inheritedAttributes)),o==="md"&&l,e("ion-icon",{key:"d58c3636dac1d2e4135989f4c07dc95c51492e60","aria-hidden":"true",mode:o,icon:a,lazy:false,class:"searchbar-search-icon"}),e("button",{key:"1cece7c63ca5ca4b8799e15ee6d2bac100ef0d5e","aria-label":"reset",type:"button","no-blur":true,class:"searchbar-clear-button",onPointerDown:t=>{t.preventDefault()},onClick:()=>this.onClearInput(true)},e("ion-icon",{key:"fe3c2b9cac29002f69e95a89b554c7504e2df050","aria-hidden":"true",mode:o,icon:s,lazy:false,class:"searchbar-clear-icon"}))),o==="ios"&&l)}get el(){return n(this)}static get watchers(){return{lang:["onLangChanged"],dir:["onDirChanged"],debounce:["debounceChanged"],value:["valueChanged"],showCancelButton:["showCancelButtonChanged"]}}};let ie=0;ne.style={ios:te,md:re};const oe=":host{--background:rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065);border-radius:var(--border-radius, inherit);display:block;width:100%;height:inherit;margin-top:4px;margin-bottom:4px;background:var(--background);line-height:10px;user-select:none;pointer-events:none}span{display:inline-block}:host(.in-media){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;height:100%}:host(.skeleton-text-animated){position:relative;background:linear-gradient(to right, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065) 8%, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.135) 18%, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065) 33%);background-size:800px 104px;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear}@keyframes shimmer{0%{background-position:-400px 0}100%{background-position:400px 0}}";const se=oe;const ae=class{constructor(e){t(this,e);this.ionStyle=a(this,"ionStyle",7);this.animated=false}componentWillLoad(){this.emitStyle()}emitStyle(){const t={"skeleton-text":true};this.ionStyle.emit(t)}render(){const t=this.animated&&x.getBoolean("animated",true);const n=v("ion-avatar",this.el)||v("ion-thumbnail",this.el);const i=w(this);return e(r,{key:"4dab0fd2de666de12ad8f6dc6ed1e1de0be67ddd",class:{[i]:true,"skeleton-text-animated":t,"in-media":n}},e("span",{key:"f8f908ec24d65e63b14d9a54640a5f18f0fa8fa5"}," "))}get el(){return n(this)}};ae.style=se;
2
- /*!
3
- * (C) Ionic http://ionicframework.com - MIT License
4
- */function ce(t,e,r,n){let i;if(r==="md"){i=t==="top"?8:-8}else{i=t==="top"?10:-10}if(e&&H){le(e,n);const r=e.getBoundingClientRect();if(t==="top"){i+=r.bottom}else if(t==="bottom"){i-=H.innerHeight-r.top}return{top:`${i}px`,bottom:`${i}px`}}else{return{top:`calc(${i}px + var(--ion-safe-area-top, 0px))`,bottom:`calc(${i}px - var(--ion-safe-area-bottom, 0px))`}}}function le(t,e){if(t.offsetParent===null){T("The positionAnchor element for ion-toast was found in the DOM, but appears to be hidden. This may lead to unexpected positioning of the toast.",e)}}const de=(t,e)=>Math.floor(t/2-e/2);
5
- /*!
6
- * (C) Ionic http://ionicframework.com - MIT License
7
- */const he=(t,e)=>{const r=F();const n=F();const{position:i,top:o,bottom:s}=e;const a=f(t);const c=a.querySelector(".toast-wrapper");n.addElement(c);switch(i){case"top":n.fromTo("transform","translateY(-100%)",`translateY(${o})`);break;case"middle":const e=de(t.clientHeight,c.clientHeight);c.style.top=`${e}px`;n.fromTo("opacity",.01,1);break;default:n.fromTo("transform","translateY(100%)",`translateY(${s})`);break}return r.easing("cubic-bezier(.155,1.105,.295,1.12)").duration(400).addAnimation(n)};
8
- /*!
9
- * (C) Ionic http://ionicframework.com - MIT License
10
- */const ue=(t,e)=>{const r=F();const n=F();const{position:i,top:o,bottom:s}=e;const a=f(t);const c=a.querySelector(".toast-wrapper");n.addElement(c);switch(i){case"top":n.fromTo("transform",`translateY(${o})`,"translateY(-100%)");break;case"middle":n.fromTo("opacity",.99,0);break;default:n.fromTo("transform",`translateY(${s})`,"translateY(100%)");break}return r.easing("cubic-bezier(.36,.66,.04,1)").duration(300).addAnimation(n)};
11
- /*!
12
- * (C) Ionic http://ionicframework.com - MIT License
13
- */const be=(t,e)=>{const r=F();const n=F();const{position:i,top:o,bottom:s}=e;const a=f(t);const c=a.querySelector(".toast-wrapper");n.addElement(c);switch(i){case"top":c.style.setProperty("transform",`translateY(${o})`);n.fromTo("opacity",.01,1);break;case"middle":const e=de(t.clientHeight,c.clientHeight);c.style.top=`${e}px`;n.fromTo("opacity",.01,1);break;default:c.style.setProperty("transform",`translateY(${s})`);n.fromTo("opacity",.01,1);break}return r.easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation(n)};
14
- /*!
15
- * (C) Ionic http://ionicframework.com - MIT License
16
- */const pe=t=>{const e=F();const r=F();const n=f(t);const i=n.querySelector(".toast-wrapper");r.addElement(i).fromTo("opacity",.99,0);return e.easing("cubic-bezier(.36,.66,.04,1)").duration(300).addAnimation(r)};
17
- /*!
18
- * (C) Ionic http://ionicframework.com - MIT License
19
- */const fe=(t,e,r)=>{const n=f(t).querySelector(".toast-wrapper");const i=t.clientHeight;const o=n.getBoundingClientRect();let s=0;const a=.5;const c=t.position==="middle"?.5:0;const l=t.position==="top"?-1:1;const d=de(i,o.height);const h=[{offset:0,transform:`translateY(-${d+o.height}px)`},{offset:.5,transform:`translateY(0px)`},{offset:1,transform:`translateY(${d+o.height}px)`}];const u=F("toast-swipe-to-dismiss-animation").addElement(n).duration(100);switch(t.position){case"middle":s=i+o.height;u.keyframes(h);u.progressStart(true,.5);break;case"top":s=o.bottom;u.keyframes([{offset:0,transform:`translateY(${e.top})`},{offset:1,transform:"translateY(-100%)"}]);u.progressStart(true,0);break;case"bottom":default:s=i-o.top;u.keyframes([{offset:0,transform:`translateY(${e.bottom})`},{offset:1,transform:"translateY(100%)"}]);u.progressStart(true,0);break}const b=t=>t*l/s;const p=t=>{const e=c+b(t.deltaY);u.progressStep(e)};const g=e=>{const i=e.velocityY;const o=(e.deltaY+i*1e3)/s*l;m.enable(false);let c=true;let p=1;let f=0;let g=0;if(t.position==="middle"){c=o>=a/2||o<=-a/2;p=1;f=0;const t=n.getBoundingClientRect();const r=t.top-d;const i=`${r}px`;const s=e.deltaY<=0?-1:1;const l=(d+t.height)*s;const h=c?`${l}px`:"0px";const b=[{offset:0,transform:`translateY(${i})`},{offset:1,transform:`translateY(${h})`}];u.keyframes(b);g=l-r}else{c=o>=a;p=c?1:0;f=b(e.deltaY);const t=c?1-f:f;g=t*s}const v=Math.min(Math.abs(g)/Math.abs(i),200);u.onFinish((()=>{if(c){r();u.destroy()}else{if(t.position==="middle"){u.keyframes(h).progressStart(true,.5)}else{u.progressStart(true,0)}m.enable(true)}}),{oneTimeCallback:true}).progressEnd(p,f,v)};const m=N({el:n,gestureName:"toast-swipe-to-dismiss",gesturePriority:P,direction:"y",onMove:p,onEnd:g});return m};const ge=":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}@supports (inset-inline-start: 0){:host{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host{left:0}:host-context([dir=rtl]){left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)){left:unset;right:unset;right:0}}}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);box-shadow:var(--box-shadow)}@supports (inset-inline-start: 0){.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}}@supports not (inset-inline-start: 0){.toast-wrapper{left:var(--start);right:var(--end)}:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}[dir=rtl] .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}@supports selector(:dir(rtl)){.toast-wrapper:dir(rtl){left:unset;right:unset;left:var(--end);right:var(--start)}}}.toast-wrapper.toast-top{transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:flex;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{flex-wrap:wrap}.toast-layout-baseline .toast-content{display:flex;flex:1;flex-direction:column;justify-content:center}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-content{min-width:0}.toast-message{flex:1;white-space:var(--white-space)}.toast-button-group{display:flex}.toast-layout-stacked .toast-button-group{justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:flex;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-50, #f2f2f2);--border-radius:14px;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-850, #262626);--max-width:700px;--max-height:478px;--start:10px;--end:10px;font-size:clamp(14px, 0.875rem, 43.4px)}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;z-index:10}@supports (backdrop-filter: blur(0)){:host(.toast-translucent) .toast-wrapper{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);backdrop-filter:saturate(180%) blur(20px)}:host(.ion-color.toast-translucent) .toast-wrapper{background:rgba(var(--ion-color-base-rgb), 0.8)}}.toast-wrapper.toast-middle{opacity:0.01}.toast-content{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:15px;padding-bottom:15px}.toast-header{margin-bottom:2px;font-weight:500}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;min-height:44px;transition:background-color, opacity 100ms linear;border:0;background-color:transparent;font-family:var(--ion-font-family);font-size:clamp(17px, 1.0625rem, 21.998px);font-weight:500;overflow:hidden}.toast-button.ion-activated{opacity:0.4}@media (any-hover: hover){.toast-button:hover{opacity:0.6}}";const me=ge;const ve=":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}@supports (inset-inline-start: 0){:host{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host{left:0}:host-context([dir=rtl]){left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)){left:unset;right:unset;right:0}}}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);box-shadow:var(--box-shadow)}@supports (inset-inline-start: 0){.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}}@supports not (inset-inline-start: 0){.toast-wrapper{left:var(--start);right:var(--end)}:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}[dir=rtl] .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}@supports selector(:dir(rtl)){.toast-wrapper:dir(rtl){left:unset;right:unset;left:var(--end);right:var(--start)}}}.toast-wrapper.toast-top{transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:flex;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{flex-wrap:wrap}.toast-layout-baseline .toast-content{display:flex;flex:1;flex-direction:column;justify-content:center}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-content{min-width:0}.toast-message{flex:1;white-space:var(--white-space)}.toast-button-group{display:flex}.toast-layout-stacked .toast-button-group{justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:flex;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-800, #333333);--border-radius:4px;--box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-50, #f2f2f2);--max-width:700px;--start:8px;--end:8px;font-size:0.875rem}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;opacity:0.01;z-index:10}.toast-content{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:14px;padding-bottom:14px}.toast-header{margin-bottom:2px;font-weight:500;line-height:1.25rem}.toast-message{line-height:1.25rem}.toast-layout-baseline .toast-button-group-start{-webkit-margin-start:8px;margin-inline-start:8px}.toast-layout-stacked .toast-button-group-start{-webkit-margin-end:8px;margin-inline-end:8px;margin-top:8px}.toast-layout-baseline .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px}.toast-layout-stacked .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px;margin-bottom:8px}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;font-family:var(--ion-font-family);font-size:0.875rem;font-weight:500;letter-spacing:0.84px;text-transform:uppercase;overflow:hidden}.toast-button-cancel{color:var(--ion-color-step-100, #e6e6e6)}.toast-button-icon-only{border-radius:50%;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px;padding-top:9px;padding-bottom:9px;width:36px;height:36px}@media (any-hover: hover){.toast-button:hover{background-color:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08)}.toast-button-cancel:hover{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08)}}";const ye=ve;const we=class{constructor(e){t(this,e);this.didPresent=a(this,"ionToastDidPresent",7);this.willPresent=a(this,"ionToastWillPresent",7);this.willDismiss=a(this,"ionToastWillDismiss",7);this.didDismiss=a(this,"ionToastDidDismiss",7);this.didPresentShorthand=a(this,"didPresent",7);this.willPresentShorthand=a(this,"willPresent",7);this.willDismissShorthand=a(this,"willDismiss",7);this.didDismissShorthand=a(this,"didDismiss",7);this.delegateController=O(this);this.lockController=L();this.triggerController=B();this.customHTMLEnabled=x.get("innerHTMLTemplatesEnabled",_);this.presented=false;this.dispatchCancelHandler=t=>{const e=t.detail.role;if($(e)){const t=this.getButtons().find((t=>t.role==="cancel"));this.callButtonHandler(t)}};this.createSwipeGesture=t=>{const e=this.gesture=fe(this.el,t,(()=>{this.dismiss(undefined,R)}));e.enable(true)};this.destroySwipeGesture=()=>{const{gesture:t}=this;if(t===undefined){return}t.destroy();this.gesture=undefined};this.prefersSwipeGesture=()=>{const{swipeGesture:t}=this;return t==="vertical"};this.revealContentToScreenReader=false;this.overlayIndex=undefined;this.delegate=undefined;this.hasController=false;this.color=undefined;this.enterAnimation=undefined;this.leaveAnimation=undefined;this.cssClass=undefined;this.duration=x.getNumber("toastDuration",0);this.header=undefined;this.layout="baseline";this.message=undefined;this.keyboardClose=false;this.position="bottom";this.positionAnchor=undefined;this.buttons=undefined;this.translucent=false;this.animated=true;this.icon=undefined;this.htmlAttributes=undefined;this.swipeGesture=undefined;this.isOpen=false;this.trigger=undefined}swipeGestureChanged(){this.destroySwipeGesture();if(this.presented&&this.prefersSwipeGesture()){this.createSwipeGesture(this.lastPresentedPosition)}}onIsOpenChange(t,e){if(t===true&&e===false){this.present()}else if(t===false&&e===true){this.dismiss()}}triggerChanged(){const{trigger:t,el:e,triggerController:r}=this;if(t){r.addClickListener(e,t)}}connectedCallback(){M(this.el);this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener()}componentWillLoad(){X(this.el)}componentDidLoad(){if(this.isOpen===true){p((()=>this.present()))}this.triggerChanged()}async present(){const t=await this.lockController.lock();await this.delegateController.attachViewToDom();const{el:e,position:r}=this;const n=this.getAnchorElement();const i=ce(r,n,w(this),e);this.lastPresentedPosition=i;await E(this,"toastEnter",he,be,{position:r,top:i.top,bottom:i.bottom});this.revealContentToScreenReader=true;if(this.duration>0){this.durationTimeout=setTimeout((()=>this.dismiss(undefined,"timeout")),this.duration)}if(this.prefersSwipeGesture()){this.createSwipeGesture(i)}t()}async dismiss(t,e){var r,n;const i=await this.lockController.lock();const{durationTimeout:o,position:s,lastPresentedPosition:a}=this;if(o){clearTimeout(o)}const c=await A(this,t,e,"toastLeave",ue,pe,{position:s,top:(r=a===null||a===void 0?void 0:a.top)!==null&&r!==void 0?r:"",bottom:(n=a===null||a===void 0?void 0:a.bottom)!==null&&n!==void 0?n:""});if(c){this.delegateController.removeViewFromDom();this.revealContentToScreenReader=false}this.lastPresentedPosition=undefined;this.destroySwipeGesture();i();return c}onDidDismiss(){return W(this.el,"ionToastDidDismiss")}onWillDismiss(){return W(this.el,"ionToastWillDismiss")}getButtons(){const t=this.buttons?this.buttons.map((t=>typeof t==="string"?{text:t}:t)):[];return t}getAnchorElement(){const{position:t,positionAnchor:e,el:r}=this;if(e===undefined){return}if(t==="middle"&&e!==undefined){T('The positionAnchor property is ignored when using position="middle".',this.el);return undefined}if(typeof e==="string"){const t=document.getElementById(e);if(t===null){T(`An anchor element with an ID of "${e}" was not found in the DOM.`,r);return undefined}return t}if(e instanceof HTMLElement){return e}T("Invalid positionAnchor value:",e,r);return undefined}async buttonClick(t){const e=t.role;if($(e)){return this.dismiss(undefined,e)}const r=await this.callButtonHandler(t);if(r){return this.dismiss(undefined,e)}return Promise.resolve()}async callButtonHandler(t){if(t===null||t===void 0?void 0:t.handler){try{const e=await U(t.handler);if(e===false){return false}}catch(t){console.error(t)}}return true}renderButtons(t,r){if(t.length===0){return}const n=w(this);const i={"toast-button-group":true,[`toast-button-group-${r}`]:true};return e("div",{class:i},t.map((t=>e("button",Object.assign({},t.htmlAttributes,{type:"button",class:xe(t),tabIndex:0,onClick:()=>this.buttonClick(t),part:ke(t)}),e("div",{class:"toast-button-inner"},t.icon&&e("ion-icon",{"aria-hidden":"true",icon:t.icon,slot:t.text===undefined?"icon-only":undefined,class:"toast-button-icon"}),t.text),n==="md"&&e("ion-ripple-effect",{type:t.icon!==undefined&&t.text===undefined?"unbounded":"bounded"})))))}renderToastMessage(t,r=null){const{customHTMLEnabled:n,message:i}=this;if(n){return e("div",{key:t,"aria-hidden":r,class:"toast-message",part:"message",innerHTML:D(i)})}return e("div",{key:t,"aria-hidden":r,class:"toast-message",part:"message"},i)}renderHeader(t,r=null){return e("div",{key:t,class:"toast-header","aria-hidden":r,part:"header"},this.header)}render(){const{layout:t,el:n,revealContentToScreenReader:i,header:o,message:s}=this;const a=this.getButtons();const c=a.filter((t=>t.side==="start"));const l=a.filter((t=>t.side!=="start"));const d=w(this);const h={"toast-wrapper":true,[`toast-${this.position}`]:true,[`toast-layout-${t}`]:true};if(t==="stacked"&&c.length>0&&l.length>0){T("This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.",n)}return e(r,Object.assign({key:"23803334fb668f6ce7044d3a321cb84bc753bd16",tabindex:"-1"},this.htmlAttributes,{style:{zIndex:`${6e4+this.overlayIndex}`},class:m(this.color,Object.assign(Object.assign({[d]:true},y(this.cssClass)),{"overlay-hidden":true,"toast-translucent":this.translucent})),onIonToastWillDismiss:this.dispatchCancelHandler}),e("div",{key:"7cd7138ba079fccf97f318b91e9986491ab4214d",class:h},e("div",{key:"93b78fa64e24435adeb77a04c1d1d53d2f093864",class:"toast-container",part:"container"},this.renderButtons(c,"start"),this.icon!==undefined&&e("ion-icon",{key:"9a3c71b164ebcfba2540acb7568beffa76b62f47",class:"toast-icon",part:"icon",icon:this.icon,lazy:false,"aria-hidden":"true"}),e("div",{key:"feb9268102d844f1314205f7440de7066cf0620e",class:"toast-content",role:"status","aria-atomic":"true","aria-live":"polite"},!i&&o!==undefined&&this.renderHeader("oldHeader","true"),!i&&s!==undefined&&this.renderToastMessage("oldMessage","true"),i&&o!==undefined&&this.renderHeader("header"),i&&s!==undefined&&this.renderToastMessage("header")),this.renderButtons(l,"end"))))}get el(){return n(this)}static get watchers(){return{swipeGesture:["swipeGestureChanged"],isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}}};const xe=t=>Object.assign({"toast-button":true,"toast-button-icon-only":t.icon!==undefined&&t.text===undefined,[`toast-button-${t.role}`]:t.role!==undefined,"ion-focusable":true,"ion-activatable":true},y(t.cssClass));const ke=t=>$(t.role)?"button cancel":"button";we.style={ios:me,md:ye};const ze=":host{font-family:var(--font-sans);display:block}button#new{cursor:pointer;display:flex;align-items:center;justify-content:center;border:none;width:var(--scale-5);height:var(--scale-5);background-color:var(--pos-primary-color);color:var(--color-grey-50);font-size:var(--scale-6);border-radius:var(--radius-xs)}button#new:hover,button#new:focus{outline:none;filter:brightness(110%);box-shadow:var(--shadow-sm)}pos-new-thing-form{margin:var(--scale-3)}";const Ce=ze;const Ie=class{constructor(e){t(this,e)}openDialog(){this.dialog.showModal()}render(){return e(r,{key:"35b8629fc9ac9d9e759009f329dc9437307649c3"},e("button",{key:"b6c0b1d06fbed05a079c1e4cb684f227fd40d098",id:"new",title:"Add a new thing",onClick:()=>this.openDialog()},e("ion-icon",{key:"2dfbcff7480dfc7397a5810ca7a33b9e583a77ee",name:"add-circle-outline"})),e("pos-dialog",{key:"a61bf93754ca323fbc23137956a00c39be81cad9",ref:t=>this.dialog=t},e("span",{key:"a4095e3c9ddd26e18ce002a05ef65d8895894589",slot:"title"},"Add a new thing"),e("pos-new-thing-form",{key:"136cfbbab823f5abc313642e1dc04f67d5d81777",slot:"content",referenceUri:this.referenceUri})))}};Ie.style=Ce;const je=localStorage.getItem("settings");const Se=je?JSON.parse(je):{offlineCache:false};const _e=G(Se);De();Le();function De(){_e.on("set",(()=>{const t=JSON.stringify(_e.state);localStorage.setItem("settings",t)}))}function Le(){window.addEventListener("storage",(t=>{if(t.key==="settings"&&t.newValue){const e=JSON.parse(t.newValue);_e.state.offlineCache=e.offlineCache}}))}const Te=(t,e)=>e.some((e=>t instanceof e));let Pe;let Oe;function Be(){return Pe||(Pe=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function $e(){return Oe||(Oe=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Me=new WeakMap;const Xe=new WeakMap;const Ee=new WeakMap;function Ae(t){const e=new Promise(((e,r)=>{const n=()=>{t.removeEventListener("success",i);t.removeEventListener("error",o)};const i=()=>{e(He(t.result));n()};const o=()=>{r(t.error);n()};t.addEventListener("success",i);t.addEventListener("error",o)}));Ee.set(e,t);return e}function We(t){if(Me.has(t))return;const e=new Promise(((e,r)=>{const n=()=>{t.removeEventListener("complete",i);t.removeEventListener("error",o);t.removeEventListener("abort",o)};const i=()=>{e();n()};const o=()=>{r(t.error||new DOMException("AbortError","AbortError"));n()};t.addEventListener("complete",i);t.addEventListener("error",o);t.addEventListener("abort",o)}));Me.set(t,e)}let Ue={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Me.get(t);if(e==="store"){return r.objectStoreNames[1]?undefined:r.objectStore(r.objectStoreNames[0])}}return He(t[e])},set(t,e,r){t[e]=r;return true},has(t,e){if(t instanceof IDBTransaction&&(e==="done"||e==="store")){return true}return e in t}};function Re(t){Ue=t(Ue)}function Ye(t){if($e().includes(t)){return function(...e){t.apply(Ne(this),e);return He(this.request)}}return function(...e){return He(t.apply(Ne(this),e))}}function Fe(t){if(typeof t==="function")return Ye(t);if(t instanceof IDBTransaction)We(t);if(Te(t,Be()))return new Proxy(t,Ue);return t}function He(t){if(t instanceof IDBRequest)return Ae(t);if(Xe.has(t))return Xe.get(t);const e=Fe(t);if(e!==t){Xe.set(t,e);Ee.set(e,t)}return e}const Ne=t=>Ee.get(t);function Ge(t,e,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const s=indexedDB.open(t,e);const a=He(s);if(n){s.addEventListener("upgradeneeded",(t=>{n(He(s.result),t.oldVersion,t.newVersion,He(s.transaction),t)}))}if(r){s.addEventListener("blocked",(t=>r(t.oldVersion,t.newVersion,t)))}a.then((t=>{if(o)t.addEventListener("close",(()=>o()));if(i){t.addEventListener("versionchange",(t=>i(t.oldVersion,t.newVersion,t)))}})).catch((()=>{}));return a}const Ke=["get","getKey","getAll","getAllKeys","count"];const qe=["put","add","delete","clear"];const Ve=new Map;function Ze(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e==="string")){return}if(Ve.get(e))return Ve.get(e);const r=e.replace(/FromIndex$/,"");const n=e!==r;const i=qe.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||Ke.includes(r))){return}const o=async function(t,...e){const o=this.transaction(t,i?"readwrite":"readonly");let s=o.store;if(n)s=s.index(e.shift());return(await Promise.all([s[r](...e),i&&o.done]))[0]};Ve.set(e,o);return o}Re((t=>({...t,get:(e,r,n)=>Ze(e,r)||t.get(e,r,n),has:(e,r)=>!!Ze(e,r)||t.has(e,r)})));const Je=["continue","continuePrimaryKey","advance"];const Qe={};const tr=new WeakMap;const er=new WeakMap;const rr={get(t,e){if(!Je.includes(e))return t[e];let r=Qe[e];if(!r){r=Qe[e]=function(...t){tr.set(this,er.get(this)[e](...t))}}return r}};async function*nr(...t){let e=this;if(!(e instanceof IDBCursor)){e=await e.openCursor(...t)}if(!e)return;e=e;const r=new Proxy(e,rr);er.set(r,e);Ee.set(r,Ne(e));while(e){yield r;e=await(tr.get(r)||e.continue());tr.delete(r)}}function ir(t,e){return e===Symbol.asyncIterator&&Te(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Te(t,[IDBIndex,IDBObjectStore])}Re((t=>({...t,get(e,r,n){if(ir(e,r))return nr;return t.get(e,r,n)},has(e,r){return ir(e,r)||t.has(e,r)}})));class or{constructor(){this.dbPromise=Ge("OfflineCacheDB",1,{upgrade(t){if(!t.objectStoreNames.contains("documents")){const e=t.createObjectStore("documents",{keyPath:"url"});e.createIndex("url-revision",["url","revision"])}}})}async clear(){const t=await this.dbPromise;return t.clear("documents")}async get(t){const e=await this.dbPromise;return await e.get("documents",t)}async put(t){const e=await this.dbPromise;const r=await e.getFromIndex("documents","url-revision",[t.url,t.revision]);if(r){return}await e.put("documents",t)}}class sr{isOnline(){return navigator.onLine}}const ar=t=>new V({offlineCache:t.offlineCache?new or:new Z,onlineStatus:new sr});function cr(t){return typeof t==="function"}function lr(t){const e=t=>{Error.call(t);t.stack=(new Error).stack};const r=t(e);r.prototype=Object.create(Error.prototype);r.prototype.constructor=r;return r}const dr=lr((t=>function e(r){t(this);this.message=r?`${r.length} errors occurred during unsubscription:\n${r.map(((t,e)=>`${e+1}) ${t.toString()}`)).join("\n ")}`:"";this.name="UnsubscriptionError";this.errors=r}));function hr(t,e){if(t){const r=t.indexOf(e);0<=r&&t.splice(r,1)}}class ur{constructor(t){this.initialTeardown=t;this.closed=false;this._parentage=null;this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=true;const{_parentage:e}=this;if(e){this._parentage=null;if(Array.isArray(e)){for(const t of e){t.remove(this)}}else{e.remove(this)}}const{initialTeardown:r}=this;if(cr(r)){try{r()}catch(e){t=e instanceof dr?e.errors:[e]}}const{_finalizers:n}=this;if(n){this._finalizers=null;for(const e of n){try{fr(e)}catch(e){t=t!==null&&t!==void 0?t:[];if(e instanceof dr){t=[...t,...e.errors]}else{t.push(e)}}}}if(t){throw new dr(t)}}}add(t){var e;if(t&&t!==this){if(this.closed){fr(t)}else{if(t instanceof ur){if(t.closed||t._hasParent(this)){return}t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}}}_hasParent(t){const{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){const{_parentage:e}=this;if(e===t){this._parentage=null}else if(Array.isArray(e)){hr(e,t)}}remove(t){const{_finalizers:e}=this;e&&hr(e,t);if(t instanceof ur){t._removeParent(this)}}}ur.EMPTY=(()=>{const t=new ur;t.closed=true;return t})();const br=ur.EMPTY;function pr(t){return t instanceof ur||t&&"closed"in t&&cr(t.remove)&&cr(t.add)&&cr(t.unsubscribe)}function fr(t){if(cr(t)){t()}else{t.unsubscribe()}}const gr={onUnhandledError:null,onStoppedNotification:null,Promise:undefined,useDeprecatedSynchronousErrorHandling:false,useDeprecatedNextContext:false};const mr={setTimeout(t,e,...r){const{delegate:n}=mr;if(n===null||n===void 0?void 0:n.setTimeout){return n.setTimeout(t,e,...r)}return setTimeout(t,e,...r)},clearTimeout(t){const{delegate:e}=mr;return((e===null||e===void 0?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:undefined};function vr(t){mr.setTimeout((()=>{const{onUnhandledError:e}=gr;if(e){e(t)}else{throw t}}))}function yr(){}const wr=(()=>zr("C",undefined,undefined))();function xr(t){return zr("E",undefined,t)}function kr(t){return zr("N",t,undefined)}function zr(t,e,r){return{kind:t,value:e,error:r}}let Cr=null;function Ir(t){if(gr.useDeprecatedSynchronousErrorHandling){const e=!Cr;if(e){Cr={errorThrown:false,error:null}}t();if(e){const{errorThrown:t,error:e}=Cr;Cr=null;if(t){throw e}}}else{t()}}class jr extends ur{constructor(t){super();this.isStopped=false;if(t){this.destination=t;if(pr(t)){t.add(this)}}else{this.destination=Br}}static create(t,e,r){return new Lr(t,e,r)}next(t){if(this.isStopped){Or(kr(t),this)}else{this._next(t)}}error(t){if(this.isStopped){Or(xr(t),this)}else{this.isStopped=true;this._error(t)}}complete(){if(this.isStopped){Or(wr,this)}else{this.isStopped=true;this._complete()}}unsubscribe(){if(!this.closed){this.isStopped=true;super.unsubscribe();this.destination=null}}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Sr=Function.prototype.bind;function _r(t,e){return Sr.call(t,e)}class Dr{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next){try{e.next(t)}catch(t){Tr(t)}}}error(t){const{partialObserver:e}=this;if(e.error){try{e.error(t)}catch(t){Tr(t)}}else{Tr(t)}}complete(){const{partialObserver:t}=this;if(t.complete){try{t.complete()}catch(t){Tr(t)}}}}class Lr extends jr{constructor(t,e,r){super();let n;if(cr(t)||!t){n={next:t!==null&&t!==void 0?t:undefined,error:e!==null&&e!==void 0?e:undefined,complete:r!==null&&r!==void 0?r:undefined}}else{let e;if(this&&gr.useDeprecatedNextContext){e=Object.create(t);e.unsubscribe=()=>this.unsubscribe();n={next:t.next&&_r(t.next,e),error:t.error&&_r(t.error,e),complete:t.complete&&_r(t.complete,e)}}else{n=t}}this.destination=new Dr(n)}}function Tr(t){{vr(t)}}function Pr(t){throw t}function Or(t,e){const{onStoppedNotification:r}=gr;r&&mr.setTimeout((()=>r(t,e)))}const Br={closed:true,next:yr,error:Pr,complete:yr};const $r=(()=>typeof Symbol==="function"&&Symbol.observable||"@@observable")();function Mr(t){return t}function Xr(t){if(t.length===0){return Mr}if(t.length===1){return t[0]}return function e(r){return t.reduce(((t,e)=>e(t)),r)}}class Er{constructor(t){if(t){this._subscribe=t}}lift(t){const e=new Er;e.source=this;e.operator=t;return e}subscribe(t,e,r){const n=Ur(t)?t:new Lr(t,e,r);Ir((()=>{const{operator:t,source:e}=this;n.add(t?t.call(n,e):e?this._subscribe(n):this._trySubscribe(n))}));return n}_trySubscribe(t){try{return this._subscribe(t)}catch(e){t.error(e)}}forEach(t,e){e=Ar(e);return new e(((e,r)=>{const n=new Lr({next:e=>{try{t(e)}catch(t){r(t);n.unsubscribe()}},error:r,complete:e});this.subscribe(n)}))}_subscribe(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)}[$r](){return this}pipe(...t){return Xr(t)(this)}toPromise(t){t=Ar(t);return new t(((t,e)=>{let r;this.subscribe((t=>r=t),(t=>e(t)),(()=>t(r)))}))}}Er.create=t=>new Er(t);function Ar(t){var e;return(e=t!==null&&t!==void 0?t:gr.Promise)!==null&&e!==void 0?e:Promise}function Wr(t){return t&&cr(t.next)&&cr(t.error)&&cr(t.complete)}function Ur(t){return t&&t instanceof jr||Wr(t)&&pr(t)}function Rr(t){return cr(t===null||t===void 0?void 0:t.lift)}function Yr(t){return e=>{if(Rr(e)){return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}))}throw new TypeError("Unable to lift unknown Observable type")}}function Fr(t,e,r,n,i){return new Hr(t,e,r,n,i)}class Hr extends jr{constructor(t,e,r,n,i,o){super(t);this.onFinalize=i;this.shouldUnsubscribe=o;this._next=e?function(r){try{e(r)}catch(e){t.error(e)}}:super._next;this._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:super._error;this._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:e}=this;super.unsubscribe();!e&&((t=this.onFinalize)===null||t===void 0?void 0:t.call(this))}}}const Nr=lr((t=>function e(){t(this);this.name="ObjectUnsubscribedError";this.message="object unsubscribed"}));class Gr extends Er{constructor(){super();this.closed=false;this.currentObservers=null;this.observers=[];this.isStopped=false;this.hasError=false;this.thrownError=null}lift(t){const e=new Kr(this,this);e.operator=t;return e}_throwIfClosed(){if(this.closed){throw new Nr}}next(t){Ir((()=>{this._throwIfClosed();if(!this.isStopped){if(!this.currentObservers){this.currentObservers=Array.from(this.observers)}for(const e of this.currentObservers){e.next(t)}}}))}error(t){Ir((()=>{this._throwIfClosed();if(!this.isStopped){this.hasError=this.isStopped=true;this.thrownError=t;const{observers:e}=this;while(e.length){e.shift().error(t)}}}))}complete(){Ir((()=>{this._throwIfClosed();if(!this.isStopped){this.isStopped=true;const{observers:t}=this;while(t.length){t.shift().complete()}}}))}unsubscribe(){this.isStopped=this.closed=true;this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){this._throwIfClosed();return super._trySubscribe(t)}_subscribe(t){this._throwIfClosed();this._checkFinalizedStatuses(t);return this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:e,isStopped:r,observers:n}=this;if(e||r){return br}this.currentObservers=null;n.push(t);return new ur((()=>{this.currentObservers=null;hr(n,t)}))}_checkFinalizedStatuses(t){const{hasError:e,thrownError:r,isStopped:n}=this;if(e){t.error(r)}else if(n){t.complete()}}asObservable(){const t=new Er;t.source=this;return t}}Gr.create=(t,e)=>new Kr(t,e);class Kr extends Gr{constructor(t,e){super();this.destination=t;this.source=e}next(t){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.next)===null||r===void 0?void 0:r.call(e,t)}error(t){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.error)===null||r===void 0?void 0:r.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0?void 0:e.call(t)}_subscribe(t){var e,r;return(r=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&r!==void 0?r:br}}function qr(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n["throw"](t))}catch(t){o(t)}}function c(t){t.done?r(t.value):i(t.value).then(s,a)}c((n=n.apply(t,e||[])).next())}))}function Vr(t){var e=typeof Symbol==="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&n>=t.length)t=void 0;return{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Zr(t){return this instanceof Zr?(this.v=t,this):new Zr(t)}function Jr(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(t){if(n[t])i[t]=function(e){return new Promise((function(r,n){o.push([t,e,r,n])>1||a(t,e)}))}}function a(t,e){try{c(n[t](e))}catch(t){h(o[0][3],t)}}function c(t){t.value instanceof Zr?Promise.resolve(t.value.v).then(l,d):h(o[0][2],t)}function l(t){a("next",t)}function d(t){a("throw",t)}function h(t,e){if(t(e),o.shift(),o.length)a(o[0][0],o[0][1])}}function Qr(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Vr==="function"?Vr(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(e){r[e]=t[e]&&function(r){return new Promise((function(n,o){r=t[e](r),i(n,o,r.done,r.value)}))}}function i(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)}}typeof SuppressedError==="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};const tn=t=>t&&typeof t.length==="number"&&typeof t!=="function";function en(t){return cr(t===null||t===void 0?void 0:t.then)}function rn(t){return cr(t[$r])}function nn(t){return Symbol.asyncIterator&&cr(t===null||t===void 0?void 0:t[Symbol.asyncIterator])}function on(t){return new TypeError(`You provided ${t!==null&&typeof t==="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function sn(){if(typeof Symbol!=="function"||!Symbol.iterator){return"@@iterator"}return Symbol.iterator}const an=sn();function cn(t){return cr(t===null||t===void 0?void 0:t[an])}function ln(t){return Jr(this,arguments,(function*e(){const r=t.getReader();try{while(true){const{value:t,done:e}=yield Zr(r.read());if(e){return yield Zr(void 0)}yield yield Zr(t)}}finally{r.releaseLock()}}))}function dn(t){return cr(t===null||t===void 0?void 0:t.getReader)}function hn(t){if(t instanceof Er){return t}if(t!=null){if(rn(t)){return un(t)}if(tn(t)){return bn(t)}if(en(t)){return pn(t)}if(nn(t)){return gn(t)}if(cn(t)){return fn(t)}if(dn(t)){return mn(t)}}throw on(t)}function un(t){return new Er((e=>{const r=t[$r]();if(cr(r.subscribe)){return r.subscribe(e)}throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function bn(t){return new Er((e=>{for(let r=0;r<t.length&&!e.closed;r++){e.next(t[r])}e.complete()}))}function pn(t){return new Er((e=>{t.then((t=>{if(!e.closed){e.next(t);e.complete()}}),(t=>e.error(t))).then(null,vr)}))}function fn(t){return new Er((e=>{for(const r of t){e.next(r);if(e.closed){return}}e.complete()}))}function gn(t){return new Er((e=>{vn(t,e).catch((t=>e.error(t)))}))}function mn(t){return gn(ln(t))}function vn(t,e){var r,n;var i,o;return qr(this,void 0,void 0,(function*(){try{for(r=Qr(t);n=yield r.next(),!n.done;){const t=n.value;e.next(t);if(e.closed){return}}}catch(t){i={error:t}}finally{try{if(n&&!n.done&&(o=r.return))yield o.call(r)}finally{if(i)throw i.error}}e.complete()}))}function yn(t){return Yr(((e,r)=>{hn(t).subscribe(Fr(r,(()=>r.complete()),yr));!r.closed&&e.subscribe(r)}))}const wn=class{constructor(e){t(this,e);this.sessionRestoredEmitter=a(this,"pod-os:session-restored",7);this.restorePreviousSession=false;this.disconnected$=new Gr}componentWillLoad(){this.unsubscribeSettings=_e.on("set",(()=>{this.os=ar(_e.state)}));this.os=ar(_e.state);this.os.onSessionRestore((t=>{this.sessionRestoredEmitter.emit({url:t})}));this.os.handleIncomingRedirect(this.restorePreviousSession);this.os.observeSession().pipe(yn(this.disconnected$)).subscribe((async t=>{K.state.webId=t.webId;if(t.isLoggedIn){const e=await this.os.fetchProfile(t.webId);K.state.profile=e}K.state.isLoggedIn=t.isLoggedIn}))}disconnectedCallback(){this.unsubscribeSettings();this.disconnected$.next();this.disconnected$.unsubscribe()}async initializeOs(t){t.stopPropagation();t.detail(this.os)}async loadModule(t){t.stopPropagation();if(t.detail.module==="contacts"){const e=await this.os.loadContactsModule();t.detail.receiver(e)}else{throw Error(`Unknown module "${t.detail.module}"`)}}render(){return e("slot",{key:"3f14b8dbdd3c739e99918b30937e5b049a6fba6f"})}};const xn="pos-router{margin:0;padding:0;display:flex;flex-direction:column;height:100%}pos-navigation-bar{max-width:var(--width-lg);margin:0}pos-add-new-thing,pos-login{flex:0 1 auto;}header,footer{display:flex;gap:var(--size-1);height:auto;justify-content:center;align-items:center;padding:var(--size-1)}footer svg{width:var(--size-5);height:var(--size-5)}footer{font-size:var(--scale-fluid-000)}header{flex-wrap:wrap;padding:0 var(--size-8)}main{flex:1;max-height:100vh;overflow:auto}@media (max-width: 640px){header{padding:0 var(--size-1) var(--size-1);justify-content:space-between}pos-navigation-bar{flex-basis:100%;order:0}pos-add-new-thing,pos-login{order:1}}";const kn=xn;const zn=class{constructor(e){t(this,e);this.restorePreviousSession=false;this.mode="standalone";this.uri=""}render(){return e(r,{key:"50b6e91f4e98be29cfa37552eb799883aeb49c9e"},e("pos-app",{key:"652617d5eaf3653caeb58b9e93dff09810a587a3",restorePreviousSession:this.restorePreviousSession},e("pos-error-toast",{key:"f4a29b30c2a4caece50c0da046426bc50a3b402e"},e("pos-router",{key:"d3f2307db47406c4d84c9b27ac767d263ae81c32",mode:this.mode,"onPod-os:route-changed":t=>this.uri=t.detail},e("header",{key:"521c8469dae209a27780d62a5922f8a15d393e07"},e("pos-add-new-thing",{key:"2fdd9716da4b3590fb0983a4b50f8c63eca26dce",referenceUri:this.uri}),e("pos-navigation-bar",{key:"6add9651de9ff5ca8496470c0df1341927683001",uri:this.uri==="pod-os:dashboard"?"":this.uri}),e("pos-login",{key:"87a60cc03fc63a2ca68b294726e7e44a09bdc835"})),e("main",{key:"dd2b3de09ca7f8957b240b030cafeeac37e76c1b"},this.uri.startsWith("pod-os:")?e("pos-internal-router",{uri:this.uri}):e("pos-resource",{key:this.uri,uri:this.uri},e("pos-type-router",null))),e("footer",{key:"ea1444713656c8740d81c5ac777b72bb6e287729"},e(Cn,{key:"1bba3eec9e30c30f9132a6524e00ec212169f402"}),e("span",{key:"3b38a5e1704559f271075b60a27d8334f41a09dc"},"PodOS Browser"))))))}};const Cn=()=>e("svg",{viewBox:"0 0 400 400",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M50 350 L50 100 L200 50 L350 100 L350 350 Z",style:{fill:"#008BF8",stroke:"#008BF8","stroke-width":"70"},"stroke-linejoin":"round"}),e("path",{d:"M100 300 L100 150 L200 120 L300 150 L300 300 L130 300 L130 370 L100 370Z",style:{fill:"white",stroke:"white","stroke-width":"45"},"stroke-linejoin":"round"}),e("path",{d:"M150 250 L150 200 L200 180 L250 200 L250 250 Z",style:{fill:"#DC0073",stroke:"#DC0073","stroke-width":"20"},"stroke-linejoin":"round"}));zn.style=kn;const In=":host{display:grid;grid-template-columns:repeat(auto-fit, minmax(var(--size-12), var(--size-96)));gap:var(--size-4);padding:var(--size-2);justify-content:center;align-items:start;justify-items:stretch;height:100%;background:linear-gradient(230deg, rgb(251, 251, 255) 0%, rgb(215, 223, 252) 100%)}";const jn=In;const Sn=class{constructor(e){t(this,e)}render(){return e(r,{key:"238188758d52f7a78180d9dcacf52f64d07990c4"},e("pos-getting-started",{key:"da58685fcdbe522a442675d93270fbd553a8c5db"}),e("pos-example-resources",{key:"538845ab6065040e89abb9fdac166f01e5bfa7b4"}))}};Sn.style=jn;const _n=class{constructor(e){t(this,e);this.subscribeResource=a(this,"pod-os:resource",7);this.receiveResource=t=>{this.resource=t}}componentWillLoad(){Q(this)}render(){return this.resource?this.resource.description():null}};const Dn="dialog{background-color:var(--pos-background-color);border:none;border-radius:var(--radius-md);box-shadow:var(--shadow-md);max-width:var(--width-xs)}dialog header>:first-child{flex-grow:1;font-weight:var(--weight-light);font-size:var(--scale-2);font-family:var(--font-sans);margin:0}dialog header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:var(--scale-0);border-bottom-style:inset;padding:0 0 var(--scale-0) 0}dialog>:last-child{display:block;margin-top:var(--scale-3)}button#close{cursor:pointer;display:flex;align-items:center;justify-content:center;border:none;background:none;font-size:var(--scale-3);color:var(--color-grey-500)}button#close:hover{color:var(--color-grey-800)}";const Ln=Dn;const Tn=class{constructor(e){t(this,e)}async showModal(){this.dialog.showModal()}async close(){this.dialog.close()}render(){return e(r,{key:"c225a4ac0e04d0a71fdb0b98c6b2ec8619f465b2"},e("dialog",{key:"ca442886d0651fce3b9b565dba18a6bda30750cd",ref:t=>this.dialog=t},e("header",{key:"5589443a2551bb8ed14870bacdbaaf0b93b0cfe2"},e("slot",{key:"abad20ea1a223ad2229bebcca6c7f3fe09ee4d05",name:"title"}),e("button",{key:"2da0f8dfc03a15c90dc099ee824369564ac12d72",tabindex:-1,id:"close",title:"Close",onClick:()=>this.close()},e("ion-icon",{key:"bab7a9b15ebbec354e84aab7a84ca34a01e62600",name:"close-outline"}))),e("slot",{key:"51978d27aef2308e0b66374087543705f0ac391c",name:"content"})))}};Tn.style=Ln;const Pn=class{constructor(e){t(this,e)}async unhandledRejection(t){t.stopPropagation();console.error("unhandled promise rejection",t);await this.showToast(t.reason.toString())}async catchError(t){t.stopPropagation();console.error(t.detail);await this.showToast(t.detail.message)}async showToast(t){const e=await Y.create({message:t,duration:1e4,position:"top",color:"danger",buttons:[{text:"Dismiss",role:"cancel"}]});await e.present()}render(){return e(r,{key:"108f76bbf1a26f62b83fb0cb85d1a0398b8cd566"},e("ion-toast",{key:"08615e6219562b778e7116ee76a6ced96319d81f",trigger:"never",message:"Workarround to preload ion-toast and ion-ripple-effect to be able to show errors while offline",duration:0},e("ion-ripple-effect",{key:"39ce063f4a5e5b0ba19de083f8dbf576b76cc184"})),e("slot",{key:"2342676074dbaffdc5e420756ebda0b1841ea5d1"}))}};const On=":host{border:var(--size-px) solid var(--color-grey-100);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--color-white)}.links{display:flex;flex-direction:column;gap:var(--size-3);max-width:80vw}";const Bn=On;const $n=class{constructor(e){t(this,e)}render(){return e(r,{key:"85fd8b16422fb57ad1414804d7cc2c86eee39d02"},e("div",{key:"d446af3cc59ce0b9d372a37650618686aa48b8fb"},e("h2",{key:"3000fbd901554640126f7d6880d56d1bef9ed241"},"Try these... 💡"),e("p",{key:"c89defab8e6e2e7a617898f163ed7234249727d2"},"No idea where to start? Try these example resources, and follow your nose 👃"),e("div",{key:"bc9ed67f429ea468c53b591390b7fba1674b0b7d",class:"links"},e("pos-rich-link",{key:"a5fd0f04c539c2654198a0d825fbb2da891e0d14",uri:"https://pod-os.solidcommunity.net/profile/card#me"}),e("pos-rich-link",{key:"0b8dc4abeecbb4cc0f2d8957aa6e43f6877d84d0",uri:"https://angelo.veltens.org/profile/card#me"}),e("pos-rich-link",{key:"628bd8639c706134274ee3c1cd14616664ba9552",uri:"https://angelo.veltens.org/public/bookmarks"}),e("pos-rich-link",{key:"91efe195ccc2567428ea978390a9845d22beda5e",uri:"https://solidos.solidcommunity.net/profile/card#me"}))))}};$n.style=Bn;const Mn=":host{border:var(--size-px) solid var(--color-grey-100);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--color-white)}.question{font-weight:var(--weight-semibold);color:var(--color-grey-900)}a{font-weight:var(--weight-bold);color:var(--pos-primary-color)}";const Xn=Mn;const En=class{constructor(e){t(this,e)}render(){return e(r,{key:"2347ea586342456767e9aba2b30debbd86e0b37e"},e("div",{key:"33da44a3cd289b08384b17933c16cef8063a87e2"},e("h2",{key:"7b08c85b665db29d7d0ceaea5bce32b975180300"},"Getting started 🚀"),e("p",{key:"b582fad4e229353edfe5286a417ed544f8a08659"},"🔎 Enter a URL into the above navigation bar to browse through the web of data. "),e("p",{key:"95a42fe1be9e27e03e1bf1beb9a359720dbfef8a"},"🔐 Sign in to access private resources on your Solid Pod or those of your friends or coworkers.")),e("div",{key:"be49077a2032e6208fbfc8c170ec2a4f2151d792"},e("p",{key:"15ebacbf46ab241c0001aa6df011612e27b14657",class:"question"},"New to Solid?"),e("p",{key:"41366fc5e73c5df8b07dc39236d781f9bdb16a2e"},e("a",{key:"35d1572cf1db045759434e3783c02cac98954c91",href:"https://solidproject.org/for-developers#hosted-pod-services"},"Get a Pod →"))),e("div",{key:"2c4a4d8b7f2a0aded70c541f4b511b96150c4fd4"},e("p",{key:"3a1f2bc0640b9c7a553063d4886d22eee41af0f9",class:"question"},"Want to dig deeper into PodOS?"),e("p",{key:"ec76e0f2dd6feff49ecac2d5bc51d27635412bcc"},e("a",{key:"5c49f338c15f0e9941e3929f5a81baa6521bbb1a",href:"http://pod-os.org"},"Learn more →"))))}};En.style=Xn;const An=":host{display:flex;background-size:cover;background-repeat:no-repeat;background-position:center;border-radius:inherit}img,ion-skeleton-text,div.error{border-radius:var(--border-radius);width:var(--width);height:var(--height);max-width:var(--max-width);max-height:var(--max-height);object-fit:var(--object-fit)}img{backdrop-filter:var(--blur-xl)}.error{display:flex;opacity:0.8;background:repeating-linear-gradient(-45deg, rgba(150, 0, 0, 0.1), rgba(150, 0, 0, 0.1) 10px, #fff 5px, #fff 25px);flex-direction:column;border:1px solid red;color:black;align-items:center;justify-content:center;word-break:break-all;padding:1rem;box-sizing:border-box}.error ion-icon{color:#282828;--ionicon-stroke-width:calc(var(--width) / 5);font-size:calc(var(--width) / 2)}a.error{text-decoration:none;width:var(--width);height:var(--height)}.code{font-weight:bold;font-size:calc(var(--width) / 8)}.text{font-size:calc(var(--width) / 20)}";const Wn=An;const Un=class{constructor(e){t(this,e);this.initializeOsEmitter=a(this,"pod-os:init",7);this.resourceLoadedEmitter=a(this,"pod-os:resource-loaded",7);this.blurredBackground=false;this.loading=true;this.setOs=async t=>{this.os=t}}componentWillLoad(){K.onChange("isLoggedIn",(()=>this.fetchBlob()));this.initializeOsEmitter.emit(this.setOs)}async fetchBlob(){try{this.loading=true;this.imageError=null;this.networkError=null;this.brokenFile=null;const t=await this.os.fetchFile(this.src);this.resourceLoadedEmitter.emit(this.src);if(t.blob()){this.dataUri=URL.createObjectURL(t.blob())}else{this.brokenFile=t}}catch(t){this.networkError=t}finally{this.loading=false}}onImageError(t){this.networkError=null;this.imageError=t}render(){if(this.loading){return e("ion-skeleton-text",{animated:true})}if(this.networkError){return e("img",{alt:this.alt,src:this.src,onError:t=>this.onImageError(t)})}if(this.brokenFile){return e(q,{file:this.brokenFile})}if(this.imageError){return e("div",{class:"error"},e("a",{href:this.src},this.src))}return e(r,{style:{backgroundImage:this.blurredBackground?`url('${this.dataUri}')`:null}},e("img",{src:this.dataUri,alt:this.alt}))}static get watchers(){return{os:["fetchBlob"],src:["fetchBlob"]}}};Un.style=Wn;const Rn=class{constructor(e){t(this,e);this.uri="pod-os:dashboard"}render(){return e("pos-app-dashboard",{key:"86499010a528a423abf1e090e3d150e23b35fe94"})}};const Yn=class{constructor(e){t(this,e);this.subscribeResource=a(this,"pod-os:resource",7);this.receiveResource=t=>{this.resource=t}}componentWillLoad(){Q(this)}render(){return this.resource?this.resource.label():null}};const Fn=".container{display:flex;align-items:center;gap:var(--size-2)}.user-data{align-items:center;display:inline-flex;gap:10px}.user-data pos-picture{--width:40px;--height:40px;--border-radius:50%}pos-login-form{margin:var(--size-2)}dialog{margin-top:var(--size-10)}button#login,button#logout{outline:none;font-weight:var(--weight-bold);letter-spacing:var(--letter-xl);border:none;box-sizing:border-box;border-radius:var(--radius-xs);padding:var(--size-2);box-shadow:var(--shadow-sm);color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}button#login:focus-within,button#logout:focus-within{outline:var(--pos-input-focus-outline)}button#login:focus,button#login:hover,button#logout:focus,button#logout:hover{filter:brightness(110%);box-shadow:var(--shadow-md)}";const Hn=Fn;const Nn=class{constructor(e){t(this,e);this.initializeOsEmitter=a(this,"pod-os:init",7);this.setOs=async t=>{this.os=t}}componentWillLoad(){this.initializeOsEmitter.emit(this.setOs)}login(t){const e=t.detail;this.os.login(e)}logout(){this.os.logout()}openDialog(){this.dialog.showModal()}render(){return e(r,{key:"f34f5e3aeb266eacf4dd810a1490b844f9d22e93"},e("div",{key:"acade2f70e5f85d318965da083f6390bb822f59d",class:"container"},K.state.isLoggedIn?e("pos-resource",{uri:K.state.webId},e("span",{class:"user-data"},e("pos-picture",null),e("pos-label",null))):"",!K.state.isLoggedIn&&e("button",{key:"f3e4f0c45947dc609a3bfedc1788b9fdb34b6221",id:"login",onClick:()=>this.openDialog()},"Login"),K.state.isLoggedIn&&e("button",{key:"95884aaab84823da0640c4388f8515d6f198611b",id:"logout",onClick:()=>this.logout()},"Logout")),e("pos-dialog",{key:"b24462de3c20d965258809d00462727554eb0793",ref:t=>this.dialog=t},e("span",{key:"665c1e2826eb613e1ea6dbf52119cb1db3d282d7",slot:"title"},"Sign in to your Pod"),e("pos-login-form",{key:"d4440c6e20c04b435df0ecb166bfd1ca2d1e4cdb","onPod-os:idp-url-selected":t=>this.login(t),slot:"content"})))}};Nn.style=Hn;const Gn=":host{display:block;margin:0}form{display:flex;flex-direction:column;gap:var(--size-4)}input{outline:var(--pos-input-outline);padding:var(--scale-000);border:none;border-radius:var(--radius-xs);width:var(--size-full);box-sizing:border-box}input:focus-within{outline:var(--pos-input-focus-outline)}input#login{outline:none;box-shadow:var(--shadow-sm);cursor:pointer;color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}input#login:disabled{cursor:default;color:var(--pos-disabled-text-color);background-color:var(--pos-disabled-color);box-shadow:none}input#login:hover:not(:disabled),input#login:focus{filter:brightness(110%);box-shadow:var(--shadow-md)}";const Kn=Gn;const qn=class{constructor(e){t(this,e);this.idpUrlSelected=a(this,"pod-os:idp-url-selected",7);this.idpUrl="";this.canSubmit=false}validate(){this.canSubmit=Boolean(this.idpUrl)}render(){return e("form",{key:"b56f530a3c5b58f1913157a91e65381814e60b51",method:"dialog",onSubmit:()=>this.handleSubmit()},e("label",{key:"e514bf155967eca4316704ecdffde8128954b3b6",htmlFor:"idpUrl"},"Please enter your Identity Provider"),e("input",{key:"935033a8a131a6b4a8a63985c3871042c73f37a8",id:"idpUrl",type:"url",value:this.idpUrl,required:true,onInput:t=>this.handleChange(t),list:"suggestedIssuers",placeholder:"Type to search..."}),e("datalist",{key:"00465f2bfb2da0595ff28a3ed5d20fd47aef0a54",id:"suggestedIssuers"},e("option",{key:"5bca11f46eb8fa75ddb80d5551c70236399cb3b3",value:"https://solidcommunity.net"},"solidcommunity.net"),e("option",{key:"a981f345eb6cec1c7e4f31c2daa114bf60b565ec",value:"https://solidweb.org"},"solidweb.org"),e("option",{key:"14dd36e212caee188306106b51f69d53443f1b18",value:"https://solidweb.me"},"solidweb.me"),e("option",{key:"8ecbbb6bfa67e0f79f73a5aa82371e2d911cb8a9",value:"https://inrupt.net"},"inrupt.net"),e("option",{key:"3e3031f2900661298db252f43e032513d50cf248",value:"https://login.inrupt.com"},"Inrupt PodSpaces"),e("option",{key:"3ad3d160d9617c3b736ab7ff6bf85722893cc5f2",value:"https://trinpod.us"},"trinpod.us"),e("option",{key:"b4bd09594ece8c1cde23aa0686634212efecff48",value:"https://use.id"},"use.id"),e("option",{key:"17f67470776f2d9fbcd182e9217183750f533407",value:"https://solid.redpencil.io"},"redpencil.io"),e("option",{key:"445ac6fc71cd4a0fa4ed457220baa15563746342",value:"https://datapod.grant.io"},"Data Pod (grant.io)"),e("option",{key:"624b7940eaa4de8ccf98b5b3095fe347d8f4ee3f",value:"https://teamid.live"},"teamid.live")),e("input",{key:"a37444b340c55d475b00af6cfd5cde5559cd1244",id:"login",type:"submit",value:"Login",disabled:!this.canSubmit}))}handleChange(t){this.validate();this.idpUrl=t.target.value}async handleSubmit(){this.idpUrlSelected.emit(this.idpUrl)}static get delegatesFocus(){return true}static get watchers(){return{idpUrl:["validate"]}}};qn.style=Kn;const Vn="button.main {\n display: flex;\n transition:\n width 200ms,\n background-color 500ms,\n color 500ms,\n border-color 500ms;\n max-width: var(--size-40);\n flex-direction: row;\n overflow: hidden;\n height: var(--size-8);\n width: var(--size-8);\n align-items: center;\n justify-content: center;\n border-radius: var(--radius-xs);\n color: var(--color-grey-500);\n border: var(--size-px) dashed var(--color-grey-500);\n background: none;\n\n p {\n padding: 0;\n margin: 0;\n display: none;\n white-space: nowrap;\n }\n\n &.success {\n color: var(--color-green-700);\n border-color: var(--color-green-700);\n border-style: solid;\n background-color: var(--color-green-100);\n }\n\n &:active {\n transform: scale(0.99);\n filter: brightness(90%);\n }\n}\n\n.options {\n position: absolute;\n animation: fadeIn 300ms;\n padding: 0;\n margin-top: var(--size-1);\n z-index: var(--layer-top);\n\n ol {\n display: flex;\n flex-direction: column;\n box-shadow: var(--shadow-md);\n backdrop-filter: var(--blur-md);\n border-radius: var(--radius-xs);\n overflow: hidden;\n background-color: var(--color-grey-200);\n padding: 0;\n margin: 0;\n list-style: none;\n label {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n transition: all 300ms var(--ease-in-out-sine);\n margin: 0;\n border: none;\n outline: none;\n padding: var(--size-2);\n width: var(--size-full);\n\n &:hover,\n &:focus {\n filter: brightness(80%);\n }\n\n &:active {\n filter: brightness(90%);\n }\n }\n }\n label:has(input:checked) {\n background-color: var(--color-green-100);\n }\n}\n\nsvg {\n display: inline-block;\n height: var(--size-6);\n flex-shrink: 0;\n flex-grow: 0;\n width: var(--size-6);\n}\n\nbutton.main:hover,\nbutton.open {\n &.success {\n background: var(--color-green-200);\n }\n width: var(--size-full);\n height: var(--size-8);\n background: var(--color-grey-200);\n color: var(--color-grey-700);\n\n p {\n display: inline-block;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n";const Zn=Vn;const Jn=class{constructor(e){t(this,e);this.subscribePodOs=a(this,"pod-os:init",7);this.errorEmitter=a(this,"pod-os:error",7);this.indexUpdatedEmitter=a(this,"pod-os:search:index-updated",7);this.indexCreatedEmitter=a(this,"pod-os:search:index-created",7);this.indexes=[];this.showOptions=false;this.isIndexed=false;this.receivePodOs=async t=>{this.os=t;this.thing=this.os.store.get(this.uri);this.getLabelIndexes(K.state.profile);this.unsubscribeSessionChange=K.onChange("profile",(t=>{this.getLabelIndexes(t)}))}}componentWillLoad(){tt(this)}disconnectedCallback(){this.unsubscribeSessionChange&&this.unsubscribeSessionChange()}hideOptions(t){if(!this.el.contains(t.target)){this.showOptions=false}}handleKeyDown(t){if(t.key==="Escape"){this.showOptions=false}}updateUri(t){this.thing=this.os.store.get(t);this.isIndexed=this.checkIfIndexed(t)}checkIfIndexed(t){return this.indexes.some((e=>e.contains(t)))}getLabelIndexes(t){if(t){this.indexes=t.getPrivateLabelIndexes().map((t=>this.os.store.get(t).assume(J)));this.isIndexed=this.checkIfIndexed(this.uri)}}async onClick(t){t.preventDefault();if(this.indexes.length===1){const t=this.indexes[0];await this.addToLabelIndex(t);this.indexUpdatedEmitter.emit(t)}else if(this.indexes.length>1){this.showOptions=!this.showOptions}else{const t=await this.createDefaultLabelIndex();await this.addToLabelIndex(t);this.indexCreatedEmitter.emit(t)}}async addToLabelIndex(t){try{await this.os.addToLabelIndex(this.thing,t);this.isIndexed=true}catch(t){this.errorEmitter.emit(t)}this.showOptions=false}async createDefaultLabelIndex(){try{return await this.os.createDefaultLabelIndex(K.state.profile)}catch(t){this.errorEmitter.emit(t)}}render(){if(!K.state.isLoggedIn||!this.uri){return null}const t="Make this findable";return e(r,null,e("button",{type:"button","aria-label":t,class:{main:true,open:this.showOptions,success:this.isIndexed},onClick:t=>this.onClick(t),title:""},this.isIndexed?e(ti,null):e(Qn,null),e("p",null,t)),this.showOptions&&e("div",{class:"options"},e("ol",{role:"listbox"},this.indexes.map((t=>e("li",{role:"option"},e("label",null,e("input",{type:"checkbox",checked:t.contains(this.uri),onChange:e=>this.chooseOption(e,t)}),e("pos-resource",{uri:t.uri,lazy:true},e("pos-label",null)))))))))}async chooseOption(t,e){t.preventDefault();await this.addToLabelIndex(e);this.indexUpdatedEmitter.emit(e)}get el(){return n(this)}static get watchers(){return{uri:["updateUri"]}}};const Qn=()=>e("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m5.231 13.481L15 17.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v16.5c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm3.75 11.625a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"}));const ti=()=>e("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12"}));Jn.style=Zn;const ei=":host {\n}\n\n.suggestions ol {\n border: 1px solid var(--color-grey-200);\n display: flex;\n flex-direction: column;\n position: absolute;\n margin: 0;\n padding: 0;\n z-index: var(--layer-top);\n list-style-type: none;\n box-shadow: var(--shadow-xl);\n}\n\n.suggestions {\n position: relative;\n li {\n padding: 1rem;\n background-color: white;\n pos-rich-link {\n --background-color: inherit;\n }\n &.selected {\n background-color: var(--color-blue);\n &:hover {\n background-color: var(--color-blue-700);\n }\n }\n &:hover {\n background-color: var(--color-grey-200);\n }\n }\n}\n\n.suggestions li.selected pos-rich-link {\n --label-color: white;\n --description-color: var(--color-grey-200);\n --uri-color: var(--color-grey-200);\n}\n\nion-searchbar {\n width: 100%;\n}\n\nform {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.bar {\n flex-grow: 1;\n}\n";const ri=ei;const ni=class{constructor(e){t(this,e);this.subscribePodOs=a(this,"pod-os:init",7);this.linkEmitter=a(this,"pod-os:link",7);this.uri="";this.value=this.uri;this.searchIndex=undefined;this.suggestions=[];this.selectedIndex=-1;this.receivePodOs=async t=>{this.os=t}}componentWillLoad(){tt(this);K.onChange("isLoggedIn",(async t=>{if(t){await this.buildSearchIndex()}else{this.clearSearchIndex()}}))}async buildSearchIndex(){this.searchIndex=await this.os.buildSearchIndex(K.state.profile)}rebuildSearchIndex(){this.searchIndex.rebuild()}clearSearchIndex(){var t;(t=this.searchIndex)===null||t===void 0?void 0:t.clear()}onChange(t){this.value=t.detail.value;this.search()}clearSuggestions(){this.suggestions=[];this.selectedIndex=-1}onClickSelf(t){t.stopPropagation()}handleKeyDown(t){if(t.key==="Escape"){this.clearSuggestions()}else if(t.key==="ArrowDown"){t.preventDefault();this.selectedIndex=Math.min(this.selectedIndex+1,this.suggestions.length-1)}else if(t.key==="ArrowUp"){t.preventDefault();this.selectedIndex=Math.max(this.selectedIndex-1,0)}}search(){if(this.searchIndex){this.suggestions=this.value?this.searchIndex.search(this.value):[]}}onSubmit(t){t.preventDefault();if(this.suggestions&&this.selectedIndex>-1){this.linkEmitter.emit(this.suggestions[this.selectedIndex].ref)}else{this.linkEmitter.emit(this.value)}}render(){return e("form",{key:"dd9594ba41b59dc9e2e5bfd7b85c445d717d7ce8",onSubmit:t=>this.onSubmit(t)},this.searchIndex&&this.uri?e("pos-make-findable",{uri:this.uri}):"",e("div",{key:"294992804e0d26ae2c65b84ffc5622eab3856eed",class:"bar"},e("ion-searchbar",{key:"e769533ee3520ad74284500d329275b630cb50f5",enterkeyhint:"search",placeholder:"Search or enter URI",value:this.uri,debounce:300,onIonChange:t=>this.onChange(t),onIonInput:t=>this.onChange(t)}),this.suggestions.length>0?e("div",{class:"suggestions"},e("ol",null,this.suggestions.map(((t,r)=>e("li",{class:r===this.selectedIndex?"selected":""},e("pos-rich-link",{uri:t.ref})))))):null))}};ni.style=ri;const ii=":host{display:block}form{display:grid;grid-template-columns:var(--size-16) 1fr;grid-gap:var(--scale-0)}label{grid-column:1 / 2;display:flex;align-items:center;justify-content:flex-end}input,pos-select-term,button{grid-column:2 / 3}input,pos-select-term::part(input){outline:var(--pos-input-outline);padding:var(--scale-000);border:none;border-radius:var(--radius-xs);width:var(--size-full);box-sizing:border-box}input:focus-within,pos-select-term::part(input):focus-within{outline:var(--pos-input-focus-outline)}#new-uri{grid-column:1/3;cursor:default;word-break:break-all;color:var(--color-grey-800);font-weight:var(--weight-light);background:var(--color-grey-100);padding:var(--scale-000);border-radius:var(--radius-xs)}input#create{outline:none;box-shadow:var(--shadow-sm);cursor:pointer;color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}input#create:disabled{cursor:default;color:var(--pos-disabled-text-color);background-color:var(--pos-disabled-color);box-shadow:none}input#create:hover:not(:disabled),input#create:focus{filter:brightness(110%);box-shadow:var(--shadow-md)}";const oi=ii;const si=class{constructor(e){t(this,e);this.linkEmitter=a(this,"pod-os:link",7);this.errorEmitter=a(this,"pod-os:error",7);this.subscribePodOs=a(this,"pod-os:init",7);this.canSubmit=false;this.receivePodOs=async t=>{this.os=t}}validate(){this.canSubmit=Boolean(this.name&&this.selectedTypeUri)}componentWillLoad(){tt(this)}render(){return e("form",{key:"1aaa58b08585024ca77bd0362bd6d73a970e6136",method:"dialog",onSubmit:t=>this.handleSubmit(t)},e("label",{key:"c52a11b994de6535592ac7de5d6a568d6ce3ef7b",htmlFor:"type"},"Type"),e("pos-select-term",{key:"24b5fc2409a720b8e5144acd8c27b3eebcef65f6",id:"type",placeholder:"",value:this.selectedTypeUri,"onPod-os:term-selected":t=>this.onTermSelected(t)}),e("label",{key:"4705a74f5ec8e467d0109022224a57bc7393a5dc",htmlFor:"name"},"Name"),e("input",{key:"e25bf94434c5e0d6b7b4e9fb7a77b07b69aa54c7",id:"name",type:"text",value:this.name,onInput:t=>this.handleChange(t)}),this.newUri?e("div",{id:"new-uri",title:"This will be the URI of the new thing"},this.newUri):null,e("input",{key:"83800ff48dbf5732cbfadadd48f64853e8551e26",id:"create",type:"submit",value:"Create",disabled:!this.canSubmit}))}handleChange(t){this.name=t.target.value;this.newUri=this.os.proposeUriForNewThing(this.referenceUri,this.name)}onTermSelected(t){this.selectedTypeUri=t.detail.uri}async handleSubmit(t){try{await this.os.addNewThing(this.newUri,this.name,this.selectedTypeUri);this.linkEmitter.emit(this.newUri);this.reset()}catch(e){t.preventDefault();this.errorEmitter.emit(e)}}reset(){this.name="";this.newUri="";this.selectedTypeUri=""}static get delegatesFocus(){return true}static get watchers(){return{name:["validate"],selectedTypeUri:["validate"]}}};si.style=oi;const ai=":host{--width:300px;--height:300px;--border-radius:var(--border-radius, 0);--object-fit:var(--object-fit, cover)}";const ci=ai;const li=class{constructor(e){t(this,e);this.subscribeResource=a(this,"pod-os:resource",7);this.blurredBackground=false;this.receiveResource=t=>{this.resource=t}}componentWillLoad(){Q(this)}render(){const t=this.resource?this.resource.picture():null;if(!t)return null;return e("pos-image",{blurredBackground:this.blurredBackground,src:t.url,alt:this.resource.label()})}};li.style=ci;const di=class{constructor(e){t(this,e);this.subscribePodOs=a(this,"pod-os:init",7);this.resourceLoadedEmitter=a(this,"pod-os:resource-loaded",7);this.consumers=[];this.lazy=false;this.loading=true;this.receivePodOs=async t=>{this.os=t}}componentWillLoad(){K.onChange("isLoggedIn",(()=>this.loadResource()));tt(this)}async provideResource(t){t.stopPropagation();if(this.resource){t.detail(this.resource)}this.consumers.push(t)}async loadResource(){await this.getResource(!this.lazy)}async fetch(){await this.getResource(true)}async getResource(t=false){try{if(t){this.loading=true;await this.os.fetch(this.uri);this.resourceLoadedEmitter.emit(this.uri)}this.resource=this.os.store.get(this.uri);this.error=null;this.consumers.forEach((t=>{t.detail(this.resource)}))}catch(t){this.error=t}finally{this.loading=false}}render(){if(this.loading){return e("ion-progress-bar",{type:"indeterminate"})}if(this.error){return e("ion-card",null,e("ion-card-header",null,e("p",null,"Sorry, something went wrong"),e("p",null,"Status:",this.error.status),e("details",null,this.error.message)),e("ion-card-content",null,e("p",null,"You can try to open the link outside PodOS:"),e("a",{href:this.uri},this.uri)))}return e("slot",null)}static get watchers(){return{os:["loadResource"],uri:["loadResource"]}}};const hi=":host {\n --background-color: inherit;\n --label-color: var(--color-grey-900);\n --description-color: var(--color-grey-900);\n --uri-color: var(--color-grey-600);\n --font-family: var(--font-sans);\n}\n\np.content {\n background-color: var(--background-color);\n line-height: var(--line-xs);\n margin: 0;\n display: flex;\n flex-direction: column;\n align-items: baseline;\n gap: var(--size-1);\n\n .url {\n font-size: var(--scale-fluid-1);\n color: var(--color-grey-500);\n }\n}\n\na {\n color: var(--label-color);\n max-width: var(--prose-lg);\n text-decoration: underline;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n text-decoration-thickness: var(--size-px);\n}\n\npos-label {\n color: var(--label-color);\n font-size: var(--scale-fluid-2);\n margin-bottom: var(--size-1);\n}\n\npos-description {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n font-weight: var(--weight-light);\n color: var(--description-color);\n font-size: var(--scale-fluid-2);\n}\n\n@media (min-width: 640px) {\n pos-label {\n font-size: var(--scale-fluid-0);\n }\n pos-description {\n font-size: var(--scale-fluid-1);\n }\n\n p.content {\n .url {\n font-size: var(--scale-fluid-000);\n }\n }\n}\n";const ui=hi;const bi=class{constructor(e){t(this,e);this.linkEmitter=a(this,"pod-os:link",7)}render(){return e("pos-resource",{key:"e1c942a2aa1e8a9526476bd6fa93233d718354ca",lazy:true,uri:this.uri},e("p",{key:"a5f2705c0a834401d2c146b1ad4e072a065d3316",class:"content"},e("a",{key:"e2a370b8517b895644d997473362d9e5d555311a",href:this.uri,onClick:t=>{t.preventDefault();this.linkEmitter.emit(this.uri)}},e("pos-label",{key:"90700f8e23139c8d428dafb45eb710dd1be38d9a"})),e("span",{key:"52f81ea9bf53547b16a8fac42f46bf34ec55f5d7",class:"url"},new URL(this.uri).host),e("pos-description",{key:"e561304fdd9536953927fd78c6031b76e185baf4"})))}};bi.style=ui;const pi=(t,e,r)=>{const n=t.get(e);if(!n){t.set(e,[r])}else if(!n.includes(r)){n.push(r)}};const fi=(t,e)=>{let r;return(...n)=>{if(r){clearTimeout(r)}r=setTimeout((()=>{r=0;t(...n)}),e)}};const gi=t=>!("isConnected"in t)||t.isConnected;const mi=fi((t=>{for(let e of t.keys()){t.set(e,t.get(e).filter(gi))}}),2e3);const vi=()=>{if(typeof l!=="function"){return{}}const t=new Map;return{dispose:()=>t.clear(),get:e=>{const r=l();if(r){pi(t,e,r)}},set:e=>{const r=t.get(e);if(r){t.set(e,r.filter(c))}mi(t)},reset:()=>{t.forEach((t=>t.forEach(c)));mi(t)}}};const yi=(t,e=((t,e)=>t!==e))=>{let r=new Map(Object.entries(t!==null&&t!==void 0?t:{}));const n={dispose:[],get:[],set:[],reset:[]};const i=()=>{r=new Map(Object.entries(t!==null&&t!==void 0?t:{}));n.reset.forEach((t=>t()))};const o=()=>{n.dispose.forEach((t=>t()));i()};const s=t=>{n.get.forEach((e=>e(t)));return r.get(t)};const a=(t,i)=>{const o=r.get(t);if(e(i,o,t)){r.set(t,i);n.set.forEach((e=>e(t,i,o)))}};const c=typeof Proxy==="undefined"?{}:new Proxy(t,{get(t,e){return s(e)},ownKeys(t){return Array.from(r.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,e){return r.has(e)},set(t,e,r){a(e,r);return true}});const l=(t,e)=>{n[t].push(e);return()=>{wi(n[t],e)}};const d=(e,r)=>{const n=l("set",((t,n)=>{if(t===e){r(n)}}));const i=l("reset",(()=>r(t[e])));return()=>{n();i()}};const h=(...t)=>{const e=t.reduce(((t,e)=>{if(e.set){t.push(l("set",e.set))}if(e.get){t.push(l("get",e.get))}if(e.reset){t.push(l("reset",e.reset))}if(e.dispose){t.push(l("dispose",e.dispose))}return t}),[]);return()=>e.forEach((t=>t()))};const u=t=>{const e=r.get(t);n.set.forEach((r=>r(t,e,e)))};return{state:c,get:s,set:a,on:l,onChange:d,use:h,dispose:o,reset:i,forceUpdate:u}};const wi=(t,e)=>{const r=t.indexOf(e);if(r>=0){t[r]=t[t.length-1];t.length--}};const xi=(t,e)=>{const r=yi(t,e);r.use(vi());return r};const ki=t=>{var e;const r=window;const n=new URL(r.location.href);const i=(e=t===null||t===void 0?void 0:t.parseURL)!==null&&e!==void 0?e:Ci;const{state:o,onChange:s,dispose:a}=xi({url:n,activePath:i(n)},((t,e,r)=>{if(r==="url"){return t.href!==e.href}return t!==e}));const c=t=>{history.pushState(null,null,t);const e=new URL(t,document.baseURI);o.url=e;o.activePath=i(e)};const l=t=>{const{activePath:e}=o;for(let r of t){const n=zi(e,r.path);if(n){if(r.to!=null){const n=typeof r.to==="string"?r.to:r.to(e);c(n);return l(t)}else{return{params:n,route:r}}}}return undefined};const d=()=>{const t=new URL(r.location.href);o.url=t;o.activePath=i(t)};const h=(t,e)=>{const r=l(e);if(r){if(typeof r.route.jsx==="function"){return r.route.jsx(r.params)}else{return r.route.jsx}}};const u=()=>{r.removeEventListener("popstate",d);a()};const b={Switch:h,get url(){return o.url},get activePath(){return o.activePath},push:c,onChange:s,dispose:u};d();r.addEventListener("popstate",d);return b};const zi=(t,e)=>{if(typeof e==="string"){if(e===t){return{}}}else if(typeof e==="function"){const r=e(t);if(r){return r===true?{}:{...r}}}else{const r=e.exec(t);if(r){e.lastIndex=0;return{...r}}}return undefined};const Ci=t=>t.pathname.toLowerCase();const Ii=".toolbar{display:flex;flex-direction:row;gap:0;align-items:center;margin-left:0.5rem}pos-navigation-bar{flex-grow:1}";const ji=Ii;const Si=ki();const _i=class{constructor(e){t(this,e);this.routeChanged=a(this,"pod-os:route-changed",7);this.mode="standalone"}linkClicked(t){this.navigate(t.detail)}sessionRestored(t){Si.push(t.detail.url)}componentWillLoad(){this.updateUri();Si.onChange("url",(()=>{this.updateUri()}))}navigate(t){Si.push("?uri="+encodeURIComponent(t))}updateUri(){this.uri=new URLSearchParams(window.location.search).get("uri")||(this.mode==="standalone"?"pod-os:dashboard":window.location.href);this.routeChanged.emit(this.uri)}render(){return e("slot",{key:"6b6bf8d8863e43bd7d9e2fa96f86fe652222dc44"})}};_i.style=ji;const Di=":host{display:block}input{border:none;padding-top:1rem;padding-bottom:1rem}input:focus{outline:none}";const Li=Di;const Ti=class{constructor(e){t(this,e);this.subscribePodOs=a(this,"pod-os:init",7);this.termSelected=a(this,"pod-os:term-selected",7);this.placeholder="Type to search...";this.value="";this.terms=[];this.receivePodOs=async t=>{this.os=t}}componentWillLoad(){tt(this)}setTerms(){this.terms=this.os.listKnownTerms()}handleChange(t){this.termSelected.emit({uri:t.target.value})}render(){return e(r,{key:"dbbd52d9a0af6ee27608862d21eabface70747a7"},e("input",{key:"76bcc73080c020b71cd40d9a0ee987ff063a6719",part:"input",list:"terms",placeholder:this.placeholder,value:this.value,onChange:t=>this.handleChange(t)}),e("datalist",{key:"6d0b698633f07413e389d7fe72e05b8130013c83",part:"terms",id:"terms"},this.terms.map((t=>e("option",{value:t.uri},t.shorthand)))))}static get delegatesFocus(){return true}static get watchers(){return{os:["setTerms"]}}};Ti.style=Li;var Pi;(function(t){t["Generic"]="pos-app-generic";t["RdfDocument"]="pos-app-rdf-document";t["DocumentViewer"]="pos-app-document-viewer";t["ImageViewer"]="pos-app-image-viewer";t["LdpContainer"]="pos-app-ldp-container"})(Pi||(Pi={}));function Oi(t,e){return t.some((t=>t.uri===e))}function Bi(t){if(Oi(t,"http://www.w3.org/ns/ldp#Container")){return Pi.LdpContainer}else if(Oi(t,"http://www.w3.org/2007/ont/link#RDFDocument")){return Pi.RdfDocument}else if(Oi(t,"http://www.w3.org/ns/iana/media-types/application/pdf#Resource")){return Pi.DocumentViewer}else if(Oi(t,"http://purl.org/dc/terms/Image")){return Pi.ImageViewer}else if(Oi(t,"http://www.w3.org/2007/ont/link#Document")){return Pi.DocumentViewer}else{return Pi.Generic}}const $i=class{constructor(e){t(this,e);this.subscribeResource=a(this,"pod-os:resource",7);this.receiveResource=t=>{this.types=t.types()}}componentWillLoad(){Q(this)}render(){return this.types?this.renderApp():null}renderApp(){const t=Bi(this.types);return e(t,null)}};export{ot as ion_card,dt as ion_card_content,ft as ion_card_header,Xt as ion_icon,Ft as ion_progress_bar,qt as ion_ripple_effect,ne as ion_searchbar,ae as ion_skeleton_text,we as ion_toast,Ie as pos_add_new_thing,wn as pos_app,zn as pos_app_browser,Sn as pos_app_dashboard,_n as pos_description,Tn as pos_dialog,Pn as pos_error_toast,$n as pos_example_resources,En as pos_getting_started,Un as pos_image,Rn as pos_internal_router,Yn as pos_label,Nn as pos_login,qn as pos_login_form,Jn as pos_make_findable,ni as pos_navigation_bar,si as pos_new_thing_form,li as pos_picture,di as pos_resource,bi as pos_rich_link,_i as pos_router,Ti as pos_select_term,$i as pos_type_router};
20
- //# sourceMappingURL=p-2417f72e.entry.js.map