ku4web-components 6.4.80 → 6.4.83
Sign up to get free protection for your applications and to get access to all the features.
- package/angular/index.js +1 -1
- package/angular/index.mjs +1 -1
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/css-shim-6ca600c2.js +6 -0
- package/dist/cjs/dom-8d415461.js +75 -0
- package/dist/cjs/index-652a3cbf.js +14 -0
- package/dist/cjs/{index-1e13241e.js → index-a7b6d98c.js} +1 -1
- package/dist/cjs/index-c904eb3a.js +10 -0
- package/dist/cjs/index-ca4336bd.js +3093 -0
- package/dist/cjs/{index-da3ed39d.js → index-f78c109e.js} +1 -1
- package/dist/cjs/ku4-carousel-controls.cjs.entry.js +10 -4
- package/dist/cjs/ku4-carousel-slide.cjs.entry.js +1 -1
- package/dist/cjs/ku4-carousel.cjs.entry.js +14 -7
- package/dist/cjs/ku4-col.cjs.entry.js +1 -1
- package/dist/cjs/ku4-drawer.cjs.entry.js +1 -1
- package/dist/cjs/ku4-feature.cjs.entry.js +2 -2
- package/dist/cjs/ku4-focus-trap.cjs.entry.js +26 -26
- package/dist/cjs/ku4-form.cjs.entry.js +3 -3
- package/dist/cjs/ku4-grid.cjs.entry.js +1 -1
- package/dist/cjs/ku4-label.cjs.entry.js +2 -2
- package/dist/cjs/ku4-mask.cjs.entry.js +2 -2
- package/dist/cjs/ku4-modal.cjs.entry.js +3 -3
- package/dist/cjs/ku4-panel.cjs.entry.js +1 -1
- package/dist/cjs/ku4-preview.cjs.entry.js +43 -14
- package/dist/cjs/ku4-tab-list.cjs.entry.js +4 -4
- package/dist/cjs/ku4-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/ku4-tab.cjs.entry.js +3 -3
- package/dist/cjs/ku4-table.cjs.entry.js +1 -1
- package/dist/cjs/ku4-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/ku4-validation.cjs.entry.js +2 -2
- package/dist/cjs/ku4web-components.cjs.js +103 -8
- package/dist/cjs/loader.cjs.js +19 -3
- package/dist/cjs/{shadow-css-8940f82d.js → shadow-css-78860e39.js} +1 -1
- package/dist/cjs/{uid-d6942c42.js → uid-97baaecc.js} +1 -1
- package/dist/cjs/uid-eb3bec28.js +11 -0
- package/dist/collection/capabilities/a11y/aria.js +26 -0
- package/dist/collection/capabilities/angular/index.js +24 -0
- package/dist/collection/capabilities/decorators/deprecated.js +20 -0
- package/dist/collection/capabilities/decorators/index.js +3 -0
- package/dist/collection/capabilities/decorators/memoize.js +7 -0
- package/dist/collection/capabilities/dom/isFocusable.js +7 -0
- package/dist/collection/capabilities/dom/queryFocusable.js +2 -0
- package/dist/collection/capabilities/identity/uid.js +6 -0
- package/dist/collection/capabilities/mask/index.js +5 -0
- package/dist/collection/capabilities/mask/patterns/date.js +40 -0
- package/dist/collection/capabilities/mask/patterns/index.js +7 -0
- package/dist/collection/capabilities/react/index.js +25 -0
- package/dist/collection/capabilities/testing/html.js +14 -0
- package/dist/collection/capabilities/testing/styles.js +14 -0
- package/dist/collection/capabilities/vue/index.js +28 -0
- package/dist/collection/capabilities/vue3/index.js +26 -0
- package/dist/collection/collection-manifest.json +31 -0
- package/dist/collection/components/ku4-carousel/ku4-carousel.css +221 -0
- package/dist/collection/components/ku4-carousel/ku4-carousel.js +369 -0
- package/dist/collection/components/ku4-carousel-controls/ku4-carousel-controls.css +32 -0
- package/dist/collection/components/ku4-carousel-controls/ku4-carousel-controls.js +112 -0
- package/dist/collection/components/ku4-carousel-slide/ku4-carousel-slide.css +3 -0
- package/dist/collection/components/ku4-carousel-slide/ku4-carousel-slide.js +159 -0
- package/dist/collection/components/ku4-col/ku4-col.css +601 -0
- package/dist/collection/components/ku4-col/ku4-col.js +288 -0
- package/dist/collection/components/ku4-drawer/ku4-drawer.css +56 -0
- package/dist/collection/components/ku4-drawer/ku4-drawer.js +163 -0
- package/dist/collection/components/ku4-feature/ku4-feature.js +70 -0
- package/dist/collection/components/ku4-focus-trap/ku4-focus-trap.css +3 -0
- package/dist/collection/components/ku4-focus-trap/ku4-focus-trap.js +441 -0
- package/dist/collection/components/ku4-form/ku4-form.js +225 -0
- package/dist/collection/components/ku4-grid/ku4-grid.css +751 -0
- package/dist/collection/components/ku4-grid/ku4-grid.js +408 -0
- package/dist/collection/components/ku4-label/ku4-label.css +36 -0
- package/dist/collection/components/ku4-label/ku4-label.js +115 -0
- package/dist/collection/components/ku4-mask/ku4-mask.css +3 -0
- package/dist/collection/components/ku4-mask/ku4-mask.js +458 -0
- package/dist/collection/components/ku4-modal/ku4-modal.css +85 -0
- package/dist/collection/components/ku4-modal/ku4-modal.js +208 -0
- package/dist/collection/components/ku4-panel/ku4-panel.css +14 -0
- package/dist/collection/components/ku4-panel/ku4-panel.js +119 -0
- package/dist/collection/components/ku4-preview/ku4-preview.css +23 -0
- package/dist/collection/components/ku4-preview/ku4-preview.js +266 -0
- package/dist/collection/components/ku4-tab/ku4-tab.css +82 -0
- package/dist/collection/components/ku4-tab/ku4-tab.js +191 -0
- package/dist/collection/components/ku4-tab-list/ku4-tab-list.css +6 -0
- package/dist/collection/components/ku4-tab-list/ku4-tab-list.js +118 -0
- package/dist/collection/components/ku4-tab-panel/ku4-tab-panel.css +26 -0
- package/dist/collection/components/ku4-tab-panel/ku4-tab-panel.js +166 -0
- package/dist/collection/components/ku4-table/ku4-table.css +116 -0
- package/dist/collection/components/ku4-table/ku4-table.js +120 -0
- package/dist/collection/components/ku4-tooltip/ku4-tooltip.css +56 -0
- package/dist/collection/components/ku4-tooltip/ku4-tooltip.js +274 -0
- package/dist/collection/components/ku4-validation/ku4-validation.css +19 -0
- package/dist/collection/components/ku4-validation/ku4-validation.js +364 -0
- package/dist/collection/components/ku4-validation/validate.js +14 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/security.js +27 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/css-shim-e6dd2538.js +4 -0
- package/dist/esm/dom-7fc649b0.js +73 -0
- package/dist/esm/index-3e1e5aa3.js +3 -0
- package/dist/esm/index-7fe386de.js +3057 -0
- package/dist/esm/index-7ff6e718.js +3 -0
- package/dist/esm/{index-9e3af5f4.js → index-81a98b72.js} +1 -1
- package/dist/esm/{index-20c3926d.js → index-bdb0771a.js} +1 -1
- package/dist/esm/ku4-carousel-controls.entry.js +10 -4
- package/dist/esm/ku4-carousel-slide.entry.js +1 -1
- package/dist/esm/ku4-carousel.entry.js +14 -7
- package/dist/esm/ku4-col.entry.js +1 -1
- package/dist/esm/ku4-drawer.entry.js +1 -1
- package/dist/esm/ku4-feature.entry.js +2 -2
- package/dist/esm/ku4-focus-trap.entry.js +3 -3
- package/dist/esm/ku4-form.entry.js +3 -3
- package/dist/esm/ku4-grid.entry.js +1 -1
- package/dist/esm/ku4-label.entry.js +2 -2
- package/dist/esm/ku4-mask.entry.js +2 -2
- package/dist/esm/ku4-modal.entry.js +3 -3
- package/dist/esm/ku4-panel.entry.js +1 -1
- package/dist/esm/ku4-preview.entry.js +34 -5
- package/dist/esm/ku4-tab-list.entry.js +4 -4
- package/dist/esm/ku4-tab-panel.entry.js +3 -3
- package/dist/esm/ku4-tab.entry.js +3 -3
- package/dist/esm/ku4-table.entry.js +1 -1
- package/dist/esm/ku4-tooltip.entry.js +2 -2
- package/dist/esm/ku4-validation.entry.js +2 -2
- package/dist/esm/ku4web-components.js +103 -8
- package/dist/esm/loader.js +19 -3
- package/dist/esm/{shadow-css-5d2d01ce.js → shadow-css-4d56fa31.js} +1 -1
- package/dist/esm/{uid-15f8c937.js → uid-1ec3509b.js} +1 -1
- package/dist/esm/uid-9dbd7ad0.js +9 -0
- package/dist/esm-es5/{index-9e3af5f4.js → index-81a98b72.js} +1 -1
- package/dist/esm-es5/{index-20c3926d.js → index-bdb0771a.js} +1 -1
- package/dist/esm-es5/ku4-carousel-controls.entry.js +1 -1
- package/dist/esm-es5/ku4-carousel-slide.entry.js +1 -1
- package/dist/esm-es5/ku4-carousel.entry.js +1 -1
- package/dist/esm-es5/ku4-col.entry.js +1 -1
- package/dist/esm-es5/ku4-drawer.entry.js +1 -1
- package/dist/esm-es5/ku4-feature.entry.js +1 -1
- package/dist/esm-es5/ku4-focus-trap.entry.js +1 -1
- package/dist/esm-es5/ku4-form.entry.js +1 -1
- package/dist/esm-es5/ku4-grid.entry.js +1 -1
- package/dist/esm-es5/ku4-label.entry.js +1 -1
- package/dist/esm-es5/ku4-mask.entry.js +1 -1
- package/dist/esm-es5/ku4-modal.entry.js +1 -1
- package/dist/esm-es5/ku4-panel.entry.js +1 -1
- package/dist/esm-es5/ku4-preview.entry.js +1 -1
- package/dist/esm-es5/ku4-tab-list.entry.js +1 -1
- package/dist/esm-es5/ku4-tab-panel.entry.js +1 -1
- package/dist/esm-es5/ku4-tab.entry.js +1 -1
- package/dist/esm-es5/ku4-table.entry.js +1 -1
- package/dist/esm-es5/ku4-tooltip.entry.js +1 -1
- package/dist/esm-es5/ku4-validation.entry.js +1 -1
- package/dist/esm-es5/ku4web-components.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{shadow-css-5d2d01ce.js → shadow-css-4d56fa31.js} +0 -0
- package/dist/esm-es5/uid-1ec3509b.js +1 -0
- package/dist/index.js +1 -1
- package/dist/ku4web-components/app-globals-0f993ce5.js +3 -0
- package/dist/ku4web-components/app-globals-497eb362.system.js +1 -0
- package/dist/ku4web-components/css-shim-b6eec689.system.js +1 -0
- package/dist/ku4web-components/css-shim-e6dd2538.js +4 -0
- package/dist/ku4web-components/dom-7fc649b0.js +73 -0
- package/dist/ku4web-components/dom-88962da0.system.js +21 -0
- package/dist/ku4web-components/index-380cbe3a.system.js +1 -0
- package/dist/ku4web-components/index-3e1e5aa3.js +3 -0
- package/dist/ku4web-components/index-5029fd1f.system.js +1 -0
- package/dist/ku4web-components/index-7d482e8a.system.js +1 -0
- package/dist/ku4web-components/index-7fe386de.js +3057 -0
- package/dist/ku4web-components/index-7ff6e718.js +3 -0
- package/dist/ku4web-components/index.esm.js +1 -0
- package/dist/ku4web-components/index.system.js +1 -0
- package/dist/ku4web-components/ku4-carousel-controls.entry.js +89 -0
- package/dist/ku4web-components/ku4-carousel-controls.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-carousel-slide.entry.js +47 -0
- package/dist/ku4web-components/ku4-carousel-slide.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-carousel.entry.js +175 -0
- package/dist/ku4web-components/ku4-carousel.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-col.entry.js +75 -0
- package/dist/ku4web-components/ku4-col.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-drawer.entry.js +35 -0
- package/dist/ku4web-components/ku4-drawer.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-feature.entry.js +29 -0
- package/dist/ku4web-components/ku4-feature.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-focus-trap.entry.js +323 -0
- package/dist/ku4web-components/ku4-focus-trap.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-form.entry.js +112 -0
- package/dist/ku4web-components/ku4-form.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-grid.entry.js +108 -0
- package/dist/ku4web-components/ku4-grid.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-label.entry.js +70 -0
- package/dist/ku4web-components/ku4-label.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-mask.entry.js +342 -0
- package/dist/ku4web-components/ku4-mask.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-modal.entry.js +75 -0
- package/dist/ku4web-components/ku4-modal.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-panel.entry.js +49 -0
- package/dist/ku4web-components/ku4-panel.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-preview.entry.js +128 -0
- package/dist/ku4web-components/ku4-preview.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-tab-list.entry.js +76 -0
- package/dist/ku4web-components/ku4-tab-list.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-tab-panel.entry.js +72 -0
- package/dist/ku4web-components/ku4-tab-panel.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-tab.entry.js +63 -0
- package/dist/ku4web-components/ku4-tab.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-table.entry.js +79 -0
- package/dist/ku4web-components/ku4-table.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-tooltip.entry.js +120 -0
- package/dist/ku4web-components/ku4-tooltip.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-validation.entry.js +162 -0
- package/dist/ku4web-components/ku4-validation.system.entry.js +1 -0
- package/dist/ku4web-components/ku4web-components.css +299 -1
- package/dist/ku4web-components/ku4web-components.esm.js +129 -1
- package/dist/ku4web-components/ku4web-components.js +1 -1
- package/dist/ku4web-components/ku4web-components.system.js +1 -0
- package/dist/ku4web-components/{p-15ee8b8e.system.entry.js → p-02328d34.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-01debe28.system.entry.js → p-050f184b.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-8e2fca0b.system.entry.js → p-073cefec.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-22eed87f.entry.js → p-097ba217.entry.js} +1 -1
- package/dist/ku4web-components/{p-f1cc1b2d.entry.js → p-0adeb8e4.entry.js} +1 -1
- package/dist/ku4web-components/{p-840704e4.entry.js → p-0ce97586.entry.js} +1 -1
- package/dist/ku4web-components/p-0f77bef9.system.js +1 -0
- package/dist/ku4web-components/{p-761b2cbc.system.entry.js → p-136e5a03.system.entry.js} +1 -1
- package/dist/ku4web-components/p-17d548db.js +1 -0
- package/dist/ku4web-components/{p-c1068ffa.js → p-189cde73.js} +1 -1
- package/dist/ku4web-components/{p-2f2d74dc.system.entry.js → p-1d5a1caf.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-a5c7f5f7.system.entry.js → p-288482da.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-0e010c10.system.entry.js → p-3a0d1ff7.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-d360c64a.entry.js → p-3f147a02.entry.js} +1 -1
- package/dist/ku4web-components/{p-0f8708f8.entry.js → p-3f2a008c.entry.js} +1 -1
- package/dist/ku4web-components/{p-8faad87d.entry.js → p-3f4082d5.entry.js} +1 -1
- package/dist/ku4web-components/{p-7273db60.entry.js → p-49275772.entry.js} +1 -1
- package/dist/ku4web-components/{p-232787a5.system.entry.js → p-4bfca34b.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-04948520.system.entry.js → p-524cef27.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-67adc5b1.system.entry.js → p-52d815ab.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-2edd35f8.system.entry.js → p-596beaad.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-f06bf0ae.entry.js → p-5f9d0077.entry.js} +1 -1
- package/dist/ku4web-components/{p-660ebd19.entry.js → p-5fcea805.entry.js} +1 -1
- package/dist/ku4web-components/{p-adddaeef.entry.js → p-61214088.entry.js} +1 -1
- package/dist/ku4web-components/{p-d6ec34c3.entry.js → p-66b8247f.entry.js} +1 -1
- package/dist/ku4web-components/{p-9c0d71af.system.entry.js → p-6b9e3523.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-02e342f7.system.entry.js → p-6cfd9011.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-8d9eb18b.system.entry.js → p-7bfc256a.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-77f1853c.entry.js → p-818caf0f.entry.js} +1 -1
- package/dist/ku4web-components/{p-3874127d.entry.js → p-8642aef5.entry.js} +1 -1
- package/dist/ku4web-components/{p-f6455ab3.js → p-881e100a.js} +0 -0
- package/dist/ku4web-components/{p-19a8c0f6.system.entry.js → p-95698618.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-f0b1c07c.system.js → p-96ec7b4f.system.js} +1 -1
- package/dist/ku4web-components/{p-ce6eddc3.system.entry.js → p-a0d0c99e.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-b4488a7d.system.entry.js → p-acb43765.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-c19fd841.entry.js → p-b47bb3d0.entry.js} +1 -1
- package/dist/ku4web-components/{p-0785fc39.system.js → p-c3293202.system.js} +1 -1
- package/dist/ku4web-components/{p-eb6882c8.entry.js → p-c798faf2.entry.js} +1 -1
- package/dist/ku4web-components/{p-3c182b2f.entry.js → p-cd0d0b40.entry.js} +1 -1
- package/dist/ku4web-components/p-cd4cdcbb.entry.js +1 -0
- package/dist/ku4web-components/{p-8f480cb5.system.entry.js → p-d848909c.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-90c37394.entry.js → p-d8868855.entry.js} +1 -1
- package/dist/ku4web-components/p-db3040f3.system.js +1 -0
- package/dist/ku4web-components/{p-2aac6c90.js → p-e6b3a708.js} +1 -1
- package/dist/ku4web-components/{p-c50540ec.system.entry.js → p-ea4b32de.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-e4ff1c36.entry.js → p-f3fbe1e6.entry.js} +1 -1
- package/dist/ku4web-components/p-f64c1f55.entry.js +1 -0
- package/dist/ku4web-components/{p-71d57b8b.system.js → p-fbf3ad1e.system.js} +0 -0
- package/dist/ku4web-components/{p-0eb73a0f.system.entry.js → p-fc0c3bf4.system.entry.js} +1 -1
- package/dist/ku4web-components/shadow-css-4d56fa31.js +388 -0
- package/dist/ku4web-components/shadow-css-d0426811.system.js +13 -0
- package/dist/ku4web-components/uid-9dbd7ad0.js +9 -0
- package/dist/ku4web-components/uid-fb867945.system.js +1 -0
- package/dist/types/components/ku4-carousel/ku4-carousel.d.ts +3 -2
- package/dist/types/components/ku4-carousel-controls/ku4-carousel-controls.d.ts +1 -0
- package/dist/types/components/ku4-carousel-slide/ku4-carousel-slide.d.ts +6 -0
- package/dist/types/components.d.ts +10 -2
- package/package.json +15 -15
- package/react/index.js +1 -1
- package/react/index.mjs +1 -1
- package/vue/index.js +1 -1
- package/vue/index.mjs +1 -1
- package/vue3/index.js +1 -1
- package/vue3/index.mjs +1 -1
- package/dist/esm-es5/uid-15f8c937.js +0 -1
- package/dist/ku4web-components/p-7a47027b.entry.js +0 -1
- package/dist/ku4web-components/p-b590da20.entry.js +0 -1
- package/dist/ku4web-components/p-be7890a1.system.js +0 -1
- package/dist/ku4web-components/p-cbbb4b1b.js +0 -1
- package/dist/ku4web-components/p-eb58b04b.system.js +0 -1
@@ -0,0 +1,3 @@
|
|
1
|
+
class t{static isNull(e){return null===e}static isEmpty(e){return t.isString(e)&&""===e||t.isArray(e)&&e.length<1||t.isObjectLiteral(e)&&Object.keys(e).length<1}static isUndefined(e){return void 0===e}static isZero(e){return 0===e}static exists(e){return !(t.isUndefined(e)||t.isNull(e))}static isNullOrEmpty(e){return !t.exists(e)||t.isEmpty(e)}static isArray(e){return Array.isArray(e)}static isBool(e){return "boolean"==typeof e}static isTrue(e){return t.isBool(e)&&!0===e}static isFalse(e){return t.isBool(e)&&!1===e}static isDate(e){return e instanceof Date}static isNumber(e){return ("number"==typeof e||e instanceof Number)&&!isNaN(e)}static isEven(e){return this.isNumber(e)&&!this.isZero(e)&&e%2==0}static isOdd(e){return this.isNumber(e)&&!this.isZero(e)&&!this.isEven(e)}static isString(e){return "string"==typeof e||e instanceof String}static isFunction(e){return e instanceof Function}static isAsyncFunction(e){try{return "AsyncFunction"===Object.getPrototypeOf(e).constructor.name||t.isFunction(e)&&/^async/.test(e.toString())||t.isFunction(e().then)}catch(e){return !1}}static isPromise(e){return e instanceof Promise}static isObject(e){return t.exists(e)&&"object"==typeof e&&!(t.isBool(e)||t.isNumber(e)||t.isDate(e)||t.isArray(e)||t.isString(e)||t.isFunction(e))}static isObjectLiteral(e){return t.isObject(e)&&e.constructor==={}.constructor}static isTruthy(e){return !t.isFalsy(e)}static isFalsy(e){return t.isZero(e)||t.isFalse(e)||t.isNullOrEmpty(e)||isNaN(e)}}function e(...e){return "".concat(...e)}function r(e,...t){return t.reduce(((e,t,r)=>e.replace(new RegExp(`\\{${r}\\}`,"g"),t&&t.toString?t.toString():t)),e)}function i(e){return s(n(e))}function s(e){return t.exists(e)&&t.isFunction(e.replace)?e.replace(/^[\s\n]*/,""):e}function n(e){return t.exists(e)&&t.isFunction(e.replace)?e.replace(/[\s\n]*$/,""):e}var a=Object.freeze({__proto__:null,build:e,chunk:function(e,r=0){if(!t.isString(e)||Number.isNaN(r)||r<0)return [];if(r<e.length){let t=0;const n=r||e.length,s=[];for(;t<e.length;)s.push(e.slice(t,t+n)),t+=n;return s}return [e]},format:r,trim:i,trimStart:s,trimEnd:n,capitalize:function(e=""){return (e||"").charAt(0).toUpperCase()+(e||"").slice(1).toLowerCase()},mask:function(e,r,n="_"){return t.isFunction(r)?r(e):t.isString(r)&&e.split("").reduce(((e,t)=>e.replace(new RegExp(n),t)),r)},unmask:function(e,r,n="_"){const s=new RegExp(n);return t.isFunction(r)?r(e):t.isString(r)&&e.split("").reduce(((e,t,n)=>!s.test(t)&&s.test(r.charAt(n))?e+t:e),"")}});function h(e,t){try{return e()}catch{return t}}let l;h.async=async(e,t)=>{try{return await e()}catch{return t}};class d{constructor(e,t,r){if(t<1||t>12)throw new Error("Invalid month at Assert.DayPoint");if(r<1||r>y(t,e))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(e,t-1,r):new Date,this._day=this._value.getDay(),this._date=r,this._month=t,this._year=e;}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const e=this._year.toString();return parseInt(e.substr(e.length-2))}get isWeekday(){const e=this._day;return e>0&&e<6}get isWeekend(){return !this.isWeekday}get isLeapYear(){return f(this._year)}get nextDay(){return p(this,1,0,0)}get prevDay(){return p(this,-1,0,0)}get nextMonth(){return p(this,0,1,0)}get prevMonth(){return p(this,0,-1,0)}get nextYear(){return p(this,0,0,1)}get prevYear(){return p(this,0,0,-1)}get firstDayOfMonth(){return new d(this._year,this._month,1)}get lastDayOfMonth(){return new d(this._year,this._month,y(this._month,this._year))}add(e,t,r){function n(e,t,r){let n=e,s=t;for(;s--;)n=n[r];return n}const{abs:s}=Math,o=s(e),i=s(r),a=s(t),c=r<0?"prevDay":"nextDay",u=t<0?"prevMonth":"nextMonth";return n(n(n(this,o,e<0?"prevYear":"nextYear"),a,u),i,c)}isBefore(e){return !(this.isAfter(e)||this.equals(e))}isAfter(e){const t=this._year,r=e.year,n=this._month,s=e.month;return t>r||t===r&&n>s||t===r&&n===s&&this._date>e.date}equals(e){return this._year===e.year&&this._month===e.month&&this._date===e.date}toString(e="mm/dd/yyyy"){const t=/y{3,}/i.test(e)?this._year:this.shortYear,n=this._month,s=this._date,o=/m{2}/i.test(e)&&n<10?"0{1}":"{1}",i=/d{2}/i.test(e)&&s<10?"0{2}":"{2}";return r(e.replace(/y+/gi,"{0}").replace(/m+/gi,o).replace(/d+/gi,i),t,n,s)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(e){return t.isString(e)||t.isNumber(e)||t.isDate(e)?!isNaN(new Date(e).valueOf()):e instanceof d}static parse(e){if(e instanceof d)return e;let n=t.isString(e)?i(e).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):e;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(n)){const e=n.split("-"),[t]=e;e.push(t),e.shift(),n=e.join("/");}const s=new Date(n);if(!t.exists(n)||Number.isNaN(s.valueOf()))throw new Error(r("Cannot parse value= {0}",n));return new d(s.getFullYear(),s.getMonth()+1,s.getDate())}static tryParse(e){return h((()=>d.parse(e)),null)}static assumeNow(e){l=d.parse(e);}static get today(){return l||d.parse(new Date)}}function y(e,r){return 2===e?f(r)?29:28:e<8&&t.isEven(e)||e>7&&t.isOdd(e)?30:31}function f(t){const r=t.toString().split(/\B/);return parseFloat(e(r[r.length-2],r[r.length-1]))%4==0}function p(e,t,r,n){const s=e.month,o=e.year,i=e.date,a=r,c=n;let u=i+t,l=s+a,h=o+c;if(i+t>y(s,o)&&(u=1,l=s+a+1),i+t<1){const t=e.prevMonth;u=y(t.month,t.year),l=s+a-1;}return l>12&&(l=1,h=o+c+1),l<1&&(l=12,h=o+c-1),new d(h,l,u)}function m(e,t=0){const r=Math.pow(10,-t);return Math.round(parseFloat((e*r).toFixed(Math.abs(t))))/r}function g(e,t=0){return m(e+5*Math.pow(10,t-1),t)}function _(e,t=0){return 0===e?0:m(e-5*Math.pow(10,t-1),t)}function w(e,t=0){return e<0?g(e,t):_(e,t)}function x(e){const t=(e,r=0,n=1)=>0<e?t(--e,n,r+n):r;return t(e)}function v(e){let t=0,r=1,n=0;for(;e>1;)n=t,t=r,r+=n,e--;return e<1?t:r}function b(e,t=0){const r=parseInt(e);return Number.isNaN(r)?t:r}var N=Object.freeze({__proto__:null,random:function(e=0,t=1){return Math.random()*(t-e)+e},round:m,roundUp:g,roundDown:_,roundTowardZero:w,gcd:function e(t,r){return 0===r?Math.abs(t):e(r,t%r)},fib:x,fib2:v,fibArray:function(e){return Array(e).fill(0).map((()=>x(--e))).reverse()},fib2Array:function(e){return Array(e).fill(0).map((()=>v(--e))).reverse()},tryParseInt:b,tryParseFloat:function(e,t=0){const r=parseFloat(e);return Number.isNaN(r)?t:r}});class ${constructor(e=0,r=0){if(!t.isNumber(e)||!t.isNumber(r))throw new Error("Coord requires numeric x and y values");this._x=e,this._y=r;}get x(){return this._x}get y(){return this._y}get value(){return {x:this.x,y:this.y}}get half(){return this.divide(new $(2,2))}get abs(){return new $(Math.abs(this.x),Math.abs(this.y))}equals(e){return this.x===e.x&&this.y===e.y}add(e){return new $(this.x+e.x,this.y+e.y)}subtract(e){return new $(this.x-e.x,this.y-e.y)}multiply(e){return new $(this.x*e.x,this.y*e.y)}divide(e){return new $(this.x/e.x,this.y/e.y)}round(e=0){return new $(m(this.x,e),m(this.y,e))}toString(){return `(${this.x},${this.y})`}static canParse(e){return t.isArray(e)?!(Number.isNaN(e[0])||Number.isNaN(e[1])):t.isObjectLiteral(e)&&"x"in e&&"y"in e?!(Number.isNaN(e.x)||Number.isNaN(e.y)):e instanceof $}static parse(e){return t.exists(e)?e instanceof $?e:t.isArray(e)?new $(e[0],e[1]):t.isObjectLiteral(e)&&t.exists(e.x)&&t.exists(e.y)?new $(e.x,e.y):null:null}static tryParse(e){return h((()=>$.parse(e)),null)}}class F extends ${constructor(e=0,t=0){super(e,t),this._lengthSquared=Math.pow(e,2)+Math.pow(t,2),this._magnitude=Math.sqrt(this._lengthSquared),this._unitNormalX=0===e&&0===t?0:e/this._magnitude,this._unitNormalY=0===e&&0===t?0:t/this._magnitude;}get magnitude(){return this._magnitude}get isZero(){return 0===this.x&&0===this.y}get normal(){return new F(this._unitNormalX,this._unitNormalY)}get invert(){return new F(-this.x,-this.y)}get norm(){return new F(Math.abs(this.x),Math.abs(this.y))}get perpendicular(){return new F(-this.y,this.x)}equals(e){return e instanceof F&&this.x===e.x&&this.y===e.y}add(e){return e instanceof F?new F(this.x+e.x,this.y+e.y):null}dot(e){return e instanceof F?this.x*e.x+this.y*e.y:null}perpendicularAtTo(e){if(!(e instanceof F))return null;const t=e.add(this.projectionOfOnto(e).invert);return new F(t.x,t.y)}projectionOfOnto(e){if(!(e instanceof F))return null;const t=e.normal.scale(this.dot(e.normal));return new F(t.x,t.y)}scale(e){return new F(this.x*e,this.y*e)}unitNormalDot(e){return e instanceof F?this.normal.x*e.normal.x+this.normal.y*e.normal.y:null}reflect(e){if(!(e instanceof F))return null;if(e.isZero)return this;const t=e.normal;return this.add(t.scale(2*t.dot(this)).invert)}round(e=0){return new F(m(this.x,e),m(this.y,e))}}class O extends ${constructor(e,t){super(e,t);}isAbove(e){return this.y<e.y}isBelow(e){return this.y>e.y}isLeftOf(e){return this.x<e.x}isRightOf(e){return this.x>e.x}distanceFrom(e){return new F(this.x-e.x,this.y-e.y)}distanceTo(e){return this.distanceFrom(e).invert}static canParse(e){return e instanceof O||$.canParse(e)}static parse(e){if(e instanceof O)return e;const t=$.parse(e);return new O(t.x,t.y)}static tryParse(e){return h((()=>O.parse(e)),null)}}function k(){return Math.random().toString().substr(2)}function Z(){return function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}var R=Object.freeze({__proto__:null,uid:k,uuid:Z,suid:function(){return Symbol(k())},suuid:function(){return Symbol(Z())}});Object.freeze({__proto__:null,pattern:e=>e.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/#:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?#]+=[^=?#]*(&[^=?#]+=[^=?#]*)*(#.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class Cookie{static serialize(e,r=defaultParams){try{if(t.isUndefined(e))throw new Error;const{name:n,expires:s,path:o,domain:i,secure:a}=Object.assign(defaultParams,r),c=kvPair(n,e),u=d.canParse(s)?kvPair("; expires",d.parse(s).toDate().toGMTString()):"",l=o?kvPair("; path",o.split("/").map((e=>encodeURIComponent(e))).join("/")):"",h=i?kvPair("; domain",encodeURIComponent(i)):"";return c+u+l+h+(a?"; secure":"")}catch(t){throw new Error(a.format("Cannot serialize {0}",e))}}static deserialize(e){try{return read$1(e)[1]}catch(t){throw new Error(a.format("Cannot deserialize {0}",e))}}static read(e){try{const[t,r]=read$1(e);return {name:t,value:r}}catch(t){throw new Error(a.format("Cannot read {0}",e))}}}const defaultParams={name:R.uid(),expires:d.today.nextYear.toDate(),path:"/",domain:null,secure:!1},kvPair=(e,t)=>`${e}=${t}`,read$1=e=>/;/.test(e)?e.substring(0,e.search(";")).split("="):e.split("=");class Device{static get orientation(){const{screen:e}=window,t=(e.orientation||{}).type||e.mozOrientation||e.msOrientation,r=window.orientation;return t===Device.landscapePrimary||90===r?Device.landscapePrimary:t===Device.landscapeSecondary||-90===r?Device.landscapeSecondary:t===Device.portraitPrimary||0===r?Device.portraitPrimary:t===Device.portraitSecondary||180===r?Device.portraitSecondary:void 0}static get landscapePrimary(){return "landscape-primary"}static get landscapeSecondary(){return "landscape-secondary"}static get portraitPrimary(){return "portrait-primary"}static get portraitSecondary(){return "portrait-secondary"}static get isMobile(){return /Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(window.navigator.userAgent)}}const onPreventScroll=new Set,onResumeScroll=new Set;let scroll,lastPageYOffset,lastPageXOffset,scrollIsDown=!1,scrollIsUp=!1,scrollIsLeft=!1,scrollIsRight=!1;class Document{static get scrollbarWidth(){return window.innerWidth-document.documentElement.clientWidth}static get isScrollPrevented(){return t.exists(Document.scrollY)}static preventScroll(){try{onPreventScroll.forEach((e=>e()));}catch(e){}Document.position=document.body.style.position,Document.offsetY=document.body.style.top,Document.offsetX=document.body.style.left,Document.width=document.body.style.width,Document.height=document.body.style.height,Document.documentWidth=document.documentElement.style.width,Document.documentWidth=document.documentElement.style.width,Document.documentHeight=document.documentElement.style.height,Document.overflowY=document.documentElement.style.overflowY,Document.scrollX=window.scrollX||window.pageXOffset,Document.scrollY=window.scrollY||window.pageYOffset;const{scrollbarWidth:e}=Document;document.body.style.position="fixed",document.body.style.left=`-${Document.scrollX}px`,document.body.style.top=`calc(-${Document.scrollY}px - ${window.getComputedStyle(document.body)["padding-top"]} - ${window.getComputedStyle(document.body)["margin-top"]})`,document.body.style.width=`calc(100vw - ${e}px - ${window.getComputedStyle(document.body)["padding-left"]} - ${window.getComputedStyle(document.body)["padding-right"]} - ${window.getComputedStyle(document.body)["margin-left"]} - ${window.getComputedStyle(document.body)["margin-right"]})`,document.documentElement.style.width="100wh",document.documentElement.style.height="100vh",document.documentElement.style.overflowY=e&&"scroll";}static resumeScroll(){try{onResumeScroll.forEach((e=>e()));}catch(e){}document.body.style.position=Document.position,document.body.style.top=Document.offsetY,document.body.style.left=Document.offsetX,document.body.style.width=Document.width,document.body.style.height=Document.height,document.documentElement.style.width=Document.documentWidth,document.documentElement.style.height=Document.documentHeight,document.documentElement.style.overflowY=Document.overflowY,window.scrollTo(Document.scrollX,Document.scrollY),Document.position=null,Document.offsetY=null,Document.offsetX=null,Document.width=null,Document.height=null,Document.documentWidth=null,Document.documentHeight=null,Document.overflowY=null,Document.scrollX=null,Document.scrollY=null;}static onPreventScroll(e){onPreventScroll.add(e);}static onResumeScroll(e){onResumeScroll.add(e);}static get scroll(){return scroll||(scroll=new Scroll,lastPageYOffset=window.pageYOffset,lastPageXOffset=window.pageXOffset,scrollIsDown=!1,scrollIsUp=!1,scrollIsLeft=!1,scrollIsRight=!1,window.addEventListener("unload",(()=>scroll.unload()))),scroll}}const updateScrollValue=()=>{const e=window.pageYOffset,t=window.pageXOffset;scrollIsDown=e>lastPageYOffset,scrollIsUp=e<lastPageYOffset,scrollIsRight=t>lastPageXOffset,scrollIsLeft=t<lastPageXOffset,lastPageYOffset=e||window.pageYOffset,lastPageXOffset=t||window.pageXOffset;};class Scroll{constructor(){document.addEventListener("scroll",updateScrollValue,{passive:!0});}get down(){return scrollIsDown}get up(){return scrollIsUp}get left(){return scrollIsLeft}get right(){return scrollIsRight}unload(){document.removeEventListener("scroll",updateScrollValue),scrollIsDown=!1,scrollIsUp=!1,scrollIsLeft=!1,scrollIsRight=!1,lastPageYOffset=window.pageYOffset,lastPageXOffset=window.pageXOffset,scroll=null;}}function encodeBase64(e,r=!1){if(!t.isString(e))throw new Error("Cannot encode non-string values.");const n=window.btoa(e);return r?n.replace(/=/g,""):n}function decodeBase64(e){if(!t.isString(e))throw new Error("Cannot encode non-string values.");return window.atob(e)}function encodeUtf8(e){if(!t.isString(e))throw new Error("Cannot encode non-string values.");return decodeURIComponent(encodeURIComponent(e))}function decodeUtf8(e){if(!t.isString(e))throw new Error("Cannot decode non-string values.");return decodeURIComponent(encodeURIComponent(e))}class Json{static serialize(e){if(t.isFunction(e))return;if(!t.exists(e))return e;if(!t.isArray(e)&&!t.isObject(e))return e.toString();const r=t.isArray(e)?"[{0}]":"{{0}}",n=[];return Object.keys(e).forEach((r=>{const s=e[r];if(t.isUndefined(s))return;const o=t.isNumber(s)?s:t.isDate(s)?`"${d.parse(s).toJson()}"`:t.isString(s)?`"${serializeString(s)}"`:Json.serialize(s);n[n.length]=(t.isObject(e)&&!t.isArray(e)?`"${r}":`:"")+o;})),a.format(r,n)}static deserialize(e){return /function|(=$)/i.test(e)?e:Json.deserialize_unsafe(e)}static deserialize_unsafe(value){try{const result=t.isString(value)?eval(`(${deserializeString(value)})`):value;return t.exists(result)?t.isNullOrEmpty(result.tagName)&&(t.isObject(result)||t.isArray(result))?(Object.keys(result).forEach((e=>{const r=result[e];(t.isObject(r)||t.isArray(r))&&(result[e]=Json.deserialize(r)),/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(r)&&d.canParse(r)&&(result[e]=d.parse(r).toDate());})),result):/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(result)?d.parse(result).toDate():result:result}catch(e){throw new Error(a.format("Cannot deserialize {0}",value))}}static encode(e,t=!1){try{return encodeBase64(Json.serialize(e),t)}catch(t){throw new Error(a.format("Cannot encode {0}",e))}}static decode(e){try{return Json.deserialize(decodeBase64(e))}catch(t){throw new Error(a.format("Cannot decode {0}",e))}}}function serializeString(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\//g,"/").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}function deserializeString(e){return e.replace(/\\\//g,"/").replace(/\\\\f/g,"\\f").replace(/\\\\n/g,"\\n").replace(/\\\\r/g,"\\r").replace(/\\\\t/g,"\\t")}class QueryString{static serialize(e){try{let r="";return Object.keys(e).forEach((n=>{const s=e[n],o=t.isDate(s)?d.parse(s).toJson():s;r+=a.format("&{0}={1}",encodeURIComponent(n),encodeURIComponent(Json.serialize(o)));})),r.replace(/^&/,"")}catch(t){throw new Error(a.format("Cannot serialize {0}",e))}}static deserialize(e){if(/\??[^\s"'<>]+=[^\s"'<>]+/.test(e)){const t=e.replace(/.*\?/,"").split("&"),r={};return t.forEach((e=>{const[t,n]=e.split("="),s=/^null$|^true$|^false$|^\d+(\.\d+?)?$|^\[.*]$|^{.*}$/.test(n)?n:`"${n}"`;r[decodeURIComponent(t)]=Json.deserialize(decodeURIComponent(s));})),r}}}var worker=e=>{const t=e.toString(),r=t.indexOf("{")+1,n=t.lastIndexOf("}"),s=/(=>)/.test(t)&&!/{/gm.test(t)?`${t.replace("=>","=> {")}}`:t.substring(r,n),o=new self.Blob([s],{type:"text/javascript"});return new Worker(URL.createObjectURL(o))},connection=()=>{const e=self.indexedDB||self.mozIndexedDB||self.webkitIndexedDB||self.msIndexedDB;function t(t){if(!/^[A-z][A-z0-9]*$/.test(t))throw new Error("Invalid collection name. Must be alphanumeric and begin with an alpha character");return new Promise(((r,n)=>{try{const s=e.open(t);s.onerror=()=>{n(new Error("Error opening IndexedDB."));},s.onupgradeneeded=e=>{e.target.result.createObjectStore(t,{autoIncrement:!1});},s.onsuccess=()=>{r(s.result);};}catch(e){n(e);}}))}onmessage=function(e){const r=e.data[0],n=e.data[1],s=e.data[2];try{"read"===r&&function(e){return t(e).then((t=>new Promise(((r,n)=>{const s=t.transaction([e],"readonly").objectStore(e).get(1);s.onsuccess=e=>{t.close(),r(e.target.result);},s.onerror=()=>{t.close(),n(s.error);};}))))}(n).then((e=>postMessage([r,n,e]))).catch((e=>postMessage(["error",e.message]))),"write"===r&&function(e,r){return t(e).then((t=>new Promise(((n,s)=>{const o=t.transaction([e],"readwrite").objectStore(e).put(r,1);o.onsuccess=e=>{t.close(),n(e.target.result);},o.onerror=()=>{t.close(),s(o.error);};}))))}(n,s).then((e=>postMessage([r,n,e]))).catch((e=>postMessage(["error",e.message]))),"remove"===r&&function(e){return t(e).then((t=>new Promise(((r,n)=>{const s=t.transaction([e],"readwrite").objectStore(e).delete(1);s.onsuccess=e=>{t.close(),r(e.target.result);},s.onerror=()=>{t.close(),n(s.error);};}))))}(n).then((e=>postMessage([r,n,e]))).catch((e=>postMessage(["error",e.message]))),"drop"===r&&function(e){return t(e).then((t=>(t.onversionchange=()=>t.close(),new Promise(((t,r)=>{const n=indexedDB.deleteDatabase(e);n.onsuccess=()=>{t(!0);},n.onerror=()=>{r(n.error);},n.onblocked=()=>{r(n.error);};})))))}(n).then((e=>postMessage([r,n,e]))).catch((e=>postMessage(["error",e.message])));}catch(e){postMessage(["error",e.message]);}};};const validCollection=/^[A-z]+$/;let connectionThread;class Store{static get connected(){return t.exists(connectionThread)}static connect(){try{return Store.connected||(connectionThread=worker(connection)),Store}catch{throw new Error("Store could not connect.")}}static disconnect(){try{if(Store.connected)return connectionThread.terminate(),connectionThread=null,Store}catch{throw new Error("Store could not be disconnected.")}}static async read(e){return new Promise(((r,n)=>{if(validCollection.test(e))if(t.exists(connectionThread)){const t=s=>{const[o,i,a]=s.data;"error"===o&&i===e&&(n(new Error(a)),connectionThread.removeEventListener("message",t)),"read"===o&&i===e&&(r(a),connectionThread.removeEventListener("message",t));};connectionThread.addEventListener("message",t),connectionThread.postMessage(["read",e]);}else n(new Error("Cannot read disconnected Store."));else n(new Error("Invalid collection name must contain only alpha characters."));}))}static async write(e,r){return new Promise(((n,s)=>{if(validCollection.test(e))if(t.exists(connectionThread)){const t=r=>{const[o,i,a]=r.data;"error"===o&&i===e&&(s(new Error(a)),connectionThread.removeEventListener("message",t)),"write"===o&&i===e&&(n(a),connectionThread.removeEventListener("message",t));};connectionThread.addEventListener("message",t),connectionThread.postMessage(["write",e,r]);}else s(Error("Cannot write disconnected Store."));else s(new Error("Invalid collection name must contain only alpha characters."));}))}static async remove(e){return new Promise(((r,n)=>{if(validCollection.test(e))if(t.exists(connectionThread)){const t=s=>{const[o,i,a]=s.data;"error"===o&&i===e&&(n(new Error(a)),connectionThread.removeEventListener("message",t)),"remove"===o&&i===e&&(r(a),connectionThread.removeEventListener("message",t));};connectionThread.addEventListener("message",t),connectionThread.postMessage(["remove",e]);}else n(Error("Cannot write disconnected Store."));else n(new Error("Invalid collection name must contain only alpha characters."));}))}static async delete(e){return new Promise(((r,n)=>{if(!t.isNullOrEmpty(e)&&validCollection.test(e))if(t.exists(connectionThread)){const t=s=>{const[o,i,a]=s.data;"error"===o&&i===e&&(n(new Error(a)),connectionThread.removeEventListener("message",t)),"drop"===o&&i===e&&(r(a),connectionThread.removeEventListener("message",t));};connectionThread.addEventListener("message",t),connectionThread.postMessage(["drop",e]);}else n(Error("Cannot drop disconnected Store."));else n(new Error("Invalid collection name must contain only alpha characters."));}))}static async save(){try{return await navigator.storage.persist()}catch(e){return !1}}static async estimate(){try{const e=navigator.storage||navigator.webkitPersistentStorage,{quota:t=NaN,usage:r=NaN}=await e.estimate()||{};return {quota:t,usage:r,free:`${N.roundUp((t-r)/t*100,-4)}%`,used:`${N.roundUp(r/t*100,-4)}%`}}catch(e){return {}}}static async saved(){try{return await navigator.storage.persisted()}catch{return !1}}}class Dto{constructor(e={},r){if(!t.isArray(e)&&!t.isObject(e))throw new TypeError("Dto value must be Array or object literal");this._value=e,this._name=r;}get value(){return t.isArray(this._value)?[...this._value]:{...this._value}}get name(){return this._name}set name(e){this._name=e;}read(e){return t.exists(e)?!t.isArray(this._value)||t.isNumber(e)?this._value[e]:void 0:this.value}remove(e){return t.isString(e)&&t.exists(e)&&delete this._value[e],t.isFunction(e)&&this._value.splice(this._value.findIndex(e),1),this}write(e,r){return t.isNullOrEmpty(e)||(t.isArray(this._value)?(t.isUndefined(r)&&this._value.push(e),t.isNumber(e)&&(this._value[e]=r)):this._value[e]=r),this}update(e){const r=Object.assign(this.value,e);return this._value=t.isArray(this._value)?Object.values(r):r,this}clear(){return this._value=t.isArray(this._value)?[]:{},this}async save(){return Store.connect(),await Store.write(this.name,this.encode(!0,!0)),await Store.save()}async saveAs(e){return this.name=e,Store.connect(),await Store.delete(this.name),this.save()}async delete(){return Store.connect(),await Store.delete(this.name),this}encode(e=!1,t=!1){const r=Json.serialize(this._value);return encodeBase64(t?encodeURIComponent(r):r,e)}static decode(e,t){const r=decodeBase64(e),n=decodeURIComponent(r);return new Dto(Json.deserialize(n),t)}toFormData(){const{value:e}=this,t=new window.FormData;return Object.keys(e).forEach((r=>t.append(r,e[r]))),t}toJson(){return Json.serialize(this._value)}toQueryString(){return QueryString.serialize(this._value)}static parseFormData(e){const t={};for(const[r,n]of e.entries())t[r]=n;return new Dto(t)}static parseJson(e){return new Dto(Json.deserialize(e))}static parseJwt(e){try{const[,t]=e.split(".");return new Dto(JSON.parse(window.atob(t)))}catch(t){throw new SyntaxError(`Cannot parseJwt: ${e}`)}}static parseQueryString(e){return new Dto(QueryString.deserialize(e))}static async load(e){return Store.connect(),Store.read(e).then((t=>{try{return Dto.decode(t,e)}catch{return}})).catch((()=>{}))}}class Event{static mute(e){return !!t.exists(e)&&(t.isFunction(e.preventDefault)&&e.preventDefault(),t.isFunction(e.stopPropagation)&&e.stopPropagation(),t.isFunction(e.stopImmediatePropagation)&&e.stopImmediatePropagation(),t.exists(e.cancelBubble)&&(e.cancelBubble=!0),!1)}}const readFieldNames=e=>{const t=e.getAttribute("id"),r=[...e.querySelectorAll("[name]")].map((e=>e.name)),n=t?[...document.querySelectorAll(`[form="${t}"]`)].map((e=>e.name)):[];return [...r,...n]},readData=e=>new window.FormData(e),read=e=>{const r={};try{readData(e).forEach(((e,n)=>{const s=r[n];t.isArray(s)?r[n].push(e):t.exists(s)?r[n]=[r[n],e]:r[n]=e;}));}catch(t){[...e.elements].forEach((e=>{const{name:t,type:n,value:s,files:o}=e;if("file"===n)r[t]=o[0];else if("checkbox"===n||"radio"===n)e.checked&&(r[t]=s);else if(e.multiple){const n=[];e.querySelectorAll("option").forEach((e=>e.selected&&n.push(e.value))),r[t]=n.length<2?n[0]:n;}else r[t]=s;}));}return r},readJson=e=>JSON.stringify(read(e)),write=(e,r)=>{[...e.elements].forEach((e=>{/^select$/i.test(e.nodeName)?t.isArray(r[e.name])?[...e.options].forEach((t=>{t.selected=r[e.name].indexOf(t.value)>=0;})):t.exists(r[e.name])&&(e.value=r[e.name]):t.exists(r[e.name])&&("checkbox"===e.type||"radio"===e.type?e.checked=r[e.name]===e.value:e.value=r[e.name]);}));};var index={readFieldNames:readFieldNames,read:read,readData:readData,readJson:readJson,write:write};class Key{constructor(e,t,r={}){this.key=e,this.msKey=t||e,this.altKey=r.altKey||!1,this.ctrlKey=r.ctrlKey||!1,this.metaKey=r.metaKey||!1,this.shiftKey=r.shiftKey||!1;}get alt(){const{key:e,msKey:t,ctrlKey:r,metaKey:n,shiftKey:s}=this;return new Key(e,t,{altKey:!0,ctrlKey:r,metaKey:n,shiftKey:s})}get ctrl(){const{key:e,msKey:t,altKey:r,metaKey:n,shiftKey:s}=this;return new Key(e,t,{altKey:r,ctrlKey:!0,metaKey:n,shiftKey:s})}get meta(){const{key:e,msKey:t,altKey:r,ctrlKey:n,shiftKey:s}=this;return new Key(e,t,{altKey:r,ctrlKey:n,metaKey:!0,shiftKey:s})}get shift(){const{key:e,msKey:t,altKey:r,ctrlKey:n,metaKey:s}=this;return new Key(e,t,{altKey:r,ctrlKey:n,metaKey:s,shiftKey:!0})}equals(e){return e instanceof Key&&this.altKey===e.altKey&&this.ctrlKey===e.ctrlKey&&this.metaKey===e.metaKey&&this.shiftKey===e.shiftKey&&(this.key===e.key||this.msKey===e.msKey)}didFire(e){const{code:t,key:r,altKey:n,ctrlKey:s,metaKey:o,shiftKey:i}=e,a="Dead"===r?t:r;return e&&("ANY"===this.key||this.equals(new Key(a,a,{altKey:n,ctrlKey:s,metaKey:o,shiftKey:i})))}static get press(){return "keypress"}static get down(){return "keydown"}static get up(){return "keyup"}static get any(){return new Key("ANY")}static get esc(){return new Key("Escape","Esc")}static get enter(){return new Key("Enter")}static get space(){return new Key(" ","Spacebar")}static get tab(){return new Key("Tab")}static get left(){return new Key("ArrowLeft","Left")}static get right(){return new Key("ArrowRight","Right")}}class Keyboard{static on(e,t,r,n){const s=e=>t.didFire(e)?r(e,t):null;return window.addEventListener(e,s,n),{unsubscribe:()=>{window.removeEventListener(e,s);}}}static onKeyPress(e,t,r){return Keyboard.on(Key.press,e,t,r)}static onKeyDown(e,t,r){return Keyboard.on(Key.down,e,t,r)}static onKeyUp(e,t,r){return Keyboard.on(Key.up,e,t,r)}}class Swipe{constructor(e,t=0){this.didTouchStart=this.didTouchStart.bind(this),this.didTouchEnd=this.didTouchEnd.bind(this),this.didTouchMove=this.didTouchMove.bind(this),e.addEventListener("touchstart",this.didTouchStart,{capture:!1,passive:!0}),e.addEventListener("touchend",this.didTouchEnd,{capture:!1,passive:!0}),e.addEventListener("touchmove",this.didTouchMove,{capture:!1,passive:!0}),this.element=e,this.tolerance=t,this.didSwipeLeft=()=>{},this.didSwipeRight=()=>{},this.didMove=()=>{};}onLeft(e){return this.didSwipeLeft=e,this}onRight(e){return this.didSwipeRight=e,this}onMove(e){return this.didMove=e,this}destroy(){const{element:e}=this;return e.removeEventListener("touchstart",this.didTouchStart,!1),e.removeEventListener("touchend",this.didTouchEnd,!1),e.removeEventListener("touchmove",this.didTouchMove,!1),this}didTouchStart({touches:[e]}){this.touchStartPoint=new O(e.pageX,e.pageY);}didTouchEnd(e){const[t]=e.changedTouches,{touchStartPoint:r}=this,n=new O(t.pageX,t.pageY);n.isLeftOf(r)&&Math.abs(n.distanceFrom(r).x)>this.tolerance&&this.didSwipeLeft(e),n.isRightOf(r)&&Math.abs(n.distanceFrom(r).x)>this.tolerance&&this.didSwipeRight(e);}didTouchMove(e){const[t]=e.touches,{touchStartPoint:r}=this,n=new O(t.pageX,t.pageY);this.didMove({distance:n.distanceFrom(r),up:n.isAbove(r),down:n.isBelow(r),left:n.isLeftOf(r),right:n.isRightOf(r)});}}
|
2
|
+
|
3
|
+
export { Document as D, Event as E, Key as K, Swipe as S, Device as a, index as i };
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register([],(function(){"use strict";return{execute:function(){}}}));
|
@@ -0,0 +1,89 @@
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-7fe386de.js';
|
2
|
+
import { t } from './index-3e1e5aa3.js';
|
3
|
+
|
4
|
+
const ku4CarouselControlsCss = ":host{position:relative;display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;width:20px;height:20px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}input[type=radio]:checked:after{content:\"\";position:absolute;top:2px;left:2px;width:14px;height:14px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;background-color:#333}";
|
5
|
+
|
6
|
+
const Ku4CarouselControls = class {
|
7
|
+
constructor(hostRef) {
|
8
|
+
registerInstance(this, hostRef);
|
9
|
+
this.carousel = document.getElementById(this.for);
|
10
|
+
this.handleSlide = this.handleSlide.bind(this);
|
11
|
+
this.handleChange = this.handleChange.bind(this);
|
12
|
+
}
|
13
|
+
get slides() {
|
14
|
+
return [].slice.call(this.carousel.children);
|
15
|
+
}
|
16
|
+
get controls() {
|
17
|
+
return [].slice.call(this.host.children);
|
18
|
+
}
|
19
|
+
handleSlide(e) {
|
20
|
+
this.controls.forEach((control) => {
|
21
|
+
control.removeAttribute('current');
|
22
|
+
control.checked = false;
|
23
|
+
});
|
24
|
+
try {
|
25
|
+
const current = this.controls[e.detail - 1];
|
26
|
+
current.setAttribute('current', e.detail);
|
27
|
+
current.checked = true;
|
28
|
+
}
|
29
|
+
catch (e) {
|
30
|
+
/* Fail silently */
|
31
|
+
}
|
32
|
+
}
|
33
|
+
async handleChange(e) {
|
34
|
+
const { carousel, slides, controls } = this;
|
35
|
+
const slideValue = e.target.getAttribute('slide');
|
36
|
+
const n = isNaN(slideValue)
|
37
|
+
? slides.findIndex(slide => slide.getAttribute('name') === slideValue) + 1
|
38
|
+
: parseInt(slideValue);
|
39
|
+
const slide = isNaN(n) ? controls.indexOf(e.target) + 1 : n;
|
40
|
+
await carousel.slideTo(slide);
|
41
|
+
try {
|
42
|
+
e.target.setAttribute('current', slide);
|
43
|
+
}
|
44
|
+
catch (e) {
|
45
|
+
/* Fail silently */
|
46
|
+
}
|
47
|
+
}
|
48
|
+
componentWillLoad() {
|
49
|
+
const { carousel, controls } = this;
|
50
|
+
try {
|
51
|
+
carousel.addEventListener('slide', this.handleSlide, { passive: true });
|
52
|
+
controls.forEach((control, i) => {
|
53
|
+
if (i === 0) {
|
54
|
+
control.setAttribute('current', i + 1);
|
55
|
+
}
|
56
|
+
if (control.nodeName === 'INPUT') {
|
57
|
+
control.addEventListener('change', this.handleChange);
|
58
|
+
}
|
59
|
+
else {
|
60
|
+
control.addEventListener('keyup', this.handleChange);
|
61
|
+
control.addEventListener('mouseup', this.handleChange, { passive: true });
|
62
|
+
control.addEventListener('touchstart', this.handleChange, { passive: true });
|
63
|
+
}
|
64
|
+
});
|
65
|
+
}
|
66
|
+
catch (e) {
|
67
|
+
if (!t.exists(carousel)) {
|
68
|
+
throw new ReferenceError('ku4-carousel-controls must connect to a ku4-carousel.');
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
disconnectedCallback() {
|
73
|
+
const { carousel, controls } = this;
|
74
|
+
carousel.removeEventListener('slide', this.handleSlide);
|
75
|
+
controls.forEach((control) => {
|
76
|
+
control.removeEventListener('change', this.handleChange);
|
77
|
+
control.removeEventListener('keyup', this.handleChange);
|
78
|
+
control.removeEventListener('mouseup', this.handleChange);
|
79
|
+
control.removeEventListener('touchstart', this.handleChange);
|
80
|
+
});
|
81
|
+
}
|
82
|
+
render() {
|
83
|
+
return h("slot", null);
|
84
|
+
}
|
85
|
+
get host() { return getElement(this); }
|
86
|
+
};
|
87
|
+
Ku4CarouselControls.style = ku4CarouselControlsCss;
|
88
|
+
|
89
|
+
export { Ku4CarouselControls as ku4_carousel_controls };
|
@@ -0,0 +1 @@
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):i(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return c([e,t])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(s){a=[6,s];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./index-5029fd1f.system.js","./index-380cbe3a.system.js"],(function(e){"use strict";var t,n,r,i;return{setters:[function(e){t=e.r;n=e.h;r=e.g},function(e){i=e.t}],execute:function(){var o=':host{position:relative;display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;width:20px;height:20px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}input[type=radio]:checked:after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;background-color:#333}';var a=e("ku4_carousel_controls",function(){function e(e){t(this,e);this.carousel=document.getElementById(this.for);this.handleSlide=this.handleSlide.bind(this);this.handleChange=this.handleChange.bind(this)}Object.defineProperty(e.prototype,"slides",{get:function(){return[].slice.call(this.carousel.children)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"controls",{get:function(){return[].slice.call(this.host.children)},enumerable:false,configurable:true});e.prototype.handleSlide=function(e){this.controls.forEach((function(e){e.removeAttribute("current");e.checked=false}));try{var t=this.controls[e.detail-1];t.setAttribute("current",e.detail);t.checked=true}catch(e){}};e.prototype.handleChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,i,o,a,s;return __generator(this,(function(c){switch(c.label){case 0:t=this,n=t.carousel,r=t.slides,i=t.controls;o=e.target.getAttribute("slide");a=isNaN(o)?r.findIndex((function(e){return e.getAttribute("name")===o}))+1:parseInt(o);s=isNaN(a)?i.indexOf(e.target)+1:a;return[4,n.slideTo(s)];case 1:c.sent();try{e.target.setAttribute("current",s)}catch(e){}return[2]}}))}))};e.prototype.componentWillLoad=function(){var e=this;var t=this,n=t.carousel,r=t.controls;try{n.addEventListener("slide",this.handleSlide,{passive:true});r.forEach((function(t,n){if(n===0){t.setAttribute("current",n+1)}if(t.nodeName==="INPUT"){t.addEventListener("change",e.handleChange)}else{t.addEventListener("keyup",e.handleChange);t.addEventListener("mouseup",e.handleChange,{passive:true});t.addEventListener("touchstart",e.handleChange,{passive:true})}}))}catch(o){if(!i.exists(n)){throw new ReferenceError("ku4-carousel-controls must connect to a ku4-carousel.")}}};e.prototype.disconnectedCallback=function(){var e=this;var t=this,n=t.carousel,r=t.controls;n.removeEventListener("slide",this.handleSlide);r.forEach((function(t){t.removeEventListener("change",e.handleChange);t.removeEventListener("keyup",e.handleChange);t.removeEventListener("mouseup",e.handleChange);t.removeEventListener("touchstart",e.handleChange)}))};e.prototype.render=function(){return n("slot",null)};Object.defineProperty(e.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());a.style=o}}}));
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { r as registerInstance, h, f as Host } from './index-7fe386de.js';
|
2
|
+
|
3
|
+
const ku4CarouselSlideCss = ":host{overflow-x:hidden}";
|
4
|
+
|
5
|
+
const Ku4CarouselSlide = class {
|
6
|
+
constructor(hostRef) {
|
7
|
+
registerInstance(this, hostRef);
|
8
|
+
this.classList = '';
|
9
|
+
}
|
10
|
+
/**
|
11
|
+
* Move this slide in to view.
|
12
|
+
* @param {string} direction - Direction to move.
|
13
|
+
*/
|
14
|
+
async slideIn(direction) {
|
15
|
+
this.active = true;
|
16
|
+
this.classList = `active ${direction}`;
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* Move this slide out of view.
|
20
|
+
* @param {string} direction - Direction to move.
|
21
|
+
*/
|
22
|
+
async slideOut(direction) {
|
23
|
+
this.active = false;
|
24
|
+
this.classList = `inactive ${direction}`;
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* Set this slide to active.
|
28
|
+
*/
|
29
|
+
async activate() {
|
30
|
+
this.active = true;
|
31
|
+
this.classList = 'active';
|
32
|
+
}
|
33
|
+
/**
|
34
|
+
* Set this slide to inactive.
|
35
|
+
*/
|
36
|
+
async deactivate() {
|
37
|
+
this.active = false;
|
38
|
+
this.classList = '';
|
39
|
+
}
|
40
|
+
render() {
|
41
|
+
const { active, classList } = this;
|
42
|
+
return (h(Host, { class: `${classList}`, "aria-hidden": active ? 'false' : 'true', "aria-roledescription": "slide" }, h("slot", null)));
|
43
|
+
}
|
44
|
+
};
|
45
|
+
Ku4CarouselSlide.style = ku4CarouselSlideCss;
|
46
|
+
|
47
|
+
export { Ku4CarouselSlide as ku4_carousel_slide };
|
@@ -0,0 +1 @@
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function a(t){try{u(r.next(t))}catch(e){o(e)}}function s(t){try{u(r["throw"](t))}catch(e){o(e)}}function u(t){t.done?n(t.value):i(t.value).then(a,s)}u((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return u([t,e])}}function u(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(s){a=[6,s];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./index-5029fd1f.system.js"],(function(t){"use strict";var e,n,r;return{setters:[function(t){e=t.r;n=t.h;r=t.f}],execute:function(){var i=":host{overflow-x:hidden}";var o=t("ku4_carousel_slide",function(){function t(t){e(this,t);this.classList=""}t.prototype.slideIn=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.active=true;this.classList="active ".concat(t);return[2]}))}))};t.prototype.slideOut=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.active=false;this.classList="inactive ".concat(t);return[2]}))}))};t.prototype.activate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.active=true;this.classList="active";return[2]}))}))};t.prototype.deactivate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.active=false;this.classList="";return[2]}))}))};t.prototype.render=function(){var t=this,e=t.active,i=t.classList;return n(r,{class:"".concat(i),"aria-hidden":e?"false":"true","aria-roledescription":"slide"},n("slot",null))};return t}());o.style=i}}}));
|
@@ -0,0 +1,175 @@
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-7fe386de.js';
|
2
|
+
import { L, Y, c } from './index-3e1e5aa3.js';
|
3
|
+
import { S as Swipe } from './index-7ff6e718.js';
|
4
|
+
|
5
|
+
const ku4CarouselCss = "@-webkit-keyframes ku4-carousel-enter-left{0%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@keyframes ku4-carousel-enter-left{0%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@-webkit-keyframes ku4-carousel-enter-right{0%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@keyframes ku4-carousel-enter-right{0%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@-webkit-keyframes ku4-carousel-exit-left{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}}@keyframes ku4-carousel-exit-left{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}}@-webkit-keyframes ku4-carousel-exit-right{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}}@keyframes ku4-carousel-exit-right{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}}:host{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;overflow:hidden;background-color:var(--ku4-carousel-background-color, #fff)}.slide-container{position:relative;width:100%;height:100%;overflow:hidden}.controls .next,.controls .prev{position:absolute;display:var(--ku4-carousel-controls-display, block);top:var(--ku4-carousel-controls-top, 0);border:var(--ku4-carousel-controls-border, none);background-color:var(--ku4-carousel-controls-background-color, #fff);font-family:var(--ku4-carousel-controls-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-controls-font-weight, 400);font-size:var(--ku4-carousel-controls-font-size, 8px);line-height:var(--ku4-carousel-controls-line-height, 12px);opacity:var(--ku4-carousel-controls-opacity, 0.2);z-index:var(--ku4-carousel-controls-z-index, 2)}.controls .next:focus,.controls .prev:focus{background-color:var(--ku4-carousel-controls-focus-background-color, transparent);outline:var(--ku4-carousel-controls-focus-outline, none);opacity:var(--ku4-carousel-controls-focus-opacity, 0.2)}.controls .next:hover,.controls .prev:hover{background-color:var(--ku4-carousel-controls-hover-background-color, transparent);opacity:var(--ku4-carousel-controls-hover-opacity, 1)}.controls .next{right:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-next-background-image);background-repeat:var(--ku4-carousel-controls-next-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-background-size, 100% 100%)}.controls .next:focus{background-image:var(--ku4-carousel-controls-next-focus-background-image);background-repeat:var(--ku4-carousel-controls-next-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-focus-background-size, 100% 100%)}.controls .next:hover{background-image:var(--ku4-carousel-controls-next-hover-background-image);background-repeat:var(--ku4-carousel-controls-next-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-hover-background-size, 100% 100%)}.controls .prev{left:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-previous-background-image);background-repeat:var(--ku4-carousel-controls-previous-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-background-size, 100% 100%)}.controls .prev:focus{background-image:var(--ku4-carousel-controls-previous-focus-background-image);background-repeat:var(--ku4-carousel-controls-previous-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-focus-background-size, 100% 100%)}.controls .prev:hover{background-image:var(--ku4-carousel-controls-previous-hover-background-image);background-repeat:var(--ku4-carousel-controls-previous-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-hover-background-size, 100% 100%)}.pages{position:absolute;display:var(--ku4-carousel-pages-display, block);top:var(--ku4-carousel-pages-top, auto);bottom:var(--ku4-carousel-pages-bottom, 4px);width:var(--ku4-carousel-pages-width, auto);height:var(--ku4-carousel-pages-height, 20px);background-color:var(--ku4-carousel-pages-background-color, transparent);opacity:var(--ku4-carousel-pages-opacity, 0.5);text-align:center;z-index:3}.pages-text{display:inline-block;padding:var(--ku4-carousel-pages-text-padding, 4px);font-family:var(--ku4-carousel-pages-text-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-pages-text-font-weight, 600);font-size:var(--ku4-carousel-pages-text-font-size, 14px);line-height:var(--ku4-carousel-pages-text-line-height, 16px);color:var(--ku4-carousel-pages-text-color, #aaa)}::slotted(*){position:absolute;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:-100%;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(.inactive){position:absolute;height:100%;left:0}::slotted(.inactive.prev){-webkit-animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}::slotted(.inactive.next){-webkit-animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}::slotted(.active){position:relative;top:0;left:0;width:auto;height:100%;z-index:1}::slotted(.active.prev){-webkit-animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}::slotted(.active.next){-webkit-animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (hover: hover){.controls:hover{background-color:var(--ku4-carousel-controls-focus-background-color, #fff)}}";
|
6
|
+
|
7
|
+
const Ku4Carousel = class {
|
8
|
+
constructor(hostRef) {
|
9
|
+
registerInstance(this, hostRef);
|
10
|
+
this.didSlide = createEvent(this, "slide", 7);
|
11
|
+
/**
|
12
|
+
* Sets the distance, in pixels, a touch must travel
|
13
|
+
* before activating a swipe.
|
14
|
+
*/
|
15
|
+
this.swipeTolerance = 44;
|
16
|
+
/**
|
17
|
+
* Will start this carousel in auto scroll mode
|
18
|
+
*/
|
19
|
+
this.auto = false;
|
20
|
+
/**
|
21
|
+
* Prevents touch swiping
|
22
|
+
*/
|
23
|
+
this.noSwipe = false;
|
24
|
+
/**
|
25
|
+
* Delay in millisecond between slide changes
|
26
|
+
* when running in auto
|
27
|
+
*/
|
28
|
+
this.delay = 8000;
|
29
|
+
this.interval = new L(this.delay).onInterval(() => {
|
30
|
+
if (this.host.isConnected) {
|
31
|
+
this.display('next');
|
32
|
+
}
|
33
|
+
else {
|
34
|
+
this.disconnectedCallback();
|
35
|
+
}
|
36
|
+
});
|
37
|
+
this.handleMouse = this.handleMouse.bind(this);
|
38
|
+
}
|
39
|
+
/**
|
40
|
+
* Display the next ku4-carousel-slide
|
41
|
+
*/
|
42
|
+
async next() {
|
43
|
+
if (!this.hasSlides) {
|
44
|
+
return this;
|
45
|
+
}
|
46
|
+
await this.pause();
|
47
|
+
return this.display('next');
|
48
|
+
}
|
49
|
+
/**
|
50
|
+
* Display the previous ku4-carousel-slide
|
51
|
+
*/
|
52
|
+
async previous() {
|
53
|
+
if (!this.hasSlides) {
|
54
|
+
return this;
|
55
|
+
}
|
56
|
+
await this.pause();
|
57
|
+
return this.display('prev');
|
58
|
+
}
|
59
|
+
/**
|
60
|
+
* Slide to the slide number specified.
|
61
|
+
* @param {number|string} slide - Slide number or slide name to slide to.
|
62
|
+
*/
|
63
|
+
async slideTo(slide) {
|
64
|
+
await this.pause();
|
65
|
+
const { slides } = this;
|
66
|
+
const value = isNaN(slide)
|
67
|
+
? slides.findIndex(s => s.getAttribute('name') === slide) + 1
|
68
|
+
: parseInt(slide);
|
69
|
+
if (!(value === this.currentSlideNumber || value < 1 || this.rolodex.length < value)) {
|
70
|
+
const move = value - this.currentSlideNumber;
|
71
|
+
const slide = move < 0 ? 'prev' : 'next';
|
72
|
+
let count = Math.abs(move);
|
73
|
+
while (0 < --count) {
|
74
|
+
await Y(10).then(() => this.rolodex[slide]);
|
75
|
+
}
|
76
|
+
this.display(slide);
|
77
|
+
}
|
78
|
+
}
|
79
|
+
/**
|
80
|
+
* Pause auto slide change
|
81
|
+
*/
|
82
|
+
async pause() {
|
83
|
+
this.interval.clear();
|
84
|
+
}
|
85
|
+
/**
|
86
|
+
* Start auto slide change
|
87
|
+
*/
|
88
|
+
async play() {
|
89
|
+
const { auto, interval } = this;
|
90
|
+
auto && interval.start();
|
91
|
+
}
|
92
|
+
get slides() {
|
93
|
+
return [].slice.call(this.host.children);
|
94
|
+
}
|
95
|
+
get hasSlides() {
|
96
|
+
return this.rolodex && (this.rolodex.length > 1);
|
97
|
+
}
|
98
|
+
get currentSlideNumber() {
|
99
|
+
const { rolodex } = this;
|
100
|
+
return rolodex && (rolodex.isEmpty ? 0 : rolodex.index + 1);
|
101
|
+
}
|
102
|
+
display(slide) {
|
103
|
+
window.requestAnimationFrame(() => {
|
104
|
+
const { previous, current } = this.slideState;
|
105
|
+
const next = this.rolodex[slide];
|
106
|
+
if (previous) {
|
107
|
+
previous.deactivate();
|
108
|
+
}
|
109
|
+
current.slideOut(slide);
|
110
|
+
next.slideIn(slide);
|
111
|
+
this.slideState = {
|
112
|
+
previous: current,
|
113
|
+
current: next,
|
114
|
+
};
|
115
|
+
this.didSlide.emit(this.currentSlideNumber);
|
116
|
+
});
|
117
|
+
return this;
|
118
|
+
}
|
119
|
+
handleMouse(e) {
|
120
|
+
if (!this.host.contains(e.relatedTarget)) {
|
121
|
+
this.play();
|
122
|
+
}
|
123
|
+
}
|
124
|
+
componentWillLoad() {
|
125
|
+
if (!this.noSwipe) {
|
126
|
+
this.swipe = new Swipe(this.host, this.swipeTolerance)
|
127
|
+
.onLeft(() => this.next())
|
128
|
+
.onRight(() => this.previous());
|
129
|
+
}
|
130
|
+
let slides;
|
131
|
+
try {
|
132
|
+
slides = this.host.querySelectorAll(':scope > ku4-carousel-slide');
|
133
|
+
}
|
134
|
+
catch (e) {
|
135
|
+
slides = [].slice.call(this.host.querySelectorAll('ku4-carousel-slide'))
|
136
|
+
.reduce((acc, item) => {
|
137
|
+
if (item.parentNode === this.host) {
|
138
|
+
acc.push(item);
|
139
|
+
}
|
140
|
+
return acc;
|
141
|
+
}, []);
|
142
|
+
}
|
143
|
+
this.rolodex = new c(slides);
|
144
|
+
(this.rolodex.current &&
|
145
|
+
this.rolodex.current.activate) &&
|
146
|
+
this.rolodex.current.activate();
|
147
|
+
this.slideState = { current: this.rolodex.current };
|
148
|
+
if (this.auto) {
|
149
|
+
this.host.addEventListener('mouseout', this.handleMouse);
|
150
|
+
this.play();
|
151
|
+
}
|
152
|
+
}
|
153
|
+
connectedCallback() {
|
154
|
+
if (this.swipe) {
|
155
|
+
this.swipe.destroy();
|
156
|
+
}
|
157
|
+
this.host.removeEventListener('mouseout', this.handleMouse);
|
158
|
+
this.interval.clear();
|
159
|
+
}
|
160
|
+
disconnectedCallback() {
|
161
|
+
if (this.swipe) {
|
162
|
+
this.swipe.destroy();
|
163
|
+
}
|
164
|
+
this.host.removeEventListener('mouseout', this.handleMouse);
|
165
|
+
this.interval.clear();
|
166
|
+
}
|
167
|
+
render() {
|
168
|
+
const { hasSlides, currentSlideNumber = 1 } = this;
|
169
|
+
return (h(Host, { "aria-roledescription": "carousel", current: currentSlideNumber }, hasSlides && (h("section", { class: "controls" }, h("button", { type: "button", class: "prev", onClick: () => this.previous(), "aria-label": "previous slide" }), h("button", { type: "button", class: "next", onClick: () => this.next(), "aria-label": "next slide" }))), h("section", { class: "slide-container", "aria-live": "polite" }, h("slot", null)), hasSlides && (h("section", { class: "pages" }, h("span", { class: "pages-text" }, `${currentSlideNumber} of ${this.rolodex.length}`)))));
|
170
|
+
}
|
171
|
+
get host() { return getElement(this); }
|
172
|
+
};
|
173
|
+
Ku4Carousel.style = ku4CarouselCss;
|
174
|
+
|
175
|
+
export { Ku4Carousel as ku4_carousel };
|
@@ -0,0 +1 @@
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,o,r){function a(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,n){function i(t){try{u(r.next(t))}catch(e){n(e)}}function s(t){try{u(r["throw"](t))}catch(e){n(e)}}function u(t){t.done?o(t.value):a(t.value).then(i,s)}u((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,a,n,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return u([t,e])}}function u(i){if(r)throw new TypeError("Generator is already executing.");while(o)try{if(r=1,a&&(n=i[0]&2?a["return"]:i[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,i[1])).done)return n;if(a=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:o.label++;return{value:i[1],done:false};case 5:o.label++;a=i[1];i=[0];continue;case 7:i=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){o=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){o.label=i[1];break}if(i[0]===6&&o.label<n[1]){o.label=n[1];n=i;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(i);break}if(n[2])o.ops.pop();o.trys.pop();continue}i=e.call(t,o)}catch(s){i=[6,s];a=0}finally{r=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./index-5029fd1f.system.js","./index-380cbe3a.system.js","./index-7d482e8a.system.js"],(function(t){"use strict";var e,o,r,a,n,i,s,u,c;return{setters:[function(t){e=t.r;o=t.e;r=t.h;a=t.f;n=t.g},function(t){i=t.L;s=t.Y;u=t.c},function(t){c=t.S}],execute:function(){var l="@-webkit-keyframes ku4-carousel-enter-left{0%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@keyframes ku4-carousel-enter-left{0%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@-webkit-keyframes ku4-carousel-enter-right{0%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@keyframes ku4-carousel-enter-right{0%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@-webkit-keyframes ku4-carousel-exit-left{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}}@keyframes ku4-carousel-exit-left{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}}@-webkit-keyframes ku4-carousel-exit-right{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}}@keyframes ku4-carousel-exit-right{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}}:host{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;overflow:hidden;background-color:var(--ku4-carousel-background-color, #fff)}.slide-container{position:relative;width:100%;height:100%;overflow:hidden}.controls .next,.controls .prev{position:absolute;display:var(--ku4-carousel-controls-display, block);top:var(--ku4-carousel-controls-top, 0);border:var(--ku4-carousel-controls-border, none);background-color:var(--ku4-carousel-controls-background-color, #fff);font-family:var(--ku4-carousel-controls-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-controls-font-weight, 400);font-size:var(--ku4-carousel-controls-font-size, 8px);line-height:var(--ku4-carousel-controls-line-height, 12px);opacity:var(--ku4-carousel-controls-opacity, 0.2);z-index:var(--ku4-carousel-controls-z-index, 2)}.controls .next:focus,.controls .prev:focus{background-color:var(--ku4-carousel-controls-focus-background-color, transparent);outline:var(--ku4-carousel-controls-focus-outline, none);opacity:var(--ku4-carousel-controls-focus-opacity, 0.2)}.controls .next:hover,.controls .prev:hover{background-color:var(--ku4-carousel-controls-hover-background-color, transparent);opacity:var(--ku4-carousel-controls-hover-opacity, 1)}.controls .next{right:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-next-background-image);background-repeat:var(--ku4-carousel-controls-next-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-background-size, 100% 100%)}.controls .next:focus{background-image:var(--ku4-carousel-controls-next-focus-background-image);background-repeat:var(--ku4-carousel-controls-next-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-focus-background-size, 100% 100%)}.controls .next:hover{background-image:var(--ku4-carousel-controls-next-hover-background-image);background-repeat:var(--ku4-carousel-controls-next-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-hover-background-size, 100% 100%)}.controls .prev{left:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-previous-background-image);background-repeat:var(--ku4-carousel-controls-previous-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-background-size, 100% 100%)}.controls .prev:focus{background-image:var(--ku4-carousel-controls-previous-focus-background-image);background-repeat:var(--ku4-carousel-controls-previous-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-focus-background-size, 100% 100%)}.controls .prev:hover{background-image:var(--ku4-carousel-controls-previous-hover-background-image);background-repeat:var(--ku4-carousel-controls-previous-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-hover-background-size, 100% 100%)}.pages{position:absolute;display:var(--ku4-carousel-pages-display, block);top:var(--ku4-carousel-pages-top, auto);bottom:var(--ku4-carousel-pages-bottom, 4px);width:var(--ku4-carousel-pages-width, auto);height:var(--ku4-carousel-pages-height, 20px);background-color:var(--ku4-carousel-pages-background-color, transparent);opacity:var(--ku4-carousel-pages-opacity, 0.5);text-align:center;z-index:3}.pages-text{display:inline-block;padding:var(--ku4-carousel-pages-text-padding, 4px);font-family:var(--ku4-carousel-pages-text-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-pages-text-font-weight, 600);font-size:var(--ku4-carousel-pages-text-font-size, 14px);line-height:var(--ku4-carousel-pages-text-line-height, 16px);color:var(--ku4-carousel-pages-text-color, #aaa)}::slotted(*){position:absolute;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:-100%;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(.inactive){position:absolute;height:100%;left:0}::slotted(.inactive.prev){-webkit-animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}::slotted(.inactive.next){-webkit-animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}::slotted(.active){position:relative;top:0;left:0;width:auto;height:100%;z-index:1}::slotted(.active.prev){-webkit-animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}::slotted(.active.next){-webkit-animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (hover: hover){.controls:hover{background-color:var(--ku4-carousel-controls-focus-background-color, #fff)}}";var d=t("ku4_carousel",function(){function t(t){var r=this;e(this,t);this.didSlide=o(this,"slide",7);this.swipeTolerance=44;this.auto=false;this.noSwipe=false;this.delay=8e3;this.interval=new i(this.delay).onInterval((function(){if(r.host.isConnected){r.display("next")}else{r.disconnectedCallback()}}));this.handleMouse=this.handleMouse.bind(this)}t.prototype.next=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.hasSlides){return[2,this]}return[4,this.pause()];case 1:t.sent();return[2,this.display("next")]}}))}))};t.prototype.previous=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.hasSlides){return[2,this]}return[4,this.pause()];case 1:t.sent();return[2,this.display("prev")]}}))}))};t.prototype.slideTo=function(t){return __awaiter(this,void 0,void 0,(function(){var e,o,r,a,n;var i=this;return __generator(this,(function(u){switch(u.label){case 0:return[4,this.pause()];case 1:u.sent();e=this.slides;o=isNaN(t)?e.findIndex((function(e){return e.getAttribute("name")===t}))+1:parseInt(t);if(!!(o===this.currentSlideNumber||o<1||this.rolodex.length<o))return[3,5];r=o-this.currentSlideNumber;a=r<0?"prev":"next";n=Math.abs(r);u.label=2;case 2:if(!(0<--n))return[3,4];return[4,s(10).then((function(){return i.rolodex[a]}))];case 3:u.sent();return[3,2];case 4:this.display(a);u.label=5;case 5:return[2]}}))}))};t.prototype.pause=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.interval.clear();return[2]}))}))};t.prototype.play=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,o;return __generator(this,(function(r){t=this,e=t.auto,o=t.interval;e&&o.start();return[2]}))}))};Object.defineProperty(t.prototype,"slides",{get:function(){return[].slice.call(this.host.children)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"hasSlides",{get:function(){return this.rolodex&&this.rolodex.length>1},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"currentSlideNumber",{get:function(){var t=this.rolodex;return t&&(t.isEmpty?0:t.index+1)},enumerable:false,configurable:true});t.prototype.display=function(t){var e=this;window.requestAnimationFrame((function(){var o=e.slideState,r=o.previous,a=o.current;var n=e.rolodex[t];if(r){r.deactivate()}a.slideOut(t);n.slideIn(t);e.slideState={previous:a,current:n};e.didSlide.emit(e.currentSlideNumber)}));return this};t.prototype.handleMouse=function(t){if(!this.host.contains(t.relatedTarget)){this.play()}};t.prototype.componentWillLoad=function(){var t=this;if(!this.noSwipe){this.swipe=new c(this.host,this.swipeTolerance).onLeft((function(){return t.next()})).onRight((function(){return t.previous()}))}var e;try{e=this.host.querySelectorAll(":scope > ku4-carousel-slide")}catch(o){e=[].slice.call(this.host.querySelectorAll("ku4-carousel-slide")).reduce((function(e,o){if(o.parentNode===t.host){e.push(o)}return e}),[])}this.rolodex=new u(e);this.rolodex.current&&this.rolodex.current.activate&&this.rolodex.current.activate();this.slideState={current:this.rolodex.current};if(this.auto){this.host.addEventListener("mouseout",this.handleMouse);this.play()}};t.prototype.connectedCallback=function(){if(this.swipe){this.swipe.destroy()}this.host.removeEventListener("mouseout",this.handleMouse);this.interval.clear()};t.prototype.disconnectedCallback=function(){if(this.swipe){this.swipe.destroy()}this.host.removeEventListener("mouseout",this.handleMouse);this.interval.clear()};t.prototype.render=function(){var t=this;var e=this,o=e.hasSlides,n=e.currentSlideNumber,i=n===void 0?1:n;return r(a,{"aria-roledescription":"carousel",current:i},o&&r("section",{class:"controls"},r("button",{type:"button",class:"prev",onClick:function(){return t.previous()},"aria-label":"previous slide"}),r("button",{type:"button",class:"next",onClick:function(){return t.next()},"aria-label":"next slide"})),r("section",{class:"slide-container","aria-live":"polite"},r("slot",null)),o&&r("section",{class:"pages"},r("span",{class:"pages-text"},"".concat(i," of ").concat(this.rolodex.length))))};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());d.style=l}}}));
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import { r as registerInstance, h, f as Host } from './index-7fe386de.js';
|
2
|
+
|
3
|
+
const ku4ColCss = ":host{position:relative;display:block}@media only screen and (min-width: 1px){:host(.start-xs-0){grid-column-start:1}:host(.start-xs-1){grid-column-start:2}:host(.start-xs-2){grid-column-start:3}:host(.start-xs-3){grid-column-start:4}:host(.start-xs-4){grid-column-start:5}:host(.start-xs-5){grid-column-start:6}:host(.start-xs-6){grid-column-start:7}:host(.start-xs-7){grid-column-start:8}:host(.start-xs-8){grid-column-start:9}:host(.start-xs-9){grid-column-start:10}:host(.start-xs-10){grid-column-start:11}:host(.start-xs-11){grid-column-start:12}:host(.start-xs-12){grid-column-start:13}:host(.span-xs-1){grid-column-end:span 1}:host(.span-xs-2){grid-column-end:span 2}:host(.span-xs-3){grid-column-end:span 3}:host(.span-xs-4){grid-column-end:span 4}:host(.span-xs-5){grid-column-end:span 5}:host(.span-xs-6){grid-column-end:span 6}:host(.span-xs-7){grid-column-end:span 7}:host(.span-xs-8){grid-column-end:span 8}:host(.span-xs-9){grid-column-end:span 9}:host(.span-xs-10){grid-column-end:span 10}:host(.span-xs-11){grid-column-end:span 11}:host(.span-xs-12){grid-column-end:span 12}:host(.order-xs-1){-ms-flex-order:1;order:1}:host(.order-xs-2){-ms-flex-order:2;order:2}:host(.order-xs-3){-ms-flex-order:3;order:3}:host(.order-xs-4){-ms-flex-order:4;order:4}:host(.order-xs-5){-ms-flex-order:5;order:5}:host(.order-xs-6){-ms-flex-order:6;order:6}:host(.order-xs-7){-ms-flex-order:7;order:7}:host(.order-xs-8){-ms-flex-order:8;order:8}:host(.order-xs-9){-ms-flex-order:9;order:9}:host(.order-xs-10){-ms-flex-order:10;order:10}:host(.order-xs-11){-ms-flex-order:11;order:11}:host(.order-xs-12){-ms-flex-order:12;order:12}}@media only screen and (min-width: 768px){:host(.start-sm-0){grid-column-start:1}:host(.start-sm-1){grid-column-start:2}:host(.start-sm-2){grid-column-start:3}:host(.start-sm-3){grid-column-start:4}:host(.start-sm-4){grid-column-start:5}:host(.start-sm-5){grid-column-start:6}:host(.start-sm-6){grid-column-start:7}:host(.start-sm-7){grid-column-start:8}:host(.start-sm-8){grid-column-start:9}:host(.start-sm-9){grid-column-start:10}:host(.start-sm-10){grid-column-start:11}:host(.start-sm-11){grid-column-start:12}:host(.start-sm-12){grid-column-start:13}:host(.span-sm-1){grid-column-end:span 1}:host(.span-sm-2){grid-column-end:span 2}:host(.span-sm-3){grid-column-end:span 3}:host(.span-sm-4){grid-column-end:span 4}:host(.span-sm-5){grid-column-end:span 5}:host(.span-sm-6){grid-column-end:span 6}:host(.span-sm-7){grid-column-end:span 7}:host(.span-sm-8){grid-column-end:span 8}:host(.span-sm-9){grid-column-end:span 9}:host(.span-sm-10){grid-column-end:span 10}:host(.span-sm-11){grid-column-end:span 11}:host(.span-sm-12){grid-column-end:span 12}:host(.order-sm-1){-ms-flex-order:1;order:1}:host(.order-sm-2){-ms-flex-order:2;order:2}:host(.order-sm-3){-ms-flex-order:3;order:3}:host(.order-sm-4){-ms-flex-order:4;order:4}:host(.order-sm-5){-ms-flex-order:5;order:5}:host(.order-sm-6){-ms-flex-order:6;order:6}:host(.order-sm-7){-ms-flex-order:7;order:7}:host(.order-sm-8){-ms-flex-order:8;order:8}:host(.order-sm-9){-ms-flex-order:9;order:9}:host(.order-sm-10){-ms-flex-order:10;order:10}:host(.order-sm-11){-ms-flex-order:11;order:11}:host(.order-sm-12){-ms-flex-order:12;order:12}}@media only screen and (min-width: 992px){:host(.start-md-0){grid-column-start:1}:host(.start-md-1){grid-column-start:2}:host(.start-md-2){grid-column-start:3}:host(.start-md-3){grid-column-start:4}:host(.start-md-4){grid-column-start:5}:host(.start-md-5){grid-column-start:6}:host(.start-md-6){grid-column-start:7}:host(.start-md-7){grid-column-start:8}:host(.start-md-8){grid-column-start:9}:host(.start-md-9){grid-column-start:10}:host(.start-md-10){grid-column-start:11}:host(.start-md-11){grid-column-start:12}:host(.start-md-12){grid-column-start:13}:host(.span-md-1){grid-column-end:span 1}:host(.span-md-2){grid-column-end:span 2}:host(.span-md-3){grid-column-end:span 3}:host(.span-md-4){grid-column-end:span 4}:host(.span-md-5){grid-column-end:span 5}:host(.span-md-6){grid-column-end:span 6}:host(.span-md-7){grid-column-end:span 7}:host(.span-md-8){grid-column-end:span 8}:host(.span-md-9){grid-column-end:span 9}:host(.span-md-10){grid-column-end:span 10}:host(.span-md-11){grid-column-end:span 11}:host(.span-md-12){grid-column-end:span 12}:host(.order-md-1){-ms-flex-order:1;order:1}:host(.order-md-2){-ms-flex-order:2;order:2}:host(.order-md-3){-ms-flex-order:3;order:3}:host(.order-md-4){-ms-flex-order:4;order:4}:host(.order-md-5){-ms-flex-order:5;order:5}:host(.order-md-6){-ms-flex-order:6;order:6}:host(.order-md-7){-ms-flex-order:7;order:7}:host(.order-md-8){-ms-flex-order:8;order:8}:host(.order-md-9){-ms-flex-order:9;order:9}:host(.order-md-10){-ms-flex-order:10;order:10}:host(.order-md-11){-ms-flex-order:11;order:11}:host(.order-md-12){-ms-flex-order:12;order:12}}@media only screen and (min-width: 1200px){:host(.start-lg-0){grid-column-start:1}:host(.start-lg-1){grid-column-start:2}:host(.start-lg-2){grid-column-start:3}:host(.start-lg-3){grid-column-start:4}:host(.start-lg-4){grid-column-start:5}:host(.start-lg-5){grid-column-start:6}:host(.start-lg-6){grid-column-start:7}:host(.start-lg-7){grid-column-start:8}:host(.start-lg-8){grid-column-start:9}:host(.start-lg-9){grid-column-start:10}:host(.start-lg-10){grid-column-start:11}:host(.start-lg-11){grid-column-start:12}:host(.start-lg-12){grid-column-start:13}:host(.span-lg-1){grid-column-end:span 1}:host(.span-lg-2){grid-column-end:span 2}:host(.span-lg-3){grid-column-end:span 3}:host(.span-lg-4){grid-column-end:span 4}:host(.span-lg-5){grid-column-end:span 5}:host(.span-lg-6){grid-column-end:span 6}:host(.span-lg-7){grid-column-end:span 7}:host(.span-lg-8){grid-column-end:span 8}:host(.span-lg-9){grid-column-end:span 9}:host(.span-lg-10){grid-column-end:span 10}:host(.span-lg-11){grid-column-end:span 11}:host(.span-lg-12){grid-column-end:span 12}:host(.order-lg-1){-ms-flex-order:1;order:1}:host(.order-lg-2){-ms-flex-order:2;order:2}:host(.order-lg-3){-ms-flex-order:3;order:3}:host(.order-lg-4){-ms-flex-order:4;order:4}:host(.order-lg-5){-ms-flex-order:5;order:5}:host(.order-lg-6){-ms-flex-order:6;order:6}:host(.order-lg-7){-ms-flex-order:7;order:7}:host(.order-lg-8){-ms-flex-order:8;order:8}:host(.order-lg-9){-ms-flex-order:9;order:9}:host(.order-lg-10){-ms-flex-order:10;order:10}:host(.order-lg-11){-ms-flex-order:11;order:11}:host(.order-lg-12){-ms-flex-order:12;order:12}}";
|
4
|
+
|
5
|
+
const Ku4Col = class {
|
6
|
+
constructor(hostRef) {
|
7
|
+
registerInstance(this, hostRef);
|
8
|
+
/**
|
9
|
+
* Start position of column at extra-small (optional).
|
10
|
+
*/
|
11
|
+
this.startXs = 0;
|
12
|
+
/**
|
13
|
+
* Number of columns to span left and right at extra-small (optional).
|
14
|
+
*/
|
15
|
+
this.spanXs = 1;
|
16
|
+
}
|
17
|
+
get startClass() {
|
18
|
+
const { startXs, startSm, startMd, startLg } = this;
|
19
|
+
const value = [];
|
20
|
+
if (startXs && !Number.isNaN(startXs)) {
|
21
|
+
value.push(`start-xs-${startXs}`);
|
22
|
+
}
|
23
|
+
if (startSm && !Number.isNaN(startSm)) {
|
24
|
+
value.push(`start-sm-${startSm}`);
|
25
|
+
}
|
26
|
+
if (startMd && !Number.isNaN(startMd)) {
|
27
|
+
value.push(`start-md-${startMd}`);
|
28
|
+
}
|
29
|
+
if (startLg && !Number.isNaN(startLg)) {
|
30
|
+
value.push(`start-lg-${startLg}`);
|
31
|
+
}
|
32
|
+
return value.join(' ');
|
33
|
+
}
|
34
|
+
get spanClass() {
|
35
|
+
const { spanXs, spanSm, spanMd, spanLg } = this;
|
36
|
+
const value = [];
|
37
|
+
if (spanXs && !Number.isNaN(spanXs)) {
|
38
|
+
value.push(`span-xs-${spanXs}`);
|
39
|
+
}
|
40
|
+
if (spanSm && !Number.isNaN(spanSm)) {
|
41
|
+
value.push(`span-sm-${spanSm}`);
|
42
|
+
}
|
43
|
+
if (spanMd && !Number.isNaN(spanMd)) {
|
44
|
+
value.push(`span-md-${spanMd}`);
|
45
|
+
}
|
46
|
+
if (spanLg && !Number.isNaN(spanLg)) {
|
47
|
+
value.push(`span-lg-${spanLg}`);
|
48
|
+
}
|
49
|
+
return value.join(' ');
|
50
|
+
}
|
51
|
+
get orderClass() {
|
52
|
+
const { orderXs, orderSm, orderMd, orderLg } = this;
|
53
|
+
const value = [];
|
54
|
+
if (orderXs && !Number.isNaN(orderXs)) {
|
55
|
+
value.push(`order-xs-${orderXs}`);
|
56
|
+
}
|
57
|
+
if (orderSm && !Number.isNaN(orderSm)) {
|
58
|
+
value.push(`order-sm-${orderSm}`);
|
59
|
+
}
|
60
|
+
if (orderMd && !Number.isNaN(orderMd)) {
|
61
|
+
value.push(`order-md-${orderMd}`);
|
62
|
+
}
|
63
|
+
if (orderLg && !Number.isNaN(orderLg)) {
|
64
|
+
value.push(`order-lg-${orderLg}`);
|
65
|
+
}
|
66
|
+
return value.join(' ');
|
67
|
+
}
|
68
|
+
render() {
|
69
|
+
const { startClass, spanClass, orderClass } = this;
|
70
|
+
return (h(Host, { class: `${startClass} ${spanClass} ${orderClass}` }, h("slot", null)));
|
71
|
+
}
|
72
|
+
};
|
73
|
+
Ku4Col.style = ku4ColCss;
|
74
|
+
|
75
|
+
export { Ku4Col as ku4_col };
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./index-5029fd1f.system.js"],(function(r){"use strict";var s,o,t;return{setters:[function(r){s=r.r;o=r.h;t=r.f}],execute:function(){var d=":host{position:relative;display:block}@media only screen and (min-width: 1px){:host(.start-xs-0){grid-column-start:1}:host(.start-xs-1){grid-column-start:2}:host(.start-xs-2){grid-column-start:3}:host(.start-xs-3){grid-column-start:4}:host(.start-xs-4){grid-column-start:5}:host(.start-xs-5){grid-column-start:6}:host(.start-xs-6){grid-column-start:7}:host(.start-xs-7){grid-column-start:8}:host(.start-xs-8){grid-column-start:9}:host(.start-xs-9){grid-column-start:10}:host(.start-xs-10){grid-column-start:11}:host(.start-xs-11){grid-column-start:12}:host(.start-xs-12){grid-column-start:13}:host(.span-xs-1){grid-column-end:span 1}:host(.span-xs-2){grid-column-end:span 2}:host(.span-xs-3){grid-column-end:span 3}:host(.span-xs-4){grid-column-end:span 4}:host(.span-xs-5){grid-column-end:span 5}:host(.span-xs-6){grid-column-end:span 6}:host(.span-xs-7){grid-column-end:span 7}:host(.span-xs-8){grid-column-end:span 8}:host(.span-xs-9){grid-column-end:span 9}:host(.span-xs-10){grid-column-end:span 10}:host(.span-xs-11){grid-column-end:span 11}:host(.span-xs-12){grid-column-end:span 12}:host(.order-xs-1){-ms-flex-order:1;order:1}:host(.order-xs-2){-ms-flex-order:2;order:2}:host(.order-xs-3){-ms-flex-order:3;order:3}:host(.order-xs-4){-ms-flex-order:4;order:4}:host(.order-xs-5){-ms-flex-order:5;order:5}:host(.order-xs-6){-ms-flex-order:6;order:6}:host(.order-xs-7){-ms-flex-order:7;order:7}:host(.order-xs-8){-ms-flex-order:8;order:8}:host(.order-xs-9){-ms-flex-order:9;order:9}:host(.order-xs-10){-ms-flex-order:10;order:10}:host(.order-xs-11){-ms-flex-order:11;order:11}:host(.order-xs-12){-ms-flex-order:12;order:12}}@media only screen and (min-width: 768px){:host(.start-sm-0){grid-column-start:1}:host(.start-sm-1){grid-column-start:2}:host(.start-sm-2){grid-column-start:3}:host(.start-sm-3){grid-column-start:4}:host(.start-sm-4){grid-column-start:5}:host(.start-sm-5){grid-column-start:6}:host(.start-sm-6){grid-column-start:7}:host(.start-sm-7){grid-column-start:8}:host(.start-sm-8){grid-column-start:9}:host(.start-sm-9){grid-column-start:10}:host(.start-sm-10){grid-column-start:11}:host(.start-sm-11){grid-column-start:12}:host(.start-sm-12){grid-column-start:13}:host(.span-sm-1){grid-column-end:span 1}:host(.span-sm-2){grid-column-end:span 2}:host(.span-sm-3){grid-column-end:span 3}:host(.span-sm-4){grid-column-end:span 4}:host(.span-sm-5){grid-column-end:span 5}:host(.span-sm-6){grid-column-end:span 6}:host(.span-sm-7){grid-column-end:span 7}:host(.span-sm-8){grid-column-end:span 8}:host(.span-sm-9){grid-column-end:span 9}:host(.span-sm-10){grid-column-end:span 10}:host(.span-sm-11){grid-column-end:span 11}:host(.span-sm-12){grid-column-end:span 12}:host(.order-sm-1){-ms-flex-order:1;order:1}:host(.order-sm-2){-ms-flex-order:2;order:2}:host(.order-sm-3){-ms-flex-order:3;order:3}:host(.order-sm-4){-ms-flex-order:4;order:4}:host(.order-sm-5){-ms-flex-order:5;order:5}:host(.order-sm-6){-ms-flex-order:6;order:6}:host(.order-sm-7){-ms-flex-order:7;order:7}:host(.order-sm-8){-ms-flex-order:8;order:8}:host(.order-sm-9){-ms-flex-order:9;order:9}:host(.order-sm-10){-ms-flex-order:10;order:10}:host(.order-sm-11){-ms-flex-order:11;order:11}:host(.order-sm-12){-ms-flex-order:12;order:12}}@media only screen and (min-width: 992px){:host(.start-md-0){grid-column-start:1}:host(.start-md-1){grid-column-start:2}:host(.start-md-2){grid-column-start:3}:host(.start-md-3){grid-column-start:4}:host(.start-md-4){grid-column-start:5}:host(.start-md-5){grid-column-start:6}:host(.start-md-6){grid-column-start:7}:host(.start-md-7){grid-column-start:8}:host(.start-md-8){grid-column-start:9}:host(.start-md-9){grid-column-start:10}:host(.start-md-10){grid-column-start:11}:host(.start-md-11){grid-column-start:12}:host(.start-md-12){grid-column-start:13}:host(.span-md-1){grid-column-end:span 1}:host(.span-md-2){grid-column-end:span 2}:host(.span-md-3){grid-column-end:span 3}:host(.span-md-4){grid-column-end:span 4}:host(.span-md-5){grid-column-end:span 5}:host(.span-md-6){grid-column-end:span 6}:host(.span-md-7){grid-column-end:span 7}:host(.span-md-8){grid-column-end:span 8}:host(.span-md-9){grid-column-end:span 9}:host(.span-md-10){grid-column-end:span 10}:host(.span-md-11){grid-column-end:span 11}:host(.span-md-12){grid-column-end:span 12}:host(.order-md-1){-ms-flex-order:1;order:1}:host(.order-md-2){-ms-flex-order:2;order:2}:host(.order-md-3){-ms-flex-order:3;order:3}:host(.order-md-4){-ms-flex-order:4;order:4}:host(.order-md-5){-ms-flex-order:5;order:5}:host(.order-md-6){-ms-flex-order:6;order:6}:host(.order-md-7){-ms-flex-order:7;order:7}:host(.order-md-8){-ms-flex-order:8;order:8}:host(.order-md-9){-ms-flex-order:9;order:9}:host(.order-md-10){-ms-flex-order:10;order:10}:host(.order-md-11){-ms-flex-order:11;order:11}:host(.order-md-12){-ms-flex-order:12;order:12}}@media only screen and (min-width: 1200px){:host(.start-lg-0){grid-column-start:1}:host(.start-lg-1){grid-column-start:2}:host(.start-lg-2){grid-column-start:3}:host(.start-lg-3){grid-column-start:4}:host(.start-lg-4){grid-column-start:5}:host(.start-lg-5){grid-column-start:6}:host(.start-lg-6){grid-column-start:7}:host(.start-lg-7){grid-column-start:8}:host(.start-lg-8){grid-column-start:9}:host(.start-lg-9){grid-column-start:10}:host(.start-lg-10){grid-column-start:11}:host(.start-lg-11){grid-column-start:12}:host(.start-lg-12){grid-column-start:13}:host(.span-lg-1){grid-column-end:span 1}:host(.span-lg-2){grid-column-end:span 2}:host(.span-lg-3){grid-column-end:span 3}:host(.span-lg-4){grid-column-end:span 4}:host(.span-lg-5){grid-column-end:span 5}:host(.span-lg-6){grid-column-end:span 6}:host(.span-lg-7){grid-column-end:span 7}:host(.span-lg-8){grid-column-end:span 8}:host(.span-lg-9){grid-column-end:span 9}:host(.span-lg-10){grid-column-end:span 10}:host(.span-lg-11){grid-column-end:span 11}:host(.span-lg-12){grid-column-end:span 12}:host(.order-lg-1){-ms-flex-order:1;order:1}:host(.order-lg-2){-ms-flex-order:2;order:2}:host(.order-lg-3){-ms-flex-order:3;order:3}:host(.order-lg-4){-ms-flex-order:4;order:4}:host(.order-lg-5){-ms-flex-order:5;order:5}:host(.order-lg-6){-ms-flex-order:6;order:6}:host(.order-lg-7){-ms-flex-order:7;order:7}:host(.order-lg-8){-ms-flex-order:8;order:8}:host(.order-lg-9){-ms-flex-order:9;order:9}:host(.order-lg-10){-ms-flex-order:10;order:10}:host(.order-lg-11){-ms-flex-order:11;order:11}:host(.order-lg-12){-ms-flex-order:12;order:12}}";var e=r("ku4_col",function(){function r(r){s(this,r);this.startXs=0;this.spanXs=1}Object.defineProperty(r.prototype,"startClass",{get:function(){var r=this,s=r.startXs,o=r.startSm,t=r.startMd,d=r.startLg;var e=[];if(s&&!Number.isNaN(s)){e.push("start-xs-".concat(s))}if(o&&!Number.isNaN(o)){e.push("start-sm-".concat(o))}if(t&&!Number.isNaN(t)){e.push("start-md-".concat(t))}if(d&&!Number.isNaN(d)){e.push("start-lg-".concat(d))}return e.join(" ")},enumerable:false,configurable:true});Object.defineProperty(r.prototype,"spanClass",{get:function(){var r=this,s=r.spanXs,o=r.spanSm,t=r.spanMd,d=r.spanLg;var e=[];if(s&&!Number.isNaN(s)){e.push("span-xs-".concat(s))}if(o&&!Number.isNaN(o)){e.push("span-sm-".concat(o))}if(t&&!Number.isNaN(t)){e.push("span-md-".concat(t))}if(d&&!Number.isNaN(d)){e.push("span-lg-".concat(d))}return e.join(" ")},enumerable:false,configurable:true});Object.defineProperty(r.prototype,"orderClass",{get:function(){var r=this,s=r.orderXs,o=r.orderSm,t=r.orderMd,d=r.orderLg;var e=[];if(s&&!Number.isNaN(s)){e.push("order-xs-".concat(s))}if(o&&!Number.isNaN(o)){e.push("order-sm-".concat(o))}if(t&&!Number.isNaN(t)){e.push("order-md-".concat(t))}if(d&&!Number.isNaN(d)){e.push("order-lg-".concat(d))}return e.join(" ")},enumerable:false,configurable:true});r.prototype.render=function(){var r=this,s=r.startClass,d=r.spanClass,e=r.orderClass;return o(t,{class:"".concat(s," ").concat(d," ").concat(e)},o("slot",null))};return r}());e.style=d}}}));
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { r as registerInstance, h, f as Host } from './index-7fe386de.js';
|
2
|
+
|
3
|
+
const ku4DrawerCss = ":host{position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;z-index:1}:host([top]),:host([bottom]){width:100%;height:0;-webkit-transition:height 0.4s;transition:height 0.4s}:host([left]),:host([right]){width:0;height:100%;-webkit-transition:width 0.4s;transition:width 0.4s}:host([top][open]),:host([bottom][open]){height:100%}:host([left][open]),:host([right][open]){width:100%}:host([top][open=false]),:host([bottom][open=false]){height:0}:host([left][open=false]),:host([right][open=false]){width:0}:host([top]),:host([left]){top:0;left:0}:host([bottom]){left:0;bottom:0}:host([right]){right:0;bottom:0}";
|
4
|
+
|
5
|
+
const Ku4Drawer = class {
|
6
|
+
constructor(hostRef) {
|
7
|
+
registerInstance(this, hostRef);
|
8
|
+
/**
|
9
|
+
* Open size of this drawer (any valid CSS width or height value)
|
10
|
+
*/
|
11
|
+
this.size = '20%';
|
12
|
+
}
|
13
|
+
/**
|
14
|
+
* Toggle drawer
|
15
|
+
*/
|
16
|
+
async toggle() {
|
17
|
+
this.open = !this.open;
|
18
|
+
}
|
19
|
+
get sizeValue() {
|
20
|
+
const { bottom, top, right, size } = this;
|
21
|
+
switch (true) {
|
22
|
+
case bottom: return { 'max-height': size };
|
23
|
+
case top: return { 'max-height': size };
|
24
|
+
case right: return { 'max-width': size };
|
25
|
+
default: return { 'max-width': size };
|
26
|
+
}
|
27
|
+
}
|
28
|
+
render() {
|
29
|
+
const { sizeValue, open } = this;
|
30
|
+
return (h(Host, { style: sizeValue, "aria-hidden": open ? 'false' : 'true' }, h("slot", null)));
|
31
|
+
}
|
32
|
+
};
|
33
|
+
Ku4Drawer.style = ku4DrawerCss;
|
34
|
+
|
35
|
+
export { Ku4Drawer as ku4_drawer };
|
@@ -0,0 +1 @@
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,o){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function s(t){try{h(o.next(t))}catch(e){i(e)}}function a(t){try{h(o["throw"](t))}catch(e){i(e)}}function h(t){t.done?n(t.value):r(t.value).then(s,a)}h((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return h([t,e])}}function h(s){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,r&&(i=s[0]&2?r["return"]:s[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;if(r=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(a){s=[6,a];r=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./index-5029fd1f.system.js"],(function(t){"use strict";var e,n,o;return{setters:[function(t){e=t.r;n=t.h;o=t.f}],execute:function(){var r=":host{position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;z-index:1}:host([top]),:host([bottom]){width:100%;height:0;-webkit-transition:height 0.4s;transition:height 0.4s}:host([left]),:host([right]){width:0;height:100%;-webkit-transition:width 0.4s;transition:width 0.4s}:host([top][open]),:host([bottom][open]){height:100%}:host([left][open]),:host([right][open]){width:100%}:host([top][open=false]),:host([bottom][open=false]){height:0}:host([left][open=false]),:host([right][open=false]){width:0}:host([top]),:host([left]){top:0;left:0}:host([bottom]){left:0;bottom:0}:host([right]){right:0;bottom:0}";var i=t("ku4_drawer",function(){function t(t){e(this,t);this.size="20%"}t.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.open=!this.open;return[2]}))}))};Object.defineProperty(t.prototype,"sizeValue",{get:function(){var t=this,e=t.bottom,n=t.top,o=t.right,r=t.size;switch(true){case e:return{"max-height":r};case n:return{"max-height":r};case o:return{"max-width":r};default:return{"max-width":r}}},enumerable:false,configurable:true});t.prototype.render=function(){var t=this,e=t.sizeValue,r=t.open;return n(o,{style:e,"aria-hidden":r?"false":"true"},n("slot",null))};return t}());i.style=r}}}));
|