diff --git a/public/ui-ui-1tbtnod.min.js b/public/ui-ui-9z9r87.min.js similarity index 96% rename from public/ui-ui-1tbtnod.min.js rename to public/ui-ui-9z9r87.min.js index 1708110ee..cefe5e46e 100644 --- a/public/ui-ui-1tbtnod.min.js +++ b/public/ui-ui-9z9r87.min.js @@ -17,6 +17,12 @@ Updated: 2023-01-23T09:21:04.000Z Author: Peter Širka +Component: j-AutoComplete +Version: 1 +Updated: 2024-02-28T13:13:01.000Z +Author: Peter Širka + + Component: j-AutoExec Version: 1 Updated: 2023-01-23T09:25:01.000Z @@ -97,7 +103,7 @@ Author: Peter Širka Component: j-Directory Version: 1 -Updated: 2024-02-27T09:31:01.000Z +Updated: 2024-04-22T15:51:01.000Z Author: Peter Širka @@ -139,7 +145,7 @@ Author: Peter Širka Component: j-FileReader Version: 1 -Updated: 2023-10-04T09:05:00.000Z +Updated: 2024-04-23T13:49:00.000Z Author: Peter Širka @@ -355,7 +361,7 @@ Author: Peter Širka Component: j-Prompt Version: 1 -Updated: 2024-03-13T10:57:00.000Z +Updated: 2024-04-09T21:06:00.000Z Author: Peter Širka @@ -531,6 +537,8 @@ CSS(`.animation{visibility:hidden}.ui-animation-1-init{transition:all 0.2s;opaci .ui-approve-noscroll,.ui-approve-noscroll body{overflow:hidden}.ui-approve{background-color:rgba(255,255,255,0.9);position:fixed;left:0;right:0;bottom:0;top:0;z-index:100;width:100%;display:table;height:100%;transition:0.5s all;opacity:0}.ui-approve > div{display:table-cell;vertical-align:middle;text-align:center;color:#FFF;padding:15px}.ui-approve-body{color:#000;padding:0;position:relative;display:inline-block;max-width:300px;text-align:left;transform:scale(0.8);transition:0.15s all;border:0;background-color:#FFF;box-shadow:0 0 30px rgba(0,0,0,0.1)}.ui-approve-content{padding:50px 30px;text-align:center}.ui-approve-content > i{font-size:50px;display:block;margin-bottom:10px}.ui-approve-buttons{height:40px}.ui-approve button{font-size:12px;float:left;cursor:pointer;outline:0;background-color:#E0E0E0;border:0;border-radius:0;color:gray;padding:0;width:50%;height:40px;font-weight:normal;margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ui-approve button i{margin-right:5px}.ui-approve button:hover{opacity:0.9}.ui-approve-close{position:absolute;color:#C0C0C0;font-size:11px;right:8px;top:5px;cursor:pointer}.ui-approve-close:hover{color:#A0A0A0}.ui-approve-visible{opacity:1}.ui-approve-visible .ui-approve-body{-webkit-transform:scale(1);transform:scale(1)}.ui-approve-click{transform:scale(1.07) !important}.ui-dark .ui-approve{background-color:rgba(0,0,0,0.9)}.ui-dark .ui-approve-body{background-color:#202020}.ui-dark .ui-approve-content{border-bottom-color:#303030;color:#FFF}.ui-dark .ui-approve button{background-color:#505050;color:#C0C0C0}.ui-dark .ui-approve-close{color:#505050}.ui-dark .ui-approve-close:hover{color:#888}.ui-approve button[data-index='0']{color:#FFF;font-weight:bold;font-weight:bold;background-color:#EC2C28}@media(max-width:340px){.ui-approve button{display:block;margin:8px 0 0;display:block;width:100%;height:34px;font-size:13px}} +.ui-autocomplete-container{position:absolute;z-index:60}.ui-autocomplete{background-color:#FFF;width:100%;margin:-5px 0 0;padding:2px 0;border-radius:0 0 var(--radius) var(--radius);box-shadow:0 5px 20px rgba(0,0,0,0.1);border:1px solid #E0E0E0;line-height:14px;overflow:hidden}.ui-autocomplete ul{list-style-type:none;margin:0;padding:0}.ui-autocomplete li{margin:0;padding:0 12px;border-bottom:1px solid #F0F0F0;cursor:pointer;font-size:13px;color:#505050;height:30px;line-height:30px}.ui-autocomplete li:last-child{border-bottom:0}.ui-autocomplete .selected{background-color:#F0F0F0}.ui-autocomplete li span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}.ui-dark .ui-autocomplete{background-color:#303030;border-color:#404040}.ui-dark .ui-autocomplete li{color:gray;border-bottom-color:#404040}.ui-dark .ui-autocomplete .selected{background-color:#454545;color:#FFF} + .ui-box-noscroll,.ui-box-noscroll body{overflow:hidden}.ui-box-container{width:100%;position:fixed;left:0;top:0;bottom:0;right:0;z-index:5;overflow:hidden;transform-style:preserve-3d}.ui-box-bg{background-color:rgba(230,233,237,0.8)}.ui-box-nobg .ui-box{border:1px solid #E9E9E9}.ui-box-transparent{pointer-events:none}.ui-box{background-color:#FFF;border-radius:3px;box-shadow:0 10px 30px rgba(0,0,0,0.1);transform:scale(0);transition:all 0.15s;opacity:0;text-align:left;position:relative;margin:0 auto;pointer-events:all}.ui-box-animate{transform:scale(1);opacity:1}.ui-box-title{padding:0 10px 0 var(--gap);line-height:57px;font-size:16px;user-select:none;color:#000;background-color:#FFF;border-bottom:1px solid #E0E0E0;height:58px;border-radius:3px 3px 0 0}.ui-box-title .ui-box-button-close{float:right;cursor:pointer;font-size:18px;margin:1px 0 0;background:none;border:0;outline:0;height:auto;color:red;text-align:right !important;width:20px;padding:0}.ui-box-title .ui-box-button-close:hover{transform:scale(1.1)}.ui-box-title > nav{float:right;margin-right:18px;font-size:14px}.ui-box-title > nav button{border:0;margin:15px 0 0;background-color:#F0F0F0;height:28px;padding:0 10px;color:#000;cursor:pointer;font-family:Arial;line-height:23px;vertical-align:middle;outline:0;font-size:12px;text-decoration:none;transition:all 0.3s;float:left;border-left:1px solid #E0E0E0}.ui-box-title > nav button i{width:12px;text-align:center;margin-right:5px}.ui-box-title > nav button:hover{opacity:0.8}.ui-box-title > nav button:active{background-color:#D0D0D0}.ui-box-title > nav button:disabled{background-color:#F5F5F5 !important;border-color:#E0E0E0 !important;color:silver !important;cursor:not-allowed;box-shadow:none}.ui-box-title > nav button:disabled i{color:silver !important}.ui-box-title > nav button:first-child{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius);border-left:0}.ui-box-title > nav button:last-child{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.ui-box-title i{margin-right:7px}.ui-box-title > span{font-weight:bold}.ui-box > nav{padding:0 15px 0;border-top:1px solid #E0E0E0;background-color:#FFF;border-radius:0 0 3px 3px;line-height:65px;height:65px;display:block;float:none;width:100%}.ui-box > nav button{border:0;margin:15px 0 0;background-color:#F0F0F0;height:34px;padding:0 20px;color:#000;cursor:pointer;font-family:Arial;line-height:34px;vertical-align:middle;outline:0;font-size:14px;text-decoration:none;transition:all 0.3s;float:left;width:50%}.ui-box > nav button i{width:15px;text-align:center;margin-right:5px}.ui-box > nav button:hover{opacity:0.8}.ui-box > nav button:active{background-color:#D0D0D0}.ui-box > nav button:disabled{background-color:#F5F5F5 !important;border-color:#E0E0E0 !important;color:silver !important;cursor:not-allowed;box-shadow:none}.ui-box > nav button:disabled i{color:silver !important}.ui-box > nav button:first-child{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius)}.ui-box > nav button:last-child{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.ui-box > nav button[name='submit']{font-weight:bold;background-color:var(--color);color:#FFF}.ui-box-style-2 .ui-box{border-bottom-right-radius:0;border-bottom-left-radius:0}.ui-box-style-3 .ui-box{border-top-right-radius:0;border-top-left-radius:0}.ui-box-align-left{margin:0 auto 0 0}.ui-box-align-right{margin:0 0 0 auto}.ui-dark .ui-box{background-color:#202020}.ui-dark .ui-box-bg{background-color:rgba(50,50,50,0.9)}.ui-dark .ui-box-nobg .ui-box{border-color:#333}.ui-dark .ui-box-title{background-color:#202020;border-bottom-color:#303030;color:#FFF}.ui-dark .ui-box-title > nav{background-color:#202020;border-top-color:#303030}.ui-dark .ui-box-title > nav button{border-color:#404040;background-color:#505050;color:#E0E0E0}.ui-dark .ui-box-title > nav button:active{background-color:#404040}.ui-dark .ui-box-title > nav button:disabled i{color:#606060 !important}.ui-dark .ui-box-title > nav button:disabled{background-color:#303030 !important;color:#606060 !important;border-color:#202020 !important}.ui-dark .ui-box > nav{background-color:#202020;border-top-color:#303030}.ui-dark .ui-box > nav button{border-color:#202020;background-color:#505050;color:#F0F0F0}.ui-dark .ui-box > nav button[name='submit']{background-color:var(--color)}.ui-dark .ui-box > nav button:active{background-color:#404040}.ui-dark .ui-box > nav button:disabled i{color:#606060 !important}.ui-dark .ui-box > nav button:disabled{background-color:#303030 !important;color:#606060 !important;border-color:#202020 !important}@media(max-width:767px){.ui-box-container{background:none;padding:0 !important}.ui-box{border-radius:0;max-width:none !important;width:100% !important}} .ui-checkbox{position:relative;font-size:13px;margin-bottom:5px}.ui-checkbox *{height:25px;cursor:pointer}.ui-checkbox span{width:20px;height:20px;line-height:19px;font-size:11px;margin:0 7px 0 0;text-align:center;float:left;border:1px solid #D0D0D0;border-radius:var(--radius);background:#FFF}.ui-checkbox span i{display:none}.ui-checkbox.ui-checkbox-checked span i{display:inline-block}.ui-checkbox label{line-height:19px}.ui-checkbox.ui-disabled *{cursor:not-allowed}.ui-checkbox.ui-disabled{color:#A0A0A0}.ui-checkbox.ui-disabled span{background-color:#F0F0F0;color:#B0B0B0;border-color:#E0E0E0}.ui-dark .ui-checkbox span{border-color:#404040;background:#252525}.ui-dark .ui-checkbox.ui-disabled span{background-color:#282828;color:#999;border-color:#303003}.ui-dark .ui-checkbox.ui-disabled{color:#666} @@ -613,7 +621,7 @@ CSS(`.animation{visibility:hidden}.ui-animation-1-init{transition:all 0.2s;opaci .ui-progress{background-color:#F0F0F0;border-radius:var(--radius);box-sizing:border-box}.ui-progress div{background-size:56px 56px;animation:progress 20s infinite linear forwards;margin-right:30px;background-image:repeating-linear-gradient(45deg,#4285F4,#4285F4 10px,#4993E7 10px,#4993E7 20px);text-align:right;font-size:10px;color:#FFF;padding:2px 5px 0 0;height:18px;font-weight:bold;border-radius:3px;min-width:30px}.ui-dark .ui-progress{background-color:#303030}@keyframes progress{from{background-position:0% 0%}to{background-position:100% 0%}} -.ui-prompt-noscroll,.ui-prompt-noscroll body{overflow:hidden}.ui-prompt-container{position:fixed;left:0;right:0;bottom:0;top:0}.ui-prompt-body{background-color:#FFF;margin:20px auto;border-radius:10px;box-shadow:0 2px 30px rgba(0,0,0,0.2);overflow:hidden;border:1px solid #D0D0D0;width:100%;padding:20px}.ui-prompt-title{font-size:16px;color:#000;margin:0 0 5px;font-weight:bold}.ui-prompt-summary{font-size:13px;color:#777;margin:0 0 7px}.ui-prompt-input{border:2px solid #E0E0E0;padding:2px 5px;border-radius:var(--radius)}.ui-prompt-input input{width:100%;border:0;background:transparent;height:24px;outline:0}.ui-prompt-buttons{text-align:right;margin:5px 0 0}.ui-prompt button{border:0;margin:15px 0 0;background-color:#F0F0F0;height:34px;padding:0 15px;color:#000;cursor:pointer;font-family:Arial;line-height:34px;vertical-align:middle;outline:0;font-size:14px;text-decoration:none;transition:all 0.3s;min-width:90px}.ui-prompt button i{width:15px;text-align:center;margin-right:5px}.ui-prompt button:hover{opacity:0.9}.ui-prompt button:active{background-color:#D0D0D0}.ui-prompt button:disabled{background-color:#F5F5F5 !important;color:silver !important;cursor:not-allowed;box-shadow:none}.ui-prompt button:first-child{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius)}.ui-prompt button:last-child{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.ui-prompt button[name='submit']{font-weight:bold;background-color:var(--color);color:#FFF}.ui-dark .ui-prompt-body{background-color:#303030;border-color:#404040}.ui-dark .ui-prompt-title{color:#FFF}.ui-dark .ui-prompt-summary{color:#888}.ui-dark .ui-prompt-input{border-color:#555;background-color:#222}.ui-dark .ui-prompt-input input{background:transparent}.ui-dark .ui-prompt button{background-color:#505050;color:#E0E0E0}.ui-dark .ui-prompt button:active{background-color:#404040}.ui-dark .ui-prompt button:disabled{background-color:#303030 !important;color:#606060 !important}.ui-dark .ui-prompt button[name='submit']{background-color:var(--color);color:#FFF} +.ui-prompt-noscroll,.ui-prompt-noscroll body{overflow:hidden}.ui-prompt-container{position:fixed;left:0;right:0;bottom:0;top:0}.ui-prompt-body{background-color:#FFF;margin:20px auto;border-radius:10px;box-shadow:0 2px 30px rgba(0,0,0,0.2);overflow:hidden;border:1px solid #D0D0D0;width:100%;padding:20px}.ui-prompt-title{font-size:16px;color:#000;margin:0 0 5px;font-weight:bold}.ui-prompt-summary{font-size:13px;color:#777;margin:0 0 7px}.ui-prompt-input{border:2px solid #E0E0E0;padding:2px 5px;border-radius:var(--radius)}.ui-prompt-input input{width:100%;border:0;background:transparent;height:24px;outline:0}.ui-prompt-buttons{text-align:right;margin:5px 0 0}.ui-prompt-centered .ui-prompt-area{width:100%;height:100%;display:grid;align-items:center}.ui-prompt button{border:0;margin:15px 0 0;background-color:#F0F0F0;height:34px;padding:0 15px;color:#000;cursor:pointer;font-family:Arial;line-height:34px;vertical-align:middle;outline:0;font-size:14px;text-decoration:none;transition:all 0.3s;min-width:90px}.ui-prompt button i{width:15px;text-align:center;margin-right:5px}.ui-prompt button:hover{opacity:0.9}.ui-prompt button:active{background-color:#D0D0D0}.ui-prompt button:disabled{background-color:#F5F5F5 !important;color:silver !important;cursor:not-allowed;box-shadow:none}.ui-prompt button:first-child{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius)}.ui-prompt button:last-child{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.ui-prompt button[name='submit']{font-weight:bold;background-color:var(--color);color:#FFF}.ui-dark .ui-prompt-body{background-color:#303030;border-color:#404040}.ui-dark .ui-prompt-title{color:#FFF}.ui-dark .ui-prompt-summary{color:#888}.ui-dark .ui-prompt-input{border-color:#555;background-color:#222}.ui-dark .ui-prompt-input input{background:transparent}.ui-dark .ui-prompt button{background-color:#505050;color:#E0E0E0}.ui-dark .ui-prompt button:active{background-color:#404040}.ui-dark .ui-prompt button:disabled{background-color:#303030 !important;color:#606060 !important}.ui-dark .ui-prompt button[name='submit']{background-color:var(--color);color:#FFF} .ui-properties2-group:first-child{margin-top:10px}.ui-properties2-group:last-child section{margin-bottom:0}.ui-properties2-group{padding:0;margin-bottom:20px;border:1px solid #E0E0E0;border-radius:var(--radius) var(--radius) 0 0}.ui-properties2-2 .ui-properties2-group{border:0}.ui-properties2-group label{display:block;padding:10px 15px;font-size:16px;font-weight:bold;background-color:#F8F8F8;border-radius:var(--radius) var(--radius) 0 0}.ui-properties2-2 label{background:transparent;font-size:11px;color:#A0A0A0;font-weight:normal;padding-bottom:5px}.ui-properties2-2 section{background:#FFF;border-radius:15px;padding:10px 0;border:1px solid #E0E0E0}.ui-properties2-group label i{width:22px}.ui-properties2-group label i:before{content:'\\f146'}.ui-properties2-hidden label i:before{content:'\\f0fe' !important}.ui-properties2-hidden section{display:none}.ui-properties2-item{padding:6px 0;background-color:#FFF;font-size:12px;border-top:1px solid #EBEBEB}.ui-properties2-2 .ui-properties2-item{border-top-color:#ECECEC;margin:0 15px}.ui-properties2-2 .ui-properties2-item:last-child div{border-bottom:0}.ui-properties2-item > i{float:left;width:24px;height:24px;margin:10px 5px 0 0;font-size:20px}.ui-properties2-2 .ui-properties2-item > i{margin-top:8px;background:#606060;border-radius:6px;font-size:14px;color:#FFF;text-align:center;line-height:24px;width:24px;height:24px}.ui-properties2-isnote > i{margin-top:17px !important}.ui-properties2-required .ui-properties2-key:after{content:'*';color:red;margin-left:5px;font-weight:bold}.ui-properties2-key{float:left;width:170px;line-height:24px;padding:0 5px 0 15px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:#707070}.ui-properties2-key i{margin-right:7px}.ui-properties2-2 .ui-properties2-item{cursor:pointer}.ui-properties2-2 .ui-properties2-text:empty::after{content:"\\00a0\\0020"}.ui-properties2-2 .ui-properties2-value{margin-left:170px;text-align:right;color:#777;margin-right:0;line-height:21px;font-weight:normal !important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-properties2-2 .ui-properties2-item{font-size:13px;padding:0;border-top:0}.ui-properties2-2 .ui-properties2-item > div{padding:10px 0 8px;border-bottom:1px solid #E0E0E0}.ui-properties2-2 .ui-properties2-isicon > div{margin-left:40px}.ui-properties2-2 .ui-properties2-key{color:#000;padding-left:0;line-height:20px}.ui-properties2-2 .ui-properties2-color span b{width:19px;border-radius:100%}.ui-properties2-value{margin:0 10px 0 170px;line-height:21px}.ui-properties2-note{color:#A0A0A0;font-size:11px;line-height:13px;font-weight:normal}.ui-properties2-string, .ui-properties2-number, .ui-properties2-date, .ui-properties2-list, .ui-properties2-menu, .ui-properties2-file{padding:0}.ui-properties2-string input, .ui-properties2-number input, .ui-properties2-date input{outline:0;height:21px;padding:0;margin:0;width:100%;border:0;line-height:21px;background-color:transparent}.ui-properties2-2 input{text-align:right;color:#777;height:17px}.ui-properties2 input:disabled{color:#A0A0A0}.ui-disabled .ui-properties2-value{color:#A0A0A0;cursor:default}.ui-disabled .ui-properties2-value *{cursor:default}.ui-properties2-date > i{float:right;width:18px;margin:4px 1px 0 0;text-align:right;font-size:12px}.ui-properties2-date > div{margin-right:18px}.ui-properties2-bool, .ui-properties2-list, .ui-properties2-menu, .ui-properties2-color, .ui-properties2-fontawesome, .ui-properties2-emoji, .ui-properties2-file{line-height:22px}.ui-properties2-bool span{width:32px;height:18px;display:inline-block;border:1px solid #E0E0E0;line-height:15px;font-size:9px;margin:3px 0 5px;position:relative;cursor:pointer;color:#FFF;vertical-align:top;border-radius:100px;background:#E0E0E0;transition:all 0.3s;text-align:left}.ui-properties2-2 .ui-properties2-bool span{margin-top:0}.ui-properties2-bool span i{width:16px;height:16px;position:relative;display:inline-block;border-radius:100px;background:#FFF;transition:margin 0.3s}.ui-properties2-bool .checked{background-color:var(--color);border-color:var(--color)}.ui-properties2-bool .checked i{margin-left:14px}.ui-disabled .ui-properties2-bool .checked{background-color:#A0A0A0;border-color:#A0A0A0}.ui-properties2-fontawesometoggle, .ui-properties2-emojitoggle, .ui-properties2-color{width:22px;line-height:22px;display:block;cursor:pointer;font-size:20px;position:relative;text-align:left;margin-bottom:3px;display:inline-block;margin-right:1px}.ui-properties2-2 .ui-properties2-fontawesometoggle, .ui-properties2-2 .ui-properties2-emojitoggle, .ui-properties2-2 .ui-properties2-color{margin-bottom:0}.ui-properties2-fontawesometoggle{height:22px}.ui-properties2-2 .ui-properties2-fontawesometoggle{height:auto}.ui-properties2-list, .ui-properties2-menu, .ui-properties2-exec{cursor:pointer}.ui-properties2-list i, .ui-properties2-menu i, .ui-properties2-exec i{margin-left:7px}.ui-properties2-list i, .ui-properties2-menu i{float:right;width:20px;line-height:23px;text-align:right;font-size:12px}.ui-properties2-list span, .ui-properties2-menu span{display:block;margin-right:25px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-properties2-2 .ui-properties2-list span, .ui-properties2-2 .ui-properties2-menu span{margin-right:0 !important}.ui-properties2-2 .ui-properties2-date > i{margin-top:3px}.ui-properties2-2 .ui-properties2-list span, .ui-properties2-2 .ui-properties2-menu span{margin-right:18px}.ui-properties2-2 .ui-properties2-list i, .ui-properties2-2 .ui-properties2-menu i{width:18px;color:#A0A0A0}.ui-properties2-file{cursor:pointer}.ui-properties2-file i{float:right;width:20px;line-height:22px;text-align:right;font-size:10px}.ui-properties2-file span{display:block;margin-right:25px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-properties2-changed{font-weight:bold}.ui-properties2-changed .ui-properties2-key{color:#000}.ui-properties2-color{padding:0;line-height:12px}.ui-properties2-color span b{height:18px;display:block;border-radius:var(--radius);color:gray;width:60px}.ui-properties2-invalid{font-weight:bold;color:red !important}.ui-properties2-invalid .ui-properties2-key{border-right-color:red !important}.ui-properties2-camouflage input{filter:blur(3px)}.ui-properties2-monospace input{font-family:Menlo, Consolas, monospace}.ui-properties2-camouflage input:focus{filter:unset}.ui-properties2-ricon{float:right;width:34px;height:24px;line-height:20px;text-align:center;color:gray;font-weight:normal;cursor:pointer}.ui-properties2-ricon i{font-size:14px;color:#000;padding:5px 0 0;display:block}.ui-properties2-isricon .ui-properties2-value{margin-right:34px}.ui-properties2-2 .ui-properties2-ricon i{padding:3px 0 0}.ui-properties2-2 .ui-properties2-ricon{line-height:20px}.ui-properties2-value.right input{text-align:right}.ui-properties2-value.center input{text-align:center}#properties2upload{position:absolute;left:-100px;top:-100px;opacity:0}.ui-dark .ui-properties2-group{border-color:#404040}.ui-dark .ui-properties2-item{border-color:#303030;background-color:#202020}.ui-dark .ui-properties2-item > div{border-bottom-color:#404040}.ui-dark .ui-properties2-2 section, .ui-dark .ui-properties2-2 .ui-properties2-item{background-color:#282828}.ui-dark .ui-properties2-2 section{border-color:#252525}.ui-dark .ui-properties2-key{color:#A0A0A0}.ui-dark .ui-properties2-2 .ui-properties2-key{color:#FFF}.ui-dark .ui-properties2-group label{background-color:#282828}.ui-dark .ui-properties2-2 label{background-color:transparent}.ui-dark .ui-properties2-bool span{border-color:#505050;background-color:#505050}.ui-dark .ui-properties2-bool span.checked{border-color:var(--color);background-color:var(--color)}.ui-dark .ui-properties2-changed .ui-properties2-key{color:#FFF}.ui-dark .ui-properties2-note{color:#606060}.ui-dark .ui-properties2-list i, .ui-dark .ui-properties2-menu i, .ui-dark .ui-properties2-date{color:gray}.ui-dark .ui-properties2-ricon{color:#888}.ui-dark .ui-properties2-ricon i{color:#FFF} @@ -647,6 +655,8 @@ COMPONENT('approve','cancel:Cancel',function(self,config,cls){var cls2='.'+cls,e COMPONENT('audio',function(self){var can=false,volume=0.5;self.items=[];self.readonly();self.singleton();self.make=function(){var audio=document.createElement('audio');if(audio.canPlayType&&audio.canPlayType('audio/mpeg').replace(/no/,''))can=true};self.play=function(url){if(!can)return;var audio=new window.Audio();audio.src=url;audio.volume=volume;audio.play();audio.onended=function(){audio.$destroy=true;self.cleaner()};audio.onerror=function(){audio.$destroy=true;self.cleaner()};audio.onabort=function(){audio.$destroy=true;self.cleaner()};self.items.push(audio);return self};self.cleaner=function(){var index=0;while(true){var item=self.items[index++];if(item===undefined)return self;if(!item.$destroy)continue;item.pause();item.onended=null;item.onerror=null;item.onsuspend=null;item.onabort=null;item=null;index--;self.items.splice(index,1)}};self.stop=function(url){if(!url){self.items.forEach(function(item){item.$destroy=true});return self.cleaner()}var index=self.items.findIndex('src',url);if(index===-1)return self;self.items[index].$destroy=true;return self.cleaner()};self.setter=function(value){if(value===undefined)value=0.5;else value=(value/100);if(value>1)value=1;else if(value<0)value=0;volume=value?+value:0;for(var i=0,length=self.items.length;i{{ name}}');self.readonly();self.singleton();self.nocompile&&self.nocompile();self.make=function(){self.aclass(cls+'-container hidden');self.html('
    ');scroller=self.find('.noscrollbar');container=self.find('ul');self.event('click','li',function(e){e.preventDefault();e.stopPropagation();if(self.opt.callback){var val=datasource[+$(this).attrd('index')];self.opt.scope&&M.scope(self.opt.scope);if(self.opt.path)SET(self.opt.path,val.value===undefined?val.name:val.value);else self.opt.callback(val,old)}self.visible(false)});self.event('mouseenter mouseleave','li',function(e){if(!skipmouse){prev&&prev.rclass(clssel);prev=$(this).tclass(clssel,e.type==='mouseenter')}});$(document).on('click',function(){is&&self.visible(false)});self.on('scroll + resize + reflow + resize2',function(){is&&self.visible(false)})};self.prerender=function(value){self.render(value)};self.configure=function(name,value){switch(name){case'height':value&&scroller.css('height',value);break}};function keydown(e){var c=e.which,input=this;if(c!==38&&c!==40&&c!==13){if(c!==8&&c<32)return;clearTimeout(searchtimeout);searchtimeout=setTimeout(function(){var val=input.value||input.innerHTML;if(!val)return self.render(EMPTYARRAY);if(searchvalue===val)return;searchvalue=val;self.resize();self.opt.search(val,self.prerender)},200);return}if(!datasource||!datasource.length||!is)return;var current=container.find('.'+clssel);if(c===13){if(prev){prev=null;self.visible(false);if(current.length){var val=datasource[+current.attrd('index')];self.opt.scope&&M.scope(self.opt.scope);if(self.opt.callback)self.opt.callback(val,old);else if(self.opt.path)SET(self.opt.path,val.value===undefined?val.name:val.value);e.preventDefault();e.stopPropagation()}}return}e.preventDefault();e.stopPropagation();if(current.length){current.rclass(clssel);current=c===40?current.next():current.prev()}skipmouse=true;!current.length&&(current=self.find('li:{0}-child'.format(c===40?'first':'last')));prev&&prev.rclass(clssel);prev=current.aclass(clssel);var index=+current.attrd('index');var h=current.innerHeight();var offset=((index+1)*h)+(h*2);scroller[0].scrollTop=offset>config.height?offset-config.height:0;setTimeout2(self.ID+'skipmouse',function(){skipmouse=false},100)}function blur(){clearTimeout(blurtimeout);blurtimeout=setTimeout(self.visible,300,false)}self.visible=function(visible){clearTimeout(blurtimeout);self.tclass('hidden',!visible);is=visible};self.resize=function(){if(!offsetter||!old)return;var offset=offsetter.offset();offset.top+=offsetter.height();offset.width=offsetter.width();if(margin.left)offset.left+=margin.left;if(margin.top)offset.top+=margin.top;if(margin.width)offset.width+=margin.width;self.css(offset)};self.show=function(opt,callback){clearTimeout(searchtimeout);var selector='input,[contenteditable]';if(callback)opt.callback=callback;if(opt.input==null)opt.input=opt.element;opt.input=opt.input.setter?opt.input.find(selector):$(opt.input);if(opt.input[0].tagName!=='INPUT'&&!opt.input.attr('contenteditable'))opt.input=opt.input.find(selector);if(opt.element.setter){if(!opt.callback)opt.callback=opt.element.path;opt.element=opt.element.element}if(old){old.removeAttr('autocomplete');old.off('blur',blur);old.off('keydown',keydown)}opt.input.on('keydown',keydown);opt.input.on('blur',blur);opt.input.attr('autocomplete','off');old=opt.input;margin.left=opt.offsetX;margin.top=opt.offsetY;margin.width=opt.offsetWidth;opt.scope=M.scope?M.scope():'';offsetter=$(opt.element);self.opt=opt;self.resize();self.refresh();searchvalue='';self.visible(false)};self.attach=function(input,search,callback,left,top,width){self.attachelement(input,input,search,callback,left,top,width)};self.attachelement=function(element,input,search,callback,left,top,width){if(typeof(callback)==='number'){width=left;left=top;top=callback;callback=null}var opt={};opt.offsetX=left;opt.offsetY=top;opt.offsetWidth=width;if(typeof(callback)==='string')opt.path=callback;else opt.callback=callback;opt.search=search;opt.element=input;opt.input=input;self.show(opt)};self.render=function(arr){datasource=arr;if(!arr||!arr.length){self.visible(false);return}var builder=[];for(var i=0;i4)m=m.substring(0,3)+'.';self.months_short.push(m)}break;case'yearfrom':if(value.indexOf('current')!==-1)self.years_from=+(NOW.format('yyyy'));else self.years_from=+(NOW.add(value).format('yyyy'));break;case'yearto':if(value.indexOf('current')!==-1)self.years_to=+(NOW.format('yyyy'));else self.years_to=+(NOW.add(value).format('yyyy'));break}};function getMonthDays(dt){var m=dt.getMonth();var y=dt.getFullYear();if(m===-1){m=11;y--}return(32-new Date(y,m,32).getDate())}self.calculate=function(year,month,selected){var d=new Date(year,month,1,12,0);var output={header:[],days:[],month:month,year:year},firstday=config.firstday===-1?DEF.firstdayofweek:config.firstday,firstcount=0,frm=d.getDay()-firstday;var today=NOW,ty=today.getFullYear();var tm=today.getMonth();var td=today.getDate();var sy=selected?selected.getFullYear():-1;var sm=selected?selected.getMonth():-1;var sd=selected?selected.getDate():-1;var days=getMonthDays(d);if(frm<0)frm=7+frm;while(firstcount++<7){output.header.push({index:firstday,name:self.days_short[firstday]});firstday++;if(firstday>6)firstday=0}var index=0,indexEmpty=0,count=0,prev=getMonthDays(new Date(year,month-1,1,12,0))-frm;var cur;for(var i=0;i=frm){obj.number=++index;obj.selected=sy===year&&sm===month&&sd===index;obj.today=ty===year&&tm===month&&td===index;obj.future=ty=frm&&obj.number<=days?d.getMonth():cur.getMonth();obj.year=i>=frm&&obj.number<=days?d.getFullYear():cur.getFullYear();obj.date=cur;output.days.push(obj)}indexEmpty=0;for(var i=count;i<42;i++){var cur=d.add(i+' days');var obj={today:false,selected:false,empty:true,future:true,number:++indexEmpty,index:++count};obj.month=cur.getMonth();obj.year=cur.getFullYear();obj.date=cur;output.days.push(obj)}return output};self.hide=function(){if(visible){self.unbindevents();self.opt.close&&self.opt.close();self.opt=null;self.older=null;self.target=null;self.aclass('hidden');self.rclass(cls+'-visible');visible=false}return self};self.show=function(opt){setTimeout(function(){clearTimeout2('datepickerhide')},5);var el=$(opt.element);var dom=el[0];if(self.target===dom){self.hide();return}if(self.opt&&self.opt.close)self.opt.close();var off=el.offset();var w=el.innerWidth();var h=el.innerHeight();var l=0,t=0,height=305+(opt.cancel?25:0);var s=250;if(opt.element){switch(opt.align){case'center':l=Math.ceil((off.left-s/2)+(w/2));break;case'right':l=(off.left+w)-s;break;default:l=off.left;break}t=opt.position==='bottom'?(off.top-height):(off.top+h+12)}if(opt.offsetX)l+=opt.offsetX;if(opt.offsetY)t+=opt.offsetY;if((l+s)>WW)l=(l+w)-s;if((t+height)>WH)t=WH-height-10;var restrict=true,parent=dom.parentNode;while(parent){if(parent.tagName==='BODY'){restrict=false;break}if(parent.classList.contains('ui-scrollbar-area'))break;parent=parent.parentNode}if(restrict&&(t+height)>WH)t=(t+h)-height;var dt=typeof(opt.value)==='string'?GET(opt.value):opt.value;if((!(dt instanceof Date))||isNaN(dt.getTime()))dt=NOW;opt.scope=M.scope?M.scope():'';self.opt=opt;self.time=dt.format('HH:mm:ss');self.rclass('hidden');self.date(dt);main.css({left:l,top:t});main.aclass(cls+'-visible',50);self.bindevents();self.target=dom;visible=true};self.setdate=function(dt){if(!dt){if(typeof(self.opt.value)==='string')SET(self.opt.value+' @change',dt);else self.opt.callback(dt);return}var time=self.time.split(':');if(time.length>1){dt.setHours(+(time[0]||'0'));dt.setMinutes(+(time[1]||'0'));dt.setSeconds(+(time[2]||'0'))}self.opt.scope&&M.scope(self.opt.scope);if(typeof(self.opt.value)==='string')SET(self.opt.value+' @change',dt);else self.opt.callback(dt)};self.make=function(){self.aclass(cls+'-container hidden');var conf={},reconfigure=false;if(!config.days){conf.days=[];for(var i=0;i
    ------
    '.format(cls,config.close,config.today,clearbtn));self.html('
    {1}
    '.format(cls,builder.join('')));main=$(self.find(cls2)[0]);builder=[];elbody=self.find(cls2+'-body');elmonths=self.find(cls2+'-months');for(var i=0;i<12;i++)builder.push('
    '.format(cls,i));elmonths.html(builder.join(''));builder=[];elyears=self.find(cls2+'-years');for(var i=0;i<25;i++)builder.push('
    '.format(cls));elyears.html(builder.join(''));self.makehtml=null;self.find(cls2+'-month').on('click',function(e){var el=$(this);var index=el.attrd('index');var h='hidden';if(index){current.setMonth(+index);self.date(current,true)}else if(!elmonths.hclass(h))index=1;elyears.aclass(h);if(index)elmonths.aclass(h);else{elmonths.find(cls2+'-today').rclass(cls+'-today');elmonths.find(cls2+'-month').eq(current.getMonth()).aclass(cls+'-today');elmonths.rclass(h)}elbody.tclass(h,!elmonths.hclass(h));e.preventDefault();e.stopPropagation()});self.find(cls2+'-year').on('click',function(e){var el=$(this);var year=el.attrd('year');var h='hidden';if(year){current.setFullYear(+year);self.date(current,true)}else if(!elyears.hclass(h))year=1;elmonths.aclass(h);if(year)elyears.aclass(h);else{self.years();elyears.rclass(h)}elbody.tclass(h,!elyears.hclass(h));e.preventDefault();e.stopPropagation()});self.years=function(){var dom=self.find(cls2+'-years').find(cls2+'-year');var year=current.getFullYear();var index=12;for(var i=0;i<25;i++){var val=year-(index--);$(dom[i]).tclass(cls+'-today',val===year).attrd('year',val).find('div')[0].innerHTML=val}};self.find(cls2+'-date').on('click',function(){var dt=$(this).attrd('date').split('-');self.setdate(new Date(+dt[0],+dt[1],+dt[2],12,0,0));self.hide()});self.find(cls2+'-now').on('click',function(){current=new Date();self.date(current,true)});self.find(cls2+'-clear').on('click',function(){self.setdate(null);self.hide()});self.find(cls2+'-next').on('click',function(e){if(elyears.hclass('hidden')){current.setMonth(current.getMonth()+1);self.date(current,true)}else{current.setFullYear(current.getFullYear()+25);self.years()}e.preventDefault();e.stopPropagation()});self.find(cls2+'-prev').on('click',function(e){if(elyears.hclass('hidden')){current.setMonth(current.getMonth()-1);self.date(current,true)}else{current.setFullYear(current.getFullYear()-25);self.years()}e.preventDefault();e.stopPropagation()})};self.date=function(value,skipday){var clssel=cls+'-selected';self.makehtml&&self.makehtml();if(typeof(value)==='string')value=value.parseDate();var year=value==null?null:value.getFullYear();if(year&&(yearself.years_to))return;if(!value||isNaN(value.getTime())){self.find('.'+clssel).rclass(clssel);value=NOW}var empty=!value;if(skipday){skipday=false;empty=true}if(skip){skip=false;return}value=new Date((value||NOW).getTime());var output=self.calculate(value.getFullYear(),value.getMonth(),value);var dom=self.find(cls2+'-date');self.find(cls2+'-body').rclass('hidden');self.find(cls2+'-months,'+cls2+'-years').aclass('hidden');current=value;for(var i=0;i<42;i++){var item=output.days[i],classes=[cls+'-date'];if(item.empty)classes.push(cls+'-disabled');if(!empty&&item.selected)classes.push(cls+'-selected');if(item.today)classes.push(cls+'-day-today');var el=$(dom[i]);el.attrd('date',item.year+'-'+item.month+'-'+item.number);el.find('div').html(item.number);el.find('i').remove();el.rclass().aclass(classes.join(' '))}if(!skipday){dom=self.find(cls2+'-week').find('div');for(var i=0;i<7;i++)dom[i].innerHTML=output.header[i].name;dom=self.find(cls2+'-months').find(cls2+'-month');for(var i=0;i<12;i++)$(dom[i]).find('div').attrd('index',i)[0].innerHTML=self.months_short[i]}self.opt.badges&&self.opt.badges(current,function(date){if(!(date instanceof Array))date=[date];for(var i=0;i')}});var info=self.find(cls2+'-info');info.find(cls2+'-month').html(self.months[current.getMonth()]);info.find(cls2+'-year').html(current.getFullYear())}}); -COMPONENT('directory','minwidth:200;create:Create',function(self,config,cls){var cls2='.'+cls,container,timeout,icon,plus,skipreset=false,skipclear=false,ready=false,input=null,issearch=false,is=false,selectedindex=0,resultscount=0,templateE='{{ name | encode | ui_directory_helper}}',templateR='{{ name | raw}}',template='
  • {{ if $.checkbox}}{{ fi}}{0}
  • ',templateraw=template.format(templateR);var regstrip=/( |<([^>]+)>)/ig;var parentclass=null,parentclass2=null,skiphide=false,skipmouse=false,customvalue,search,main;template=template.format(templateE);Thelpers.ui_directory_helper=function(val){var t=this;return self.opt.templatecompiled?self.opt.templatecompiled(this):t.template?(typeof(t.template)==='string'?t.template.indexOf('{{')===-1?t.template:Tangular.render(t.template,this):t.render(this,val)):self.opt.render?self.opt.render(this,val):val};self.template=Tangular.compile(template);self.templateraw=Tangular.compile(templateraw);self.readonly();self.singleton();self.nocompile();self.configure=function(key,value,init){if(init)return;switch(key){case'placeholder':self.find('input').prop('placeholder',value);break}};self.make=function(){self.aclass('hidden '+cls+'-area');self.append('
      '.format(config.placeholder,cls,Date.now()));customvalue=$('
    • ')[0];main=self.find(cls2);container=self.find('ul');input=self.find('input');icon=self.find(cls2+'-button').find('.ti');plus=self.find(cls2+'-add');search=self.find(cls2+'-search');self.event('mouseenter mouseleave','li',function(){if(ready&&!issearch&&!skipmouse){container.find('li.current').rclass('current');$(this).aclass('current');var arr=container.find('li:visible');for(var i=0;i=resultscount)selectedindex=resultscount;self.move();break}if(o){skipmouseforce();e.preventDefault();e.stopPropagation()}});self.event('input','input',function(){issearch=true;setTimeout2(self.ID,self.search,100,null,this.value)});var fn=function(){is&&!skiphide&&self.hide(1)};self.on('reflow + scroll + resize + resize2',fn);$(W).on('scroll',fn)};self.move=function(){var counter=0,scroller=container.parent();var li=container.find('li');var hli=0,was=false,last=-1,lastselected=0,plus=0;for(var i=0;i=0){selectedindex=lastselected;li.eq(last).aclass('current')}};var nosearch=function(){issearch=false};self.nosearch=function(){setTimeout2(self.ID+'nosearch',nosearch,500)};self.search=function(value){if(!self.opt)return;icon.tclass('ti-times',!!value).tclass('ti-search',!value);if(self.opt.custom){plus.tclass('hidden',!value);customvalue.innerHTML=(typeof(self.opt.custom)==='string'?self.opt.custom:config.create)+': '+(value?Thelpers.encode(value.toString()):'...')+''}if(!value&&!self.opt.ajax){if(!skipclear)container.find('li').rclass('hidden');if(!skipreset)selectedindex=0;resultscount=self.opt.items?self.opt.items.length:0;customvalue.classList.toggle('hidden',!value);self.move();self.nosearch();return}resultscount=0;selectedindex=0;if(self.opt.ajax){var val=value||'';if(self.ajaxold!==val){self.ajaxold=val;setTimeout2(self.ID,function(val){self.opt&&self.opt.ajax(val,function(items){var builder=[],indexer={},item,key=(self.opt.search==true?self.opt.key:(self.opt.search||self.opt.key))||'name';for(var i=0;i{0}'.format(self.opt.empty):self.opt.empty;item[self.opt.key||'name']=tmp;if(!self.opt.raw)item.template='{0}'.format(self.opt.empty);indexer.index=-1;builder.unshift(self.opt.ta(item,indexer))}if(customvalue.parentNode)customvalue.parentNode.removeChild(customvalue);skipclear=true;self.opt.items=items;container.html(builder);if(self.opt.custom){container.prepend(customvalue);customvalue.classList.toggle('hidden',!value)}self.move();self.nosearch()})},300,null,val)}}else if(value){value=value.toSearch().split(' ');var arr=container.find('li');for(var i=0;i{0}'.format(opt.empty):opt.empty;item[opt.key||'name']=tmp;if(!opt.raw)item.template='{0}'.format(opt.empty);indexer.index=-1;builder.unshift(opt.ta(item,indexer))}}self.target=element?element[0]:null;var w=element?element.width():config.minwidth;var offset=element?element.offset():EMPTYOBJECT;var width=w+(opt.offsetWidth||0);if(opt.minwidth&&widthopt.maxwidth)width=opt.maxwidth;ready=false;opt.ajaxold=null;plus.aclass('hidden');self.find('input').prop('placeholder',opt.placeholder||config.placeholder);var scroller=self.find(cls2+'-container').css('width',width+30);if(customvalue.parentNode)customvalue.parentNode.removeChild(customvalue);container.html(builder);if(opt.custom)container.prepend(customvalue);var options={left:0,top:0,width:width},height=opt.height||scroller.height();scroller.css('height',opt.height||'');if(opt.element){switch(opt.align){case'center':options.left=Math.ceil((offset.left-width/2)+(opt.element.innerWidth()/2));break;case'right':options.left=(offset.left-width)+opt.element.innerWidth();break;default:options.left=offset.left;break}options.top=opt.position==='bottom'?((offset.top-height)+element.height()):offset.top}else{options.top=opt.y;options.left=opt.x}options.scope=M.scope?M.scope():'';if(opt.offsetX)options.left+=opt.offsetX;if(opt.offsetY)options.top+=opt.offsetY;var mw=width,mh=scroller.height();if(options.left<0)options.left=10;else if((mw+options.left)>WW)options.left=(WW-mw)-10;mh+=search.height();if((mh+options.top)>WH)options.top=(WH-mh)-10;if(options.top<10)options.top=10;main.css(options);!isMOBILE&&setTimeout(function(){if(opt.search!==false)input.focus()},200);setTimeout(function(){self.initializing=false;skiphide=false;is=true;if(selected){var h=container.find('li:first-child').innerHeight()+1;var y=(container.find('li.selected').index()*h)-(h*2);scroller[0].scrollTop=y<0?0:y}else scroller[0].scrollTop=0;ready=true;self.rclass('invisible')},100);if(is){self.search();return}selectedindex=selected||0;resultscount=items?items.length:0;skipclear=true;self.search();self.aclass('invisible');self.rclass('hidden');setTimeout(function(){if(self.opt&&((self.opt.x!=null&&self.opt.y!=null)||(self.target&&self.target.offsetParent)))main.aclass(cls+'-visible');else self.hide(1)},100);skipreset=false};self.hide=function(sleep){if(!is||self.initializing)return;clearTimeout(timeout);timeout=setTimeout(function(){self.rclass(cls+'-visible').aclass('hidden');if(parentclass){main.rclass(parentclass);parentclass=null}if(parentclass2){main.rclass(parentclass2);parentclass2=null}if(self.opt){self.opt.close&&self.opt.close();self.opt=null}is=false},sleep?sleep:100)}}); +COMPONENT('directory','minwidth:200;create:Create',function(self,config,cls){var cls2='.'+cls,container,timeout,icon,plus,skipreset=false,skipclear=false,ready=false,input=null,issearch=false,is=false,selectedindex=0,resultscount=0,templateE='{{ name | encode | ui_directory_helper}}',templateR='{{ name | raw}}',template='
    • {{ if $.checkbox}}{{ fi}}{0}
    • ',templateraw=template.format(templateR);var regstrip=/( |<([^>]+)>)/ig;var parentclass=null,parentclass2=null,skiphide=false,skipmouse=false,customvalue,search,main;template=template.format(templateE);Thelpers.ui_directory_helper=function(val){var t=this;return self.opt.templatecompiled?self.opt.templatecompiled(this):t.template?(typeof(t.template)==='string'?t.template.indexOf('{{')===-1?t.template:Tangular.render(t.template,this):t.render(this,val)):self.opt.render?self.opt.render(this,val):val};self.template=Tangular.compile(template);self.templateraw=Tangular.compile(templateraw);self.readonly();self.singleton();self.nocompile();self.configure=function(key,value,init){if(init)return;switch(key){case'placeholder':self.find('input').prop('placeholder',value);break}};self.make=function(){self.aclass('hidden '+cls+'-area');self.append('
        '.format(config.placeholder,cls,Date.now()));customvalue=$('
      • ')[0];main=self.find(cls2);container=self.find('ul');input=self.find('input');icon=self.find(cls2+'-button').find('.ti');plus=self.find(cls2+'-add');search=self.find(cls2+'-search');self.event('mouseenter mouseleave','li',function(){if(ready&&!issearch&&!skipmouse){container.find('li.current').rclass('current');$(this).aclass('current');var arr=container.find('li:visible');for(var i=0;i=resultscount)selectedindex=resultscount;self.move();break}if(o){skipmouseforce();e.preventDefault();e.stopPropagation()}});self.event('input','input',function(){issearch=true;setTimeout2(self.ID,self.search,100,null,this.value)});var fn=function(){is&&!skiphide&&self.hide(1)};self.on('reflow + scroll + resize + resize2',fn);$(W).on('scroll',fn)};self.move=function(){var counter=0,scroller=container.parent();var li=container.find('li');var hli=0,was=false,last=-1,lastselected=0,plus=0;for(var i=0;i=0){selectedindex=lastselected;li.eq(last).aclass('current')}};var nosearch=function(){issearch=false};self.nosearch=function(){setTimeout2(self.ID+'nosearch',nosearch,500)};self.search=function(value){if(!self.opt)return;icon.tclass('ti-times',!!value).tclass('ti-search',!value);if(self.opt.custom){plus.tclass('hidden',!value);customvalue.innerHTML=(typeof(self.opt.custom)==='string'?self.opt.custom:config.create)+': '+(value?Thelpers.encode(value.toString()):'...')+''}if(!value&&!self.opt.ajax){if(!skipclear)container.find('li').rclass('hidden');if(!skipreset)selectedindex=0;resultscount=self.opt.items?self.opt.items.length:0;customvalue.classList.toggle('hidden',!value);self.move();self.nosearch();return}resultscount=0;selectedindex=0;if(self.opt.ajax){var val=value||'';if(self.ajaxold!==val){self.ajaxold=val;setTimeout2(self.ID,function(val){self.opt&&self.opt.ajax(val,function(items){var builder=[],indexer={},item,key=(self.opt.search==true?self.opt.key:(self.opt.search||self.opt.key))||'name';for(var i=0;i{0}'.format(self.opt.empty):self.opt.empty;item[self.opt.key||'name']=tmp;if(!self.opt.raw)item.template='{0}'.format(self.opt.empty);indexer.index=-1;builder.unshift(self.opt.ta(item,indexer))}if(customvalue.parentNode)customvalue.parentNode.removeChild(customvalue);skipclear=true;self.opt.items=items;container.html(builder);if(self.opt.custom){container.prepend(customvalue);customvalue.classList.toggle('hidden',!value)}self.move();self.nosearch()})},300,null,val)}}else if(value){value=value.toSearch().split(' ');var arr=container.find('li');for(var i=0;i{0}'.format(opt.empty):opt.empty;item[opt.key||'name']=tmp;if(!opt.raw)item.template='{0}'.format(opt.empty);indexer.index=-1;builder.unshift(opt.ta(item,indexer))}}self.target=element?element[0]:null;var w=element?element.width():config.minwidth;var offset=element?element.offset():EMPTYOBJECT;var width=w+(opt.offsetWidth||0);if(opt.minwidth&&widthopt.maxwidth)width=opt.maxwidth;ready=false;opt.ajaxold=null;plus.aclass('hidden');self.find('input').prop('placeholder',opt.placeholder||config.placeholder);var scroller=self.find(cls2+'-container').css('width',width+30);if(customvalue.parentNode)customvalue.parentNode.removeChild(customvalue);container.html(builder);if(opt.custom)container.prepend(customvalue);var options={left:0,top:0,width:width},height=opt.height||scroller.height();scroller.css('height',opt.height||'');if(opt.element){switch(opt.align){case'center':options.left=Math.ceil((offset.left-width/2)+(opt.element.innerWidth()/2));break;case'right':options.left=(offset.left-width)+opt.element.innerWidth();break;default:options.left=offset.left;break}options.top=opt.position==='bottom'?((offset.top-height)+element.height()):offset.top}else{options.top=opt.y;options.left=opt.x}options.scope=M.scope?M.scope():'';if(opt.offsetX)options.left+=opt.offsetX;if(opt.offsetY)options.top+=opt.offsetY;var mw=width,mh=scroller.height();if(options.left<0)options.left=10;else if((mw+options.left)>WW)options.left=(WW-mw)-10;mh+=search.height();if((mh+options.top)>WH)options.top=(WH-mh)-10;if(options.top<10)options.top=10;main.css(options);!isMOBILE&&setTimeout(function(){if(opt.search!==false)input.focus()},200);setTimeout(function(){self.initializing=false;skiphide=false;is=true;if(selected){var h=container.find('li:first-child').innerHeight()+1;var y=(container.find('li.selected').index()*h)-(h*2);scroller[0].scrollTop=y<0?0:y}else scroller[0].scrollTop=0;ready=true;self.rclass('invisible')},100);if(is){self.search();return}selectedindex=selected||0;resultscount=items?items.length:0;skipclear=true;self.search();self.aclass('invisible');self.rclass('hidden');setTimeout(function(){if(self.opt&&((self.opt.x!=null&&self.opt.y!=null)||(self.target&&self.target.offsetParent)))main.aclass(cls+'-visible');else self.hide(1)},100);skipreset=false};self.hide=function(sleep){if(!is||self.initializing)return;clearTimeout(timeout);timeout=setTimeout(function(){self.rclass(cls+'-visible').aclass('hidden');if(parentclass){main.rclass(parentclass);parentclass=null}if(parentclass2){main.rclass(parentclass2);parentclass2=null}if(self.opt){self.opt.close&&self.opt.close();self.opt=null}is=false},sleep?sleep:100)}}); COMPONENT('dropfiles',function(self,config,cls){self.readonly();self.singleton();self.nocompile();var has=false,is=false,events='dragenter dragover dragexit drop dragleave',check=null,hide=function(){is=false;self.rclass(cls+'-visible');config.class&&has&&self.rclass('over');has&&$('body').rclass(cls+'-enabled');has=false;check=null};self.destroy=function(){$(W).off(events,self.filehandler)};self.make=function(){self.aclass(cls).rclass('hidden');self.element.wrapInner('
        ');$(W).on(events,self.filehandler)};self.filehandler=function(e){if(config.check){if(!check)check=GET(self.makepath(config.check));if(check&&!check(e)){hide();return}}if(config.disabled)return;if(e.type==='dragenter'){is=e.originalEvent.dataTransfer.types.includes('Files');self.tclass(cls+'-visible',is);$('body').tclass(cls+'-enabled',is)}if(!is)return;e.stopPropagation();e.preventDefault();switch(e.type){case'drop':break;case'dragenter':case'dragover':has=true;return;case'dragleave':case'dragexit':default:if(is&&e.target===self.dom)setTimeout2(self.ID,hide,300);return}hide();self.EXEC(config.exec,e.originalEvent.dataTransfer.files,e)}}); @@ -687,7 +697,7 @@ COMPONENT('errorhandler','keywords:401=login',function(self,config){self.readonl COMPONENT('exec',function(self,config){var regparent=/\?\d/,extensions=[],skiptimeout;self.readonly();self.blind();self.singleton();self.register=function(fn){extensions.push(fn)};self.make=function(){var scope=null,scopepath=function(el,val){if(!scope)scope=el.scope();return val==null?scope:scope?scope.makepath?scope.makepath(val):val.replace(/\?/g,el.scope().path):val};var fn=function(plus,forceprevent){return function execlick(e){var el=$(this);if(!plus&&skiptimeout)return;if(!e.$force&&!plus&&el.hclass('exec2')){skiptimeout&&clearTimeout(skiptimeout);skiptimeout=setTimeout(function(ctx,e){skiptimeout=null;e.$force=true;execlick.call(ctx,e)},300,this,e);return}var attr=el.attrd('exec'+plus);var path=el.attrd('path'+plus);var href=el.attrd('href'+plus);var def=el.attrd('def'+plus);var reset=el.attrd('reset'+plus);if(skiptimeout){clearTimeout(skiptimeout);skiptimeout=null}scope=null;var prevent=forceprevent?'1':el.attrd('prevent'+plus);if(prevent==='true'||prevent==='1'){e.preventDefault();e.stopPropagation()}if(attr){if(extensions.length){for(var ext of extensions){if(ext(attr,el,e,plus))return}}if(attr.charAt(0)==='@'){attr=attr.substring(1);var com=el.component();if(com&&typeof(com[attr])==='function')com[attr](el,e);return}if(attr.indexOf('?')!==-1){var tmp=scopepath(el);if(tmp){var isparent=regparent.test(attr);attr=tmp.makepath?tmp.makepath(attr):attr.replace(/\?/g,tmp.path);if(isparent&&attr.indexOf('/')!==-1)M.scope(attr.split('/')[0]);else M.scope(tmp.path)}if(scope&&scope.plugin){var index=attr.indexOf('/');if(index!==-1){var method=attr.substring(index+1).trim();if(method){var fn=scope.plugin[method];if(fn){M.caller(scope.path);fn.call(scope.plugin,el,e)}else WARN('The method "{0}" not found'.format(attr));return}}}}EXEC(attr,el,e)}href&&REDIRECT(href);if(def){if(def.indexOf('?')!==-1)def=scopepath(el,def);DEFAULT(def)}if(reset){if(reset.indexOf('?')!==-1)reset=scopepath(el,reset);RESET(reset)}if(path){var val=el.attrd('value');if(val){if(path.indexOf('?')!==-1)path=scopepath(el,path);var v=GET(path);SET(path,new Function('value','return '+val)(v),true)}}}};var el=$(document.body);el.on('contextmenu',config.selector3||'.exec3',fn('3',true));el.on('dblclick',config.selector2||'.exec2',fn('2'));el.on('click',config.selector||'.exec',fn(''))}}); -COMPONENT('filereader',function(self){var input;self.readonly();self.nocompile();self.singleton();self.make=function(){self.aclass('hidden');self.append('');input=self.find('input');input.on('change',function(e){self.process(e.target.files)})};self.open=function(opt,callback){self.opt=opt;if(!opt.callback)opt.callback=callback;if(opt.files){self.process(opt.files,opt.multiple)}else{input.attr('accept',opt.accept||'*/*').prop('multiple',!!opt.multiple);input.trigger('click')}};self.process=function(files,multiple){SETTER('loading/show');var arr=[];for(var i=0;i');input=self.find('input');input.on('change',function(e){self.process(e.target.files)})};self.open=function(opt,callback){self.opt=opt;if(!opt.callback)opt.callback=callback;if(opt.files){self.process(opt.files,opt.multiple)}else{input.attr('accept',opt.accept||'*/*').prop('multiple',!!opt.multiple);input.trigger('click')}};self.process=function(files,multiple){SETTER('loading/show');var arr=[];for(var i=0;i=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,"undefined"!=typeof module&&(module.exports=g)});self.save=function(filename,body,type){var plus=false;if(!type){var ext=filename.substring(filename.lastIndexOf('.')+1);if(ext==='htm')ext='html';switch(ext){case'json':type='application/json';plus=true;break;case'js':type='text/javascript';plus=true;break;case'ts':type='text/typescript';plus=true;break;case'svg':type='image/svg+xml';break;case'ics':case'ifb':type='text/calendar';plus=true;break;case'doc':type='application/msword';break;case'docx':type='application/vnd.openxmlformats-officedocument.wordprocessingml.document';break;case'xls':type='application/vnd.ms-excel';break;case'xlsx':type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';break;case'pdf':type='application/pdf';break;case'jpg':case'jpeg':type='image/jpeg';break;case'ico':type='image/x-icon';break;case'png':case'gif':type='image/'+ext;break;case'less':case'css':case'sass':case'scss':type='text/'+ext;plus=true;break;case'xml':case'html':case'csv':type='text/'+ext;plus=true;break;default:type='text/plain';plus=true;break}}if(plus)type+='; charset=utf-8';var blob;if(typeof(body)==='string')blob=new Blob([body],{type:type});else blob=body;saveAs(blob,filename)}}); @@ -757,7 +767,7 @@ COMPONENT('paste',function(self){self.readonly();self.singleton();self.blind();s COMPONENT('progress','animate:true',function(self,config,cls){var container,old=null;self.readonly();self.nocompile&&self.nocompile();self.make=function(){self.aclass(cls);self.append('
        0%
        ');container=self.find('div')};self.setter=function(value){!value&&(value=0);if(old===value)return;if(value>100)value=100;else if(value<0)value=0;old=value>>0;if(config.animate)container.stop().animate({width:old+'%'},80).show();else container.css({width:old+'%'});container.html(old+'%')}}); -COMPONENT('prompt','zindex:12;width:400;cancel:Cancel;submit:OK',function(self,config,cls){var cls2='.'+cls,body,input,op={};self.readonly();self.singleton();op.cancel=function(){var val=input.val();self.opt.cancel&&self.opt.cancel(val);self.hide()};op.submit=function(){var val=input.val();if(val===self.opt.value){op.cancel();return}self.opt.callback(val);self.hide()};self.make=function(){$(document.body).append('