snice 4.15.0 → 4.16.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.
- package/adapters/react/input.d.ts +3 -0
- package/adapters/react/input.d.ts.map +1 -1
- package/adapters/react/input.js +1 -1
- package/adapters/react/input.js.map +1 -1
- package/adapters/react/input.tsx +4 -1
- package/dist/cdn/accordion/snice-accordion.js +1 -1
- package/dist/cdn/accordion/snice-accordion.min.js +1 -1
- package/dist/cdn/alert/snice-alert.js +1 -1
- package/dist/cdn/alert/snice-alert.min.js +1 -1
- package/dist/cdn/app-tiles/snice-app-tiles.js +1 -1
- package/dist/cdn/app-tiles/snice-app-tiles.min.js +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.js +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.min.js +1 -1
- package/dist/cdn/avatar/snice-avatar.js +1 -1
- package/dist/cdn/avatar/snice-avatar.min.js +1 -1
- package/dist/cdn/badge/snice-badge.js +1 -1
- package/dist/cdn/badge/snice-badge.min.js +1 -1
- package/dist/cdn/banner/snice-banner.js +1 -1
- package/dist/cdn/banner/snice-banner.min.js +1 -1
- package/dist/cdn/book/snice-book.js +1 -1
- package/dist/cdn/book/snice-book.min.js +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.js +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.min.js +1 -1
- package/dist/cdn/button/snice-button.js +1 -1
- package/dist/cdn/button/snice-button.min.js +1 -1
- package/dist/cdn/calendar/snice-calendar.js +1 -1
- package/dist/cdn/calendar/snice-calendar.min.js +1 -1
- package/dist/cdn/camera/snice-camera.js +1 -1
- package/dist/cdn/camera/snice-camera.min.js +1 -1
- package/dist/cdn/camera-annotate/snice-camera-annotate.js +1 -1
- package/dist/cdn/camera-annotate/snice-camera-annotate.min.js +1 -1
- package/dist/cdn/candlestick/snice-candlestick.js +1 -1
- package/dist/cdn/candlestick/snice-candlestick.min.js +1 -1
- package/dist/cdn/card/snice-card.js +1 -1
- package/dist/cdn/card/snice-card.min.js +1 -1
- package/dist/cdn/carousel/snice-carousel.js +1 -1
- package/dist/cdn/carousel/snice-carousel.min.js +1 -1
- package/dist/cdn/chart/snice-chart.js +1 -1
- package/dist/cdn/chart/snice-chart.min.js +1 -1
- package/dist/cdn/chat/snice-chat.js +1 -1
- package/dist/cdn/chat/snice-chat.min.js +1 -1
- package/dist/cdn/checkbox/snice-checkbox.js +1 -1
- package/dist/cdn/checkbox/snice-checkbox.min.js +1 -1
- package/dist/cdn/chip/snice-chip.js +1 -1
- package/dist/cdn/chip/snice-chip.min.js +1 -1
- package/dist/cdn/code-block/snice-code-block.js +1 -1
- package/dist/cdn/code-block/snice-code-block.min.js +1 -1
- package/dist/cdn/color-display/snice-color-display.js +1 -1
- package/dist/cdn/color-display/snice-color-display.min.js +1 -1
- package/dist/cdn/color-picker/snice-color-picker.js +1 -1
- package/dist/cdn/color-picker/snice-color-picker.min.js +1 -1
- package/dist/cdn/command-palette/snice-command-palette.js +1 -1
- package/dist/cdn/command-palette/snice-command-palette.min.js +1 -1
- package/dist/cdn/comments/snice-comments.js +1 -1
- package/dist/cdn/comments/snice-comments.min.js +1 -1
- package/dist/cdn/countdown/snice-countdown.js +1 -1
- package/dist/cdn/countdown/snice-countdown.min.js +1 -1
- package/dist/cdn/cropper/snice-cropper.js +1 -1
- package/dist/cdn/cropper/snice-cropper.min.js +1 -1
- package/dist/cdn/date-picker/snice-date-picker.js +1 -1
- package/dist/cdn/date-picker/snice-date-picker.min.js +1 -1
- package/dist/cdn/diff/snice-diff.js +1 -1
- package/dist/cdn/diff/snice-diff.min.js +1 -1
- package/dist/cdn/divider/snice-divider.js +1 -1
- package/dist/cdn/divider/snice-divider.min.js +1 -1
- package/dist/cdn/doc/snice-doc.js +1 -1
- package/dist/cdn/doc/snice-doc.min.js +1 -1
- package/dist/cdn/draw/snice-draw.js +1 -1
- package/dist/cdn/draw/snice-draw.min.js +1 -1
- package/dist/cdn/drawer/snice-drawer.js +1 -1
- package/dist/cdn/drawer/snice-drawer.min.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.min.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.min.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.min.js +1 -1
- package/dist/cdn/flip-card/snice-flip-card.js +1 -1
- package/dist/cdn/flip-card/snice-flip-card.min.js +1 -1
- package/dist/cdn/flow/snice-flow.js +1 -1
- package/dist/cdn/flow/snice-flow.min.js +1 -1
- package/dist/cdn/funnel/snice-funnel.js +1 -1
- package/dist/cdn/funnel/snice-funnel.min.js +1 -1
- package/dist/cdn/gantt/snice-gantt.js +1 -1
- package/dist/cdn/gantt/snice-gantt.min.js +1 -1
- package/dist/cdn/gauge/snice-gauge.js +1 -1
- package/dist/cdn/gauge/snice-gauge.min.js +1 -1
- package/dist/cdn/heatmap/snice-heatmap.js +1 -1
- package/dist/cdn/heatmap/snice-heatmap.min.js +1 -1
- package/dist/cdn/image/snice-image.js +1 -1
- package/dist/cdn/image/snice-image.min.js +1 -1
- package/dist/cdn/input/README.md +2 -2
- package/dist/cdn/input/snice-input.js +21 -3
- package/dist/cdn/input/snice-input.js.map +1 -1
- package/dist/cdn/input/snice-input.min.js +3 -3
- package/dist/cdn/input/snice-input.min.js.map +1 -1
- package/dist/cdn/kanban/snice-kanban.js +1 -1
- package/dist/cdn/kanban/snice-kanban.min.js +1 -1
- package/dist/cdn/kpi/snice-kpi.js +1 -1
- package/dist/cdn/kpi/snice-kpi.min.js +1 -1
- package/dist/cdn/layout/snice-layout.js +1 -1
- package/dist/cdn/layout/snice-layout.min.js +1 -1
- package/dist/cdn/link/snice-link.js +1 -1
- package/dist/cdn/link/snice-link.min.js +1 -1
- package/dist/cdn/link-preview/snice-link-preview.js +1 -1
- package/dist/cdn/link-preview/snice-link-preview.min.js +1 -1
- package/dist/cdn/list/snice-list.js +1 -1
- package/dist/cdn/list/snice-list.min.js +1 -1
- package/dist/cdn/location/snice-location.js +1 -1
- package/dist/cdn/location/snice-location.min.js +1 -1
- package/dist/cdn/login/snice-login.js +1 -1
- package/dist/cdn/login/snice-login.min.js +1 -1
- package/dist/cdn/map/snice-map.js +1 -1
- package/dist/cdn/map/snice-map.min.js +1 -1
- package/dist/cdn/markdown/snice-markdown.js +1 -1
- package/dist/cdn/markdown/snice-markdown.min.js +1 -1
- package/dist/cdn/masonry/snice-masonry.js +1 -1
- package/dist/cdn/masonry/snice-masonry.min.js +1 -1
- package/dist/cdn/menu/snice-menu.js +1 -1
- package/dist/cdn/menu/snice-menu.min.js +1 -1
- package/dist/cdn/modal/snice-modal.js +1 -1
- package/dist/cdn/modal/snice-modal.min.js +1 -1
- package/dist/cdn/music-player/snice-music-player.js +1 -1
- package/dist/cdn/music-player/snice-music-player.min.js +1 -1
- package/dist/cdn/nav/snice-nav.js +1 -1
- package/dist/cdn/nav/snice-nav.min.js +1 -1
- package/dist/cdn/network-graph/snice-network-graph.js +1 -1
- package/dist/cdn/network-graph/snice-network-graph.min.js +1 -1
- package/dist/cdn/notification-center/snice-notification-center.js +1 -1
- package/dist/cdn/notification-center/snice-notification-center.min.js +1 -1
- package/dist/cdn/org-chart/snice-org-chart.js +1 -1
- package/dist/cdn/org-chart/snice-org-chart.min.js +1 -1
- package/dist/cdn/pagination/snice-pagination.js +1 -1
- package/dist/cdn/pagination/snice-pagination.min.js +1 -1
- package/dist/cdn/paint/snice-paint.js +1 -1
- package/dist/cdn/paint/snice-paint.min.js +1 -1
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.js +1 -1
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.min.js +1 -1
- package/dist/cdn/podcast-player/snice-podcast-player.js +1 -1
- package/dist/cdn/podcast-player/snice-podcast-player.min.js +1 -1
- package/dist/cdn/pricing-table/snice-pricing-table.js +1 -1
- package/dist/cdn/pricing-table/snice-pricing-table.min.js +1 -1
- package/dist/cdn/progress/snice-progress.js +1 -1
- package/dist/cdn/progress/snice-progress.min.js +1 -1
- package/dist/cdn/qr-code/snice-qr-code.js +1 -1
- package/dist/cdn/qr-code/snice-qr-code.min.js +1 -1
- package/dist/cdn/qr-reader/snice-qr-reader.js +1 -1
- package/dist/cdn/qr-reader/snice-qr-reader.min.js +1 -1
- package/dist/cdn/radio/snice-radio.js +1 -1
- package/dist/cdn/radio/snice-radio.min.js +1 -1
- package/dist/cdn/rating/snice-rating.js +1 -1
- package/dist/cdn/rating/snice-rating.min.js +1 -1
- package/dist/cdn/recipe/snice-recipe.js +1 -1
- package/dist/cdn/recipe/snice-recipe.min.js +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.js +3 -3
- package/dist/cdn/runtime/snice-runtime.esm.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.min.js +3 -3
- package/dist/cdn/runtime/snice-runtime.esm.min.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.js +3 -3
- package/dist/cdn/runtime/snice-runtime.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.min.js +3 -3
- package/dist/cdn/runtime/snice-runtime.min.js.map +1 -1
- package/dist/cdn/sankey/snice-sankey.js +1 -1
- package/dist/cdn/sankey/snice-sankey.min.js +1 -1
- package/dist/cdn/select/snice-select.js +1 -1
- package/dist/cdn/select/snice-select.min.js +1 -1
- package/dist/cdn/skeleton/snice-skeleton.js +1 -1
- package/dist/cdn/skeleton/snice-skeleton.min.js +1 -1
- package/dist/cdn/slider/snice-slider.js +1 -1
- package/dist/cdn/slider/snice-slider.min.js +1 -1
- package/dist/cdn/sortable/snice-sortable.js +1 -1
- package/dist/cdn/sortable/snice-sortable.min.js +1 -1
- package/dist/cdn/sparkline/snice-sparkline.js +1 -1
- package/dist/cdn/sparkline/snice-sparkline.min.js +1 -1
- package/dist/cdn/spinner/snice-spinner.js +1 -1
- package/dist/cdn/spinner/snice-spinner.min.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.min.js +1 -1
- package/dist/cdn/spotlight/snice-spotlight.js +1 -1
- package/dist/cdn/spotlight/snice-spotlight.min.js +1 -1
- package/dist/cdn/spreadsheet/snice-spreadsheet.js +1 -1
- package/dist/cdn/spreadsheet/snice-spreadsheet.min.js +1 -1
- package/dist/cdn/stepper/snice-stepper.js +1 -1
- package/dist/cdn/stepper/snice-stepper.min.js +1 -1
- package/dist/cdn/switch/snice-switch.js +1 -1
- package/dist/cdn/switch/snice-switch.min.js +1 -1
- package/dist/cdn/table/README.md +2 -2
- package/dist/cdn/table/snice-table.js +21 -3
- package/dist/cdn/table/snice-table.js.map +1 -1
- package/dist/cdn/table/snice-table.min.js +29 -29
- package/dist/cdn/table/snice-table.min.js.map +1 -1
- package/dist/cdn/tabs/snice-tabs.js +1 -1
- package/dist/cdn/tabs/snice-tabs.min.js +1 -1
- package/dist/cdn/tag-input/snice-tag-input.js +1 -1
- package/dist/cdn/tag-input/snice-tag-input.min.js +1 -1
- package/dist/cdn/terminal/snice-terminal.js +1 -1
- package/dist/cdn/terminal/snice-terminal.min.js +1 -1
- package/dist/cdn/testimonial/snice-testimonial.js +1 -1
- package/dist/cdn/testimonial/snice-testimonial.min.js +1 -1
- package/dist/cdn/textarea/snice-textarea.js +1 -1
- package/dist/cdn/textarea/snice-textarea.min.js +1 -1
- package/dist/cdn/time-range-picker/snice-time-range-picker.js +1 -1
- package/dist/cdn/time-range-picker/snice-time-range-picker.min.js +1 -1
- package/dist/cdn/timeline/snice-timeline.js +1 -1
- package/dist/cdn/timeline/snice-timeline.min.js +1 -1
- package/dist/cdn/timer/snice-timer.js +1 -1
- package/dist/cdn/timer/snice-timer.min.js +1 -1
- package/dist/cdn/toast/snice-toast.js +1 -1
- package/dist/cdn/toast/snice-toast.min.js +1 -1
- package/dist/cdn/tooltip/snice-tooltip.js +1 -1
- package/dist/cdn/tooltip/snice-tooltip.min.js +1 -1
- package/dist/cdn/tree/snice-tree.js +1 -1
- package/dist/cdn/tree/snice-tree.min.js +1 -1
- package/dist/cdn/treemap/snice-treemap.js +1 -1
- package/dist/cdn/treemap/snice-treemap.min.js +1 -1
- package/dist/cdn/video-player/snice-video-player.js +1 -1
- package/dist/cdn/video-player/snice-video-player.min.js +1 -1
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.js +1 -1
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.min.js +1 -1
- package/dist/cdn/waterfall/snice-waterfall.js +1 -1
- package/dist/cdn/waterfall/snice-waterfall.min.js +1 -1
- package/dist/cdn/weather/snice-weather.js +1 -1
- package/dist/cdn/weather/snice-weather.min.js +1 -1
- package/dist/components/input/snice-input.d.ts +3 -0
- package/dist/components/input/snice-input.js +20 -2
- package/dist/components/input/snice-input.js.map +1 -1
- package/dist/components/input/snice-input.types.d.ts +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +1 -1
- package/dist/symbols.cjs +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/transitions.cjs +1 -1
- package/dist/transitions.esm.js +1 -1
- package/docs/ai/components/input.md +10 -0
- package/docs/components/input.md +20 -0
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* snice v4.
|
|
2
|
+
* snice v4.15.0
|
|
3
3
|
* Imperative TypeScript framework for building vanilla web components with decorators, differential rendering, routing, and controllers. No virtual DOM, no build complexity.
|
|
4
4
|
* (c) 2024
|
|
5
5
|
* Released under the MIT License.
|
|
6
6
|
*/
|
|
7
7
|
/*!
|
|
8
|
-
* snice v4.
|
|
8
|
+
* snice v4.15.0
|
|
9
9
|
* Imperative TypeScript framework for building vanilla web components with decorators, differential rendering, routing, and controllers. No virtual DOM, no build complexity.
|
|
10
10
|
* (c) 2024
|
|
11
11
|
* Released under the MIT License.
|
|
@@ -18,7 +18,7 @@ globalThis.snice||(globalThis.snice={controllerRegistry:new Map,controllerIdCoun
|
|
|
18
18
|
* Released under the MIT License.
|
|
19
19
|
*/class ke{constructor(t){this.parsed=this.parsePattern(t)}get spec(){return this.parsed.template}parsePattern(t){let e=t,n="",o=!1;const s=t.indexOf("?");return-1!==s&&(e=t.slice(0,s),n=t.slice(s+1),e.endsWith("(")&&n.endsWith(")")&&(o=!0,e=e.slice(0,-1),n=n.slice(0,-1))),{pathSegments:this.parseSegments(e),querySegments:n?this.parseQuerySegments(n):[],queryOptional:o,template:t}}parseSegments(t){const e=[];let n=0;for(;n<t.length;){switch(t[n]){case"(":const{segments:o,endIndex:s}=this.parseOptionalGroup(t,n);e.push({type:"optional",segments:o}),n=s+1;break;case":":const{name:r,endIndex:i}=this.parseIdentifier(t,n+1);e.push({type:"param",name:r}),n=i;break;case"*":const{name:a,endIndex:l}=this.parseIdentifier(t,n+1);e.push({type:"splat",name:a}),n=l;break;default:const{value:c,endIndex:u}=this.parseLiteral(t,n);c&&e.push({type:"literal",value:c}),n=u}}return e}parseOptionalGroup(t,e){let n=1,o=e+1;for(;o<t.length&&n>0;)"("===t[o]&&n++,")"===t[o]&&n--,o++;const s=t.slice(e+1,o-1);return{segments:this.parseSegments(s),endIndex:o-1}}parseIdentifier(t,e){let n=e;for(;n<t.length&&/[\w-]/.test(t[n]);)n++;return{name:t.slice(e,n),endIndex:n}}parseLiteral(t,e){let n=e;for(;n<t.length&&!"(:*(".includes(t[n]);)n++;return{value:t.slice(e,n),endIndex:n}}parseQuerySegments(t){let e=t;e.startsWith("(")&&e.endsWith(")")&&(e=e.slice(1,-1));const n=[];let o=0;for(;o<e.length;)if(":"===e[o]){const{name:t,endIndex:s}=this.parseIdentifier(e,o+1);n.push({type:"param",name:t}),o=s}else{const{value:t,endIndex:s}=this.parseQueryLiteral(e,o);t&&n.push({type:"literal",value:t}),o=s}return n}parseQueryLiteral(t,e){let n=e;for(;n<t.length&&":"!==t[n];)n++;return{value:t.slice(e,n),endIndex:n}}getAllParamNames(){const t=new Set,e=n=>{for(const o of n)switch(o.type){case"param":case"splat":t.add(o.name);break;case"optional":e(o.segments)}};return e(this.parsed.pathSegments),e(this.parsed.querySegments),Array.from(t)}canMatchRemainingSegments(t,e,n){let o=e;for(const e of n)if("literal"===e.type){const n=t.indexOf(e.value,o);if(-1===n)return!1;o=n+e.value.length}return!0}match(t){const[e,n]=t.split("?"),o=this.matchPath(e,this.parsed.pathSegments);if(!1===o)return!1;const s=this.matchQuery(n||"",this.parsed.querySegments);if(!1===s)return!1;const r=this.getAllParamNames(),i={};for(const t of r)i[t]=void 0;return Object.assign(i,o,s),i}matchPath(t,e){const n={};let o=0;for(let s=0;s<e.length;s++){const r=e[s],i=e.slice(s+1),a=this.matchSegment(t,o,r,i);if(!1===a)return!1;Object.assign(n,a.params),o=a.nextIndex}return!(o<t.length)&&n}matchSegment(t,e,n,o=[]){switch(n.type){case"literal":return t.slice(e,e+n.value.length)===n.value&&{params:{},nextIndex:e+n.value.length};case"param":{let s=e;const r=o[0];let i,a=["/","?"];if(r&&"literal"===r.type){const n=r.value,o=t.indexOf(n,e);if(-1===o)return!1;s=o}else for(;s<t.length&&!a.includes(t[s]);)s++;if(s===e)return!1;try{i=decodeURIComponent(t.slice(e,s))}catch(n){i=t.slice(e,s)}return!(s<t.length&&"?"===t[s]&&o.length>0)&&{params:{[n.name]:i},nextIndex:s}}case"splat":{let s=t.length;const r=o[0];if(r)switch(r.type){case"literal":if("."===r.value){const n=t.indexOf(".",e);-1!==n&&(s=n)}else{const n=t.lastIndexOf(r.value);-1!==n&&n>=e&&(s=n)}break;case"param":let n=-1;for(let o=t.length-1;o>=e;o--)if("/"===t[o]){n=o;break}-1!==n&&(s=n);break;case"splat":let o=-1;for(let n=t.length-1;n>e;n--)if("/"===t[n]){o=n+1;break}if(-1!==o)s=o;else{const n=t.slice(e).split("/").filter(t=>t);s=n.length>1?e+n.slice(0,-1).join("/").length+1:e}break;case"optional":const i=t=>{for(const e of t){if("literal"===e.type)return e.value;if("optional"===e.type){const t=i(e.segments);if(t)return t}}return null},a=i(r.segments);if(a){const n=t.lastIndexOf(a);-1!==n&&n>=e&&(s=n)}}const i=t.indexOf("?",e);let a;-1!==i&&i<s&&(s=i);try{a=decodeURIComponent(t.slice(e,s))}catch(n){a=t.slice(e,s)}return{params:{[n.name]:a},nextIndex:s}}case"optional":{let s=e,r={},i=!0;for(let e=0;e<n.segments.length;e++){const o=n.segments[e],a=n.segments.slice(e+1),l=this.matchSegment(t,s,o,a);if(!1===l){i=!1;break}Object.assign(r,l.params),s=l.nextIndex}if(i){if(this.canMatchRemainingSegments(t,s,o))return{params:r,nextIndex:s}}return{params:{},nextIndex:e}}default:return!1}}findNextLiteral(t){for(const e of t){if("literal"===e.type)return e;if("optional"===e.type){const t=this.findNextLiteral(e.segments);if(t)return t}}return null}matchQuery(t,e){if(0===e.length)return{};const n={};let o=0;for(const s of e)switch(s.type){case"literal":if(t.slice(o,o+s.value.length)!==s.value)return!1;o+=s.value.length;break;case"param":{let e,r=o;for(;r<t.length&&"&"!==t[r];)r++;if(r===o)return!1;try{e=decodeURIComponent(t.slice(o,r))}catch(n){e=t.slice(o,r)}n[s.name]=e,o=r;break}}return n}reverse(t={}){const e=this.reverseSegments(this.parsed.pathSegments,t);if(!1===e)return!1;let n=e;if(this.parsed.querySegments.length>0){const e=this.reverseSegments(this.parsed.querySegments,t);if(!this.parsed.queryOptional&&!1===e)return!1;e&&""!==e&&(n+="?"+e)}return n}reverseSegments(t,e,n=!1){let o="";for(let s=0;s<t.length;s++){const r=t[s],i=t.slice(s+1);switch(r.type){case"literal":o+=r.value;break;case"param":case"splat":if(!(r.name in e))return!1;o+=String(e[r.name]);break;case"optional":if(this.hasAllParams(r.segments,e,n)||this.hasLaterOptionalGroupNeedingParams(i,e,r.segments)){const t=this.reverseSegments(r.segments,e,!0);if(!1===t)return!1;o+=t}}}return o}hasLaterOptionalGroupNeedingParams(t,e,n){for(const o of t)if("optional"===o.type&&this.hasAnyParamInSegments(o.segments,e))return this.hasOnlyLiteralsAndOptionals(n);return!1}hasOnlyLiteralsAndOptionals(t){for(const e of t)if("param"===e.type||"splat"===e.type)return!1;return!0}hasAllParams(t,e,n=!1){let o=!1,s=!1,r=!1,i=!0;for(const n of t)switch(n.type){case"param":case"splat":i=!1,n.name in e&&void 0!==e[n.name]?o=!0:r=!0}const a=n||o&&!r;for(const n of t)if("optional"===n.type){this.hasAllParams(n.segments,e,a)&&(s=!0)}return!(!o||r)||(!(!s||r)||!(!i||!n))}hasOnlyOptionalMissingParams(t,e){for(const n of t)switch(n.type){case"param":case"splat":if(!(n.name in e))return!1}return!0}hasAnyParamInSegments(t,e){for(const n of t)switch(n.type){case"param":case"splat":if(n.name in e)return!0;break;case"optional":if(this.hasAnyParamInSegments(n.segments,e))return!0}return!1}}function Le(t){const e={};return t.split(";").forEach(t=>{const[n,o]=t.split(":").map(t=>t.trim());n&&o&&(e[n]=o)}),e}var Oe;function $e(t){const e=t.window??window,n=t.document??document,o=[];let s,r,i,a=!1,l=[],c=null,u=null;const h=t.context||{},d=new le(h,[],"",{},t.fetcher);function m(t){if(!c||!u)return null;const e=t.querySelectorAll(c);for(const t of e){if(t[x]===u)return t}return null}function p(t,e,n,l,c,u){o.push({route:new ke(t),tag:e,transition:n,guards:l,layout:c,placard:u}),a=!1,"/404"===t&&(s=e),"/403"===t&&(r=e),"/"===t&&(i=e)}function f(){const t=new Set;l=o.filter(t=>t.placard).map(t=>{const e=t.placard;return"function"==typeof e?e(h):e}).filter(e=>!t.has(e.name)&&(t.add(e.name),!0))}function g(t,e,n){d[Q](h,l,e,n)}function b(){switch(t.type){case"hash":return e.location.hash.slice(1);case"pushstate":return e.location.pathname}}function w(t){let e;const o=!!r;if(o&&(e=n.createElement(r),e[_]=h),!o){const t=n.createElement("div");t.className="default-403",t.innerHTML="<h1>403</h1><p>Unauthorized</p>",e=t}t.innerHTML="",t.appendChild(e),c=null,u=null}function v(t,e,n){if(!!!t)return!0;const o=Array.isArray(t)?t:[t];for(const t of o){if(!t(h,e))return w(n),!1}return!0}function T(e){if(!1===e)return null;if(!!e)return e;return!!t.layout?t.layout:null}function E(t){if(!(t!==c))return{element:null,needsNewLayout:!1};c=t;if(!!t){const e=Date.now();u=e;const o=n.createElement(t);return o[_]=h,o[x]=e,{element:o,needsNewLayout:!0}}return u=null,{element:null,needsNewLayout:!0}}async function N(t,e,n,o,s,r,i){const a=o||m(t);if(!a)return;!function(t,e,n){"function"==typeof t.update&&t.update(h,l,e,n)}(a,r,i);const c=a.querySelector('[slot="page"]');if(!(!n||!c))return e.setAttribute("slot","page"),await k(a,c,e,n),void(s&&(t.innerHTML="",t.appendChild(a)));a.querySelectorAll('[slot="page"]').forEach(t=>t.remove()),e.setAttribute("slot","page"),a.appendChild(e),s&&(t.innerHTML="",t.appendChild(a))}async function A(t,e,n){const o=t.children[0];!n||!o?(t.innerHTML="",t.appendChild(e)):await k(t,o,e,n)}async function C(r){const a=n.querySelector(t.target);if(!a)throw new Error(`Target element not found: ${t.target}`);f(),e.scrollTo(0,0);if((""===r?.trim()||"/"===r)&&!!i){const s=o.find(t=>t.route.match("/"));if(!v(s?.guards,{},a))return;const{element:l,transition:c,layout:u}=function(){const t=n.createElement(i);t[_]=h;const s=e.customElements.get(i),r=s?.[S],a=o.find(t=>t.route.match("/"));return{element:t,transition:r,layout:a?.layout}}(),d=T(u),{element:p,needsNewLayout:f}=E(d),y=c||t.transition;return null!==p||null!==m(a)?(await N(a,l,y,p,f,r,{}),void g(0,r,{})):(await A(a,l,y),void g(0,r,{}))}if(!r)return;const l=function(t,e){for(const s of o){const o=s.route.match(t);if(!1===o)continue;if(!v(s.guards,o,e))return{result:Oe.GUARDS_FAILED};const r=n.createElement(s.tag);r[_]=h,r[j]=d;const i=o;return Object.keys(i).forEach(t=>r.setAttribute(t,i[t])),{result:Oe.SUCCESS,element:r,transition:s.transition,layout:s.layout,routeParams:i}}return{result:Oe.NOT_FOUND}}(r,a);if(l.result===Oe.GUARDS_FAILED)return;if(l.result===Oe.SUCCESS){const{element:e,transition:n,layout:o,routeParams:s={}}=l,i=T(o),{element:c,needsNewLayout:u}=E(i),h=n||t.transition;return null!==c||null!==m(a)?(await N(a,e,h,c,u,r,s),void g(0,r,s)):(await A(a,e,h),void g(0,r,s))}const{element:c,transition:u,layout:p}=function(){if(s){const t=n.createElement(s);t[_]=h;const o=e.customElements.get(s),r=o?.[S];return{element:t,transition:r,layout:void 0}}const t=n.createElement("div");return t.className="default-404",t.innerHTML="<h1>404</h1><p>Page not found</p>",{element:t,transition:void 0,layout:void 0}}(),y=T(p),{element:b,needsNewLayout:w}=E(y),x=u||t.transition;if(null!==b||null!==m(a))return await N(a,c,x,b,w,r,{}),void g(0,r,{});await A(a,c,x),g(0,r,{})}async function k(t,e,n,o){return async function(t,e,n,o={}){const s=o.outDuration||300,r=o.inDuration||300,i=o.mode||"sequential",a=o.out?Le(o.out):{opacity:"0"},l={opacity:"0"},c=o.in?Le(o.in):{opacity:"1"},u=t.style,h=u.position,d=t.tagName.includes("-")&&t.shadowRoot;d||(u.position="relative");const m=e.hasAttribute("slot")||n.hasAttribute("slot");m?(e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.transition=`opacity ${s}ms ease-in-out`,n.style.position="absolute",n.style.width="100%",n.style.height="100%",n.style.transition=`opacity ${r}ms ease-in-out`):(e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.transition=`all ${s}ms ease-in-out`,n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%"),Object.assign(n.style,l),n.style.transition=`all ${r}ms ease-in-out`,t.appendChild(n),n.offsetHeight,"simultaneous"===i?(Object.assign(e.style,a),Object.assign(n.style,c),await new Promise(t=>setTimeout(t,Math.max(s,r)))):(Object.assign(e.style,a),await new Promise(t=>setTimeout(t,s)),Object.assign(n.style,c),await new Promise(t=>setTimeout(t,r))),e.remove(),m?(n.style.position="",n.style.width="",n.style.height="",n.style.transition=""):(n.style.position="",n.style.top="",n.style.left="",n.style.width="",n.style.transition=""),Object.keys({...l,...c}).forEach(t=>{n.style[t]=""}),d||(u.position=h)}(t,e,n,o)}return{page:function(t){return function(n,o){if(o?.metadata&&o.metadata[y]){n[y]||(n[y]=new Map);for(const[t,e]of o.metadata[y])n[y].set(t,e)}ge(n),n[S]=t.transition;const s=n.prototype.connectedCallback;n.prototype.connectedCallback=function(){this[j]=d,s?.call(this)};const r=n.prototype.disconnectedCallback;return n.prototype.disconnectedCallback=function(){r?.call(this),delete this[_],delete this[j]},e.customElements.get(t.tag)?console.warn(`[snice] Page "${t.tag}" is already registered. Skipping duplicate registration.`):e.customElements.define(t.tag,n),t.routes.forEach(e=>p(e,t.tag,t.transition,t.guards,t.layout,t.placard)),n}},initialize:function(){if(!n.querySelector(t.target))throw new Error(`Target element not found: ${t.target}`);!a&&(o.sort((t,e)=>e.route.spec.length-t.route.spec.length),a=!0),f(),function(){const o="hash"===t.type,s="pushstate"===t.type;o&&e.addEventListener("hashchange",()=>{n.querySelector(t.target)&&C(b())}),s&&e.addEventListener("popstate",()=>{n.querySelector(t.target)&&C(b())})}(),C(b())},navigate:C,register:p}}!function(t){t.SUCCESS="success",t.GUARDS_FAILED="guards-failed",t.NOT_FOUND="not-found"}(Oe||(Oe={}));const Pe=".snice-tooltip--visible{opacity:1!important;transform:scale(1)!important}.snice-tooltip__arrow{position:absolute;width:0;height:0;border-style:solid;border-color:transparent}.snice-tooltip--top .snice-tooltip__arrow,.snice-tooltip--top-start .snice-tooltip__arrow,.snice-tooltip--top-end .snice-tooltip__arrow{bottom:-6px;border-width:6px 6px 0;border-top-color:hsl(0 0% 20%)}.snice-tooltip--bottom .snice-tooltip__arrow,.snice-tooltip--bottom-start .snice-tooltip__arrow,.snice-tooltip--bottom-end .snice-tooltip__arrow{top:-6px;border-width:0 6px 6px;border-bottom-color:hsl(0 0% 20%)}.snice-tooltip--left .snice-tooltip__arrow,.snice-tooltip--left-start .snice-tooltip__arrow,.snice-tooltip--left-end .snice-tooltip__arrow{right:-6px;border-width:6px 0 6px 6px;border-left-color:hsl(0 0% 20%)}.snice-tooltip--right .snice-tooltip__arrow,.snice-tooltip--right-start .snice-tooltip__arrow,.snice-tooltip--right-end .snice-tooltip__arrow{left:-6px;border-width:6px 6px 6px 0;border-right-color:hsl(0 0% 20%)}.snice-tooltip--top .snice-tooltip__arrow,.snice-tooltip--bottom .snice-tooltip__arrow{left:50%;transform:translateX(-50%)}.snice-tooltip--top-start .snice-tooltip__arrow,.snice-tooltip--bottom-start .snice-tooltip__arrow{left:16px}.snice-tooltip--top-end .snice-tooltip__arrow,.snice-tooltip--bottom-end .snice-tooltip__arrow{right:16px}.snice-tooltip--left .snice-tooltip__arrow,.snice-tooltip--right .snice-tooltip__arrow{top:50%;transform:translateY(-50%)}.snice-tooltip--left-start .snice-tooltip__arrow,.snice-tooltip--right-start .snice-tooltip__arrow{top:16px}.snice-tooltip--left-end .snice-tooltip__arrow,.snice-tooltip--right-end .snice-tooltip__arrow{bottom:16px;top:auto}",Me=new WeakMap;let Ie=!1;function Re(t){const e=getComputedStyle(t),n=(t,n)=>e.getPropertyValue(t).trim()||n;return{position:n("--tooltip-position","top"),trigger:n("--tooltip-trigger","hover"),delay:parseInt(n("--tooltip-delay","0"),10),hideDelay:parseInt(n("--tooltip-hide-delay","0"),10),offset:parseInt(n("--tooltip-offset","12"),10),arrow:"none"!==n("--tooltip-arrow","auto"),maxWidth:parseInt(n("--tooltip-max-width","250"),10),zIndex:parseInt(n("--tooltip-z-index","10000"),10),strictPositioning:"true"===n("--tooltip-strict-positioning",""),bg:n("--tooltip-bg","hsl(0 0% 20%)"),color:n("--tooltip-color","white"),padding:n("--tooltip-padding","8px 12px"),radius:n("--tooltip-radius","6px"),fontSize:n("--tooltip-font-size","14px")}}function De(t,e,n,o,s){let r=0,i=0;const a=t.left+t.width/2,l=t.top+t.height/2,c=o,u=o+s;switch(n){case"top":r=a-e.width/2,i=t.top-e.height-c;break;case"top-start":r=t.left,i=t.top-e.height-c;break;case"top-end":r=t.right-e.width,i=t.top-e.height-c;break;case"bottom":r=a-e.width/2,i=t.bottom+c;break;case"bottom-start":r=t.left,i=t.bottom+c;break;case"bottom-end":r=t.right-e.width,i=t.bottom+c;break;case"left":r=t.left-e.width-u,i=l-e.height/2;break;case"left-start":r=t.left-e.width-u,i=t.top;break;case"left-end":r=t.left-e.width-u,i=t.bottom-e.height;break;case"right":r=t.right+u,i=l-e.height/2;break;case"right-start":r=t.right+u,i=t.top;break;case"right-end":r=t.right+u,i=t.bottom-e.height}return{left:r,top:i}}function qe(t){const e=t.getAttribute("tooltip");if(!e)return;!function(){if(!Ie)try{if("adoptedStyleSheets"in document&&"CSSStyleSheet"in window){const t=new CSSStyleSheet;t.replaceSync(Pe),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}else{const t=document.createElement("style");t.textContent=Pe,document.head.appendChild(t)}Ie=!0}catch(t){console.warn("Failed to inject tooltip portal styles:",t)}}();const n=Re(t);let o=Me.get(t);if(o||(o={portal:null,listeners:[],activePosition:n.position},Me.set(t,o)),o.portal){const t=o.portal;t.style.zIndex=String(n.zIndex),t.style.padding=n.padding,t.style.background=n.bg,t.style.color=n.color,t.style.borderRadius=n.radius,t.style.fontSize=n.fontSize,t.style.maxWidth=`${n.maxWidth}px`;let e=t.querySelector(".snice-tooltip__arrow");n.arrow&&!e?(e=document.createElement("div"),e.className="snice-tooltip__arrow",e.style.cssText="position:absolute;width:0;height:0;border-style:solid;",t.appendChild(e)):!n.arrow&&e?e.style.display="none":n.arrow&&e&&(e.style.display="")}else o.portal=function(t){const e=document.createElement("div");e.className=`snice-tooltip snice-tooltip--${t.position}`,e.setAttribute("role","tooltip"),e.style.cssText=`\n position: fixed;\n z-index: ${t.zIndex};\n padding: ${t.padding};\n background: ${t.bg};\n color: ${t.color};\n border-radius: ${t.radius};\n font-size: ${t.fontSize};\n line-height: 1.4;\n max-width: ${t.maxWidth}px;\n width: max-content;\n pointer-events: none;\n opacity: 0;\n transform: scale(0.95);\n transition: opacity 0.2s, transform 0.2s;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n display: none;\n `;const n=document.createElement("div");if(n.className="snice-tooltip__content",e.appendChild(n),t.arrow){const t=document.createElement("div");t.className="snice-tooltip__arrow",t.style.cssText="position:absolute;width:0;height:0;border-style:solid;",e.appendChild(t)}return document.body.appendChild(e),e}(n);const s=o.portal,r=s.querySelector(".snice-tooltip__content");r&&(r.textContent=e),s.style.display="block",s.offsetHeight,s.style.visibility="hidden",s.style.left="-9999px",s.style.top="-9999px";const i=t.getBoundingClientRect(),a=s.getBoundingClientRect();s.style.visibility="";const l=n.arrow?6:0,c=function(t,e,n,o,s,r){const i=window.innerWidth,a=window.innerHeight;let l=n,c=De(t,e,l,o,s);if(!(r||c.left>=0&&c.top>=0&&c.left+e.width<=i&&c.top+e.height<=a))for(const n of function(t){return{top:["bottom","left","right"],"top-start":["bottom-start","left","right"],"top-end":["bottom-end","left","right"],bottom:["top","left","right"],"bottom-start":["top-start","left","right"],"bottom-end":["top-end","left","right"],left:["right","top","bottom"],"left-start":["right-start","top","bottom"],"left-end":["right-end","top","bottom"],right:["left","top","bottom"],"right-start":["left-start","top","bottom"],"right-end":["left-end","top","bottom"]}[t]||["top","bottom","left","right"]}(l)){const r=De(t,e,n,o,s);if(r.left>=0&&r.top>=0&&r.left+e.width<=i&&r.top+e.height<=a){l=n,c=r;break}}return{left:c.left,top:c.top,adjustedPosition:l}}(i,a,n.position,n.offset,l,n.strictPositioning);c.adjustedPosition!==o.activePosition&&(s.classList.remove(`snice-tooltip--${o.activePosition}`),s.classList.add(`snice-tooltip--${c.adjustedPosition}`),o.activePosition=c.adjustedPosition),s.style.left=`${c.left}px`,s.style.top=`${c.top}px`,s.classList.add("snice-tooltip--visible")}function Fe(t){const e=Me.get(t);if(!e?.portal)return;e.portal.classList.remove("snice-tooltip--visible");const n=e.portal;setTimeout(()=>{n&&(n.style.display="none")},200)}function ze(t){const e=Me.get(t);if(!e)return;Ve(e);const n=Re(t);n.delay>0?e.showTimeout=window.setTimeout(()=>qe(t),n.delay):qe(t)}function je(t){const e=Me.get(t);if(!e)return;Ve(e);const n=Re(t);n.hideDelay>0?e.hideTimeout=window.setTimeout(()=>Fe(t),n.hideDelay):Fe(t)}function Ve(t){void 0!==t.showTimeout&&(clearTimeout(t.showTimeout),t.showTimeout=void 0),void 0!==t.hideTimeout&&(clearTimeout(t.hideTimeout),t.hideTimeout=void 0)}function We(t){if(Me.has(t))return;const e=Re(t),n={portal:null,listeners:[],activePosition:e.position};Me.set(t,n);const o=(e,o)=>{t.addEventListener(e,o),n.listeners.push({type:e,fn:o})};switch(e.trigger){case"hover":o("mouseenter",()=>ze(t)),o("mouseleave",()=>je(t)),o("focusin",()=>ze(t)),o("focusout",()=>je(t));break;case"focus":o("focusin",()=>ze(t)),o("focusout",()=>je(t));break;case"click":{const e=n=>{t.contains(n.target)||(je(t),document.removeEventListener("click",e))};o("click",()=>{const n=Me.get(t),o=n?.portal?.classList.contains("snice-tooltip--visible");o?je(t):(ze(t),setTimeout(()=>document.addEventListener("click",e),0))});break}}}function He(t){const e=Me.get(t);if(e){Ve(e);for(const{type:n,fn:o}of e.listeners)t.removeEventListener(n,o);e.portal&&e.portal.remove(),Me.delete(t)}}function Be(t){if(!(t instanceof HTMLElement))return;t.getAttribute("tooltip")&&We(t)}function Ue(){if(globalThis.sniceTooltipsInitialized)return;globalThis.sniceTooltipsInitialized=!0;const t=new MutationObserver(t=>{for(const e of t)if("attributes"===e.type&&"tooltip"===e.attributeName){const t=e.target;t.hasAttribute("tooltip")?(He(t),We(t)):He(t)}else"childList"===e.type&&(e.addedNodes.forEach(t=>{t instanceof HTMLElement&&(Be(t),t.querySelectorAll("[tooltip]").forEach(Be))}),e.removedNodes.forEach(t=>{t instanceof HTMLElement&&(He(t),t.querySelectorAll("[tooltip]").forEach(t=>{t instanceof HTMLElement&&He(t)}))}))}),e=()=>{document.querySelectorAll("[tooltip]").forEach(Be),t.observe(document.body,{attributes:!0,attributeFilter:["tooltip"],childList:!0,subtree:!0})};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e(),globalThis.sniceTooltipObserver=t}function Ge(){const t=globalThis.sniceTooltipObserver;t&&(t.disconnect(),globalThis.sniceTooltipObserver=void 0),document.querySelectorAll("[tooltip]").forEach(t=>{t instanceof HTMLElement&&He(t)}),globalThis.sniceTooltipsInitialized=!1}function Ke(t,e){return function(n,o){return function(...s){this[$]||(this[$]=new Map);const r=`${t}_${o.name}`;this[$].has(r)||this[$].set(r,{debounceTimeout:null,throttleLastCall:0,throttleTimeout:null});const i=this[$].get(r),a=n.apply(this,s),l=n=>{if(void 0===n&&!1===e?.dispatchOnUndefined)return;const o=new CustomEvent(t,{bubbles:!0,composed:!0,...e,detail:n});this.dispatchEvent(o)},c=t=>{if(e?.debounce)clearTimeout(i.debounceTimeout),i.debounceTimeout=setTimeout(()=>l(t),e.debounce);else if(e?.throttle){const n=Date.now(),o=e.throttle-(n-i.throttleLastCall);o<=0?(clearTimeout(i.throttleTimeout),i.throttleLastCall=n,l(t)):i.throttleTimeout||(i.throttleTimeout=setTimeout(()=>{i.throttleLastCall=Date.now(),i.throttleTimeout=null,l(t)},o))}else l(t)};return a instanceof Promise?a.then(t=>(c(t),t)):(c(a),a)}}}let Je=!1;function Qe(t){Je=t}async function Xe(t,e=500){if(customElements.get(t))return;let n=null;Je||(n=setTimeout(()=>{console.warn(`Custom element <${t}> is taking longer than ${e}ms to register. This may indicate a missing import or circular dependency. Set DISABLE_ELEMENT_READY_WARNINGS=true to disable this warning.`)},e));try{await customElements.whenDefined(t)}finally{n&&clearTimeout(n)}}async function Ye(t,e=500){const n=t.tagName.toLowerCase();await Xe(n,e),"ready"in t&&"function"==typeof t.ready?.then&&await t.ready}async function Ze(t,e=500){const n=[];if(t instanceof Element&&(t.tagName.includes("-")&&n.push(t),t.shadowRoot)){t.shadowRoot.querySelectorAll("*").forEach(t=>{t.tagName.includes("-")&&n.push(t)})}if(t instanceof DocumentFragment){t.querySelectorAll("*").forEach(t=>{t.tagName.includes("-")&&n.push(t)})}await Promise.all(n.map(t=>Ye(t,e)))}async function*tn(t){for(;;)await new Promise(e=>{t[q]||(t[q]=[]),t[q].push(e)}),yield}const en=e("debounce-timers"),nn=e("throttle-timers"),on=e("once-called"),sn=e("memoize-cache");function rn(t=300,e={}){const{leading:n=!1,trailing:o=!0,maxWait:s}=e;return function(e,r){const i=r.name;return function(...r){this[en]||(this[en]={});const a=this[en],l=i;a[l]&&clearTimeout(a[l].timeout);const c=Date.now(),u=!a[l],h=u?c:a[l].startTime,d=void 0!==s&&c-h>=s;if(n&&u){const t=e.apply(this,r);return a[l]={timeout:null,startTime:h,lastArgs:r},t}const m=setTimeout(()=>{(o||d)&&e.apply(this,a[l].lastArgs),delete a[l]},d?0:t);a[l]={timeout:m,startTime:h,lastArgs:r}}}}function an(t=300,e={}){const{leading:n=!0,trailing:o=!0}=e;return function(e,s){const r=s.name;return function(...s){this[nn]||(this[nn]={});const i=this[nn],a=r,l=Date.now();if(i[a]){const n=l-i[a].lastInvoke;if(i[a].lastArgs=s,i[a].timeout&&clearTimeout(i[a].timeout),n>=t)e.apply(this,s),i[a].lastInvoke=l;else if(o){const o=t-n;i[a].timeout=setTimeout(()=>{e.apply(this,i[a].lastArgs),i[a].lastInvoke=Date.now(),i[a].timeout=null},o)}}else n&&e.apply(this,s),i[a]={lastInvoke:l,timeout:null,lastArgs:s},o&&!n&&(i[a].timeout=setTimeout(()=>{e.apply(this,i[a].lastArgs),delete i[a]},t))}}}function ln(t=!0){let e,n=!1;return function(o,s){const r=s.name;return function(...s){return t?(this[on]||(this[on]={}),this[on][r]||(this[on][r]={called:!0,result:o.apply(this,s)}),this[on][r].result):(n||(n=!0,e=o.apply(this,s)),e)}}}function cn(t={}){const{keyGenerator:e=(...t)=>JSON.stringify(t),maxSize:n=100,ttl:o}=t;return function(t,s){const r=s.name;return function(...s){this[sn]||(this[sn]={}),this[sn][r]||(this[sn][r]=new Map);const i=this[sn][r],a=e(...s);if(i.has(a)){const t=i.get(a);if(void 0===o)return t.value;if(!(Date.now()-t.timestamp>o))return t.value;i.delete(a)}const l=t.apply(this,s);if(i.set(a,{value:l,timestamp:Date.now()}),i.size>n){const t=i.keys().next().value;i.delete(t)}return l}}}function un(t){if(t[en]){for(const e in t[en])t[en][e]?.timeout&&clearTimeout(t[en][e].timeout);t[en]={}}}function hn(t){if(t[nn]){for(const e in t[nn])t[nn][e]?.timeout&&clearTimeout(t[nn][e].timeout);t[nn]={}}}function dn(t,e){t[sn]&&(e?delete t[sn][e]:t[sn]={})}function mn(t,e){t[on]&&(e?delete t[on][e]:t[on]={})}class pn{constructor(){this.requestMiddlewares=[],this.responseMiddlewares=[]}use(t,e){"request"===t?this.requestMiddlewares.push(e):this.responseMiddlewares.push(e)}create(t){const e=this.requestMiddlewares,n=this.responseMiddlewares;return async function(t,o){const s=new Request(t,o);let r=0;const i=async()=>{if(r<e.length){return e[r++].call(this,s,i)}const t=await fetch(s);let o=0;const a=async()=>{if(o<n.length){return n[o++].call(this,t,a)}return t};return a()};return i()}.bind(t)}}
|
|
20
20
|
/*!
|
|
21
|
-
* snice v4.
|
|
21
|
+
* snice v4.15.0
|
|
22
22
|
* Imperative TypeScript framework for building vanilla web components with decorators, differential rendering, routing, and controllers. No virtual DOM, no build complexity.
|
|
23
23
|
* (c) 2024
|
|
24
24
|
* Released under the MIT License.
|