snice 4.26.1 → 4.26.2
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/dist/cdn/accordion/snice-accordion.js +1 -1
- package/dist/cdn/accordion/snice-accordion.min.js +1 -1
- package/dist/cdn/activity-feed/README.md +1 -1
- package/dist/cdn/activity-feed/snice-activity-feed.js +2 -2
- package/dist/cdn/activity-feed/snice-activity-feed.js.map +1 -1
- package/dist/cdn/activity-feed/snice-activity-feed.min.js +10 -10
- package/dist/cdn/activity-feed/snice-activity-feed.min.js.map +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/approval-flow/snice-approval-flow.js +1 -1
- package/dist/cdn/approval-flow/snice-approval-flow.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/availability/snice-availability.js +1 -1
- package/dist/cdn/availability/snice-availability.min.js +1 -1
- package/dist/cdn/avatar/README.md +2 -2
- package/dist/cdn/avatar/snice-avatar.js +2 -2
- package/dist/cdn/avatar/snice-avatar.js.map +1 -1
- package/dist/cdn/avatar/snice-avatar.min.js +3 -3
- package/dist/cdn/avatar/snice-avatar.min.js.map +1 -1
- package/dist/cdn/avatar-group/README.md +1 -1
- package/dist/cdn/avatar-group/snice-avatar-group.js +2 -2
- package/dist/cdn/avatar-group/snice-avatar-group.js.map +1 -1
- package/dist/cdn/avatar-group/snice-avatar-group.min.js +3 -3
- package/dist/cdn/avatar-group/snice-avatar-group.min.js.map +1 -1
- package/dist/cdn/badge/README.md +1 -1
- package/dist/cdn/badge/snice-badge.js +2 -2
- package/dist/cdn/badge/snice-badge.js.map +1 -1
- package/dist/cdn/badge/snice-badge.min.js +3 -3
- package/dist/cdn/badge/snice-badge.min.js.map +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/booking/snice-booking.js +1 -1
- package/dist/cdn/booking/snice-booking.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/cart/snice-cart.js +1 -1
- package/dist/cdn/cart/snice-cart.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/README.md +2 -2
- package/dist/cdn/chip/snice-chip.js +2 -2
- package/dist/cdn/chip/snice-chip.js.map +1 -1
- package/dist/cdn/chip/snice-chip.min.js +3 -3
- package/dist/cdn/chip/snice-chip.min.js.map +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/data-card/snice-data-card.js +1 -1
- package/dist/cdn/data-card/snice-data-card.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/date-range-picker/snice-date-range-picker.js +1 -1
- package/dist/cdn/date-range-picker/snice-date-range-picker.min.js +1 -1
- package/dist/cdn/date-time-picker/snice-date-time-picker.js +1 -1
- package/dist/cdn/date-time-picker/snice-date-time-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/estimate/snice-estimate.js +1 -1
- package/dist/cdn/estimate/snice-estimate.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/form-layout/snice-form-layout.js +1 -1
- package/dist/cdn/form-layout/snice-form-layout.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/snice-input.js +1 -1
- package/dist/cdn/input/snice-input.min.js +1 -1
- package/dist/cdn/invoice/snice-invoice.js +1 -1
- package/dist/cdn/invoice/snice-invoice.min.js +1 -1
- package/dist/cdn/kanban/snice-kanban.js +1 -1
- package/dist/cdn/kanban/snice-kanban.min.js +1 -1
- package/dist/cdn/key-value/snice-key-value.js +1 -1
- package/dist/cdn/key-value/snice-key-value.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/leaderboard/snice-leaderboard.js +1 -1
- package/dist/cdn/leaderboard/snice-leaderboard.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/message-strip/snice-message-strip.js +1 -1
- package/dist/cdn/message-strip/snice-message-strip.min.js +1 -1
- package/dist/cdn/metric-table/snice-metric-table.js +1 -1
- package/dist/cdn/metric-table/snice-metric-table.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/order-tracker/snice-order-tracker.js +1 -1
- package/dist/cdn/order-tracker/snice-order-tracker.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/permission-matrix/snice-permission-matrix.js +1 -1
- package/dist/cdn/permission-matrix/snice-permission-matrix.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/product-card/snice-product-card.js +1 -1
- package/dist/cdn/product-card/snice-product-card.min.js +1 -1
- package/dist/cdn/progress/snice-progress.js +2 -2
- package/dist/cdn/progress/snice-progress.js.map +1 -1
- package/dist/cdn/progress/snice-progress.min.js +2 -2
- package/dist/cdn/progress/snice-progress.min.js.map +1 -1
- package/dist/cdn/progress-ring/snice-progress-ring.js +1 -1
- package/dist/cdn/progress-ring/snice-progress-ring.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/range-slider/snice-range-slider.js +1 -1
- package/dist/cdn/range-slider/snice-range-slider.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/receipt/snice-receipt.js +1 -1
- package/dist/cdn/receipt/snice-receipt.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 +4 -4
- package/dist/cdn/runtime/snice-runtime.esm.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.min.js +4 -4
- package/dist/cdn/runtime/snice-runtime.esm.min.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.js +4 -4
- package/dist/cdn/runtime/snice-runtime.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.min.js +4 -4
- 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/segmented-control/snice-segmented-control.js +1 -1
- package/dist/cdn/segmented-control/snice-segmented-control.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-button/snice-split-button.js +1 -1
- package/dist/cdn/split-button/snice-split-button.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/stat-group/snice-stat-group.js +1 -1
- package/dist/cdn/stat-group/snice-stat-group.min.js +1 -1
- package/dist/cdn/step-input/snice-step-input.js +1 -1
- package/dist/cdn/step-input/snice-step-input.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/snice-table.js +1 -1
- package/dist/cdn/table/snice-table.min.js +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/snice-tag.js +1 -1
- package/dist/cdn/tag/snice-tag.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-picker/snice-time-picker.js +1 -1
- package/dist/cdn/time-picker/snice-time-picker.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/user-card/snice-user-card.js +1 -1
- package/dist/cdn/user-card/snice-user-card.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/cdn/work-order/snice-work-order.js +1 -1
- package/dist/cdn/work-order/snice-work-order.min.js +1 -1
- package/dist/components/activity-feed/snice-activity-feed.js +1 -1
- package/dist/components/activity-feed/snice-activity-feed.js.map +1 -1
- package/dist/components/avatar/snice-avatar.js +1 -1
- package/dist/components/avatar/snice-avatar.js.map +1 -1
- package/dist/components/avatar-group/snice-avatar-group.js +1 -1
- package/dist/components/avatar-group/snice-avatar-group.js.map +1 -1
- package/dist/components/badge/snice-badge.js +1 -1
- package/dist/components/badge/snice-badge.js.map +1 -1
- package/dist/components/chip/snice-chip.js +1 -1
- package/dist/components/chip/snice-chip.js.map +1 -1
- package/dist/components/progress/snice-progress.js +1 -1
- package/dist/components/progress/snice-progress.js.map +1 -1
- package/dist/components/theme/theme.css +0 -9
- 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/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* snice v4.26.
|
|
2
|
+
* snice v4.26.2
|
|
3
3
|
* A decorator-driven web component library with differential rendering, routing, controllers, and 130+ ready-made UI components. Use as much or as little as you want. Zero dependencies, works anywhere.
|
|
4
4
|
* (c) 2024
|
|
5
5
|
* Released under the MIT License.
|
|
6
6
|
*/
|
|
7
7
|
/*!
|
|
8
|
-
* snice v4.
|
|
8
|
+
* snice v4.26.1
|
|
9
9
|
* A decorator-driven web component library with differential rendering, routing, controllers, and 130+ ready-made UI components. Use as much or as little as you want. Zero dependencies, works anywhere.
|
|
10
10
|
* (c) 2024
|
|
11
11
|
* Released under the MIT License.
|
|
@@ -19,14 +19,14 @@ globalThis.snice||(globalThis.snice={controllerRegistry:new Map,controllerIdCoun
|
|
|
19
19
|
*/
|
|
20
20
|
class De{constructor(t){this.parsed=this.parsePattern(t)}get spec(){return this.parsed.template}parsePattern(t){let e=t,n="",r=!1;const o=t.indexOf("?");return-1!==o&&(e=t.slice(0,o),n=t.slice(o+1),e.endsWith("(")&&n.endsWith(")")&&(r=!0,e=e.slice(0,-1),n=n.slice(0,-1))),{pathSegments:this.parseSegments(e),querySegments:n?this.parseQuerySegments(n):[],queryOptional:r,template:t}}parseSegments(t){const e=[];let n=0;for(;n<t.length;){switch(t[n]){case"(":const{segments:r,endIndex:o}=this.parseOptionalGroup(t,n);e.push({type:"optional",segments:r}),n=o+1;break;case":":const{name:s,endIndex:i}=this.parseIdentifier(t,n+1);e.push({type:"param",name:s}),n=i;break;case"*":const{name:a,endIndex:c}=this.parseIdentifier(t,n+1);e.push({type:"splat",name:a}),n=c;break;default:const{value:l,endIndex:u}=this.parseLiteral(t,n);l&&e.push({type:"literal",value:l}),n=u}}return e}parseOptionalGroup(t,e){let n=1,r=e+1;for(;r<t.length&&n>0;)"("===t[r]&&n++,")"===t[r]&&n--,r++;const o=t.slice(e+1,r-1);return{segments:this.parseSegments(o),endIndex:r-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 r=0;for(;r<e.length;)if(":"===e[r]){const{name:t,endIndex:o}=this.parseIdentifier(e,r+1);n.push({type:"param",name:t}),r=o}else{const{value:t,endIndex:o}=this.parseQueryLiteral(e,r);t&&n.push({type:"literal",value:t}),r=o}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 r of n)switch(r.type){case"param":case"splat":t.add(r.name);break;case"optional":e(r.segments)}};return e(this.parsed.pathSegments),e(this.parsed.querySegments),Array.from(t)}canMatchRemainingSegments(t,e,n){let r=e;for(const e of n)if("literal"===e.type){const n=t.indexOf(e.value,r);if(-1===n)return!1;r=n+e.value.length}return!0}match(t){const[e,n]=t.split("?"),r=this.matchPath(e,this.parsed.pathSegments);if(!1===r)return!1;const o=this.matchQuery(n||"",this.parsed.querySegments);if(!1===o)return!1;const s=this.getAllParamNames(),i={};for(const t of s)i[t]=void 0;return Object.assign(i,r,o),i}matchPath(t,e){const n={};let r=0;for(let o=0;o<e.length;o++){const s=e[o],i=e.slice(o+1),a=this.matchSegment(t,r,s,i);if(!1===a)return!1;Object.assign(n,a.params),r=a.nextIndex}return!(r<t.length)&&n}matchSegment(t,e,n,r=[]){switch(n.type){case"literal":return t.slice(e,e+n.value.length)===n.value&&{params:{},nextIndex:e+n.value.length};case"param":{let o=e;const s=r[0];let i,a=["/","?"];if(s&&"literal"===s.type){const n=s.value,r=t.indexOf(n,e);if(-1===r)return!1;o=r}else for(;o<t.length&&!a.includes(t[o]);)o++;if(o===e)return!1;try{i=decodeURIComponent(t.slice(e,o))}catch(n){i=t.slice(e,o)}return!(o<t.length&&"?"===t[o]&&r.length>0)&&{params:{[n.name]:i},nextIndex:o}}case"splat":{let o=t.length;const s=r[0];if(s)switch(s.type){case"literal":if("."===s.value){const n=t.indexOf(".",e);-1!==n&&(o=n)}else{const n=t.lastIndexOf(s.value);-1!==n&&n>=e&&(o=n)}break;case"param":let n=-1;for(let r=t.length-1;r>=e;r--)if("/"===t[r]){n=r;break}-1!==n&&(o=n);break;case"splat":let r=-1;for(let n=t.length-1;n>e;n--)if("/"===t[n]){r=n+1;break}if(-1!==r)o=r;else{const n=t.slice(e).split("/").filter(t=>t);o=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(s.segments);if(a){const n=t.lastIndexOf(a);-1!==n&&n>=e&&(o=n)}}const i=t.indexOf("?",e);let a;-1!==i&&i<o&&(o=i);try{a=decodeURIComponent(t.slice(e,o))}catch(n){a=t.slice(e,o)}return{params:{[n.name]:a},nextIndex:o}}case"optional":{let o=e,s={},i=!0;for(let e=0;e<n.segments.length;e++){const r=n.segments[e],a=n.segments.slice(e+1),c=this.matchSegment(t,o,r,a);if(!1===c){i=!1;break}Object.assign(s,c.params),o=c.nextIndex}if(i){if(this.canMatchRemainingSegments(t,o,r))return{params:s,nextIndex:o}}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 r=0;for(const o of e)switch(o.type){case"literal":if(t.slice(r,r+o.value.length)!==o.value)return!1;r+=o.value.length;break;case"param":{let e,s=r;for(;s<t.length&&"&"!==t[s];)s++;if(s===r)return!1;try{e=decodeURIComponent(t.slice(r,s))}catch(n){e=t.slice(r,s)}n[o.name]=e,r=s;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 r="";for(let o=0;o<t.length;o++){const s=t[o],i=t.slice(o+1);switch(s.type){case"literal":r+=s.value;break;case"param":case"splat":if(!(s.name in e))return!1;r+=String(e[s.name]);break;case"optional":if(this.hasAllParams(s.segments,e,n)||this.hasLaterOptionalGroupNeedingParams(i,e,s.segments)){const t=this.reverseSegments(s.segments,e,!0);if(!1===t)return!1;r+=t}}}return r}hasLaterOptionalGroupNeedingParams(t,e,n){for(const r of t)if("optional"===r.type&&this.hasAnyParamInSegments(r.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 r=!1,o=!1,s=!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]?r=!0:s=!0}const a=n||r&&!s;for(const n of t)if("optional"===n.type){this.hasAllParams(n.segments,e,a)&&(o=!0)}return!(!r||s)||(!(!o||s)||!(!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 qe(t){const e={};return t.split(";").forEach(t=>{const[n,r]=t.split(":").map(t=>t.trim());n&&r&&(e[n]=r)}),e}var Fe,Ve;function je(t,e,n,r){if(t.style.position="absolute",t.style.width="100%",e)return t.style.height="100%",void(t.style.transition=`opacity ${n}ms ease-in-out`);t.style.top="0",t.style.left="0",t.style.transition=`${r} ${n}ms ease-in-out`}function Ue(t){const e=t.window??window,n=t.document??document,r=[];let o,s,i,a=!1,c=[],l=null,u=null;const h=t.context||{},d=new rt(h,[],"",{},t.fetcher);function m(t){if(!l||!u)return null;const e=t.querySelectorAll(l);for(const t of e){if(t[E]===u)return t}return null}function f(t,e,n,c,l,u){switch(r.push({route:new De(t),tag:e,transition:n,guards:c,layout:l,placard:u}),a=!1,t){case"/404":o=e;break;case"/403":s=e;break;case"/":i=e}}function p(){const t=new Set;c=r.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[J](h,c,e,n)}function v(){switch(t.type){case"hash":return e.location.hash.slice(1);case"pushstate":return e.location.pathname}}function b(t){let e;if(s)e=n.createElement(s),e[T]=h;else{const t=n.createElement("div");t.className="default-403",t.innerHTML="<h1>403</h1><p>Unauthorized</p>",e=t}t.innerHTML="",t.appendChild(e),l=null,u=null}function w(t,e,n){if(!!!t)return!0;const r=Array.isArray(t)?t:[t];for(const t of r){if(!t(h,e))return b(n),!1}return!0}async function S(t,e,n,r,o,s,i){const a=r||m(t);if(!a)return;!function(t,e,n){"function"==typeof t.update&&t.update(h,c,e,n)}(a,s,i);const l=a.querySelector('[slot="page"]');if(!(!n||!l))return e.setAttribute("slot","page"),await x(a,l,e,n),void(o&&(t.innerHTML="",t.appendChild(a)));a.querySelectorAll('[slot="page"]').forEach(t=>t.remove()),e.setAttribute("slot","page"),a.appendChild(e),o&&(t.innerHTML="",t.appendChild(a))}async function A(e,r,o,s,i,a){const c=!1===(d=s)?null:d||(t.layout?t.layout:null);var d;const{element:f,needsNewLayout:p}=function(t){if(t===l)return{element:null,needsNewLayout:!1};if(l=t,!!t){const e=Date.now();u=e;const r=n.createElement(t);return r[T]=h,r[E]=e,{element:r,needsNewLayout:!0}}return u=null,{element:null,needsNewLayout:!0}}(c),y=o||t.transition;if(null!==f||null!==m(e))return await S(e,r,y,f,p,i,a),void g(0,i,a);await async function(t,e,n){const r=t.children[0];n&&r?await x(t,r,e,n):(t.innerHTML="",t.appendChild(e))}(e,r,y),g(0,i,a)}async function _(s){const a=n.querySelector(t.target);if(!a)throw new Error(`Target element not found: ${t.target}`);p(),e.scrollTo(0,0);if((""===s?.trim()||"/"===s)&&!!i){const t=r.find(t=>t.route.match("/"));if(!w(t?.guards,{},a))return;const{element:o,transition:c,layout:l}=function(){const t=n.createElement(i);t[T]=h;const o=e.customElements.get(i),s=o?.[N],a=r.find(t=>t.route.match("/"));return{element:t,transition:s,layout:a?.layout}}();return void await A(a,o,c,l,s,{})}if(!s)return;const c=function(t,e){for(const o of r){const r=o.route.match(t);if(!1===r)continue;if(!w(o.guards,r,e))return{result:Ve.GUARDS_FAILED};const s=n.createElement(o.tag);s[T]=h,s[j]=d;const i=r;return Object.keys(i).forEach(t=>s.setAttribute(t,i[t])),{result:Ve.SUCCESS,element:s,transition:o.transition,layout:o.layout,routeParams:i}}return{result:Ve.NOT_FOUND}}(s,a);if(c.result===Ve.GUARDS_FAILED)return;if(c.result===Ve.SUCCESS){const{element:t,transition:e,layout:n,routeParams:r={}}=c;return void await A(a,t,e,n,s,r)}const{element:l,transition:u,layout:m}=function(){if(o){const t=n.createElement(o);t[T]=h;const r=e.customElements.get(o),s=r?.[N];return{element:t,transition:s,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}}();await A(a,l,u,m,s,{})}async function x(t,e,n,r){return async function(t,e,n,r={}){const o=r.outDuration||300,s=r.inDuration||300,i=r.mode||"sequential",a=r.out?qe(r.out):{opacity:"0"},c={opacity:"0"},l=r.in?qe(r.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");switch(je(e,m,o,"all"),je(n,m,s,"all"),Object.assign(n.style,c),t.appendChild(n),n.offsetHeight,i){case Fe.SIMULTANEOUS:Object.assign(e.style,a),Object.assign(n.style,l),await new Promise(t=>setTimeout(t,Math.max(o,s)));break;case Fe.SEQUENTIAL:Object.assign(e.style,a),await new Promise(t=>setTimeout(t,o)),Object.assign(n.style,l),await new Promise(t=>setTimeout(t,s))}e.remove(),function(t,e){t.style.position="",t.style.width="",t.style.transition="",e?t.style.height="":(t.style.top="",t.style.left="")}(n,m),Object.keys({...c,...l}).forEach(t=>{n.style[t]=""}),d||(u.position=h)}(t,e,n,r)}return{page:function(t){return function(n,r){if(r?.metadata&&r.metadata[y]){n[y]||(n[y]=new Map);for(const[t,e]of r.metadata[y])n[y].set(t,e)}Se(n),n[N]=t.transition;const o=n.prototype.connectedCallback;n.prototype.connectedCallback=function(){this[j]=d,o?.call(this)};const s=n.prototype.disconnectedCallback;return n.prototype.disconnectedCallback=function(){s?.call(this),delete this[T],delete this[j]},e.customElements.get(t.tag)||e.customElements.define(t.tag,n),t.routes.forEach(e=>f(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&&(r.sort((t,e)=>e.route.spec.length-t.route.spec.length),a=!0),p(),function(){const r=()=>{n.querySelector(t.target)&&_(v())};switch(t.type){case"hash":e.addEventListener("hashchange",r);break;case"pushstate":e.addEventListener("popstate",r)}}(),_(v())},navigate:_,register:f}}function ze(t,e){return function(n,r){return function(...o){this[I]||(this[I]=new Map);const s=`${t}_${r.name}`;this[I].has(s)||this[I].set(s,{debounceTimeout:null,throttleLastCall:0,throttleTimeout:null});const i=this[I].get(s),a=n.apply(this,o),c=n=>{if(void 0===n&&!1===e?.dispatchOnUndefined)return;const r=new CustomEvent(t,{bubbles:!0,composed:!0,...e,detail:n});this.dispatchEvent(r)},l=t=>{if(e?.debounce)return clearTimeout(i.debounceTimeout),void(i.debounceTimeout=setTimeout(()=>c(t),e.debounce));if(!e?.throttle)return void c(t);const n=Date.now(),r=e.throttle-(n-i.throttleLastCall);if(r<=0)return clearTimeout(i.throttleTimeout),i.throttleLastCall=n,void c(t);i.throttleTimeout||(i.throttleTimeout=setTimeout(()=>{i.throttleLastCall=Date.now(),i.throttleTimeout=null,c(t)},r))};return a instanceof Promise?a.then(t=>(l(t),t)):(l(a),a)}}}!function(t){t.SEQUENTIAL="sequential",t.SIMULTANEOUS="simultaneous"}(Fe||(Fe={})),function(t){t.SUCCESS="success",t.GUARDS_FAILED="guards-failed",t.NOT_FOUND="not-found"}(Ve||(Ve={}));let Be=!1;function We(t){Be=t}async function He(t,e=500){if(customElements.get(t))return;let n=null;Be||(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 Ge(t,e=500){const n=t.tagName.toLowerCase();await He(n,e),"ready"in t&&"function"==typeof t.ready?.then&&await t.ready}async function Qe(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=>Ge(t,e)))}async function*Ke(t){for(;;)await new Promise(e=>{t[q]||(t[q]=[]),t[q].push(e)}),yield}const Je=e("debounce-timers"),Xe=e("throttle-timers"),Ye=e("once-called"),Ze=e("memoize-cache");function tn(t=300,e={}){const{leading:n=!1,trailing:r=!0,maxWait:o}=e;return function(e,s){const i=s.name;return function(...s){this[Je]||(this[Je]={});const a=this[Je],c=i;a[c]&&clearTimeout(a[c].timeout);const l=Date.now(),u=!a[c],h=u?l:a[c].startTime,d=void 0!==o&&l-h>=o;if(n&&u){const t=e.apply(this,s);return a[c]={timeout:null,startTime:h,lastArgs:s},t}const m=setTimeout(()=>{(r||d)&&e.apply(this,a[c].lastArgs),delete a[c]},d?0:t);a[c]={timeout:m,startTime:h,lastArgs:s}}}}function en(t=300,e={}){const{leading:n=!0,trailing:r=!0}=e;return function(e,o){const s=o.name;return function(...o){this[Xe]||(this[Xe]={});const i=this[Xe],a=s,c=Date.now();if(!i[a])return n&&e.apply(this,o),i[a]={lastInvoke:c,timeout:null,lastArgs:o},void(r&&!n&&(i[a].timeout=setTimeout(()=>{e.apply(this,i[a].lastArgs),delete i[a]},t)));const l=c-i[a].lastInvoke;if(i[a].lastArgs=o,i[a].timeout&&clearTimeout(i[a].timeout),l>=t)return e.apply(this,o),void(i[a].lastInvoke=c);if(r){const n=t-l;i[a].timeout=setTimeout(()=>{e.apply(this,i[a].lastArgs),i[a].lastInvoke=Date.now(),i[a].timeout=null},n)}}}}function nn(t=!0){let e,n=!1;return function(r,o){const s=o.name;return function(...o){return t?(this[Ye]||(this[Ye]={}),this[Ye][s]||(this[Ye][s]={called:!0,result:r.apply(this,o)}),this[Ye][s].result):(n||(n=!0,e=r.apply(this,o)),e)}}}function rn(t={}){const{keyGenerator:e=(...t)=>JSON.stringify(t),maxSize:n=100,ttl:r}=t;return function(t,o){const s=o.name;return function(...o){this[Ze]||(this[Ze]={}),this[Ze][s]||(this[Ze][s]=new Map);const i=this[Ze][s],a=e(...o);if(i.has(a)){const t=i.get(a);if(!(void 0!==r&&Date.now()-t.timestamp>r))return t.value;i.delete(a)}const c=t.apply(this,o);if(i.set(a,{value:c,timestamp:Date.now()}),i.size>n){const t=i.keys().next().value;i.delete(t)}return c}}}function on(t){if(t[Je]){for(const e in t[Je])t[Je][e]?.timeout&&clearTimeout(t[Je][e].timeout);t[Je]={}}}function sn(t){if(t[Xe]){for(const e in t[Xe])t[Xe][e]?.timeout&&clearTimeout(t[Xe][e].timeout);t[Xe]={}}}function an(t,e){t[Ze]&&(e?delete t[Ze][e]:t[Ze]={})}function cn(t,e){t[Ye]&&(e?delete t[Ye][e]:t[Ye]={})}class ln{constructor(){this.requestMiddlewares=[],this.responseMiddlewares=[]}use(t,e){"request"!==t?this.responseMiddlewares.push(e):this.requestMiddlewares.push(e)}create(t){const e=this.requestMiddlewares,n=this.responseMiddlewares;return async function(t,r){const o=new Request(t,r);let s=0;const i=async()=>{if(s<e.length){return e[s++].call(this,o,i)}const t=await fetch(o);let r=0;const a=async()=>{if(r<n.length){return n[r++].call(this,t,a)}return t};return a()};return i()}.bind(t)}}
|
|
21
21
|
/*!
|
|
22
|
-
* snice v4.
|
|
22
|
+
* snice v4.26.1
|
|
23
23
|
* A decorator-driven web component library with differential rendering, routing, controllers, and 130+ ready-made UI components. Use as much or as little as you want. Zero dependencies, works anywhere.
|
|
24
24
|
* (c) 2024
|
|
25
25
|
* Released under the MIT License.
|
|
26
26
|
*/
|
|
27
27
|
var un;"undefined"!=typeof document&&ue(),
|
|
28
28
|
/*!
|
|
29
|
-
* snice v4.
|
|
29
|
+
* snice v4.26.1
|
|
30
30
|
* A decorator-driven web component library with differential rendering, routing, controllers, and 130+ ready-made UI components. Use as much or as little as you want. Zero dependencies, works anywhere.
|
|
31
31
|
* (c) 2024
|
|
32
32
|
* Released under the MIT License.
|