@qratilabs/qrati-connect 2.25.0 → 2.26.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 (84) hide show
  1. package/element/1dmOpMwn2.js +1 -0
  2. package/element/2CzUGwUv.js +1 -0
  3. package/element/{CVRTTCyF.js → BBWyJmHC.js} +1 -1
  4. package/element/BNaRcekR2.js +1 -0
  5. package/element/BXZi_HIE.js +4 -0
  6. package/element/Bb4v1eCh2.js +14 -0
  7. package/element/{qQ9Xx6H32.js → BfPopwQu2.js} +8 -8
  8. package/element/{C9T-_wQ82.js → BlD6lUxS.js} +4 -4
  9. package/element/BlmPmkho.js +41 -0
  10. package/element/{iknPnbyg2.js → BmU1kgIz2.js} +28 -28
  11. package/element/Bo39kG4k2.js +1 -0
  12. package/element/{CJXPO3HP.js → Bt5DH8OK.js} +1 -1
  13. package/element/{BccTn5v-2.js → BvrbBj1F.js} +1 -1
  14. package/element/BwwxqSTC2.js +1 -0
  15. package/element/{CgUphJWo.js → C7zv6hcG.js} +1 -1
  16. package/element/CBLQRRGX2.js +3 -0
  17. package/element/{BV9JHI5n2.js → CCDjXLSf.js} +35 -35
  18. package/element/CD7ZeUsI2.js +9 -0
  19. package/element/CDUjv5F52.js +1 -0
  20. package/element/{CATr-3VW.js → CE4Zhv-W.js} +1 -1
  21. package/element/{CsfDBJh72.js → CM46pkhP2.js} +2 -2
  22. package/element/CMR1TPJ1.js +3 -0
  23. package/element/CVdpS1mF2.js +9 -0
  24. package/element/{DF0LxcV7.js → CitgNM58.js} +1 -1
  25. package/element/{mQzpzQ_t.js → CpYO5bBq.js} +1 -1
  26. package/element/Cqyszkb5.js +1 -0
  27. package/element/{C3dOFk9A.js → CtWIgfGz.js} +1 -1
  28. package/element/CtxIOzTC2.js +1 -0
  29. package/element/Cw3szkAB.js +1 -0
  30. package/element/CwPz_TbG.js +4 -0
  31. package/element/CzHEb5lR2.js +36 -0
  32. package/element/D6nJgjWV.js +5 -0
  33. package/element/{DlqJDAie2.js → D9UPX_0d2.js} +1 -1
  34. package/element/DAjJ8IJf.js +1 -0
  35. package/element/{iuooW4mt.js → DBUAmPz_.js} +8 -8
  36. package/element/DDyjgYNE.js +1 -0
  37. package/element/{Ctl9NdWl2.js → DER_7fjj2.js} +1 -1
  38. package/element/DLSVYuRG.js +8 -0
  39. package/element/DdACKOZr.js +1 -0
  40. package/element/DhbEeiM3.js +8 -0
  41. package/element/DpD2Abx9.js +1 -0
  42. package/element/DvW8TE7T.js +1 -0
  43. package/element/{DGbyGc8b.js → DwanMJWW.js} +1 -1
  44. package/element/KcnPb5CZ.js +1 -0
  45. package/element/L4hWU3Nc.js +1 -0
  46. package/element/{ChJXhA9c.js → OGzsLhnG.js} +1 -1
  47. package/element/{BCTYvPrD.js → OnH8Izqn.js} +1 -1
  48. package/element/Ot24jlyb2.js +1 -0
  49. package/element/{DZtaQWVG2.js → PRmGsKkz2.js} +1 -1
  50. package/element/PVzBLdl-2.js +5 -0
  51. package/element/VF9qDLJE2.js +1 -0
  52. package/element/{2CMH9VMM.js → X0P7ujR0.js} +1 -1
  53. package/element/b3Wjw4T02.js +16 -0
  54. package/element/{DnQ6XaLR.js → nOtAuUm1.js} +1 -1
  55. package/element/uIYtFcCq2.js +93 -0
  56. package/element/web.es.js +42 -42
  57. package/element/xW6UboQF.js +3 -0
  58. package/package.json +1 -1
  59. package/element/BFCgbC5I2.js +0 -14
  60. package/element/BZu3c37u.js +0 -1
  61. package/element/BxbojrJs.js +0 -8
  62. package/element/C12iSy3L.js +0 -1
  63. package/element/C6dzWeQk2.js +0 -93
  64. package/element/C7iuJ0h32.js +0 -35
  65. package/element/C9kBlCZx2.js +0 -3
  66. package/element/CM46vluW.js +0 -1
  67. package/element/CMnzxWwG.js +0 -9
  68. package/element/CZbEGemi2.js +0 -4
  69. package/element/CaX2xgrP.js +0 -41
  70. package/element/Cko4QHwX.js +0 -1
  71. package/element/CqBk9L5O.js +0 -1
  72. package/element/D5TKEdBd2.js +0 -3
  73. package/element/DCj_fMN5.js +0 -5
  74. package/element/DRP9vxts2.js +0 -4
  75. package/element/DWjheKBP2.js +0 -3
  76. package/element/EjMoIoSK.js +0 -1
  77. package/element/Z0-Tddye2.js +0 -16
  78. package/element/ZYvo9BjF2.js +0 -8
  79. package/element/dT6WSX65.js +0 -1
  80. package/element/h4ZjZXfe2.js +0 -1
  81. package/element/rg8L51I62.js +0 -5
  82. /package/element/{CfMNBPpx2.js → CfMNBPpx.js} +0 -0
  83. /package/element/{DPg_DKOi.js → DPg_DKOi2.js} +0 -0
  84. /package/element/{DnIueBGr2.js → DnIueBGr.js} +0 -0
@@ -0,0 +1 @@
1
+ function t(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function e(t,e){return t.x=e.x,t.y=e.y,void 0!==e.id&&(t.id=e.id),t}function i(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function s(t,e){const i=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);return Math.sqrt(i*i+s*s)}function n(t,e){return t.x===e.x&&t.y===e.y}function a(t,e,i){return Math.min(Math.max(t,e),i)}function h(t,e,i){let s=`translate3d(${t}px,${e||0}px,0)`;return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}function r(t,e,i,s){t.style.transform=h(e,i,s)}function o(t,e,i,s){t.style.transition=e?`${e} ${i}ms ${s||"cubic-bezier(.4,0,.22,1)"}`:"none"}function d(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}function l(t){o(t)}function c(t){return"decode"in t?t.decode().catch(()=>{}):t.complete?Promise.resolve(t):new Promise((e,i)=>{t.onload=()=>e(t),t.onerror=i})}var p="loading",m="loaded",u="error";function y(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function f(t,e,i=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:e;n&&(s=Array.from(i.querySelectorAll(n)))}return s}function g(t){return"function"==typeof t&&t.prototype&&t.prototype.goTo}function v(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}var I=class{constructor(e,i){if(this.element=t("pswp__img pswp__img--placeholder",e?"img":"div",i),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(d(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=h(0,0,t/250)):d(this.element,t,e))}destroy(){this.element?.parentNode&&this.element.remove(),this.element=null}},w=class{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.hash=this.data.hash,this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(e,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new I(t,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=t("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=t("pswp__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const e=this.element;this.updateSrcsetSizes(),this.data.srcset&&(e.srcset=this.data.srcset),e.src=this.data.src??"",e.alt=this.data.alt??"",this.state=p,e.complete?this.onLoaded():(e.onload=()=>{this.onLoaded()},e.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=m,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==m&&this.state!==u||this.removePlaceholder())}onError(){this.state=u,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===p,this)}isError(){return this.state===u}isImageContent(){return"image"===this.type||"ad"===this.type}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(d(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==u,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=`${e}px`,t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){let e=t("pswp__error-msg","div");e.innerText=this.instance.options?.errorMsg??"",e=this.instance.applyFilters("contentErrorElement",e,this),this.element=t("pswp__content pswp__error-msg-container","div"),this.element.appendChild(e),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===u)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||v())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!v()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==m&&this.state!==u||this.removePlaceholder()))}};function _(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function x(t,e,i,s,n){let a=0;if(e.paddingFn)a=e.paddingFn(i,s,n)[t];else if(e.padding)a=e.padding[t];else{const i=`padding${t[0].toUpperCase()}${t.slice(1)}`;e[i]&&(a=e[i])}return Number(a)||0}function S(t,e,i,s){return{x:e.x-x("left",t,e,i,s)-x("right",t,e,i,s),y:e.y-x("top",t,e,i,s)-x("bottom",t,e,i,s)}}var C=class{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const n=i.x/s.x,a=i.y/s.y;this.fit=Math.min(1,n<a?n:a),this.fill=Math.min(1,n>a?n:a),this.vFill=Math.min(1,a),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=`${t}ZoomLevel`,i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}};function z(t,e,i){const s=e.createContentFromData(t,i);let n;const{options:a}=e;if(a){let h;n=new C(a,t,-1),h=e.pswp?e.pswp.viewportSize:_(a,e);const r=S(a,h,t,i);n.update(s.width,s.height,r)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}function L(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return z(i,e,t)}var D=class{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this._cachedItems=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,s=void 0===t||t>=0;let n;for(n=0;n<=i[1];n++)this.loadSlideByIndex(e.currIndex+(s?n:-n));for(n=1;n<=i[0];n++)this.loadSlideByIndex(e.currIndex+(s?-n:n))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=L(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const t=this._cachedItems.findIndex(t=>!t.isAttached&&!t.hasSlide);-1!==t&&this._cachedItems.splice(t,1)[0].destroy()}}removeByIndex(t){const e=this._cachedItems.findIndex(e=>e.index===t);-1!==e&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find(e=>e.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}},E=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},A=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){this._filters[t]||(this._filters[t]=[]),this._filters[t]?.push({fn:e,priority:i}),this._filters[t]?.sort((t,e)=>t.priority-e.priority),this.pswp?.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(t=>t.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){return this._filters[t]?.forEach(t=>{e[0]=t.fn.apply(this,e)}),e[0]}on(t,e){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t]?.push(e),this.pswp?.on(t,e)}off(t,e){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(t=>e!==t)),this.pswp?.off(t,e)}dispatch(t,e){if(this.pswp)return this.pswp.dispatch(t,e);const i=new E(t,e);return this._listeners[t]?.forEach(t=>{t.call(this,i)}),i}},F=class extends A{getNumItems(){let t=0;const e=this.options?.dataSource;e&&"length"in e?t=e.length:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),e.items&&(t=e.items.length));const i=this.dispatch("numItems",{dataSource:e,numItems:t});return this.applyFilters("numItems",i.numItems,e)}createContentFromData(t,e){return new w(t,this,e)}getItemData(t){const e=this.options?.dataSource;let i={};Array.isArray(e)?i=e[t]:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),i=e.items[t]);let s=i;s instanceof Element&&(s=this._domElementToItemData(s));const n=this.dispatch("itemData",{itemData:s||{},index:t});return this.applyFilters("itemData",n.itemData,t)}_getGalleryDOMElements(t){return this.options?.children||this.options?.childSelector?f(this.options.children,this.options.childSelector,t)||[]:[t]}_toLowerCaseFirstLetter(t){return t?t.charAt(0).toLowerCase()+t.slice(1):t}_domElementToItemData(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,i.dataset.pswpType&&(e.type=i.dataset.pswpType.toLowerCase());const s=t.querySelector("img");s&&(e.msrc=s.currentSrc||s.src,e.alt=s.getAttribute("alt")??""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0);const n=["element","src","srcset","width","height","type","msrc","alt","thumbCropped"];Object.keys(i.dataset).filter(t=>t.startsWith("pswp")&&!n.includes(this._toLowerCaseFirstLetter(t.slice(4)))).forEach(t=>{e[this._toLowerCaseFirstLetter(t.slice(4))]=i.dataset[t]})}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return z(t,this,e)}};export{i as _,S as a,y as b,a as c,e as d,s as f,l as g,n as h,C as i,t as l,g as m,D as n,_ as o,f as p,L as r,x as s,F as t,c as u,r as v,h as x,o as y};
@@ -1,4 +1,4 @@
1
- import{E as t,S as e,_ as n,f as s,h as r,p as i,t as a,v as o,w as l,y as c}from"./DrrpB4Om.js";import{i as u}from"./CaX2xgrP.js";var h=t(null),p=t(null),d=class{entries;index=0;listeners=/* @__PURE__ */new Set;constructor(t="/"){this.entries=[{path:t}]}get location(){return this.entries[this.index]?.path??"/"}get state(){return this.entries[this.index]?.state}push(t,e){this.entries=this.entries.slice(0,this.index+1),this.index=this.entries.push({path:t,state:e})-1,this.notify()}replace(t,e){this.entries[this.index]={path:t,state:e},this.notify()}go(t){const e=this.index+t;e>=0&&e<this.entries.length&&(this.index=e,this.notify())}listen(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t(this.location))}},f=class{listeners=/* @__PURE__ */new Set;get location(){return window.location.hash.replace(/^#/,"")||"/"}get state(){return window.history.state?.__qrati_state}makeUrl(t){return`${window.location.pathname+window.location.search}#${t}`}push(t,e){window.history.pushState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}replace(t,e){window.history.replaceState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}go(t){window.history.go(t)}listen(t){this.listeners.add(t);const e=()=>this.notify();return window.addEventListener("popstate",e),window.addEventListener("hashchange",e),queueMicrotask(()=>t(this.location)),()=>{this.listeners.delete(t),window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)}}notify(){this.listeners.forEach(t=>t(this.location))}};function m(){const t=c(p);if(!t)throw new Error("useParams must be used inside a Route");return t.params}function w(){const t=c(h);if(!t)throw new Error("useNavigate must be used inside a Router");const{navigate:e,go:n}=t;return o((t,s)=>{"number"!=typeof t?e(t,s):n(t)},[e,n])}function y(){const t=c(h);if(!t)throw new Error("useLocation must be used inside a Router");return{pathname:t.location,state:t.state,search:"",hash:""}}function v(t,e,n=!0){const s=t.split("/").filter(Boolean),r=function(t){const e=[],n=t.split("/").filter(Boolean);for(const s of n)if("*"===s)e.push({type:"wildcard"});else if(s.startsWith(":")){const t=s.endsWith("?"),n=t?s.slice(1,-1):s.slice(1);e.push({type:"param",name:n,optional:t})}else e.push({type:"static",value:s});return e}(e),i={};let a=0;for(const o of r)if("static"===o.type){if(s[a]!==o.value)return null;a++}else if("param"===o.type){if(a<s.length){try{i[o.name]=decodeURIComponent(s[a])}catch{i[o.name]=s[a]}a++}else if(!o.optional)return null}else if("wildcard"===o.type){i["*"]=s.slice(a).join("/"),a=s.length;break}return n&&a<s.length?null:{params:i}}function g(t,e){return e.startsWith("/")?e:t.endsWith("/")?t+e:`${t}/${e}`}function k(t,e,n=""){for(const s of e){const e=s.path.startsWith("/")?s.path:g(n,s.path);if(s.children&&s.children.length>0){const n=v(t,e,!1);if(n){const r=[{route:s,params:n.params}],i=k(t,s.children,e);if(i)r.push(...i);else{const t=s.children.find(t=>""===t.path);t&&r.push({route:t,params:{}})}return r}}const r=v(t,e,!0);if(r)return[{route:s,params:r.params}]}return null}function E({mode:t,initialPath:e,children:l}){const c=s("memory"===t?new d(e):new f),[u,p]=r(c.current.location),[m,w]=r(c.current.state);n(()=>(p(c.current.location),w(c.current.state),c.current.listen(t=>{p(t),w(c.current.state)})),[]);const y=o((t,e)=>{const n=c.current;e&&e.replace?n.replace(t,e.state):n.push(t,e?.state)},[]),v=o(t=>{c.current.go(t)},[]),g=i(()=>({location:u,state:m,navigate:y,go:v,mode:t}),[u,m,y,v,t]);/* @__PURE__ */
1
+ import{E as t,S as e,_ as n,f as s,h as r,p as i,t as a,v as o,w as l,y as c}from"./DrrpB4Om.js";import{i as u}from"./BlmPmkho.js";var h=t(null),p=t(null),d=class{entries;index=0;listeners=/* @__PURE__ */new Set;constructor(t="/"){this.entries=[{path:t}]}get location(){return this.entries[this.index]?.path??"/"}get state(){return this.entries[this.index]?.state}push(t,e){this.entries=this.entries.slice(0,this.index+1),this.index=this.entries.push({path:t,state:e})-1,this.notify()}replace(t,e){this.entries[this.index]={path:t,state:e},this.notify()}go(t){const e=this.index+t;e>=0&&e<this.entries.length&&(this.index=e,this.notify())}listen(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t(this.location))}},f=class{listeners=/* @__PURE__ */new Set;get location(){return window.location.hash.replace(/^#/,"")||"/"}get state(){return window.history.state?.__qrati_state}makeUrl(t){return`${window.location.pathname+window.location.search}#${t}`}push(t,e){window.history.pushState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}replace(t,e){window.history.replaceState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}go(t){window.history.go(t)}listen(t){this.listeners.add(t);const e=()=>this.notify();return window.addEventListener("popstate",e),window.addEventListener("hashchange",e),queueMicrotask(()=>t(this.location)),()=>{this.listeners.delete(t),window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)}}notify(){this.listeners.forEach(t=>t(this.location))}};function m(){const t=c(p);if(!t)throw new Error("useParams must be used inside a Route");return t.params}function w(){const t=c(h);if(!t)throw new Error("useNavigate must be used inside a Router");const{navigate:e,go:n}=t;return o((t,s)=>{"number"!=typeof t?e(t,s):n(t)},[e,n])}function y(){const t=c(h);if(!t)throw new Error("useLocation must be used inside a Router");return{pathname:t.location,state:t.state,search:"",hash:""}}function v(t,e,n=!0){const s=t.split("/").filter(Boolean),r=function(t){const e=[],n=t.split("/").filter(Boolean);for(const s of n)if("*"===s)e.push({type:"wildcard"});else if(s.startsWith(":")){const t=s.endsWith("?"),n=t?s.slice(1,-1):s.slice(1);e.push({type:"param",name:n,optional:t})}else e.push({type:"static",value:s});return e}(e),i={};let a=0;for(const o of r)if("static"===o.type){if(s[a]!==o.value)return null;a++}else if("param"===o.type){if(a<s.length){try{i[o.name]=decodeURIComponent(s[a])}catch{i[o.name]=s[a]}a++}else if(!o.optional)return null}else if("wildcard"===o.type){i["*"]=s.slice(a).join("/"),a=s.length;break}return n&&a<s.length?null:{params:i}}function g(t,e){return e.startsWith("/")?e:t.endsWith("/")?t+e:`${t}/${e}`}function k(t,e,n=""){for(const s of e){const e=s.path.startsWith("/")?s.path:g(n,s.path);if(s.children&&s.children.length>0){const n=v(t,e,!1);if(n){const r=[{route:s,params:n.params}],i=k(t,s.children,e);if(i)r.push(...i);else{const t=s.children.find(t=>""===t.path);t&&r.push({route:t,params:{}})}return r}}const r=v(t,e,!0);if(r)return[{route:s,params:r.params}]}return null}function E({mode:t,initialPath:e,children:l}){const c=s("memory"===t?new d(e):new f),[u,p]=r(c.current.location),[m,w]=r(c.current.state);n(()=>(p(c.current.location),w(c.current.state),c.current.listen(t=>{p(t),w(c.current.state)})),[]);const y=o((t,e)=>{const n=c.current;e&&e.replace?n.replace(t,e.state):n.push(t,e?.state)},[]),v=o(t=>{c.current.go(t)},[]),g=i(()=>({location:u,state:m,navigate:y,go:v,mode:t}),[u,m,y,v,t]);/* @__PURE__ */
2
2
  return a(h.Provider,{value:g,children:l})}function _(t){return null}function x(t){return e(t).filter(t=>t?.type===_).map(t=>({path:t.props.path,element:t.props.element,children:t.props.children?x(t.props.children):void 0}))}function C({children:t}){const{location:n}=c(h),r=s([]),o=e(t).filter(t=>t?.type===_).map(t=>t.props.path).join("\0"),u=s("");o!==u.current&&(u.current=o,r.current=x(t));const d=r.current,f=i(()=>k(n,d),[n,d]),m=i(()=>(f??[]).reduce((t,e)=>({...t,...e.params}),{}),[f]),w=i(()=>{if(!f)return null;let t=null;for(let e=f.length-1;e>=0;e--){const n=f[e].route.element;t=/* @__PURE__ */a(p.Provider,{value:{params:m,outlet:t},children:/* @__PURE__ */a(n,{})})}return t},[f,m]);return f?/* @__PURE__ */a(l,{children:w}):null}function N(){/* @__PURE__ */
3
3
  return a(l,{children:c(p)?.outlet})}function W({to:t,state:e,replace:n,children:s,className:r,onClick:i,...l}){const u=c(h);/* @__PURE__ */
4
4
  return a("a",{href:t,onClick:o(s=>{s.preventDefault(),i?.(s),u?.navigate(t,{state:e,replace:n})},[u,t,e,n,i]),className:r,...l,children:s})}function b({to:t,state:e,replace:n,children:s,className:r,activeClassName:l,onClick:p,...d}){const f=c(h),m=i(()=>{if(!f)return!1;const e=f.location;return e===t||!("/"===t||!e.startsWith(`${t}/`))},[f?.location,t]);/* @__PURE__ */