le-kit 0.0.3 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/admin/index.d.ts +25 -0
- package/dist/admin/index.js +80 -0
- package/dist/cjs/index-CO4npcak.js +1796 -0
- package/dist/cjs/index-CO4npcak.js.map +1 -0
- package/dist/cjs/index.cjs.js +117 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/le-box.cjs.entry.js +184 -0
- package/dist/cjs/le-box.entry.cjs.js.map +1 -0
- package/dist/cjs/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.cjs.js.map +1 -0
- package/dist/cjs/le-button_6.cjs.entry.js +1199 -0
- package/dist/cjs/le-card.cjs.entry.js +29 -0
- package/dist/cjs/le-card.entry.cjs.js.map +1 -0
- package/dist/cjs/le-kit.cjs.js +25 -0
- package/dist/cjs/le-kit.cjs.js.map +1 -0
- package/dist/cjs/le-number-input.cjs.entry.js +202 -0
- package/dist/cjs/le-number-input.entry.cjs.js.map +1 -0
- package/dist/cjs/le-popup.cjs.entry.js +212 -0
- package/dist/cjs/le-popup.entry.cjs.js.map +1 -0
- package/dist/cjs/le-round-progress.cjs.entry.js +106 -0
- package/dist/cjs/le-round-progress.entry.cjs.js.map +1 -0
- package/dist/cjs/le-stack.cjs.entry.js +135 -0
- package/dist/cjs/le-stack.entry.cjs.js.map +1 -0
- package/dist/cjs/le-text.cjs.entry.js +335 -0
- package/dist/cjs/le-text.entry.cjs.js.map +1 -0
- package/dist/cjs/le-turntable.cjs.entry.js +139 -0
- package/dist/cjs/le-turntable.entry.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/utils-BeT0iyCQ.js +152 -0
- package/dist/cjs/utils-BeT0iyCQ.js.map +1 -0
- package/dist/collection/collection-manifest.json +20 -102
- package/dist/collection/components/le-box/le-box.default.css +37 -0
- package/dist/collection/components/le-box/le-box.js +614 -0
- package/dist/collection/components/le-box/le-box.js.map +1 -0
- package/dist/collection/components/le-button/le-button.default.css +263 -0
- package/dist/collection/components/le-button/le-button.js +368 -0
- package/dist/collection/components/le-button/le-button.js.map +1 -0
- package/dist/collection/components/le-card/le-card.default.css +74 -0
- package/dist/collection/components/le-card/le-card.js +102 -0
- package/dist/collection/components/le-card/le-card.js.map +1 -0
- package/dist/collection/components/le-checkbox/le-checkbox.css +93 -0
- package/dist/collection/components/le-checkbox/le-checkbox.js +192 -0
- package/dist/collection/components/le-checkbox/le-checkbox.js.map +1 -0
- package/dist/collection/components/le-component/le-component.css +189 -0
- package/dist/collection/components/le-component/le-component.js +359 -0
- package/dist/collection/components/le-component/le-component.js.map +1 -0
- package/dist/collection/components/le-number-input/le-number-input.css +135 -0
- package/dist/collection/components/le-number-input/le-number-input.js +515 -0
- package/dist/collection/components/le-number-input/le-number-input.js.map +1 -0
- package/dist/collection/components/le-popover/le-popover.css +143 -0
- package/dist/collection/components/le-popover/le-popover.js +693 -0
- package/dist/collection/components/le-popover/le-popover.js.map +1 -0
- package/dist/collection/components/le-popup/le-popup.api.js +101 -0
- package/dist/collection/components/le-popup/le-popup.api.js.map +1 -0
- package/dist/collection/components/le-popup/le-popup.css +222 -0
- package/dist/collection/components/le-popup/le-popup.js +596 -0
- package/dist/collection/components/le-popup/le-popup.js.map +1 -0
- package/dist/collection/components/le-round-progress/le-round-progress.js +184 -84
- package/dist/collection/components/le-round-progress/le-round-progress.js.map +1 -0
- package/dist/collection/components/le-slot/le-slot.default.css +222 -0
- package/dist/collection/components/le-slot/le-slot.js +636 -0
- package/dist/collection/components/le-slot/le-slot.js.map +1 -0
- package/dist/collection/components/le-stack/le-stack.default.css +37 -0
- package/dist/collection/components/le-stack/le-stack.js +389 -0
- package/dist/collection/components/le-stack/le-stack.js.map +1 -0
- package/dist/collection/components/le-string-input/le-string-input.css +83 -0
- package/dist/collection/components/le-string-input/le-string-input.js +359 -0
- package/dist/collection/components/le-string-input/le-string-input.js.map +1 -0
- package/dist/collection/components/le-text/le-text.default.css +169 -0
- package/dist/collection/components/le-text/le-text.js +475 -0
- package/dist/collection/components/le-text/le-text.js.map +1 -0
- package/dist/collection/components/le-turntable/le-turntable.js +210 -102
- package/dist/collection/components/le-turntable/le-turntable.js.map +1 -0
- package/dist/collection/global/app.js +130 -0
- package/dist/collection/global/app.js.map +1 -0
- package/dist/collection/index-admin.js +27 -0
- package/dist/collection/index-admin.js.map +1 -0
- package/dist/collection/index-core.js +25 -0
- package/dist/collection/index-core.js.map +1 -0
- package/dist/collection/index.js +15 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/types/blocks.js +115 -0
- package/dist/collection/types/blocks.js.map +1 -0
- package/dist/collection/types/options.js +2 -0
- package/dist/collection/types/options.js.map +1 -0
- package/dist/collection/utils/utils.js +141 -5
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/index.d.ts +64 -0
- package/dist/components/index.js +127 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/le-box.d.ts +11 -0
- package/dist/components/le-box.js +256 -0
- package/dist/components/le-box.js.map +1 -0
- package/dist/components/le-button.d.ts +11 -0
- package/dist/components/le-button.js +9 -0
- package/dist/components/le-button.js.map +1 -0
- package/dist/components/le-button2.js +1408 -0
- package/dist/components/le-button2.js.map +1 -0
- package/dist/components/le-card.d.ts +11 -0
- package/dist/components/le-card.js +83 -0
- package/dist/components/le-card.js.map +1 -0
- package/dist/components/le-checkbox.d.ts +11 -0
- package/dist/components/le-checkbox.js +9 -0
- package/dist/components/le-checkbox.js.map +1 -0
- package/dist/components/le-component.d.ts +11 -0
- package/dist/components/le-component.js +9 -0
- package/dist/components/le-component.js.map +1 -0
- package/dist/components/le-number-input.d.ts +11 -0
- package/dist/components/le-number-input.js +271 -0
- package/dist/components/le-number-input.js.map +1 -0
- package/dist/components/le-popover.d.ts +11 -0
- package/dist/components/le-popover.js +9 -0
- package/dist/components/le-popover.js.map +1 -0
- package/dist/components/le-popover2.js +382 -0
- package/dist/components/le-popover2.js.map +1 -0
- package/dist/components/le-popup.d.ts +11 -0
- package/dist/components/le-popup.js +279 -0
- package/dist/components/le-popup.js.map +1 -0
- package/dist/components/le-round-progress.d.ts +11 -0
- package/dist/components/le-round-progress.js +135 -0
- package/dist/components/le-round-progress.js.map +1 -0
- package/dist/components/le-slot.d.ts +11 -0
- package/dist/components/le-slot.js +9 -0
- package/dist/components/le-slot.js.map +1 -0
- package/dist/components/le-stack.d.ts +11 -0
- package/dist/components/le-stack.js +198 -0
- package/dist/components/le-stack.js.map +1 -0
- package/dist/components/le-string-input.d.ts +11 -0
- package/dist/components/le-string-input.js +9 -0
- package/dist/components/le-string-input.js.map +1 -0
- package/dist/components/le-text.d.ts +11 -0
- package/dist/components/le-text.js +398 -0
- package/dist/components/le-text.js.map +1 -0
- package/dist/components/le-turntable.d.ts +11 -0
- package/dist/components/le-turntable.js +164 -0
- package/dist/components/le-turntable.js.map +1 -0
- package/dist/core/components/index.d.ts +64 -0
- package/dist/core/components/index.js +127 -0
- package/dist/core/components/index.js.map +1 -0
- package/dist/core/components/le-box.d.ts +11 -0
- package/dist/core/components/le-box.js +246 -0
- package/dist/core/components/le-box.js.map +1 -0
- package/dist/core/components/le-button.d.ts +11 -0
- package/dist/core/components/le-button.js +9 -0
- package/dist/core/components/le-button.js.map +1 -0
- package/dist/core/components/le-button2.js +1358 -0
- package/dist/core/components/le-button2.js.map +1 -0
- package/dist/core/components/le-card.d.ts +11 -0
- package/dist/core/components/le-card.js +73 -0
- package/dist/core/components/le-card.js.map +1 -0
- package/dist/core/components/le-checkbox.d.ts +11 -0
- package/dist/core/components/le-checkbox.js +9 -0
- package/dist/core/components/le-checkbox.js.map +1 -0
- package/dist/core/components/le-component.js.map +1 -0
- package/dist/core/components/le-number-input.d.ts +11 -0
- package/dist/core/components/le-number-input.js +261 -0
- package/dist/core/components/le-number-input.js.map +1 -0
- package/dist/core/components/le-popover.d.ts +11 -0
- package/dist/core/components/le-popover.js +9 -0
- package/dist/core/components/le-popover.js.map +1 -0
- package/dist/core/components/le-popover2.js +382 -0
- package/dist/core/components/le-popover2.js.map +1 -0
- package/dist/core/components/le-popup.d.ts +11 -0
- package/dist/core/components/le-popup.js +269 -0
- package/dist/core/components/le-popup.js.map +1 -0
- package/dist/core/components/le-round-progress.d.ts +11 -0
- package/dist/core/components/le-round-progress.js +135 -0
- package/dist/core/components/le-round-progress.js.map +1 -0
- package/dist/core/components/le-slot.js.map +1 -0
- package/dist/core/components/le-stack.d.ts +11 -0
- package/dist/core/components/le-stack.js +188 -0
- package/dist/core/components/le-stack.js.map +1 -0
- package/dist/core/components/le-string-input.d.ts +11 -0
- package/dist/core/components/le-string-input.js +9 -0
- package/dist/core/components/le-string-input.js.map +1 -0
- package/dist/core/components/le-text.d.ts +11 -0
- package/dist/core/components/le-text.js +388 -0
- package/dist/core/components/le-text.js.map +1 -0
- package/dist/core/components/le-turntable.d.ts +11 -0
- package/dist/core/components/le-turntable.js +164 -0
- package/dist/core/components/le-turntable.js.map +1 -0
- package/dist/core/index.d.ts +23 -0
- package/dist/core/index.js +74 -0
- package/dist/core/stencil-runtime.js +1 -0
- package/dist/docs.d.ts +443 -0
- package/dist/docs.json +5185 -0
- package/dist/esm/index-D71TXvJa.js +1781 -0
- package/dist/esm/index-D71TXvJa.js.map +1 -0
- package/dist/esm/index.js +105 -5
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/le-box.entry.js +182 -0
- package/dist/esm/le-box.entry.js.map +1 -0
- package/dist/esm/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.js.map +1 -0
- package/dist/esm/le-button_6.entry.js +1192 -0
- package/dist/esm/le-card.entry.js +27 -0
- package/dist/esm/le-card.entry.js.map +1 -0
- package/dist/esm/le-kit.js +21 -0
- package/dist/esm/le-kit.js.map +1 -0
- package/dist/esm/le-number-input.entry.js +200 -0
- package/dist/esm/le-number-input.entry.js.map +1 -0
- package/dist/esm/le-popup.entry.js +210 -0
- package/dist/esm/le-popup.entry.js.map +1 -0
- package/dist/esm/le-round-progress.entry.js +104 -0
- package/dist/esm/le-round-progress.entry.js.map +1 -0
- package/dist/esm/le-stack.entry.js +133 -0
- package/dist/esm/le-stack.entry.js.map +1 -0
- package/dist/esm/le-text.entry.js +333 -0
- package/dist/esm/le-text.entry.js.map +1 -0
- package/dist/esm/le-turntable.entry.js +137 -0
- package/dist/esm/le-turntable.entry.js.map +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/utils-CJLZrrdC.js +146 -0
- package/dist/esm/utils-CJLZrrdC.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -2
- package/dist/le-kit/index-D21JjI31.js.map +1 -0
- package/dist/le-kit/index.esm.js +2 -0
- package/dist/le-kit/index.esm.js.map +1 -0
- package/dist/le-kit/le-box.entry.esm.js.map +1 -0
- package/dist/le-kit/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.esm.js.map +1 -0
- package/dist/le-kit/le-card.entry.esm.js.map +1 -0
- package/dist/le-kit/le-kit.css +1 -0
- package/dist/le-kit/le-kit.esm.js +2 -0
- package/dist/le-kit/le-kit.esm.js.map +1 -0
- package/dist/le-kit/le-number-input.entry.esm.js.map +1 -0
- package/dist/le-kit/le-popup.entry.esm.js.map +1 -0
- package/dist/le-kit/le-round-progress.entry.esm.js.map +1 -0
- package/dist/le-kit/le-stack.entry.esm.js.map +1 -0
- package/dist/le-kit/le-text.entry.esm.js.map +1 -0
- package/dist/le-kit/le-turntable.entry.esm.js.map +1 -0
- package/dist/le-kit/loader.esm.js.map +1 -0
- package/dist/le-kit/p-024a764e.entry.js +2 -0
- package/dist/le-kit/p-024a764e.entry.js.map +1 -0
- package/dist/le-kit/p-073cf0b9.entry.js +2 -0
- package/dist/le-kit/p-073cf0b9.entry.js.map +1 -0
- package/dist/le-kit/p-0955b105.entry.js +2 -0
- package/dist/le-kit/p-0955b105.entry.js.map +1 -0
- package/dist/le-kit/p-18d79ee2.entry.js +2 -0
- package/dist/le-kit/p-18d79ee2.entry.js.map +1 -0
- package/dist/le-kit/p-4b1d3b6d.entry.js +2 -0
- package/dist/le-kit/p-4b1d3b6d.entry.js.map +1 -0
- package/dist/le-kit/p-79d179bd.entry.js +2 -0
- package/dist/le-kit/p-79d179bd.entry.js.map +1 -0
- package/dist/le-kit/p-D71TXvJa.js +3 -0
- package/dist/le-kit/p-D71TXvJa.js.map +1 -0
- package/dist/le-kit/p-c8a9288e.entry.js +2 -0
- package/dist/le-kit/p-c8a9288e.entry.js.map +1 -0
- package/dist/le-kit/p-cfc35bd3.entry.js +2 -0
- package/dist/le-kit/p-cfc35bd3.entry.js.map +1 -0
- package/dist/le-kit/p-d04da1f5.entry.js +2 -0
- package/dist/le-kit/p-d04da1f5.entry.js.map +1 -0
- package/dist/le-kit/p-qIai5-eB.js +2 -0
- package/dist/le-kit/p-qIai5-eB.js.map +1 -0
- package/dist/le-kit/utils-apol-Xc_.js.map +1 -0
- package/dist/themes/base.css +89 -0
- package/dist/themes/dark.css +100 -0
- package/dist/themes/default.css +108 -0
- package/dist/themes/gradient.css +100 -0
- package/dist/themes/index.css +413 -0
- package/dist/themes/minimal.css +100 -0
- package/dist/themes/warm.css +100 -0
- package/dist/types/components/le-box/le-box.d.ts +111 -0
- package/dist/types/components/le-button/le-button.d.ts +78 -0
- package/dist/types/components/le-card/le-card.d.ts +37 -0
- package/dist/types/components/le-checkbox/le-checkbox.d.ts +46 -0
- package/dist/types/components/le-component/le-component.d.ts +115 -0
- package/dist/types/components/le-number-input/le-number-input.d.ts +106 -0
- package/dist/types/components/le-popover/le-popover.d.ts +109 -0
- package/dist/types/components/le-popup/le-popup.api.d.ts +73 -0
- package/dist/types/components/le-popup/le-popup.d.ts +122 -0
- package/dist/types/components/le-round-progress/le-round-progress.d.ts +2 -3
- package/dist/types/components/le-slot/le-slot.d.ts +149 -0
- package/dist/types/components/le-stack/le-stack.d.ts +73 -0
- package/dist/types/components/le-string-input/le-string-input.d.ts +83 -0
- package/dist/types/components/le-text/le-text.d.ts +141 -0
- package/dist/types/components/le-turntable/le-turntable.d.ts +1 -2
- package/dist/types/components.d.ts +2030 -62
- package/dist/types/global/app.d.ts +40 -0
- package/dist/types/index-admin.d.ts +29 -0
- package/dist/types/index-core.d.ts +27 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/stencil-public-runtime.d.ts +1756 -0
- package/dist/types/types/blocks.d.ts +136 -0
- package/dist/types/types/options.d.ts +124 -0
- package/dist/types/utils/utils.d.ts +54 -1
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +64 -13
- package/readme.md +180 -46
- package/dist/cjs/es5/build/jqoqzji9.entry.js +0 -6
- package/dist/cjs/es5/build/jqoqzji9.sc.entry.js +0 -6
- package/dist/cjs/es5/build/novg0vs0.entry.js +0 -9
- package/dist/cjs/es5/build/novg0vs0.sc.entry.js +0 -9
- package/dist/cjs/es5/index.js +0 -1
- package/dist/cjs/es5/le-kit.components.js +0 -4
- package/dist/cjs/es5/le-kit.core.js +0 -459
- package/dist/cjs/es5/le-kit.define.js +0 -9
- package/dist/cjs/es5/polyfills/array.js +0 -63
- package/dist/cjs/es5/polyfills/css-shim.js +0 -178
- package/dist/cjs/es5/polyfills/dom.js +0 -125
- package/dist/cjs/es5/polyfills/fetch.js +0 -186
- package/dist/cjs/es5/polyfills/map.js +0 -54
- package/dist/cjs/es5/polyfills/object.js +0 -27
- package/dist/cjs/es5/polyfills/promise.js +0 -80
- package/dist/cjs/es5/polyfills/string.js +0 -15
- package/dist/cjs/es5/polyfills/tslib.js +0 -244
- package/dist/cjs/es5/polyfills/url.js +0 -68
- package/dist/collection/interface.js +0 -0
- package/dist/esm/es2017/build/jqoqzji9.entry.js +0 -88
- package/dist/esm/es2017/build/jqoqzji9.sc.entry.js +0 -88
- package/dist/esm/es2017/build/novg0vs0.entry.js +0 -106
- package/dist/esm/es2017/build/novg0vs0.sc.entry.js +0 -106
- package/dist/esm/es2017/index.js +0 -1
- package/dist/esm/es2017/le-kit.components.js +0 -2
- package/dist/esm/es2017/le-kit.core.js +0 -5
- package/dist/esm/es2017/le-kit.define.js +0 -9
- package/dist/esm/es5/build/jqoqzji9.entry.js +0 -1
- package/dist/esm/es5/build/jqoqzji9.sc.entry.js +0 -1
- package/dist/esm/es5/build/novg0vs0.entry.js +0 -1
- package/dist/esm/es5/build/novg0vs0.sc.entry.js +0 -1
- package/dist/esm/es5/index.js +0 -1
- package/dist/esm/es5/le-kit.components.js +0 -2
- package/dist/esm/es5/le-kit.core.js +0 -5
- package/dist/esm/es5/le-kit.define.js +0 -9
- package/dist/esm/es5/polyfills/array.js +0 -23
- package/dist/esm/es5/polyfills/css-shim.js +0 -8
- package/dist/esm/es5/polyfills/dom.js +0 -22
- package/dist/esm/es5/polyfills/fetch.js +0 -20
- package/dist/esm/es5/polyfills/map.js +0 -7
- package/dist/esm/es5/polyfills/object.js +0 -20
- package/dist/esm/es5/polyfills/promise.js +0 -8
- package/dist/esm/es5/polyfills/string.js +0 -12
- package/dist/esm/es5/polyfills/tslib.js +0 -160
- package/dist/esm/es5/polyfills/url.js +0 -7
- package/dist/le-kit/jqoqzji9.entry.js +0 -1
- package/dist/le-kit/jqoqzji9.es5.entry.js +0 -1
- package/dist/le-kit/jqoqzji9.sc.entry.js +0 -1
- package/dist/le-kit/jqoqzji9.sc.es5.entry.js +0 -1
- package/dist/le-kit/le-kit.lfyfa4jd.js +0 -123
- package/dist/le-kit/le-kit.rzqb8hph.js +0 -4
- package/dist/le-kit/novg0vs0.entry.js +0 -1
- package/dist/le-kit/novg0vs0.es5.entry.js +0 -1
- package/dist/le-kit/novg0vs0.sc.entry.js +0 -1
- package/dist/le-kit/novg0vs0.sc.es5.entry.js +0 -1
- package/dist/le-kit.js +0 -1
- package/dist/loader/index.cjs.js +0 -1
- package/dist/loader/index.d.ts +0 -1
- package/dist/loader/index.es2017.js +0 -1
- package/dist/loader/index.js +0 -1
- package/dist/loader/package.json +0 -9
- package/dist/types/stencil.core.d.ts +0 -1203
- package/dist/web-components.json +0 -41
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { h } from '../le-kit.core.js';
|
|
2
|
-
|
|
3
|
-
class LeTurntable {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.center = 'center';
|
|
6
|
-
this.value = 0;
|
|
7
|
-
this.rotating = false;
|
|
8
|
-
this.currentAngle = 0;
|
|
9
|
-
}
|
|
10
|
-
updateValue(newValue) {
|
|
11
|
-
if (!this.rotating) {
|
|
12
|
-
this.currentAngle = parseFloat(newValue);
|
|
13
|
-
this.setAngle(this.currentAngle);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
handleMouseDown(evt) {
|
|
17
|
-
this.rotating = true;
|
|
18
|
-
this.startAngle = this.getAngle(evt.pageX, evt.pageY);
|
|
19
|
-
evt.preventDefault();
|
|
20
|
-
evt.cancelBubble = true;
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
handleMouseMove(evt) {
|
|
24
|
-
if (this.rotating) {
|
|
25
|
-
this.setAngle(this.currentAngle + (this.getAngle(evt.pageX, evt.pageY) - this.startAngle));
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
handleMouseUp(evt) {
|
|
30
|
-
if (this.rotating) {
|
|
31
|
-
const angle = this.currentAngle + (this.getAngle(evt.pageX, evt.pageY) - this.startAngle);
|
|
32
|
-
this.setAngle(angle);
|
|
33
|
-
this.currentAngle = angle;
|
|
34
|
-
this.rotating = false;
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
handleWindowResize() {
|
|
39
|
-
this.getTransformOrigin();
|
|
40
|
-
}
|
|
41
|
-
componentDidLoad() {
|
|
42
|
-
this.el.style.transformOrigin = this.center;
|
|
43
|
-
this.currentAngle = this.value;
|
|
44
|
-
this.getTransformOrigin();
|
|
45
|
-
this.setAngle(this.currentAngle);
|
|
46
|
-
}
|
|
47
|
-
componentDidUpdate() {
|
|
48
|
-
this.getTransformOrigin();
|
|
49
|
-
}
|
|
50
|
-
getTransformOrigin() {
|
|
51
|
-
[this.centerX, this.centerY] = window.getComputedStyle(this.el, null)
|
|
52
|
-
.transformOrigin
|
|
53
|
-
.split(' ')
|
|
54
|
-
.map(val => Math.round(parseFloat(val)));
|
|
55
|
-
let t = null;
|
|
56
|
-
const scrollContainer = ((t = document.documentElement) || (t = document.body.parentNode)) && typeof t.scrollLeft === 'number' ? t : document.body;
|
|
57
|
-
const clientRects = this.el.getBoundingClientRect();
|
|
58
|
-
this.pageX = Math.round(clientRects.left + scrollContainer.scrollLeft);
|
|
59
|
-
this.pageY = Math.round(clientRects.top + scrollContainer.scrollTop);
|
|
60
|
-
}
|
|
61
|
-
getAngle(posX, posY) {
|
|
62
|
-
const x = posX - this.pageX - this.centerX;
|
|
63
|
-
const y = posY - this.pageY - this.centerY;
|
|
64
|
-
const angle = Math.round(Math.atan2(y, x) * 180 / Math.PI * 100) / 100;
|
|
65
|
-
return angle;
|
|
66
|
-
}
|
|
67
|
-
setAngle(angle) {
|
|
68
|
-
this.el.style.transform = `rotate(${angle}deg)`;
|
|
69
|
-
}
|
|
70
|
-
render() {
|
|
71
|
-
return h("div", { class: "turntable", onMouseDown: this.handleMouseDown.bind(this) },
|
|
72
|
-
h("slot", null));
|
|
73
|
-
}
|
|
74
|
-
static get is() { return "le-turntable"; }
|
|
75
|
-
static get encapsulation() { return "shadow"; }
|
|
76
|
-
static get properties() { return {
|
|
77
|
-
"center": {
|
|
78
|
-
"type": String,
|
|
79
|
-
"attr": "center"
|
|
80
|
-
},
|
|
81
|
-
"el": {
|
|
82
|
-
"elementRef": true
|
|
83
|
-
},
|
|
84
|
-
"value": {
|
|
85
|
-
"type": Number,
|
|
86
|
-
"attr": "value",
|
|
87
|
-
"watchCallbacks": ["updateValue"]
|
|
88
|
-
}
|
|
89
|
-
}; }
|
|
90
|
-
static get listeners() { return [{
|
|
91
|
-
"name": "window:mousemove",
|
|
92
|
-
"method": "handleMouseMove",
|
|
93
|
-
"passive": true
|
|
94
|
-
}, {
|
|
95
|
-
"name": "window:mouseup",
|
|
96
|
-
"method": "handleMouseUp",
|
|
97
|
-
"passive": true
|
|
98
|
-
}, {
|
|
99
|
-
"name": "window:resize",
|
|
100
|
-
"method": "handleWindowResize",
|
|
101
|
-
"passive": true
|
|
102
|
-
}]; }
|
|
103
|
-
static get style() { return ":host{display:block;cursor:-webkit-grab;cursor:grab}div.turntable{width:100%;height:100%;padding:1px}"; }
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export { LeTurntable };
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { h } from '../le-kit.core.js';
|
|
2
|
-
|
|
3
|
-
class LeTurntable {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.center = 'center';
|
|
6
|
-
this.value = 0;
|
|
7
|
-
this.rotating = false;
|
|
8
|
-
this.currentAngle = 0;
|
|
9
|
-
}
|
|
10
|
-
updateValue(newValue) {
|
|
11
|
-
if (!this.rotating) {
|
|
12
|
-
this.currentAngle = parseFloat(newValue);
|
|
13
|
-
this.setAngle(this.currentAngle);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
handleMouseDown(evt) {
|
|
17
|
-
this.rotating = true;
|
|
18
|
-
this.startAngle = this.getAngle(evt.pageX, evt.pageY);
|
|
19
|
-
evt.preventDefault();
|
|
20
|
-
evt.cancelBubble = true;
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
handleMouseMove(evt) {
|
|
24
|
-
if (this.rotating) {
|
|
25
|
-
this.setAngle(this.currentAngle + (this.getAngle(evt.pageX, evt.pageY) - this.startAngle));
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
handleMouseUp(evt) {
|
|
30
|
-
if (this.rotating) {
|
|
31
|
-
const angle = this.currentAngle + (this.getAngle(evt.pageX, evt.pageY) - this.startAngle);
|
|
32
|
-
this.setAngle(angle);
|
|
33
|
-
this.currentAngle = angle;
|
|
34
|
-
this.rotating = false;
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
handleWindowResize() {
|
|
39
|
-
this.getTransformOrigin();
|
|
40
|
-
}
|
|
41
|
-
componentDidLoad() {
|
|
42
|
-
this.el.style.transformOrigin = this.center;
|
|
43
|
-
this.currentAngle = this.value;
|
|
44
|
-
this.getTransformOrigin();
|
|
45
|
-
this.setAngle(this.currentAngle);
|
|
46
|
-
}
|
|
47
|
-
componentDidUpdate() {
|
|
48
|
-
this.getTransformOrigin();
|
|
49
|
-
}
|
|
50
|
-
getTransformOrigin() {
|
|
51
|
-
[this.centerX, this.centerY] = window.getComputedStyle(this.el, null)
|
|
52
|
-
.transformOrigin
|
|
53
|
-
.split(' ')
|
|
54
|
-
.map(val => Math.round(parseFloat(val)));
|
|
55
|
-
let t = null;
|
|
56
|
-
const scrollContainer = ((t = document.documentElement) || (t = document.body.parentNode)) && typeof t.scrollLeft === 'number' ? t : document.body;
|
|
57
|
-
const clientRects = this.el.getBoundingClientRect();
|
|
58
|
-
this.pageX = Math.round(clientRects.left + scrollContainer.scrollLeft);
|
|
59
|
-
this.pageY = Math.round(clientRects.top + scrollContainer.scrollTop);
|
|
60
|
-
}
|
|
61
|
-
getAngle(posX, posY) {
|
|
62
|
-
const x = posX - this.pageX - this.centerX;
|
|
63
|
-
const y = posY - this.pageY - this.centerY;
|
|
64
|
-
const angle = Math.round(Math.atan2(y, x) * 180 / Math.PI * 100) / 100;
|
|
65
|
-
return angle;
|
|
66
|
-
}
|
|
67
|
-
setAngle(angle) {
|
|
68
|
-
this.el.style.transform = `rotate(${angle}deg)`;
|
|
69
|
-
}
|
|
70
|
-
render() {
|
|
71
|
-
return h("div", { class: "turntable", onMouseDown: this.handleMouseDown.bind(this) },
|
|
72
|
-
h("slot", null));
|
|
73
|
-
}
|
|
74
|
-
static get is() { return "le-turntable"; }
|
|
75
|
-
static get encapsulation() { return "shadow"; }
|
|
76
|
-
static get properties() { return {
|
|
77
|
-
"center": {
|
|
78
|
-
"type": String,
|
|
79
|
-
"attr": "center"
|
|
80
|
-
},
|
|
81
|
-
"el": {
|
|
82
|
-
"elementRef": true
|
|
83
|
-
},
|
|
84
|
-
"value": {
|
|
85
|
-
"type": Number,
|
|
86
|
-
"attr": "value",
|
|
87
|
-
"watchCallbacks": ["updateValue"]
|
|
88
|
-
}
|
|
89
|
-
}; }
|
|
90
|
-
static get listeners() { return [{
|
|
91
|
-
"name": "window:mousemove",
|
|
92
|
-
"method": "handleMouseMove",
|
|
93
|
-
"passive": true
|
|
94
|
-
}, {
|
|
95
|
-
"name": "window:mouseup",
|
|
96
|
-
"method": "handleMouseUp",
|
|
97
|
-
"passive": true
|
|
98
|
-
}, {
|
|
99
|
-
"name": "window:resize",
|
|
100
|
-
"method": "handleWindowResize",
|
|
101
|
-
"passive": true
|
|
102
|
-
}]; }
|
|
103
|
-
static get style() { return ".sc-le-turntable-h{display:block;cursor:-webkit-grab;cursor:grab}div.turntable.sc-le-turntable{width:100%;height:100%;padding:1px}"; }
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export { LeTurntable };
|
package/dist/esm/es2017/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// LeKit: ES Module
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// LeKit: Host Data, ES Module/es2017 Target
|
|
2
|
-
export const COMPONENTS = [["le-round-progress","jqoqzji9",1,[["el",64],["padding",1,0,1,8],["params",16],["paths",1,0,1,2],["value",1,0,1,8]],1],["le-turntable","novg0vs0",1,[["center",1,0,1,2],["el",64],["value",1,0,1,8]],1,[["window:mousemove","handleMouseMove",0,1],["window:mouseup","handleMouseUp",0,1],["window:resize","handleWindowResize",0,1]]]]
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* LeKit: Core, es2017
|
|
3
|
-
* Built with http://stenciljs.com
|
|
4
|
-
*/
|
|
5
|
-
function e(e,t){return"sc-"+e.t+(t&&t!==l?"-"+t:"")}function t(e,t){return e+(t?"-h":"-s")}function n(e,t){let n,o,i=null,l=!1,s=!1,r=arguments.length;for(;r-- >2;)M.push(arguments[r]);for(;M.length>0;){let t=M.pop();if(t&&void 0!==t.pop)for(r=t.length;r--;)M.push(t[r]);else"boolean"==typeof t&&(t=null),(s="function"!=typeof e)&&(null==t?t="":"number"==typeof t?t=String(t):"string"!=typeof t&&(s=!1)),s&&l?i[i.length-1].vtext+=t:null===i?i=[s?{vtext:t}:t]:i.push(s?{vtext:t}:t),l=s}if(null!=t){if(t.className&&(t.class=t.className),"object"==typeof t.class){for(r in t.class)t.class[r]&&M.push(r);t.class=M.join(" "),M.length=0}null!=t.key&&(n=t.key),null!=t.name&&(o=t.name)}return"function"==typeof e?e(t,i||[],$):{vtag:e,vchildren:i,vtext:void 0,vattrs:t,vkey:n,vname:o,o:void 0,i:!1}}function o(e,t,n={}){let o=Array.isArray(t)?t:[t];const l=e.document,s=n.hydratedCssClass||"hydrated",r=n.exclude;r&&(o=o.filter(e=>-1===r.indexOf(e[0])));const c=o.map(e=>e[0]);if(c.length>0){const e=l.createElement("style");e.innerHTML=c.join()+"{visibility:hidden}."+s+"{visibility:inherit}",e.setAttribute("data-styles",""),l.head.insertBefore(e,l.head.firstChild)}const a=n.namespace||"LeKit";return D||(D=!0,function f(e,t,n){(e["s-apps"]=e["s-apps"]||[]).push(t),n.componentOnReady||(n.componentOnReady=function t(){function n(t){if(o.nodeName.indexOf("-")>0){for(var n=e["s-apps"],i=0,l=0;l<n.length;l++)if(e[n[l]].componentOnReady){if(e[n[l]].componentOnReady(o,t))return;i++}if(i<n.length)return void(e["s-cr"]=e["s-cr"]||[]).push([o,t])}t(null)}var o=this;return e.Promise?new e.Promise(n):{then:n}})}(e,a,e.HTMLElement.prototype)),applyPolyfills(e).then(()=>{if(!T[a]){const t={},r=n.resourcesUrl||"./";i(a,t,e,l,r,s),T[a]=R(a,t,e,l,r,s,o)}(function t(){o.forEach(t=>{let n;!function o(e){return/\{\s*\[native code\]\s*\}/.test(""+e)}(e.customElements.define)?(n=function(t){return e.HTMLElement.call(this,t)}).prototype=Object.create(e.HTMLElement.prototype,{constructor:{value:n,configurable:!0}}):n=new Function("w","return class extends w.HTMLElement{}")(e),T[a].l(function i(e){const t=g(e),n=t.s,o=u(e[0]);return t.s=(({mode:e,scoped:t})=>(function i(e,t,n){return import(`./build/${e}${t?".sc":""}.entry.js`).then(e=>e[n])})("string"==typeof n?n:n[e],t,o)),t}(t),n)})})()})}var i=function(){};function applyPolyfills(){return Promise.resolve()}const l="$",s={},r={enter:13,escape:27,space:32,tab:9,left:37,up:38,right:39,down:40},c=(t,n,o,i)=>{let s=o.t+l,r=o[s];if((2===o.u||1===o.u&&!t.v.p)&&(i["s-sc"]=r?e(o,i.mode):e(o)),r){let e=n.m.head;if(n.p)if(1===o.u)e=i.shadowRoot;else{const t=i.getRootNode();t.host&&(e=t)}let l=t.M.get(e);if(l||t.M.set(e,l={}),!l[s]){let t;{t=r.content.cloneNode(!0),l[s]=!0;const o=e.querySelectorAll("[data-styles]");n.g(e,t,o.length&&o[o.length-1].nextSibling||e.firstChild)}}}},a=e=>null!=e,f=e=>e.toLowerCase(),u=e=>f(e).split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(""),p="http://www.w3.org/1999/xlink",d=(e,t,n,o,i,l)=>{if("class"!==n||l)if("style"===n){for(const e in o)i&&null!=i[e]||(/-/.test(e)?t.style.removeProperty(e):t.style[e]="");for(const e in i)o&&i[e]===o[e]||(/-/.test(e)?t.style.setProperty(e,i[e]):t.style[e]=i[e])}else if("o"!==n[0]||"n"!==n[1]||!/[A-Z]/.test(n[2])||n in t)if("list"!==n&&"type"!==n&&!l&&(n in t||-1!==["object","function"].indexOf(typeof i)&&null!==i)){const o=e.k(t);o&&o.C&&o.C[n]?y(t,n,i):"ref"!==n&&(y(t,n,null==i?"":i),null!=i&&!1!==i||e.v.j(t,n))}else null!=i&&"key"!==n?((e,t,n,o="boolean"==typeof n,i)=>{i=t!==(t=t.replace(/^xlink\:?/,"")),null==n||o&&(!n||"false"===n)?i?e.removeAttributeNS(p,f(t)):e.removeAttribute(t):"function"!=typeof n&&(n=o?"":n.toString(),i?e.setAttributeNS(p,f(t),n):e.setAttribute(t,n))})(t,n,i):(l||e.v.A(t,n)&&(null==i||!1===i))&&e.v.j(t,n);else n=f(n)in t?f(n.substring(2)):f(n[2])+n.substring(3),i?i!==o&&e.v._(t,n,i,0):e.v.O(t,n,0);else if(o!==i){const e=v(o),n=v(i),l=e.filter(e=>!n.includes(e)),s=v(t.className).filter(e=>!l.includes(e)),r=n.filter(t=>!e.includes(t)&&!s.includes(t));s.push(...r),t.className=s.join(" ")}},v=e=>null==e||""===e?[]:e.trim().split(/\s+/),y=(e,t,n)=>{try{e[t]=n}catch(e){}},b=(e,t,n,o,i)=>{const l=11===n.o.nodeType&&n.o.host?n.o.host:n.o,r=t&&t.vattrs||s,c=n.vattrs||s;for(i in r)c&&null!=c[i]||null==r[i]||d(e,l,i,r[i],void 0,o,n.i);for(i in c)i in r&&c[i]===("value"===i||"checked"===i?l[i]:r[i])||d(e,l,i,r[i],c[i],o,n.i)};let m=!1;const h=(e,t)=>{e&&(e.vattrs&&e.vattrs.ref&&e.vattrs.ref(t?null:e.o),e.vchildren&&e.vchildren.forEach(e=>{h(e,t)}))},w=(e,t)=>{{let n=0,o=!1;const i=()=>t.performance.now(),l=!1!==e.asyncQueue,s=Promise.resolve(),r=[],c=[],a=[],f=[],u=t=>n=>{t.push(n),o||(o=!0,e.raf(v))},p=e=>{for(let t=0;t<e.length;t++)try{e[t](i())}catch(e){console.error(e)}e.length=0},d=(e,t)=>{let n,o=0;for(;o<e.length&&(n=i())<t;)try{e[o++](n)}catch(e){console.error(e)}o===e.length?e.length=0:0!==o&&e.splice(0,o)},v=()=>{n++,p(c);const t=l?i()+7*Math.ceil(n*(1/22)):Infinity;d(a,t),d(f,t),a.length>0&&(f.push(...a),a.length=0),(o=c.length+a.length+f.length>0)?e.raf(v):n=0};return e.raf||(e.raf=t.requestAnimationFrame.bind(t)),{tick(e){r.push(e),1===r.length&&s.then(()=>p(r))},read:u(c),write:u(a)}}},M=[],$={forEach:(e,t)=>e.forEach(t),map:(e,t)=>e.map(t)},g=(e,t,n)=>{const[o,i,,l,s,r]=e,c={color:{S:"color"}};if(l)for(t=0;t<l.length;t++)c[(n=l[t])[0]]={W:n[1],N:!!n[2],S:"string"==typeof n[3]?n[3]:n[3]?n[0]:0,P:n[4]};return{t:o,s:i,C:Object.assign({},c),u:s,L:r?r.map(k):void 0}},k=e=>({R:e[0],T:e[1],D:!!e[2],H:!!e[3],q:!!e[4]}),C=(e,t)=>a(t)&&"object"!=typeof t&&"function"!=typeof t?e===Boolean||4===e?"false"!==t&&(""===t||!!t):e===Number||8===e?parseFloat(t):e===String||2===e?t.toString():t:t,E=(e,t,n)=>{e.B.add(t),e.F.has(t)||(e.F.set(t,!0),e.I?e.queue.write(()=>j(e,t,n)):e.queue.tick(()=>j(e,t,n)))},j=async(e,o,i,l,s,r)=>{if(e.F.delete(o),!e.U.has(o)){if(!(s=e.Y.get(o))){if((r=e.Z.get(o))&&!r["s-rn"])return void(r["s-rc"]=r["s-rc"]||[]).push(()=>{j(e,o,i)});if(s=N(e,o,e.G.get(o),i))try{s.componentWillLoad&&await s.componentWillLoad()}catch(t){e.J(t,3,o)}}((e,o,i,l)=>{try{const s=o.K.host,r=o.K.encapsulation,c="shadow"===r&&e.v.p;let a,f=i;if(c&&(f=i.shadowRoot),!i["s-rn"]){e.V(e,e.v,o,i);const n=i["s-sc"];n&&(e.v.X(i,t(n,!0)),"scoped"===r&&e.v.X(i,t(n)))}if(l.render||l.hostData||s||a){e.ee=!0;const t=l.render&&l.render();let o;e.ee=!1;const s=n(null,o,t),a=e.te.get(i)||{};a.o=f,e.te.set(i,e.render(i,a,s,c,r))}i["s-rn"]=!0,i["s-rc"]&&(i["s-rc"].forEach(e=>e()),i["s-rc"]=null)}catch(t){e.ee=!1,e.J(t,8,i,!0)}})(e,e.k(o),o,s),o["s-init"]()}},A=(e,t,n,o,i,l,s,r,c)=>{if(t.type||t.state){const f=e.ne.get(n);t.state||(!t.attr||void 0!==f[i]&&""!==f[i]||(r=l&&l.oe)&&a(c=r[t.attr])&&(f[i]=C(t.type,c)),n.hasOwnProperty(i)&&(void 0===f[i]&&(f[i]=C(t.type,n[i])),"mode"!==i&&delete n[i])),o.hasOwnProperty(i)&&void 0===f[i]&&(f[i]=o[i]),t.watchCallbacks&&(f[W+i]=t.watchCallbacks.slice()),S(o,i,function f(t){return(t=e.ne.get(e.ie.get(this)))&&t[i]},function u(n,o){(o=e.ie.get(this))&&(t.state||t.mutable)&&_(e,o,i,n,s)})}else t.elementRef&&O(o,i,n)},_=(e,t,n,o,i,l,s)=>{(s=e.ne.get(t))||e.ne.set(t,s={});const r=s[n];if(o!==r&&(s[n]=o,l=e.Y.get(t))){{const e=s[W+n];if(e)for(let t=0;t<e.length;t++)try{l[e[t]].call(l,o,r,n)}catch(e){console.error(e)}}!e.ee&&t["s-rn"]&&E(e,t,i)}},O=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,value:n})},S=(e,t,n,o)=>{Object.defineProperty(e,t,{configurable:!0,get:n,set:o})},W="wc-",N=(e,t,n,o,i,l,s,r)=>{try{i=new(l=e.k(t).K),((e,t,n,o,i,l)=>{e.ie.set(o,n),e.ne.has(n)||e.ne.set(n,{}),Object.entries(Object.assign({color:{type:String}},t.properties,{mode:{type:String}})).forEach(([t,s])=>{A(e,s,n,o,t,i,l)})})(e,l,t,i,n,o);try{if(s=e.le.get(t)){for(r=0;r<s.length;r+=2)i[s[r]](s[r+1]);e.le.delete(t)}}catch(n){e.J(n,2,t)}}catch(n){i={},e.J(n,7,t,!0)}return e.Y.set(t,i),i},x=(e,t,n,o,i,l)=>{if(e.B.delete(t),(i=e.Z.get(t))&&((o=i["s-ld"])&&((n=o.indexOf(t))>-1&&o.splice(n,1),o.length||i["s-init"]&&i["s-init"]()),e.Z.delete(t)),e.se.length&&!e.B.size)for(;l=e.se.shift();)l()},P=(e,t,n,o)=>{t.forEach(([t,i])=>{3&i.W&&S(n,t,function n(){return(e.ne.get(this)||{})[t]},function n(l){_(e,this,t,C(i.P,l),o)})})},L=(e,t,n,o,i)=>{if(n.connectedCallback=function(){((e,t,n)=>{e.re.has(n)||(e.re.set(n,!0),function o(e,t){const n=e.k(t);n.L&&n.L.forEach(n=>{n.D||e.v._(t,n.R,function o(e,t,n,i){return o=>{(i=e.Y.get(t))?i[n](o):((i=e.le.get(t)||[]).push(n,o),e.le.set(t,i))}}(e,t,n.T),1,n.q,n.H)})}(e,n)),e.U.delete(n),e.ce.has(n)||(e.ae=!0,e.B.add(n),e.ce.set(n,!0),((e,t,n)=>{for(n=t;n=e.v.fe(n);)if(e.ue(n)){e.pe.has(t)||(e.Z.set(t,n),(n["s-ld"]=n["s-ld"]||[]).push(t));break}})(e,n),e.queue.tick(()=>{e.G.set(n,((e,t,n,o,i)=>(n.mode||(n.mode=e.de(n)),n["s-cr"]||e.ve(n,"ssrv")||e.p&&1===t.u||(n["s-cr"]=e.ye(""),n["s-cr"]["s-cn"]=!0,e.g(n,n["s-cr"],e.be(n)[0])),1===t.u&&e.p&&!n.shadowRoot&&e.me(n,{mode:"open"}),o={oe:{}},t.C&&Object.keys(t.C).forEach(l=>{(i=t.C[l].S)&&(o.oe[i]=e.ve(n,i))}),o))(e.v,t,n)),e.he(t,n)}))})(e,t,this)},n.disconnectedCallback=function(){((e,t)=>{!e.we&&((e,t)=>{for(;t;){if(!e.Me(t))return 9!==e.$e(t);t=e.Me(t)}})(e.v,t)&&(e.U.set(t,!0),x(e,t),h(e.te.get(t),!0),e.v.O(t),e.re.delete(t),[e.Z,e.ge,e.G].forEach(e=>e.delete(t)))})(e,this)},n["s-init"]=function(){((e,t,n,o,i,l,s)=>{if((i=e.Y.get(t))&&!e.U.has(t)&&(!t["s-ld"]||!t["s-ld"].length)){e.pe.set(t,!0),(s=e.ke.has(t))||(e.ke.set(t,!0),t["s-ld"]=void 0,e.v.X(t,n));try{h(e.te.get(t)),(l=e.ge.get(t))&&(l.forEach(e=>e(t)),e.ge.delete(t)),!s&&i.componentDidLoad?i.componentDidLoad():s&&i.componentDidUpdate&&i.componentDidUpdate()}catch(n){e.J(n,4,t)}x(e,t)}})(e,this,o)},n.forceUpdate=function(){E(e,this,i)},t.C){const o=Object.entries(t.C);{let e={};o.forEach(([t,{S:n}])=>{n&&(e[n]=t)}),e=Object.assign({},e),n.attributeChangedCallback=function(t,n,o){(function i(e,t,n,o){const i=e[f(n)];i&&(t[i]=(null!==o||"boolean"!=typeof t[i])&&o)})(e,this,t,o)}}P(e,o,n,i)}},R=(e,t,o,i,s,u)=>{const p=o.performance,d={html:{}},v=o[e]=o[e]||{},y=((e,t,n)=>{const o=new WeakMap,i={m:n,p:!!n.documentElement.attachShadow,Ce:!1,$e:e=>e.nodeType,Ee:e=>n.createElement(e),je:(e,t)=>n.createElementNS(e,t),ye:e=>n.createTextNode(e),Ae:e=>n.createComment(e),g:(e,t,n)=>e.insertBefore(t,n),_e:e=>e.remove(),Oe:(e,t)=>e.appendChild(t),X:(e,t)=>{e.classList.add(t)},be:e=>e.childNodes,Me:e=>e.parentNode,Se:e=>e.nextSibling,We:e=>e.previousSibling,Ne:e=>f(e.nodeName),xe:e=>e.textContent,Pe:(e,t)=>e.textContent=t,ve:(e,t)=>e.getAttribute(t),Le:(e,t,n)=>e.setAttribute(t,n),j:(e,t)=>e.removeAttribute(t),A:(e,t)=>e.hasAttribute(t),de:t=>t.getAttribute("mode")||(e.Context||{}).mode,Re:(e,o)=>"child"===o?e.firstElementChild:"parent"===o?i.fe(e):"body"===o?n.body:"document"===o?n:"window"===o?t:e,_:(t,n,l,s,c,a,f,u,p,d)=>{let v=t,y=l,b=o.get(t);d=n+s,b&&b[d]&&b[d](),"string"==typeof f?v=i.Re(t,f):"object"==typeof f?v=f:(p=n.split(":")).length>1&&(v=i.Re(t,p[0]),n=p[1]),v&&((p=n.split(".")).length>1&&(n=p[0],y=(e=>{e.keyCode===r[p[1]]&&l(e)})),u=i.Ce?{capture:!!c,passive:!!a}:!!c,e.ael(v,n,y,u),b||o.set(t,b={}),b[d]=(()=>{v&&e.rel(v,n,y,u),b[d]=null}))},O:(e,t,n,i)=>{(i=o.get(e))&&(t?i[t+n]&&i[t+n]():Object.keys(i).forEach(e=>{i[e]&&i[e]()}))},Te:(e,n,o,i)=>(i=new t.CustomEvent(n,o),e&&e.dispatchEvent(i),i),fe:(e,t)=>(t=i.Me(e))&&11===i.$e(t)?t.host:t,De:(e,t,n,o)=>e.setAttributeNS(t,n,o),me:(e,t)=>e.attachShadow(t)};e.ael||(e.ael=((e,t,n,o)=>e.addEventListener(t,n,o)),e.rel=((e,t,n,o)=>e.removeEventListener(t,n,o)));try{t.addEventListener("e",null,Object.defineProperty({},"passive",{get:()=>i.Ce=!0}))}catch(e){}return i})(v,o,i),h=y.m.documentElement,M=o["s-defined"]=o["s-defined"]||{},$={v:y,l:(e,t)=>{o.customElements.get(e.t)||(L($,d[e.t]=e,t.prototype,u,p),t.observedAttributes=Object.values(e.C).map(e=>e.S).filter(e=>!!e),o.customElements.define(e.t,t))},k:e=>d[y.Ne(e)],He:e=>t[e],isClient:!0,ue:e=>!(!M[y.Ne(e)]&&!$.k(e)),J:(e,t,n)=>console.error(e,t,n&&n.tagName),queue:t.queue=w(v,o),he:(e,t)=>{{const n=!y.p,o={mode:t.mode,scoped:n};e.s(o).then(n=>{try{e.K=n,function o(e,t,n,i,s){if(i){const n=t.t+(s||l);if(!t[n]){const o=e.Ee("template");t[n]=o,o.innerHTML=`<style>${i}</style>`,e.Oe(e.m.head,o)}}}(y,e,e.u,n.style,n.styleMode)}catch(t){console.error(t),e.K=class{}}E($,t,p)})}},ee:!1,I:!1,we:!1,V:c,Z:new WeakMap,M:new WeakMap,ce:new WeakMap,re:new WeakMap,ke:new WeakMap,pe:new WeakMap,ie:new WeakMap,G:new WeakMap,Y:new WeakMap,U:new WeakMap,F:new WeakMap,ge:new WeakMap,le:new WeakMap,te:new WeakMap,ne:new WeakMap,B:new Set,se:[]};return t.isServer=t.isPrerender=!(t.isClient=!0),t.window=o,t.location=o.location,t.document=i,t.resourcesUrl=t.publicPath=s,t.enableListener=((e,t,n,o,i)=>(function l(e,t,n,o,i,s){if(t){const l=e.ie.get(t),r=e.k(l);if(r&&r.L)if(o){const o=r.L.find(e=>e.R===n);o&&e.v._(l,n,e=>t[o.T](e),1,o.q,void 0===s?o.H:!!s,i)}else e.v.O(l,n,1)}})($,e,t,n,o,i)),v.h=n,v.Context=t,v.onReady=(()=>new Promise(e=>$.queue.write(()=>$.B.size?$.se.push(e):e()))),$.render=((e,t)=>{let n,o,i,l,s,r,c;const f=(i,p,d,v,y,h,w,M,$)=>{if(M=p.vchildren[d],n||(l=!0,"slot"===M.vtag&&(o&&t.X(v,o+"-s"),M.vchildren?M.qe=!0:M.Be=!0)),a(M.vtext))M.o=t.ye(M.vtext);else if(M.Be)M.o=t.ye("");else{if(h=M.o=m||"svg"===M.vtag?t.je("http://www.w3.org/2000/svg",M.vtag):t.Ee(M.qe?"slot-fb":M.vtag),e.ue(h)&&e.pe.delete(c),m="svg"===M.vtag||"foreignObject"!==M.vtag&&m,b(e,null,M,m),a(o)&&h["s-si"]!==o&&t.X(h,h["s-si"]=o),M.vchildren)for(y=0;y<M.vchildren.length;++y)(w=f(i,M,y,h))&&t.Oe(h,w);"svg"===M.vtag&&(m=!1)}return M.o["s-hn"]=r,(M.qe||M.Be)&&(M.o["s-sr"]=!0,M.o["s-cr"]=s,M.o["s-sn"]=M.vname||"",($=i&&i.vchildren&&i.vchildren[d])&&$.vtag===M.vtag&&i.o&&u(i.o)),M.o},u=(n,o,i,s)=>{e.we=!0;const c=t.be(n);for(i=c.length-1;i>=0;i--)(s=c[i])["s-hn"]!==r&&s["s-ol"]&&(t._e(s),t.g(h(s),s,y(s)),t._e(s["s-ol"]),s["s-ol"]=null,l=!0),o&&u(s,o);e.we=!1},p=(e,n,o,i,l,s,c,u)=>{const p=e["s-cr"];for((c=p&&t.Me(p)||e).shadowRoot&&t.Ne(c)===r&&(c=c.shadowRoot);l<=s;++l)i[l]&&(u=a(i[l].vtext)?t.ye(i[l].vtext):f(null,o,l,e))&&(i[l].o=u,t.g(c,u,y(n)))},d=(e,n,o,l)=>{for(;n<=o;++n)a(e[n])&&(l=e[n].o,i=!0,l["s-ol"]?t._e(l["s-ol"]):u(l,!0),t._e(l))},v=(e,t)=>e.vtag===t.vtag&&e.vkey===t.vkey&&("slot"!==e.vtag||e.vname===t.vname),y=e=>e&&e["s-ol"]?e["s-ol"]:e,h=e=>t.Me(e["s-ol"]?e["s-ol"]:e),w=(n,o,i)=>{const l=o.o=n.o,s=n.vchildren,r=o.vchildren;m=o.o&&a(t.fe(o.o))&&void 0!==o.o.ownerSVGElement,m="svg"===o.vtag||"foreignObject"!==o.vtag&&m,a(o.vtext)?(i=l["s-cr"])?t.Pe(t.Me(i),o.vtext):n.vtext!==o.vtext&&t.Pe(l,o.vtext):("slot"!==o.vtag&&b(e,n,o,m),a(s)&&a(r)?((e,n,o,i,l,s,r,c)=>{let b=0,m=0,M=n.length-1,$=n[0],g=n[M],k=i.length-1,C=i[0],E=i[k];for(;b<=M&&m<=k;)if(null==$)$=n[++b];else if(null==g)g=n[--M];else if(null==C)C=i[++m];else if(null==E)E=i[--k];else if(v($,C))w($,C),$=n[++b],C=i[++m];else if(v(g,E))w(g,E),g=n[--M],E=i[--k];else if(v($,E))"slot"!==$.vtag&&"slot"!==E.vtag||u(t.Me($.o)),w($,E),t.g(e,$.o,t.Se(g.o)),$=n[++b],E=i[--k];else if(v(g,C))"slot"!==$.vtag&&"slot"!==E.vtag||u(t.Me(g.o)),w(g,C),t.g(e,g.o,$.o),g=n[--M],C=i[++m];else{for(l=null,s=b;s<=M;++s)if(n[s]&&a(n[s].vkey)&&n[s].vkey===C.vkey){l=s;break}a(l)?((c=n[l]).vtag!==C.vtag?r=f(n&&n[m],o,l,e):(w(c,C),n[l]=void 0,r=c.o),C=i[++m]):(r=f(n&&n[m],o,m,e),C=i[++m]),r&&t.g(h($.o),r,y($.o))}b>M?p(e,null==i[k+1]?null:i[k+1].o,o,i,m,k):m>k&&d(n,b,M)})(l,s,o,r):a(r)?(a(n.vtext)&&t.Pe(l,""),p(l,null,o,r,0,r.length-1)):a(s)&&d(s,0,s.length-1)),m&&"svg"===o.vtag&&(m=!1)},M=(e,n,o,i,l,s,r,c)=>{for(i=0,l=(o=t.be(e)).length;i<l;i++)if(n=o[i],1===t.$e(n)){if(n["s-sr"])for(r=n["s-sn"],n.hidden=!1,s=0;s<l;s++)if(o[s]["s-hn"]!==n["s-hn"])if(c=t.$e(o[s]),""!==r){if(1===c&&r===t.ve(o[s],"slot")){n.hidden=!0;break}}else if(1===c||3===c&&""!==t.xe(o[s]).trim()){n.hidden=!0;break}M(n)}},$=[],g=(e,n,o,l,s,r,c,a,f,u)=>{for(s=0,r=(n=t.be(e)).length;s<r;s++){if((o=n[s])["s-sr"]&&(l=o["s-cr"]))for(a=t.be(t.Me(l)),f=o["s-sn"],c=a.length-1;c>=0;c--)(l=a[c])["s-cn"]||l["s-nr"]||l["s-hn"]===o["s-hn"]||((3===(u=t.$e(l))||8===u)&&""===f||1===u&&null===t.ve(l,"slot")&&""===f||1===u&&t.ve(l,"slot")===f)&&($.some(e=>e.Fe===l)||(i=!0,l["s-sn"]=f,$.push({Ie:o,Fe:l})));1===t.$e(o)&&g(o)}};return(a,f,u,p,d,v,y,b,m,h,k,C)=>{if(c=a,r=t.Ne(c),s=c["s-cr"],n=p,o=c["s-sc"],l=i=!1,w(f,u),l){for(g(u.o),y=0;y<$.length;y++)(b=$[y]).Fe["s-ol"]||((m=t.ye(""))["s-nr"]=b.Fe,t.g(t.Me(b.Fe),b.Fe["s-ol"]=m,b.Fe));for(e.we=!0,y=0;y<$.length;y++){for(b=$[y],k=t.Me(b.Ie),C=t.Se(b.Ie),m=b.Fe["s-ol"];m=t.We(m);)if((h=m["s-nr"])&&h&&h["s-sn"]===b.Fe["s-sn"]&&k===t.Me(h)&&(h=t.Se(h))&&h&&!h["s-nr"]){C=h;break}(!C&&k!==t.Me(b.Fe)||t.Se(b.Fe)!==C)&&b.Fe!==C&&(t._e(b.Fe),t.g(k,b.Fe,C))}e.we=!1}return i&&M(u.o),$.length=0,u}})($,y),h["s-ld"]=[],h["s-rn"]=!0,h["s-init"]=(()=>{$.pe.set(h,v.loaded=$.I=!0),y.Te(o,"appload",{detail:{namespace:e}})}),((e,t,n,o,i,l)=>{if(t.componentOnReady=((t,n)=>{if(!t.nodeName.includes("-"))return n(null),!1;const o=e.k(t);if(o)if(e.pe.has(t))n(t);else{const o=e.ge.get(t)||[];o.push(n),e.ge.set(t,o)}return!!o}),i){for(l=i.length-1;l>=0;l--)t.componentOnReady(i[l][0],i[l][1])&&i.splice(l,1);for(l=0;l<o.length;l++)if(!n[o[l]].componentOnReady)return;for(l=0;l<i.length;l++)i[l][1](null);i.length=0}})($,v,o,o["s-apps"],o["s-cr"]),v.initialized=!0,$},T={};let D=!1;export{o as defineCustomElement,n as h};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// LeKit: Custom Elements Define Library, ES Module/es2017 Target
|
|
3
|
-
|
|
4
|
-
import { defineCustomElement } from './le-kit.core.js';
|
|
5
|
-
import { COMPONENTS } from './le-kit.components.js';
|
|
6
|
-
|
|
7
|
-
export function defineCustomElements(win, opts) {
|
|
8
|
-
return defineCustomElement(win, COMPONENTS, opts);
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h}from"../le-kit.core.js";var LeRoundProgress=function(){function t(){this.value=0,this.padding=0}return t.prototype.updateValue=function(t){this.value=parseFloat(t)},t.prototype.updatePadding=function(t){this.padding=parseFloat(t),this.calcParams()},t.prototype.updateProgressBackgrounds=function(t){this.progressPaths=JSON.parse(t)},t.prototype.componentWillLoad=function(){"string"==typeof this.paths&&this.updateProgressBackgrounds(this.paths),this.calcParams()},t.prototype.calcParams=function(){var t=this.el.getBoundingClientRect().width,e=t-this.padding,r=Math.PI*e;this.params={width:t,diameter:e,circumference:r}},t.prototype.getViewBox=function(){return"0 0 "+this.params.width+" "+this.params.width},t.prototype.getPath=function(){return"M"+this.params.width/2+" "+(this.params.width-this.params.diameter)/2+" a "+this.params.diameter/2+" "+this.params.diameter/2+" 0 0 1 0 "+this.params.diameter+" a "+this.params.diameter/2+" "+this.params.diameter/2+" 0 0 1 0 -"+this.params.diameter},t.prototype.getStrokeDashArray=function(){return this.value/100*this.params.circumference+", "+this.params.circumference},t.prototype.getPaths=function(){var t=this;if(!this.progressPaths||!this.progressPaths.length)return null;var e=[];return this.progressPaths.forEach(function(r){e.push(h("path",{class:"round-progress--path",d:t.getPath(),stroke:r.color,"stroke-width":r.width,"stroke-dasharray":r.dasharray,"stroke-linecap":r.linecap}))}),h("svg",{viewBox:this.getViewBox(),class:"round-progress"},e)},t.prototype.render=function(){return h("div",{class:"round-progress--container"},this.getPaths(),h("svg",{viewBox:this.getViewBox(),class:"round-progress round-progress--progress"},h("path",{class:"round-progress--circle","stroke-dasharray":this.getStrokeDashArray(),d:this.getPath()})),h("slot",null))},Object.defineProperty(t,"is",{get:function(){return"le-round-progress"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{el:{elementRef:!0},padding:{type:Number,attr:"padding",watchCallbacks:["updatePadding"]},params:{state:!0},paths:{type:String,attr:"paths",watchCallbacks:["updateProgressBackgrounds"]},value:{type:Number,attr:"value",watchCallbacks:["updateValue"]}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return".round-progress--container{position:relative}.round-progress{position:absolute;top:0;left:0;right:0;bottom:0;display:block}.round-progress--progress{-webkit-filter:drop-shadow(var(--progress-shadow));filter:drop-shadow(var(--progress-shadow))}.round-progress--circle{fill:none;stroke:var(--progress-color,#999);stroke-width:var(--progress-width,4);stroke-linecap:var(--progress-linecap,round);-webkit-animation:progress--circle .5s ease-out forwards;animation:progress--circle .5s ease-out forwards;-webkit-transition:stroke-dasharray .5s ease-out;transition:stroke-dasharray .5s ease-out}\@-webkit-keyframes progress--circle{0%{stroke-dasharray:0 1000}}\@keyframes progress--circle{0%{stroke-dasharray:0 1000}}.round-progress--path{fill:none;stroke-linecap:round}"},enumerable:!0,configurable:!0}),t}();export{LeRoundProgress};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h}from"../le-kit.core.js";var LeRoundProgress=function(){function t(){this.value=0,this.padding=0}return t.prototype.updateValue=function(t){this.value=parseFloat(t)},t.prototype.updatePadding=function(t){this.padding=parseFloat(t),this.calcParams()},t.prototype.updateProgressBackgrounds=function(t){this.progressPaths=JSON.parse(t)},t.prototype.componentWillLoad=function(){"string"==typeof this.paths&&this.updateProgressBackgrounds(this.paths),this.calcParams()},t.prototype.calcParams=function(){var t=this.el.getBoundingClientRect().width,e=t-this.padding,r=Math.PI*e;this.params={width:t,diameter:e,circumference:r}},t.prototype.getViewBox=function(){return"0 0 "+this.params.width+" "+this.params.width},t.prototype.getPath=function(){return"M"+this.params.width/2+" "+(this.params.width-this.params.diameter)/2+" a "+this.params.diameter/2+" "+this.params.diameter/2+" 0 0 1 0 "+this.params.diameter+" a "+this.params.diameter/2+" "+this.params.diameter/2+" 0 0 1 0 -"+this.params.diameter},t.prototype.getStrokeDashArray=function(){return this.value/100*this.params.circumference+", "+this.params.circumference},t.prototype.getPaths=function(){var t=this;if(!this.progressPaths||!this.progressPaths.length)return null;var e=[];return this.progressPaths.forEach(function(r){e.push(h("path",{class:"round-progress--path",d:t.getPath(),stroke:r.color,"stroke-width":r.width,"stroke-dasharray":r.dasharray,"stroke-linecap":r.linecap}))}),h("svg",{viewBox:this.getViewBox(),class:"round-progress"},e)},t.prototype.render=function(){return h("div",{class:"round-progress--container"},this.getPaths(),h("svg",{viewBox:this.getViewBox(),class:"round-progress round-progress--progress"},h("path",{class:"round-progress--circle","stroke-dasharray":this.getStrokeDashArray(),d:this.getPath()})),h("slot",null))},Object.defineProperty(t,"is",{get:function(){return"le-round-progress"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{el:{elementRef:!0},padding:{type:Number,attr:"padding",watchCallbacks:["updatePadding"]},params:{state:!0},paths:{type:String,attr:"paths",watchCallbacks:["updateProgressBackgrounds"]},value:{type:Number,attr:"value",watchCallbacks:["updateValue"]}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return".round-progress--container.sc-le-round-progress{position:relative}.round-progress.sc-le-round-progress{position:absolute;top:0;left:0;right:0;bottom:0;display:block}.round-progress--progress.sc-le-round-progress{-webkit-filter:drop-shadow(var(--progress-shadow));filter:drop-shadow(var(--progress-shadow))}.round-progress--circle.sc-le-round-progress{fill:none;stroke:var(--progress-color,#999);stroke-width:var(--progress-width,4);stroke-linecap:var(--progress-linecap,round);-webkit-animation:progress--circle .5s ease-out forwards;animation:progress--circle .5s ease-out forwards;-webkit-transition:stroke-dasharray .5s ease-out;transition:stroke-dasharray .5s ease-out}\@-webkit-keyframes progress--circle{0%{stroke-dasharray:0 1000}}\@keyframes progress--circle{0%{stroke-dasharray:0 1000}}.round-progress--path.sc-le-round-progress{fill:none;stroke-linecap:round}"},enumerable:!0,configurable:!0}),t}();export{LeRoundProgress};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h}from"../le-kit.core.js";var LeTurntable=function(){function e(){this.center="center",this.value=0,this.rotating=!1,this.currentAngle=0}return e.prototype.updateValue=function(e){this.rotating||(this.currentAngle=parseFloat(e),this.setAngle(this.currentAngle))},e.prototype.handleMouseDown=function(e){return this.rotating=!0,this.startAngle=this.getAngle(e.pageX,e.pageY),e.preventDefault(),e.cancelBubble=!0,!1},e.prototype.handleMouseMove=function(e){if(this.rotating)return this.setAngle(this.currentAngle+(this.getAngle(e.pageX,e.pageY)-this.startAngle)),!1},e.prototype.handleMouseUp=function(e){if(this.rotating){var t=this.currentAngle+(this.getAngle(e.pageX,e.pageY)-this.startAngle);return this.setAngle(t),this.currentAngle=t,this.rotating=!1,!1}},e.prototype.handleWindowResize=function(){this.getTransformOrigin()},e.prototype.componentDidLoad=function(){this.el.style.transformOrigin=this.center,this.currentAngle=this.value,this.getTransformOrigin(),this.setAngle(this.currentAngle)},e.prototype.componentDidUpdate=function(){this.getTransformOrigin()},e.prototype.getTransformOrigin=function(){var e;e=window.getComputedStyle(this.el,null).transformOrigin.split(" ").map(function(e){return Math.round(parseFloat(e))}),this.centerX=e[0],this.centerY=e[1];var t=null,n=((t=document.documentElement)||(t=document.body.parentNode))&&"number"==typeof t.scrollLeft?t:document.body,r=this.el.getBoundingClientRect();this.pageX=Math.round(r.left+n.scrollLeft),this.pageY=Math.round(r.top+n.scrollTop)},e.prototype.getAngle=function(e,t){return Math.round(180*Math.atan2(t-this.pageY-this.centerY,e-this.pageX-this.centerX)/Math.PI*100)/100},e.prototype.setAngle=function(e){this.el.style.transform="rotate("+e+"deg)"},e.prototype.render=function(){return h("div",{class:"turntable",onMouseDown:this.handleMouseDown.bind(this)},h("slot",null))},Object.defineProperty(e,"is",{get:function(){return"le-turntable"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"properties",{get:function(){return{center:{type:String,attr:"center"},el:{elementRef:!0},value:{type:Number,attr:"value",watchCallbacks:["updateValue"]}}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"listeners",{get:function(){return[{name:"window:mousemove",method:"handleMouseMove",passive:!0},{name:"window:mouseup",method:"handleMouseUp",passive:!0},{name:"window:resize",method:"handleWindowResize",passive:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return":host{display:block;cursor:-webkit-grab;cursor:grab}div.turntable{width:100%;height:100%;padding:1px}"},enumerable:!0,configurable:!0}),e}();export{LeTurntable};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h}from"../le-kit.core.js";var LeTurntable=function(){function e(){this.center="center",this.value=0,this.rotating=!1,this.currentAngle=0}return e.prototype.updateValue=function(e){this.rotating||(this.currentAngle=parseFloat(e),this.setAngle(this.currentAngle))},e.prototype.handleMouseDown=function(e){return this.rotating=!0,this.startAngle=this.getAngle(e.pageX,e.pageY),e.preventDefault(),e.cancelBubble=!0,!1},e.prototype.handleMouseMove=function(e){if(this.rotating)return this.setAngle(this.currentAngle+(this.getAngle(e.pageX,e.pageY)-this.startAngle)),!1},e.prototype.handleMouseUp=function(e){if(this.rotating){var t=this.currentAngle+(this.getAngle(e.pageX,e.pageY)-this.startAngle);return this.setAngle(t),this.currentAngle=t,this.rotating=!1,!1}},e.prototype.handleWindowResize=function(){this.getTransformOrigin()},e.prototype.componentDidLoad=function(){this.el.style.transformOrigin=this.center,this.currentAngle=this.value,this.getTransformOrigin(),this.setAngle(this.currentAngle)},e.prototype.componentDidUpdate=function(){this.getTransformOrigin()},e.prototype.getTransformOrigin=function(){var e;e=window.getComputedStyle(this.el,null).transformOrigin.split(" ").map(function(e){return Math.round(parseFloat(e))}),this.centerX=e[0],this.centerY=e[1];var t=null,n=((t=document.documentElement)||(t=document.body.parentNode))&&"number"==typeof t.scrollLeft?t:document.body,r=this.el.getBoundingClientRect();this.pageX=Math.round(r.left+n.scrollLeft),this.pageY=Math.round(r.top+n.scrollTop)},e.prototype.getAngle=function(e,t){return Math.round(180*Math.atan2(t-this.pageY-this.centerY,e-this.pageX-this.centerX)/Math.PI*100)/100},e.prototype.setAngle=function(e){this.el.style.transform="rotate("+e+"deg)"},e.prototype.render=function(){return h("div",{class:"turntable",onMouseDown:this.handleMouseDown.bind(this)},h("slot",null))},Object.defineProperty(e,"is",{get:function(){return"le-turntable"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"properties",{get:function(){return{center:{type:String,attr:"center"},el:{elementRef:!0},value:{type:Number,attr:"value",watchCallbacks:["updateValue"]}}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"listeners",{get:function(){return[{name:"window:mousemove",method:"handleMouseMove",passive:!0},{name:"window:mouseup",method:"handleMouseUp",passive:!0},{name:"window:resize",method:"handleWindowResize",passive:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return".sc-le-turntable-h{display:block;cursor:-webkit-grab;cursor:grab}div.turntable.sc-le-turntable{width:100%;height:100%;padding:1px}"},enumerable:!0,configurable:!0}),e}();export{LeTurntable};
|
package/dist/esm/es5/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// LeKit: ES Module
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// LeKit: Host Data, ES Module/es5 Target
|
|
2
|
-
export var COMPONENTS = [["le-round-progress","jqoqzji9",1,[["el",64],["padding",1,0,1,8],["params",16],["paths",1,0,1,2],["value",1,0,1,8]],1],["le-turntable","novg0vs0",1,[["center",1,0,1,2],["el",64],["value",1,0,1,8]],1,[["window:mousemove","handleMouseMove",0,1],["window:mouseup","handleMouseUp",0,1],["window:resize","handleWindowResize",0,1]]]]
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* LeKit: Core, es5
|
|
3
|
-
* Built with http://stenciljs.com
|
|
4
|
-
*/
|
|
5
|
-
function n(n,t){return"sc-"+n.t+(t&&t!==c?"-"+t:"")}function t(n,t){return n+(t?"-h":"-s")}function e(n,t){for(var e,r,i=null,o=!1,u=!1,f=arguments.length;f-- >2;)k.push(arguments[f]);for(;k.length>0;){var c=k.pop();if(c&&void 0!==c.pop)for(f=c.length;f--;)k.push(c[f]);else"boolean"==typeof c&&(c=null),(u="function"!=typeof n)&&(null==c?c="":"number"==typeof c?c=String(c):"string"!=typeof c&&(u=!1)),u&&o?i[i.length-1].vtext+=c:null===i?i=[u?{vtext:c}:c]:i.push(u?{vtext:c}:c),o=u}if(null!=t){if(t.className&&(t.class=t.className),"object"==typeof t.class){for(f in t.class)t.class[f]&&k.push(f);t.class=k.join(" "),k.length=0}null!=t.key&&(e=t.key),null!=t.name&&(r=t.name)}return"function"==typeof n?n(t,i||[],$):{vtag:n,vchildren:i,vtext:void 0,vattrs:t,vkey:e,vname:r,i:void 0,o:!1}}function r(n,t,e){void 0===e&&(e={});var r=Array.isArray(t)?t:[t],i=n.document,o=e.hydratedCssClass||"hydrated",u=e.exclude;u&&(r=r.filter(function(n){return-1===u.indexOf(n[0])}));var c=r.map(function(n){return n[0]});if(c.length>0){var a=i.createElement("style");a.innerHTML=c.join()+"{visibility:hidden}."+o+"{visibility:inherit}",a.setAttribute("data-styles",""),i.head.insertBefore(a,i.head.firstChild)}var s=e.namespace||"LeKit";return D||(D=!0,function l(n,t,e){(n["s-apps"]=n["s-apps"]||[]).push(t),e.componentOnReady||(e.componentOnReady=function t(){function e(t){if(r.nodeName.indexOf("-")>0){for(var e=n["s-apps"],i=0,o=0;o<e.length;o++)if(n[e[o]].componentOnReady){if(n[e[o]].componentOnReady(r,t))return;i++}if(i<e.length)return void(n["s-cr"]=n["s-cr"]||[]).push([r,t])}t(null)}var r=this;return n.Promise?new n.Promise(e):{then:e}})}(n,s,n.HTMLElement.prototype)),applyPolyfills(n).then(function(){function t(){r.forEach(function(t){var e;!function r(n){return/\{\s*\[native code\]\s*\}/.test(""+n)}(n.customElements.define)?(e=function(t){return n.HTMLElement.call(this,t)}).prototype=Object.create(n.HTMLElement.prototype,{constructor:{value:e,configurable:!0}}):e=new Function("w","return class extends w.HTMLElement{}")(n),L[s].u(function i(n){var t=A(n),e=t.s,r=d(n[0]);return t.s=function(n){var t=n.mode,i=n.scoped;return function o(n,t,e){return import("./build/"+n+(t?".sc":"")+".entry.js").then(function(n){return n[e]})}("string"==typeof e?e:e[t],i,r)},t}(t),e)})}if(!L[s]){var u={},c=e.resourcesUrl||"./";f(s,u,n,i,c,o),L[s]=R(s,u,n,i,c,o,r)}if(window.customStyleShim)return L[s].l=window.customStyleShim,L[s].l.initShim().then(t);t()})}this&&this.v;var i=this&&this.p||function(n,t,e,r){return new(e||(e=Promise))(function(i,o){function u(n){try{c(r.next(n))}catch(n){o(n)}}function f(n){try{c(r.throw(n))}catch(n){o(n)}}function c(n){n.done?i(n.value):new e(function(t){t(n.value)}).then(u,f)}c((r=r.apply(n,t||[])).next())})},o=this&&this.m||function(n,t){function e(e){return function(u){return function c(e){if(r)throw new TypeError("Generator is already executing.");for(;f;)try{if(r=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return f.label++,{value:e[1],done:!1};case 5:f.label++,i=e[1],e=[0];continue;case 7:e=f.g.pop(),f.M.pop();continue;default:if(!(o=(o=f.M).length>0&&o[o.length-1])&&(6===e[0]||2===e[0])){f=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){f.label=e[1];break}if(6===e[0]&&f.label<o[1]){f.label=o[1],o=e;break}if(o&&f.label<o[2]){f.label=o[2],f.g.push(e);break}o[2]&&f.g.pop(),f.M.pop();continue}e=t.call(n,f)}catch(n){e=[6,n],i=0}finally{r=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}var r,i,o,u,f={label:0,j:function(){if(1&o[0])throw o[1];return o[1]},M:[],g:[]};return u={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u},u=this,f=function(){};function applyPolyfills(n){n.k=function(){function t(){var n=setTimeout;return function(){return n(e,1)}}function e(){for(var n=0;n<b;n+=2)(0,S[n])(S[n+1]),S[n]=void 0,S[n+1]=void 0;b=0}function r(n,t){var e=this,r=new this.constructor(o);void 0===r[_]&&h(r);var i=e.A;if(i){var u=arguments[i-1];M(function(){return d(i,r,u,e.C)})}else v(e,r,n,t);return r}function i(n){if(n&&"object"==typeof n&&n.constructor===this)return n;var t=new this(o);return c(t,n),t}function o(){}function u(n){try{return n.then}catch(n){return P.error=n,P}}function f(n,t,e){t.constructor===n.constructor&&e===r&&t.constructor.resolve===i?function(n,t){t.A===W?s(n,t.C):t.A===x?l(n,t.C):v(t,void 0,function(t){return c(n,t)},function(t){return l(n,t)})}(n,t):e===P?(l(n,P.error),P.error=null):void 0===e?s(n,t):"function"==typeof e?function(n,t,e){M(function(n){var r=!1,i=function(n,t,e,r){try{n.call(t,e,r)}catch(n){return n}}(e,t,function(e){r||(r=!0,t!==e?c(n,e):s(n,e))},function(t){r||(r=!0,l(n,t))},n.S);!r&&i&&(r=!0,l(n,i))},n)}(n,t,e):s(n,t)}function c(n,t){if(n===t)l(n,new TypeError("cannot resolve promise w/ itself"));else{var e=typeof t;null===t||"object"!==e&&"function"!==e?s(n,t):f(n,t,u(t))}}function a(n){n.O&&n.O(n.C),p(n)}function s(n,t){n.A===T&&(n.C=t,n.A=W,0!==n._.length&&M(p,n))}function l(n,t){n.A===T&&(n.A=x,n.C=t,M(a,n))}function v(n,t,e,r){var i=n._,o=i.length;n.O=null,i[o]=t,i[o+W]=e,i[o+x]=r,0===o&&n.A&&M(p,n)}function p(n){var t=n._,e=n.A;if(0!==t.length){for(var r,i,o=n.C,u=0;u<t.length;u+=3)r=t[u],i=t[u+e],r?d(e,r,i,o):i(o);n._.length=0}}function d(n,t,e,r){var i="function"==typeof e,o=void 0,u=void 0,f=void 0,a=void 0;if(i){try{o=e(r)}catch(n){P.error=n,o=P}if(o===P?(a=!0,u=o.error,o.error=null):f=!0,t===o)return void l(t,new TypeError("Cannot return same promise"))}else o=r,f=!0;t.A===T&&(i&&f?c(t,o):a?l(t,u):n===W?s(t,o):n===x&&l(t,o))}function h(n){n[_]=N++,n.A=void 0,n.C=void 0,n._=[]}var y,w=Array.isArray?Array.isArray:function(n){return"[object Array]"===Object.prototype.toString.call(n)},b=0,m=void 0,g=void 0,M=function(n,t){S[b]=n,S[b+1]=t,2===(b+=2)&&(g?g(e):O())},j=(y=void 0!==n?n:void 0)||{},k=j.MutationObserver||j.WebKitMutationObserver;j="undefined"==typeof self;var $,A,E,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,S=Array(1e3),O=void 0;O=k?($=0,A=new k(e),E=document.createTextNode(""),A.observe(E,{characterData:!0}),function(){E.data=$=++$%2}):C?function(){var n=new MessageChannel;return n.port1.onmessage=e,function(){return n.port2.postMessage(0)}}():void 0===y&&"function"==typeof require?function(){try{var n=Function("return this")().require("vertx");return void 0!==(m=n.T||n.W)?function(){m(e)}:t()}catch(n){return t()}}():t();var _=Math.random().toString(36).substring(2),T=void 0,W=1,x=2,P={error:null},N=0,R=function(){function n(n,t){this.P=n,this.N=new n(o),this.N[_]||h(this.N),w(t)?(this.R=this.length=t.length,this.C=Array(this.length),0===this.length?s(this.N,this.C):(this.length=this.length||0,this.L(t),0===this.R&&s(this.N,this.C))):l(this.N,Error("Array Methods must be provided an Array"))}return n.prototype.L=function(n){for(var t=0;this.A===T&&t<n.length;t++)this.D(n[t],t)},n.prototype.D=function(n,t){var e=this.P,c=e.resolve;c===i?(c=u(n))===r&&n.A!==T?this.F(n.A,t,n.C):"function"!=typeof c?(this.R--,this.C[t]=n):e===L?(f(e=new e(o),n,c),this.H(e,t)):this.H(new e(function(t){return t(n)}),t):this.H(c(n),t)},n.prototype.F=function(n,t,e){var r=this.N;r.A===T&&(this.R--,n===x?l(r,e):this.C[t]=e),0===this.R&&s(r,this.C)},n.prototype.H=function(n,t){var e=this;v(n,void 0,function(n){return e.F(W,t,n)},function(n){return e.F(x,t,n)})},n}(),L=function(){function n(t){if(this[_]=N++,this.C=this.A=void 0,this._=[],o!==t){if("function"!=typeof t)throw new TypeError("Must pass a resolver fn as 1st arg");if(!(this instanceof n))throw new TypeError("Failed to construct 'Promise': Use the 'new' operator.");!function(n,t){try{t(function(t){c(n,t)},function(t){l(n,t)})}catch(t){l(n,t)}}(this,t)}}return n.prototype.catch=function(n){return this.then(null,n)},n.prototype.finally=function(n){var t=this.constructor;return this.then(function(e){return t.resolve(n()).then(function(){return e})},function(e){return t.resolve(n()).then(function(){throw e})})},n}();return L.prototype.then=r,L.all=function(n){return new R(this,n).N},L.race=function(n){var t=this;return w(n)?new t(function(e,r){for(var i=n.length,o=0;o<i;o++)t.resolve(n[o]).then(e,r)}):new t(function(n,t){return t(new TypeError("Must pass array to race"))})},L.resolve=i,L.reject=function(n){var t=new this(o);return l(t,n),t},L.q=function(n){g=n},L.U=function(n){M=n},L.B=M,L.I=function(){var n=void 0;if("undefined"!=typeof global)n=global;else if("undefined"!=typeof self)n=self;else try{n=Function("return this")()}catch(n){throw Error("polyfill failed")}var t=n.Promise;if(t){var e=null;try{e=Object.prototype.toString.call(t.resolve())}catch(n){}if("[object Promise]"===e&&!t.cast)return}n.Promise=L},L.Promise=L,L.I(),L}();var t=[];return n.customElements&&(!n.Element||n.Element.prototype.closest&&n.Element.prototype.matches&&n.Element.prototype.remove)||t.push(import("./polyfills/dom.js")),"function"==typeof Object.assign&&Object.entries||t.push(import("./polyfills/object.js")),Array.prototype.find&&Array.prototype.includes||t.push(import("./polyfills/array.js")),String.prototype.startsWith&&String.prototype.endsWith||t.push(import("./polyfills/string.js")),n.fetch||t.push(import("./polyfills/fetch.js")),"undefined"!=typeof WeakMap&&n.CSS&&n.CSS.supports&&n.CSS.supports("color","var(--c)")||t.push(import("./polyfills/css-shim.js")),function e(){try{var n=new URL("b","http://a");return n.pathname="c%20d","http://a/c%20d"===n.href&&n.searchParams}catch(n){return!1}}||t.push(import("./polyfills/url.js")),Promise.all(t).then(function(t){t.forEach(function(t){try{t.applyPolyfill(n,n.document)}catch(n){console.error(n)}})})}var c="$",a={},s={enter:13,escape:27,space:32,tab:9,left:37,up:38,right:39,down:40},l=function(t,e,r,i){var o=r.t+c,u=r[o];if((2===r.G||1===r.G&&!t.Z.Y)&&(i["s-sc"]=u?n(r,i.mode):n(r)),u){var f=e.J.head;if(e.Y)if(1===r.G)f=i.shadowRoot;else{var a=i.getRootNode();a.host&&(f=a)}var s=t.K.get(f);if(s||t.K.set(f,s={}),!s[o]){var l=void 0;if(t.l?l=t.l.createHostStyle(i,o,u):((l=e.V("style")).innerHTML=u,s[o]=!0),l){var v=f.querySelectorAll("[data-styles]");e.X(f,l,v.length&&v[v.length-1].nextSibling||f.firstChild)}}}},v=function(n){return null!=n},p=function(n){return n.toLowerCase()},d=function(n){return p(n).split("-").map(function(n){return n.charAt(0).toUpperCase()+n.slice(1)}).join("")},h="http://www.w3.org/1999/xlink",y=function(n,t,e,r,i,o){if("class"!==e||o)if("style"===e){for(var u in r)i&&null!=i[u]||(/-/.test(u)?t.style.removeProperty(u):t.style[u]="");for(var u in i)r&&i[u]===r[u]||(/-/.test(u)?t.style.setProperty(u,i[u]):t.style[u]=i[u])}else if("o"!==e[0]||"n"!==e[1]||!/[A-Z]/.test(e[2])||e in t)if("list"!==e&&"type"!==e&&!o&&(e in t||-1!==["object","function"].indexOf(typeof i)&&null!==i)){var f=n.nn(t);f&&f.tn&&f.tn[e]?b(t,e,i):"ref"!==e&&(b(t,e,null==i?"":i),null!=i&&!1!==i||n.Z.en(t,e))}else null!=i&&"key"!==e?function(n,t,e,r,i){void 0===r&&(r="boolean"==typeof e),i=t!==(t=t.replace(/^xlink\:?/,"")),null==e||r&&(!e||"false"===e)?i?n.removeAttributeNS(h,p(t)):n.removeAttribute(t):"function"!=typeof e&&(e=r?"":e.toString(),i?n.setAttributeNS(h,p(t),e):n.setAttribute(t,e))}(t,e,i):(o||n.Z.rn(t,e)&&(null==i||!1===i))&&n.Z.en(t,e);else e=p(e)in t?p(e.substring(2)):p(e[2])+e.substring(3),i?i!==r&&n.Z.in(t,e,i,0):n.Z.on(t,e,0);else if(r!==i){var c=w(r),a=w(i),s=c.filter(function(n){return!a.includes(n)}),l=w(t.className).filter(function(n){return!s.includes(n)}),v=a.filter(function(n){return!c.includes(n)&&!l.includes(n)});l.push.apply(l,v),t.className=l.join(" ")}},w=function(n){return null==n||""===n?[]:n.trim().split(/\s+/)},b=function(n,t,e){try{n[t]=e}catch(n){}},m=function(n,t,e,r,i){var o=11===e.i.nodeType&&e.i.host?e.i.host:e.i,u=t&&t.vattrs||a,f=e.vattrs||a;for(i in u)f&&null!=f[i]||null==u[i]||y(n,o,i,u[i],void 0,r,e.o);for(i in f)i in u&&f[i]===("value"===i||"checked"===i?o[i]:u[i])||y(n,o,i,u[i],f[i],r,e.o)},g=!1,M=function(n,t){n&&(n.vattrs&&n.vattrs.ref&&n.vattrs.ref(t?null:n.i),n.vchildren&&n.vchildren.forEach(function(n){M(n,t)}))},j=function(n,t){var e=0,r=!1,i=function(){return t.performance.now()},o=!1!==n.asyncQueue,u=Promise.resolve(),f=[],c=[],a=[],s=[],l=function(t){return function(e){t.push(e),r||(r=!0,n.raf(d))}},v=function(n){for(var t=0;t<n.length;t++)try{n[t](i())}catch(n){console.error(n)}n.length=0},p=function(n,t){for(var e,r=0;r<n.length&&(e=i())<t;)try{n[r++](e)}catch(n){console.error(n)}r===n.length?n.length=0:0!==r&&n.splice(0,r)},d=function(){e++,v(c);var t=o?i()+7*Math.ceil(e*(1/22)):Infinity;p(a,t),p(s,t),a.length>0&&(s.push.apply(s,a),a.length=0),(r=c.length+a.length+s.length>0)?n.raf(d):e=0};return n.raf||(n.raf=t.requestAnimationFrame.bind(t)),{tick:function(n){f.push(n),1===f.length&&u.then(function(){return v(f)})},read:l(c),write:l(a)}},k=[],$={forEach:function(n,t){return n.forEach(t)},map:function(n,t){return n.map(t)}},A=function(n,t,e){var r=n[0],i=n[1],o=n[3],u=n[4],f=n[5],c={color:{un:"color"}};if(o)for(t=0;t<o.length;t++)c[(e=o[t])[0]]={fn:e[1],cn:!!e[2],un:"string"==typeof e[3]?e[3]:e[3]?e[0]:0,an:e[4]};return{t:r,s:i,tn:Object.assign({},c),G:u,sn:f?f.map(E):void 0}},E=function(n){return{ln:n[0],vn:n[1],pn:!!n[2],dn:!!n[3],hn:!!n[4]}},C=function(n,t){return v(t)&&"object"!=typeof t&&"function"!=typeof t?n===Boolean||4===n?"false"!==t&&(""===t||!!t):n===Number||8===n?parseFloat(t):n===String||2===n?t.toString():t:t},S=function(n,t,e){n.yn.add(t),n.wn.has(t)||(n.wn.set(t,!0),n.bn?n.queue.write(function(){return O(n,t,e)}):n.queue.tick(function(){return O(n,t,e)}))},O=function(n,r,f,c,a,s){return i(u,void 0,void 0,function(){var i,u;return o(this,function(o){switch(o.label){case 0:if(n.wn.delete(r),n.mn.has(r))return[3,12];if(a=n.gn.get(r))return[3,6];if((s=n.Mn.get(r))&&!s["s-rn"])return(s["s-rc"]=s["s-rc"]||[]).push(function(){O(n,r,f)}),[2];if(!(a=x(n,r,n.jn.get(r),f)))return[3,5];o.label=1;case 1:return o.M.push([1,4,,5]),a.componentWillLoad?[4,a.componentWillLoad()]:[3,3];case 2:o.j(),o.label=3;case 3:return[3,5];case 4:return i=o.j(),n.kn(i,3,r),[3,5];case 5:case 6:return[3,11];case 7:return o.M.push([7,10,,11]),a.componentWillUpdate?[4,a.componentWillUpdate()]:[3,9];case 8:o.j(),o.label=9;case 9:return[3,11];case 10:return u=o.j(),n.kn(u,5,r),[3,11];case 11:(function(n,r,i,o){try{var u=r.$n.host,f=r.$n.encapsulation,c="shadow"===f&&n.Z.Y,a=i;if(c&&(a=i.shadowRoot),!i["s-rn"]){n.An(n,n.Z,r,i);var s=i["s-sc"];s&&(n.Z.En(i,t(s,!0)),"scoped"===f&&n.Z.En(i,t(s)))}if(o.render||o.hostData||u){n.Cn=!0;var l=o.render&&o.render();n.Cn=!1;var v=e(null,void 0,l),p=n.Sn.get(i)||{};p.i=a,n.Sn.set(i,n.render(i,p,v,c,f))}n.l&&n.l.updateHost(i),i["s-rn"]=!0,i["s-rc"]&&(i["s-rc"].forEach(function(n){return n()}),i["s-rc"]=null)}catch(t){n.Cn=!1,n.kn(t,8,i,!0)}})(n,n.nn(r),r,a),r["s-init"](),o.label=12;case 12:return[2]}})})},_=function(n,t,e,r,i,o,u){(u=n.On.get(t))||n.On.set(t,u={});var f=u[e];if(r!==f&&(u[e]=r,o=n.gn.get(t))){var c=u[W+e];if(c)for(var a=0;a<c.length;a++)try{o[c[a]].call(o,r,f,e)}catch(n){console.error(n)}!n.Cn&&t["s-rn"]&&S(n,t,i)}},T=function(n,t,e,r){Object.defineProperty(n,t,{configurable:!0,get:e,set:r})},W="wc-",x=function(n,t,e,r,i,o,u,f){try{i=new(o=n.nn(t).$n),function(n,t,e,r,i,o){n._n.set(r,e),n.On.has(e)||n.On.set(e,{}),Object.entries(Object.assign({color:{type:String}},t.properties,{mode:{type:String}})).forEach(function(t){var u=t[0],f=t[1];(function(n,t,e,r,i,o,u,f,c){if(t.type||t.state){var a=n.On.get(e);t.state||(!t.attr||void 0!==a[i]&&""!==a[i]||(f=o&&o.Tn)&&v(c=f[t.attr])&&(a[i]=C(t.type,c)),e.hasOwnProperty(i)&&(void 0===a[i]&&(a[i]=C(t.type,e[i])),"mode"!==i&&delete e[i])),r.hasOwnProperty(i)&&void 0===a[i]&&(a[i]=r[i]),t.watchCallbacks&&(a[W+i]=t.watchCallbacks.slice()),T(r,i,function s(t){return(t=n.On.get(n._n.get(this)))&&t[i]},function l(e,r){(r=n._n.get(this))&&(t.state||t.mutable)&&_(n,r,i,e,u)})}else t.elementRef&&(p=r,d=i,h=e,Object.defineProperty(p,d,{configurable:!0,value:h}));var p,d,h})(n,f,e,r,u,i,o)})}(n,o,t,i,e,r);try{if(u=n.Wn.get(t)){for(f=0;f<u.length;f+=2)i[u[f]](u[f+1]);n.Wn.delete(t)}}catch(e){n.kn(e,2,t)}}catch(e){i={},n.kn(e,7,t,!0)}return n.gn.set(t,i),i},P=function(n,t){for(var e=0;e<t.childNodes.length;e++){var r=t.childNodes[e];if(1===r.nodeType){if(n.nn(r)&&!n.xn.has(r))return!1;if(!P(n,r))return!1}}return!0},N=function(n,t,e,r,i,o){if(n.yn.delete(t),(i=n.Mn.get(t))&&((r=i["s-ld"])&&((e=r.indexOf(t))>-1&&r.splice(e,1),r.length||i["s-init"]&&i["s-init"]()),n.Mn.delete(t)),n.Pn.length&&!n.yn.size)for(;o=n.Pn.shift();)o()},R=function(n,t,r,i,o,u){var f=r.performance,a={html:{}},d=r[n]=r[n]||{},h=function(n,t,e){var r=new WeakMap,i={J:e,Y:!!e.documentElement.attachShadow,Nn:!1,Rn:function(n){return n.nodeType},V:function(n){return e.createElement(n)},Ln:function(n,t){return e.createElementNS(n,t)},Dn:function(n){return e.createTextNode(n)},Fn:function(n){return e.createComment(n)},X:function(n,t,e){return n.insertBefore(t,e)},Hn:function(n){return n.remove()},qn:function(n,t){return n.appendChild(t)},En:function(n,t){if(n.classList)n.classList.add(t);else if("svg"===n.nodeName.toLowerCase()){var e=n.getAttribute("class")||"";e.split(" ").includes(t)||(e+=" "+t),n.setAttribute("class",e.trim())}},Un:function(n){return n.childNodes},Bn:function(n){return n.parentNode},In:function(n){return n.nextSibling},Gn:function(n){return n.previousSibling},Qn:function(n){return p(n.nodeName)},Yn:function(n){return n.textContent},Zn:function(n,t){return n.textContent=t},zn:function(n,t){return n.getAttribute(t)},Jn:function(n,t,e){return n.setAttribute(t,e)},en:function(n,t){return n.removeAttribute(t)},rn:function(n,t){return n.hasAttribute(t)},Kn:function(t){return t.getAttribute("mode")||(n.Context||{}).mode},Vn:function(n,r){return"child"===r?n.firstElementChild:"parent"===r?i.Xn(n):"body"===r?e.body:"document"===r?e:"window"===r?t:n},in:function(t,e,o,u,f,c,a,l,v,p){var d=t,h=o,y=r.get(t);p=e+u,y&&y[p]&&y[p](),"string"==typeof a?d=i.Vn(t,a):"object"==typeof a?d=a:(v=e.split(":")).length>1&&(d=i.Vn(t,v[0]),e=v[1]),d&&((v=e.split(".")).length>1&&(e=v[0],h=function(n){n.keyCode===s[v[1]]&&o(n)}),l=i.Nn?{capture:!!f,passive:!!c}:!!f,n.ael(d,e,h,l),y||r.set(t,y={}),y[p]=function(){d&&n.rel(d,e,h,l),y[p]=null})},on:function(n,t,e,i){(i=r.get(n))&&(t?i[t+e]&&i[t+e]():Object.keys(i).forEach(function(n){i[n]&&i[n]()}))},nt:function(n,e,r,i){return i=new t.CustomEvent(e,r),n&&n.dispatchEvent(i),i},Xn:function(n,t){return(t=i.Bn(n))&&11===i.Rn(t)?t.host:t},tt:function(n,t,e,r){return n.setAttributeNS(t,e,r)},et:function(n,t){return n.attachShadow(t)}};"function"!=typeof t.CustomEvent&&(t.CustomEvent=function(n,t,r){return t=t||{},(r=e.createEvent("CustomEvent")).initCustomEvent(n,t.bubbles,t.cancelable,t.detail),r},t.CustomEvent.prototype=t.Event.prototype),n.ael||(n.ael=function(n,t,e,r){return n.addEventListener(t,e,r)},n.rel=function(n,t,e,r){return n.removeEventListener(t,e,r)});try{t.addEventListener("e",null,Object.defineProperty({},"passive",{get:function(){return i.Nn=!0}}))}catch(n){}return i}(d,r,i),y=h.J.documentElement,w=r["s-defined"]=r["s-defined"]||{},b={Z:h,u:function(n,t){r.customElements.get(n.t)||(function(n,t,e,r,i){if(e.connectedCallback=function(){(function(n,t,e){n.rt.has(e)||(n.rt.set(e,!0),function r(n,t){var e=n.nn(t);e.sn&&e.sn.forEach(function(e){e.pn||n.Z.in(t,e.ln,function r(n,t,e,i){return function(r){(i=n.gn.get(t))?i[e](r):((i=n.Wn.get(t)||[]).push(e,r),n.Wn.set(t,i))}}(n,t,e.vn),1,e.hn,e.dn)})}(n,e)),n.mn.delete(e),n.xn.has(e)||(n.it=!0,n.yn.add(e),n.xn.set(e,!0),function(n,t,e){for(e=t;e=n.Z.Xn(e);)if(n.ot(e)){n.ut.has(t)||(n.Mn.set(t,e),(e["s-ld"]=e["s-ld"]||[]).push(t));break}}(n,e),n.queue.tick(function(){n.jn.set(e,function(n,t,e,r,i){if(e.mode||(e.mode=n.Kn(e)),e["s-cr"]||n.zn(e,"ssrv")||n.Y&&1===t.G||(e["s-cr"]=n.Dn(""),e["s-cr"]["s-cn"]=!0,n.X(e,e["s-cr"],n.Un(e)[0])),!n.Y&&1===t.G)try{!window.HTMLElement||"shadowRoot"in window.HTMLElement.prototype||(e.shadowRoot=e)}catch(n){}return 1===t.G&&n.Y&&!e.shadowRoot&&n.et(e,{mode:"open"}),r={Tn:{}},t.tn&&Object.keys(t.tn).forEach(function(o){(i=t.tn[o].un)&&(r.Tn[i]=n.zn(e,i))}),r}(n.Z,t,e)),n.ft(t,e)}))})(n,t,this)},e.disconnectedCallback=function(){(function(n,t){!n.ct&&function(n,t){for(;t;){if(!n.Bn(t))return 9!==n.Rn(t);t=n.Bn(t)}}(n.Z,t)&&(n.mn.set(t,!0),N(n,t),M(n.Sn.get(t),!0),n.Z.on(t),n.rt.delete(t),n.l&&n.l.removeHost(t),[n.Mn,n.at,n.jn].forEach(function(n){return n.delete(t)}))})(n,this)},e["s-init"]=function(){(function(n,t,e,r,i,o,u){if(P(n,t)&&(i=n.gn.get(t))&&!n.mn.has(t)&&(!t["s-ld"]||!t["s-ld"].length)){n.ut.set(t,!0),(u=n.st.has(t))||(n.st.set(t,!0),t["s-ld"]=void 0,n.Z.En(t,e));try{M(n.Sn.get(t)),(o=n.at.get(t))&&(o.forEach(function(n){return n(t)}),n.at.delete(t)),!u&&i.componentDidLoad?i.componentDidLoad():u&&i.componentDidUpdate&&i.componentDidUpdate()}catch(e){n.kn(e,4,t)}N(n,t)}})(n,this,r)},e.forceUpdate=function(){S(n,this,i)},t.tn){var o=Object.entries(t.tn),u={};o.forEach(function(n){var t=n[0],e=n[1].un;e&&(u[e]=t)}),u=Object.assign({},u),e.attributeChangedCallback=function(n,t,e){(function r(n,t,e,i){var o=n[p(e)];o&&(t[o]=(null!==i||"boolean"!=typeof t[o])&&i)})(u,this,n,e)},function(n,t,e,r){o.forEach(function(t){var i=t[0],o=t[1];3&o.fn&&T(e,i,function t(){return(n.On.get(this)||{})[i]},function t(e){_(n,this,i,C(o.an,e),r)})})}(n,0,e,i)}}(b,a[n.t]=n,t.prototype,u,f),t.observedAttributes=Object.values(n.tn).map(function(n){return n.un}).filter(function(n){return!!n}),r.customElements.define(n.t,t))},nn:function(n){return a[h.Qn(n)]},lt:function(n){return t[n]},isClient:!0,ot:function(n){return!(!w[h.Qn(n)]&&!b.nn(n))},kn:function(n,t,e){return console.error(n,t,e&&e.tagName)},queue:t.queue=j(d,r),ft:function(n,t){var e=!h.Y,r={mode:t.mode,scoped:e};n.s(r).then(function(e){try{n.$n=e,function r(n,t,e,i,o){if(i){var u=t.t+(o||c);t[u]||(t[u]=i)}}(0,n,n.G,e.style,e.styleMode)}catch(t){console.error(t),n.$n=function i(){}}S(b,t,f)})},Cn:!1,bn:!1,ct:!1,An:l,Mn:new WeakMap,K:new WeakMap,xn:new WeakMap,rt:new WeakMap,st:new WeakMap,ut:new WeakMap,_n:new WeakMap,jn:new WeakMap,gn:new WeakMap,mn:new WeakMap,wn:new WeakMap,at:new WeakMap,Wn:new WeakMap,Sn:new WeakMap,On:new WeakMap,yn:new Set,Pn:[]};return t.isServer=t.isPrerender=!(t.isClient=!0),t.window=r,t.location=r.location,t.document=i,t.resourcesUrl=t.publicPath=o,t.enableListener=function(n,t,e,r,i){return function o(n,t,e,r,i,u){if(t){var f=n._n.get(t),c=n.nn(f);if(c&&c.sn)if(r){var a=c.sn.find(function(n){return n.ln===e});a&&n.Z.in(f,e,function(n){return t[a.vn](n)},1,a.hn,void 0===u?a.dn:!!u,i)}else n.Z.on(f,e,1)}}(b,n,t,e,r,i)},d.h=e,d.Context=t,d.onReady=function(){return new Promise(function(n){return b.queue.write(function(){return b.yn.size?b.Pn.push(n):n()})})},b.render=function(n,t){var e,r,i,o,u,f,c,a=function(i,l,p,d,h,y,w,b,M){if(b=l.vchildren[p],e||(o=!0,"slot"===b.vtag&&(r&&t.En(d,r+"-s"),b.vchildren?b.vt=!0:b.pt=!0)),v(b.vtext))b.i=t.Dn(b.vtext);else if(b.pt)b.i=t.Dn("");else{if(y=b.i=g||"svg"===b.vtag?t.Ln("http://www.w3.org/2000/svg",b.vtag):t.V(b.vt?"slot-fb":b.vtag),n.ot(y)&&n.ut.delete(c),g="svg"===b.vtag||"foreignObject"!==b.vtag&&g,m(n,null,b,g),v(r)&&y["s-si"]!==r&&t.En(y,y["s-si"]=r),b.vchildren)for(h=0;h<b.vchildren.length;++h)(w=a(i,b,h,y))&&t.qn(y,w);"svg"===b.vtag&&(g=!1)}return b.i["s-hn"]=f,(b.vt||b.pt)&&(b.i["s-sr"]=!0,b.i["s-cr"]=u,b.i["s-sn"]=b.vname||"",(M=i&&i.vchildren&&i.vchildren[p])&&M.vtag===b.vtag&&i.i&&s(i.i)),b.i},s=function(e,r,i,u){n.ct=!0;var c=t.Un(e);for(i=c.length-1;i>=0;i--)(u=c[i])["s-hn"]!==f&&u["s-ol"]&&(t.Hn(u),t.X(y(u),u,h(u)),t.Hn(u["s-ol"]),u["s-ol"]=null,o=!0),r&&s(u,r);n.ct=!1},l=function(n,e,r,i,o,u,c,s){var l=n["s-cr"];for((c=l&&t.Bn(l)||n).shadowRoot&&t.Qn(c)===f&&(c=c.shadowRoot);o<=u;++o)i[o]&&(s=v(i[o].vtext)?t.Dn(i[o].vtext):a(null,r,o,n))&&(i[o].i=s,t.X(c,s,h(e)))},p=function(n,e,r,o){for(;e<=r;++e)v(n[e])&&(o=n[e].i,i=!0,o["s-ol"]?t.Hn(o["s-ol"]):s(o,!0),t.Hn(o))},d=function(n,t){return n.vtag===t.vtag&&n.vkey===t.vkey&&("slot"!==n.vtag||n.vname===t.vname)},h=function(n){return n&&n["s-ol"]?n["s-ol"]:n},y=function(n){return t.Bn(n["s-ol"]?n["s-ol"]:n)},w=function(e,r,i){var o=r.i=e.i,u=e.vchildren,f=r.vchildren;g=r.i&&v(t.Xn(r.i))&&void 0!==r.i.ownerSVGElement,g="svg"===r.vtag||"foreignObject"!==r.vtag&&g,v(r.vtext)?(i=o["s-cr"])?t.Zn(t.Bn(i),r.vtext):e.vtext!==r.vtext&&t.Zn(o,r.vtext):("slot"!==r.vtag&&m(n,e,r,g),v(u)&&v(f)?function(n,e,r,i,o,u,f,c){for(var b=0,m=0,g=e.length-1,M=e[0],j=e[g],k=i.length-1,$=i[0],A=i[k];b<=g&&m<=k;)if(null==M)M=e[++b];else if(null==j)j=e[--g];else if(null==$)$=i[++m];else if(null==A)A=i[--k];else if(d(M,$))w(M,$),M=e[++b],$=i[++m];else if(d(j,A))w(j,A),j=e[--g],A=i[--k];else if(d(M,A))"slot"!==M.vtag&&"slot"!==A.vtag||s(t.Bn(M.i)),w(M,A),t.X(n,M.i,t.In(j.i)),M=e[++b],A=i[--k];else if(d(j,$))"slot"!==M.vtag&&"slot"!==A.vtag||s(t.Bn(j.i)),w(j,$),t.X(n,j.i,M.i),j=e[--g],$=i[++m];else{for(o=null,u=b;u<=g;++u)if(e[u]&&v(e[u].vkey)&&e[u].vkey===$.vkey){o=u;break}v(o)?((c=e[o]).vtag!==$.vtag?f=a(e&&e[m],r,o,n):(w(c,$),e[o]=void 0,f=c.i),$=i[++m]):(f=a(e&&e[m],r,m,n),$=i[++m]),f&&t.X(y(M.i),f,h(M.i))}b>g?l(n,null==i[k+1]?null:i[k+1].i,r,i,m,k):m>k&&p(e,b,g)}(o,u,r,f):v(f)?(v(e.vtext)&&t.Zn(o,""),l(o,null,r,f,0,f.length-1)):v(u)&&p(u,0,u.length-1)),g&&"svg"===r.vtag&&(g=!1)},b=function(n,e,r,i,o,u,f,c){for(i=0,o=(r=t.Un(n)).length;i<o;i++)if(e=r[i],1===t.Rn(e)){if(e["s-sr"])for(f=e["s-sn"],e.hidden=!1,u=0;u<o;u++)if(r[u]["s-hn"]!==e["s-hn"])if(c=t.Rn(r[u]),""!==f){if(1===c&&f===t.zn(r[u],"slot")){e.hidden=!0;break}}else if(1===c||3===c&&""!==t.Yn(r[u]).trim()){e.hidden=!0;break}b(e)}},M=[],j=function(n,e,r,o,u,f,c,a,s,l){for(u=0,f=(e=t.Un(n)).length;u<f;u++){if((r=e[u])["s-sr"]&&(o=r["s-cr"]))for(a=t.Un(t.Bn(o)),s=r["s-sn"],c=a.length-1;c>=0;c--)(o=a[c])["s-cn"]||o["s-nr"]||o["s-hn"]===r["s-hn"]||((3===(l=t.Rn(o))||8===l)&&""===s||1===l&&null===t.zn(o,"slot")&&""===s||1===l&&t.zn(o,"slot")===s)&&(M.some(function(n){return n.dt===o})||(i=!0,o["s-sn"]=s,M.push({ht:r,dt:o})));1===t.Rn(r)&&j(r)}};return function(a,s,l,v,p,d,h,y,m,g,k,$){if(c=a,f=t.Qn(c),u=c["s-cr"],e=v,r=c["s-sc"],o=i=!1,w(s,l),o){for(j(l.i),h=0;h<M.length;h++)(y=M[h]).dt["s-ol"]||((m=t.Dn(""))["s-nr"]=y.dt,t.X(t.Bn(y.dt),y.dt["s-ol"]=m,y.dt));for(n.ct=!0,h=0;h<M.length;h++){for(y=M[h],k=t.Bn(y.ht),$=t.In(y.ht),m=y.dt["s-ol"];m=t.Gn(m);)if((g=m["s-nr"])&&g&&g["s-sn"]===y.dt["s-sn"]&&k===t.Bn(g)&&(g=t.In(g))&&g&&!g["s-nr"]){$=g;break}(!$&&k!==t.Bn(y.dt)||t.In(y.dt)!==$)&&y.dt!==$&&(t.Hn(y.dt),t.X(k,y.dt,$))}n.ct=!1}return i&&b(l.i),M.length=0,l}}(b,h),y["s-ld"]=[],y["s-rn"]=!0,y["s-init"]=function(){b.ut.set(y,d.loaded=b.bn=!0),h.nt(r,"appload",{detail:{namespace:n}})},function(n,t,e,r,i,o){if(t.componentOnReady=function(t,e){if(!t.nodeName.includes("-"))return e(null),!1;var r=n.nn(t);if(r)if(n.ut.has(t))e(t);else{var i=n.at.get(t)||[];i.push(e),n.at.set(t,i)}return!!r},i){for(o=i.length-1;o>=0;o--)t.componentOnReady(i[o][0],i[o][1])&&i.splice(o,1);for(o=0;o<r.length;o++)if(!e[r[o]].componentOnReady)return;for(o=0;o<i.length;o++)i[o][1](null);i.length=0}}(b,d,r,r["s-apps"],r["s-cr"]),d.initialized=!0,b},L={},D=!1;export{r as defineCustomElement,e as h};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// LeKit: Custom Elements Define Library, ES Module/es5 Target
|
|
3
|
-
|
|
4
|
-
import { defineCustomElement } from './le-kit.core.js';
|
|
5
|
-
import { COMPONENTS } from './le-kit.components.js';
|
|
6
|
-
|
|
7
|
-
export function defineCustomElements(win, opts) {
|
|
8
|
-
return defineCustomElement(win, COMPONENTS, opts);
|
|
9
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export function applyPolyfill(window, document) {/*!
|
|
2
|
-
Array.prototype.fill
|
|
3
|
-
*/
|
|
4
|
-
Array.prototype.fill||Object.defineProperty(Array.prototype,"fill",{value:function(t){var r,e,i,n,o,a,l;if(null==this)throw new TypeError("this is null or not defined");for(e=(r=Object(this)).length>>>0,n=(i=arguments[1]>>0)<0?Math.max(e+i,0):Math.min(i,e),l=(a=void 0===(o=arguments[2])?e:o>>0)<0?Math.max(e+a,0):Math.min(a,e);n<l;)r[n]=t,n++;return r}});
|
|
5
|
-
|
|
6
|
-
/*!
|
|
7
|
-
Array.prototype.find
|
|
8
|
-
*/
|
|
9
|
-
Array.prototype.find||Object.defineProperty(Array.prototype,"find",{writable:!0,configurable:!0,value:function(c,e){if(null==this)throw new TypeError('"this" is null or not defined');var b=Object(this),f=b.length>>>0;if("function"!==typeof c)throw new TypeError("predicate must be a function");for(var a=0;a<f;){var d=b[a];if(c.call(e,d,a,b))return d;a++}}});
|
|
10
|
-
/*!
|
|
11
|
-
Array.prototype.findIndex
|
|
12
|
-
*/
|
|
13
|
-
Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(c,d){if(null==this)throw new TypeError('"this" is null or not defined');var b=Object(this),e=b.length>>>0;if("function"!==typeof c)throw new TypeError("predicate must be a function");for(var a=0;a<e;){if(c.call(d,b[a],a,b))return a;a++}return-1},configurable:!0,writable:!0});
|
|
14
|
-
/*!
|
|
15
|
-
Array.from
|
|
16
|
-
*/
|
|
17
|
-
Array.from||(Array.from=function(){var l=Object.prototype.toString,h=function(c){return"function"===typeof c||"[object Function]"===l.call(c)},m=Math.pow(2,53)-1;return function(c){var k=Object(c);if(null==c)throw new TypeError("Array.from requires an array-like object - not null or undefined");var d=1<arguments.length?arguments[1]:void 0,f;if("undefined"!==typeof d){if(!h(d))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(f=arguments[2])}var a=
|
|
18
|
-
Number(k.length);a=isNaN(a)?0:0!==a&&isFinite(a)?(0<a?1:-1)*Math.floor(Math.abs(a)):a;a=Math.min(Math.max(a,0),m);for(var g=h(this)?Object(new this(a)):Array(a),b=0,e;b<a;)e=k[b],g[b]=d?"undefined"===typeof f?d(e,b):d.call(f,e,b):e,b+=1;g.length=a;return g}}());
|
|
19
|
-
/*!
|
|
20
|
-
Array.prototype.includes
|
|
21
|
-
*/
|
|
22
|
-
Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{writable:!0,configurable:!0,value:function(r,e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if(0===n)return!1;var i,o,a=0|e,u=Math.max(0<=a?a:n-Math.abs(a),0);for(;u<n;){if((i=t[u])===(o=r)||"number"==typeof i&&"number"==typeof o&&isNaN(i)&&isNaN(o))return!0;u++}return!1}});
|
|
23
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export function applyPolyfill(window, document) {/*! https://github.com/WebReflection/es6-collections
|
|
2
|
-
(C) Andrea Giammarchi - @WebReflection - Mit Style License */
|
|
3
|
-
(function(e){function d(a,b){function c(a){if(!this||this.constructor!==c)return new c(a);this._keys=[];this._values=[];this._itp=[];this.objectOnly=b;a&&v.call(this,a)}b||w(a,"size",{get:x});a.constructor=c;c.prototype=a;return c}function v(a){this.add?a.forEach(this.add,this):a.forEach(function(a){this.set(a[0],a[1])},this)}function f(a){this.has(a)&&(this._keys.splice(c,1),this._values.splice(c,1),this._itp.forEach(function(a){c<a[0]&&a[0]--}));return-1<c}function m(a){return this.has(a)?this._values[c]:
|
|
4
|
-
void 0}function n(a,b){if(this.objectOnly&&b!==Object(b))throw new TypeError("Invalid value used as weak collection key");if(b!=b||0===b)for(c=a.length;c--&&!y(a[c],b););else c=a.indexOf(b);return-1<c}function p(a){return n.call(this,this._values,a)}function q(a){return n.call(this,this._keys,a)}function r(a,b){this.has(a)?this._values[c]=b:this._values[this._keys.push(a)-1]=b;return this}function t(a){this.has(a)||this._values.push(a);return this}function h(){(this._keys||0).length=this._values.length=
|
|
5
|
-
0}function z(){return k(this._itp,this._keys)}function l(){return k(this._itp,this._values)}function A(){return k(this._itp,this._keys,this._values)}function B(){return k(this._itp,this._values,this._values)}function k(a,b,c){var g=[0],e=!1;a.push(g);return{next:function(){var d=g[0];if(!e&&d<b.length){var f=c?[b[d],c[d]]:b[d];g[0]++}else e=!0,a.splice(a.indexOf(g),1);return{done:e,value:f}}}}function x(){return this._values.length}function u(a,b){for(var c=this.entries();;){var d=c.next();if(d.done)break;
|
|
6
|
-
a.call(b,d.value[1],d.value[0],this)}}var c,w=Object.defineProperty,y=function(a,b){return a===b||a!==a&&b!==b};"undefined"==typeof WeakMap&&(e.WeakMap=d({"delete":f,clear:h,get:m,has:q,set:r},!0));"undefined"!=typeof Map&&"function"===typeof(new Map).values&&(new Map).values().next||(e.Map=d({"delete":f,has:q,get:m,set:r,keys:z,values:l,entries:A,forEach:u,clear:h}));"undefined"!=typeof Set&&"function"===typeof(new Set).values&&(new Set).values().next||(e.Set=d({has:p,add:t,"delete":f,clear:h,keys:l,
|
|
7
|
-
values:l,entries:B,forEach:u}));"undefined"==typeof WeakSet&&(e.WeakSet=d({"delete":f,add:t,clear:h,has:p},!0))})(window);
|
|
8
|
-
var StyleNode=function(){return function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}}();function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var a=r,o=a.rules[a.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=a,r.previous=o,a.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var a=e.rules;if(a)for(var o=0,i=a.length,l=void 0;o<i&&(l=a[o]);o++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e})}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),a=s[0],o=s.slice(1);return{start:r.start,end:n,propName:a.trim(),fallback:o.length>0?o.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,a=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),function(e){return resolveVar(e,s,a)}),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var a=e[s];if(r)n&&'"'===a&&(r=!1),n||"'"!==a||(r=!1);else if('"'===a)r=!0,n=!0;else if("'"===a)r=!0,n=!1;else{if(";"===a)return s+1;if("}"===a)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach(function(e){e.declarations.forEach(function(e){t[e.prop]=e.value})});for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach(function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)}),!t)return"break"},a=0;a<10;a++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter(function(e){return e.type===types.STYLE_RULE}).forEach(function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach(function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(e),nu:t})}),t++}),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,a=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:a})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.substr(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){return sortSelectors(getSelectorsForScopes(r.concat(getScopesForElement(t,e))).filter(function(t){return matches(e,t.selector)}))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach(function(e){t.push.apply(t,e.selectors)}),t}function sortSelectors(e){return e.sort(function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity}),e}function matches(e,t){return e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),isDynamic:r.length>1}}function addGlobalStyle(e,t){var r=parseCSS(t.innerHTML);r.styleEl=t,e.push(r)}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach(function(e){e.isDynamic&&(e.styleEl.innerHTML=executeTemplate(e.template,t))})}function reScope(e,t){var r=e.template.map(function(r){return"string"==typeof r?replaceScope(r,e.cssScopeId,t):r}),n=e.selectors.map(function(r){return Object.assign({},r,{selector:replaceScope(r.selector,e.cssScopeId,t)})});return Object.assign({},e,{template:r,selectors:n,cssScopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\."+t,"."+r)}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentLinks(e,t).then(function(){loadDocumentStyles(e,t)})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){for(var r=e.querySelectorAll("style"),n=0;n<r.length;n++)addGlobalStyle(t,r[n])}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then(function(e){return e.text()}).then(function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var a=e.createElement("style");a.innerHTML=s,addGlobalStyle(t,a),r.parentNode.insertBefore(a,r),r.remove()}}).catch(function(e){console.error(e)})}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?![http|\/])([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^\/]*$/,"");return e.replace(CSS_URL_REGEXP,function(e,t){var n=r+t;return e.replace(t,n)})}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map}return e.prototype.initShim=function(){var e=this;return new Promise(function(t){e.win.requestAnimationFrame(function(){loadDocument(e.doc,e.globalScopes).then(function(){return t()})})})},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then(function(){t.updateGlobal()})},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e),this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r){if(this.hostScopeMap.has(e))return null;var n=e["s-sc"],s=this.registerHostTemplate(r,t,n),a=s.isDynamic&&s.cssScopeId;if(!(a||!s.styleEl))return null;var o=this.doc.createElement("style");if(a){var i=s.cssScopeId+"-"+this.count;e["s-sc"]=i,this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,i)),this.count++}else s.styleEl=o,s.isDynamic||(o.innerHTML=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s);return o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.isDynamic&&t.cssScopeId){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.innerHTML=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).cssScopeId=r,this.scopesMap.set(t,n)),n},e}();window.customStyleShim=new CustomStyle(window,document);}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export function applyPolyfill(window, document) {/*! document-register-element, 1.7.0
|
|
2
|
-
https://github.com/WebReflection/document-register-element
|
|
3
|
-
(C) Andrea Giammarchi - @WebReflection - Mit Style License */
|
|
4
|
-
if (!window['s-ce1']) {
|
|
5
|
-
window['s-ce1'] = true;
|
|
6
|
-
(function(e,t){"use strict";function Ht(){var e=wt.splice(0,wt.length);Et=0;while(e.length)e.shift().call(null,e.shift())}function Bt(e,t){for(var n=0,r=e.length;n<r;n++)Jt(e[n],t)}function jt(e){for(var t=0,n=e.length,r;t<n;t++)r=e[t],Pt(r,A[It(r)])}function Ft(e){return function(t){ut(t)&&(Jt(t,e),O.length&&Bt(t.querySelectorAll(O),e))}}function It(e){var t=ht.call(e,"is"),n=e.nodeName.toUpperCase(),r=_.call(L,t?N+t.toUpperCase():T+n);return t&&-1<r&&!qt(n,t)?-1:r}function qt(e,t){return-1<O.indexOf(e+'[is="'+t+'"]')}function Rt(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target,s=e[y]||2,o=e[w]||3;kt&&(!i||i===t)&&t[h]&&r!=="style"&&(e.prevValue!==e.newValue||e.newValue===""&&(n===s||n===o))&&t[h](r,n===s?null:e.prevValue,n===o?null:e.newValue)}function Ut(e){var t=Ft(e);return function(e){wt.push(t,e.target),Et&&clearTimeout(Et),Et=setTimeout(Ht,1)}}function zt(e){Ct&&(Ct=!1,e.currentTarget.removeEventListener(S,zt)),O.length&&Bt((e.target||n).querySelectorAll(O),e.detail===l?l:a),st&&Vt()}function Wt(e,t){var n=this;vt.call(n,e,t),Lt.call(n,{target:n})}function Xt(e,t){nt(e,t),Mt?Mt.observe(e,yt):(Nt&&(e.setAttribute=Wt,e[o]=Ot(e),e[u](x,Lt)),e[u](E,Rt)),e[m]&&kt&&(e.created=!0,e[m](),e.created=!1)}function Vt(){for(var e,t=0,n=at.length;t<n;t++)e=at[t],M.contains(e)||(n--,at.splice(t--,1),Jt(e,l))}function $t(e){throw new Error("A "+e+" type is already registered")}function Jt(e,t){var n,r=It(e),i;-1<r&&(Dt(e,A[r]),r=0,t===a&&!e[a]?(e[l]=!1,e[a]=!0,i="connected",r=1,st&&_.call(at,e)<0&&at.push(e)):t===l&&!e[l]&&(e[a]=!1,e[l]=!0,i="disconnected",r=1),r&&(n=e[t+f]||e[i+f])&&n.call(e))}function Kt(){}function Qt(e,t,r){var i=r&&r[c]||"",o=t.prototype,u=tt(o),a=t.observedAttributes||j,f={prototype:u};ot(u,m,{value:function(){if(Q)Q=!1;else if(!this[W]){this[W]=!0,new t(this),o[m]&&o[m].call(this);var e=G[Z.get(t)];(!V||e.create.length>1)&&Zt(this)}}}),ot(u,h,{value:function(e){-1<_.call(a,e)&&o[h].apply(this,arguments)}}),o[d]&&ot(u,p,{value:o[d]}),o[v]&&ot(u,g,{value:o[v]}),i&&(f[c]=i),e=e.toUpperCase(),G[e]={constructor:t,create:i?[i,et(e)]:[e]},Z.set(t,e),n[s](e.toLowerCase(),f),en(e),Y[e].r()}function Gt(e){var t=G[e.toUpperCase()];return t&&t.constructor}function Yt(e){return typeof e=="string"?e:e&&e.is||""}function Zt(e){var t=e[h],n=t?e.attributes:j,r=n.length,i;while(r--)i=n[r],t.call(e,i.name||i.nodeName,null,i.value||i.nodeValue)}function en(e){return e=e.toUpperCase(),e in Y||(Y[e]={},Y[e].p=new K(function(t){Y[e].r=t})),Y[e].p}function tn(){X&&delete e.customElements,B(e,"customElements",{configurable:!0,value:new Kt}),B(e,"CustomElementRegistry",{configurable:!0,value:Kt});for(var t=function(t){var r=e[t];if(r){e[t]=function(t){var i,s;return t||(t=this),t[W]||(Q=!0,i=G[Z.get(t.constructor)],s=V&&i.create.length===1,t=s?Reflect.construct(r,j,i.constructor):n.createElement.apply(n,i.create),t[W]=!0,Q=!1,s||Zt(t)),t},e[t].prototype=r.prototype;try{r.prototype.constructor=e[t]}catch(i){z=!0,B(r,W,{value:e[t]})}}},r=i.get(/^HTML[A-Z]*[a-z]/),o=r.length;o--;t(r[o]));n.createElement=function(e,t){var n=Yt(t);return n?gt.call(this,e,et(n)):gt.call(this,e)},St||(Tt=!0,n[s](""))}var n=e.document,r=e.Object,i=function(e){var t=/^[A-Z]+[a-z]/,n=function(e){var t=[],n;for(n in s)e.test(n)&&t.push(n);return t},i=function(e,t){t=t.toLowerCase(),t in s||(s[e]=(s[e]||[]).concat(t),s[t]=s[t.toUpperCase()]=e)},s=(r.create||r)(null),o={},u,a,f,l;for(a in e)for(l in e[a]){f=e[a][l],s[l]=f;for(u=0;u<f.length;u++)s[f[u].toLowerCase()]=s[f[u].toUpperCase()]=l}return o.get=function(r){return typeof r=="string"?s[r]||(t.test(r)?[]:""):n(r)},o.set=function(n,r){return t.test(n)?i(n,r):i(r,n),o},o}({collections:{HTMLAllCollection:["all"],HTMLCollection:["forms"],HTMLFormControlsCollection:["elements"],HTMLOptionsCollection:["options"]},elements:{Element:["element"],HTMLAnchorElement:["a"],HTMLAppletElement:["applet"],HTMLAreaElement:["area"],HTMLAttachmentElement:["attachment"],HTMLAudioElement:["audio"],HTMLBRElement:["br"],HTMLBaseElement:["base"],HTMLBodyElement:["body"],HTMLButtonElement:["button"],HTMLCanvasElement:["canvas"],HTMLContentElement:["content"],HTMLDListElement:["dl"],HTMLDataElement:["data"],HTMLDataListElement:["datalist"],HTMLDetailsElement:["details"],HTMLDialogElement:["dialog"],HTMLDirectoryElement:["dir"],HTMLDivElement:["div"],HTMLDocument:["document"],HTMLElement:["element","abbr","address","article","aside","b","bdi","bdo","cite","code","command","dd","dfn","dt","em","figcaption","figure","footer","header","i","kbd","mark","nav","noscript","rp","rt","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr"],HTMLEmbedElement:["embed"],HTMLFieldSetElement:["fieldset"],HTMLFontElement:["font"],HTMLFormElement:["form"],HTMLFrameElement:["frame"],HTMLFrameSetElement:["frameset"],HTMLHRElement:["hr"],HTMLHeadElement:["head"],HTMLHeadingElement:["h1","h2","h3","h4","h5","h6"],HTMLHtmlElement:["html"],HTMLIFrameElement:["iframe"],HTMLImageElement:["img"],HTMLInputElement:["input"],HTMLKeygenElement:["keygen"],HTMLLIElement:["li"],HTMLLabelElement:["label"],HTMLLegendElement:["legend"],HTMLLinkElement:["link"],HTMLMapElement:["map"],HTMLMarqueeElement:["marquee"],HTMLMediaElement:["media"],HTMLMenuElement:["menu"],HTMLMenuItemElement:["menuitem"],HTMLMetaElement:["meta"],HTMLMeterElement:["meter"],HTMLModElement:["del","ins"],HTMLOListElement:["ol"],HTMLObjectElement:["object"],HTMLOptGroupElement:["optgroup"],HTMLOptionElement:["option"],HTMLOutputElement:["output"],HTMLParagraphElement:["p"],HTMLParamElement:["param"],HTMLPictureElement:["picture"],HTMLPreElement:["pre"],HTMLProgressElement:["progress"],HTMLQuoteElement:["blockquote","q","quote"],HTMLScriptElement:["script"],HTMLSelectElement:["select"],HTMLShadowElement:["shadow"],HTMLSlotElement:["slot"],HTMLSourceElement:["source"],HTMLSpanElement:["span"],HTMLStyleElement:["style"],HTMLTableCaptionElement:["caption"],HTMLTableCellElement:["td","th"],HTMLTableColElement:["col","colgroup"],HTMLTableElement:["table"],HTMLTableRowElement:["tr"],HTMLTableSectionElement:["thead","tbody","tfoot"],HTMLTemplateElement:["template"],HTMLTextAreaElement:["textarea"],HTMLTimeElement:["time"],HTMLTitleElement:["title"],HTMLTrackElement:["track"],HTMLUListElement:["ul"],HTMLUnknownElement:["unknown","vhgroupv","vkeygen"],HTMLVideoElement:["video"]},nodes:{Attr:["node"],Audio:["audio"],CDATASection:["node"],CharacterData:["node"],Comment:["#comment"],Document:["#document"],DocumentFragment:["#document-fragment"],DocumentType:["node"],HTMLDocument:["#document"],Image:["img"],Option:["option"],ProcessingInstruction:["node"],ShadowRoot:["#shadow-root"],Text:["#text"],XMLDocument:["xml"]}});typeof t!="object"&&(t={type:t||"auto"});var s="registerElement",o="__"+s+(e.Math.random()*1e5>>0),u="addEventListener",a="attached",f="Callback",l="detached",c="extends",h="attributeChanged"+f,p=a+f,d="connected"+f,v="disconnected"+f,m="created"+f,g=l+f,y="ADDITION",b="MODIFICATION",w="REMOVAL",E="DOMAttrModified",S="DOMContentLoaded",x="DOMSubtreeModified",T="<",N="=",C=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,k=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],L=[],A=[],O="",M=n.documentElement,_=L.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},D=r.prototype,P=D.hasOwnProperty,H=D.isPrototypeOf,B=r.defineProperty,j=[],F=r.getOwnPropertyDescriptor,I=r.getOwnPropertyNames,q=r.getPrototypeOf,R=r.setPrototypeOf,U=!!r.__proto__,z=!1,W="__dreCEv1",X=e.customElements,V=!/^force/.test(t.type)&&!!(X&&X.define&&X.get&&X.whenDefined),$=r.create||r,J=e.Map||function(){var t=[],n=[],r;return{get:function(e){return n[_.call(t,e)]},set:function(e,i){r=_.call(t,e),r<0?n[t.push(e)-1]=i:n[r]=i}}},K=e.Promise||function(e){function i(e){n=!0;while(t.length)t.shift()(e)}var t=[],n=!1,r={"catch":function(){return r},then:function(e){return t.push(e),n&&setTimeout(i,1),r}};return e(i),r},Q=!1,G=$(null),Y=$(null),Z=new J,et=function(e){return e.toLowerCase()},tt=r.create||function sn(e){return e?(sn.prototype=e,new sn):this},nt=R||(U?function(e,t){return e.__proto__=t,e}:I&&F?function(){function e(e,t){for(var n,r=I(t),i=0,s=r.length;i<s;i++)n=r[i],P.call(e,n)||B(e,n,F(t,n))}return function(t,n){do e(t,n);while((n=q(n))&&!H.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),rt=e.MutationObserver||e.WebKitMutationObserver,it=(e.HTMLElement||e.Element||e.Node).prototype,st=!H.call(it,M),ot=st?function(e,t,n){return e[t]=n.value,e}:B,ut=st?function(e){return e.nodeType===1}:function(e){return H.call(it,e)},at=st&&[],ft=it.attachShadow,lt=it.cloneNode,ct=it.dispatchEvent,ht=it.getAttribute,pt=it.hasAttribute,dt=it.removeAttribute,vt=it.setAttribute,mt=n.createElement,gt=mt,yt=rt&&{attributes:!0,characterData:!0,attributeOldValue:!0},bt=rt||function(e){Nt=!1,M.removeEventListener(E,bt)},wt,Et=0,St=s in n&&!/^force-all/.test(t.type),xt=!0,Tt=!1,Nt=!0,Ct=!0,kt=!0,Lt,At,Ot,Mt,_t,Dt,Pt;St||(R||U?(Dt=function(e,t){H.call(t,e)||Xt(e,t)},Pt=Xt):(Dt=function(e,t){e[o]||(e[o]=r(!0),Xt(e,t))},Pt=Dt),st?(Nt=!1,function(){var e=F(it,u),t=e.value,n=function(e){var t=new CustomEvent(E,{bubbles:!0});t.attrName=e,t.prevValue=ht.call(this,e),t.newValue=null,t[w]=t.attrChange=2,dt.call(this,e),ct.call(this,t)},r=function(e,t){var n=pt.call(this,e),r=n&&ht.call(this,e),i=new CustomEvent(E,{bubbles:!0});vt.call(this,e,t),i.attrName=e,i.prevValue=n?r:null,i.newValue=t,n?i[b]=i.attrChange=1:i[y]=i.attrChange=0,ct.call(this,i)},i=function(e){var t=e.currentTarget,n=t[o],r=e.propertyName,i;n.hasOwnProperty(r)&&(n=n[r],i=new CustomEvent(E,{bubbles:!0}),i.attrName=n.name,i.prevValue=n.value||null,i.newValue=n.value=t[r]||null,i.prevValue==null?i[y]=i.attrChange=0:i[b]=i.attrChange=1,ct.call(t,i))};e.value=function(e,s,u){e===E&&this[h]&&this.setAttribute!==r&&(this[o]={className:{name:"class",value:this.className}},this.setAttribute=r,this.removeAttribute=n,t.call(this,"propertychange",i)),t.call(this,e,s,u)},B(it,u,e)}()):rt||(M[u](E,bt),M.setAttribute(o,1),M.removeAttribute(o),Nt&&(Lt=function(e){var t=this,n,r,i;if(t===e.target){n=t[o],t[o]=r=Ot(t);for(i in r){if(!(i in n))return At(0,t,i,n[i],r[i],y);if(r[i]!==n[i])return At(1,t,i,n[i],r[i],b)}for(i in n)if(!(i in r))return At(2,t,i,n[i],r[i],w)}},At=function(e,t,n,r,i,s){var o={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};o[s]=e,Rt(o)},Ot=function(e){for(var t,n,r={},i=e.attributes,s=0,o=i.length;s<o;s++)t=i[s],n=t.name,n!=="setAttribute"&&(r[n]=t.value);return r})),n[s]=function(t,r){p=t.toUpperCase(),xt&&(xt=!1,rt?(Mt=function(e,t){function n(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}return new rt(function(r){for(var i,s,o,u=0,a=r.length;u<a;u++)i=r[u],i.type==="childList"?(n(i.addedNodes,e),n(i.removedNodes,t)):(s=i.target,kt&&s[h]&&i.attributeName!=="style"&&(o=ht.call(s,i.attributeName),o!==i.oldValue&&s[h](i.attributeName,i.oldValue,o)))})}(Ft(a),Ft(l)),_t=function(e){return Mt.observe(e,{childList:!0,subtree:!0}),e},_t(n),ft&&(it.attachShadow=function(){return _t(ft.apply(this,arguments))})):(wt=[],n[u]("DOMNodeInserted",Ut(a)),n[u]("DOMNodeRemoved",Ut(l))),n[u](S,zt),n[u]("readystatechange",zt),it.cloneNode=function(e){var t=lt.call(this,!!e),n=It(t);return-1<n&&Pt(t,A[n]),e&&O.length&&jt(t.querySelectorAll(O)),t});if(Tt)return Tt=!1;-2<_.call(L,N+p)+_.call(L,T+p)&&$t(t);if(!C.test(p)||-1<_.call(k,p))throw new Error("The type "+t+" is invalid");var i=function(){return o?n.createElement(f,p):n.createElement(f)},s=r||D,o=P.call(s,c),f=o?r[c].toUpperCase():p,p,d;return o&&-1<_.call(L,T+f)&&$t(f),d=L.push((o?N:T)+p)-1,O=O.concat(O.length?",":"",o?f+'[is="'+t.toLowerCase()+'"]':f),i.prototype=A[d]=P.call(s,"prototype")?s.prototype:tt(it),O.length&&Bt(n.querySelectorAll(O),a),i},n.createElement=gt=function(e,t){var r=Yt(t),i=r?mt.call(n,e,et(r)):mt.call(n,e),s=""+e,o=_.call(L,(r?N:T)+(r||s).toUpperCase()),u=-1<o;return r&&(i.setAttribute("is",r=r.toLowerCase()),u&&(u=qt(s.toUpperCase(),r))),kt=!n.createElement.innerHTMLHelper,u&&Pt(i,A[o]),i}),Kt.prototype={constructor:Kt,define:V?function(e,t,n){if(n)Qt(e,t,n);else{var r=e.toUpperCase();G[r]={constructor:t,create:[r]},Z.set(t,r),X.define(e,t)}}:Qt,get:V?function(e){return X.get(e)||Gt(e)}:Gt,whenDefined:V?function(e){return K.race([X.whenDefined(e),en(e)])}:en};if(!X||/^force/.test(t.type))tn();else if(!t.noBuiltIn)try{(function(t,r,i){r[c]="a",t.prototype=tt(HTMLAnchorElement.prototype),t.prototype.constructor=t,e.customElements.define(i,t,r);if(ht.call(n.createElement("a",{is:i}),"is")!==i||V&&ht.call(new t,"is")!==i)throw r})(function on(){return Reflect.construct(HTMLAnchorElement,[],on)},{},"document-register-element-a")}catch(nn){tn()}if(!t.noBuiltIn)try{mt.call(n,"a","a")}catch(rn){et=function(e){return{is:e.toLowerCase()}}}})(window);
|
|
7
|
-
}
|
|
8
|
-
/*!
|
|
9
|
-
Element.closest and Element.matches
|
|
10
|
-
https://github.com/jonathantneal/closest
|
|
11
|
-
Creative Commons Zero v1.0 Universal
|
|
12
|
-
*/
|
|
13
|
-
(function(a){"function"!==typeof a.matches&&(a.matches=a.msMatchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||function(a){a=(this.document||this.ownerDocument).querySelectorAll(a);for(var b=0;a[b]&&a[b]!==this;)++b;return!!a[b]});"function"!==typeof a.closest&&(a.closest=function(a){for(var b=this;b&&1===b.nodeType;){if(b.matches(a))return b;b=b.parentNode}return null})})(window.Element.prototype);
|
|
14
|
-
/*!
|
|
15
|
-
Element.getRootNode()
|
|
16
|
-
*/
|
|
17
|
-
(function(c){function d(a){a=b(a);return 11===a.nodeType?d(a.host):a}function b(a){return a.parentNode?b(a.parentNode):a}"function"!==typeof c.getRootNode&&(c.getRootNode=function(a){return a&&a.composed?d(this):b(this)})})(Element.prototype);
|
|
18
|
-
/*!
|
|
19
|
-
Element.remove()
|
|
20
|
-
*/
|
|
21
|
-
(function(b){b.forEach(function(a){a.hasOwnProperty("remove")||Object.defineProperty(a,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})})})([Element.prototype,CharacterData.prototype,DocumentType.prototype]);
|
|
22
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export function applyPolyfill(window, document) {/*!
|
|
2
|
-
whatwg-fetch, 2.0.3
|
|
3
|
-
https://github.com/github/fetch
|
|
4
|
-
Copyright (c) 2014-2016 GitHub, Inc. - MIT License
|
|
5
|
-
*/
|
|
6
|
-
(function(e){function l(a){"string"!==typeof a&&(a=String(a));if(/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(a))throw new TypeError("Invalid character in header field name");return a.toLowerCase()}function q(a){"string"!==typeof a&&(a=String(a));return a}function n(a){var b={next:function(){var b=a.shift();return{done:void 0===b,value:b}}};g.iterable&&(b[Symbol.iterator]=function(){return b});return b}function d(a){this.map={};a instanceof d?a.forEach(function(a,c){this.append(c,a)},this):Array.isArray(a)?
|
|
7
|
-
a.forEach(function(a){this.append(a[0],a[1])},this):a&&Object.getOwnPropertyNames(a).forEach(function(b){this.append(b,a[b])},this)}function p(a){if(a.bodyUsed)return Promise.reject(new TypeError("Already read"));a.bodyUsed=!0}function r(a){return new Promise(function(b,c){a.onload=function(){b(a.result)};a.onerror=function(){c(a.error)}})}function w(a){var b=new FileReader,c=r(b);b.readAsArrayBuffer(a);return c}function x(a){a=new Uint8Array(a);for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);
|
|
8
|
-
return b.join("")}function t(a){if(a.slice)return a.slice(0);var b=new Uint8Array(a.byteLength);b.set(new Uint8Array(a));return b.buffer}function u(){this.bodyUsed=!1;this._initBody=function(a){if(this._bodyInit=a)if("string"===typeof a)this._bodyText=a;else if(g.blob&&Blob.prototype.isPrototypeOf(a))this._bodyBlob=a;else if(g.formData&&FormData.prototype.isPrototypeOf(a))this._bodyFormData=a;else if(g.searchParams&&URLSearchParams.prototype.isPrototypeOf(a))this._bodyText=a.toString();else if(g.arrayBuffer&&
|
|
9
|
-
g.blob&&y(a))this._bodyArrayBuffer=t(a.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else if(g.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(a)||z(a)))this._bodyArrayBuffer=t(a);else throw Error("unsupported BodyInit type");else this._bodyText="";this.headers.get("content-type")||("string"===typeof a?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):g.searchParams&&URLSearchParams.prototype.isPrototypeOf(a)&&
|
|
10
|
-
this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))};g.blob&&(this.blob=function(){var a=p(this);if(a)return a;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):
|
|
11
|
-
this.blob().then(w)});this.text=function(){var a=p(this);if(a)return a;if(this._bodyBlob){a=this._bodyBlob;var b=new FileReader,c=r(b);b.readAsText(a);return c}if(this._bodyArrayBuffer)return Promise.resolve(x(this._bodyArrayBuffer));if(this._bodyFormData)throw Error("could not read FormData body as text");return Promise.resolve(this._bodyText)};g.formData&&(this.formData=function(){return this.text().then(A)});this.json=function(){return this.text().then(JSON.parse)};return this}function k(a,b){b=
|
|
12
|
-
b||{};var c=b.body;if(a instanceof k){if(a.bodyUsed)throw new TypeError("Already read");this.url=a.url;this.credentials=a.credentials;b.headers||(this.headers=new d(a.headers));this.method=a.method;this.mode=a.mode;c||null==a._bodyInit||(c=a._bodyInit,a.bodyUsed=!0)}else this.url=String(a);this.credentials=b.credentials||this.credentials||"omit";if(b.headers||!this.headers)this.headers=new d(b.headers);var v=b.method||this.method||"GET",g=v.toUpperCase();this.method=-1<B.indexOf(g)?g:v;this.mode=
|
|
13
|
-
b.mode||this.mode||null;this.referrer=null;if(("GET"===this.method||"HEAD"===this.method)&&c)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(c)}function A(a){var b=new FormData;a.trim().split("&").forEach(function(a){if(a){var c=a.split("=");a=c.shift().replace(/\+/g," ");c=c.join("=").replace(/\+/g," ");b.append(decodeURIComponent(a),decodeURIComponent(c))}});return b}function C(a){var b=new d;a.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(a){var c=
|
|
14
|
-
a.split(":");if(a=c.shift().trim())c=c.join(":").trim(),b.append(a,c)});return b}function h(a,b){b||(b={});this.type="default";this.status=void 0===b.status?200:b.status;this.ok=200<=this.status&&300>this.status;this.statusText="statusText"in b?b.statusText:"OK";this.headers=new d(b.headers);this.url=b.url||"";this._initBody(a)}if(!e.fetch){var D="Symbol"in e&&"iterator"in Symbol,m;if(m="FileReader"in e&&"Blob"in e)try{new Blob,m=!0}catch(a){m=!1}var g={searchParams:"URLSearchParams"in e,iterable:D,
|
|
15
|
-
blob:m,formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(g.arrayBuffer){var E="[object Int8Array];[object Uint8Array];[object Uint8ClampedArray];[object Int16Array];[object Uint16Array];[object Int32Array];[object Uint32Array];[object Float32Array];[object Float64Array]".split(";");var y=function(a){return a&&DataView.prototype.isPrototypeOf(a)};var z=ArrayBuffer.isView||function(a){return a&&-1<E.indexOf(Object.prototype.toString.call(a))}}d.prototype.append=function(a,b){a=l(a);b=q(b);var c=
|
|
16
|
-
this.map[a];this.map[a]=c?c+","+b:b};d.prototype["delete"]=function(a){delete this.map[l(a)]};d.prototype.get=function(a){a=l(a);return this.has(a)?this.map[a]:null};d.prototype.has=function(a){return this.map.hasOwnProperty(l(a))};d.prototype.set=function(a,b){this.map[l(a)]=q(b)};d.prototype.forEach=function(a,b){for(var c in this.map)this.map.hasOwnProperty(c)&&a.call(b,this.map[c],c,this)};d.prototype.keys=function(){var a=[];this.forEach(function(b,c){a.push(c)});return n(a)};d.prototype.values=
|
|
17
|
-
function(){var a=[];this.forEach(function(b){a.push(b)});return n(a)};d.prototype.entries=function(){var a=[];this.forEach(function(b,c){a.push([c,b])});return n(a)};g.iterable&&(d.prototype[Symbol.iterator]=d.prototype.entries);var B="DELETE GET HEAD OPTIONS POST PUT".split(" ");k.prototype.clone=function(){return new k(this,{body:this._bodyInit})};u.call(k.prototype);u.call(h.prototype);h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),
|
|
18
|
-
url:this.url})};h.error=function(){var a=new h(null,{status:0,statusText:""});a.type="error";return a};var F=[301,302,303,307,308];h.redirect=function(a,b){if(-1===F.indexOf(b))throw new RangeError("Invalid status code");return new h(null,{status:b,headers:{location:a}})};e.Headers=d;e.Request=k;e.Response=h;e.fetch=function(a,b){return new Promise(function(c,d){var e=new k(a,b),f=new XMLHttpRequest;f.onload=function(){var a={status:f.status,statusText:f.statusText,headers:C(f.getAllResponseHeaders()||
|
|
19
|
-
"")};a.url="responseURL"in f?f.responseURL:a.headers.get("X-Request-URL");c(new h("response"in f?f.response:f.responseText,a))};f.onerror=function(){d(new TypeError("Network request failed"))};f.ontimeout=function(){d(new TypeError("Network request failed"))};f.open(e.method,e.url,!0);"include"===e.credentials?f.withCredentials=!0:"omit"===e.credentials&&(f.withCredentials=!1);"responseType"in f&&g.blob&&(f.responseType="blob");e.headers.forEach(function(a,b){f.setRequestHeader(b,a)});f.send("undefined"===
|
|
20
|
-
typeof e._bodyInit?null:e._bodyInit)})};e.fetch.polyfill=!0}})("undefined"!==typeof self?self:window);}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export function applyPolyfill(window, document) {/*! https://github.com/WebReflection/es6-collections
|
|
2
|
-
(C) Andrea Giammarchi - @WebReflection - Mit Style License */
|
|
3
|
-
(function(e){function d(a,b){function c(a){if(!this||this.constructor!==c)return new c(a);this._keys=[];this._values=[];this._itp=[];this.objectOnly=b;a&&v.call(this,a)}b||w(a,"size",{get:x});a.constructor=c;c.prototype=a;return c}function v(a){this.add?a.forEach(this.add,this):a.forEach(function(a){this.set(a[0],a[1])},this)}function f(a){this.has(a)&&(this._keys.splice(c,1),this._values.splice(c,1),this._itp.forEach(function(a){c<a[0]&&a[0]--}));return-1<c}function m(a){return this.has(a)?this._values[c]:
|
|
4
|
-
void 0}function n(a,b){if(this.objectOnly&&b!==Object(b))throw new TypeError("Invalid value used as weak collection key");if(b!=b||0===b)for(c=a.length;c--&&!y(a[c],b););else c=a.indexOf(b);return-1<c}function p(a){return n.call(this,this._values,a)}function q(a){return n.call(this,this._keys,a)}function r(a,b){this.has(a)?this._values[c]=b:this._values[this._keys.push(a)-1]=b;return this}function t(a){this.has(a)||this._values.push(a);return this}function h(){(this._keys||0).length=this._values.length=
|
|
5
|
-
0}function z(){return k(this._itp,this._keys)}function l(){return k(this._itp,this._values)}function A(){return k(this._itp,this._keys,this._values)}function B(){return k(this._itp,this._values,this._values)}function k(a,b,c){var g=[0],e=!1;a.push(g);return{next:function(){var d=g[0];if(!e&&d<b.length){var f=c?[b[d],c[d]]:b[d];g[0]++}else e=!0,a.splice(a.indexOf(g),1);return{done:e,value:f}}}}function x(){return this._values.length}function u(a,b){for(var c=this.entries();;){var d=c.next();if(d.done)break;
|
|
6
|
-
a.call(b,d.value[1],d.value[0],this)}}var c,w=Object.defineProperty,y=function(a,b){return a===b||a!==a&&b!==b};"undefined"==typeof WeakMap&&(e.WeakMap=d({"delete":f,clear:h,get:m,has:q,set:r},!0));"undefined"!=typeof Map&&"function"===typeof(new Map).values&&(new Map).values().next||(e.Map=d({"delete":f,has:q,get:m,set:r,keys:z,values:l,entries:A,forEach:u,clear:h}));"undefined"!=typeof Set&&"function"===typeof(new Set).values&&(new Set).values().next||(e.Set=d({has:p,add:t,"delete":f,clear:h,keys:l,
|
|
7
|
-
values:l,entries:B,forEach:u}));"undefined"==typeof WeakSet&&(e.WeakSet=d({"delete":f,add:t,clear:h,has:p},!0))})(window);}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export function applyPolyfill(window, document) {/*!
|
|
2
|
-
Object.assign
|
|
3
|
-
*/
|
|
4
|
-
"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(d,f){if(null==d)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(d),b=1;b<arguments.length;b++){var a=arguments[b];if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c])}return e},writable:!0,configurable:!0});
|
|
5
|
-
/*!
|
|
6
|
-
Object.entries
|
|
7
|
-
*/
|
|
8
|
-
Object.entries||(Object.entries=function(c){for(var b=Object.keys(c),a=b.length,d=Array(a);a--;)d[a]=[b[a],c[b[a]]];return d});
|
|
9
|
-
/*!
|
|
10
|
-
Object.values
|
|
11
|
-
*/
|
|
12
|
-
Object.values||(Object.values=function(n){return Object.keys(n).map(function(r){return n[r]})});
|
|
13
|
-
|
|
14
|
-
/*!
|
|
15
|
-
Number
|
|
16
|
-
*/
|
|
17
|
-
void 0===Number.isFinite&&(Number.isFinite=function(a){return"number"===typeof a&&isFinite(a)});
|
|
18
|
-
Number.isNaN=Number.isNaN||function(a){return a!==a};
|
|
19
|
-
Number.isInteger=Number.isInteger||function(a){return"number"===typeof a&&isFinite(a)&&Math.floor(a)===a};
|
|
20
|
-
}
|