@agung_dhewe/webapps 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +28 -0
- package/README.md +2 -0
- package/jsconfig.json +10 -0
- package/libs/fgta5js-dist/fgta5js-v1.8.3.min.css +2 -0
- package/libs/fgta5js-dist/fgta5js-v1.8.3.min.js +11 -0
- package/libs/fgta5js-dist/fgta5js-v1.8.3.min.js.map +1 -0
- package/libs/fgta5js-dist/fonts/karla-italic-latin-ext.woff2 +0 -0
- package/libs/fgta5js-dist/fonts/karla-italic-latin.woff2 +0 -0
- package/libs/fgta5js-dist/fonts/karla-normal-latin-ext.woff2 +0 -0
- package/libs/fgta5js-dist/fonts/karla-normal-latin.woff2 +0 -0
- package/libs/fgta5js-dist/fonts/karla.css +142 -0
- package/libs/webmodule/module-edit.css +163 -0
- package/libs/webmodule/module-footer.css +22 -0
- package/libs/webmodule/module-list.css +25 -0
- package/libs/webmodule/module.css +52 -0
- package/libs/webmodule/module.js +195 -0
- package/libs/webmodule/pagehelper.mjs +45 -0
- package/modules/generator/appgen-components.mjs +142 -0
- package/modules/generator/appgen-icons.mjs +6 -0
- package/modules/generator/appgen-io.mjs +784 -0
- package/modules/generator/appgen-ui-search.mjs +173 -0
- package/modules/generator/appgen-ui-unique.mjs +153 -0
- package/modules/generator/appgen-ui.mjs +1181 -0
- package/modules/generator/generator-context.mjs +18 -0
- package/modules/generator/generator-designtemplate.html +1508 -0
- package/modules/generator/generator-ext.html +0 -0
- package/modules/generator/generator-ext.mjs +3 -0
- package/modules/generator/generator.css +642 -0
- package/modules/generator/generator.mjs +195 -0
- package/modules/generator/generator.png +0 -0
- package/modules/generator/generatorEdit.html +185 -0
- package/modules/generator/generatorEdit.mjs +238 -0
- package/modules/generator/generatorList.html +32 -0
- package/modules/generator/generatorList.mjs +243 -0
- package/modules/login/login.css +11 -0
- package/modules/login/login.html +12 -0
- package/modules/login/login.mjs +111 -0
- package/package.json +46 -0
- package/percobaan/simmpan-ke-minio.js +24 -0
- package/src/api.js +80 -0
- package/src/apis/generator.api.js +226 -0
- package/src/apis/login.api.js +109 -0
- package/src/bucket.js +24 -0
- package/src/context.js +26 -0
- package/src/datalog.sql +22 -0
- package/src/datarecords.js +0 -0
- package/src/db.js +61 -0
- package/src/generator/createApiExtenderModule.js +54 -0
- package/src/generator/createApiModule.js +218 -0
- package/src/generator/createIcon.js +62 -0
- package/src/generator/createInfoAboutExtender.js +42 -0
- package/src/generator/createInfoLogs.js +41 -0
- package/src/generator/createInfoRecordExtender.js +41 -0
- package/src/generator/createModuleContext.js +48 -0
- package/src/generator/createModuleDetilEditHtml.js +110 -0
- package/src/generator/createModuleDetilEditMjs.js +172 -0
- package/src/generator/createModuleDetilListHtml.js +146 -0
- package/src/generator/createModuleDetilListMjs.js +73 -0
- package/src/generator/createModuleEjs.js +51 -0
- package/src/generator/createModuleExtenderHtml.js +43 -0
- package/src/generator/createModuleExtenderMjs.js +43 -0
- package/src/generator/createModuleHeaderEditHtml.js +148 -0
- package/src/generator/createModuleHeaderEditMjs.js +197 -0
- package/src/generator/createModuleHeaderListHtml.js +144 -0
- package/src/generator/createModuleHeaderListMjs.js +67 -0
- package/src/generator/createModuleMjs.js +67 -0
- package/src/generator/createModuleRollup.js +42 -0
- package/src/generator/createProgramData.js +96 -0
- package/src/generator/createTable.js +156 -0
- package/src/generator/ddl.js +475 -0
- package/src/generator/helper.js +149 -0
- package/src/generator/templates/__rollup-module.ejs +90 -0
- package/src/generator/templates/api-extender-module.js.ejs +0 -0
- package/src/generator/templates/api-module.js.ejs +818 -0
- package/src/generator/templates/module-context.ejs +16 -0
- package/src/generator/templates/module-ext-about.ejs +1 -0
- package/src/generator/templates/module-ext-record.ejs +1 -0
- package/src/generator/templates/module-ext.html.ejs +3 -0
- package/src/generator/templates/module-ext.mjs.ejs +21 -0
- package/src/generator/templates/module-logs.ejs +14 -0
- package/src/generator/templates/module.ejs.ejs +48 -0
- package/src/generator/templates/module.mjs.ejs +256 -0
- package/src/generator/templates/moduleDetilEdit.html.ejs +34 -0
- package/src/generator/templates/moduleDetilEdit.mjs.ejs +792 -0
- package/src/generator/templates/moduleDetilList.html.ejs +26 -0
- package/src/generator/templates/moduleDetilList.mjs.ejs +319 -0
- package/src/generator/templates/moduleHeaderEdit.html.ejs +53 -0
- package/src/generator/templates/moduleHeaderEdit.mjs.ejs +807 -0
- package/src/generator/templates/moduleHeaderList.html.ejs +24 -0
- package/src/generator/templates/moduleHeaderList.mjs.ejs +308 -0
- package/src/generator/templates/sqlAddField.ejs +3 -0
- package/src/generator/templates/sqlAddForeignKey.ejs +12 -0
- package/src/generator/templates/sqlAddUniqueIndex.ejs +4 -0
- package/src/generator/templates/sqlCreateTable.ejs +9 -0
- package/src/generator/templates/sqlDropForeignKey.ejs +3 -0
- package/src/generator/templates/sqlDropUniqueIndex.ejs +4 -0
- package/src/generator/templates/sqlModifyField.ejs +6 -0
- package/src/generator/trygenerate.js +83 -0
- package/src/generator/worker.js +389 -0
- package/src/helper.js +82 -0
- package/src/logger.js +39 -0
- package/src/router.js +84 -0
- package/src/routers/defaultLoginApi.js +29 -0
- package/src/routers/defaultLoginAsset.js +18 -0
- package/src/routers/defaultLoginPage.js +36 -0
- package/src/routers/defaultRootIndex.js +16 -0
- package/src/routers/downloadHandler.js +51 -0
- package/src/routers/fileUploadApi.js +15 -0
- package/src/routers/generatorApi.js +30 -0
- package/src/routers/generatorAsset.js +18 -0
- package/src/routers/generatorPage.js +37 -0
- package/src/routers/handleError.js +43 -0
- package/src/routers/handleModuleNotfound.js +12 -0
- package/src/routers/moduleApi.js +34 -0
- package/src/routers/modulePage.js +102 -0
- package/src/sequencerdoc.js +311 -0
- package/src/sequencerline.js +214 -0
- package/src/session.js +57 -0
- package/src/startup.js +59 -0
- package/src/webapps.js +239 -0
- package/src/workermanager.js +83 -0
- package/templates/_lib_debug.ejs +11 -0
- package/templates/_lib_production.ejs +5 -0
- package/templates/application.page.ejs +143 -0
- package/templates/generator.page.ejs +131 -0
- package/templates/index.page.ejs +24 -0
- package/templates/login.page.ejs +102 -0
- package/templates/moduleError.ejs +16 -0
- package/templates/moduleNotfound.ejs +14 -0
- package/webapps.code-workspace +11 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Agung Nugroho
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
package/jsconfig.json
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
:root{--fgta5-color-editmode-bg:var(--color-editmode-bg,#ffcf76);--fgta5-color-editmode-line:var(--color-editmode-line,#3c59ff);--fgta5-color-inputerror-bg:var(--color-inputerror-bg,#ffb8b8);--fgta5-color-inputerror-line:var(--color-inputerror-line,red);--fgta5-color-inputerror-text:var(--color-inputerror-text,darkred);--fgta5-color-input-line:var(--color-input-line,#ccc);--fgta5-color-input-disabled:var(--color-input-disabled,#c8c8c8);--fgta5-color-input-descr-text:var(--color-input-descr-text,#616161);--fgta5-color-checkbox-checked:var(--color-checkbox-checked,#000);--fgta5-color-checkbox-checked-disabled:var(--color-checkbox-disabled,#888);--fgta5-color-checkbox-disabled:var(--color-checkbox-disabled,#c8c8c8);--fgta5-color-checkbox-disabled-text:var(--color-checkbox-disabled,#888);--fgta-cbo-head-bgcolor:#1e1e1e;--fgta-cbo-head-color:#fff;--fgta-cbo-head-height:40px;--fgta-cbo-thead-height:26px;--fgta-cbo-thead-bgcolor:#61614f;--fgta-cbo-thead-color:#fff;--fgta5-app-header-height:2.5rem;--fgta5-app-buttonmenu-color:#a5a5a5}.hidden{display:none!important}.fgta5-messagebox-dialog{border:none;box-shadow:0 8px 32px rgba(0,0,0,.3);min-height:100px;min-width:270px;padding:0;user-select:none}.fgta5-messagebox-dialog::backdrop{background-color:rgba(0,0,0,.6)}.fgta5-messagebox-title{font-size:1.2rem;font-weight:700;padding:1rem 1rem 0;text-align:center}.fgta5-messagebox-content{padding:1rem;text-align:center;user-select:text}.fgta5-messagebox-buttonsbar{column-gap:7px;display:flex;justify-content:center;padding:0 1rem .5rem}.fgta5-messagebox-icon{display:inline-block;height:32px;text-align:center;transform:translateY(12px);width:100%}.fgta5-messagebox-button{min-width:80px;padding:5px 3px}.fgta5-modal-message{border:none;box-shadow:0 8px 32px rgba(0,0,0,.3);min-width:270px;user-select:none;z-index:1000}.fgta5-modal-message::backdrop{background-color:rgba(0,0,0,.6)}.fgta5-modal-button{min-width:80px;padding:5px 3px}.fgta5-modal-progressbar-container{background-color:#ccc;margin:0 auto;max-width:500px;padding:0}.fgta5-modal-progressbar-text{font-size:.8rem;padding:5px 0 0;user-select:text}.fgta5-modal-progressbar-text[error=true]{color:red}.fgta5-modal-progressbar{background-color:#2929ff;color:#fff;display:inline-block;font-size:.8rem;padding:3px 0;text-align:center;transition:width .5s ease}.fgta5-modal-progressbar[error=true]{background-color:red}.fgta5-modal-loadermask-msg{column-gap:10px;display:flex}.fgta5-modal-loadermask-msg-icon{display:inline-block;height:32px;width:32px}.fgta5-modal-loadermask-msg-text{display:inline-block;margin-bottom:auto;margin-top:auto}.fgta5-entry-container{border:none;display:flex;flex-direction:column;flex-grow:1;padding:0}.fgta5-entry-container[fgta5-component=Datepicker]{width:8rem}.fgta5-entry-container[fgta5-component=Timepicker]{width:5rem}.fgta5-entry-container[fgta5-component=Combobox]{width:15rem}.fgta5-entry-label[disabled]{opacity:.5}.fgta5-entry-label[required]:after{color:red;content:"*";margin-left:2px;opacity:1!important}.fgta5-entry-input-wrapper{border:none;border-bottom:1px solid var(--fgta5-color-input-line);display:flex;padding:0;position:relative}.fgta5-entry-input-wrapper[editmode=true]:focus-within{border-bottom:1px solid var(--fgta5-color-editmode-line)}.fgta5-entry-input-wrapper[editmode=false]:focus-within{border-bottom:1px solid var(--fgta5-color-input-line)}.fgta5-entry-input-wrapper[editmode=true][disabled]:focus-within{border-bottom:1px solid var(--fgta5-color-input-line)}.fgta5-entry-input[character-case=uppercase]{text-transform:uppercase}.fgta5-entry-input[character-case=lowercase]{text-transform:lowercase}.fgta5-entry-display,.fgta5-entry-input{border:none;border-bottom:1px solid transparent;border-left:2px solid transparent;flex-grow:1;margin:0;outline:none;padding:5px 5px 3px;transition:border-color .3s ease,background-color .3s linear;width:calc(100% - 10px)}.fgta5-entry-display::placeholder,.fgta5-entry-input::placeholder{font-style:italic;text-transform:lowercase}.fgta5-entry-display[disabled],.fgta5-entry-input[disabled]{background-color:var(--fgta5-color-input-disabled)!important}.fgta5-entry-display[editmode=true]:not([disabled]),.fgta5-entry-input[editmode=true]:not([disabled]){background-color:var(--fgta5-color-editmode-bg)!important}.fgta5-entry-display[editmode=true][invalid]:not([disabled]),.fgta5-entry-input[editmode=true][invalid]:not([disabled]){background-color:var(--fgta5-color-inputerror-bg)!important}.fgta5-entry-display[editmode=true]:not([disabled]):focus,.fgta5-entry-input[editmode=true]:not([disabled]):focus{border-bottom:1px solid var(--fgta5-color-editmode-line)}.fgta5-entry-display[editmode=false]:not([disabled]):focus,.fgta5-entry-input[editmode=false]:not([disabled]):focus{border-bottom:1px solid var(--fgta5-color-input-line)}.fgta5-entry-display[changed=true],.fgta5-entry-input[changed=true]{border-left:2px solid var(--fgta5-color-editmode-line)}.fgta5-entry-display[type=number]::-webkit-inner-spin-button,.fgta5-entry-display[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.fgta5-entry-display[fgta5-component=Numberbox]{text-align:right}.fgta5-entry-display[fgta5-component=Combobox],.fgta5-entry-display[fgta5-component=Datepicker],.fgta5-entry-display[fgta5-component=Timepicker]{padding-right:1.875rem}.fgta5-entry-download-link{font-size:.8rem;padding-bottom:3px;padding-left:7px;padding-top:3px}.fgta5-entry-lastvalue{display:none}.fgta5-entry-error{color:var(--fgta5-color-inputerror-text);font-size:.8rem;margin-bottom:4px;margin-top:4px}.fgta5-entry-description{color:var(--fgta5-color-input-descr-text);font-size:.7rem;margin-top:3px}.fgta5-entry-button-combobox,.fgta5-entry-button-datepicker,.fgta5-entry-button-filebox{background-color:transparent;border:0;cursor:pointer;height:100%;margin-bottom:0;margin-top:0;outline:0;padding:0;position:absolute;right:0;width:1.875rem}.fgta5-entry-button-combobox[editmode=false],.fgta5-entry-button-filebox[editmode=false]{cursor:default}.fgta5-entry-button-combobox[editmode=true],.fgta5-entry-button-filebox[editmode=true]{cursor:pointer}.fgta5-entry-button-combobox:disabled,.fgta5-entry-button-filebox:disabled{display:none}.fgta5-entry-button-datepicker>svg,.fgta5-entry-button-filebox>svg{height:.75rem;margin-bottom:3px;pointer-events:none;width:.75rem}.fgta5-entry-input-filebox{cursor:pointer;width:1.875rem}.fgta5-entry-input-datepicker,.fgta5-entry-input-filebox{border:0;height:100%;margin:0;opacity:0;outline:0;padding:0;position:absolute;right:0;top:0}.fgta5-entry-input-datepicker{left:-6.125rem;width:8rem}.fgta5-entry-input-datepicker[picker=filebox],.fgta5-entry-input-datepicker[picker=time]{left:-3.125rem;max-width:5rem;min-width:5rem;width:5rem}.fgta5-entry-input-datepicker::-webkit-calendar-picker-indicator{cursor:pointer;height:100%;margin:0;opacity:0;padding:0;position:absolute;right:0;width:100%}.fgta5-entry-input-wrapper:focus-within>.fgta5-entry-display-datepicker[editmode=true]:not([disabled]),.fgta5-entry-input-wrapper:focus-within>.fgta5-entry-display-filebox[editmode=true]:not([disabled]){border-bottom:1px solid var(--fgta5-color-editmode-line)}.fgta5-entry-input-wrapper:focus-within>.fgta5-entry-display-datepicker[editmode=false],.fgta5-entry-input-wrapper:focus-within>.fgta5-entry-display-filebox[editmode=false]{border-bottom:1px solid var(--fgta5-color-input-line)}.fgta5-entry-input-wrapper:focus-within:has(button:active)>.fgta5-entry-display[editmode=true],.fgta5-entry-input-wrapper:focus-within:has(button:active)>.fgta5-entry-filebox[editmode=true],.fgta5-entry-input-wrapper:focus-within:has(button:focus)>.fgta5-entry-display[editmode=true],.fgta5-entry-input-wrapper:focus-within:has(button:focus)>.fgta5-entry-filebox[editmode=true]{border-bottom:1px solid var(--fgta5-color-editmode-line)}.fgta5-combobox-dialog,.fgta5-dialogbox{border:0;bottom:0;height:100vh;left:0;max-height:100vh;max-width:100vw;opacity:0;outline:none;padding:0;position:fixed;right:0;top:0;transform:scale(.5);transition:opacity .5s ease,transform .3s ease;user-select:none;width:calc(100vw + 38px)}.fgta5-combobox-dialog[showed=true],.fgta5-dialogbox[showed=true]{opacity:1;transform:scale(1)}.fgta5-combobox-dialog[removing],.fgta5-dialogbox[removing]{opacity:0;transform:translateX(-100vw)}.fgta5-combobox-dialog::backdrop,.fgta5-dialogbox::backdrop{background-color:#000;opacity:0;padding:5px;transition:opacity .5s ease-out}.fgta5-combobox-dialog[showed=true]::backdrop,.fgta5-dialogbox[showed=true]::backdrop{opacity:.6}.fgta5-dialogbox[removing]::backdrop
|
|
2
|
+
.fgta5-combobox-dialog[removing]::backdrop{opacity:0}.fgta5-combobox-dialog-head{align-items:center;background:var(--fgta-cbo-head-bgcolor);color:var(--fgta-cbo-head-color);display:flex;height:var(--fgta-cbo-head-height);padding:0 5px 0 10px;position:sticky;top:0;transition:box-shadow .3s ease-in-out}.fgta5-combobox-dialog-head>button{background-color:transparent;border:none;cursor:pointer;filter:invert(100%);height:24px;margin-left:auto;outline:none;padding:0;width:24px}.fgta5-combobox-dialog-head.scrolled{box-shadow:0 4px 10px rgba(0,0,0,.3)}.fgta5-combobox-dialog table{border-spacing:0;margin:0;width:100%}.fgta5-combobox-dialog thead{background-color:var(--fgta-cbo-thead-bgcolor);color:var(--fgta-cbo-thead-color);height:var(--fgta-cbo-thead-height);position:sticky;top:calc(var(--fgta-cbo-head-height))}.fgta5-combobox-dialog thead>tr>td{border-bottom:1px solid red}.fgta5-combobox-dialog tfoot{background-color:#fff;border-top:1px solid #000;bottom:0;height:30px;position:sticky}.fgta5-combobox-dialog tbody tr td{cursor:pointer;display:block;padding:10px 0}.fgta5-combobox-dialog tbody tr:first-child td{margin-top:10px}.fgta5-combobox-dialog tbody tr td:first-child{padding-left:10px}.fgta5-combobox-dialog tbody td:hover{background-color:#faebd7}.fgta5-combobox-dialog-filter{column-gap:10px;display:flex;margin:10px}.fgta5-combobox-dialog-filter input::placeholder{font-style:italic;text-transform:lowercase}.fgta5-combobox-dialog-nextbutton{margin:10px 10px 50px}.fgta-combobox-option-row td{border-bottom:1px dotted #ccc}.fgta-combobox-option-row[selected] td{cursor:default;font-weight:700}.fgta-combobox-option-row[value=""] td{color:#606060;font-style:italic}.fgta5-checkbox{cursor:pointer;display:grid;font-size:.9rem;gap:.4rem;grid-template-columns:.9rem auto;line-height:1.1;line-height:1.1rem}.fgta5-checkbox[permanent-disabled=true]{color:var(--fgta5-color-checkbox-disabled-text)}.fgta5-checkbox-input{-webkit-appearance:none;appearance:none;background-color:#fff;border:1px solid var(--fgta5-color-input-line);color:currentColor;cursor:pointer;display:grid;font:inherit;height:.93rem;margin:0;place-content:center;width:.93rem}.fgta5-checkbox-input[changed=true]{border-left:2px solid var(--fgta5-color-editmode-line)}.fgta5-checkbox-input:focus{border:1px solid var(--fgta5-color-editmode-line);outline:1px solid var(--fgta5-color-editmode-line);outline-offset:0}.fgta5-checkbox-input:before{box-shadow:inset .56rem .56rem var(--fgta5-color-checkbox-checked);content:"";height:.56rem;transform:scale(0);transition:transform .12s ease-in-out;width:.56rem}.fgta5-checkbox-input:checked:before{transform:scale(1)}.fgta5-checkbox-input[permanent-disabled=true]{background-color:var(--fgta5-color-checkbox-disabled)}.fgta5-checkbox-input[permanent-disabled=true]:checked:before{box-shadow:inset 9px 9px var(--fgta5-color-checkbox-checked-disabled)}.fgta5-checkbox-input[editmode=true]:not([permanent-disabled]),.fgta5-checkbox-input[editmode=true][permanent-disabled=false]{background-color:var(--fgta5-color-editmode-bg)}.fgta5-gridview{table-layout:auto;width:100%}.fgta5-gridview tbody tr[data-disabled]{backdrop-filter:brightness(.9);filter:contrast(.8) opacity(.7);font-style:italic}.fgta5-gridview tbody tr:hover{background-color:#161c68!important;color:#fff}.fgta5-gridview tbody tr[data-currentrow]{background-color:#dd7734;color:#fff}.fgta5-gridview tbody td{border-bottom:1px dotted #ccc}.fgta5-gridview [data-selected] td{background-color:rgba(187,187,255,.411)}.fgta5-gridview th{background-color:#ccc;height:2rem;line-height:1rem}.fgta5-gridview td[text-align=left],.fgta5-gridview th[text-align=left]{text-align:left}.fgta5-gridview td[text-align=center],.fgta5-gridview th[text-align=center]{text-align:center}.fgta5-gridview td[text-align=right],.fgta5-gridview th[text-align=right]{text-align:right}.fgta5-gridview th div{align-items:flex-start;display:flex;height:1rem}.fgta5-gridview th div svg{transform:translateY(2px)}.fgta5-gridview td[rowselector],.fgta5-gridview th[rowselector]{width:.93rem}.fgta5-gridview td[autonumber],.fgta5-gridview th[autonumber]{text-align:right}.fgta5-gridview td[data-nextoffset]{padding-bottom:15px;padding-top:10px}.fgta5-gridview-cell,.fgta5-gridview-head{padding:5px}.fgta5-gridview thead{position:sticky;top:0}.fgta5-gridview thead th{font-size:.8rem}.fgta5-gridview thead tr:last-child th{border-bottom:1px solid #ccc;padding-bottom:5px;padding-top:5px}.fgta5-gridview tbody tr td:first-child,.fgta5-gridview tfoot tr td:first-child,.fgta5-gridview thead tr th:first-child{padding-left:10px}.fgta5-gridview tbody tr td:last-child,.fgta5-gridview tfoot tr td:last-child,.fgta5-gridview thead tr th:last-child{padding-right:10px}.fgta5-gridview-colwithbutton{height:auto;min-height:1px}.fgta5-gridview-colwithbutton [container]{align-items:stretch;column-gap:2px;display:flex;height:1rem}.fgta5-gridview-colwithbutton [container][text-align=center]{justify-content:center}.fgta5-gridview-colwithbutton [container][text-align=right]{justify-content:right}.fgta5-gridview-colwithbutton button{background-color:transparent;border:0;cursor:pointer;height:1rem;margin:0;min-width:1rem;outline:none;padding:0;width:1rem}.fgta5-gridview-checkbox{cursor:pointer;display:grid;font-size:.9rem;grid-template-columns:.9rem auto;line-height:1.1;line-height:1.1rem}.fgta5-gridview-checkbox input[type=checkbox]{-webkit-appearance:none;appearance:none;background-color:#fff;border:1px solid var(--fgta5-color-input-line);color:currentColor;cursor:pointer;display:grid;font:inherit;height:.93rem;margin:0;place-content:center;width:.93rem}.fgta5-gridview-checkbox input[type=checkbox]:before{box-shadow:inset .56rem .56rem var(--fgta5-color-checkbox-checked);content:"";height:.56rem;transform:scale(0);transition:transform .12s ease-in-out;width:.56rem}.fgta5-gridview-checkbox input[type=checkbox]:checked:before{transform:scale(1)}.fgta5-app-head{align-items:center;background-color:#000;color:#fff;display:flex;font-size:1.2rem;font-weight:700;height:var(--fgta5-app-header-height);justify-content:space-between;left:0;padding:0 .5rem;position:fixed;right:0;top:0}@media screen and (max-width:500px){.fgta5-app-main{margin:calc(var(--fgta5-app-header-height) + 20px) 10px 2rem 10px}}@media screen and (min-width:501px){.fgta5-app-main{margin:calc(var(--fgta5-app-header-height) + 1rem) 1rem 2rem 1rem}}.fgta5-app-footer{align-items:center;background-color:#fff;border-top:1px solid #eee;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0}@media screen and (max-width:500px){.fgta5-app-footer{font-size:.7rem;height:5rem}.fgta5-app-main[data-withfooter]{margin-bottom:5.5rem}}@media screen and (min-width:500px){.fgta5-app-footer{height:2.5rem}.fgta5-app-main[data-withfooter]{margin-bottom:3.5rem}}.fgta5-button-head{color:#fff;display:block;height:1.2rem;min-height:1.2rem;min-width:1.2rem;opacity:1;padding:5px;text-decoration:none;transition:transform .3s ease,opacity .5s ease;width:1.2rem}.fgta5-button-head:hover{transform:scale(1.2)}.fgta5-button-menu{color:var(--fgta5-app-buttonmenu-color);display:block;height:2rem;padding:5px;text-decoration:none;width:2rem}.fgta5-appmanager-nav{background-color:#fff;box-shadow:-10px 0 20px rgba(0,0,0,.5);display:flex;height:100vh;justify-content:stretch;opacity:0;position:fixed;right:0;top:0;transform:translateX(100%);transition:opacity .5s ease,transform .3s ease;width:100vw}.fgta5-appmanager-nav[showed]{opacity:1;transform:translateX(0)}.fgta5-appmanager-nav div[header]{align-items:center;background-color:#aaa;color:#fff;display:flex;font-size:1.2rem;font-weight:700;height:var(--fgta5-app-header-height);justify-content:space-between;left:0;padding:0 .5rem;position:fixed;right:0;top:0;transition:box-shadow .3s ease-in-out}.fgta5-fixheader-scrolled{box-shadow:0 4px 10px rgba(0,0,0,.2)}.fgta5-appmanager-nav div[main]{overflow-y:scroll;padding:calc(var(--fgta5-app-header-height) + 1rem) 0 3rem 0;width:100%}.fgta5-appmanager-nav div[main]>div{padding:0 1rem}@media screen and (max-width:501px){.fgta5-favourite-trashcontainer{display:none}}@media screen and (min-width:501px){.fgta5-favourite{border:3px solid transparent;padding:5px}.fgta5-favourite[data-dragover]{background-color:#5d7bff53;border:3px dashed #5d7bff;min-height:50px}.fgta5-favourite-trashcontainer{color:default;display:flex;justify-content:center;position:absolute;top:calc(var(--fgta5-app-header-height) + 10px);width:100%}.fgta5-favourite-trashcontainer>div{align-items:center;background-color:rgba(255,0,0,.294);border:3px dashed red;border-radius:10px;color:red;display:flex;gap:3px;height:3rem;justify-content:center;opacity:.4;width:10rem}.fgta5-favourite-trashcontainer>div [data-icon]{height:1.2rem;width:1.2rem}.fgta5-favourite-trashcontainer>div[data-dragover]{opacity:1}}.fgta5-iframe{border:none;height:100vh;left:0;margin:0;outline:none;padding:0;position:fixed;top:0;width:100vw}.fgta5-appmanager-home-subtitle{font-weight:700;margin-bottom:1rem;margin-top:2rem;text-decoration:underline;text-decoration-color:#ccc;text-decoration-thickness:1px;text-underline-offset:4px}.fgta5-menu{position:relative;transition:opacity .3s ease-in-out,transform .3s ease-in-out}@media screen and (max-width:500px){.fgta5-menu{align-items:center;display:grid;gap:10px;grid-template-columns:repeat(4,1fr);justify-items:center}}@media screen and (min-width:501px){.fgta5-menu{column-gap:1rem;display:grid;grid-template-columns:repeat(auto-fill,minmax(4rem,1fr));row-gap:1rem}}@keyframes fadeOutLeft{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-100px)}}@keyframes fadeOutRight{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(100px)}}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-100px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeInRight{0%{opacity:0;transform:translateX(100px)}to{opacity:1;transform:translateX(0)}}.fgta5-menu [data-iconcontainer]{align-items:center;display:flex;flex-direction:column;height:4rem;justify-content:space-between;margin:0;padding:0;row-gap:.25rem;width:4rem}.fgta5-menu [data-iconcontainer][disabled] [data-iconimage]{cursor:default;filter:grayscale(1) opacity(.3);pointer-events:none}.fgta5-menu [data-iconcontainer][disabled] [data-icontext]{opacity:.3}.fgta5-menu [data-iconimage]{background-repeat:no-repeat;background-size:cover;cursor:pointer;height:2.5rem;margin:0;padding:0;transform:scale(.8);transition:transform .3s ease-in-out;width:2.5rem}@keyframes iconClicked{0%{opacity:1;transform:scale(1.3)}to{opacity:0;transform:scale(2)}}.fgta5-menu [data-iconimage]:hover{transform:scale(1.3)}.fgta5-menu [data-icontext]{font-size:.6rem;height:1.25rem;text-align:center}.fgta5-icongroup [data-iconimage]{border:1px solid #b8b8b8;border-radius:7px}.fgta5-menu-footer{align-items:center;background-color:#fff;border-top:1px solid #eee;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0}@media screen and (max-width:500px){.fgta5-menu-footer{font-size:.7rem;height:5rem}.fgta5-appmanager-nav div[main]{padding-bottom:5.5rem}}@media screen and (min-width:500px){.fgta5-menu-footer{height:2.5rem}.fgta5-appmanager-nav div[main]{padding-bottom:3rem}}.fgta5-menu-footer>a{align-items:center;color:#000;column-gap:.5rem;display:flex;height:1rem;line-height:1rem;padding:5px;text-decoration:none}.fgta5-menu-footer>a div[icon]{height:1rem;width:1rem}.fgta5-menu-toppanel{display:grid;margin-bottom:2rem;position:relative}.fgta5-menu-toppanel [data-gridarea=left]{display:flex;gap:.5rem;grid-area:left}.fgta5-menu-toppanel [data-gridarea=center]{align-items:end;display:flex;grid-area:center;justify-content:center;padding:5px}.fgta5-menu-toppanel [data-gridarea=right]{display:flex;gap:.5rem;grid-area:right;justify-content:right}.fgta5-menu-search{border-bottom:1px solid #a3a3a3;display:flex;margin-bottom:1px;position:relative}.fgta5-menu-search:focus-within{border-bottom:2px solid #5c5c5c;margin-bottom:0}.fgta5-menu-search :focus{border:none!important;margin-bottom:0!important}.fgta5-menu-search input{height:1.5rem;padding-right:1.8rem}.fgta5-menu-search button,.fgta5-menu-search input{background-color:transparent;border:none;margin-bottom:0;outline:none}.fgta5-menu-search button{color:var(--fgta5-app-buttonmenu-color);position:absolute;right:0;top:.2rem;width:2rem}@media screen and (max-width:500px){.fgta5-menu-toppanel{grid-template-areas:"left right" "center center";grid-template-columns:50% 50%;row-gap:20px}.fgta5-menu-search{flex-grow:1}.fgta5-menu-search button{top:0}}@media screen and (min-width:501px){.fgta5-menu-toppanel{grid-template-areas:"left center right";grid-template-columns:25% 50% 25%}}@keyframes dropped{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes removing{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}@media screen and (max-width:500px){.fgta5-openedmodule{display:flex;flex-direction:column;gap:1rem}.fgta5-openedmodule-shortcut{max-width:100%;width:100%}}@media screen and (min-width:501px){.fgta5-openedmodule{display:grid;gap:1rem;grid-template-columns:repeat(auto-fill,minmax(300px,300px))}}.fgta5-openedmodule-shortcut{background-color:#fff;border:1px solid #ddd;border-radius:7px;column-gap:.8rem;display:grid;font-size:.8rem;grid-template-areas:"icon title buttonclose" "icon info buttonclose";grid-template-columns:1.5rem auto 1.5rem;grid-template-rows:auto auto;max-width:300px;padding:.5rem}.fgta5-openedmodule-shortcut:hover{box-shadow:3px 3px 5px rgba(0,0,0,.5);cursor:pointer;transform:translateX(-3px) translateY(-3px)}.fgta5-openedmodule-shortcut [data-icon]{background-repeat:no-repeat;background-size:contain;grid-area:icon}.fgta5-openedmodule-shortcut [data-title]{font-weight:700;grid-area:title}.fgta5-openedmodule-shortcut [data-info]{font-style:italic;grid-area:info}.fgta5-openedmodule-shortcut [data-buttonclose]{display:flex;grid-area:buttonclose;justify-content:end}.fgta5-button-shorcutclose{color:#999;height:.7rem;transition:transform .3s ease-in-out;width:.7rem}.fgta5-button-shorcutclose:hover{color:red;transform:scale(2)}@media screen and (max-width:500px){.fgta5-button-shorcutclose{color:red}}.fgta5-roundbox{background-color:#ff0;border:2px solid blue;border-radius:1rem;color:blue;display:inline-block;height:1rem;padding:2px;text-align:center;width:1rem}.fgta5-carousellcontainer{display:flex;position:relative}.fgta5-app-section{padding-bottom:5.5rem;position:relative;width:100%}.fgta5-app-section div[data-topbar]{align-items:center;display:flex;gap:10px;margin-bottom:2rem}.fgta5-app-section div[data-backbutton]{width:15px}.fgta5-app-section div[data-title]{font-size:1.3rem;font-weight:700;height:1.3rem;line-height:1.3rem}.fgta5-app-section a[data-backbutton]{color:#6a6a6a;height:1.2rem;overflow:hidden;transition:transform .3s ease;width:1.2rem}.fgta5-app-section a[data-backbutton]:hover{transform:scale(2)}.fgta5-app-section-icondiv{border:0p;height:40px;width:40px}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*! fgta5js 1.8.3
|
|
2
|
+
* https://github.com/fgta5/fgta5js
|
|
3
|
+
* A simple component for FGTA5 framework
|
|
4
|
+
*
|
|
5
|
+
* Agung Nugroho DW
|
|
6
|
+
* https://github.com/agungdhewe
|
|
7
|
+
*
|
|
8
|
+
* build at 2025-10-10
|
|
9
|
+
*/
|
|
10
|
+
let e=0;class t{Id;Element;static get ACTION_SHOWMENU(){return"showmenu"}static get ACTION_SHOWHOME(){return"showhome"}static get ACTION_APPLICATIONLOADED(){return"applicationloaded"}constructor(e){null==e&&console.error("id component belum didefinisikan");const t=document.getElementById(e);null==t&&console.error("element dengan id: '$id' tidak ditemukan di halaman"),this.Id=e,this.Element=t}static createSvgButton(e,t,n){return function(e,t,n){const i=document.createElement("a");i.innerHTML=e,""!=t&&null!=t&&i.classList.add(t);i.setAttribute("tabindex","-1"),i.setAttribute("href","javascript:void(0)"),"function"==typeof n&&i.addEventListener("click",e=>{n(e)});return i}(e,t,n)}static generateId(){return"comp-"+ ++e}static sleep(e){return new Promise(t=>setTimeout(t,e))}static isMobileDevice(){return/Mobi|Android|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent)}static isInContainer(){return window.self!==window.top}}class n extends t{constructor(e){super(e),function(e){const t=document.createElement("div"),n=document.createElement("input");n.setAttribute("type","hidden"),n.classList.add("fgta5-entry-lastvalue"),t.classList.add("fgta5-entry-container"),e.InitialValue="",e.Element.getInputCaption=()=>e.Id,e.Listener=new EventTarget,e.Nodes={Input:e.Element,Container:t,LastValue:n}}(this),this._readValidators()}get type(){return this.constructor.name}get value(){return this.Element.value}set value(e){this.Element.value=e}get disabled(){return this.Element.disabled}set disabled(e){this.Element.disabled=e}get placeholder(){return this.Element.getAttribute("placeholder")}set placeholder(e){this.Element.setAttribute("placeholder",e)}#e;get Form(){return this.#e}bindForm(e){this.#e=e}#t=!0;get InEditMode(){return this.#t}setEditingMode(e){this.#t=e}#n={};get InvalidMessages(){return this.#n}_readValidators(){let e=this.Element;var t="invalid-message";Array.from(e.attributes).forEach(e=>{if(e.name.startsWith(t)){var n=e.name===t?"default":e.name.replace(`${t}-`,"");this.#n[n]=e.value}}),s(this)}newData(e){!function(e,t){e.value=t,e.acceptChanges()}(this,e)}acceptChanges(){var e;(e=this)._setLastValue(e.Nodes.Input.value),e.Nodes.Input.removeAttribute("changed"),e.setError(null)}reset(){var e;(e=this).Nodes.Input.value=e.Nodes.LastValue.value,e.acceptChanges()}isChanged(){return(e=this).Nodes.LastValue.value!=e.Nodes.Input.value&&(console.log(`Input '${e.Id}' is changed from '${e.Nodes.LastValue.value}' to '${e.Nodes.Input.value}'`),!0);var e}#i;_setLastError(e){this.#i=e}getLastError(){return this.#i}setError(e){!function(e,t){var n=e.Nodes.Container.querySelector(".fgta5-entry-error");null!==t&&""!==t?(e.Nodes.Input.setAttribute("invalid","true"),n||((n=document.createElement("div")).classList.add("fgta5-entry-error"),e.Nodes.Container.insertBefore(n,e.Nodes.InputWrapper.nextSibling)),n.innerHTML=t,e._setLastError(t)):(e.Nodes.Input.removeAttribute("invalid"),n&&n.remove(),e._setLastError(null))}(this,e)}_setLastValue(e){!function(e,t){e.Nodes.LastValue.value=t}(this,e)}#r;getLastValue(){return this.Nodes.LastValue.value}getBindingData(){var e=this.Element.getAttribute("binding");return null===e?null:e}validate(){return function(e){const t="required";if(null!=e.Validators[t]){if(null!=(n=i(e,t)))return e.setError(n.message),!1}for(const r in e.Validators){var n;if(r!=t)if(null!=(n=i(e,r)))return e.setError(n.message),!1}return e.setError(null),!0}(this)}#s={};get Validators(){return this.#s}addValidator(e,t,n){this.#s[e]={param:t,message:n}}removeValidator(e){void 0!==this.#s[e]&&delete this.#s[e]}clearValidators(){this.#s={}}readValidators(){s(this)}_setupDescription(){var e=this.Element.getAttribute("description");if(null!==e&&""!==e.trim()){e=e.trim();const t=document.createElement("div");t.classList.add("fgta5-entry-description"),t.innerHTML=e,this.Nodes.Container.appendChild(t)}}#a=!1;isRequired(){return this.#a}markAsRequired(e){this.#a=e,function(e,t){var n="required",i=e.Nodes.Label;null!=i&&null!=i&&(t?(e.Nodes.Label.setAttribute(n,""),e.Nodes.Input.setAttribute(n,""),e.addValidator(n,null,e.InvalidMessages[n])):(e.Nodes.Label.removeAttribute(n),e.Nodes.Input.removeAttribute(n),e.removeValidator(n)))}(this,e)}addEventListener(e,t){this.Listener.addEventListener(e,t)}#o={};get Handlers(){return this.#o}handle(e,t){this.#o[e]=t}getErrorValidation(e){return i(this,e)}}function i(e,t){const n=e.Validators[t],i=$validators[t],r=n.param,s=n.message,a=e.Nodes.Input;try{if("function"!=typeof i){var o=new Error(`Validator function '${t}' is not defined or not a function`);throw console.error(o),o}if(!i(a.value,r)){var l=e.InvalidMessages.default;throw null!=s?new Error(s):null!=l?new Error(l):new Error(`Invalid value '${a.value}' for '${a.getInputCaption()}' using validator '${t}(${r??""})'`)}return null}catch(o){return o}}function r(e){e.setHours(0),e.setMinutes(0),e.setSeconds(0)}function s(e){const t=e.Nodes.Input.getAttribute("fgta5-component");var n="";n="minlength";var i=e.Nodes.Input.getAttribute(n);null!=i&&(i=parseInt(i),isNaN(i)||e.addValidator(n,i,e.InvalidMessages[n])),n="maxlength";var s=e.Nodes.Input.getAttribute(n);null!=s&&(s=parseInt(s),isNaN(s)||e.addValidator(n,s,e.InvalidMessages[n])),n="pattern";var a=e.Nodes.Input.getAttribute(n);null!=a&&""!==a.trim()&&e.addValidator("pattern",a,e.InvalidMessages[n]),n="min";var o=e.Nodes.Input.getAttribute(n);if(null!=o){var l=e.InvalidMessages[n];if("Datepicker"==t){var d=new Date(o);r(d),e.addValidator("mindate",d,l)}else if("Timepicker"==t){var u=o;e.addValidator("mintime",u,l)}else o=parseInt(o),isNaN(o)||e.addValidator(n,o,l)}n="max";var c=e.Nodes.Input.getAttribute(n);if(null!=c){l=e.InvalidMessages[n];if("Datepicker"==t){var m=new Date(c);r(m),e.addValidator("maxdate",m,l)}else if("Timepicker"==t){var p=c;e.addValidator("maxtime",p,l)}else c=parseInt(c),isNaN(c)||e.addValidator(n,c,l)}var h=e.Nodes.Input.getAttribute("validator");if(null!=h&&""!==h.trim()){h=h.split(",");for(var v=0;v<h.length;v++){var g=h[v].trim(),{fnName:f,fnParams:b}=$fgta5.Validators.parseFunctionParam(g);e.addValidator(f,b,e.InvalidMessages[f])}}}class a extends n{constructor(e){super(e),function(e,t){const n=e.Nodes.Container,i=e.Nodes.LastValue,r=e.Nodes.Input,s=document.createElement("div"),a=document.querySelector(`label[for="${t}"]`);r.parentNode.insertBefore(n,r),s.appendChild(r),n.appendChild(s),n.appendChild(i),e.Nodes.InputWrapper=s,e.Nodes.Label=a,n.setAttribute("fgta5-component","Textbox"),n.setAttribute("input-id",t),""!=r.style.width&&(n.style.width=r.style.width);""!=r.style.marginTop&&(n.style.marginTop=r.style.marginTop,r.style.marginTop="");""!=r.style.marginBottom&&(n.style.marginBottom=r.style.marginBottom,r.style.marginBottom="");""!=r.style.marginLeft&&(n.style.marginLeft=r.style.marginLeft,r.style.marginLeft="");""!=r.style.marginRight&&(n.style.marginRight=r.style.marginRight,r.style.marginRight="");s.classList.add("fgta5-entry-input-wrapper"),r.classList.add("fgta5-entry-input"),r.getInputCaption=()=>null!=a?a.innerHTML:r.getAttribute("placeholder");const o=Array.from(r.classList).filter(e=>!e.startsWith("fgta5-"));for(var l of o)r.classList.remove(l),n.classList.add(l);const d=r.getAttribute("data-tabindex");null!=d&&r.setAttribute("tabindex",d);null!=a&&a.classList.add("fgta5-entry-label");e._setLastValue(e.value),e._setupDescription(),""!==r.style.backgroundColor&&(s.style.backgroundColor=r.style.backgroundColor,r.style.backgroundColor="transparent");var u=r.getAttribute("character-case");null!==u&&""!==u.trim()&&(r.charCase=u.trim().toLowerCase());var c=r.getAttribute("required");null!=c&&e.markAsRequired(!0);r.addEventListener("input",t=>{e.Listener.dispatchEvent(new CustomEvent("input",{})),null!=e.Form&&(e.getLastValue()!=e.value?r.setAttribute("changed","true"):r.removeAttribute("changed"))}),r.addEventListener("blur",t=>{!function(e){e.InEditMode&&(e.setError(null),e.validate())}(e),e.Listener.dispatchEvent(new CustomEvent("blur",{}))}),r.addEventListener("keydown",t=>{const n=(i={cancelable:!0,key:t.key,code:t.code,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,srcElement:t.srcElement,target:t.target},new KeyboardEvent("keydown",i));var i;e.Listener.dispatchEvent(n),n.defaultPrevented&&t.preventDefault()})}(this,e)}get value(){return t=(e=this).Nodes.Input,o(e,t.value);var e,t}set value(e){!function(e,t){null==t&&(t="");e.Element.value=o(e,t)}(this,e)}#t=!0;get InEditMode(){return this.#t}setEditingMode(e){this.#t=e,function(e,t){var n=t?"true":"false";e.Nodes.Input.setAttribute("editmode",n),e.Nodes.InputWrapper.setAttribute("editmode",n),t?e.Nodes.Input.removeAttribute("readonly"):(e.Nodes.Input.setAttribute("readonly","true"),e.setError(null))}(this,e)}newData(e){super.newData(e)}getLastValue(){return t=(e=this).Nodes.LastValue.value,o(e,t);var e,t}isChanged(){return t=(e=this).getLastValue(),(n=e.value)!=t&&(console.log(`Textbox '${e.Id}' is changed from '${t}' to '${n}'`),!0);var e,t,n}focus(){this.Nodes.Input.focus()}}function o(e,t){var n=t,i=e.Nodes.Input;return"uppercase"===i.charCase?n=t.toUpperCase():"lowercase"===i.charCase&&(n=t.toLowerCase()),n}const l=e=>new CustomEvent("change",e);class d extends n{constructor(e){super(e),this.formatterFixed=new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2,useGrouping:!0}),function(e,t){const n=e.Nodes.Container,i=e.Nodes.LastValue,r=e.Nodes.Input,s=document.createElement("div"),a=document.createElement("input"),o=document.querySelector(`label[for="${t}"]`);r.parentNode.insertBefore(n,r),s.appendChild(a),s.appendChild(r),n.appendChild(s),n.appendChild(i),e.Nodes.InputWrapper=s,e.Nodes.Label=o,e.Nodes.Display=a,n.setAttribute("fgta5-component","Numberbox"),s.classList.add("fgta5-entry-input-wrapper");const{precision:d,step:m}=function(e){null!==e&&""!==e.trim()?(e=parseInt(e.trim()),(isNaN(e)||e<0)&&(e=0)):e=0;var t=Math.pow(10,-e);return{precision:e,step:t}}(e.Element.getAttribute("precision"));e.formatterFixed.minimumFractionDigits=d,e.formatterFixed.maximumFractionDigits=d,r.classList.add("fgta5-entry-input"),r.maxlength=r.getAttribute("maxlength"),r.precision=d,r.setAttribute("type","hidden"),r.setAttribute("step",m),r.getInputCaption=()=>o.innerHTML,a.id=e.Id+"-display",a.min=r.min,a.max=r.max,a.maxlength=r.maxlength,a.required=r.required,a.value=e.formatterFixed.format(r.value),a.classList.add("fgta5-entry-display"),a.setAttribute("precision",d),a.setAttribute("step",m),a.setAttribute("style",r.getAttribute("style")||""),a.setAttribute("type","text"),a.setAttribute("fgta5-component","Numberbox"),a.setAttribute("autocomplete","off");const p=r.getAttribute("data-tabindex");null!=p&&a.setAttribute("tabindex",p);null!=r.getAttribute("disabled")&&u(e,!0);const h=r.getAttribute("digitgrouping");null!=h&&("false"===h.toLowerCase()?e.formatterFixed.useGrouping=!1:e.formatterFixed.useGrouping=!0);o.setAttribute("for",a.id),o.classList.add("fgta5-entry-label");var v=r.getAttribute("required");null!=v&&e.markAsRequired(!0);null!==r.value&&""!==r.value||(r.value=0);e._setLastValue(r.value),e._setupDescription(),a.addEventListener("focus",t=>{!function(e){var t=e.Nodes.Display,n=e.Nodes.Input;if(e.InEditMode){t.setAttribute("type","number");var i=Number(n.value);t.value=i}}(e)}),a.addEventListener("blur",t=>{!function(e){var t=e.Nodes.Display,n=e.Nodes.Input;if(e.InEditMode){var i=Number(t.value);if(isNaN(i))e.Listener.dispatchEvent(l({detail:{invalid:!0}})),e.setError("Invalid number");else{e.setError(null),n.value=i;var r=!e.validate(),s=c(e,i);t.setAttribute("type","text"),t.value=s,e.Listener.dispatchEvent(l({detail:{invalid:r,value:i,formatted:s}}))}}}(e)}),a.addEventListener("input",e=>{a.value!==i.value?a.setAttribute("changed","true"):a.removeAttribute("changed")}),a.addEventListener("keydown",e=>{"number"!==a.type||"ArrowUp"!==e.key&&"ArrowDown"!==e.key||e.preventDefault()});var g=a.maxlength;null!==g&&""!==g.trim()&&(g=parseInt(g.trim()),!isNaN(g)&&g>0&&a.addEventListener("beforeinput",e=>{e.target.value.length>=g&&"deleteContentBackward"!==e.inputType&&"deleteContentForward"!==e.inputType&&e.preventDefault()}))}(this,e)}get value(){return Number(this.Nodes.Input.value)}set value(e){!function(e,t){e.Nodes.Input.value=t,isNaN(t)&&(t=Number(t));var n=c(e,t);"text"===e.Nodes.Display.type?e.Nodes.Display.value=n:e.Nodes.Display.value=t;!function(e){var t=e.Nodes.Input,n=e.Nodes.Display;e.value!=e.getLastValue()?(t.setAttribute("changed","true"),n.setAttribute("changed","true")):(t.removeAttribute("changed"),n.removeAttribute("changed"))}(e)}(this,e)}get disabled(){return this.Element.disabled}set disabled(e){this.Element.disabled=e,u(this,e)}#t=!0;get InEditMode(){return this.#t}setEditingMode(e){this.#t=e,function(e,t){var n=t?"true":"false";e.Nodes.Display.setAttribute("editmode",n),e.Nodes.Input.setAttribute("editmode",n),e.Nodes.InputWrapper.setAttribute("editmode",n),t?(e.Nodes.Input.removeAttribute("readonly"),e.Nodes.Display.removeAttribute("readonly")):(e.Nodes.Input.setAttribute("readonly","true"),e.Nodes.Display.setAttribute("readonly","true"),e.setError(null))}(this,e)}newData(e){null==e&&(e=0),super.newData(e)}acceptChanges(){super.acceptChanges(),this.Nodes.Display.removeAttribute("changed")}reset(){var e;super.reset(),(e=this).value=e.getLastValue()}setError(e){super.setError(e),function(e,t){var n=e.Nodes.Display;null!==t&&""!==t?n.setAttribute("invalid","true"):n.removeAttribute("invalid")}(this,e)}getLastValue(){return Number(this.Nodes.LastValue.value)}focus(){this.Nodes.Display.focus()}}function u(e,t){e.Nodes.Display.disabled=!!t}function c(e,t){return new Intl.NumberFormat("en-US",{minimumFractionDigits:e.formatterFixed.minimumFractionDigits,maximumFractionDigits:e.formatterFixed.minimumFractionDigits,useGrouping:e.formatterFixed.useGrouping}).format(t)}class m extends n{constructor(e){super(e),function(e,t){const n=e.Nodes.Container,i=e.Nodes.LastValue,r=e.Nodes.Input,s=document.querySelector(`label[for="${t}"]`),a=document.createElement("label");r.parentNode.insertBefore(n,r),a.appendChild(r),a.appendChild(document.createTextNode(s.innerHTML)),n.appendChild(a),n.appendChild(i),e.Nodes.Label=s,n.setAttribute("fgta5-component","Checkbox"),r.classList.add("fgta5-checkbox-input");const o=r.getAttribute("data-tabindex");null!=o&&r.setAttribute("tabindex",o);a.classList.add("fgta5-checkbox");var l=document.createElement("div");l.innerHTML=" ",l.style.display="inline-block",l.setAttribute("label",""),s.parentNode.replaceChild(l,s),e._setLastValue(e.Element.checked);null!=r.getAttribute("disabled")&&p(e,!0);r.addEventListener("change",t=>{!function(e){var t=e.Nodes.Input;t.value=t.checked?1:0,e.getLastValue()!=e.value?t.setAttribute("changed","true"):t.removeAttribute("changed");t.checked?e.Listener.dispatchEvent(new CustomEvent("checked",{})):e.Listener.dispatchEvent((e=>new CustomEvent("unchecked",e))({}))}(e)})}(this,e)}get value(){return this.Element.checked}set value(e){!function(e,t){var n=e.Nodes.Input,i=h(t);n.checked=i,n.value=i?1:0;!function(e){var t=e.Nodes.Input;e.value!=e.getLastValue()?t.setAttribute("changed","true"):t.removeAttribute("changed")}(e)}(this,e)}get disabled(){return function(e){var t=e.Nodes.Input.getAttribute("permanent-disabled");if(null===t)return!1;if("true"===t)return!0;return!1}(this)}set disabled(e){this.Element.disabled=e,p(this,e)}#t=!0;get InEditMode(){return this.#t}setEditingMode(e){this.#t=e,function(e,t){var n=e.Nodes.Input,i=t?"true":"false",r=n.getAttribute("permanent-disabled"),s=null!=r&&""!=r&&"false"!=r;n.setAttribute("editmode",i),t?s?n.setAttribute("disabled","true"):n.removeAttribute("disabled"):n.setAttribute("disabled","true")}(this,e)}newData(e){super.newData(e),function(e,t){var n=h(t);e.value=n,e._setLastValue(n)}(this,e)}getLastValue(){return h(this.Nodes.LastValue.value)}isChanged(){return t=(e=this).getLastValue(),e.value!=t;var e,t}reset(){var e,t;t=(e=this).getLastValue(),e.value=t,e._setLastValue(t)}_setLastValue(e){!function(e,t){var n=1;"off"!==t&&"0"!==t&&0!==t&&!1!==t||(n=0);e.Nodes.LastValue.value=n}(this,e)}}function p(e,t){var n=e.Nodes.Input,i=n.getAttribute("editmode"),r=null!=i&&""!=i&&"false"!=i;t?(n.setAttribute("permanent-disabled","true"),n.parentNode.setAttribute("permanent-disabled","true")):(n.removeAttribute("permanent-disabled"),n.parentNode.removeAttribute("permanent-disabled"),r||(n.disabled=!0))}function h(e){return 0!==e&&"0"!==e&&!1!==e&&void 0!==e}const v='<svg transform="translate(0 3)" width="12" height="12" stroke="currentColor" stroke-linecap="round" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n\t\t<rect x="1.3095" y="6.6682" width="21.393" height="1.8579" fill="none" stroke-width="2"/>\n\t\t<rect x=".81949" y="10" width="22.341" height="13.251" fill="none" stroke-width="1.02"/>\n\t\t<rect x="3.8664" y="1.1531" width="2.5776" height="1.4923" fill="none" stroke-width="2"/>\n\t\t<rect x="17.223" y="1.1203" width="2.5776" height="1.6958" fill="none" stroke-width="2"/>\n\t\t<path d="m1.2888 16.278 21.367-0.13566" fill="none" stroke-width="1.02"/>\n\t\t<path d="m8.2775 10.07-0.13566 12.888" fill="none" stroke-width="1.02"/>\n\t\t<path d="m15.799 9.9671-0.13566 12.888" fill="none" stroke-width="1.02"/>\n\t\t</svg>';class g extends n{constructor(e){super(e),function(e,t){const n=e.Nodes.Container,i=e.Nodes.LastValue,r=e.Nodes.Input,s=document.createElement("div"),a=document.createElement("input"),o=document.createElement("button"),l=document.querySelector(`label[for="${t}"]`);r.parentNode.insertBefore(n,r),s.appendChild(a),s.appendChild(o),o.appendChild(r),n.appendChild(s),n.appendChild(i),e.Nodes.InputWrapper=s,e.Nodes.Label=l,e.Nodes.Display=a,e.Nodes.Button=o,n.setAttribute("fgta5-component","Datepicker"),""!=r.style.width&&(n.style.width=r.style.width);""!=r.style.marginTop&&(n.style.marginTop=r.style.marginTop,r.style.marginTop="");""!=r.style.marginBottom&&(n.style.marginBottom=r.style.marginBottom,r.style.marginBottom="");""!=r.style.marginLeft&&(n.style.marginLeft=r.style.marginLeft,r.style.marginLeft="");""!=r.style.marginRight&&(n.style.marginRight=r.style.marginRight,r.style.marginRight="");s.classList.add("fgta5-entry-input-wrapper"),a.setAttribute("id",`${t}-display`),a.setAttribute("type","text"),a.setAttribute("fgta5-component","Datepicker"),a.setAttribute("readonly","true"),a.classList.add("fgta5-entry-display"),a.classList.add("fgta5-entry-display-datepicker");var d=r.getAttribute("placeholder");null!=d&&""!=d&&a.setAttribute("placeholder",d);const u=r.getAttribute("data-tabindex");null!=u&&a.setAttribute("tabindex",u);const c=Array.from(r.classList).filter(e=>!e.startsWith("fgta5-"));for(var m of(r.setAttribute("type","date"),r.removeAttribute("class"),r.removeAttribute("style"),r.classList.add("fgta5-entry-input"),r.classList.add("fgta5-entry-input-datepicker"),r.getInputCaption=()=>null!=l?l.innerHTML:r.getAttribute("placeholder"),c))r.classList.remove(m),a.classList.remove(m),n.classList.add(m);o.id=e.Id+"-button",o.insertAdjacentHTML("beforeend",v),o.classList.add("fgta5-entry-button-datepicker"),null!=l&&(l.setAttribute("for",o.id),l.classList.add("fgta5-entry-label"));null!=r.getAttribute("disabled")&&f(e,!0);const p=r.getAttribute("required");null!=p&&e.markAsRequired(!0);null!=r.value&&""!=r.value&&(e.value=r.value,e._setLastValue(r.value),e.acceptChanges());e._setupDescription(),r.addEventListener("change",t=>{!function(e){var t=e.Nodes.Input;w(e,t.value);try{e.Listener.dispatchEvent((n={sender:e,detail:{value:t.value,sender:e}},new CustomEvent("change",n)))}catch(e){console.error(e.message)}var n;b(e),e.InEditMode&&(e.setError(null),e.validate())}(e)})}(this,e)}get value(){return""==(n=this).Nodes.Input.value?null:("string"==typeof(e=n.Nodes.Input.value)?t=new Date(e):e instanceof Date&&(t=e),t.toISOString().split("T")[0]);var e,t,n}set value(e){!function(e,t){try{if(null!=t)if(t instanceof Date){const n=t.toISOString().slice(0,10);e.Nodes.Input.value=n}else{const n=t.slice(0,10);e.Nodes.Input.value=n}else e.Nodes.Input.value=null;w(e,t),b(e)}catch(e){throw e}}(this,e)}get min(){return""!=this.Element.min?new Date(this.Element.min):null}set min(e){e instanceof Date?this.Element.min=e.toISOString().split("T")[0]:"string"==typeof e&&(this.Element.min=e)}get max(){return""!=this.Element.max?new Date(this.Element.max):null}set max(e){e instanceof Date?this.Element.max=e.toISOString().split("T")[0]:"string"==typeof e&&(this.Element.max=e)}get disabled(){return this.Element.disabled}set disabled(e){this.Element.disabled=e,f(this,e)}#t=!0;get InEditMode(){return this.#t}setEditingMode(e){this.#t=e,function(e,t){var n=t?"true":"false",i=e.Nodes.Input,r=e.Nodes.Display,s=e.Nodes.InputWrapper;r.setAttribute("editmode",n),i.setAttribute("editmode",n),s.setAttribute("editmode",n),t?i.removeAttribute("readonly"):(i.setAttribute("readonly","true"),e.setError(null))}(this,e)}newData(e){null==e&&(e=""),function(e,t){e.value=t,e.acceptChanges()}(this,e)}acceptChanges(){super.acceptChanges(),this.Nodes.Display.removeAttribute("changed")}reset(){var e,t;super.reset(),t=(e=this).getLastValue(),e.value=null==t?"":t}setError(e){super.setError(e),function(e,t){var n=e.Nodes.Display;null!==t&&""!==t?n.setAttribute("invalid","true"):n.removeAttribute("invalid")}(this,e)}getLastValue(){return""==(e=this.Nodes.LastValue.value)?null:e;var e}focus(){this.Nodes.Display.focus()}}function f(e,t){var n=e.Nodes.Display,i=e.Nodes.InputWrapper,r=e.Nodes.Button;t?(n.disabled=!0,i.setAttribute("disabled","true"),r.setAttribute("disabled","true")):(n.disabled=!1,i.removeAttribute("disabled"),r.removeAttribute("disabled"))}function b(e){if(null!=e.Form){var t=e.Nodes.Display;e.value!=e.getLastValue()?t.setAttribute("changed","true"):t.removeAttribute("changed")}}function w(e,t){var n=e.Nodes.Display;if(""==t)n.value="";else{const e={day:"2-digit",month:"short",year:"numeric"},i=new Date(t).toLocaleDateString("en-ID",e).replace(".","");n.value=i}}const y=/^([01]\d|2[0-3]):([0-5]\d)$/,E='<?xml version="1.0" encoding="UTF-8"?>\n<svg transform="translate(0 3)" width="12" height="12" stroke="currentColor" stroke-linecap="round" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n<path d="m12.339 12.142 0.01403-6.5322" fill="none" stroke-width="2"/>\n<path d="m8.4232 14.469 3.7103-1.9861" fill="none" stroke-width="2.4"/>\n<ellipse cx="12.004" cy="11.983" rx="10.102" ry="9.9964" fill="none" stroke-width="2.4"/>\n</svg>\n\n';class L extends n{constructor(e){super(e),function(e,t){const n=e.Nodes.Container,i=e.Nodes.LastValue,r=e.Nodes.Input,s=document.createElement("div"),a=document.createElement("input"),o=document.createElement("button"),l=document.querySelector(`label[for="${t}"]`);r.parentNode.insertBefore(n,r),s.appendChild(a),s.appendChild(o),o.appendChild(r),n.appendChild(s),n.appendChild(i),e.Nodes.InputWrapper=s,e.Nodes.Label=l,e.Nodes.Display=a,e.Nodes.Button=o,n.setAttribute("fgta5-component","Timepicker"),s.classList.add("fgta5-entry-input-wrapper"),a.setAttribute("id",`${t}-display`),a.setAttribute("type","text"),a.setAttribute("picker","time"),a.setAttribute("fgta5-component","Timepicker"),a.setAttribute("readonly","true"),a.classList.add("fgta5-entry-display"),a.classList.add("fgta5-entry-display-datepicker");var d=r.getAttribute("placeholder");null!=d&&""!=d&&a.setAttribute("placeholder",d);var u=r.getAttribute("class");null!=u&&""!=u&&a.setAttribute("class",u);var c=r.getAttribute("style");null!=c&&""!=c&&a.setAttribute("style",c);const m=r.getAttribute("data-tabindex");null!=m&&a.setAttribute("tabindex",m);r.setAttribute("type","time"),r.setAttribute("picker","time"),r.removeAttribute("class"),r.removeAttribute("style"),r.classList.add("fgta5-entry-input"),r.classList.add("fgta5-entry-input-datepicker"),r.getInputCaption=()=>l.innerHTML,o.id=e.Id+"-button",o.insertAdjacentHTML("beforeend",E),o.classList.add("fgta5-entry-button-datepicker"),l.setAttribute("for",o.id),l.classList.add("fgta5-entry-label");var p=r.getAttribute("required");null!=p&&e.markAsRequired(!0);null!=r.value&&""!=r.value||(r.value="00:00");e.value=r.value,e._setLastValue(r.value),e.acceptChanges(),e._setupDescription(),r.addEventListener("change",t=>{!function(e){var t=e.Nodes.Input;N(e,t.value),A(e),e.InEditMode&&(e.setError(null),e.validate())}(e)})}(this,e)}get min(){return this.Element.min}set min(e){this.Element.min=e}get max(){return this.Element.max}set max(e){this.Element.max=e}get value(){return""==(e=this.Nodes.Input).value?null:e.value;var e}set value(e){!function(e,t){if(!y.test(t))throw new Error(`invalid HH:ss format for '${t}'`);e.Nodes.Input.value=t,N(e,t),A(e)}(this,e)}get disabled(){return this.Element.disabled}set disabled(e){this.Element.disabled=e,function(e,t){var n=e.Nodes.Display,i=e.Nodes.InputWrapper,r=e.Nodes.Button;t?(n.disabled=!0,i.setAttribute("disabled","true"),r.setAttribute("disabled","true")):(n.disabled=!1,i.removeAttribute("disabled"),r.removeAttribute("disabled"))}(this,e)}#t=!0;get InEditMode(){return this.#t}setEditingMode(e){this.#t=e,function(e,t){var n=t?"true":"false",i=e.Nodes.Input,r=e.Nodes.Display,s=e.Nodes.InputWrapper;r.setAttribute("editmode",n),i.setAttribute("editmode",n),s.setAttribute("editmode",n),t?i.removeAttribute("readonly"):(i.setAttribute("readonly","true"),e.setError(null))}(this,e)}newData(e){""!=e&&null!=e||(e="00:00"),super.newData(e)}acceptChanges(){super.acceptChanges(),this.Nodes.Display.removeAttribute("changed")}reset(){var e,t;super.reset(),t=(e=this).getLastValue(),e.value=null==t?"":t}setError(e){super.setError(e),function(e,t){var n=e.Nodes.Display;null!==t&&""!==t?n.setAttribute("invalid","true"):n.removeAttribute("invalid")}(this,e)}getLastValue(){return""==(e=this.Nodes.LastValue.value)?null:e;var e}focus(){this.Nodes.Display.focus()}}function A(e){var t=e.Nodes.Display;e.value!=e.getLastValue()?t.setAttribute("changed","true"):t.removeAttribute("changed")}function N(e,t){e.Nodes.Display.value=t}const C=e=>new CustomEvent("selecting",e),x='<?xml version="1.0" encoding="UTF-8"?>\n<svg transform="translate(0 3)" width="12" height="12" stroke-linecap="round" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n<path transform="matrix(.8169 0 0 -.64538 10.987 14.119)" d="m11.299 11.275h-10.157l-10.157-1e-6 10.157-17.593 5.0786 8.7965z"/>\n</svg>\n',I='<?xml version="1.0" encoding="UTF-8"?>\n<svg transform="translate(0 3)" width="12" height="12" stroke="currentColor" stroke-linecap="round" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n<path d="m3.5642 20.295 16.853-16.833" fill="none" stroke-width="4"/>\n<path d="m3.5741 3.4523 16.833 16.853" fill="none" stroke-width="4"/>\n</svg>',k="editmode",T="showed",D="removing",M="selected",S="data-index";class B extends n{constructor(e){super(e),function(e,t){const n=e.Nodes.Container,i=e.Nodes.LastValue,r=e.Nodes.Input,s=document.createElement("div"),a=document.createElement("input"),o=document.createElement("button"),l=document.querySelector(`label[for="${t}"]`),d=r.parentNode.querySelector(`datalist[for="${t}"]`),u=document.createElement("dialog"),c=document.createElement("input");r.parentNode.insertBefore(n,r),s.appendChild(r),s.appendChild(a),s.appendChild(o),n.appendChild(s),n.appendChild(i),n.appendChild(c),n.appendChild(u),e.Nodes.InputWrapper=s,e.Nodes.Label=l,e.Nodes.Display=a,e.Nodes.Button=o,e.Nodes.Dialog=u,e.Nodes.LastText=c,n.setAttribute("fgta5-component","Combobox"),""!=r.style.width&&(n.style.width=r.style.width);""!=r.style.marginTop&&(n.style.marginTop=r.style.marginTop,r.style.marginTop="");""!=r.style.marginBottom&&(n.style.marginBottom=r.style.marginBottom,r.style.marginBottom="");""!=r.style.marginLeft&&(n.style.marginLeft=r.style.marginLeft,r.style.marginLeft="");""!=r.style.marginRight&&(n.style.marginRight=r.style.marginRight,r.style.marginRight="");s.classList.add("fgta5-entry-input-wrapper"),r.classList.add("fgta5-entry-input"),r.setAttribute("type","hidden"),r.getInputCaption=()=>null!=l?l.innerHTML:r.getAttribute("placeholder");const m=Array.from(r.classList).filter(e=>!e.startsWith("fgta5-"));for(var p of m)r.classList.remove(p),n.classList.add(p);a.id=e.Id+"-display",a.classList.add("fgta5-entry-display"),a.setAttribute("style",r.getAttribute("style")||""),a.setAttribute("type","text"),a.setAttribute("readonly","true"),a.setAttribute("fgta5-component","Combobox"),a.setAttribute("placeholder",r.getAttribute("placeholder")),a.setAttribute("tabindex","-1"),a.required=r.required;null!=r.getAttribute("disabled")&&_(e,!0);const h=r.getAttribute("data-tabindex");null!=h&&o.setAttribute("tabindex",h);o.setAttribute("type","button"),o.classList.add("fgta5-entry-button-combobox"),o.innerHTML=x,o.addEventListener("click",t=>{!function(e){const t=e.Nodes.Dialog;if(null!=e.Form){if("true"!==e.Nodes.Button.getAttribute(k))return}if(e.HasStaticOption)e.Listener.dispatchEvent(C({detail:{sender:e,dialog:t,searchtext:"",limit:0,offset:0,addRow:(t,n,i)=>{var r=$(e,t,n,i);tbody.appendChild(r)}}}));else{U(e,null,30,0),setTimeout(()=>{var e=t.querySelector(".fgta5-combobox-dialog-filter input");null!=e&&(e.value="",e.focus())},100)}setTimeout(()=>{e.isWaiting()&&(t.mask=$fgta5.Modal.createMask())},1e3),t.showModal(),t.setAttribute(T,"true");var n=t.querySelector(".fgta5-combobox-dialog-head > button");null==n.onclick&&(n.onclick=n=>{t.setAttribute(D,"true"),setTimeout(()=>{t.close(),t.removeAttribute(D),t.removeAttribute(T),P(e)},200)})}(e)}),c.setAttribute("type","hidden"),null!=l&&(l.setAttribute("for",a.id),l.classList.add("fgta5-entry-label"));var v=r.getAttribute("required");null!=v&&e.markAsRequired(!0);null!=d&&(e.HasStaticOption=!0);if(function(e,t){t.classList.add("fgta5-combobox-dialog");var n=document.createElement("div");n.classList.add("fgta5-combobox-dialog-head"),n.innerHTML=e.Nodes.Input.getInputCaption(),t.appendChild(n);var i=document.createElement("button");if(i.setAttribute("type","button"),i.innerHTML=I,n.appendChild(i),!e.HasStaticOption){var r=document.createElement("div"),s=document.createElement("input"),a=document.createElement("button"),o=document.createElement("a");s.setAttribute("placeholder","Search"),s.setAttribute("maxlength",30),s.addEventListener("keypress",e=>{"Enter"===e.key&&a.click()}),a.setAttribute("type","type"),a.innerHTML="Submit",a.addEventListener("click",t=>{var n=s.value,i=30,r=0;o.searchtext=n,z(e),U(e,n,i,r)}),r.classList.add("fgta5-combobox-dialog-filter"),r.appendChild(s),r.appendChild(a),t.appendChild(r)}var l=document.createElement("table"),d=document.createElement("thead"),u=document.createElement("tbody"),c=document.createElement("tfoot");t.appendChild(l),l.appendChild(u),l.appendChild(c),l.appendChild(d),e.HasStaticOption?t.setNext=(e,t)=>{console.log("not implemented")}:(o.classList.add("fgta5-combobox-dialog-nextbutton"),o.innerHTML="next data",o.style.display="none",o.setAttribute("href","javascript:void(0)"),o.addEventListener("click",t=>{var n=o.searchtext,i=o.limit,r=o.nextoffset;U(e,n,i,r)}),t.appendChild(o),t.setNext=(e,t)=>{o.nextoffset=e,o.limit=t,o.style.display=null!=e&&0!=e?"inline-block":"none"})}(e,u),u.addEventListener("cancel",t=>{u.setAttribute(D,"true"),t.preventDefault(),setTimeout(()=>{u.close(),u.removeAttribute(D),u.removeAttribute(T),P(e)},200)}),u.addEventListener("close",e=>{}),null!=d){d.remove();var g=function(e,t,n){const i=n.getElementsByTagName("option"),r=t.getElementsByTagName("thead")[0],s=t.getElementsByTagName("tbody")[0],a=t.getElementsByTagName("tfoot")[0];var o=null;if(r.style.display="none",a.style.display="none",!e.isRequired()){(d=$(e,"","none",{})).setAttribute("data-none",""),d.setAttribute(S,0),s.appendChild(d)}var l=0;for(let t of i){l++;let n=t.textContent||t.innerText,i=null==t.value||""==t.value?n:t.value;null!=t.getAttribute("default")&&(o={value:i,text:n});var d,u=s.rows.length-1;(d=$(e,i,n,{option:t})).setAttribute(S,u),s.appendChild(d)}return{count:l,default:o}}(e,u,d);null!=g.default&&(r.value=g.default.value,a.value=g.default.text),g.count>0&&(e.HasStaticOption=!0)}else r.value="",a.value="";e._read,e._setupDescription(),e._setLastValue(r.value,a.value)}(this,e)}get value(){return""==(e=this.Nodes.Input).value?null:e.value;var e}set value(e){throw Error("Value is readonly")}get text(){return this.Nodes.Display.value}set text(e){throw Error("Text is readonly")}get disabled(){return this.Element.disabled}set disabled(e){this.Element.disabled=e,_(this,e)}#t=!0;get InEditMode(){return this.#t}setEditingMode(e){this.#t=e,function(e,t){var n=t?"true":"false";e.Nodes.Display.setAttribute(k,n),e.Nodes.Input.setAttribute(k,n),e.Nodes.InputWrapper.setAttribute(k,n),e.Nodes.Button.setAttribute(k,n),t?e.Nodes.Input.removeAttribute("readonly"):(e.Nodes.Input.setAttribute("readonly","true"),e.setError(null))}(this,e)}newData(e){!function(e,t){var n=e.Nodes.Input,i=e.Nodes.Display;void 0===t?(n.value="",i.value=""):"string"==typeof t?(n.value=t,i.value=t):null!=t?(n.value=t.value,i.value=t.text):(n.value="",n.value="");e.Nodes.Display.removeAttribute("changed"),e.setError(null),e.acceptChanges(),z(e)}(this,e)}acceptChanges(){var e;super.acceptChanges(),(e=this).Nodes.Display.removeAttribute("changed"),e._setLastValue(e.value,e.text)}reset(){var e,t,n;t=(e=this).getLastValue(),n=e.getLastText(),console.log("reset:",t,n),e.Nodes.Input.value=t,e.Nodes.Display.value=n,e.Nodes.Display.removeAttribute("changed"),e.acceptChanges()}clear(){this.Nodes.Dialog.querySelectorAll(`table tr[${M}]`).forEach(e=>{e.removeAttribute(M)})}_setLastValue(e,t){super._setLastValue(e),function(e,t,n){e.Nodes.LastValue.value=t,e.Nodes.LastText.value=n}(this,e,t)}getLastValue(){return""==(e=this.Nodes.LastValue.value)?null:e;var e}getLastText(){return this.Nodes.LastText.value}setSelected(e,t){null==t&&(t=e),function(e,t,n){e.Nodes.Input.value=t,e.Nodes.Display.value=n,V(e)}(this,e,t)}getDisplayBinding(){return this.Nodes.Input.getAttribute("data-display")}addOptions(e){F(this,e)}setOptions(e){!function(e,t){const n=e.Nodes.Dialog.getElementsByTagName("tbody")[0];q(e,n),e.isRequired();F(e,t,n)}(this,e)}#l=!1;isWaiting(){return this.#l}wait(e){this.#l=void 0===e||e,function(e,t){const n=e.Nodes.Dialog;var i=n.getElementsByTagName("tbody")[0];if(t=void 0===t||t,t){var r=document.createElement("tr"),s=document.createElement("td");r.setAttribute("data-waiting",""),s.innerHTML="fetching data from server ...",r.appendChild(s),i.appendChild(r)}else{var a=i.querySelector("[data-waiting]");null!=a&&a.remove(),null!=n.mask&&(n.mask.close(),delete n.mask)}}(this,e)}AbortHandler=null;HasStaticOption=null;focus(){this.Nodes.Display.focus()}}function _(e,t){t?(e.Nodes.Display.disabled=!0,e.Nodes.Button.disabled=!0):(e.Nodes.Display.disabled=!1,e.Nodes.Button.disabled=!1)}function H(e,t){t.setAttribute(M,""),setTimeout(()=>{if(""==t.getAttribute("data-none"));else{const n=e.Nodes.Dialog.getElementsByTagName("tbody")[0].querySelector("tr[data-none]");null!=n&&n.after(t)}},100)}function O(){return/Mobi|Android|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent)}function R(e,t,n,i,r,s){z(e),H(e,t),e.Nodes.Input.value=i,""==i&&"none"==r?(console.log("none dipilih"),e.Nodes.Display.value=""):e.Nodes.Display.value=r,function(e,t,n,i){const r=V(e);e.Listener.dispatchEvent((e=>new CustomEvent("selected",e))({sender:e,detail:{value:t,text:n,data:i,changed:r,sender:e}})),e.Nodes.Dialog.removeAttribute(T),setTimeout(()=>{e.Nodes.Dialog.close(),P(e)},200)}(e,i,r,s)}function $(e,t,n,i){let r=document.createElement("tr");var s=document.createElement("td");r.classList.add("fgta-combobox-option-row"),r.setAttribute("value",t),s.setAttribute("option",""),s.setAttribute("value",t),s.innerHTML=n,s.addEventListener("dblclick",s=>{O()||R(e,r,0,t,n,i)}),s.addEventListener("click",s=>{O()&&R(e,r,0,t,n,i)}),r.appendChild(s),e.Listener.dispatchEvent((e=>new CustomEvent("populating",e))({detail:{value:t,text:n,tr:r,data:i}}));var a=e.value??"";return t==a&&H(e,r),r}function V(e){if(null!=e.Form){var t=e.Nodes.Display;return e.value!=e.getLastValue()?(t.setAttribute("changed","true"),!0):(t.removeAttribute("changed"),!1)}}function q(e,t){const n=e.Nodes.Dialog;null!=t&&null!=t||(t=n.getElementsByTagName("tbody")[0]),t.innerHTML=""}function F(e,t,n){if(null==t||null==t)return;const i=e.Nodes.Dialog;null!=n&&null!=n||(n=i.getElementsByTagName("tbody")[0]);for(let i of t)n.appendChild($(e,i.value,i.text,t))}function P(e){"function"==typeof e.abortHandler&&e.abortHandler()}function U(e,t,n,i){const r=e.Nodes.Dialog,s=r.getElementsByTagName("tbody")[0];var a=!0;0==i&&(null!=r.querySelector(`table tr[${M}]`)?a=!1:(a=!0,q(e,s),r.setNext(null)));a&&((()=>{var t=s.querySelector("tr[data-none]");if(e.isRequired())null!=t&&t.remove();else if(null==t){var n=$(e,"","none",{});n.setAttribute("data-none",""),n.setAttribute(S,0),s.prepend(n),console.log("add none")}})(),e.Listener.dispatchEvent(C({detail:{sender:e,dialog:r,searchtext:t,limit:n,offset:i,addRow:(t,n,i)=>{var r=s.rows.length-1,a=$(e,t,n,i);a.setAttribute(S,r),s.appendChild(a)}}})))}function z(e){const t=e.Nodes.Dialog.querySelector(`table tr[${M}]`);if(null!=t){const e=t.getAttribute(S);if(""!=e&&null!=e){const s=Number(e),a=t.closest("tbody").querySelectorAll("tr");for(var n of a){var i=n.getAttribute(S)??0,r=Number(i);if(0!=r&&(r!=s&&s<r)){n.insertAdjacentElement("beforebegin",t);break}}}t.removeAttribute(M)}}const W='<?xml version="1.0" encoding="UTF-8"?>\n<svg transform="translate(0 3)" width="12" height="12" stroke="currentColor" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n<path d="m3.0207 17.447v3.9708h18.328v-3.9708" fill="none" stroke-linecap="square" stroke-width="4"/>\n<path d="m18.595 8.3606-6.4542-4.0017-6.3622 4.0017m6.3622-1.8991v7.1708" fill="none" stroke-linecap="square" stroke-width="4"/>\n</svg>\n';class j extends n{constructor(e){super(e),function(e,t){const n=e.Nodes.Container,i=e.Nodes.LastValue,r=e.Nodes.Input,s=document.createElement("div"),a=document.createElement("input"),o=document.createElement("button"),l=document.querySelector(`label[for="${t}"]`),d=document.createElement("a");r.parentNode.insertBefore(n,r),d.innerHTML="download",d.classList.add("fgta5-entry-download-link"),d.classList.add("hidden"),s.appendChild(a),s.appendChild(o),o.appendChild(r),n.appendChild(s),n.appendChild(d),n.appendChild(i),e.Nodes.InputWrapper=s,e.Nodes.Label=l,e.Nodes.Display=a,e.Nodes.Button=o,e.Nodes.DownloadLink=d,n.setAttribute("fgta5-component","Filebox"),s.classList.add("fgta5-entry-input-wrapper"),a.setAttribute("id",`${t}-display`),a.setAttribute("type","text"),a.setAttribute("picker","file"),a.setAttribute("fgta5-component","Filebox"),a.setAttribute("readonly","true"),a.classList.add("fgta5-entry-display"),a.classList.add("fgta5-entry-display-filebox");var u=r.getAttribute("placeholder");null!=u&&""!=u&&a.setAttribute("placeholder",u);var c=r.getAttribute("class");null!=c&&""!=c&&a.setAttribute("class",c);var m=r.getAttribute("style");null!=m&&""!=m&&a.setAttribute("style",m);const p=r.getAttribute("data-tabindex");null!=p&&a.setAttribute("tabindex",p);r.setAttribute("type","file"),r.setAttribute("picker","file"),r.removeAttribute("class"),r.removeAttribute("style"),r.classList.add("fgta5-entry-input"),r.classList.add("fgta5-entry-input-filebox"),r.getInputCaption=()=>null!=l?l.innerHTML:r.getAttribute("placeholder"),o.id=e.Id+"-button",o.insertAdjacentHTML("beforeend",W),o.classList.add("fgta5-entry-button-filebox"),l.setAttribute("for",o.id),l.classList.add("fgta5-entry-label");var h=r.getAttribute("required");null!=h&&e.markAsRequired(!0);e._setLastValue(r.value),e.acceptChanges(),e._setupDescription(),r.addEventListener("change",t=>{!function(e){var t=e.Nodes.Input;if(0===t.files.length)return;e.Nodes.Display.value=t.files[0].name,function(e){var t=e.Nodes.Display;e.value!=e.getLastValue()?t.setAttribute("changed","true"):t.removeAttribute("changed")}(e),e.InEditMode&&(e.setError(null),e.validate())}(e)})}(this,e)}#d="";set value(e){this.#d=e}get value(){return 0===this.Element.files.length?this.#d:this.Element.files[0].name}get file(){return 0===this.Element.files.length?0:this.Element.files[0]}get disabled(){return this.Element.disabled}set disabled(e){this.Element.disabled=e,function(e,t){var n=e.Nodes.Display,i=e.Nodes.Button;t?(n.disabled=!0,i.disabled=!0):(n.disabled=!1,i.disabled=!1)}(this,e)}#t=!0;get InEditMode(){return this.#t}setEditingMode(e){this.#t=e,function(e,t){var n=e.Nodes.Display,i=e.Nodes.Input,r=t?"true":"false";n.setAttribute("editmode",r),i.setAttribute("editmode",r),e.Nodes.InputWrapper.setAttribute("editmode",r),t?i.disabled=!1:(i.disabled=!0,e.setError(null))}(this,e)}newData(){var e;(e=this).Nodes.Input.value="",e.Nodes.Display.value="",e.acceptChanges()}acceptChanges(){!function(e){var t=e.Nodes.Display,n=e.Nodes.Input,i="";n.files.length>0&&(i=n.files[0].name);e._setLastValue(i),n.removeAttribute("changed"),t.removeAttribute("changed"),e.setError(null)}(this)}reset(){!function(e){e.Nodes.Input.value="";var t=e.getLastValue();e.Nodes.Display.value=t,e.acceptChanges()}(this)}isChanged(){return t=(e=this).Nodes.LastValue.value,(n=e.value)!=t&&(console.log(`Input '${e.Id}' is changed from '${t}' to '${n}'`),!0);var e,t,n}setError(e){super.setError(e),function(e,t){var n=e.Nodes.Display;null!==t&&""!==t?n.setAttribute("invalid","true"):n.removeAttribute("invalid")}(this,e)}setDisplay(e){!function(e,t){e.Nodes.Display.value=t}(this,e)}setDownloadLink(e,t){!function(e,t=null,n=null){const i=e.Nodes.DownloadLink;null==t?(i.classList.add("hidden"),i.innerHTML="download",i.onclick=null,i.removeAttribute("href")):(i.classList.remove("hidden"),i.innerHTML=t,"function"==typeof n?(i.removeAttribute("target","_blank"),i.setAttribute("href","javascript:void(0)"),i.onclick=()=>{n()}):(i.setAttribute("target","_blank"),i.setAttribute("href",n),i.onclick=null))}(this,e,t)}validate(){return function(e){if(e.isRequired()){if(""==e.Nodes.Display.value){var t=e.getErrorValidation("required");return null!=t?e.setError(t.message):e.setError("file harus diisi"),!1}return!0}return!0}(this)}focus(){this.Nodes.Display.focus()}}const G=new CustomEvent("locked"),K=new CustomEvent("unlocked");function Y(e,t=!0){var n=e.Element,i=!t;for(var r in e.Inputs){e.Inputs[r].setEditingMode(i)}return t?(n.dispatchEvent(G),n.setAttribute("locked",t)):(n.dispatchEvent(K),n.removeAttribute("locked")),t}function Z(e){for(var t in e.Inputs){e.Inputs[t].acceptChanges()}}function J(e,t=!1){var n=e.PrimaryKey,i=e.Inputs[n].getBindingData(),r={};for(var s in e.Inputs){var a=e.Inputs[s],o=a.getBindingData();if(!t||o==i||a.isChanged()){var l=a.getBindingData();l&&(r[l]=a.value)}}return r}const Q={info:"fgta5-icon-info",warning:"fgta5-icon-warning",error:"fgta5-icon-error",question:"fgta5-icon-question"},X='<svg width="32" height="32" version="1.1" viewBox="0 0 8.4667 8.4667" xmlns="http://www.w3.org/2000/svg">\n<path d="m2.6952 0.48756-2.2081 2.1923-0.010649 3.1118 2.193 2.208 3.112 0.010647 2.2075-2.1929 6.415e-4 -0.066396 0.010022-3.0448-2.1924-2.208z" color="#000000" fill="#f00" stroke-width=".32071" style="-inkscape-stroke:none"/>\n<path transform="translate(5.0428e-6 -.019403)" d="m2.582 1.8223a0.33639 0.33639 0 0 0-0.23828 0.097656l-0.43164 0.43164a0.33639 0.33639 0 0 0 0 0.47656l1.4492 1.4492-1.4492 1.4473a0.33639 0.33639 0 0 0 0 0.47656l0.43164 0.43164a0.33639 0.33639 0 0 0 0.47656 0l1.4473-1.4492 1.4492 1.4492a0.33639 0.33639 0 0 0 0.47656 0l0.43164-0.43164a0.33639 0.33639 0 0 0 0-0.47656l-1.4492-1.4473 1.4492-1.4492a0.33639 0.33639 0 0 0 0-0.47656l-0.43164-0.43164a0.33639 0.33639 0 0 0-0.47656 0l-1.4492 1.4492-1.4473-1.4492a0.33639 0.33639 0 0 0-0.23828-0.097656z" fill="#fff" stroke-width=".52389"/>\n</svg>',ee='<svg width="32" height="32" version="1.1" viewBox="0 0 8.4667 8.4667" xmlns="http://www.w3.org/2000/svg">\n<path d="m1.6397 0.49839h5.2163c0.63356 0 1.1436 0.51005 1.1436 1.1436v3.83c0 0.63356-0.51005 1.1436-1.1436 1.1436l-2.0655 0.041342-1.8192 1.3427 0.54046-1.384h-1.872c-0.63356 0-1.1436-0.51005-1.1436-1.1436v-3.83c0-0.63356 0.51005-1.1436 1.1436-1.1436z" fill="#ececec" stroke-width=".29427"/>\n<path d="m4.103 1.9561c-0.3426 0-0.62096 0.24685-0.62096 0.55066 0 0.30381 0.27836 0.55066 0.61025 0.55066 0.3533 0 0.63167-0.24685 0.63167-0.55066 0-0.30381-0.27836-0.55066-0.62096-0.55066z" fill="#000080" stroke-width=".25205"/>\n<path d="m4.7552 3.6379-2.191 0.038907v0.15209h0.59436c0.44285 0.00353 0.50112 0.024758 0.50112 0.17685v1.0116c-0.01164 0.053055-0.02332 0.074277-0.06993 0.091962-0.08157 0.031833-0.303 0.045981-0.80413 0.049518h-0.08157v0.12733h3.0184v-0.12733h-0.08157c-0.78082-0.00707-0.88571-0.024759-0.88571-0.15209v-0.15563z" fill="#000080" stroke-width=".16051"/>\n</svg>',te='<svg width="32" height="32" version="1.1" viewBox="0 0 8.4667 8.4667" xmlns="http://www.w3.org/2000/svg">\n<ellipse cx="4.2374" cy="4.2692" rx="3.6992" ry="3.7484" fill="#000080"/>\n<path d="m4.8395 5.9237q0 0.23059-0.17562 0.3913-0.17562 0.16071-0.42928 0.16071-0.25757 0-0.43709-0.16071-0.17952-0.16071-0.17952-0.3913 0-0.22709 0.17952-0.38431 0.17952-0.15722 0.43709-0.15722 0.25367 0 0.42928 0.15722 0.17562 0.15722 0.17562 0.38431z" fill="#fff" stroke-width=".18906"/>\n<path d="m5.5497 2.9486q0 0.20872-0.10927 0.379-0.10927 0.16753-0.27318 0.31308-0.16001 0.14556-0.32391 0.28013-0.16001 0.13457-0.26928 0.27463-0.10927 0.14006-0.10927 0.29935 0 0.030209 0.01561 0.085137 0.01561 0.054927 0.01561 0.054927l-0.48782-0.0054933q-0.070246-0.10161-0.11708-0.21147-0.042928-0.1126-0.042928-0.27738 0-0.16753 0.093662-0.32407 0.097564-0.15929 0.22245-0.30484 0.12488-0.14556 0.21854-0.26914 0.097564-0.12359 0.097564-0.21971 0-0.14556-0.13659-0.24168-0.13659-0.096122-0.38245-0.096122-0.23415 0-0.33952 0.074151-0.10537 0.074151-0.1483 0.15105h-0.28879q-0.085856-0.054926-0.14049-0.13732-0.050733-0.08239-0.050733-0.14556 0-0.10985 0.12098-0.23344 0.12488-0.12633 0.39416-0.21421 0.26928-0.090629 0.69856-0.090629 0.43319 0 0.73368 0.12633 0.3005 0.12359 0.4527 0.32132 0.1561 0.19499 0.1561 0.41195z" fill="#fff" stroke-width=".16762"/>\n</svg>',ne='<svg width="32" height="32" version="1.1" viewBox="0 0 8.4667 8.4667" xmlns="http://www.w3.org/2000/svg">\n<path transform="matrix(.20595 0 0 .1924 3.8511 -.31824)" d="m1.875 9.1397 18.269 31.643-18.269-1e-6h-18.269l9.1345-15.821z" fill="#ff7f2a"/>\n<path d="m4.751 6.4121q0 0.20413-0.14691 0.34641-0.14691 0.14227-0.35911 0.14227-0.21547 0-0.36564-0.14227-0.15017-0.14227-0.15017-0.34641 0-0.20104 0.15017-0.34022 0.15017-0.13918 0.36564-0.13918 0.2122 0 0.35911 0.13918 0.14691 0.13918 0.14691 0.34022z" fill="#fff" stroke-width=".16269"/>\n<path d="m4.8197 3.7022q0 0.098082-0.022286 0.19403-0.022286 0.093818-0.057939 0.20683l-0.31198 1.0832h-0.43232l-0.2897-1q-0.040112-0.15139-0.075767-0.26013-0.035655-0.11088-0.035655-0.22815 0-0.25373 0.16045-0.37101 0.1649-0.11727 0.46351-0.11727 0.29415 0 0.44569 0.10661 0.15599 0.10661 0.15599 0.38593z" fill="#fff" stroke-width=".15783"/>\n</svg>\n';class ie{Text="button";constructor(e){this.Text=e}}class re{static ButtonOkCancel=Object.freeze({ok:new ie("Ok"),cancel:new ie("Cancel")});static ButtonYesNo=Object.freeze({yes:new ie("Yes"),no:new ie("No")});static ButtonYesNoCancel=Object.freeze({yes:new ie("Yes"),no:new ie("No"),cancel:new ie("Cancel")});static async show(e,t){return await se(e,t)}static async error(e){return await async function(e){return await se(e,{iconSvg:X})}(e)}static async info(e){return await async function(e){return await se(e,{iconSvg:ee})}(e)}static async warning(e){return await async function(e){return await se(e,{iconSvg:ne})}(e)}static async confirm(e,t){return await async function(e,t){return t=void 0===t?re.ButtonOkCancel:t,await se(e,{iconSvg:te,buttons:t})}(e,t)}}async function se(e,t){void 0===t&&(t={});var n=function(e,t){const n=document.createElement("dialog");if(n.classList.add("fgta5-messagebox-dialog"),n.addEventListener("close",e=>{n.parentNode.removeChild(n)}),t.title&&(n.divTitle=document.createElement("div"),n.divTitle.classList.add("fgta5-messagebox-title"),n.divTitle.innerHTML=t.title,n.appendChild(n.divTitle)),void 0!==t.iconSvg){var i=Q[t.iconcss]?Q[t.iconcss]:t.iconcss;n.divIcon=document.createElement("div"),n.divIcon.classList.add("fgta5-messagebox-icon"),n.divIcon.innerHTML=t.iconSvg,n.appendChild(n.divIcon)}else null!=t.iconcss&&(i=Q[t.iconcss]?Q[t.iconcss]:t.iconcss,n.divIcon=document.createElement("div"),n.divIcon.classList.add("fgta5-messagebox-icon"),n.divIcon.classList.add(i),n.appendChild(n.divIcon));return n.divContent=document.createElement("div"),n.divContent.classList.add("fgta5-messagebox-content"),n.divContent.innerHTML=e,n.appendChild(n.divContent),n.divButtons=document.createElement("div"),n.divButtons.classList.add("fgta5-messagebox-buttonsbar"),n.appendChild(n.divButtons),document.body.appendChild(n),n}(e,t);return new Promise(e=>{if(t.buttons)for(const[i,r]of Object.entries(t.buttons)){const t=document.createElement("button");t.classList.add("fgta5-messagebox-button"),t.innerHTML=r.Text,t.addEventListener("click",()=>{n.close(),e(i)}),n.divButtons.appendChild(t)}else{const t=document.createElement("button");t.classList.add("fgta5-messagebox-button"),t.innerHTML="Ok",t.addEventListener("click",()=>{n.close(),e("ok")}),n.divButtons.appendChild(t)}n.showModal()})}function ae(){const e=document.createElement("dialog");return e.classList.add("fgta5-modal-message"),e.addEventListener("close",t=>{e.parentNode.removeChild(e)}),document.body.appendChild(e),e.showModal(),e}class oe{static get MENU(){return'<svg version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">\n <g stroke-linecap="square">\n\t<rect x="19.5" y="19.5" width="12" height="12" fill="currentColor"/>\n\t<rect x="2" y="20" width="12" height="12" fill="currentColor"/>\n\t<rect x="20" y="2" width="12" height="12" fill="currentColor"/>\n\t<rect x="2" y="2" width="12" height="12" fill="currentColor"/>\n </g>\n</svg>'}static get CLOSE(){return'<svg version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">\n <g stroke="currentColor" stroke-linecap="round" stroke-width="5">\n\t<path d="M4 4 L28 28"/>\n\t<path d="M4 28 L28 4"/>\n </g>\n</svg>'}static get BACK(){return'<svg version="1.1" viewBox="0 0 8.4667 8.4667" xmlns="http://www.w3.org/2000/svg">\n<path d="m5.5873 1.1684-2.515 3.0773 2.515 3.0773" fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.3229"/>\n</svg>'}static get ACTION(){return'<svg version="1.1" viewBox="0 0 8.4667 8.4667" xmlns="http://www.w3.org/2000/svg">\n<path d="m3.4777 0.49839-1.3861 4.1094h1.945l-1.2743 3.3919 3.7782-4.663h-1.9226l1.252-2.8383z"/>\n</svg>'}static get USER(){return'<svg version="1.1" viewBox="0 0 8.4667 8.4667" xmlns="http://www.w3.org/2000/svg">\n<g stroke="#fff" fill="currentColor" stroke-linecap="round" stroke-width=".223">\n<path d="m4.2633 4.9935c-0.85356-0.0027456-2.0017 0.17383-2.3611 0.28348-0.35939 0.10964-0.71426 0.67396-0.71727 0.93517 0.62166 0.68677 2.0469 1.1278 3.0784 1.3222 1.0315-0.19439 2.4572-0.6354 3.0789-1.3222-0.0030132-0.26121-0.35788-0.82553-0.71727-0.93517-0.35939-0.10964-1.5081-0.28622-2.3616-0.28348z"/>\n<path d="m3.9018 5.7326-0.37517 1.8759 0.69032 0.57026 0.73534-0.55525-0.36016-1.8909z" stroke-linejoin="bevel"/>\n<rect x="3.8568" y="4.9072" width=".76535" height=".76535" stroke-linejoin="bevel"/>\n<circle cx="4.2238" cy="2.7633" r="2.0523"/>\n</g>\n</svg>'}static get LOGOUT(){return'<svg version="1.1" viewBox="0 0 8.4667 8.4667" xmlns="http://www.w3.org/2000/svg">\n<g stroke="currentColor" fill="currentColor" stroke-linecap="round" stroke-linejoin="bevel">\n<path d="m5.0725 0.70989h-4.3649v7.0783h4.3649z" fill="none" stroke-width=".423"/>\n<path d="m5.0725 0.70989-3.1237 2.5006 0.021392 4.5776h-1.2627l-2.6e-7 -7.0783z" stroke-width=".423"/>\n<path d="m3.1515 5.0723h3.4527v1.3606l1.3955-1.9759-1.3955-1.9759v1.3606h-3.4527z" stroke-width=".423"/>\n</g>\n</svg>'}static get SEARCH(){return'<svg version="1.1" viewBox="0 0 8.4667 8.4667" xmlns="http://www.w3.org/2000/svg">\n<g fill="none" stroke="currentColor" stroke-linecap="square">\n<circle cx="4.9312" cy="3.5669" r="2.7378" stroke-width=".66146"/>\n<path d="m1.1989 7.1728 0.88885-0.80617" stroke-width="1.3229"/>\n</g>\n</svg>'}static get SETTING(){return'<svg version="1.1" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">\n<g transform="matrix(.82343 0 0 .82343 4.0086 7.2155)" fill="currentColor" stroke-width="1.2144">\n<path d="m0 0h48v48h-48z" fill="none"/>\n<path d="m38.86 25.95c0.08-0.64 0.14-1.29 0.14-1.95s-0.06-1.31-0.14-1.95l4.23-3.31c0.38-0.3 0.49-0.84 0.24-1.28l-4-6.93c-0.25-0.43-0.77-0.61-1.22-0.43l-4.98 2.01c-1.03-0.79-2.16-1.46-3.38-1.97l-0.75-5.3c-0.09-0.47-0.5-0.84-1-0.84h-8c-0.5 0-0.91 0.37-0.99 0.84l-0.75 5.3c-1.22 0.51-2.35 1.17-3.38 1.97l-4.98-2.01c-0.45-0.17-0.97 0-1.22 0.43l-4 6.93c-0.25 0.43-0.14 0.97 0.24 1.28l4.22 3.31c-0.08 0.64-0.14 1.29-0.14 1.95s0.06 1.31 0.14 1.95l-4.22 3.31c-0.38 0.3-0.49 0.84-0.24 1.28l4 6.93c0.25 0.43 0.77 0.61 1.22 0.43l4.98-2.01c1.03 0.79 2.16 1.46 3.38 1.97l0.75 5.3c0.08 0.47 0.49 0.84 0.99 0.84h8c0.5 0 0.91-0.37 0.99-0.84l0.75-5.3c1.22-0.51 2.35-1.17 3.38-1.97l4.98 2.01c0.45 0.17 0.97 0 1.22-0.43l4-6.93c0.25-0.43 0.14-0.97-0.24-1.28zm-14.86 5.05c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/>\n</g>\n</svg>'}static get HOME(){return'<svg version="1.1" viewBox="0 0 8.4667 8.4667" xmlns="http://www.w3.org/2000/svg">\n<g fill="currentColor">\n<rect x="4.2337" y="3.9367" width="3.0541" height="4.063"/>\n<rect x="1.2121" y="3.9367" width=".9332" height="4.0184"/>\n<path d="m4.2479 1.0276 3.7518 3.4383-7.5035-1e-7z"/>\n<rect x="1.6787" y="3.9367" width="3.2135" height="1.4646"/>\n</g>\n</svg>'}static get TRASH(){return'<svg version="1.1" viewBox="0 0 8.4667 8.4667" xmlns="http://www.w3.org/2000/svg">\n<g fill="currentColor">\n<path d="m6.5113 2.4805h-4.775l0.85705 5.5191h3.0609z" stroke-linecap="square" stroke-width="1.3229"/>\n<path d="m3.2115 0.40101v0.41341h-1.8266v0.86816h5.519v-0.86816h-1.8462v-0.41341z"/>\n</g>\n</svg>'}static get DIRDEF(){return'<svg width="32" height="32" version="1.1" viewBox="0 0 8.4667 8.4667" xmlns="http://www.w3.org/2000/svg"><rect x=".4961" y="3.9307" width="7.5035" height="4.0689"/><path d="m0.4961 3.2521h7.5035l1e-7 -0.71184h-4.2386l-0.87664-1.3525h-2.3883z"/><rect x="5.8727" y="5.303" width="1.2058" height="1.1077" fill="#fff"/></svg>'}static get UNSORT(){return'<?xml version="1.0" encoding="UTF-8"?>\n<svg version="1.1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">\n<path d="m2.1656 5.2663 3.8057-4.6994 3.8057 4.6994z" fill="currentColor"/>\n<path d="m2.1656 6.6955 3.8057 4.6994 3.8057-4.6994z" fill="currentColor"/>\n</svg>'}static get SORTASC(){return'<?xml version="1.0" encoding="UTF-8"?>\n<svg version="1.1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">\n<path d="m2.1943 9.1198 3.8057-6.5338 3.8057 6.5338z" fill="currentColor"/>\n</svg>'}static get SORTDESC(){return'<?xml version="1.0" encoding="UTF-8"?>\n<svg version="1.1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">\n<path d="m2.1943 2.586 3.8057 6.5338 3.8057-6.5338z" fill="currentColor"/>\n</svg>\n'}static get YES(){return'<svg width="1rem" height="1rem" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n<circle cx="15" cy="15" r="12" stroke="currentColor" stroke-width="1" fill="none" />\n<circle cx="15" cy="15" r="8" fill="currentColor" />\n</svg>'}static get NO(){return'<svg width="1rem" height="1rem" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n<circle cx="15" cy="15" r="12" stroke="currentColor" stroke-width="1" fill="none" />\n</svg>'}static get NEWDOCUMENT(){return'<svg version="1.1" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">\n<g stroke-linecap="round" stroke-linejoin="bevel" stroke-width="2">\n<path d="m40 34.75v-30.75h-30v41h20z" fill="#e6e6e6" stroke="#000"/>\n<circle cx="25" cy="21" r="9" fill="#59f" stroke="#000"/>\n<path d="m30 45v-10h10z"/>\n<path d="m20 21h10" stroke="#fff"/>\n<path d="m25 16v10" stroke="#fff"/>\n</g>\n</svg>'}static get PROGRAM(){return'<svg version="1.1" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">\n<g fill="currentColor">\n<path d="m20.019 2c-2.9332 0-5.2348 2.3057-5.2348 5.2389v3.1417h-8.3806c-2.3047 0-4.1903 1.8856-4.1903 4.1903v7.9628h3.1417c3.1427 0 5.6567 2.514 5.6567 5.6567 0 3.1427-2.514 5.6567-5.6567 5.6567h-3.3547v7.9628c0 2.3047 1.8856 4.1903 4.1903 4.1903h7.9628v-3.1458c0-3.1427 2.514-5.6567 5.6567-5.6567 3.1427 0 5.6567 2.514 5.6567 5.6567v3.1458h7.9628c2.3047 0 4.1903-1.8856 4.1903-4.1903v-8.3806h3.1417c2.9332 0 5.2389-2.3057 5.2389-5.2389 0-2.9332-2.3057-5.2389-5.2389-5.2389h-3.1417v-8.3806c0-2.3047-1.8856-4.1903-4.1903-4.1903h-8.3806v-3.1417c0.20951-2.9332-2.0968-5.2389-5.03-5.2389z"/>\n</g>\n</svg>'}}const le="rowselector",de="autonumber",ue="binding",ce="sorting",me="formatter",pe="text-align",he="data-selected",ve="data-name",ge="key",fe="keyvalue",be="data-rowprocessing",we="data-mainrowhead",ye="linenumber",Ee="rowselector",Le="autonumber",Ae="standard",Ne=e=>new CustomEvent("rowremoving",e);function Ce(e,t,n){null!=n&&e.setAttribute(t,n)}function xe(){var e=document.createElement("label"),t=document.createElement("input"),n=document.createElement("span");return e.classList.add("fgta5-gridview-checkbox"),e.appendChild(t),e.appendChild(n),e.checkbox=t,t.setAttribute("type","checkbox"),n.classList.add("fgta5-gridview-checkmark"),e}function Ie(e,t){var n=t.target,i=e.Nodes.Tbody.querySelectorAll("tr");for(var r of i){r.querySelector(`td[${le}] input[type="checkbox"]`).checked=n.checked,n.checked?r.setAttribute(he,""):r.removeAttribute(he)}}function ke(e,t){var n=t.target,i=n.closest("tr");n.checked?i.setAttribute(he,""):(i.removeAttribute(he),e.Nodes.Thead.querySelector(`tr th[${le}] input[type="checkbox"]`).checked=!1)}function Te(e,t,n){void 0===n&&(n=e.Nodes.Tbody);var i=document.createElement("tr");i.classList.add("fgta5-gridview-row");var r=e.Key;if(null!=r){var s=t[r];null!=s&&(i.setAttribute(ge,r),i.setAttribute(fe,s))}for(var a of e.Columns){let n=document.createElement("td");if(Ce(n,"class",a.cssclass),Ce(n,"style",a.cssstyle),Ce(n,ve,a.name),Ce(n,ue,a.binding),Ce(n,me,a.formatter),Ce(n,pe,a.textalign),n.classList.add("fgta5-gridview-cell"),a.type==Ee){var o=xe();o.addEventListener("change",t=>{ke(e,t)}),n.appendChild(o),n.setAttribute(le,"")}else if(a.type==Le){var l=He(e);l++,n.setAttribute(de,""),n.setAttribute(ye,l),n.innerHTML=l,n.addEventListener("click",t=>{De(e,n,i)}),n.addEventListener("dblclick",t=>{Me(e,n,i)})}else{let r=t[a.binding];if(n.setAttribute("data-value",r),null!=a.formatter)try{let t=e.Formatters[a.name];void 0===t&&(t=Oe(a.formatter),"function"==typeof t&&(e.Formatters[a.name]=t)),"function"==typeof t&&(r=t(r))}catch(e){console.error(e)}n.innerHTML=null!=r?r:"",n.addEventListener("click",t=>{De(e,n,i)}),n.addEventListener("dblclick",t=>{Me(e,n,i)})}i.appendChild(n)}return Se(e,i),0==n.children.length&&(e.CurrentRow=i),n.appendChild(i),i}function De(e,t,n){e.CurrentRow=n,e.Listener.dispatchEvent(new CustomEvent("cellclick",{detail:{tr:n,td:t}}))}function Me(e,t,n){e.CurrentRow=n,e.Listener.dispatchEvent(new CustomEvent("celldblclick",{detail:{tr:n,td:t}}))}function Se(e,t){e.Listener.dispatchEvent(new CustomEvent("rowrender",{detail:{tr:t}}))}function Be(e,t){var n=t.getAttribute(ce),i=t.getAttribute(ue),r=t.closest("th");r.setAttribute(ue,i),null==n||""==n?(r.setAttribute(ce,"asc"),t.setAttribute(ce,"asc"),t.innerHTML=oe.SORTASC):"asc"==n?(r.setAttribute(ce,"desc"),t.setAttribute(ce,"desc"),t.innerHTML=oe.SORTDESC):(r.removeAttribute(ce),t.setAttribute(ce,""),t.innerHTML=oe.UNSORT);const s=_e(e,t.closest("tr")),a=e.Criteria;e.Listener.dispatchEvent(new CustomEvent("sorting",{detail:{sort:s,criteria:a}}))}function _e(e,t){null==t&&(t=e.Nodes.Thead.querySelector(`tr[${we}]`));var n=t.querySelectorAll(`th[${ce}]`),i={};for(var r of n){var s=r.getAttribute(ce);i[r.getAttribute(ue)]=s}return i}function He(e){var t=e.Nodes.Tbody.querySelector("tr:last-child td[autonumber]");if(null==t)return 0;var n=t.getAttribute(ye);return null==n?0:Number(n)}function Oe(e){const t=e.match(/(\w+)\(([^)]+)\)/);if(!t)return null;const[,n,i]=t,r=i.split(",").map(e=>parseFloat(e.trim()));return"decimal"===n?e=>{return t=e,n=r[1],new Intl.NumberFormat("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).format(t);var t,n}:"int"===n?e=>{return t=e,new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:0,useGrouping:!1}).format(t);var t}:"checkmark"===n?e=>function(e){const t=oe.YES,n=oe.NO;if(null==e)return n;if(!1===e)return n;if("0"==e||""==e||"-"==e||0==e)return n;return t}(e):"dateiso"===n?e=>function(e){const t=new Date(e);return t.toISOString().split("T")[0]}(e):"datelong"===n?e=>function(e){const t=new Date(e),n={day:"2-digit",month:"short",year:"numeric"};return t.toLocaleDateString("en-ID",n).replace(".","")}(e):"dateshort"===n||"date"===n?e=>function(e){const t=new Date(e),n={day:"2-digit",month:"2-digit",year:"numeric"};return t.toLocaleDateString("en-ID",n).replace(".","")}(e):null}class Re{constructor(e){this.#u=e.name,this.#c=e.title,this.#m=e.disabled,this.#p=e.icon,this.#h=e.url}static get ICON_DEFAULT(){return'<svg version="1.1" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">\n<g fill="currentColor">\n<path d="m20.019 2c-2.9332 0-5.2348 2.3057-5.2348 5.2389v3.1417h-8.3806c-2.3047 0-4.1903 1.8856-4.1903 4.1903v7.9628h3.1417c3.1427 0 5.6567 2.514 5.6567 5.6567 0 3.1427-2.514 5.6567-5.6567 5.6567h-3.3547v7.9628c0 2.3047 1.8856 4.1903 4.1903 4.1903h7.9628v-3.1458c0-3.1427 2.514-5.6567 5.6567-5.6567 3.1427 0 5.6567 2.514 5.6567 5.6567v3.1458h7.9628c2.3047 0 4.1903-1.8856 4.1903-4.1903v-8.3806h3.1417c2.9332 0 5.2389-2.3057 5.2389-5.2389 0-2.9332-2.3057-5.2389-5.2389-5.2389h-3.1417v-8.3806c0-2.3047-1.8856-4.1903-4.1903-4.1903h-8.3806v-3.1417c0.20951-2.9332-2.0968-5.2389-5.03-5.2389z"/>\n</g>\n</svg>'}#u;get name(){return this.#u}#c;get title(){return this.#c}#m;get disabled(){return!0===this.#m}#p;get icon(){return this.#p}#h;get url(){return this.#h}}const $e="showed",Ve="data-module",qe="data-favourite",Fe="data-openedmodule",Pe="data-currentuser",Ue="data-iconcontainer",ze="data-iconimage",We="data-icontext",je="data-gridarea",Ge="data-icon",Ke="data-title",Ye="data-info",Ze="data-buttonclose",Je="data-dragover",Qe="data-label",Xe="data-icon",et="data-mainbutton",tt="draggable",nt="fgta5-button-menu",it="fgta5-button-shorcutclose",rt="hidden",st="click",at="dblclick",ot="dragstart",lt="Favourite Programs",dt="Opened Programs",ut=e=>new CustomEvent("action",e);let ct,mt;function pt(e,n,i){return t.createSvgButton(n,"fgta5-button-head",i)}function ht(e){console.log("show menu");e.Nodes.Nav.setAttribute($e,"")}function vt(e){gt(e),e.Nodes.IFrames.classList.add(rt)}function gt(e){e.Nodes.Nav.removeAttribute($e)}function ft(e,t,n){t.classList.remove(rt),e.Listener.dispatchEvent(ut({detail:{name:"moduleopened",modulename:n.name,title:n.title,iframe:t}})),Ct(e,t,n)}async function bt(e,n){const i=e.Nodes.IFrames,r=n.name;console.log(n);const s=`iframe[${Ve}="${r}"]`;if(null==i.querySelector(s)){const s=$fgta5.Modal.createMask("Please wait..."),a=new URL(n.url);a.searchParams.append("prog",n.name);let o=document.createElement("iframe");o.classList.add("fgta5-iframe"),o.classList.add(rt),o.setAttribute(Ve,r),o.onload=i=>{!function(e,n,i){n.contentWindow.postMessage({action:t.ACTION_APPLICATIONLOADED,module:{title:i.title,name:i.name}},"*"),e.Listener.dispatchEvent(ut({detail:{name:"moduleloaded",modulename:i.name,title:i.title,iframe:n}})),e.Listener.dispatchEvent(ut({detail:{name:"moduleopened",modulename:i.name,title:i.title,iframe:n}})),Ct(e,n,i)}(e,o,n),o.classList.remove(rt),s.close()},fetch(a).then(t=>{if(!t.ok)throw new Error(`HTTP Error: ${t.status}`);o.src=a,i.appendChild(o),e.Nodes.IFrames.classList.remove(rt)}).catch(e=>{console.error(e),$fgta5.MessageBox.error(e),s.close()})}else{var a=i.querySelectorAll("iframe");for(var o of a){o.getAttribute(Ve)==r?ft(e,o,n):o.classList.add(rt)}e.Nodes.IFrames.classList.remove(rt)}}function wt(e,n){const i=document.createElement("div"),r=document.createElement("div"),s=document.createElement("div");i.setAttribute("name",n.name),i.setAttribute(Ue,""),n.disabled&&i.setAttribute("disabled",""),r.setAttribute(ze,""),null!=n.icon?(r.setAttribute(ze,""),r.style.backgroundImage=`url('${n.icon}')`):r.innerHTML=Re.ICON_DEFAULT,s.innerHTML=n.title,s.setAttribute(We,""),i.appendChild(r),i.appendChild(s);const a=t.isMobileDevice()?st:at;return r.addEventListener(a,()=>{e.openModule(n),r.style.animation="iconClicked 0.2s forwards",setTimeout(()=>{r.style.animation="unset",gt(e)},300)}),i}function yt(e,t){const n=document.createElement("div"),i=document.createElement("div"),r=document.createElement("div");return n.setAttribute(Ue,""),t.disabled&&n.setAttribute("disabled",""),i.setAttribute(ze,""),null!=t.icon?i.style.backgroundImage=`url('${t.icon}')`:i.style.backgroundImage=`url('data:image/svg+xml,${encodeURIComponent(oe.DIRDEF)}')`,r.innerHTML=t.title,r.setAttribute(We,""),n.appendChild(i),n.appendChild(r),i.addEventListener(st,()=>{i.style.animation="iconClicked 0.4s forwards",setTimeout(()=>{i.style.animation="unset"},400),setTimeout(()=>{At(e,t.icons,t.parent)},200)}),n}function Et(e){At(e,e.RootIcons)}function Lt(e,t){let n=[];for(var i of t)if(i instanceof $fgta5.ModuleData||"program"==i.type){let t=wt(e,i instanceof $fgta5.ModuleData?i:new $fgta5.ModuleData(i));var r;n.push(t),r=null!=i.keyword?`${i.name} : ${i.keyword}`:i.name,e.Modules[i.name]={keyword:r,data:i}}else{var s=Lt(e,i.items),a=yt(e,{title:i.title,icon:i.icon,icons:s,parent:n});!1!==i.border&&a.classList.add("fgta5-icongroup"),n.push(a)}return n}function At(e,t,n){const i=e.Nodes.MenuBoard,r=e.Nodes.MenuResetButton;if(null!=n){if(!0!==t[0].isbackIcon){var s=yt(e,{title:"",icon:`data:image/svg+xml,${encodeURIComponent(oe.BACK)}`,icons:n,parent:n.parent});s.isbackIcon=!0,t.unshift(s)}r.classList.remove(rt)}else r.classList.add(rt);i.style.animation="fadeOutLeft 0.05s forwards",setTimeout(()=>{for(var e of(i.innerHTML="",i.style.animation="fadeInRight 0.3s forwards",t))i.appendChild(e)},50)}async function Nt(e,n){if(""==n.trim()){if(void 0===e.previousSearch)return void(e.previousSearch="");if(n==e.previousSearch)return;return e.previousSearch="",void Et(e)}e.previousSearch=n;const i=e.Nodes.MenuBoard,r=e.Modules;i.innerHTML="";var s=0;for(var a in r){if(r[a].data.title.toLowerCase().includes(n)){s++;var o=r[a];if(null!=o){var l=wt(e,o.data);l.style.animation="dropped 0.3s forwards",i.appendChild(l),s<10&&await t.sleep(100)}}}}function Ct(e,n,i){const r=e.Nodes.Opened,s=`fgta5-sch-mod--${i.name}`,a=document.getElementById(s);if(null==a){const a=function(e,n,i,r){const s=e.Nodes.Opened,a=document.createElement("div"),o=document.createElement("div"),l=document.createElement("div"),d=document.createElement("div"),u=document.createElement("a"),c=t.isMobileDevice()?st:at;a.id=r,a.classList.add("fgta5-openedmodule-shortcut"),a.setAttribute(tt,"true"),a.appendChild(o),a.appendChild(l),a.appendChild(d),a.appendChild(u),a.addEventListener(c,async t=>{await bt(e,n)}),a.addEventListener(ot,e=>{!function(e,t,n){mt="addtofave",t.dataTransfer.setData("modulename",n.name),ct=n.name}(0,e,n)}),o.setAttribute(Ge,""),null!=n.icon?o.style.backgroundImage=`url('${n.icon}')`:o.innerHTML=Re.ICON_DEFAULT;l.setAttribute(Ke,""),l.innerHTML=n.title,d.setAttribute(Ye,""),d.innerHTML="idle";var m=t.createSvgButton(oe.CLOSE,it,e=>{e.stopPropagation(),i.remove(),a.remove(),0==s.childNodes.length&&s.hide()});return u.setAttribute(Ze,""),u.appendChild(m),a}(e,i,n,s);r.prepend(a)}else r.prepend(a);r.show()}function xt(e,t,n,i){const r=e.Nodes.TrashBox,s=r.querySelector(`[${et}]`);t.setAttribute(tt,"true"),t.addEventListener(ot,e=>{mt="removefromfave",e.dataTransfer.setData("modulename",n),r.classList.remove(rt)}),t.addEventListener("dragend",e=>{setTimeout(()=>{r.classList.add(rt),s.removeAttribute(Je)},100)}),s.addEventListener("dragover",e=>{"removefromfave"==mt&&(e.preventDefault(),s.setAttribute(Je,""))}),s.addEventListener("dragleave",e=>{s.removeAttribute(Je)}),s.addEventListener("drop",t=>{if("removefromfave"==mt){const r=t.dataTransfer.getData("modulename");if(""==r)return;var n=i.querySelector(`[name="${r}"]`);null!=n&&(n.style.animation="removing 0.3s forwards",setTimeout(()=>{n.remove()},300),e.Listener.dispatchEvent(new CustomEvent("removefavourite",{detail:{modulename:r}}))),t.preventDefault(),mt=""}})}const It="hidden",kt="fgta5-app-section",Tt="data-active",Dt="data-title",Mt="data-topbar",St="data-backbutton",Bt="backbuttonclick",_t="sectionshowing";class Ht{#v;#g;#f;#u;#c;#b;#w;#y;#E=new EventTarget;static get ATTR_ACTIVE(){return Tt}static get DIR_LEFT(){return 0}static get DIR_RIGHT(){return 1}static get EVT_BACKBUTTONCLICK(){return Bt}static get EVT_SECTIONSHOWING(){return _t}get Id(){return this.#v}get Index(){return this.#f}get Name(){return this.#u}get Title(){return this.#c}get Element(){return this.#g}get PreviousSection(){return this.#b}get getActiveSection(){return this.#y}get Listener(){return this.#E}get Carousell(){return this.#w}set Title(e){this.#c=e,function(e,t){e.Nodes.Title.innerHTML=t}(this,e)}constructor(e,n){const i=e.id,r=i,s=e.getAttribute(Dt);this.#g=e,this.#v=i,this.#u=r,this.#c=s??"section",null!=n&&(null!=n.index&&(this.#f=n.index),this.#w=n.carousell,"function"==typeof n.fn_getActiveSection?this.#y=n.fn_getActiveSection:this.#y=()=>null),function(e){const n=e.Element;n.setAttribute("name",e.Name),n.classList.add(kt),0==e.Index?n.setAttribute(Tt,""):n.classList.add(It);const i=document.createElement("div"),r=document.createElement("div"),s=t.createSvgButton(oe.BACK,"",()=>{!function(e){e.Listener.dispatchEvent((t={cancelable:!0,detail:{fn_ShowNextSection:()=>{null!=e.sectionReturn?e.sectionReturn.show({direction:1}):e.PreviousSection.show({direction:1})}}},new CustomEvent(Bt,t)));var t}(e)}),a=document.createElement("div");i.setAttribute(Mt,""),i.appendChild(s),i.appendChild(a),i.appendChild(r),s.setAttribute(St,""),0==e.Index&&s.classList.add("hidden");a.classList.add("fgta5-app-section-icondiv"),a.style.display="none",r.setAttribute(Dt,e.Title),r.innerHTML=e.Title,n.prepend(i),e.Nodes={BackButton:s,Title:r,iconDiv:a}}(this)}async show(e,t){const n=this.getActiveSection();this.#b=n,await async function(e,t,n){"function"==typeof n&&await n();let i=0;null!=t&&(i=t.direction??0);let r=[{curr:"fadeOutLeft 0.1s forwards",comming:"fadeInRight 0.3s forwards"},{curr:"fadeOutRight 0.1s forwards",comming:"fadeInLeft 0.3s forwards"}];const s=e,a=s.Element,o=e.PreviousSection;if(null!=o){if(s.Name==o.Name)return;const t=o.Element;e.Carousell.setCurrentSection(s),e.Carousell.dispatchSectionShowing(o,s),e.Listener.dispatchEvent(new CustomEvent(_t,{data:{detail:{currSection:o,commingSection:s}}})),a.style.animation="unset",t.style.animation=r[i].curr,setTimeout(()=>{t.classList.add(It),t.style.animation="unset",t.removeAttribute(Tt),a.classList.remove(It),a.style.animation=r[i].comming,setTimeout(()=>{a.style.animation="unset",a.setAttribute(Tt,"")},300)},100)}else a.classList.remove(It),a.setAttribute(Tt,"")}(this,e,t)}sectionReturn;setSectionReturn(e){this.sectionReturn=e}setIconUrl(e){!function(e,t){const n=e.Nodes.iconDiv;n.style.display="unset",null==t||""==t?n.innerHTML=oe.PROGRAM:(n.style.backgroundImage=`url('${t}')`,n.style.backgroundSize="cover",n.style.backgroundRepeat="no-repeat",n.style.backgroundPosition="center")}(this,e)}addEventListener(e,t){this.Listener.addEventListener(e,t)}back(){null!=this.sectionReturn&&this.sectionReturn.show({direction:1})}}const Ot="fgta5-button-head",Rt="application-title",$t="data-withfooter";function Vt(e,t){document.title=t,document.getElementById(Rt).innerHTML=t}const qt="sectionshowing";function Ft(e,t){const n=t.querySelector(`section[${Ht.ATTR_ACTIVE}]`).getAttribute("name");return e.Items[n]}class Pt extends EventTarget{#g;constructor(e,t={}){super();const n=document.getElementById(e);null==n&&console.error("element dengan id: '$id' tidak ditemukan di halaman"),this.#g=n,function(e,t){const n=e.element,i=document.createElement("div");i.classList.add("fgta5-dialogbox-container");for(;n.firstChild;)i.appendChild(n.firstChild);if(n.appendChild(i),null!=t.title){const e=document.createElement("div");e.innerHTML=t.title,n.prepend(e)}const r=document.createElement("div");e.btnOk=document.createElement("button"),e.btnCancel=document.createElement("button"),e.btnOk.innerHTML="Ok",e.btnCancel.innerHTML="Cancel",r.appendChild(e.btnOk),r.appendChild(e.btnCancel),n.appendChild(r)}(this,t)}get element(){return this.#g}async dispatchCancelableEvent(e){const t=this._getListeners(e.type);for(const n of t)if(await n(e),e.defaultPrevented)break;return e.defaultPrevented}_getListeners(e){return this._listeners?.[e]||[]}addAsyncEventListener(e,t){this._listeners||(this._listeners={}),this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}async show(){console.log("showing modal dialog");const e=this,t=this.#g;var n=new Event("showing",{});return await e.dispatchCancelableEvent(n),t.showModal(),t.setAttribute("showed",!0),new Promise(t=>{e.btnOk.onclick=async n=>{console.log("btnOk click");var i=new Event("ok",{cancelable:!0});i.result={},await e.dispatchCancelableEvent(i)?console.log("dialog invalid, and was canceled"):(e.close(),t(i.result))},e.btnCancel.onclick=n=>{console.log("btnCancel click"),e.close(),t(null)}})}close(){this.#g.close(),this.btnOk.onclick=null,this.btnCancel.onclick=null}}function Ut(e,t){var n=new Date(e);return{dt:new Date(n.getFullYear(),n.getMonth(),n.getDate()),boundary:new Date(t.getFullYear(),t.getMonth(),t.getDate())}}var zt=Object.freeze({__proto__:null,email:function(e,t){return/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e)},getInvalidMessage:function(e,t,n){var i=t.getAttribute(`invalid-message-${e}`);return null!=i&&""!==i||(i=n),i},max:function(e,t){return null==t||0===t||!(null==e||e>t)},maxdate:function(e,t){var{dt:n,boundary:i}=Ut(e,t);return!(n>i)},maxlength:function(e,t){return null==t||0===t||!(null==e||e.length>t)},maxtime:function(e,t){return!(e>t)},min:function(e,t){return null==t||0===t||!(null==e||e<t)},mindate:function(e,t){var{dt:n,boundary:i}=Ut(e,t);return!(n<i)},minlength:function(e,t){return null==t||0===t||!(null==e||e.length<t)},mintime:function(e,t){return!(e<t)},parseFunctionParam:function(e){const[t,...n]=e.split(":"),i=n.length>0?n.join(":"):null;return{fnName:t,fnParams:null!==i?isNaN(i)?i:Number(i):null}},pattern:function(e,t){return!0},required:function(e){return null!=e&&""!==e}});const Wt={Component:t,Form:class extends t{#L=!1;#A=!1;#N;Inputs={};constructor(e){super(e),this.#C(),function(e,t){var n=document.getElementById(t);e.Id=t,e.Element=n,e.Inputs={},e.Element.setAttribute("novalidate",""),e.Element.addEventListener("submit",e=>{e.preventDefault()});for(var i=n.querySelectorAll("input"),r=0;r<i.length;r++){var s=i[r],o=s.getAttribute("fgta5-component");null!=o&&null!=s.id&&""!=s.id&&("Textbox"==o?e.Inputs[s.id]=new a(s.id):"Numberbox"==o?e.Inputs[s.id]=new d(s.id):"Datepicker"==o?e.Inputs[s.id]=new g(s.id):"Timepicker"==o?e.Inputs[s.id]=new L(s.id):"Combobox"==o?e.Inputs[s.id]=new B(s.id):"Checkbox"==o?e.Inputs[s.id]=new m(s.id):"Filebox"==o&&(e.Inputs[s.id]=new j(s.id)))}}(this,e)}get AutoID(){return this.#A}get PrimaryKey(){return this.#N}lock(e){this.#L=Y(this,e)}isLocked(){return this.#L}#x;isNew(){return this.#x}setAsNewData(){this.#x=!0}reset(){this.#x=!1,function(e){for(var t in e.Inputs){e.Inputs[t].reset()}}(this)}clear(e){!function(e,t=""){e.Element.querySelectorAll('input:not([type="file"]').forEach(e=>{e.value=t})}(this,e)}acceptChanges(){this.#x=!1,Z(this)}isChanged(){return function(e){for(var t in e.Inputs){if(e.Inputs[t].isChanged())return!0}return!1}(this)}#I;_setLastError(e){this.#I=e}getLastError(){return this.#I}getPrimaryInput(){const e=this.PrimaryKey;return this.Inputs[e]}newData(e){this.#x=!0,this.lock(!1),function(e,t){for(var n in t=null!=t?t:{},e.Inputs){var i=e.Inputs[n],r=t[i.getBindingData()];if(i instanceof B){var s=null!=r?r:{value:"",text:""};i.newData({value:s.value,text:s.text})}else i.newData(r)}}(this,e)}render(){!function(e){for(var t in e.Inputs){e.Inputs[t].bindForm(e)}e.isLocked()?Y(e,!0):Y(e,!1)}(this)}validate(){return function(e){var t=!0;for(var n in e.Inputs){var i=e.Inputs[n];if(t&&=i.validate(),!t){var r=i.getLastError();return e._setLastError(r),!1}}return e._setLastError(null),!0}(this)}getData(){return J(this)}getFiles(){return function(e){const t={};for(var n in e.Inputs){var i=e.Inputs[n];if(!(i instanceof j))continue;if(!i.isChanged())continue;const r=i.getBindingData();null!=i.file&&(t[r]=i.file)}return 0===Object.keys(t).length?null:t}(this)}getDataChanged(){return J(this,!0)}setData(e){!function(e,t){for(var n in e.Inputs){var i=e.Inputs[n],r=t[i.getBindingData()];if(i instanceof B){var s=i.getDisplayBinding();null!=s?i.setSelected(r,t[s]):i.setSelected(r,r)}else i instanceof j?i.setDisplay(r):i.value=r}Z(e)}(this,e)}addEventListener(e,t){this.Element.addEventListener(e,t)}acceptInput(){const e=document.activeElement;e.blur(),setTimeout(()=>{e.focus()},100)}#C(){var e=this.Element.getAttribute("locked");null==e&&(e="false"),"true"===e.toLowerCase()?this.#L=!0:this.#L=!1;var t=this.Element.getAttribute("autoid");null!=t&&("true"===t.toLowerCase()?this.#A=!0:this.#A=!1);var n=this.Element.getAttribute("primarykey");this.#N=n}},Button:class extends t{constructor(e){var t;super(e),(t=this).Element.classList.add("fgta5-button"),t.Element.setAttribute("type","button")}#k=!1;get disabled(){return this.#k}set disabled(e){var t;this.#k=e,t=e,this.Element.disabled=t}addEventListener(e,t){this.Element.addEventListener(e,t)}click(){this.Element.click()}},Textbox:a,Numberbox:d,Checkbox:m,Datepicker:g,Timepicker:L,Combobox:B,Filebox:j,MessageBox:re,MessageBoxButton:ie,Modal:class{static show(e){return ae()}static createMask(e){return function(e){e=void 0===e?"Please wait ...":e;const t=ae();var n=document.createElement("div");n.classList.add("fgta5-modal-loadermask-msg"),t.appendChild(n);var i=document.createElement("div");i.classList.add("fgta5-modal-loadermask-msg-icon"),i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><radialGradient id="a11" cx=".66" fx=".66" cy=".3125" fy=".3125" gradientTransform="scale(1.5)"><stop offset="0" stop-color="#575757"></stop><stop offset=".3" stop-color="#575757" stop-opacity=".9"></stop><stop offset=".6" stop-color="#575757" stop-opacity=".6"></stop><stop offset=".8" stop-color="#575757" stop-opacity=".3"></stop><stop offset="1" stop-color="#575757" stop-opacity="0"></stop></radialGradient><circle transform-origin="center" fill="none" stroke="url(#a11)" stroke-width="30" stroke-linecap="round" stroke-dasharray="200 1000" stroke-dashoffset="0" cx="100" cy="100" r="70"><animateTransform type="rotate" attributeName="transform" calcMode="spline" dur="1.8" values="360;0" keyTimes="0;1" keySplines="0 0 1 1" repeatCount="indefinite"></animateTransform></circle><circle transform-origin="center" fill="none" opacity=".2" stroke="#575757" stroke-width="30" stroke-linecap="round" cx="100" cy="100" r="70"></circle></svg>',n.appendChild(i);var r=document.createElement("div");return r.classList.add("fgta5-modal-loadermask-msg-text"),r.innerHTML=e,n.appendChild(r),t.setText=e=>{r.innerHTML=e},t}(e)}static createProgress(e){return function(e){void 0===e&&(e={});const t=ae();t.IsError=!1;var n=document.createElement("div");t.appendChild(n);var i=document.createElement("div");i.classList.add("fgta5-modal-progressbar-container"),t.appendChild(i);var r=document.createElement("label");r.classList.add("fgta5-modal-progressbar"),i.appendChild(r);var s=document.createElement("div");return s.classList.add("fgta5-modal-progressbar-text"),t.appendChild(s),t.setProgress=function(e,t){e>100&&(e=100),r.innerHTML=`${e}%`,r.style.width=`${e}%`,s.innerHTML=t},t.setError=function(e){t.IsError=!0,n.classList.add("fgta5-icon-error"),n.style.height="32px",n.style.marginBottom="10px",s.innerHTML=e,s.setAttribute("error","true"),r.setAttribute("error","true")},t.finish=function(n,i){if(void 0===n&&(n="Done"),void 0===i&&(i=!0),!0===e.buttonClose||t.IsError){i&&(s.style.display="none",r.style.width="100%",r.innerHTML="100%");var a=document.createElement("div");a.style.textAlign="center",a.style.marginTop="10px",a.style.marginBottom="0";var o=document.createElement("button");o.classList.add("fgta5-modal-button"),o.innerHTML=n,o.addEventListener("click",()=>{t.close()}),a.appendChild(o),t.appendChild(a)}else t.close()},t}(e)}},Dataloader:class{#T;constructor(){this.#T=new AbortController}abort(){this.#T.abort()}dispose(){}async load(e,t,n){const i=this.#T.signal;null==t&&(t={});const r=Object.assign({signal:i},t);try{const i=await fetch(e,r);if(!i.ok){const n=i.status,r=i.statusText;throw new Error(`${n} ${r}: ${t.method} ${e}`)}const s=await i.json();if("function"==typeof n)try{n(null,s)}catch(e){console.error(e)}return s}catch(e){if("AbortError"===e.name)console.log("Request dibatalkan!");else{if("function"!=typeof n)throw e;try{n(e,null)}catch(e){console.error(e)}}}}},Gridview:class extends t{constructor(e){super(e);var t=this.Element;if(null==t)throw new Error(`element id '${e}' for gridview is not defined`);if("table"!=t.tagName.toLowerCase())throw new Error(`element '${e}' is not table`);!function(e){var t=e.Element,n=t.querySelector("thead"),i=document.createElement("tbody"),r=document.createElement("tfoot");t.prepend(r),t.prepend(i),e.Formatters={},e.Listener=new EventTarget,e.Nodes={Table:t,Thead:n,Tbody:i,Tfoot:r},t.classList.add("fgta5-gridview"),t.setAttribute("cellspacing",0);const{headrow:s,columns:a,key:o}=function(e){var t=[],n=e.Nodes.Thead,i=n.querySelector("tr[data-header]"),r=i.querySelectorAll("th");for(var s of r){let e={};var a=s.getAttribute(le),o=s.getAttribute(de),l=s.getAttribute(ue),d=s.getAttribute(ve),u=s.getAttribute(me),c=(s.getAttribute(pe)??"").toLowerCase(),m="true"===(s.getAttribute(ce)??"").toLowerCase(),p=s.getAttribute("class"),h=s.getAttribute("style"),v=s.innerHTML;e.type=null!=a?Ee:null!=o?Le:Ae,e.cssclass=p,e.cssstyle=h,e.binding=l,e.name=d,e.formatter=u,e.textalign=""==c?"left":c,e.sorting=m,e.html=v,t.push(e)}var g=i.getAttribute(ge);return{headrow:i,columns:t,key:g}}(e);e.setColumnData(a),e.setKey(o),s.remove(),function(e,t){var n=document.createElement("tr");n.setAttribute(we,"");for(let o of t){var i=document.createElement("th");if(Ce(i,"class",o.cssclass),Ce(i,"style",o.cssstyle),Ce(i,ve,o.name),i.classList.add("fgta5-gridview-head"),i.setAttribute(pe,o.textalign),o.type==Ee){var r=xe();r.addEventListener("change",t=>{Ie(e,t)}),i.appendChild(r),i.setAttribute(le,"")}else if(o.type==Le)i.setAttribute(de,""),i.innerHTML=o.html;else if(o.sorting){var s=document.createElement("span");s.setAttribute("container",""),s.setAttribute(pe,o.textalign);let t=document.createElement("button");t.innerHTML=oe.UNSORT,t.setAttribute(ce,""),t.setAttribute(ue,o.binding),t.addEventListener("click",n=>{Be(e,t)}),(a=document.createElement("div")).innerHTML=o.html,s.appendChild(t),s.appendChild(a),i.classList.add("fgta5-gridview-colwithbutton"),i.appendChild(s)}else{var a=document.createTextNode(o.html);i.appendChild(a)}n.appendChild(i)}e.Nodes.Thead.appendChild(n)}(e,a)}(this)}addRow(e){return Te(this,e)}addRows(e){!function(e,t){var n=e.Nodes.Tbody;for(var i of t)Te(e,i,n)}(this,e)}updateRow(e,t){!function(e,t,n){const i=t.querySelectorAll("td");i.forEach(t=>{const i=t.getAttribute("data-name");if(null!=i&&void 0!==n[i]){let r=n[i];const s=e.Formatters[i];"function"==typeof s&&(r=s(n[i])),t.innerHTML=r}}),Se(e,t)}(this,e,t)}setNext(e,t){}scrollToFooter(){this.Nodes.Tfoot.scrollIntoView({behavior:"smooth"})}#D;get Columns(){return this.#D}setColumnData(e){this.#D=e}#M;get Key(){return this.#M}setKey(e){this.#M=e}rowRender(e){Se(this,e)}removeSelected(e){!function(e,t){var n=e.Nodes.Tbody.querySelectorAll(`tr td[${le}] input[type="checkbox"]:checked`);if(0==n.length)return void("function"==typeof t&&t());for(var i of n){let n=i.closest("tr");n.MarkProcessing=e=>{!0===e||void 0===e?n.setAttribute(be,""):n.removeAttribute(be)};let r=Ne({detail:{tr:n,onFinished:t}});n.MarkProcessing(),e.Listener.dispatchEvent(r),r.handled||(n.MarkProcessing(!1),e.removeRow(n))}}(this,e)}removeRow(e){!function(e,t){const n=e.Nodes.Tbody;t.remove(),0==n.children.length&&(e.CurrentRow=null)}(this,e)}getSelected(){return function(e){var t=e.Nodes.Tbody.querySelectorAll(`tr td[${le}] input[type="checkbox"]:checked`);if(0==t.length)return[];const n=[];for(let e of t){const t=e.closest("tr").getAttribute(fe);n.push(t)}return n}(this)}hasRowPendingProcess(){return e=this.Nodes.Tbody.querySelectorAll(`tr[${be}]`),console.log(e.length),e.length>0;var e}addEventListener(e,t){this.Listener.addEventListener(e,t)}clear(){this.Nodes.Tbody.innerHTML=""}setNext(e,t){!function(e,t,n){var i=e.Nodes.Tfoot.querySelector("tr[data-nextoffset]");null!=i&&i.remove();if(null!=t){var r=document.createElement("tr"),s=document.createElement("td"),a=document.createElement("a");a.innerHTML="load next data",a.setAttribute("href","javascript:void(0)"),a.addEventListener("click",i=>{var r;e.Listener.dispatchEvent((r={detail:{criteria:e.Criteria,nextoffset:t,limit:n,sort:e.getSort()}},new CustomEvent("nextdata",r)))});var o=e.Nodes.Tbody.rows[0].cells.length;s.setAttribute("colspan",o),s.setAttribute("align","center"),s.setAttribute("data-nextoffset",""),s.appendChild(a),r.setAttribute("data-nextoffset",""),r.appendChild(s),e.Nodes.Tfoot.appendChild(r)}}(this,e,t)}getSort(){return _e(this)}#S={};get Criteria(){return this.#S}setCriteria(e){this.#S=e}#B;get CurrentRow(){return this.#B}set CurrentRow(e){this.#B=e,function(e,t){const n=e.Nodes.Tbody;n.querySelectorAll("tr[data-currentrow]").forEach(e=>{e.removeAttribute("data-currentrow")}),null!=t&&(t.setAttribute("data-currentrow",""),function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(t)||t.scrollIntoView({behavior:"smooth",block:"center"}))}(this,e)}previousRecord(){!function(e){const t=e.CurrentRow;if(null==t){console.log("set current row to first row");const t=e.Nodes.Tbody.querySelector("tr");e.CurrentRow=t}else{const n=t;n.previousElementSibling&&(e.CurrentRow=n.previousElementSibling)}}(this)}nextRecord(){!function(e){const t=e.CurrentRow;if(null==t){console.log("set current row to first row");const t=e.Nodes.Tbody.querySelector("tr");e.CurrentRow=t}else{const n=t;n.nextElementSibling&&(e.CurrentRow=n.nextElementSibling)}}(this)}},AppManager:class extends t{constructor(e){var n;super(e),function(e){console.log("constructiong application manager");const n=document.createElement("span"),i=e.Element,r=document.createElement("header"),s=document.createElement("div"),a=document.createElement("nav"),o=i.querySelector(`div[${qe}]`),l=document.createElement("div"),d=i.querySelector(`div[${Pe}]`),u=pt(e,oe.MENU,()=>{ht(e)});i.after(r),r.after(s),s.after(a),n.innerHTML="Application Manager",r.classList.add("fgta5-app-head"),r.appendChild(n),r.appendChild(u),i.classList.add("fgta5-app-main"),a.classList.add("fgta5-appmanager-nav");const{Opened:c}=function(e,t){const n=t.querySelector(`div[${Fe}]`),i=document.createElement("div");return n.classList.add("fgta5-openedmodule"),i.innerHTML=`${dt} `,i.classList.add("fgta5-appmanager-home-subtitle"),i.classList.add(rt),n.classList.add(rt),n.before(i),n.hide=()=>{i.classList.add(rt),n.classList.add(rt)},n.show=()=>{i.classList.remove(rt),n.classList.remove(rt)},{Opened:n}}(0,i),{MenuBoard:m,MenuFooter:p,ProfileButton:h,LogoutButton:v,MenuResetButton:g}=function(e,n){const i=document.createElement("div"),r=pt(e,oe.MENU,()=>{Et(e)}),s=document.createElement("div"),a=pt(e,oe.CLOSE,()=>{gt(e)}),o=document.createElement("div"),l=document.createElement("div"),d=document.createElement("div"),u=document.createElement("div"),c=document.createElement("div"),m=document.createElement("input"),p=document.createElement("button"),h=document.createElement("a"),v=document.createElement("div"),g=document.createElement("div"),f=document.createElement("div");f.appendChild(r),i.setAttribute("header",""),i.appendChild(f),i.appendChild(s),i.appendChild(a),s.innerHTML="Menu",g.classList.add(rt),g.classList.add("fgta5-menu-footer"),g.appendChild(h),o.setAttribute("main",""),o.appendChild(l),o.appendChild(v),o.appendChild(g),o.addEventListener("scroll",()=>{o.scrollTop>10?i.classList.add("fgta5-fixheader-scrolled"):i.classList.remove("fgta5-fixheader-scrolled")}),l.classList.add("fgta5-menu-toppanel"),l.appendChild(d),l.appendChild(u),l.appendChild(c);const b=t.createSvgButton(oe.HOME,nt,()=>{vt(e)}),w=t.createSvgButton(oe.SETTING,nt,()=>{!async function(e){e.Listener.dispatchEvent((t={detail:{user:e.User}},new CustomEvent("openpreference",t)));var t}(e)}),y=document.createElement("div");y.classList.add("fgta5-menu-search"),y.appendChild(m),y.appendChild(p),m.classList.add("fgta5-menu-search"),m.setAttribute("name","menusearch"),m.setAttribute("placeholder","search module"),m.addEventListener("keydown",t=>{"Enter"==t.key&&Nt(e,m.value)}),p.classList.add("fgta5-menu-search"),p.innerHTML=oe.SEARCH,p.addEventListener(st,t=>{m.focus(),Nt(e,m.value)});const E=t.createSvgButton(oe.USER,nt);return E.classList.add(rt),d.setAttribute(je,"left"),d.appendChild(b),d.appendChild(w),u.setAttribute(je,"center"),u.appendChild(y),c.setAttribute(je,"right"),c.appendChild(E),v.classList.add("fgta5-menu"),h.innerHTML=`<div icon>${oe.LOGOUT}</div><div>Sign Out</div>`,h.setAttribute("href","javascript:void(0)"),n.appendChild(o),n.appendChild(i),{MenuBoard:v,MenuFooter:g,ProfileButton:E,LogoutButton:h,MenuResetButton:r}}(e,a);e.Listener=new EventTarget,e.Nodes={Head:r,Nav:a,Main:i,IFrames:s,Favourite:o,Opened:c,Currentuser:d,MenuBoard:m,MenuFooter:p,ProfileButton:h,LogoutButton:v,MenuResetButton:g,TrashBox:l,Title:n}}(this),n=this,window.addEventListener("message",e=>{if(null!=e.data.action){var i=e.data.action;if(i==t.ACTION_SHOWMENU)ht(n);else if(i==t.ACTION_SHOWHOME)vt(n);else if(i==t.ACTION_APPLICATIONLOADED);else if("REDIRECT_TO_LOGIN"==i){const t=window.location.href,n=e.data.nexturl,i=`${e.data.href}?nexturl=${t}&nextmodule=${n}`;location.href=i}}}),window.history.pushState(null,"",window.location.href),window.addEventListener("popstate",function(e){e.preventDefault(),window.history.pushState(null,"",window.location.href)})}RootIcons;#_={};get Modules(){return this.#_}#c;get Title(){return this.#c}setTitle(e){this.#c=e,function(e,t){e.Nodes.Title.innerHTML=t}(this,e)}setMenu(e){!function(e,t){e.RootIcons=Lt(e,t),At(e,e.RootIcons)}(this,e)}showMenu(){ht(this)}setFavourite(e){!function(e,t){if(null==e.Nodes.Favourite)return;const n=e.Nodes.Favourite,i=document.createElement("div"),r=e.Nodes.TrashBox,s=document.createElement("div"),a=document.createElement("div"),o=document.createElement("div");i.innerHTML=`${lt} `,i.classList.add("fgta5-appmanager-home-subtitle"),a.setAttribute(Xe,""),a.innerHTML=oe.TRASH,a.setAttribute(Qe,""),o.innerHTML="Delete",s.setAttribute(et,""),s.appendChild(a),s.appendChild(o),r.classList.add("fgta5-favourite-trashcontainer"),r.classList.add(rt),r.appendChild(s),e.Nodes.Head.after(r),n.before(i),n.classList.add("fgta5-menu"),n.classList.add("fgta5-favourite"),n.addEventListener("dragover",e=>{!function(e,t,n){if("addtofave"==mt){null==n.querySelector(`[name="${ct}"]`)&&(t.preventDefault(),n.setAttribute(Je,""))}}(0,e,n)}),n.addEventListener("dragleave",e=>{!function(e,t,n){n.removeAttribute(Je)}(0,0,n)}),n.addEventListener("drop",t=>{!function(e,t,n){n.removeAttribute(Je);const i=t.dataTransfer.getData("modulename");if(""==i)return;var r=n.querySelector(`[name="${i}"]`);if(null==r){t.preventDefault();const r=e.Modules[i];if(null==r)return;let s=wt(e,r.data);xt(e,s,i,n),n.prepend(s),e.Listener.dispatchEvent((e=>new CustomEvent("addtofavourite",e))({detail:{modulename:i}}))}}(e,t,n)});for(let i of t){let t=e.Modules[i];if(null!=t){let r=wt(e,t.data);xt(e,r,i,n),n.appendChild(r)}}}(this,e)}async openModule(e){await bt(this,e),gt(this)}#H;get User(){return this.#H}setUser(e){this.#H=e,function(e,t){const n=e.Nodes.ProfileButton,i=e.Nodes.LogoutButton;e.Nodes.MenuFooter.classList.remove(rt),n.classList.remove(rt),n.addEventListener(st,t=>{!function(e){e.Listener.dispatchEvent((e=>new CustomEvent("openprofile",e))({detail:{user:e.User}}))}(e)}),i.addEventListener(st,t=>{!async function(e){"ok"==await $fgta5.MessageBox.confirm("are you sure to log out ?")&&e.Listener.dispatchEvent((e=>new CustomEvent("logout",e))({detail:{user:e.User}}))}(e)}),e.Nodes.Currentuser.innerHTML=t.displayname}(this,e)}addEventListener(e,t){this.Listener.addEventListener(e,t)}},Application:class extends t{constructor(e){super(e),function(e){console.log("constructiong application");const n=e.Element,i=document.createElement("header"),r=document.createElement("footer");n.after(i),i.after(r),i.classList.add("fgta5-app-head"),n.classList.add("fgta5-app-main"),r.classList.add("fgta5-app-footer"),r.classList.add("hidden"),function(e,n){const i=document.createElement("div"),r=document.createElement("span"),s=document.createElement("div"),a=t.createSvgButton(oe.HOME,Ot,()=>{window.parent.postMessage({action:t.ACTION_SHOWHOME},"*")}),o=t.createSvgButton(oe.MENU,Ot,()=>{window.parent.postMessage({action:t.ACTION_SHOWMENU},"*")});i.appendChild(a),s.appendChild(o),t.isInContainer()||(a.classList.add("hidden"),o.classList.add("hidden"));r.id=Rt,r.innerHTML="loading ...",n.appendChild(i),n.appendChild(r),n.appendChild(s)}(0,i),function(e,t){t.innerHTML="empty footer content"}(0,r),e.Nodes={Head:i,Main:n,Footer:r},window.addEventListener("load",e=>{console.log("application loaded."),window.parent.postMessage({action:t.ACTION_APPLICATIONLOADED},"*")}),window.addEventListener("message",n=>{const i=n.data;if(null!=i.action){var r=i.action;r==t.ACTION_APPLICATIONLOADED?null!=i.module&&null!=i.module.title&&Vt(e,i.module.title):"REDIRECT_TO_LOGIN"==r&&console.log("BUAT PROGRAM UNTUK REDIRECT KE LOGIN")}})}(this)}setTitle(e){Vt(this,e)}showFooter(e){!function(e,t){const n=e.Nodes.Main,i=e.Nodes.Footer;t?(n.setAttribute($t,""),i.classList.remove("hidden")):(n.removeAttribute($t),i.classList.add("hidden"))}(this,e)}},ModuleData:Re,Section:Ht,SectionCarousell:class{#O={};#E=new EventTarget;#R;#$;#V;static get EVT_SECTIONSHOWING(){return qt}constructor(e){!function(e,t){t.classList.add("fgta5-carousellcontainer");const n=t.querySelectorAll('section[class="fgta5-carousell"]');let i=0;for(let r of n){const n=new Ht(r,{index:i,carousell:e,fn_getActiveSection:()=>Ft(e,t)}),s=n.Name;0==i&&e.setFirstSection(n),null==e.CurrentSection&&e.setCurrentSection(n),e.Items[s]=n,++i}}(this,e)}get Items(){return this.#O}get Listener(){return this.#E}get CurrentSection(){return this.#R}get IconUrl(){return this.#$}addEventListener(e,t){this.Listener.addEventListener(e,t)}setCurrentSection(e){this.#R=e}setFirstSection(e){this.#V=e}setIconUrl(e){this.#$=e,this.#V.setIconUrl(e)}dispatchSectionShowing(e,t){this.Listener.dispatchEvent(new CustomEvent(qt,{detail:{currSection:e,commingSection:t}}))}},Icons:oe,ActionButton:class{#q=[];constructor(e,t=null){if(this.Listener=new EventTarget,null!=e){const t=document.getElementById(e);null!=t&&this.#q.push(t)}if(null!=t){const n=null==e?`[data-action="${t}"]`:`[data-action="${t}"]:not(#${e})`,i=document.querySelectorAll(n);this.#q=[...this.#q,...Array.from(i)]}this.#q.forEach(e=>{e.setAttribute("tabindex","-1"),e.addEventListener("click",e=>{(this.#m||this.#F)&&(console.warn("action is not allowed!"),e.stopImmediatePropagation())})})}#m=!1;get disabled(){return this.#m}set disabled(e){this.#m=e,this.#q.forEach(t=>{e?t.setAttribute("disabled",!0):t.removeAttribute("disabled")})}#F=!1;isHidden(){return this.#F}hide(e=!0){this.#q.forEach(t=>{e?t.classList.add("hidden"):t.classList.remove("hidden")})}setText(e){this.#q.forEach(t=>{t.innerHTML=e})}addEventListener(e,t){this.#q.forEach(n=>{n.addEventListener(e,t)})}click(){this.#m||this.#q[0].click()}},Dialog:Pt,ApiEndpoint:class{#P="POST";#U={"Content-Type":"application/json"};#T;#z;constructor(e){this.#T=new AbortController,this.#z=e}get headers(){return this.#U}get method(){return this.#P}set method(e){this.#P=e}abort(){this.#T.abort()}dispose(){this.#T=null}setHeader(e,t){this.#U[e]=t}async execute(e,t){const n=this.#T.signal,i=this.#z,r=this.#P,s=this.#U;let a;null==e&&(e={}),null==t?a=JSON.stringify(e):(delete s["Content-Type"],t.append("form-body-jsondata",new Blob([JSON.stringify(e)],{type:"application/json"})),a=t);const o={method:r,headers:s,body:a},l=Object.assign({signal:n},o);try{const e=await fetch(i,l);if(!e.ok){const t=e.status,n=e.statusText;let i=`${t} ${n}: ${await e.text()}`;401==t&&(sessionStorage.removeItem("login"),sessionStorage.removeItem("login_nexturl"),i="authentication is needed to access resource");const r=new Error(i);throw r.status=t,r.code=e.code||1,r}const t=await e.json();if(0!=t.code){const e=new Error(t.message);throw e.code=t.code,e}return t.result}catch(e){if("AbortError"!==e.name)throw e;console.warn("Request dibatalkan!")}}}};void 0===window.$validators?window.$validators=zt:Object.assign(window.$validators,zt),void 0===window.$fgta5||null===window.$fgta5?window.$fgta5=Wt:Object.assign(window.$fgta5,Wt);
|
|
11
|
+
//# sourceMappingURL=fgta5js-v1.8.3.min.js.map
|