@pod-os/contacts 0.3.0 → 0.4.0-rc.20fe2f1.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 (128) hide show
  1. package/dist/cjs/{chunk.5JY5FUCG-BJJbNIiG.js → chunk.5JY5FUCG-BDpED7an.js} +2 -2
  2. package/dist/cjs/{chunk.HVTXQL7M-C6x_EQ24.js → chunk.HVTXQL7M-CkQwB4ew.js} +4 -4
  3. package/dist/cjs/{chunk.URTPIBTY-BiNv2Ckb.js → chunk.URTPIBTY-De5L-27M.js} +3 -3
  4. package/dist/cjs/{chunk.XQ2OKYYA-CDJtWcvs.js → chunk.XQ2OKYYA-CZfHjZJv.js} +4 -4
  5. package/dist/cjs/{chunk.YHLNUJ7P-CoQhYOM2.js → chunk.YHLNUJ7P-C7S3ShkT.js} +1 -1
  6. package/dist/cjs/chunk.ZGGPD2XJ-DGjeHZ7b.js +5 -0
  7. package/dist/cjs/{class-map-CyEFRZYn.js → class-map-D_80IxYF.js} +1 -1
  8. package/dist/cjs/contacts.cjs.js +2 -2
  9. package/dist/cjs/{if-defined-TQmAS6tz.js → if-defined-BNj5GZso.js} +1 -1
  10. package/dist/cjs/{index-DdRXU5II.js → index-BiY-p204.js} +62 -20
  11. package/dist/cjs/{index-CpATWk39.js → index-D8Y89icW.js} +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/pos-add-literal-value_3.cjs.entry.js +6 -6
  14. package/dist/cjs/pos-add-new-thing_7.cjs.entry.js +9 -9
  15. package/dist/cjs/pos-app-browser.cjs.entry.js +2 -2
  16. package/dist/cjs/pos-app-dashboard_6.cjs.entry.js +3 -3
  17. package/dist/cjs/pos-app-document-viewer.cjs.entry.js +1 -1
  18. package/dist/cjs/pos-app-generic.cjs.entry.js +1 -1
  19. package/dist/cjs/pos-app-image-viewer.cjs.entry.js +1 -1
  20. package/dist/cjs/pos-app-ldp-container.cjs.entry.js +1 -1
  21. package/dist/cjs/pos-app-rdf-document.cjs.entry.js +1 -1
  22. package/dist/cjs/pos-app_24.cjs.entry.js +9 -9
  23. package/dist/cjs/pos-attachments.cjs.entry.js +1 -1
  24. package/dist/cjs/pos-container-contents.cjs.entry.js +1 -1
  25. package/dist/cjs/pos-container-item_3.cjs.entry.js +6 -6
  26. package/dist/cjs/pos-description_2.cjs.entry.js +1 -1
  27. package/dist/cjs/pos-document.cjs.entry.js +6 -6
  28. package/dist/cjs/pos-list.cjs.entry.js +1 -1
  29. package/dist/cjs/pos-make-findable_2.cjs.entry.js +7 -7
  30. package/dist/cjs/pos-markdown-document.cjs.entry.js +413 -123
  31. package/dist/cjs/pos-new-thing-form.cjs.entry.js +1 -1
  32. package/dist/cjs/pos-predicate.cjs.entry.js +6 -6
  33. package/dist/cjs/pos-relations_2.cjs.entry.js +1 -1
  34. package/dist/cjs/pos-select-term.cjs.entry.js +1 -1
  35. package/dist/cjs/pos-subjects.cjs.entry.js +1 -1
  36. package/dist/cjs/pos-tool-attachments.cjs.entry.js +1 -1
  37. package/dist/cjs/pos-tool-select.cjs.entry.js +3 -3
  38. package/dist/cjs/pos-value.cjs.entry.js +1 -1
  39. package/dist/cjs/{session-kBhmup9r.js → session-CW2xZDbl.js} +1 -1
  40. package/dist/cjs/{settings-CpwCCkhx.js → settings-D2bZj29K.js} +1 -1
  41. package/dist/collection/collection-manifest.json +1 -1
  42. package/dist/components/pos-markdown-document2.js +1 -1
  43. package/dist/contacts/contacts.esm.js +1 -1
  44. package/dist/contacts/{p-78715d17.entry.js → p-11dd66c9.entry.js} +1 -1
  45. package/dist/contacts/{p-6d4ec7e5.entry.js → p-1943a383.entry.js} +1 -1
  46. package/dist/contacts/{p-46f8861e.entry.js → p-3c4fada1.entry.js} +1 -1
  47. package/dist/contacts/{p-ce6b4a9a.entry.js → p-3c6684c3.entry.js} +1 -1
  48. package/dist/contacts/{p-c4a1c42a.entry.js → p-4c02d7b7.entry.js} +1 -1
  49. package/dist/contacts/p-4da8f636.entry.js +1 -0
  50. package/dist/contacts/{p-84fdbc1a.entry.js → p-58ce4289.entry.js} +1 -1
  51. package/dist/contacts/{p-C1XsyD29.js → p-5RplWyqs.js} +1 -1
  52. package/dist/contacts/{p-649e7365.entry.js → p-5ae55c52.entry.js} +1 -1
  53. package/dist/contacts/{p-40b2d792.entry.js → p-5df07840.entry.js} +1 -1
  54. package/dist/contacts/{p-92fcdd59.entry.js → p-63e52cba.entry.js} +1 -1
  55. package/dist/contacts/{p-76382e6a.entry.js → p-6f9152d8.entry.js} +1 -1
  56. package/dist/contacts/p-7a60ece3.entry.js +1 -0
  57. package/dist/contacts/{p-a9d03996.entry.js → p-7aded942.entry.js} +1 -1
  58. package/dist/contacts/{p-7a01c820.entry.js → p-7cf756ed.entry.js} +1 -1
  59. package/dist/contacts/{p-c89722f1.entry.js → p-908587ff.entry.js} +1 -1
  60. package/dist/contacts/{p-a629ae72.entry.js → p-9f34648a.entry.js} +1 -1
  61. package/dist/contacts/{p-B0_xZCeV.js → p-B3jnBMMO.js} +3 -3
  62. package/dist/contacts/{p-C8LPXtIR.js → p-BvR_sP9G.js} +1 -1
  63. package/dist/contacts/{p-Bug_w-vi.js → p-C36YDIjT.js} +1 -1
  64. package/dist/contacts/{p-BXdS2klL.js → p-CzUN2DJY.js} +4 -4
  65. package/dist/contacts/p-D8UlKjrD.js +1 -0
  66. package/dist/contacts/{p-BXcFVJku.js → p-Dq6SRSqM.js} +2 -2
  67. package/dist/contacts/{p-DScSUBy-.js → p-Dunlf3Z7.js} +1 -1
  68. package/dist/contacts/{p-BkeypvMo.js → p-VfX5yLuQ.js} +7 -7
  69. package/dist/contacts/{p-SrdKoY3I.js → p-_eHMN8WS.js} +1 -1
  70. package/dist/contacts/{p-7f565d49.entry.js → p-a0da8fbf.entry.js} +1 -1
  71. package/dist/contacts/{p-d510fa6c.entry.js → p-a52ee32d.entry.js} +5 -5
  72. package/dist/contacts/{p-7d796ba8.entry.js → p-bbb51116.entry.js} +8 -8
  73. package/dist/contacts/{p-4ef3891c.entry.js → p-be0458af.entry.js} +1 -1
  74. package/dist/contacts/{p-ecf8719a.entry.js → p-be2bfaf2.entry.js} +1 -1
  75. package/dist/contacts/{p-D_nUMgR-.js → p-bf6nCqHq.js} +1 -1
  76. package/dist/contacts/{p-ae43e046.entry.js → p-c9d40209.entry.js} +1 -1
  77. package/dist/contacts/{p-f8517ff2.entry.js → p-d762c42d.entry.js} +1 -1
  78. package/dist/contacts/{p-26248da8.entry.js → p-dc6b0fb2.entry.js} +1 -1
  79. package/dist/contacts/{p-68gi0rt1.js → p-dsdWvqdi.js} +3 -3
  80. package/dist/contacts/{p-c306d8ca.entry.js → p-f403a62e.entry.js} +1 -1
  81. package/dist/contacts/p-feaa607e.entry.js +1 -0
  82. package/dist/esm/{chunk.5JY5FUCG-B58l5Mdn.js → chunk.5JY5FUCG-CPET0g0y.js} +2 -2
  83. package/dist/esm/{chunk.HVTXQL7M-DXJDg6h_.js → chunk.HVTXQL7M-Bo9_AX3Z.js} +4 -4
  84. package/dist/esm/{chunk.URTPIBTY-C1YI_wtI.js → chunk.URTPIBTY-Cec1N58N.js} +3 -3
  85. package/dist/esm/{chunk.XQ2OKYYA-B0surOUs.js → chunk.XQ2OKYYA-CdgFL-s-.js} +4 -4
  86. package/dist/esm/{chunk.YHLNUJ7P-B10Qbx9i.js → chunk.YHLNUJ7P-nIbF6vRN.js} +1 -1
  87. package/dist/esm/chunk.ZGGPD2XJ-BsTqrynL.js +3 -0
  88. package/dist/esm/{class-map-DcKoKhP0.js → class-map-BnsoOzsP.js} +1 -1
  89. package/dist/esm/contacts.js +3 -3
  90. package/dist/esm/{if-defined-TtuUo8or.js → if-defined-CmT83CRs.js} +1 -1
  91. package/dist/esm/{index-D4tjvI9D.js → index-CkwiZvFT.js} +1 -1
  92. package/dist/esm/{index-DScSUBy-.js → index-Dunlf3Z7.js} +61 -19
  93. package/dist/esm/loader.js +2 -2
  94. package/dist/esm/pos-add-literal-value_3.entry.js +6 -6
  95. package/dist/esm/pos-add-new-thing_7.entry.js +9 -9
  96. package/dist/esm/pos-app-browser.entry.js +2 -2
  97. package/dist/esm/pos-app-dashboard_6.entry.js +3 -3
  98. package/dist/esm/pos-app-document-viewer.entry.js +1 -1
  99. package/dist/esm/pos-app-generic.entry.js +1 -1
  100. package/dist/esm/pos-app-image-viewer.entry.js +1 -1
  101. package/dist/esm/pos-app-ldp-container.entry.js +1 -1
  102. package/dist/esm/pos-app-rdf-document.entry.js +1 -1
  103. package/dist/esm/pos-app_24.entry.js +9 -9
  104. package/dist/esm/pos-attachments.entry.js +1 -1
  105. package/dist/esm/pos-container-contents.entry.js +1 -1
  106. package/dist/esm/pos-container-item_3.entry.js +6 -6
  107. package/dist/esm/pos-description_2.entry.js +1 -1
  108. package/dist/esm/pos-document.entry.js +6 -6
  109. package/dist/esm/pos-list.entry.js +1 -1
  110. package/dist/esm/pos-make-findable_2.entry.js +7 -7
  111. package/dist/esm/pos-markdown-document.entry.js +413 -123
  112. package/dist/esm/pos-new-thing-form.entry.js +1 -1
  113. package/dist/esm/pos-predicate.entry.js +6 -6
  114. package/dist/esm/pos-relations_2.entry.js +1 -1
  115. package/dist/esm/pos-select-term.entry.js +1 -1
  116. package/dist/esm/pos-subjects.entry.js +1 -1
  117. package/dist/esm/pos-tool-attachments.entry.js +1 -1
  118. package/dist/esm/pos-tool-select.entry.js +3 -3
  119. package/dist/esm/pos-value.entry.js +1 -1
  120. package/dist/esm/{session-CtUoUtdF.js → session-VqDg66f5.js} +1 -1
  121. package/dist/esm/{settings-Cnw1mSJw.js → settings-CbiYsH1V.js} +1 -1
  122. package/package.json +3 -3
  123. package/dist/cjs/chunk.ZGGPD2XJ-C--tZiyf.js +0 -5
  124. package/dist/contacts/p-5e11ce90.entry.js +0 -1
  125. package/dist/contacts/p-8bc26fd9.entry.js +0 -1
  126. package/dist/contacts/p-Bk6kpzHk.js +0 -1
  127. package/dist/contacts/p-a3082900.entry.js +0 -1
  128. package/dist/esm/chunk.ZGGPD2XJ-CxH68zCl.js +0 -3
@@ -1,4 +1,4 @@
1
- import{i as t,e,c as s,_ as i,n,w as o,a as r,x as a,f as l,E as h,S as u}from"./p-C8LPXtIR.js";import{S as d,e as c,s as m,w as p,a as f,g as b,b as v}from"./p-BXdS2klL.js";import{L as g}from"./p-BnGEOH37.js";import{e as w,i as y,t as k,a as x}from"./p-D_nUMgR-.js";import{o as _}from"./p-BXcFVJku.js";var $=class{constructor(t,...e){this.slotNames=[],this.handleSlotChange=t=>{const e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()},(this.host=t).addController(this),this.slotNames=e}hasDefaultSlot(){return[...this.host.childNodes].some((t=>{if(t.nodeType===t.TEXT_NODE&&""!==t.textContent.trim())return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if("sl-visually-hidden"===e.tagName.toLowerCase())return!1;if(!e.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(t){return null!==this.host.querySelector(`:scope > [slot="${t}"]`)}test(t){return"[default]"===t?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}},C=t`
1
+ import{i as t,e,c as s,_ as i,n,w as o,a as r,x as a,f as l,E as h,S as u}from"./p-BvR_sP9G.js";import{S as d,e as c,s as m,w as p,a as f,g as b,b as v}from"./p-CzUN2DJY.js";import{L as g}from"./p-BnGEOH37.js";import{e as w,i as y,t as x,a as k}from"./p-bf6nCqHq.js";import{o as _}from"./p-Dq6SRSqM.js";var $=class{constructor(t,...e){this.slotNames=[],this.handleSlotChange=t=>{const e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()},(this.host=t).addController(this),this.slotNames=e}hasDefaultSlot(){return[...this.host.childNodes].some((t=>{if(t.nodeType===t.TEXT_NODE&&""!==t.textContent.trim())return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if("sl-visually-hidden"===e.tagName.toLowerCase())return!1;if(!e.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(t){return null!==this.host.querySelector(`:scope > [slot="${t}"]`)}test(t){return"[default]"===t?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}},C=t`
2
2
  :host {
3
3
  display: inline-block;
4
4
  }
@@ -99,7 +99,7 @@ import{i as t,e,c as s,_ as i,n,w as o,a as r,x as a,f as l,E as h,S as u}from".
99
99
  @keydown=${this.handleKeyDown}
100
100
  @mousedown=${this.handleMouseDown}
101
101
  ></slot>
102
- `}};U.styles=[s,D],i([c("slot")],U.prototype,"defaultSlot",2),U.define("sl-menu");var L=t`
102
+ `}};U.styles=[s,D],i([c("slot")],U.prototype,"defaultSlot",2),U.define("sl-menu");var M=t`
103
103
  :host {
104
104
  --submenu-offset: -2px;
105
105
 
@@ -256,12 +256,12 @@ import{i as t,e,c as s,_ as i,n,w as o,a as r,x as a,f as l,E as h,S as u}from".
256
256
  * @license
257
257
  * Copyright 2017 Google LLC
258
258
  * SPDX-License-Identifier: BSD-3-Clause
259
- */;const M=(t,e)=>{const s=t._$AN;if(void 0===s)return!1;for(const t of s)t._$AO?.(e,!1),M(t,e);return!0},B=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===s?.size)},O=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),I(e)}};function H(t){void 0!==this._$AN?(B(this),this._$AM=t,O(this)):this._$AM=t}function N(t,e=!1,s=0){const i=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(e)if(Array.isArray(i))for(let t=s;t<i.length;t++)M(i[t],!1),B(i[t]);else null!=i&&(M(i,!1),B(i));else M(this,t)}const I=t=>{t.type==k.CHILD&&(t._$AP??=N,t._$AQ??=H)};class W extends y{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),O(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(M(this,t),B(this))}setValue(t){if(l(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}
259
+ */;const H=(t,e)=>{const s=t._$AN;if(void 0===s)return!1;for(const t of s)t._$AO?.(e,!1),H(t,e);return!0},L=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===s?.size)},N=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),W(e)}};function O(t){void 0!==this._$AN?(L(this),this._$AM=t,N(this)):this._$AM=t}function B(t,e=!1,s=0){const i=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(e)if(Array.isArray(i))for(let t=s;t<i.length;t++)H(i[t],!1),L(i[t]);else null!=i&&(H(i,!1),L(i));else H(this,t)}const W=t=>{t.type==x.CHILD&&(t._$AP??=B,t._$AQ??=O)};class j extends y{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),N(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(H(this,t),L(this))}setValue(t){if(l(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}
260
260
  /**
261
261
  * @license
262
262
  * Copyright 2020 Google LLC
263
263
  * SPDX-License-Identifier: BSD-3-Clause
264
- */class j{}const R=new WeakMap,V=x(class extends W{render(t){return h}update(t,[e]){const s=e!==this.G;return s&&void 0!==this.G&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),h}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let s=R.get(e);void 0===s&&(s=new WeakMap,R.set(e,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?R.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var X=class{constructor(t,e){this.popupRef=new j,this.enableSubmenuTimer=-1,this.isConnected=!1,this.isPopupConnected=!1,this.skidding=0,this.submenuOpenDelay=100,this.handleMouseMove=t=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${t.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${t.clientY}px`)},this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()},this.handleKeyDown=t=>{switch(t.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":t.target!==this.host&&(t.preventDefault(),t.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(t)}},this.handleClick=t=>{var e;t.target===this.host?(t.preventDefault(),t.stopPropagation()):t.target instanceof Element&&("sl-menu-item"===t.target.tagName||(null==(e=t.target.role)?void 0:e.startsWith("menuitem")))&&this.disableSubmenu()},this.handleFocusOut=t=>{t.relatedTarget&&t.relatedTarget instanceof Element&&this.host.contains(t.relatedTarget)||this.disableSubmenu()},this.handlePopupMouseover=t=>{t.stopPropagation()},this.handlePopupReposition=()=>{const t=this.host.renderRoot.querySelector("slot[name='submenu']"),e=null==t?void 0:t.assignedElements({flatten:!0}).filter((t=>"sl-menu"===t.localName))[0],s="rtl"===getComputedStyle(this.host).direction;if(!e)return;const{left:i,top:n,width:o,height:r}=e.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${s?i+o:i}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${n}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${s?i+o:i}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${n+r}px`)},(this.host=t).addController(this),this.hasSlotController=e}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("sl-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("sl-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(t){const e=this.host.renderRoot.querySelector("slot[name='submenu']");if(!e)return void console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);let s=null;for(const t of e.assignedElements())if(s=t.querySelectorAll("sl-menu-item, [role^='menuitem']"),0!==s.length)break;if(s&&0!==s.length){s[0].setAttribute("tabindex","0");for(let t=1;t!==s.length;++t)s[t].setAttribute("tabindex","-1");this.popupRef.value&&(t.preventDefault(),t.stopPropagation(),this.popupRef.value.active?s[0]instanceof HTMLElement&&s[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then((()=>{s[0]instanceof HTMLElement&&s[0].focus()})),this.host.requestUpdate()))}}setSubmenuState(t){this.popupRef.value&&this.popupRef.value.active!==t&&(this.popupRef.value.active=t,this.host.requestUpdate())}enableSubmenu(t=!0){t?(window.clearTimeout(this.enableSubmenuTimer),this.enableSubmenuTimer=window.setTimeout((()=>{this.setSubmenuState(!0)}),this.submenuOpenDelay)):this.setSubmenuState(!0)}disableSubmenu(){window.clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){var t;if(!(null==(t=this.host.parentElement)?void 0:t.computedStyleMap))return;const e=this.host.parentElement.computedStyleMap(),s=["padding-top","border-top-width","margin-top"].reduce(((t,s)=>{var i;const n=null!=(i=e.get(s))?i:new CSSUnitValue(0,"px");return t-(n instanceof CSSUnitValue?n:new CSSUnitValue(0,"px")).to("px").value}),0);this.skidding=s}isExpanded(){return!!this.popupRef.value&&this.popupRef.value.active}renderSubmenu(){const t="rtl"===getComputedStyle(this.host).direction;return this.isConnected?a`
264
+ */class I{}const R=new WeakMap,V=k(class extends j{render(t){return h}update(t,[e]){const s=e!==this.G;return s&&void 0!==this.G&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),h}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let s=R.get(e);void 0===s&&(s=new WeakMap,R.set(e,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?R.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var q=class{constructor(t,e){this.popupRef=new I,this.enableSubmenuTimer=-1,this.isConnected=!1,this.isPopupConnected=!1,this.skidding=0,this.submenuOpenDelay=100,this.handleMouseMove=t=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${t.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${t.clientY}px`)},this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()},this.handleKeyDown=t=>{switch(t.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":t.target!==this.host&&(t.preventDefault(),t.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(t)}},this.handleClick=t=>{var e;t.target===this.host?(t.preventDefault(),t.stopPropagation()):t.target instanceof Element&&("sl-menu-item"===t.target.tagName||(null==(e=t.target.role)?void 0:e.startsWith("menuitem")))&&this.disableSubmenu()},this.handleFocusOut=t=>{t.relatedTarget&&t.relatedTarget instanceof Element&&this.host.contains(t.relatedTarget)||this.disableSubmenu()},this.handlePopupMouseover=t=>{t.stopPropagation()},this.handlePopupReposition=()=>{const t=this.host.renderRoot.querySelector("slot[name='submenu']"),e=null==t?void 0:t.assignedElements({flatten:!0}).filter((t=>"sl-menu"===t.localName))[0],s="rtl"===getComputedStyle(this.host).direction;if(!e)return;const{left:i,top:n,width:o,height:r}=e.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${s?i+o:i}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${n}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${s?i+o:i}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${n+r}px`)},(this.host=t).addController(this),this.hasSlotController=e}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("sl-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("sl-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(t){const e=this.host.renderRoot.querySelector("slot[name='submenu']");if(!e)return void console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);let s=null;for(const t of e.assignedElements())if(s=t.querySelectorAll("sl-menu-item, [role^='menuitem']"),0!==s.length)break;if(s&&0!==s.length){s[0].setAttribute("tabindex","0");for(let t=1;t!==s.length;++t)s[t].setAttribute("tabindex","-1");this.popupRef.value&&(t.preventDefault(),t.stopPropagation(),this.popupRef.value.active?s[0]instanceof HTMLElement&&s[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then((()=>{s[0]instanceof HTMLElement&&s[0].focus()})),this.host.requestUpdate()))}}setSubmenuState(t){this.popupRef.value&&this.popupRef.value.active!==t&&(this.popupRef.value.active=t,this.host.requestUpdate())}enableSubmenu(t=!0){t?(window.clearTimeout(this.enableSubmenuTimer),this.enableSubmenuTimer=window.setTimeout((()=>{this.setSubmenuState(!0)}),this.submenuOpenDelay)):this.setSubmenuState(!0)}disableSubmenu(){window.clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){var t;if(!(null==(t=this.host.parentElement)?void 0:t.computedStyleMap))return;const e=this.host.parentElement.computedStyleMap(),s=["padding-top","border-top-width","margin-top"].reduce(((t,s)=>{var i;const n=null!=(i=e.get(s))?i:new CSSUnitValue(0,"px");return t-(n instanceof CSSUnitValue?n:new CSSUnitValue(0,"px")).to("px").value}),0);this.skidding=s}isExpanded(){return!!this.popupRef.value&&this.popupRef.value.active}renderSubmenu(){const t="rtl"===getComputedStyle(this.host).direction;return this.isConnected?a`
265
265
  <sl-popup
266
266
  ${V(this.popupRef)}
267
267
  placement=${t?"left-start":"right-start"}
@@ -332,12 +332,12 @@ import{i as t,e,c as s,_ as i,n,w as o,a as r,x as a,f as l,E as h,S as u}from".
332
332
  stroke-dasharray: 0.05em, 3em;
333
333
  }
334
334
  }
335
- `,F=class extends r{constructor(){super(...arguments),this.localize=new g(this)}render(){return a`
335
+ `,G=class extends r{constructor(){super(...arguments),this.localize=new g(this)}render(){return a`
336
336
  <svg part="base" class="spinner" role="progressbar" aria-label=${this.localize.term("loading")}>
337
337
  <circle class="spinner__track"></circle>
338
338
  <circle class="spinner__indicator"></circle>
339
339
  </svg>
340
- `}};F.styles=[s,K];var G=class extends r{constructor(){super(...arguments),this.localize=new g(this),this.type="normal",this.checked=!1,this.value="",this.loading=!1,this.disabled=!1,this.hasSlotController=new $(this,"submenu"),this.submenuController=new X(this,this.hasSlotController),this.handleHostClick=t=>{this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())},this.handleMouseOver=t=>{this.focus(),t.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){const t=this.getTextLabel();void 0!==this.cachedTextLabel?t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1})):this.cachedTextLabel=t}handleCheckedChange(){if(this.checked&&"checkbox"!==this.type)return this.checked=!1,void console.error('The checked attribute can only be used on menu items with type="checkbox"',this);"checkbox"===this.type?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleTypeChange(){"checkbox"===this.type?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return function(t){if(!t)return"";const e=t.assignedNodes({flatten:!0});let s="";return[...e].forEach((t=>{t.nodeType===Node.TEXT_NODE&&(s+=t.textContent)})),s}(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){const t="rtl"===this.localize.dir(),e=this.submenuController.isExpanded();return a`
340
+ `}};G.styles=[s,K];var Y=class extends r{constructor(){super(...arguments),this.localize=new g(this),this.type="normal",this.checked=!1,this.value="",this.loading=!1,this.disabled=!1,this.hasSlotController=new $(this,"submenu"),this.submenuController=new q(this,this.hasSlotController),this.handleHostClick=t=>{this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())},this.handleMouseOver=t=>{this.focus(),t.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){const t=this.getTextLabel();void 0!==this.cachedTextLabel?t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1})):this.cachedTextLabel=t}handleCheckedChange(){if(this.checked&&"checkbox"!==this.type)return this.checked=!1,void console.error('The checked attribute can only be used on menu items with type="checkbox"',this);"checkbox"===this.type?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleTypeChange(){"checkbox"===this.type?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return function(t){if(!t)return"";const e=t.assignedNodes({flatten:!0});let s="";return[...e].forEach((t=>{t.nodeType===Node.TEXT_NODE&&(s+=t.textContent)})),s}(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){const t="rtl"===this.localize.dir(),e=this.submenuController.isExpanded();return a`
341
341
  <div
342
342
  id="anchor"
343
343
  part="base"
@@ -362,4 +362,4 @@ import{i as t,e,c as s,_ as i,n,w as o,a as r,x as a,f as l,E as h,S as u}from".
362
362
  ${this.submenuController.renderSubmenu()}
363
363
  ${this.loading?a` <sl-spinner part="spinner" exportparts="base:spinner__base"></sl-spinner> `:""}
364
364
  </div>
365
- `}};G.styles=[s,L],G.dependencies={"sl-icon":u,"sl-popup":d,"sl-spinner":F},i([c("slot:not([name])")],G.prototype,"defaultSlot",2),i([c(".menu-item")],G.prototype,"menuItem",2),i([n()],G.prototype,"type",2),i([n({type:Boolean,reflect:!0})],G.prototype,"checked",2),i([n()],G.prototype,"value",2),i([n({type:Boolean,reflect:!0})],G.prototype,"loading",2),i([n({type:Boolean,reflect:!0})],G.prototype,"disabled",2),i([o("checked")],G.prototype,"handleCheckedChange",1),i([o("disabled")],G.prototype,"handleDisabledChange",1),i([o("type")],G.prototype,"handleTypeChange",1),G.define("sl-menu-item");export{$ as H}
365
+ `}};Y.styles=[s,M],Y.dependencies={"sl-icon":u,"sl-popup":d,"sl-spinner":G},i([c("slot:not([name])")],Y.prototype,"defaultSlot",2),i([c(".menu-item")],Y.prototype,"menuItem",2),i([n()],Y.prototype,"type",2),i([n({type:Boolean,reflect:!0})],Y.prototype,"checked",2),i([n()],Y.prototype,"value",2),i([n({type:Boolean,reflect:!0})],Y.prototype,"loading",2),i([n({type:Boolean,reflect:!0})],Y.prototype,"disabled",2),i([o("checked")],Y.prototype,"handleCheckedChange",1),i([o("disabled")],Y.prototype,"handleDisabledChange",1),i([o("type")],Y.prototype,"handleTypeChange",1),Y.define("sl-menu-item");export{$ as H}
@@ -1 +1 @@
1
- import{f as e,i as t,j as r}from"./p-DScSUBy-.js";const n=e=>!("isConnected"in e)||e.isConnected,o=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(n))})(...t)}),2e3)}})(),s=()=>{const r=window,n=new URL(r.location.href),s=u,{state:i,onChange:c,dispose:p}=((r,n)=>{const s=((e,t=(e,t)=>e!==t)=>{let r=new Map(Object.entries(null!=e?e:{}));const n={dispose:[],get:[],set:[],reset:[]},o=()=>{r=new Map(Object.entries(null!=e?e:{})),n.reset.forEach((e=>e()))},s=e=>(n.get.forEach((t=>t(e))),r.get(e)),i=(e,o)=>{const s=r.get(e);t(o,s,e)&&(r.set(e,o),n.set.forEach((t=>t(e,o,s))))},a="undefined"==typeof Proxy?{}:new Proxy(e,{get:(e,t)=>s(t),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>r.has(t),set:(e,t,r)=>(i(t,r),!0)}),u=(e,t)=>(n[e].push(t),()=>{((e,t)=>{const r=e.indexOf(t);r>=0&&(e[r]=e[e.length-1],e.length--)})(n[e],t)});return{state:a,get:s,set:i,on:u,onChange:(t,r)=>{const n=u("set",((e,n)=>{e===t&&r(n)})),o=u("reset",(()=>r(e[t])));return()=>{n(),o()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(u("set",t.set)),t.get&&e.push(u("get",t.get)),t.reset&&e.push(u("reset",t.reset)),t.dispose&&e.push(u("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{n.dispose.forEach((e=>e())),o()},reset:o,forceUpdate:e=>{const t=r.get(e);n.set.forEach((r=>r(e,t,t)))}}})(r,n);return s.use((()=>{if("function"!=typeof e)return{};const r=new Map;return{dispose:()=>r.clear(),get:t=>{const n=e();n&&((e,t,r)=>{const n=e.get(t);n?n.includes(r)||n.push(r):e.set(t,[r])})(r,t,n)},set:e=>{const n=r.get(e);n&&r.set(e,n.filter(t)),o(r)},reset:()=>{r.forEach((e=>e.forEach(t))),o(r)}}})()),s})({url:n,activePath:s(n)},((e,t,r)=>"url"===r?e.href!==t.href:e!==t)),l=e=>{history.pushState(null,null,e);const t=new URL(e,document.baseURI);i.url=t,i.activePath=s(t)},f=e=>{const{activePath:t}=i;for(let r of e){const n=a(t,r.path);if(n){if(null!=r.to){const n="string"==typeof r.to?r.to:r.to(t);return l(n),f(e)}return{params:n,route:r}}}},d=()=>{const e=new URL(r.location.href);i.url=e,i.activePath=s(e)},g={Switch:(e,t)=>{const r=f(t);if(r)return"function"==typeof r.route.jsx?r.route.jsx(r.params):r.route.jsx},get url(){return i.url},get activePath(){return i.activePath},push:l,onChange:c,dispose:()=>{r.removeEventListener("popstate",d),p()}};return d(),r.addEventListener("popstate",d),g},i=(e,t)=>{var n;return"to"in e?{path:e.path,to:e.to}:(r.isDev&&e.render&&t.length>0&&console.warn("Route: if `render` is provided, the component should not have any children"),{path:e.path,id:e.id,jsx:null!==(n=e.render)&&void 0!==n?n:t})},a=(e,t)=>{if("string"==typeof t){if(t===e)return{}}else if("function"==typeof t){const r=t(e);if(r)return!0===r?{}:{...r}}else{const r=t.exec(e);if(r)return t.lastIndex=0,{...r}}},u=e=>e.pathname.toLowerCase(),c=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),p=e=>e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),l=e=>e.replace(/([=!:$/()])/g,"\\$1"),f=e=>e&&e.sensitive?"":"i",d=(e,t,r)=>{for(var n=(r=r||{}).strict,o=!1!==r.end,s=p(r.delimiter||"/"),i=r.delimiters||"./",a=[].concat(r.endsWith||[]).map(p).concat("$").join("|"),u="",c=!1,l=0;l<e.length;l++){var d=e[l];if("string"==typeof d)u+=p(d),c=l===e.length-1&&i.indexOf(d[d.length-1])>-1;else{var g=p(d.prefix||""),v=d.repeat?"(?:"+d.pattern+")(?:"+g+"(?:"+d.pattern+"))*":d.pattern;t&&t.push(d),u+=d.optional?d.partial?g+"("+v+")?":"(?:"+g+"("+v+"))?":g+"("+v+")"}}return o?(n||(u+="(?:"+s+")?"),u+="$"===a?"$":"(?="+a+")"):(n||(u+="(?:"+s+"(?="+a+"))?"),c||(u+="(?="+s+"|"+a+")")),new RegExp("^"+u,f(r))},g=(e,t,r)=>e instanceof RegExp?((e,t)=>{if(!t)return e;var r=e.source.match(/\((?!\?)/g);if(r)for(var n=0;n<r.length;n++)t.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,pattern:null});return e})(e,t):Array.isArray(e)?((e,t,r)=>{for(var n=[],o=0;o<e.length;o++)n.push(g(e[o],t,r).source);return new RegExp("(?:"+n.join("|")+")",f(r))})(e,t,r):((e,t,r)=>d(((e,t)=>{for(var r,n=[],o=0,s=0,i="",a=t&&t.delimiter||"/",u=t&&t.delimiters||"./",f=!1;null!==(r=c.exec(e));){var d=r[0],g=r[1],v=r.index;if(i+=e.slice(s,v),s=v+d.length,g)i+=g[1],f=!0;else{var y="",h=e[s],w=r[2],m=r[3],x=r[4],R=r[5];if(!f&&i.length){var $=i.length-1;u.indexOf(i[$])>-1&&(y=i[$],i=i.slice(0,$))}i&&(n.push(i),i="",f=!1);var P=y||a,j=m||x;n.push({name:w||o++,prefix:y,delimiter:P,optional:"?"===R||"*"===R,repeat:"+"===R||"*"===R,partial:""!==y&&void 0!==h&&h!==y,pattern:j?l(j):"[^"+p(P)+"]+?"})}}return(i||s<e.length)&&n.push(i+e.substr(s)),n})(e,r),t,r))(e,t,r);let v=0;const y={},h=(e,t={})=>{const{exact:r=!1,strict:n=!1}=t,{re:o,keys:s}=((e,t)=>{const r=`${t.end}${t.strict}`,n=y[r]||(y[r]={}),o=JSON.stringify(e);if(n[o])return n[o];const s=[],i={re:g(e,s,t),keys:s};return v<1e4&&(n[o]=i,v+=1),i})(e,{end:r,strict:n});return e=>{const t=o.exec(e);if(!t)return;const[n,...i]=t;return r&&e!==n?void 0:s.reduce(((e,t,r)=>(e[t.name]=i[r],e)),{})}};export{i as R,s as c,h as m}
1
+ import{f as e,i as t,j as r}from"./p-Dunlf3Z7.js";const n=e=>!("isConnected"in e)||e.isConnected,o=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(n))})(...t)}),2e3)}})(),s=()=>{const r=window,n=new URL(r.location.href),s=u,{state:i,onChange:c,dispose:p}=((r,n)=>{const s=((e,t=(e,t)=>e!==t)=>{let r=new Map(Object.entries(null!=e?e:{}));const n={dispose:[],get:[],set:[],reset:[]},o=()=>{r=new Map(Object.entries(null!=e?e:{})),n.reset.forEach((e=>e()))},s=e=>(n.get.forEach((t=>t(e))),r.get(e)),i=(e,o)=>{const s=r.get(e);t(o,s,e)&&(r.set(e,o),n.set.forEach((t=>t(e,o,s))))},a="undefined"==typeof Proxy?{}:new Proxy(e,{get:(e,t)=>s(t),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>r.has(t),set:(e,t,r)=>(i(t,r),!0)}),u=(e,t)=>(n[e].push(t),()=>{((e,t)=>{const r=e.indexOf(t);r>=0&&(e[r]=e[e.length-1],e.length--)})(n[e],t)});return{state:a,get:s,set:i,on:u,onChange:(t,r)=>{const n=u("set",((e,n)=>{e===t&&r(n)})),o=u("reset",(()=>r(e[t])));return()=>{n(),o()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(u("set",t.set)),t.get&&e.push(u("get",t.get)),t.reset&&e.push(u("reset",t.reset)),t.dispose&&e.push(u("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{n.dispose.forEach((e=>e())),o()},reset:o,forceUpdate:e=>{const t=r.get(e);n.set.forEach((r=>r(e,t,t)))}}})(r,n);return s.use((()=>{if("function"!=typeof e)return{};const r=new Map;return{dispose:()=>r.clear(),get:t=>{const n=e();n&&((e,t,r)=>{const n=e.get(t);n?n.includes(r)||n.push(r):e.set(t,[r])})(r,t,n)},set:e=>{const n=r.get(e);n&&r.set(e,n.filter(t)),o(r)},reset:()=>{r.forEach((e=>e.forEach(t))),o(r)}}})()),s})({url:n,activePath:s(n)},((e,t,r)=>"url"===r?e.href!==t.href:e!==t)),l=e=>{history.pushState(null,null,e);const t=new URL(e,document.baseURI);i.url=t,i.activePath=s(t)},f=e=>{const{activePath:t}=i;for(let r of e){const n=a(t,r.path);if(n){if(null!=r.to){const n="string"==typeof r.to?r.to:r.to(t);return l(n),f(e)}return{params:n,route:r}}}},d=()=>{const e=new URL(r.location.href);i.url=e,i.activePath=s(e)},g={Switch:(e,t)=>{const r=f(t);if(r)return"function"==typeof r.route.jsx?r.route.jsx(r.params):r.route.jsx},get url(){return i.url},get activePath(){return i.activePath},push:l,onChange:c,dispose:()=>{r.removeEventListener("popstate",d),p()}};return d(),r.addEventListener("popstate",d),g},i=(e,t)=>{var n;return"to"in e?{path:e.path,to:e.to}:(r.isDev&&e.render&&t.length>0&&console.warn("Route: if `render` is provided, the component should not have any children"),{path:e.path,id:e.id,jsx:null!==(n=e.render)&&void 0!==n?n:t})},a=(e,t)=>{if("string"==typeof t){if(t===e)return{}}else if("function"==typeof t){const r=t(e);if(r)return!0===r?{}:{...r}}else{const r=t.exec(e);if(r)return t.lastIndex=0,{...r}}},u=e=>e.pathname.toLowerCase(),c=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),p=e=>e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),l=e=>e.replace(/([=!:$/()])/g,"\\$1"),f=e=>e&&e.sensitive?"":"i",d=(e,t,r)=>{for(var n=(r=r||{}).strict,o=!1!==r.end,s=p(r.delimiter||"/"),i=r.delimiters||"./",a=[].concat(r.endsWith||[]).map(p).concat("$").join("|"),u="",c=!1,l=0;l<e.length;l++){var d=e[l];if("string"==typeof d)u+=p(d),c=l===e.length-1&&i.indexOf(d[d.length-1])>-1;else{var g=p(d.prefix||""),v=d.repeat?"(?:"+d.pattern+")(?:"+g+"(?:"+d.pattern+"))*":d.pattern;t&&t.push(d),u+=d.optional?d.partial?g+"("+v+")?":"(?:"+g+"("+v+"))?":g+"("+v+")"}}return o?(n||(u+="(?:"+s+")?"),u+="$"===a?"$":"(?="+a+")"):(n||(u+="(?:"+s+"(?="+a+"))?"),c||(u+="(?="+s+"|"+a+")")),new RegExp("^"+u,f(r))},g=(e,t,r)=>e instanceof RegExp?((e,t)=>{if(!t)return e;var r=e.source.match(/\((?!\?)/g);if(r)for(var n=0;n<r.length;n++)t.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,pattern:null});return e})(e,t):Array.isArray(e)?((e,t,r)=>{for(var n=[],o=0;o<e.length;o++)n.push(g(e[o],t,r).source);return new RegExp("(?:"+n.join("|")+")",f(r))})(e,t,r):((e,t,r)=>d(((e,t)=>{for(var r,n=[],o=0,s=0,i="",a=t&&t.delimiter||"/",u=t&&t.delimiters||"./",f=!1;null!==(r=c.exec(e));){var d=r[0],g=r[1],v=r.index;if(i+=e.slice(s,v),s=v+d.length,g)i+=g[1],f=!0;else{var y="",h=e[s],w=r[2],m=r[3],x=r[4],R=r[5];if(!f&&i.length){var $=i.length-1;u.indexOf(i[$])>-1&&(y=i[$],i=i.slice(0,$))}i&&(n.push(i),i="",f=!1);var P=y||a,j=m||x;n.push({name:w||o++,prefix:y,delimiter:P,optional:"?"===R||"*"===R,repeat:"+"===R||"*"===R,partial:""!==y&&void 0!==h&&h!==y,pattern:j?l(j):"[^"+p(P)+"]+?"})}}return(i||s<e.length)&&n.push(i+e.substr(s)),n})(e,r),t,r))(e,t,r);let v=0;const y={},h=(e,t={})=>{const{exact:r=!1,strict:n=!1}=t,{re:o,keys:s}=((e,t)=>{const r=`${t.end}${t.strict}`,n=y[r]||(y[r]={}),o=JSON.stringify(e);if(n[o])return n[o];const s=[],i={re:g(e,s,t),keys:s};return v<1e4&&(n[o]=i,v+=1),i})(e,{end:r,strict:n});return e=>{const t=o.exec(e);if(!t)return;const[n,...i]=t;return r&&e!==n?void 0:s.reduce(((e,t,r)=>(e[t.name]=i[r],e)),{})}};export{i as R,s as c,h as m}
@@ -1 +1 @@
1
- import{r as a,h as e,e as i,a as s}from"./p-DScSUBy-.js";import{u as r}from"./p-D0uCfr1-.js";import{u as t}from"./p-yVO4JQ9P.js";const o=class{constructor(e){a(this,e)}async componentWillLoad(){this.os=await r(this.el),this.resource=await t(this.el)}render(){var a;return e(i,{key:"c7670fa2c000099af02d33a702a404e9889d4552"},e("section",{key:"1b3ce82d5101ec4c0b6e6df26ede473c7287b747"},e("article",{key:"b9929952d801ab53a848985af7ed08c18072a662"},e("h2",{key:"dc39c20da1730c6ea01b32a99dc8b0680a33b6c2"},"Attachments"),e("pos-attachments",{key:"65fd33e592be78e1a15ac9c2238321973a3f8612",ref:a=>this.attachmentsElement=a}))),e("section",{key:"4ebe089659ed2c517440a9ff06141f332e44c56d"},(null===(a=this.resource)||void 0===a?void 0:a.editable)?e("pos-upload",{accept:["*/*"],uploader:a=>{const e=this.os.attachments().uploadAndAddAttachment(this.resource,a);return e.map((e=>{this.attachmentsElement.addToList({uri:e.url,label:a.name})})),e}}):null))}get el(){return s(this)}};o.style=":host{display:flex;flex-direction:column;gap:var(--size-1);h2{margin:0;padding:0;font-size:var(--scale-2)}}:host{--gap-size:var(--size-1);display:flex;flex-direction:column;gap:var(--gap-size);margin:var(--gap-size)}section{display:flex;flex-direction:column;gap:var(--gap-size)}@media (min-width: 640px){:host{--gap-size:var(--size-4);flex-direction:row;flex-wrap:wrap;section{&:first-of-type{flex:1}}section:not(:first-of-type){flex:0 0 30%}}}article{padding:var(--size-2);display:flex;flex-direction:column;gap:var(--size-2);outline:var(--pos-border-solid);border-radius:var(--radius-sm);box-shadow:var(--shadow-md);background-color:var(--pos-card-background);header{display:flex;flex-direction:column;gap:var(--size-2);h1{margin:0}}}";export{o as pos_tool_attachments}
1
+ import{r as a,h as e,e as i,a as s}from"./p-Dunlf3Z7.js";import{u as r}from"./p-D0uCfr1-.js";import{u as t}from"./p-yVO4JQ9P.js";const o=class{constructor(e){a(this,e)}async componentWillLoad(){this.os=await r(this.el),this.resource=await t(this.el)}render(){var a;return e(i,{key:"c7670fa2c000099af02d33a702a404e9889d4552"},e("section",{key:"1b3ce82d5101ec4c0b6e6df26ede473c7287b747"},e("article",{key:"b9929952d801ab53a848985af7ed08c18072a662"},e("h2",{key:"dc39c20da1730c6ea01b32a99dc8b0680a33b6c2"},"Attachments"),e("pos-attachments",{key:"65fd33e592be78e1a15ac9c2238321973a3f8612",ref:a=>this.attachmentsElement=a}))),e("section",{key:"4ebe089659ed2c517440a9ff06141f332e44c56d"},(null===(a=this.resource)||void 0===a?void 0:a.editable)?e("pos-upload",{accept:["*/*"],uploader:a=>{const e=this.os.attachments().uploadAndAddAttachment(this.resource,a);return e.map((e=>{this.attachmentsElement.addToList({uri:e.url,label:a.name})})),e}}):null))}get el(){return s(this)}};o.style=":host{display:flex;flex-direction:column;gap:var(--size-1);h2{margin:0;padding:0;font-size:var(--scale-2)}}:host{--gap-size:var(--size-1);display:flex;flex-direction:column;gap:var(--gap-size);margin:var(--gap-size)}section{display:flex;flex-direction:column;gap:var(--gap-size)}@media (min-width: 640px){:host{--gap-size:var(--size-4);flex-direction:row;flex-wrap:wrap;section{&:first-of-type{flex:1}}section:not(:first-of-type){flex:0 0 30%}}}article{padding:var(--size-2);display:flex;flex-direction:column;gap:var(--size-2);outline:var(--pos-border-solid);border-radius:var(--radius-sm);box-shadow:var(--shadow-md);background-color:var(--pos-card-background);header{display:flex;flex-direction:column;gap:var(--size-2);h1{margin:0}}}";export{o as pos_tool_attachments}