create-basicjs 0.1.4 → 0.1.5
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/README.md +2 -2
- package/bin/create-basicjs.js +31 -4
- package/bin/verify-package.js +1 -1
- package/package.json +2 -2
- package/payload/starter/AGENTS.md +11 -6
- package/payload/starter/README.md +1 -1
- package/payload/starter/_basic/VERSION +1 -1
- package/payload/starter/_basic/assets/cards/almond-blossom.png +0 -0
- package/payload/starter/_basic/assets/cards/blackberry.png +0 -0
- package/payload/starter/_basic/assets/cards/borage.png +0 -0
- package/payload/starter/_basic/assets/cards/chamomile.png +0 -0
- package/payload/starter/_basic/assets/cards/dill.png +0 -0
- package/payload/starter/_basic/assets/cards/eucalyptus.png +0 -0
- package/payload/starter/_basic/assets/cards/fennel.png +0 -0
- package/payload/starter/_basic/assets/cards/fig.png +0 -0
- package/payload/starter/_basic/assets/cards/juniper.png +0 -0
- package/payload/starter/_basic/assets/cards/lavender.png +0 -0
- package/payload/starter/_basic/assets/cards/lemon.png +0 -0
- package/payload/starter/_basic/assets/cards/olives.png +0 -0
- package/payload/starter/_basic/assets/cards/oregano.png +0 -0
- package/payload/starter/_basic/assets/cards/pepper.png +0 -0
- package/payload/starter/_basic/assets/cards/physalis.png +0 -0
- package/payload/starter/_basic/assets/cards/pomegranate.png +0 -0
- package/payload/starter/_basic/assets/cards/poppy.png +0 -0
- package/payload/starter/_basic/assets/cards/rosehip.png +0 -0
- package/payload/starter/_basic/assets/cards/saffron.png +0 -0
- package/payload/starter/_basic/assets/categories/cappuccino.png +0 -0
- package/payload/starter/_basic/assets/categories/chocolate-milk.png +0 -0
- package/payload/starter/_basic/assets/categories/coffee.png +0 -0
- package/payload/starter/_basic/assets/categories/frappe.png +0 -0
- package/payload/starter/_basic/assets/categories/iced-caffee.png +0 -0
- package/payload/starter/_basic/assets/categories/milkshake.png +0 -0
- package/payload/starter/_basic/assets/categories/orange-juice.png +0 -0
- package/payload/starter/_basic/assets/categories/tea.png +0 -0
- package/payload/starter/_basic/assets/fruids/brokoli.png +0 -0
- package/payload/starter/_basic/assets/fruids/cilek.png +0 -0
- package/payload/starter/_basic/assets/fruids/domates.png +0 -0
- package/payload/starter/_basic/assets/fruids/elma.png +0 -0
- package/payload/starter/_basic/assets/fruids/havuc.png +0 -0
- package/payload/starter/_basic/assets/fruids/karpuz.png +0 -0
- package/payload/starter/_basic/assets/fruids/limon.png +0 -0
- package/payload/starter/_basic/assets/fruids/muz.png +0 -0
- package/payload/starter/_basic/assets/fruids/nar.png +0 -0
- package/payload/starter/_basic/assets/fruids/patlican.png +0 -0
- package/payload/starter/_basic/assets/fruids/yabanmersini.png +0 -0
- package/payload/starter/_basic/assets/fruids/yesilbiber.png +0 -0
- package/payload/starter/_basic/basic/LICENSE +1 -1
- package/payload/starter/_basic/basic/basic.css +3 -6
- package/payload/starter/_basic/basic/basic.js +154 -60
- package/payload/starter/_basic/basic/basic.min.js +19 -6
- package/payload/starter/_basic/basic/scroll-bar.js +4 -2
- package/payload/starter/_basic/basic/scroll-bar.min.js +1 -0
- package/payload/starter/_basic/comp/accordion.js +659 -0
- package/payload/starter/_basic/comp/action-button.js +22 -23
- package/payload/starter/_basic/comp/action-tab-bar.js +8 -8
- package/payload/starter/_basic/comp/app-bar.js +12 -11
- package/payload/starter/_basic/comp/{badge-v2.js → badge.js} +51 -5
- package/payload/starter/_basic/comp/bottom-bar.js +31 -23
- package/payload/starter/_basic/comp/breadcrumbs.js +4 -2
- package/payload/starter/_basic/comp/canvas.js +652 -0
- package/payload/starter/_basic/comp/chat-view.js +827 -0
- package/payload/starter/_basic/comp/check-box.js +137 -21
- package/payload/starter/_basic/comp/code-editor.js +953 -0
- package/payload/starter/_basic/comp/{select-color.js → color-picker.js} +62 -29
- package/payload/starter/_basic/comp/context-menu.js +342 -30
- package/payload/starter/_basic/comp/{currency-input-b.js → currency-field.js} +48 -29
- package/payload/starter/_basic/comp/data-table.js +114 -42
- package/payload/starter/_basic/comp/{select-date.js → date-picker.js} +104 -52
- package/payload/starter/_basic/comp/dialog.js +214 -76
- package/payload/starter/_basic/comp/email-field.js +65 -0
- package/payload/starter/_basic/comp/{select-file.js → file-picker.js} +245 -57
- package/payload/starter/_basic/comp/filters.js +374 -60
- package/payload/starter/_basic/comp/form.js +38 -26
- package/payload/starter/_basic/comp/full-screen-select.js +36 -33
- package/payload/starter/_basic/comp/gauge.js +12 -8
- package/payload/starter/_basic/comp/graph-box.js +3911 -0
- package/payload/starter/_basic/comp/grid-group.js +185 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button.js +16 -7
- package/payload/starter/_basic/comp/image-view.js +598 -0
- package/payload/starter/_basic/comp/item-list.js +507 -163
- package/payload/starter/_basic/comp/json-editor.js +3221 -0
- package/payload/starter/_basic/comp/json-view.js +597 -0
- package/payload/starter/_basic/comp/label-editor.js +22 -19
- package/payload/starter/_basic/comp/left-menu.js +89 -22
- package/payload/starter/_basic/comp/line-progress-bar.js +196 -45
- package/payload/starter/_basic/comp/loading-screen.js +49 -18
- package/payload/starter/_basic/comp/log-view.js +530 -0
- package/payload/starter/_basic/comp/{login-page-v2.js → login-page.js} +205 -106
- package/payload/starter/_basic/comp/markdown-view.js +1044 -0
- package/payload/starter/_basic/comp/menu-bar.js +624 -0
- package/payload/starter/_basic/comp/mini-graph-box.js +20 -11
- package/payload/starter/_basic/comp/minimal-accent.js +208 -0
- package/payload/starter/_basic/comp/notice.js +15 -13
- package/payload/starter/_basic/comp/{number-input-b.js → number-field.js} +26 -19
- package/payload/starter/_basic/comp/numeric-keyboard.js +15 -13
- package/payload/starter/_basic/comp/page-control.js +21 -4
- package/payload/starter/_basic/comp/page-header.js +7 -6
- package/payload/starter/_basic/comp/password-field.js +192 -0
- package/payload/starter/_basic/comp/period-bar.js +8 -7
- package/payload/starter/_basic/comp/{phone-input-b.js → phone-field.js} +80 -45
- package/payload/starter/_basic/comp/progress-bar.js +401 -85
- package/payload/starter/_basic/comp/property-panel.js +1022 -123
- package/payload/starter/_basic/comp/radio-button.js +79 -19
- package/payload/starter/_basic/comp/range-slider.js +569 -0
- package/payload/starter/_basic/comp/rich-text-editor.js +33 -30
- package/payload/starter/_basic/comp/scroll-area.js +308 -0
- package/payload/starter/_basic/comp/scrolling-text.js +10 -9
- package/payload/starter/_basic/comp/search-input.js +725 -0
- package/payload/starter/_basic/comp/search-results.js +60 -24
- package/payload/starter/_basic/comp/select-box.js +229 -107
- package/payload/starter/_basic/comp/settings-row.js +20 -19
- package/payload/starter/_basic/comp/side-panel.js +53 -10
- package/payload/starter/_basic/comp/slider-field.js +264 -88
- package/payload/starter/_basic/comp/slider.js +541 -86
- package/payload/starter/_basic/comp/smart-button.js +433 -352
- package/payload/starter/_basic/comp/smart-table.js +740 -185
- package/payload/starter/_basic/comp/sortable-list.js +47 -38
- package/payload/starter/_basic/comp/spark-line-box.js +25 -16
- package/payload/starter/_basic/comp/splitter.js +411 -0
- package/payload/starter/_basic/comp/status-bar.js +408 -0
- package/payload/starter/_basic/comp/step-bar.js +345 -0
- package/payload/starter/_basic/comp/stepper.js +77 -49
- package/payload/starter/_basic/comp/tabs.js +67 -18
- package/payload/starter/_basic/comp/tag-input.js +50 -10
- package/payload/starter/_basic/comp/tap-effect.js +6 -4
- package/payload/starter/_basic/comp/text-area-field.js +233 -0
- package/payload/starter/_basic/comp/text-field.js +1006 -0
- package/payload/starter/_basic/comp/time-line.js +102 -28
- package/payload/starter/_basic/comp/{select-time.js → time-picker.js} +104 -51
- package/payload/starter/_basic/comp/tiny-select.js +79 -39
- package/payload/starter/_basic/comp/tiny-table.js +12 -8
- package/payload/starter/_basic/comp/toast.js +87 -34
- package/payload/starter/_basic/comp/toggle.js +147 -27
- package/payload/starter/_basic/comp/tool-bar.js +760 -0
- package/payload/starter/_basic/comp/tooltip.js +80 -17
- package/payload/starter/_basic/comp/tree-view.js +124 -41
- package/payload/starter/_basic/comp/ui-effects.js +17 -11
- package/payload/starter/_basic/comp/ui-standards.js +5 -4
- package/payload/starter/_basic/comp/url-field.js +190 -0
- package/payload/starter/_basic/comp/web-view.js +70 -16
- package/payload/starter/_basic/docs/basic-js-animated-rules.md +15 -9
- package/payload/starter/_basic/docs/basic-js-code-rules.md +42 -5
- package/payload/starter/_basic/docs/basic-js-components.md +12 -17
- package/payload/starter/_basic/docs/basic-js-core.md +5 -4
- package/payload/starter/_basic/docs/component-index.md +245 -104
- package/payload/starter/_basic/docs/component-template.js +28 -24
- package/payload/starter/_basic/docs/handbook/00-introduction.md +6 -2
- package/payload/starter/_basic/docs/handbook/00-what-is-new.md +21 -0
- package/payload/starter/_basic/docs/handbook/01-label.md +4 -4
- package/payload/starter/_basic/docs/handbook/02-box.md +7 -7
- package/payload/starter/_basic/docs/handbook/03-image.md +4 -4
- package/payload/starter/_basic/docs/handbook/04-common-properties.md +6 -5
- package/payload/starter/_basic/docs/handbook/05-autolayout.md +8 -7
- package/payload/starter/_basic/docs/handbook/06-button.md +3 -3
- package/payload/starter/_basic/docs/handbook/07-input.md +3 -3
- package/payload/starter/_basic/docs/handbook/08-page.md +3 -3
- package/payload/starter/_basic/docs/handbook/09-useful-examples.md +39 -58
- package/payload/starter/_basic/docs/handbook/10-motion.md +6 -6
- package/payload/starter/_basic/docs/handbook/11-other-functions.md +1 -0
- package/payload/starter/_basic/docs/handbook/13-sound.md +3 -3
- package/payload/starter/_basic/docs/handbook/14-using-components.md +180 -0
- package/payload/starter/_basic/docs/handbook/15-making-a-component.md +338 -0
- package/payload/starter/_basic/docs/what-is-new.md +106 -0
- package/payload/starter/_basic/examples/accordion.htm +174 -0
- package/payload/starter/_basic/examples/action-button.htm +74 -32
- package/payload/starter/_basic/examples/action-tab-bar.htm +5 -6
- package/payload/starter/_basic/examples/app-bar.htm +63 -41
- package/payload/starter/_basic/examples/badge.htm +96 -0
- package/payload/starter/_basic/examples/bottom-bar-2.htm +61 -48
- package/payload/starter/_basic/examples/bottom-bar.htm +74 -16
- package/payload/starter/_basic/examples/breadcrumbs.htm +160 -150
- package/payload/starter/_basic/examples/canvas.htm +190 -0
- package/payload/starter/_basic/examples/chat-view.htm +143 -0
- package/payload/starter/_basic/examples/check-box-2.htm +71 -82
- package/payload/starter/_basic/examples/check-box-3.htm +72 -83
- package/payload/starter/_basic/examples/check-box.htm +207 -0
- package/payload/starter/_basic/examples/code-editor-2.htm +259 -0
- package/payload/starter/_basic/examples/code-editor.htm +225 -0
- package/payload/starter/_basic/examples/color-picker.htm +206 -0
- package/payload/starter/_basic/examples/context-menu.htm +180 -139
- package/payload/starter/_basic/examples/currency-field.htm +105 -0
- package/payload/starter/_basic/examples/data-table-2.htm +2 -1
- package/payload/starter/_basic/examples/data-table-3.htm +1 -1
- package/payload/starter/_basic/examples/data-table-4.htm +15 -12
- package/payload/starter/_basic/examples/data-table-5.htm +11 -3
- package/payload/starter/_basic/examples/data-table.htm +90 -40
- package/payload/starter/_basic/examples/date-picker.htm +239 -0
- package/payload/starter/_basic/examples/dialog-centered.htm +394 -40
- package/payload/starter/_basic/examples/dialog.htm +267 -46
- package/payload/starter/_basic/examples/email-field.htm +102 -0
- package/payload/starter/_basic/examples/file-picker.htm +296 -0
- package/payload/starter/_basic/examples/filters.htm +33 -22
- package/payload/starter/_basic/examples/{form-1.htm → form.htm} +18 -19
- package/payload/starter/_basic/examples/full-screen-select.htm +81 -58
- package/payload/starter/_basic/examples/gauge.htm +95 -81
- package/payload/starter/_basic/examples/graph-box.htm +365 -0
- package/payload/starter/_basic/examples/grid-group.htm +179 -0
- package/payload/starter/_basic/examples/hold-to-confirm-button.htm +102 -113
- package/payload/starter/_basic/examples/image-view.htm +195 -0
- package/payload/starter/_basic/examples/item-list-2.htm +138 -94
- package/payload/starter/_basic/examples/item-list.htm +191 -86
- package/payload/starter/_basic/examples/json-editor.htm +206 -0
- package/payload/starter/_basic/examples/json-view.htm +153 -0
- package/payload/starter/_basic/examples/label-editor.htm +85 -89
- package/payload/starter/_basic/examples/left-menu-2.htm +93 -0
- package/payload/starter/_basic/examples/left-menu.htm +42 -37
- package/payload/starter/_basic/examples/line-progress-bar.htm +155 -114
- package/payload/starter/_basic/examples/loading-screen.htm +149 -125
- package/payload/starter/_basic/examples/log-view.htm +175 -0
- package/payload/starter/_basic/examples/{login-page-dark-v2.htm → login-page-dark.htm} +265 -267
- package/payload/starter/_basic/examples/{login-page-v2.htm → login-page.htm} +266 -267
- package/payload/starter/_basic/examples/markdown-view.htm +220 -0
- package/payload/starter/_basic/examples/menu-bar-2.htm +225 -0
- package/payload/starter/_basic/examples/menu-bar.htm +145 -0
- package/payload/starter/_basic/examples/mini-graph-box.htm +98 -109
- package/payload/starter/_basic/examples/minimal-accent.htm +196 -0
- package/payload/starter/_basic/examples/minimal-theme.htm +432 -0
- package/payload/starter/_basic/examples/notice.htm +13 -4
- package/payload/starter/_basic/examples/number-field.htm +103 -0
- package/payload/starter/_basic/examples/numeric-keyboard.htm +44 -42
- package/payload/starter/_basic/examples/page-control.htm +181 -130
- package/payload/starter/_basic/examples/page-header.htm +57 -30
- package/payload/starter/_basic/examples/password-field.htm +117 -0
- package/payload/starter/_basic/examples/period-bar.htm +43 -29
- package/payload/starter/_basic/examples/phone-field-select-country.htm +292 -0
- package/payload/starter/_basic/examples/phone-field.htm +104 -0
- package/payload/starter/_basic/examples/progress-bar-ozden.htm +229 -92
- package/payload/starter/_basic/examples/progress-bar.htm +222 -174
- package/payload/starter/_basic/examples/property-panel.htm +152 -52
- package/payload/starter/_basic/examples/radio-button-2.htm +101 -109
- package/payload/starter/_basic/examples/radio-button-3.htm +81 -71
- package/payload/starter/_basic/examples/radio-button.htm +289 -0
- package/payload/starter/_basic/examples/range-slider.htm +171 -0
- package/payload/starter/_basic/examples/rich-text-editor.htm +115 -110
- package/payload/starter/_basic/examples/scroll-area.htm +293 -0
- package/payload/starter/_basic/examples/scrolling-text.htm +27 -6
- package/payload/starter/_basic/examples/search-input-2-light.htm +112 -0
- package/payload/starter/_basic/examples/search-input-3-dark.htm +105 -0
- package/payload/starter/_basic/examples/{search-input-v2-place.htm → search-input-place.htm} +25 -26
- package/payload/starter/_basic/examples/search-input.htm +159 -0
- package/payload/starter/_basic/examples/search-results.htm +85 -88
- package/payload/starter/_basic/examples/select-box-ozden-dark-text.htm +70 -0
- package/payload/starter/_basic/examples/select-box-ozden-item.htm +6 -5
- package/payload/starter/_basic/examples/select-box-ozden-text.htm +5 -3
- package/payload/starter/_basic/examples/select-box.htm +190 -159
- package/payload/starter/_basic/examples/settings-row.htm +92 -43
- package/payload/starter/_basic/examples/side-panel-2.htm +63 -25
- package/payload/starter/_basic/examples/side-panel.htm +84 -70
- package/payload/starter/_basic/examples/slider-2-classic.htm +152 -0
- package/payload/starter/_basic/examples/slider-field-ozden.htm +286 -0
- package/payload/starter/_basic/examples/slider-field.htm +174 -134
- package/payload/starter/_basic/examples/slider.htm +257 -180
- package/payload/starter/_basic/examples/smart-button-3-ozden.htm +170 -257
- package/payload/starter/_basic/examples/smart-button-4-dark.htm +86 -47
- package/payload/starter/_basic/examples/smart-button-5-features.htm +130 -125
- package/payload/starter/_basic/examples/smart-button-alternatif.htm +266 -0
- package/payload/starter/_basic/examples/smart-button.htm +207 -174
- package/payload/starter/_basic/examples/smart-table-2.htm +43 -56
- package/payload/starter/_basic/examples/smart-table-3.htm +148 -113
- package/payload/starter/_basic/examples/smart-table-4.htm +37 -50
- package/payload/starter/_basic/examples/{smart-table-1.htm → smart-table-5.htm} +37 -48
- package/payload/starter/_basic/examples/smart-table.htm +183 -0
- package/payload/starter/_basic/examples/sortable-list.htm +191 -142
- package/payload/starter/_basic/examples/spark-line-box.htm +149 -161
- package/payload/starter/_basic/examples/splitter.htm +164 -0
- package/payload/starter/_basic/examples/status-bar.htm +166 -0
- package/payload/starter/_basic/examples/step-bar.htm +129 -0
- package/payload/starter/_basic/examples/stepper-2.htm +71 -59
- package/payload/starter/_basic/examples/stepper.htm +146 -135
- package/payload/starter/_basic/examples/tabs-2.htm +58 -67
- package/payload/starter/_basic/examples/tabs.htm +197 -180
- package/payload/starter/_basic/examples/tag-input.htm +150 -153
- package/payload/starter/_basic/examples/tap-effect.htm +23 -19
- package/payload/starter/_basic/examples/text-area-field.htm +104 -0
- package/payload/starter/_basic/examples/text-field-2.htm +113 -0
- package/payload/starter/_basic/examples/text-field-3-style.htm +105 -0
- package/payload/starter/_basic/examples/text-field-4-custom-unit.htm +96 -0
- package/payload/starter/_basic/examples/{input-b-ex5-warning-icon.htm → text-field-5-warning-icon.htm} +19 -19
- package/payload/starter/_basic/examples/text-field-6-modern-dark.htm +114 -0
- package/payload/starter/_basic/examples/text-field-7-modern.htm +106 -0
- package/payload/starter/_basic/examples/text-field-8-light-dark.htm +159 -0
- package/payload/starter/_basic/examples/text-field.htm +163 -0
- package/payload/starter/_basic/examples/time-line.htm +180 -116
- package/payload/starter/_basic/examples/time-picker.htm +240 -0
- package/payload/starter/_basic/examples/tiny-select.htm +118 -86
- package/payload/starter/_basic/examples/tiny-table.htm +40 -34
- package/payload/starter/_basic/examples/toast.htm +145 -147
- package/payload/starter/_basic/examples/toggle-2.htm +99 -68
- package/payload/starter/_basic/examples/toggle-3.htm +104 -101
- package/payload/starter/_basic/examples/toggle.htm +161 -93
- package/payload/starter/_basic/examples/tool-bar.htm +172 -0
- package/payload/starter/_basic/examples/tooltip-2.htm +110 -60
- package/payload/starter/_basic/examples/tooltip-3.htm +124 -65
- package/payload/starter/_basic/examples/tooltip-4.htm +218 -0
- package/payload/starter/_basic/examples/tooltip.htm +206 -124
- package/payload/starter/_basic/examples/tree-view.htm +210 -182
- package/payload/starter/_basic/examples/ui-effects.htm +207 -185
- package/payload/starter/_basic/examples/ui-standards.htm +200 -139
- package/payload/starter/_basic/examples/url-field.htm +120 -0
- package/payload/starter/_basic/examples/web-view.htm +109 -110
- package/payload/starter/_basic/min/accordion.min.js +2 -0
- package/payload/starter/_basic/min/action-button.min.js +1 -1
- package/payload/starter/_basic/min/app-bar.min.js +1 -1
- package/payload/starter/_basic/min/badge.min.js +2 -0
- package/payload/starter/_basic/min/bottom-bar.min.js +1 -1
- package/payload/starter/_basic/min/canvas.min.js +2 -0
- package/payload/starter/_basic/min/chat-view.min.js +2 -0
- package/payload/starter/_basic/min/check-box.min.js +1 -1
- package/payload/starter/_basic/min/code-editor.min.js +2 -0
- package/payload/starter/_basic/min/color-picker.min.js +2 -0
- package/payload/starter/_basic/min/context-menu.min.js +1 -1
- package/payload/starter/_basic/min/currency-field.min.js +2 -0
- package/payload/starter/_basic/min/data-table.min.js +1 -1
- package/payload/starter/_basic/min/date-picker.min.js +2 -0
- package/payload/starter/_basic/min/dialog.min.js +1 -1
- package/payload/starter/_basic/min/email-field.min.js +2 -0
- package/payload/starter/_basic/min/file-picker.min.js +2 -0
- package/payload/starter/_basic/min/filters.min.js +1 -1
- package/payload/starter/_basic/min/form.min.js +1 -1
- package/payload/starter/_basic/min/full-screen-select.min.js +1 -1
- package/payload/starter/_basic/min/gauge.min.js +1 -1
- package/payload/starter/_basic/min/graph-box.min.js +2 -0
- package/payload/starter/_basic/min/grid-group.min.js +2 -0
- package/payload/starter/_basic/min/hold-to-confirm-button.min.js +1 -1
- package/payload/starter/_basic/min/image-view.min.js +2 -0
- package/payload/starter/_basic/min/item-list.min.js +1 -1
- package/payload/starter/_basic/min/json-editor.min.js +2 -0
- package/payload/starter/_basic/min/json-view.min.js +2 -0
- package/payload/starter/_basic/min/label-editor.min.js +1 -1
- package/payload/starter/_basic/min/left-menu.min.js +1 -1
- package/payload/starter/_basic/min/line-progress-bar.min.js +1 -1
- package/payload/starter/_basic/min/loading-screen.min.js +1 -1
- package/payload/starter/_basic/min/log-view.min.js +2 -0
- package/payload/starter/_basic/min/login-page.min.js +2 -0
- package/payload/starter/_basic/min/markdown-view.min.js +2 -0
- package/payload/starter/_basic/min/menu-bar.min.js +2 -0
- package/payload/starter/_basic/min/mini-graph-box.min.js +1 -1
- package/payload/starter/_basic/min/minimal-accent.min.js +2 -0
- package/payload/starter/_basic/min/notice.min.js +1 -1
- package/payload/starter/_basic/min/number-field.min.js +2 -0
- package/payload/starter/_basic/min/numeric-keyboard.min.js +1 -1
- package/payload/starter/_basic/min/page-control.min.js +1 -1
- package/payload/starter/_basic/min/password-field.min.js +2 -0
- package/payload/starter/_basic/min/phone-field.min.js +2 -0
- package/payload/starter/_basic/min/progress-bar.min.js +1 -1
- package/payload/starter/_basic/min/property-panel.min.js +1 -1
- package/payload/starter/_basic/min/radio-button.min.js +1 -1
- package/payload/starter/_basic/min/range-slider.min.js +2 -0
- package/payload/starter/_basic/min/rich-text-editor.min.js +1 -1
- package/payload/starter/_basic/min/scroll-area.min.js +2 -0
- package/payload/starter/_basic/min/scrolling-text.min.js +1 -1
- package/payload/starter/_basic/min/search-input.min.js +2 -0
- package/payload/starter/_basic/min/search-results.min.js +1 -1
- package/payload/starter/_basic/min/select-box.min.js +1 -1
- package/payload/starter/_basic/min/settings-row.min.js +1 -1
- package/payload/starter/_basic/min/side-panel.min.js +1 -1
- package/payload/starter/_basic/min/slider-field.min.js +1 -1
- package/payload/starter/_basic/min/slider.min.js +1 -1
- package/payload/starter/_basic/min/smart-button.min.js +1 -1
- package/payload/starter/_basic/min/smart-table.min.js +1 -1
- package/payload/starter/_basic/min/sortable-list.min.js +1 -1
- package/payload/starter/_basic/min/spark-line-box.min.js +1 -1
- package/payload/starter/_basic/min/splitter.min.js +2 -0
- package/payload/starter/_basic/min/status-bar.min.js +2 -0
- package/payload/starter/_basic/min/step-bar.min.js +2 -0
- package/payload/starter/_basic/min/stepper.min.js +1 -1
- package/payload/starter/_basic/min/tabs.min.js +1 -1
- package/payload/starter/_basic/min/tag-input.min.js +1 -1
- package/payload/starter/_basic/min/text-area-field.min.js +2 -0
- package/payload/starter/_basic/min/text-field.min.js +2 -0
- package/payload/starter/_basic/min/time-line.min.js +1 -1
- package/payload/starter/_basic/min/time-picker.min.js +2 -0
- package/payload/starter/_basic/min/tiny-select.min.js +1 -1
- package/payload/starter/_basic/min/toast.min.js +1 -1
- package/payload/starter/_basic/min/toggle.min.js +1 -1
- package/payload/starter/_basic/min/tool-bar.min.js +2 -0
- package/payload/starter/_basic/min/tooltip.min.js +1 -1
- package/payload/starter/_basic/min/tree-view.min.js +1 -1
- package/payload/starter/_basic/min/ui-effects.min.js +1 -1
- package/payload/starter/_basic/min/url-field.min.js +2 -0
- package/payload/starter/_basic/min/web-view.min.js +1 -1
- package/payload/templates/booking/app/app.js +11 -8
- package/payload/templates/booking/app/settings.js +4 -4
- package/payload/templates/booking/index.htm +3 -3
- package/payload/templates/booking/pages/account.js +6 -6
- package/payload/templates/booking/pages/book.js +1 -1
- package/payload/templates/booking/pages/services.js +5 -4
- package/payload/templates/classic/app/app.js +15 -11
- package/payload/templates/classic/app/settings.js +22 -20
- package/payload/templates/classic/assets/_attribute.txt +2 -0
- package/payload/templates/classic/assets/cards/dill.png +0 -0
- package/payload/templates/classic/assets/cards/fennel.png +0 -0
- package/payload/templates/classic/assets/cards/juniper.png +0 -0
- package/payload/templates/classic/assets/cards/olives.png +0 -0
- package/payload/templates/classic/assets/cards/oregano.png +0 -0
- package/payload/templates/classic/assets/cards/pepper.png +0 -0
- package/payload/templates/classic/assets/cards/rosehip.png +0 -0
- package/payload/templates/classic/assets/categories/cappuccino.png +0 -0
- package/payload/templates/classic/assets/categories/chocolate-milk.png +0 -0
- package/payload/templates/classic/assets/categories/coffee.png +0 -0
- package/payload/templates/classic/assets/categories/frappe.png +0 -0
- package/payload/templates/classic/assets/categories/iced-caffee.png +0 -0
- package/payload/templates/classic/assets/categories/milkshake.png +0 -0
- package/payload/templates/classic/assets/categories/orange-juice.png +0 -0
- package/payload/templates/classic/assets/categories/tea.png +0 -0
- package/payload/templates/classic/index.htm +2 -2
- package/payload/templates/classic/pages/example.js +10 -10
- package/payload/templates/classic/pages/examples.js +44 -43
- package/payload/templates/classic/pages/home.js +16 -15
- package/payload/templates/classic/pages/info-pages.js +5 -5
- package/payload/templates/classic/pages/search.js +8 -7
- package/payload/templates/classic/pages/settings.js +13 -13
- package/payload/templates/classic/pages/tasks.js +1 -0
- package/payload/templates/classic/pages/template-pages.js +12 -11
- package/payload/templates/coffee-shop/app/app.js +12 -8
- package/payload/templates/coffee-shop/app/settings.js +4 -4
- package/payload/templates/coffee-shop/index.htm +3 -3
- package/payload/templates/coffee-shop/pages/drink.js +1 -1
- package/payload/templates/coffee-shop/pages/menu.js +5 -4
- package/payload/templates/forms/TEMPLATE.md +1 -1
- package/payload/templates/forms/appointment-form.htm +55 -53
- package/payload/templates/forms/contact-form-to-mail.htm +38 -37
- package/payload/templates/forms/contact-form-to-supabase.htm +47 -46
- package/payload/templates/forms/dark-contact-form.htm +43 -40
- package/payload/templates/forms/event-registration-form.htm +80 -77
- package/payload/templates/forms/feedback-form.htm +54 -54
- package/payload/templates/forms/order-form.htm +88 -84
- package/payload/templates/forms/recruitment-form.htm +60 -60
- package/payload/templates/forms/service/readme.md +9 -8
- package/payload/templates/forms/service/send-form-mail.php +38 -21
- package/payload/templates/forms/support-ticket-form.htm +67 -65
- package/payload/templates/panel/common/module-page.js +2 -2
- package/payload/templates/panel/common/theme.js +37 -10
- package/payload/templates/panel/common/top-bar.js +45 -40
- package/payload/templates/panel/index.htm +59 -60
- package/payload/templates/panel/module10/greenhouse.htm +98 -113
- package/payload/templates/panel/module11/arduino-projects.htm +47 -58
- package/payload/templates/panel/module6/energy-hub.htm +71 -103
- package/payload/templates/panel/module7/3d-printers.htm +58 -81
- package/payload/templates/panel/module8/cold-rooms.htm +58 -79
- package/payload/templates/panel/module9/elevator-fleet.htm +72 -93
- package/payload/templates/panel/pages/activity.js +134 -152
- package/payload/templates/panel/pages/contents.js +291 -308
- package/payload/templates/panel/pages/customers.js +250 -267
- package/payload/templates/panel/pages/edit-user.js +31 -30
- package/payload/templates/panel/pages/home.js +39 -70
- package/payload/templates/panel/pages/media.js +166 -183
- package/payload/templates/panel/pages/notifications.js +7 -7
- package/payload/templates/panel/pages/orders.js +200 -217
- package/payload/templates/panel/pages/products.js +259 -278
- package/payload/templates/panel/pages/reports.js +74 -123
- package/payload/templates/panel/pages/roles.js +57 -60
- package/payload/templates/panel/pages/settings.js +127 -143
- package/payload/templates/panel/pages/user-actions.js +106 -110
- package/payload/templates/panel/pages/user-list.js +221 -238
- package/payload/templates/panel/pages/users.js +14 -29
- package/payload/templates/shop/TEMPLATE.md +1 -1
- package/payload/templates/shop/app/app.js +11 -8
- package/payload/templates/shop/app/settings.js +4 -4
- package/payload/templates/shop/index.htm +3 -3
- package/payload/templates/shop/pages/account.js +7 -7
- package/payload/templates/shop/pages/cart.js +1 -1
- package/payload/templates/shop/pages/checkout.js +2 -2
- package/payload/templates/shop/pages/product.js +2 -2
- package/payload/templates/shop/pages/shop.js +6 -5
- package/payload/templates/starter/TEMPLATE.md +1 -1
- package/payload/templates/starter/app/app.js +12 -8
- package/payload/templates/starter/app/settings.js +14 -11
- package/payload/templates/starter/index.htm +3 -3
- package/payload/templates/starter/pages/about.js +1 -1
- package/payload/templates/starter/pages/home.js +2 -2
- package/payload/templates/starter/pages/product.js +1 -1
- package/payload/templates/starter/pages/products.js +5 -5
- package/payload/templates/starter/pages/settings.js +1 -1
- package/payload/templates/starter/pages/tasks.js +8 -8
- package/payload/templates/starter/pages/website.js +1 -1
- package/payload/starter/_basic/comp/chart-box/chart-4.5.1.umd.min.js +0 -13
- package/payload/starter/_basic/comp/chart-box/chart-js-LICENSE.md +0 -9
- package/payload/starter/_basic/comp/chart-box.js +0 -868
- package/payload/starter/_basic/comp/email-input-b.js +0 -57
- package/payload/starter/_basic/comp/input-b.js +0 -759
- package/payload/starter/_basic/comp/password-input-b.js +0 -164
- package/payload/starter/_basic/comp/search-input-v2.js +0 -427
- package/payload/starter/_basic/comp/textarea-b.js +0 -184
- package/payload/starter/_basic/comp/url-input-b.js +0 -145
- package/payload/starter/_basic/examples/badgeV2.htm +0 -68
- package/payload/starter/_basic/examples/chart-box.htm +0 -287
- package/payload/starter/_basic/examples/check-box-1.htm +0 -220
- package/payload/starter/_basic/examples/currency-input-b.htm +0 -71
- package/payload/starter/_basic/examples/email-input-b.htm +0 -67
- package/payload/starter/_basic/examples/input-b-ex1.htm +0 -132
- package/payload/starter/_basic/examples/input-b-ex2.htm +0 -136
- package/payload/starter/_basic/examples/input-b-ex3-style.htm +0 -113
- package/payload/starter/_basic/examples/input-b-ex4-custom-unit.htm +0 -112
- package/payload/starter/_basic/examples/input-b-ex6-dark.htm +0 -108
- package/payload/starter/_basic/examples/input-b-ex7-ozden.htm +0 -153
- package/payload/starter/_basic/examples/number-input-b.htm +0 -68
- package/payload/starter/_basic/examples/password-input-b.htm +0 -70
- package/payload/starter/_basic/examples/phone-input-b-select-country.htm +0 -298
- package/payload/starter/_basic/examples/phone-input-b.htm +0 -72
- package/payload/starter/_basic/examples/radio-button-1.htm +0 -264
- package/payload/starter/_basic/examples/search-input-v2-ozden.htm +0 -128
- package/payload/starter/_basic/examples/search-input-v2.htm +0 -65
- package/payload/starter/_basic/examples/select-color.htm +0 -215
- package/payload/starter/_basic/examples/select-date.htm +0 -244
- package/payload/starter/_basic/examples/select-file.htm +0 -268
- package/payload/starter/_basic/examples/select-time.htm +0 -249
- package/payload/starter/_basic/examples/smart-button-2.htm +0 -220
- package/payload/starter/_basic/examples/textarea-b.htm +0 -76
- package/payload/starter/_basic/examples/unfinished-login-page-dark-supabase.htm +0 -221
- package/payload/starter/_basic/examples/unfinished-login-page-supabase.htm +0 -221
- package/payload/starter/_basic/examples/url-input-b.htm +0 -85
- package/payload/starter/_basic/min/badge-v2.min.js +0 -2
- package/payload/starter/_basic/min/chart-box.min.js +0 -2
- package/payload/starter/_basic/min/currency-input-b.min.js +0 -2
- package/payload/starter/_basic/min/email-input-b.min.js +0 -2
- package/payload/starter/_basic/min/input-b.min.js +0 -2
- package/payload/starter/_basic/min/login-page-v2.min.js +0 -2
- package/payload/starter/_basic/min/number-input-b.min.js +0 -2
- package/payload/starter/_basic/min/password-input-b.min.js +0 -2
- package/payload/starter/_basic/min/phone-input-b.min.js +0 -2
- package/payload/starter/_basic/min/search-input-v2.min.js +0 -2
- package/payload/starter/_basic/min/select-color.min.js +0 -2
- package/payload/starter/_basic/min/select-date.min.js +0 -2
- package/payload/starter/_basic/min/select-file.min.js +0 -2
- package/payload/starter/_basic/min/select-time.min.js +0 -2
- package/payload/starter/_basic/min/textarea-b.min.js +0 -2
- package/payload/starter/_basic/min/url-input-b.min.js +0 -2
- package/payload/templates/panel/common/bridge.min.js +0 -0
- package/payload/templates/panel/common/full-view.min.js +0 -1
- package/payload/templates/panel/common/main-view.min.js +0 -1
- package/payload/templates/panel/common/module-page.min.js +0 -1
- package/payload/templates/panel/common/right-view.min.js +0 -1
- package/payload/templates/panel/common/start-page.min.js +0 -1
- package/payload/templates/panel/common/top-bar-v25-07-29-1.js +0 -330
- package/payload/templates/panel/common/top-bar-v25-07-29-2.js +0 -265
- package/payload/templates/panel/common/top-bar.min.js +0 -1
- package/payload/templates/panel/common/ui-standards.min.js +0 -1
- package/payload/templates/panel/managers/database.min.js +0 -1
- package/payload/templates/panel/managers/login.min.js +0 -1
- package/payload/templates/panel/pages/_page-template.min.js +0 -1
- package/payload/templates/panel/pages/contents.min.js +0 -1
- package/payload/templates/panel/pages/edit-user.min.js +0 -1
- package/payload/templates/panel/pages/edit-users-table.min.js +0 -1
- package/payload/templates/panel/pages/home.min.js +0 -1
- package/payload/templates/panel/pages/notifications.min.js +0 -1
- package/payload/templates/panel/pages/reports.min.js +0 -1
- package/payload/templates/panel/pages/settings.min.js +0 -1
- package/payload/templates/panel/pages/user-actions.min.js +0 -2
- package/payload/templates/panel/pages/users.min.js +0 -1
- /package/payload/starter/_basic/comp/{password-input-b → password-field}/hide-btn.png +0 -0
- /package/payload/starter/_basic/comp/{password-input-b → password-field}/hide-btn2.png +0 -0
- /package/payload/starter/_basic/comp/{password-input-b → password-field}/show-btn.png +0 -0
- /package/payload/starter/_basic/comp/{password-input-b → password-field}/show-btn2.png +0 -0
- /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/clear-round.svg +0 -0
- /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/clear.svg +0 -0
- /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/filter.png +0 -0
- /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/filter.svg +0 -0
- /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/search.svg +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* Bismillah */
|
|
2
|
+
"use strict";const GraphBoxDefaults={key:"0",width:500,height:300,type:"line",theme:"light",titleText:"",subtitleText:"",labels:null,values:null,datasets:null,data:null,legend:"auto",stacked:0,horizontal:0,totalText:"Total",targetLines:null,maxSlices:8,otherText:"Other",centerText:"",centerSubText:"",beginAtZero:1,minValue:null,maxValue:null,softMinValue:null,softMaxValue:null,valueStep:0,minX:null,maxX:null,sizeText:"Size",xAxisText:"",yAxisText:"",showValues:0,tableView:0,tableHeadText:"",maxLabels:0,curve:"linear",showPoints:"auto",formatValue:null,formatX:null,locale:"",maxCount:0,emptyText:"No data",animated:0,onClick:function(t,e,n){},style:{box:{color:"",border:1,borderColor:"",round:12,padding:16,gap:12},colors:{},title:{fontSize:16,fontFamily:"opensans-bold"},subtitle:{fontSize:12},legend:{keys:{line:{width:14,height:2,round:1},box:{width:10,height:10,round:2},dot:{width:8,height:8,round:4}},fontSize:12,gap:14,lineGap:6,keyGap:6,hiddenOpacity:.4,sideMinWidth:400,maxSideShare:"45%",maxLinesShare:"40%"},axis:{fontSize:12,fontFamily:"opensans, system-ui, -apple-system, 'Segoe UI', sans-serif",labelGap:8,tickSpace:32,sideTickSpace:90,labelSpace:10,labelAngle:35,maxLabelShare:.3,maxSideLabelShare:.35},bar:{maxThickness:24,round:4,gap:2,minLength:1,bandShare:.72},line:{width:2,pointRadius:4,pointRing:2,pointSpace:18,fillOpacity:.1,gradientOpacity:.3,dash:"5 5",changeOpacity:.3},target:{width:1.5,dash:"6 4",labelGap:3},pie:{otherRows:5,gap:2,hole:.62,hoverGrow:4,changeOpacity:.4,centerFontSize:26},radar:{ringSpace:16,fillOpacity:.15,maxLabelShare:.28,showTicks:1},scatter:{maxBubble:22,bubbleOpacity:.65,hitRadius:14},values:{gap:4,sidePadding:3},table:{fontSize:12,rowHeight:28,cellPadding:8,headFontFamily:"opensans-bold"},tooltip:{fontSize:12,round:6,padding:[10,8],gap:4,keyWidth:12,keyHeight:3,distance:14,edge:4,maxNameWidth:180,shadow:"0 4px 14px rgba(0, 0, 0, 0.18)"}}},GraphBox=function(t={}){t.styleName&&console.warn('GraphBox: styleName is not used. The colors come with theme ("light", "dark", "auto", "minimal", "minimalDark"), the shapes with style.');const e=GraphBox.THEMES[t.theme];if(e&&e.style){const n={};mergeIntoIfMissing(n,t.style||{}),mergeIntoIfMissing(n,e.style),t.style=n}mergeIntoIfMissing(t,GraphBoxDefaults);const n={labels:t.labels,values:t.values,datasets:t.datasets,data:t.data},o=Object.assign({},t);Object.keys(n).forEach(function(t){delete o[t]});const i=startObject(o);let a=i.style;const r={top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"},l={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},s=i.onClick!==GraphBoxDefaults.onClick,u=2*Math.PI,c=-Math.PI/2,f=new Map,d=new Map,h=new Set,p=[];let x,m,g,b,y,C,M,T,S=null,w=null,B=null,G=null,v="",k="",E="",A=new Map,I=null,P=0,z=null,F=0,R=null;i.data=null,i.svg=null,i.legendItems=[];const L=function(t){return Object.assign({},t,{data:(t.data||[]).slice()})},H=function(t){return{labels:(t.labels||[]).slice(),datasets:(t.datasets||[]).map(L)}},V=function(t){if(null==t||""===t)return null;const e=Number(t);return isFinite(e)?e:null},O=function(t,e){return V(t.data[e])},N=function(t){const e=i.data.labels[t];return null==e?"":String(e)},W=function(t){return i.formatValue?String(i.formatValue(t)):GraphBox.formatNumber(t,i.locale)},D=function(t,e){return i.formatValue?String(i.formatValue(t)):GraphBox.formatCompactNumber(t,i.locale,e)},_=function(t,e){return t.label||"#"+e},j=function(t,e){const n=new Set;t.forEach(function(t){e.has(t)&&n.add(e.get(t))}),t.forEach(function(t){if(e.has(t))return;let o=0;for(;n.has(o);)o++;n.add(o),e.set(t,o)})},X=function(t,e){return t.color?t.color:S.colors[f.get(_(t,e))]||S.otherColor},Y=function(t){return _(t.dataset,t.datasetIndex)},Z=function(t,e){const n=t.dataset.colors;return n&&n[e]||t.color},U=function(){return a.box.color||S.backgroundColor},q=function(t,e){const n=document.createElementNS("http://www.w3.org/2000/svg",t);for(const t in e)n.setAttribute(t,e[t]);return n},Q=function(t,e,n){const o=q(e,n);return t.appendChild(o),o},J=function(t,e,n,o,i,a){return Q(t,"line",{x1:e,y1:n,x2:o,y2:i,stroke:a,"stroke-width":1})},$=function(t,e,n,o,i="middle",a=S.mutedTextColor){const r=Q(t,"text",{x:n,y:o,fill:a,"text-anchor":i,"dominant-baseline":"central"});return r.textContent=e,r},K=function(t,e,n,o,i){A.set(t+"|"+e+"|"+n,Object.assign({shape:o},i))},tt=function(t){return Math.round(t)+.5},et=function(t){return GraphBox.measureText(t,a.axis.fontSize,a.axis.fontFamily)},nt=function(){return Math.ceil(1.4*a.axis.fontSize)},ot=function(t){return t.reduce(function(t,e){return Math.max(t,et(e))},0)},it=function(t){return t.type||i.type},at=function(t){return"bar"===it(t.dataset)},rt=function(t){return!at(t)},lt=function(){const t=[];return i.data.datasets.forEach(function(e,n){basic.isOn(e.hidden)||t.push({dataset:e,datasetIndex:n,color:X(e,n)})}),t},st=function(t){return t.reduce(function(t,e){return Math.max(t,e.dataset.data.length)},i.data.labels.length)},ut=function(){return 1==i.stacked&&"radar"!==i.type},ct=function(t,e,n){const o=O(t.dataset,e);if(null===o)return null;if(!ut())return{from:0,to:o};const i=n[function(t,e){return at(t)?e<0?"barsUnderBase":"barsOverBase":"lines"}(t,o)],a=i[e]||0;return i[e]=a+o,{from:a,to:a+o}},ft=function(t,e){const n={lines:[],barsOverBase:[],barsUnderBase:[]};t.forEach(function(t){t.ranges=[];for(let o=0;o<e;o++)t.ranges.push(ct(t,o,n))})},dt=function(t){let e=1/0,n=-1/0;if(t.forEach(function(t){t.ranges.forEach(function(t){t&&(e=Math.min(e,t.to),n=Math.max(n,t.to))})}),e===1/0)return null;mt().forEach(function(t){e=Math.min(e,t),n=Math.max(n,t)}),(1==i.beginAtZero||t.some(at))&&(e=Math.min(e,0),n=Math.max(n,0));const o=ht(e,n,i.minValue,i.maxValue);return o.fixedStep=V(i.valueStep),o},ht=function(t,e,n,o){const i=V(n),a=V(o);return{low:null===i?t:i,high:null===a?e:a,hasFixedLow:null!==i,hasFixedHigh:null!==a}},pt=function(t,e,n=a.axis.tickSpace,o=D){const i=Math.max(2,Math.floor(e/n)),r=GraphBox.niceScale(t.low,t.high,i,t.fixedStep);return t.hasFixedLow&&(r.min=t.low),t.hasFixedHigh&&(r.max=t.high),r.ticks=r.ticks.filter(function(t){return t>=r.min&&t<=r.max}),r.tickTexts=r.ticks.map(function(t){return o(t,r.decimals)}),r},xt=function(){return(i.targetLines||[]).filter(function(t){return null!==V(t.value)})},mt=function(){const t=[V(i.softMinValue),V(i.softMaxValue)].filter(function(t){return null!==t});return xt().map(function(t){return V(t.value)}).concat(t)},gt=function(t){return t.color||S.targetColor},bt=function(t,e,n,o,i,a){const r=$(t,e,n,o,i,a);return r.setAttribute("stroke",U()),r.setAttribute("stroke-width",3),r.setAttribute("paint-order","stroke"),r},yt=function(t,e,n,o,i){const r=i?{x:o,y:n.top}:{x:n.left,y:o},l=i?{x:o,y:n.bottom}:{x:n.right,y:o},s=Q(C,"line",{x1:r.x,y1:r.y,x2:l.x,y2:l.y,stroke:gt(t),"stroke-width":a.target.width,"stroke-dasharray":a.target.dash});K("target",e,0,s,{point:r});const u=function(t){return void 0===t.label?W(V(t.value)):String(t.label)}(t);u&&(i?function(t,e,n){const o=e.top+nt()/2,i=a.target.labelGap+1,r=n+i+et(t)<=e.right;bt(T,t,r?n+i:n-i,o,r?"start":"end",S.textColor)}(u,n,o):function(t,e,n){const o=nt(),i=o/2+a.target.labelGap,r=n-i-o/2>=0?n-i:n+i;bt(T,t,e.right,r,"end",S.textColor)}(u,n,o))},Ct=function(t,e,n,o){xt().forEach(function(i,a){const r=V(i.value);r<e.min||r>e.max||yt(i,a,t,n(r),o)})},Mt=function(t){for(let e=t.dataset.data.length-1;e>=0;e--){const n=O(t.dataset,e);if(null!==n)return n}return null},Tt=function(t){if(!basic.isOn(i.showValues))return{top:0,bottom:0,start:0,end:0};const e=1==i.horizontal,n=nt(),o=a.axis.labelGap,r=!e&&!ut()&&t.some(at),l=function(t){const e=1==i.horizontal,n=[];return t.forEach(function(t){if(!at(t)){const o=Mt(t);return void(null===o||e||n.push(W(o)))}e&&!ut()&&t.dataset.data.forEach(function(t){const e=V(t);null!==e&&n.push(W(e))})}),n}(t),s=function(t){if(ut())return[];const e=[];return t.filter(at).forEach(function(t){t.dataset.data.forEach(function(t){const n=V(t);null!==n&&n<0&&e.push(W(n))})}),e}(t);return{top:r?n:0,bottom:!e&&s.length?n:0,start:e&&s.length?Math.ceil(ot(s))+o:0,end:l.length?Math.ceil(ot(l))+o:0}},St=function(){const t=nt()+2;return{left:i.yAxisText?t:0,bottom:i.xAxisText?t:0}},wt=function(t){const e=Gt();GraphBox._idCounter+=1;const n="graph-box-clip-"+GraphBox._idCounter,o=Q(m,"clipPath",{id:n});Q(o,"rect",{x:t.left-e,y:t.top-e,width:t.right-t.left+2*e,height:t.bottom-t.top+2*e}),y.setAttribute("clip-path","url(#"+n+")"),M.setAttribute("clip-path","url(#"+n+")")},Bt=function(t,e){const n=nt();if(i.xAxisText&&$(g,i.xAxisText,(t.left+t.right)/2,e-n/2,"middle",S.textColor),i.yAxisText){const e=n/2,o=(t.top+t.bottom)/2;$(g,i.yAxisText,e,o,"middle",S.textColor).setAttribute("transform","rotate(-90 "+e+" "+o+")")}},Gt=function(){return a.line.pointRadius+a.line.pointRing+1},vt=function(t,e,n,o,i,r){const l=a.axis.labelGap,s=Gt(),u=St(),c=Math.max(s,Math.ceil(a.axis.fontSize/2))+t.valueRooms.top,f=i-(r+l+u.bottom+t.valueRooms.bottom),d=pt(t,f-c);let h=u.left+Math.ceil(ot(d.tickTexts))+l,p=o-Math.max(s,t.valueRooms.end);if(!e&&n>0){h=Math.max(h,u.left+Math.ceil(et(N(0))/2));const e=Math.ceil(et(N(n-1))/2);p=o-Math.max(s,e,t.valueRooms.end)}return{left:h,top:c,right:Math.max(h+1,p),bottom:Math.max(c+1,f),scale:d}},kt=function(t,e,n,o){const i=o?t.bottom-t.top:t.right-t.left;return e?i/n:i/Math.max(1,n-1)},Et=function(t){const e=[];for(let n=0;n<t;n++)e.push(N(n));return e},At=function(t){const e=V(i.maxLabels)||0;return e>0?Math.max(1,Math.ceil(t/e)):1},It=function(t,e){const n=t.tickTexts[t.tickTexts.length-1]||"";return e-Math.ceil(et(n)/2)},Pt=function(t,e,n){return{texts:Et(t).map(function(t){return GraphBox.fitText(t,n,a.axis.fontSize,a.axis.fontFamily)}),step:Math.max(At(t),Math.ceil(nt()/Math.max(1,e))),angle:0,room:0}},zt=function(t,e,n,o,i){const r=nt(),l=vt(t,e,n,o,i,r),s=function(t,e,n,o){const i=Et(e),r=nt(),l=ot(i)+a.axis.labelSpace,s=a.axis.labelAngle,u=At(e);if(l<=n*u)return{texts:i,step:u,angle:0,room:r};if(!t||!s||n<r)return{texts:i,step:Math.max(u,Math.ceil(l/Math.max(1,n))),angle:0,room:r};const c=s*Math.PI/180,f=o*a.axis.maxLabelShare/Math.sin(c),d=i.map(function(t){return GraphBox.fitText(t,f,a.axis.fontSize,a.axis.fontFamily)});return{texts:d,step:u,angle:s,room:Math.ceil(ot(d)*Math.sin(c)+r*Math.cos(c))}}(e,n,kt(l,e,n,0),i);return{plot:s.room!==r?vt(t,e,n,o,i,s.room):l,labelPlan:s}},Ft=function(t,e,n,o,i){const r=function(t,e,n,o,i){const r=a.axis.labelGap,l=nt(),s=Gt(),u=o*a.axis.maxSideLabelShare,c=Math.min(u,ot(Et(n))),f=ot([D(t.low,0),D(t.high,0)]),d=St(),h=d.left+Math.ceil(c)+r+t.valueRooms.start,p=Math.max(h+1,o-Math.max(s,Math.ceil(f/2),t.valueRooms.end)),x=e?0:Math.max(s,Math.ceil(l/2)),m=Math.max(x+1,i-(l+r+d.bottom)),g=Math.max(a.axis.sideTickSpace,f+a.axis.labelSpace),b=pt(t,p-h,g),y=Math.min(p,It(b,o));return{left:h,top:x,right:Math.max(h+1,y),bottom:m,maxLabelWidth:u,scale:b}}(t,e,n,o,i),l=kt(r,e,n,1);return{plot:r,labelPlan:Pt(n,l,r.maxLabelWidth)}},Rt=function(t,e,n,o,r){const l=t.some(at),s=1==i.horizontal,u=(s?Ft:zt)(e,l,n,o,r),c=u.plot,f=c.scale,d=kt(c,l,n,s),h=s?c.top:c.left,p=s?c.bottom-c.top:c.right-c.left,x=f.max-f.min||1,m={isHorizontal:s,hasBands:l,indexCount:n,spacing:d,plot:c,scale:f,labelPlan:u.labelPlan,valueRooms:e.valueRooms,toIndexPosition:function(t){return l?h+d*(t+.5):1===n?h+p/2:h+d*t},toValuePosition:function(t){const e=(t-f.min)/x;return s?c.left+e*(c.right-c.left):c.bottom-e*(c.bottom-c.top)},joinPositions:function(t,e){return s?{x:e,y:t}:{x:t,y:e}},toPoint:function(t,e){return m.joinPositions(m.toIndexPosition(t),m.toValuePosition(e))},toIndex:function(t,e){const o=((s?e:t)-h)/d,i=l?Math.floor(o):Math.round(o);return Math.min(n-1,Math.max(0,i))}};return m.baseValue=function(t){return Math.min(t.max,Math.max(t.min,0))}(f),m.isInsidePlot=function(t,e){const n=a.axis.labelGap;return t>=c.left-n&&t<=c.right+n&&e>=c.top-n&&e<=c.bottom+n},m},Lt=function(t,e,n){const o=t.plot;return t.isHorizontal?J(g,e,o.top,e,o.bottom,n):J(g,o.left,e,o.right,e,n)},Ht=function(t){t.scale.ticks.forEach(function(e,n){const o=tt(t.toValuePosition(e));Lt(t,o,S.gridColor),function(t,e,n){t.isHorizontal?$(g,e,n,t.plot.bottom+a.axis.labelGap+nt()/2):$(g,e,t.plot.left-a.axis.labelGap,n,"end")}(t,t.scale.tickTexts[n],o)}),Lt(t,tt(t.toValuePosition(t.baseValue)),S.axisColor)},Vt=function(t){if(t.isHorizontal)return void function(t){const e=t.labelPlan,n=t.plot.left-a.axis.labelGap-t.valueRooms.start;for(let o=0;o<t.indexCount;o+=e.step)$(g,e.texts[o],n,t.toIndexPosition(o),"end")}(t);const e=t.labelPlan,n=t.plot.bottom+t.valueRooms.bottom+a.axis.labelGap,o=n+nt()/2,i=n;for(let n=0;n<t.indexCount;n+=e.step){const a=t.toIndexPosition(n);if(!e.angle){$(g,e.texts[n],a,o);continue}$(g,e.texts[n],a,i,"end").setAttribute("transform","rotate("+-e.angle+" "+a+" "+i+")")}},Ot=function(t,e,n,o){const i=function(t,e){const n=e.scale,o=e.toValuePosition(Math.min(n.max,Math.max(n.min,t.to)));let i=e.toValuePosition(Math.min(n.max,Math.max(n.min,t.from)));const r=Math.sign(o-i);0!==t.from&&(i+=r*a.bar.gap);const l=Math.sign(o-i)!==r,s=Math.abs(o-i)<a.bar.minLength;return(l||s)&&(i=o-r*a.bar.minLength),{basePosition:i,endPosition:o}}(t,o),r=Math.min(i.basePosition,i.endPosition),l=Math.abs(i.endPosition-i.basePosition);return o.isHorizontal?{left:r,top:e,width:l,height:n}:{left:e,top:r,width:n,height:l}},Nt=function(t,e,n,o,r,l,s){const u=Ot(n,r,l,s),c=Q(C,"path",{d:GraphBox.barPath(u,a.bar.round,o),fill:Z(t,e)});if(K("bar",Y(t),e,c,{rect:u}),t.barRects[e]=u,!basic.isOn(i.showValues))return;if(ut())return void function(t,e,n){const o=W(O(t.dataset,e)),i=n.width-2*a.values.sidePadding,r=n.height-2*a.values.sidePadding;if(et(o)>i||a.axis.fontSize>r)return;const l=GraphBox.getTextColorOn(Z(t,e));$(T,o,n.left+n.width/2,n.top+n.height/2,"middle",l).setAttribute("font-family","opensans-bold")}(t,e,u);!function(t,e,n,o,i,r){const l=W(O(t.dataset,e)),s=n.to>=n.from,u=a.values.gap;if(r.isHorizontal){if(a.axis.fontSize>i)return;const t=s?o.left+o.width+u:o.left-u;return void $(T,l,t,o.top+o.height/2,s?"start":"end",S.textColor)}if(et(l)>i)return;const c=nt()/2+u,f=s?o.top-c:o.top+o.height+c;$(T,l,o.left+o.width/2,f,"middle",S.textColor)}(t,e,n,u,t.slotCount>1?l+a.bar.gap:s.spacing,s)},Wt=function(t,e){const n=t.filter(at);if(!n.length)return;const o=ut(),i=o?1:n.length,r=function(t,e){const n=t.spacing*a.bar.bandShare-a.bar.gap*(e-1);return Math.max(1,Math.min(a.bar.maxThickness,n/e))}(e,i),l=r*i+a.bar.gap*(i-1);n.forEach(function(t,s){const u=(o?0:s)*(r+a.bar.gap)-l/2;t.barRects=[],t.slotCount=i,t.ranges.forEach(function(i,a){if(!i||i.from===i.to)return;const l=!o||function(t,e,n,o){const i=o.to>=o.from;for(let o=e+1;o<t.length;o++){const e=t[o].ranges[n];if(e&&e.from!==e.to&&e.to>=e.from===i)return!1}return!0}(n,s,a,i),c=l?function(t,e){const n=t.to>=t.from;return e.isHorizontal?n?"right":"left":n?"top":"bottom"}(i,e):"";Nt(t,a,i,c,e.toIndexPosition(a)+u,r,e)})})},Dt=function(t){const e=[];let n=null;return t.ranges.forEach(function(t,o){t?(n||(n=[],e.push(n)),n.push(o)):n=null}),e},_t=function(t){return t.curve||i.curve},jt=function(t){return void 0!==t.fill?t.fill:"area"===it(t)?1:0},Xt=function(t){GraphBox._idCounter+=1;const e="graph-box-gradient-"+GraphBox._idCounter,n=Q(m,"linearGradient",{id:e,x1:0,y1:0,x2:0,y2:1});return Q(n,"stop",{offset:0,"stop-color":t,"stop-opacity":a.line.gradientOpacity}),Q(n,"stop",{offset:1,"stop-color":t,"stop-opacity":0}),"url(#"+e+")"},Yt=function(t,e,n,o){if(e.length<2)return;const i="smooth"===_t(t.dataset),r="gradient"===jt(t.dataset),l=e.map(function(e){return o.toPoint(e,t.ranges[e].to)}),s=e.slice().reverse().map(function(e){return o.toPoint(e,function(t,e,n){const o=n.scale;return"start"===t.dataset.fillTo?o.min:Math.min(o.max,Math.max(o.min,t.ranges[e].from))}(t,e,o))}),u=Q(C,"path",{d:"M"+GraphBox.pointText(l[0])+GraphBox.curveCommands(l,i,o.isHorizontal)+"L"+GraphBox.pointText(s[0])+GraphBox.curveCommands(s,i,o.isHorizontal)+"Z",fill:r?Xt(t.color):t.color,"fill-opacity":r?1:a.line.fillOpacity});K("area",Y(t),n,u)},Zt=function(t,e,n,o){return Q(t,"circle",{cx:e.x,cy:e.y,r:o,fill:n,stroke:U(),"stroke-width":2*a.line.pointRing,"paint-order":"stroke"})},Ut=function(t,e){const n="smooth"===_t(t.dataset),o=function(t,e){const n=void 0!==t.dataset.showPoints?t.dataset.showPoints:i.showPoints;return"auto"!==n?basic.isOn(n):e.spacing>=a.line.pointSpace&&!t.dataset.dashed}(t,e);t.points=[];const r=Y(t);Dt(t).forEach(function(i,l){const s=i.map(function(n){const o=e.toPoint(n,t.ranges[n].to);return t.points[n]=o,o}),u=Q(C,"path",{d:"M"+GraphBox.pointText(s[0])+GraphBox.curveCommands(s,n,e.isHorizontal),fill:"none",stroke:t.color,"stroke-width":a.line.width,"stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":t.dataset.dashed?a.line.dash:"none"});K("line",r,l,u),(o||1===s.length)&&s.forEach(function(e,n){const o=Zt(C,e,t.color,a.line.pointRadius);K("point",r,i[n],o,{point:e,isOnLine:1})})})},qt=function(t,e){t.filter(rt).forEach(function(t){Ut(t,e)}),function(t,e){if(!basic.isOn(i.showValues)||e.isHorizontal)return;const n=[],o=nt();t.filter(rt).forEach(function(t){const e=t.points[t.points.length-1];if(!e)return;if(!n.every(function(t){return Math.abs(t-e.y)>=o}))return;n.push(e.y);const i=W(Mt(t));$(T,i,e.x+a.axis.labelGap,e.y,"start",S.textColor)})}(t,e)},Qt=function(t,e,n,o){if(at(t)){const i=t.barRects&&t.barRects[e];return i?function(t,e,n){const o=Math.max(t.left-e,0,e-t.left-t.width),i=Math.max(t.top-n,0,n-t.top-t.height);return Math.hypot(o,i)}(i,n,o):1/0}const i=t.points&&t.points[e];return i?Math.hypot(i.x-n,i.y-o):1/0},Jt=function(t,e,n,o){let i=1/0,a=null;return t.forEach(function(t){const r=Qt(t,e,n,o);r>=i||(i=r,a=t.datasetIndex)}),a},$t=function(t,e){t.filter(rt).forEach(function(t){const n=t.points[e];n&&Zt(M,n,t.color,a.line.pointRadius+1)})},Kt=function(t,e){const n=[];let o=0;return t.forEach(function(t){const i=O(t.dataset,e);null!==i&&(o+=i,n.push({color:Z(t,e),valueText:W(i),nameText:t.dataset.label||""}))}),ut()&&i.totalText&&n.length>1&&n.push({color:"transparent",valueText:W(o),nameText:i.totalText}),n.length&&function(t){"radar"!==i.type&&xt().forEach(function(e){t.push({color:gt(e),valueText:W(V(e.value)),nameText:e.label||""})})}(n),{titleText:N(e),rows:n}},te=function(t,e){return{findItem:function(n,o){if(!e.isInsidePlot(n,o))return null;const i=e.toIndex(n,o);return{index:i,datasetIndex:Jt(t,i,n,o)}},stepItem:function(t,n){if(!t)return{index:0,datasetIndex:null};return{index:Math.min(e.indexCount-1,Math.max(0,t.index+n)),datasetIndex:null}},hasItem:function(t){return t.index<e.indexCount},paintItem:function(n){e.hasBands?function(t,e){const n=t.plot,o=t.toIndexPosition(e)-t.spacing/2,i=t.isHorizontal?{x:n.left,y:o,width:n.right-n.left,height:t.spacing}:{x:o,y:n.top,width:t.spacing,height:n.bottom-n.top};i.fill=S.hoverColor,Q(b,"rect",i)}(e,n.index):function(t,e){const n=t.plot,o=tt(t.toIndexPosition(e));t.isHorizontal?J(b,n.left,o,n.right,o,S.axisColor):J(b,o,n.top,o,n.bottom,S.axisColor)}(e,n.index),$t(t,n.index)},getReadout:function(e){return Kt(t,e.index)},getAnchor:function(n){return function(t,e,n){const o=e.isHorizontal?Math.max:Math.min;let i=e.toValuePosition(e.baseValue);return t.forEach(function(t){const a=t.ranges[n];a&&(i=o(i,e.toValuePosition(a.to)))}),e.joinPositions(e.toIndexPosition(n),i)}(t,e,n.index)}}},ee=function(t,e){const n=lt(),o=st(n);ft(n,o);const i=dt(n);if(!i)return null;i.valueRooms=Tt(n);const a=Rt(n,i,o,t,e);return I=a,wt(a.plot),Ht(a),Vt(a),Bt(a.plot,e),function(t,e){t.filter(rt).forEach(function(t){jt(t.dataset)&&Dt(t).forEach(function(n,o){Yt(t,n,o,e)})})}(n,a),Wt(n,a),qt(n,a),Ct(a.plot,a.scale,a.toValuePosition,a.isHorizontal),te(n,a)},ne=function(){return"pie"===i.type||"doughnut"===i.type},oe=function(t){return t===GraphBox.OTHER_SLICE?"#other":N(t)||"#"+t},ie=function(t){return t===GraphBox.OTHER_SLICE?i.otherText:N(t)},ae=function(t){return Math.max(i.data.labels.length,t.data.length)},re=function(){const t=function(){const t=i.data.datasets[0],e=[];if(!t)return e;for(let n=0;n<ae(t);n++){const o=O(t,n);o>0&&e.push({index:n,value:o})}return e}(),e=V(i.maxSlices)||0;if(!e||t.length<=e)return{kept:t,folded:[]};const n=t.slice().sort(function(t,e){return e.value-t.value}),o=new Set(n.slice(0,Math.max(1,e-1)));return{kept:t.filter(function(t){return o.has(t)}),folded:t.filter(function(t){return!o.has(t)})}},le=function(){const t=i.data.datasets[0],e=re(),n=[];if(!t)return n;if(e.folded.length)return e.kept.map(function(t){return oe(t.index)});for(let e=0;e<ae(t);e++)n.push(oe(e));return n},se=function(t,e){if(e===GraphBox.OTHER_SLICE)return S.otherColor;return t.colors&&t.colors[e]||S.colors[d.get(oe(e))]||S.otherColor},ue=function(t){return h.has(oe(t))},ce=function(t){return t.reduce(function(t,e){return t+e.value},0)},fe=function(t,e,n,o){return Q(t,"path",{d:GraphBox.slicePath(n.center,n.innerRadius,o,e.startAngle,e.endAngle,a.pie.gap),fill:e.color})},de=function(t,e){return 100===Math.round(e)?"":GraphBox.formatPercent(t/e,i.locale)},he=function(t){if(!t.folded)return[];const e=t.folded.slice().sort(function(t,e){return e.value-t.value}),n=e.slice(0,a.pie.otherRows).map(function(t){return{color:"transparent",valueText:W(t.value),nameText:N(t.index)}}),o=e.length-n.length;return o>0&&n.push({color:"transparent",valueText:"+"+o,nameText:""}),n},pe=function(t,e){const n=function(){const t=i.data.datasets[0],e=re(),n=e.kept.filter(function(t){return!ue(t.index)}).map(function(e){return{index:e.index,value:e.value,color:se(t,e.index)}});return e.folded.length&&!ue(GraphBox.OTHER_SLICE)&&n.push({index:GraphBox.OTHER_SLICE,value:ce(e.folded),color:S.otherColor,folded:e.folded}),n}(),o=ce(n);if(!(o>0))return null;const r=Math.max(1,Math.min(t,e)/2-a.pie.hoverGrow),l={center:{x:t/2,y:e/2},outerRadius:r,innerRadius:"doughnut"===i.type?r*a.pie.hole:0};return function(t,e){let n=c;t.forEach(function(t){t.startAngle=n,n+=t.value/e*u,t.endAngle=n})}(n,o),n.forEach(function(t){const e=fe(C,t,l,r);K("slice","",t.index,e,{isSlice:1}),basic.isOn(i.showValues)&&function(t,e,n){const o=de(t.value,n)||W(t.value),i=0===e.innerRadius,r=i?.65*e.outerRadius:(e.outerRadius+e.innerRadius)/2,l=t.endAngle-t.startAngle,s=Math.min(l/2,Math.PI/2),u=2*r*Math.sin(s)-2*a.values.sidePadding,c=i?u:e.outerRadius-e.innerRadius-2*a.values.sidePadding,f=et(o);if(f>u||f>c||a.axis.fontSize>u)return;const d=(t.startAngle+t.endAngle)/2,h=e.center.x+r*Math.cos(d),p=e.center.y+r*Math.sin(d);$(T,o,h,p,"middle",GraphBox.getTextColorOn(t.color)).setAttribute("font-family","opensans-bold")}(t,l,o)}),function(t){if(!t.innerRadius||!i.centerText)return;const e=1.6*t.innerRadius,n="opensans-bold",o=GraphBox.measureText(i.centerText,a.pie.centerFontSize,n),r=Math.min(a.pie.centerFontSize,a.pie.centerFontSize*e/o),l=i.centerSubText?nt():0,s=t.center,u=$(C,i.centerText,s.x,s.y-l/2,"middle",S.titleColor);if(u.setAttribute("font-size",r),u.setAttribute("font-family",n),!l)return;const c=GraphBox.fitText(i.centerSubText,e,a.axis.fontSize,a.axis.fontFamily);$(C,c,s.x,s.y+r/2+l/2-2,"middle",S.textColor)}(l),function(t,e,n){const o=function(e){return t.find(function(t){return t.index===e.index})};return{findItem:function(n,o){const i=Math.hypot(n-e.center.x,o-e.center.y);if(i>e.outerRadius+a.pie.hoverGrow||i<e.innerRadius)return null;let r=Math.atan2(o-e.center.y,n-e.center.x);r<c&&(r+=u);const l=t.find(function(t){return r<t.endAngle});return l?{index:l.index,datasetIndex:0}:null},stepItem:function(e,n){const i=e?t.indexOf(o(e))+n:0;return{index:t[Math.min(t.length-1,Math.max(0,i))].index,datasetIndex:0}},hasItem:function(t){return!!o(t)},paintItem:function(t){fe(M,o(t),e,e.outerRadius+a.pie.hoverGrow)},getReadout:function(t){const e=o(t),i={color:e.color,valueText:W(e.value),nameText:de(e.value,n)};return{titleText:ie(e.index),rows:[i].concat(he(e))}},getAnchor:function(t){const n=o(t),i=(n.startAngle+n.endAngle)/2,a=(e.outerRadius+e.innerRadius)/2;return{x:e.center.x+a*Math.cos(i),y:e.center.y+a*Math.sin(i)}}}}(n,l,o)},xe=function(t,e){return c+e/t.indexCount*u},me=function(t,e,n){const o=t.scale,i=(n-o.min)/(o.max-o.min||1),a=xe(t,e);return{x:t.center.x+i*t.radius*Math.cos(a),y:t.center.y+i*t.radius*Math.sin(a)}},ge=function(t,e){const n=lt(),o=st(n);ft(n,o);const i=dt(n);if(!i)return null;const r=function(t,e,n){const o=e*a.radar.maxLabelShare,i=Et(t).map(function(t){return GraphBox.fitText(t,o,a.axis.fontSize,a.axis.fontFamily)}),r=ot(i)+a.axis.labelGap,l=nt()+a.axis.labelGap;return{center:{x:e/2,y:n/2},radius:Math.max(1,Math.min(e/2-r,n/2-l)),texts:i,indexCount:t}}(o,t,e);return r.scale=pt(i,r.radius,a.radar.ringSpace),function(t){const e=[];for(let n=0;n<t.indexCount;n++)e.push(n);t.scale.ticks.forEach(function(n){const o=e.map(function(e){return me(t,e,n)});Q(g,"path",{d:GraphBox.polygonPath(o),fill:"none",stroke:S.gridColor,"stroke-width":1})}),e.forEach(function(e){const n=me(t,e,t.scale.max);J(g,t.center.x,t.center.y,n.x,n.y,S.gridColor)})}(r),function(t){const e=t.radius+a.axis.labelGap;t.texts.forEach(function(n,o){const i=xe(t,o),a=Math.cos(i);let r="middle";a>.2&&(r="start"),a<-.2&&(r="end");const l=t.center.x+e*a,s=t.center.y+e*Math.sin(i)+Math.sin(i)*nt()/2;$(g,n,l,s,r,S.textColor)})}(r),function(t){basic.isOn(a.radar.showTicks)&&t.scale.ticks.forEach(function(e,n){if(e===t.scale.min)return;const o=me(t,0,e);bt(g,t.scale.tickTexts[n],o.x+4,o.y,"start",S.mutedTextColor)})}(r),n.forEach(function(t){!function(t,e){t.points=[],t.ranges.forEach(function(n,o){n&&(t.points[o]=me(e,o,n.to))});const n=Y(t),o=Q(C,"path",{d:GraphBox.polygonPath(t.points.filter(Boolean)),fill:t.color,"fill-opacity":a.radar.fillOpacity,stroke:t.color,"stroke-width":a.line.width,"stroke-linejoin":"round"});K("line",n,0,o),e.indexCount*a.line.pointSpace>e.radius*u||t.points.forEach(function(e,o){const i=Zt(C,e,t.color,a.line.pointRadius-1);K("point",n,o,i,{point:e,isOnLine:1})})}(t,r)}),function(t,e){const n=e.indexCount;return{findItem:function(o,i){const r=o-e.center.x,l=i-e.center.y;if(Math.hypot(r,l)>e.radius+a.axis.labelGap)return null;const s=Math.atan2(l,r)-c,f=(Math.round(s/u*n)+n)%n;return{index:f,datasetIndex:Jt(t,f,o,i)}},stepItem:function(t,e){return t?{index:(t.index+e+n)%n,datasetIndex:null}:{index:0,datasetIndex:null}},hasItem:function(t){return t.index<n},paintItem:function(n){const o=me(e,n.index,e.scale.max);J(b,e.center.x,e.center.y,o.x,o.y,S.axisColor),$t(t,n.index)},getReadout:function(e){return Kt(t,e.index)},getAnchor:function(t){return me(e,t.index,e.scale.max)}}}(n,r)},be=function(){return"scatter"===i.type||"bubble"===i.type},ye=function(t){if(null==t)return null;const e=Array.isArray(t)?{x:t[0],y:t[1],r:t[2]}:t,n=V(e.x),o=V(e.y);return null===n||null===o?null:{x:n,y:o,size:V(e.r),label:e.label}},Ce=function(t){const e=[];return t.forEach(function(t){t.dataset.data.forEach(function(n,o){const i=ye(n);i&&e.push(Object.assign(i,{index:o,datasetIndex:t.datasetIndex,color:Z(t,o),seriesName:t.dataset.label||""}))})}),e},Me=function(t,e,n){return ht(Math.min.apply(null,t),Math.max.apply(null,t),e,n)},Te=function(t){return i.formatX?String(i.formatX(t)):GraphBox.formatNumber(t,i.locale)},Se=function(t,e){return i.formatX?String(i.formatX(t)):GraphBox.formatCompactNumber(t,i.locale,e)},we=function(t){const e=function(e){return t.find(function(t){return t.datasetIndex===e.datasetIndex&&t.index===e.index})};return{findItem:function(e,n){const o=function(t,e,n){let o=null,i=1/0;return t.forEach(function(t){const r=Math.hypot(t.px-e,t.py-n);r>Math.max(a.scatter.hitRadius,t.radius)||r>=i||(o=t,i=r)}),o}(t,e,n);return o?{index:o.index,datasetIndex:o.datasetIndex}:null},stepItem:function(n,o){const i=n?t.indexOf(e(n))+o:0,a=t[Math.min(t.length-1,Math.max(0,i))];return{index:a.index,datasetIndex:a.datasetIndex}},hasItem:function(t){return!!e(t)},paintItem:function(t){const n=e(t);Zt(M,{x:n.px,y:n.py},n.color,n.radius+1)},getReadout:function(t){return function(t){const e=[{color:t.color,valueText:W(t.y),nameText:i.yAxisText||"y"},{color:"transparent",valueText:Te(t.x),nameText:i.xAxisText||"x"}];return"bubble"===i.type&&null!==t.size&&e.push({color:"transparent",valueText:GraphBox.formatNumber(t.size,i.locale),nameText:i.sizeText}),{titleText:void 0===t.label?t.seriesName:String(t.label),rows:e}}(e(t))},getAnchor:function(t){const n=e(t);return{x:n.px,y:n.py}}}},Be=function(t,e){const n=Ce(lt());if(!n.length)return null;const o=function(t){const e="bubble"===i.type?a.scatter.maxBubble:0,n=t.xScale,o=t.yScale,r=t.right-t.left-2*e,l=t.bottom-t.top-2*e;return{plot:t,toX:function(o){return t.left+e+(o-n.min)/(n.max-n.min||1)*r},toY:function(n){return t.bottom-e-(n-o.min)/(o.max-o.min||1)*l}}}(function(t,e,n){const o=t.map(function(t){return t.y}).concat(mt()),r=Me(o,i.minValue,i.maxValue);r.fixedStep=V(i.valueStep);const l=Me(t.map(function(t){return t.x}),i.minX,i.maxX),s=St(),u=nt(),c=a.axis.labelGap,f=Gt(),d=f,h=Math.max(d+1,n-(u+c+s.bottom)),p=pt(r,h-d),x=s.left+Math.ceil(ot(p.tickTexts))+c,m=ot([Se(l.low,0),Se(l.high,0)]),g=Math.max(x+1,e-Math.max(f,Math.ceil(m/2))),b=Math.max(a.axis.sideTickSpace,m+a.axis.labelSpace),y=pt(l,g-x,b,Se),C=Math.min(g,It(y,e));return{left:x,top:d,right:Math.max(x+1,C),bottom:h,xScale:y,yScale:p}}(n,t,e));return wt(o.plot),function(t){const e=t.plot,n=nt();e.yScale.ticks.forEach(function(n,o){const i=tt(t.toY(n));J(g,e.left,i,e.right,i,S.gridColor),$(g,e.yScale.tickTexts[o],e.left-a.axis.labelGap,i,"end")}),e.xScale.ticks.forEach(function(o,i){const r=tt(t.toX(o));J(g,r,e.top,r,e.bottom,S.gridColor),$(g,e.xScale.tickTexts[i],r,e.bottom+a.axis.labelGap+n/2)});const o=tt(e.yScale.min<0&&e.yScale.max>0?t.toY(0):e.bottom),i=tt(e.xScale.min<0&&e.xScale.max>0?t.toX(0):e.left);J(g,e.left,o,e.right,o,S.axisColor),J(g,i,e.top,i,e.bottom,S.axisColor)}(o),Bt(o.plot,e),function(t){if("bubble"!==i.type)return void t.forEach(function(t){t.radius=a.line.pointRadius});const e=t.reduce(function(t,e){return Math.max(t,e.size||0)},0);t.forEach(function(t){const n=e>0?Math.sqrt(Math.max(0,t.size||0)/e):1;t.radius=Math.max(a.line.pointRing,n*a.scatter.maxBubble)})}(n),n.forEach(function(t){t.px=o.toX(t.x),t.py=o.toY(t.y),function(t){const e={x:t.px,y:t.py},n=Zt(C,e,t.color,t.radius);"bubble"===i.type&&n.setAttribute("fill-opacity",a.scatter.bubbleOpacity),K("point",t.datasetIndex,t.index,n,{point:e})}(t)}),Ct(o.plot,o.plot.yScale,o.toY,0),we(n)},Ge=function(){const t=i.plot.elem.clientWidth,e=i.plot.elem.clientHeight;if(t<=0||e<=0)return void(z=null);k=t+"x"+e,[m,g,b,C,M,T].forEach(function(t){t.replaceChildren()}),y.removeAttribute("clip-path"),M.removeAttribute("clip-path");const n=A,o=I;A=new Map,I=null,x.setAttribute("width",t),x.setAttribute("height",e),x.setAttribute("font-family",a.axis.fontFamily),x.setAttribute("font-size",a.axis.fontSize),w=function(t,e){return ne()?pe(t,e):be()?Be(t,e):"radar"===i.type?ge(t,e):ee(t,e)}(t,e),i.lblEmpty.plainText=i.emptyText,i.lblEmpty.visible=w?0:1,Re(),!B||w&&w.hasItem(B)||(B=null),De(),P&&ke()&&Fe(n,o),P=0,z=null},ve=function(){P=1,Ge()},ke=function(){return 1==i.animated&&!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)},Ee=function(t,e=.25){return t+" "+e+"s cubic-bezier(0.2, 0.8, 0.2, 1)"},Ae=function(t){return'path("'+t+'")'},Ie=function(t,e){const n=t.width?e.width/t.width:1,o=t.height?e.height/t.height:1;return"matrix("+[n,0,0,o,e.left-n*t.left,e.top-o*t.top].join(",")+")"},Pe=function(t,e){return{shape:t,property:"opacity",from:String(e),to:"1"}},ze=function(t){t.forEach(function(t){t.shape.style.transition="none",t.shape.style[t.property]=t.from}),x.getBoundingClientRect(),t.forEach(function(t){t.shape.style.transition=Ee(t.property),t.shape.style[t.property]=t.to})},Fe=function(t,e){if(!t.size)return;if(null!==z&&e&&I&&!I.isHorizontal)return void function(t){const e=function(t,e,n){const o=e.toIndexPosition(0),i=e.toIndexPosition(1),a=t.toIndexPosition(n),r=(t.toIndexPosition(n+1)-a)/(i-o||1),l=e.scale,s=e.toValuePosition(l.min),u=e.toValuePosition(l.max),c=t.toValuePosition(l.min),f=(t.toValuePosition(l.max)-c)/(u-s||1);return r&&f?"matrix("+[r,0,0,f,a-r*o,c-f*s].join(",")+")":null}(t,I,z);e&&ze([{shape:C,property:"transform",from:e,to:"none"}])}(e);const n=[];A.forEach(function(e,o){const i=function(t,e){const n=t.shape;if(!e)return Pe(n,0);if(t.isSlice)return Pe(n,a.pie.changeOpacity);if(t.rect)return{shape:n,property:"transform",from:Ie(t.rect,e.rect),to:"none"};if((t.isOnLine||!t.point)&&!GraphBox.canMovePaths())return Pe(n,a.line.changeOpacity);if(t.point)return{shape:n,property:"transform",from:"translate("+(e.point.x-t.point.x)+"px, "+(e.point.y-t.point.y)+"px)",to:"none"};return{shape:n,property:"d",from:Ae(e.shape.getAttribute("d")),to:Ae(n.getAttribute("d"))}}(e,t.get(o));i&&n.push(i)}),T.childElementCount&&n.push({shape:T,property:"opacity",from:"0",to:"1"}),ze(n)},Re=function(){i.plot.aria={label:Le()}},Le=function(){const t=[i.titleText||i.type+" chart"];return i.subtitleText&&t.push(i.subtitleText),lt().forEach(function(e){const n=e.dataset.data.slice(0,100).map(function(t,e){if(be()){const e=ye(t);return e?Te(e.x)+" "+W(e.y):""}const n=V(t);return null===n?"":N(e)+" "+W(n)});t.push((e.dataset.label||"")+" "+n.filter(Boolean).join(", "))}),xt().forEach(function(e){t.push((e.label||"")+" "+W(V(e.value)))}),t.join(". ")},He=function(){const t=createIn(i.tooltip,function(){const t=HGroup({hug:1,gap:6,align:"left center"});return t.key=Box({width:a.tooltip.keyWidth,height:a.tooltip.keyHeight,round:a.tooltip.keyHeight/2}),t.key.shrink=0,t.lblValue=Label({fontSize:a.tooltip.fontSize,fontFamily:"opensans-bold",css:{whiteSpace:"nowrap"}}),t.lblName=Label({fontSize:a.tooltip.fontSize,ellipsis:1}),endGroup(),t});p.push(t)},Ve=function(t){const e=i.elem.clientWidth-2*(a.tooltip.edge+a.tooltip.padding[0]);for(i.lblTooltipTitle.css={maxWidth:e+"px"},i.lblTooltipTitle.plainText=t.titleText,i.lblTooltipTitle.visible=t.titleText?1:0;p.length<t.rows.length;)He();p.forEach(function(e,n){!function(t,e){t.visible=e?1:0,e&&(t.key.color=e.color,t.lblValue.plainText=e.valueText,t.lblValue.textColor=S.tooltipTextColor,t.lblName.plainText=e.nameText,t.lblName.textColor=S.tooltipMutedColor,t.lblName.visible=e.nameText?1:0,t.lblName.css={maxWidth:Math.min(a.tooltip.maxNameWidth,i.elem.clientWidth/2)+"px"})}(e,t.rows[n])})},Oe=function(t,e){return e.width/t.offsetWidth||1},Ne=function(){const t=G||w.getAnchor(B),e=i.elem.getBoundingClientRect(),n=i.plot.elem.getBoundingClientRect(),o=Oe(i.elem,e),r=a.tooltip.distance,l=a.tooltip.edge,s=i.tooltip.elem.offsetWidth,u=i.tooltip.elem.offsetHeight,c=(n.left-e.left)/o+t.x-i.elem.clientLeft,f=(n.top-e.top)/o+t.y-i.elem.clientTop;let d=c+r;d+s>i.elem.clientWidth-l&&(d=c-r-s),We(Math.max(l,d),Math.max(l,Math.min(i.elem.clientHeight-u-l,f-u/2)))},We=function(t,e){if(!ke())return i.tooltip.left=t,void(i.tooltip.top=e);i.tooltip.left=0,i.tooltip.top=0,i.tooltip.css={transform:"translate("+t+"px, "+e+"px)"}},De=function(){b.replaceChildren(),M.replaceChildren(),w&&B&&w.paintItem(B);const t=w&&B?w.getReadout(B):null;t&&t.rows.length?(Ve(t),function(){const t=!F;F=1,R&&R(),R=null,i.tooltip.visible=1,ke()?(t&&(i.tooltip.setMotionNow("none"),i.tooltip.opacity=0,Ne(),i.tooltip.elem.offsetWidth),i.tooltip.setMotionNow(Ee("transform")+", "+Ee("opacity")),i.tooltip.opacity=1,Ne()):Ne()}()):F&&(F=0,ke()?(i.tooltip.setMotionNow(Ee("opacity",.15)),i.tooltip.opacity=0,R=i.after(150,function(){R=null,i.tooltip.visible=0})):i.tooltip.visible=0)},_e=function(t){const e=(o=t,!((n=B)&&o?n.index===o.index&&n.datasetIndex===o.datasetIndex:n===o));var n,o;B=t,e?De():t&&F&&Ne()},je=function(){G=null,_e(null)},Xe=function(t){const e=null===t.datasetIndex?function(t){const e=lt().find(function(e){return null!==O(e.dataset,t)});return e?e.datasetIndex:0}(t.index):t.datasetIndex,n=i.data.datasets[e];return n?t.index===GraphBox.OTHER_SLICE?function(t){const e=re().folded;return{datasetIndex:0,index:GraphBox.OTHER_SLICE,label:i.otherText,value:ce(e),datasetLabel:t.label||"",dataset:t,otherItems:e.map(function(t){return{index:t.index,label:i.data.labels[t.index],value:t.value}})}}(n):{datasetIndex:e,index:t.index,label:i.data.labels[t.index],value:n.data[t.index],datasetLabel:n.label||"",dataset:n}:null},Ye=function(t){const e=B?Xe(B):null;e&&i.onClick(i,e,t)},Ze=function(t,e){w&&(G=function(t){const e=i.plot.elem.getBoundingClientRect(),n=Oe(i.plot.elem,e);return{x:(t.clientX-e.left)/n,y:(t.clientY-e.top)/n}}(e),_e(w.findItem(G.x,G.y)),s&&(i.plot.cursor=B?"pointer":"default"))},Ue=function(t){const e=it(t);return"bar"===e?"box":"scatter"===e||"bubble"===e?"dot":"line"},qe=function(t,e){return{text:ie(e),color:se(t,e),keyShape:"box",isHidden:ue(e),position:e}},Qe=function(){return(ne()?function(){const t=i.data.datasets[0];if(!t)return[];const e=re();if(e.folded.length){const n=e.kept.map(function(e){return qe(t,e.index)});return n.push(qe(t,GraphBox.OTHER_SLICE)),n}const n=[];for(let e=0;e<ae(t);e++)n.push(qe(t,e));return n}():i.data.datasets.map(function(t,e){return{text:0===t.showInLegend||!1===t.showInLegend?"":t.label||"",color:X(t,e),keyShape:Ue(t),isHidden:basic.isOn(t.hidden),position:e}})).filter(function(t){return""!==t.text})},Je=function(){return 0===i.legend||!1===i.legend||"none"===i.legend?"none":"auto"!==i.legend?i.legend:ne()?i.elem.clientWidth>=a.legend.sideMinWidth?"right":"bottom":i.data.datasets.length>=2?"top":"none"},$e=function(t){const e=t.entry;(ne()?i.setSliceVisible:i.setDatasetVisible)(e.position,e.isHidden?1:0)},Ke=function(t,e){t.entry=e,t.opacity=e.isHidden?a.legend.hiddenOpacity:1,t.aria={pressed:!e.isHidden}},tn=function(){const t=Qe(),e=function(t){const e=t.map(function(t){return[t.text,t.color,t.keyShape,t.position]});return JSON.stringify(e)+S.textColor}(t);e!==v?(v=e,i.legendItems.forEach(function(t){t.remove()}),i.legendItems=t.map(function(t){return createIn(i.legendGroup,function(){return function(t){const e=HGroup({hug:1,gap:a.legend.keyGap,align:"left center"});return e.shrink=0,e.key=Box({...a.legend.keys[t.keyShape],color:t.color}),e.key.shrink=0,e.label=Label({plainText:t.text,fontSize:a.legend.fontSize,textColor:S.textColor,css:{whiteSpace:"nowrap"}}),endGroup(),e.cursor="pointer",e.role="button",e.tabIndex=0,e.setFocusRing(S.focusColor),e.on("click",$e),e.on("keydown",function(t,n){"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),$e(e))}),Ke(e,t),e}(t)})})):i.legendItems.forEach(function(e,n){Ke(e,t[n])})},en=function(){const t=function(){const t=re(),e=t.kept.filter(function(t){return!ue(t.index)}),n=ue(GraphBox.OTHER_SLICE)?[]:t.folded;return e.concat(n).sort(function(t,e){return t.index-e.index})}(),e=ce(t),n=i.data.datasets[0],o=t.map(function(t){return[N(t.index),W(t.value),GraphBox.formatPercent(t.value/e,i.locale)]});return{head:[i.tableHeadText,n&&n.label||"","%"],rows:o}},nn=function(t,e){const n=HGroup({width:"100%",height:a.table.rowHeight,align:"left center"});n.shrink=0,n.role="row",n.css={borderBottom:"1px solid "+S.gridColor},t.forEach(function(t,n){const o=Label({plainText:t,width:"auto",fontSize:a.table.fontSize,textColor:0===n||e?S.titleColor:S.textColor,ellipsis:1,role:e?"columnheader":"cell",css:{flex:"1 1 0",minWidth:"0px",padding:"0px "+a.table.cellPadding+"px",textAlign:0===n?"left":"right",fontVariantNumeric:"tabular-nums"}});e&&(o.fontFamily=a.table.headFontFamily)}),endGroup()},on=function(){const t=i.tableBox?i.tableBox.elem.scrollTop:0;if(i.tableBox&&i.tableBox.remove(),i.tableBox=null,1!=i.tableView)return;const e=i.getTableData();i.tableBox=createIn(i.body,function(){const t=VGroup({width:"100%",height:"auto",align:"left top",scrollY:1,role:"table"});return nn(e.head,1),e.rows.forEach(function(t){nn(t,0)}),endGroup(),t}),i.tableBox.css={flex:"1 1 0",minHeight:"0px",alignSelf:"stretch"},i.tableBox.aria={label:i.titleText||i.type+" chart"},i.tableBox.elem.scrollTop=t},an=function(t,e){t.save(),function(t,e){const n=/rotate\((-?[\d.]+) (-?[\d.]+) (-?[\d.]+)\)/.exec(e.getAttribute("transform")||"");if(!n)return;const o=Number(n[2]),i=Number(n[3]);t.translate(o,i),t.rotate(Number(n[1])*Math.PI/180),t.translate(-o,-i)}(t,e);const n=e.getAttribute("font-size")||a.axis.fontSize,o=e.getAttribute("font-family")||a.axis.fontFamily;t.font=n+"px "+o,t.textAlign={start:"left",middle:"center",end:"right"}[e.getAttribute("text-anchor")],t.textBaseline="middle";const i=Number(e.getAttribute("x")),r=Number(e.getAttribute("y"));e.getAttribute("stroke")&&(t.strokeStyle=e.getAttribute("stroke"),t.lineWidth=Number(e.getAttribute("stroke-width"))||1,t.strokeText(e.textContent,i,r)),t.fillStyle=e.getAttribute("fill"),t.fillText(e.textContent,i,r),t.restore()},rn=function(t,e,n){const o=function(t,e){const n=new Path2D,o=function(e){return Number(t.getAttribute(e))};return"path"===e?new Path2D(t.getAttribute("d")):("line"===e&&(n.moveTo(o("x1"),o("y1")),n.lineTo(o("x2"),o("y2"))),"rect"===e&&n.rect(o("x"),o("y"),o("width"),o("height")),"circle"===e&&n.arc(o("cx"),o("cy"),o("r"),0,u),n)}(e,n),i=function(t,e){const n=e.getAttribute("fill"),o=/^url\(#(.+)\)$/.exec(n||"");if(!o)return n;const i=e.getBBox(),a=t.createLinearGradient(0,i.y,0,i.y+i.height);return x.getElementById(o[1]).querySelectorAll("stop").forEach(function(t){const e=GraphBox.toTransparent(t.getAttribute("stop-color"),t.getAttribute("stop-opacity"));a.addColorStop(Number(t.getAttribute("offset")),e)}),a}(t,e),a=e.getAttribute("stroke"),r=e.getAttribute("stroke-dasharray"),l=function(){i&&"none"!==i&&(t.globalAlpha=Number(e.getAttribute("fill-opacity")||1),t.fillStyle=i,t.fill(o,"nonzero"),t.globalAlpha=1)},s=function(){a&&"none"!==a&&(t.strokeStyle=a,t.lineWidth=Number(e.getAttribute("stroke-width"))||1,t.lineCap=e.getAttribute("stroke-linecap")||"butt",t.lineJoin=e.getAttribute("stroke-linejoin")||"miter",t.setLineDash(r&&"none"!==r?r.split(" ").map(Number):[]),t.stroke(o),t.setLineDash([]))};if("stroke"===e.getAttribute("paint-order"))return s(),void l();l(),s()},ln=function(t,e){t.save(),function(t,e){const n=/^url\(#(.+)\)$/.exec(e.getAttribute("clip-path")||"");if(!n)return;const o=x.getElementById(n[1]).querySelector("rect"),i=function(t){return Number(o.getAttribute(t))};t.beginPath(),t.rect(i("x"),i("y"),i("width"),i("height")),t.clip()}(t,e),Array.from(e.children).forEach(function(e){const n=e.tagName.toLowerCase();"g"===n?ln(t,e):"text"===n?an(t,e):rn(t,e,n)}),t.restore()},sn=function(t){const e=i.elem.getBoundingClientRect(),n=t.elem.getBoundingClientRect(),o=Oe(i.elem,e);return{left:(n.left-e.left)/o,top:(n.top-e.top)/o,width:n.width/o,height:n.height/o}},un=function(t,e,n=1){if(1!=e.visible||!e.elem.textContent)return;const o=sn(e),i=getComputedStyle(e.elem);t.font=i.fontSize+" "+i.fontFamily,t.fillStyle=i.color,t.textAlign="left",t.textBaseline="middle",t.globalAlpha=n;const a=GraphBox.wrapText(t,e.elem.textContent,o.width),r=o.height/a.length;a.forEach(function(e,n){t.fillText(e,o.left,o.top+r*(n+.5))}),t.globalAlpha=1},cn=function(){i.lblTitle.plainText=i.titleText,i.lblTitle.visible=i.titleText?1:0,i.lblSubtitle.plainText=i.subtitleText,i.lblSubtitle.visible=i.subtitleText?1:0,i.texts.visible=i.titleText||i.subtitleText?1:0,Re()},fn=function(){!function(){const t=Je();if(E=t,i.legendGroup.visible="none"===t?0:1,"none"===t)return;const e="left"===t||"right"===t;i.body.css={flexDirection:r[t]},i.legendGroup.width=e?"auto":"100%",i.legendGroup.scrollY=1,i.legendGroup.css={flexDirection:e?"column":"row",flexWrap:e?"nowrap":"wrap",alignItems:e?"flex-start":"center",alignSelf:e?"center":"auto",justifyContent:ne()&&!e?"center":"flex-start",alignContent:"flex-start",maxHeight:e?"100%":a.legend.maxLinesShare,maxWidth:e?a.legend.maxSideShare:"100%",overflowX:"hidden"}}(),i.plot.visible=1==i.tableView?0:1,Ge()},dn=function(){P=1,i.data.labels||(i.data.labels=[]),i.data.datasets||(i.data.datasets=[]),i.data.datasets.forEach(function(t){t.data||(t.data=[])}),function(){const t=i.data.datasets.map(function(t,e){return _(t,e)});j(t,f),ne()&&j(le(),d)}(),tn(),fn(),on()},hn=function(){S=Object.assign(basic.resolveTheme(GraphBox.THEMES,i.theme),a.colors),i.color=U(),i.border=a.box.border,i.borderColor=a.box.borderColor||S.borderColor,i.round=a.box.round,i.layout.gap=a.box.gap,i.layout.css={padding:a.box.padding+"px"},i.body.gap=a.box.gap,i.lblTitle.textColor=S.titleColor,i.lblSubtitle.textColor=S.textColor,i.lblEmpty.textColor=S.mutedTextColor,i.tooltip.color=S.tooltipColor,i.lblTooltipTitle.textColor=S.tooltipMutedColor,i.plot.setFocusRing(S.focusColor),cn(),dn()},pn=function(){"auto"===i.theme&&hn()};return i.whenReady=function(t){t(i)},i.update=function(){dn()},i.setData=function(t){i.data=H(t),dn()},i.setLabels=function(t){i.data.labels=(t||[]).slice(),dn()},i.setDatasets=function(t){i.data.datasets=(t||[]).map(L),dn()},i.setValues=function(t,e=0){const n=i.data.datasets[e];n?(n.data=(t||[]).slice(),dn()):i.addDataset({data:t})},i.addValue=function(t,e){const n=Array.isArray(e)?e:[e],o=i.data.datasets;let a=0;if(i.maxCount>0)for(;i.data.labels.length>=i.maxCount;)i.data.labels.shift(),o.forEach(function(t){t.data.shift()}),a++;z=a,i.data.labels.push(t),o.forEach(function(t,e){t.data.push(void 0!==n[e]?n[e]:null)}),dn()},i.addPoint=function(t,e=0){const n=i.data.datasets[e];n&&(i.maxCount>0&&n.data.length>=i.maxCount&&n.data.shift(),n.data.push(t),dn())},i.addDataset=function(t){i.data.datasets.push(L(t)),dn()},i.removeDataset=function(t){t<0||t>=i.data.datasets.length||(i.data.datasets.splice(t,1),dn())},i.setDatasetVisible=function(t,e){const n=i.data.datasets[t];n&&(n.hidden=basic.isOn(e)?0:1,dn())},i.setSliceVisible=function(t,e){const n=oe(t);basic.isOn(e)?h.delete(n):h.add(n),dn()},i.setType=function(t){i.type=t,dn()},i.setCenterText=function(t,e=i.centerSubText){i.centerText=t,i.centerSubText=e,Ge()},i.setTitleText=function(t){i.titleText=t,cn()},i.setSubtitleText=function(t){i.subtitleText=t,cn()},i.setLegend=function(t){i.legend=t,fn()},i.setShowValues=function(t){i.showValues=basic.isOn(t)?1:0,Ge()},i.setTableView=function(t){i.tableView=basic.isOn(t)?1:0,1==i.tableView&&je(),fn(),on()},i.getTableData=function(){return ne()?en():be()?function(){const t="bubble"===i.type,e=Ce(lt()).map(function(e){const n=[void 0===e.label?e.seriesName:String(e.label),Te(e.x),W(e.y)];return t&&n.push(null===e.size?"":GraphBox.formatNumber(e.size,i.locale)),n}),n=[i.tableHeadText,i.xAxisText||"x",i.yAxisText||"y"];return t&&n.push(i.sizeText),{head:n,rows:e}}():function(){const t=lt(),e=[];for(let n=0;n<st(t);n++){const o=t.map(function(t){const e=O(t.dataset,n);return null===e?"":W(e)});e.push([N(n)].concat(o))}const n=t.map(function(t){return t.dataset.label||""});return{head:[i.tableHeadText].concat(n),rows:e}}()},i.getCanvas=function(t=2){const e=i.elem.offsetWidth,n=i.elem.offsetHeight,o=document.createElement("canvas");o.width=e*t,o.height=n*t;const a=o.getContext("2d");a.scale(t,t),function(t,e,n){const o=U(),a=Number(i.border)||0,r=Number(i.round)||0;t.beginPath(),t.roundRect?t.roundRect(a/2,a/2,e-a,n-a,r):t.rect(a/2,a/2,e-a,n-a),"transparent"!==o&&(t.fillStyle=o,t.fill()),a&&(t.strokeStyle=i.borderColor,t.lineWidth=a,t.stroke())}(a,e,n),un(a,i.lblTitle),un(a,i.lblSubtitle),function(t){1==i.legendGroup.visible&&i.legendItems.forEach(function(e){const n=sn(e.key);t.globalAlpha=Number(e.opacity),t.fillStyle=e.key.color,t.beginPath(),t.roundRect?t.roundRect(n.left,n.top,n.width,n.height,Number(e.key.round)||0):t.rect(n.left,n.top,n.width,n.height),t.fill(),t.globalAlpha=1,un(t,e.label,Number(e.opacity))})}(a);const r=sn(i.plot);return a.translate(r.left,r.top),[g,b,y,M,T].forEach(function(t){ln(a,t)}),o},i.getImage=function(t="image/png",e=2){const n=i.getCanvas(e);if("image/jpeg"===t){const t=n.getContext("2d");t.setTransform(1,0,0,1,0,0),t.globalCompositeOperation="destination-over",t.fillStyle="#FFFFFF",t.fillRect(0,0,n.width,n.height)}return n.toDataURL(t)},i.download=function(t="chart.png"){const e=t.toLowerCase().endsWith(".jpg"),n=document.createElement("a");n.href=i.getImage(e?"image/jpeg":"image/png"),n.download=t,n.click()},i.setTargetLines=function(t){i.targetLines=(t||[]).slice(),ve()},i.setMaxSlices=function(t){i.maxSlices=t,dn()},i.setStacked=function(t){i.stacked=basic.isOn(t)?1:0,ve()},i.setHorizontal=function(t){i.horizontal=basic.isOn(t)?1:0,ve()},i.setAnimated=function(t){i.animated=basic.isOn(t)?1:0,1!=i.animated&&(i.tooltip.setMotionNow(""),i.tooltip.css={transform:""},i.tooltip.opacity=1,i.tooltip.visible=F?1:0,F&&Ne())},i.setCurve=function(t){i.curve=t,ve()},i.setValueLimits=function(t,e){i.minValue=t,i.maxValue=e,ve()},i.setSoftLimits=function(t,e){i.softMinValue=t,i.softMaxValue=e,ve()},i.setValueStep=function(t){i.valueStep=t,ve()},i.setXLimits=function(t,e){i.minX=t,i.maxX=e,Ge()},i.setAxisTexts=function(t,e){i.xAxisText=t,i.yAxisText=e,Ge()},i.setFormatValue=function(t){i.formatValue=t,Ge()},i.setFormatX=function(t){i.formatX=t,Ge()},i.setTheme=function(t){i.theme=t,hn()},i.setStyle=function(t){const e={};mergeIntoIfMissing(e,t),mergeIntoIfMissing(e,a),i.style=e,a=e,v="",hn()},i.layout=VGroup({align:"left top",gap:a.box.gap,padding:a.box.padding}),i.texts=VGroup({width:"100%",height:"auto",align:"left top",gap:2}),i.texts.shrink=0,i.lblTitle=Label({...a.title,ellipsis:1,css:{maxWidth:"100%"}}),i.lblSubtitle=Label({...a.subtitle,css:{maxWidth:"100%",whiteSpace:"normal",textWrap:"balance"}}),endGroup(),i.body=VGroup({width:"100%",height:"auto",align:"left top",gap:a.box.gap}),i.body.css={flex:"1 1 0",minHeight:"0px"},i.legendGroup=HGroup({width:"100%",height:"auto",align:"left center",wrap:1}),i.legendGroup.shrink=0,i.legendGroup.css={rowGap:a.legend.lineGap+"px",columnGap:a.legend.gap+"px",maxWidth:"100%"},endGroup(),i.plot=startBox({width:"100%",height:"auto",color:"transparent"}),i.plot.css={flex:"1 1 0",minWidth:"0px",minHeight:"0px",alignSelf:"stretch",touchAction:"pan-y"},i.lblEmpty=Label({left:0,width:"100%",textAlign:"center",fontSize:a.axis.fontSize,visible:0}),i.lblEmpty.css={top:"calc(50% - 10px)"},endBox(),endGroup(),endGroup(),x=q("svg",{"aria-hidden":"true"}),i.svg=x,x.style.cssText="position: absolute; left: 0; top: 0; display: block;",m=Q(x,"defs",{}),g=Q(x,"g",{}),b=Q(x,"g",{}),y=Q(x,"g",{}),C=Q(y,"g",{}),M=Q(x,"g",{}),T=Q(x,"g",{}),i.plot.elem.appendChild(x),i.tooltip=VGroup({left:0,top:0,hug:1,align:"left top",gap:a.tooltip.gap,padding:a.tooltip.padding,round:a.tooltip.round}),i.lblTooltipTitle=Label({fontSize:a.tooltip.fontSize,ellipsis:1}),endGroup(),i.tooltip.boxShadow=a.tooltip.shadow,i.tooltip.zIndex=1,i.tooltip.role="status",i.tooltip.visible=0,i.data=function(){if(n.data)return H(n.data);let t=n.datasets;return!t&&n.values&&(t=[{data:n.values}]),H({labels:n.labels,datasets:t})}(),i.plot.role="img",i.plot.tabIndex=0,i.plot.on("pointermove",Ze),i.plot.on("pointerdown",Ze),i.plot.on("pointerleave",function(t,e){"touch"!==e.pointerType&&je()}),i.plot.on("click",function(t,e){Ye(e)}),i.plot.on("keydown",function(t,e){if(!w)return;if("Escape"===e.key)return void je();if("Enter"===e.key)return void Ye(e);const n=l[e.key];n&&(e.preventDefault(),G=null,_e(w.stepItem(B,n)))}),i.plot.on("focus",function(){w&&!B&&i.plot.elem.matches(":focus-visible")&&(G=null,_e(w.stepItem(null,0)))}),i.plot.on("blur",je),i.plot.onResize(function(){i.plot.elem.clientWidth+"x"+i.plot.elem.clientHeight!==k&&Ge(),Je()!==E&&i.after(0,fn)}),i.listenTo(document,"pointerdown",function(t,e){B&&!i.plot.elem.contains(e.target)&&je()}),window.matchMedia&&i.listenTo(window.matchMedia("(prefers-color-scheme: dark)"),"change",pn),hn(),function(){const t=a.axis.fontSize+"px opensans";if(!document.fonts||document.fonts.check(t))return;const e=function(){i._isRemoved||Ge()};document.fonts.load(t).then(e,e)}(),endObject(i)};GraphBox._idCounter=0,GraphBox.OTHER_SLICE=-1,GraphBox.THEMES={light:{backgroundColor:"#FCFCFB",borderColor:"rgba(11, 11, 11, 0.10)",titleColor:"#0B0B0B",textColor:"#52514E",mutedTextColor:"#898781",gridColor:"#E1E0D9",axisColor:"#C3C2B7",hoverColor:"rgba(11, 11, 11, 0.05)",targetColor:"#52514E",focusColor:"rgba(42, 120, 214, 0.7)",otherColor:"#A9A8A0",tooltipColor:"#0B0B0B",tooltipTextColor:"#FFFFFF",tooltipMutedColor:"rgba(255, 255, 255, 0.65)",colors:["#2A78D6","#EB6834","#1BAF7A","#EDA100","#E87BA4","#008300","#6250D6","#E34948"]},dark:{backgroundColor:"#1A1A19",borderColor:"rgba(255, 255, 255, 0.10)",titleColor:"#F0EFEC",textColor:"#C3C2B7",mutedTextColor:"#898781",gridColor:"#2C2C2A",axisColor:"#383835",hoverColor:"rgba(255, 255, 255, 0.06)",targetColor:"#C3C2B7",focusColor:"rgba(57, 135, 229, 0.8)",otherColor:"#6F6E69",tooltipColor:"#2C2C2A",tooltipTextColor:"#FFFFFF",tooltipMutedColor:"rgba(255, 255, 255, 0.65)",colors:["#3987E5","#D95926","#199E70","#C98500","#D55181","#008300","#9085E9","#E66767"]}},GraphBox.MINIMAL_SHAPES={box:{round:4,padding:12,gap:10},title:{fontSize:13,fontFamily:"opensans-bold"},subtitle:{fontSize:11},legend:{keys:{line:{width:12,height:2,round:1},box:{width:8,height:8,round:2},dot:{width:6,height:6,round:3}},fontSize:11,gap:12,lineGap:4,keyGap:5},axis:{fontSize:11},bar:{maxThickness:20,round:2},line:{width:1.5,pointRadius:3,pointRing:1.5},pie:{centerFontSize:20},table:{fontSize:11,rowHeight:24},tooltip:{fontSize:11,round:4,padding:[8,6],shadow:"none"}},GraphBox.THEMES.minimal={backgroundColor:"#FFFFFF",borderColor:Black(.2),titleColor:Black(.85),textColor:Black(.55),mutedTextColor:Black(.54),gridColor:Black(.08),axisColor:Black(.2),hoverColor:Black(.04),targetColor:Black(.55),focusColor:"#3D8BD9",otherColor:Black(.3),tooltipColor:"#1F1F1F",tooltipTextColor:"#FFFFFF",tooltipMutedColor:White(.65),colors:GraphBox.THEMES.light.colors,style:GraphBox.MINIMAL_SHAPES},GraphBox.THEMES.minimalDark={backgroundColor:"#1A1A19",borderColor:White(.18),titleColor:White(.88),textColor:White(.55),mutedTextColor:White(.48),gridColor:White(.07),axisColor:White(.18),hoverColor:White(.05),targetColor:White(.55),focusColor:"#7FB6DE",otherColor:White(.3),tooltipColor:"#EDEDEB",tooltipTextColor:"#1A1A19",tooltipMutedColor:Black(.6),colors:GraphBox.THEMES.dark.colors,style:GraphBox.MINIMAL_SHAPES},GraphBox.findNiceStep=function(t,e,n){const o=(e-t)/Math.max(1,n),i=Math.pow(10,Math.floor(Math.log10(o))),a=[1,2,2.5,5,10].find(function(t){return o/i<=1.2*t});return{step:a*i,decimals:Math.max(0,-Math.floor(Math.log10(i)))+(2.5===a?1:0)}},GraphBox.countDecimals=function(t){const e=String(t).split(".");return e[1]?e[1].length:0},GraphBox.niceScale=function(t,e,n=5,o=0){if(!(e>t)){const n=.1*Math.abs(t)||1;t=0===t?0:t-n,e+=n}const i=o>0&&(e-t)/o<=500?{step:o,decimals:GraphBox.countDecimals(o)}:GraphBox.findNiceStep(t,e,n),a=i.step,r=Math.floor(t/a+1e-9),l=Math.ceil(e/a-1e-9),s=[];for(let t=r;t<=l;t++)s.push(Number((t*a).toFixed(i.decimals)));return{min:s[0],max:s[s.length-1],ticks:s,decimals:i.decimals}},GraphBox.formatNumber=function(t,e){return t.toLocaleString(e||void 0,{maximumFractionDigits:6})},GraphBox.formatCompactNumber=function(t,e,n=0){const o={notation:"compact",maximumFractionDigits:Math.max(2,n)};return t.toLocaleString(e||void 0,o)},GraphBox.formatPercent=function(t,e){return t.toLocaleString(e||void 0,{style:"percent",maximumFractionDigits:1})},GraphBox.measureText=function(t,e,n){return GraphBox._measureContext||(GraphBox._measureContext=document.createElement("canvas").getContext("2d")),GraphBox._measureContext.font=e+"px "+n,GraphBox._measureContext.measureText(String(t)).width},GraphBox.fitText=function(t,e,n,o){const i=function(t){return GraphBox.measureText(t,n,o)<=e};if(i(t))return t;let a=t.length-1;for(;a>0&&!i(t.slice(0,a)+"…");)a--;return t.slice(0,a)+"…"},GraphBox.wrapText=function(t,e,n){const o=[];let i="";return e.split(" ").forEach(function(e){const a=i?i+" "+e:e;if(i&&t.measureText(a).width>n+1)return o.push(i),void(i=e);i=a}),o.push(i),o},GraphBox.pointText=function(t){return GraphBox.roundNumber(t.x)+" "+GraphBox.roundNumber(t.y)+" "},GraphBox.roundNumber=function(t){return Math.round(100*t)/100},GraphBox.barPath=function(t,e,n){const o=t.left,i=t.left+t.width,a=t.top,r=t.top+t.height,l="top"===n||"bottom"===n?Math.min(e,t.width/2,t.height):Math.min(e,t.height/2,t.width),s="top"===n||"left"===n?l:0,u="top"===n||"right"===n?l:0,c="bottom"===n||"right"===n?l:0,f="bottom"===n||"left"===n?l:0,d=function(t,e){return GraphBox.pointText({x:t,y:e})};return"M"+d(o+s,a)+"L"+d(i-u,a)+"Q"+d(i,a)+d(i,a+u)+"L"+d(i,r-c)+"Q"+d(i,r)+d(i-c,r)+"L"+d(o+f,r)+"Q"+d(o,r)+d(o,r-f)+"L"+d(o,a+s)+"Q"+d(o,a)+d(o+s,a)+"Z"},GraphBox.canMovePaths=function(){return!!(window.CSS&&CSS.supports&&CSS.supports("d",'path("M0 0")'))},GraphBox.readColor=function(t){if(!GraphBox._colorContext){const t=document.createElement("canvas");t.width=1,t.height=1,GraphBox._colorContext=t.getContext("2d",{willReadFrequently:!0})}const e=GraphBox._colorContext;return e.clearRect(0,0,1,1),e.fillStyle=t,e.fillRect(0,0,1,1),e.getImageData(0,0,1,1).data},GraphBox.toTransparent=function(t,e){const n=GraphBox.readColor(t);return"rgba("+n[0]+", "+n[1]+", "+n[2]+", "+e+")"},GraphBox.getTextColorOn=function(t){const e=GraphBox.readColor(t),n=function(t){const e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)};return.2126*n(e[0])+.7152*n(e[1])+.0722*n(e[2])>.2?"#0B0B0B":"#FFFFFF"},GraphBox.polygonPath=function(t){return t.length?"M"+t.map(function(t){return GraphBox.pointText(t)}).join("L")+"Z":""},GraphBox.ringPath=function(t,e,n){const o=function(e,n){const o=GraphBox.pointText({x:t.x-e,y:t.y}),i="A"+e+" "+e+" 0 1 "+n+" ";return"M"+o+i+GraphBox.pointText({x:t.x+e,y:t.y})+i+o+"Z"};return o(n,1)+(e>0?o(e,0):"")},GraphBox.slicePath=function(t,e,n,o,i,a){const r=i-o;if(r>=2*Math.PI-1e-4)return GraphBox.ringPath(t,e,n);const l=function(e,n){return GraphBox.pointText({x:t.x+e*Math.cos(n),y:t.y+e*Math.sin(n)})},s=function(t,e,n,o){return"A"+t+" "+t+" 0 "+(n?1:0)+" "+o+" "+l(t,e)},u=r>a/n?a/2:0,c=u/n,f=e>0?u/e:1/0,d=r-2*c;let h="M"+l(n,o+c)+s(n,i-c,d>Math.PI,1);if(r>2*f){const t=r-2*f;return h+="L"+l(e,i-f)+s(e,o+f,t>Math.PI,0),h+"Z"}const p=u/Math.sin(r/2),x=r>Math.PI?Math.min(p,a):p;return h+="L"+l(Math.max(e,x),o+r/2),h+"Z"},GraphBox.curveCommands=function(t,e,n){if(e&&t.length>2)return GraphBox.smoothCommands(t,n);let o="";for(let e=1;e<t.length;e++)o+="L"+GraphBox.pointText(t[e]);return o},GraphBox.smoothCommands=function(t,e){const n=e?"y":"x",o=e?"x":"y",i=t.length,a=[],r=[];for(let e=0;e<i-1;e++)a[e]=t[e+1][n]-t[e][n],r[e]=(t[e+1][o]-t[e][o])/a[e];const l=[r[0]];for(let t=1;t<i-1;t++){if(r[t-1]*r[t]<=0){l[t]=0;continue}const e=2*a[t]+a[t-1],n=a[t]+2*a[t-1];l[t]=(e+n)/(e/r[t-1]+n/r[t])}l[i-1]=r[i-2];const s=function(t,e){const i={};return i[n]=t,i[o]=e,i};let u="";for(let e=0;e<i-1;e++){const i=a[e]/3,r=s(t[e][n]+i,t[e][o]+l[e]*i),c=s(t[e+1][n]-i,t[e+1][o]-l[e+1]*i);u+="C"+GraphBox.pointText(r)+GraphBox.pointText(c)+GraphBox.pointText(t[e+1])}return u};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* Bismillah */
|
|
2
|
+
"use strict";const GridGroupDefaults={width:"100%",height:"auto",columns:2,rows:null,gap:0,align:"",clipContent:0},GridGroup=function(t={}){mergeIntoIfMissing(t,GridGroupDefaults);const r=Object.assign({},t,{gap:GridGroup.toGapText(t.gap)});delete r.align;const n=HGroup(r),o=function(){n.css={gridTemplateColumns:GridGroup.toTracks(n.columns),gridTemplateRows:GridGroup.toTracks(n.rows)}},i=function(){const t=GridGroup.toCellPlace(n._align);n.css={justifyItems:t.horizontal,alignItems:t.vertical}};return n.setColumns=function(t){n.columns=t,o()},n.setRows=function(t){n.rows=t,o()},n.setGap=function(t){n.gap=GridGroup.toGapText(t)},n.setAlign=function(t){n._align=t,i()},n.place=function(t,r={}){if(t.css={gridColumn:GridGroup.toCellLine(r.column,r.columnSpan),gridRow:GridGroup.toCellLine(r.row,r.rowSpan)},r.align){const n=GridGroup.toCellPlace(r.align);t.css={justifySelf:n.horizontal,alignSelf:n.vertical}}return t},n.css={display:"grid",justifyContent:"start",alignContent:"start"},n._align=t.align,o(),i(),void 0!==t.visible&&(n.visible=t.visible),n};GridGroup.toTrack=function(t){return"number"==typeof t?t+"px":/^[\d.]+fr$/.test(t)?"minmax(0, "+t+")":t},GridGroup.toTracks=function(t){return null==t?"":"number"==typeof t?"repeat("+t+", minmax(0, 1fr))":Array.isArray(t)?t.map(GridGroup.toTrack).join(" "):String(t)},GridGroup.toGapText=function(t){return Array.isArray(t)?t[1]+"px "+t[0]+"px":"number"==typeof t?t+"px":t},GridGroup.toCellLine=function(t,r){const n="span "+(r||1);return null==t?n:t+1+" / "+n},GridGroup.CELL_PLACES={left:"start",right:"end",top:"start",bottom:"end"},GridGroup.toCellPlace=function(t){const r=String(t||"").split(" "),n=r.includes("center"),o=function(t){return t?GridGroup.CELL_PLACES[t]:n?"center":"stretch"};return{horizontal:o(r.find(function(t){return"left"===t||"right"===t})),vertical:o(r.find(function(t){return"top"===t||"bottom"===t}))}};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* Bismillah */
|
|
2
|
-
"use strict";const HoldToConfirmButtonDefaults={key:"0",width:"auto",height:50,labelText:"Hold to Delete",completedText:"DELETED",iconFile:"
|
|
2
|
+
"use strict";const HoldToConfirmButtonDefaults={key:"0",width:"auto",height:50,labelText:"Hold to Delete",completedText:"DELETED",allowHtml:0,iconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 144 144" preserveAspectRatio="none" fill="none" stroke="#141414" stroke-width="9" stroke-linecap="round" stroke-linejoin="round"><path d="M56.5 22.5H87.5M30.5 27H113.5M34.5 31V112A9.5 9.5 0 0 0 44 121.5H100A9.5 9.5 0 0 0 109.5 112V31M59.5 48.5V99.5M84.5 48.5V99.5"/></svg>'),holdingIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 144 144" preserveAspectRatio="none" fill="none" stroke="#FE5D49" stroke-width="9" stroke-linecap="round" stroke-linejoin="round"><path d="M56.5 22.5H87.5M30.5 27H113.5M34.5 31V112A9.5 9.5 0 0 0 44 121.5H100A9.5 9.5 0 0 0 109.5 112V31M59.5 48.5V99.5M84.5 48.5V99.5"/></svg>'),onConfirm:function(o){},onReset:function(o){},holdDuration:3e3,resetDelay:3e3,style:{layout:{gap:4,padding:[18,5]},icon:{width:32,height:32},label:{fontSize:20,textColor:Black(.7)},holdingLabel:{fontSize:20,textColor:"#FE5D49"},completedLabel:{fontSize:20,textColor:"#5DB182"},box:{color:Black(.05),border:1,borderColor:Black(.3),round:8},holdingBox:{color:"#FFD1CB",border:1,borderColor:"#FE5D49",rightBorderColor:"#FE5D4944",round:8},completedBox:{color:"#DFEFE6",opacity:0,border:1,borderColor:"#5DB182",round:8}}},HoldToConfirmButton=function(o={}){mergeIntoIfMissing(o,HoldToConfirmButtonDefaults),o.color="transparent";const e=startObject(o),t="background-color 0.2s",n="left center";e.holdDurationString=e.holdDuration/1e3+"s",e.publicVar=1,e.holdTimer=null,e.resetTimer=null;const l=function(o,t){const n=null==t?"":String(t);1==e.allowHtml?o.text=n:o.plainText=n},i=function(){const o=window.getComputedStyle(e.contentBox.elem).getPropertyValue("width");e.holdingBox.width=basic.num(o)};return e.startHold=function(o,n){e.holdTimer||n&&"mousedown"===n.type&&(0!==n.button||n.ctrlKey)||(e.maskBox.setMotion(t+", width "+e.holdDurationString),e.maskBox.withMotion(function(){e.maskBox.width=e.contentBox.width}),e.holdTimer=e.after(e.holdDuration,function(){e.onHoldComplete()}))},e.cancelHold=function(){e.holdTimer&&(e.holdTimer(),e.holdTimer=null),e.maskBox.setMotion(t+", width 0.3s"),e.maskBox.withMotion(function(){e.maskBox.width=0})},e.onHoldComplete=function(){e.holdTimer=null,e.maskBox.dontMotion(),e.maskBox.width=0,e.clickable=0,e.completedBox.dontMotion(),e.completedBox.opacity=1,e.resetTimer=e.after(e.resetDelay,function(){e.resetTimer=null,e.clickable=1,e.completedBox.opacity=0,e.onReset(e)}),e.onConfirm&&e.onConfirm(e)},e.refresh=function(){},e.cursor="pointer",e.clickable=1,e.contentBox=HGroup({width:"auto",height:"100%",gap:e.style.layout.gap,position:"relative",padding:e.style.layout.padding,align:n,...e.style.box}),e.icon=Icon(0,0,e.style.icon),e.icon.setMotion("opacity 0.2s"),e.icon.load(e.iconFile),e.label=Label(0,0,e.style.label),e.label.setMotion("opacity 0.2s"),l(e.label,e.labelText),e.label.css.whiteSpace="nowrap",endGroup(),e.maskBox=startBox(0,0,0,"100%",{color:"transparent"}),e.holdingBox=HGroup({width:0,height:"100%",gap:e.style.layout.gap,padding:e.style.layout.padding,align:n,...e.style.holdingBox}),e.iconRed=Icon(0,0,e.style.icon),e.iconRed.load(e.holdingIconFile),e.labelRed=Label(0,0,e.style.holdingLabel),l(e.labelRed,e.labelText),e.labelRed.css.whiteSpace="nowrap",e.redBorder=Box({position:"absolute",left:0,top:0,width:1,height:"100%",color:e.style.holdingBox.rightBorderColor}),endGroup(),endBox(),e.maskBox.onResize(function(){const o=window.getComputedStyle(e.maskBox.elem).getPropertyValue("width");e.redBorder.left=basic.num(o)-2}),i(),e.contentBox.onResize(i),e.completedBox=startBox(0,0,"100%","100%",e.style.completedBox),e.completedBox.setMotion("opacity 0.3s"),HGroup(),Label(e.style.completedLabel),l(that,e.completedText),that.css.whiteSpace="nowrap",endGroup(),endBox(),["mousedown","touchstart"].forEach(o=>e.on(o,e.startHold)),["mouseup","touchend","touchcancel","mouseleave","contextmenu"].forEach(o=>e.on(o,e.cancelHold)),endObject(e)};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* Bismillah */
|
|
2
|
+
"use strict";const ImageViewDefaults={key:"0",width:"100%",height:360,imageFile:"",altText:"",minZoom:.1,maxZoom:8,zoomStep:1.25,enlargeToFit:0,wheelZoom:1,pixelatedZoom:3,showToolbar:1,emptyText:"No image",errorText:"This image can not be opened.",ariaLabel:"Image viewer",buttonTexts:{zoomOut:"Zoom out",actualSize:"Actual size",zoomIn:"Zoom in",fit:"Fit to the box"},onLoad:function(e){},onError:function(e){},onZoomChange:function(e){},styleName:"light",style:{box:{color:"#EFEFEC",border:1,borderColor:Black(.14),round:8},image:{color:"transparent"},toolbar:{color:"white",border:1,borderColor:Black(.12),round:9,padding:3,gap:1,bottom:10,shadow:"0 2px 10px "+Black(.16)},toolButton:{size:30,iconSize:16,round:6,textColor:Black(.72),hoverColor:Black(.07),disabledOpacity:.32},zoomText:{fontSize:12,width:48},empty:{fontSize:13,textColor:Black(.5),iconSize:34,lineColor:Black(.2),space:14,round:6},error:{textColor:"#B93226"},focus:{ringColor:"rgba(63, 141, 148, 0.8)"}}},ImageView=function(e={}){const o=e.style;basic.applyStylePackage(e,ImageView.styles,ImageViewDefaults),mergeIntoIfMissing(e,ImageViewDefaults);const t=startObject(e);let n=t.style;const i={minus:'<path d="M4 8h8"/>',plus:'<path d="M4 8h8M8 4v8"/>',fit:'<path d="M2.5 6V2.5H6M10 2.5h3.5V6M13.5 10v3.5H10M6 13.5H2.5V10"/>',picture:'<rect x="1.5" y="2.5" width="13" height="11" rx="2"/><circle cx="5.5" cy="6" r="1.2"/><path d="M2 12l3.5-3.5 2.5 2.5 2.5-3 3.5 4"/>'};let r=0,l=0,a=1,c=0,s="empty";const m=new Map;let u=null;t.zoomLevel=1,t.naturalWidth=0,t.naturalHeight=0;const p=function(e){const o=t.elem.getBoundingClientRect(),n=function(){const e=t.elem.offsetWidth;return e>0?t.elem.getBoundingClientRect().width/e:1}();return{x:(e.clientX-o.left)/n-t.elem.clientLeft,y:(e.clientY-o.top)/n-t.elem.clientTop}},d=function(){return{x:t.elem.clientWidth/2,y:t.elem.clientHeight/2}},g=function(){if(!c||t.elem.clientWidth<=0||t.elem.clientHeight<=0)return 1;const e=Math.min(t.elem.clientWidth/t.naturalWidth,t.elem.clientHeight/t.naturalHeight);return 1==t.enlargeToFit?e:Math.min(e,1)},h=function(){return Math.min(t.minZoom,g())},f=function(){return Math.max(t.maxZoom,g())},b=function(e,o,t){return o<=t?(t-o)/2:basic.clamp(e,t-o,0)},y=function(){const e=t.naturalWidth*t.zoomLevel,o=t.naturalHeight*t.zoomLevel;r=b(r,e,t.elem.clientWidth),l=b(l,o,t.elem.clientHeight),t.image.left=r,t.image.top=l,t.image.width=e,t.image.height=o},x=function(){const e=t.naturalWidth*t.zoomLevel>t.elem.clientWidth,o=t.naturalHeight*t.zoomLevel>t.elem.clientHeight;return c&&(e||o)},z=function(e,o){e.isUsable=o,e.opacity=o?1:n.toolButton.disabledOpacity,e.cursor=o?"pointer":"default",e.aria={disabled:o?"false":"true"},o||(e.color="transparent")},w=function(){const e=t.pixelatedZoom>0&&t.zoomLevel>=t.pixelatedZoom;t.image.css.imageRendering=e?"pixelated":"auto",t.btnZoomText.plainText=Math.round(100*t.zoomLevel)+"%",z(t.btnZoomOut,t.zoomLevel>h()),z(t.btnZoomIn,t.zoomLevel<f()),t.cursor=x()?"grab":"default",t.css.touchAction=x()?"none":"pan-x pan-y"},v=function(){const e="error"===s,o=e?n.error.textColor:n.empty.textColor;t.image.visible=c?1:0,t.toolbar.visible=c&&1==t.showToolbar?1:0,t.emptyGroup.visible=s?1:0,t.lblEmpty.plainText=e?t.errorText:t.emptyText,t.lblEmpty.textColor=o,t.icoEmpty.textColor=o},T=function(e){const o=n.toolButton;e.props({width:o.size,height:o.size,fontSize:n.zoomText.fontSize,textColor:o.textColor,round:o.round}),e.setFocusRing(n.focus.ringColor)},C=function(){const e=n.toolbar,o=n.empty.space+"px";t.props(n.box),t.setFocusRing(n.focus.ringColor),t.elem.style.setProperty("--image-view-icon",n.toolButton.iconSize+"px"),t.image.color=n.image.color,t.emptyGroup.round=n.empty.round,t.emptyGroup.css={left:o,top:o,right:o,bottom:o},t.emptyGroup.css.border="1px dashed "+n.empty.lineColor,t.icoEmpty.props({width:n.empty.iconSize,height:n.empty.iconSize}),t.lblEmpty.fontSize=n.empty.fontSize,t.toolbar.props({gap:e.gap,padding:e.padding,color:e.color,border:e.border,borderColor:e.borderColor,round:e.round,boxShadow:e.shadow}),t.toolbar.css.bottom=e.bottom+"px",[t.btnZoomOut,t.btnZoomText,t.btnZoomIn,t.btnFit].forEach(T),t.btnZoomText.width=n.zoomText.width,v()},I=function(e,o){const n=t.zoomLevel;t.zoomLevel=basic.clamp(e,h(),f());const i=t.zoomLevel/n;r=o.x-(o.x-r)*i,l=o.y-(o.y-l)*i,y(),w(),t.zoomLevel!=n&&t.onZoomChange(t)},k=function(e,o){r+=e,l+=o,y()},L=function(){a=1,I(g(),d())},Z=function(e,o){c&&(a=0,I(e,o))},S=function(){const e=Array.from(m.values());return{distance:Math.hypot(e[0].x-e[1].x,e[0].y-e[1].y),x:(e[0].x+e[1].x)/2,y:(e[0].y+e[1].y)/2}},B=function(e,o){m.delete(o.pointerId),m.size<2&&(u=null),0==m.size&&(t.cursor=x()?"grab":"default")},F=function(e){return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">'+e+"</svg>"},M=function(e,o){const t=Button({color:"transparent",shrink:0,css:{padding:"0",display:"flex",alignItems:"center",justifyContent:"center"}});return t.minimal=1,t.isUsable=1,t.aria={label:e},t.onHoverChange(function(e,o){e.color=o&&e.isUsable?n.toolButton.hoverColor:"transparent"}),t.on("click",o),t},W=function(e,o,t){const n=M(o,t);return n.text=F(i[e]),n.elem.classList.add("image-view-icon"),n};return t.setImage=function(e,o=t.altText){if(t.imageFile=e,t.altText=o,t.image.alt=o,e)return s="",v(),void t.image.load(e);c=0,s="empty",m.clear(),u=null,t.image.elem.removeAttribute("src"),v()},t.clearImage=function(){t.setImage("")},t.zoomIn=function(){Z(t.zoomLevel*t.zoomStep,d())},t.zoomOut=function(){Z(t.zoomLevel/t.zoomStep,d())},t.zoomToFit=function(){c&&L()},t.zoomToActualSize=function(){Z(1,d())},t.setZoomLevel=function(e){Z(e,d())},t.setShowToolbar=function(e){t.showToolbar=basic.isOn(e)?1:0,t.toolbar.visible=c&&1==t.showToolbar?1:0},t.setTheme=function(e){t.styleName=e,n=function(e){const t={styleName:e,style:o};return basic.applyStylePackage(t,ImageView.styles,ImageViewDefaults),mergeIntoIfMissing(t,ImageViewDefaults),t.style}(e),t.style=n,C()},basic.addCss("image-view-icon",".image-view-icon svg { display: block; width: var(--image-view-icon); height: var(--image-view-icon); }"),t.clickable=1,t.tabIndex=0,t.role="group",t.aria={label:t.ariaLabel},t.image=Icon({left:0,top:0,width:1,height:1,visible:0}),t.image.imageFit="fill",t.emptyGroup=VGroup({align:"center center",gap:8,padding:12,css:{position:"absolute",width:"auto",height:"auto"}}),t.icoEmpty=Label({}),t.icoEmpty.text=F(i.picture),t.icoEmpty.elem.classList.add("image-view-note-icon"),t.lblEmpty=Label({textAlign:"center"}),endGroup(),basic.addCss("image-view-note-icon",".image-view-note-icon svg { display: block; width: 100%; height: 100%; }"),t.toolbar=HGroup({width:"auto",height:"auto",align:"center center",css:{position:"absolute",left:"50%",top:"auto",transform:"translateX(-50%)"}}),t.toolbar.clickable=1,t.btnZoomOut=W("minus",t.buttonTexts.zoomOut,function(){t.zoomOut()}),t.btnZoomText=M(t.buttonTexts.actualSize,function(){t.zoomToActualSize()}),t.btnZoomIn=W("plus",t.buttonTexts.zoomIn,function(){t.zoomIn()}),t.btnFit=W("fit",t.buttonTexts.fit,function(){t.zoomToFit()}),endGroup(),t.listenTo(t.image.elem,"load",function(){const e=t.image.elem.naturalWidth||300,o=t.image.elem.naturalHeight||150,n=c&&e==t.naturalWidth&&o==t.naturalHeight;c=1,t.naturalWidth=e,t.naturalHeight=o,n||(t.zoomLevel=g(),a=1,y(),w(),t.onZoomChange(t)),s="",v(),t.onLoad(t)}),t.listenTo(t.image.elem,"error",function(){c=0,s="error",v(),t.onError(t)}),t.on("wheel",function(e,o){if(1!=t.wheelZoom||!c)return;o.preventDefault();const n=o.ctrlKey?.01:.002,i=1===o.deltaMode?16*o.deltaY:o.deltaY;Z(t.zoomLevel*Math.exp(-i*n),p(o))},{passive:!1}),t.on("pointerdown",function(e,o){c&&0===o.button&&!t.toolbar.elem.contains(o.target)&&(m.set(o.pointerId,p(o)),function(e){try{t.elem.setPointerCapture(e)}catch(o){m.delete(e)}}(o.pointerId),2==m.size&&(u=S()),x()&&(t.cursor="grabbing"))}),t.on("pointermove",function(e,o){const n=m.get(o.pointerId);if(!n)return;const i=p(o);if(m.set(o.pointerId,i),1==m.size){if(!x())return;a=0,k(i.x-n.x,i.y-n.y)}else if(2==m.size&&u){const e=S();k(e.x-u.x,e.y-u.y),u.distance>0&&Z(t.zoomLevel*e.distance/u.distance,e),u=e}}),t.on("pointerup",B),t.on("pointercancel",B),t.on("dblclick",function(e,o){if(!c||t.toolbar.elem.contains(o.target))return;if(!a)return void t.zoomToFit();const n=Math.abs(t.zoomLevel-1)<.01;Z(n?2:1,p(o))}),t.on("keydown",function(e,o){if(!c||t.toolbar.elem.contains(o.target))return;if(o.ctrlKey||o.metaKey||o.altKey)return;const n={ArrowLeft:[40,0],ArrowRight:[-40,0],ArrowUp:[0,40],ArrowDown:[0,-40]}[o.key];if(n&&x())a=0,k(n[0],n[1]);else if("+"===o.key||"="===o.key)t.zoomIn();else if("-"===o.key)t.zoomOut();else if("0"===o.key)t.zoomToFit();else{if("1"!==o.key)return;t.zoomToActualSize()}o.preventDefault()}),t.onResize(function(){c&&(a?L():y())}),C(),t.setImage(t.imageFile,t.altText),endObject(t)};ImageView.styles={light:ImageViewDefaults.style,dark:{box:{color:"#161615",borderColor:White(.1)},toolbar:{color:"#2B2B2A",borderColor:White(.12),shadow:"0 2px 12px "+Black(.5)},toolButton:{textColor:White(.85),hoverColor:White(.1)},empty:{textColor:White(.52),lineColor:White(.2)},error:{textColor:"#FF9F93"},focus:{ringColor:"rgba(111, 198, 205, 0.8)"}}};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* Bismillah */
|
|
2
|
-
"use strict";const ItemListDefaults={key:"0",width:600,height:400,items:[],layout:"vertical",selection:"single",selectedKeys:[],scrollToSelected:1,createItemView:null,createSectionView:null,animated:0,showSearch:0,searchParams:{},emptyText:"No items",noResultText:"No results",enabled:1,useScrollBar:1,ariaLabel:"List",onItemClick:function(e,o,t,n){},onChange:function(e,o){},styleName:"classic",style:{box:{color:"transparent",border:1,borderColor:"rgba(20, 20, 20, 0.45)",round:8,padding:0},list:{gap:0},row:{height:80,padding:[20,12],gap:15,color:"transparent",border:0,borderColor:"transparent",round:0,opacity:1,boxShadow:"",motion:"background-color 0.2s"},tile:{width:125,height:190,padding:[4,30],gap:15,spacing:4,listPadding:[12,5],iconSize:70,frameSize:90,frameColor:White(.3),frameRound:100,iconFilter:"grayscale(100%)",iconMotion:"transform 0.3s",hover:{},selectedColor:"white",selectedFrameColor:"transparent",selectedIconScale:1.5,selectedIconFilter:"grayscale(30%)",selectedFontFamily:"opensans-bold"},section:{height:"auto",padding:[20,8],fontSize:16,fontFamily:"opensans-bold",textColor:Black(.4)},hover:{color:"white"},pressed:{color:null},selected:{color:"transparent",opacity:.5},disabled:{opacity:.4},focus:{ringColor:"rgba(55, 56, 54, 0.5)"},icon:{size:50,round:4,color:"transparent"},title:{fontSize:20,textColor:"rgba(0, 0, 0, 0.8)",fontFamily:"",selectedTextColor:""},desc:{fontSize:14,textColor:"gray",marginTop:-4},check:{visible:0,size:22,color:"#373836",iconColor:"white",borderColor:Black(.25)},empty:{fontSize:16,textColor:Black(.4)},search:{height:40,padding:[0,0,0,0],fontSize:18,color:"white",textColor:"rgba(0, 0, 0, 0.8)",placeholderColor:"",border:0,borderColor:"rgba(0, 0, 0, 0.1)",borderBottomStyle:"2px solid rgba(0, 0, 0, 0.06)",round:6,searchIconSize:20,invertIconColor:0},scrollBar:{bar_border:0,bar_round:3,bar_borderColor:"rgba(0, 0, 0, 1)",bar_width:4,bar_mouseOverWidth:4,bar_mouseOverColor:"#373836",bar_opacity:.4,bar_mouseOverOpacity:.9,bar_padding:2,bar_color:"#373836",neverHide:1,showDots:1}}},ItemList=function(e={}){const o=e.style&&e.style.hover,t=!!o&&0===Object.keys(o).length;basic.applyStylePackage(e,ItemList.styles,ItemListDefaults),mergeIntoIfMissing(e,ItemListDefaults),t&&(e.style.hover={});const n=Array.isArray(e.items)?e.items.slice():[],r=Array.isArray(e.selectedKeys)?e.selectedKeys.slice():[],i="auto"===e.height;let l=startObject(e);const c=l.style;let s=[],a=[],u=[],f=null,d="",p=0;const h="cubic-bezier(0.2, 0.8, 0.2, 1)",g="opacity 0.25s "+h,m="transform 0.25s "+h,w=["vertical","horizontal","grid"],b=function(e){return w.includes(e)?e:(console.warn('ItemList: unknown layout "'+e+'", "vertical" is used.'),"vertical")},y=function(e){return"section"===e.type?1:0},S=function(e,o){const t=function(e){return"string"==typeof e?{title:e}:e||{}}(e);return{key:void 0!==t.key&&null!==t.key?String(t.key):String(o),item:e,data:t,row:null,isShown:1,isHover:0,isSection:y(t)}},x=function(e){return s.find(function(o){return o.key===String(e)})||null},v=function(e){return s.indexOf(e)},C=function(e){return u.includes(e.key)},k=function(e){return 1==l.enabled&&!basic.isOn(e.data.disabled)},F=function(){return u.map(x).filter(Boolean).map(function(e){return e.item})},z=function(e){return String(e||"").toLocaleLowerCase("tr").replace(/i̇/g,"i").replace(/ı/g,"i").replace(/ç/g,"c").replace(/ğ/g,"g").replace(/ş/g,"s").replace(/ü/g,"u").replace(/ö/g,"o")},I=function(e){return d?function(e){const o=e.data;return z([o.title,o.desc,o.searchText].join(" "))}(e).includes(d)?1:0:1},L=function(e){const o=e.row;if(!o||e.isSection||e.isLeaving)return;const t=C(e),n=function(e,o){const t=e.row.isTile,n=t?c.tile.hover:c.hover,r=t?{color:c.tile.selectedColor||c.selected.color,borderColor:c.selected.borderColor}:c.selected,i=Object.assign({},c.row,e.isHover?n:{},o?r:{});return void 0===i.opacity&&(i.opacity=1),e.isPressed&&c.pressed.color&&(i.color=c.pressed.color),i}(e,t);o.color=n.color,o.borderColor=n.borderColor,o.css.opacity=String(k(e)?n.opacity:c.disabled.opacity),o.aria={selected:t?"true":"false",disabled:k(e)?"false":"true"},o.lblTitle&&(o.lblTitle.textColor=t&&c.title.selectedTextColor?c.title.selectedTextColor:c.title.textColor),o.check&&B(o.check,t),o.isTile&&T(o,t)},T=function(e,o){const t=c.tile;e.iconFrame&&(e.iconFrame.color=o?t.selectedFrameColor:t.frameColor),e.icon&&(e.icon.css.filter=(o?t.selectedIconFilter:t.iconFilter)||"none",e.icon.css.transform="scale("+(o?t.selectedIconScale:1)+")"),e.lblTitle&&t.selectedFontFamily&&(e.lblTitle.fontFamily=o?t.selectedFontFamily:c.title.fontFamily||"opensans")},B=function(e,o){e.color=o?c.check.color:"transparent",e.borderColor=o?c.check.color:c.check.borderColor,e.text=o?ItemList.getCheckSvg(c.check.iconColor,.6*c.check.size):""},A=function(){s.forEach(L)},E=function(){const e=ae(),o=x(f),t=o&&o.isShown?o:e[0];s.forEach(function(e){e.row&&!e.isSection&&(e.row.tabIndex=1==l.enabled&&e===t?0:-1)})},O=function(e,o){if(!e.data.iconFile)return null;const t=Icon({width:o,height:o,color:c.icon.color,round:c.icon.round,position:"relative"});return t.shrink=0,t.load(e.data.iconFile),t},D=function(e,o,t){"function"!=typeof l.createItemView?(t?function(e,o){const t=c.tile;o.data.iconFile&&(t.frameSize>0?(e.iconFrame=HGroup({width:t.frameSize,height:t.frameSize,align:"center center",round:t.frameRound,color:t.frameColor}),e.iconFrame.position="relative",e.iconFrame.shrink=0,e.iconFrame.clipContent=0,e.iconFrame.setMotion("background-color 0.3s"),e.icon=O(o,t.iconSize),endGroup()):e.icon=O(o,t.iconSize))}(e,o):e.icon=O(o,c.icon.size),function(e,o,t){e.texts=VGroup({width:t?"100%":"auto",height:"auto",align:t?"center top":"left center",gap:0}),e.texts.css={flex:t?"":"1 1 0",minWidth:"0",alignItems:"stretch"},e.lblTitle=Label({plainText:o.data.title||"",width:"100%",fontSize:c.title.fontSize,ellipsis:1}),c.title.fontFamily&&(e.lblTitle.fontFamily=c.title.fontFamily),o.data.desc&&(e.lblDesc=Label({plainText:o.data.desc,width:"100%",fontSize:c.desc.fontSize,textColor:c.desc.textColor,ellipsis:1}),e.lblDesc.css.marginTop=(c.desc.marginTop||0)+"px"),t&&(e.lblTitle.css.textAlign="center",e.lblDesc&&(e.lblDesc.css.textAlign="center")),endGroup()}(e,o,t)):l.createItemView(o.item,e,l)},M=function(e){const o="horizontal"===l.layout||"grid"===l.layout,t=function(e){return e?VGroup({width:c.tile.width,height:c.tile.height,align:"center top",gap:c.tile.gap,padding:c.tile.padding}):HGroup({width:"100%",height:c.row.height,align:"left center",gap:c.row.gap,padding:c.row.padding})}(o);return t.isTile=o?1:0,t.position="relative",t.shrink=0,t.round=c.row.round,t.border=c.row.border,t.cursor="pointer",t.clickable=1,t.clipContent=0,c.row.boxShadow&&(t.boxShadow=c.row.boxShadow),H(t,e),t.role="option",t.aria={label:e.data.title||e.key},t.setFocusRing(c.focus.ringColor),D(t,e,o),function(e,o){if(!basic.isOn(c.check.visible)||"none"===l.selection)return;const t=c.check.size;e.check=Label({width:t,height:t,round:100,border:2,text:""}),e.check.shrink=0,e.check.css={display:"flex",alignItems:"center",justifyContent:"center"},e.check.aria={hidden:"true"},o&&(e.check.position="absolute",e.check.top=6,e.check.right=6)}(t,o),endGroup(),t},H=function(e,o){const t=U(o,"rest");t&&e.setMotion(t)},W=function(e){if(e.isHover=0,e.isSection)return e.row=function(e){const o=c.section,t="horizontal"===l.layout?"auto":"100%",n=HGroup({width:t,height:o.height,align:"left center",padding:o.padding});return n.position="relative",n.shrink=0,n.role="presentation",H(n,e),"function"==typeof l.createSectionView?l.createSectionView(e.item,n,l):(n.lblTitle=Label({plainText:e.data.title||"",width:t,fontSize:o.fontSize,textColor:o.textColor,ellipsis:1}),o.fontFamily&&(n.lblTitle.fontFamily=o.fontFamily)),endGroup(),n}(e),e.row;const o=M(e);return e.row=o,j(e),L(e),o.isTile&&o.icon&&c.tile.iconMotion&&o.icon.setMotion(c.tile.iconMotion),o},j=function(e){const o=e.row;o.on("click",function(o,t){!e.isLeaving&&k(e)&&(K(e),f=e.key,E(),l.onItemClick(l,e.item,v(e),t),le(e,0))}),o.onHoverChange(function(o,t){e.isHover=t&&k(e)?1:0,L(e)}),o.on("keydown",function(o,t){ge(e,t)})},G=function(){l.scrollBar&&l.scrollBar.refreshScroll()},_=function(){const e=ae().length;l.lblEmpty.visible=0===e?1:0,l.lblEmpty.plainText=0===s.filter(function(e){return!e.isSection}).length?l.emptyText:l.noResultText,G()},P=function(e=!1){!function(){let e=null;s.forEach(function(o){if(o.isSection)return e=o,void(o.isShown=0);o.isShown=I(o),o.isShown&&e&&(e.isShown=1)})}(),s.forEach(function(o){o.row&&function(e,o){if(e.isShown)return e.isLeaving&&oe(e),void(e.row.visible=1);o&&1==e.row.visible?e.isLeaving||$(e,te):(e.isLeaving&&oe(e),e.row.visible=0)}(o,e)}),E(),_()},R=function(){l.wrapper&&l.wrapper.remove(),a=[];const e=i?l:l.scrollBox;createIn(e,function(){l.wrapper=function(){if("horizontal"===l.layout){const e=HGroup({width:"auto",height:"auto",align:"left top",gap:c.tile.spacing,padding:c.tile.listPadding});return e.css.width="max-content",e}if("grid"===l.layout)return HGroup({width:"100%",height:"auto",align:"left top",gap:c.tile.spacing,padding:c.tile.listPadding,wrap:1});const e=VGroup({width:"100%",height:"auto",align:"left top",gap:c.list.gap,padding:c.box.padding});return e.css.alignItems="stretch",e}(),l.wrapper.position="relative",l.wrapper.css.boxSizing="border-box",l.wrapper.clipContent=0,l.wrapper.role="listbox",l.wrapper.aria={label:l.ariaLabel,multiselectable:"multiple"===l.selection?"true":"false"},s.forEach(W),endGroup()}),P()},V=function(){if(i)return;const e="horizontal"===l.layout;l.scrollBox.scrollX=e?1:0,l.scrollBox.scrollY=e?0:1},K=function(e){c.pressed.color&&(e.cancelFlash&&e.cancelFlash(),e.isPressed=1,Y(e,"rest"),L(e),e.cancelFlash=l.after(50,function(){e.cancelFlash=null,e.isPressed=0,e.row.isRemoved||(Y(e,"rest"),L(e))}))},N=function(){if(1!=l.animated)return!1;return!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)},U=function(e,o){const t=[];return!c.row.motion||e.isSection||e.isPressed||t.push(c.row.motion),N()&&"still"!==o&&t.push(g),N()&&"rest"===o&&t.push(m),t.join(", ")},Y=function(e,o){e.row.setMotionNow(U(e,o))},X=function(e){const o=l.scrollBox?{left:l.scrollBox.elem.scrollLeft,top:l.scrollBox.elem.scrollTop}:{left:0,top:0};return{left:e.row.elem.offsetLeft-o.left,top:e.row.elem.offsetTop-o.top}},q=function(){return s.concat(a).filter(function(e){return e.row&&!e.row.isRemoved&&1==e.row.visible})},J=function(){if(!N()||!l.wrapper)return null;const e=new Map;return q().forEach(function(o){e.set(o,function(e){const o=X(e),t=new DOMMatrixReadOnly(getComputedStyle(e.row.elem).transform);return{left:o.left+t.m41,top:o.top+t.m42}}(o))}),e},Q=function(e){e.row.css.opacity="",L(e)},Z=function(e){const o=J();e(),function(e){if(!e)return;const o=q(),t=o.filter(function(o){return e.has(o)}),n=o.filter(function(o){return!e.has(o)}),r=t.map(X);t.forEach(function(o,t){Y(o,"placing"),o.row.css.transform=function(e,o){const t=e.left-o.left,n=e.top-o.top;return 0===t&&0===n?"":"translate("+t+"px, "+n+"px)"}(e.get(o),r[t])}),n.forEach(function(e){Y(e,"still"),e.row.css.opacity="0",e.row.css.transform="translateY(-6px)"}),l.wrapper.elem.offsetWidth,o.forEach(function(e){Y(e,"rest"),e.row.css.transform=""}),n.forEach(Q)}(o)},$=function(e,o){e.cancelLeave&&e.cancelLeave(),e.isLeaving=1,e.row.clickable=0,e.row.aria={hidden:"true"},Y(e,"rest"),e.row.css.opacity="0",e.cancelLeave=l.after(250,function(){e.cancelLeave=null,e.row.isRemoved||(Z(function(){o(e)}),G())})},ee=function(e){e.isLeaving=0,e.row.aria={hidden:null},e.isSection||(e.row.clickable=1),Q(e)},oe=function(e){e.cancelLeave&&e.cancelLeave(),e.cancelLeave=null,ee(e)},te=function(e){e.row.visible=0,ee(e)},ne=function(e){a=a.filter(function(o){return o!==e}),e.row.remove()},re=function(){const e=N();(e||p)&&(p=e?1:0,e||(a.forEach(function(e){e.cancelLeave&&e.cancelLeave(),e.row.remove()}),a=[]),s.forEach(function(o){o.row&&(Y(o,"rest"),e||(o.row.css.transform=""))}),e||P())},ie=function(e,o){const t=u.join("\n");u=e,A(),o||t===u.join("\n")||l.onChange(l,F())},le=function(e,o){if("none"===l.selection||e.isSection)return;if("single"===l.selection)return void ie([e.key],o);const t=C(e)?u.filter(function(o){return o!==e.key}):u.concat([e.key]);ie(t,o)},ce=function(e){const o=x(e);return!!o&&!o.isSection},se=function(e){const o=(Array.isArray(e)?e:[e]).map(String).filter(function(e,o,t){return ce(e)&&t.indexOf(e)===o});return"none"===l.selection?[]:"single"===l.selection?o.slice(-1):o},ae=function(){return s.filter(function(e){return e.isShown&&!e.isSection})},ue=function(e){if(i||!e||!e.row||!e.isShown)return;const o=l.scrollBox.elem,t=e.row.elem,n=(function(e){const o=s[v(e)-1];return o&&o.isSection&&o.isShown?o:null}(e)||e).row.elem,r="horizontal"===l.layout,c=r?l.wrapper.elem.offsetLeft:l.wrapper.elem.offsetTop,a=(r?n.offsetLeft:n.offsetTop)+c,u=(r?t.offsetLeft+t.offsetWidth:t.offsetTop+t.offsetHeight)+c,f=r?o.scrollLeft:o.scrollTop,d=r?o.clientWidth:o.clientHeight;let p=f;a<f?p=a:u>f+d&&(p=u-d),r?o.scrollLeft=p:o.scrollTop=p},fe=function(){1==l.scrollToSelected&&0!==u.length&&ue(x(u[0]))},de=function(e){e&&e.row&&!e.isSection&&(f=e.key,E(),e.row.elem.focus({preventScroll:!0}),ue(e))},pe=function(e,o,t){const n=e.row.elem.offsetTop,r=o.map(function(e){return e.row.elem.offsetTop}).filter(function(e){return t>0?e>n:e<n});if(0===r.length)return t>0?o[o.length-1]:o[0];const i=t>0?Math.min(...r):Math.max(...r);return function(e,o){const t=function(e){return Math.abs(e.row.elem.offsetLeft-o)};return e.reduce(function(e,o){return t(o)<t(e)?o:e})}(o.filter(function(e){return e.row.elem.offsetTop===i}),e.row.elem.offsetLeft)},he=function(e,o,t){const n=function(e){const o="vertical"===l.layout,t="horizontal"===l.layout;return"ArrowDown"===e?t?0:1:"ArrowUp"===e?t?0:-1:"ArrowRight"===e?o?0:1:"ArrowLeft"===e?o?0:-1:0}(o);if(0===n)return null;const r="ArrowDown"===o||"ArrowUp"===o;if("grid"===l.layout&&r)return pe(e,t,n);const i=t.indexOf(e);return t[Math.max(0,Math.min(t.length-1,i+n))]},ge=function(e,o){if(1!=l.enabled||e.isLeaving)return;const t=ae();if("Enter"===o.key||" "===o.key){if(o.preventDefault(),!k(e))return;return K(e),void le(e,0)}if("Home"===o.key||"End"===o.key)return o.preventDefault(),void de("Home"===o.key?t[0]:t[t.length-1]);const n=he(e,o.key,t);n&&(o.preventDefault(),de(n))};l.setItems=function(e){s=(Array.isArray(e)?e:[]).map(S),u=u.filter(ce),x(f)||(f=null),R()},l.getItems=function(){return s.map(function(e){return e.item})},l.getItem=function(e){const o=x(e);return o?o.item:null},l.getRow=function(e){const o=x(e);return o?o.row:null};l.addItem=function(e,o=-1){const t=S(e,function(){let e=s.length;for(;x(e);)e++;return e}());if(x(t.key))return void console.warn("ItemList: the key is already in the list: "+t.key);const n=o<0||o>s.length?s.length:o;Z(function(){s.splice(n,0,t),createIn(l.wrapper,function(){W(t)});const e=s[n+1];e&&e.row&&l.wrapper.elem.insertBefore(t.row.elem,e.row.elem),P(N())})},l.removeItem=function(e,o=0){const t=x(e);return t?(Z(function(){s.splice(v(t),1),function(e){N()&&1==e.row.visible?(a.push(e),e.isSection||(e.row.tabIndex=-1),$(e,ne)):e.row.remove()}(t),f===t.key&&(f=null),C(t)&&ie(u.filter(function(e){return e!==t.key}),o),P(N())}),t.item):null},l.updateItem=function(e,o={}){const t=x(e);if(!t||"object"!=typeof t.item)return;Object.assign(t.item,o,{key:t.item.key}),t.data=t.item,t.isSection=y(t.data),u=u.filter(ce);const n=t.row;createIn(l.wrapper,function(){W(t)}),l.wrapper.elem.insertBefore(t.row.elem,n.elem),n.remove(),P()},l.getSelectedKeys=function(){return u.slice()},l.getSelected=function(){return F()},l.setSelected=function(e,o=0){ie(se(e),o),fe()},l.select=function(e,o=0){const t=x(e);!t||t.isSection||C(t)||(le(t,o),1==l.scrollToSelected&&ue(t))},l.unselect=function(e,o=0){ie(u.filter(function(o){return o!==String(e)}),o)},l.clearSelection=function(e=0){ie([],e)},l.search=function(e){return d=z(e).trim(),function(e){l.searchInput&&z(l.searchInput.getText()).trim()!==z(e).trim()&&l.searchInput.setText(String(e||""))}(e),P(),ae().length},l.setLayout=function(e){l.layout=b(e),V(),R()},l.setSelection=function(e){l.selection=e,u=se(u),R()},l.setEnabled=function(e){l.enabled=basic.isOn(e)?1:0,l.aria={disabled:1==l.enabled?"false":"true"},E(),A()},l.setAnimated=function(e){l.animated=basic.isOn(e)?1:0,re()},l.scrollToItem=function(e){ue(x(e))},l.focusItem=function(e){de(void 0===e?ae()[0]:x(e))},l.forEach=function(e){s.forEach(function(o,t){e(o.item,o.row,t)})},l.refresh=function(){A(),_()},l.color=c.box.color,l.border=c.box.border,l.borderColor=c.box.borderColor,l.round=c.box.round,l.css.boxSizing="border-box";const me=function(){if(1!=l.showSearch)return 0;if("undefined"==typeof SearchInput)return console.warn("ItemList: showSearch needs comp/search-input-v2.js (SearchInput)."),0;const e=c.search,o=e.padding;l.searchArea=HGroup({width:"100%",height:e.height+o[1]+o[3],align:"left top",padding:o}),i&&(l.searchArea.position="relative");const t=Object.assign({},e,l.searchParams);return delete t.padding,t.width="100%",t.position="relative",t.onSearch=function(e){l.search(e)},l.searchInput=SearchInput(t),endGroup(),e.height+o[1]+o[3]}();return i||(l.scrollBox=Box(0,me,"100%","calc(100% - "+me+"px)",{color:"transparent"})),l.lblEmpty=Label({plainText:l.emptyText,left:0,width:"100%",fontSize:c.empty.fontSize,textColor:c.empty.textColor,textAlign:"center",padding:[0,20],visible:0}),i?l.lblEmpty.position="relative":l.lblEmpty.top=me+24,i||1!=l.useScrollBar||"undefined"==typeof ScrollBar||(l.scrollBar=ScrollBar(Object.assign({scrollableBox:l.scrollBox},c.scrollBar))),l.layout=b(l.layout),V(),s=n.map(S),u=se(r),R(),l.setEnabled(l.enabled),p=N()?1:0,l.after(0,fe),endObject(l)};ItemList.getCheckSvg=function(e,o){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+o+'" height="'+o+'" viewBox="0 0 24 24" fill="none" stroke="'+e+'" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg>'},ItemList.styles={classic:ItemListDefaults.style,modern:{box:{padding:8},list:{gap:8},row:{height:64,padding:[14,10],gap:14,color:"white",border:1,borderColor:Black(.08),round:12,boxShadow:"0px 1px 2px rgba(0, 0, 0, 0.04)",motion:"background-color 0.2s, border-color 0.2s"},tile:{width:132,height:"auto",padding:[12,14],gap:8,spacing:8,listPadding:8,iconSize:56,frameSize:0,iconFilter:"",selectedIconScale:1,selectedIconFilter:"",selectedFontFamily:"",selectedColor:"",hover:{color:"#F7F8F6",borderColor:Black(.14)}},section:{padding:[14,6],fontSize:13,textColor:Black(.45)},hover:{color:"#F7F8F6",borderColor:Black(.14)},selected:{color:"#EEF6F3",borderColor:"#3D7A6B",opacity:1},focus:{ringColor:"rgba(61, 122, 107, 0.6)"},icon:{size:40,round:10,color:"#F1F2EF"},title:{fontSize:15,textColor:Black(.85),fontFamily:"opensans-bold"},desc:{fontSize:13,textColor:Black(.5),marginTop:0},check:{visible:1,size:20,color:"#3D7A6B",iconColor:"white",borderColor:Black(.2)},empty:{fontSize:14,textColor:Black(.45)},search:{height:40,padding:[8,8,8,4],fontSize:15,color:"white",border:1,borderColor:Black(.1),borderBottomStyle:"1px solid "+Black(.1),round:10,searchIconSize:18},scrollBar:{bar_color:"#A0A0A0",bar_mouseOverColor:"#6E6E6C",neverHide:0,showDots:0}},dark:{box:{padding:8},list:{gap:8},row:{height:64,padding:[14,10],gap:14,color:"#1A1A19",border:1,borderColor:White(.08),round:10,motion:"background-color 0.2s, border-color 0.2s"},tile:{width:132,height:"auto",padding:[12,14],gap:8,spacing:8,listPadding:8,iconSize:56,frameSize:0,iconFilter:"",selectedIconScale:1,selectedIconFilter:"",selectedFontFamily:"",selectedColor:"",hover:{color:"#232322"}},section:{padding:[14,6],fontSize:13,textColor:White(.45)},hover:{color:"#232322"},selected:{color:"#2C2C2A",borderColor:"#65A293",opacity:1},focus:{ringColor:"#65A293"},icon:{size:40,round:8,color:"#232322"},title:{fontSize:15,textColor:White(.9),fontFamily:"opensans-bold"},desc:{fontSize:13,textColor:White(.45),marginTop:0},check:{visible:1,size:20,color:"#65A293",iconColor:"#141414",borderColor:White(.25)},empty:{fontSize:14,textColor:White(.45)},search:{height:40,padding:[8,8,8,4],fontSize:15,color:"#232322",textColor:White(.9),placeholderColor:White(.35),border:1,borderColor:White(.1),borderBottomStyle:"1px solid "+White(.1),round:8,searchIconSize:18,invertIconColor:1},scrollBar:{bar_color:"#8A8A88",bar_mouseOverColor:"#BFBFBD",neverHide:0,showDots:0}}};
|
|
2
|
+
"use strict";const ItemListDefaults={key:"0",width:600,height:400,items:[],layout:"vertical",selection:"single",selectedKeys:[],scrollToSelected:1,createItemView:null,createSectionView:null,animated:0,showSearch:0,searchParams:{},emptyText:"No items",noResultText:"No results",enabled:1,useScrollBar:1,ariaLabel:"List",onItemClick:function(e,o,t,n){},onChange:function(e,o){},styleName:"ozden",style:{box:{color:"whitesmoke",border:1,borderColor:"rgba(20, 20, 20, 0.45)",round:6,padding:0},list:{gap:0},row:{height:80,padding:[20,12],gap:15,color:"transparent",border:0,borderColor:"transparent",round:0,opacity:1,boxShadow:"",lineColor:"",motion:"background-color 0.2s, box-shadow 0.2s"},tile:{width:125,height:190,padding:[4,30],gap:15,spacing:4,listPadding:[12,5],fitRow:0,iconSize:70,frameSize:90,frameColor:White(.3),frameRound:100,iconFilter:"grayscale(100%)",iconFit:"",iconMotion:"transform 0.3s",hover:{},selectedColor:"white",selectedFrameColor:"transparent",selectedIconScale:1.5,selectedIconFilter:"grayscale(30%)",selectedFontFamily:"opensans-bold"},section:{height:"auto",padding:[20,8],fontSize:16,fontFamily:"opensans-bold",textColor:Black(.4)},hover:{color:"white",lineColor:Black(.2)},pressed:{color:null},selected:{color:"transparent",lineColor:"",opacity:.5,canSelectAgain:0},disabled:{opacity:.4},focus:{ringColor:"rgba(55, 56, 54, 0.5)"},icon:{size:50,round:4,color:"transparent"},title:{fontSize:20,textColor:"rgba(0, 0, 0, 0.8)",fontFamily:"",selectedTextColor:""},desc:{fontSize:14,textColor:"gray",marginTop:-4},check:{visible:0,size:22,color:"#373836",iconColor:"white",borderColor:Black(.25)},empty:{fontSize:16,textColor:Black(.4)},search:{styleName:"ozden",height:44,padding:[0,0,0,0],color:"white",border:0,round:2},scrollBar:{bar_border:0,bar_round:3,bar_borderColor:"rgba(0, 0, 0, 1)",bar_width:4,bar_mouseOverWidth:4,bar_mouseOverColor:"#373836",bar_opacity:.4,bar_mouseOverOpacity:.9,bar_padding:2,bar_color:"#373836",neverHide:1,showDots:1}}},ItemList=function(e={}){const o=e.style&&e.style.hover,t=!!o&&0===Object.keys(o).length;basic.applyStylePackage(e,ItemList.styles,ItemListDefaults),mergeIntoIfMissing(e,ItemListDefaults),t&&(e.style.hover={});const n=Array.isArray(e.items)?e.items.slice():[],r=Array.isArray(e.selectedKeys)?e.selectedKeys.slice():[],i="auto"===e.height;let l=startObject(e);const c=l.style;let a=[],s=[],u=[],f=null,d=null,h=null,p=[],m="",g=null,w="",b=0;const y="cubic-bezier(0.2, 0.8, 0.2, 1)",C="opacity 0.25s "+y,S="transform 0.25s "+y,x=["vertical","horizontal","grid"],v=function(e){return x.includes(e)?e:(console.warn('ItemList: unknown layout "'+e+'", "vertical" is used.'),"vertical")},k=function(e){return"section"===e.type?1:0},F=function(e,o){const t=function(e){return"string"==typeof e?{text:e}:e||{}}(e);return{key:void 0!==t.key&&null!==t.key?String(t.key):String(o),item:e,data:t,row:null,isShown:1,isHover:0,isSection:k(t)}},I=function(e){return a.find(function(o){return o.key===String(e)})||null},z=function(e){return a.indexOf(e)},L=function(e){return u.includes(e.key)},B=function(e){return 1==l.enabled&&(void 0===e.data.enabled||basic.isOn(e.data.enabled))},T=function(e){return"single"===l.selection&&0==c.selected.canSelectAgain&&L(e)},A=function(e){return B(e)&&!T(e)},D=function(){return u.map(I).filter(Boolean).map(function(e){return e.item})},E=function(e){return String(e||"").toLocaleLowerCase("tr").replace(/i̇/g,"i").replace(/ı/g,"i").replace(/ç/g,"c").replace(/ğ/g,"g").replace(/ş/g,"s").replace(/ü/g,"u").replace(/ö/g,"o")},O=function(e){return w?function(e){const o=e.data;return E([o.text,o.description,o.searchText].join(" "))}(e).includes(w)?1:0:1},W=function(e){const o=e.row;if(!o||e.isSection||e.isLeaving)return;const t=L(e),n=function(e,o){const t=e.row.isTile,n=t?c.tile.hover:c.hover,r=t?{color:c.tile.selectedColor||c.selected.color,borderColor:c.selected.borderColor}:c.selected,i=T(e),l=e.key!==d||i?{}:n,a=e.isHover&&!i?n:{},s=Object.assign({},c.row,a,o?r:{},l);return void 0===s.opacity&&(s.opacity=1),e.isPressed&&c.pressed.color&&(s.color=c.pressed.color),s}(e,t);o.color=n.color,o.borderColor=n.borderColor,M(o,n.lineColor||""),o.cursor=A(e)?"pointer":"default",o.css.opacity=String(B(e)?n.opacity:c.disabled.opacity),o.aria={selected:t?"true":"false",disabled:B(e)?"false":"true"},o.lblTitle&&(o.lblTitle.textColor=t&&c.title.selectedTextColor?c.title.selectedTextColor:c.title.textColor),o.check&&H(o.check,t),o.isTile&&_(o,t)},M=function(e,o){const t=e.shownLineColor||"";if(o===t)return;t||(e.ownShadow=e.boxShadow),e.shownLineColor=o;const n=[];o&&n.push("inset 0 1px 0 "+o,"inset 0 -1px 0 "+o),e.ownShadow&&n.push(e.ownShadow),e.boxShadow=n.join(", ")},_=function(e,o){const t=c.tile;e.iconFrame&&(e.iconFrame.color=o?t.selectedFrameColor:t.frameColor),e.icon&&(e.icon.css.filter=(o?t.selectedIconFilter:t.iconFilter)||"none",e.icon.css.transform="scale("+(o?t.selectedIconScale:1)+")"),e.lblTitle&&t.selectedFontFamily&&(e.lblTitle.fontFamily=o?t.selectedFontFamily:c.title.fontFamily||"opensans")},H=function(e,o){e.color=o?c.check.color:"transparent",e.borderColor=o?c.check.color:c.check.borderColor,e.text=o?ItemList.getCheckSvg(c.check.iconColor,.6*c.check.size):""},R=function(){a.forEach(W)},N=function(){const e=I(f);if(e&&e.isShown)return e;const o=ke();return o.find(L)||o[0]||null},j=function(){const e=N();a.forEach(function(o){o.row&&!o.isSection&&(o.row.tabIndex=1==l.enabled&&o===e?0:-1)})},P=function(e,o){if(!e.data.iconFile)return null;const t=Icon({width:o,height:o,color:c.icon.color,round:c.icon.round,position:"relative"});return t.shrink=0,t.load(e.data.iconFile),t},G=function(e){e.icon&&c.tile.iconFit&&(e.icon.imageFit=c.tile.iconFit)},K=function(e,o,t){"function"!=typeof l.createItemView?(t?function(e,o){const t=c.tile;if(o.data.iconFile){if(!(t.frameSize>0))return e.icon=P(o,t.iconSize),void G(e);e.iconFrame=HGroup({width:t.frameSize,height:t.frameSize,align:"center center",round:t.frameRound,color:t.frameColor}),e.iconFrame.position="relative",e.iconFrame.shrink=0,e.iconFrame.clipContent=0,e.iconFrame.setMotion("background-color 0.3s"),e.icon=P(o,t.iconSize),G(e),endGroup()}}(e,o):e.icon=P(o,c.icon.size),function(e,o,t){e.texts=VGroup({width:t?"100%":"auto",height:"auto",align:t?"center top":"left center",gap:0}),e.texts.css={flex:t?"":"1 1 0",minWidth:"0",alignItems:"stretch"},e.lblTitle=Label({plainText:o.data.text||"",width:"100%",fontSize:c.title.fontSize,ellipsis:1}),c.title.fontFamily&&(e.lblTitle.fontFamily=c.title.fontFamily),o.data.description&&(e.lblDesc=Label({plainText:o.data.description,width:"100%",fontSize:c.desc.fontSize,textColor:c.desc.textColor,ellipsis:1}),e.lblDesc.css.marginTop=(c.desc.marginTop||0)+"px"),t&&(e.lblTitle.css.textAlign="center",e.lblDesc&&(e.lblDesc.css.textAlign="center")),endGroup()}(e,o,t)):l.createItemView(o.item,e,l)},V=function(){return"grid"===l.layout&&basic.isOn(c.tile.fitRow)},U=function(e){const o="horizontal"===l.layout||"grid"===l.layout,t=function(e){if(e){const e=V()?"auto":c.tile.width;return VGroup({width:e,height:c.tile.height,align:"center top",gap:c.tile.gap,padding:c.tile.padding})}return HGroup({width:"100%",height:c.row.height,align:"left center",gap:c.row.gap,padding:c.row.padding})}(o);return t.isTile=o?1:0,t.position="relative",t.shrink=0,t.round=c.row.round,t.border=c.row.border,t.clickable=1,t.clipContent=0,c.row.boxShadow&&(t.boxShadow=c.row.boxShadow),Y(t,e),t.role="option",t.aria={label:e.data.text||e.key},t.setFocusRing(c.focus.ringColor),K(t,e,o),function(e,o){if(!basic.isOn(c.check.visible)||"none"===l.selection)return;const t=c.check.size;e.check=Label({width:t,height:t,round:100,border:2,text:""}),e.check.shrink=0,e.check.css={display:"flex",alignItems:"center",justifyContent:"center"},e.check.aria={hidden:"true"},o&&(e.check.position="absolute",e.check.top=6,e.check.right=6)}(t,o),endGroup(),t},Y=function(e,o){const t=te(o,"rest");t&&e.setMotion(t)},X=function(e){if(e.isHover=0,e.isSection)return e.row=function(e){const o=c.section,t="horizontal"===l.layout?"auto":"100%",n=HGroup({width:t,height:o.height,align:"left center",padding:o.padding});return n.position="relative",n.shrink=0,n.role="presentation",Y(n,e),"function"==typeof l.createSectionView?l.createSectionView(e.item,n,l):(n.lblTitle=Label({plainText:e.data.text||"",width:t,fontSize:o.fontSize,textColor:o.textColor,ellipsis:1}),o.fontFamily&&(n.lblTitle.fontFamily=o.fontFamily)),endGroup(),n}(e),e.row;const o=U(e);return e.row=o,q(e),W(e),o.isTile&&o.icon&&c.tile.iconMotion&&o.icon.setMotion(c.tile.iconMotion),o},q=function(e){const o=e.row;o.on("click",function(o,t){e.isLeaving||ge(e,t)}),o.onHoverChange(function(o,t){e.isHover=t&&B(e)?1:0,W(e)}),o.on("keydown",function(o,t){Ae(e,t)})},J=function(){l.scrollBar&&l.scrollBar.refreshScroll()},Q=function(){const e=ke().length;l.lblEmpty.visible=0===e?1:0,l.lblEmpty.plainText=0===a.filter(function(e){return!e.isSection}).length?l.emptyText:l.noResultText,J()},Z=function(e=!1){!function(){let e=null;a.forEach(function(o){if(o.isSection)return e=o,void(o.isShown=0);o.isShown=O(o),o.isShown&&e&&(e.isShown=1)})}(),a.forEach(function(o){o.row&&function(e,o){if(e.isShown)return e.isLeaving&&fe(e),void(e.row.visible=1);o&&1==e.row.visible?e.isLeaving||se(e,de):(e.isLeaving&&fe(e),e.row.visible=0)}(o,e)}),j(),Q()},$=function(){l.wrapper&&l.wrapper.remove(),s=[];const e=i?l:l.scrollBox;createIn(e,function(){l.wrapper=function(){if("horizontal"===l.layout){const e=HGroup({width:"auto",height:"auto",align:"left top",gap:c.tile.spacing,padding:c.tile.listPadding});return e.css.width="max-content",e}if("grid"===l.layout){const e=HGroup({width:"100%",height:"auto",align:"left top",gap:c.tile.spacing,padding:c.tile.listPadding,wrap:1});return V()&&(e.css={display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax("+c.tile.width+"px, 1fr))"}),e}const e=VGroup({width:"100%",height:"auto",align:"left top",gap:c.list.gap,padding:c.box.padding});return e.css.alignItems="stretch",e}(),l.wrapper.position="relative",l.wrapper.css.boxSizing="border-box",l.wrapper.clipContent=0,l.wrapper.role="listbox",l.wrapper.aria={label:l.ariaLabel,multiselectable:"multiple"===l.selection?"true":"false",orientation:"horizontal"===l.layout?"horizontal":null},a.forEach(X),endGroup()}),Z()},ee=function(){if(i)return;const e="horizontal"===l.layout;l.scrollBox.scrollX=e?1:0,l.scrollBox.scrollY=e?0:1},oe=function(){if(1!=l.animated)return!1;return!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)},te=function(e,o){const t=[];return!c.row.motion||e.isSection||e.isPressed||t.push(c.row.motion),oe()&&"still"!==o&&t.push(C),oe()&&"rest"===o&&t.push(S),t.join(", ")},ne=function(e,o){e.row.setMotionNow(te(e,o))},re=function(e){const o=l.scrollBox?{left:l.scrollBox.elem.scrollLeft,top:l.scrollBox.elem.scrollTop}:{left:0,top:0};return{left:e.row.elem.offsetLeft-o.left,top:e.row.elem.offsetTop-o.top}},ie=function(){return a.concat(s).filter(function(e){return e.row&&!e.row.isRemoved&&1==e.row.visible})},le=function(){if(!oe()||!l.wrapper)return null;const e=new Map;return ie().forEach(function(o){e.set(o,function(e){const o=re(e),t=new DOMMatrixReadOnly(getComputedStyle(e.row.elem).transform);return{left:o.left+t.m41,top:o.top+t.m42}}(o))}),e},ce=function(e){e.row.css.opacity="",W(e)},ae=function(e){const o=le();e(),function(e){if(!e)return;const o=ie(),t=o.filter(function(o){return e.has(o)}),n=o.filter(function(o){return!e.has(o)}),r=t.map(re);t.forEach(function(o,t){ne(o,"placing"),o.row.css.transform=function(e,o){const t=e.left-o.left,n=e.top-o.top;return 0===t&&0===n?"":"translate("+t+"px, "+n+"px)"}(e.get(o),r[t])}),n.forEach(function(e){ne(e,"still"),e.row.css.opacity="0",e.row.css.transform="translateY(-6px)"}),l.wrapper.elem.offsetWidth,o.forEach(function(e){ne(e,"rest"),e.row.css.transform=""}),n.forEach(ce)}(o)},se=function(e,o){e.cancelLeave&&e.cancelLeave(),e.isLeaving=1,e.row.clickable=0,e.row.aria={hidden:"true"},ne(e,"rest"),e.row.css.opacity="0",e.cancelLeave=l.after(250,function(){e.cancelLeave=null,e.row.isRemoved||(ae(function(){o(e)}),J())})},ue=function(e){e.isLeaving=0,e.row.aria={hidden:null},e.isSection||(e.row.clickable=1),ce(e)},fe=function(e){e.cancelLeave&&e.cancelLeave(),e.cancelLeave=null,ue(e)},de=function(e){e.row.visible=0,ue(e)},he=function(e){s=s.filter(function(o){return o!==e}),e.row.remove()},pe=function(){const e=oe();(e||b)&&(b=e?1:0,e||(s.forEach(function(e){e.cancelLeave&&e.cancelLeave(),e.row.remove()}),s=[]),a.forEach(function(o){o.row&&(ne(o,"rest"),e||(o.row.css.transform=""))}),e||Z())},me=function(e,o){const t=u.join("\n");u=e,R(),j(),o||t===u.join("\n")||l.onChange(l,D())},ge=function(e,o){A(e)&&(!function(e){c.pressed.color&&(e.cancelFlash&&e.cancelFlash(),e.isPressed=1,ne(e,"rest"),W(e),e.cancelFlash=l.after(50,function(){e.cancelFlash=null,e.isPressed=0,e.row.isRemoved||(ne(e,"rest"),W(e))}))}(e),f=e.key,j(),l.onItemClick(l,e.item,z(e),o),we(o)?Ce(e,e):(Se(e,0),be(e)))},we=function(e){return"multiple"===l.selection&&!!e&&e.shiftKey},be=function(e){h=e.key,p=u.slice()},ye=function(){h=null,p=[]},Ce=function(e,o){const t=ke(),n=I(h);n&&n.isShown||be(o);const r=t.indexOf(I(h)),i=t.indexOf(e),l=t.slice(Math.min(r,i),Math.max(r,i)+1).filter(B).map(function(e){return e.key}).filter(function(e){return!p.includes(e)});me(p.concat(l),0)},Se=function(e,o){if("none"===l.selection||e.isSection)return;if("single"===l.selection)return void me([e.key],o);const t=L(e)?u.filter(function(o){return o!==e.key}):u.concat([e.key]);me(t,o)},xe=function(e){const o=I(e);return!!o&&!o.isSection},ve=function(e){const o=(Array.isArray(e)?e:[e]).map(String).filter(function(e,o,t){return xe(e)&&t.indexOf(e)===o});return"none"===l.selection?[]:"single"===l.selection?o.slice(-1):o},ke=function(){return a.filter(function(e){return e.isShown&&!e.isSection})},Fe=function(e){if(i||!e||!e.row||!e.isShown)return;const o=l.scrollBox.elem,t=e.row.elem,n=(function(e){const o=a[z(e)-1];return o&&o.isSection&&o.isShown?o:null}(e)||e).row.elem,r="horizontal"===l.layout,c=r?l.wrapper.elem.offsetLeft:l.wrapper.elem.offsetTop,s=(r?n.offsetLeft:n.offsetTop)+c,u=(r?t.offsetLeft+t.offsetWidth:t.offsetTop+t.offsetHeight)+c,f=r?o.scrollLeft:o.scrollTop,d=r?o.clientWidth:o.clientHeight;let h=f;s<f?h=s:u>f+d&&(h=u-d),r?o.scrollLeft=h:o.scrollTop=h},Ie=function(){1==l.scrollToSelected&&0!==u.length&&Fe(I(u[0]))},ze=function(e){e&&e.row&&!e.isSection&&(f=e.key,j(),e.row.elem.focus({preventScroll:!0}),Fe(e))},Le=function(e,o,t){const n=e.row.elem.offsetTop,r=o.map(function(e){return e.row.elem.offsetTop}).filter(function(e){return t>0?e>n:e<n});if(0===r.length)return t>0?o[o.length-1]:o[0];const i=t>0?Math.min(...r):Math.max(...r);return function(e,o){const t=function(e){return Math.abs(e.row.elem.offsetLeft-o)};return e.reduce(function(e,o){return t(o)<t(e)?o:e})}(o.filter(function(e){return e.row.elem.offsetTop===i}),e.row.elem.offsetLeft)},Be=function(e,o,t){const n=function(e){const o="vertical"===l.layout,t="horizontal"===l.layout;return"ArrowDown"===e?t?0:1:"ArrowUp"===e?t?0:-1:"ArrowRight"===e?o?0:1:"ArrowLeft"===e?o?0:-1:0}(o);if(0===n)return null;const r="ArrowDown"===o||"ArrowUp"===o;if("grid"===l.layout&&r)return Le(e,t,n);const i=t.indexOf(e);return t[Math.max(0,Math.min(t.length-1,i+n))]},Te=function(e,o,t){if(i)return null;const n="horizontal"===l.layout,r=n?l.scrollBox.elem.clientWidth:l.scrollBox.elem.clientHeight,c=n?e.row.elem.offsetWidth:e.row.elem.offsetHeight,a=Math.max(1,Math.floor(r/Math.max(1,c))-1);if("grid"===l.layout){let n=e;for(let e=0;e<a;e++)n=Le(n,o,t);return n}const s=o.indexOf(e)+t*a;return o[Math.max(0,Math.min(o.length-1,s))]},Ae=function(e,o){if(o.target!==e.row.elem)return;if(1!=l.enabled||e.isLeaving)return;const t=ke();if(function(e){const o=e.ctrlKey||e.metaKey;return"multiple"===l.selection&&o&&"a"===e.key.toLowerCase()}(o))return o.preventDefault(),void function(e){const o=e.filter(B).map(function(e){return e.key}),t=o.every(function(e){return u.includes(e)}),n=u.filter(function(e){return!o.includes(e)}),r=o.filter(function(e){return!u.includes(e)});me(t?n:u.concat(r),0),ye()}(t);const n=" "===o.key&&""===m;if("Enter"===o.key||n){if(o.preventDefault(),o.repeat)return;return void ge(e,o)}if("ArrowUp"===o.key&&l.searchInput&&function(e,o){return"horizontal"===l.layout||e.row.elem.offsetTop===o[0].row.elem.offsetTop}(e,t))return o.preventDefault(),void l.searchInput.focus();const r=function(e,o,t){return"Home"===o?t[0]:"End"===o?t[t.length-1]:"PageDown"===o?Te(e,t,1):"PageUp"===o?Te(e,t,-1):Be(e,o,t)}(e,o.key,t);if(r)return o.preventDefault(),ze(r),void(we(o)&&Ce(r,e));(function(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey&&!e.altKey})(o)&&(o.preventDefault(),function(e,o,t){g&&g(),m+=E(o),g=l.after(600,function(){m="",g=null});const n=m.split("").every(function(e){return e===m[0]}),r=n?m[0]:m,i=t.indexOf(e)+(n?1:0),c=t.slice(i).concat(t.slice(0,i)).find(function(e){return E(e.data.text).startsWith(r)});c&&ze(c)}(e,o.key,t))},De=function(e,o){if("ArrowDown"!==o.key)return;const t=N();t&&(o.preventDefault(),ze(t))};l.setItems=function(e){a=(Array.isArray(e)?e:[]).map(F),u=u.filter(xe),I(f)||(f=null),ye(),$()},l.getItems=function(){return a.map(function(e){return e.item})},l.getItem=function(e){const o=I(e);return o?o.item:null},l.getRow=function(e){const o=I(e);return o?o.row:null};l.addItem=function(e,o=-1){const t=F(e,function(){let e=a.length;for(;I(e);)e++;return e}());if(I(t.key))return void console.warn("ItemList: the key is already in the list: "+t.key);const n=o<0||o>a.length?a.length:o;ae(function(){a.splice(n,0,t),createIn(l.wrapper,function(){X(t)});const e=a[n+1];e&&e.row&&l.wrapper.elem.insertBefore(t.row.elem,e.row.elem),Z(oe())})},l.removeItem=function(e,o=0){const t=I(e);return t?(ae(function(){a.splice(z(t),1),function(e){oe()&&1==e.row.visible?(s.push(e),e.isSection||(e.row.tabIndex=-1),se(e,he)):e.row.remove()}(t),f===t.key&&(f=null),L(t)&&me(u.filter(function(e){return e!==t.key}),o),Z(oe())}),t.item):null},l.updateItem=function(e,o={}){const t=I(e);if(!t||"object"!=typeof t.item)return;Object.assign(t.item,o,{key:t.item.key}),t.data=t.item,t.isSection=k(t.data),u=u.filter(xe);const n=t.row;createIn(l.wrapper,function(){X(t)}),l.wrapper.elem.insertBefore(t.row.elem,n.elem),n.remove(),Z()},l.getSelectedKeys=function(){return u.slice()},l.getSelected=function(){return D()},l.setSelected=function(e,o=0){me(ve(e),o),ye(),Ie()},l.select=function(e,o=0){const t=I(e);!t||t.isSection||L(t)||(Se(t,o),ye(),1==l.scrollToSelected&&Fe(t))},l.unselect=function(e,o=0){me(u.filter(function(o){return o!==String(e)}),o),ye()},l.clearSelection=function(e=0){me([],e),ye()},l.search=function(e){return w=E(e).trim(),function(e){l.searchInput&&E(l.searchInput.value).trim()!==E(e).trim()&&l.searchInput.setValue(String(e||""),1)}(e),Z(),ke().length},l.setLayout=function(e){l.layout=v(e),ee(),$()},l.setSelection=function(e){l.selection=e,u=ve(u),ye(),$()},l.setEnabled=function(e){l.enabled=basic.isOn(e)?1:0,l.aria={disabled:1==l.enabled?"false":"true"},j(),R()},l.setAnimated=function(e){l.animated=basic.isOn(e)?1:0,pe()},l.scrollToItem=function(e){Fe(I(e))},l.focusItem=function(e){ze(void 0===e?ke()[0]:I(e))},l.forEach=function(e){a.forEach(function(o,t){e(o.item,o.row,t)})},l.refresh=function(){R(),Q()},l.setActiveKey=function(e){const o=a.filter(function(e){return e.isHover||e.key===d});d=null==e?null:String(e),o.forEach(function(e){e.isHover=0,W(e)});const t=I(d);t&&W(t)},l.color=c.box.color,l.border=c.box.border,l.borderColor=c.box.borderColor,l.round=c.box.round,l.css.boxSizing="border-box";const Ee=function(){if(1!=l.showSearch)return 0;if("undefined"==typeof SearchInput)return console.warn("ItemList: showSearch needs comp/search-input.js (SearchInput)."),0;const e=c.search,o=e.padding;l.searchArea=HGroup({width:"100%",height:e.height+o[1]+o[3],align:"left top",padding:o}),i&&(l.searchArea.position="relative");const t=Object.assign({clearOnEscape:1},e,l.searchParams);return delete t.padding,t.width="100%",t.position="relative",t.onChange=function(e){l.search(e.getSearchText())},l.searchInput=SearchInput(t),l.searchInput.txtSearch.on("keydown",De),endGroup(),e.height+o[1]+o[3]}();return i||(l.scrollBox=Box(0,Ee,"100%","calc(100% - "+Ee+"px)",{color:"transparent"})),l.lblEmpty=Label({plainText:l.emptyText,left:0,width:"100%",fontSize:c.empty.fontSize,textColor:c.empty.textColor,textAlign:"center",padding:[0,20],visible:0}),i?l.lblEmpty.position="relative":l.lblEmpty.top=Ee+24,i||1!=l.useScrollBar||"undefined"==typeof ScrollBar||(l.scrollBar=ScrollBar(Object.assign({scrollableBox:l.scrollBox},c.scrollBar))),l.layout=v(l.layout),ee(),a=n.map(F),u=ve(r),$(),l.setEnabled(l.enabled),b=oe()?1:0,l.after(0,Ie),endObject(l)};ItemList.getCheckSvg=function(e,o){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+o+'" height="'+o+'" viewBox="0 0 24 24" fill="none" stroke="'+e+'" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg>'},ItemList.styles={ozden:ItemListDefaults.style,classic:ItemListDefaults.style,ozdenDark:{box:{color:"#1A1A19",borderColor:White(.22)},hover:{color:"#262624",lineColor:White(.14)},focus:{ringColor:White(.5)},title:{textColor:White(.88)},desc:{textColor:White(.45)},section:{textColor:White(.4)},check:{color:"#E6E6E4",iconColor:"#1A1A19",borderColor:White(.3)},empty:{textColor:White(.4)},tile:{frameColor:White(.06),selectedColor:"#262624"},search:{styleName:"ozdenDark",color:"#262624"},scrollBar:{bar_color:"#CFCFCD",bar_mouseOverColor:"#CFCFCD"}},light:{box:{color:"#FFFFFF",border:1,borderColor:Black(.12),round:10,padding:6},list:{gap:2},row:{height:56,padding:[12,10],gap:12,color:"transparent",round:8},tile:{width:132,height:"auto",padding:[12,14],gap:8,spacing:8,listPadding:6,iconSize:56,frameSize:0,iconFilter:"",selectedIconScale:1,selectedIconFilter:"",selectedFontFamily:"",selectedColor:"",hover:{color:"#F2F3F0"}},section:{padding:[12,6],fontSize:13,textColor:Black(.55)},hover:{color:"#F2F3F0",lineColor:""},selected:{color:"#E4EFEB",opacity:1,canSelectAgain:1},focus:{ringColor:"rgba(61, 122, 107, 0.5)"},icon:{size:36,round:8,color:"#F2F3F0"},title:{fontSize:15,textColor:Black(.88),fontFamily:"opensans"},desc:{fontSize:13,textColor:Black(.55),marginTop:0},check:{visible:1,size:20,color:"#3D7A6B",iconColor:"#FFFFFF",borderColor:Black(.25)},empty:{fontSize:14,textColor:Black(.55)},search:{styleName:"light",padding:[6,6,6,0],border:1,round:8},scrollBar:{bar_color:"#A0A0A0",bar_mouseOverColor:"#6E6E6C",neverHide:0,showDots:0}},dark:{box:{color:"#232322",border:1,borderColor:White(.12),round:10,padding:6},list:{gap:2},row:{height:56,padding:[12,10],gap:12,color:"transparent",round:8},tile:{width:132,height:"auto",padding:[12,14],gap:8,spacing:8,listPadding:6,iconSize:56,frameSize:0,iconFilter:"",selectedIconScale:1,selectedIconFilter:"",selectedFontFamily:"",selectedColor:"",hover:{color:White(.07)}},section:{padding:[12,6],fontSize:13,textColor:White(.55)},hover:{color:White(.07),lineColor:""},selected:{color:"rgba(101, 162, 147, 0.2)",opacity:1,canSelectAgain:1},focus:{ringColor:"rgba(101, 162, 147, 0.55)"},icon:{size:36,round:8,color:White(.07)},title:{fontSize:15,textColor:White(.9),fontFamily:"opensans"},desc:{fontSize:13,textColor:White(.55),marginTop:0},check:{visible:1,size:20,color:"#65A293",iconColor:"#0F1F1B",borderColor:White(.3)},empty:{fontSize:14,textColor:White(.55)},search:{styleName:"dark",padding:[6,6,6,0],color:"#232322",border:1,round:8},scrollBar:{bar_color:"#8A8A88",bar_mouseOverColor:"#BFBFBD",neverHide:0,showDots:0}},gallery:{box:{color:"transparent",border:0,padding:0},tile:{width:132,height:"auto",padding:[8,8],gap:6,spacing:8,listPadding:6,iconSize:116,frameSize:0,iconFilter:"",iconFit:"cover",iconMotion:"",selectedIconScale:1,selectedIconFilter:"",selectedFontFamily:"",selectedColor:"",hover:{color:Black(.05)}},row:{round:10,border:1,borderColor:"transparent",motion:"background-color 0.2s, border-color 0.2s"},hover:{color:Black(.05),lineColor:""},selected:{color:"rgba(63, 141, 148, 0.1)",borderColor:"#3F8D94",opacity:1,canSelectAgain:1},focus:{ringColor:"rgba(63, 141, 148, 0.8)"},icon:{round:6,color:Black(.05)},title:{fontSize:14,textColor:Black(.82),fontFamily:""},desc:{fontSize:12,textColor:Black(.5),marginTop:0},empty:{fontSize:14,textColor:Black(.45)}},galleryDark:{box:{color:"transparent",border:0,padding:0},tile:{width:132,height:"auto",padding:[8,8],gap:6,spacing:8,listPadding:6,iconSize:116,frameSize:0,iconFilter:"",iconFit:"cover",iconMotion:"",selectedIconScale:1,selectedIconFilter:"",selectedFontFamily:"",selectedColor:"",hover:{color:White(.06)}},row:{round:10,border:1,borderColor:"transparent",motion:"background-color 0.2s, border-color 0.2s"},hover:{color:White(.06),lineColor:""},selected:{color:"rgba(91, 186, 193, 0.14)",borderColor:"#5BBAC1",opacity:1,canSelectAgain:1},focus:{ringColor:"rgba(111, 198, 205, 0.8)"},icon:{round:6,color:White(.06)},title:{fontSize:14,textColor:White(.88),fontFamily:""},desc:{fontSize:12,textColor:White(.5),marginTop:0},empty:{fontSize:14,textColor:White(.45)},check:{color:"#E6E6E4",iconColor:"#1A1A19",borderColor:White(.3)},search:{styleName:"ozdenDark",color:"#262624"},scrollBar:{bar_color:"#CFCFCD",bar_mouseOverColor:"#CFCFCD"}}},ItemList.createMinimalStyle=function(e){return{box:{color:"transparent",border:1,borderColor:e.line,round:4,padding:4},list:{gap:2},row:{height:28,padding:[8,0],gap:8,color:"transparent",border:1,borderColor:"transparent",round:3,lineColor:""},section:{padding:[8,6],fontSize:11,fontFamily:"opensans-bold",textColor:e.faintText},hover:{color:"transparent",lineColor:"",borderColor:e.lineHover},selected:{color:"transparent",lineColor:"",borderColor:e.ink,opacity:1,canSelectAgain:0},disabled:{opacity:.4},focus:{ringColor:e.focus},icon:{size:14,round:0,color:"transparent"},title:{fontSize:13,textColor:e.text,selectedTextColor:e.ink},desc:{fontSize:12,textColor:e.softText,marginTop:0},check:{visible:1,size:14,color:"transparent",iconColor:e.ink,borderColor:"transparent"},empty:{fontSize:12,textColor:e.softText},search:{styleName:e.searchStyleName,height:30,padding:[0,0,0,0],color:"transparent",border:0,round:0,borderBottomStyle:"1px solid "+e.line,searchIconLeft:13},scrollBar:{bar_color:e.scrollBar,bar_mouseOverColor:e.scrollBar,bar_width:3,bar_mouseOverWidth:4,showDots:0}}},ItemList.MINIMAL_COLORS={text:Black(.85),softText:Black(.55),faintText:Black(.54),line:Black(.2),lineHover:Black(.45),ink:"#1F1F1F",focus:"#3D8BD9",searchStyleName:"minimal",scrollBar:"#373836"},ItemList.styles.minimal=ItemList.createMinimalStyle(ItemList.MINIMAL_COLORS),ItemList.MINIMAL_DARK_COLORS={text:White(.88),softText:White(.55),faintText:White(.48),line:White(.18),lineHover:White(.42),ink:"#EDEDEB",focus:"#7FB6DE",searchStyleName:"minimalDark",scrollBar:"#CFCFCD"},ItemList.styles.minimalDark=ItemList.createMinimalStyle(ItemList.MINIMAL_DARK_COLORS);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* Bismillah */
|
|
2
|
+
"use strict";const JsonEditorDefaults={key:"0",left:0,top:0,width:"100%",height:400,value:[],titleText:"",noteText:"",columns:[],showTitleBar:"auto",showHint:1,pictureBase:"",ariaLabel:"",texts:{list:"List",object:"Object",name:"name",value:"value",addRow:"Row",addColumn:"Column",addRowAtEnd:"Add a row",search:"Search the rows",table:"Table",json:"JSON",copyJson:"Copy as JSON",duplicate:"Duplicate",duplicateRows:"Duplicate {count} rows",moveUp:"Move up",moveDown:"Move down",delete:"Delete",deleteRows:"Delete {count} rows",undo:"Undo",redo:"Redo",addAbove:"Add a row above",addBelow:"Add a row below",sortUp:"Sort A → Z",sortDown:"Sort Z → A",firstOrder:"Back to the first order",rename:"Rename",type:"Type",moveLeft:"Move left",moveRight:"Move right",deleteColumn:"Delete the column",columnMenu:"The menu of the column",sortHint:"{title} · a click sorts",newName:"A new name…",columnName:"The name of the column",newColumnName:"The name of the new column",fromValues:"From its values",kindText:"Text",kindNumber:"Number",kindFlag:"On / off",kindColor:"Color",kindPicture:"Picture",empty:"(empty)",function:"ƒ function",pictureData:"(in the code: {kind}, {size} KB)",rowOfPath:"row {number} · {column}",rows:"{count} rows",oneRow:"1 row",shownRows:"{shown} of {count} rows",columns:"{count} columns",oneColumn:"1 column",hint:"Tab: next cell · Enter: next row · Cmd/Ctrl+V: rows from a spreadsheet or JSON",columnExists:'The column "{name}" is already there.',lastColumn:"A table keeps one column at least.",clearSearch:"Clear the search to move a row.",pasteList:"Paste a list into a list.",rowsAdded:"{count} rows added.",oneRowAdded:"1 row added.",linesPasted:"{count} lines pasted.",oneLinePasted:"1 line pasted.",rowsCopied:"{count} rows were copied.",oneRowCopied:"A row was copied.",jsonCopied:"The JSON was copied.",notJson:"Not JSON: {error}",objectNeeded:"An object is needed: { ... }",listNeeded:"A list is needed: [ ... ]",noName:"A row has no name.",sameName:'The name "{name}" is used twice.',cellValue:"The value of the cell",cancel:"Cancel",apply:"Apply",discard:"Discard the changes?",close:"Close"},onChange:function(t,e){},onPickColor:null,onPickPicture:null,colorOf:null,optionsOf:null,styleName:"light",style:{box:{color:"#FFFFFF",border:1,borderColor:Black(.12),round:10},colors:{text:"#1F2328",headText:"#1F2328",soft:"#6B6F76",dim:"#9EA2A8",icon:"#5A5E66",line:"#EBEBEA",rowLine:"#EBEBEA",columnLine:"#EBEBEA",headLine:"#DEDEDC",strongLine:"#CFCFCC",ground:"#FFFFFF",head:"#F7F7F5",field:"#F0F0EE",fieldHover:"#E6E6E3",fieldLine:"",fieldLineHover:"",hover:"#F3F6F9",selected:"#E1ECF9",segment:"#FFFFFF",accent:"#0C8CE9",accentHover:"#2E9DEC",accentText:"#0B6CB5",onAccent:"#FFFFFF",focus:"#0C8CE9",editor:"#FFFFFF",knob:"#FFFFFF",swatchLine:"rgba(0, 0, 0, 0.15)",thumb:"#8A8A8A",scrollBar:Black(.2),scrollBarHover:Black(.35),placeholder:Black(.38)},fontSize:12,headFontSize:12,titleFontSize:14,codeFontFamily:'ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',rowHeight:30,headHeight:32,popupShadow:"0 6px 18px rgba(0, 0, 0, 0.18)",searchStyleName:"ozden",search:{height:28,fontSize:12,searchIconSize:14,searchIconLeft:8,searchIconGap:6,clearIconRight:8,round:6,color:"#F0F0EE",border:0,borderBottomStyle:"none",textOffsetY:0,clearIconOffsetY:0},menuStyleName:"light",window:{coverColor:Black(.35),shadow:"0 20px 60px rgba(0, 0, 0, 0.25)",zIndex:3900,margin:24,narrowMargin:8}}},JsonEditor=function(t={}){basic.applyStylePackage(t,JsonEditor.styles,JsonEditorDefaults),mergeIntoIfMissing(t,JsonEditorDefaults),t.value=JsonEditor.rootValueOf(t.value),t.columns=Array.isArray(t.columns)?t.columns.slice():[];const e=startObject(t),n=e.style,o=n.colors,r=JsonEditor.SIZES,i=JsonEditor.PLAIN_KEY,l=JsonEditor.NAME_KEY,s=JsonEditor.VALUE_KEY,c=n.rowHeight,u=n.headHeight,a=r.HANDLE_WIDTH+r.NUMBER_WIDTH,d=.58*n.fontSize,f=JsonEditor.looksOf(n),p=[];let h=null,E=[],m="",x=null,g=!1,w="",y=null,b=-1,T=-1,C=null,v=new Map,I=null,k=null,O=null,S=null,_=null,A=null,H=null,J=null,L=null,N=null,D=null,R=null,B=null,F=null,M=null,W=null,P=null,G=null,j=null,z=null,K=null,U=null,V=null,Y=null,Z=null,X=null,$=null,q=[];e.errorText="",e.isChanged=0;const Q=function(t,n){return JsonEditor.fillText(e.texts[t],n)},tt=function(t){return t.textKey?Q(t.textKey,{name:t.valueName}):t.message},et=function(t){return h.hints.find(function(e){return e.key===t})||null},nt=function(t){return t.key===i||t.key===s?e.texts.value:t.key===l?e.texts.name:/^\d+$/.test(t.key)?String(Number(t.key)+1):t.key},ot=function(t){return"function"==typeof t?e.texts.function:JsonEditor.textOfValue(t)},rt=function(t,e){const n=e.getBoundingClientRect();return{x:withPageZoom(t.clientX-n.left),y:withPageZoom(t.clientY-n.top)}},it=function(t,e,n,o){const r=JsonEditor.levelOf(e,n);r.name=t,r.hints=n,r.openedCell=o,r.undoList=[],r.redoList=[],r.selected=new Set,r.active=null,r.sort=null,r.scrollTop=0,r.scrollLeft=0,p.push(r),h=r,Mt(),ut()},lt=function(t,e){h.undoList.push(at(h)),h.redoList=[];const n=gt(t.rowId);n&&(n.cells[t.columnKey]=e)},st=function(){const t=p[p.length-1];let e=JsonEditor.valueOfLevel(t),n=t.undoList.length>0;for(let t=p.length-1;t>0;t--){const o=p[t-1],r={rowId:p[t].openedCell.rowId,columnKey:p[t].openedCell.columnKey,value:e};e=JsonEditor.valueOfLevel(o,n?r:null),n=n||o.undoList.length>0}return e},ct=function(){let t;try{t=st()}catch(t){return e.errorText=tt(t),void(x||Fe(e.errorText))}e.errorText="",e.value=t,e.onChange(e,t)},ut=function(){m="",G.setValue("",1),Le(),jt(),Et(),H.elem.scrollTop=h.scrollTop,H.elem.scrollLeft=h.scrollLeft,Vt(),Yt(!0),ue(),Be()},at=function(t){return{rows:t.rows.map(function(t){return{id:t.id,shape:t.shape,cells:Object.assign({},t.cells)}}),columns:t.columns.map(function(t){return Object.assign({},t)})}},dt=function(){h.undoList.push(at(h)),h.undoList.length>r.HISTORY_LIMIT&&h.undoList.shift(),h.redoList=[],e.isChanged=1,Fe("")},ft=function(t,e){if(!t.length)return;he(),e.push(at(h));const n=t.pop();h.rows=n.rows,h.columns=n.columns,h.selected.clear(),h.sort=null,jt(),xt()},pt=function(){ft(h.undoList,h.redoList)},ht=function(){ft(h.redoList,h.undoList)},Et=function(){const t=m.trim().toLowerCase();E=h.rows.filter(function(e){return!t||Object.keys(e.cells).some(function(n){return-1!==JsonEditor.textOfValue(e.cells[n]).toLowerCase().indexOf(t)})})},mt=function(){Et(),Yt(!0),ue(),Be()},xt=function(){mt(),ct()},gt=function(t){return h.rows.find(function(e){return e.id===t})||null},wt=function(t){return h.columns.find(function(e){return e.key===t})||null},yt=function(){return h.rows.some(function(t){return"array"===t.shape})},bt=function(){if(h.isObject){const t={};return t[l]="",t[s]="",JsonEditor.newRow("pair",t)}if(yt())return JsonEditor.newRow("array",{});const t=1===h.columns.length&&h.columns[0].key===i;return JsonEditor.newRow(t?"plain":"object",{})},Tt=function(t){he(),dt(),m="",G.setValue("",1);const e=bt(),n=void 0===t?h.rows.length:t;h.rows.splice(n,0,e),h.selected.clear(),mt();const o=h.columns[0];se(e.id,o.key),ae(),fe(e,o),ct()},Ct=function(){const t=h.rows.filter(function(t){return h.selected.has(t.id)});if(t.length)return t;const e=h.active&>(h.active.rowId);return e?[e]:[]},vt=function(t){if(!t.length)return;he(),dt();const e=new Set(t.map(function(t){return t.id})),n=h.rows.findIndex(function(t){return e.has(t.id)});h.rows=h.rows.filter(function(t){return!e.has(t.id)}),h.selected.clear();const o=h.rows[Math.min(n,h.rows.length-1)];h.active=o&&h.active?{rowId:o.id,columnKey:h.active.columnKey}:null,xt()},It=function(t){if(!t.length)return;he(),dt();let e=null;t.forEach(function(t){e=JsonEditor.newRow(t.shape,Object.assign({},t.cells)),h.isObject&&(e.cells[l]=String(t.cells[l])+"Copy"),h.rows.splice(h.rows.indexOf(t)+1,0,e)}),h.selected.clear(),h.active&&(h.active.rowId=e.id),xt()},kt=function(t,e){if(!t.length)return;he();const n=t.map(function(t){return h.rows.indexOf(t)}).sort(function(t,e){return t-e});if(e<0?0===n[0]:n[n.length-1]===h.rows.length-1)return;dt();(e<0?n:n.slice().reverse()).forEach(function(t){const n=h.rows.splice(t,1)[0];h.rows.splice(t+e,0,n)}),h.sort=null,jt(),xt(),ae()},Ot=function(t,e,n){void 0===n?delete t.cells[e]:t.cells[e]=n},St=function(t){const e=String(t).trim();e&&(wt(e)?Fe(Q("columnExists",{name:e})):(he(),dt(),h.columns.push(JsonEditor.newColumn(e,et(e))),Mt(),jt(),mt()))},_t=function(t){if(!h.isObject){if(yt()){const t=h.columns.map(function(t){return Number(t.key)}).filter(function(t){return!isNaN(t)});return void St(String(Math.max.apply(null,t.concat([-1]))+1))}Se(t)}},At=function(t,e){const n=h.columns.indexOf(t),o=n+e;o<0||o>=h.columns.length||(dt(),h.columns.splice(n,1),h.columns.splice(o,0,t),jt(),xt())},Ht=function(t,e){he(),dt();const n=h.sort&&h.sort.key===t.key?h.sort.order:h.rows.map(function(t){return t.id}),o=function(e,n){return JsonEditor.compareValues(e.cells[t.key],n.cells[t.key])};if("asc"===e&&h.rows.sort(o),"desc"===e&&h.rows.sort(function(t,e){return o(e,t)}),""===e){const t=function(t){const e=n.indexOf(t.id);return-1===e?n.length:e};h.rows.sort(function(e,n){return t(e)-t(n)})}h.sort=e?{key:t.key,direction:e,order:n}:null,jt(),xt()},Jt=function(t){if(t.chosenKind)return t.chosenKind;if(t.options)return"option";const e=function(t){const e=[];return h.rows.forEach(function(n){const o=n.cells[t.key];null!=o&&e.push(o)}),e}(t),n=JsonEditor.kindOfColumnValues(t.key,e);return("text"===n||"auto"===n)&&Rt(t.key,e[0]).length?"option":n},Lt=function(t,e){const n=t.cells[e.key];return"function"==typeof n||JsonEditor.isOtherObject(n)?"function":JsonEditor.isNestedValue(n)?"nested":e.key===l?"text":e.key===s?Nt(t):e.kindNow||"text"},Nt=function(t){const e=String(t.cells[l]??""),n=t.cells[s],o=et(e);if(o&&o.kind)return o.kind;if(o&&o.options)return"option";const r=JsonEditor.kindOfNamedValue(e,n);if("color"===r||"picture"===r||"flag"===r)return r;return("text"===r||"any"===r)&&Rt(e,n).length?"option":"number"==typeof n?"number":"auto"},Dt=function(t,e){const n=e.key===s,o=n?String(t.cells[l]??""):e.key,r=n?et(o):e;return r&&r.options?r.options:Rt(o,t.cells[e.key])},Rt=function(t,n){if(!e.optionsOf||JsonEditor.isOwnKey(t))return[];const o=e.optionsOf(t,n,e);return Array.isArray(o)?o:[]},Bt=function(t){const n=String(t??"").trim();return e.colorOf&&n?String(e.colorOf(n,e)||n):n},Ft=function(t,e,n){const o=e.cells[n.key],r=Lt(e,n),c=n.key===l||n.key===s||n.key===i||"array"===e.shape;if(""===t)return c?"":void 0;if(n.key===l)return t;if("null"===t)return null;const u=JsonEditor.numberOfText(t);if("number"==typeof o||"number"===r)return null!==u?u:t;if("boolean"==typeof o){if("true"===t||"1"===t)return!0;if("false"===t||"0"===t)return!1}if("flag"===r){if("1"===t||"true"===t)return 1;if("0"===t||"false"===t)return 0}if("auto"===r&&("string"==typeof o&&""!==o))return t;if("nested"===r||"auto"===r)return JsonEditor.jsonOrText(t);const a=null!==u&&-1!==Dt(e,n).indexOf(u);return"option"===r&&a?u:t},Mt=function(){const t=Math.max(0,H.elem.clientWidth-a-r.END_WIDTH);h.columns.forEach(function(t){t.kindNow=Jt(t),t.isSized||(t.width=function(t){let e=nt(t).length+3;const n=Jt(t);h.rows.slice(0,r.MEASURED_ROWS).forEach(function(n){e=Math.max(e,ot(n.cells[t.key]).length)});const o="color"===n||"picture"===n||"option"===n?r.CELL_ICON_ROOM:0,i=e*d+r.CELL_TEXT_ROOM+o;return Math.max(r.MIN_COLUMN,Math.min(r.MAX_AUTO_COLUMN,i))}(t))});const e=h.columns.reduce(function(t,e){return t+e.width},0),n=h.columns.filter(function(t){return!t.isSized});if(e<t&&n.length){const o=Math.floor((t-e)/n.length);n.forEach(function(t){t.width+=o})}Wt(e>t)},Wt=function(t){H.scrollX=t?1:0},Pt=function(){return a+r.END_WIDTH+h.columns.reduce(function(t,e){return t+e.width},0)},Gt=function(t){let e=a;for(let n=0;n<h.columns.length;n++){if(h.columns[n].key===t)return e;e+=h.columns[n].width}return e},jt=function(){h.columns.forEach(function(t){t.kindNow=Jt(t)}),A&&A.remove(),createIn(_,function(){A=HGroup({left:a,top:0,width:Pt()-a,height:u,align:"left center",gap:0,color:"transparent"}),A.clipContent=0,h.columns.forEach(zt),endGroup()}),Vt()},zt=function(t){let e="";h.sort&&h.sort.key===t.key&&(e="asc"===h.sort.direction?" ↑":" ↓");const l=nt(t),s=HGroup({width:t.width,height:u,align:"left center",gap:0,padding:[r.CELL_PADDING,0],color:"transparent"});s.shrink=0,s.css={borderRight:"1px solid "+o.columnLine,boxSizing:"border-box",position:"relative"},s.clickable=1,s.cursor="pointer";const c=Label({text:"",height:u,fontSize:n.headFontSize,textColor:t.key===i?o.soft:o.headText,fontFamily:"opensans-bold",ellipsis:1});c.plainText=l+e,c.grow=1,c.css={minWidth:"0px",lineHeight:u+"px"},h.isObject||Kt(t);const a=Box({left:t.width-r.COLUMN_EDGE_WIDTH-1,top:0,width:r.COLUMN_EDGE_WIDTH,height:u,color:"transparent",clickable:1,cursor:"col-resize"});a.css={position:"absolute"},Ut(a,t),endGroup(),s.elem.title=t.note?l+": "+t.note:Q("sortHint",{title:l}),s.on("click",function(e,n){n.target!==s.elem&&n.target!==c.elem||function(t){const e=h.sort&&h.sort.key===t.key?h.sort.direction:"";Ht(t,{"":"asc",asc:"desc",desc:""}[e])}(t)})},Kt=function(t){const n=Label({text:JsonEditor.iconOf("chevron",r.ICON),width:r.HEAD_BUTTON_WIDTH,height:r.HEAD_BUTTON_HEIGHT,color:"transparent",textColor:o.soft,round:4,clickable:1,cursor:"pointer",lineHeight:"0"});n.shrink=0,n.css={display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.12s"},n.role="button",n.aria={label:e.texts.columnMenu},n.elem.title=e.texts.columnMenu,n.onHoverChange(function(t,e){n.color=e?o.fieldHover:"transparent",n.textColor=e?o.text:o.soft}),n.on("click",function(){Ie(t,n)})},Ut=function(t,n){t.on("pointerdown",function(t,o){if(0!==o.button)return;o.preventDefault(),o.stopPropagation();const i=o.clientX,l=n.width,s=[],c=function(){s.forEach(function(t){t()})};s.push(e.listenTo(window,"pointermove",function(t,e){n.width=Math.max(r.MIN_COLUMN,l+withPageZoom(e.clientX-i)),n.isSized=!0,Wt(Pt()>H.elem.clientWidth),jt(),Yt(!0),ue()})),s.push(e.listenTo(window,"pointerup",c)),s.push(e.listenTo(window,"pointercancel",c))})},Vt=function(){A&&(A.css.transform="translateX("+-H.elem.scrollLeft+"px)")},Yt=function(t){const e=H.elem.scrollTop,n=H.elem.clientHeight,o=Math.floor(e/c),i=Math.min(E.length,Math.ceil((e+n)/c));if(!t&&(o>=b&&i<=T))return;b=Math.max(0,o-r.ROW_BUFFER),T=Math.min(E.length,i+r.ROW_BUFFER);const l=Pt(),s=(E.length+1)*c;J.width=l,J.height=s,C&&C.remove(),v=new Map,C=createIn(J,function(){const t=startBox(0,0,l,s,{color:"transparent"});t.clipContent=0;for(let t=b;t<T;t++)Zt(E[t],t);return ie(),endBox(),t}),C.zIndex=0,le()},Zt=function(t,e){const n={};n.box=HGroup({left:0,top:e*c,width:Pt(),height:c,align:"left center",gap:0,color:"transparent"}),n.box.clipContent=0,n.box.css={borderBottom:"1px solid "+o.rowLine,boxSizing:"border-box"},n.gutter=$t(t),h.columns.forEach(function(e){Qt(t,e)}),n.end=qt(),endGroup(),v.set(t.id,n),Xt(t.id)},Xt=function(t){const e=v.get(t);if(!e)return;const n=y===t;let i="transparent";n&&(i=o.hover),h.selected.has(t)&&(i=o.selected);const l="transparent"===i?o.ground:i;e.box.color=i,e.gutter.color=l,e.end.color=l,e.end.text=n?JsonEditor.iconOf("trash",r.ICON):""},$t=function(t){const e=h.rows.indexOf(t)+1,i=HGroup({width:a,height:c-1,align:"left center",gap:0,color:o.ground});i.shrink=0,i.clipContent=0,i.css={position:"sticky",left:"0px",zIndex:"1"};const l=Label({text:JsonEditor.iconOf("dots",r.ICON),width:r.HANDLE_WIDTH,height:c-1,textColor:o.dim,lineHeight:"0"});l.shrink=0,l.css={display:"flex",alignItems:"center",justifyContent:"center"};const s=Label({text:String(e),width:r.NUMBER_WIDTH-r.NUMBER_SPACE,height:c-1,fontSize:n.fontSize-1,textColor:o.dim});return s.shrink=0,s.css={lineHeight:c-1+"px",textAlign:"right"},endGroup(),i},qt=function(){const t=Label({text:"",width:r.END_WIDTH,height:c-1,color:o.ground,textColor:o.soft,lineHeight:"0"});return t.shrink=0,t.css={display:"flex",alignItems:"center",justifyContent:"center",position:"sticky",right:"0px",zIndex:"1"},t},Qt=function(t,e){const n=Lt(t,e),i=t.cells[e.key],l=HGroup({width:e.width,height:c-1,align:"left center",gap:r.CELL_GAP,padding:[r.CELL_PADDING,0],color:"transparent"});l.shrink=0,l.css={borderRight:"1px solid "+o.columnLine,boxSizing:"border-box"},"flag"===n&&null!=i&&te(basic.isOn(i)),"color"===n&&ee(i),"picture"===n&&ne(i),oe(n,i),"option"===n&&re("chevron"),"nested"===n&&re("table"),endGroup()},te=function(t){const e=t?r.SWITCH_WIDTH-r.SWITCH_KNOB-r.SWITCH_SPACE:r.SWITCH_SPACE,n=startBox({width:r.SWITCH_WIDTH,height:r.SWITCH_HEIGHT,round:r.SWITCH_HEIGHT/2,color:t?o.accent:o.strongLine});n.shrink=0,n.css={position:"relative",left:"0px",top:"0px"},Box({left:e,top:r.SWITCH_SPACE,width:r.SWITCH_KNOB,height:r.SWITCH_KNOB,round:r.SWITCH_KNOB/2,color:t?o.onAccent:o.knob}),endBox()},ee=function(t){const e=Bt(t)||"transparent",n=Box({width:r.SWATCH_SIZE,height:r.SWATCH_SIZE,round:3,color:"transparent"});n.shrink=0,n.css={position:"relative",left:"0px",top:"0px"},n.css.background="linear-gradient("+e+", "+e+"), "+JsonEditor.CHECKER,n.boxShadow="inset 0 0 0 1px "+o.swatchLine},ne=function(t){const n=JsonEditor.pictureAddress(t,e.pictureBase),i=Box({width:r.SWATCH_SIZE,height:r.SWATCH_SIZE,round:3,color:o.thumb});i.shrink=0,i.css={position:"relative",left:"0px",top:"0px",backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"},n&&(i.css.backgroundImage='url("'+n.replace(/"/g,"%22")+'")')},oe=function(t,r){const i=Label({text:"",height:c-1,fontSize:n.fontSize,textColor:o.text,ellipsis:1});i.grow=1,i.css={minWidth:"0px",lineHeight:c-1+"px"};let l=ot(r);null!==r&&"function"!==t||(i.textColor=o.dim),"picture"===t&&(l=JsonEditor.shortPicture(l,e.texts.pictureData)),"nested"===t&&(l=JsonEditor.countTextOf(r),i.textColor=o.accentText),i.plainText=l},re=function(t){const e=Label({text:JsonEditor.iconOf(t,r.ICON),width:r.ICON,height:c-1,textColor:o.dim,lineHeight:"0"});e.shrink=0,e.css={display:"flex",alignItems:"center"}},ie=function(){HGroup({left:0,top:E.length*c,width:Pt(),height:c,align:"left center",color:"transparent"}).clipContent=0;const t=Label({text:"",height:c,fontSize:n.fontSize,textColor:o.accentText});t.plainText=m.trim()?"":"+ "+e.texts.addRowAtEnd,t.css={position:"sticky",left:"0px",paddingLeft:r.ADD_ROW_SPACE+"px",lineHeight:c+"px"},endGroup()},le=function(){const t=h.rows.length,n=h.columns.length;let o=1===t?e.texts.oneRow:Q("rows",{count:t});m.trim()&&(o=Q("shownRows",{shown:E.length,count:t}));const r=1===n?e.texts.oneColumn:Q("columns",{count:n});W.plainText=o+" · "+r},se=function(t,e){h.active={rowId:t,columnKey:e},ue(),Be()},ce=function(){const t=h.active;return t?E.findIndex(function(e){return e.id===t.rowId}):-1},ue=function(){const t=ce(),e=h.active?wt(h.active.columnKey):null;-1!==t&&e?(L.left=Gt(e.key),L.top=t*c,L.width=e.width,L.height=c,L.visible=1):L.visible=0},ae=function(){const t=ce(),e=h.active?wt(h.active.columnKey):null;if(-1===t||!e)return;const n=H.elem,o=t*c;o<n.scrollTop&&(n.scrollTop=o),o+c>n.scrollTop+n.clientHeight&&(n.scrollTop=o+c-n.clientHeight);const i=Gt(e.key),l=i+e.width+r.END_WIDTH;i-a<n.scrollLeft&&(n.scrollLeft=i-a),l>n.scrollLeft+n.clientWidth&&(n.scrollLeft=l-n.clientWidth),Yt(!1)},de=function(t,e){const n=h.active;if(!n||!E.length)return!1;let o=ce()+t,r=h.columns.findIndex(function(t){return t.key===n.columnKey})+e;return r>=h.columns.length&&(r=0,o++),r<0&&(r=h.columns.length-1,o--),!(o<0||o>=E.length)&&(se(E[o].id,h.columns[r].key),ae(),!0)},fe=function(t,e,n){if("function"===Lt(t,e))return;const o=JsonEditor.textOfValue(t.cells[e.key]);x={rowId:t.id,columnKey:e.key,startText:o},D.left=Gt(e.key),D.top=E.indexOf(t)*c,D.width=Math.max(e.width,r.EDITOR_MIN_WIDTH),R.value=void 0!==n?n:o,pe(),D.visible=1,R.focus(),R.setSelectionRange(R.value.length,R.value.length)},pe=function(){const t=R.value.split("\n").length,e=Math.min(t,r.EDITOR_MAX_LINES);D.height=e<=1?c:e*r.EDITOR_LINE_HEIGHT+r.EDITOR_SPACE},he=function(){if(!x)return!0;const t=gt(x.rowId),e=wt(x.columnKey),n=R.value,o=x.startText;return x=null,D.visible=0,!t||!e||n===o||(dt(),Ot(t,e.key,Ft(n,t,e)),h.sort=null,e.kindNow=Jt(e),jt(),xt(),!0)},Ee=function(t,e){he(),dt();const n=t.cells[e.key],o="boolean"==typeof n,r=!!o||1,i=!o&&0;Ot(t,e.key,basic.isOn(n)?i:r),xt()},me=function(t,e){he(),h.scrollTop=H.elem.scrollTop,h.scrollLeft=H.elem.scrollLeft;const n=h.rows.indexOf(t)+1;let o=Q("rowOfPath",{number:n,column:nt(e)});h.isObject&&(o=String(t.cells[l]));const r=et(h.isObject?o:e.key),i=r&&Array.isArray(r.columns)?r.columns:[];it(o,t.cells[e.key],i,{rowId:t.id,columnKey:e.key})},xe=function(t,n,o,r){const i=h;let u=!1;const a=J.elem.getBoundingClientRect(),d=a.left+Gt(n.key)*page.zoom,f=a.top+o*c*page.zoom,p=n.width*page.zoom,E=c*page.zoom;return{value:t.cells[n.key],key:n.key===s?String(t.cells[l]):n.key,title:nt(n),x:r.clientX,y:r.clientY,rect:{left:d,top:f,right:d+p,bottom:f+E,width:p,height:E},setValue:function(o){e._isRemoved||h!==i||(u||dt(),u=!0,Ot(t,n.key,o),xt())}}},ge=function(t,n,o,r){const i=xe(t,n,o,r);e.onPickColor?e.onPickColor(e,i):(B.value=JsonEditor.hexOfColor(Bt(i.value)),B.style.left=Gt(n.key)+"px",B.style.top=(o+1)*c+"px",B.oninput=function(){i.setValue(B.value.toUpperCase())},JsonEditor.openPicker(B))},we=function(t,n,o){const r=t.cells[n.key],i=JsonEditor.optionValues(Dt(t,n),r).map(function(o){return{text:""===o?e.texts.empty:String(o),checked:o===r?1:0,run:function(){dt(),Ot(t,n.key,o),xt()}}});Ce(i,o.clientX,o.clientY)},ye=function(t){const e=rt(t,J.elem),n=rt(t,H.elem).x,o=Math.floor(e.y/c),i={viewIndex:o,row:E[o]||null,part:"",column:null,xInCell:0};if(o>=E.length)return i.part=n<r.ADD_ROW_WIDTH?"add":"",i;if(!i.row)return i;const l=Math.min(H.elem.clientWidth,Pt()-H.elem.scrollLeft)-r.END_WIDTH;if(n<r.HANDLE_WIDTH?i.part="handle":n<a?i.part="number":n>=l&&(i.part="delete"),i.part)return i;let s=0;const u=e.x-a;for(let t=0;t<h.columns.length;t++){const e=h.columns[t];if(u<s+e.width){i.part="cell",i.column=e,i.xInCell=u-s;break}s+=e.width}return i},be=function(t,e){const n=e.metaKey||e.ctrlKey;if(e.shiftKey&&h.active){const e=h.rows.findIndex(function(t){return t.id===h.active.rowId}),n=h.rows.indexOf(t),o=Math.min(e,n),r=Math.max(e,n);h.selected.clear(),h.rows.slice(o,r+1).forEach(function(t){h.selected.add(t.id)})}else if(n)h.selected.has(t.id)?h.selected.delete(t.id):h.selected.add(t.id);else{const e=1===h.selected.size&&h.selected.has(t.id);h.selected.clear(),e||h.selected.add(t.id)}const o=h.active?h.active.columnKey:h.columns[0].key;e.shiftKey||(h.active={rowId:t.id,columnKey:o}),v.forEach(function(t,e){Xt(e)}),ue(),Be()},Te=function(){const t=h.rows.indexOf(I.row),e=I.place>t?I.place-1:I.place;if(e===t)return;dt(),h.rows.splice(t,1),h.rows.splice(e,0,I.row),h.sort=null;const n=h.active?h.active.columnKey:h.columns[0].key;h.active={rowId:I.row.id,columnKey:n},jt(),xt()},Ce=function(t,o,i){k||(k=e.own(createIn(page,function(){return ContextMenu({styleName:n.menuStyleName,minWidth:r.MENU_MIN_WIDTH,onClick:ve})}))),k.setItems(t),k.openAt(o,i,e)},ve=function(t,e){e.run&&e.run()},Ie=function(t,n){const o=n.elem.getBoundingClientRect(),i={"":"fromValues",text:"kindText",number:"kindNumber",flag:"kindFlag",color:"kindColor",picture:"kindPicture"},l=JsonEditor.TYPES.map(function(n){return{text:e.texts[i[n]],checked:(t.chosenKind||"")===n?1:0,run:function(){dt(),t.chosenKind=n,t.kindNow=Jt(t),mt()}}}),s=!/^\d+$/.test(t.key);Ce([{text:e.texts.sortUp,run:function(){Ht(t,"asc")}},{text:e.texts.sortDown,run:function(){Ht(t,"desc")}},{text:e.texts.firstOrder,enabled:h.sort?1:0,run:function(){Ht(t,"")}},"-",{text:e.texts.rename,enabled:s?1:0,run:function(){Oe(t)}},{text:e.texts.type,items:l},{text:e.texts.moveLeft,run:function(){At(t,-1)}},{text:e.texts.moveRight,run:function(){At(t,1)}},"-",{text:e.texts.deleteColumn,run:function(){!function(t){h.columns.length<=1?Fe(e.texts.lastColumn):(he(),dt(),h.columns=h.columns.filter(function(e){return e!==t}),h.rows.forEach(function(e){delete e.cells[t.key]}),Mt(),jt(),xt())}(t)}}],o.left,o.bottom+r.MENU_SPACE)},ke=function(t,i,l,s){let c=!1;const u=e.elem.getBoundingClientRect(),a=createIn(e,function(){const e=HGroup({left:withPageZoom(t.left-u.left),top:withPageZoom(t.top-u.top),width:r.NAME_FIELD_WIDTH,height:r.NAME_FIELD_HEIGHT,align:"left center",color:o.editor,round:5,border:1,borderColor:o.accent});return e.zIndex=r.NAME_FIELD_Z_INDEX,e.boxShadow=n.popupShadow,endGroup(),e}),d=Ge(a,"input");d.value=l,d.placeholder=i,d.style.padding="0px 6px";const f=function(t){c||(c=!0,a.remove(),null!==t&&s(t))};d.addEventListener("keydown",function(t){t.stopPropagation(),"Enter"===t.key&&f(d.value),"Escape"===t.key&&f(null)}),d.addEventListener("blur",function(){f(d.value)}),d.focus(),d.select()},Oe=function(t){const n=J.elem.getBoundingClientRect(),o=H.elem.getBoundingClientRect(),r=n.left+Gt(t.key)*page.zoom,l=t.key===i?"":t.key,s={left:Math.max(o.left,r),top:o.top-(u-2)*page.zoom};ke(s,e.texts.columnName,l,function(e){!function(t,e){const n=String(e).trim();n&&n!==t.key&&(wt(n)?Fe(Q("columnExists",{name:n})):(he(),dt(),h.rows.forEach(function(e){"plain"===e.shape&&(e.shape="object"),t.key in e.cells&&(e.cells[n]=e.cells[t.key],delete e.cells[t.key])}),t.key=n,jt(),xt()))}(t,e)})},Se=function(t){const n=t.elem.getBoundingClientRect(),o=h.hints.filter(function(t){return!wt(t.key)}),i=function(){ke({left:n.left,top:n.bottom+r.MENU_SPACE},e.texts.newColumnName,"",St)};if(!o.length)return void i();const l=o.map(function(t){return{text:t.key,run:function(){St(t.key)}}});l.push("-"),l.push({text:e.texts.newName,run:i}),Ce(l,n.left,n.bottom+r.MENU_SPACE)},_e=function(){return JSON.stringify(JsonEditor.valueOfLevel(h),null,2)},Ae=function(){const t=M.value;if(t===w)return!0;const n=function(t){let n;try{n=JSON.parse(t)}catch(t){return{error:Q("notJson",{error:t.message})}}return(h.isObject?JsonEditor.isPlain(n):Array.isArray(n))?{data:n}:{error:h.isObject?e.texts.objectNeeded:e.texts.listNeeded}}(t);if(n.error)return e.errorText=n.error,Fe(n.error),!1;const o=JsonEditor.valueOfLevel(h);dt();const r=JsonEditor.levelOf(JsonEditor.keepFunctions(n.data,o),h.hints);return h.rows=r.rows,h.columns=r.columns,h.selected.clear(),h.active=null,h.sort=null,w=t,Mt(),jt(),xt(),!0},He=function(){return!g||!!Ae()&&(Je(),!0)},Je=function(){g=!1,F.visible=0,Me(),Be(),e.errorText||Fe("")},Le=function(){O.parts&&O.parts.forEach(function(t){t.remove()}),O.parts=createIn(O,function(){const t=[];return p.forEach(function(e,n){n&&t.push(Ne()),t.push(De(e,n))}),t});const t=1===p.length?e.noteText:"";S.plainText=t,S.elem.title=t,S.visible=t?1:0;const n=""!==e.titleText||""!==e.noteText||p.length>1;e.titleBar.visible=n||1==e.showTitleBar?1:0},Ne=function(){const t=Label({text:"›",fontSize:n.titleFontSize,textColor:o.dim,height:r.TITLE_HEIGHT});return t.css={lineHeight:r.TITLE_HEIGHT+"px"},t.shrink=0,t},De=function(t,i){const l=i===p.length-1,s=e.titleText||(t.isObject?e.texts.object:e.texts.list),c=Label({text:"",fontSize:n.titleFontSize,textColor:l?o.text:o.accentText,fontFamily:"opensans-bold",height:r.TITLE_HEIGHT,ellipsis:1});return c.plainText=i?t.name:s,c.css={lineHeight:r.TITLE_HEIGHT+"px",minWidth:"0px"},l||(c.shrink=0,c.clickable=1,c.cursor="pointer",c.role="button",c.tabIndex=0,c.setFocusRing(o.focus),c.on("click",function(){Re(i)}),c.on("keydown",function(t,e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),Re(i))})),c},Re=function(t){He()&&function(t){if(!he())return!1;for(;p.length-1>t;){let t;try{t=JsonEditor.valueOfLevel(h)}catch(t){return Fe(tt(t)),!1}const e=p.pop();h=p[p.length-1],e.undoList.length&<(e.openedCell,t)}ut()}(t)},Be=function(){const t=Ct().length>0;q.forEach(function(t){t.visible=g?0:1}),K.visible=g||h.isObject?0:1,U.setEnabled(t),V.setEnabled(t),Y.setEnabled(t),Z.setEnabled(t),X.setEnabled(h.undoList.length>0),$.setEnabled(h.redoList.length>0)},Fe=function(t){P.plainText=t,P.elem.title=t},Me=function(){j&&j.remove(),j=createIn(z,function(){const t=HGroup({width:r.VIEW_SWITCH_WIDTH,height:r.VIEW_SWITCH_HEIGHT,align:"left center",gap:0,color:o.field,round:r.VIEW_SWITCH_ROUND});return t.shrink=0,o.fieldLine&&t.props({border:1,borderColor:o.fieldLine,padding:r.VIEW_SWITCH_INSET}),t.role="radiogroup",We("table",e.texts.table),We("json",e.texts.json),endGroup(),t})},We=function(t,i){const l="json"===t===g,s=o.fieldLine?1+r.VIEW_SWITCH_INSET:0,c=Label({text:"",height:r.VIEW_SWITCH_HEIGHT-2*s,fontSize:n.fontSize-1,round:r.VIEW_SWITCH_ROUND-s,textColor:l?o.text:o.soft,color:l?o.segment:"transparent",clickable:1,cursor:"pointer"});c.plainText=i,c.grow=1,c.css={flexBasis:"0px",display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap"},c.boxShadow=l?"inset 0 0 0 1px "+o.strongLine:"none",c.role="radio",c.tabIndex=0,c.aria={checked:l?"true":"false"},c.setFocusRing(o.focus),l||c.onHoverChange(function(t,e){c.color=e?o.fieldHover:"transparent"}),c.on("click",function(){e.setView(t)}),c.on("keydown",function(n,o){"Enter"!==o.key&&" "!==o.key||(o.preventDefault(),e.setView(t))})},Pe=function(){let t;he();try{t=g?M.value:_e()}catch(t){return void Fe(tt(t))}JsonEditor.copyText(t).then(function(){Fe(e.texts.jsonCopied)}).catch(function(t){Fe(t.message)})},Ge=function(t,e){const o=document.createElement(e);return o.spellcheck=!1,o.className="json-editor-field",o.style.fontSize=n.fontSize+"px",t.elem.appendChild(o),o},je=function(){const t=HGroup({width:"auto",height:r.ICON_BUTTON,align:"left center",gap:4,color:"transparent"});t.shrink=0,t.clipContent=0;const e=Box({width:1,height:r.TOOLBAR_LINE_HEIGHT,color:o.line});return e.shrink=0,e.css={position:"relative",left:"0px",top:"0px",margin:"0px 6px"},t},ze=function(t){he(),m=String(t||""),Et(),H.elem.scrollTop=0,Yt(!0),ue()},Ke=function(t){const n=t.metaKey||t.ctrlKey;if("Enter"===t.key&&n)return!1;if("Enter"===t.key&&t.shiftKey)return e.after(0,pe),!0;if("Enter"===t.key){t.preventDefault(),he();return de(1,0)?Ue():J.elem.focus({preventScroll:!0}),!0}if("Tab"===t.key){t.preventDefault(),he();return de(0,t.shiftKey?-1:1)?Ue():J.elem.focus({preventScroll:!0}),!0}if("Escape"===t.key)return t.preventDefault(),x=null,D.visible=0,J.elem.focus({preventScroll:!0}),!0;const o=-1===R.value.indexOf("\n");return!("ArrowUp"!==t.key&&"ArrowDown"!==t.key||!o)&&(t.preventDefault(),he(),de("ArrowUp"===t.key?-1:1,0),Ue(),!0)},Ue=function(){const t=h.active,e=t&>(t.rowId),n=t&&wt(t.columnKey);e&&n&&fe(e,n)};return e.getValue=function(){if(he(),g&&!Ae())return null;try{const t=st();return e.errorText="",t}catch(t){return e.errorText=tt(t),Fe(e.errorText),null}},e.setValue=function(t){x=null,D.visible=0,g&&Je(),e.value=JsonEditor.rootValueOf(t),e.isChanged=0,e.errorText="",p.length=0,it("",e.value,e.columns,null),Fe("")},e.setJsonText=function(t){let n;try{n=JSON.parse(t)}catch(t){return e.errorText=Q("notJson",{error:t.message}),Fe(e.errorText),!1}return Array.isArray(n)||JsonEditor.isPlain(n)?(e.setValue(n),!0):(e.errorText=e.texts.listNeeded,Fe(e.errorText),!1)},e.getJsonText=function(){const t=e.getValue();return null===t?"":JSON.stringify(t,null,2)},e.setView=function(t){return"json"===t?(function(){if(g)return;let t;he();try{t=_e()}catch(t){return void Fe(tt(t))}g=!0,M.value=t,w=t,F.visible=1,Me(),Be()}(),g):He()},e.getView=function(){return g?"json":"table"},e.undo=function(){pt()},e.redo=function(){ht()},e.hasChanges=function(){const t=g&&M.value!==w;return 1==e.isChanged||t?1:0},e.setTitleText=function(t,n=e.noteText){e.titleText=t,e.noteText=n,e.aria={label:e.ariaLabel||e.titleText||e.texts.table},Le()},e.focus=function(){J.elem.focus({preventScroll:!0})},e.props(n.box),e.role="group",e.aria={label:e.ariaLabel||e.titleText||e.texts.table},e.layout=VGroup({left:0,top:0,width:"100%",height:"100%",align:"left top",gap:0,color:"transparent"}),e.layout.css={alignItems:"stretch"},e.titleBar=VGroup({width:"100%",height:"auto",align:"left top",gap:2,padding:[r.BAR_SPACE,r.TITLE_SPACE],color:"transparent"}),e.titleBar.css={alignItems:"stretch",boxSizing:"border-box"},e.titleBar.shrink=0,e.titleRow=HGroup({width:"100%",height:r.TITLE_HEIGHT,align:"left center",gap:4,color:"transparent"}),e.titleRow.shrink=0,O=HGroup({width:10,height:r.TITLE_HEIGHT,align:"left center",gap:8,color:"transparent"}),O.grow=1,O.css={minWidth:"0px"},endGroup(),endGroup(),S=Label({text:"",height:r.NOTE_HEIGHT,fontSize:n.fontSize-1,textColor:o.soft,ellipsis:1}),S.css={lineHeight:r.NOTE_HEIGHT+"px"},S.shrink=0,endGroup(),function(){e.toolbar=HGroup({width:"100%",height:"auto",align:"left center",gap:4,padding:[r.BAR_SPACE,r.TOOLBAR_SPACE],wrap:1,color:"transparent"}),e.toolbar.shrink=0,e.toolbar.clipContent=0,e.toolbar.css={borderBottom:"1px solid "+o.line,boxSizing:"border-box",rowGap:r.TOOLBAR_SPACE+"px"};const t=JsonEditor.textButton(JsonEditor.iconOf("plus",r.ICON)+JsonEditor.spanOf(e.texts.addRow),f.button,function(){Tt()});K=JsonEditor.textButton(JsonEditor.iconOf("plus",r.ICON)+JsonEditor.spanOf(e.texts.addColumn),f.button,_t);const i=je();U=JsonEditor.iconButton("copy",e.texts.duplicate+" (Cmd/Ctrl+D)",f.icon,function(){It(Ct())}),Y=JsonEditor.iconButton("up",e.texts.moveUp+" (Alt+↑)",f.icon,function(){kt(Ct(),-1)}),Z=JsonEditor.iconButton("down",e.texts.moveDown+" (Alt+↓)",f.icon,function(){kt(Ct(),1)}),V=JsonEditor.iconButton("trash",e.texts.delete+" (Delete)",f.icon,function(){vt(Ct())}),endGroup();const l=je();X=JsonEditor.iconButton("back",e.texts.undo+" (Cmd/Ctrl+Z)",f.icon,pt),$=JsonEditor.iconButton("forward",e.texts.redo+" (Shift+Cmd/Ctrl+Z)",f.icon,ht),endGroup();const s=HGroup({width:r.SEARCH_WIDTH,height:n.search.height,align:"left center",color:"transparent"});s.css={flex:"1 1 "+r.SEARCH_BASIS+"px",maxWidth:r.SEARCH_WIDTH+"px",minWidth:r.SEARCH_MIN_WIDTH+"px",marginLeft:r.SEARCH_SPACE+"px"},G=SearchInput({...n.search,styleName:n.searchStyleName,left:0,top:0,width:"100%",placeholder:e.texts.search,onChange:function(t){ze(t.getSearchText())}}),endGroup();const c=HGroup({width:"auto",height:r.VIEW_SWITCH_HEIGHT,align:"left center",gap:4,color:"transparent"});c.shrink=0,c.clipContent=0,c.css={marginLeft:"auto"},JsonEditor.iconButton("copy",e.texts.copyJson,f.icon,Pe),z=HGroup({width:r.VIEW_SWITCH_WIDTH,height:r.VIEW_SWITCH_HEIGHT,align:"left center",color:"transparent"}),z.shrink=0,endGroup(),endGroup(),endGroup(),q=[t,i,l,s],Me()}(),function(){const t=startBox({width:"100%",height:10,color:"transparent"});t.grow=1,t.css={position:"relative",left:"0px",top:"0px",minHeight:"0px"},_=startBox(0,0,"100%",u,{color:o.head}),_.css={borderBottom:"1px solid "+o.headLine,boxSizing:"border-box"},endBox();const i=Box(0,0,a,u,{color:o.head});i.css={borderBottom:"1px solid "+o.headLine,boxSizing:"border-box"},i.zIndex=1,H=startBox(0,u,"100%","calc(100% - "+u+"px)",{color:"transparent"}),H.scrollY=1,H.scrollX=1,H.elem.classList.add("json-editor-scroll"),J=startBox(0,0,100,100,{color:"transparent"}),J.clipContent=0,J.clickable=1,J.tabIndex=0,J.css={outline:"none"},L=Box(0,0,0,0,{color:"transparent",visible:0}),L.boxShadow="inset 0 0 0 2px "+o.accent,L.zIndex=2,N=Box(0,0,0,2,{color:o.accent,visible:0}),N.zIndex=3,D=startBox(0,0,0,c,{color:o.editor,visible:0}),D.boxShadow="inset 0 0 0 2px "+o.accent,D.zIndex=4,D.clickable=1,R=Ge(D,"textarea"),R.style.padding=r.EDITOR_PADDING,R.style.overflow="hidden",R.style.whiteSpace="pre",R.setAttribute("aria-label",e.texts.cellValue),endBox(),endBox(),B=document.createElement("input"),B.type="color",B.className="json-editor-color",B.tabIndex=-1,J.elem.appendChild(B),endBox(),F=startBox(0,0,"100%","100%",{color:o.ground,visible:0}),F.zIndex=6,M=Ge(F,"textarea"),M.classList.add("json-editor-scroll"),M.style.fontFamily=n.codeFontFamily,M.style.padding=r.JSON_PADDING,M.style.whiteSpace="pre",M.setAttribute("aria-label",e.texts.json),endBox(),endBox()}(),function(){e.footer=HGroup({width:"100%",height:r.FOOTER_HEIGHT,align:"left center",gap:12,padding:[r.BAR_SPACE,0],color:"transparent"}),e.footer.shrink=0,e.footer.css={borderTop:"1px solid "+o.line,boxSizing:"border-box"},W=Label({text:"",fontSize:n.fontSize,textColor:o.soft}),W.shrink=0,P=Label({text:"",fontSize:n.fontSize,textColor:o.accentText,ellipsis:1}),P.css={minWidth:"0px",flex:"0 1 auto"};const t=Label({text:"",fontSize:n.fontSize-1,textColor:o.dim,ellipsis:1});t.plainText=e.texts.hint,t.css={minWidth:"0px",flex:"1 1 0px",textAlign:"right"},t.visible=1==e.showHint?1:0,endGroup()}(),endGroup(),basic.addCss("json-editor",".json-editor-field { display: block; width: 100%; height: 100%; box-sizing: border-box; margin: 0; border: 0; outline: none; resize: none; background: transparent; color: var(--json-editor-text); caret-color: var(--json-editor-text); font-family: inherit; line-height: 18px; pointer-events: auto; user-select: text; -webkit-user-select: text; }.json-editor-field::placeholder { color: var(--json-editor-placeholder); }.json-editor-scroll::-webkit-scrollbar { width: 10px; height: 10px; }.json-editor-scroll::-webkit-scrollbar-thumb { background: var(--json-editor-bar); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }.json-editor-scroll::-webkit-scrollbar-thumb:hover { background: var(--json-editor-bar-hover); border: 2px solid transparent; background-clip: padding-box; }.json-editor-scroll::-webkit-scrollbar-corner { background: transparent; }.json-editor-color { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; opacity: 0; pointer-events: none; }"),e.elem.style.setProperty("--json-editor-text",o.text),e.elem.style.setProperty("--json-editor-placeholder",o.placeholder),e.elem.style.setProperty("--json-editor-bar",o.scrollBar),e.elem.style.setProperty("--json-editor-bar-hover",o.scrollBarHover),J.on("click",function(t,n){if(I)return;if(n.target===R)return;const o=ye(n);he(),"add"!==o.part?o.row&&("number"===o.part&&be(o.row,n),"delete"===o.part&&vt([o.row]),"cell"===o.part&&function(t,n){const o=t.row,i=t.column,l=Lt(o,i);if(se(o.id,i.key),"flag"===l)return void Ee(o,i);if("nested"===l)return void me(o,i);const s=t.xInCell<r.SWATCH_HIT;if("color"===l&&s)return void ge(o,i,t.viewIndex,n);if("picture"===l&&s&&e.onPickPicture)return void e.onPickPicture(e,xe(o,i,t.viewIndex,n));const c=t.xInCell>i.width-r.OPTION_HIT;"option"===l&&c?we(o,i,n):fe(o,i)}(o,n),"cell"!==o.part&&J.elem.focus({preventScroll:!0})):m.trim()||Tt()}),J.on("mousemove",function(t,e){const n=ye(e),o=n.row?n.row.id:null;let r="pointer";if("handle"===n.part&&(r="grab"),"cell"===n.part&&(r="text"),J.cursor=r,o===y)return;const i=y;y=o,Xt(i),Xt(o)}),J.on("mouseleave",function(){const t=y;y=null,Xt(t)}),J.on("pointerdown",function(t,n){if(0!==n.button||n.target===R)return;const o=ye(n);"handle"===o.part&&o.row&&function(t,n){if(m.trim())return void Fe(e.texts.clearSearch);t.preventDefault(),he(),I={row:n,place:h.rows.indexOf(n)};const o=[],i=function(){o.forEach(function(t){t()}),N.visible=0,Te(),e.after(0,function(){I=null})};o.push(e.listenTo(window,"pointermove",function(t,e){const n=H.elem.getBoundingClientRect();e.clientY<n.top+r.DRAG_SCROLL_EDGE&&(H.elem.scrollTop-=r.DRAG_SCROLL_STEP),e.clientY>n.bottom-r.DRAG_SCROLL_EDGE&&(H.elem.scrollTop+=r.DRAG_SCROLL_STEP);const o=Math.round(rt(e,J.elem).y/c);I.place=Math.max(0,Math.min(h.rows.length,o)),N.top=Math.max(0,I.place*c-1),N.width=Pt(),N.visible=1})),o.push(e.listenTo(window,"pointerup",i)),o.push(e.listenTo(window,"pointercancel",i))}(n,o.row)}),J.on("contextmenu",function(t,n){const o=ye(n);n.preventDefault(),o.row&&function(t,n,o){const r=h.rows.indexOf(t),i=h.selected.has(t.id)?Ct():[t],l=i.length>1,s={count:i.length};Ce([{text:e.texts.addAbove,run:function(){Tt(r)}},{text:e.texts.addBelow,run:function(){Tt(r+1)}},"-",{text:l?Q("duplicateRows",s):e.texts.duplicate,shortcut:"Cmd/Ctrl+D",run:function(){It(i)}},{text:e.texts.moveUp,shortcut:"Alt+↑",run:function(){kt(i,-1)}},{text:e.texts.moveDown,shortcut:"Alt+↓",run:function(){kt(i,1)}},"-",{text:l?Q("deleteRows",s):e.texts.delete,run:function(){vt(i)}}],n,o)}(o.row,n.clientX,n.clientY)}),H.on("scroll",function(){Vt(),Yt(!1)}),H.onResize(function(){Mt(),jt(),Yt(!0),ue()}),R.addEventListener("input",pe),R.addEventListener("blur",function(){e._isRemoved||he()}),M.addEventListener("keydown",function(t){"Tab"===t.key&&(t.preventDefault(),M.setRangeText(" ",M.selectionStart,M.selectionEnd,"end"))}),e.on("keydown",function(t,e){if(e.defaultPrevented)return;if(k&&k.isOpen())return;const n=e.target;if(n===R)return void(Ke(e)&&e.stopPropagation());if(n===M)return;const o=/^(INPUT|TEXTAREA)$/.test(n.tagName);o&&"Escape"===e.key&&(e.stopPropagation(),n.blur(),J.elem.focus({preventScroll:!0})),o||function(t){const e=t.metaKey||t.ctrlKey,n=t.key;if(e&&"Enter"===n)return!1;if(e&&("z"===n||"Z"===n))return t.preventDefault(),t.shiftKey?ht():pt(),!0;if(e&&("y"===n||"Y"===n))return t.preventDefault(),ht(),!0;if(e&&("d"===n||"D"===n))return t.preventDefault(),It(Ct()),!0;if(t.altKey&&("ArrowUp"===n||"ArrowDown"===n))return t.preventDefault(),kt(Ct(),"ArrowUp"===n?-1:1),!0;const o={ArrowUp:[-1,0],ArrowDown:[1,0],ArrowLeft:[0,-1],ArrowRight:[0,1]};if(o[n])return t.preventDefault(),!h.active&&E.length?se(E[0].id,h.columns[0].key):de(o[n][0],o[n][1]),!0;if("Tab"===n&&h.active&&de(0,t.shiftKey?-1:1))return t.preventDefault(),!0;const r=h.active&>(h.active.rowId),i=h.active&&wt(h.active.columnKey);return"Enter"===n&&r?(t.preventDefault(),"nested"===Lt(r,i)?me(r,i):fe(r,i),!0):"Delete"!==n&&"Backspace"!==n||!h.selected.size?"Delete"!==n&&"Backspace"!==n||!r?!(1!==n.length||e||t.altKey||!r||(t.preventDefault(),fe(r,i,n),0)):(t.preventDefault(),dt(),Ot(r,i.key,Ft("",r,i)),xt(),!0):(t.preventDefault(),vt(Ct()),!0)}(e)&&e.stopPropagation()}),e.on("paste",function(t,n){const o=n.target,r=o!==R&&/^(INPUT|TEXTAREA)$/.test(o.tagName);if(g||r)return;const l=n.clipboardData?n.clipboardData.getData("text"):"",s=JsonEditor.readPastedText(l);if(!s){const t=h.active&>(h.active.rowId);return void(!x&&t&&(n.preventDefault(),fe(t,wt(h.active.columnKey),l)))}n.preventDefault(),he(),s.list?function(t){if(h.isObject)return void Fe(e.texts.pasteList);if(!t.length)return;dt();const n=JsonEditor.rowsOfList(t);JsonEditor.columnsOfRows(n,h.hints).forEach(function(t){const e=t.key===i&&n.every(function(t){return"plain"!==t.shape});wt(t.key)||e||h.columns.push(t)}),h.rows=h.rows.concat(n),Mt(),jt(),xt();const o=1===n.length?e.texts.oneRowAdded:Q("rowsAdded",{count:n.length});e.errorText||Fe(o)}(s.list):function(t){dt();const n=h.active,o=n?h.columns.findIndex(function(t){return t.key===n.columnKey}):0,r=n?h.rows.findIndex(function(t){return t.id===n.rowId}):h.rows.length,i=t.length>1&&t[0].every(function(t){return!!wt(t.trim())}),l=i?t.slice(1):t;l.forEach(function(e,n){const l=i?h.rows.length:r+n;l>=h.rows.length&&h.rows.push(bt());const s=h.rows[l];e.forEach(function(e,n){const r=i?wt(t[0][n].trim()):h.columns[o+n];r&&Ot(s,r.key,Ft(e,s,r))})}),Mt(),jt(),xt();const s=1===l.length?e.texts.oneLinePasted:Q("linesPasted",{count:l.length});e.errorText||Fe(s)}(s.grid)}),e.on("copy",function(t,n){if(g||x)return;if(/^(INPUT|TEXTAREA)$/.test(n.target.tagName))return;const o=Ct();if(!o.length)return;const r=o.map(function(t){return h.columns.map(function(e){return JsonEditor.textOfValue(t.cells[e.key])}).join("\t")});n.preventDefault(),n.clipboardData.setData("text/plain",r.join("\n")),Fe(1===o.length?e.texts.oneRowCopied:Q("rowsCopied",{count:o.length}))}),it("",e.value,e.columns,null),endObject(e)};JsonEditor.SIZES={HANDLE_WIDTH:22,NUMBER_WIDTH:38,NUMBER_SPACE:8,END_WIDTH:30,MIN_COLUMN:64,MAX_AUTO_COLUMN:320,COLUMN_EDGE_WIDTH:7,CELL_PADDING:8,CELL_GAP:6,CELL_TEXT_ROOM:20,CELL_ICON_ROOM:26,SWATCH_SIZE:14,SWATCH_HIT:26,OPTION_HIT:26,SWITCH_WIDTH:24,SWITCH_HEIGHT:14,SWITCH_KNOB:10,SWITCH_SPACE:2,ICON:14,HEAD_BUTTON_WIDTH:20,HEAD_BUTTON_HEIGHT:22,ADD_ROW_WIDTH:120,ADD_ROW_SPACE:12,ROW_BUFFER:12,MEASURED_ROWS:200,HISTORY_LIMIT:100,DRAG_SCROLL_EDGE:28,DRAG_SCROLL_STEP:14,EDITOR_LINE_HEIGHT:18,EDITOR_MAX_LINES:6,EDITOR_SPACE:12,EDITOR_MIN_WIDTH:140,EDITOR_PADDING:"5px 8px",JSON_PADDING:"12px 16px",NAME_FIELD_WIDTH:200,NAME_FIELD_HEIGHT:28,NAME_FIELD_Z_INDEX:5,MENU_MIN_WIDTH:200,MENU_SPACE:2,BAR_SPACE:14,TITLE_SPACE:10,TITLE_HEIGHT:26,NOTE_HEIGHT:16,TOOLBAR_SPACE:8,TOOLBAR_LINE_HEIGHT:20,SEARCH_WIDTH:220,SEARCH_BASIS:160,SEARCH_MIN_WIDTH:120,SEARCH_SPACE:8,VIEW_SWITCH_WIDTH:130,VIEW_SWITCH_HEIGHT:24,VIEW_SWITCH_ROUND:5,VIEW_SWITCH_INSET:2,FOOTER_HEIGHT:46,BUTTON_HEIGHT:28,ICON_BUTTON:24,CLOSE_BUTTON:26,SURE_TIME:5e3,NARROW_PAGE:600},JsonEditor.PLAIN_KEY="(value)",JsonEditor.NAME_KEY="(name)",JsonEditor.VALUE_KEY="(data)",JsonEditor.TYPES=["","text","number","flag","color","picture"],JsonEditor.CHECKER="repeating-conic-gradient(#BBBBBB 0% 25%, #FFFFFF 0% 50%) 0 0 / 6px 6px",JsonEditor.nextRowId=1,JsonEditor.rootValueOf=function(t){if(Array.isArray(t)||JsonEditor.isPlain(t))return t;if("string"!=typeof t)return[];const e=JsonEditor.jsonOrText(t);return Array.isArray(e)||JsonEditor.isPlain(e)?e:[]},JsonEditor.isPlain=function(t){if(!t||"object"!=typeof t||Array.isArray(t))return!1;const e=Object.getPrototypeOf(t);return null===e||null===Object.getPrototypeOf(e)},JsonEditor.isOtherObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&!JsonEditor.isPlain(t)},JsonEditor.isNestedValue=function(t){return!(Array.isArray(t)&&t.every(function(t){return"number"==typeof t})&&t.length&&t.length<=4)&&(Array.isArray(t)||JsonEditor.isPlain(t))},JsonEditor.newRow=function(t,e){return{id:JsonEditor.nextRowId++,shape:t,cells:e}},JsonEditor.rowsOfList=function(t){return t.map(function(t){if(JsonEditor.isPlain(t))return JsonEditor.newRow("object",Object.assign({},t));if(Array.isArray(t)){const e={};return t.forEach(function(t,n){e[n]=t}),JsonEditor.newRow("array",e)}const e={};return e[JsonEditor.PLAIN_KEY]=t,JsonEditor.newRow("plain",e)})},JsonEditor.newColumn=function(t,e){const n={key:t,width:JsonEditor.SIZES.MIN_COLUMN,note:"",options:null,chosenKind:""};return e?(n.note=e.note||"",Array.isArray(e.options)&&e.options.length&&(n.options=e.options.slice()),e.kind&&(n.chosenKind=e.kind),n):n},JsonEditor.columnsOfRows=function(t,e){const n=[],o=function(t){n.some(function(e){return e.key===t})||n.push(JsonEditor.newColumn(t,function(t){return e.find(function(e){return e.key===t})}(t)))};return t.some(function(t){return"plain"===t.shape})&&o(JsonEditor.PLAIN_KEY),t.forEach(function(t){"array"===t.shape&&Object.keys(t.cells).forEach(o)}),t.forEach(function(t){"object"===t.shape&&Object.keys(t.cells).forEach(o)}),n.length||e.forEach(function(t){o(t.key)}),n.length||o(JsonEditor.PLAIN_KEY),n},JsonEditor.levelOf=function(t,e){if(Array.isArray(t)){const n=JsonEditor.rowsOfList(t);return{isObject:!1,rows:n,columns:JsonEditor.columnsOfRows(n,e||[])}}return{isObject:!0,rows:Object.keys(t).map(function(e){const n={};return n[JsonEditor.NAME_KEY]=e,n[JsonEditor.VALUE_KEY]=t[e],JsonEditor.newRow("pair",n)}),columns:[JsonEditor.newColumn(JsonEditor.NAME_KEY),JsonEditor.newColumn(JsonEditor.VALUE_KEY)]}},JsonEditor.valueOfRow=function(t,e){const n=JsonEditor.PLAIN_KEY;if("array"===t.shape){const n=e.filter(function(t){return/^\d+$/.test(t.key)}).map(function(e){return t.cells[e.key]});for(;n.length&&void 0===n[n.length-1];)n.pop();return n.map(function(t){return void 0===t?null:t})}const o=e.filter(function(e){return e.key!==n&&void 0!==t.cells[e.key]}),r=t.cells[n];if(!o.length&&void 0!==r)return r;if(!o.length&&"plain"===t.shape)return"";const i={};return void 0!==r&&(i.value=r),o.forEach(function(e){i[e.key]=t.cells[e.key]}),Object.keys(t.cells).forEach(function(e){e!==n&&!(e in i)&&"function"==typeof t.cells[e]&&(i[e]=t.cells[e])}),i},JsonEditor.valueOfLevel=function(t,e){const n=function(t){if(!e||t.id!==e.rowId)return t.cells;const n=Object.assign({},t.cells);return n[e.columnKey]=e.value,n};if(!t.isObject)return t.rows.map(function(e){return JsonEditor.valueOfRow({shape:e.shape,cells:n(e)},t.columns)});const o={};return t.rows.forEach(function(t){const e=n(t),r=String(e[JsonEditor.NAME_KEY]??"").trim();if(""===r)throw JsonEditor.tableError("noName","");if(Object.prototype.hasOwnProperty.call(o,r))throw JsonEditor.tableError("sameName",r);const i=e[JsonEditor.VALUE_KEY];o[r]=void 0===i?"":i}),o},JsonEditor.tableError=function(t,e){const n=new Error(t);return n.textKey=t,n.valueName=e,n},JsonEditor.textOfValue=function(t){if(void 0===t||"function"==typeof t)return"";if("string"==typeof t)return t;if(JsonEditor.isOtherObject(t))return"["+(t.constructor&&t.constructor.name||"object")+"]";try{return JSON.stringify(t)}catch(e){return String(t)}},JsonEditor.countTextOf=function(t){return Array.isArray(t)?"[ "+t.length+" ]":"{ "+Object.keys(t).length+" }"},JsonEditor.shortPicture=function(t,e){if(!/^data:/i.test(t))return t;const n=(t.match(/^data:([^;,]+)/i)||[])[1]||"data",o=Math.round(t.length/1024*10)/10;return JsonEditor.fillText(e,{kind:n,size:o})},JsonEditor.pictureAddress=function(t,e){const n=String(t??"").trim();if(/^<svg\b/i.test(n))return"data:image/svg+xml;utf8,"+encodeURIComponent(n);if(!n||!e)return n;try{return new URL(n,e).href}catch(t){return n}},JsonEditor.compareValues=function(t,e){const n=null==t||""===t,o=null==e||""===e;return n||o?(n?1:0)-(o?1:0):"number"==typeof t&&"number"==typeof e?t-e:JsonEditor.textOfValue(t).localeCompare(JsonEditor.textOfValue(e),void 0,{numeric:!0,sensitivity:"base"})},JsonEditor.readPastedText=function(t){const e=String(t).trim();if(/^[[{]/.test(e)){const t=JsonEditor.jsonOrText(e);if(Array.isArray(t))return{list:t};if(JsonEditor.isPlain(t))return{list:[t]}}const n=-1!==e.indexOf("\t"),o=-1!==e.indexOf("\n");return n||o?{grid:e.split(/\r?\n/).map(function(t){return t.split("\t")})}:null},JsonEditor.jsonOrText=function(t){try{return JSON.parse(t)}catch(e){return t}},JsonEditor.numberOfText=function(t){const e=String(t).trim();return""===e||isNaN(Number(e))?null:Number(e)},JsonEditor.optionValues=function(t,e){const n=t.slice();return("string"==typeof e&&""!==e||"number"==typeof e)&&-1===n.indexOf(e)&&n.unshift(e),n},JsonEditor.COLOR_TEXT=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\(.*\)|var\(--.*\)|color-mix\(.*\))$/i,JsonEditor.COLOR_KEY=/(^|[a-z_])colou?r$/i,JsonEditor.PICTURE_TEXT=/^(data:image\/|<svg\b)|\.(png|jpe?g|gif|svg|webp|avif|ico)(\?.*)?$/i,JsonEditor.PICTURE_KEY=/(^|[a-z_])(file|src|image|picture|photo|avatar|thumbnail|logo)$/i,JsonEditor.FLAG_START=/^(is|has|can|use|show|allow|must|auto|enable|hide|keep|need)[A-Z_]/,JsonEditor.NUMBER_END=/(time|delay|duration|size|gap|count|round|opacity|index|step|length|width|height)$/i,JsonEditor.FLAG_KEYS=["enabled","disabled","active","visible","hidden","selected","checked","done","opened","required","editable","removable","animated","bold","italic","published","featured","paid","inStock","available"],JsonEditor.isOnOffValue=function(t){return 0===t||1===t||!0===t||!1===t||null==t},JsonEditor.isFlagName=function(t){return-1!==JsonEditor.FLAG_KEYS.indexOf(t)||!JsonEditor.NUMBER_END.test(t)&&JsonEditor.FLAG_START.test(t)},JsonEditor.isCssColor=function(t){return!(!window.CSS||!CSS.supports("color",t))},JsonEditor.kindOfNamedValue=function(t,e){if("function"==typeof e)return"function";const n="string"==typeof e?e.trim():"",o=null==e||""===e,r="number"==typeof e||"boolean"==typeof e;return JsonEditor.COLOR_TEXT.test(n)||JsonEditor.COLOR_KEY.test(t)&&(o||JsonEditor.isCssColor(n))?"color":JsonEditor.PICTURE_TEXT.test(n)||JsonEditor.PICTURE_KEY.test(t)&&!r?"picture":"boolean"==typeof e||JsonEditor.isFlagName(t)&&JsonEditor.isOnOffValue(e)?"flag":"number"==typeof e?"number":"string"==typeof e?"text":"any"},JsonEditor.isOwnKey=function(t){return t===JsonEditor.PLAIN_KEY||t===JsonEditor.NAME_KEY||t===JsonEditor.VALUE_KEY||/^\d+$/.test(t)},JsonEditor.kindOfColumnValues=function(t,e){const n=JsonEditor.isOwnKey(t)?"":t,o=e.find(function(t){return null!=t}),r=function(t){return e.length>0&&e.every(t)};if(r(function(t){return"boolean"==typeof t}))return"flag";const i=JsonEditor.kindOfNamedValue(n,o);return"color"===i||"picture"===i||"function"===i?i:"flag"===i&&r(JsonEditor.isOnOffValue)?"flag":r(function(t){return"number"==typeof t})?"number":e.length?"text":JsonEditor.isFlagName(n)?"flag":"auto"},JsonEditor.keepFunctions=function(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.map(function(t,n){return JsonEditor.keepFunctions(t,JsonEditor.sameRowOf(t,e,n))});if(!JsonEditor.isPlain(t)||!JsonEditor.isPlain(e))return t;const n={};return Object.keys(t).forEach(function(o){n[o]=JsonEditor.keepFunctions(t[o],e[o])}),Object.keys(e).forEach(function(t){"function"!=typeof e[t]||t in n||(n[t]=e[t])}),n},JsonEditor.ROW_ID_KEYS=["key","id","value","text","title"],JsonEditor.sameRowOf=function(t,e,n){if(!JsonEditor.isPlain(t))return e[n];const o=JsonEditor.ROW_ID_KEYS.find(function(e){return void 0!==t[e]});if(!o)return e[n];const r=e.find(function(e){return JsonEditor.isPlain(e)&&e[o]===t[o]});return void 0!==r?r:e[n]},JsonEditor.fillText=function(t,e={}){return String(t).replace(/\{(\w+)\}/g,function(t,n){return void 0===e[n]?t:String(e[n])})},JsonEditor.spanOf=function(t){return'<span style="margin-left:6px">'+basic.escapeHtml(t)+"</span>"},JsonEditor.ICONS={chevron:"M4.5 6.5L8 10l3.5-3.5",table:"M2 3h12v10H2zM2 6.5h12M2 10h12M6.5 3v10",back:"M5 3.5L2 6.5l3 3M2 6.5h7.5a3.5 3.5 0 0 1 0 7H7",forward:"M11 3.5l3 3-3 3M14 6.5H6.5a3.5 3.5 0 0 0 0 7H9",close:"M4 4l8 8M12 4l-8 8",plus:"M8 3v10M3 8h10",trash:"M3 4.5h10M6.5 4.5V3h3v1.5M4.5 4.5l.7 8.5h5.6l.7-8.5",copy:"M5.5 5.5h8v8h-8zM2.5 10.5v-8h8",up:"M8 13V3M4 7l4-4 4 4",down:"M8 3v10M4 9l4 4 4-4",dots:"M6 3.5v.01M10 3.5v.01M6 8v.01M10 8v.01M6 12.5v.01M10 12.5v.01"},JsonEditor.iconOf=function(t,e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+e+'" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" style="display:block"><path d="'+JsonEditor.ICONS[t]+'"/></svg>'},JsonEditor.looksOf=function(t){const e=t.colors;return{button:{color:e.field,hoverColor:e.fieldHover,lineColor:e.fieldLine,hoverLineColor:e.fieldLineHover,textColor:e.text,ringColor:e.focus,fontSize:t.fontSize},accent:{color:e.accent,hoverColor:e.accentHover,lineColor:"",hoverLineColor:"",textColor:e.onAccent,ringColor:e.focus,fontSize:t.fontSize},icon:{color:"transparent",hoverColor:e.hover,textColor:e.icon,ringColor:e.focus}}},JsonEditor.textButton=function(t,e,n){const o=Label({text:t,height:JsonEditor.SIZES.BUTTON_HEIGHT,fontSize:e.fontSize,textColor:e.textColor,color:e.color,round:5,clickable:1,cursor:"pointer"});return o.shrink=0,o.css={padding:"0px 10px",display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",transition:"background-color 0.12s"},o.role="button",o.tabIndex=0,o.setFocusRing(e.ringColor),e.lineColor&&o.props({border:1,borderColor:e.lineColor}),o.onHoverChange(function(t,n){o.color=n?e.hoverColor:e.color,e.lineColor&&(o.borderColor=n?e.hoverLineColor:e.lineColor)}),o.on("click",function(){n(o)}),o.on("keydown",function(t,e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n(o))}),o},JsonEditor.iconButton=function(t,e,n,o,r=JsonEditor.SIZES.ICON_BUTTON){let i=!0;const l=Label({text:JsonEditor.iconOf(t,JsonEditor.SIZES.ICON),width:r,height:r,color:n.color,textColor:n.textColor,round:6,clickable:1,cursor:"pointer",lineHeight:"0"});l.shrink=0,l.css={display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.12s, opacity 0.12s"},l.role="button",l.aria={label:e},l.elem.title=e,l.setFocusRing(n.ringColor);const s=function(t){l.color=t&&i?n.hoverColor:n.color,l.opacity=i?1:.35,l.cursor=i?"pointer":"default",l.tabIndex=i?0:-1,l.aria={disabled:!i}},c=function(){i&&o(l)};return l.setEnabled=function(t){i=!!t,s(!1)},l.onHoverChange(function(t,e){s(e)}),l.on("click",c),l.on("keydown",function(t,e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),c())}),s(!1),l},JsonEditor.hexOfColor=function(t){const e=document.createElement("canvas").getContext("2d");e.fillStyle="#000000",e.fillStyle=String(t??"").trim();const n=e.fillStyle;if("#"===n.charAt(0))return n;return"#"+(n.match(/[\d.]+/g)||[]).slice(0,3).map(function(t){return Number(t).toString(16).padStart(2,"0")}).join("")},JsonEditor.openPicker=function(t){try{if(t.showPicker)return void t.showPicker()}catch(t){}t.click()},JsonEditor.copyText=function(t){return navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(t).catch(function(){return JsonEditor.copyTextOldWay(t)}):JsonEditor.copyTextOldWay(t)},JsonEditor.copyTextOldWay=function(t){const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select();const n=document.execCommand("copy");return e.remove(),n?Promise.resolve():Promise.reject(new Error("The browser did not copy it."))},JsonEditor.open=function(t={}){const e=Object.assign({},t),n=e.onApply||function(t){},o=e.onCancel||function(){},r=e.onClose||function(){},i=e.onChange||function(t,e){};delete e.onApply,delete e.onCancel,delete e.onClose;const l=document.activeElement;let s=null,c=null,u=0,a=null;const d=createIn(page,function(){const t=startBox(0,0,"100%","100%",{color:"transparent"});return t.clickable=1,s=JsonEditor(Object.assign(e,{showTitleBar:1,onChange:function(t,e){w(),i(t,e)}})),endBox(),t}),f=s.style.window,p=JsonEditor.looksOf(s.style),h=s.texts,E=function(){const t=page.width<JsonEditor.SIZES.NARROW_PAGE?f.narrowMargin:f.margin;s.left=t,s.top=t,s.width="calc(100% - "+2*t+"px)",s.height="calc(100% - "+2*t+"px)"},m=function(){d._isRemoved||(d.remove(),l&&l.focus&&l.isConnected&&l.focus({preventScroll:!0}),r())},x=function(){const t=s.getValue();if(null===t)return;const e=s.hasChanges();m(),e&&n(t)},g=function(){if(!s.hasChanges()||u)return m(),void o();u=1,c.text=basic.escapeHtml(h.discard),a&&a(),a=d.after(JsonEditor.SIZES.SURE_TIME,w)},w=function(){u=0,c&&(c.text=basic.escapeHtml(h.cancel))};return d.color=f.coverColor,d.zIndex=basic.zIndexAbove(l,f.zIndex),d.role="dialog",d.aria={label:s.titleText||h.table,modal:!0},s.boxShadow=f.shadow,E(),createIn(s.titleRow,function(){JsonEditor.iconButton("close",h.close+" (Escape)",p.icon,g,JsonEditor.SIZES.CLOSE_BUTTON)}),createIn(s.footer,function(){c=JsonEditor.textButton(basic.escapeHtml(h.cancel),p.button,g),c.css={marginLeft:"auto"};JsonEditor.textButton(basic.escapeHtml(h.apply),p.accent,x).elem.title=h.apply+" (Cmd/Ctrl+Enter)"}),d.onPageResize(E),d.listenTo(document,"keydown",function(t,e){if(e.defaultPrevented)return;const n=e.metaKey||e.ctrlKey;if("Enter"===e.key&&n)return e.preventDefault(),void x();"Escape"===e.key&&(e.preventDefault(),g())}),d.editor=s,d.close=m,s.focus(),d},JsonEditor.styles={light:JsonEditorDefaults.style,dark:{box:{color:"#262626",border:1,borderColor:"#444444",round:10},colors:{text:"#FFFFFF",headText:"#FFFFFF",soft:"#A5A5A5",dim:"#6E6E6E",icon:"#C8C8C8",line:"#444444",rowLine:"#444444",columnLine:"#444444",headLine:"#4D4D4D",strongLine:"#5C5C5C",ground:"#262626",head:"#262626",field:"#383838",fieldHover:"#434343",hover:"#383838",selected:"#34435A",segment:"#2C2C2C",accent:"#0C8CE9",accentHover:"#3AA0F0",accentText:"#7CC4F8",onAccent:"#FFFFFF",focus:"#0C8CE9",editor:"#1E1E1E",swatchLine:"rgba(255, 255, 255, 0.25)",thumb:"#8A8A8A",scrollBar:"rgba(255, 255, 255, 0.22)",scrollBarHover:"rgba(255, 255, 255, 0.35)",placeholder:"rgba(255, 255, 255, 0.35)"},popupShadow:"0 6px 18px rgba(0, 0, 0, 0.45)",searchStyleName:"ozdenDark",search:{color:"#383838"},menuStyleName:"dark",window:{coverColor:"rgba(0, 0, 0, 0.55)",shadow:"0 20px 60px rgba(0, 0, 0, 0.6)"}}},JsonEditor.createMinimalStyle=function(t){return{box:{color:t.ground,border:1,borderColor:t.line,round:4},colors:{text:t.text,headText:t.softText,soft:t.softText,dim:t.faintText,icon:t.softText,line:t.line,rowLine:t.track,columnLine:"transparent",headLine:t.line,strongLine:t.edge,ground:t.ground,head:t.ground,field:"transparent",fieldHover:"transparent",fieldLine:t.line,fieldLineHover:t.lineHover,hover:t.hover,selected:t.selected,segment:t.ground,accent:t.ink,accentHover:t.inkHover,accentText:t.ink,onAccent:t.onInk,focus:t.focus,editor:t.ground,swatchLine:t.line,thumb:"#8A8A8A",scrollBar:t.scrollBar,scrollBarHover:t.scrollBarHover,placeholder:t.faintText},fontSize:13,headFontSize:12,rowHeight:28,headHeight:30,popupShadow:"none",searchStyleName:t.minimalName,search:{height:28,fontSize:13,searchIconSize:14,searchIconLeft:10,searchIconGap:6,clearIconRight:8,round:14,color:"transparent",border:1,borderBottomStyle:"1px solid "+t.edge,textOffsetY:0,clearIconOffsetY:0},menuStyleName:t.minimalName,window:{coverColor:t.cover,shadow:"none"}}},JsonEditor.MINIMAL_COLORS={ground:"#FFFFFF",text:Black(.85),softText:Black(.55),faintText:Black(.54),line:Black(.2),lineHover:Black(.45),edge:Black(.45),track:Black(.08),hover:"#F7F7F7",selected:"#F0F0F0",ink:"#1F1F1F",inkHover:"#3A3A3A",onInk:"#FFFFFF",focus:"#3D8BD9",scrollBar:Black(.2),scrollBarHover:Black(.35),cover:Black(.3),minimalName:"minimal"},JsonEditor.styles.minimal=JsonEditor.createMinimalStyle(JsonEditor.MINIMAL_COLORS),JsonEditor.MINIMAL_DARK_COLORS={ground:"#1A1A19",text:White(.88),softText:White(.55),faintText:White(.48),line:White(.18),lineHover:White(.42),edge:White(.42),track:White(.08),hover:"#232322",selected:"#2C2C2B",ink:"#EDEDEB",inkHover:"#FFFFFF",onInk:"#1A1A19",focus:"#7FB6DE",scrollBar:White(.22),scrollBarHover:White(.35),cover:Black(.6),minimalName:"minimalDark"},JsonEditor.styles.minimalDark=JsonEditor.createMinimalStyle(JsonEditor.MINIMAL_DARK_COLORS);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* Bismillah */
|
|
2
|
+
"use strict";const JsonViewDefaults={key:"0",left:0,top:0,width:"100%",height:"100%",value:null,expandLevel:1,pageSize:100,emptyText:"No value",copyValueText:"Copy value",copyPathText:"Copy path",useScrollBar:1,ariaLabel:"JSON",onSelect:function(e,t){},onCopy:function(e,t){},styleName:"light",style:{box:{color:"white"},fontFamily:'ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',kinds:{key:"#2467B8",index:Black(.45),string:"#1F7A3D",number:"#A85A00",boolean:"#8A2F8E",null:"#7A7F87",object:Black(.45),array:Black(.45),page:Black(.5)},tree:{box:{color:"transparent",padding:[6,6]},row:{height:26,fontSize:13,textColor:Black(.8),indent:16,gap:8},rowHover:{color:Black(.05)},rowSelected:{color:Black(.09),textColor:"#141414"},rowFocus:{outlineColor:"rgba(63, 141, 148, 0.8)"},arrow:{color:Black(.45)},note:{fontSize:13},empty:{textColor:Black(.45),fontSize:14}},error:{textColor:"#C0392B"},menuStyleName:"light",menu:{item:{height:30,fontSize:13}},menuMinWidth:150}},JsonView=function(e={}){const t=e.style;basic.applyStylePackage(e,JsonView.styles,JsonViewDefaults),mergeIntoIfMissing(e,JsonViewDefaults);const n="auto"===String(e.height),o=startObject(e);let r=o.style;const i=new Set;let a=1,l=[];o.errorText="";const s=function(e,t,n){const o="object"===n?Object.keys(e):null;return{key:JsonView.pathText(t),value:e,path:t,names:o,count:o?o.length:e.length}},u=function(e,t,n,o){const a=e.key+"<"+t+"-"+n+">",l={key:a,text:"["+t+" … "+(n-1)+"]",textColor:r.kinds.page,hasChildren:1,data:{kind:"page",path:e.path,owner:e,from:t,to:n}};return i.has(a)&&(l.expanded=1,l.children=f(e,t,n,o+1)),l},c=function(e,t,n){const l=JsonView.kindOf(e),u=t.length>0?t[t.length-1]:"",c={key:JsonView.pathText(t),text:String(u),textColor:"number"==typeof u?r.kinds.index:r.kinds.key,description:JsonView.valueText(e,l),descriptionColor:r.kinds[l],data:{kind:l,path:t,value:e}};if("object"!==l&&"array"!==l)return c;const d=s(e,t,l);return c.data.owner=d,0===d.count||(c.hasChildren=1,function(e,t){const n=a?t<o.expandLevel:i.has(e);return n&&i.add(e),n}(c.key,n)&&(c.expanded=1,c.children=f(d,0,d.count,n+1))),c},f=function(e,t,n,r){const i=[],a=JsonView.pageStep(n-t,o.pageSize);if(a>1){for(let o=t;o<n;o+=a)i.push(u(e,o,Math.min(o+a,n),r));return i}for(let o=t;o<n;o++){const t=e.names?e.names[o]:o;i.push(c(e.value[t],e.path.concat([t]),r))}return i},d=function(){const e=JsonView.kindOf(o.value);if("null"===e)return[];if("object"!==e&&"array"!==e)return[c(o.value,[],0)];const t=s(o.value,[],e);return 0===t.count?[c(o.value,[],0)]:f(t,0,t.count,0)},p=function(e,t){const n=t.data,o="page"===n.kind?n.from:0,r="page"===n.kind?n.to:n.owner.count;e.setChildren(t.key,f(n.owner,o,r,0))},y=function(e,t){1==t.expanded?i.add(t.key):i.delete(t.key)},h=function(e,t){o.onSelect(o,function(e){const t=e.data,n="object"!==t.kind&&"array"!==t.kind&&"page"!==t.kind;return{key:e.key,label:e.text,kind:t.kind,path:t.path,pathText:JsonView.pathText(t.path),value:n?t.value:null}}(t))},m=function(e){const t=o.tree.getSelectedNode();var n;t&&(n="path"===e?JsonView.pathText(t.data.path):JsonView.textToCopy(o.getSelectedValue()),JsonView.copyToClipboard(n).then(function(){o.isRemoved||o.onCopy(o,n)}).catch(function(e){console.warn("JsonView: It could not be copied. "+e)}))},g=function(e,t){!t.ctrlKey&&!t.metaKey||t.shiftKey||"c"!==t.key.toLowerCase()||(t.preventDefault(),m("value"))},w=function(e,t){const n=o.tree.getNodeOfEvent(t);o.menu.setEnabled(n?1:0),n&&o.tree.setValue(n.key)},x=function(e,t){createIn(o,function(){o.tree=TreeView({left:0,top:0,width:"100%",height:n?"auto":"100%",position:n?"relative":"absolute",items:e,value:t,emptyText:o.emptyText,useScrollBar:o.useScrollBar,ariaLabel:o.ariaLabel,styleName:"light",style:r.tree,onSelect:h,onToggle:y,onLoadChildren:p})}),o.tree.elem.classList.add("json-view-tree"),o.tree.elem.style.setProperty("--json-view-font",r.fontFamily),o.tree.listArea.on("keydown",g),o.menu="undefined"==typeof ContextMenu?null:ContextMenu({items:[{key:"value",text:o.copyValueText},{key:"path",text:o.copyPathText}],styleName:r.menuStyleName,style:r.menu,minWidth:r.menuMinWidth,ariaLabel:o.ariaLabel,onClick:function(e,t){m(t.key)}}),o.menu&&(o.tree.listArea.on("contextmenu",w,!0),o.menu.attachTo(o.tree.listArea))},k=function(){o.tree.setEmptyText(o.errorText||o.emptyText),o.tree.lblEmpty.textColor=o.errorText?r.error.textColor:r.tree.empty.textColor},v=function(){i.clear(),a=1;const e=d();a=0,l=e.map(function(e){return e.key}),o.tree.setItems(e,null),k()},T=function(e,t){let n=e,r=null;const i=function(e){return"page"===e.data.kind&&e.data.from<=t&&t<e.data.to};for(r=n.find(i);r;r=n.find(i))o.tree.expand(r.key),n=o.tree.getNode(r.key).children||[]},V=function(e){return null!==e?o.tree.getNode(e).children||[]:l.map(function(e){return o.tree.getNode(e)})};o.setValue=function(e){o.value=void 0===e?null:e,o.errorText="",v()},o.getValue=function(){return o.value},o.setJsonText=function(e){try{return o.setValue(JSON.parse(e)),1}catch(e){return o.setValue(null),o.errorText=e.message,k(),0}},o.getSelectedPath=function(){const e=o.tree.getSelectedNode();return e?e.data.path:null},o.getSelectedPathText=function(){const e=o.getSelectedPath();return e?JsonView.pathText(e):""},o.getSelectedValue=function(){const e=o.tree.getSelectedNode();if(e)return"page"===e.data.kind?JsonView.pageValue(e.data):JsonView.valueAt(o.value,e.data.path)},o.selectPath=function(e){let t=o.value;for(let n=0;n<e.length;n++){if(null===t||"object"!=typeof t)return;const r=0===n?null:JsonView.pathText(e.slice(0,n));null!==r&&o.tree.expand(r);const i=Array.isArray(t)?e[n]:Object.keys(t).indexOf(String(e[n]));T(V(r),i),t=t[e[n]]}o.tree.setValue(JsonView.pathText(e),1)},o.expandAll=function(){let e=0;const t=function(n,r){n.forEach(function(n){e++,e>JsonView.MAX_ROWS_OF_EXPAND_ALL||r>=JsonView.MAX_DEPTH_OF_EXPAND_ALL||!n.hasChildren||(o.tree.expand(n.key),t(o.tree.getNode(n.key).children||[],r+1))})};t(V(null),0)},o.collapseAll=function(){o.tree.collapseAll()},o.setTheme=function(e){const n=o.tree.value,i=o.tree.listArea.elem.scrollTop;o.styleName=e,r=function(e){const n={styleName:e,style:t};return basic.applyStylePackage(n,JsonView.styles,JsonViewDefaults),mergeIntoIfMissing(n,JsonViewDefaults),n.style}(e),o.style=r,o.props(r.box),o.menu&&o.menu.remove(),o.tree.remove(),x(d(),n),k(),o.tree.listArea.elem.scrollTop=i};const b=o.remove;return o.superRemove=b,o.remove=function(){o.isRemoved||(o.menu&&o.menu.remove(),b.call(o))},basic.addCss("json-view",".json-view-tree .basic_label { font-family: var(--json-view-font); }"),o.props(r.box),n&&(o.css.position="relative"),x([],null),v(),endObject(o)};JsonView.MAX_LETTERS_OF_TEXT=300,JsonView.MAX_ROWS_OF_EXPAND_ALL=3e3,JsonView.MAX_DEPTH_OF_EXPAND_ALL=20,JsonView.IDENTIFIER=/^[A-Za-z_$][\w$]*$/,JsonView.kindOf=function(e){if(null==e)return"null";if(Array.isArray(e))return"array";if(e instanceof Date)return"string";const t=typeof e;return"bigint"===t?"number":"string"===t||"number"===t||"boolean"===t||"object"===t?t:"null"},JsonView.valueText=function(e,t){if("array"===t)return"["+e.length+"]";if("object"===t)return"{"+Object.keys(e).length+"}";if(e instanceof Date)return JSON.stringify(e);if("string"!=typeof e)return String(e);return e.length>JsonView.MAX_LETTERS_OF_TEXT?JSON.stringify(e.slice(0,JsonView.MAX_LETTERS_OF_TEXT))+" …":JSON.stringify(e)},JsonView.pathText=function(e){return 0===e.length?"$":e.map(function(e,t){return"number"==typeof e?"["+e+"]":JsonView.IDENTIFIER.test(e)?0===t?e:"."+e:"["+JSON.stringify(e)+"]"}).join("")},JsonView.valueAt=function(e,t){return t.reduce(function(e,t){return e[t]},e)},JsonView.pageStep=function(e,t){if(e<=t)return 1;let n=t;for(;e/n>t;)n*=t;return n},JsonView.pageValue=function(e){const t=e.owner;if(!t.names)return t.value.slice(e.from,e.to);const n={};return t.names.slice(e.from,e.to).forEach(function(e){n[e]=t.value[e]}),n},JsonView.textToCopy=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e,null,2)}catch(t){return String(e)}},JsonView.copyToClipboard=function(e){if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(e);const t=document.createElement("textarea");t.value=e,t.style.cssText="position: fixed; left: -9999px; top: 0;",document.body.appendChild(t),t.select();const n=document.execCommand("copy");return t.remove(),n?Promise.resolve():Promise.reject(new Error("The browser refused it."))},JsonView.styles={light:JsonViewDefaults.style,dark:{box:{color:"#1C1C1B"},kinds:{key:"#8CC4EE",index:White(.5),string:"#8FD694",number:"#F0B56A",boolean:"#D7A2E8",null:"#8D939B",object:White(.5),array:White(.5),page:White(.55)},tree:{row:{textColor:White(.85)},rowHover:{color:White(.06)},rowSelected:{color:White(.12),textColor:"#FFFFFF"},rowFocus:{outlineColor:"rgba(111, 198, 205, 0.8)"},arrow:{color:White(.5)},empty:{textColor:White(.5)},scrollBar:{bar_color:"#8A8A88",bar_mouseOverColor:"#BFBFBD"}},error:{textColor:"#FF9F93"},menuStyleName:"dark"}};
|