ozdenui 0.1.0

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 (149) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +14 -0
  3. data/NOTICE +5 -0
  4. data/README.md +242 -0
  5. data/exe/ozdenui +17 -0
  6. data/lib/ozdenui/AGENTS.md +210 -0
  7. data/lib/ozdenui/COMPONENTS.md +3017 -0
  8. data/lib/ozdenui/app.rb +749 -0
  9. data/lib/ozdenui/command.rb +107 -0
  10. data/lib/ozdenui/components.rb +368 -0
  11. data/lib/ozdenui/dialogs.rb +212 -0
  12. data/lib/ozdenui/files.rb +124 -0
  13. data/lib/ozdenui/icon.png +0 -0
  14. data/lib/ozdenui/kit.json +1 -0
  15. data/lib/ozdenui/kit.rb +115 -0
  16. data/lib/ozdenui/look.rb +229 -0
  17. data/lib/ozdenui/objects.rb +652 -0
  18. data/lib/ozdenui/server.rb +270 -0
  19. data/lib/ozdenui/values.rb +273 -0
  20. data/lib/ozdenui/version.rb +15 -0
  21. data/lib/ozdenui/web/basic/LICENSE +14 -0
  22. data/lib/ozdenui/web/basic/basic.min.css +1 -0
  23. data/lib/ozdenui/web/basic/basic.min.js +78 -0
  24. data/lib/ozdenui/web/basic/font/open-sans/LICENSE.txt +206 -0
  25. data/lib/ozdenui/web/basic/font/open-sans/OpenSans-Bold.ttf +0 -0
  26. data/lib/ozdenui/web/basic/font/open-sans/OpenSans-Regular.ttf +0 -0
  27. data/lib/ozdenui/web/basic/scroll-bar.min.js +3 -0
  28. data/lib/ozdenui/web/bridge.js +584 -0
  29. data/lib/ozdenui/web/comp/accordion.js +659 -0
  30. data/lib/ozdenui/web/comp/action-button/add.png +0 -0
  31. data/lib/ozdenui/web/comp/action-button.js +521 -0
  32. data/lib/ozdenui/web/comp/action-tab-bar.js +383 -0
  33. data/lib/ozdenui/web/comp/app-bar.js +237 -0
  34. data/lib/ozdenui/web/comp/badge.js +292 -0
  35. data/lib/ozdenui/web/comp/bottom-bar.js +555 -0
  36. data/lib/ozdenui/web/comp/breadcrumbs.js +524 -0
  37. data/lib/ozdenui/web/comp/canvas.js +652 -0
  38. data/lib/ozdenui/web/comp/chat-view.js +827 -0
  39. data/lib/ozdenui/web/comp/check-box.js +490 -0
  40. data/lib/ozdenui/web/comp/code-editor.js +965 -0
  41. data/lib/ozdenui/web/comp/color-picker.js +636 -0
  42. data/lib/ozdenui/web/comp/context-menu.js +951 -0
  43. data/lib/ozdenui/web/comp/currency-field.js +209 -0
  44. data/lib/ozdenui/web/comp/data-table/arrow.svg +2 -0
  45. data/lib/ozdenui/web/comp/data-table.js +937 -0
  46. data/lib/ozdenui/web/comp/date-picker.js +1055 -0
  47. data/lib/ozdenui/web/comp/dialog.js +992 -0
  48. data/lib/ozdenui/web/comp/email-field.js +65 -0
  49. data/lib/ozdenui/web/comp/file-picker.js +920 -0
  50. data/lib/ozdenui/web/comp/filters.js +807 -0
  51. data/lib/ozdenui/web/comp/form.js +602 -0
  52. data/lib/ozdenui/web/comp/full-screen-select/arrow.svg +2 -0
  53. data/lib/ozdenui/web/comp/full-screen-select/cancel.svg +2 -0
  54. data/lib/ozdenui/web/comp/full-screen-select.js +614 -0
  55. data/lib/ozdenui/web/comp/gauge.js +439 -0
  56. data/lib/ozdenui/web/comp/graph-box.js +3911 -0
  57. data/lib/ozdenui/web/comp/grid-group.js +185 -0
  58. data/lib/ozdenui/web/comp/hold-to-confirm-button/trash-red.png +0 -0
  59. data/lib/ozdenui/web/comp/hold-to-confirm-button/trash.png +0 -0
  60. data/lib/ozdenui/web/comp/hold-to-confirm-button.js +289 -0
  61. data/lib/ozdenui/web/comp/image-view.js +598 -0
  62. data/lib/ozdenui/web/comp/item-list.js +1740 -0
  63. data/lib/ozdenui/web/comp/json-editor.js +3221 -0
  64. data/lib/ozdenui/web/comp/json-view.js +597 -0
  65. data/lib/ozdenui/web/comp/label-editor.js +1140 -0
  66. data/lib/ozdenui/web/comp/left-menu/data-table.png +0 -0
  67. data/lib/ozdenui/web/comp/left-menu/home.png +0 -0
  68. data/lib/ozdenui/web/comp/left-menu/reports.png +0 -0
  69. data/lib/ozdenui/web/comp/left-menu/setting.png +0 -0
  70. data/lib/ozdenui/web/comp/left-menu.js +548 -0
  71. data/lib/ozdenui/web/comp/line-progress-bar.js +343 -0
  72. data/lib/ozdenui/web/comp/loading-screen.js +413 -0
  73. data/lib/ozdenui/web/comp/log-view.js +530 -0
  74. data/lib/ozdenui/web/comp/login-page.js +685 -0
  75. data/lib/ozdenui/web/comp/markdown-view.js +1045 -0
  76. data/lib/ozdenui/web/comp/menu-bar.js +624 -0
  77. data/lib/ozdenui/web/comp/mini-graph-box.js +492 -0
  78. data/lib/ozdenui/web/comp/minimal-accent.js +208 -0
  79. data/lib/ozdenui/web/comp/notice.js +229 -0
  80. data/lib/ozdenui/web/comp/number-field.js +128 -0
  81. data/lib/ozdenui/web/comp/numeric-keyboard.js +298 -0
  82. data/lib/ozdenui/web/comp/page-control.js +762 -0
  83. data/lib/ozdenui/web/comp/page-header.js +191 -0
  84. data/lib/ozdenui/web/comp/password-field/hide-btn.png +0 -0
  85. data/lib/ozdenui/web/comp/password-field/hide-btn2.png +0 -0
  86. data/lib/ozdenui/web/comp/password-field/show-btn.png +0 -0
  87. data/lib/ozdenui/web/comp/password-field/show-btn2.png +0 -0
  88. data/lib/ozdenui/web/comp/password-field.js +192 -0
  89. data/lib/ozdenui/web/comp/period-bar.js +436 -0
  90. data/lib/ozdenui/web/comp/phone-field.js +322 -0
  91. data/lib/ozdenui/web/comp/progress-bar.js +992 -0
  92. data/lib/ozdenui/web/comp/property-panel.js +3639 -0
  93. data/lib/ozdenui/web/comp/radio-button.js +527 -0
  94. data/lib/ozdenui/web/comp/range-slider.js +569 -0
  95. data/lib/ozdenui/web/comp/rich-text-editor.js +1064 -0
  96. data/lib/ozdenui/web/comp/scroll-area.js +308 -0
  97. data/lib/ozdenui/web/comp/scrolling-text.js +297 -0
  98. data/lib/ozdenui/web/comp/search-input/clear-round.svg +1 -0
  99. data/lib/ozdenui/web/comp/search-input/clear.svg +1 -0
  100. data/lib/ozdenui/web/comp/search-input/filter.png +0 -0
  101. data/lib/ozdenui/web/comp/search-input/filter.svg +1 -0
  102. data/lib/ozdenui/web/comp/search-input/search.svg +1 -0
  103. data/lib/ozdenui/web/comp/search-input.js +725 -0
  104. data/lib/ozdenui/web/comp/search-results.js +596 -0
  105. data/lib/ozdenui/web/comp/select-box.js +1862 -0
  106. data/lib/ozdenui/web/comp/settings-row.js +299 -0
  107. data/lib/ozdenui/web/comp/side-panel.js +616 -0
  108. data/lib/ozdenui/web/comp/slider-field.js +952 -0
  109. data/lib/ozdenui/web/comp/slider.js +838 -0
  110. data/lib/ozdenui/web/comp/smart-button/alert-black.png +0 -0
  111. data/lib/ozdenui/web/comp/smart-button/clock.png +0 -0
  112. data/lib/ozdenui/web/comp/smart-button.js +981 -0
  113. data/lib/ozdenui/web/comp/smart-table/clock.png +0 -0
  114. data/lib/ozdenui/web/comp/smart-table/down.png +0 -0
  115. data/lib/ozdenui/web/comp/smart-table/scroll.png +0 -0
  116. data/lib/ozdenui/web/comp/smart-table/sort.png +0 -0
  117. data/lib/ozdenui/web/comp/smart-table/up.png +0 -0
  118. data/lib/ozdenui/web/comp/smart-table.js +1883 -0
  119. data/lib/ozdenui/web/comp/sortable-list.js +1181 -0
  120. data/lib/ozdenui/web/comp/spark-line-box.js +738 -0
  121. data/lib/ozdenui/web/comp/splitter.js +411 -0
  122. data/lib/ozdenui/web/comp/status-bar.js +408 -0
  123. data/lib/ozdenui/web/comp/step-bar.js +345 -0
  124. data/lib/ozdenui/web/comp/stepper.js +753 -0
  125. data/lib/ozdenui/web/comp/tabs.js +1366 -0
  126. data/lib/ozdenui/web/comp/tag-input.js +1107 -0
  127. data/lib/ozdenui/web/comp/tap-effect.js +170 -0
  128. data/lib/ozdenui/web/comp/text-area-field.js +233 -0
  129. data/lib/ozdenui/web/comp/text-field.js +1006 -0
  130. data/lib/ozdenui/web/comp/time-line.js +398 -0
  131. data/lib/ozdenui/web/comp/time-picker.js +1032 -0
  132. data/lib/ozdenui/web/comp/tiny-select/arrow.svg +1 -0
  133. data/lib/ozdenui/web/comp/tiny-select.js +322 -0
  134. data/lib/ozdenui/web/comp/tiny-table.js +283 -0
  135. data/lib/ozdenui/web/comp/toast.js +891 -0
  136. data/lib/ozdenui/web/comp/toggle.js +757 -0
  137. data/lib/ozdenui/web/comp/tool-bar.js +760 -0
  138. data/lib/ozdenui/web/comp/tooltip.js +534 -0
  139. data/lib/ozdenui/web/comp/tree-view.js +1179 -0
  140. data/lib/ozdenui/web/comp/ui-effects.js +1097 -0
  141. data/lib/ozdenui/web/comp/ui-standards.js +403 -0
  142. data/lib/ozdenui/web/comp/url-field.js +190 -0
  143. data/lib/ozdenui/web/comp/web-view.js +588 -0
  144. data/lib/ozdenui/web/components.js +123 -0
  145. data/lib/ozdenui/web/index.html +39 -0
  146. data/lib/ozdenui/window.rb +188 -0
  147. data/lib/ozdenui/window_cocoa.rb +221 -0
  148. data/lib/ozdenui.rb +32 -0
  149. metadata +200 -0
@@ -0,0 +1,78 @@
1
+ /* Bismillah */
2
+ /*
3
+
4
+ basic.js (v26.11.10) A lightweight JavaScript library for building web-based applications with simple code. No need to write HTML or CSS — just use basic JavaScript.
5
+ - Project Site: https://bug7a.github.io/basic.js/
6
+
7
+ v26.11.10 is v26.09.18 plus the additions below. Every page and component written for the
8
+ previous versions works unchanged (same defaults, same DOM), except the global names moved under
9
+ basic.* in v26.10.25 (see below).
10
+
11
+ WHAT IS NEW IN v26.11.10 (see basic/basic-what-is-new.md):
12
+ - Groups: stretch: 1: the items without a width (VGroup) / a height (HGroup) fill the group across
13
+ (css: { alignItems: "stretch" } in short); group.stretch = 0 / 1 after creation
14
+
15
+ WHAT IS NEW IN v26.11.07 (see basic/basic-what-is-new.md):
16
+ - Props: border and round take an array too, like padding: border [x, y] / [left, top, right, bottom],
17
+ round [top, bottom] / [topLeft, topRight, bottomRight, bottomLeft]; center() counts each side
18
+ - Groups: gap [x, y]: x between the items of a line, y between the lines (wrap: 1)
19
+
20
+ WHAT IS NEW IN v26.11.05 (see basic/basic-what-is-new.md):
21
+ - basic: zIndexAbove(obj, minimum): the z-index of a list or a menu that opens from obj, over the layer that holds
22
+ obj (a Dialog, a SidePanel)
23
+ - Fix: remove() of a parent also cleans the panels its components own on page (their ScrollBars leaked)
24
+
25
+ WHAT IS NEW IN v26.11.01 (see basic/basic-what-is-new.md):
26
+ - basic: uiScale, scaleStyle(style, factor), scaleSize(value, factor): the components drawn in screen px keep
27
+ their size on a page fitted with page.fit() (their "scale" param)
28
+
29
+ WHAT IS NEW IN v26.10.27 (see basic/basic-what-is-new.md):
30
+ - basic: applyStylePackage: a package with its own "style" key is a package of params (its other keys
31
+ fill the params: an icon file outside the style can be in a package too)
32
+
33
+ WHAT IS NEW IN v26.10.25 (see basic/basic-what-is-new.md):
34
+ - Global: Alpha(color, percent) - any color made transparent, like Black(0.5) / White(0.5)
35
+ - basic: resolveTheme(themes, name) - the colors of a theme ("auto": the system setting), filled from themes.light
36
+ - MOVED: num, str, isMobile, go, twoDigitFormat -> basic.num(), basic.str(), basic.isMobile(), basic.go(),
37
+ basic.twoDigitFormat(). They are not globals any more.
38
+ - REMOVED: the old globals createBox, createButton, createLabel, createImage, createIcon, createInput,
39
+ createTextBox. Use Box(), Button(), Label(), Icon(), Input() (the same, with props).
40
+ (They are still there as basic.createBox()...)
41
+
42
+ WHAT IS NEW IN v26.10.24 (see basic/basic-what-is-new.md):
43
+ - basic: applyStylePackage(params, Comp.styles, CompDefaults) - the style packages of a component in one line
44
+
45
+ WHAT IS NEW IN v26.10.23 (for simpler components; see basic/basic-what-is-new.md):
46
+ - Cleaned in remove(): listenTo(target, event, func), onPageResize(func), after(ms, func), every(ms, func), own(obj)
47
+ - Methods: onHoverChange(func), setFocusRing(color)
48
+ - Global: createIn() returns the result of its function
49
+ - basic: isOn(), addCss()
50
+ - Props: role, aria ({ label: "Close", selected: true }), tabIndex (accessibility)
51
+ - Fix: grow, shrink and css in the props of a group are not written over by its flex styles
52
+ - Fix: rotate changes only the rotate() part of the transform (a translate or scale stays)
53
+
54
+ WHAT IS NEW IN v26.09.18 (see basic/basic-what-is-new.md for examples):
55
+ - Fixes: "100" and "50%" work for left/top/right/bottom/width/height. Children created in a hidden
56
+ HGroup/VGroup are real flex items (visible: 0 at create time). Objects created before the
57
+ page is ready throw a clear error. Timers of a removed object can not run anymore.
58
+ A page variable named like a library helper (const createButton) can not break the library.
59
+ - Props: css, cursor, zIndex, boxShadow, fontFamily, bold, italic, lineHeight, ellipsis, selectable,
60
+ grow, shrink, plainText, isRemoved, children
61
+ - Methods: show(), hide(), toggle(), once(), setSize(), setPosition(), bringToFront(), contains(), animate()
62
+ - Input: value, placeholder, inputType, maxLength, readOnly, focus(), blur(), select(), onEnter()
63
+ - Label: clipContent (0: the text is not cut at the edges)
64
+ - Icon: alt, imageFit
65
+ - Groups: wrap, justify, hug (alternative name for fit) (HGroup / VGroup / AutoLayout)
66
+ - Global: createIn(container, func) - creates objects inside an existing box, then restores the container
67
+ - page: on(), off(), onKeyDown(), title
68
+ - basic: version, isReady, sleep(), nextFrame(), clamp(), lerp(), objectOf(), escapeHtml(), storage.loadOr()
69
+
70
+ The Art of Fun Coding — With basic.js
71
+
72
+
73
+ Copyright 2020-2026 Bugra Ozden <bugra.ozden@gmail.com> (https://bug7a.github.io/)
74
+ Licensed under the Apache License, Version 2.0
75
+ SPDX-License-Identifier: Apache-2.0
76
+
77
+ */
78
+ !function(){"use strict";const t={version:"26.11.10",library:"basic.js",isReady:0};window.basic=t,t.startTime=Date.now(),t.ACTION_COLOR="#689BD2",t.ACTION2_COLOR="cadetblue",t.WARNING_COLOR="tomato",t.ALERT_COLOR="gold",t.CANCEL_COLOR="lightgray",t.TEXT_COLOR="rgba(0, 0, 0, 0.8)",t.BACKGROUND_COLOR="whitesmoke",t.DARK_BACKGROUND_COLOR="#141414",t.FONT_SIZE=20,t.BUTTON_WIDTH=130,t.BUTTON_HEIGHT=50,t.BUTTON_COLOR=t.ACTION_COLOR,t.BUTTON_TEXT_COLOR="rgba(0, 0, 0, 0.65)",t.TEXTBOX_WIDTH=270,t.TEXTBOX_HEIGHT=50,t.gunler=["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],t.days=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t.aylar=["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],t.months=["January","February","March","April","May","June","July","August","September","October","November","December"],window.that=null,window.previousThat=null,window.prevThat=null;let e,i,n=null;const s={},o=[],r={WITH_MOTION_TIME:50,DONT_MOTION_TIME:40};t.start=function(){window.page=new p,page.containerBox=null,A(page),t.isReady=1,page.mainBox=f(0,0,page.width,page.height),page.mainBox.containerBox=null,that.elem.style.position="fixed",that.color="transparent",page.onResize(function(){"function"==typeof page.refreshSize&&page.refreshSize()}),"function"==typeof start&&(start(),t.afterStart()),"function"==typeof loop&&(i||z(1e3))},t.afterStart=function(){};const l=function(t,e="log"){console[e](t)};window.println=l,window.random=function(t,e){let i=0;return null!=e?e<t?l("basic.js: random(): The second parameter (number) must be greater than the first.","error"):i=t+Math.floor(Math.random()*(e-t+1)):l("basic.js: random(): Two parameters (numbers) must be sent.","error"),i},t.num=function(t,e="float"){if("float"==e){const e=parseFloat(t);return Math.round(100*e)/100}if("integer"==e||"int"==e)return parseInt(t)},t.str=function(t){return String(t)},t.isMobile=function(){let t=0,e=navigator.userAgent||navigator.vendor||window.opera;return(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=1),t},t.go=function(t,e="_self"){return window.open(t,e)},t.twoDigitFormat=function(t){return t<=9&&(t="0"+t),t},t.storage={save(t,e){try{return localStorage.setItem(t,JSON.stringify(e)),1}catch(e){return console.warn("storage save error:",t,e.name),0}},has(t){try{return null!==localStorage.getItem(t)}catch(t){return!1}},load(t){try{const e=localStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return console.warn("storage parse error:",t),null}},remove(t){try{localStorage.removeItem(t)}catch(t){}},clear(){try{localStorage.clear()}catch(t){}}},t.time={get hour(){return(new Date).getHours()},get minute(){return(new Date).getMinutes()},get second(){return(new Date).getSeconds()},get millisecond(){return(new Date).getMilliseconds()}},t.date={get year(){return(new Date).getFullYear()},get monthNumber(){let t=(new Date).getMonth();return t++,t},get ayAdi(){return t.aylar[this.monthNumber-1]},get monthName(){return t.months[this.monthNumber-1]},get dayOfWeek(){return(new Date).getDay()},get gunAdi(){return t.gunler[this.dayOfWeek]},get dayName(){return t.days[this.dayOfWeek]},get dayOfMonth(){return(new Date).getDate()},get now(){return Date.now()}},t.sleep=function(t=0){return new Promise(function(e){setTimeout(e,t)})},t.nextFrame=function(){return new Promise(function(t){requestAnimationFrame(t)})},t.clamp=function(t,e,i){return Math.min(Math.max(t,e),i)},t.lerp=function(t,e,i){return t+(e-t)*i},t.objectOf=function(t){let e=t;for(;e;){if(e._basicObject)return e._basicObject;e=e.parentElement}return null},t.escapeHtml=function(t){const e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return String(null==t?"":t).replace(/[&<>"']/g,function(t){return e[t]})},t.isOn=function(t){return!0===t||1===t||"1"===t},t.addCss=function(t,e,i=0){let n=document.getElementById(t);return n&&!i||(n||(n=document.createElement("style"),n.id=t,document.head.appendChild(n)),n.textContent=e),n},t.resolveTheme=function(t,e="light"){let i=e||"light";if("auto"===i){i=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const n=t[i];n||console.warn("Theme not found: "+i);const s={};return j(s,n||{}),j(s,t.light||{}),s},t.applyStylePackage=function(t,e,i){const n=t.styleName||i.styleName,s=e[n];s||console.warn("Style package not found: "+n);const o=!!s&&Object.prototype.hasOwnProperty.call(s,"style"),r=o?s.style:s,l={};if(j(l,t.style||{}),j(l,r||{}),t.style=l,o){const e=Object.assign({},s);delete e.style;for(const t in e)Array.isArray(e[t])&&(e[t]=e[t].slice());j(t,e)}return t},t.uiScale=1,t.SIZE_KEY_ENDINGS=["size","width","height","gap","space","spacing","padding","margin","round","radius","offset","thickness","top","left","right","bottom","border"],t.isSizeKey=function(e){const i=String(e).toLowerCase();return"lineheight"!==i&&t.SIZE_KEY_ENDINGS.some(t=>i.endsWith(t))},t.scaleSize=function(t,e){return"number"==typeof t?t*e:Array.isArray(t)?t.map(t=>"number"==typeof t?t*e:t):t},t.scaleCssText=function(t,e){return 1===e||"string"!=typeof t?t:t.replace(/(\d*\.?\d+)px/g,(t,i)=>Number(i)*e+"px")},t.scaleStyle=function(e,i){if(1===i||!e||"object"!=typeof e)return e;const n={};for(const s in e){const o=e[s];null!==o&&"object"==typeof o&&!Array.isArray(o)?n[s]=t.scaleStyle(o,i):n[s]=t.isSizeKey(s)?t.scaleSize(o,i):o}return n},t.zIndexAbove=function(t,e=0){let i=t&&t.elem?t.elem:t;for(;i&&i.parentElement&&i.parentElement!==page.elem;)i=i.parentElement;const n=i&&i.parentElement===page.elem&&parseInt(getComputedStyle(i).zIndex,10)||0;return Math.max(e,n+1)},t.storage.loadOr=function(e,i){const n=t.storage.load(e);return null===n?i:n};const a=function(t){if("string"==typeof t){const e=t.trim();return""===e||isNaN(Number(e))?e:Number(e)+"px"}return parseFloat(t)+"px"},h=function(t){if("number"==typeof t)return{left:t,top:t,right:t,bottom:t};if(!Array.isArray(t))return null;const[e,i,n,s]=t;return 1===t.length?{left:e,top:e,right:e,bottom:e}:2===t.length||3===t.length?{left:e,top:i,right:e,bottom:i}:4===t.length?{left:e,top:i,right:n,bottom:s}:null},c=function(t,e){if(!n)throw new Error("basic.js: The library is not ready yet. Create objects in start() or window.onload.");t._containerBox=n,n.elem.appendChild(e)},u=function(t){return!(!t||!(t._isFlex||t.elem&&"flex"==t.elem.style.display))},m=function(t,e,i){null!=i&&""!==i?t.setAttribute(e,String(i)):t.removeAttribute(e)};class d{constructor(t){this._type=t,this._visible=1,this._displayType="block",this._opacity=1,this._rotate=0,this._padding=0,this._motionString="none",this._clickable=0,this._eventFuncList=[]}get parentBox(){return this._containerBox}set parentBox(t){this._containerBox=t}get containerBox(){return this._containerBox}set containerBox(t){this._containerBox=t}get left(){return"absolute"==this.position?parseFloat(this.elem.style.left):this.elem.offsetLeft}set left(t){this.elem.style.right="",this.elem.style.left=a(t)}get top(){return"absolute"==this.position?parseFloat(this.elem.style.top):this.elem.offsetTop}set top(t){this.elem.style.bottom="",this.elem.style.top=a(t)}get right(){return parseFloat(this.elem.style.right)}set right(t){this.elem.style.left="",this.elem.style.right=a(t)}get bottom(){return parseFloat(this.elem.style.bottom)}set bottom(t){this.elem.style.top="",this.elem.style.bottom=a(t)}get totalLeft(){return L(this.elem,"Left")}get totalTop(){return L(this.elem,"Top")}get width(){return"string"!=typeof this._width?this._width||0:this.elem.offsetWidth}set width(t){"string"!=typeof t||""===t.trim()||isNaN(Number(t))||(t=Number(t)),this._width=t,this.elem.style.width=a(t)}get height(){return"string"!=typeof this._height?this._height||0:this.elem.offsetHeight}set height(t){"string"!=typeof t||""===t.trim()||isNaN(Number(t))||(t=Number(t)),this._height=t,this.elem.style.height=a(t)}get rotate(){return this._rotate}set rotate(t){this._rotate=parseInt(t),this.elem.style.transform=function(t,e,i){const n=e+"("+i+")",s="none"===t?"":t||"",o=new RegExp("(^|\\s|\\))"+e+"\\([^)]*\\)");return o.test(s)?s.replace(o,function(t,e){return e+n}):s.trim()?s.trim()+" "+n:n}(this.elem.style.transform,"rotate",t+"deg")}get visible(){return this._visible}set visible(t){this._visible=t,this.elem.style.display&&"none"!=this.elem.style.display&&(this._displayType=this.elem.style.display),this.elem.style.display=1==t?this._displayType:"none"}get clickable(){return this._clickable}set clickable(t){this._clickable=t,this._textElem.style.pointerEvents=1==t?"auto":"none"}get opacity(){return this._opacity}set opacity(t){this._opacity=t,this.elem.style.opacity=t}get color(){return this._backgroundColor}set color(t){this._backgroundColor=t,this._textElem.style.backgroundColor=t}get padding(){return this._padding||0}set padding(t){this._padding=t;const e=h(t);e&&(this.elem.style.paddingLeft=e.left+"px",this.elem.style.paddingTop=e.top+"px",this.elem.style.paddingRight=e.right+"px",this.elem.style.paddingBottom=e.bottom+"px")}get border(){return this._border}set border(t){if(this._border=t,!Array.isArray(t))return void(this._textElem.style.borderWidth=t+"px");const e=h(t);e&&(this._textElem.style.borderLeftWidth=e.left+"px",this._textElem.style.borderTopWidth=e.top+"px",this._textElem.style.borderRightWidth=e.right+"px",this._textElem.style.borderBottomWidth=e.bottom+"px")}get borderColor(){return this._borderColor}set borderColor(t){this._borderColor=t,this._textElem.style.borderColor=t}get round(){return this._round}set round(t){if(this._round=t,!Array.isArray(t))return void(this._textElem.style.borderRadius=t+"px");const e=function(t){const[e,i,n,s]=t,o=2===t.length||3===t.length;return 1===t.length?{topLeft:e,topRight:e,bottomRight:e,bottomLeft:e}:o?{topLeft:e,topRight:e,bottomRight:i,bottomLeft:i}:4===t.length?{topLeft:e,topRight:i,bottomRight:n,bottomLeft:s}:null}(t);e&&(this._textElem.style.borderTopLeftRadius=e.topLeft+"px",this._textElem.style.borderTopRightRadius=e.topRight+"px",this._textElem.style.borderBottomRightRadius=e.bottomRight+"px",this._textElem.style.borderBottomLeftRadius=e.bottomLeft+"px")}get fontSize(){return this._fontSize}set fontSize(t){this._fontSize=t,this._textElem.style.fontSize=t+"px"}get textSize(){return this.fontSize}set textSize(t){this.fontSize=t}get textColor(){return this._textColor}set textColor(t){this._textColor=t,this._textElem.style.color=t}get textAlign(){return this._textAlign}set textAlign(t){this._textAlign=t,this._textElem.style.textAlign=t}get position(){return this.elem.style.position?this.elem.style.position:"absolute"}set position(t){this.elem.style.position=t,"relative"==t&&(this.left=0,this.top=0)}center(t){k(this,t)}centerBy(t,e){C(this,t,e)}aline(t,e,i=0,n){O(this,t,e,i,n)}get _textElem(){return this.elem}get css(){return this.elem.style}set css(t){if(t)if("string"!=typeof t)for(let e in t)this.elem.style[e]=t[e];else this.elem.style.cssText+="; "+t}get cursor(){return this._cursor||""}set cursor(t){this._cursor=t||"",this.elem.style.cursor=this._cursor,this._textElem!==this.elem&&(this._textElem.style.cursor=this._cursor)}get zIndex(){const t=parseInt(this.elem.style.zIndex);return isNaN(t)?0:t}set zIndex(t){this.elem.style.zIndex=""===t||null==t?"":String(t)}get boxShadow(){return this.elem.style.boxShadow}set boxShadow(t){this.elem.style.boxShadow=t||""}get fontFamily(){return this._fontFamily||""}set fontFamily(t){this._fontFamily=t||"",this._applyFont()}get bold(){return this._bold?1:0}set bold(t){this._bold=t?1:0,this._applyFont()}_applyFont(){const t=this._fontFamily||"",e=this._textElem;""===t||0===t.indexOf("opensans")?(e.style.fontFamily=this._bold?"opensans-bold":t,e.style.fontWeight=""):(e.style.fontFamily=t,e.style.fontWeight=this._bold?"bold":"")}get italic(){return this._italic?1:0}set italic(t){this._italic=t?1:0,this._textElem.style.fontStyle=t?"italic":""}get lineHeight(){return this._lineHeight}set lineHeight(t){this._lineHeight=t,this._textElem.style.lineHeight="number"==typeof t?t+"px":t||""}get ellipsis(){return this._ellipsis?1:0}set ellipsis(t){this._ellipsis=t?1:0;const e=this._textElem;e.style.whiteSpace=t?"nowrap":"",e.style.textOverflow=t?"ellipsis":"",e.style.overflow=t?"hidden":0===this._clipContent?"visible":""}get selectable(){return this._selectable?1:0}set selectable(t){this._selectable=t?1:0,this.elem.style.userSelect=t?"text":"",this.elem.style.webkitUserSelect=t?"text":"",t&&(this.clickable=1)}get grow(){return this._grow||0}set grow(t){this._grow=t,this.elem.style.flexGrow=String(t)}get shrink(){return this._shrink||0}set shrink(t){this._shrink=t,this.elem.style.flexShrink=String(t)}get plainText(){return this._textElem.textContent}set plainText(t){this._textElem.textContent=null==t?"":String(t)}get role(){return this._textElem.getAttribute("role")||""}set role(t){m(this._textElem,"role",t)}get aria(){const t={};for(const e of this._textElem.attributes)0===e.name.indexOf("aria-")&&(t[e.name.slice(5)]=e.value);return t}set aria(t){if(t)for(let e in t)m(this._textElem,"aria-"+e.toLowerCase(),t[e])}get tabIndex(){return this._textElem.tabIndex}set tabIndex(t){null!=t&&""!==t?this._textElem.tabIndex=Number(t):this._textElem.removeAttribute("tabindex")}get isRemoved(){return this._isRemoved?1:0}get children(){const t=[],e=this.elem.children;for(let i=0;i<e.length;i++)e[i]._basicObject&&t.push(e[i]._basicObject);return t}show(){return this.visible=1,this}hide(){return this.visible=0,this}toggle(){return this.visible=1==this.visible?0:1,this}setSize(t,e){return null!=t&&(this.width=t),null!=e&&(this.height=e),this}setPosition(t,e){return null!=t&&(this.left=t),null!=e&&(this.top=e),this}bringToFront(){let t=0;const e=this.elem.parentElement;if(e)for(let i=0;i<e.children.length;i++){const n=parseInt(e.children[i].style.zIndex);!isNaN(n)&&n>t&&(t=n)}return this.zIndex=t+1,this}contains(t){return!!(t&&t!==this&&t.elem&&this.elem.contains(t.elem))}once(t,e,i=!1){let n=null;return n=this.on(t,function(t,i){n&&n(),e(t,i)},i),n}animate(t={},e=300,i="ease"){const n=this;return new Promise(function(s){if(n._isRemoved)s(n);else{n._animateTimeout?(clearTimeout(n._animateTimeout),n._animateResolve&&n._animateResolve(n)):n._animateBaseTransition=n.elem.style.transition,n.elem.style.transition="all "+e+"ms "+i,n.elem.offsetWidth;for(let e in t)n[e]=t[e];n._animateResolve=s,n._animateTimeout=setTimeout(function(){n._animateTimeout=null,n._animateResolve=null,n._isRemoved||(n.elem.style.transition=n._animateBaseTransition||""),s(n)},e+20)}})}listenTo(t,e,i,n=!1){return this._addEventListener(e,i,t,n)}onPageResize(t){return this.listenTo(window,"resize",t)}after(t,e){const i=this;this._timerList||(this._timerList=new Set);const n=setTimeout(function(){i._timerList.delete(n),i._isRemoved||e(i)},t);return this._timerList.add(n),function(){clearTimeout(n),i._timerList.delete(n)}}every(t,e){const i=this;this._intervalList||(this._intervalList=new Set);const n=setInterval(function(){i._isRemoved||e(i)},t);return this._intervalList.add(n),function(){clearInterval(n),i._intervalList.delete(n)}}own(t){return t?(this._ownedList||(this._ownedList=[]),this._ownedList.push(t),t):t}onHoverChange(t){const e=this.on("mouseenter",function(e,i){t(e,1,i)}),i=this.on("mouseleave",function(e,i){t(e,0,i)});return function(){e(),i()}}setFocusRing(e="rgba(95, 158, 160, 0.8)"){t.addCss("basic-focus-ring",".basic-focus-ring:focus { outline: none; }.basic-focus-ring:focus-visible { outline: 2px solid var(--basic-focus-ring); outline-offset: -2px; }");const i=this._textElem;return i.classList.toggle("basic-focus-ring",!!e),e&&i.style.setProperty("--basic-focus-ring",e),this}remove(){if(this._isRemoved)return;this._isRemoved=1;const t=this.elem;if(!o.some(function(e){return e!==t&&e.contains(t)})){o.push(t);try{const t=this.elem.querySelectorAll("*");for(let e=0;e<t.length;e++){const i=t[e]._basicObject;if(i&&i!==this&&!i._isRemoved)try{"function"==typeof i.destroy&&i.destroy(),i._isRemoved||i.remove()}catch(t){l("basic.js: A child object could not be removed: "+t.message,"warn")}}}finally{o.pop()}}if(this._setMotionTimeout&&clearTimeout(this._setMotionTimeout),this._withMotionTimeout&&clearTimeout(this._withMotionTimeout),this._dontMotionTimeout&&clearTimeout(this._dontMotionTimeout),this._animateTimeout&&clearTimeout(this._animateTimeout),this._animateResolve&&(this._animateResolve(this),this._animateResolve=null),this._timerList&&(this._timerList.forEach(function(t){clearTimeout(t)}),this._timerList.clear()),this._intervalList&&(this._intervalList.forEach(function(t){clearInterval(t)}),this._intervalList.clear()),this._ownedList){const t=this._ownedList;this._ownedList=null,t.forEach(function(t){try{t&&!t._isRemoved&&"function"==typeof t.remove&&t.remove()}catch(t){l("basic.js: An owned object could not be removed: "+t.message,"warn")}})}if(this._eventFuncList&&this._eventFuncList.length)for(let t=this._eventFuncList.length-1;t>=0;t--){const e=this._eventFuncList[t];e.elem.removeEventListener(e.eventName,e.eventFunc,e.capture),this._eventFuncList.pop()}s&&"function"==typeof s.remove_onResize&&s.remove_onResize(this.elem,null),this.elem.remove()}props(t,e,i){return I(this,t,e,i),this}_addEventListener(t,e,i,n=!1){let s=this;const o=function(t){e(s,t)};i.addEventListener(t,o,n);const r={};r.eventName=t,r.originalFunc=e,r.eventFunc=o,r.elem=i,r.capture="object"==typeof n&&null!==n?!!n.capture:!!n,this._eventFuncList.push(r);return function(){const t=s._eventFuncList?s._eventFuncList.indexOf(r):-1;t<0||(s._eventFuncList.splice(t,1),r.elem.removeEventListener(r.eventName,r.eventFunc,r.capture))}}_removeEventListener(t,e,i){for(let n=0;n<this._eventFuncList.length;n++){const s=this._eventFuncList[n];if(s.originalFunc==e&&s.eventName==t&&s.elem==i){this._eventFuncList.splice(n,1),i.removeEventListener(t,s.eventFunc,s.capture);break}}}on(t,e,i=!1){const n=this._textElem;return this.clickable=1,this._addEventListener(t,e,n,i)}off(t,e){const i=this._textElem;this._removeEventListener(t,e,i)}onResize(t){s.onResize(this,t)}remove_onResize(t){s.remove_onResize(this.elem,t)}setMotion(t){const e=this;this._setMotionTimeout&&clearTimeout(this._setMotionTimeout),this._setMotionTimeout=setTimeout(function(){e.setMotionNow(t)},r.DONT_MOTION_TIME)}getMotion(){return this._motionString}setMotionNow(t){this._motionString=t,this.elem.style.transition=t}withMotion(t){const e=this;this._withMotionTimeout&&clearTimeout(this._withMotionTimeout),this._withMotionTimeout=setTimeout(function(){e.canMotionNow(),t(e)},r.WITH_MOTION_TIME)}dontMotion(){this.elem.style.transition="none";const t=this;this._dontMotionTimeout&&clearTimeout(this._dontMotionTimeout),this._dontMotionTimeout=setTimeout(function(){t.elem.style.transition=t._motionString},r.DONT_MOTION_TIME)}canMotionNow(){this.elem.style.transition=this._motionString}}class p{constructor(){this._bodyElement=document.getElementsByTagName("BODY")[0],this._element=this._bodyElement,this._backgroundColor="white",this._zoom=1}get elem(){return this._element}get element(){return this._element}get bodyElement(){return this._bodyElement}get mainBox(){return this._box}set mainBox(t){this._box=t,this._element=this._box.elem}get width(){let t;return t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,S(t)}get height(){let t;return t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,S(t)}get html(){return this._box.elem.innerHTML}set html(t){this._box.elem.innerHTML=t}get zoom(){return this._zoom}set zoom(t){this._zoom=t,this.bodyElement.style.transformOrigin="top left",this.bodyElement.style.transform="scale("+t+")",page.refreshSize()}get color(){return this._backgroundColor}set color(t){this._backgroundColor=t,this.bodyElement.style.backgroundColor=t}fit(t=document.body.clientWidth,e){page.zoom=1;let i=page.width;e=e||t,page.zoom=i>e?e/t:i/t}autoFit(t,e){page.zoom=1;const i=t/e;let n=0;n=page.width/page.height<=i?page.width:page.height*i,page.fit(t,n)}refreshSize(){page.mainBox.width=page.width,page.mainBox.height=page.height}onClick(t){this._box._addEventListener("click",t,window)}remove_onClick(t){this._box._removeEventListener("click",t,window)}onResize(t){this._box._addEventListener("resize",t,window)}remove_onResize(t){this._box._removeEventListener("resize",t,window)}on(t,e,i=!1){return this._box._addEventListener(t,e,window,i)}off(t,e){this._box._removeEventListener(t,e,window)}onKeyDown(t){return this.on("keydown",t)}remove_onKeyDown(t){this.off("keydown",t)}get title(){return document.title}set title(t){document.title=t}add(t){t.containerBox!=this&&(t.containerBox=this,this.elem.appendChild(t.elem))}}class g extends d{constructor(t=-1e3,e=-1e3,i=100,s=100){super("box"),this._backgroundColor="whitesmoke",this._border=0,this._borderColor="rgba(0, 0, 0, 0.6)",this._round=0,this._fontSize=16,this._textColor="rgba(0, 0, 0, 0.8)",this._textAlign="left",this._clipContent=1;const o=document.createElement("DIV");o.classList.add("basic_box"),o.style.left=a(t),o.style.top=a(e),this._element=o,c(this,this._element),this.width=i,this.height=s,u(n)&&(this.position="relative"),M(this)}get elem(){return this._element}get element(){return this._element}get text(){return this.elem.innerHTML}set text(t){this.elem.innerHTML=t}get html(){return this.elem.innerHTML}set html(t){this.elem.innerHTML=t}get clipContent(){return this._clipContent}set clipContent(t){this._clipContent=t,t?(this.elem.style.overflowX="hidden",this.elem.style.overflowY="hidden"):(this.elem.style.overflowX="visible",this.elem.style.overflowY="visible")}get scrollX(){return"auto"==this.elem.style.overflowX?1:0}get scrollY(){return"auto"==this.elem.style.overflowY?1:0}set scrollX(t){this.elem.style.overflowX="hidden",1==t&&(this.clickable=1,this.elem.style.overflowX="auto")}set scrollY(t){this.elem.style.overflowY="hidden",1==t&&(this.clickable=1,this.elem.style.overflowY="auto")}onClick(t){this.clickable=1,this._addEventListener("click",t,this.elem)}remove_onClick(t){this._removeEventListener("click",t,this.elem)}add(t){t.containerBox=this,this.elem.appendChild(t.elem)}in(t){B(this,t)}}const f=function(t,e,i,n){return new g(t,e,i,n)};t.createBox=f;class _ extends d{constructor(e=-1e3,i=-1e3,s=t.BUTTON_WIDTH,o=t.BUTTON_HEIGHT){super("button"),this._backgroundColor=t.BUTTON_COLOR,this._border=1,this._borderColor="rgba(0, 0, 0, 0.40)",this._round=4,this._fontSize=20,this._textColor=t.BUTTON_TEXT_COLOR,this._textAlign="center",this._clickable=1;const r=document.createElement("BUTTON");r.innerHTML="Button",r.classList.add("basic_button"),r.setAttribute("type","button"),r.style.left=a(e),r.style.top=a(i),this._element=r,c(this,this._element),this.width=s,this.height=o,u(n)&&(this.position="relative"),M(this)}get elem(){return this._element}get element(){return this._element}get buttonElement(){return this._element}get text(){return this.buttonElement.innerHTML}set text(t){this.buttonElement.innerHTML=t}get value(){return this.buttonElement.value}set value(t){this.buttonElement.value=t}get enabled(){return this.buttonElement.disabled?0:1}set enabled(t){this.buttonElement.disabled=t?0:1}get minimal(){return this.buttonElement.classList.contains("minimal")?1:0}set minimal(t){t?this.buttonElement.classList.add("minimal"):this.buttonElement.classList.remove("minimal"),""===this.buttonElement.style.borderWidth&&(this._border=t?0:1)}get spaceX(){return parseInt(this.elem.style.paddingLeft)||0}set spaceX(t){this.elem.style.paddingLeft=t+"px",this.elem.style.paddingRight=t+"px"}onClick(t){this.clickable=1,this._addEventListener("click",t,this.buttonElement)}remove_onClick(t){this._removeEventListener("click",t,this.buttonElement)}add(t){l("basic.js: add(): Insertion cannot be made inside the Button object.","error")}}const b=function(t,e,i,n){return new _(t,e,i,n)};t.createButton=b;class y extends d{constructor(e=-1e3,i=-1e3,s=t.TEXTBOX_WIDTH,o=t.TEXTBOX_HEIGHT){super("textbox"),this._backgroundColor="white",this._border=1,this._borderColor="#4A4A4A",this._round=4,this._fontSize=20,this._textColor="#4A4A4A",this._textAlign="left",this._clickable=1;const r=document.createElement("DIV");r.classList.add("basic_textbox-main"),this._mainElement=r;const l=document.createElement("DIV");l.classList.add("basic_textbox-title"),l.innerHTML="",this._titleElement=l;const h=document.createElement("INPUT");h.value="",h.classList.add("basic_textbox"),h.setAttribute("type","text"),h.style.width="100%",h.style.height="100%",this._element=h,r.style.left=a(e),r.style.top=a(i),r.appendChild(this._titleElement),r.appendChild(this._element),c(this,this._mainElement),this.width=s,this.height=o,u(n)&&(this.position="relative"),M(this)}get elem(){return this._mainElement}get element(){return this._mainElement}get inputElement(){return this._element}set inputElement(t){this._element=t}get titleElement(){return this._titleElement}get text(){return this.inputElement.value}set text(t){this.inputElement.value=null==t?"":String(t)}get _textElem(){return this.inputElement||this.elem}get title(){return this.titleElement.innerHTML}set title(t){this.titleElement.innerHTML=t}get enabled(){return this.inputElement.disabled?0:1}set enabled(t){this.inputElement.disabled=t?0:1}get minimal(){return this.inputElement.classList.contains("minimal")?1:0}set minimal(t){t?this.inputElement.classList.add("minimal"):this.inputElement.classList.remove("minimal"),""===this.inputElement.style.borderWidth&&(this._border=t?0:1)}get value(){return this.text}set value(t){this.text=t}get plainText(){return this.text}set plainText(t){this.text=t}get placeholder(){return this.inputElement.placeholder}set placeholder(t){this.inputElement.placeholder=null==t?"":String(t)}get inputType(){return this.inputElement.type}set inputType(t){this.inputElement.type=t||"text"}get maxLength(){return this.inputElement.maxLength>0?this.inputElement.maxLength:0}set maxLength(t){t>0?this.inputElement.maxLength=t:this.inputElement.removeAttribute("maxlength")}get readOnly(){return this.inputElement.readOnly?1:0}set readOnly(t){this.inputElement.readOnly=!!t}focus(){return this.inputElement.focus(),this}blur(){return this.inputElement.blur(),this}select(){return this.inputElement.select(),this}onEnter(t){const e=function(e,i){"Enter"===i.key&&t(e,i)};return e._enterFunc=t,this._addEventListener("keydown",e,this.inputElement)}remove_onEnter(t){for(let e=this._eventFuncList.length-1;e>=0;e--){const i=this._eventFuncList[e];"keydown"==i.eventName&&i.originalFunc._enterFunc===t&&(i.elem.removeEventListener("keydown",i.eventFunc,i.capture),this._eventFuncList.splice(e,1))}}onChange(t){this._addEventListener("input",t,this.inputElement)}remove_onChange(t){this._removeEventListener("input",t,this.inputElement)}add(t){l("basic.js: add(): Insertion cannot be made inside the TextBox object.","error")}}const w=function(t,e,i,n){return new y(t,e,i,n)};t.createTextBox=w,t.createInput=w;class x extends d{constructor(t=-1e3,e=-1e3,i="auto",s="auto"){super("label"),this._backgroundColor="transparent",this._border=0,this._borderColor="rgba(0, 0, 0, 0.6)",this._round=0,this._fontSize=20,this._textColor="rgba(0, 0, 0, 0.8)",this._textAlign="left";const o=document.createElement("DIV");o.classList.add("basic_label"),o.style.left=a(t),o.style.top=a(e),this._element=o,c(this,this._element),this.width=i,this.height=s,u(n)&&(this.position="relative"),M(this)}get elem(){return this._element}get element(){return this._element}get text(){return this.elem.innerHTML}set text(t){this.elem.innerHTML=t}get clipContent(){return 0===this._clipContent?0:1}set clipContent(t){this._clipContent=t?1:0,this._ellipsis||(this.elem.style.overflow=t?"":"visible")}get space(){return parseInt(this.elem.style.padding)||0}set space(t){this.elem.style.padding=t+"px"}get spaceX(){return parseInt(this.elem.style.paddingLeft)||0}set spaceX(t){this.elem.style.paddingLeft=t+"px",this.elem.style.paddingRight=t+"px"}get spaceY(){return parseInt(this.elem.style.paddingTop)||0}set spaceY(t){this.elem.style.paddingTop=t+"px",this.elem.style.paddingBottom=t+"px"}onClick(t){this.clickable=1,this._addEventListener("click",t,this.elem)}remove_onClick(t){this._removeEventListener("click",t,this.elem)}add(t){l("basic.js: add(): Insertion cannot be made inside the Label object.","error")}}const v=function(t,e,i,n){return new x(t,e,i,n)};t.createLabel=v;class E extends d{constructor(t=-1e3,e=-1e3,i=0,s=0){super("image"),this._autoSize=1,this._space=0,this._backgroundColor="transparent",this._border=0,this._borderColor="rgba(0, 0, 0, 0.6)",this._round=0;const o=document.createElement("IMG");o.classList.add("basic_image"),o.style.left=a(t),o.style.top=a(e),this._element=o,c(this,this._element),super.width=i,super.height=s;const r=this;(i||s)&&(this.autoSize=0),o.addEventListener("load",function(){if(r.autoSize>0){const t=r.autoSize;r.width=parseInt(r.naturalWidth/t)+"px",r.height=parseInt(r.naturalHeight/t)+"px",r.autoSize=t}}),u(n)&&(this.position="relative"),M(this)}get elem(){return this._element}get element(){return this._element}get imageElement(){return this._element}get width(){return super.width}set width(t){this.autoSize=0,super.width=t}get height(){return super.height}set height(t){this.autoSize=0,super.height=t}get alt(){return this._alt}set alt(t){this._alt=t,this.imageElement.setAttribute("alt",null==t?"":String(t))}get imageFit(){return this._imageFit||""}set imageFit(t){this._imageFit=t||"",this.imageElement.style.objectFit=this._imageFit}get naturalWidth(){return this.imageElement.naturalWidth}get naturalHeight(){return this.imageElement.naturalHeight}get autoSize(){return this._autoSize}set autoSize(t){this._autoSize=t}get space(){return this._space}set space(t){t>50&&(t=50),t<0&&(t=0),this._space=t;const e=parseInt(this.width/100*t),i=parseInt(this.height/100*t);this.elem.style.paddingLeft=e+"px",this.elem.style.paddingRight=e+"px",this.elem.style.paddingTop=i+"px",this.elem.style.paddingBottom=i+"px"}onClick(t){this.clickable=1,this._addEventListener("click",t,this.elem)}remove_onClick(t){this._removeEventListener("click",t,this.elem)}onLoad(t){this._addEventListener("load",t,this.imageElement)}remove_onLoad(t){this._removeEventListener("load",t,this.imageElement)}load(t){this.imageElement.setAttribute("src",t),void 0===this._alt&&this.imageElement.setAttribute("alt",t)}add(t){l("basic.js: add(): Insertion cannot be made inside the Image object.","error")}}const T=function(t,e,i,n){return new E(t,e,i,n)};t.createImage=T,t.createIcon=T;window.BSound=class{constructor(){const t=document.createElement("AUDIO"),e=document.createElement("SOURCE");t.appendChild(e),this._element=t,document.body.appendChild(this._element),M(this)}get elem(){return this._element}get element(){return this._element}get soundElement(){return this._element}get time(){return isNaN(this.elem.duration)?0:this.elem.duration}get timeLeft(){return isNaN(this.elem.duration)?0:this.elem.duration-this.elem.currentTime}get currentTime(){return this.elem.currentTime}get paused(){return this.elem.paused}get playing(){return!this.elem.paused}get loop(){return"loop"==this.elem.getAttribute("loop")?1:0}set loop(t){1==t?this.elem.setAttribute("loop","loop"):this.elem.removeAttribute("loop")}play(){this.paused&&this.elem.play()}pause(t){this.paused||this.elem.pause()}stop(){this.paused||this.elem.pause(),this.elem.currentTime=0}onLoad(t){let e=this;this.elem.addEventListener("canplaythrough",function(){t(e)})}load(t){const e={mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",m4a:"audio/mp4",aac:"audio/aac",webm:"audio/webm"},i=String(t).split(/[?#]/)[0].split(".").pop().toLowerCase(),n=this.elem.children[0];n.setAttribute("src",t),e[i]?n.setAttribute("type",e[i]):n.removeAttribute("type"),this.elem.load()}remove(){this.elem.remove()}};const L=function(t,e){let i=0,n=t;for(;n.offsetParent;)i+=n["offset"+e],n=n.offsetParent;return i},N=function(...t){const e={};for(const i of t)i&&j(e,i);return e},I=function(t,e,i,n){const s=N(n,i,e);for(let e in s)t[e]=s[e]},k=function(t,e){const i=t.containerBox.border||0,n=h(Array.isArray(i)?i:Number(i))||h(0);if("left"==e||!e){const e=t.containerBox.width-n.left-n.right;t.left=parseInt((e-t.width)/2)}if("top"==e||!e){const e=t.containerBox.height-n.top-n.bottom;t.top=parseInt((e-t.height)/2)}},C=function(t,e,i){if("left"==i||!i){const n=e.width;t.left=parseInt((n-t.width)/2)+e.left,i&&(t.top=e.top)}if("top"==i||!i){const n=e.height;t.top=parseInt((n-t.height)/2)+e.top,i&&(t.left=e.left)}},O=function(t,e,i,n,s){if("left"==i?(isNaN(e.left)?isNaN(e.right)||(t.right=parseInt(e.right+e.width+n)):t.left=parseInt(e.left-t.width-n),isNaN(e.top)?t.bottom=parseInt(e.bottom):t.top=parseInt(e.top)):"top"==i?(isNaN(e.top)?isNaN(e.bottom)||(t.bottom=parseInt(e.bottom+e.height+n)):t.top=parseInt(e.top-t.height-n),isNaN(e.left)?t.right=parseInt(e.right):t.left=parseInt(e.left)):"right"==i?(isNaN(e.left)?isNaN(e.right)||(t.right=parseInt(e.right-t.width-n)):t.left=parseInt(e.left+e.width+n),isNaN(e.top)?t.bottom=parseInt(e.bottom):t.top=parseInt(e.top)):"bottom"==i?(isNaN(e.top)?isNaN(e.bottom)||(t.bottom=parseInt(e.bottom-t.height-n)):t.top=parseInt(e.top+e.height+n),isNaN(e.left)?t.right=parseInt(e.right):t.left=parseInt(e.left)):(isNaN(e.top)?isNaN(e.bottom)||(t.bottom=parseInt(e.bottom)):t.top=parseInt(e.top),isNaN(e.left)?isNaN(e.right)||(t.right=parseInt(e.right)):t.left=parseInt(e.left)),"left"==i||"right"==i){const i=e.height-t.height;switch(s){case"top":isNaN(e.top)&&(isNaN(e.bottom)||(t.bottom+=parseInt(i)));break;case"bottom":isNaN(e.top)?isNaN(e.bottom):t.top+=parseInt(i);break;case"center":isNaN(e.top)?isNaN(e.bottom)||(t.bottom+=parseInt(i/2)):t.top+=parseInt(i/2)}}else if("top"==i||"bottom"==i){const i=e.width-t.width;switch(s){case"left":isNaN(e.left)&&(isNaN(e.right)||(t.right=parseInt(e.right+i)));break;case"right":isNaN(e.left)?isNaN(e.right):t.left+=parseInt(i);break;case"center":isNaN(e.left)?isNaN(e.right)||(t.right+=parseInt(i/2)):t.left+=parseInt(i/2)}}},S=function(t){return parseFloat(t*(1/page.zoom))};window.withPageZoom=S;const z=function(t){"function"==typeof loop&&(i&&(i=clearInterval(i)),0==t||(i=setInterval(loop,t)))};window.setLoopTimer=z;const A=function(t){e=n||page,n=t};window.setDefaultContainerBox=A,window.restoreDefaultContainerBox=function(){n=e||page};const R=function(){return n};window.getDefaultContainerBox=R;const B=function(t,e){const i=R(),n=F;F=[],A(t);try{return e(t)}finally{F=n,A(i)}};window.createIn=B;const M=function(t){t&&t.elem&&(t.elem._basicObject=t),previousThat=that,prevThat=previousThat,that=t};window.makeBasicObject=M;const j=function(t,e,i=1,n=4){if(!(i>n))for(let s in e){if("__proto__"===s||"constructor"===s||"prototype"===s)continue;const o=e[s],r=t[s];if("object"!=typeof o||null===o||Array.isArray(o))s in t||(t[s]=o);else{if(!("Object"===Object.getPrototypeOf(o)?.constructor?.name)){s in t||(t[s]=o);continue}if(i>=n){s in t||(t[s]=o);continue}("object"!=typeof r||null===r||Array.isArray(r))&&(t[s]={}),j(t[s],o,i+1,n)}}};window.mergeIntoIfMissing=j,s.map=new Map,s.onResize=function(t,e){const i=s.map.get(t.elem)||[];i.push({obj:t,func:e}),s.map.set(t.elem,i),s.whenDetected.observe(t.elem)},s.remove_onResize=function(t,e){const i=s.map.get(t);if(!i)return;const n=e?i.filter(function(t){return t.func!=e}):[];n.length?s.map.set(t,n):(s.map.delete(t),s.whenDetected.unobserve(t))},s.whenDetected=new ResizeObserver(function(t){for(let e=0;e<t.length;e++){const i=s.map.get(t[e].target);if(!i)continue;const n=i.slice();for(let t=0;t<n.length;t++)n[t].func(n[t].obj)}});let F=[],D=null;const H=function(t){return 0==F.length&&F.push(R()),A(t),F.push(t),D&&clearTimeout(D),D=setTimeout(function(){const t=F.length-1;t>0&&l("basic.js: Some started boxes were not ended. Count: "+t,"warn")},100),t},W={color:"transparent"},X={flexDirection:"row",flexWrap:"nowrap",alignContent:"center",justifyContent:"center",alignItems:"center",gap:"0px",flexBasis:"auto",flexGrow:0,flexShrink:0},P=function(t){switch(t){case"left":case"top":case"start":return"flex-start";case"right":case"bottom":case"end":return"flex-end";case"center":return"center";default:return t}},G=function(t){return"vertical"==t?"column":"row"},U={"left top":["flex-start","flex-start"],"center top":["center","flex-start"],"right top":["flex-end","flex-start"],"left center":["flex-start","center"],"center center":["center","center"],"right center":["flex-end","center"],"left bottom":["flex-start","flex-end"],"center bottom":["center","flex-end"],"right bottom":["flex-end","flex-end"]};U.center=U["center center"];for(const t of Object.keys(U)){const e=t.split(" ");2==e.length&&(U[e[1]+" "+e[0]]=U[t])}const Y=function(t,e,i){const n=U[e]||U.center;t.alignContent="center",t.justifyContent=i?n[0]:n[1],t.alignItems=i?n[1]:n[0]},K=function(t){if("number"==typeof t&&isFinite(t))return t+"px";if(!Array.isArray(t))return t;const[e,i]=t;return 1===t.length?e+"px":2===t.length||3===t.length?i+"px "+e+"px":null},q={flow:{get:function(){return this._flow},set:function(t){this._flow=t,this.elem.style.flexDirection=G(t),this.align=this.align}},align:{get:function(){return this._align},set:function(t){this._align=t,Y(this.elem.style,t,"row"==this.elem.style.flexDirection),this._justify&&(this.elem.style.justifyContent=P(this._justify)),this._stretch&&(this.elem.style.alignItems="stretch")}},gap:{get:function(){return this._gap},set:function(t){const e=K(t);null!==e&&(this._gap=Array.isArray(t)?t:e,this.elem.style.gap=e)}},wrap:{get:function(){return this._wrap||0},set:function(t){this._wrap=t?1:0,this.elem.style.flexWrap=t?"wrap":"nowrap"}},justify:{get:function(){return this._justify||""},set:function(t){this._justify=t,this.elem.style.justifyContent=P(t)}},stretch:{get:function(){return this._stretch||0},set:function(t){if(this._stretch=t?1:0,this._stretch)return void(this.elem.style.alignItems="stretch");const e={};Y(e,this._align,"row"==this.elem.style.flexDirection),this.elem.style.alignItems=e.alignItems}}},$=function(t={},e,i,n,s){const o=[t,e,i,n,s],r=o.findIndex(t=>"object"==typeof t);let l={},a=null;-1==r?a=f(t,e,i,n):(l=o[r],a=f(...[0,0,"100%","100%"].map((t,e)=>e<r?o[e]:t))),(l.fit||l.hug)&&(l.fit=1,l.hug=1,l.width="auto",l.height="auto"),l.align&&(l.flow||(l.flow="horizontal")),l.flow&&(a._flow=l.flow,l.flexDirection=G(l.flow)),l.align&&(a._align=l.align,Y(l,l.align,"row"==l.flexDirection)),void 0!==l.wrap&&(a._wrap=l.wrap?1:0,l.flexWrap=l.wrap?"wrap":"nowrap"),l.justify&&(a._justify=l.justify,l.justifyContent=P(l.justify)),l.stretch&&(a._stretch=1,l.alignItems="stretch"),"number"==typeof l.gap&&(l.gap=K(l.gap)),that.elem.style.display="flex",a._isFlex=1,a.props(W,X,l);for(let t in X)a.elem.style[t]=a[t];return void 0!==l.grow&&(a.grow=l.grow),void 0!==l.shrink&&(a.shrink=l.shrink),l.css&&(a.css=l.css),a._propsCss=l.css,a.gap&&(a._gap=a.gap),Object.defineProperties(a,q),Array.isArray(l.gap)&&(a.gap=l.gap),H(a)};window.startFlexBox=$,window.AutoLayout=$,window.HGroup=function(...t){return $(...t)},window.VGroup=function(...t){const e=$(...t);return e.flow="vertical",e._propsCss&&(e.css=e._propsCss),e};const J=function(...t){return H(st(...t))};window.startBox=J;const V=function(){0!=F.length?(F.length>1&&F.pop(),A(F[F.length-1]),1==F.length&&(F=[])):l("basic.js: There is no started box to end. (Extra end call)","warn")};window.endBox=V,window.endFlexBox=V,window.endAutoLayout=V,window.endGroup=V;let Z=null,Q=null;const tt=[],et=function(){Z=that,Q=previousThat,tt.push({that:that,previousThat:previousThat})};window.saveCurrentThat=et;const it=function(){const t=tt.pop();t&&(Z=t.that,Q=t.previousThat),that=Z,previousThat=Q,prevThat=previousThat};window.restoreThatFromSaved=it;const nt=function(t){return function(...e){let i={};e.length&&"object"==typeof e[e.length-1]&&(i=e.pop());const n=t(...e);return n.props(i),n}};window.Label=nt(v),window.Input=nt(w),window.Icon=nt(T);const st=nt(f);window.Box=st,window.Button=nt(b),window.startObject=function(t,e){const i=N(e,t);return i.color||(i.color="transparent"),et(),J(i)},window.endObject=function(t){return V(),it(),M(t),t},window.startExtendedObject=function(t,e,i){const n=t(N(i,e));return et(),n},window.endExtendedObject=function(t){return it(),M(t),t},window.Black=function(t=1){return 0==t?"transparent":1==t?"black":`rgba(0,0,0,${t})`},window.White=function(t=1){return 0==t?"transparent":1==t?"white":`rgba(255,255,255,${t})`},window.Alpha=function(t,e=1){if(0==e)return"transparent";if(1==e)return t;const i=String(t).trim();if(!/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(i)){return"color-mix(in srgb, "+t+" "+Math.round(1e3*e)/10+"%, transparent)"}const n=i.slice(1),s=n.length<=4?n.split("").map(function(t){return t+t}).join(""):n,o=parseInt(s.slice(0,2),16),r=parseInt(s.slice(2,4),16),l=parseInt(s.slice(4,6),16),a=8===s.length?parseInt(s.slice(6,8),16)/255:1;return`rgba(${o},${r},${l},${Math.round(a*e*1e3)/1e3})`},window.waitAndRun=function(t,e,i=3){return t&&clearTimeout(t),t=setTimeout(e,i)},window.addEventListener("load",function(){t.start()})}();
@@ -0,0 +1,206 @@
1
+ Open Sans, version 1.10
2
+ Digitized data copyright (c) 2010-2011, Google Corporation.
3
+ Open Sans is a trademark of Google and may be registered in certain jurisdictions.
4
+ Licensed under the Apache License, Version 2.0. The full text is below.
5
+
6
+ Apache License
7
+ Version 2.0, January 2004
8
+ http://www.apache.org/licenses/
9
+
10
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11
+
12
+ 1. Definitions.
13
+
14
+ "License" shall mean the terms and conditions for use, reproduction,
15
+ and distribution as defined by Sections 1 through 9 of this document.
16
+
17
+ "Licensor" shall mean the copyright owner or entity authorized by
18
+ the copyright owner that is granting the License.
19
+
20
+ "Legal Entity" shall mean the union of the acting entity and all
21
+ other entities that control, are controlled by, or are under common
22
+ control with that entity. For the purposes of this definition,
23
+ "control" means (i) the power, direct or indirect, to cause the
24
+ direction or management of such entity, whether by contract or
25
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
26
+ outstanding shares, or (iii) beneficial ownership of such entity.
27
+
28
+ "You" (or "Your") shall mean an individual or Legal Entity
29
+ exercising permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications,
32
+ including but not limited to software source code, documentation
33
+ source, and configuration files.
34
+
35
+ "Object" form shall mean any form resulting from mechanical
36
+ transformation or translation of a Source form, including but
37
+ not limited to compiled object code, generated documentation,
38
+ and conversions to other media types.
39
+
40
+ "Work" shall mean the work of authorship, whether in Source or
41
+ Object form, made available under the License, as indicated by a
42
+ copyright notice that is included in or attached to the work
43
+ (an example is provided in the Appendix below).
44
+
45
+ "Derivative Works" shall mean any work, whether in Source or Object
46
+ form, that is based on (or derived from) the Work and for which the
47
+ editorial revisions, annotations, elaborations, or other modifications
48
+ represent, as a whole, an original work of authorship. For the purposes
49
+ of this License, Derivative Works shall not include works that remain
50
+ separable from, or merely link (or bind by name) to the interfaces of,
51
+ the Work and Derivative Works thereof.
52
+
53
+ "Contribution" shall mean any work of authorship, including
54
+ the original version of the Work and any modifications or additions
55
+ to that Work or Derivative Works thereof, that is intentionally
56
+ submitted to Licensor for inclusion in the Work by the copyright owner
57
+ or by an individual or Legal Entity authorized to submit on behalf of
58
+ the copyright owner. For the purposes of this definition, "submitted"
59
+ means any form of electronic, verbal, or written communication sent
60
+ to the Licensor or its representatives, including but not limited to
61
+ communication on electronic mailing lists, source code control systems,
62
+ and issue tracking systems that are managed by, or on behalf of, the
63
+ Licensor for the purpose of discussing and improving the Work, but
64
+ excluding communication that is conspicuously marked or otherwise
65
+ designated in writing by the copyright owner as "Not a Contribution."
66
+
67
+ "Contributor" shall mean Licensor and any individual or Legal Entity
68
+ on behalf of whom a Contribution has been received by Licensor and
69
+ subsequently incorporated within the Work.
70
+
71
+ 2. Grant of Copyright License. Subject to the terms and conditions of
72
+ this License, each Contributor hereby grants to You a perpetual,
73
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74
+ copyright license to reproduce, prepare Derivative Works of,
75
+ publicly display, publicly perform, sublicense, and distribute the
76
+ Work and such Derivative Works in Source or Object form.
77
+
78
+ 3. Grant of Patent License. Subject to the terms and conditions of
79
+ this License, each Contributor hereby grants to You a perpetual,
80
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81
+ (except as stated in this section) patent license to make, have made,
82
+ use, offer to sell, sell, import, and otherwise transfer the Work,
83
+ where such license applies only to those patent claims licensable
84
+ by such Contributor that are necessarily infringed by their
85
+ Contribution(s) alone or by combination of their Contribution(s)
86
+ with the Work to which such Contribution(s) was submitted. If You
87
+ institute patent litigation against any entity (including a
88
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
89
+ or a Contribution incorporated within the Work constitutes direct
90
+ or contributory patent infringement, then any patent licenses
91
+ granted to You under this License for that Work shall terminate
92
+ as of the date such litigation is filed.
93
+
94
+ 4. Redistribution. You may reproduce and distribute copies of the
95
+ Work or Derivative Works thereof in any medium, with or without
96
+ modifications, and in Source or Object form, provided that You
97
+ meet the following conditions:
98
+
99
+ (a) You must give any other recipients of the Work or
100
+ Derivative Works a copy of this License; and
101
+
102
+ (b) You must cause any modified files to carry prominent notices
103
+ stating that You changed the files; and
104
+
105
+ (c) You must retain, in the Source form of any Derivative Works
106
+ that You distribute, all copyright, patent, trademark, and
107
+ attribution notices from the Source form of the Work,
108
+ excluding those notices that do not pertain to any part of
109
+ the Derivative Works; and
110
+
111
+ (d) If the Work includes a "NOTICE" text file as part of its
112
+ distribution, then any Derivative Works that You distribute must
113
+ include a readable copy of the attribution notices contained
114
+ within such NOTICE file, excluding those notices that do not
115
+ pertain to any part of the Derivative Works, in at least one
116
+ of the following places: within a NOTICE text file distributed
117
+ as part of the Derivative Works; within the Source form or
118
+ documentation, if provided along with the Derivative Works; or,
119
+ within a display generated by the Derivative Works, if and
120
+ wherever such third-party notices normally appear. The contents
121
+ of the NOTICE file are for informational purposes only and
122
+ do not modify the License. You may add Your own attribution
123
+ notices within Derivative Works that You distribute, alongside
124
+ or as an addendum to the NOTICE text from the Work, provided
125
+ that such additional attribution notices cannot be construed
126
+ as modifying the License.
127
+
128
+ You may add Your own copyright statement to Your modifications and
129
+ may provide additional or different license terms and conditions
130
+ for use, reproduction, or distribution of Your modifications, or
131
+ for any such Derivative Works as a whole, provided Your use,
132
+ reproduction, and distribution of the Work otherwise complies with
133
+ the conditions stated in this License.
134
+
135
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
136
+ any Contribution intentionally submitted for inclusion in the Work
137
+ by You to the Licensor shall be under the terms and conditions of
138
+ this License, without any additional terms or conditions.
139
+ Notwithstanding the above, nothing herein shall supersede or modify
140
+ the terms of any separate license agreement you may have executed
141
+ with Licensor regarding such Contributions.
142
+
143
+ 6. Trademarks. This License does not grant permission to use the trade
144
+ names, trademarks, service marks, or product names of the Licensor,
145
+ except as required for reasonable and customary use in describing the
146
+ origin of the Work and reproducing the content of the NOTICE file.
147
+
148
+ 7. Disclaimer of Warranty. Unless required by applicable law or
149
+ agreed to in writing, Licensor provides the Work (and each
150
+ Contributor provides its Contributions) on an "AS IS" BASIS,
151
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
152
+ implied, including, without limitation, any warranties or conditions
153
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
154
+ PARTICULAR PURPOSE. You are solely responsible for determining the
155
+ appropriateness of using or redistributing the Work and assume any
156
+ risks associated with Your exercise of permissions under this License.
157
+
158
+ 8. Limitation of Liability. In no event and under no legal theory,
159
+ whether in tort (including negligence), contract, or otherwise,
160
+ unless required by applicable law (such as deliberate and grossly
161
+ negligent acts) or agreed to in writing, shall any Contributor be
162
+ liable to You for damages, including any direct, indirect, special,
163
+ incidental, or consequential damages of any character arising as a
164
+ result of this License or out of the use or inability to use the
165
+ Work (including but not limited to damages for loss of goodwill,
166
+ work stoppage, computer failure or malfunction, or any and all
167
+ other commercial damages or losses), even if such Contributor
168
+ has been advised of the possibility of such damages.
169
+
170
+ 9. Accepting Warranty or Additional Liability. While redistributing
171
+ the Work or Derivative Works thereof, You may choose to offer,
172
+ and charge a fee for, acceptance of support, warranty, indemnity,
173
+ or other liability obligations and/or rights consistent with this
174
+ License. However, in accepting such obligations, You may act only
175
+ on Your own behalf and on Your sole responsibility, not on behalf
176
+ of any other Contributor, and only if You agree to indemnify,
177
+ defend, and hold each Contributor harmless for any liability
178
+ incurred by, or claims asserted against, such Contributor by reason
179
+ of your accepting any such warranty or additional liability.
180
+
181
+ END OF TERMS AND CONDITIONS
182
+
183
+ APPENDIX: How to apply the Apache License to your work.
184
+
185
+ To apply the Apache License to your work, attach the following
186
+ boilerplate notice, with the fields enclosed by brackets "[]"
187
+ replaced with your own identifying information. (Don't include
188
+ the brackets!) The text should be enclosed in the appropriate
189
+ comment syntax for the file format. We also recommend that a
190
+ file or class name and description of purpose be included on the
191
+ same "printed page" as the copyright notice for easier
192
+ identification within third-party archives.
193
+
194
+ Copyright [yyyy] [name of copyright owner]
195
+
196
+ Licensed under the Apache License, Version 2.0 (the "License");
197
+ you may not use this file except in compliance with the License.
198
+ You may obtain a copy of the License at
199
+
200
+ http://www.apache.org/licenses/LICENSE-2.0
201
+
202
+ Unless required by applicable law or agreed to in writing, software
203
+ distributed under the License is distributed on an "AS IS" BASIS,
204
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
+ See the License for the specific language governing permissions and
206
+ limitations under the License.
@@ -0,0 +1,3 @@
1
+ /* Bismillah */
2
+ /*! Copyright 2020-2026 Bugra Ozden <bugra.ozden@gmail.com> (https://bug7a.github.io/) | Apache-2.0 | https://bug7a.github.io/js-components/ */
3
+ "use strict";const ScrollBar=function(o={}){let r=startBox();r.props({scrollableBox:null,bar_border:0,bar_round:3,bar_borderColor:"rgba(0, 0, 0, 1)",bar_width:4,bar_mouseOverWidth:4,bar_mouseOverColor:"#373836",bar_opacity:.4,bar_mouseOverOpacity:.9,bar_padding:2,bar_color:"#373836",bar_minLength:16,neverHide:1,showDots:1},o);let t=null,l=null,e=null,i=!1,c=[],n=0,a=0,s=0,b=0,u=!1,h=null;const f=function(){l&&(clearTimeout(l),l=null)},p=function(){f(),i||r.neverHide||(l=setTimeout(function(){if(l=null,!i){if(u)return u=!1,void p();r.boxScrollBarTop.opacity=0,r.boxScrollBarLeft.opacity=0,r.topRightDot.visible=0,r.bottomLeftDot.visible=0,r.bottomRightDot.visible=0}},2e3))},d=function(o,t){if(i)return;const l=o?r.boxScrollBarTop:r.boxScrollBarLeft;l[o?"width":"height"]=t?r.bar_mouseOverWidth:r.bar_width,l.color=t?r.bar_mouseOverColor:r.bar_color,l.opacity=t?r.bar_mouseOverOpacity:r.bar_opacity},B=function(o){const t=r.scrollableBox.elem,l=o?r.boxScrollBarTop:r.boxScrollBarLeft,e=o?t.clientHeight:t.clientWidth,i=o?t.scrollHeight:t.scrollWidth,c=o?t.scrollTop:t.scrollLeft,n=o?1==r.scrollableBox.scrollY:1==r.scrollableBox.scrollX,a=2*r.bar_width,s=e-2*a,b=i-e;if(!n||e<=0||i<=0||b<=0||s<r.bar_minLength)return l.visible=0,0;let u=s*(e/i);u<r.bar_minLength&&(u=r.bar_minLength),u>s&&(u=s);const h=a+c/b*(s-u);return o?(l.height=Math.round(u),l.top=Math.round(h)):(l.width=Math.round(u),l.left=Math.round(h)),l.visible=1,1},x=function(o){const t=r.scrollableBox.elem,l=o?t.clientHeight:t.clientWidth,e=o?t.scrollHeight:t.scrollWidth,i=o?r.boxScrollBarTop.height:r.boxScrollBarLeft.width,c=e-l,n=l-4*r.bar_width-i;return n<=0||c<=0?0:c/n};r.refreshScroll=function(){!i&&r.scrollableBox&&(!function(){const o=r.scrollableBox.containerBox;o&&r.containerBox!=o&&o.add(r);const t=r.scrollableBox.elem;r.width=t.clientWidth,r.height=t.clientHeight,r.aline(r.scrollableBox);const l=t.clientLeft,e=t.clientTop;isNaN(r.left)?isNaN(r.right)||(r.right=r.right+l):r.left=r.left+l,isNaN(r.top)?isNaN(r.bottom)||(r.bottom=r.bottom+e):r.top=r.top+e}(),r.neverHide||(r.boxScrollBarTop.opacity=r.bar_opacity,r.boxScrollBarLeft.opacity=r.bar_opacity),B(!0),B(!1),r.refreshDotButtons(),p())},r.refreshDotButtons=function(){if(i)return;const o=1==r.showDots&&1==r.boxScrollBarTop.visible,t=1==r.showDots&&1==r.boxScrollBarLeft.visible;r.topRightDot.visible=o?1:0,r.bottomLeftDot.visible=t?1:0,r.bottomRightDot.visible=o||t?1:0};const m=function(o,t){if(i||!h)return;u=!0;const l=r.scrollableBox.elem;"left"==h&&(l.scrollLeft=s+(t.clientX-n)*x(!1)),"top"==h&&(l.scrollTop=b+(t.clientY-a)*x(!0)),p()},_=function(){u=!1,h=null,t&&(t.remove(),t=null),i||(d(!0,!1),d(!1,!1),p())},g=function(o){t&&(t.remove(),t=null),n=o?o.clientX:0,a=o?o.clientY:0,s=r.scrollableBox.elem.scrollLeft,b=r.scrollableBox.elem.scrollTop,t=Box(0,0,"100%","100%",{color:"transparent",clickable:1}),page.add(t),t.position="absolute",t.left=0,t.top=0,t.elem.style.zIndex=String(2147483e3),t.on("mousemove",m),t.on("mouseup",_),t.on("mouseleave",_)};r.color="transparent",r.setMotion("opacity 0.2s"),r.boxScrollBarTop=Box({right:r.bar_padding,border:r.bar_border,borderColor:r.bar_borderColor,round:r.bar_round,width:r.bar_width,color:r.bar_color,opacity:r.bar_opacity,visible:0}),r.boxScrollBarTop.setMotion("width 0.2s, opacity 0.5s"),r.boxScrollBarLeft=Box({bottom:r.bar_padding,border:r.bar_border,borderColor:r.bar_borderColor,round:r.bar_round,height:r.bar_width,color:r.bar_color,opacity:r.bar_opacity,visible:0}),r.boxScrollBarLeft.setMotion("height 0.2s, opacity 0.5s");const v={width:r.bar_width,height:r.bar_width,color:r.bar_color,opacity:r.bar_opacity,round:r.bar_width,visible:0};if(r.topRightDot=Box({...v,right:r.bar_padding,top:2}),r.bottomRightDot=Box({...v,right:r.bar_padding,bottom:2}),r.bottomLeftDot=Box({...v,left:2,bottom:r.bar_padding}),endBox(),r.position="absolute",!r.scrollableBox)return println("ScrollBar: scrollableBox is required. ScrollBar({ scrollableBox: myBox })","error"),r.refreshScroll=function(){},r.refreshDotButtons=function(){},r.destroy=function(){r.remove()},makeBasicObject(r),r;r.refreshScroll(),r.scrollableBox.onResize(r.refreshScroll),page.onResize(r.refreshScroll),c.push(r.scrollableBox.on("scroll",r.refreshScroll)),c.push(r.scrollableBox.on("wheel",r.refreshScroll)),r.boxScrollBarTop.clickable=1,r.boxScrollBarLeft.clickable=1,r.boxScrollBarTop.on("mouseover",function(){d(!0,!0),f()}),r.boxScrollBarTop.on("mouseout",function(){"top"!=h&&d(!0,!1),p()}),r.boxScrollBarTop.on("mousedown",function(o,r){r&&r.preventDefault&&r.preventDefault(),h="top",d(!0,!0),g(r)}),r.boxScrollBarLeft.on("mouseover",function(){d(!1,!0),f()}),r.boxScrollBarLeft.on("mouseout",function(){"left"!=h&&d(!1,!1),p()}),r.boxScrollBarLeft.on("mousedown",function(o,r){r&&r.preventDefault&&r.preventDefault(),h="left",d(!1,!0),g(r)}),c.push(r.scrollableBox.on("mouseover",function(){r.boxScrollBarTop.opacity=r.bar_opacity,r.boxScrollBarLeft.opacity=r.bar_opacity,r.refreshDotButtons(),p()})),c.push(r.scrollableBox.on("mouseleave",function(){t||(h=null),p()}));const S=r.scrollableBox.elem;let y=S.scrollHeight,L=S.scrollWidth;e=new MutationObserver(function(o){S.scrollHeight==y&&S.scrollWidth==L||(y=S.scrollHeight,L=S.scrollWidth,r.refreshScroll())}),e.observe(S,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["style","class"]});const w=r.remove.bind(r);return r.remove=function(){if(!i){i=!0,f(),_(),e&&(e.disconnect(),e=null);for(let o=0;o<c.length;o++)c[o]();c=[],r.scrollableBox.remove_onResize(r.refreshScroll),page.remove_onResize(r.refreshScroll),w()}},r.destroy=function(){r.remove()},makeBasicObject(r),r};