create-basicjs 0.1.3 → 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.
Files changed (559) hide show
  1. package/README.md +2 -2
  2. package/bin/create-basicjs.js +31 -4
  3. package/bin/verify-package.js +1 -1
  4. package/package.json +2 -2
  5. package/payload/starter/AGENTS.md +11 -6
  6. package/payload/starter/README.md +1 -1
  7. package/payload/starter/_basic/VERSION +1 -1
  8. package/payload/starter/_basic/assets/cards/almond-blossom.png +0 -0
  9. package/payload/starter/_basic/assets/cards/blackberry.png +0 -0
  10. package/payload/starter/_basic/assets/cards/borage.png +0 -0
  11. package/payload/starter/_basic/assets/cards/chamomile.png +0 -0
  12. package/payload/starter/_basic/assets/cards/dill.png +0 -0
  13. package/payload/starter/_basic/assets/cards/eucalyptus.png +0 -0
  14. package/payload/starter/_basic/assets/cards/fennel.png +0 -0
  15. package/payload/starter/_basic/assets/cards/fig.png +0 -0
  16. package/payload/starter/_basic/assets/cards/juniper.png +0 -0
  17. package/payload/starter/_basic/assets/cards/lavender.png +0 -0
  18. package/payload/starter/_basic/assets/cards/lemon.png +0 -0
  19. package/payload/starter/_basic/assets/cards/olives.png +0 -0
  20. package/payload/starter/_basic/assets/cards/oregano.png +0 -0
  21. package/payload/starter/_basic/assets/cards/pepper.png +0 -0
  22. package/payload/starter/_basic/assets/cards/physalis.png +0 -0
  23. package/payload/starter/_basic/assets/cards/pomegranate.png +0 -0
  24. package/payload/starter/_basic/assets/cards/poppy.png +0 -0
  25. package/payload/starter/_basic/assets/cards/rosehip.png +0 -0
  26. package/payload/starter/_basic/assets/cards/saffron.png +0 -0
  27. package/payload/starter/_basic/assets/categories/cappuccino.png +0 -0
  28. package/payload/starter/_basic/assets/categories/chocolate-milk.png +0 -0
  29. package/payload/starter/_basic/assets/categories/coffee.png +0 -0
  30. package/payload/starter/_basic/assets/categories/frappe.png +0 -0
  31. package/payload/starter/_basic/assets/categories/iced-caffee.png +0 -0
  32. package/payload/starter/_basic/assets/categories/milkshake.png +0 -0
  33. package/payload/starter/_basic/assets/categories/orange-juice.png +0 -0
  34. package/payload/starter/_basic/assets/categories/tea.png +0 -0
  35. package/payload/starter/_basic/assets/fruids/brokoli.png +0 -0
  36. package/payload/starter/_basic/assets/fruids/cilek.png +0 -0
  37. package/payload/starter/_basic/assets/fruids/domates.png +0 -0
  38. package/payload/starter/_basic/assets/fruids/elma.png +0 -0
  39. package/payload/starter/_basic/assets/fruids/havuc.png +0 -0
  40. package/payload/starter/_basic/assets/fruids/karpuz.png +0 -0
  41. package/payload/starter/_basic/assets/fruids/limon.png +0 -0
  42. package/payload/starter/_basic/assets/fruids/muz.png +0 -0
  43. package/payload/starter/_basic/assets/fruids/nar.png +0 -0
  44. package/payload/starter/_basic/assets/fruids/patlican.png +0 -0
  45. package/payload/starter/_basic/assets/fruids/yabanmersini.png +0 -0
  46. package/payload/starter/_basic/assets/fruids/yesilbiber.png +0 -0
  47. package/payload/starter/_basic/basic/LICENSE +1 -1
  48. package/payload/starter/_basic/basic/basic.css +3 -6
  49. package/payload/starter/_basic/basic/basic.js +154 -60
  50. package/payload/starter/_basic/basic/basic.min.js +19 -6
  51. package/payload/starter/_basic/basic/scroll-bar.js +4 -2
  52. package/payload/starter/_basic/basic/scroll-bar.min.js +1 -0
  53. package/payload/starter/_basic/comp/accordion.js +659 -0
  54. package/payload/starter/_basic/comp/action-button.js +22 -23
  55. package/payload/starter/_basic/comp/action-tab-bar.js +8 -8
  56. package/payload/starter/_basic/comp/app-bar.js +12 -11
  57. package/payload/starter/_basic/comp/{badge-v2.js → badge.js} +51 -5
  58. package/payload/starter/_basic/comp/bottom-bar.js +31 -23
  59. package/payload/starter/_basic/comp/breadcrumbs.js +4 -2
  60. package/payload/starter/_basic/comp/canvas.js +652 -0
  61. package/payload/starter/_basic/comp/chat-view.js +827 -0
  62. package/payload/starter/_basic/comp/check-box.js +137 -21
  63. package/payload/starter/_basic/comp/code-editor.js +953 -0
  64. package/payload/starter/_basic/comp/{select-color.js → color-picker.js} +62 -29
  65. package/payload/starter/_basic/comp/context-menu.js +342 -30
  66. package/payload/starter/_basic/comp/{currency-input-b.js → currency-field.js} +48 -29
  67. package/payload/starter/_basic/comp/data-table.js +114 -42
  68. package/payload/starter/_basic/comp/{select-date.js → date-picker.js} +104 -52
  69. package/payload/starter/_basic/comp/dialog.js +214 -76
  70. package/payload/starter/_basic/comp/email-field.js +65 -0
  71. package/payload/starter/_basic/comp/{select-file.js → file-picker.js} +245 -57
  72. package/payload/starter/_basic/comp/filters.js +374 -60
  73. package/payload/starter/_basic/comp/form.js +38 -26
  74. package/payload/starter/_basic/comp/full-screen-select.js +36 -33
  75. package/payload/starter/_basic/comp/gauge.js +12 -8
  76. package/payload/starter/_basic/comp/graph-box.js +3911 -0
  77. package/payload/starter/_basic/comp/grid-group.js +185 -0
  78. package/payload/starter/_basic/comp/hold-to-confirm-button.js +16 -7
  79. package/payload/starter/_basic/comp/image-view.js +598 -0
  80. package/payload/starter/_basic/comp/item-list.js +507 -163
  81. package/payload/starter/_basic/comp/json-editor.js +3221 -0
  82. package/payload/starter/_basic/comp/json-view.js +597 -0
  83. package/payload/starter/_basic/comp/label-editor.js +22 -19
  84. package/payload/starter/_basic/comp/left-menu.js +97 -25
  85. package/payload/starter/_basic/comp/line-progress-bar.js +196 -45
  86. package/payload/starter/_basic/comp/loading-screen.js +49 -18
  87. package/payload/starter/_basic/comp/log-view.js +530 -0
  88. package/payload/starter/_basic/comp/{login-page-v2.js → login-page.js} +205 -106
  89. package/payload/starter/_basic/comp/markdown-view.js +1044 -0
  90. package/payload/starter/_basic/comp/menu-bar.js +624 -0
  91. package/payload/starter/_basic/comp/mini-graph-box.js +20 -11
  92. package/payload/starter/_basic/comp/minimal-accent.js +208 -0
  93. package/payload/starter/_basic/comp/notice.js +15 -13
  94. package/payload/starter/_basic/comp/{number-input-b.js → number-field.js} +26 -19
  95. package/payload/starter/_basic/comp/numeric-keyboard.js +15 -13
  96. package/payload/starter/_basic/comp/page-control.js +21 -4
  97. package/payload/starter/_basic/comp/page-header.js +7 -6
  98. package/payload/starter/_basic/comp/password-field.js +192 -0
  99. package/payload/starter/_basic/comp/period-bar.js +8 -7
  100. package/payload/starter/_basic/comp/{phone-input-b.js → phone-field.js} +80 -45
  101. package/payload/starter/_basic/comp/progress-bar.js +401 -85
  102. package/payload/starter/_basic/comp/property-panel.js +1022 -123
  103. package/payload/starter/_basic/comp/radio-button.js +79 -19
  104. package/payload/starter/_basic/comp/range-slider.js +569 -0
  105. package/payload/starter/_basic/comp/rich-text-editor.js +33 -30
  106. package/payload/starter/_basic/comp/scroll-area.js +308 -0
  107. package/payload/starter/_basic/comp/scrolling-text.js +10 -9
  108. package/payload/starter/_basic/comp/search-input.js +725 -0
  109. package/payload/starter/_basic/comp/search-results.js +60 -24
  110. package/payload/starter/_basic/comp/select-box.js +229 -107
  111. package/payload/starter/_basic/comp/settings-row.js +20 -19
  112. package/payload/starter/_basic/comp/side-panel.js +53 -10
  113. package/payload/starter/_basic/comp/slider-field.js +264 -88
  114. package/payload/starter/_basic/comp/slider.js +541 -86
  115. package/payload/starter/_basic/comp/smart-button.js +433 -352
  116. package/payload/starter/_basic/comp/smart-table.js +740 -185
  117. package/payload/starter/_basic/comp/sortable-list.js +47 -38
  118. package/payload/starter/_basic/comp/spark-line-box.js +25 -16
  119. package/payload/starter/_basic/comp/splitter.js +411 -0
  120. package/payload/starter/_basic/comp/status-bar.js +408 -0
  121. package/payload/starter/_basic/comp/step-bar.js +345 -0
  122. package/payload/starter/_basic/comp/stepper.js +77 -49
  123. package/payload/starter/_basic/comp/tabs.js +67 -18
  124. package/payload/starter/_basic/comp/tag-input.js +50 -10
  125. package/payload/starter/_basic/comp/tap-effect.js +6 -4
  126. package/payload/starter/_basic/comp/text-area-field.js +233 -0
  127. package/payload/starter/_basic/comp/text-field.js +1006 -0
  128. package/payload/starter/_basic/comp/time-line.js +102 -28
  129. package/payload/starter/_basic/comp/{select-time.js → time-picker.js} +104 -51
  130. package/payload/starter/_basic/comp/tiny-select.js +79 -39
  131. package/payload/starter/_basic/comp/tiny-table.js +12 -8
  132. package/payload/starter/_basic/comp/toast.js +87 -34
  133. package/payload/starter/_basic/comp/toggle.js +147 -27
  134. package/payload/starter/_basic/comp/tool-bar.js +760 -0
  135. package/payload/starter/_basic/comp/tooltip.js +80 -17
  136. package/payload/starter/_basic/comp/tree-view.js +124 -41
  137. package/payload/starter/_basic/comp/ui-effects.js +17 -11
  138. package/payload/starter/_basic/comp/ui-standards.js +5 -4
  139. package/payload/starter/_basic/comp/url-field.js +190 -0
  140. package/payload/starter/_basic/comp/web-view.js +70 -16
  141. package/payload/starter/_basic/docs/basic-js-animated-rules.md +15 -9
  142. package/payload/starter/_basic/docs/basic-js-code-rules.md +42 -5
  143. package/payload/starter/_basic/docs/basic-js-components.md +12 -17
  144. package/payload/starter/_basic/docs/basic-js-core.md +5 -4
  145. package/payload/starter/_basic/docs/component-index.md +245 -104
  146. package/payload/starter/_basic/docs/component-template.js +28 -24
  147. package/payload/starter/_basic/docs/handbook/00-introduction.md +6 -2
  148. package/payload/starter/_basic/docs/handbook/00-what-is-new.md +21 -0
  149. package/payload/starter/_basic/docs/handbook/01-label.md +4 -4
  150. package/payload/starter/_basic/docs/handbook/02-box.md +7 -7
  151. package/payload/starter/_basic/docs/handbook/03-image.md +4 -4
  152. package/payload/starter/_basic/docs/handbook/04-common-properties.md +6 -5
  153. package/payload/starter/_basic/docs/handbook/05-autolayout.md +8 -7
  154. package/payload/starter/_basic/docs/handbook/06-button.md +3 -3
  155. package/payload/starter/_basic/docs/handbook/07-input.md +3 -3
  156. package/payload/starter/_basic/docs/handbook/08-page.md +3 -3
  157. package/payload/starter/_basic/docs/handbook/09-useful-examples.md +39 -58
  158. package/payload/starter/_basic/docs/handbook/10-motion.md +6 -6
  159. package/payload/starter/_basic/docs/handbook/11-other-functions.md +1 -0
  160. package/payload/starter/_basic/docs/handbook/13-sound.md +3 -3
  161. package/payload/starter/_basic/docs/handbook/14-using-components.md +180 -0
  162. package/payload/starter/_basic/docs/handbook/15-making-a-component.md +338 -0
  163. package/payload/starter/_basic/docs/what-is-new.md +106 -0
  164. package/payload/starter/_basic/examples/accordion.htm +174 -0
  165. package/payload/starter/_basic/examples/action-button.htm +74 -32
  166. package/payload/starter/_basic/examples/action-tab-bar.htm +5 -6
  167. package/payload/starter/_basic/examples/app-bar.htm +63 -41
  168. package/payload/starter/_basic/examples/badge.htm +96 -0
  169. package/payload/starter/_basic/examples/bottom-bar-2.htm +61 -48
  170. package/payload/starter/_basic/examples/bottom-bar.htm +74 -16
  171. package/payload/starter/_basic/examples/breadcrumbs.htm +160 -150
  172. package/payload/starter/_basic/examples/canvas.htm +190 -0
  173. package/payload/starter/_basic/examples/chat-view.htm +143 -0
  174. package/payload/starter/_basic/examples/check-box-2.htm +71 -82
  175. package/payload/starter/_basic/examples/check-box-3.htm +72 -83
  176. package/payload/starter/_basic/examples/check-box.htm +207 -0
  177. package/payload/starter/_basic/examples/code-editor-2.htm +259 -0
  178. package/payload/starter/_basic/examples/code-editor.htm +225 -0
  179. package/payload/starter/_basic/examples/color-picker.htm +206 -0
  180. package/payload/starter/_basic/examples/context-menu.htm +180 -139
  181. package/payload/starter/_basic/examples/currency-field.htm +105 -0
  182. package/payload/starter/_basic/examples/data-table-2.htm +2 -1
  183. package/payload/starter/_basic/examples/data-table-3.htm +1 -1
  184. package/payload/starter/_basic/examples/data-table-4.htm +15 -12
  185. package/payload/starter/_basic/examples/data-table-5.htm +11 -3
  186. package/payload/starter/_basic/examples/data-table.htm +90 -40
  187. package/payload/starter/_basic/examples/date-picker.htm +239 -0
  188. package/payload/starter/_basic/examples/dialog-centered.htm +394 -40
  189. package/payload/starter/_basic/examples/dialog.htm +267 -46
  190. package/payload/starter/_basic/examples/email-field.htm +102 -0
  191. package/payload/starter/_basic/examples/file-picker.htm +296 -0
  192. package/payload/starter/_basic/examples/filters.htm +33 -22
  193. package/payload/starter/_basic/examples/{form-1.htm → form.htm} +18 -19
  194. package/payload/starter/_basic/examples/full-screen-select.htm +81 -58
  195. package/payload/starter/_basic/examples/gauge.htm +95 -81
  196. package/payload/starter/_basic/examples/graph-box.htm +365 -0
  197. package/payload/starter/_basic/examples/grid-group.htm +179 -0
  198. package/payload/starter/_basic/examples/hold-to-confirm-button.htm +102 -113
  199. package/payload/starter/_basic/examples/image-view.htm +195 -0
  200. package/payload/starter/_basic/examples/item-list-2.htm +138 -94
  201. package/payload/starter/_basic/examples/item-list.htm +191 -86
  202. package/payload/starter/_basic/examples/json-editor.htm +206 -0
  203. package/payload/starter/_basic/examples/json-view.htm +153 -0
  204. package/payload/starter/_basic/examples/label-editor.htm +85 -89
  205. package/payload/starter/_basic/examples/left-menu-2.htm +93 -0
  206. package/payload/starter/_basic/examples/left-menu.htm +42 -37
  207. package/payload/starter/_basic/examples/line-progress-bar.htm +155 -114
  208. package/payload/starter/_basic/examples/loading-screen.htm +149 -125
  209. package/payload/starter/_basic/examples/log-view.htm +175 -0
  210. package/payload/starter/_basic/examples/{login-page-dark-v2.htm → login-page-dark.htm} +265 -267
  211. package/payload/starter/_basic/examples/{login-page-v2.htm → login-page.htm} +266 -267
  212. package/payload/starter/_basic/examples/markdown-view.htm +220 -0
  213. package/payload/starter/_basic/examples/menu-bar-2.htm +225 -0
  214. package/payload/starter/_basic/examples/menu-bar.htm +145 -0
  215. package/payload/starter/_basic/examples/mini-graph-box.htm +98 -109
  216. package/payload/starter/_basic/examples/minimal-accent.htm +196 -0
  217. package/payload/starter/_basic/examples/minimal-theme.htm +432 -0
  218. package/payload/starter/_basic/examples/notice.htm +13 -4
  219. package/payload/starter/_basic/examples/number-field.htm +103 -0
  220. package/payload/starter/_basic/examples/numeric-keyboard.htm +44 -42
  221. package/payload/starter/_basic/examples/page-control.htm +181 -130
  222. package/payload/starter/_basic/examples/page-header.htm +57 -30
  223. package/payload/starter/_basic/examples/password-field.htm +117 -0
  224. package/payload/starter/_basic/examples/period-bar.htm +43 -29
  225. package/payload/starter/_basic/examples/phone-field-select-country.htm +292 -0
  226. package/payload/starter/_basic/examples/phone-field.htm +104 -0
  227. package/payload/starter/_basic/examples/progress-bar-ozden.htm +229 -92
  228. package/payload/starter/_basic/examples/progress-bar.htm +222 -174
  229. package/payload/starter/_basic/examples/property-panel.htm +152 -52
  230. package/payload/starter/_basic/examples/radio-button-2.htm +101 -109
  231. package/payload/starter/_basic/examples/radio-button-3.htm +81 -71
  232. package/payload/starter/_basic/examples/radio-button.htm +289 -0
  233. package/payload/starter/_basic/examples/range-slider.htm +171 -0
  234. package/payload/starter/_basic/examples/rich-text-editor.htm +115 -110
  235. package/payload/starter/_basic/examples/scroll-area.htm +293 -0
  236. package/payload/starter/_basic/examples/scrolling-text.htm +27 -6
  237. package/payload/starter/_basic/examples/search-input-2-light.htm +112 -0
  238. package/payload/starter/_basic/examples/search-input-3-dark.htm +105 -0
  239. package/payload/starter/_basic/examples/{search-input-v2-place.htm → search-input-place.htm} +25 -26
  240. package/payload/starter/_basic/examples/search-input.htm +159 -0
  241. package/payload/starter/_basic/examples/search-results.htm +85 -88
  242. package/payload/starter/_basic/examples/select-box-ozden-dark-text.htm +70 -0
  243. package/payload/starter/_basic/examples/select-box-ozden-item.htm +6 -5
  244. package/payload/starter/_basic/examples/select-box-ozden-text.htm +5 -3
  245. package/payload/starter/_basic/examples/select-box.htm +190 -159
  246. package/payload/starter/_basic/examples/settings-row.htm +92 -43
  247. package/payload/starter/_basic/examples/side-panel-2.htm +63 -25
  248. package/payload/starter/_basic/examples/side-panel.htm +84 -70
  249. package/payload/starter/_basic/examples/slider-2-classic.htm +152 -0
  250. package/payload/starter/_basic/examples/slider-field-ozden.htm +286 -0
  251. package/payload/starter/_basic/examples/slider-field.htm +174 -134
  252. package/payload/starter/_basic/examples/slider.htm +257 -180
  253. package/payload/starter/_basic/examples/smart-button-3-ozden.htm +170 -257
  254. package/payload/starter/_basic/examples/smart-button-4-dark.htm +86 -47
  255. package/payload/starter/_basic/examples/smart-button-5-features.htm +130 -125
  256. package/payload/starter/_basic/examples/smart-button-alternatif.htm +266 -0
  257. package/payload/starter/_basic/examples/smart-button.htm +207 -174
  258. package/payload/starter/_basic/examples/smart-table-2.htm +43 -56
  259. package/payload/starter/_basic/examples/smart-table-3.htm +148 -113
  260. package/payload/starter/_basic/examples/smart-table-4.htm +37 -50
  261. package/payload/starter/_basic/examples/{smart-table-1.htm → smart-table-5.htm} +37 -48
  262. package/payload/starter/_basic/examples/smart-table.htm +183 -0
  263. package/payload/starter/_basic/examples/sortable-list.htm +191 -142
  264. package/payload/starter/_basic/examples/spark-line-box.htm +149 -161
  265. package/payload/starter/_basic/examples/splitter.htm +164 -0
  266. package/payload/starter/_basic/examples/status-bar.htm +166 -0
  267. package/payload/starter/_basic/examples/step-bar.htm +129 -0
  268. package/payload/starter/_basic/examples/stepper-2.htm +71 -59
  269. package/payload/starter/_basic/examples/stepper.htm +146 -135
  270. package/payload/starter/_basic/examples/tabs-2.htm +58 -67
  271. package/payload/starter/_basic/examples/tabs.htm +197 -180
  272. package/payload/starter/_basic/examples/tag-input.htm +150 -153
  273. package/payload/starter/_basic/examples/tap-effect.htm +23 -19
  274. package/payload/starter/_basic/examples/text-area-field.htm +104 -0
  275. package/payload/starter/_basic/examples/text-field-2.htm +113 -0
  276. package/payload/starter/_basic/examples/text-field-3-style.htm +105 -0
  277. package/payload/starter/_basic/examples/text-field-4-custom-unit.htm +96 -0
  278. package/payload/starter/_basic/examples/{input-b-ex5-warning-icon.htm → text-field-5-warning-icon.htm} +19 -19
  279. package/payload/starter/_basic/examples/text-field-6-modern-dark.htm +114 -0
  280. package/payload/starter/_basic/examples/text-field-7-modern.htm +106 -0
  281. package/payload/starter/_basic/examples/text-field-8-light-dark.htm +159 -0
  282. package/payload/starter/_basic/examples/text-field.htm +163 -0
  283. package/payload/starter/_basic/examples/time-line.htm +180 -116
  284. package/payload/starter/_basic/examples/time-picker.htm +240 -0
  285. package/payload/starter/_basic/examples/tiny-select.htm +118 -86
  286. package/payload/starter/_basic/examples/tiny-table.htm +40 -34
  287. package/payload/starter/_basic/examples/toast.htm +145 -147
  288. package/payload/starter/_basic/examples/toggle-2.htm +99 -68
  289. package/payload/starter/_basic/examples/toggle-3.htm +104 -101
  290. package/payload/starter/_basic/examples/toggle.htm +161 -93
  291. package/payload/starter/_basic/examples/tool-bar.htm +172 -0
  292. package/payload/starter/_basic/examples/tooltip-2.htm +110 -60
  293. package/payload/starter/_basic/examples/tooltip-3.htm +124 -65
  294. package/payload/starter/_basic/examples/tooltip-4.htm +218 -0
  295. package/payload/starter/_basic/examples/tooltip.htm +206 -124
  296. package/payload/starter/_basic/examples/tree-view.htm +210 -182
  297. package/payload/starter/_basic/examples/ui-effects.htm +207 -185
  298. package/payload/starter/_basic/examples/ui-standards.htm +200 -139
  299. package/payload/starter/_basic/examples/url-field.htm +120 -0
  300. package/payload/starter/_basic/examples/web-view.htm +109 -110
  301. package/payload/starter/_basic/min/accordion.min.js +2 -0
  302. package/payload/starter/_basic/min/action-button.min.js +1 -1
  303. package/payload/starter/_basic/min/app-bar.min.js +1 -1
  304. package/payload/starter/_basic/min/badge.min.js +2 -0
  305. package/payload/starter/_basic/min/bottom-bar.min.js +1 -1
  306. package/payload/starter/_basic/min/canvas.min.js +2 -0
  307. package/payload/starter/_basic/min/chat-view.min.js +2 -0
  308. package/payload/starter/_basic/min/check-box.min.js +1 -1
  309. package/payload/starter/_basic/min/code-editor.min.js +2 -0
  310. package/payload/starter/_basic/min/color-picker.min.js +2 -0
  311. package/payload/starter/_basic/min/context-menu.min.js +1 -1
  312. package/payload/starter/_basic/min/currency-field.min.js +2 -0
  313. package/payload/starter/_basic/min/data-table.min.js +1 -1
  314. package/payload/starter/_basic/min/date-picker.min.js +2 -0
  315. package/payload/starter/_basic/min/dialog.min.js +1 -1
  316. package/payload/starter/_basic/min/email-field.min.js +2 -0
  317. package/payload/starter/_basic/min/file-picker.min.js +2 -0
  318. package/payload/starter/_basic/min/filters.min.js +1 -1
  319. package/payload/starter/_basic/min/form.min.js +1 -1
  320. package/payload/starter/_basic/min/full-screen-select.min.js +1 -1
  321. package/payload/starter/_basic/min/gauge.min.js +1 -1
  322. package/payload/starter/_basic/min/graph-box.min.js +2 -0
  323. package/payload/starter/_basic/min/grid-group.min.js +2 -0
  324. package/payload/starter/_basic/min/hold-to-confirm-button.min.js +1 -1
  325. package/payload/starter/_basic/min/image-view.min.js +2 -0
  326. package/payload/starter/_basic/min/item-list.min.js +1 -1
  327. package/payload/starter/_basic/min/json-editor.min.js +2 -0
  328. package/payload/starter/_basic/min/json-view.min.js +2 -0
  329. package/payload/starter/_basic/min/label-editor.min.js +1 -1
  330. package/payload/starter/_basic/min/left-menu.min.js +1 -1
  331. package/payload/starter/_basic/min/line-progress-bar.min.js +1 -1
  332. package/payload/starter/_basic/min/loading-screen.min.js +1 -1
  333. package/payload/starter/_basic/min/log-view.min.js +2 -0
  334. package/payload/starter/_basic/min/login-page.min.js +2 -0
  335. package/payload/starter/_basic/min/markdown-view.min.js +2 -0
  336. package/payload/starter/_basic/min/menu-bar.min.js +2 -0
  337. package/payload/starter/_basic/min/mini-graph-box.min.js +1 -1
  338. package/payload/starter/_basic/min/minimal-accent.min.js +2 -0
  339. package/payload/starter/_basic/min/notice.min.js +1 -1
  340. package/payload/starter/_basic/min/number-field.min.js +2 -0
  341. package/payload/starter/_basic/min/numeric-keyboard.min.js +1 -1
  342. package/payload/starter/_basic/min/page-control.min.js +1 -1
  343. package/payload/starter/_basic/min/password-field.min.js +2 -0
  344. package/payload/starter/_basic/min/phone-field.min.js +2 -0
  345. package/payload/starter/_basic/min/progress-bar.min.js +1 -1
  346. package/payload/starter/_basic/min/property-panel.min.js +1 -1
  347. package/payload/starter/_basic/min/radio-button.min.js +1 -1
  348. package/payload/starter/_basic/min/range-slider.min.js +2 -0
  349. package/payload/starter/_basic/min/rich-text-editor.min.js +1 -1
  350. package/payload/starter/_basic/min/scroll-area.min.js +2 -0
  351. package/payload/starter/_basic/min/scrolling-text.min.js +1 -1
  352. package/payload/starter/_basic/min/search-input.min.js +2 -0
  353. package/payload/starter/_basic/min/search-results.min.js +1 -1
  354. package/payload/starter/_basic/min/select-box.min.js +1 -1
  355. package/payload/starter/_basic/min/settings-row.min.js +1 -1
  356. package/payload/starter/_basic/min/side-panel.min.js +1 -1
  357. package/payload/starter/_basic/min/slider-field.min.js +1 -1
  358. package/payload/starter/_basic/min/slider.min.js +1 -1
  359. package/payload/starter/_basic/min/smart-button.min.js +1 -1
  360. package/payload/starter/_basic/min/smart-table.min.js +1 -1
  361. package/payload/starter/_basic/min/sortable-list.min.js +1 -1
  362. package/payload/starter/_basic/min/spark-line-box.min.js +1 -1
  363. package/payload/starter/_basic/min/splitter.min.js +2 -0
  364. package/payload/starter/_basic/min/status-bar.min.js +2 -0
  365. package/payload/starter/_basic/min/step-bar.min.js +2 -0
  366. package/payload/starter/_basic/min/stepper.min.js +1 -1
  367. package/payload/starter/_basic/min/tabs.min.js +1 -1
  368. package/payload/starter/_basic/min/tag-input.min.js +1 -1
  369. package/payload/starter/_basic/min/text-area-field.min.js +2 -0
  370. package/payload/starter/_basic/min/text-field.min.js +2 -0
  371. package/payload/starter/_basic/min/time-line.min.js +1 -1
  372. package/payload/starter/_basic/min/time-picker.min.js +2 -0
  373. package/payload/starter/_basic/min/tiny-select.min.js +1 -1
  374. package/payload/starter/_basic/min/toast.min.js +1 -1
  375. package/payload/starter/_basic/min/toggle.min.js +1 -1
  376. package/payload/starter/_basic/min/tool-bar.min.js +2 -0
  377. package/payload/starter/_basic/min/tooltip.min.js +1 -1
  378. package/payload/starter/_basic/min/tree-view.min.js +1 -1
  379. package/payload/starter/_basic/min/ui-effects.min.js +1 -1
  380. package/payload/starter/_basic/min/url-field.min.js +2 -0
  381. package/payload/starter/_basic/min/web-view.min.js +1 -1
  382. package/payload/templates/booking/app/app.js +11 -8
  383. package/payload/templates/booking/app/settings.js +4 -4
  384. package/payload/templates/booking/index.htm +3 -3
  385. package/payload/templates/booking/pages/account.js +6 -6
  386. package/payload/templates/booking/pages/book.js +1 -1
  387. package/payload/templates/booking/pages/services.js +5 -4
  388. package/payload/templates/classic/app/app.js +15 -11
  389. package/payload/templates/classic/app/settings.js +22 -20
  390. package/payload/templates/classic/assets/_attribute.txt +2 -0
  391. package/payload/templates/classic/assets/cards/dill.png +0 -0
  392. package/payload/templates/classic/assets/cards/fennel.png +0 -0
  393. package/payload/templates/classic/assets/cards/juniper.png +0 -0
  394. package/payload/templates/classic/assets/cards/olives.png +0 -0
  395. package/payload/templates/classic/assets/cards/oregano.png +0 -0
  396. package/payload/templates/classic/assets/cards/pepper.png +0 -0
  397. package/payload/templates/classic/assets/cards/rosehip.png +0 -0
  398. package/payload/templates/classic/assets/categories/cappuccino.png +0 -0
  399. package/payload/templates/classic/assets/categories/chocolate-milk.png +0 -0
  400. package/payload/templates/classic/assets/categories/coffee.png +0 -0
  401. package/payload/templates/classic/assets/categories/frappe.png +0 -0
  402. package/payload/templates/classic/assets/categories/iced-caffee.png +0 -0
  403. package/payload/templates/classic/assets/categories/milkshake.png +0 -0
  404. package/payload/templates/classic/assets/categories/orange-juice.png +0 -0
  405. package/payload/templates/classic/assets/categories/tea.png +0 -0
  406. package/payload/templates/classic/index.htm +2 -2
  407. package/payload/templates/classic/pages/example.js +10 -10
  408. package/payload/templates/classic/pages/examples.js +44 -43
  409. package/payload/templates/classic/pages/home.js +16 -15
  410. package/payload/templates/classic/pages/info-pages.js +5 -5
  411. package/payload/templates/classic/pages/search.js +8 -7
  412. package/payload/templates/classic/pages/settings.js +13 -13
  413. package/payload/templates/classic/pages/tasks.js +1 -0
  414. package/payload/templates/classic/pages/template-pages.js +12 -11
  415. package/payload/templates/coffee-shop/app/app.js +12 -8
  416. package/payload/templates/coffee-shop/app/settings.js +4 -4
  417. package/payload/templates/coffee-shop/index.htm +3 -3
  418. package/payload/templates/coffee-shop/pages/drink.js +1 -1
  419. package/payload/templates/coffee-shop/pages/menu.js +5 -4
  420. package/payload/templates/forms/TEMPLATE.md +1 -1
  421. package/payload/templates/forms/appointment-form.htm +55 -53
  422. package/payload/templates/forms/contact-form-to-mail.htm +38 -37
  423. package/payload/templates/forms/contact-form-to-supabase.htm +47 -46
  424. package/payload/templates/forms/dark-contact-form.htm +43 -40
  425. package/payload/templates/forms/event-registration-form.htm +80 -77
  426. package/payload/templates/forms/feedback-form.htm +54 -54
  427. package/payload/templates/forms/order-form.htm +88 -84
  428. package/payload/templates/forms/recruitment-form.htm +60 -60
  429. package/payload/templates/forms/service/readme.md +9 -8
  430. package/payload/templates/forms/service/send-form-mail.php +38 -21
  431. package/payload/templates/forms/support-ticket-form.htm +67 -65
  432. package/payload/templates/panel/common/module-page.js +2 -2
  433. package/payload/templates/panel/common/theme.js +37 -10
  434. package/payload/templates/panel/common/top-bar.js +45 -40
  435. package/payload/templates/panel/index.htm +63 -60
  436. package/payload/templates/panel/module10/greenhouse.htm +98 -113
  437. package/payload/templates/panel/module11/arduino-projects.htm +47 -58
  438. package/payload/templates/panel/module6/energy-hub.htm +71 -103
  439. package/payload/templates/panel/module7/3d-printers.htm +58 -81
  440. package/payload/templates/panel/module8/cold-rooms.htm +58 -79
  441. package/payload/templates/panel/module9/elevator-fleet.htm +72 -93
  442. package/payload/templates/panel/pages/activity.js +134 -152
  443. package/payload/templates/panel/pages/contents.js +291 -308
  444. package/payload/templates/panel/pages/customers.js +250 -267
  445. package/payload/templates/panel/pages/edit-user.js +31 -30
  446. package/payload/templates/panel/pages/home.js +39 -70
  447. package/payload/templates/panel/pages/media.js +166 -183
  448. package/payload/templates/panel/pages/notifications.js +7 -7
  449. package/payload/templates/panel/pages/orders.js +200 -217
  450. package/payload/templates/panel/pages/products.js +259 -278
  451. package/payload/templates/panel/pages/reports.js +74 -123
  452. package/payload/templates/panel/pages/roles.js +57 -60
  453. package/payload/templates/panel/pages/settings.js +127 -143
  454. package/payload/templates/panel/pages/user-actions.js +106 -110
  455. package/payload/templates/panel/pages/user-list.js +221 -238
  456. package/payload/templates/panel/pages/users.js +14 -29
  457. package/payload/templates/shop/TEMPLATE.md +1 -1
  458. package/payload/templates/shop/app/app.js +11 -8
  459. package/payload/templates/shop/app/settings.js +4 -4
  460. package/payload/templates/shop/index.htm +3 -3
  461. package/payload/templates/shop/pages/account.js +7 -7
  462. package/payload/templates/shop/pages/cart.js +1 -1
  463. package/payload/templates/shop/pages/checkout.js +2 -2
  464. package/payload/templates/shop/pages/product.js +2 -2
  465. package/payload/templates/shop/pages/shop.js +6 -5
  466. package/payload/templates/starter/TEMPLATE.md +1 -1
  467. package/payload/templates/starter/app/app.js +12 -8
  468. package/payload/templates/starter/app/settings.js +14 -11
  469. package/payload/templates/starter/index.htm +3 -3
  470. package/payload/templates/starter/pages/about.js +1 -1
  471. package/payload/templates/starter/pages/home.js +2 -2
  472. package/payload/templates/starter/pages/product.js +1 -1
  473. package/payload/templates/starter/pages/products.js +5 -5
  474. package/payload/templates/starter/pages/settings.js +1 -1
  475. package/payload/templates/starter/pages/tasks.js +8 -8
  476. package/payload/templates/starter/pages/website.js +1 -1
  477. package/payload/starter/_basic/comp/chart-box/chart-4.5.1.umd.min.js +0 -13
  478. package/payload/starter/_basic/comp/chart-box/chart-js-LICENSE.md +0 -9
  479. package/payload/starter/_basic/comp/chart-box.js +0 -868
  480. package/payload/starter/_basic/comp/email-input-b.js +0 -57
  481. package/payload/starter/_basic/comp/input-b.js +0 -759
  482. package/payload/starter/_basic/comp/password-input-b.js +0 -164
  483. package/payload/starter/_basic/comp/search-input-v2.js +0 -427
  484. package/payload/starter/_basic/comp/textarea-b.js +0 -184
  485. package/payload/starter/_basic/comp/url-input-b.js +0 -145
  486. package/payload/starter/_basic/examples/badgeV2.htm +0 -68
  487. package/payload/starter/_basic/examples/chart-box.htm +0 -287
  488. package/payload/starter/_basic/examples/check-box-1.htm +0 -220
  489. package/payload/starter/_basic/examples/currency-input-b.htm +0 -71
  490. package/payload/starter/_basic/examples/email-input-b.htm +0 -67
  491. package/payload/starter/_basic/examples/input-b-ex1.htm +0 -132
  492. package/payload/starter/_basic/examples/input-b-ex2.htm +0 -136
  493. package/payload/starter/_basic/examples/input-b-ex3-style.htm +0 -113
  494. package/payload/starter/_basic/examples/input-b-ex4-custom-unit.htm +0 -112
  495. package/payload/starter/_basic/examples/input-b-ex6-dark.htm +0 -108
  496. package/payload/starter/_basic/examples/input-b-ex7-ozden.htm +0 -153
  497. package/payload/starter/_basic/examples/number-input-b.htm +0 -68
  498. package/payload/starter/_basic/examples/password-input-b.htm +0 -70
  499. package/payload/starter/_basic/examples/phone-input-b-select-country.htm +0 -298
  500. package/payload/starter/_basic/examples/phone-input-b.htm +0 -72
  501. package/payload/starter/_basic/examples/radio-button-1.htm +0 -264
  502. package/payload/starter/_basic/examples/search-input-v2-ozden.htm +0 -128
  503. package/payload/starter/_basic/examples/search-input-v2.htm +0 -65
  504. package/payload/starter/_basic/examples/select-color.htm +0 -215
  505. package/payload/starter/_basic/examples/select-date.htm +0 -244
  506. package/payload/starter/_basic/examples/select-file.htm +0 -268
  507. package/payload/starter/_basic/examples/select-time.htm +0 -249
  508. package/payload/starter/_basic/examples/smart-button-2.htm +0 -220
  509. package/payload/starter/_basic/examples/textarea-b.htm +0 -76
  510. package/payload/starter/_basic/examples/unfinished-login-page-dark-supabase.htm +0 -221
  511. package/payload/starter/_basic/examples/unfinished-login-page-supabase.htm +0 -221
  512. package/payload/starter/_basic/examples/url-input-b.htm +0 -85
  513. package/payload/starter/_basic/min/badge-v2.min.js +0 -2
  514. package/payload/starter/_basic/min/chart-box.min.js +0 -2
  515. package/payload/starter/_basic/min/currency-input-b.min.js +0 -2
  516. package/payload/starter/_basic/min/email-input-b.min.js +0 -2
  517. package/payload/starter/_basic/min/input-b.min.js +0 -2
  518. package/payload/starter/_basic/min/login-page-v2.min.js +0 -2
  519. package/payload/starter/_basic/min/number-input-b.min.js +0 -2
  520. package/payload/starter/_basic/min/password-input-b.min.js +0 -2
  521. package/payload/starter/_basic/min/phone-input-b.min.js +0 -2
  522. package/payload/starter/_basic/min/search-input-v2.min.js +0 -2
  523. package/payload/starter/_basic/min/select-color.min.js +0 -2
  524. package/payload/starter/_basic/min/select-date.min.js +0 -2
  525. package/payload/starter/_basic/min/select-file.min.js +0 -2
  526. package/payload/starter/_basic/min/select-time.min.js +0 -2
  527. package/payload/starter/_basic/min/textarea-b.min.js +0 -2
  528. package/payload/starter/_basic/min/url-input-b.min.js +0 -2
  529. package/payload/templates/panel/common/bridge.min.js +0 -0
  530. package/payload/templates/panel/common/full-view.min.js +0 -1
  531. package/payload/templates/panel/common/main-view.min.js +0 -1
  532. package/payload/templates/panel/common/module-page.min.js +0 -1
  533. package/payload/templates/panel/common/right-view.min.js +0 -1
  534. package/payload/templates/panel/common/start-page.min.js +0 -1
  535. package/payload/templates/panel/common/top-bar-v25-07-29-1.js +0 -330
  536. package/payload/templates/panel/common/top-bar-v25-07-29-2.js +0 -265
  537. package/payload/templates/panel/common/top-bar.min.js +0 -1
  538. package/payload/templates/panel/common/ui-standards.min.js +0 -1
  539. package/payload/templates/panel/managers/database.min.js +0 -1
  540. package/payload/templates/panel/managers/login.min.js +0 -1
  541. package/payload/templates/panel/pages/_page-template.min.js +0 -1
  542. package/payload/templates/panel/pages/contents.min.js +0 -1
  543. package/payload/templates/panel/pages/edit-user.min.js +0 -1
  544. package/payload/templates/panel/pages/edit-users-table.min.js +0 -1
  545. package/payload/templates/panel/pages/home.min.js +0 -1
  546. package/payload/templates/panel/pages/notifications.min.js +0 -1
  547. package/payload/templates/panel/pages/reports.min.js +0 -1
  548. package/payload/templates/panel/pages/settings.min.js +0 -1
  549. package/payload/templates/panel/pages/user-actions.min.js +0 -2
  550. package/payload/templates/panel/pages/users.min.js +0 -1
  551. /package/payload/starter/_basic/comp/{password-input-b → password-field}/hide-btn.png +0 -0
  552. /package/payload/starter/_basic/comp/{password-input-b → password-field}/hide-btn2.png +0 -0
  553. /package/payload/starter/_basic/comp/{password-input-b → password-field}/show-btn.png +0 -0
  554. /package/payload/starter/_basic/comp/{password-input-b → password-field}/show-btn2.png +0 -0
  555. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/clear-round.svg +0 -0
  556. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/clear.svg +0 -0
  557. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/filter.png +0 -0
  558. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/filter.svg +0 -0
  559. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/search.svg +0 -0
@@ -0,0 +1,2 @@
1
+ /* Bismillah */
2
+ "use strict";const ColorPickerDefaults={key:"0",width:170,height:44,selectedColor:"",colors:["#141414","#5A5A5A","#9A9A9A","#D0D0D0","#FFFFFF","#D64545","#E0A038","#E8D44D","#5DB182","#3E8E62","#3871E0","#5AA9E6","#7B61D9","#B45FC0","#E06AA0","#8D6E63","#C89F7B","#2E4A7D","#1F6F6B","#7A8B2E"],columns:5,showText:1,placeholder:"Select color",inline:0,enabled:1,closeOnSelect:1,onChange:function(e){},onOpen:function(e){},onClose:function(e){},styleName:"light",style:{field:{color:White(1),border:1,borderColor:Black(.2),round:6,padding:[10,0],gap:10},fieldHover:{borderColor:Black(.5)},fieldFocus:{borderColor:"#141414"},fieldText:{fontSize:15,textColor:Black(.85)},placeholder:{textColor:Black(.4)},fieldSwatch:{width:24,height:24,round:5},panel:{color:White(1),border:1,borderColor:Black(.12),round:10,padding:12,shadow:"0 8px 24px rgba(0, 0, 0, 0.12)"},swatch:{size:28,gap:8,round:6,border:1,borderColor:Black(.15)},mark:{size:10,lightColor:White(.95),darkColor:Black(.7)},disabled:{opacity:.4}}},ColorPicker=function(e={}){basic.applyStylePackage(e,ColorPicker.styles,ColorPickerDefaults),mergeIntoIfMissing(e,ColorPickerDefaults),e.color="transparent",1==e.inline&&(e.width="auto",e.height="auto");let o=startObject(e);const r=o.style,l=r.swatch.size,n=Math.max(1,basic.num(o.columns)||1),t=l*n+r.swatch.gap*(n-1);let i=0,a=0,c=[];o.value=ColorPicker.normalize(o.selectedColor);const d=function(){if(1==o.inline)return;const e=""!==o.value;o.fieldSwatch.visible=e?1:0,o.fieldSwatch.color=e?o.value:"transparent",o.fieldText.visible=1==o.showText?1:0,o.fieldText.plainText=e?o.value:o.placeholder,o.fieldText.textColor=e?r.fieldText.textColor:r.placeholder.textColor;let l=r.field.borderColor;a&&1==o.enabled&&(l=r.fieldHover.borderColor),i&&(l=r.fieldFocus.borderColor),o.field.borderColor=l,o.opacity=1==o.enabled?1:r.disabled.opacity,o.cursor=1==o.enabled?"pointer":"default",o.tabIndex=1==o.enabled?0:-1,o.aria={expanded:i?"true":"false",disabled:1==o.enabled?"false":"true"}},s=function(){c.forEach(function(e){e.mark.visible=e.colorText==o.value&&""!==o.value?1:0}),1==o.inline&&(o.panel.opacity=1==o.enabled?1:r.disabled.opacity,o.panel.clickable=1==o.enabled?1:0)},f=function(){c.forEach(function(e){e.remove()}),c=[],c=o.colors.map(function(e){return createIn(o.grid,function(){return function(e){const n=startBox({width:l,height:l,color:e,round:r.swatch.round,border:r.swatch.border,borderColor:r.swatch.borderColor,clickable:1,cursor:"pointer",css:{flexShrink:"0"}});return n.colorText=e,n.elem.title=e,n.role="option",n.mark=Box({width:r.mark.size,height:r.mark.size,round:100,color:ColorPicker.isLight(e)?r.mark.darkColor:r.mark.lightColor,visible:0}),n.mark.center(),endBox(),n.on("click",function(){1==o.enabled&&(o.setColor(e),1!=o.inline&&1==o.closeOnSelect&&(o.close(),o.elem.focus()))}),n}(ColorPicker.normalize(e))})}),s()},u=function(){i&&o.close()},p=function(e){if(!c.length)return;const r=c.findIndex(function(e){return e.colorText==o.value});let l=r<0?0:r+e;l<0||l>=c.length||o.setColor(c[l].colorText)},b=function(e,r){if(1==o.enabled)if(1==o.inline||i)if("Escape"===r.key||"Enter"===r.key){if(1==o.inline)return;r.preventDefault(),o.close(),o.elem.focus()}else"ArrowLeft"===r.key||"ArrowRight"===r.key?(r.preventDefault(),p("ArrowLeft"===r.key?-1:1)):"ArrowUp"!==r.key&&"ArrowDown"!==r.key||(r.preventDefault(),p("ArrowUp"===r.key?-n:n));else"Enter"!==r.key&&" "!==r.key&&"ArrowDown"!==r.key||(r.preventDefault(),o.open())};if(o.setColor=function(e,r=0){const l=ColorPicker.normalize(e);l!==o.value&&(o.value=l,d(),s(),r||o.onChange(o))},o.getColor=function(){return o.value},o.setColors=function(e){o.colors=(e||[]).slice(),f()},o.open=function(){if(1==o.inline||i||1!=o.enabled)return;i=1;const e=basic.zIndexAbove(o,1e3);o.overlay.zIndex=e,o.panel.zIndex=e+1,o.overlay.visible=1,o.panel.visible=1,function(){const e=o.elem.getBoundingClientRect(),r=o.panel.elem.offsetWidth,l=o.panel.elem.offsetHeight;let n=withPageZoom(e.left),t=withPageZoom(e.bottom)+6;t+l>page.height-8&&(t=withPageZoom(e.top)-l-6),o.panel.left=Math.max(8,Math.min(n,page.width-r-8)),o.panel.top=Math.max(8,t)}(),o.panel.elem.focus({preventScroll:!0}),d(),o.onOpen(o)},o.close=function(){1!=o.inline&&i&&(i=0,o.overlay.visible=0,o.panel.visible=0,d(),o.onClose(o))},o.toggle=function(){i?o.close():o.open()},o.isOpen=function(){return i},o.setEnabled=function(e){o.enabled=basic.isOn(e)?1:0,1!=o.enabled&&o.close(),d(),s()},o.refresh=function(){d(),s()},o.css.outline="none",1!=o.inline&&(o.clickable=1,o.role="combobox",o.field=HGroup({width:"100%",height:"100%",align:"left center",gap:r.field.gap,color:r.field.color,border:r.field.border,borderColor:r.field.borderColor,round:r.field.round,padding:r.field.padding}),o.field.setMotion("border-color 0.15s"),o.fieldSwatch=Box({width:r.fieldSwatch.width,height:r.fieldSwatch.height,round:r.fieldSwatch.round,border:r.swatch.border,borderColor:r.swatch.borderColor,css:{flexShrink:"0"}}),o.fieldText=Label({width:"auto",fontSize:r.fieldText.fontSize,textColor:r.fieldText.textColor,ellipsis:1,grow:1}),endGroup()),1!=o.inline){setDefaultContainerBox(page);const e=2e4;o.overlay=Box(-e,-e,2*e,2*e,{color:"transparent"}),o.overlay.css.position="fixed",o.overlay.zIndex=1e3,o.overlay.on("click",function(){o.close()})}return o.panel=VGroup({width:t+2*r.panel.padding+2*r.panel.border,height:"auto",align:"left top",color:r.panel.color,border:r.panel.border,borderColor:r.panel.borderColor,round:r.panel.round,padding:r.panel.padding,boxShadow:r.panel.shadow}),o.panel.css.outline="none",o.panel.tabIndex=-1,o.panel.clickable=1,o.panel.role="listbox",o.grid=HGroup({width:t,height:"auto",align:"left top",gap:r.swatch.gap,wrap:1}),endGroup(),endGroup(),1!=o.inline&&(o.panel.zIndex=1001,o.overlay.visible=0,o.panel.visible=0),1!=o.inline?(o.on("click",function(){o.toggle()}),o.on("keydown",b),o.on("mouseover",function(){a=1,d()}),o.on("mouseout",function(){a=0,d()}),o.onPageResize(u),o.own(o.overlay),o.own(o.panel)):(o.panel.tabIndex=0,o.panel.position="relative"),o.panel.on("keydown",b),o.panel.on("mousedown",function(e,o){o.preventDefault()}),o.enabled=basic.isOn(o.enabled)?1:0,o.setColors(e.colors),d(),endObject(o)};ColorPicker.normalize=function(e){const o=String(e||"").trim();if(""===o)return"";const r=/^#([0-9a-fA-F]{3})$/.exec(o);if(r)return"#"+r[1].toUpperCase().replace(/./g,function(e){return e+e});const l=/^#([0-9a-fA-F]{6})$/.exec(o);return l?"#"+l[1].toUpperCase():o},ColorPicker.isLight=function(e){const o=ColorPicker.toRgb(e);return.299*o.r+.587*o.g+.114*o.b>160},ColorPicker.toRgb=function(e){const o=document.createElement("div");o.style.display="none",o.style.color="rgb(0, 0, 0)",o.style.color=String(e),document.body.appendChild(o);const r=getComputedStyle(o).color;document.body.removeChild(o);const l=/(\d+)[^\d]+(\d+)[^\d]+(\d+)/.exec(r);return l?{r:basic.num(l[1]),g:basic.num(l[2]),b:basic.num(l[3])}:{r:0,g:0,b:0}},ColorPicker.styles={light:ColorPickerDefaults.style,dark:{field:{color:"#232322",borderColor:"rgba(255, 255, 255, 0.10)",round:8},fieldHover:{borderColor:"rgba(255, 255, 255, 0.30)"},fieldFocus:{borderColor:"#65A293"},fieldText:{fontSize:15,textColor:"rgba(255, 255, 255, 0.90)"},placeholder:{textColor:"rgba(255, 255, 255, 0.40)"},panel:{color:"#232322",borderColor:"rgba(255, 255, 255, 0.12)",shadow:"0 8px 24px rgba(0, 0, 0, 0.5)"},swatch:{borderColor:"rgba(255, 255, 255, 0.15)"}}},ColorPicker.styles.classic=ColorPicker.styles.light,ColorPicker.createMinimalStyle=function(e){return{height:28,style:{field:{color:"transparent",border:1,borderColor:e.edge,round:4,padding:[8,0],gap:8},fieldHover:{borderColor:e.edgeHover},fieldFocus:{borderColor:e.ink},fieldText:{fontSize:13,textColor:e.text},placeholder:{textColor:e.faintText},fieldSwatch:{width:16,height:16,round:3},panel:{color:e.ground,border:1,borderColor:e.line,round:4,padding:8,shadow:"none"},swatch:{size:22,gap:6,round:4,border:1,borderColor:e.line},mark:{size:8},disabled:{opacity:.4}}}},ColorPicker.MINIMAL_COLORS={ground:"#FFFFFF",text:Black(.85),softText:Black(.55),faintText:Black(.54),line:Black(.2),edge:Black(.45),edgeHover:Black(.65),ink:"#1F1F1F",hover:Black(.05),off:Black(.25)},ColorPicker.styles.minimal=ColorPicker.createMinimalStyle(ColorPicker.MINIMAL_COLORS),ColorPicker.MINIMAL_DARK_COLORS={ground:"#1A1A19",text:White(.88),softText:White(.55),faintText:White(.48),line:White(.18),edge:White(.42),edgeHover:White(.62),ink:"#EDEDEB",hover:White(.07),off:White(.25)},ColorPicker.styles.minimalDark=ColorPicker.createMinimalStyle(ColorPicker.MINIMAL_DARK_COLORS);
@@ -1,2 +1,2 @@
1
1
  /* Bismillah */
2
- "use strict";const ContextMenuDefaults={key:"0",items:[],target:null,trigger:"contextmenu",minWidth:180,maxWidth:320,enabled:1,ariaLabel:"Menu",onClick:function(e,t,n){},onOpen:function(e){},onClose:function(e){},styleName:"classic",style:{menu:{color:"white",border:1,borderColor:Black(.12),round:8,padding:4,shadow:"0px 8px 24px "+Black(.14),zIndex:1e3},item:{height:32,fontSize:14,textColor:Black(.85),color:"transparent",round:5,padding:10,gap:10},itemHover:{textColor:Black(.9),color:Black(.06)},disabled:{textColor:Black(.35),opacity:.4},icon:{width:16,height:16},separator:{color:Black(.1),space:4}}},ContextMenu=function(e={}){basic.applyStylePackage(e,ContextMenu.styles,ContextMenuDefaults),mergeIntoIfMissing(e,ContextMenuDefaults);const t=e.style.menu;e.width="auto",e.height="auto",e.color=t.color,e.border=t.border,e.borderColor=t.borderColor,e.round=t.round,e.padding=t.padding,e.zIndex=t.zIndex,e.boxShadow=t.shadow;const n=getDefaultContainerBox();setDefaultContainerBox(page);let o=startObject(e);const i=o.style;let r=[],c=[],a=0,l=-1,s=null,u=0,f="";o.items=[],o.source=null;const d=function(e){return basic.isOn(e)?1:0},m=function(e){if("-"===e||e&&"separator"==e.type)return{type:"separator"};if("string"==typeof e||"number"==typeof e)return{type:"item",text:String(e),enabled:1};const t=Object.assign({text:"",enabled:1},e);return t.type="item",t.enabled=d(t.enabled),t},p=function(e){return!!(o&&e&&o.elem.contains(e))},h=function(e){const t=o.items[e];return!(!t||"item"!=t.type||1!=t.enabled)},g=function(e){if(l==e)return;const t=r[l];t&&t.label&&b(t,0),l=e;const n=r[l];n&&n.label&&b(n,1)},b=function(e,t){const n=t?i.itemHover:i.item;e.color=n.color,e.label.textColor=1==e.item.enabled?n.textColor:i.disabled.textColor},x=function(e){const t=1==e.item.enabled;e.cursor=t?"pointer":"default",e.aria={disabled:t?"false":"true"},e.icon&&(e.icon.opacity=t||!e.item.iconFile?1:i.disabled.opacity),b(e,0)},y=function(e){const t=o.items.length;if(0==t)return;let n=l<0&&e<0?t:l;for(let o=0;o<t;o++)if(n=(n+e+t)%t,h(n))return void g(n)},v=function(){r.forEach(function(e){e.remove()}),r=[],l=-1;const e=o.items.some(function(e){return"item"==e.type&&e.iconFile});o.items.forEach(function(t,n){createIn(o.content,function(){r.push("separator"==t.type?function(){const e=Box({width:"auto",height:1,color:i.separator.color,shrink:0});return e.css.margin=i.separator.space+"px "+i.item.padding+"px",e.role="separator",e}():function(e,t,n){const r=HGroup({width:"auto",height:i.item.height,align:"left center",gap:i.item.gap,padding:[i.item.padding,0],round:i.item.round});return r.role="menuitem",r.item=e,n&&(e.iconFile?(r.icon=Icon({width:i.icon.width,height:i.icon.height,shrink:0}),r.icon.load(e.iconFile),r.icon.elem.alt=""):r.icon=Box({width:i.icon.width,height:i.icon.height,color:"transparent",shrink:0})),r.label=Label({plainText:e.text,fontSize:i.item.fontSize,ellipsis:1,shrink:1}),r.label.css.minWidth="0",endGroup(),x(r),r.on("mouseenter",function(){g(1==e.enabled?t:-1)}),r.on("click",function(){o.clickItem(t)}),r}(t,n,e))})})},k=function(e){if(!p(e.target)){if(0===e.button&&o.source&&o.source.elem.contains(e.target)){const e=c.find(function(e){return e.obj==o.source});e&&"click"==e.trigger&&(s=o.source,u=Date.now())}o.close()}},w=function(e){if("Escape"===e.key)e.preventDefault(),o.close();else if("ArrowDown"===e.key)e.preventDefault(),y(1);else if("ArrowUp"===e.key)e.preventDefault(),y(-1);else if("Enter"===e.key||" "===e.key){if(l<0)return;e.preventDefault(),o.clickItem(l)}else"Tab"===e.key&&o.close()},C=function(e){p(e.target)||o.close()},I=function(){o.close()},D=function(){a&&page.width+"x"+page.height!=f&&o.close()},M=function(e){const t=e?"addEventListener":"removeEventListener";document[t]("pointerdown",k,!0),document[t]("keydown",w,!0),document[t]("wheel",C,!0),window[t]("blur",I),e?page.onResize(D):page.remove_onResize(D)};o.setItems=function(e){o.items=(e||[]).map(m),v(),a&&o.close()},o.getItems=function(){return o.items.slice()},o.getItemByKey=function(e){return o.items.find(function(t){return t.key==e})||null},o.setItemEnabled=function(e,t){const n=o.getItemByKey(e);if(!n)return;n.enabled=d(t);const i=o.items.indexOf(n);1!=n.enabled&&l==i&&g(-1),x(r[i]),l==i&&b(r[i],1)},o.openAt=function(e,t,n=null){1==o.enabled&&0!=o.items.length&&(a&&o.close(),a=1,o.source=n,f=page.width+"x"+page.height,o.setMotion("none"),o.opacity=0,o.css.transform="scale(0.97)",o.visible=1,function(e,t){const n=o.elem.offsetWidth,i=o.elem.offsetHeight;let r=e,c=t,a="left",l="top";r+n>page.width-8&&(r=e-n,a="right"),c+i>page.height-8&&(c=t-i,l="bottom"),r=Math.max(8,Math.min(r,page.width-n-8)),c=Math.max(8,Math.min(c,page.height-i-8)),o.left=r,o.top=c,o.css.transformOrigin=a+" "+l}(withPageZoom(e),withPageZoom(t)),requestAnimationFrame(function(){o&&a&&(o.setMotion("opacity 0.12s, transform 0.12s"),o.opacity=1,o.css.transform="scale(1)")}),o.elem.focus({preventScroll:!0}),M(1),o.onOpen(o))},o.openWithEvent=function(e,t=null){o.openAt(e.clientX,e.clientY,t)},o.close=function(){a&&(a=0,M(0),g(-1),o.setMotion("none"),o.visible=0,o.onClose(o))},o.isOpen=function(){return a},o.clickItem=function(e){if(!h(e))return;const t=o.items[e];o.close(),"function"==typeof t.onClick&&t.onClick(o,t,e),o.onClick(o,t,e)},o.attachTo=function(e,t){t=t||o.trigger;const n=e.on(t,function(t,n){n.preventDefault();const i=s==e&&Date.now()-u<1e3;s=null,i||1==o.enabled&&o.openWithEvent(n,e)});return c.push({obj:e,trigger:t,removeEvent:n}),function(){o.detach(e)}},o.detach=function(e){c=c.filter(function(t){return t.obj!=e||("function"==typeof t.removeEvent&&t.removeEvent(),!1)})},o.setEnabled=function(e){o.enabled=d(e),1!=o.enabled&&o.close()},o.refresh=v;const E=o.remove;if(o.superRemove=E,o.remove=function(){o&&(o.close(),c.slice().forEach(function(e){o.detach(e.obj)}),E.call(o),o=null)},o.css={position:"fixed",boxSizing:"border-box",minWidth:o.minWidth+"px",outline:"none",userSelect:"none"},o.maxWidth>0&&(o.css.maxWidth=o.maxWidth+"px"),o.tabIndex=-1,o.role="menu",o.aria={label:o.ariaLabel},o.content=VGroup({width:"auto",height:"auto",align:"left top",gap:0,position:"relative"}),o.content.css.alignItems="stretch",endGroup(),o.on("mousedown",function(e,t){t.preventDefault()}),o.on("contextmenu",function(e,t){t.preventDefault()}),o.on("mouseleave",function(){g(-1)}),o.setEnabled(o.enabled),o.setItems(e.items),o.visible=0,o.target){(Array.isArray(o.target)?o.target:[o.target]).forEach(function(e){o.attachTo(e,o.trigger)})}return endObject(o),setDefaultContainerBox(n),o};ContextMenu.escapeHtml=basic.escapeHtml,ContextMenu.styles={classic:ContextMenuDefaults.style,dark:{menu:{color:"#232322",borderColor:"rgba(255, 255, 255, 0.12)",shadow:"0px 8px 24px rgba(0, 0, 0, 0.5)"},item:{textColor:"rgba(255, 255, 255, 0.85)"},itemHover:{textColor:"rgba(255, 255, 255, 0.95)",color:"rgba(255, 255, 255, 0.08)"},disabled:{textColor:"rgba(255, 255, 255, 0.35)"},separator:{color:"rgba(255, 255, 255, 0.10)"}}};
2
+ "use strict";const ContextMenuDefaults={key:"0",items:[],target:null,trigger:"contextmenu",minWidth:180,maxWidth:320,enabled:1,ariaLabel:"Menu",onClick:function(e,t,n){},onOpen:function(e){},onClose:function(e){},onSideKey:function(e,t){},parentMenu:null,styleName:"light",style:{menu:{color:"white",border:1,borderColor:Black(.12),round:8,padding:4,shadow:"0px 8px 24px "+Black(.14),zIndex:1e3},item:{height:32,fontSize:14,textColor:Black(.85),color:"transparent",round:5,padding:10,gap:10,border:0,borderColor:"transparent"},itemHover:{textColor:Black(.9),color:Black(.06),borderColor:""},disabled:{textColor:Black(.35),opacity:.4},icon:{width:16,height:16,opacity:.85},submenu:{arrowOpacity:.55,overlap:4},shortcut:{fontSize:12,opacity:.6,space:24},separator:{color:Black(.1),space:4}}},ContextMenu=function(e={}){basic.applyStylePackage(e,ContextMenu.styles,ContextMenuDefaults),mergeIntoIfMissing(e,ContextMenuDefaults);const t=e.style.menu;e.width="auto",e.height="auto",e.color=t.color,e.border=t.border,e.borderColor=t.borderColor,e.round=t.round,e.padding=t.padding,e.zIndex=t.zIndex,e.boxShadow=t.shadow;const n=getDefaultContainerBox();setDefaultContainerBox(page);let o=startObject(e);const i=o.style;let r=[],c=[],a=0,l=-1,s=null,u=0,m="";let d=-1;o.items=[],o.source=null;const h=function(e){return basic.isOn(e)?1:0},f=function(e){if("-"===e||e&&"separator"==e.type)return{type:"separator"};if("string"==typeof e||"number"==typeof e)return{type:"item",text:String(e),enabled:1};const t=Object.assign({text:"",enabled:1},e);return t.type="item",t.enabled=h(t.enabled),t},p=function(e){return!!(e&&"item"==e.type&&Array.isArray(e.items)&&e.items.length)},g=function(e){return"item"==e.type&&void 0!==e.checked&&null!==e.checked},b=function(){const e=r[d];return e&&e.submenu&&e.submenu.isOpen()?e.submenu:null},x=function(e){if(!o||!e)return!1;if(o.elem.contains(e))return!0;const t=b();return!(!t||!t.containsElement(e))},y=function(){let e=o;for(;e.parentMenu;)e=e.parentMenu;return e},w=function(e){const t=o.items[e];return!(!t||"item"!=t.type||1!=t.enabled)},C=function(e){if(l==e)return;e>=0&&e!=d&&o.closeSubmenu();const t=r[l],n=l==d&&b();t&&t.label&&!n&&v(t,0),l=e;const i=r[l];i&&i.label&&v(i,1)},v=function(e,t){const n=t?i.itemHover:i.item,o=1==e.item.enabled?n.textColor:i.disabled.textColor;e.color=n.color,i.item.border&&(e.borderColor=t&&i.itemHover.borderColor?i.itemHover.borderColor:i.item.borderColor),e.label.textColor=o,e.icon&&e.icon.isSvg&&(e.icon.textColor=o),e.arrow&&(e.arrow.textColor=o),e.lblShortcut&&(e.lblShortcut.textColor=o)},k=function(e){const t=1==e.item.enabled;if(e.cursor=t?"pointer":"default",e.aria={disabled:t?"false":"true"},e.icon){const n=e.icon.isSvg?i.icon.opacity:1,o=e.item.iconFile||e.item.icon;e.icon.opacity=t||!o?n:i.disabled.opacity}p(e.item)&&(e.aria={haspopup:"menu"}),v(e,0)},M=function(e){const t=o.items.length;if(0==t)return;let n=l<0&&e<0?t:l;for(let o=0;o<t;o++)if(n=(n+e+t)%t,w(n))return void C(n)},S=function(e){const t=basic.isOn(e.item.checked);e.icon.text=t?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 8.5l3 3 6-7"/></svg>':"",e.aria={checked:t?"true":"false"}},I=function(){B(),r.forEach(function(e){e.remove()}),r=[],l=-1;const e=o.items.some(function(e){return"item"==e.type&&(e.iconFile||e.icon||g(e))});o.items.forEach(function(t,n){createIn(o.content,function(){r.push("separator"==t.type?function(){const e=Box({width:"auto",height:1,color:i.separator.color,shrink:0});return e.css.margin=i.separator.space+"px "+i.item.padding+"px",e.role="separator",e}():function(e,t,n){const r=HGroup({width:"auto",height:i.item.height,align:"left center",gap:i.item.gap,padding:[i.item.padding,0],round:i.item.round});return i.item.border&&r.props({border:i.item.border,borderColor:i.item.borderColor}),r.role="menuitem",r.item=e,n&&(g(e)?(r.icon=Label({width:i.icon.width,height:i.icon.height,shrink:0}),r.icon.elem.classList.add("context-menu-svg"),r.icon.isSvg=1,r.role="menuitemcheckbox",S(r)):e.icon?(r.icon=Label({width:i.icon.width,height:i.icon.height,shrink:0}),r.icon.text=e.icon,r.icon.elem.classList.add("context-menu-svg"),r.icon.isSvg=1):e.iconFile?(r.icon=Icon({width:i.icon.width,height:i.icon.height,shrink:0}),r.icon.load(e.iconFile),r.icon.elem.alt=""):r.icon=Box({width:i.icon.width,height:i.icon.height,color:"transparent",shrink:0})),r.label=Label({plainText:e.text,fontSize:i.item.fontSize,ellipsis:1,shrink:1}),r.label.css.minWidth="0",r.label.grow=1,e.shortcut&&(r.lblShortcut=Label({plainText:e.shortcut,fontSize:i.shortcut.fontSize,opacity:i.shortcut.opacity,shrink:0,css:{marginLeft:i.shortcut.space-i.item.gap+"px",whiteSpace:"nowrap"}})),p(e)&&(r.arrow=Label({width:14,height:i.icon.height,shrink:0,opacity:i.submenu.arrowOpacity}),r.arrow.text='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M6.5 4l4 4-4 4"/></svg>',r.arrow.elem.classList.add("context-menu-svg")),endGroup(),k(r),r.on("mouseenter",function(){C(1==e.enabled?t:-1),1==e.enabled&&p(e)&&A(t,0)}),r.on("click",function(){p(e)?1==e.enabled&&A(t,0):o.clickItem(t)}),r}(t,n,e))})})},B=function(){d=-1,r.forEach(function(e){e.submenu&&e.submenu.remove(),e.submenu=null})},A=function(e,t){const n=r[e],c=o.items[e];n&&p(c)&&(d==e&&b()||(o.closeSubmenu(),n.submenu||(n.submenu=ContextMenu({items:c.items,styleName:o.styleName,style:i,minWidth:o.minWidth,maxWidth:o.maxWidth,ariaLabel:c.text,parentMenu:o,onClick:function(e,t,n){o.onClick(e,t,n)}})),d=e,v(n,1),n.submenu.openBeside(n.elem.getBoundingClientRect())),t&&n.submenu.activateFirst())},L=function(e){if(!x(e.target)){if(0===e.button&&o.source&&o.source.elem.contains(e.target)){const e=c.find(function(e){return e.obj==o.source});e&&"click"==e.trigger&&(s=o.source,u=Date.now())}o.close()}},O=function(e){const t=b();if(t&&t.hasActive())return void t.handleKey(e);const n=o.items[l],i="ArrowRight"===e.key||"Enter"===e.key||" "===e.key;if("Escape"===e.key||"ArrowLeft"===e.key&&o.parentMenu)e.preventDefault(),"Escape"===e.key&&e.stopPropagation(),o.parentMenu?o.parentMenu.closeSubmenu():o.close();else if(i&&p(n)&&1==n.enabled)e.preventDefault(),A(l,1);else if("ArrowDown"===e.key)e.preventDefault(),M(1);else if("ArrowUp"===e.key)e.preventDefault(),M(-1);else if("Enter"===e.key||" "===e.key){if(l<0)return;e.preventDefault(),o.clickItem(l)}else if("Tab"===e.key)y().close();else if("ArrowLeft"===e.key||"ArrowRight"===e.key){e.preventDefault();const t=y();t.onSideKey(t,"ArrowRight"===e.key?1:-1)}},D=function(e){x(e.target)||o.close()},E=function(){o.close()},W=function(){a&&page.width+"x"+page.height!=m&&o.close()},z=function(e){const t=e?"addEventListener":"removeEventListener";document[t]("pointerdown",L,!0),document[t]("keydown",O,!0),document[t]("wheel",D,!0),window[t]("blur",E),e?page.onResize(W):page.remove_onResize(W)};o.setItems=function(e){o.items=(e||[]).map(f),I(),a&&o.close()},o.getItems=function(){return o.items.slice()},o.getItemByKey=function(e){return o.items.find(function(t){return t.key==e})||null},o.setItemEnabled=function(e,t){const n=o.getItemByKey(e);if(!n)return;n.enabled=h(t);const i=o.items.indexOf(n);1!=n.enabled&&l==i&&C(-1),k(r[i]),l==i&&v(r[i],1)},o.setItemChecked=function(e,t){const n=o.getItemByKey(e);n&&g(n)&&(n.checked=h(t),S(r[o.items.indexOf(n)]))};const H=function(e){a=1,m=page.width+"x"+page.height,o.zIndex=basic.zIndexAbove(o.parentMenu||o.source,t.zIndex),o.setMotion("none"),o.opacity=0,o.css.transform="scale(0.97)",o.visible=1,e(),requestAnimationFrame(function(){o&&a&&(o.setMotion("opacity 0.12s, transform 0.12s"),o.opacity=1,o.css.transform="scale(1)")}),o.parentMenu||(o.elem.focus({preventScroll:!0}),z(1)),o.onOpen(o)};o.openAt=function(e,t,n=null){1==o.enabled&&0!=o.items.length&&(a&&o.close(),o.source=n,H(function(){!function(e,t){const n=o.elem.offsetWidth,i=o.elem.offsetHeight;let r=e,c=t,a="left",l="top";r+n>page.width-8&&(r=e-n,a="right"),c+i>page.height-8&&(c=t-i,l="bottom"),r=Math.max(8,Math.min(r,page.width-n-8)),c=Math.max(8,Math.min(c,page.height-i-8)),o.left=r,o.top=c,o.css.transformOrigin=a+" "+l}(withPageZoom(e),withPageZoom(t))}))},o.openWithEvent=function(e,t=null){o.openAt(e.clientX,e.clientY,t)},o.openBelow=function(e){1==o.enabled&&0!=o.items.length&&(a&&o.close(),o.source=e,H(function(){!function(e){const t=o.elem.offsetWidth,n=o.elem.offsetHeight,i=withPageZoom(e.left),r=withPageZoom(e.bottom),c=withPageZoom(e.top),a=!(r+n<=page.height-8)&&c-n>=8;o.left=Math.max(8,Math.min(i,page.width-t-8)),o.top=a?c-n:Math.max(8,Math.min(r,page.height-n-8)),o.css.transformOrigin="left "+(a?"bottom":"top")}(e.elem.getBoundingClientRect())}))},o.close=function(){a&&(a=0,o.closeSubmenu(),o.parentMenu||z(0),C(-1),o.setMotion("none"),o.visible=0,o.onClose(o))},o.isOpen=function(){return a},o.clickItem=function(e){if(!w(e))return;const t=o.items[e];p(t)?A(e,1):(y().close(),"function"==typeof t.onClick&&t.onClick(o,t,e),o.onClick(o,t,e))},o.attachTo=function(e,t){t=t||o.trigger;const n=e.on(t,function(t,n){n.preventDefault();const i=s==e&&Date.now()-u<1e3;s=null,i||1==o.enabled&&o.openWithEvent(n,e)});return c.push({obj:e,trigger:t,removeEvent:n}),function(){o.detach(e)}},o.detach=function(e){c=c.filter(function(t){return t.obj!=e||("function"==typeof t.removeEvent&&t.removeEvent(),!1)})},o.setEnabled=function(e){o.enabled=h(e),1!=o.enabled&&o.close()},o.refresh=I,o.closeSubmenu=function(){const e=b(),t=r[d],n=d;d=-1,e&&e.close(),t&&t.label&&l!=n&&v(t,0)},o.openBeside=function(e){0!=o.items.length&&(a&&o.close(),o.source=o.parentMenu?o.parentMenu.source:null,H(function(){!function(e){const t=o.elem.offsetWidth,n=o.elem.offsetHeight,r=i.submenu.overlap,c=i.menu.padding+i.menu.border;let a=withPageZoom(e.right)-r,l="left";a+t>page.width-8&&(a=withPageZoom(e.left)-t+r,l="right");const s=withPageZoom(e.top)-c;o.left=Math.max(8,Math.min(a,page.width-t-8)),o.top=Math.max(8,Math.min(s,page.height-n-8)),o.css.transformOrigin=l+" top"}(e)}))},o.containsElement=x,o.handleKey=O,o.hasActive=function(){return l>=0?1:0},o.activateFirst=function(){C(-1),M(1)};const R=o.remove;if(o.superRemove=R,o.remove=function(){o&&(o.close(),c.slice().forEach(function(e){o.detach(e.obj)}),B(),R.call(o),o=null)},basic.addCss("context-menu-svg",".context-menu-svg { display: flex; align-items: center; justify-content: center; } .context-menu-svg svg { display: block; width: 100%; height: 100%; }"),o.css={position:"fixed",boxSizing:"border-box",minWidth:o.minWidth+"px",outline:"none",userSelect:"none"},o.maxWidth>0&&(o.css.maxWidth=o.maxWidth+"px"),o.tabIndex=-1,o.role="menu",o.aria={label:o.ariaLabel},o.content=VGroup({width:"auto",height:"auto",align:"left top",gap:0,position:"relative"}),o.content.css.alignItems="stretch",endGroup(),o.on("mousedown",function(e,t){t.preventDefault()}),o.on("contextmenu",function(e,t){t.preventDefault()}),o.on("mouseleave",function(){C(-1)}),o.setEnabled(o.enabled),o.setItems(e.items),o.visible=0,o.target){(Array.isArray(o.target)?o.target:[o.target]).forEach(function(e){o.attachTo(e,o.trigger)})}return endObject(o),setDefaultContainerBox(n),o};ContextMenu.escapeHtml=basic.escapeHtml,ContextMenu.styles={light:ContextMenuDefaults.style,dark:{menu:{color:"#232322",borderColor:"rgba(255, 255, 255, 0.12)",shadow:"0px 8px 24px rgba(0, 0, 0, 0.5)"},item:{textColor:"rgba(255, 255, 255, 0.85)"},itemHover:{textColor:"rgba(255, 255, 255, 0.95)",color:"rgba(255, 255, 255, 0.08)"},disabled:{textColor:"rgba(255, 255, 255, 0.35)"},separator:{color:"rgba(255, 255, 255, 0.10)"}}},ContextMenu.styles.classic=ContextMenu.styles.light,ContextMenu.createMinimalStyle=function(e){return{menu:{color:e.ground,border:1,borderColor:e.line,round:4,padding:4,shadow:"none"},item:{height:28,fontSize:13,textColor:e.text,color:"transparent",round:3,padding:8,gap:8,border:1,borderColor:"transparent"},itemHover:{textColor:e.text,color:"transparent",borderColor:e.lineHover},disabled:{textColor:e.faintText,opacity:.4},icon:{width:14,height:14,opacity:.85},shortcut:{fontSize:12,opacity:.5,space:20},separator:{color:e.line,space:4}}},ContextMenu.MINIMAL_COLORS={ground:"#FFFFFF",text:Black(.85),faintText:Black(.54),line:Black(.2),lineHover:Black(.45)},ContextMenu.styles.minimal=ContextMenu.createMinimalStyle(ContextMenu.MINIMAL_COLORS),ContextMenu.MINIMAL_DARK_COLORS={ground:"#1A1A19",text:White(.88),faintText:White(.48),line:White(.18),lineHover:White(.42)},ContextMenu.styles.minimalDark=ContextMenu.createMinimalStyle(ContextMenu.MINIMAL_DARK_COLORS);
@@ -0,0 +1,2 @@
1
+ /* Bismillah */
2
+ "use strict";const CurrencyFieldDefaults={required:0,titleText:"CURRENCY",placeholder:"(auto)",maxLength:35,allowNegative:1,allowDecimal:1,decimalSeparator:".",maxDecimalDigits:2,groupSeparator:",",unitText:"TL"},CurrencyField=function(e={}){const t=startExtendedObject(TextField,CurrencyFieldDefaults,e),a=t.input.inputElement;let l=0;const r=function(e){const a=t.groupSeparator.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return e.replace(new RegExp(a,"g"),"")},i=function(e){let a=r(e),l="0-9";t.allowNegative&&(l+="-"),t.allowDecimal&&(l+="\\"+t.decimalSeparator);const i=new RegExp(`[^${l}]`,"g");if(a=a.replace(i,""),t.allowNegative&&(a=a.replace(/(?!^)-/g,"")),t.allowDecimal){const e=t.decimalSeparator,l=a.split(e);l.length>2&&(l.splice(1,l.length-1,l.slice(1).join("")),a=l[0]+e+l[1]),2===l.length&&t.maxDecimalDigits>=0&&(l[1]=l[1].substring(0,t.maxDecimalDigits),a=l[0]+e+l[1])}return 0!=parseFloat(a)||a.includes(t.decimalSeparator)||a.includes("-")||(a="0"),a==t.decimalSeparator&&(a="0"+t.decimalSeparator),a=="-"+t.decimalSeparator&&(a="-0"+t.decimalSeparator),function(e){let a="",l=0,r=!(e=e.toString()).includes(t.decimalSeparator);const i="-"==e[0]?1:0;for(let n=e.length-1;n>=0;n--)a=e[n]+a,r&&n>i&&(isNaN(e[n])||l++,3==l&&(l=0,a=t.groupSeparator+a)),r||e[n]!=t.decimalSeparator||(r=!0);return a}(a)};t.getValueAsNumber=function(){return r(t.getValue())};const n=t.setValue;return t.applyFormattedValueToInput=function(){l=a.value.length-a.selectionStart,n(i(t.getValue())),function(){const e=a.value.length-l;a.setSelectionRange(e,e)}()},t.setValue=function(e){n(i(String(e??"")))},"(auto)"==t.placeholder&&t.setPlaceholder(function(){let e="";return t.allowNegative&&(e="-"),e+="1"+t.groupSeparator+"000"+t.groupSeparator+"000",t.allowDecimal&&(e+=t.decimalSeparator+"0".repeat(t.maxDecimalDigits)),e}()),""!==a.value&&t.setValue(a.value),endExtendedObject(t)};
@@ -1,2 +1,2 @@
1
1
  /* Bismillah */
2
- "use strict";const DataTableDefaults={width:600,height:400,columns:[],rows:[],idIndex:0,idKey:"id",sortKey:"",sortDirection:"asc",canSelect:1,rowHeight:"auto",titleText:"",showSearch:0,searchParams:{},emptyText:"There are no records.",noResultText:"No records found.",sortIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="512" height="512"><path d="M17.71,9.88l-4.3-4.29a2,2,0,0,0-2.82,0L6.29,9.88a1,1,0,0,0,0,1.41,1,1,0,0,0,1.42,0L11,8V19a1,1,0,0,0,2,0V8l3.29,3.29a1,1,0,1,0,1.42-1.41Z"/></svg>'),useScrollBar:1,onRowClick:function(e,o){},onSelect:function(e,o){},onSort:function(e){},styleName:"classic",style:{box:{color:"white",border:1,borderColor:Black(.15),round:6},focus:{ringColor:"rgba(95, 158, 160, 0.6)"},header:{height:60,padding:[16,0],gap:12},headerTitle:{fontSize:20,textColor:Black(.75),fontFamily:"opensans-bold"},search:{width:220,height:40,fontSize:16,searchIconSize:20},searchStyleName:"ozden",titleRow:{height:50,color:"whitesmoke",lineColor:Black(.2)},titleCell:{padding:10,gap:6,fontSize:15,textColor:Black(.8),fontFamily:"opensans-bold",lineColor:Black(.08),hoverColor:"white",uppercase:1},titleIcon:{size:16,opacity:.7,invert:0},sortIcon:{size:16,opacity:.25,activeOpacity:1,invert:0},row:{padding:[10,12],fontSize:15,textColor:Black(.7),fontFamily:"opensans",oddColor:"white",evenColor:"#F7F7F7",hoverColor:"rgba(254, 193, 8, 0.08)",selectedColor:"rgba(254, 193, 8, 0.18)",lineColor:Black(.08)},empty:{fontSize:15,textColor:Black(.45),top:40},scrollBar:{neverHide:0,showDots:0}}},DataTable=function(e={}){basic.applyStylePackage(e,DataTable.styles,DataTableDefaults),mergeIntoIfMissing(e,DataTableDefaults),e.columns=DataTable.fitColumns(e.columns),e.rows=Array.isArray(e.rows)?e.rows.slice():[];let o=startObject(e);const t=o.style;let n="",r="",l=0;o.rowList=[],o.shownRows=[],o.selectedRow=null,o.titleCells=[];const i=function(e){return Array.isArray(e)?e[o.idIndex]:e?e[o.idKey]:void 0},c=function(e,o){return Array.isArray(e)?e[o.valueIndex]:e?e[o.key]:void 0},s=function(e){return o.columns.find(function(o){return o.key==e})||null},a=function(e){return o.rowList.find(function(o){return o.id==e})||null},u=function(e,o){if("auto"==o.width)return e.width=0,void(e.css={flex:"1 1 0",minWidth:"0px"});e.css={flex:"0 0 auto"},e.width=o.width},d=function(e){e.clickable=1,e.cursor="pointer",e.role="button",e.tabIndex=0,e.aria={label:"Sort by "+(e.column.title||e.column.key)},e.setFocusRing(t.focus.ringColor),e.onHoverChange(function(o,n){e.color=n?t.titleCell.hoverColor:"transparent"}),e.on("click",function(){h(e.column)}),e.on("keydown",function(o,t){"Enter"!=t.key&&" "!=t.key||(t.preventDefault(),h(e.column))})},h=function(e){const t=o.sortKey==e.key&&"asc"==o.sortDirection?"desc":"asc";o.sortBy(e.key,t),o.onSort(o)},f=function(e,n){const r="auto"!=o.rowHeight,l=HGroup({height:"auto",align:DataTable.toAlign(n.align),padding:t.row.padding,color:n.cellColor||"transparent",role:"cell",css:{alignSelf:"stretch"}});return u(l,n),l.column=n,l.label=Label({fontSize:t.row.fontSize,textColor:t.row.textColor,fontFamily:t.row.fontFamily,textAlign:n.align,ellipsis:r?1:0,css:r?{minWidth:"0px"}:{minWidth:"0px",whiteSpace:"normal",overflowWrap:"anywhere"},...n.cellStyle}),endGroup(),w(l,e),l},w=function(e,t){const n=e.column,r=c(t.data,n);n.createView?(e.label.visible=0,e.content&&e.content.remove(),e.content=createIn(e,function(){const l=HGroup({width:"100%",height:"auto",align:DataTable.toAlign(n.align),clipContent:0});return n.createView(e,r,t,o),endGroup(),l})):e.label.plainText=DataTable.toText(r)},p=function(e,o){e.data=o,e.cells.forEach(function(o){w(o,e)})},g=function(e){const n=createIn(o.rowsGroup,function(){return function(e){const n=HGroup({width:"100%",height:o.rowHeight,align:"left top",color:t.row.oddColor,clickable:1,cursor:"pointer",role:"row",css:{borderBottom:"1px solid "+t.row.lineColor,flex:"0 0 auto"}});return n.data=e,n.id=i(e),n.isHover=0,n.cells=[],o.columns.forEach(function(e){n.cells.push(f(n,e))}),endGroup(),n.onHoverChange(function(e,o){n.isHover=o,y(n)}),n.on("click",function(){v(n)}),n}(e)});return o.rowList.push(n),n},b=function(e){e==o.selectedRow&&(o.selectedRow=null),e.remove()},y=function(e){e==o.selectedRow?e.color=t.row.selectedColor:e.isHover?e.color=t.row.hoverColor:e.color=e.isEven?t.row.evenColor:t.row.oddColor,e.aria={selected:e==o.selectedRow}},m=function(){const e=s(o.sortKey);if(!e)return o.rowList.slice();const t="desc"==o.sortDirection?-1:1;return o.rowList.slice().sort(function(o,n){return function(e,o,t){const n=c(e.data,t),r=c(o.data,t);return"number"==t.type?(parseFloat(n)||0)-(parseFloat(r)||0):DataTable.toText(n).localeCompare(DataTable.toText(r),void 0,{numeric:!0,sensitivity:"base"})}(o,n,e)*t})},x=function(){o.shownRows=[],m().forEach(function(e,t){e.css={order:String(t)},e.visible=function(e){return""==n||o.columns.some(function(o){return(!r||r==o.key)&&DataTable.toSearchText(c(e.data,o)).includes(n)})}(e)?1:0,e.visible&&(e.isEven=o.shownRows.length%2==1,o.shownRows.push(e))}),l=o.shownRows.length,o.rowList.forEach(y),o.titleCells.forEach(function(e){if(!e.sortIcon)return;const n=e.column.key==o.sortKey;e.sortIcon.opacity=n?t.sortIcon.activeOpacity:t.sortIcon.opacity,e.sortIcon.rotate=n&&"desc"==o.sortDirection?180:0,e.aria={sort:n?DataTable.toAriaSort(o.sortDirection):"none"}}),C()},C=function(){o.lblEmpty.plainText=0==o.rowList.length?o.emptyText:o.noResultText,o.lblEmpty.visible=0==l?1:0},T=function(e,t){if(e==o.selectedRow)return;const n=o.selectedRow;o.selectedRow=e,n&&y(n),e&&y(e),t||o.onSelect(o,e)},v=function(e){o.canSelect&&T(e,0),o.onRowClick(o,e)},S=function(e){const t=o.scrollBox.elem,n=e.elem.offsetTop+o.rowsGroup.elem.offsetTop,r=n+e.elem.offsetHeight;n<t.scrollTop?t.scrollTop=n:r>t.scrollTop+t.clientHeight&&(t.scrollTop=r-t.clientHeight)},R=function(){if("undefined"==typeof SearchInput)return void console.warn("DataTable: showSearch needs comp/search-input-v2.js (SearchInput).");const e=Object.assign({styleName:t.searchStyleName},DataTable.getSearchIconFiles(),t.search,o.searchParams);e.onSearch=function(e){o.search(e)},o.searchInput=SearchInput(e),o.searchInput.shrink=0};o.setRows=function(e){o.clearRows(),o.rows=Array.isArray(e)?e.slice():[],o.rows.forEach(g),x()},o.updateRows=function(e){const t=new Map;o.rowList.forEach(function(e){t.set(e.id,e)}),o.rows=Array.isArray(e)?e.slice():[],o.rowList=[],o.rows.forEach(function(e){const n=t.get(i(e));n?(t.delete(n.id),p(n,e),o.rowList.push(n)):g(e)});const n=!!o.selectedRow;t.forEach(b),x(),n&&!o.selectedRow&&o.onSelect(o,null)},o.addRow=function(e){o.rows.push(e),g(e),x()},o.updateRow=function(e){const t=a(i(e));t&&(o.rows[o.rowList.indexOf(t)]=e,p(t,e),x())},o.removeRow=function(e){const t=a(e);if(!t)return;const n=o.rowList.indexOf(t),r=t==o.selectedRow;o.rows.splice(n,1),o.rowList.splice(n,1),b(t),x(),r&&o.onSelect(o,null)},o.clearRows=function(){o.rowList.forEach(b),o.rowList=[],o.rows=[],x()},o.getRows=function(){return o.rows.slice()},o.getRow=function(e){return a(e)},o.sortBy=function(e,t="asc"){o.sortKey=s(e)?e:"",o.sortDirection="desc"==t?"desc":"asc",o.scrollBox.elem.scrollTop=0,x()},o.clearSort=function(){o.sortBy("")},o.search=function(e,t=""){return n=DataTable.toSearchText(e).trim(),r=t,o.scrollBox.elem.scrollTop=0,x(),l},o.select=function(e,t=0){if(!o.canSelect)return 0;const n=a(e);return n?(T(n,t),S(n),1):0},o.clearSelection=function(e=0){T(null,e)},o.getSelectedId=function(){return o.selectedRow?o.selectedRow.id:null},o.getSelectedData=function(){return o.selectedRow?o.selectedRow.data:null},o.setTitleText=function(e){o.titleText=e,o.lblTitle&&(o.lblTitle.plainText=e)},o.getBiggestId=function(){let e=0;return o.rows.forEach(function(o){e=Math.max(e,basic.num(i(o))||0)}),e},o.props(t.box),o.role="grid",o.tabIndex=0,o.aria={label:o.titleText||"Table"},o.setFocusRing(t.focus.ringColor);const D=o.titleText||1==o.showSearch?(o.header=HGroup({left:0,top:0,width:"100%",height:t.header.height,align:"left center",gap:t.header.gap,padding:t.header.padding,clipContent:0,position:"absolute"}),o.lblTitle=Label({...t.headerTitle,plainText:o.titleText,ellipsis:1,grow:1,css:{minWidth:"0px"}}),1==o.showSearch&&R(),endGroup(),t.header.height):0,I=D+t.titleRow.height;o.titleRow=HGroup({left:0,top:D,width:"100%",height:t.titleRow.height,align:"left center",color:t.titleRow.color,position:"absolute",role:"row",css:{borderBottom:"1px solid "+t.titleRow.lineColor,borderTop:D?"1px solid "+t.titleRow.lineColor:"none"}}),o.columns.forEach(function(e,n){o.titleCells.push(function(e,n){const r=n==o.columns.length-1,l=HGroup({height:"100%",align:DataTable.toAlign(e.align),gap:t.titleCell.gap,padding:[t.titleCell.padding,0],color:"transparent"});return u(l,e),r||(l.css={borderRight:"1px solid "+t.titleCell.lineColor}),l.column=e,e.iconFile&&(l.icon=Icon({width:t.titleIcon.size,height:t.titleIcon.size,opacity:t.titleIcon.opacity}),l.icon.load(e.iconFile),l.icon.shrink=0,t.titleIcon.invert&&(l.icon.css={filter:"invert(1)"})),l.label=Label({plainText:e.title,fontSize:t.titleCell.fontSize,textColor:t.titleCell.textColor,fontFamily:t.titleCell.fontFamily,ellipsis:1,css:{minWidth:"0px",textTransform:t.titleCell.uppercase?"uppercase":"none"}}),e.sortable&&(l.sortIcon=Icon({width:t.sortIcon.size,height:t.sortIcon.size,opacity:t.sortIcon.opacity}),l.sortIcon.load(o.sortIconFile),l.sortIcon.shrink=0,t.sortIcon.invert&&(l.sortIcon.css={filter:"invert(1)"}),l.sortIcon.setMotion("opacity 0.3s, transform 0.3s")),endGroup(),e.sortable&&d(l),l}(e,n))}),endGroup(),o.scrollBox=startBox(0,I,"100%","calc(100% - "+I+"px)",{color:"transparent",scrollY:1}),o.rowsGroup=VGroup({width:"100%",height:"auto",align:"left top"}),endGroup(),endBox(),o.lblEmpty=Label({left:0,top:I+t.empty.top,width:"100%",fontSize:t.empty.fontSize,textColor:t.empty.textColor,textAlign:"center",visible:0}),1==o.useScrollBar&&"undefined"!=typeof ScrollBar&&(o.scrollBar=ScrollBar(Object.assign({scrollableBox:o.scrollBox},t.scrollBar))),o.on("keydown",function(e,t){if(t.target!=o.elem)return;if(!o.canSelect)return;const n={ArrowDown:1,ArrowUp:-1,PageDown:10,PageUp:-10,End:1/0,Home:-1/0};if(void 0!==n[t.key])return t.preventDefault(),void function(e){if(0==o.shownRows.length)return;let t=o.shownRows.indexOf(o.selectedRow);-1==t&&(t=e>0?-1:o.shownRows.length);const n=Math.max(0,Math.min(o.shownRows.length-1,t+e));T(o.shownRows[n],0),S(o.shownRows[n])}(n[t.key]);"Enter"==t.key&&o.selectedRow&&(t.preventDefault(),o.onRowClick(o,o.selectedRow))});const k=o.rows;return o.rows=[],o.setRows(k),endObject(o)};DataTable.fitColumns=function(e){return Array.isArray(e)?e.map(function(e,o){const t=Object.assign({key:"column"+o,title:"",valueIndex:o,type:"text",width:"auto",align:"left",sortable:0,iconFile:"",cellColor:"",cellStyle:{},createView:null},e);return t.title=DataTable.toText(t.title),t}):[]},DataTable.toText=function(e){return null==e?"":String(e)},DataTable.toSearchText=function(e){return DataTable.toText(e).toLocaleLowerCase("tr").normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/ı/g,"i")},DataTable.toAlign=function(e){return"center"==e?"center center":"right"==e?"right center":"left center"},DataTable.toAriaSort=function(e){return"desc"==e?"descending":"ascending"},DataTable.getSearchIconFiles=function(){const e=document.querySelector('script[src*="search-input-v2"]');if(!e)return{};const o=e.getAttribute("src").replace(/search-input-v2(\.min)?\.js.*$/,"search-input-v2/");return{searchIconFile:o+"search.svg",clearIconFile:o+"clear-round.svg"}},DataTable.styles={classic:DataTableDefaults.style,minimal:{box:{color:"white",border:0,round:0},titleRow:{height:50,color:"white",lineColor:Black(.2)},titleCell:{lineColor:"transparent",hoverColor:"whitesmoke",uppercase:0},row:{evenColor:"white",hoverColor:Black(.02),selectedColor:Black(.05)}},dark:{box:{color:"#232428",border:1,borderColor:"rgba(255, 255, 255, 0.12)",round:6},focus:{ringColor:"rgba(95, 179, 181, 0.7)"},headerTitle:{fontSize:20,textColor:"rgba(255, 255, 255, 0.9)",fontFamily:"opensans-bold"},searchStyleName:"ozdenDark",titleRow:{height:50,color:"#2B2D31",lineColor:"rgba(255, 255, 255, 0.14)"},titleCell:{textColor:"rgba(255, 255, 255, 0.85)",lineColor:"rgba(255, 255, 255, 0.08)",hoverColor:"#33353A"},titleIcon:{size:16,opacity:.8,invert:1},sortIcon:{size:16,opacity:.3,activeOpacity:1,invert:1},row:{textColor:"rgba(255, 255, 255, 0.75)",oddColor:"#232428",evenColor:"#27292D",hoverColor:"#2E3035",selectedColor:"#24383A",lineColor:"rgba(255, 255, 255, 0.06)"},empty:{fontSize:15,textColor:"rgba(255, 255, 255, 0.45)",top:40},scrollBar:{neverHide:0,showDots:0,bar_color:"#A0A0A0",bar_mouseOverColor:"#D0D0D0"}}};
2
+ "use strict";const DataTableDefaults={width:600,height:400,columns:[],rows:[],idIndex:0,idKey:"id",sortKey:"",sortDirection:"asc",canSelect:1,rowHeight:"auto",titleText:"",showSearch:0,searchParams:{},emptyText:"There are no records.",noResultText:"No records found.",sortIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="512" height="512"><path d="M17.71,9.88l-4.3-4.29a2,2,0,0,0-2.82,0L6.29,9.88a1,1,0,0,0,0,1.41,1,1,0,0,0,1.42,0L11,8V19a1,1,0,0,0,2,0V8l3.29,3.29a1,1,0,1,0,1.42-1.41Z"/></svg>'),useScrollBar:1,onRowClick:function(e,o){},onSelect:function(e,o){},onSort:function(e){},styleName:"light",style:{box:{color:"white",border:1,borderColor:Black(.15),round:6},focus:{ringColor:"rgba(95, 158, 160, 0.6)"},header:{height:60,padding:[16,0],gap:12},headerTitle:{fontSize:20,textColor:Black(.75),fontFamily:"opensans-bold"},search:{width:220,height:40,fontSize:16,searchIconSize:20},searchStyleName:"ozden",titleRow:{height:50,color:"whitesmoke",lineColor:Black(.2)},titleCell:{padding:10,gap:6,fontSize:15,textColor:Black(.8),fontFamily:"opensans-bold",lineColor:Black(.08),hoverColor:"white",uppercase:1},titleIcon:{size:16,opacity:.7,invert:0},sortIcon:{size:16,opacity:.25,activeOpacity:1,invert:0},row:{padding:[10,12],fontSize:15,textColor:Black(.7),fontFamily:"opensans",oddColor:"white",evenColor:"#F7F7F7",hoverColor:"rgba(254, 193, 8, 0.08)",selectedColor:"rgba(254, 193, 8, 0.18)",lineColor:Black(.08)},empty:{fontSize:15,textColor:Black(.45),top:40},scrollBar:{neverHide:0,showDots:0}}},DataTable=function(e={}){basic.applyStylePackage(e,DataTable.styles,DataTableDefaults),mergeIntoIfMissing(e,DataTableDefaults),e.columns=DataTable.fitColumns(e.columns),e.rows=Array.isArray(e.rows)?e.rows.slice():[];let o=startObject(e);const t=o.style;let n="",r="",l=0;o.rowList=[],o.shownRows=[],o.selectedRow=null,o.titleCells=[];const i=function(e){return Array.isArray(e)?e[o.idIndex]:e?e[o.idKey]:void 0},a=function(e,o){return Array.isArray(e)?e[o.valueIndex]:e?e[o.key]:void 0},c=function(e){return o.columns.find(function(o){return o.key==e})||null},s=function(e){return o.rowList.find(function(o){return o.id==e})||null},u=function(e,o){if("auto"==o.width)return e.width=0,void(e.css={flex:"1 1 0",minWidth:o.minWidth+"px"});e.css={flex:"0 0 auto"},e.width=o.width},d=function(e){e.clickable=1,e.cursor="pointer",e.role="button",e.tabIndex=0,e.aria={label:"Sort by "+(e.column.title||e.column.key)},e.setFocusRing(t.focus.ringColor),e.onHoverChange(function(o,n){e.color=n?t.titleCell.hoverColor:"transparent"}),e.on("click",function(){h(e.column)}),e.on("keydown",function(o,t){"Enter"!=t.key&&" "!=t.key||(t.preventDefault(),h(e.column))})},h=function(e){const t=o.sortKey==e.key&&"asc"==o.sortDirection?"desc":"asc";o.sortBy(e.key,t),o.onSort(o)},f=function(){if("number"==typeof o.rowHeight)return o.rowHeight;const e=t.row.padding,n=Array.isArray(e)?e[1]:e||0;return Math.round(1.4*t.row.fontSize+2*n+1)},p=function(e,n){const r="auto"!=o.rowHeight,l=HGroup({height:"auto",align:DataTable.toAlign(n.align),padding:t.row.padding,color:n.cellColor||"transparent",role:"cell",css:{alignSelf:"stretch"}});return u(l,n),l.column=n,l.label=Label({fontSize:t.row.fontSize,textColor:t.row.textColor,fontFamily:t.row.fontFamily,textAlign:n.align,ellipsis:r?1:0,css:r?{minWidth:"0px"}:{minWidth:"0px",whiteSpace:"normal",overflowWrap:"anywhere"},...n.cellStyle}),endGroup(),w(l,e),l},w=function(e,t){const n=e.column,r=a(t.data,n);n.createView?(e.label.visible=0,e.content&&e.content.remove(),e.content=createIn(e,function(){const l=HGroup({width:"100%",height:"auto",align:DataTable.toAlign(n.align),clipContent:0});return n.createView(e,r,t,o),endGroup(),l})):e.label.plainText=DataTable.toText(r)},g=function(e,o){e.data=o,e.cells.forEach(function(o){w(o,e)})},m=function(e){const n=createIn(o.rowsGroup,function(){return function(e){const n=HGroup({width:"100%",height:o.rowHeight,align:"left top",color:t.row.oddColor,clickable:1,cursor:"pointer",role:"row",css:{borderBottom:"1px solid "+t.row.lineColor,flex:"0 0 auto",contentVisibility:"auto",containIntrinsicSize:"auto "+f()+"px"}});return n.data=e,n.id=i(e),n.isHover=0,n.cells=[],o.columns.forEach(function(e){n.cells.push(p(n,e))}),endGroup(),n.onHoverChange(function(e,o){n.isHover=o,y(n)}),n.on("click",function(){S(n)}),n}(e)});return o.rowList.push(n),n},b=function(e){e==o.selectedRow&&(o.selectedRow=null),e.remove()},y=function(e){e==o.selectedRow?e.color=t.row.selectedColor:e.isHover?e.color=t.row.hoverColor:e.color=e.isEven?t.row.evenColor:t.row.oddColor,e.aria={selected:e==o.selectedRow}},C=function(){const e=c(o.sortKey);if(!e)return o.rowList.slice();const t="desc"==o.sortDirection?-1:1;return o.rowList.slice().sort(function(o,n){return function(e,o,t){const n=a(e.data,t),r=a(o.data,t);return"number"==t.type?(parseFloat(n)||0)-(parseFloat(r)||0):DataTable.toText(n).localeCompare(DataTable.toText(r),void 0,{numeric:!0,sensitivity:"base"})}(o,n,e)*t})},x=function(){o.shownRows=[],C().forEach(function(e,t){e.css={order:String(t)},e.visible=function(e){return""==n||o.columns.some(function(o){return(!r||r==o.key)&&DataTable.toSearchText(a(e.data,o)).includes(n)})}(e)?1:0,e.visible&&(e.isEven=o.shownRows.length%2==1,o.shownRows.push(e))}),l=o.shownRows.length,o.rowList.forEach(y),o.titleCells.forEach(function(e){if(!e.sortIcon)return;const n=e.column.key==o.sortKey;e.sortIcon.opacity=n?t.sortIcon.activeOpacity:t.sortIcon.opacity,e.sortIcon.rotate=n&&"desc"==o.sortDirection?180:0,e.aria={sort:n?DataTable.toAriaSort(o.sortDirection):"none"}}),T()},T=function(){o.lblEmpty.plainText=0==o.rowList.length?o.emptyText:o.noResultText,o.lblEmpty.visible=0==l?1:0},v=function(e,t){if(e==o.selectedRow)return;const n=o.selectedRow;o.selectedRow=e,n&&y(n),e&&y(e),t||o.onSelect(o,e)},S=function(e){o.canSelect&&v(e,0),o.onRowClick(o,e)},D=function(e){const t=o.scrollBox.elem,n=e.elem.offsetTop+o.rowsGroup.elem.offsetTop,r=n+e.elem.offsetHeight;n<t.scrollTop?t.scrollTop=n:r>t.scrollTop+t.clientHeight&&(t.scrollTop=r-t.clientHeight)},R=function(){if("undefined"==typeof SearchInput)return void console.warn("DataTable: showSearch needs comp/search-input.js (SearchInput).");const e=Object.assign({styleName:t.searchStyleName,clearOnEscape:1},t.search,o.searchParams);e.onChange=function(e){o.search(e.getSearchText())},o.searchInput=SearchInput(e),o.searchInput.shrink=0,o.searchInput.css={maxWidth:"60%"}};o.setRows=function(e){o.clearRows(),o.rows=Array.isArray(e)?e.slice():[],o.rows.forEach(m),x()},o.updateRows=function(e){const t=new Map;o.rowList.forEach(function(e){t.has(e.id)||t.set(e.id,[]),t.get(e.id).push(e)}),o.rows=Array.isArray(e)?e.slice():[],o.rowList=[],o.rows.forEach(function(e){const n=t.get(i(e)),r=n&&n.length?n.shift():null;r?(g(r,e),o.rowList.push(r)):m(e)});const n=!!o.selectedRow;t.forEach(function(e){e.forEach(function(e){b(e)})}),x(),n&&!o.selectedRow&&o.onSelect(o,null)},o.addRow=function(e){o.rows.push(e),m(e),x()},o.updateRow=function(e){const t=s(i(e));t&&(o.rows[o.rowList.indexOf(t)]=e,g(t,e),x())},o.removeRow=function(e){const t=s(e);if(!t)return;const n=o.rowList.indexOf(t),r=t==o.selectedRow;o.rows.splice(n,1),o.rowList.splice(n,1),b(t),x(),r&&o.onSelect(o,null)},o.clearRows=function(){o.rowList.forEach(b),o.rowList=[],o.rows=[],x()},o.getRows=function(){return o.rows.slice()},o.getRow=function(e){return s(e)},o.sortBy=function(e,t="asc"){o.sortKey=c(e)?e:"",o.sortDirection="desc"==t?"desc":"asc",o.scrollBox.elem.scrollTop=0,x()},o.clearSort=function(){o.sortBy("")},o.search=function(e,t=""){return n=DataTable.toSearchText(e).trim(),r=t,o.scrollBox.elem.scrollTop=0,x(),l},o.select=function(e,t=0){if(!o.canSelect)return 0;const n=s(e);return n?(v(n,t),D(n),1):0},o.clearSelection=function(e=0){v(null,e)},o.getSelectedId=function(){return o.selectedRow?o.selectedRow.id:null},o.getSelectedData=function(){return o.selectedRow?o.selectedRow.data:null},o.setTitleText=function(e){o.titleText=e,o.lblTitle&&(o.lblTitle.plainText=e)},o.getBiggestId=function(){let e=0;return o.rows.forEach(function(o){e=Math.max(e,basic.num(i(o))||0)}),e},o.props(t.box),o.role="grid",o.tabIndex=0,o.aria={label:o.titleText||"Table"},o.setFocusRing(t.focus.ringColor);const I=o.titleText||1==o.showSearch?(o.header=HGroup({left:0,top:0,width:"100%",height:t.header.height,align:"left center",gap:t.header.gap,padding:t.header.padding,clipContent:0,position:"absolute"}),o.lblTitle=Label({...t.headerTitle,plainText:o.titleText,ellipsis:1,grow:1,css:{minWidth:"0px"}}),1==o.showSearch&&R(),endGroup(),t.header.height):0,k=I+t.titleRow.height;o.titleRow=HGroup({left:0,top:I,width:"100%",height:t.titleRow.height,align:"left center",color:t.titleRow.color,position:"absolute",role:"row",css:{borderBottom:"1px solid "+t.titleRow.lineColor,borderTop:I?"1px solid "+t.titleRow.lineColor:"none"}}),o.columns.forEach(function(e,n){o.titleCells.push(function(e,n){const r=n==o.columns.length-1,l=HGroup({height:"100%",align:DataTable.toAlign(e.align),gap:t.titleCell.gap,padding:[t.titleCell.padding,0],color:"transparent"});return u(l,e),r||(l.css={borderRight:"1px solid "+t.titleCell.lineColor}),l.column=e,e.iconFile&&(l.icon=Icon({width:t.titleIcon.size,height:t.titleIcon.size,opacity:t.titleIcon.opacity}),l.icon.load(e.iconFile),l.icon.shrink=0,t.titleIcon.invert&&(l.icon.css={filter:"invert(1)"})),l.label=Label({plainText:e.title,fontSize:t.titleCell.fontSize,textColor:t.titleCell.textColor,fontFamily:t.titleCell.fontFamily,ellipsis:1,css:{minWidth:"0px",textTransform:t.titleCell.uppercase?"uppercase":"none"}}),e.sortable&&(l.sortIcon=Icon({width:t.sortIcon.size,height:t.sortIcon.size,opacity:t.sortIcon.opacity}),l.sortIcon.load(o.sortIconFile),l.sortIcon.shrink=0,t.sortIcon.invert&&(l.sortIcon.css={filter:"invert(1)"}),l.sortIcon.setMotion("opacity 0.3s, transform 0.3s")),endGroup(),e.sortable&&d(l),l}(e,n))}),endGroup(),o.scrollBox=startBox(0,k,"100%","calc(100% - "+k+"px)",{color:"transparent",scrollY:1,scrollX:1}),o.rowsGroup=VGroup({width:"100%",height:"auto",align:"left top",css:{minWidth:o.columns.reduce(function(e,o){return e+("auto"==o.width?o.minWidth:Number(o.width))},0)+"px"}}),endGroup(),endBox(),o.scrollBox.on("scroll",function(){o.titleRow.elem.scrollLeft=o.scrollBox.elem.scrollLeft}),o.lblEmpty=Label({left:0,top:k+t.empty.top,width:"100%",fontSize:t.empty.fontSize,textColor:t.empty.textColor,textAlign:"center",visible:0}),1==o.useScrollBar&&"undefined"!=typeof ScrollBar&&(o.scrollBar=ScrollBar(Object.assign({scrollableBox:o.scrollBox},t.scrollBar))),o.on("keydown",function(e,t){if(t.target!=o.elem)return;if(!o.canSelect)return;const n={ArrowDown:1,ArrowUp:-1,PageDown:10,PageUp:-10,End:1/0,Home:-1/0};if(void 0!==n[t.key])return t.preventDefault(),void function(e){if(0==o.shownRows.length)return;let t=o.shownRows.indexOf(o.selectedRow);-1==t&&(t=e>0?-1:o.shownRows.length);const n=Math.max(0,Math.min(o.shownRows.length-1,t+e));v(o.shownRows[n],0),D(o.shownRows[n])}(n[t.key]);"Enter"==t.key&&o.selectedRow&&(t.preventDefault(),o.onRowClick(o,o.selectedRow))});const B=o.rows;return o.rows=[],o.setRows(B),endObject(o)};DataTable.fitColumns=function(e){return Array.isArray(e)?e.map(function(e,o){const t=Object.assign({key:"column"+o,title:"",valueIndex:o,type:"text",width:"auto",minWidth:100,align:"left",sortable:0,iconFile:"",cellColor:"",cellStyle:{},createView:null},e);return t.title=DataTable.toText(t.title),t}):[]},DataTable.toText=function(e){return null==e?"":String(e)},DataTable.toSearchText=function(e){return DataTable.toText(e).toLocaleLowerCase("tr").normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/ı/g,"i")},DataTable.toAlign=function(e){return"center"==e?"center center":"right"==e?"right center":"left center"},DataTable.toAriaSort=function(e){return"desc"==e?"descending":"ascending"},DataTable.styles={light:DataTableDefaults.style,plain:{box:{color:"white",border:0,round:0},titleRow:{height:50,color:"white",lineColor:Black(.2)},titleCell:{lineColor:"transparent",hoverColor:"whitesmoke",uppercase:0},row:{evenColor:"white",hoverColor:Black(.02),selectedColor:Black(.05)}},dark:{box:{color:"#232428",border:1,borderColor:"rgba(255, 255, 255, 0.12)",round:6},focus:{ringColor:"rgba(95, 179, 181, 0.7)"},headerTitle:{fontSize:20,textColor:"rgba(255, 255, 255, 0.9)",fontFamily:"opensans-bold"},searchStyleName:"ozdenDark",titleRow:{height:50,color:"#2B2D31",lineColor:"rgba(255, 255, 255, 0.14)"},titleCell:{textColor:"rgba(255, 255, 255, 0.85)",lineColor:"rgba(255, 255, 255, 0.08)",hoverColor:"#33353A"},titleIcon:{size:16,opacity:.8,invert:1},sortIcon:{size:16,opacity:.3,activeOpacity:1,invert:1},row:{textColor:"rgba(255, 255, 255, 0.75)",oddColor:"#232428",evenColor:"#27292D",hoverColor:"#2E3035",selectedColor:"#24383A",lineColor:"rgba(255, 255, 255, 0.06)"},empty:{fontSize:15,textColor:"rgba(255, 255, 255, 0.45)",top:40},scrollBar:{neverHide:0,showDots:0,bar_color:"#A0A0A0",bar_mouseOverColor:"#D0D0D0"}}},DataTable.styles.classic=DataTable.styles.light,DataTable.createMinimalStyle=function(e){return{box:{color:e.ground,border:1,borderColor:e.line,round:4},focus:{ringColor:e.focus},header:{height:40,padding:[12,0],gap:10},headerTitle:{fontSize:14,textColor:e.text,fontFamily:"opensans-bold"},search:{width:200,height:28,fontSize:13,searchIconSize:14},searchStyleName:e.minimalName,titleRow:{height:30,color:e.ground,lineColor:e.line},titleCell:{padding:10,gap:6,fontSize:12,textColor:e.softText,fontFamily:"opensans-bold",lineColor:"transparent",hoverColor:e.hover,uppercase:0},titleIcon:{size:14,opacity:.7,invert:e.invertIcons},sortIcon:{size:14,opacity:.3,activeOpacity:1,invert:e.invertIcons},row:{padding:[10,5],fontSize:13,textColor:e.text,fontFamily:"opensans",oddColor:e.ground,evenColor:e.ground,hoverColor:e.hover,selectedColor:e.selected,lineColor:e.track},empty:{fontSize:12,textColor:e.softText,top:30},scrollBar:{neverHide:0,showDots:0,bar_color:e.scrollBar,bar_mouseOverColor:e.scrollBar,bar_width:3}}},DataTable.MINIMAL_COLORS={ground:"#FFFFFF",text:Black(.85),softText:Black(.55),line:Black(.2),track:Black(.08),hover:Black(.03),selected:Black(.06),focus:"#3D8BD9",scrollBar:"#9A9A98",invertIcons:0,minimalName:"minimal"},DataTable.styles.minimal=DataTable.createMinimalStyle(DataTable.MINIMAL_COLORS),DataTable.MINIMAL_DARK_COLORS={ground:"#1A1A19",text:White(.88),softText:White(.55),line:White(.18),track:White(.08),hover:White(.04),selected:White(.08),focus:"#7FB6DE",scrollBar:"#A0A0A0",invertIcons:1,minimalName:"minimalDark"},DataTable.styles.minimalDark=DataTable.createMinimalStyle(DataTable.MINIMAL_DARK_COLORS);
@@ -0,0 +1,2 @@
1
+ /* Bismillah */
2
+ "use strict";const DatePickerDefaults={key:"0",width:220,height:44,date:null,minDate:null,maxDate:null,format:"DD.MM.YYYY",language:"en",firstDayOfWeek:1,placeholder:"",inline:0,scale:null,enabled:1,closeOnSelect:1,showTodayButton:1,showClearButton:1,onChange:function(e){},onOpen:function(e){},onClose:function(e){},styleName:"light",style:{field:{color:White(1),border:1,borderColor:Black(.2),round:6,padding:[12,0]},fieldHover:{borderColor:Black(.5)},fieldFocus:{borderColor:"#141414"},fieldText:{fontSize:16,textColor:Black(.85)},placeholder:{textColor:Black(.4)},icon:{color:Black(.55),svg:"",size:18},panel:{color:White(1),border:1,borderColor:Black(.12),round:10,padding:12,shadow:"0 8px 24px rgba(0, 0, 0, 0.12)"},title:{fontSize:16,textColor:Black(.85),fontFamily:"opensans-bold"},arrow:{color:Black(.6),hoverColor:Black(.06)},weekDay:{fontSize:12,textColor:Black(.45)},day:{size:36,round:100,fontSize:14,textColor:Black(.85),hoverColor:Black(.06)},today:{borderColor:Black(.35)},selectedDay:{color:"#141414",textColor:White(1)},disabledDay:{textColor:Black(.2)},footerButton:{fontSize:13,textColor:"#3871E0"},divider:{color:Black(.08)},disabled:{opacity:.4}}},DatePicker=function(e={}){basic.applyStylePackage(e,DatePicker.styles,DatePickerDefaults),mergeIntoIfMissing(e,DatePickerDefaults),DatePicker.applyScale(e),e.color="transparent",1==e.inline&&(e.width="auto",e.height="auto");let t=startObject(e);const o=DatePicker.languages[t.language]||DatePicker.languages.en,n=t.style,r=n.day.size,a=7*r;let l,i,c="days",d=null,s=0,u=0,f=[],h=[];const g=t.scale,p=6*g,b=8*g,y=8*g,D=6*g,x=36*g,k=32*g,w=8*g,C=2*g,m=3*g,v=32*g,M=6*g,B=24*g,S=1*g,P=48*g,F=8*g,T=4*g,z=38*g,A=6*g,Y=1*g,I=[8*g,2*g],O=4*g;t.date=DatePicker.parse(t.date),t.minDate=DatePicker.parse(t.minDate),t.maxDate=DatePicker.parse(t.maxDate),t.value="",t.dateText="";const L=function(e){return e?1e4*e.getFullYear()+100*e.getMonth()+e.getDate():0},H=function(e,t){return e&&t&&L(e)==L(t)},W=function(e){return!(t.minDate&&L(e)<L(t.minDate))&&!(t.maxDate&&L(e)>L(t.maxDate))},N=function(e,t){const o=new Date(e,t,1);l=o.getFullYear(),i=o.getMonth()},E=function(){t.value=t.date?DatePicker.format(t.date,"YYYY-MM-DD"):"",t.dateText=t.date?DatePicker.format(t.date,t.format,t.language):""},G=function(){if(1==t.inline)return;t.date?(t.fieldText.plainText=t.dateText,t.fieldText.textColor=n.fieldText.textColor):(t.fieldText.plainText=t.placeholder||o.placeholder,t.fieldText.textColor=n.placeholder.textColor);let e=n.field.borderColor;u&&1==t.enabled&&(e=n.fieldHover.borderColor),s&&(e=n.fieldFocus.borderColor),t.field.borderColor=e,t.opacity=1==t.enabled?1:n.disabled.opacity,t.cursor=1==t.enabled?"pointer":"default",t.tabIndex=1==t.enabled?0:-1,t.aria={expanded:s?"true":"false",disabled:1==t.enabled?"false":"true"}},R=function(e){return e.forEach(function(e){e.remove()}),[]},_=function(e){const t=e<0,o=HGroup({width:k,height:k,round:100,color:"transparent"});o.cursor="pointer",o.setMotion("background-color 0.15s"),Box({width:w,height:w,color:"transparent"});const r=C+"px solid "+n.arrow.color;return that.css={borderLeft:r,borderBottom:r,transform:"rotate("+(t?45:225)+"deg)",marginLeft:(t?m:-m)+"px"},endGroup(),o.on("mouseover",function(){o.color=n.arrow.hoverColor}),o.on("mouseout",function(){o.color="transparent"}),o.on("click",function(){J(e)}),o},J=function(e){1==t.enabled&&("days"==c?N(l,i+e):N(l+e,i),U())},j=function(e,o){const a=H(e,t.date),l=W(e),i=H(e,d),c=Label({width:r,height:r,text:String(e.getDate()),textAlign:"center",fontSize:n.day.fontSize,round:n.day.round,textColor:n.day.textColor,color:"transparent"});return c.lineHeight=r+"px",c.setMotion("background-color 0.15s"),H(e,o)&&(c.border=S,c.borderColor=n.today.borderColor,c.lineHeight=r-2*S+"px"),a?(c.color=n.selectedDay.color,c.textColor=n.selectedDay.textColor):i&&(c.color=n.day.hoverColor),l?(c.cursor="pointer",c.on("click",function(){Z(e)}),a||(c.on("mouseover",function(){c.color=n.day.hoverColor}),c.on("mouseout",function(){c.color=H(e,d)?n.day.hoverColor:"transparent"})),c):(c.textColor=n.disabledDay.textColor,c)},K=function(e,o){const r=function(e){const o=new Date(l,e,1),n=new Date(l,e+1,0);return!(!W(o)&&!W(n))||t.minDate&&t.maxDate&&L(o)<=L(t.minDate)&&L(n)>=L(t.maxDate)}(o),i=t.date&&t.date.getFullYear()==l&&t.date.getMonth()==o,d=Label({width:Math.floor(a/3),height:P,text:e,textAlign:"center",fontSize:n.day.fontSize,round:F,textColor:r?n.day.textColor:n.disabledDay.textColor,color:i?n.selectedDay.color:"transparent"});return d.lineHeight=P+"px",i&&(d.textColor=n.selectedDay.textColor),r?(d.cursor="pointer",d.setMotion("background-color 0.15s"),d.on("click",function(){N(l,o),c="days",U()}),i||(d.on("mouseover",function(){d.color=n.day.hoverColor}),d.on("mouseout",function(){d.color="transparent"})),d):d},U=function(){"days"==c?(t.title.plainText=o.months[i]+" "+l,t.weekRow.visible=1,t.daysBox.visible=1,t.monthsBox.visible=0,function(){f=R(f);const e=(new Date(l,i,1).getDay()-t.firstDayOfWeek+7)%7,o=new Date(l,i+1,0).getDate(),n=new Date;createIn(t.daysBox,function(){for(let t=0;t<e;t++)f.push(Box({width:r,height:r,color:"transparent"}));for(let e=1;e<=o;e++)f.push(j(new Date(l,i,e),n))})}()):(t.title.plainText=String(l),t.weekRow.visible=0,t.daysBox.visible=0,t.monthsBox.visible=1,h=R(h),createIn(t.monthsBox,function(){o.monthsShort.forEach(function(e,t){h.push(K(e,t))})})),t.todayButton.visible=1==t.showTodayButton&&W(new Date)?1:0,t.clearButton.visible=1==t.showClearButton&&t.date?1:0,t.footer.visible=1==t.showTodayButton||1==t.showClearButton?1:0,1==t.inline&&(t.panel.opacity=1==t.enabled?1:n.disabled.opacity,t.panel.clickable=1==t.enabled?1:0)},Z=function(e){1==t.enabled&&(t.setDate(e),1!=t.inline&&1==t.closeOnSelect&&(t.close(),t.elem.focus()))},V=function(){s&&t.close()},$=function(e,o){if(1!=t.enabled)return;if(1!=t.inline&&!s)return void("Enter"!==o.key&&" "!==o.key&&"ArrowDown"!==o.key||(o.preventDefault(),t.open()));if("Escape"===o.key)return o.preventDefault(),void("months"==c?(c="days",U()):1!=t.inline&&(t.close(),t.elem.focus()));if("days"!=c)return;const n={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};let r=null;if(n[o.key])r=new Date(d.getFullYear(),d.getMonth(),d.getDate()+n[o.key]);else{if("PageUp"!==o.key&&"PageDown"!==o.key)return"Enter"===o.key||" "===o.key?(o.preventDefault(),void(W(d)&&Z(d))):void 0;r=new Date(d.getFullYear(),d.getMonth()+("PageUp"===o.key?-1:1),1)}o.preventDefault(),d=r,N(d.getFullYear(),d.getMonth()),U()};if(t.setDate=function(e,o=0){const n=DatePicker.parse(e);return!(n&&!W(n))&&(L(n)==L(t.date)||(t.date=n,E(),n&&(d=new Date(n),N(n.getFullYear(),n.getMonth())),G(),U(),o||t.onChange(t)),!0)},t.getDate=function(){return t.date?new Date(t.date):null},t.open=function(){if(1==t.inline||s||1!=t.enabled)return;s=1,c="days",d=t.date?new Date(t.date):new Date,N(d.getFullYear(),d.getMonth()),U();const e=basic.zIndexAbove(t,1e3);t.overlay.zIndex=e,t.panel.zIndex=e+1,t.overlay.visible=1,t.panel.visible=1,function(){const e=t.elem.getBoundingClientRect(),o=t.panel.elem.offsetWidth,n=t.panel.elem.offsetHeight;let r=withPageZoom(e.left),a=withPageZoom(e.bottom)+p;a+n>page.height-b&&(a=withPageZoom(e.top)-n-p),a=Math.max(b,a),r=Math.max(b,Math.min(r,page.width-o-b)),t.panel.left=r,t.panel.top=a}(),t.panel.elem.focus(),G(),t.onOpen(t)},t.close=function(){1!=t.inline&&s&&(s=0,t.overlay.visible=0,t.panel.visible=0,G(),t.onClose(t))},t.toggle=function(){s?t.close():t.open()},t.isOpen=function(){return s},t.setEnabled=function(e){t.enabled=basic.isOn(e)?1:0,1!=t.enabled&&t.close(),G(),U()},t.setMinDate=function(e){t.minDate=DatePicker.parse(e),U()},t.setMaxDate=function(e){t.maxDate=DatePicker.parse(e),U()},t.refresh=function(){E(),G(),U()},t.css={outline:"none",userSelect:"none"},1!=t.inline&&(t.clickable=1,t.role="combobox",t.field=HGroup({width:"100%",height:"100%",align:"left center",gap:y,...n.field}),t.field.setMotion("border-color 0.15s"),t.fieldText=Label({width:"auto",fontSize:n.fieldText.fontSize,textColor:n.fieldText.textColor}),that.css={whiteSpace:"nowrap",textOverflow:"ellipsis"},that.grow=1,n.icon.svg?(t.icon=Box({width:n.icon.size,height:n.icon.size,color:"transparent",textColor:n.icon.color}),t.icon.elem.innerHTML=n.icon.svg):(t.icon=startBox({width:18*g,height:18*g,color:"transparent",border:2*g,borderColor:n.icon.color,round:4*g}),Box({left:0,top:3*g,width:"100%",height:2*g,color:n.icon.color}),Box({left:3*g,top:8*g,width:3*g,height:3*g,color:n.icon.color}),Box({left:8*g,top:8*g,width:3*g,height:3*g,color:n.icon.color}),endBox()),t.icon.shrink=0,endGroup()),1!=t.inline){setDefaultContainerBox(page);const e=2e4;t.overlay=Box(-e,-e,2*e,2*e,{color:"transparent"}),t.overlay.css.position="fixed",t.overlay.zIndex=1e3,t.overlay.on("click",function(){t.close()})}t.panel=VGroup({width:a+2*n.panel.padding+2*n.panel.border,height:"auto",align:"left top",gap:D,color:n.panel.color,border:n.panel.border,borderColor:n.panel.borderColor,round:n.panel.round,padding:n.panel.padding}),t.panel.boxShadow=n.panel.shadow,t.panel.css.outline="none",t.panel.tabIndex=-1,t.panel.clickable=1,t.panel.role="dialog",HGroup({width:a,height:x,align:"center"}),t.prevButton=_(-1),t.title=Label({width:a-2*k,height:v,textAlign:"center",round:M,...n.title}),t.title.lineHeight=v+"px",t.title.cursor="pointer",t.title.setMotion("background-color 0.15s"),t.title.on("click",function(){1==t.enabled&&(c="days"==c?"months":"days",U())}),t.title.on("mouseover",function(){t.title.color=n.arrow.hoverColor}),t.title.on("mouseout",function(){t.title.color="transparent"}),t.nextButton=_(1),endGroup(),t.weekRow=HGroup({width:a,height:B});for(let e=0;e<7;e++)Label({width:r,text:o.weekDaysShort[(e+t.firstDayOfWeek)%7],textAlign:"center",...n.weekDay});endGroup(),t.daysBox=AutoLayout({width:a,height:"auto",align:"left top",flexWrap:"wrap"}),endGroup(),t.monthsBox=AutoLayout({width:a,height:"auto",align:"left top",flexWrap:"wrap",rowGap:T+"px"}),endGroup(),t.footer=HGroup({width:a,height:z,justifyContent:"space-between",alignItems:"center"}),t.footer.css={borderTop:Y+"px solid "+n.divider.color,paddingTop:A+"px"},t.todayButton=Label({text:o.today,padding:I,round:O,...n.footerButton}),t.todayButton.cursor="pointer",t.todayButton.on("click",function(){Z(new Date)}),t.clearButton=Label({text:o.clear,padding:I,round:O,...n.footerButton}),t.clearButton.cursor="pointer",t.clearButton.css.marginLeft="auto",t.clearButton.on("click",function(){t.setDate(null),1!=t.inline&&(t.close(),t.elem.focus())}),endGroup(),endGroup(),1!=t.inline&&(t.panel.zIndex=1001,t.overlay.visible=0,t.panel.visible=0),1!=t.inline?(t.on("click",function(){t.toggle()}),t.on("keydown",$),t.on("mouseover",function(){u=1,G()}),t.on("mouseout",function(){u=0,G()}),t.onPageResize(V),t.own(t.overlay),t.own(t.panel)):(t.panel.tabIndex=0,t.panel.position="relative"),t.panel.on("keydown",$),t.panel.on("mousedown",function(e,t){t.preventDefault()});const q=t.date||new Date;return d=new Date(q),N(q.getFullYear(),q.getMonth()),t.enabled=basic.isOn(t.enabled)?1:0,E(),G(),U(),endObject(t)};DatePicker.applyScale=function(e){const t=Number(e.scale);e.scale=t>0?t:basic.uiScale||1,1!==e.scale&&(e.style=basic.scaleStyle(e.style,e.scale),e.style.panel.shadow=basic.scaleCssText(e.style.panel.shadow,e.scale),e.style.day.size=Math.round(e.style.day.size),["width","height"].forEach(function(t){e[t]=basic.scaleSize(e[t],e.scale)}))},DatePicker.languages={en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekDaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"],placeholder:"Select date",today:"Today",clear:"Clear"},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],weekDays:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],weekDaysShort:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],placeholder:"Tarih seçin",today:"Bugün",clear:"Temizle"}},DatePicker.parse=function(e){if(!e)return null;if(e instanceof Date)return isNaN(e)?null:new Date(e.getFullYear(),e.getMonth(),e.getDate());const t=/^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(String(e).trim());if(!t)return null;const o=new Date(basic.num(t[1]),basic.num(t[2])-1,basic.num(t[3]));return o.getMonth()!=basic.num(t[2])-1?null:o},DatePicker.format=function(e,t="DD.MM.YYYY",o="en"){if(!e)return"";const n=DatePicker.languages[o]||DatePicker.languages.en,r={YYYY:String(e.getFullYear()),MMMM:n.months[e.getMonth()],MMM:n.monthsShort[e.getMonth()],MM:String(basic.twoDigitFormat(e.getMonth()+1)),M:String(e.getMonth()+1),DD:String(basic.twoDigitFormat(e.getDate())),D:String(e.getDate()),dddd:n.weekDays[e.getDay()],ddd:n.weekDaysShort[e.getDay()]};return t.replace(/YYYY|MMMM|MMM|MM|M|DD|D|dddd|ddd/g,function(e){return r[e]})},DatePicker.styles={light:DatePickerDefaults.style,dark:{field:{color:"#232322",borderColor:"rgba(255, 255, 255, 0.10)",round:8},fieldHover:{borderColor:"rgba(255, 255, 255, 0.30)"},fieldFocus:{borderColor:"#65A293"},fieldText:{fontSize:15,textColor:"rgba(255, 255, 255, 0.90)"},placeholder:{textColor:"rgba(255, 255, 255, 0.40)"},icon:{color:"rgba(255, 255, 255, 0.55)"},panel:{color:"#232322",borderColor:"rgba(255, 255, 255, 0.12)",shadow:"0 8px 24px rgba(0, 0, 0, 0.5)"},title:{textColor:"rgba(255, 255, 255, 0.90)"},arrow:{color:"rgba(255, 255, 255, 0.60)",hoverColor:"rgba(255, 255, 255, 0.08)"},weekDay:{textColor:"rgba(255, 255, 255, 0.45)"},day:{textColor:"rgba(255, 255, 255, 0.85)",hoverColor:"rgba(255, 255, 255, 0.08)"},today:{borderColor:"rgba(255, 255, 255, 0.35)"},selectedDay:{color:"#3D7A6B",textColor:"#FFFFFF"},disabledDay:{textColor:"rgba(255, 255, 255, 0.20)"},footerButton:{textColor:"#65A293"},divider:{color:"rgba(255, 255, 255, 0.08)"}}},DatePicker.styles.classic=DatePicker.styles.light,DatePicker.MINIMAL_ICON='<svg viewBox="0 0 24 24" width="100%" height="100%" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" style="display: block"><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 10h18M8 3v4M16 3v4"/></svg>',DatePicker.createMinimalStyle=function(e){return{height:28,style:{field:{color:"transparent",border:1,borderColor:e.edge,round:4,padding:[10,0]},fieldHover:{borderColor:e.edgeHover},fieldFocus:{borderColor:e.ink},fieldText:{fontSize:13,textColor:e.text},placeholder:{textColor:e.faintText},icon:{color:e.softText,svg:DatePicker.MINIMAL_ICON,size:14},panel:{color:e.ground,border:1,borderColor:e.line,round:4,padding:8,shadow:"none"},title:{fontSize:13,textColor:e.text,fontFamily:"opensans-bold"},arrow:{color:e.softText,hoverColor:e.hover},weekDay:{fontSize:11,textColor:e.softText},day:{size:28,round:4,fontSize:12,textColor:e.text,hoverColor:e.hover},today:{borderColor:e.edge},selectedDay:{color:e.ink,textColor:e.onInk},disabledDay:{textColor:e.off},footerButton:{fontSize:12,textColor:e.ink},divider:{color:e.line},disabled:{opacity:.4}}}},DatePicker.MINIMAL_COLORS={ground:"#FFFFFF",text:Black(.85),softText:Black(.55),faintText:Black(.54),line:Black(.2),edge:Black(.45),edgeHover:Black(.65),ink:"#1F1F1F",onInk:"#FFFFFF",hover:Black(.05),off:Black(.25)},DatePicker.styles.minimal=DatePicker.createMinimalStyle(DatePicker.MINIMAL_COLORS),DatePicker.MINIMAL_DARK_COLORS={ground:"#1A1A19",text:White(.88),softText:White(.55),faintText:White(.48),line:White(.18),edge:White(.42),edgeHover:White(.62),ink:"#EDEDEB",onInk:"#1A1A19",hover:White(.07),off:White(.25)},DatePicker.styles.minimalDark=DatePicker.createMinimalStyle(DatePicker.MINIMAL_DARK_COLORS);
@@ -1,2 +1,2 @@
1
1
  /* Bismillah */
2
- "use strict";const DialogDefaults={key:"0",width:460,titleText:"",messageText:"",allowHtml:0,fields:[],content:null,buttons:[],closeOnCover:1,closeOnEscape:1,autoOpen:1,removeOnClose:1,ariaLabel:"",variant:"",topIconFile:"",scale:null,onOpen:function(e){},onClose:function(e,t,o){},styleName:"ozden",style:{cover:{color:Black(.8),zIndex:4e3},card:{color:"white",round:8,border:2,borderColor:"#232323",boxShadow:"0 10px 30px rgba(0, 0, 0, 0.08), inset 0 -3px 0 rgba(0, 0, 0, 0.06)",padding:[24,22],gap:8,margin:20},title:{fontSize:20,textColor:"#1B1F23",fontFamily:"opensans-bold"},message:{fontSize:16,textColor:Black(.55),lineHeight:1.5},status:{fontSize:13,errorColor:"#E8796D",infoColor:Black(.55)},footer:{color:"#FAFAF9",lineColor:Black(.1),padding:[16,14],gap:10,buttonHeight:40,iconButtonWidth:50},fieldStyleName:"ozden",centered:{iconArea:{height:116,color:"white",round:6},iconCircle:{size:100,color:"#EEEEEE"},icon:{size:56,color:"#232323"},buttonHeight:48,buttonGap:10,footerPadding:[22,18]},buttons:{primary:{styleName:"primary",style:{}},secondary:{styleName:"ozdenType1",style:{}},danger:{styleName:"danger",style:{}},warning:{styleName:"warning",style:{}},success:{styleName:"success",style:{}},info:{styleName:"info",style:{}},icon:{styleName:"ozdenType2",style:{layout:{gap:0,padding:[0,0]},box:{color:"white"},hover:{color:"#FDF1EF"},active:{color:"#FDF1EF"},icon:{opacity:1}}}}}},Dialog=function(e={}){basic.applyStylePackage(e,Dialog.styles,DialogDefaults),mergeIntoIfMissing(e,DialogDefaults),e.scale=e.scale??basic.uiScale,e.style=Dialog.scaleStyle(e.style,e.scale);const t=e.content,o=(e.buttons||[]).map(function(e,t){return Object.assign({type:"secondary",key:"button"+t,text:""},e)}),n=(e.fields||[]).map(function(e,t){return Object.assign({key:"field"+t,titleText:"",placeholder:"",value:"",required:0},e)});delete e.content,delete e.buttons,delete e.fields;const i=("number"==typeof e.width?e.width:DialogDefaults.width)*e.scale;e.left=0,e.top=0,e.width="100%",e.height="100%";const a=getDefaultContainerBox();setDefaultContainerBox(page);let l=startObject(e);const r=l.style,s="dialog-"+Dialog.counter++,c="0.2s",u="cubic-bezier(0.2, 0.8, 0.2, 1)",d=50*l.scale,f=1*l.scale,p=8*l.scale,g=10*l.scale,y=18*l.scale,b=44*l.scale,m="centered"==e.variant;let h=0,x=0,v=0,k=0,w=null;l.buttonList=[],l.fieldList=[];const T=function(e,t){const o=null==t?"":String(t);1==l.allowHtml?e.text=o:e.plainText=o},C=function(e){let t;t="undefined"!=typeof InputB?InputB({styleName:r.fieldStyleName,scale:l.scale,width:"100%",titleText:e.titleText,placeholder:e.placeholder,inputValue:e.value,isRequired:e.required?1:0}):Input({width:"100%",height:b,placeholder:e.placeholder||e.titleText,value:e.value}),t.css={maxWidth:"100%"},l.fieldList.push({data:e,input:t})},S=function(e){return e.input.getInputValue?e.input.getInputValue():e.input.value},D=function(e){return e.input.elem.querySelector("input, textarea")||e.input.elem},B=function(e){return"left"==e.align},I=function(e){return m?"100%":e?r.footer.iconButtonWidth:"auto"},N=function(e){return Dialog.MAIN_TYPES.includes(e.type)},E=function(e){const t=JSON.parse(JSON.stringify(e.style));return r.ask&&(t.ask=r.ask),1===l.scale?t:z(t,e.styleName)},z=function(e,t){const o={styleName:t,style:e},n=basic.applyStylePackage(o,SmartButton.styles,SmartButtonDefaults).style;mergeIntoIfMissing(n,SmartButtonDefaults.style);const i=basic.scaleStyle(n,l.scale);return i.layout.iconSideTrim=n.layout.iconSideTrim*l.scale,i.box.boxShadow=basic.scaleCssText(n.box.boxShadow,l.scale),i.ask.button.boxShadow=basic.scaleCssText(n.ask.button.boxShadow,l.scale),i.ask.bubble=Object.assign({},n.ask.bubble,{scale:l.scale}),i},O=function(e){if(!l||x)return!1;if("primary"==e.data.type&&l.fieldList.length){const e=function(){for(const e of l.fieldList){const t=S(e);let o="";if(e.data.required&&""===String(t).trim()?o=(e.data.titleText||"This field")+" is needed.":"function"==typeof e.data.validate&&(o=e.data.validate(t)||""),e.input.showWarningIfNotValid&&e.input.showWarningIfNotValid(!o),o)return D(e).focus(),o}return""}();if(l.setStatus(e,"error"),e)return!1}return!0},F=function(e){let t;if("function"==typeof e.data.onClick&&(t=e.data.onClick(l,e.data)),l&&h){if(t&&"function"==typeof t.then){l.setBusy(1,e.data.key);const o=v;return void t.then(function(t){l&&o===v&&(l.setBusy(0),!1!==t&&l.close("button",e.data.key))},function(e){l&&o===v&&(l.setBusy(0),console.error(e))})}!1!==t&&l.close("button",e.data.key)}},G=function(){l&&(l.card.css={width:i+"px",maxWidth:"calc(100% - "+2*r.card.margin+"px)"})};l.open=function(){return!l||h||(h=1,w=document.activeElement,Dialog.stack.push(l),l.zIndex=r.cover.zIndex+2*Dialog.zCounter++,G(),l.visible=1,window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches||(l.setMotionNow("none"),l.card.setMotionNow("none"),l.color="transparent",l.card.opacity=0,l.card.css={transform:"translateY("+d+"px)"},l.elem.offsetHeight,l.setMotionNow("background-color "+c),l.card.setMotionNow("opacity 0.2s "+u+", transform "+c+" "+u),l.color=r.cover.color,l.card.opacity=1,l.card.css={transform:"none"}),function(){const e=l.fieldList[0],t=l.buttonList.find(function(e){return"primary"==e.data.type});(e?D(e):t?t.button.elem:l.card.elem).focus({preventScroll:!0})}(),l.onOpen(l)),l},l.close=function(e="api",t=""){if(!l||!h)return;h=0,Dialog.stack=Dialog.stack.filter(function(e){return e!==l}),v++,x&&l.setBusy(0),l.buttonList.forEach(function(e){e.button.cancelAsk()});const o=l.elem.contains(document.activeElement)||document.activeElement===document.body;l.visible=0,o&&w&&w.isConnected&&"function"==typeof w.focus&&w.focus({preventScroll:!0});const n=l;n.onClose(n,e,t),basic.isOn(n.removeOnClose)&&n.remove()},l.isOpen=function(){return h},l.setBusy=function(e,t=""){if(!l)return;const o=x;x=e?1:0,l.buttonList.forEach(function(e){const n=x&&e.data.key==t;x&&!o&&(e.enabledBeforeBusy=e.button.enabled),e.button.setWaiting(n?1:0),x?e.button.setEnabled(n?e.enabledBeforeBusy:0):o&&e.button.setEnabled(e.enabledBeforeBusy)}),l.card.aria={busy:x?"true":"false"}},l.isBusy=function(){return x},l.setStatus=function(e,t="info"){l.lblStatus.plainText=e||"",l.lblStatus.textColor="error"==t?r.status.errorColor:r.status.infoColor,l.lblStatus.visible=e?1:0},l.setTitle=function(e){l.titleText=e,T(l.lblTitle,e),l.lblTitle.visible=e?1:0,l.card.aria={labelledby:e?l.lblTitle.elem.id:null,label:e?null:l.ariaLabel||null}},l.setMessage=function(e){l.messageText=e,T(l.lblMessage,e),l.lblMessage.visible=e?1:0,l.card.aria={describedby:e?l.lblMessage.elem.id:null}},l.getValues=function(){const e={};return l.fieldList.forEach(function(t){e[t.data.key]=S(t)}),e},l.getButton=function(e){const t=l.buttonList.find(function(t){return t.data.key==e});return t?t.button:null};const L=l.remove;l.superRemove=L,l.remove=function(){if(l){if(h){const e=l.removeOnClose;if(l.removeOnClose=0,l.close("api"),!l)return;l.removeOnClose=e}Dialog.stack=Dialog.stack.filter(function(e){return e!==l}),L.call(l),l=null}};const A=m?"center":"left",H=function(e,t){if(String(e).trim().startsWith("<svg")){const o=Label({width:t.size,height:t.size,text:e,textColor:t.color,css:{lineHeight:"0"}}),n=o.elem.querySelector("svg");return n&&(n.setAttribute("width","100%"),n.setAttribute("height","100%")),o}const o=Icon({width:t.size,height:t.size});return o.load(e),o};return l.color=r.cover.color,l.css={position:"absolute"},l.elem.style.display="block",l.clickable=1,l.layoutGroup=HGroup({width:"100%",height:"100%",align:"center center",clipContent:0}),l.card=VGroup({width:i,height:"auto",align:"left top",gap:0,color:r.card.color,round:r.card.round,border:r.card.border,borderColor:r.card.borderColor,boxShadow:r.card.boxShadow,clipContent:0,clickable:1,role:"dialog",tabIndex:-1}),l.card.css={alignItems:"stretch",maxHeight:"calc(100% - "+2*r.card.margin+"px)",outline:"none"},l.card.aria={modal:"true"},l.body=VGroup({width:"100%",height:"auto",align:"left top",gap:r.card.gap,padding:r.card.padding,clipContent:0}),l.body.css={alignItems:"stretch",flex:"1 1 auto",minHeight:"0px",overflowX:"hidden"},l.body.scrollY=1,m&&l.topIconFile&&function(){const e=r.centered;l.iconArea=HGroup({width:"100%",height:e.iconArea.height,align:"center center",color:e.iconArea.color,round:e.iconArea.round}),l.iconArea.css={flexShrink:"0",marginBottom:p+"px"},HGroup({width:e.iconCircle.size,height:e.iconCircle.size,align:"center center",color:e.iconCircle.color,round:e.iconCircle.size/2}),l.topIcon=H(l.topIconFile,e.icon),endGroup(),endGroup()}(),l.lblTitle=Label({...r.title,width:"100%",textAlign:A,css:{overflowWrap:"anywhere"}}),l.lblTitle.elem.id=s+"-title",l.lblMessage=Label({fontSize:r.message.fontSize,textColor:r.message.textColor,width:"100%",textAlign:A,css:{whiteSpace:"normal",lineHeight:String(r.message.lineHeight),textWrap:"balance",overflowWrap:"anywhere"}}),l.lblMessage.elem.id=s+"-message",(n.length||"function"==typeof t)&&(l.content=VGroup({width:"100%",height:"auto",align:"left top",gap:g,clipContent:0}),l.content.css={alignItems:"stretch",marginTop:p+"px",flexShrink:"0"},n.forEach(C),"function"==typeof t&&t(l),endGroup()),l.lblStatus=Label({fontSize:r.status.fontSize,bold:1,width:"100%",textAlign:A,css:{whiteSpace:"normal",minHeight:y+"px"}}),l.lblStatus.role="status",endGroup(),m?(l.footer=VGroup({width:"100%",height:"auto",align:"center top",gap:r.centered.buttonGap,padding:r.centered.footerPadding,color:r.footer.color,clipContent:0}),l.footer.css={alignItems:"stretch",borderTop:f+"px solid "+r.footer.lineColor,borderRadius:"0 0 "+r.card.round+"px "+r.card.round+"px",flexShrink:"0"}):(l.footer=HGroup({width:"100%",height:"auto",align:"right center",gap:r.footer.gap,padding:r.footer.padding,color:r.footer.color,clipContent:0}),l.footer.css={borderTop:f+"px solid "+r.footer.lineColor,borderRadius:"0 0 "+r.card.round+"px "+r.card.round+"px",flexShrink:"0"}),"undefined"==typeof SmartButton?console.warn("Dialog: its buttons need comp/smart-button.js (SmartButton)."):function(e){const t=e.filter(m?N:B),o=e.filter(function(e){return!t.includes(e)});return t.concat(o)}(o).forEach(function(e){const t="icon"==e.type,o=r.buttons[e.type]||r.buttons.secondary,n=SmartButton({styleName:o.styleName,scale:1,width:I(t),height:m?r.centered.buttonHeight:r.footer.buttonHeight,labelText:t?"":e.text,ariaLabel:e.ariaLabel||e.text,iconFile:e.iconFile||"",style:E(o),ask:e.ask||"",onBeforeClick:function(){return O(i)},onClick:function(){F(i)}});"left"!=e.align||m||(n.css={marginRight:"auto"});const i={data:e,button:n};return l.buttonList.push(i),i}),endGroup(),endGroup(),endGroup(),l.setTitle(l.titleText),l.setMessage(l.messageText),l.setStatus(""),l.footer.visible=o.length?1:0,l.layoutGroup.clickable=1,l.layoutGroup.on("mousedown",function(e,t){k=t.target===l.layoutGroup.elem?1:0}),l.layoutGroup.on("click",function(e,t){t.target===l.layoutGroup.elem&&k&&basic.isOn(l.closeOnCover)&&!x&&l.close("cover")}),l.card.on("keydown",function(e,t){if("Enter"!=t.key||!/INPUT/.test(t.target.tagName))return;if(t.repeat||t.isComposing||t.defaultPrevented)return;const o=l.buttonList.find(function(e){return"primary"==e.data.type});o&&(t.preventDefault(),o.button.press())}),l.listenTo(document,"keydown",function(e,t){if(!l||!h||Dialog.getTop()!==l||"Tab"!=t.key)return;const o=Array.from(l.card.elem.querySelectorAll("input, textarea, select, button, a[href], [tabindex]:not([tabindex='-1'])")).filter(function(e){return!e.disabled&&!e.closest("[inert]")&&null!==e.offsetParent});if(0==o.length)return t.preventDefault(),void l.card.elem.focus();const n=o[0],i=o[o.length-1],a=!l.card.elem.contains(document.activeElement);t.shiftKey&&(document.activeElement===n||a)?(t.preventDefault(),i.focus()):t.shiftKey||document.activeElement!==i&&!a||(t.preventDefault(),n.focus())}),l.onPageResize(G),l.visible=0,endObject(l),setDefaultContainerBox(a),basic.isOn(l.autoOpen)&&l.open(),l};Dialog.stack=[],Dialog.counter=1,Dialog.zCounter=1,Dialog.getTop=function(){return Dialog.stack[Dialog.stack.length-1]||null},Dialog.closeAll=function(){Dialog.stack.slice().reverse().forEach(function(e){e.close("api")})},document.addEventListener("keydown",function(e){if("Escape"!=e.key||e.defaultPrevented)return;const t=Dialog.getTop();if(!t||!basic.isOn(t.closeOnEscape)||t.isBusy())return;const o=e.target;(o===document.body||o===document.documentElement||t.elem.contains(o))&&(e.preventDefault(),e.stopPropagation(),t.close("escape"))}),Dialog.MAIN_TYPES=["primary","danger","warning","success","info"],Dialog.scaleStyle=function(e,t){if(1===t)return e;const o=basic.scaleStyle(e,t);return o.buttons=e.buttons,e.ask&&(o.ask=e.ask),o.card.boxShadow=basic.scaleCssText(e.card.boxShadow,t),o},Dialog.confirm=function(e={}){return new Promise(function(t){let o=!1;Dialog({titleText:e.titleText||"Are you sure?",messageText:e.messageText||"",styleName:e.styleName,style:e.style||{},variant:e.variant||"",topIconFile:e.topIconFile||"",scale:e.scale,buttons:[{key:"cancel",text:e.cancelText||"Cancel",type:"secondary"},{key:"confirm",text:e.confirmText||"Confirm",type:e.danger?"danger":e.confirmType||"primary",iconFile:e.iconFile||"",ask:e.ask||"",onClick:function(t){if("function"!=typeof e.onConfirm)return void(o=!0);const n=e.onConfirm(t);return o=!1!==n,n&&"function"==typeof n.then?n.then(function(e){return!1===e&&(o=!1),e},function(e){throw o=!1,e}):n}}],onClose:function(){t(o)}})})},Dialog.alert=function(e={}){return new Promise(function(t){Dialog({titleText:e.titleText||"",messageText:e.messageText||"",styleName:e.styleName,style:e.style||{},variant:e.variant||"",topIconFile:e.topIconFile||"",scale:e.scale,buttons:[{key:"ok",text:e.buttonText||"OK",type:e.buttonType||"primary"}],onClose:function(){t()}})})},Dialog.prompt=function(e={}){return new Promise(function(t){let o=null;Dialog({titleText:e.titleText||"",messageText:e.messageText||"",styleName:e.styleName,style:e.style||{},variant:e.variant||"",topIconFile:e.topIconFile||"",scale:e.scale,fields:[{key:"value",titleText:e.fieldText||"",placeholder:e.placeholder||"",value:e.value||"",required:e.required?1:0,validate:e.validate}],buttons:[{key:"cancel",text:e.cancelText||"Cancel",type:"secondary"},{key:"ok",text:e.confirmText||"OK",type:"primary",onClick:function(e){o=e.getValues().value}}],onClose:function(){t(o)}})})},Dialog.styles={ozden:DialogDefaults.style};
2
+ "use strict";const DialogDefaults={key:"0",width:460,titleText:"",messageText:"",allowHtml:0,fields:[],content:null,buttons:[],closeOnCover:1,closeOnEscape:1,autoOpen:1,removeOnClose:1,ariaLabel:"",variant:"",topIconFile:"",topIconTone:"",scale:null,onOpen:function(e){},onClose:function(e,t,o){},styleName:"ozden",style:{cover:{color:Black(.8),zIndex:4e3},card:{color:"white",round:8,border:2,borderColor:"#232323",boxShadow:"0 10px 30px rgba(0, 0, 0, 0.08), inset 0 -3px 0 rgba(0, 0, 0, 0.06)",padding:[24,22],gap:8,margin:20},title:{fontSize:20,textColor:"#1B1F23",fontFamily:"opensans-bold"},message:{fontSize:16,textColor:Black(.55),lineHeight:1.5},status:{fontSize:13,errorColor:"#C74B3D",infoColor:Black(.55),successColor:"#498335"},footer:{color:"#FAFAF9",lineColor:Black(.1),padding:[16,14],gap:10,buttonHeight:40,iconButtonWidth:50},fieldStyleName:"ozden",centered:{iconArea:{height:116,color:"white",round:6},iconCircle:{size:100,color:"#EEEEEE"},icon:{size:56,color:"#232323",lightColor:"#D2D2D0"},buttonHeight:48,buttonGap:10,footerPadding:[22,18]},buttons:{primary:{styleName:"ozden",tone:"cyan",style:{}},secondary:{styleName:"ozden3",tone:"",style:{}},danger:{styleName:"ozden",tone:"orange",style:{}},warning:{styleName:"ozden",tone:"yellow",style:{}},success:{styleName:"ozden",tone:"green",style:{}},info:{styleName:"ozden",tone:"blue",style:{}},icon:{styleName:"ozden3",tone:"white",style:{icon:{opacity:1}}}}}},Dialog=function(e={}){basic.applyStylePackage(e,Dialog.styles,DialogDefaults),mergeIntoIfMissing(e,DialogDefaults),e.scale=e.scale??basic.uiScale,e.style=Dialog.scaleStyle(e.style,e.scale);const t=e.content,o=(e.buttons||[]).map(function(e,t){return Object.assign({type:"secondary",key:"button"+t,text:""},e)}),n=(e.fields||[]).map(function(e,t){return Object.assign({key:"field"+t,titleText:"",placeholder:"",value:"",required:0},e)});delete e.content,delete e.buttons,delete e.fields;const i=("number"==typeof e.width?e.width:DialogDefaults.width)*e.scale;e.left=0,e.top=0,e.width="100%",e.height="100%";const l=getDefaultContainerBox();setDefaultContainerBox(page);let a=startObject(e);const r=a.style,c="dialog-"+Dialog.counter++,s="0.2s",u="cubic-bezier(0.2, 0.8, 0.2, 1)",d=50*a.scale,f=1*a.scale,g=8*a.scale,p=10*a.scale,m=18*a.scale,y=44*a.scale,b="centered"==e.variant;let h=0,x=0,k=0,C=0,D=null;a.buttonList=[],a.fieldList=[];const T=function(e,t){const o=null==t?"":String(t);1==a.allowHtml?e.text=o:e.plainText=o},v=function(e){let t;t="undefined"!=typeof TextField?TextField({styleName:r.fieldStyleName,scale:a.scale,width:"100%",titleText:e.titleText,placeholder:e.placeholder,value:e.value,required:e.required?1:0}):Input({width:"100%",height:y,placeholder:e.placeholder||e.titleText,value:e.value}),t.css={maxWidth:"100%"},a.fieldList.push({data:e,input:t})},S=function(e){return e.input.getValue?e.input.getValue():e.input.value},w=function(e){return e.input.elem.querySelector("input, textarea")||e.input.elem},N=function(e){return"left"==e.align},z=function(e){return b?"100%":e?r.footer.iconButtonWidth:"auto"},F=function(e){return Dialog.MAIN_TYPES.includes(e.type)},B=function(e){const t=JSON.parse(JSON.stringify(e.style));return r.ask&&(t.ask=r.ask),1===a.scale?t:E(t,e)},E=function(e,t){const o=SmartButton.applyLook({styleName:t.styleName,tone:t.tone,style:e}).style,n=basic.scaleStyle(o,a.scale);return n.layout.iconSideTrim=o.layout.iconSideTrim*a.scale,n.box.boxShadow=basic.scaleCssText(o.box.boxShadow,a.scale),n.ask.button.boxShadow=basic.scaleCssText(o.ask.button.boxShadow,a.scale),n.ask.bubble=Object.assign({},o.ask.bubble,{scale:a.scale}),n},I=function(e){if(!a||x)return!1;if("primary"==e.data.type&&a.fieldList.length){const e=function(){for(const e of a.fieldList){const t=S(e);let o="";if(e.data.required&&""===String(t).trim()?o=(e.data.titleText||"This field")+" is needed.":"function"==typeof e.data.validate&&(o=e.data.validate(t)||""),e.input.showWarningIfNotValid&&e.input.showWarningIfNotValid(!o),o)return w(e).focus(),o}return""}();if(a.setStatus(e,"error"),e)return!1}return!0},A=function(e){let t;if("function"==typeof e.data.onClick&&(t=e.data.onClick(a,e.data)),a&&h){if(t&&"function"==typeof t.then){a.setBusy(1,e.data.key);const o=k;return void t.then(function(t){a&&o===k&&(a.setBusy(0),!1!==t&&a.close("button",e.data.key))},function(e){a&&o===k&&(a.setBusy(0),console.error(e))})}!1!==t&&a.close("button",e.data.key)}},O=function(){a&&(a.card.css={width:i+"px",maxWidth:"calc(100% - "+2*r.card.margin+"px)"})};a.open=function(){return!a||h||(h=1,D=document.activeElement,Dialog.stack.push(a),a.zIndex=r.cover.zIndex+2*Dialog.zCounter++,O(),a.visible=1,window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches||(a.setMotionNow("none"),a.card.setMotionNow("none"),a.color="transparent",a.card.opacity=0,a.card.css={transform:"translateY("+d+"px)"},a.elem.offsetHeight,a.setMotionNow("background-color "+s),a.card.setMotionNow("opacity 0.2s "+u+", transform "+s+" "+u),a.color=r.cover.color,a.card.opacity=1,a.card.css={transform:"none"}),function(){const e=a.fieldList[0],t=a.buttonList.find(function(e){return"primary"==e.data.type});(e?w(e):t?t.button.elem:a.card.elem).focus({preventScroll:!0})}(),a.onOpen(a)),a},a.close=function(e="api",t=""){if(!a||!h)return;h=0,Dialog.stack=Dialog.stack.filter(function(e){return e!==a}),k++,x&&a.setBusy(0),a.buttonList.forEach(function(e){e.button.cancelAsk()});const o=a.elem.contains(document.activeElement)||document.activeElement===document.body;a.visible=0,o&&D&&D.isConnected&&"function"==typeof D.focus&&D.focus({preventScroll:!0});const n=a;n.onClose(n,e,t),basic.isOn(n.removeOnClose)&&n.remove()},a.isOpen=function(){return h},a.setBusy=function(e,t=""){if(!a)return;const o=x;x=e?1:0,a.buttonList.forEach(function(e){const n=x&&e.data.key==t;x&&!o&&(e.enabledBeforeBusy=e.button.enabled),e.button.setWaiting(n?1:0),x?e.button.setEnabled(n?e.enabledBeforeBusy:0):o&&e.button.setEnabled(e.enabledBeforeBusy)}),a.card.aria={busy:x?"true":"false"}},a.isBusy=function(){return x},a.setStatus=function(e,t="info"){const o={error:r.status.errorColor,success:r.status.successColor,info:r.status.infoColor};a.lblStatus.plainText=e||"",a.lblStatus.textColor=o[t]||r.status.infoColor,a.lblStatus.visible=e?1:0},a.setTitleText=function(e){a.titleText=e,T(a.lblTitle,e),a.lblTitle.visible=e?1:0,a.card.aria={labelledby:e?a.lblTitle.elem.id:null,label:e?null:a.ariaLabel||null}},a.setMessageText=function(e){a.messageText=e,T(a.lblMessage,e),a.lblMessage.visible=e?1:0,a.card.aria={describedby:e?a.lblMessage.elem.id:null}},a.getValues=function(){const e={};return a.fieldList.forEach(function(t){e[t.data.key]=S(t)}),e},a.getButton=function(e){const t=a.buttonList.find(function(t){return t.data.key==e});return t?t.button:null};const L=a.remove;a.superRemove=L,a.remove=function(){if(a){if(h){const e=a.removeOnClose;if(a.removeOnClose=0,a.close("api"),!a)return;a.removeOnClose=e}Dialog.stack=Dialog.stack.filter(function(e){return e!==a}),L.call(a),a=null}};const M=b?"center":"left",G=function(e,t){if(String(e).trim().startsWith("<svg")){const o=Label({width:t.size,height:t.size,text:e,textColor:t.color,clipContent:0,css:{lineHeight:"0"}}),n=o.elem.querySelector("svg");return n&&(n.setAttribute("width","100%"),n.setAttribute("height","100%"),n.style.overflow="visible"),o}const o=Icon({width:t.size,height:t.size});return o.load(e),o};return a.color=r.cover.color,a.css={position:"absolute"},a.elem.style.display="block",a.clickable=1,a.layoutGroup=HGroup({width:"100%",height:"100%",align:"center center",clipContent:0}),a.card=VGroup({width:i,height:"auto",align:"left top",gap:0,color:r.card.color,round:r.card.round,border:r.card.border,borderColor:r.card.borderColor,boxShadow:r.card.boxShadow,clipContent:0,clickable:1,role:"dialog",tabIndex:-1}),a.card.css={alignItems:"stretch",maxHeight:"calc(100% - "+2*r.card.margin+"px)",outline:"none"},a.card.aria={modal:"true"},a.body=VGroup({width:"100%",height:"auto",align:"left top",gap:r.card.gap,padding:r.card.padding,clipContent:0}),a.body.css={alignItems:"stretch",flex:"1 1 auto",minHeight:"0px",overflowX:"hidden"},a.body.scrollY=1,b&&a.topIconFile&&function(){const e=r.centered,t=function(){const e=Dialog.ICON_TONES[a.topIconTone];if(e)return e;const t=r.centered;return{circle:t.iconCircle.color,light:t.icon.lightColor,strong:t.icon.color}}();a.iconArea=HGroup({width:"100%",height:e.iconArea.height,align:"center center",color:e.iconArea.color,round:e.iconArea.round}),a.iconArea.css={flexShrink:"0",marginBottom:g+"px"},HGroup({width:e.iconCircle.size,height:e.iconCircle.size,align:"center center",color:t.circle,round:e.iconCircle.size/2}),a.topIcon=G(function(e,t){const o=String(e);return o.trim().startsWith("<svg")?o.split("LIGHT").join(t.light).split("STRONG").join(t.strong).split("CIRCLE").join(t.circle):e}(a.topIconFile,t),{size:e.icon.size,color:t.strong}),endGroup(),endGroup()}(),a.lblTitle=Label({...r.title,width:"100%",textAlign:M,css:{overflowWrap:"anywhere"}}),a.lblTitle.elem.id=c+"-title",a.lblMessage=Label({fontSize:r.message.fontSize,textColor:r.message.textColor,width:"100%",textAlign:M,css:{whiteSpace:"normal",lineHeight:String(r.message.lineHeight),textWrap:"balance",overflowWrap:"anywhere"}}),a.lblMessage.elem.id=c+"-message",(n.length||"function"==typeof t)&&(a.content=VGroup({width:"100%",height:"auto",align:"left top",gap:p,clipContent:0}),a.content.css={alignItems:"stretch",marginTop:g+"px",flexShrink:"0"},n.forEach(v),"function"==typeof t&&t(a),endGroup()),a.lblStatus=Label({fontSize:r.status.fontSize,bold:1,width:"100%",textAlign:M,css:{whiteSpace:"normal",minHeight:m+"px"}}),a.lblStatus.role="status",endGroup(),b?(a.footer=VGroup({width:"100%",height:"auto",align:"center top",gap:r.centered.buttonGap,padding:r.centered.footerPadding,color:r.footer.color,clipContent:0}),a.footer.css={alignItems:"stretch",borderTop:f+"px solid "+r.footer.lineColor,borderRadius:"0 0 "+r.card.round+"px "+r.card.round+"px",flexShrink:"0"}):(a.footer=HGroup({width:"100%",height:"auto",align:"right center",gap:r.footer.gap,padding:r.footer.padding,color:r.footer.color,clipContent:0}),a.footer.css={borderTop:f+"px solid "+r.footer.lineColor,borderRadius:"0 0 "+r.card.round+"px "+r.card.round+"px",flexShrink:"0"}),"undefined"==typeof SmartButton?console.warn("Dialog: its buttons need comp/smart-button.js (SmartButton)."):function(e){const t=e.filter(b?F:N),o=e.filter(function(e){return!t.includes(e)});return t.concat(o)}(o).forEach(function(e){const t="icon"==e.type,o=r.buttons[e.type]||r.buttons.secondary,n=SmartButton({styleName:o.styleName,tone:o.tone||"",scale:1,width:z(t),height:b?r.centered.buttonHeight:r.footer.buttonHeight,labelText:t?"":e.text,ariaLabel:e.ariaLabel||e.text,iconFile:e.iconFile||"",style:B(o),ask:e.ask||"",onBeforeClick:function(){return I(i)},onClick:function(){A(i)}});"left"!=e.align||b||(n.css={marginRight:"auto"});const i={data:e,button:n};return a.buttonList.push(i),i}),endGroup(),endGroup(),endGroup(),a.setTitleText(a.titleText),a.setMessageText(a.messageText),a.setStatus(""),a.footer.visible=o.length?1:0,a.layoutGroup.clickable=1,a.layoutGroup.on("mousedown",function(e,t){C=t.target===a.layoutGroup.elem?1:0}),a.layoutGroup.on("click",function(e,t){t.target===a.layoutGroup.elem&&C&&basic.isOn(a.closeOnCover)&&!x&&a.close("cover")}),a.card.on("keydown",function(e,t){if("Enter"!=t.key||!/INPUT/.test(t.target.tagName))return;if(t.repeat||t.isComposing||t.defaultPrevented)return;const o=a.buttonList.find(function(e){return"primary"==e.data.type});o&&(t.preventDefault(),o.button.press())}),a.listenTo(document,"keydown",function(e,t){if(!a||!h||Dialog.getTop()!==a||"Tab"!=t.key)return;const o=Array.from(a.card.elem.querySelectorAll("input, textarea, select, button, a[href], [tabindex]:not([tabindex='-1'])")).filter(function(e){return!e.disabled&&!e.closest("[inert]")&&null!==e.offsetParent});if(0==o.length)return t.preventDefault(),void a.card.elem.focus();const n=o[0],i=o[o.length-1],l=!a.card.elem.contains(document.activeElement);t.shiftKey&&(document.activeElement===n||l)?(t.preventDefault(),i.focus()):t.shiftKey||document.activeElement!==i&&!l||(t.preventDefault(),n.focus())}),a.onPageResize(O),a.visible=0,endObject(a),setDefaultContainerBox(l),basic.isOn(a.autoOpen)&&a.open(),a};Dialog.stack=[],Dialog.counter=1,Dialog.zCounter=1,Dialog.getTop=function(){return Dialog.stack[Dialog.stack.length-1]||null},Dialog.closeAll=function(){Dialog.stack.slice().reverse().forEach(function(e){e.close("api")})},document.addEventListener("keydown",function(e){if("Escape"!=e.key||e.defaultPrevented)return;const t=Dialog.getTop();if(!t)return;const o=e.target;(o===document.body||o===document.documentElement||t.elem.contains(o))&&(basic.isOn(t.closeOnEscape)&&!t.isBusy()?(e.preventDefault(),e.stopPropagation(),t.close("escape")):e.preventDefault())}),Dialog.MAIN_TYPES=["primary","danger","warning","success","info"],Dialog.scaleStyle=function(e,t){if(1===t)return e;const o=basic.scaleStyle(e,t);return o.buttons=e.buttons,e.ask&&(o.ask=e.ask),o.card.boxShadow=basic.scaleCssText(e.card.boxShadow,t),o},Dialog.confirm=function(e={}){return new Promise(function(t){let o=!1;Dialog({titleText:e.titleText||"Are you sure?",messageText:e.messageText||"",styleName:e.styleName,style:e.style||{},variant:e.variant||"",topIconFile:e.topIconFile||"",topIconTone:e.topIconTone||"",scale:e.scale,buttons:[{key:"cancel",text:e.cancelText||"Cancel",type:"secondary"},{key:"confirm",text:e.confirmText||"Confirm",type:e.danger?"danger":e.confirmType||"primary",iconFile:e.iconFile||"",ask:e.ask||"",onClick:function(t){if("function"!=typeof e.onConfirm)return void(o=!0);const n=e.onConfirm(t);return o=!1!==n,n&&"function"==typeof n.then?n.then(function(e){return!1===e&&(o=!1),e},function(e){throw o=!1,e}):n}}],onClose:function(){t(o)}})})},Dialog.alert=function(e={}){return new Promise(function(t){Dialog({titleText:e.titleText||"",messageText:e.messageText||"",styleName:e.styleName,style:e.style||{},variant:e.variant||"",topIconFile:e.topIconFile||"",topIconTone:e.topIconTone||"",scale:e.scale,buttons:[{key:"ok",text:e.buttonText||"OK",type:e.buttonType||"primary"}],onClose:function(){t()}})})},Dialog.prompt=function(e={}){return new Promise(function(t){let o=null;Dialog({titleText:e.titleText||"",messageText:e.messageText||"",styleName:e.styleName,style:e.style||{},variant:e.variant||"",topIconFile:e.topIconFile||"",topIconTone:e.topIconTone||"",scale:e.scale,fields:[{key:"value",titleText:e.fieldText||"",placeholder:e.placeholder||"",value:e.value||"",required:e.required?1:0,validate:e.validate}],buttons:[{key:"cancel",text:e.cancelText||"Cancel",type:"secondary"},{key:"ok",text:e.confirmText||"OK",type:"primary",onClick:function(e){o=e.getValues().value}}],onClose:function(){t(o)}})})},Dialog.ICON_TONES={cyan:{circle:"#EAF6F7",light:"#A5D9DD",strong:"#36898F"},orange:{circle:"#FBEFEA",light:"#EDBAA5",strong:"#C4532A"},yellow:{circle:"#FDF8E7",light:"#F5D77D",strong:"#9A7409"},green:{circle:"#EEF7EB",light:"#B6DEA9",strong:"#4A8F33"},blue:{circle:"#E9F4F9",light:"#A0CFE5",strong:"#2E81A8"}},Dialog.styles={ozden:DialogDefaults.style,ozdenDark:{cover:{color:Black(.65)},card:{color:"#232322",border:1,borderColor:White(.16),boxShadow:"0 10px 30px rgba(0, 0, 0, 0.45)"},title:{textColor:White(.92)},message:{textColor:White(.62)},status:{errorColor:"#FF9F93",infoColor:White(.6),successColor:"#7FE3B5"},footer:{color:"#1C1C1B",lineColor:White(.1)},fieldStyleName:"ozdenDark",centered:{iconArea:{color:"#232322"},iconCircle:{color:"#32322F"},icon:{color:White(.88),lightColor:White(.35)}},buttons:{primary:{styleName:"ozdenDark",tone:"cyanDark",style:{}},secondary:{styleName:"ozden3Dark",tone:"",style:{}},danger:{styleName:"ozdenDark",tone:"orangeDark",style:{}},warning:{styleName:"ozdenDark",tone:"yellowDark",style:{}},success:{styleName:"ozdenDark",tone:"greenDark",style:{}},info:{styleName:"ozdenDark",tone:"blueDark",style:{}},icon:{styleName:"ozden3Dark",tone:"",style:{icon:{opacity:1}}}}}},Dialog.createMinimalStyle=function(e){const t=function(t){return{styleName:e.buttonName,tone:t,style:{}}};return{cover:{color:e.cover},card:{color:e.ground,round:6,border:1,borderColor:e.lineHover,boxShadow:"none",padding:[16,16],gap:6,margin:16},title:{fontSize:14,textColor:e.text,fontFamily:"opensans-bold"},message:{fontSize:13,textColor:e.softText,lineHeight:1.45},status:{fontSize:12,errorColor:e.danger,infoColor:e.softText,successColor:e.success},footer:{color:"transparent",lineColor:"transparent",padding:[16,14],gap:8,buttonHeight:28,iconButtonWidth:28},fieldStyleName:e.fieldName,centered:{iconArea:{height:76,color:e.ground,round:4},iconCircle:{size:56,color:e.iconCircle},icon:{size:28,color:e.text,lightColor:e.faintText},buttonHeight:28,buttonGap:8,footerPadding:[16,14]},buttons:{primary:t(e.inkTone),secondary:t(""),danger:{styleName:e.dangerName,tone:"",style:{}},warning:t(""),success:t(""),info:t(""),icon:{styleName:e.buttonName,tone:"",style:{icon:{opacity:1}}}}}},Dialog.MINIMAL_COLORS={cover:Black(.3),ground:"#FFFFFF",text:Black(.85),softText:Black(.55),faintText:Black(.54),lineHover:Black(.45),danger:"#C24A36",success:"#2E9E74",iconCircle:Black(.05),buttonName:"minimal",dangerName:"minimalDanger",inkTone:"ink",fieldName:"minimal"},Dialog.styles.minimal=Dialog.createMinimalStyle(Dialog.MINIMAL_COLORS),Dialog.MINIMAL_DARK_COLORS={cover:Black(.6),ground:"#1A1A19",text:White(.88),softText:White(.55),faintText:White(.48),lineHover:White(.42),danger:"#FF9F93",success:"#7FE3B5",iconCircle:White(.06),buttonName:"minimalDark",dangerName:"minimalDangerDark",inkTone:"inkDark",fieldName:"minimalDark"},Dialog.styles.minimalDark=Dialog.createMinimalStyle(Dialog.MINIMAL_DARK_COLORS);
@@ -0,0 +1,2 @@
1
+ /* Bismillah */
2
+ "use strict";const EmailFieldDefaults={required:1,type:"email",titleText:"EMAIL",placeholder:"example@site.com",warningText:"Invalid email format",warningColor:"#E5885E",maxLength:40},EmailField=function(e={}){basic.applyStylePackage(e,TextField.styles,TextFieldDefaults),mergeIntoIfMissing(e,EmailFieldDefaults);const t=startExtendedObject(TextField,e),l=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return t.isValid=function(){return l.test(t.getValue())?1:0},t.checkInputValue(),endExtendedObject(t)};
@@ -0,0 +1,2 @@
1
+ /* Bismillah */
2
+ "use strict";const FilePickerDefaults={key:"0",width:360,height:"auto",zoneHeight:170,multiple:0,directory:0,accept:"",maxSize:0,maxFiles:0,enabled:1,showIcon:1,iconSvg:"",iconFile:"",animated:0,showList:1,showPreview:1,preventPageDrop:1,titleText:"Drag and drop a file here",descriptionText:"or click to select",hintText:"",dropText:"Drop to add",allowHtml:0,onChange:function(e){},onError:function(e,t){},onOpenDialog:null,styleName:"light",style:{zone:{color:White(1),border:2,borderColor:Black(.2),round:10},zoneHover:{color:"#FAFAFA",borderColor:Black(.4)},zoneDragOver:{color:"#EEF4FF",borderColor:"#3871E0"},icon:{size:40,space:6,svg:"",color:Black(.45),dragOverColor:"#3871E0"},title:{fontSize:16,textColor:Black(.8),fontFamily:"opensans-bold"},desc:{fontSize:14,textColor:Black(.5)},hint:{fontSize:12,textColor:Black(.4)},item:{height:52,color:White(1),border:1,borderColor:Black(.1),round:8},itemName:{fontSize:14,textColor:Black(.85)},itemSize:{fontSize:12,textColor:Black(.45)},badge:{color:Black(.06),textColor:Black(.6),round:6},removeButton:{textColor:Black(.45),hoverColor:"#FE5D49"},disabled:{opacity:.4}}},FilePicker=function(e={}){basic.applyStylePackage(e,FilePicker.styles,FilePickerDefaults),mergeIntoIfMissing(e,FilePickerDefaults),e.color="transparent",e.height="auto";let t=startObject(e);const o=t.style;let n=0,i=0,r=[],l=[];let a=0;t.files=[],t.state="normal";const c=function(e,o){const n=null==o?"":String(o);1==t.allowHtml?e.text=n:e.plainText=n},s=function(){const e=function(){const e=[];return 1==t.showIcon&&e.push({object:t.icon,extra:o.icon.space}),t.hint.text&&e.push({object:t.hint,extra:4}),t.descriptionText&&e.push({object:t.desc,extra:0}),e}();e.forEach(e=>{e.object.visible=1});const n=t.zone.elem.clientHeight-8;if(n<=0)return;let i=t.title.elem.offsetHeight;e.forEach(e=>{i+=e.object.elem.offsetHeight+e.extra+4}),e.forEach(function(e){i<=n||(i-=e.object.elem.offsetHeight+e.extra+4,e.object.visible=0)})},d=function(e){const t=e.lastIndexOf(".");return t>0?e.slice(t+1).toLowerCase():""},u=function(){if(1!=t.animated)return!1;return!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)},f=function(){u()&&(t.icon.css.transform="dragover"==t.state?"translateY(-5px) scale(1.08)":"hover"==t.state?"translateY(-2px) scale(1.04)":"none")},h=function(){u()?(a=1,t.icon.setMotion("transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1)"),f()):a&&(a=0,t.icon.setMotion(""),t.icon.css.transform="")},p=function(e){t.state=e;let n=o.zone;"hover"==e&&(n=o.zoneHover),"dragover"==e&&(n=o.zoneDragOver),t.zone.color=n.color,t.zone.borderColor=n.borderColor;const i="dragover"==e?o.icon.dragOverColor:o.icon.color;t.icon.textColor=i,f(),c(t.title,"dragover"==e?t.dropText:t.titleText)},m=function(){if(!t.iconFile)return void(t.icon.elem.innerHTML=t.iconSvg||o.icon.svg||FilePicker.UPLOAD_ICON);const e=document.createElement("img");e.src=t.iconFile,e.alt="",t.icon.elem.replaceChildren(e)},g=function(){const e=1==t.enabled;t.opacity=e?1:o.disabled.opacity,t.zone.cursor=e?"pointer":"default",t.zone.tabIndex=e?0:-1,t.zone.aria={disabled:e?"false":"true"},t.input.disabled=!e},b=function(){l.forEach(function(e){URL.revokeObjectURL(e)}),l=[]},x=function(e){const n=o.item.height-16,i=1==t.showPreview&&e.type.startsWith("image/")?function(e){if(e.file.previewAddress)return e.file.previewAddress;if(!(e.file instanceof Blob))return"";const t=URL.createObjectURL(e.file);return l.push(t),t}(e):"";if(i){const e=Icon({width:n,height:n,round:o.badge.round});return e.css.objectFit="cover",e.shrink=0,void e.load(i)}const r=Label({width:n,height:n,text:(e.extension||"file").slice(0,4).toUpperCase(),textAlign:"center",fontSize:10,fontFamily:"opensans-bold",color:o.badge.color,textColor:o.badge.textColor,round:o.badge.round});r.lineHeight=n,r.shrink=0},v=function(e,n){const i=HGroup({width:"100%",height:o.item.height,align:"left center",gap:10,padding:[10,0],color:o.item.color,border:o.item.border,borderColor:o.item.borderColor,round:o.item.round});i.clickable=1,i.elem.title=e.path,x(e);VGroup({width:"auto",height:"auto",align:"left center"}).css={flex:"1 1 0",minWidth:"0"};Label({width:"100%",plainText:e.displayName,...o.itemName}).css={whiteSpace:"nowrap",textOverflow:"ellipsis"};const r=e.type?" • "+e.type:"";return Label({plainText:e.sizeText+r,...o.itemSize}).css.whiteSpace="nowrap",endGroup(),function(e){const n=Label({width:28,height:28,text:"×",textAlign:"center",fontSize:20,round:100,textColor:o.removeButton.textColor});n.lineHeight="26px",n.cursor="pointer",n.shrink=0,n.elem.title="Remove",n.on("mouseover",function(){n.textColor=o.removeButton.hoverColor}),n.on("mouseout",function(){n.textColor=o.removeButton.textColor}),n.on("click",function(){1==t.enabled&&t.removeFile(e)})}(n),endGroup(),i},k=function(){r.forEach(function(e){e.remove()}),r=[],b(),t.list.visible=1==t.showList&&t.files.length>0?1:0,1==t.showList&&createIn(t.list,function(){t.files.forEach(function(e,t){r.push(v(e,t))})})},z=function(e,t,o){return{type:e,name:t,message:o}},C=function(e,o){const n=[];return Array.from(e).forEach(function(e){if(function(e){if(!t.accept)return!0;const o=e.name.toLowerCase(),n=(e.type||"").toLowerCase();return t.accept.split(",").some(function(e){return!!(e=e.trim().toLowerCase())&&("."==e.charAt(0)?o.endsWith(e):e.endsWith("/*")?n.startsWith(e.slice(0,-1)):n==e)})}(e)){if(t.maxSize&&e.size>t.maxSize){const n=e.name+": larger than "+FilePicker.formatSize(t.maxSize)+".";return void o.push(z("maxSize",e.name,n))}n.push(function(e){return{file:e,name:e.name,displayName:e.webkitRelativePath||e.name,path:e.path||e.webkitRelativePath||e.name,size:e.size,sizeText:FilePicker.formatSize(e.size),type:e.type||"",extension:d(e.name),lastModified:e.lastModified}}(e))}else o.push(z("accept",e.name,e.name+": file type is not allowed."))}),n},w=function(e){if(1!=t.enabled)return;const o=[];let n=C(e,o),i=0;1==t.multiple||1==t.directory?i=function(e,o){let n=0;return e.forEach(function(e){t.files.some(function(t){return n=e,(o=t).name==n.name&&o.size==n.size&&o.lastModified==n.lastModified&&o.path==n.path;var o,n})||(t.maxFiles&&t.files.length>=t.maxFiles?o.push(z("maxFiles",e.name,e.name+": maximum "+t.maxFiles+" files.")):(t.files.push(e),n++))}),n}(n,o):(n.length>1&&o.push(z("maxFiles","","Only one file can be selected.")),n=n.slice(0,1),n.length&&(t.files=n),i=n.length),i&&(k(),t.onChange(t)),o.length&&t.onError(t,o)},F=function(e,t){t.preventDefault()};t.open=function(){1==t.enabled&&("function"!=typeof t.onOpenDialog?(t.input.value="",t.input.click()):t.onOpenDialog(t))},t.getFiles=function(){return t.files.slice()},t.getFileDetails=function(){return t.files.map(function(e){const t=Object.assign({},e);return delete t.file,t})},t.removeFile=function(e,o=0){e<0||e>=t.files.length||(t.files.splice(e,1),k(),o||t.onChange(t))},t.clear=function(e=0){0!=t.files.length&&(t.files=[],k(),e||t.onChange(t))},t.addFiles=function(e){w(e)},t.setAnimated=function(e){t.animated=1==e?1:0,h()},t.setIconSvg=function(e){t.iconSvg=e||"",m()},t.setIcon=function(e){t.iconFile=e||"",m()},t.setEnabled=function(e){t.enabled=basic.isOn(e)?1:0,g()},t.setTitleText=function(e){t.titleText=e,"dragover"!=t.state&&c(t.title,e),s()},t.setDescriptionText=function(e){t.descriptionText=e,c(t.desc,e),s()},t.refresh=function(){g(),k()};const y=t.remove;return t.superRemove=y,t.remove=function(){t&&(b(),y.call(t),t=null)},t.content=VGroup({width:"100%",height:"auto",align:"left top",gap:10,position:"relative"}),t.zone=VGroup({width:"100%",height:t.zoneHeight,align:"center",gap:4,padding:[16,4],color:o.zone.color,border:o.zone.border,borderColor:o.zone.borderColor,round:o.zone.round}),t.zone.css={borderStyle:"dashed",outline:"none"},t.zone.role="button",t.zone.setMotion("background-color 0.15s, border-color 0.15s"),t.icon=Box({width:o.icon.size,height:o.icon.size,color:"transparent",textColor:o.icon.color,shrink:0}),t.icon.css.marginBottom=o.icon.space+"px",t.icon.clipContent=0,basic.addCss("file-picker-icon",".file-picker-icon svg, .file-picker-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }"),t.icon.elem.classList.add("file-picker-icon"),m(),1!=t.showIcon&&(t.icon.visible=0),t.title=Label({textAlign:"center",shrink:0,...o.title}),c(t.title,t.titleText),t.desc=Label({textAlign:"center",shrink:0,...o.desc}),c(t.desc,t.descriptionText),t.hint=Label({plainText:function(){if(t.hintText)return t.hintText;const e=[];if(t.accept){const o=t.accept.split(",").map(function(e){return e.trim()});e.push(o.join(", "))}return t.maxSize&&e.push("max "+FilePicker.formatSize(t.maxSize)),1==t.multiple&&t.maxFiles&&e.push(t.maxFiles+" files"),e.join(" • ")}(),textAlign:"center",shrink:0,...o.hint}),t.hint.css.marginTop="4px",t.hint.text||(t.hint.visible=0),endGroup(),t.list=VGroup({width:"100%",height:"auto",align:"left top",gap:6}),endGroup(),endGroup(),t.input=document.createElement("input"),t.input.type="file",t.input.style.display="none",1!=t.multiple&&1!=t.directory||(t.input.multiple=!0),t.accept&&(t.input.accept=t.accept),1==t.directory&&(t.input.webkitdirectory=!0),t.elem.appendChild(t.input),t.zone.onResize(s),s(),t.input.addEventListener("change",function(){w(t.input.files),t.input.value=""}),t.zone.on("click",function(){t.open()}),t.zone.on("keydown",function(e,o){"Enter"!==o.key&&" "!==o.key||(o.preventDefault(),t.open())}),t.zone.on("mouseover",function(){i=1,1==t.enabled&&"dragover"!=t.state&&p("hover")}),t.zone.on("mouseout",function(){i=0,"dragover"!=t.state&&p("normal")}),t.zone.on("dragenter",function(e,o){o.preventDefault(),1==t.enabled&&(n++,p("dragover"))}),t.zone.on("dragover",function(e,o){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=1==t.enabled?"copy":"none")}),t.zone.on("dragleave",function(e,t){n=Math.max(0,n-1),0==n&&p(i?"hover":"normal")}),t.zone.on("drop",function(e,o){o.preventDefault(),n=0,p("normal"),1==t.enabled&&o.dataTransfer&&w(o.dataTransfer.files)}),1==t.preventPageDrop&&(t.listenTo(window,"dragover",F),t.listenTo(window,"drop",F)),t.enabled=basic.isOn(t.enabled)?1:0,h(),p("normal"),g(),k(),endObject(t)};FilePicker.styles={light:FilePickerDefaults.style,dark:{zone:{color:"#232322",borderColor:"rgba(255, 255, 255, 0.22)"},zoneHover:{color:"#2A2A29",borderColor:"rgba(255, 255, 255, 0.40)"},zoneDragOver:{color:"#26332F",borderColor:"#65A293"},icon:{color:"rgba(255, 255, 255, 0.55)",dragOverColor:"#65A293"},title:{textColor:"rgba(255, 255, 255, 0.90)"},desc:{textColor:"rgba(255, 255, 255, 0.55)"},hint:{textColor:"rgba(255, 255, 255, 0.40)"},item:{color:"#232322",borderColor:"rgba(255, 255, 255, 0.12)"},itemName:{textColor:"rgba(255, 255, 255, 0.90)"},itemSize:{textColor:"rgba(255, 255, 255, 0.50)"},badge:{color:"rgba(255, 255, 255, 0.10)",textColor:"rgba(255, 255, 255, 0.70)"},removeButton:{textColor:"rgba(255, 255, 255, 0.55)"}}},FilePicker.styles.classic=FilePicker.styles.light,FilePicker.UPLOAD_ICON='<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="2.5 2.5 19 19" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="display:block"><path d="M8.5 18H7a4 4 0 0 1-.5-7.97A6 6 0 0 1 17.6 9a4.6 4.6 0 0 1-.6 9h-1.5"/><path d="M12 20.5V12M9 15l3-3 3 3"/></svg>',FilePicker.MINIMAL_UPLOAD_ICON='<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:block"><path d="M7 18a4.5 4.5 0 0 1-.5-9A6 6 0 0 1 18 9.5a4 4 0 0 1-1 8.5"/><path d="M12 12v8M9 15l3-3 3 3"/></svg>',FilePicker.formatSize=function(e){if(!e)return"0 B";const t=["B","KB","MB","GB","TB"],o=Math.min(t.length-1,Math.floor(Math.log(e)/Math.log(1024))),n=e/Math.pow(1024,o);if(0==o)return n+" "+t[o];const i=n<10?1:0;return n.toFixed(i)+" "+t[o]},FilePicker.escapeHtml=basic.escapeHtml,FilePicker.createMinimalStyle=function(e){return{zoneHeight:120,style:{zone:{color:"transparent",border:1,borderColor:e.edge,round:4},zoneHover:{color:"transparent",borderColor:e.edgeHover},zoneDragOver:{color:e.hover,borderColor:e.ink},icon:{size:28,space:0,svg:FilePicker.MINIMAL_UPLOAD_ICON,color:e.softText,dragOverColor:e.ink},title:{fontSize:13,textColor:e.text,fontFamily:"opensans-bold"},desc:{fontSize:12,textColor:e.softText},hint:{fontSize:11,textColor:e.softText},item:{height:42,color:"transparent",border:1,borderColor:e.line,round:4},itemName:{fontSize:13,textColor:e.text},itemSize:{fontSize:11,textColor:e.softText},badge:{color:"transparent",textColor:e.softText,round:3},removeButton:{textColor:e.softText,hoverColor:e.danger},disabled:{opacity:.4}}}},FilePicker.MINIMAL_COLORS={text:Black(.85),softText:Black(.55),line:Black(.2),edge:Black(.45),edgeHover:Black(.65),ink:"#1F1F1F",hover:Black(.04),danger:"#C24A36"},FilePicker.styles.minimal=FilePicker.createMinimalStyle(FilePicker.MINIMAL_COLORS),FilePicker.MINIMAL_DARK_COLORS={text:White(.88),softText:White(.55),line:White(.18),edge:White(.42),edgeHover:White(.62),ink:"#EDEDEB",hover:White(.06),danger:"#FF9F93"},FilePicker.styles.minimalDark=FilePicker.createMinimalStyle(FilePicker.MINIMAL_DARK_COLORS);
@@ -1,2 +1,2 @@
1
1
  /* Bismillah */
2
- "use strict";const FiltersDefaults={key:"0",width:380,height:"auto",panelHeight:620,panelOpened:1,panelMode:"inline",buttonText:"Filters",searchPlaceholder:"Search",selectedText:"Selected",clearText:"Clear all",noResultText:"No results",sections:[],onChange:function(e){},onPanelToggle:function(e){},styleName:"light",style:{accentColor:"#2F5BD3",textColor:"#1F1F1E",softTextColor:"#8C8B88",fontSize:18,button:{color:"#E2E1DD",height:50,round:12,padding:[16,0],gap:8},panel:{color:"#F7F6F3",border:1,borderColor:"#E4E3DF",round:18,padding:8,gap:6,shadow:"0 10px 30px rgba(0, 0, 0, 0.08)"},field:{color:"#EDECE8",height:50,round:12,padding:[14,0],gap:10},header:{height:44,padding:[12,0],gap:8},row:{color:"white",height:48,round:12,padding:[12,0],gap:14,hoverColor:"#FBFBFA"},check:{size:22,round:6,color:"#EDECE8",markColor:"white"},badge:{color:"#E6E5E1",fontSize:14,round:11,padding:[8,2]},footer:{height:56,padding:[12,0],gap:8},listGap:6,scrollBar:{bar_color:"#8C8B88",bar_width:4,bar_round:3,bar_opacity:.4,bar_mouseOverOpacity:.9}}},Filters=function(e={}){basic.applyStylePackage(e,Filters.styles,FiltersDefaults),mergeIntoIfMissing(e,FiltersDefaults),e.sections=Filters.normalizeSections(e.sections);const t="popup"===e.panelMode,o=e.width;t&&(e.width="auto");const n=startObject(e),l=n.style;let r="";n.sectionViews=[];const i=function(e,t){const o=Label({text:e,textColor:t,lineHeight:"0"});return o.shrink=0,o},a=function(){const e=Box({width:1,height:1,color:"transparent"});return e.grow=1,e},c=function(){const e=Label({text:"",fontSize:l.badge.fontSize,textColor:l.softTextColor,color:l.badge.color,round:l.badge.round,padding:l.badge.padding});return e.shrink=0,e},s=function(e){return e.options.filter(function(e){return e.checked}).length},d=function(e){const t={section:e,rows:[]};return t.header=HGroup({width:"100%",height:l.header.height,align:"left center",gap:l.header.gap,padding:l.header.padding}),t.header.shrink=0,t.header.clickable=1,t.header.cursor="pointer",t.header.role="button",Label({plainText:e.titleText,fontSize:l.fontSize,textColor:l.softTextColor}),t.lblCount=c(),a(),t.lblArrow=i("",l.textColor),endGroup(),t.header.on("click",function(){n.setSectionOpened(e.key,!e.opened)}),t.rows=e.options.map(function(e){return function(e,t){const o=HGroup({width:"100%",height:l.row.height,align:"left center",gap:l.row.gap,padding:l.row.padding,color:l.row.color,round:l.row.round});o.shrink=0,o.clickable=1,o.cursor="pointer",o.role="checkbox",o.tabIndex=0;const n=HGroup({width:l.check.size,height:l.check.size,round:l.check.round});n.shrink=0;const r=i(Filters.icon("check",16,3),l.check.markColor);endGroup(),Label({plainText:t.labelText,fontSize:l.fontSize,textColor:l.textColor}),endGroup();const a={option:t,row:o,check:n,mark:r};return o.onHoverChange(function(e,t){o.color=t?l.row.hoverColor:l.row.color}),o.on("click",function(){h(e,a)}),o.on("keydown",function(t,o){" "!==o.key&&"Enter"!==o.key||(o.preventDefault(),h(e,a))}),a}(t,e)}),t},p=function(){n.listGroup&&n.listGroup.remove(),n.listGroup=createIn(n.listBox,function(){const e=VGroup({width:"100%",height:"auto",align:"left top",gap:l.listGap,position:"relative"});return n.sectionViews=n.sections.map(d),n.lblNoResult=Label({plainText:n.noResultText,fontSize:l.fontSize,textColor:l.softTextColor,padding:[12,12]}),endGroup(),e})},u=function(){let e=0;n.sectionViews.forEach(function(t){const o=s(t.section);t.lblCount.plainText=String(o),t.lblCount.visible=o?1:0,t.lblArrow.text=Filters.icon(t.section.opened?"up":"down",20),t.header.aria={expanded:t.section.opened?"true":"false"};let n=0;t.rows.forEach(function(e){const o=!!e.option.checked;e.check.color=o?l.accentColor:l.check.color,e.mark.visible=o?1:0,e.row.aria={checked:o?"true":"false"};const i=(a=e.option,!r||-1!==a.labelText.toLocaleLowerCase().indexOf(r));var a;i&&n++,e.row.visible=i&&(t.section.opened||r)?1:0}),t.header.visible=!r||n?1:0,e+=n}),n.lblNoResult.visible=r&&!e?1:0;const t=n.getSelectedCount();n.lblSelectedCount.plainText=String(t),n.lblSelectedCount.visible=t?1:0,n.lblClear.opacity=t?1:.4},h=function(e,t){t.option.checked=t.option.checked?0:1,u(),n.onChange(n)},g=function(e){return n.sections.find(function(t){return t.key===e})||null},f=function(){n.panel=VGroup({width:o,height:n.panelHeight,align:"left top",gap:l.panel.gap,padding:l.panel.padding,color:l.panel.color,round:l.panel.round,border:l.panel.border,borderColor:l.panel.borderColor,boxShadow:l.panel.shadow}),n.searchField=HGroup({width:"100%",height:l.field.height,align:"left center",gap:l.field.gap,padding:l.field.padding,color:l.field.color,round:l.field.round}),i(Filters.icon("search",20),l.softTextColor),n.inpSearch=Input({height:l.field.height-10,fontSize:l.fontSize,textColor:l.textColor,minimal:1,color:"transparent",placeholder:n.searchPlaceholder}),n.inpSearch.grow=1,endGroup();const e=n.panelHeight-l.field.height-l.footer.height-2*l.panel.padding-12;n.listBox=startBox(0,0,"100%",e,{color:"transparent",scrollY:1}),n.listBox.position="relative",endBox(),n.footer=HGroup({width:"100%",height:l.footer.height,align:"left center",gap:l.footer.gap,padding:l.footer.padding}),Label({plainText:n.selectedText,fontSize:l.fontSize,textColor:l.softTextColor}),n.lblSelectedCount=c(),a(),n.lblClear=Label({plainText:n.clearText,fontSize:l.fontSize,textColor:l.accentColor}),n.lblClear.clickable=1,n.lblClear.cursor="pointer",n.lblClear.role="button",endGroup(),endGroup(),"undefined"!=typeof ScrollBar&&(n.scrollBar=ScrollBar(Object.assign({scrollableBox:n.listBox},l.scrollBar)))},b=function(){if(!t||!n.panelOpened)return;const e=n.btnFilters.elem.getBoundingClientRect(),l=withPageZoom(e.top),r=withPageZoom(e.bottom),i=page.height-r-10-8,a=l-10-8;let c=r+10;n.panelHeight>i&&a>i&&(c=l-10-n.panelHeight);const s=withPageZoom(e.right)-o;n.panel.left=Math.max(8,Math.min(s,page.width-o-8)),n.panel.top=Math.max(8,c)},x=function(e,t){return e.elem.contains(t)},k=function(e,t){n.panelOpened&&(x(n.panel,t.target)||x(n.btnFilters,t.target)||n.closePanel())},C=function(e,t){"Escape"===t.key&&n.panelOpened&&(n.closePanel(),n.btnFilters.elem.focus())},w=function(e,t){x(n.panel,t.target)||b()};return n.getSelected=function(){const e={};return n.sections.forEach(function(t){e[t.key]=t.options.filter(function(e){return e.checked}).map(function(e){return e.key})}),e},n.getSelectedCount=function(){return n.sections.reduce(function(e,t){return e+s(t)},0)},n.setSelected=function(e,t,o=0){const l=g(e);if(!l)return;const r=(t||[]).map(String);l.options.forEach(function(e){e.checked=-1!==r.indexOf(e.key)?1:0}),u(),o||n.onChange(n)},n.clearAll=function(e=0){n.getSelectedCount()&&(n.sections.forEach(function(e){e.options.forEach(function(e){e.checked=0})}),u(),e||n.onChange(n))},n.setSectionOpened=function(e,t){const o=g(e);o&&(o.opened=t?1:0,u())},n.setSections=function(e){n.sections=Filters.normalizeSections(e),p(),u()},n.search=function(e){r=String(e||"").trim().toLocaleLowerCase(),n.inpSearch.text!==e&&(n.inpSearch.text=String(e||"")),u()},n.openPanel=function(){n.setPanelOpened(1)},n.closePanel=function(){n.setPanelOpened(0)},n.togglePanel=function(){n.setPanelOpened(!n.panelOpened)},n.setPanelOpened=function(e,t=0){const o=e?1:0;o!==n.panelOpened&&(n.panelOpened=o,n.panel.visible=o,n.btnFilters.aria={expanded:o?"true":"false"},o&&b(),t||n.onPanelToggle(n))},n.setButtonText=function(e){n.buttonText=e,n.lblButton.plainText=e},n.layout=VGroup({width:t?"auto":o,height:"auto",align:"right top",gap:10,position:"relative"}),n.clipContent=0,n.layout.clipContent=0,n.btnFilters=HGroup({width:"auto",height:l.button.height,gap:l.button.gap,padding:l.button.padding,color:l.button.color,round:l.button.round}),n.btnFilters.clickable=1,n.btnFilters.cursor="pointer",n.btnFilters.role="button",n.btnFilters.tabIndex=0,i(Filters.icon("filter",20),l.textColor),n.lblButton=Label({plainText:n.buttonText,fontSize:l.fontSize,textColor:l.textColor}),i(Filters.icon("down",20),l.textColor),endGroup(),t||f(),endGroup(),t&&(createIn(page,f),n.panel.zIndex=1001,n.own(n.panel)),n.btnFilters.on("click",n.togglePanel),n.btnFilters.on("keydown",function(e,t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),n.togglePanel())}),n.lblClear.on("click",function(){n.clearAll()}),n.listenTo(n.inpSearch.inputElement,"input",function(){n.search(n.inpSearch.text)}),t&&(n.listenTo(document,"pointerdown",k,!0),n.listenTo(document,"keydown",C),n.listenTo(document,"scroll",w,!0),n.onPageResize(b)),p(),u(),n.panelOpened=0,n.panel.visible=0,n.setPanelOpened(e.panelOpened,1),endObject(n)};Filters.normalizeSections=function(e){return(Array.isArray(e)?e:[]).map(function(e,t){const o=(Array.isArray(e.options)?e.options:[]).map(function(e){return"object"!=typeof e?{key:String(e),labelText:String(e),checked:0}:{key:String(void 0!==e.key?e.key:e.labelText),labelText:String(e.labelText||""),checked:e.checked?1:0}});return{key:String(void 0!==e.key?e.key:t),titleText:String(e.titleText||""),opened:e.opened?1:0,options:o}})},Filters.ICON_PATHS={filter:'<path d="M4 5h16l-6 7.5V19l-4-2v-4.5z"/>',search:'<circle cx="11" cy="11" r="6.5"/><path d="M16 16l4 4"/>',down:'<path d="M6 9l6 6 6-6"/>',up:'<path d="M6 15l6-6 6 6"/>',check:'<path d="M5 12.5l4.5 4.5L19 7.5"/>'},Filters.icon=function(e,t,o=2){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="'+o+'" stroke-linecap="round" stroke-linejoin="round">'+Filters.ICON_PATHS[e]+"</svg>"},Filters.styles={light:FiltersDefaults.style};
2
+ "use strict";const FiltersDefaults={key:"0",width:380,height:"auto",panelHeight:620,panelOpened:1,panelMode:"inline",buttonText:"Filters",searchPlaceholder:"Search",selectedText:"Selected",clearText:"Clear all",noResultText:"No results",sections:[],animated:0,searchInputParams:{styleName:"ozden",width:"100%",height:50,fontSize:18,searchIconSize:20},checkBoxParams:{styleName:"light",style:{}},onChange:function(e){},onPanelToggle:function(e){},styleName:"light",style:{accentColor:"#2F5BD3",textColor:"#1F1F1E",softTextColor:"#8C8B88",fontSize:18,button:{color:"#E2E1DD",height:50,round:12,padding:[16,0],gap:8},buttonIcon:{strongColor:"",lightColor:""},panel:{color:"#F7F6F3",border:1,borderColor:"#E4E3DF",round:18,padding:8,gap:6,shadow:"0 10px 30px rgba(0, 0, 0, 0.08)"},field:{color:"#EDECE8",height:50,round:12,padding:[14,0],gap:10},header:{height:44,padding:[12,0],gap:8},row:{color:"white",height:48,round:12,padding:[12,0],gap:14,hoverColor:"#FBFBFA"},check:{size:22,round:6,color:"#EDECE8",markColor:"white"},badge:{color:"#E6E5E1",fontSize:14,round:11,padding:[8,2]},footer:{height:56,padding:[12,0],gap:8},listGap:6,scrollBar:{bar_color:"#8C8B88",bar_width:4,bar_round:3,bar_opacity:.4,bar_mouseOverOpacity:.9}}},Filters=function(e={}){basic.applyStylePackage(e,Filters.styles,FiltersDefaults),mergeIntoIfMissing(e,FiltersDefaults),e.sections=Filters.normalizeSections(e.sections);const t="popup"===e.panelMode,n=e.width;t&&(e.width="auto");const o=startObject(e),r=o.style,i="0.25s",l="cubic-bezier(0.2, 0.8, 0.2, 1)",c="transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1)",a=150,s="undefined"!=typeof SearchInput,u="undefined"!=typeof CheckBox;let d="",p=0,h=0,f=null;o.sectionViews=[];const g=function(e,t){const n=Label({text:e,textColor:t,lineHeight:"0"});return n.shrink=0,n},b=function(){const e=Box({width:1,height:1,color:"transparent"});return e.grow=1,e},x=function(){const e=Label({text:"",fontSize:r.badge.fontSize,textColor:r.softTextColor,color:r.badge.color,round:r.badge.round,padding:r.badge.padding});return e.shrink=0,e},w=function(e){return e.options.filter(function(e){return e.checked}).length},k=function(){return 1==o.animated&&!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)},C=function(e,t){e.setMotionNow("none"),e.opacity=0,e.css={transform:"translateY("+t+"px)"},e.elem.offsetHeight,e.setMotionNow("opacity 0.25s "+l+", transform "+i+" "+l),e.opacity=1,e.css={transform:"none"}},m=function(e,t){e.setMotionNow("opacity 150ms "+l+", transform "+a+"ms "+l),e.opacity=0,e.css={transform:"translateY("+t+"px)"}},S=function(e){e.setMotionNow("none"),e.opacity=1,e.css={transform:"none"}},y=function(){k()&&(o.sectionViews.forEach(function(e){e.lblArrow.setMotion(c)}),o.lblButtonArrow.setMotion(c))},T=function(){k()?o.lblButtonArrow.css={transform:o.panelOpened?"rotate(180deg)":"none"}:h&&(o.lblButtonArrow.css={transform:"none"})},F=function(){o.searchInput&&o.searchInput.setAnimated(o.animated),o.sectionViews.forEach(function(e){e.rows.forEach(function(e){e.checkBox&&e.checkBox.setAnimated(o.animated)})}),k()?(y(),h=1):h&&(o.sectionViews.forEach(function(e){S(e.lblArrow),S(e.body)}),S(o.lblButtonArrow),S(o.panel),h=0),T(),O()},B=function(e){o.setSectionOpened(e.key,!e.opened)},v=function(e,t){const n={section:e,rows:[],isClosing:0,cancelClose:null};return n.header=HGroup({width:"100%",height:r.header.height,align:"left center",gap:r.header.gap,padding:r.header.padding}),n.header.shrink=0,n.header.clickable=1,n.header.cursor="pointer",n.header.role="button",n.header.tabIndex=0,Label({plainText:e.text,fontSize:r.fontSize,textColor:r.softTextColor}),n.lblCount=x(),b(),n.lblArrow=g("",r.textColor),endGroup(),n.header.on("click",function(){B(e)}),n.header.on("keydown",function(t,n){" "!==n.key&&"Enter"!==n.key||(n.preventDefault(),B(e))}),n.body=VGroup({width:"100%",height:"auto",align:"left top",gap:r.listGap}),n.body.shrink=0,n.rows=e.options.map(function(e){return u?function(e,t){const n=CheckBox(Object.assign({},o.checkBoxParams,{width:"100%",height:r.row.height,labelText:basic.escapeHtml(e.text),checked:e.checked?1:0,animated:void 0!==o.checkBoxParams.animated?o.checkBoxParams.animated:o.animated,style:t,onChange:function(t){e.checked=t.checked?1:0,O(),o.onChange(o)}}));return n.shrink=0,n.contentBox.height="100%",{option:e,row:n,checkBox:n}}(e,t):function(e){const t=HGroup({width:"100%",height:r.row.height,align:"left center",gap:r.row.gap,padding:r.row.padding,color:r.row.color,round:r.row.round});t.shrink=0,t.clickable=1,t.cursor="pointer",t.role="checkbox",t.tabIndex=0;const n=HGroup({width:r.check.size,height:r.check.size,round:r.check.round});n.shrink=0;const o=g(Filters.icon("check",16,3),r.check.markColor);endGroup(),Label({plainText:e.text,fontSize:r.fontSize,textColor:r.textColor}),endGroup();const i={option:e,row:t,check:n,mark:o};return t.onHoverChange(function(e,n){t.color=n?r.row.hoverColor:r.row.color}),t.on("click",function(){G(i)}),t.on("keydown",function(e,t){" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),G(i))}),i}(e)}),endGroup(),n},I=function(){o.listGroup&&o.listGroup.remove();const e=u?function(){const e=JSON.parse(JSON.stringify(o.checkBoxParams.style||{}));return mergeIntoIfMissing(e,{box:{color:r.row.color,round:r.row.round},hoverBox:{color:r.row.hoverColor},hoverCheckedBox:{color:r.row.hoverColor},layout:{gap:r.row.gap,padding:r.row.padding,align:"left center"},checkedMark:{color:r.accentColor,borderColor:r.accentColor},label:{fontSize:r.fontSize,textColor:r.textColor}}),e}():null;o.listGroup=createIn(o.listBox,function(){const t=VGroup({width:"100%",height:"auto",align:"left top",gap:r.listGap,position:"relative"});return o.sectionViews=o.sections.map(function(t){return v(t,e)}),o.lblNoResult=Label({plainText:o.noResultText,fontSize:r.fontSize,textColor:r.softTextColor,padding:[12,12]}),endGroup(),t}),o.lblButtonArrow&&y()},O=function(){let e=0;o.sectionViews.forEach(function(t){const n=w(t.section);t.lblCount.plainText=String(n),t.lblCount.visible=n?1:0,function(e,t){if(k())return e.isTurningArrow||(e.text=Filters.icon("down",20)),e.isTurningArrow=1,void(e.css={transform:t?"rotate(180deg)":"none"});e.isTurningArrow&&(e.css={transform:"none"}),e.isTurningArrow=0,e.text=Filters.icon(t?"up":"down",20)}(t.lblArrow,t.section.opened),t.header.aria={expanded:t.section.opened?"true":"false"};let o=0;t.rows.forEach(function(e){!function(e){const t=e.option.checked?1:0;e.checkBox?e.checkBox.checked!=t&&e.checkBox.setChecked(t,1):(e.check.color=t?r.accentColor:r.check.color,e.mark.visible=t,e.row.aria={checked:t?"true":"false"})}(e);const t=(n=e.option,!d||-1!==n.text.toLocaleLowerCase().indexOf(d));var n;t&&o++,e.row.visible=t?1:0});const i=t.section.opened||d||t.isClosing;t.body.visible=i&&o?1:0,t.header.visible=!d||o?1:0,e+=o}),o.lblNoResult.visible=d&&!e?1:0;const t=o.getSelectedCount();o.lblSelectedCount.plainText=String(t),o.lblSelectedCount.visible=t?1:0,o.lblClear.opacity=t?1:.4},G=function(e){e.option.checked=e.option.checked?0:1,O(),o.onChange(o)},z=function(){o.searchField=HGroup({width:"100%",height:r.field.height,align:"left center",gap:r.field.gap,padding:r.field.padding,color:r.field.color,round:r.field.round}),g(Filters.icon("search",20),r.softTextColor),o.inpSearch=Input({height:r.field.height-10,fontSize:r.fontSize,textColor:r.textColor,minimal:1,color:"transparent",placeholder:o.searchPlaceholder}),o.inpSearch.grow=1,endGroup(),o.listenTo(o.inpSearch.inputElement,"input",function(){o.search(o.inpSearch.text)})},E=function(){o.panel=VGroup({width:n,height:o.panelHeight,align:"left top",gap:r.panel.gap,padding:r.panel.padding,color:r.panel.color,round:r.panel.round,border:r.panel.border,borderColor:r.panel.borderColor,boxShadow:r.panel.shadow}),function(){if(!s)return void z();const e=Object.assign({},o.searchInputParams);e.placeholder=o.searchPlaceholder,void 0===e.animated&&(e.animated=o.animated),e.onChange=function(){o.search(o.searchInput.value)},o.searchInput=SearchInput(e),o.searchInput.shrink=0}();const e=o.panelHeight-(o.searchInput?o.searchInput.height:r.field.height)-r.footer.height-2*r.panel.padding-12;o.listBox=startBox(0,0,"100%",e,{color:"transparent",scrollY:1}),o.listBox.position="relative",endBox(),o.footer=HGroup({width:"100%",height:r.footer.height,align:"left center",gap:r.footer.gap,padding:r.footer.padding}),Label({plainText:o.selectedText,fontSize:r.fontSize,textColor:r.softTextColor}),o.lblSelectedCount=x(),b(),o.lblClear=Label({plainText:o.clearText,fontSize:r.fontSize,textColor:r.accentColor}),o.lblClear.clickable=1,o.lblClear.cursor="pointer",o.lblClear.role="button",endGroup(),endGroup(),"undefined"!=typeof ScrollBar&&(o.scrollBar=ScrollBar(Object.assign({scrollableBox:o.listBox},r.scrollBar)))},P=function(){if(!t||!o.panelOpened)return;const e=o.btnFilters.elem.getBoundingClientRect(),r=withPageZoom(e.top),i=withPageZoom(e.bottom),l=page.height-i-10-8,c=r-10-8;let a=i+10;o.panelHeight>l&&c>l&&(a=r-10-o.panelHeight);const s=withPageZoom(e.right)-n;o.panel.left=Math.max(8,Math.min(s,page.width-n-8)),o.panel.top=Math.max(8,a)},A=function(){if(!t)return-6;const e=withPageZoom(o.btnFilters.elem.getBoundingClientRect().top);return o.panel.top<e?6:-6},H=function(e,t){return e.elem.contains(t)},N=function(e,t){o.panelOpened&&(H(o.panel,t.target)||H(o.btnFilters,t.target)||o.closePanel())},M=function(e,t){"Escape"===t.key&&o.panelOpened&&(o.closePanel(),o.btnFilters.elem.focus())},L=function(e,t){H(o.panel,t.target)||P()};return o.getSelected=function(){const e={};return o.sections.forEach(function(t){e[t.key]=t.options.filter(function(e){return e.checked}).map(function(e){return e.key})}),e},o.getSelectedCount=function(){return o.sections.reduce(function(e,t){return e+w(t)},0)},o.setSelected=function(e,t,n=0){const r=function(e){return o.sections.find(function(t){return t.key===e})||null}(e);if(!r)return;const i=(t||[]).map(String);r.options.forEach(function(e){e.checked=-1!==i.indexOf(e.key)?1:0}),O(),n||o.onChange(o)},o.clearAll=function(e=0){o.getSelectedCount()&&(o.sections.forEach(function(e){e.options.forEach(function(e){e.checked=0})}),O(),e||o.onChange(o))},o.setSectionOpened=function(e,t){const n=function(e){return o.sectionViews.find(function(t){return t.section.key===String(e)})||null}(e);if(!n)return;const r=t?1:0,i=r!==n.section.opened;n.section.opened=r,i&&p&&k()&&!d?r?function(e){e.cancelClose&&e.cancelClose(),e.cancelClose=null,e.isClosing=0,O(),C(e.body,-6)}(n):function(e){e.isClosing=1,O(),m(e.body,-6),e.cancelClose=e.body.after(a,function(){e.cancelClose=null,e.isClosing=0,S(e.body),O()})}(n):O()},o.setSections=function(e){o.sections=Filters.normalizeSections(e),I(),O()},o.search=function(e){const t=String(e||"");d=t.trim().toLocaleLowerCase(),o.searchInput&&o.searchInput.value!==t&&o.searchInput.setValue(t,1),o.inpSearch&&o.inpSearch.text!==t&&(o.inpSearch.text=t),O()},o.openPanel=function(){o.setPanelOpened(1)},o.closePanel=function(){o.setPanelOpened(0)},o.togglePanel=function(){o.setPanelOpened(!o.panelOpened)},o.setPanelOpened=function(e,n=0){const r=e?1:0;r!==o.panelOpened&&(o.panelOpened=r,r&&t&&(o.panel.zIndex=basic.zIndexAbove(o,1001)),r?(f&&f(),f=null,o.panel.visible=1,P(),p&&k()&&C(o.panel,A())):p&&k()?(m(o.panel,A()),f=o.panel.after(a,function(){f=null,o.panel.visible=0,S(o.panel)})):o.panel.visible=0,o.btnFilters.aria={expanded:r?"true":"false"},T(),n||o.onPanelToggle(o))},o.setButtonText=function(e){o.buttonText=e,o.lblButton.plainText=e},o.setAnimated=function(e){o.animated=1==e?1:0,F()},o.layout=VGroup({width:t?"auto":n,height:"auto",align:"right top",gap:10,position:"relative"}),o.clipContent=0,o.layout.clipContent=0,o.btnFilters=HGroup({width:"auto",height:r.button.height,gap:r.button.gap,padding:r.button.padding,color:r.button.color,round:r.button.round}),o.btnFilters.clickable=1,o.btnFilters.cursor="pointer",o.btnFilters.role="button",o.btnFilters.tabIndex=0,g(function(){const e=r.buttonIcon.strongColor||r.accentColor,t=r.buttonIcon.lightColor||Filters.lightTone(e);return Filters.twoToneIcon("filter",20,e,t)}(),r.textColor),o.lblButton=Label({plainText:o.buttonText,fontSize:r.fontSize,textColor:r.textColor}),o.lblButtonArrow=g(Filters.icon("down",20),r.textColor),endGroup(),t||E(),endGroup(),t&&(createIn(page,E),o.panel.zIndex=1001,o.own(o.panel)),o.btnFilters.on("click",o.togglePanel),o.btnFilters.on("keydown",function(e,t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),o.togglePanel())}),o.lblClear.on("click",function(){o.clearAll()}),t&&(o.listenTo(document,"pointerdown",N,!0),o.listenTo(document,"keydown",M),o.listenTo(document,"scroll",L,!0),o.onPageResize(P)),I(),o.panelOpened=0,o.panel.visible=0,o.setPanelOpened(e.panelOpened,1),F(),p=1,endObject(o)};Filters.normalizeSections=function(e){return(Array.isArray(e)?e:[]).map(function(e,t){const n=(Array.isArray(e.options)?e.options:[]).map(function(e){return"object"!=typeof e?{key:String(e),text:String(e),checked:0}:{key:String(void 0!==e.key?e.key:e.text),text:String(e.text||""),checked:e.checked?1:0}});return{key:String(void 0!==e.key?e.key:t),text:String(e.text||""),opened:e.opened?1:0,options:n}})},Filters.ICON_PATHS={search:'<circle cx="11" cy="11" r="6.5"/><path d="M16 16l4 4"/>',down:'<path d="M6 9l6 6 6-6"/>',up:'<path d="M6 15l6-6 6 6"/>',check:'<path d="M5 12.5l4.5 4.5L19 7.5"/>'},Filters.icon=function(e,t,n=2){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="'+n+'" stroke-linecap="round" stroke-linejoin="round">'+Filters.ICON_PATHS[e]+"</svg>"},Filters.TWO_TONE_PATHS={filter:'<rect x="2.5" y="2.5" width="19" height="19" rx="3" fill="LIGHT"/><path d="M7 8.5h10M7 15.5h10" fill="none" stroke="STRONG" stroke-width="2" stroke-linecap="round"/><circle cx="10" cy="8.5" r="2.2" fill="STRONG"/><circle cx="14.5" cy="15.5" r="2.2" fill="STRONG"/>'},Filters.twoToneIcon=function(e,t,n,o){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+t+'" viewBox="0 0 24 24">'+Filters.TWO_TONE_PATHS[e].split("STRONG").join(n).split("LIGHT").join(o)+"</svg>"},Filters.LIGHT_TONE=.32,Filters.lightTone=function(e){const t=/^#([0-9a-f]{6})$/i.exec(String(e).trim());if(!t)return Alpha(e,Filters.LIGHT_TONE);return"#"+[0,2,4].map(function(e){return parseInt(t[1].substr(e,2),16)}).map(function(e){return Math.round(e*Filters.LIGHT_TONE+255*(1-Filters.LIGHT_TONE))}).map(function(e){return e.toString(16).padStart(2,"0")}).join("")},Filters.styles={light:FiltersDefaults.style};
@@ -1,2 +1,2 @@
1
1
  /* Bismillah */
2
- "use strict";const FormDefaults={minWidth:500,maxWidth:700,buttonColor:"#65A293",buttonText:"SEND",showDetailWarning:1,missingEntryText:"{{count}} missing entry",missingEntriesText:"{{count}} missing entries",warningText:"<b>{{name}}</b> can't be empty",errorText:"<b>{{name}}</b> is not valid",minimalButton:0,doubleInputAlwaysHorizontal:0,showPassiveButtonHint:1,passiveButtonHintText:"Please fill in the missing fields to send the form.",onEdit:function(t){},onSendClick:function(t){}},Form=function(t={}){mergeIntoIfMissing(t,FormDefaults),t.left=0,t.top=0,t.width="100%",t.height="100%",t.color="transparent";let n=startObject(t);n.inputList=[],n.groupList=[];n.showMessage=function(t){t||(t={iconColor:"#3C8553",iconFile:"assets/success.png",messageText:"Data sent successfully.",buttonText:"OKAY",backgroundColor:"rgba(255,255,255,0.85)",onClose:function(){}});const n=VGroup({color:t.backgroundColor,gap:10,clickable:1});that.opacity=0,that.css.transform="scale(0.8) translateY(40px)",that.setMotion("transform 0.2s, opacity 0.2s"),that.withMotion(t=>{t.css.transform="scale(1) translateY(0px)",t.opacity=1}),VGroup({width:"auto",height:"auto",color:t.iconColor,round:100}),Icon({width:32,height:32}),that.load(t.iconFile),that.css.filter="invert(100%)",endGroup(),Label({text:t.messageText}),Label({text:t.buttonText,padding:[12,4],round:12,color:"#373836",textColor:"#EBEBEB",fontSize:14,clickable:1}),that.cursor="pointer",that.on("click",function(o){t.onClose(),o.clickable=0,n.opacity=0,n.css.transform="scale(0.8) translateY(0px)",setTimeout(()=>{n.remove()},200)}),endGroup()};const o=function(){n.btnSendCover&&(n.btnSendCover.left=n.btnSend.left,n.btnSendCover.top=n.btnSend.top,n.btnSendCover.width=n.btnSend.elem.offsetWidth||n.btnSend.width,n.btnSendCover.height=n.btnSend.elem.offsetHeight||n.btnSend.height)},e=function(t){n.btnSendCover&&(n.btnSendCover.clickable=t,!t&&n.btnSendCover.tooltip&&(n.btnSendCover.tooltip.visible=0))},i=function(){let t=0,o="";n.inputList.forEach(e=>{0!==e.status&&(o+=function(t){return 1==t.status?n.warningText.replace("{{name}}",t.titleText)+"<br>":2==t.status?n.errorText.replace("{{name}}",t.titleText)+"<br>":""}(e),t++)}),n.lblWarningDetail.text=o,t>0?(n.btnSend.clickable=0,n.btnSend.css.filter="grayscale(100%)",e(1),n.lblWarning.text=function(t){return(1==t?n.missingEntryText:n.missingEntriesText).replace("{{count}}",t)}(t),n.lblWarning.opacity=1,n.lblWarning.clickable=1):(n.lblWarning.opacity=0,n.lblWarning.clickable=0,n.btnSend.clickable=1,n.btnSend.css.filter="grayscale(0%)",e(0))},r=function(){page.fit(n.minWidth);const t=page.width<n.minWidth+50&&1!=n.doubleInputAlwaysHorizontal?"vertical":"horizontal";n.groupList.forEach(n=>{n.flow=t}),n.formContainer.center("left")},a=n.remove;n.superRemove=a,n.remove=function(){n&&(n.scrollBar&&n.scrollBar.remove(),a.call(n),n=null)},n.setPassiveButtonHintText=function(t){n.passiveButtonHintText=t,n.btnSendCover&&n.btnSendCover.tooltip&&n.btnSendCover.tooltip.setHintText(t)},n.addInput=function(t){n.inputGroup.add(t),t.width="100%",t.position="relative",n.inputList.push(t),l(t),n.refresh()},n.addTitle=function(t){n.titleGroup.add(t),t.position="relative"},n.addDoubleInput=function(t,o){const e=AutoLayout({flow:"horizontal",gap:20,width:"100%",height:"auto"});endAutoLayout(),e.add(t),t.width="100%",t.position="relative",e.add(o),o.width="100%",o.position="relative",n.inputGroup.add(e),e.position="relative",n.groupList.push(e),n.inputList.push(t),n.inputList.push(o),l(t),l(o),n.refresh()},n.refresh=function(){i()};const l=function(t){t.onEdit=function(){i(),n.onEdit(t)},t.onFocus=function(){i()},t.onBlur=function(){i()}};var s;return n.scrollY=1,n.formContainer=startBox(0,0,{height:"auto",width:"100%",color:"transparent"}),that.css={minWidth:n.minWidth+"px",maxWidth:n.maxWidth+"px"},AutoLayout({flow:"vertical",align:"top center",gap:20,padding:[40,40],height:"auto",position:"relative"}),n.titleGroup=AutoLayout({flow:"vertical",align:"left top",gap:0,width:"100%",height:"auto"}),endAutoLayout(),n.titleGroup.css.marginBottom="20px",n.inputGroup=AutoLayout({flow:"vertical",align:"top center",gap:20,padding:[0,0],width:"100%",height:"auto",position:"relative"}),endAutoLayout(),AutoLayout({width:"100%",height:"auto",clipContent:0}),that.css.marginTop="20px",n.btnSend=Button({width:"100%",text:n.buttonText,color:n.buttonColor,minimal:n.minimalButton}),(s=that).setMotion("filter 0.2s, transform 0.2s"),s.on("mouseover",function(){s.css.filter="brightness(120%)"}),s.on("mouseout",function(){s.css.filter="brightness(100%)"}),s.on("mousedown",function(){s.css={transform:"scale(0.95)",filter:"brightness(80%)"},setTimeout(function(){s.css={transform:"scale(1)",filter:"brightness(120%)"}},200)}),that.on("click",function(t,o){if(1!=n.btnSend.clickable)return;if(o.detail>1)return;const e=function(){const t=[];return n.inputList.forEach(n=>{const o={};o.key=n.key,o.type=n.type,o.titleText=n.titleText,o.inputValue=n.getInputValue(),t.push(o)}),t}();n.onSendClick(e)}),that.on("keydown",function(t,n){!n.repeat||"Enter"!=n.key&&" "!=n.key||n.preventDefault()}),n.btnSend.clickable=0,n.btnSend.css.filter="grayscale(100%)",1==n.showPassiveButtonHint&&"undefined"!=typeof Tooltip&&(n.btnSendCover=Box({position:"absolute",color:"transparent",clickable:1}),n.btnSendCover.tooltip=Tooltip({target:n.btnSendCover,hintText:n.passiveButtonHintText,hintPosition:"top",lbl_color:"white",lbl_textColor:"#141414",lbl_borderColor:"#141414",lbl_border:1,lbl_fontSize:14,lbl_round:2}),o(),n.btnSend.onResize(o)),n.lblWarning=Label({text:"2 Warnings",textColor:"#373836",color:"#F1C74A",padding:[8,2],position:"absolute",fontSize:14,round:4,border:1,opacity:0}),that.setMotion("opacity 0.2s"),n.lblWarning.left=n.btnSend.left+5,n.lblWarning.top=n.btnSend.top+5,n.lblWarningDetail=Label({text:"",textColor:"#373836",color:"whitesmoke",padding:[8,2],position:"absolute",fontSize:12,round:4,border:1,opacity:0}),that.css.transform="scale(0.7)",that.setMotion("opacity 0.2s, transform 0.2s"),n.lblWarning.on("mouseover",function(){1==n.showDetailWarning&&(n.lblWarningDetail.opacity=1,n.lblWarningDetail.aline(n.lblWarning,"top",8,"left"),n.lblWarningDetail.css.transform="scale(1)")}),n.lblWarning.on("mouseout",function(){n.lblWarningDetail.opacity=0,n.lblWarningDetail.css.transform="scale(0.7)"}),endAutoLayout(),endAutoLayout(),endBox(),"function"==typeof ScrollBar&&(n.scrollBar=ScrollBar({scrollableBox:n,bar_border:0,bar_round:2,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:0,showDots:1})),n.refresh(),r(),n.onPageResize(r),endObject(n)};
2
+ "use strict";const FormDefaults={minWidth:500,maxWidth:700,buttonColor:"#65A293",buttonText:"SEND",allowHtml:0,showDetailWarning:1,missingEntryText:"{{count}} missing entry",missingEntriesText:"{{count}} missing entries",warningText:"<b>{{name}}</b> can't be empty",errorText:"<b>{{name}}</b> is not valid",minimalButton:0,doubleInputAlwaysHorizontal:0,showPassiveButtonHint:1,passiveButtonHintText:"Please fill in the missing fields to send the form.",hintRound:4,onChange:function(t,n){},onSendClick:function(t,n){}},Form=function(t={}){mergeIntoIfMissing(t,FormDefaults),t.left=0,t.top=0,t.width="100%",t.height="100%",t.color="transparent";let n=startObject(t);n.inputList=[],n.groupList=[];const o=function(t,o){const e=null==o?"":String(o);1==n.allowHtml?t.text=e:t.plainText=e};n.showMessage=function(t){t=Object.assign({iconColor:"#3C8553",iconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" preserveAspectRatio="none" fill="none" stroke="#141414" stroke-width="8"><path d="M24 63L50 89L104 35"/></svg>'),messageText:"Data sent successfully.",buttonText:"OKAY",backgroundColor:"rgba(255,255,255,0.85)",onClose:function(){}},t);const n=VGroup({color:t.backgroundColor,gap:10,clickable:1});that.opacity=0,that.css.transform="scale(0.8) translateY(40px)",that.setMotion("transform 0.2s, opacity 0.2s"),that.withMotion(t=>{t.css.transform="scale(1) translateY(0px)",t.opacity=1}),VGroup({width:"auto",height:"auto",color:t.iconColor,round:100}),Icon({width:32,height:32}),that.load(t.iconFile),that.css.filter="invert(100%)",endGroup(),Label(),o(that,t.messageText),Label({padding:[12,4],round:12,color:"#373836",textColor:"#EBEBEB",fontSize:14,clickable:1}),o(that,t.buttonText),that.cursor="pointer",that.on("click",function(o){t.onClose(),o.clickable=0,n.opacity=0,n.css.transform="scale(0.8) translateY(0px)",setTimeout(()=>{n.remove()},200)}),endGroup()};const e=function(){n.btnSendCover&&(n.btnSendCover.left=n.btnSend.left,n.btnSendCover.top=n.btnSend.top,n.btnSendCover.width=n.btnSend.elem.offsetWidth||n.btnSend.width,n.btnSendCover.height=n.btnSend.elem.offsetHeight||n.btnSend.height)},i=function(t){n.btnSendCover&&(n.btnSendCover.clickable=t,!t&&n.btnSendCover.tooltip&&(n.btnSendCover.tooltip.visible=0))},r=function(){let t=0,o="";n.inputList.forEach(e=>{0!==e.status&&(o+=function(t){const o=basic.escapeHtml(t.titleText);return 1==t.status?n.warningText.replace("{{name}}",o)+"<br>":2==t.status?n.errorText.replace("{{name}}",o)+"<br>":""}(e),t++)}),n.lblWarningDetail.text=o,t>0?(n.btnSend.clickable=0,n.btnSend.css.filter="grayscale(100%)",i(1),n.lblWarning.text=function(t){return(1==t?n.missingEntryText:n.missingEntriesText).replace("{{count}}",t)}(t),n.lblWarning.opacity=1,n.lblWarning.clickable=1):(n.lblWarning.opacity=0,n.lblWarning.clickable=0,n.btnSend.clickable=1,n.btnSend.css.filter="grayscale(0%)",i(0))},a=function(){page.fit(n.minWidth);const t=page.width<n.minWidth+50&&1!=n.doubleInputAlwaysHorizontal?"vertical":"horizontal";n.groupList.forEach(n=>{n.flow=t}),n.formContainer.center("left")},l=n.remove;n.superRemove=l,n.remove=function(){n&&(n.scrollBar&&n.scrollBar.remove(),l.call(n),n=null)},n.setPassiveButtonHintText=function(t){n.passiveButtonHintText=t,n.btnSendCover&&n.btnSendCover.tooltip&&n.btnSendCover.tooltip.setHintText(t)},n.addInput=function(t){n.inputGroup.add(t),t.width="100%",t.position="relative",n.inputList.push(t),s(t),n.refresh()},n.addTitle=function(t){n.titleGroup.add(t),t.position="relative"},n.addDoubleInput=function(t,o){const e=AutoLayout({flow:"horizontal",gap:20,width:"100%",height:"auto"});endAutoLayout(),e.add(t),t.width="100%",t.position="relative",e.add(o),o.width="100%",o.position="relative",n.inputGroup.add(e),e.position="relative",n.groupList.push(e),n.inputList.push(t),n.inputList.push(o),s(t),s(o),n.refresh()},n.refresh=function(){r()};const s=function(t){t.onChange=function(){r(),n.onChange(n,t)},t.onFocus=function(){r()},t.onBlur=function(){r()}};var c;return n.scrollY=1,n.formContainer=startBox(0,0,{height:"auto",width:"100%",color:"transparent"}),that.css={minWidth:n.minWidth+"px",maxWidth:n.maxWidth+"px"},AutoLayout({flow:"vertical",align:"top center",gap:20,padding:[40,40],height:"auto",position:"relative"}),n.titleGroup=AutoLayout({flow:"vertical",align:"left top",gap:0,width:"100%",height:"auto"}),endAutoLayout(),n.titleGroup.css.marginBottom="20px",n.inputGroup=AutoLayout({flow:"vertical",align:"top center",gap:20,padding:[0,0],width:"100%",height:"auto",position:"relative"}),endAutoLayout(),AutoLayout({width:"100%",height:"auto",clipContent:0}),that.css.marginTop="20px",n.btnSend=Button({width:"100%",color:n.buttonColor,minimal:n.minimalButton}),o(n.btnSend,n.buttonText),(c=that).setMotion("filter 0.2s, transform 0.2s"),c.on("mouseover",function(){c.css.filter="brightness(120%)"}),c.on("mouseout",function(){c.css.filter="brightness(100%)"}),c.on("mousedown",function(){c.css={transform:"scale(0.95)",filter:"brightness(80%)"},setTimeout(function(){c.css={transform:"scale(1)",filter:"brightness(120%)"}},200)}),that.on("click",function(t,o){if(1!=n.btnSend.clickable)return;if(o.detail>1)return;const e=function(){const t=[];return n.inputList.forEach(n=>{const o={};o.key=n.key,o.type=n.type,o.titleText=n.titleText,o.value=n.getValue(),t.push(o)}),t}();n.onSendClick(n,e)}),that.on("keydown",function(t,n){!n.repeat||"Enter"!=n.key&&" "!=n.key||n.preventDefault()}),n.btnSend.clickable=0,n.btnSend.css.filter="grayscale(100%)",1==n.showPassiveButtonHint&&"undefined"!=typeof Tooltip&&(n.btnSendCover=Box({position:"absolute",color:"transparent",clickable:1}),n.btnSendCover.tooltip=Tooltip({target:n.btnSendCover,hintText:n.passiveButtonHintText,hintPosition:"top",lbl_color:"white",lbl_textColor:"#141414",lbl_borderColor:"#141414",lbl_border:1,lbl_fontSize:14,lbl_round:n.hintRound}),e(),n.btnSend.onResize(e)),n.lblWarning=Label({text:"2 Warnings",textColor:"#373836",color:"#F1C74A",padding:[8,2],position:"absolute",fontSize:14,round:4,border:1,opacity:0}),that.setMotion("opacity 0.2s"),n.lblWarning.left=n.btnSend.left+5,n.lblWarning.top=n.btnSend.top+5,n.lblWarningDetail=Label({text:"",textColor:"#373836",color:"whitesmoke",padding:[8,2],position:"absolute",fontSize:12,round:n.hintRound,border:1,opacity:0}),that.css.transform="scale(0.7)",that.setMotion("opacity 0.2s, transform 0.2s"),n.lblWarning.on("mouseover",function(){1==n.showDetailWarning&&(n.lblWarningDetail.opacity=1,n.lblWarningDetail.aline(n.lblWarning,"top",8,"left"),n.lblWarningDetail.css.transform="scale(1)")}),n.lblWarning.on("mouseout",function(){n.lblWarningDetail.opacity=0,n.lblWarningDetail.css.transform="scale(0.7)"}),endAutoLayout(),endAutoLayout(),endBox(),"function"==typeof ScrollBar&&(n.scrollBar=ScrollBar({scrollableBox:n,bar_border:0,bar_round:2,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:0,showDots:1})),n.refresh(),a(),n.onPageResize(a),endObject(n)};
@@ -1,2 +1,2 @@
1
1
  /* Bismillah */
2
- "use strict";const FullScreenSelectDefaults={width:200,height:50,items:[],selectedKey:null,placeholderText:"Search",emptyText:"No results",autoWidth:0,showSearch:1,arrowIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="512" height="512"><path d="M18.71,8.21a1,1,0,0,0-1.42,0l-4.58,4.58a1,1,0,0,1-1.42,0L6.71,8.21a1,1,0,0,0-1.42,0,1,1,0,0,0,0,1.41l4.59,4.59a3,3,0,0,0,4.24,0l4.59-4.59A1,1,0,0,0,18.71,8.21Z"/></svg>'),closeIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="512" height="512"><g id="_01_align_center" data-name="01 align center"><polygon points="24 1.414 22.586 0 12 10.586 1.414 0 0 1.414 10.586 12 0 22.586 1.414 24 12 13.414 22.586 24 24 22.586 13.414 12 24 1.414"/></g></svg>'),searchIconFile:"",clearIconFile:"",ariaLabel:"",onChange:function(e){},onOpen:function(e){},onClose:function(e){},styleName:"classic",style:{box:{color:"whitesmoke",round:4,border:0},focus:{ringColor:"rgba(95, 158, 160, 0.6)"},label:{left:10,fontSize:20,textColor:Black(.8)},arrow:{size:16,right:8,gap:7,opacity:.7,invert:0},panel:{color:"white",zIndex:3e3,slide:150},search:{left:20,top:40,height:50,closeGap:10,color:"whitesmoke",textColor:"gray",round:25,fontSize:20,iconOpacity:.4},searchStyleName:"classic",closeButton:{size:30,right:20,top:50,color:"#D8D8D8",iconSize:14,iconOpacity:.5,invert:0},list:{left:10,top:110,gap:0},item:{height:60,sideSpace:20,round:4,color:"white",fontSize:20,textColor:"#4A4A4A",textLeft:30},itemHover:{color:"#F7F7F7"},itemFocus:{color:"#F2F2F2"},itemSelected:{color:"#FFF0C2"},empty:{fontSize:16,textColor:Black(.4),top:30},scrollBar:{neverHide:0,showDots:0}}},FullScreenSelect=function(e={}){basic.applyStylePackage(e,FullScreenSelect.styles,FullScreenSelectDefaults),mergeIntoIfMissing(e,FullScreenSelectDefaults),e.items=FullScreenSelect.toItems(e.items);let t=startObject(e);const o=t.style;let l=null,n=null;t.isOpen=0,t.panel=null;const r=function(e){return t.items.find(function(t){return t.key==e})||null},c=function(){return t.panel?t.panel.rows.filter(function(e){return 1==e.visible}):[]},i=function(){const e=r(t.selectedKey);t.lblText.plainText=e?e.title:"",t.aria={label:t.ariaLabel||(e?e.title:""),expanded:!!t.isOpen}},s=function(e){const l=Icon({right:o.arrow.right,width:o.arrow.size,height:o.arrow.size,opacity:o.arrow.opacity});return l.load(t.arrowIconFile),e&&(l.rotate=180),o.arrow.invert&&(l.css={filter:"invert(1)"}),l.css={top:"calc(50% - "+o.arrow.size/2+"px "+(e?"- ":"+ ")+o.arrow.gap+"px)"},l},a=function(e){const l=t.panel;if(l.setMotionNow(""),e){if(l.opacity=0,l.css={transform:"translateY("+o.panel.slide+"px)"},l.visible=1,window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return l.opacity=1,void(l.css={transform:"none"});l.elem.offsetHeight,l.setMotionNow("transform 0.2s, opacity 0.2s"),l.opacity=1,l.css={transform:"none"}}else l.visible=0},u=function(e,o){const l=t.panel.listBox.elem,n=e.elem.offsetTop,r=n+e.elem.offsetHeight;"center"!=o?n<l.scrollTop?l.scrollTop=n:r>l.scrollTop+l.clientHeight&&(l.scrollTop=r-l.clientHeight):l.scrollTop=n-(l.clientHeight-e.elem.offsetHeight)/2},p=function(e){if(1!=t.showSearch||"undefined"==typeof SearchInput)return;const l=o.search,n={styleName:o.searchStyleName,left:l.left,top:l.top,width:"calc(100% - "+(l.left+l.closeGap+o.closeButton.size+o.closeButton.right)+"px)",height:l.height,color:l.color,textColor:l.textColor,round:l.round,fontSize:l.fontSize,searchIconOpacity:l.iconOpacity,border:0,borderBottomStyle:"none",placeholderText:t.placeholderText,onSearch:function(e){S(e)}};t.searchIconFile&&(n.searchIconFile=t.searchIconFile),t.clearIconFile&&(n.clearIconFile=t.clearIconFile),e.searchInput=SearchInput(n)},f=function(e){const l=o.closeButton;e.btnClose=startBox({right:l.right,top:l.top,width:l.size,height:l.size,round:l.size/2,color:l.color,clickable:1,cursor:"pointer",role:"button",tabIndex:0,aria:{label:"Close"}}),e.btnClose.setFocusRing(o.focus.ringColor),Icon({width:l.iconSize,height:l.iconSize,opacity:l.iconOpacity}),that.load(t.closeIconFile),l.invert&&(that.css={filter:"invert(1)"}),that.center(),endBox(),e.btnClose.on("click",function(){t.close()})},d=function(e){const t=o.item,l=startBox({width:"calc(100% - "+1.5*t.sideSpace+"px)",height:t.height,round:t.round,color:t.color,clickable:1,cursor:"pointer",role:"option",css:{marginLeft:t.sideSpace/2+"px",flex:"0 0 auto"}});return l.item=e,l.isHover=0,l.lblText=Label({left:t.textLeft,width:"calc(100% - "+2*t.textLeft+"px)",plainText:e.title,fontSize:t.fontSize,textColor:t.textColor,ellipsis:1}),l.lblText.css={top:"50%",transform:"translateY(-50%)"},endBox(),l.onHoverChange(function(e,t){l.isHover=t,h(l)}),l.on("click",function(){x(e.key)}),h(l),l},h=function(e){const n=e.item.key==t.selectedKey;e.aria={selected:n},n?e.color=o.itemSelected.color:e.item.key==l?e.color=o.itemFocus.color:e.isHover?e.color=o.itemHover.color:e.color=o.item.color},m=function(){t.panel&&t.panel.rows.forEach(h)},S=function(e){const o=FullScreenSelect.toSearchText(e).trim();o!==n&&(n=o,t.panel.rows.forEach(function(e){const t=""==n||FullScreenSelect.toSearchText(e.item.title).includes(n);e.visible=t?1:0}),t.panel.lblEmpty.visible=0==c().length?1:0,l=null,m())},g=function(e,o){if(!t.isOpen)return;if(o.target==t.elem)return;if("Escape"==o.key)return o.preventDefault(),void t.close();if("ArrowDown"==o.key||"ArrowUp"==o.key)return o.preventDefault(),void function(e){const o=c();if(0==o.length)return;let n=o.findIndex(function(e){return e.item.key==l});-1==n&&(n=o.findIndex(function(e){return e.item.key==t.selectedKey})),n=-1==n?0:Math.max(0,Math.min(o.length-1,n+e)),l=o[n].item.key,m(),u(o[n],"nearest")}("ArrowDown"==o.key?1:-1);if("Enter"!=o.key)return;if(o.target==t.panel.btnClose.elem)return;const n=c(),r=n.find(function(e){return e.item.key==l})||n[0];r&&(o.preventDefault(),x(r.item.key))},x=function(e){t.setSelectedKey(e),t.close()};t.setSelectedKey=function(e,o=0){r(e)&&t.selectedKey!=e&&(t.selectedKey=e,i(),m(),o||t.onChange(t))},t.setSelectedIndex=function(e,o=0){const l=t.items[e];l&&t.setSelectedKey(l.key,o)},t.getSelectedIndex=function(){return t.items.indexOf(r(t.selectedKey))},t.getSelectedItem=function(){return r(t.selectedKey)},t.setItems=function(e){t.close(),t.panel&&(t.panel.remove(),t.panel=null),t.items=FullScreenSelect.toItems(e),r(t.selectedKey)||(t.selectedKey=t.items.length?t.items[0].key:null),i()},t.open=function(){t.isOpen||0==t.items.length||(FullScreenSelect.openedSelect&&FullScreenSelect.openedSelect.close(),t.isOpen=1,FullScreenSelect.openedSelect=t,t.panel||(t.panel=createIn(page,function(){const e=startBox(0,0,"100%","100%",{color:o.panel.color,zIndex:o.panel.zIndex,role:"dialog",aria:{modal:!0,label:t.ariaLabel||t.placeholderText}});return e.rows=[],p(e),f(e),e.listBox=startBox(o.list.left,o.list.top,"calc(100% - "+o.list.left+"px)","calc(100% - "+o.list.top+"px)",{color:"transparent",scrollY:1,role:"listbox"}),e.listGroup=VGroup({width:"100%",height:"auto",align:"left top",gap:o.list.gap}),t.items.forEach(function(t){e.rows.push(d(t))}),endGroup(),e.lblEmpty=Label({left:0,top:o.empty.top,width:"100%",plainText:t.emptyText,textAlign:"center",fontSize:o.empty.fontSize,textColor:o.empty.textColor,visible:0}),endBox(),"undefined"!=typeof ScrollBar&&(e.scrollBar=ScrollBar(Object.assign({scrollableBox:e.listBox},o.scrollBar))),endBox(),e}),t.own(t.panel),t.panel.visible=0,t.panel.listenTo(window,"keydown",g)),i(),a(1),function(){t.panel.searchInput&&t.panel.searchInput.setText(""),n=null,S(""),t.panel.listBox.elem.scrollTop=0;const e=t.panel.rows.find(function(e){return e.item.key==t.selectedKey});e&&u(e,"center")}(),t.panel.searchInput?t.panel.searchInput.focus():t.panel.btnClose.elem.focus(),t.onOpen(t))},t.close=function(){t&&t.isOpen&&(t.isOpen=0,FullScreenSelect.openedSelect==t&&(FullScreenSelect.openedSelect=null),i(),a(0),t.elem.focus(),t.onClose(t))};const y=t.remove;if(t.superRemove=y,t.remove=function(){t&&(FullScreenSelect.openedSelect==t&&(FullScreenSelect.openedSelect=null),y.call(t),t=null)},t.props(o.box),t.clickable=1,t.cursor="pointer",t.role="combobox",t.tabIndex=0,t.aria={haspopup:"listbox"},t.setFocusRing(o.focus.ringColor),t.lblText=Label({left:o.label.left,width:1==t.autoWidth?"auto":"calc(100% - "+(o.label.left+30)+"px)",fontSize:o.label.fontSize,textColor:o.label.textColor,css:{top:"50%",transform:"translateY(-50%)",whiteSpace:"nowrap",overflow:"hidden"}}),1!=t.autoWidth){const e="linear-gradient(to right, black calc(100% - 40px), transparent)";t.lblText.css={maskImage:e,webkitMaskImage:e}}return t.imgArrowUp=s(1),t.imgArrowDown=s(0),null!==t.selectedKey&&r(t.selectedKey)||(t.selectedKey=t.items.length?t.items[0].key:null),i(),t.lblText.onResize(function(){1==t.autoWidth&&(t.width=t.lblText.width+50)}),t.on("click",function(){t.open()}),t.on("keydown",function(e,o){"Enter"!=o.key&&" "!=o.key&&"ArrowDown"!=o.key||(o.preventDefault(),t.open())}),endObject(t)};FullScreenSelect.openedSelect=null,FullScreenSelect.toItems=function(e){return Array.isArray(e)?e.map(function(e){if(null===e||"object"!=typeof e)return{key:String(e),title:String(e)};const t=void 0!==e.key?e.key:e.id,o=void 0!==e.title?e.title:e.name;return{key:t,title:String(null==o?t:o)}}):[]},FullScreenSelect.toSearchText=function(e){return(null==e?"":String(e)).toLocaleLowerCase("tr").normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/ı/g,"i")},FullScreenSelect.styles={classic:FullScreenSelectDefaults.style,dark:{box:{color:"#2B2D31",round:4,border:0},focus:{ringColor:"rgba(95, 179, 181, 0.7)"},label:{left:10,fontSize:20,textColor:"rgba(255, 255, 255, 0.88)"},arrow:{size:16,right:8,gap:7,opacity:.7,invert:1},panel:{color:"#1E1F22",zIndex:3e3,slide:150},search:{left:20,top:40,height:50,closeGap:10,color:"#2B2D31",textColor:"rgba(255, 255, 255, 0.85)",round:25,fontSize:20,iconOpacity:.5},searchStyleName:"ozdenDark",closeButton:{size:30,right:20,top:50,color:"#3A3C41",iconSize:14,iconOpacity:.7,invert:1},item:{height:60,sideSpace:20,round:4,color:"#1E1F22",fontSize:20,textColor:"rgba(255, 255, 255, 0.8)",textLeft:30},itemHover:{color:"#26282C"},itemFocus:{color:"#2B2D31"},itemSelected:{color:"#4A4128"},empty:{fontSize:16,textColor:"rgba(255, 255, 255, 0.45)",top:30},scrollBar:{neverHide:0,showDots:0,bar_color:"#A0A0A0",bar_mouseOverColor:"#D0D0D0"}}};
2
+ "use strict";const FullScreenSelectDefaults={width:200,height:50,items:[],selectedKey:null,placeholder:"Search",emptyText:"No results",autoWidth:0,showSearch:1,arrowIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="512" height="512"><path d="M18.71,8.21a1,1,0,0,0-1.42,0l-4.58,4.58a1,1,0,0,1-1.42,0L6.71,8.21a1,1,0,0,0-1.42,0,1,1,0,0,0,0,1.41l4.59,4.59a3,3,0,0,0,4.24,0l4.59-4.59A1,1,0,0,0,18.71,8.21Z"/></svg>'),closeIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="512" height="512"><g id="_01_align_center" data-name="01 align center"><polygon points="24 1.414 22.586 0 12 10.586 1.414 0 0 1.414 10.586 12 0 22.586 1.414 24 12 13.414 22.586 24 24 22.586 13.414 12 24 1.414"/></g></svg>'),searchIconFile:"",clearIconFile:"",ariaLabel:"",onChange:function(e){},onOpen:function(e){},onClose:function(e){},styleName:"light",style:{box:{color:"whitesmoke",round:4,border:0},focus:{ringColor:"rgba(95, 158, 160, 0.6)"},label:{left:10,fontSize:20,textColor:Black(.8)},arrow:{size:16,right:8,gap:7,opacity:.7,invert:0},panel:{color:"white",zIndex:3e3,slide:150},search:{left:20,top:40,height:50,closeGap:10,color:"whitesmoke",textColor:"gray",round:25,fontSize:20,iconOpacity:.4},searchStyleName:"original",closeButton:{size:30,right:20,top:50,color:"#D8D8D8",iconSize:14,iconOpacity:.5,invert:0},list:{left:10,top:110,gap:0},item:{height:60,sideSpace:20,round:4,color:"white",fontSize:20,textColor:"#4A4A4A",textLeft:30},itemHover:{color:"#F7F7F7"},itemFocus:{color:"#F2F2F2"},itemSelected:{color:"#FFF0C2"},empty:{fontSize:16,textColor:Black(.4),top:30},scrollBar:{neverHide:0,showDots:0}}},FullScreenSelect=function(e={}){basic.applyStylePackage(e,FullScreenSelect.styles,FullScreenSelectDefaults),mergeIntoIfMissing(e,FullScreenSelectDefaults),e.items=FullScreenSelect.toItems(e.items);let t=startObject(e);const o=t.style;let l=null,n=null;t.isOpen=0,t.panel=null;const r=function(e){return t.items.find(function(t){return t.key==e})||null},c=function(){return t.panel?t.panel.rows.filter(function(e){return 1==e.visible}):[]},i=function(){const e=r(t.selectedKey);t.lblText.plainText=e?e.text:"",t.aria={label:t.ariaLabel||(e?e.text:""),expanded:!!t.isOpen}},s=function(e){const l=Icon({right:o.arrow.right,width:o.arrow.size,height:o.arrow.size,opacity:o.arrow.opacity});return l.load(t.arrowIconFile),e&&(l.rotate=180),o.arrow.invert&&(l.css={filter:"invert(1)"}),l.css={top:"calc(50% - "+o.arrow.size/2+"px "+(e?"- ":"+ ")+o.arrow.gap+"px)"},l},a=function(e){const l=t.panel;if(l.setMotionNow(""),e){if(l.opacity=0,l.css={transform:"translateY("+o.panel.slide+"px)"},l.visible=1,window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return l.opacity=1,void(l.css={transform:"none"});l.elem.offsetHeight,l.setMotionNow("transform 0.2s, opacity 0.2s"),l.opacity=1,l.css={transform:"none"}}else l.visible=0},u=function(e,o){const l=t.panel.listBox.elem,n=e.elem.offsetTop,r=n+e.elem.offsetHeight;"center"!=o?n<l.scrollTop?l.scrollTop=n:r>l.scrollTop+l.clientHeight&&(l.scrollTop=r-l.clientHeight):l.scrollTop=n-(l.clientHeight-e.elem.offsetHeight)/2},p=function(e){if(1!=t.showSearch||"undefined"==typeof SearchInput)return;const l=o.search,n={styleName:o.searchStyleName,left:l.left,top:l.top,width:"calc(100% - "+(l.left+l.closeGap+o.closeButton.size+o.closeButton.right)+"px)",height:l.height,color:l.color,textColor:l.textColor,round:l.round,fontSize:l.fontSize,searchIconOpacity:l.iconOpacity,border:0,borderBottomStyle:"none",placeholder:t.placeholder,onChange:function(e){S(e.getSearchText())}};t.searchIconFile&&(n.searchIconFile=t.searchIconFile),t.clearIconFile&&(n.clearIconFile=t.clearIconFile),e.searchInput=SearchInput(n)},f=function(e){const l=o.closeButton;e.btnClose=startBox({right:l.right,top:l.top,width:l.size,height:l.size,round:l.size/2,color:l.color,clickable:1,cursor:"pointer",role:"button",tabIndex:0,aria:{label:"Close"}}),e.btnClose.setFocusRing(o.focus.ringColor),Icon({width:l.iconSize,height:l.iconSize,opacity:l.iconOpacity}),that.load(t.closeIconFile),l.invert&&(that.css={filter:"invert(1)"}),that.center(),endBox(),e.btnClose.on("click",function(){t.close()})},d=function(e){const t=o.item,l=startBox({width:"calc(100% - "+1.5*t.sideSpace+"px)",height:t.height,round:t.round,color:t.color,clickable:1,cursor:"pointer",role:"option",css:{marginLeft:t.sideSpace/2+"px",flex:"0 0 auto"}});return l.item=e,l.isHover=0,l.lblText=Label({left:t.textLeft,width:"calc(100% - "+2*t.textLeft+"px)",plainText:e.text,fontSize:t.fontSize,textColor:t.textColor,ellipsis:1}),l.lblText.css={top:"50%",transform:"translateY(-50%)"},endBox(),l.onHoverChange(function(e,t){l.isHover=t,h(l)}),l.on("click",function(){x(e.key)}),h(l),l},h=function(e){const n=e.item.key==t.selectedKey;e.aria={selected:n},n?e.color=o.itemSelected.color:e.item.key==l?e.color=o.itemFocus.color:e.isHover?e.color=o.itemHover.color:e.color=o.item.color},g=function(){t.panel&&t.panel.rows.forEach(h)},S=function(e){const o=FullScreenSelect.toSearchText(e).trim();o!==n&&(n=o,t.panel.rows.forEach(function(e){const t=""==n||FullScreenSelect.toSearchText(e.item.text).includes(n);e.visible=t?1:0}),t.panel.lblEmpty.visible=0==c().length?1:0,l=null,g())},m=function(e,o){if(!t.isOpen)return;if(o.target==t.elem)return;if("Escape"==o.key)return o.preventDefault(),void t.close();if("ArrowDown"==o.key||"ArrowUp"==o.key)return o.preventDefault(),void function(e){const o=c();if(0==o.length)return;let n=o.findIndex(function(e){return e.item.key==l});-1==n&&(n=o.findIndex(function(e){return e.item.key==t.selectedKey})),n=-1==n?0:Math.max(0,Math.min(o.length-1,n+e)),l=o[n].item.key,g(),u(o[n],"nearest")}("ArrowDown"==o.key?1:-1);if("Enter"!=o.key)return;if(o.target==t.panel.btnClose.elem)return;const n=c(),r=n.find(function(e){return e.item.key==l})||n[0];r&&(o.preventDefault(),x(r.item.key))},x=function(e){t.setSelectedKey(e),t.close()};t.setSelectedKey=function(e,o=0){r(e)&&t.selectedKey!=e&&(t.selectedKey=e,i(),g(),o||t.onChange(t))},t.setSelectedIndex=function(e,o=0){const l=t.items[e];l&&t.setSelectedKey(l.key,o)},t.getSelectedIndex=function(){return t.items.indexOf(r(t.selectedKey))},t.getSelectedItem=function(){return r(t.selectedKey)},t.setItems=function(e){t.close(),t.panel&&(t.panel.remove(),t.panel=null),t.items=FullScreenSelect.toItems(e),r(t.selectedKey)||(t.selectedKey=t.items.length?t.items[0].key:null),i()},t.open=function(){t.isOpen||0==t.items.length||(FullScreenSelect.openedSelect&&FullScreenSelect.openedSelect.close(),t.isOpen=1,FullScreenSelect.openedSelect=t,t.panel||(t.panel=createIn(page,function(){const e=startBox(0,0,"100%","100%",{color:o.panel.color,zIndex:o.panel.zIndex,role:"dialog",aria:{modal:!0,label:t.ariaLabel||t.placeholder}});return e.rows=[],p(e),f(e),e.listBox=startBox(o.list.left,o.list.top,"calc(100% - "+o.list.left+"px)","calc(100% - "+o.list.top+"px)",{color:"transparent",scrollY:1,role:"listbox"}),e.listGroup=VGroup({width:"100%",height:"auto",align:"left top",gap:o.list.gap}),t.items.forEach(function(t){e.rows.push(d(t))}),endGroup(),e.lblEmpty=Label({left:0,top:o.empty.top,width:"100%",plainText:t.emptyText,textAlign:"center",fontSize:o.empty.fontSize,textColor:o.empty.textColor,visible:0}),endBox(),"undefined"!=typeof ScrollBar&&(e.scrollBar=ScrollBar(Object.assign({scrollableBox:e.listBox},o.scrollBar))),endBox(),e}),t.own(t.panel),t.panel.visible=0,t.panel.listenTo(window,"keydown",m)),t.panel.zIndex=basic.zIndexAbove(t,o.panel.zIndex),i(),a(1),function(){t.panel.searchInput&&t.panel.searchInput.setValue("",1),n=null,S(""),t.panel.listBox.elem.scrollTop=0;const e=t.panel.rows.find(function(e){return e.item.key==t.selectedKey});e&&u(e,"center")}(),t.panel.searchInput?t.panel.searchInput.focus():t.panel.btnClose.elem.focus(),t.onOpen(t))},t.close=function(){t&&t.isOpen&&(t.isOpen=0,FullScreenSelect.openedSelect==t&&(FullScreenSelect.openedSelect=null),i(),a(0),t.elem.focus(),t.onClose(t))};const y=t.remove;if(t.superRemove=y,t.remove=function(){t&&(FullScreenSelect.openedSelect==t&&(FullScreenSelect.openedSelect=null),y.call(t),t=null)},t.props(o.box),t.clickable=1,t.cursor="pointer",t.role="combobox",t.tabIndex=0,t.aria={haspopup:"listbox"},t.setFocusRing(o.focus.ringColor),t.lblText=Label({left:o.label.left,width:1==t.autoWidth?"auto":"calc(100% - "+(o.label.left+30)+"px)",fontSize:o.label.fontSize,textColor:o.label.textColor,css:{top:"50%",transform:"translateY(-50%)",whiteSpace:"nowrap",overflow:"hidden"}}),1!=t.autoWidth){const e="linear-gradient(to right, black calc(100% - 40px), transparent)";t.lblText.css={maskImage:e,webkitMaskImage:e}}return t.imgArrowUp=s(1),t.imgArrowDown=s(0),null!==t.selectedKey&&r(t.selectedKey)||(t.selectedKey=t.items.length?t.items[0].key:null),i(),t.lblText.onResize(function(){1==t.autoWidth&&(t.width=t.lblText.width+50)}),t.on("click",function(){t.open()}),t.on("keydown",function(e,o){"Enter"!=o.key&&" "!=o.key&&"ArrowDown"!=o.key||(o.preventDefault(),t.open())}),endObject(t)};FullScreenSelect.openedSelect=null,FullScreenSelect.toItems=function(e){return Array.isArray(e)?e.map(function(e){if(null===e||"object"!=typeof e)return{key:String(e),text:String(e)};const t=void 0===e.text||null===e.text?String(e.key):String(e.text);return{key:e.key,text:t}}):[]},FullScreenSelect.toSearchText=function(e){return(null==e?"":String(e)).toLocaleLowerCase("tr").normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/ı/g,"i")},FullScreenSelect.styles={light:FullScreenSelectDefaults.style,dark:{box:{color:"#2B2D31",round:4,border:0},focus:{ringColor:"rgba(95, 179, 181, 0.7)"},label:{left:10,fontSize:20,textColor:"rgba(255, 255, 255, 0.88)"},arrow:{size:16,right:8,gap:7,opacity:.7,invert:1},panel:{color:"#1E1F22",zIndex:3e3,slide:150},search:{left:20,top:40,height:50,closeGap:10,color:"#2B2D31",textColor:"rgba(255, 255, 255, 0.85)",round:25,fontSize:20,iconOpacity:.5},searchStyleName:"ozdenDark",closeButton:{size:30,right:20,top:50,color:"#3A3C41",iconSize:14,iconOpacity:.7,invert:1},item:{height:60,sideSpace:20,round:4,color:"#1E1F22",fontSize:20,textColor:"rgba(255, 255, 255, 0.8)",textLeft:30},itemHover:{color:"#26282C"},itemFocus:{color:"#2B2D31"},itemSelected:{color:"#4A4128"},empty:{fontSize:16,textColor:"rgba(255, 255, 255, 0.45)",top:30},scrollBar:{neverHide:0,showDots:0,bar_color:"#A0A0A0",bar_mouseOverColor:"#D0D0D0"}}},FullScreenSelect.styles.classic=FullScreenSelect.styles.light;
@@ -1,2 +1,2 @@
1
1
  /* Bismillah */
2
- "use strict";const GaugeDefaults={key:"0",width:180,height:180,value:0,minValue:0,maxValue:100,startAngle:0,sweepAngle:360,radius:74,markerValue:null,valueText:"",valueSuffix:"%",decimals:0,subText:"",titleText:"",duration:600,ariaLabel:"Gauge",onValueChange:function(t){},styleName:"classic",style:{track:{color:Black(.08),width:12},bar:{color:"cadetblue",width:12,roundCap:1},marker:{color:Black(.65),width:3,length:18},value:{fontSize:38,textColor:Black(.85),bold:1,offsetY:null},sub:{fontSize:13,textColor:Black(.5),offsetY:null},title:{fontSize:13,textColor:"",gap:12}}},Gauge=function(t={}){basic.applyStylePackage(t,Gauge.styles,GaugeDefaults),mergeIntoIfMissing(t,GaugeDefaults),t.color=t.color||"transparent";let e=startObject(t);const a=e.style;let l=null,o={};const r=function(t,e,a,l){const o=(l-90)*Math.PI/180;return{x:t+a*Math.cos(o),y:e+a*Math.sin(o)}},n=function(t){return Math.abs(t)>=359.9},u=function(t){const a=e.maxValue-e.minValue;return a?Math.max(0,Math.min(1,(t-e.minValue)/a)):0},i=function(t,l){const o=e.radius,u=Math.max(a.track.width,a.bar.width)/2+(null===e.markerValue?0:a.marker.length/2)+2,i=function(t,e,a,l,o){const n=Math.min(l,l+o),u=Math.max(l,l+o),i=[r(t,e,a,l),r(t,e,a,l+o)];for(let l=-720;l<=720;l+=90)l>=n&&l<=u&&i.push(r(t,e,a,l));return{minX:Math.min.apply(null,i.map(function(t){return t.x})),maxX:Math.max.apply(null,i.map(function(t){return t.x})),minY:Math.min.apply(null,i.map(function(t){return t.y})),maxY:Math.max.apply(null,i.map(function(t){return t.y}))}}(t,l,o,e.startAngle,e.sweepAngle),s={minX:i.minX-u,maxX:i.maxX+u,minY:i.minY-u,maxY:i.maxY+u,valueOffset:null!==a.value.offsetY?a.value.offsetY:n(e.sweepAngle)?.35*a.value.fontSize:.25*-a.value.fontSize,subOffset:0,titleY:0};var f;return s.subOffset=(f=s.valueOffset,null!==a.sub.offsetY?a.sub.offsetY:f+a.sub.fontSize+8),e.subText&&(s.maxY=Math.max(s.maxY,l+s.subOffset+4)),""===e.valueText&&null===e.value||(s.maxY=Math.max(s.maxY,l+s.valueOffset+4)),e.titleText&&(s.titleY=s.maxY+a.title.gap,s.maxY=s.titleY+.4*a.title.fontSize),s},s=function(){const t=i(0,0),u=function(t,e,a,l,o){if(n(o)){const o=r(t,e,a,l),n=r(t,e,a,l+180);return"M"+o.x.toFixed(2)+" "+o.y.toFixed(2)+" A"+a+" "+a+" 0 1 1 "+n.x.toFixed(2)+" "+n.y.toFixed(2)+" A"+a+" "+a+" 0 1 1 "+o.x.toFixed(2)+" "+o.y.toFixed(2)}const u=r(t,e,a,l),i=r(t,e,a,l+o),s=Math.abs(o)>180?1:0,f=o>0?1:0;return"M"+u.x.toFixed(2)+" "+u.y.toFixed(2)+" A"+a+" "+a+" 0 "+s+" "+f+" "+i.x.toFixed(2)+" "+i.y.toFixed(2)}(0,0,e.radius,e.startAngle,e.sweepAngle),s=a.bar.roundCap?"round":"butt";e.elem.innerHTML="<svg viewBox='"+t.minX.toFixed(2)+" "+t.minY.toFixed(2)+" "+(t.maxX-t.minX).toFixed(2)+" "+(t.maxY-t.minY).toFixed(2)+"' style='display:block; width:100%; height:100%; overflow:visible' role='img' aria-label='"+e.ariaLabel+"'><path d='"+u+"' fill='none' stroke='"+a.track.color+"' stroke-width='"+a.track.width+"' stroke-linecap='"+s+"'/><path class='gauge-bar' d='"+u+"' fill='none' stroke='"+a.bar.color+"' stroke-width='"+a.bar.width+"' stroke-linecap='"+s+"' pathLength='100' stroke-dasharray='0 100' style='transition: stroke-dasharray "+e.duration+"ms, stroke "+.6*e.duration+"ms'/>"+function(t,l){if(null===e.markerValue)return"";const o=e.radius;return"<line class='gauge-marker' x1='"+t+"' y1='"+(l-o-a.marker.length/2)+"' x2='"+t+"' y2='"+(l-o+a.marker.length/2)+"' stroke='"+a.marker.color+"' stroke-width='"+a.marker.width+"' stroke-linecap='round' style='transition: transform "+.7*e.duration+"ms'/>"}(0,0)+"<text class='gauge-value' x='0' y='"+(0+t.valueOffset)+"' text-anchor='middle' style='fill:"+a.value.textColor+"; font-size:"+a.value.fontSize+"px;"+(a.value.bold?" font-weight:bold;":"")+"'></text><text class='gauge-sub' x='0' y='"+(0+t.subOffset)+"' text-anchor='middle' style='fill:"+a.sub.textColor+"; font-size:"+a.sub.fontSize+"px'></text>"+function(t,l){return e.titleText?"<text class='gauge-title' x='"+t+"' y='"+l+"' text-anchor='middle' style='fill:"+(a.title.textColor||a.bar.color)+"; font-size:"+a.title.fontSize+"px'></text>":""}(0,t.titleY)+"</svg>",l=e.elem.querySelector("svg"),o={bar:l.querySelector(".gauge-bar"),marker:l.querySelector(".gauge-marker"),value:l.querySelector(".gauge-value"),sub:l.querySelector(".gauge-sub"),title:l.querySelector(".gauge-title")},f()},f=function(){var t;if(o.bar&&(o.bar.setAttribute("stroke-dasharray",(100*u(e.value)).toFixed(2)+" 100"),o.value.textContent=""!==e.valueText?e.valueText:Number(e.value).toFixed(e.decimals)+e.valueSuffix,o.sub.textContent=e.subText,o.title&&(o.title.textContent=e.titleText),o.marker)){const a=(t=e.markerValue,e.startAngle+e.sweepAngle*u(t));o.marker.setAttribute("transform","rotate("+a.toFixed(2)+" 0 0)")}};return e.setValue=function(t,a=0){e.value=t,f(),a||e.onValueChange(e)},e.setMarkerValue=function(t){const a=null===e.markerValue;e.markerValue=t;a===(null===t)?f():s()},e.setBarColor=function(t){a.bar.color=t,o.bar&&o.bar.setAttribute("stroke",t),o.title&&!a.title.textColor&&(o.title.style.fill=t)},e.setValueText=function(t){e.valueText=t,f()},e.setValueSuffix=function(t){e.valueSuffix=t,f()},e.setSubText=function(t){const a=!e.subText;e.subText=t,a===!t?f():s()},e.setTitleText=function(t){const a=!e.titleText;e.titleText=t,a===!t?f():s()},e.setRange=function(t,a){e.minValue=t,e.maxValue=a,f()},e.refresh=function(){s()},e.position=e.position||"relative",s(),endObject(e)};Gauge.styles={classic:GaugeDefaults.style,dark:{track:{color:"rgba(255, 255, 255, 0.07)",width:12},bar:{color:"#65A293",width:12,roundCap:1},marker:{color:"rgba(255, 255, 255, 0.85)",width:3,length:18},value:{fontSize:38,textColor:"rgba(255, 255, 255, 0.95)",bold:1,offsetY:null},sub:{fontSize:13,textColor:"rgba(255, 255, 255, 0.5)",offsetY:null},title:{fontSize:13,textColor:"",gap:12}},modern:{track:{color:"#DFECEC",width:10},bar:{color:"cadetblue",width:10,roundCap:1},marker:{color:"#2F5F61",width:3,length:16},value:{fontSize:36,textColor:"#2F5F61",bold:1,offsetY:null},sub:{fontSize:13,textColor:"#6E9A9B",offsetY:null},title:{fontSize:13,textColor:"",gap:12}}};
2
+ "use strict";const GaugeDefaults={key:"0",width:180,height:180,value:0,minValue:0,maxValue:100,startAngle:0,sweepAngle:360,radius:74,markerValue:null,valueText:"",valueSuffix:"%",decimals:0,subText:"",titleText:"",duration:600,ariaLabel:"Gauge",onChange:function(t){},styleName:"light",style:{track:{color:Black(.08),width:12},bar:{color:"cadetblue",width:12,roundCap:1},marker:{color:Black(.65),width:3,length:18},value:{fontSize:38,textColor:Black(.85),bold:1,offsetY:null},sub:{fontSize:13,textColor:Black(.5),offsetY:null},title:{fontSize:13,textColor:"",gap:12}}},Gauge=function(t={}){basic.applyStylePackage(t,Gauge.styles,GaugeDefaults),mergeIntoIfMissing(t,GaugeDefaults),t.color=t.color||"transparent";let e=startObject(t);const a=e.style;let l=null,o={};const r=function(t,e,a,l){const o=(l-90)*Math.PI/180;return{x:t+a*Math.cos(o),y:e+a*Math.sin(o)}},n=function(t){return Math.abs(t)>=359.9},i=function(t){const a=e.maxValue-e.minValue;return a?Math.max(0,Math.min(1,(t-e.minValue)/a)):0},u=function(t,l){const o=e.radius,i=Math.max(a.track.width,a.bar.width)/2+(null===e.markerValue?0:a.marker.length/2)+2,u=function(t,e,a,l,o){const n=Math.min(l,l+o),i=Math.max(l,l+o),u=[r(t,e,a,l),r(t,e,a,l+o)];for(let l=-720;l<=720;l+=90)l>=n&&l<=i&&u.push(r(t,e,a,l));return{minX:Math.min.apply(null,u.map(function(t){return t.x})),maxX:Math.max.apply(null,u.map(function(t){return t.x})),minY:Math.min.apply(null,u.map(function(t){return t.y})),maxY:Math.max.apply(null,u.map(function(t){return t.y}))}}(t,l,o,e.startAngle,e.sweepAngle),s={minX:u.minX-i,maxX:u.maxX+i,minY:u.minY-i,maxY:u.maxY+i,valueOffset:null!==a.value.offsetY?a.value.offsetY:n(e.sweepAngle)?.35*a.value.fontSize:.25*-a.value.fontSize,subOffset:0,titleY:0};var f;return s.subOffset=(f=s.valueOffset,null!==a.sub.offsetY?a.sub.offsetY:f+a.sub.fontSize+8),e.subText&&(s.maxY=Math.max(s.maxY,l+s.subOffset+4)),""===e.valueText&&null===e.value||(s.maxY=Math.max(s.maxY,l+s.valueOffset+4)),e.titleText&&(s.titleY=s.maxY+a.title.gap,s.maxY=s.titleY+.4*a.title.fontSize),s},s=function(){const t=u(0,0),i=function(t,e,a,l,o){if(n(o)){const o=r(t,e,a,l),n=r(t,e,a,l+180);return"M"+o.x.toFixed(2)+" "+o.y.toFixed(2)+" A"+a+" "+a+" 0 1 1 "+n.x.toFixed(2)+" "+n.y.toFixed(2)+" A"+a+" "+a+" 0 1 1 "+o.x.toFixed(2)+" "+o.y.toFixed(2)}const i=r(t,e,a,l),u=r(t,e,a,l+o),s=Math.abs(o)>180?1:0,f=o>0?1:0;return"M"+i.x.toFixed(2)+" "+i.y.toFixed(2)+" A"+a+" "+a+" 0 "+s+" "+f+" "+u.x.toFixed(2)+" "+u.y.toFixed(2)}(0,0,e.radius,e.startAngle,e.sweepAngle),s=a.bar.roundCap?"round":"butt";e.elem.innerHTML="<svg viewBox='"+t.minX.toFixed(2)+" "+t.minY.toFixed(2)+" "+(t.maxX-t.minX).toFixed(2)+" "+(t.maxY-t.minY).toFixed(2)+"' style='display:block; width:100%; height:100%; overflow:visible' role='img' aria-label='"+e.ariaLabel+"'><path d='"+i+"' fill='none' stroke='"+a.track.color+"' stroke-width='"+a.track.width+"' stroke-linecap='"+s+"'/><path class='gauge-bar' d='"+i+"' fill='none' stroke='"+a.bar.color+"' stroke-width='"+a.bar.width+"' stroke-linecap='"+s+"' pathLength='100' stroke-dasharray='0 100' style='transition: stroke-dasharray "+e.duration+"ms, stroke "+.6*e.duration+"ms'/>"+function(t,l){if(null===e.markerValue)return"";const o=e.radius;return"<line class='gauge-marker' x1='"+t+"' y1='"+(l-o-a.marker.length/2)+"' x2='"+t+"' y2='"+(l-o+a.marker.length/2)+"' stroke='"+a.marker.color+"' stroke-width='"+a.marker.width+"' stroke-linecap='round' style='transition: transform "+.7*e.duration+"ms'/>"}(0,0)+"<text class='gauge-value' x='0' y='"+(0+t.valueOffset)+"' text-anchor='middle' style='fill:"+a.value.textColor+"; font-size:"+a.value.fontSize+"px;"+(a.value.bold?" font-weight:bold;":"")+"'></text><text class='gauge-sub' x='0' y='"+(0+t.subOffset)+"' text-anchor='middle' style='fill:"+a.sub.textColor+"; font-size:"+a.sub.fontSize+"px'></text>"+function(t,l){return e.titleText?"<text class='gauge-title' x='"+t+"' y='"+l+"' text-anchor='middle' style='fill:"+(a.title.textColor||a.bar.color)+"; font-size:"+a.title.fontSize+"px'></text>":""}(0,t.titleY)+"</svg>",l=e.elem.querySelector("svg"),o={bar:l.querySelector(".gauge-bar"),marker:l.querySelector(".gauge-marker"),value:l.querySelector(".gauge-value"),sub:l.querySelector(".gauge-sub"),title:l.querySelector(".gauge-title")},f()},f=function(){var t;if(o.bar&&(o.bar.setAttribute("stroke-dasharray",(100*i(e.value)).toFixed(2)+" 100"),o.value.textContent=""!==e.valueText?e.valueText:Number(e.value).toFixed(e.decimals)+e.valueSuffix,o.sub.textContent=e.subText,o.title&&(o.title.textContent=e.titleText),o.marker)){const a=(t=e.markerValue,e.startAngle+e.sweepAngle*i(t));o.marker.setAttribute("transform","rotate("+a.toFixed(2)+" 0 0)")}};return e.setValue=function(t,a=0){t!==e.value&&(e.value=t,f(),a||e.onChange(e))},e.setMarkerValue=function(t){const a=null===e.markerValue;e.markerValue=t;a===(null===t)?f():s()},e.setBarColor=function(t){a.bar.color=t,o.bar&&o.bar.setAttribute("stroke",t),o.title&&!a.title.textColor&&(o.title.style.fill=t)},e.setValueText=function(t){e.valueText=t,f()},e.setValueSuffix=function(t){e.valueSuffix=t,f()},e.setSubText=function(t){const a=!e.subText;e.subText=t,a===!t?f():s()},e.setTitleText=function(t){const a=!e.titleText;e.titleText=t,a===!t?f():s()},e.setRange=function(t,a){e.minValue=t,e.maxValue=a,f()},e.refresh=function(){s()},e.position=e.position||"relative",s(),endObject(e)};Gauge.styles={light:GaugeDefaults.style,dark:{track:{color:"rgba(255, 255, 255, 0.07)",width:12},bar:{color:"#65A293",width:12,roundCap:1},marker:{color:"rgba(255, 255, 255, 0.85)",width:3,length:18},value:{fontSize:38,textColor:"rgba(255, 255, 255, 0.95)",bold:1,offsetY:null},sub:{fontSize:13,textColor:"rgba(255, 255, 255, 0.5)",offsetY:null},title:{fontSize:13,textColor:"",gap:12}},modern:{track:{color:"#DFECEC",width:10},bar:{color:"cadetblue",width:10,roundCap:1},marker:{color:"#2F5F61",width:3,length:16},value:{fontSize:36,textColor:"#2F5F61",bold:1,offsetY:null},sub:{fontSize:13,textColor:"#6E9A9B",offsetY:null},title:{fontSize:13,textColor:"",gap:12}}},Gauge.styles.classic=Gauge.styles.light;