From 1af76870641473c37883d29d86ef91cfcd24027a Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <49808844+DmitryBorisenko33@users.noreply.github.com> Date: Mon, 6 Dec 2021 01:27:33 +0100 Subject: [PATCH] some --- data_svelte/build/bundle.css | 2 +- data_svelte/build/bundle.js | 2 +- data_svelte/config.json | 16 ++++++++-------- src/Utils/SerialPrint.cpp | 5 ++--- src/WebServer.cpp | 3 --- 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/data_svelte/build/bundle.css b/data_svelte/build/bundle.css index 6c4c720e..7b36f430 100644 --- a/data_svelte/build/bundle.css +++ b/data_svelte/build/bundle.css @@ -11,4 +11,4 @@ Consolas, 'Liberation Mono', Menlo, - monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type='button']{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,::before,::after{--tw-border-opacity:1;border-color:rgba(229, 231, 235, var(--tw-border-opacity))}.cards-grid{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));justify-items:center;gap:1rem}@media(min-width: 640px){.cards-grid{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media(min-width: 1024px){.cards-grid{grid-template-columns:repeat(3, minmax(0, 1fr))}}@media(min-width: 1280px){.cards-grid{grid-template-columns:repeat(3, minmax(0, 1fr))}}@media(min-width: 1536px){.cards-grid{grid-template-columns:repeat(3, minmax(0, 1fr))}}.cards-grid-inline{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));justify-items:center}.card{width:100%;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgba(255, 255, 255, var(--tw-bg-opacity));padding:0.5rem;--tw-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}@media(min-width: 640px){.card{padding:0.5rem}}@media(min-width: 768px){.card{padding:0.5rem}}@media(min-width: 1024px){.card{padding:0.5rem;--tw-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}}@media(min-width: 1280px){.card{padding-left:2rem;padding-right:2rem;padding-top:1rem;padding-bottom:1rem}}@media(min-width: 1536px){.card{padding-left:2rem;padding-right:2rem;padding-top:1rem;padding-bottom:1rem}}.card-header{padding-bottom:1rem;text-align:center;font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity:1;color:rgba(107, 114, 128, var(--tw-text-opacity))}.card-items-psn{margin-bottom:1rem;display:flex;height:2rem;align-items:center}.widget-descr-width{width:66.666667%}.widget-descr-style{padding-right:1rem;font-weight:700;--tw-text-opacity:1;color:rgba(107, 114, 128, var(--tw-text-opacity))}.widget-width{display:flex;width:33.333333%;justify-content:flex-end}.widget-input{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-content:center;border-radius:0.25rem;border-width:2px;--tw-border-opacity:1;border-color:rgba(229, 231, 235, var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(229, 231, 235, var(--tw-bg-opacity))}.widget-input:focus{--tw-bg-opacity:1;background-color:rgba(255, 255, 255, var(--tw-bg-opacity))}.widget-input{padding-top:0.25rem;padding-bottom:0.25rem;padding-right:1rem;text-align:right;line-height:1.25;--tw-text-opacity:1;color:rgba(55, 65, 81, var(--tw-text-opacity))}.widget-input:focus{outline:2px solid transparent;outline-offset:2px}.json-input{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-content:center;border-radius:0.25rem;border-width:2px;--tw-border-opacity:1;border-color:rgba(229, 231, 235, var(--tw-border-opacity))}.json-input:focus{--tw-border-opacity:1;border-color:rgba(99, 102, 241, var(--tw-border-opacity))}.json-input{--tw-bg-opacity:1;background-color:rgba(229, 231, 235, var(--tw-bg-opacity))}.json-input:focus{--tw-bg-opacity:1;background-color:rgba(255, 255, 255, var(--tw-bg-opacity))}.json-input{padding-top:0.25rem;padding-bottom:0.25rem;padding-right:1rem;line-height:1.25;--tw-text-opacity:1;color:rgba(55, 65, 81, var(--tw-text-opacity))}.json-input:focus{outline:2px solid transparent;outline-offset:2px}.widget-anydata-style{text-align:center;font-weight:700;--tw-text-opacity:1;color:rgba(107, 114, 128, var(--tw-text-opacity))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-1{top:0.25rem}.left-1{left:0.25rem}.m-0{margin:0px}.mb-4{margin-bottom:1rem}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-10{height:2.5rem}.w-4{width:1rem}.w-10{width:2.5rem}.w-full{width:100%}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,100%{transform:scale(2);opacity:0}}@keyframes ping{75%,100%{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,100%{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(0.8,0,1,1);animation-timing-function:cubic-bezier(0.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,0.2,1);animation-timing-function:cubic-bezier(0,0,0.2,1)}}@keyframes bounce{0%,100%{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(0.8,0,1,1);animation-timing-function:cubic-bezier(0.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,0.2,1);animation-timing-function:cubic-bezier(0,0,0.2,1)}}.cursor-pointer{cursor:pointer}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1, minmax(0, 1fr))}.content-center{align-content:center}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.rounded{border-radius:0.25rem}.rounded-lg{border-radius:0.5rem}.rounded-full{border-radius:9999px}.border-2{border-width:2px}.border-gray-200{--tw-border-opacity:1;border-color:rgba(229, 231, 235, var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgba(239, 68, 68, var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity:1;border-color:rgba(99, 102, 241, var(--tw-border-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255, 255, 255, var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgba(249, 250, 251, var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243, 244, 246, var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229, 231, 235, var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgba(75, 85, 99, var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity:1;background-color:rgba(248, 113, 113, var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgba(99, 102, 241, var(--tw-bg-opacity))}.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgba(67, 56, 202, var(--tw-bg-opacity))}.focus\:bg-white:focus{--tw-bg-opacity:1;background-color:rgba(255, 255, 255, var(--tw-bg-opacity))}.bg-cover{background-size:cover}.p-2{padding:0.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:0.25rem;padding-bottom:0.25rem}.py-2{padding-top:0.5rem;padding-bottom:0.5rem}.pt-8{padding-top:2rem}.pr-4{padding-right:1rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-semibold{font-weight:600}.font-bold{font-weight:700}.leading-tight{line-height:1.25}.text-white{--tw-text-opacity:1;color:rgba(255, 255, 255, var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(107, 114, 128, var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgba(55, 65, 81, var(--tw-text-opacity))}*,::before,::after{--tw-shadow:0 0 #0000}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}*,::before,::after{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59, 130, 246, 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.focus\:ring-indigo-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(129, 140, 248, var(--tw-ring-opacity))}.transition{transition-property:background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;transition-property:background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}#menu__toggle{opacity:0}#menu__toggle:checked~.menu__btn>span{transform:rotate(45deg)}#menu__toggle:checked~.menu__btn>span::before{top:0;transform:rotate(0)}#menu__toggle:checked~.menu__btn>span::after{top:0;transform:rotate(90deg)}#menu__toggle:checked~.menu__box{visibility:visible;left:0}#menu__toggle:checked~.menu__main{margin-left:150px;transition-duration:0.25s}.menu__btn{display:flex;align-items:center;position:fixed;z-index:1;top:10px;left:20px;width:20px;height:20px;cursor:pointer}.menu__btn>span,.menu__btn>span::before,.menu__btn>span::after{display:block;position:absolute;width:100%;height:2px;background-color:#616161;transition-duration:0.25s}.menu__btn>span::before{content:"";top:-8px}.menu__btn>span::after{content:"";top:8px}.menu__box{display:block;position:fixed;visibility:hidden;top:0;left:-100%;width:150px;height:100%;margin:0;padding:80px 0;list-style:none;background-color:#eceff1;box-shadow:1px 0px 6px rgba(0, 0, 0, 0.2);transition-duration:0.25s}.menu__item{display:block;padding:12px 24px;color:rgba(51, 51, 51, 0.788);font-family:"Roboto", sans-serif;font-size:15px;font-weight:600;text-decoration:none;transition-duration:0.25s}.menu__item:hover{background-color:#cfd8dc}.upper__bar{background-color:rgba(51, 51, 51, 0.144);height:70px;position:fixed;z-index:-1;top:0px;left:0;width:100%;margin:0;padding:0;box-shadow:1px 0px 3px rgba(0, 0, 0, 0.2)}input[type="date"]::-webkit-calendar-picker-indicator{margin-left:5px;margin-right:-8px}input[type="time"]::-webkit-calendar-picker-indicator{margin-left:5px;margin-right:-8px}input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{margin-left:7px;margin-right:-6px;width:30px;height:30px;opacity:1}input:checked~.dot{transform:translateX(100%)}@media(min-width: 640px){.sm\:grid-cols-2{grid-template-columns:repeat(2, minmax(0, 1fr))}.sm\:p-2{padding:0.5rem}}@media(min-width: 768px){.md\:p-2{padding:0.5rem}}@media(min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}.lg\:p-2{padding:0.5rem}}@media(min-width: 1280px){.xl\:grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}.xl\:px-8{padding-left:2rem;padding-right:2rem}.xl\:py-4{padding-top:1rem;padding-bottom:1rem}}@media(min-width: 1536px){.\32xl\:grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}.\32xl\:px-8{padding-left:2rem;padding-right:2rem}.\32xl\:py-4{padding-top:1rem;padding-bottom:1rem}} \ No newline at end of file + monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type='button']{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,::before,::after{--tw-border-opacity:1;border-color:rgba(229, 231, 235, var(--tw-border-opacity))}.cards-grid{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));justify-items:center;gap:1rem}@media(min-width: 640px){.cards-grid{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media(min-width: 1024px){.cards-grid{grid-template-columns:repeat(3, minmax(0, 1fr))}}@media(min-width: 1280px){.cards-grid{grid-template-columns:repeat(3, minmax(0, 1fr))}}@media(min-width: 1536px){.cards-grid{grid-template-columns:repeat(3, minmax(0, 1fr))}}.cards-grid-inline{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));justify-items:center}.card{width:100%;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgba(255, 255, 255, var(--tw-bg-opacity));padding:0.5rem;--tw-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}@media(min-width: 640px){.card{padding:0.5rem}}@media(min-width: 768px){.card{padding:0.5rem}}@media(min-width: 1024px){.card{padding:0.5rem;--tw-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}}@media(min-width: 1280px){.card{padding-left:2rem;padding-right:2rem;padding-top:1rem;padding-bottom:1rem}}@media(min-width: 1536px){.card{padding-left:2rem;padding-right:2rem;padding-top:1rem;padding-bottom:1rem}}.card-header{padding-bottom:1rem;text-align:center;font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity:1;color:rgba(107, 114, 128, var(--tw-text-opacity))}.card-items-psn{margin-bottom:1rem;display:flex;height:2rem;align-items:center}.widget-descr-width{width:66.666667%}.widget-descr-style{padding-right:1rem;font-weight:700;--tw-text-opacity:1;color:rgba(107, 114, 128, var(--tw-text-opacity))}.widget-width{display:flex;width:33.333333%;justify-content:flex-end}.widget-input{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-content:center;border-radius:0.25rem;border-width:2px;--tw-border-opacity:1;border-color:rgba(229, 231, 235, var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(229, 231, 235, var(--tw-bg-opacity))}.widget-input:focus{--tw-bg-opacity:1;background-color:rgba(255, 255, 255, var(--tw-bg-opacity))}.widget-input{padding-top:0.25rem;padding-bottom:0.25rem;padding-right:1rem;text-align:right;line-height:1.25;--tw-text-opacity:1;color:rgba(55, 65, 81, var(--tw-text-opacity))}.widget-input:focus{outline:2px solid transparent;outline-offset:2px}.json-input{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-content:center;border-radius:0.25rem;border-width:2px;--tw-border-opacity:1;border-color:rgba(229, 231, 235, var(--tw-border-opacity))}.json-input:focus{--tw-border-opacity:1;border-color:rgba(99, 102, 241, var(--tw-border-opacity))}.json-input{--tw-bg-opacity:1;background-color:rgba(229, 231, 235, var(--tw-bg-opacity))}.json-input:focus{--tw-bg-opacity:1;background-color:rgba(255, 255, 255, var(--tw-bg-opacity))}.json-input{padding-top:0.25rem;padding-bottom:0.25rem;padding-right:1rem;line-height:1.25;--tw-text-opacity:1;color:rgba(55, 65, 81, var(--tw-text-opacity))}.json-input:focus{outline:2px solid transparent;outline-offset:2px}.widget-anydata-style{text-align:center;font-weight:700;--tw-text-opacity:1;color:rgba(107, 114, 128, var(--tw-text-opacity))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-1{top:0.25rem}.left-1{left:0.25rem}.m-0{margin:0px}.mb-4{margin-bottom:1rem}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-10{height:2.5rem}.w-4{width:1rem}.w-8{width:2rem}.w-10{width:2.5rem}.w-2\/3{width:66.666667%}.w-full{width:100%}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,100%{transform:scale(2);opacity:0}}@keyframes ping{75%,100%{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,100%{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(0.8,0,1,1);animation-timing-function:cubic-bezier(0.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,0.2,1);animation-timing-function:cubic-bezier(0,0,0.2,1)}}@keyframes bounce{0%,100%{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(0.8,0,1,1);animation-timing-function:cubic-bezier(0.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,0.2,1);animation-timing-function:cubic-bezier(0,0,0.2,1)}}.cursor-pointer{cursor:pointer}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1, minmax(0, 1fr))}.content-center{align-content:center}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.gap-4{gap:1rem}.rounded{border-radius:0.25rem}.rounded-lg{border-radius:0.5rem}.rounded-full{border-radius:9999px}.border-2{border-width:2px}.border-gray-200{--tw-border-opacity:1;border-color:rgba(229, 231, 235, var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgba(239, 68, 68, var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity:1;border-color:rgba(99, 102, 241, var(--tw-border-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255, 255, 255, var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgba(249, 250, 251, var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243, 244, 246, var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229, 231, 235, var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgba(75, 85, 99, var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity:1;background-color:rgba(248, 113, 113, var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgba(99, 102, 241, var(--tw-bg-opacity))}.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgba(67, 56, 202, var(--tw-bg-opacity))}.focus\:bg-white:focus{--tw-bg-opacity:1;background-color:rgba(255, 255, 255, var(--tw-bg-opacity))}.bg-cover{background-size:cover}.p-2{padding:0.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:0.25rem;padding-bottom:0.25rem}.py-2{padding-top:0.5rem;padding-bottom:0.5rem}.pt-8{padding-top:2rem}.pr-4{padding-right:1rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-semibold{font-weight:600}.font-bold{font-weight:700}.leading-tight{line-height:1.25}.text-black{--tw-text-opacity:1;color:rgba(0, 0, 0, var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgba(255, 255, 255, var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(107, 114, 128, var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgba(55, 65, 81, var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgba(239, 68, 68, var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgba(16, 185, 129, var(--tw-text-opacity))}*,::before,::after{--tw-shadow:0 0 #0000}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}*,::before,::after{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59, 130, 246, 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.focus\:ring-indigo-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(129, 140, 248, var(--tw-ring-opacity))}.transition{transition-property:background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;transition-property:background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}#menu__toggle{opacity:0}#menu__toggle:checked~.menu__btn>span{transform:rotate(45deg)}#menu__toggle:checked~.menu__btn>span::before{top:0;transform:rotate(0)}#menu__toggle:checked~.menu__btn>span::after{top:0;transform:rotate(90deg)}#menu__toggle:checked~.menu__box{visibility:visible;left:0}#menu__toggle:checked~.menu__main{margin-left:150px;transition-duration:0.25s}.menu__btn{display:flex;align-items:center;position:fixed;z-index:1;top:10px;left:20px;width:20px;height:20px;cursor:pointer}.menu__btn>span,.menu__btn>span::before,.menu__btn>span::after{display:block;position:absolute;width:100%;height:2px;background-color:#616161;transition-duration:0.25s}.menu__btn>span::before{content:"";top:-8px}.menu__btn>span::after{content:"";top:8px}.menu__box{display:block;position:fixed;visibility:hidden;top:0;left:-100%;width:150px;height:100%;margin:0;padding:80px 0;list-style:none;background-color:#eceff1;box-shadow:1px 0px 6px rgba(0, 0, 0, 0.2);transition-duration:0.25s}.menu__item{display:block;padding:12px 24px;color:rgba(51, 51, 51, 0.788);font-family:"Roboto", sans-serif;font-size:15px;font-weight:600;text-decoration:none;transition-duration:0.25s}.menu__item:hover{background-color:#cfd8dc}.upper__bar{background-color:rgba(51, 51, 51, 0.144);height:70px;position:fixed;z-index:-1;top:0px;left:0;width:100%;margin:0;padding:0;box-shadow:1px 0px 3px rgba(0, 0, 0, 0.2)}input[type="date"]::-webkit-calendar-picker-indicator{margin-left:5px;margin-right:-8px}input[type="time"]::-webkit-calendar-picker-indicator{margin-left:5px;margin-right:-8px}input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{margin-left:7px;margin-right:-6px;width:30px;height:30px;opacity:1}input:checked~.dot{transform:translateX(100%)}@media(min-width: 640px){.sm\:grid-cols-2{grid-template-columns:repeat(2, minmax(0, 1fr))}.sm\:p-2{padding:0.5rem}}@media(min-width: 768px){.md\:p-2{padding:0.5rem}}@media(min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}.lg\:p-2{padding:0.5rem}}@media(min-width: 1280px){.xl\:grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}.xl\:px-8{padding-left:2rem;padding-right:2rem}.xl\:py-4{padding-top:1rem;padding-bottom:1rem}}@media(min-width: 1536px){.\32xl\:grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}.\32xl\:px-8{padding-left:2rem;padding-right:2rem}.\32xl\:py-4{padding-top:1rem;padding-bottom:1rem}} \ No newline at end of file diff --git a/data_svelte/build/bundle.js b/data_svelte/build/bundle.js index 7b99a348..533cb9bb 100644 --- a/data_svelte/build/bundle.js +++ b/data_svelte/build/bundle.js @@ -1,2 +1,2 @@ -var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function s(t){return"function"==typeof t}function a(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function o(t,e,n,r){if(t){const s=i(t,e,n,r);return t[0](s)}}function i(t,e,n,r){return t[1]&&r?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](r(e))):n.ctx}function c(t,e,n,r){if(t[2]&&r){const s=t[2](r(n));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],n=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],n=t.ctx.length/32;for(let t=0;tt.removeEventListener(e,n,r)}function y(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function x(t){return""===t?null:+t}function v(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function _(t,e){t.value=null==e?"":e}let k;function S(t){k=t}function E(){if(!k)throw new Error("Function called outside component initialization");return k}function N(t){E().$$.on_mount.push(t)}function O(t){return E().$$.context.get(t)}const A=[],H=[],L=[],T=[],C=Promise.resolve();let M=!1;function W(){M||(M=!0,C.then(I))}function R(){return W(),C}function z(t){L.push(t)}function q(t){T.push(t)}let j=!1;const F=new Set;function I(){if(!j){j=!0;do{for(let t=0;t{B.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}}function Q(t,e,n){const r=t.$$.props[e];void 0!==r&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function G(t){t&&t.c()}function U(t,n,a,o){const{fragment:i,on_mount:c,on_destroy:u,after_update:l}=t.$$;i&&i.m(n,a),o||z((()=>{const n=c.map(e).filter(s);u?u.push(...n):r(n),t.$$.on_mount=[]})),l.forEach(z)}function V(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function X(e,s,a,o,i,c,u,l=[-1]){const d=k;S(e);const p=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:i,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:s.context||[]),callbacks:n(),dirty:l,skip_bound:!1,root:s.target||d.$$.root};u&&u(p.root);let g=!1;if(p.ctx=a?a(e,s.props||{},((t,n,...r)=>{const s=r.length?r[0]:n;return p.ctx&&i(p.ctx[t],p.ctx[t]=s)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](s),g&&function(t,e){-1===t.$$.dirty[0]&&(A.push(t),W(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const et=[];function nt(e,n=t){let r;const s=new Set;function o(t){if(a(e,t)&&(e=t,r)){const t=!et.length;for(const t of s)t[1](),et.push(t,e);if(t){for(let t=0;t{s.delete(c),0===s.size&&(r(),r=null)}}}}function rt(t,e=!1){return(t=t.slice(t.startsWith("/#")?2:0,t.endsWith("/*")?-2:void 0)).startsWith("/")||(t="/"+t),"/"===t&&(t=""),e&&!t.endsWith("/")&&(t+="/"),t}function st(t,e,n){if(""===n)return t;if("/"===n[0])return n;let r=t=>t.split("/").filter((t=>""!==t)),s=r(t);return"/"+(e?r(e):[]).map(((t,e)=>s[e])).join("/")+"/"+n}function at(t,e,n,r){let s=[e,"data-"+e].reduce(((e,r)=>{let s=t.getAttribute(r);return n&&t.removeAttribute(r),null===s?e:s}),!1);return!r&&""===s||(s||r||!1)}function ot(t){let e=t.split("&").map((t=>t.split("="))).reduce(((t,e)=>{let n=e[0];if(!n)return t;let r=!(e.length>1)||e[e.length-1];return"string"==typeof r&&r.includes(",")&&(r=r.split(",")),void 0===t[n]?t[n]=[r]:t[n].push(r),t}),{});return Object.entries(e).reduce(((t,e)=>(t[e[0]]=e[1].length>1?e[1]:e[1][0],t)),{})}var it,ct,ut={HISTORY:1,HASH:2,MEMORY:3,OFF:4,run:function(t,e,n,r){return 1===t?e&&e():2===t?n&&n():r&&r()},getDeafault:function(){return window&&"srcdoc"!==window.location.pathname?1:3}},lt=function(){let t,e=ut.getDeafault(),n=n=>t&&t(dt(e));function r(t){t&&(e=t),window.onhashchange=window.onpopstate=ct=null,e!==ut.OFF&&ut.run(e,(t=>window.onpopstate=n),(t=>window.onhashchange=n))&&n()}return{mode:t=>r(t),get:t=>dt(e),go(t,r){(function(t,e,n){let r=t=>history[n?"replaceState":"pushState"]({},"",t);ut.run(t,(t=>r(e)),(t=>r(`#${e}`)),(t=>ct=e))})(e,t,r),n()},start(e){t=e,r()},stop(){t=null,r(ut.OFF)}}}();function dt(t){let e=it,n=it=ut.run(t,(t=>window.location.pathname+window.location.search),(t=>String(window.location.hash.slice(1)||"/")),(t=>ct||"/")),r=n.match(/^([^?#]+)(?:\?([^#]+))?(?:\#(.+))?$/);return{url:n,from:e,path:r[1]||"",query:ot(r[2]||""),hash:r[3]||""}}function pt(t){let e=O("tinro");e&&(e.exact||e.fallback)&&function(t){throw new Error("[Tinro] "+t)}(`${t.fallback?"":``} can't be inside ${e.fallback?"":` with exact path`}`);let n=t.fallback?"fallbacks":"childs",r=nt({}),s={router:{},exact:!1,pattern:null,meta:{},parent:e,fallback:t.fallback,redirect:!1,firstmatch:!1,breadcrumb:null,matched:!1,childs:new Set,activeChilds:new Set,fallbacks:new Set,update(t){s.exact=!t.path.endsWith("/*"),s.pattern=rt(`${s.parent&&s.parent.pattern||""}${t.path}`),s.redirect=t.redirect,s.firstmatch=t.firstmatch,s.breadcrumb=t.breadcrumb,s.match()},register:()=>{if(s.parent)return s.parent[n].add(s),()=>{s.parent[n].delete(s),s.router.un&&s.router.un()}},show:()=>{t.onShow(),!s.fallback&&s.parent&&s.parent.activeChilds.add(s)},hide:()=>{t.onHide(),!s.fallback&&s.parent&&s.parent.activeChilds.delete(s)},match:async()=>{s.matched=!1;let{path:e,url:n,from:a,query:o}=s.router,i=function(t,e){t=rt(t,!0),e=rt(e,!0);let n=[],r={},s=!0,a=t.split("/").map((t=>t.startsWith(":")?(n.push(t.slice(1)),"([^\\/]+)"):t)).join("\\/"),o=e.match(new RegExp(`^${a}$`));return o||(s=!1,o=e.match(new RegExp(`^${a}`))),o?(n.forEach(((t,e)=>r[t]=o[e+1])),{exact:s,params:r,part:o[0].slice(0,-1)}):null}(s.pattern,e);if(!s.fallback&&i&&s.redirect&&(!s.exact||s.exact&&i.exact)){await R();let t=st(e,s.parent&&s.parent.pattern,s.redirect);return gt.goto(t,!0)}if(s.meta=i&&{from:a,url:n,query:o,match:i.part,pattern:s.pattern,breadcrumbs:s.parent&&s.parent.meta&&s.parent.meta.breadcrumbs.slice()||[],params:i.params,subscribe:r.subscribe},s.breadcrumb&&s.meta&&s.meta.breadcrumbs.push({name:s.breadcrumb,path:i.part}),r.set(s.meta),!i||s.fallback||!(!s.exact||s.exact&&i.exact)||s.parent&&s.parent.firstmatch&&s.parent.matched?s.hide():(t.onMeta(s.meta),s.parent&&(s.parent.matched=!0),s.show()),await R(),i&&!s.fallback&&(s.childs.size>0&&0==s.activeChilds.size||0==s.childs.size&&s.fallbacks.size>0)){let t=s;for(;0==t.fallbacks.size;)if(t=t.parent,!t)return;t&&t.fallbacks.forEach((t=>{if(t.redirect){let e=st("/",t.parent&&t.parent.pattern,t.redirect);gt.goto(e,!0)}else t.show()}))}}};return a="tinro",o=s,E().$$.context.set(a,o),N((()=>s.register())),s.router.un=gt.subscribe((t=>{s.router.path=t.path,s.router.url=t.url,s.router.query=t.query,s.router.from=t.from,null!==s.pattern&&s.match()})),s;var a,o}function ft(){return O("tinro").meta}var gt=function(){let{subscribe:t}=nt(lt.get(),(t=>{lt.start(t);let e=function(t){let e=e=>{let n=e.target.closest("a[href]"),r=n&&at(n,"target",!1,"_self"),s=n&&at(n,"tinro-ignore"),a=e.ctrlKey||e.metaKey||e.altKey||e.shiftKey;if("_self"==r&&!s&&!a&&n){let r=n.getAttribute("href").replace(/^\/#/,"");/^\/\/|^[a-zA-Z]+:/.test(r)||(e.preventDefault(),t(r.startsWith("/")?r:n.href.replace(window.location.origin,"")))}};return addEventListener("click",e),()=>removeEventListener("click",e)}(lt.go);return()=>{lt.stop(),e()}}));return{subscribe:t,goto:lt.go,params:mt,meta:ft,useHashNavigation:t=>lt.mode(t?ut.HASH:ut.HISTORY),mode:{hash:()=>lt.mode(ut.HASH),history:()=>lt.mode(ut.HISTORY),memory:()=>lt.mode(ut.MEMORY)}}}();function mt(){return O("tinro").meta.params}const $t=t=>({params:2&t,meta:4&t}),ht=t=>({params:t[1],meta:t[2]});function wt(t){let e;const n=t[9].default,r=o(n,t,t[8],ht);return{c(){r&&r.c()},m(t,n){r&&r.m(t,n),e=!0},p(t,s){r&&r.p&&(!e||262&s)&&u(r,n,t,t[8],e?c(n,t[8],s,$t):l(t[8]),ht)},i(t){e||(P(r,t),e=!0)},o(t){Z(r,t),e=!1},d(t){r&&r.d(t)}}}function bt(t){let e,n,r=t[0]&&wt(t);return{c(){r&&r.c(),e=w()},m(t,s){r&&r.m(t,s),p(t,e,s),n=!0},p(t,[n]){t[0]?r?(r.p(t,n),1&n&&P(r,1)):(r=wt(t),r.c(),P(r,1),r.m(e.parentNode,e)):r&&(Y(),Z(r,1,1,(()=>{r=null})),K())},i(t){n||(P(r),n=!0)},o(t){Z(r),n=!1},d(t){r&&r.d(t),t&&f(e)}}}function yt(t,e,n){let{$$slots:r={},$$scope:s}=e,{path:a="/*"}=e,{fallback:o=!1}=e,{redirect:i=!1}=e,{firstmatch:c=!1}=e,{breadcrumb:u=null}=e,l=!1,d={},p={};const f=pt({fallback:o,onShow(){n(0,l=!0)},onHide(){n(0,l=!1)},onMeta(t){n(2,p=t),n(1,d=p.params)}});return t.$$set=t=>{"path"in t&&n(3,a=t.path),"fallback"in t&&n(4,o=t.fallback),"redirect"in t&&n(5,i=t.redirect),"firstmatch"in t&&n(6,c=t.firstmatch),"breadcrumb"in t&&n(7,u=t.breadcrumb),"$$scope"in t&&n(8,s=t.$$scope)},t.$$.update=()=>{232&t.$$.dirty&&f.update({path:a,redirect:i,firstmatch:c,breadcrumb:u})},[l,d,p,a,o,i,c,u,s,r]}class xt extends tt{constructor(t){super(),X(this,t,yt,bt,a,{path:3,fallback:4,redirect:5,firstmatch:6,breadcrumb:7})}}function vt(t){let e,n,r,s,a;const i=t[2].default,g=o(i,t,t[1],null);return{c(){e=m("div"),n=m("h1"),r=$(t[0]),s=h(),g&&g.c(),y(n,"class","card-header"),y(e,"class","card")},m(t,o){p(t,e,o),d(e,n),d(n,r),d(e,s),g&&g.m(e,null),a=!0},p(t,[e]){(!a||1&e)&&v(r,t[0]),g&&g.p&&(!a||2&e)&&u(g,i,t,t[1],a?c(i,t[1],e,null):l(t[1]),null)},i(t){a||(P(g,t),a=!0)},o(t){Z(g,t),a=!1},d(t){t&&f(e),g&&g.d(t)}}}function _t(t,e,n){let{$$slots:r={},$$scope:s}=e,{title:a}=e;return t.$$set=t=>{"title"in t&&n(0,a=t.title),"$$scope"in t&&n(1,s=t.$$scope)},[a,s,r]}class kt extends tt{constructor(t){super(),X(this,t,_t,vt,a,{title:0})}}function St(t){let e,n,s,a;return{c(){e=m("input"),y(e,"class",n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500"),y(e,"step","0.1"),y(e,"type","number")},m(n,r){p(n,e,r),_(e,t[0].status),s||(a=[b(e,"change",t[1]),b(e,"input",t[2])],s=!0)},p(t,r){1&r&&n!==(n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500")&&y(e,"class",n),1&r&&x(e.value)!==t[0].status&&_(e,t[0].status)},d(t){t&&f(e),s=!1,r(a)}}}function Et(t){let e,n,s,a;return{c(){e=m("input"),y(e,"class",n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500"),y(e,"type","text")},m(n,r){p(n,e,r),_(e,t[0].status),s||(a=[b(e,"change",t[3]),b(e,"input",t[4])],s=!0)},p(t,r){1&r&&n!==(n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500")&&y(e,"class",n),1&r&&e.value!==t[0].status&&_(e,t[0].status)},d(t){t&&f(e),s=!1,r(a)}}}function Nt(t){let e,n,s,a;return{c(){e=m("input"),y(e,"class",n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500"),y(e,"type","date")},m(n,r){p(n,e,r),_(e,t[0].status),s||(a=[b(e,"change",t[5]),b(e,"input",t[6])],s=!0)},p(t,r){1&r&&n!==(n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500")&&y(e,"class",n),1&r&&_(e,t[0].status)},d(t){t&&f(e),s=!1,r(a)}}}function Ot(t){let e,n,s,a;return{c(){e=m("input"),y(e,"class",n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500"),y(e,"type","time")},m(n,r){p(n,e,r),_(e,t[0].status),s||(a=[b(e,"change",t[7]),b(e,"input",t[8])],s=!0)},p(t,r){1&r&&n!==(n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500")&&y(e,"class",n),1&r&&_(e,t[0].status)},d(t){t&&f(e),s=!1,r(a)}}}function At(e){let n,r,s,a,o,i,c,u,l,g=(e[0].descr?e[0].descr:"")+"",w="number"==e[0].type&&St(e),b="text"==e[0].type&&Et(e),x="date"==e[0].type&&Nt(e),_="time"==e[0].type&&Ot(e);return{c(){n=m("div"),r=m("div"),s=m("label"),a=$(g),o=h(),i=m("div"),w&&w.c(),c=h(),b&&b.c(),u=h(),x&&x.c(),l=h(),_&&_.c(),y(s,"class","widget-descr-style"),y(r,"class","widget-descr-width"),y(i,"class","widget-width"),y(n,"class","card-items-psn")},m(t,e){p(t,n,e),d(n,r),d(r,s),d(s,a),d(n,o),d(n,i),w&&w.m(i,null),d(i,c),b&&b.m(i,null),d(i,u),x&&x.m(i,null),d(i,l),_&&_.m(i,null)},p(t,[e]){1&e&&g!==(g=(t[0].descr?t[0].descr:"")+"")&&v(a,g),"number"==t[0].type?w?w.p(t,e):(w=St(t),w.c(),w.m(i,c)):w&&(w.d(1),w=null),"text"==t[0].type?b?b.p(t,e):(b=Et(t),b.c(),b.m(i,u)):b&&(b.d(1),b=null),"date"==t[0].type?x?x.p(t,e):(x=Nt(t),x.c(),x.m(i,l)):x&&(x.d(1),x=null),"time"==t[0].type?_?_.p(t,e):(_=Ot(t),_.c(),_.m(i,null)):_&&(_.d(1),_=null)},i:t,o:t,d(t){t&&f(n),w&&w.d(),b&&b.d(),x&&x.d(),_&&_.d()}}}function Ht(t,e,n){let{widget:r}=e;return t.$$set=t=>{"widget"in t&&n(0,r=t.widget)},[r,()=>(n(0,r.send=!0,r),ne(r.ws,r.topic,r.status)),function(){r.status=x(this.value),n(0,r)},()=>(n(0,r.send=!0,r),ne(r.ws,r.topic,r.status)),function(){r.status=this.value,n(0,r)},()=>(n(0,r.send=!0,r),ne(r.ws,r.topic,r.status)),function(){r.status=this.value,n(0,r)},()=>(n(0,r.send=!0,r),ne(r.ws,r.topic,r.status)),function(){r.status=this.value,n(0,r)}]}class Lt extends tt{constructor(t){super(),X(this,t,Ht,At,a,{widget:0})}}function Tt(e){let n,s,a,o,i,c,u,l,g,w,x,k,S,E,N,O,A,H,L=(e[0].descr?e[0].descr:"")+"";return{c(){n=m("div"),s=m("div"),a=m("label"),o=$(L),i=h(),c=m("div"),u=m("label"),l=m("div"),g=m("input"),x=h(),k=m("div"),S=h(),E=m("div"),y(a,"class","widget-descr-style"),y(s,"class","widget-descr-width"),y(g,"id",w=e[0].topic),y(g,"type","checkbox"),y(g,"class","sr-only"),y(k,"class","block bg-gray-600 w-10 h-6 rounded-full"),y(E,"class",N="dot "+(1==e[0].send?"bg-red-400":"bg-white")+" absolute left-1 top-1 w-4 h-4 rounded-full transition"),y(l,"class","relative"),y(u,"for",O=e[0].topic),y(u,"class","items-center cursor-pointer"),y(c,"class","widget-width"),y(n,"class","card-items-psn")},m(t,r){p(t,n,r),d(n,s),d(s,a),d(a,o),d(n,i),d(n,c),d(c,u),d(u,l),d(l,g),_(g,e[0].status),d(l,x),d(l,k),d(l,S),d(l,E),A||(H=[b(g,"change",e[1]),b(g,"change",e[2])],A=!0)},p(t,[e]){1&e&&L!==(L=(t[0].descr?t[0].descr:"")+"")&&v(o,L),1&e&&w!==(w=t[0].topic)&&y(g,"id",w),1&e&&_(g,t[0].status),1&e&&N!==(N="dot "+(1==t[0].send?"bg-red-400":"bg-white")+" absolute left-1 top-1 w-4 h-4 rounded-full transition")&&y(E,"class",N),1&e&&O!==(O=t[0].topic)&&y(u,"for",O)},i:t,o:t,d(t){t&&f(n),A=!1,r(H)}}}function Ct(t,e,n){let{widget:r}=e;return t.$$set=t=>{"widget"in t&&n(0,r=t.widget)},[r,()=>(n(0,r.send=!0,r),ne(r.ws,r.topic,r.status)),function(){r.status=this.value,n(0,r)}]}class Mt extends tt{constructor(t){super(),X(this,t,Ct,Tt,a,{widget:0})}}function Wt(e){let n,r,s,a,o,i,c,u,l,g,w,b,x=(e[0].descr?e[0].descr:"")+"",_=(e[0].status?e[0].status:"")+"",k=(e[0].after?e[0].after:"")+"";return{c(){n=m("div"),r=m("div"),s=m("label"),a=$(x),o=h(),i=m("div"),c=m("label"),u=$(_),l=h(),g=m("label"),w=$(" "),b=$(k),y(s,"class","widget-descr-style"),y(r,"class","widget-descr-width"),y(c,"class","widget-anydata-style"),y(g,"class","widget-anydata-style"),y(i,"class","widget-width"),y(n,"class","card-items-psn")},m(t,e){p(t,n,e),d(n,r),d(r,s),d(s,a),d(n,o),d(n,i),d(i,c),d(c,u),d(i,l),d(i,g),d(g,w),d(g,b)},p(t,[e]){1&e&&x!==(x=(t[0].descr?t[0].descr:"")+"")&&v(a,x),1&e&&_!==(_=(t[0].status?t[0].status:"")+"")&&v(u,_),1&e&&k!==(k=(t[0].after?t[0].after:"")+"")&&v(b,k)},i:t,o:t,d(t){t&&f(n)}}}function Rt(t,e,n){let{widget:r}=e;return t.$$set=t=>{"widget"in t&&n(0,r=t.widget)},[r]}class zt extends tt{constructor(t){super(),X(this,t,Rt,Wt,a,{widget:0})}}function qt(t,e,n){const r=t.slice();return r[16]=e[n],r[18]=n,r}function jt(t,e,n){const r=t.slice();return r[19]=e[n],r[18]=n,r}function Ft(t,e,n){const r=t.slice();return r[21]=e[n],r[22]=e,r[18]=n,r}function It(t){let e,n,r,s,a="input"===t[21].widget&&Jt(t),o="toggle"===t[21].widget&&Bt(t),i="anydata"===t[21].widget&&Dt(t);return{c(){a&&a.c(),e=h(),o&&o.c(),n=h(),i&&i.c(),r=w()},m(t,c){a&&a.m(t,c),p(t,e,c),o&&o.m(t,c),p(t,n,c),i&&i.m(t,c),p(t,r,c),s=!0},p(t,s){"input"===t[21].widget?a?(a.p(t,s),1&s&&P(a,1)):(a=Jt(t),a.c(),P(a,1),a.m(e.parentNode,e)):a&&(Y(),Z(a,1,1,(()=>{a=null})),K()),"toggle"===t[21].widget?o?(o.p(t,s),1&s&&P(o,1)):(o=Bt(t),o.c(),P(o,1),o.m(n.parentNode,n)):o&&(Y(),Z(o,1,1,(()=>{o=null})),K()),"anydata"===t[21].widget?i?(i.p(t,s),1&s&&P(i,1)):(i=Dt(t),i.c(),P(i,1),i.m(r.parentNode,r)):i&&(Y(),Z(i,1,1,(()=>{i=null})),K())},i(t){s||(P(a),P(o),P(i),s=!0)},o(t){Z(a),Z(o),Z(i),s=!1},d(t){a&&a.d(t),t&&f(e),o&&o.d(t),t&&f(n),i&&i.d(t),t&&f(r)}}}function Jt(t){let e,n,r;function s(e){t[5](e,t[21])}let a={widget:t[21]};return void 0!==t[21].status&&(a.value=t[21].status),e=new Lt({props:a}),H.push((()=>Q(e,"value",s))),{c(){G(e.$$.fragment)},m(t,n){U(e,t,n),r=!0},p(r,s){t=r;const a={};1&s&&(a.widget=t[21]),!n&&1&s&&(n=!0,a.value=t[21].status,q((()=>n=!1))),e.$set(a)},i(t){r||(P(e.$$.fragment,t),r=!0)},o(t){Z(e.$$.fragment,t),r=!1},d(t){V(e,t)}}}function Bt(t){let e,n,r;function s(e){t[6](e,t[21])}let a={widget:t[21]};return void 0!==t[21].status&&(a.value=t[21].status),e=new Mt({props:a}),H.push((()=>Q(e,"value",s))),{c(){G(e.$$.fragment)},m(t,n){U(e,t,n),r=!0},p(r,s){t=r;const a={};1&s&&(a.widget=t[21]),!n&&1&s&&(n=!0,a.value=t[21].status,q((()=>n=!1))),e.$set(a)},i(t){r||(P(e.$$.fragment,t),r=!0)},o(t){Z(e.$$.fragment,t),r=!1},d(t){V(e,t)}}}function Dt(t){let e,n,r;function s(e){t[7](e,t[21])}let a={widget:t[21]};return void 0!==t[21].status&&(a.value=t[21].status),e=new zt({props:a}),H.push((()=>Q(e,"value",s))),{c(){G(e.$$.fragment)},m(t,n){U(e,t,n),r=!0},p(r,s){t=r;const a={};1&s&&(a.widget=t[21]),!n&&1&s&&(n=!0,a.value=t[21].status,q((()=>n=!1))),e.$set(a)},i(t){r||(P(e.$$.fragment,t),r=!0)},o(t){Z(e.$$.fragment,t),r=!1},d(t){V(e,t)}}}function Yt(t){let e,n,r=t[21].page===t[19].page&&It(t);return{c(){r&&r.c(),e=w()},m(t,s){r&&r.m(t,s),p(t,e,s),n=!0},p(t,n){t[21].page===t[19].page?r?(r.p(t,n),3&n&&P(r,1)):(r=It(t),r.c(),P(r,1),r.m(e.parentNode,e)):r&&(Y(),Z(r,1,1,(()=>{r=null})),K())},i(t){n||(P(r),n=!0)},o(t){Z(r),n=!1},d(t){r&&r.d(t),t&&f(e)}}}function Kt(t){let e,n,r=t[0],s=[];for(let e=0;eZ(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;tZ(o[t],1,1,(()=>{o[t]=null}));return r=new kt({props:{title:"Редактор JSON",$$slots:{default:[Zt]},$$scope:{ctx:t}}}),{c(){e=m("div");for(let t=0;t',r=h(),s=m("input"),a=h(),o=m("label"),o.innerHTML="",i=h(),c=m("ul"),u=m("li"),l=m("a"),l.textContent="Управление",g=h(),$=m("li"),w=m("a"),w.textContent="Конфигуратор",b=h(),x=m("li"),v=m("a"),v.textContent="Подключение",_=h(),k=m("li"),S=m("a"),S.textContent="Утилиты",E=h(),N=m("li"),O=m("a"),O.textContent="Лог",A=h(),H=m("li"),L=m("a"),L.textContent="О проекте",T=h(),C=m("ul"),M=m("div"),G(W.$$.fragment),R=h(),G(z.$$.fragment),q=h(),G(j.$$.fragment),F=h(),G(I.$$.fragment),J=h(),G(B.$$.fragment),D=h(),G(Y.$$.fragment),y(n,"class","fixed m-0 h-10 w-full bg-gray-100 shadow-md"),y(s,"id","menu__toggle"),y(s,"type","checkbox"),y(o,"class","menu__btn"),y(o,"for","menu__toggle"),y(l,"class","menu__item"),y(l,"href","/"),y(w,"class","menu__item"),y(w,"href","/config"),y(v,"class","menu__item"),y(v,"href","/connection"),y(S,"class","menu__item"),y(S,"href","/utilities"),y(O,"class","menu__item"),y(O,"href","/log"),y(L,"class","menu__item"),y(L,"href","/about"),y(c,"class","menu__box"),y(M,"class","bg-cover bg-gray-50 pt-8 px-4"),y(C,"class","menu__main")},m(t,f){p(t,e,f),d(e,n),d(e,r),d(e,s),d(e,a),d(e,o),d(e,i),d(e,c),d(c,u),d(u,l),d(c,g),d(c,$),d($,w),d(c,b),d(c,x),d(x,v),d(c,_),d(c,k),d(k,S),d(c,E),d(c,N),d(N,O),d(c,A),d(c,H),d(H,L),d(e,T),d(e,C),d(C,M),U(W,M,null),d(M,R),U(z,M,null),d(M,q),U(j,M,null),d(M,F),U(I,M,null),d(M,J),U(B,M,null),d(M,D),U(Y,M,null),K=!0},p(t,[e]){const n={};8388611&e&&(n.$$scope={dirty:e,ctx:t}),W.$set(n);const r={};8388608&e&&(r.$$scope={dirty:e,ctx:t}),z.$set(r);const s={};8388608&e&&(s.$$scope={dirty:e,ctx:t}),j.$set(s);const a={};8388612&e&&(a.$$scope={dirty:e,ctx:t}),B.$set(a)},i(t){K||(P(W.$$.fragment,t),P(z.$$.fragment,t),P(j.$$.fragment,t),P(I.$$.fragment,t),P(B.$$.fragment,t),P(Y.$$.fragment,t),K=!0)},o(t){Z(W.$$.fragment,t),Z(z.$$.fragment,t),Z(j.$$.fragment,t),Z(I.$$.fragment,t),Z(B.$$.fragment,t),Z(Y.$$.fragment,t),K=!1},d(t){t&&f(e),V(W),V(z),V(j),V(I),V(B),V(Y)}}}function ne(t,e,n){console.log(t,e,n)}function re(t,e,n){gt.mode.hash();let r=document.location.hostname,s=[];s=[{widget:"input",type:"date",status:"2021-10-17",page:"Inputs",order:"4",descr:"Switch on boiler date",topic:"/prefix/00000-00004/date1",ws:1},{widget:"input",type:"time",status:"12:00",page:"Inputs",order:"1",descr:"Switch on boiler time",topic:"/prefix/00000-00001/time",ws:1},{widget:"input",type:"number",status:"30.5",after:"°С",page:"Inputs",order:"2",descr:"Boiler temperature",topic:"/prefix/00000-00002/temp",ws:1},{widget:"input",type:"text",status:"Hello",page:"Inputs",order:"3",descr:"Message to be send",topic:"/prefix/00000-00003/text",ws:1},{widget:"toggle",status:0,page:"Toggles",order:"3",descr:"Light in my room",topic:"/prefix/00000-00003/btn1",ws:1},{widget:"toggle",status:0,page:"Toggles",order:"3",descr:"Light in my room",topic:"/prefix/00000-00003/btn2",ws:1},{widget:"toggle",status:0,page:"Toggles",order:"3",descr:"Light in my room",topic:"/prefix/00000-00003/btn3",ws:1},{widget:"anydata",status:30.5,after:"°С",page:"Any data",order:"3",descr:"Temperature",topic:"/prefix/00000-00003/tmp10",ws:1},{widget:"anydata",status:1032,after:"mm",page:"Any data",order:"3",descr:"Pressure",topic:"/prefix/00000-00003/tmp10",ws:1},{widget:"anydata",status:50,after:"%",page:"Any data",order:"3",descr:"Level",topic:"/prefix/00000-00003/tmp10",ws:1},{widget:"anydata",status:"opened",page:"Any data",order:"3",descr:"Status",topic:"/prefix/00000-00003/tmp10",ws:1}];let a=[],o=[],i=[];const c=t=>{try{t=JSON.stringify(JSON.parse(t),null,4)}catch(e){return t}return t=(t=t.replace(/&/g,"&").replace(//g,">")).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,(function(t){return t}))};function u(){n(1,o=[]);Array.from(new Set(Array.from(s,(({page:t})=>t)))).forEach((function(t,e,r){n(1,o=[...o,JSON.parse(JSON.stringify({page:t}))])})),o.sort((function(t,e){return t.pagee.page?1:0}))}N((async()=>{console.log("mounted"),a[0]=new WebSocket("ws://"+r+"/ws"),a[0].addEventListener("open",(function(t){console.log("WS CONNECTED! "+r),a[0].send("HELLO")})),a[0].addEventListener("message",(function(t){console.log("NEW data packet "+r,t.data),l("test",t.data)})),a[0].addEventListener("close",(t=>{console.log("ws close "+r)})),a[0].addEventListener("error",(function(t){console.log(r+" WebSocket error: ",t)})),u()}));const l=(t,e)=>{const n=e.toString(),r=(new Date).getTime();d(t,n,r)},d=(t,e,r)=>{i.length>Number(10)&&n(2,i=i.slice(0)),n(2,i=[...i,{topic:t,msg:e,time:r,colored:c(e),closed:!0}]),i.sort((function(t,e){return t.closed=!0,t.time>e.time?-1:t.time32){const e=[],n=t.ctx.length/32;for(let t=0;tt.removeEventListener(e,n,r)}function x(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t){return""===t?null:+t}function k(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function _(t,e){t.value=null==e?"":e}let S;function E(t){S=t}function N(){if(!S)throw new Error("Function called outside component initialization");return S}function O(t){N().$$.on_mount.push(t)}function A(t){return N().$$.context.get(t)}const H=[],T=[],C=[],L=[],M=Promise.resolve();let W=!1;function j(){W||(W=!0,M.then(J))}function z(){return j(),M}function R(t){C.push(t)}function q(t){L.push(t)}let I=!1;const F=new Set;function J(){if(!I){I=!0;do{for(let t=0;t{D.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}}function G(t,e,n){const r=t.$$.props[e];void 0!==r&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function U(t){t&&t.c()}function V(t,n,o,a){const{fragment:i,on_mount:c,on_destroy:l,after_update:u}=t.$$;i&&i.m(n,o),a||R((()=>{const n=c.map(e).filter(s);l?l.push(...n):r(n),t.$$.on_mount=[]})),u.forEach(R)}function X(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function tt(e,s,o,a,i,c,l,u=[-1]){const d=S;E(e);const p=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:i,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:s.context||[]),callbacks:n(),dirty:u,skip_bound:!1,root:s.target||d.$$.root};l&&l(p.root);let g=!1;if(p.ctx=o?o(e,s.props||{},((t,n,...r)=>{const s=r.length?r[0]:n;return p.ctx&&i(p.ctx[t],p.ctx[t]=s)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](s),g&&function(t,e){-1===t.$$.dirty[0]&&(H.push(t),j(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const nt=[];function rt(e,n=t){let r;const s=new Set;function a(t){if(o(e,t)&&(e=t,r)){const t=!nt.length;for(const t of s)t[1](),nt.push(t,e);if(t){for(let t=0;t{s.delete(c),0===s.size&&(r(),r=null)}}}}function st(t,e=!1){return(t=t.slice(t.startsWith("/#")?2:0,t.endsWith("/*")?-2:void 0)).startsWith("/")||(t="/"+t),"/"===t&&(t=""),e&&!t.endsWith("/")&&(t+="/"),t}function ot(t,e,n){if(""===n)return t;if("/"===n[0])return n;let r=t=>t.split("/").filter((t=>""!==t)),s=r(t);return"/"+(e?r(e):[]).map(((t,e)=>s[e])).join("/")+"/"+n}function at(t,e,n,r){let s=[e,"data-"+e].reduce(((e,r)=>{let s=t.getAttribute(r);return n&&t.removeAttribute(r),null===s?e:s}),!1);return!r&&""===s||(s||r||!1)}function it(t){let e=t.split("&").map((t=>t.split("="))).reduce(((t,e)=>{let n=e[0];if(!n)return t;let r=!(e.length>1)||e[e.length-1];return"string"==typeof r&&r.includes(",")&&(r=r.split(",")),void 0===t[n]?t[n]=[r]:t[n].push(r),t}),{});return Object.entries(e).reduce(((t,e)=>(t[e[0]]=e[1].length>1?e[1]:e[1][0],t)),{})}var ct,lt,ut={HISTORY:1,HASH:2,MEMORY:3,OFF:4,run:function(t,e,n,r){return 1===t?e&&e():2===t?n&&n():r&&r()},getDeafault:function(){return window&&"srcdoc"!==window.location.pathname?1:3}},dt=function(){let t,e=ut.getDeafault(),n=n=>t&&t(pt(e));function r(t){t&&(e=t),window.onhashchange=window.onpopstate=lt=null,e!==ut.OFF&&ut.run(e,(t=>window.onpopstate=n),(t=>window.onhashchange=n))&&n()}return{mode:t=>r(t),get:t=>pt(e),go(t,r){(function(t,e,n){let r=t=>history[n?"replaceState":"pushState"]({},"",t);ut.run(t,(t=>r(e)),(t=>r(`#${e}`)),(t=>lt=e))})(e,t,r),n()},start(e){t=e,r()},stop(){t=null,r(ut.OFF)}}}();function pt(t){let e=ct,n=ct=ut.run(t,(t=>window.location.pathname+window.location.search),(t=>String(window.location.hash.slice(1)||"/")),(t=>lt||"/")),r=n.match(/^([^?#]+)(?:\?([^#]+))?(?:\#(.+))?$/);return{url:n,from:e,path:r[1]||"",query:it(r[2]||""),hash:r[3]||""}}function ft(t){let e=A("tinro");e&&(e.exact||e.fallback)&&function(t){throw new Error("[Tinro] "+t)}(`${t.fallback?"":``} can't be inside ${e.fallback?"":` with exact path`}`);let n=t.fallback?"fallbacks":"childs",r=rt({}),s={router:{},exact:!1,pattern:null,meta:{},parent:e,fallback:t.fallback,redirect:!1,firstmatch:!1,breadcrumb:null,matched:!1,childs:new Set,activeChilds:new Set,fallbacks:new Set,update(t){s.exact=!t.path.endsWith("/*"),s.pattern=st(`${s.parent&&s.parent.pattern||""}${t.path}`),s.redirect=t.redirect,s.firstmatch=t.firstmatch,s.breadcrumb=t.breadcrumb,s.match()},register:()=>{if(s.parent)return s.parent[n].add(s),()=>{s.parent[n].delete(s),s.router.un&&s.router.un()}},show:()=>{t.onShow(),!s.fallback&&s.parent&&s.parent.activeChilds.add(s)},hide:()=>{t.onHide(),!s.fallback&&s.parent&&s.parent.activeChilds.delete(s)},match:async()=>{s.matched=!1;let{path:e,url:n,from:o,query:a}=s.router,i=function(t,e){t=st(t,!0),e=st(e,!0);let n=[],r={},s=!0,o=t.split("/").map((t=>t.startsWith(":")?(n.push(t.slice(1)),"([^\\/]+)"):t)).join("\\/"),a=e.match(new RegExp(`^${o}$`));return a||(s=!1,a=e.match(new RegExp(`^${o}`))),a?(n.forEach(((t,e)=>r[t]=a[e+1])),{exact:s,params:r,part:a[0].slice(0,-1)}):null}(s.pattern,e);if(!s.fallback&&i&&s.redirect&&(!s.exact||s.exact&&i.exact)){await z();let t=ot(e,s.parent&&s.parent.pattern,s.redirect);return mt.goto(t,!0)}if(s.meta=i&&{from:o,url:n,query:a,match:i.part,pattern:s.pattern,breadcrumbs:s.parent&&s.parent.meta&&s.parent.meta.breadcrumbs.slice()||[],params:i.params,subscribe:r.subscribe},s.breadcrumb&&s.meta&&s.meta.breadcrumbs.push({name:s.breadcrumb,path:i.part}),r.set(s.meta),!i||s.fallback||!(!s.exact||s.exact&&i.exact)||s.parent&&s.parent.firstmatch&&s.parent.matched?s.hide():(t.onMeta(s.meta),s.parent&&(s.parent.matched=!0),s.show()),await z(),i&&!s.fallback&&(s.childs.size>0&&0==s.activeChilds.size||0==s.childs.size&&s.fallbacks.size>0)){let t=s;for(;0==t.fallbacks.size;)if(t=t.parent,!t)return;t&&t.fallbacks.forEach((t=>{if(t.redirect){let e=ot("/",t.parent&&t.parent.pattern,t.redirect);mt.goto(e,!0)}else t.show()}))}}};return o="tinro",a=s,N().$$.context.set(o,a),O((()=>s.register())),s.router.un=mt.subscribe((t=>{s.router.path=t.path,s.router.url=t.url,s.router.query=t.query,s.router.from=t.from,null!==s.pattern&&s.match()})),s;var o,a}function gt(){return A("tinro").meta}var mt=function(){let{subscribe:t}=rt(dt.get(),(t=>{dt.start(t);let e=function(t){let e=e=>{let n=e.target.closest("a[href]"),r=n&&at(n,"target",!1,"_self"),s=n&&at(n,"tinro-ignore"),o=e.ctrlKey||e.metaKey||e.altKey||e.shiftKey;if("_self"==r&&!s&&!o&&n){let r=n.getAttribute("href").replace(/^\/#/,"");/^\/\/|^[a-zA-Z]+:/.test(r)||(e.preventDefault(),t(r.startsWith("/")?r:n.href.replace(window.location.origin,"")))}};return addEventListener("click",e),()=>removeEventListener("click",e)}(dt.go);return()=>{dt.stop(),e()}}));return{subscribe:t,goto:dt.go,params:$t,meta:gt,useHashNavigation:t=>dt.mode(t?ut.HASH:ut.HISTORY),mode:{hash:()=>dt.mode(ut.HASH),history:()=>dt.mode(ut.HISTORY),memory:()=>dt.mode(ut.MEMORY)}}}();function $t(){return A("tinro").meta.params}const ht=t=>({params:2&t,meta:4&t}),wt=t=>({params:t[1],meta:t[2]});function bt(t){let e;const n=t[9].default,r=a(n,t,t[8],wt);return{c(){r&&r.c()},m(t,n){r&&r.m(t,n),e=!0},p(t,s){r&&r.p&&(!e||262&s)&&l(r,n,t,t[8],e?c(n,t[8],s,ht):u(t[8]),wt)},i(t){e||(Z(r,t),e=!0)},o(t){Q(r,t),e=!1},d(t){r&&r.d(t)}}}function yt(t){let e,n,r=t[0]&&bt(t);return{c(){r&&r.c(),e=b()},m(t,s){r&&r.m(t,s),p(t,e,s),n=!0},p(t,[n]){t[0]?r?(r.p(t,n),1&n&&Z(r,1)):(r=bt(t),r.c(),Z(r,1),r.m(e.parentNode,e)):r&&(K(),Q(r,1,1,(()=>{r=null})),P())},i(t){n||(Z(r),n=!0)},o(t){Q(r),n=!1},d(t){r&&r.d(t),t&&f(e)}}}function xt(t,e,n){let{$$slots:r={},$$scope:s}=e,{path:o="/*"}=e,{fallback:a=!1}=e,{redirect:i=!1}=e,{firstmatch:c=!1}=e,{breadcrumb:l=null}=e,u=!1,d={},p={};const f=ft({fallback:a,onShow(){n(0,u=!0)},onHide(){n(0,u=!1)},onMeta(t){n(2,p=t),n(1,d=p.params)}});return t.$$set=t=>{"path"in t&&n(3,o=t.path),"fallback"in t&&n(4,a=t.fallback),"redirect"in t&&n(5,i=t.redirect),"firstmatch"in t&&n(6,c=t.firstmatch),"breadcrumb"in t&&n(7,l=t.breadcrumb),"$$scope"in t&&n(8,s=t.$$scope)},t.$$.update=()=>{232&t.$$.dirty&&f.update({path:o,redirect:i,firstmatch:c,breadcrumb:l})},[u,d,p,o,a,i,c,l,s,r]}class vt extends et{constructor(t){super(),tt(this,t,xt,yt,o,{path:3,fallback:4,redirect:5,firstmatch:6,breadcrumb:7})}}function kt(t){let e,n,r,s,o;const i=t[2].default,g=a(i,t,t[1],null);return{c(){e=m("div"),n=m("h1"),r=h(t[0]),s=w(),g&&g.c(),x(n,"class","card-header"),x(e,"class","card")},m(t,a){p(t,e,a),d(e,n),d(n,r),d(e,s),g&&g.m(e,null),o=!0},p(t,[e]){(!o||1&e)&&k(r,t[0]),g&&g.p&&(!o||2&e)&&l(g,i,t,t[1],o?c(i,t[1],e,null):u(t[1]),null)},i(t){o||(Z(g,t),o=!0)},o(t){Q(g,t),o=!1},d(t){t&&f(e),g&&g.d(t)}}}function _t(t,e,n){let{$$slots:r={},$$scope:s}=e,{title:o}=e;return t.$$set=t=>{"title"in t&&n(0,o=t.title),"$$scope"in t&&n(1,s=t.$$scope)},[o,s,r]}class St extends et{constructor(t){super(),tt(this,t,_t,kt,o,{title:0})}}function Et(t){let e,n,s,o;return{c(){e=m("input"),x(e,"class",n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500"),x(e,"step","0.1"),x(e,"type","number")},m(n,r){p(n,e,r),_(e,t[0].status),s||(o=[y(e,"change",t[1]),y(e,"input",t[2])],s=!0)},p(t,r){1&r&&n!==(n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500")&&x(e,"class",n),1&r&&v(e.value)!==t[0].status&&_(e,t[0].status)},d(t){t&&f(e),s=!1,r(o)}}}function Nt(t){let e,n,s,o;return{c(){e=m("input"),x(e,"class",n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500"),x(e,"type","text")},m(n,r){p(n,e,r),_(e,t[0].status),s||(o=[y(e,"change",t[3]),y(e,"input",t[4])],s=!0)},p(t,r){1&r&&n!==(n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500")&&x(e,"class",n),1&r&&e.value!==t[0].status&&_(e,t[0].status)},d(t){t&&f(e),s=!1,r(o)}}}function Ot(t){let e,n,s,o;return{c(){e=m("input"),x(e,"class",n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500"),x(e,"type","date")},m(n,r){p(n,e,r),_(e,t[0].status),s||(o=[y(e,"change",t[5]),y(e,"input",t[6])],s=!0)},p(t,r){1&r&&n!==(n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500")&&x(e,"class",n),1&r&&_(e,t[0].status)},d(t){t&&f(e),s=!1,r(o)}}}function At(t){let e,n,s,o;return{c(){e=m("input"),x(e,"class",n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500"),x(e,"type","time")},m(n,r){p(n,e,r),_(e,t[0].status),s||(o=[y(e,"change",t[7]),y(e,"input",t[8])],s=!0)},p(t,r){1&r&&n!==(n=1==t[0].send?"widget-input border-red-500":"widget-input focus:border-indigo-500")&&x(e,"class",n),1&r&&_(e,t[0].status)},d(t){t&&f(e),s=!1,r(o)}}}function Ht(e){let n,r,s,o,a,i,c,l,u,g=(e[0].descr?e[0].descr:"")+"",$="number"==e[0].type&&Et(e),b="text"==e[0].type&&Nt(e),y="date"==e[0].type&&Ot(e),v="time"==e[0].type&&At(e);return{c(){n=m("div"),r=m("div"),s=m("label"),o=h(g),a=w(),i=m("div"),$&&$.c(),c=w(),b&&b.c(),l=w(),y&&y.c(),u=w(),v&&v.c(),x(s,"class","widget-descr-style"),x(r,"class","widget-descr-width"),x(i,"class","widget-width"),x(n,"class","card-items-psn")},m(t,e){p(t,n,e),d(n,r),d(r,s),d(s,o),d(n,a),d(n,i),$&&$.m(i,null),d(i,c),b&&b.m(i,null),d(i,l),y&&y.m(i,null),d(i,u),v&&v.m(i,null)},p(t,[e]){1&e&&g!==(g=(t[0].descr?t[0].descr:"")+"")&&k(o,g),"number"==t[0].type?$?$.p(t,e):($=Et(t),$.c(),$.m(i,c)):$&&($.d(1),$=null),"text"==t[0].type?b?b.p(t,e):(b=Nt(t),b.c(),b.m(i,l)):b&&(b.d(1),b=null),"date"==t[0].type?y?y.p(t,e):(y=Ot(t),y.c(),y.m(i,u)):y&&(y.d(1),y=null),"time"==t[0].type?v?v.p(t,e):(v=At(t),v.c(),v.m(i,null)):v&&(v.d(1),v=null)},i:t,o:t,d(t){t&&f(n),$&&$.d(),b&&b.d(),y&&y.d(),v&&v.d()}}}function Tt(t,e,n){let{widget:r}=e;return t.$$set=t=>{"widget"in t&&n(0,r=t.widget)},[r,()=>(n(0,r.send=!0,r),re(r.ws,r.topic,r.status)),function(){r.status=v(this.value),n(0,r)},()=>(n(0,r.send=!0,r),re(r.ws,r.topic,r.status)),function(){r.status=this.value,n(0,r)},()=>(n(0,r.send=!0,r),re(r.ws,r.topic,r.status)),function(){r.status=this.value,n(0,r)},()=>(n(0,r.send=!0,r),re(r.ws,r.topic,r.status)),function(){r.status=this.value,n(0,r)}]}class Ct extends et{constructor(t){super(),tt(this,t,Tt,Ht,o,{widget:0})}}function Lt(e){let n,s,o,a,i,c,l,u,g,$,b,v,S,E,N,O,A,H,T=(e[0].descr?e[0].descr:"")+"";return{c(){n=m("div"),s=m("div"),o=m("label"),a=h(T),i=w(),c=m("div"),l=m("label"),u=m("div"),g=m("input"),b=w(),v=m("div"),S=w(),E=m("div"),x(o,"class","widget-descr-style"),x(s,"class","widget-descr-width"),x(g,"id",$=e[0].topic),x(g,"type","checkbox"),x(g,"class","sr-only"),x(v,"class","block bg-gray-600 w-10 h-6 rounded-full"),x(E,"class",N="dot "+(1==e[0].send?"bg-red-400":"bg-white")+" absolute left-1 top-1 w-4 h-4 rounded-full transition"),x(u,"class","relative"),x(l,"for",O=e[0].topic),x(l,"class","items-center cursor-pointer"),x(c,"class","widget-width"),x(n,"class","card-items-psn")},m(t,r){p(t,n,r),d(n,s),d(s,o),d(o,a),d(n,i),d(n,c),d(c,l),d(l,u),d(u,g),_(g,e[0].status),d(u,b),d(u,v),d(u,S),d(u,E),A||(H=[y(g,"change",e[1]),y(g,"change",e[2])],A=!0)},p(t,[e]){1&e&&T!==(T=(t[0].descr?t[0].descr:"")+"")&&k(a,T),1&e&&$!==($=t[0].topic)&&x(g,"id",$),1&e&&_(g,t[0].status),1&e&&N!==(N="dot "+(1==t[0].send?"bg-red-400":"bg-white")+" absolute left-1 top-1 w-4 h-4 rounded-full transition")&&x(E,"class",N),1&e&&O!==(O=t[0].topic)&&x(l,"for",O)},i:t,o:t,d(t){t&&f(n),A=!1,r(H)}}}function Mt(t,e,n){let{widget:r}=e;return t.$$set=t=>{"widget"in t&&n(0,r=t.widget)},[r,()=>(n(0,r.send=!0,r),re(r.ws,r.topic,r.status)),function(){r.status=this.value,n(0,r)}]}class Wt extends et{constructor(t){super(),tt(this,t,Mt,Lt,o,{widget:0})}}function jt(e){let n,r,s,o,a,i,c,l,u,g,$,b,y=(e[0].descr?e[0].descr:"")+"",v=(e[0].status?e[0].status:"")+"",_=(e[0].after?e[0].after:"")+"";return{c(){n=m("div"),r=m("div"),s=m("label"),o=h(y),a=w(),i=m("div"),c=m("label"),l=h(v),u=w(),g=m("label"),$=h(" "),b=h(_),x(s,"class","widget-descr-style"),x(r,"class","widget-descr-width"),x(c,"class","widget-anydata-style"),x(g,"class","widget-anydata-style"),x(i,"class","widget-width"),x(n,"class","card-items-psn")},m(t,e){p(t,n,e),d(n,r),d(r,s),d(s,o),d(n,a),d(n,i),d(i,c),d(c,l),d(i,u),d(i,g),d(g,$),d(g,b)},p(t,[e]){1&e&&y!==(y=(t[0].descr?t[0].descr:"")+"")&&k(o,y),1&e&&v!==(v=(t[0].status?t[0].status:"")+"")&&k(l,v),1&e&&_!==(_=(t[0].after?t[0].after:"")+"")&&k(b,_)},i:t,o:t,d(t){t&&f(n)}}}function zt(t,e,n){let{widget:r}=e;return t.$$set=t=>{"widget"in t&&n(0,r=t.widget)},[r]}class Rt extends et{constructor(t){super(),tt(this,t,zt,jt,o,{widget:0})}}function qt(t,e,n){const r=t.slice();return r[20]=e[n],r[22]=n,r}function It(t,e,n){const r=t.slice();return r[23]=e[n],r[22]=n,r}function Ft(t,e,n){const r=t.slice();return r[25]=e[n],r[26]=e,r[22]=n,r}function Jt(t){let e,n,r,s,o="input"===t[25].widget&&Bt(t),a="toggle"===t[25].widget&&Dt(t),i="anydata"===t[25].widget&&Yt(t);return{c(){o&&o.c(),e=w(),a&&a.c(),n=w(),i&&i.c(),r=b()},m(t,c){o&&o.m(t,c),p(t,e,c),a&&a.m(t,c),p(t,n,c),i&&i.m(t,c),p(t,r,c),s=!0},p(t,s){"input"===t[25].widget?o?(o.p(t,s),1&s&&Z(o,1)):(o=Bt(t),o.c(),Z(o,1),o.m(e.parentNode,e)):o&&(K(),Q(o,1,1,(()=>{o=null})),P()),"toggle"===t[25].widget?a?(a.p(t,s),1&s&&Z(a,1)):(a=Dt(t),a.c(),Z(a,1),a.m(n.parentNode,n)):a&&(K(),Q(a,1,1,(()=>{a=null})),P()),"anydata"===t[25].widget?i?(i.p(t,s),1&s&&Z(i,1)):(i=Yt(t),i.c(),Z(i,1),i.m(r.parentNode,r)):i&&(K(),Q(i,1,1,(()=>{i=null})),P())},i(t){s||(Z(o),Z(a),Z(i),s=!0)},o(t){Q(o),Q(a),Q(i),s=!1},d(t){o&&o.d(t),t&&f(e),a&&a.d(t),t&&f(n),i&&i.d(t),t&&f(r)}}}function Bt(t){let e,n,r;function s(e){t[6](e,t[25])}let o={widget:t[25]};return void 0!==t[25].status&&(o.value=t[25].status),e=new Ct({props:o}),T.push((()=>G(e,"value",s))),{c(){U(e.$$.fragment)},m(t,n){V(e,t,n),r=!0},p(r,s){t=r;const o={};1&s&&(o.widget=t[25]),!n&&1&s&&(n=!0,o.value=t[25].status,q((()=>n=!1))),e.$set(o)},i(t){r||(Z(e.$$.fragment,t),r=!0)},o(t){Q(e.$$.fragment,t),r=!1},d(t){X(e,t)}}}function Dt(t){let e,n,r;function s(e){t[7](e,t[25])}let o={widget:t[25]};return void 0!==t[25].status&&(o.value=t[25].status),e=new Wt({props:o}),T.push((()=>G(e,"value",s))),{c(){U(e.$$.fragment)},m(t,n){V(e,t,n),r=!0},p(r,s){t=r;const o={};1&s&&(o.widget=t[25]),!n&&1&s&&(n=!0,o.value=t[25].status,q((()=>n=!1))),e.$set(o)},i(t){r||(Z(e.$$.fragment,t),r=!0)},o(t){Q(e.$$.fragment,t),r=!1},d(t){X(e,t)}}}function Yt(t){let e,n,r;function s(e){t[8](e,t[25])}let o={widget:t[25]};return void 0!==t[25].status&&(o.value=t[25].status),e=new Rt({props:o}),T.push((()=>G(e,"value",s))),{c(){U(e.$$.fragment)},m(t,n){V(e,t,n),r=!0},p(r,s){t=r;const o={};1&s&&(o.widget=t[25]),!n&&1&s&&(n=!0,o.value=t[25].status,q((()=>n=!1))),e.$set(o)},i(t){r||(Z(e.$$.fragment,t),r=!0)},o(t){Q(e.$$.fragment,t),r=!1},d(t){X(e,t)}}}function Kt(t){let e,n,r=t[25].page===t[23].page&&Jt(t);return{c(){r&&r.c(),e=b()},m(t,s){r&&r.m(t,s),p(t,e,s),n=!0},p(t,n){t[25].page===t[23].page?r?(r.p(t,n),5&n&&Z(r,1)):(r=Jt(t),r.c(),Z(r,1),r.m(e.parentNode,e)):r&&(K(),Q(r,1,1,(()=>{r=null})),P())},i(t){n||(Z(r),n=!0)},o(t){Q(r),n=!1},d(t){r&&r.d(t),t&&f(e)}}}function Pt(t){let e,n,r=t[0],s=[];for(let e=0;eQ(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;tQ(a[t],1,1,(()=>{a[t]=null}));return r=new St({props:{title:"Редактор JSON",$$slots:{default:[Qt]},$$scope:{ctx:t}}}),{c(){e=m("div");for(let t=0;t",h=w(),b=m("ul"),y=m("li"),v=m("a"),v.textContent="Управление",k=w(),_=m("li"),S=m("a"),S.textContent="Конфигуратор",E=w(),N=m("li"),O=m("a"),O.textContent="Подключение",A=w(),H=m("li"),T=m("a"),T.textContent="Утилиты",C=w(),L=m("li"),M=m("a"),M.textContent="Лог",W=w(),j=m("li"),z=m("a"),z.textContent="О проекте",R=w(),q=m("ul"),I=m("div"),U(F.$$.fragment),J=w(),U(B.$$.fragment),D=w(),U(Y.$$.fragment),K=w(),U(P.$$.fragment),G=w(),U(tt.$$.fragment),et=w(),U(nt.$$.fragment),x(o,"stroke","none"),x(o,"d","M0 0h24v24H0z"),x(a,"d","M7 18a4.6 4.4 0 0 1 0 -9h0a5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7h-12"),x(s,"class",i="h-8 w-8 "+(1==t[1]?"text-green-500":"text-red-500")),x(s,"width","24"),x(s,"height","24"),x(s,"viewBox","0 0 24 24"),x(s,"stroke-width","2"),x(s,"stroke","currentColor"),x(s,"fill","none"),x(s,"stroke-linecap","round"),x(s,"stroke-linejoin","round"),x(r,"class","flex justify-end content-center px-6 py-1"),x(n,"class","fixed m-0 h-10 w-full bg-gray-100 shadow-md"),x(l,"id","menu__toggle"),x(l,"type","checkbox"),x(g,"class","menu__btn"),x(g,"for","menu__toggle"),x(v,"class","menu__item"),x(v,"href","/"),x(S,"class","menu__item"),x(S,"href","/config"),x(O,"class","menu__item"),x(O,"href","/connection"),x(T,"class","menu__item"),x(T,"href","/utilities"),x(M,"class","menu__item"),x(M,"href","/log"),x(z,"class","menu__item"),x(z,"href","/about"),x(b,"class","menu__box"),x(I,"class","bg-cover bg-gray-50 pt-8 px-4"),x(q,"class","menu__main")},m(t,i){p(t,e,i),d(e,n),d(n,r),d(r,s),d(s,o),d(s,a),d(e,c),d(e,l),d(e,u),d(e,g),d(e,h),d(e,b),d(b,y),d(y,v),d(b,k),d(b,_),d(_,S),d(b,E),d(b,N),d(N,O),d(b,A),d(b,H),d(H,T),d(b,C),d(b,L),d(L,M),d(b,W),d(b,j),d(j,z),d(e,R),d(e,q),d(q,I),V(F,I,null),d(I,J),V(B,I,null),d(I,D),V(Y,I,null),d(I,K),V(P,I,null),d(I,G),V(tt,I,null),d(I,et),V(nt,I,null),rt=!0},p(t,[e]){(!rt||2&e&&i!==(i="h-8 w-8 "+(1==t[1]?"text-green-500":"text-red-500")))&&x(s,"class",i);const n={};134217733&e&&(n.$$scope={dirty:e,ctx:t}),F.$set(n);const r={};134217728&e&&(r.$$scope={dirty:e,ctx:t}),B.$set(r);const o={};134217728&e&&(o.$$scope={dirty:e,ctx:t}),Y.$set(o);const a={};134217736&e&&(a.$$scope={dirty:e,ctx:t}),tt.$set(a)},i(t){rt||(Z(F.$$.fragment,t),Z(B.$$.fragment,t),Z(Y.$$.fragment,t),Z(P.$$.fragment,t),Z(tt.$$.fragment,t),Z(nt.$$.fragment,t),rt=!0)},o(t){Q(F.$$.fragment,t),Q(B.$$.fragment,t),Q(Y.$$.fragment,t),Q(P.$$.fragment,t),Q(tt.$$.fragment,t),Q(nt.$$.fragment,t),rt=!1},d(t){t&&f(e),X(F),X(B),X(Y),X(P),X(tt),X(nt)}}}function re(t,e,n){console.log(t,e,n)}function se(t,e,n){mt.mode.hash();let r=document.location.hostname,s=[];s=[{widget:"input",type:"date",status:"2021-10-17",page:"Inputs",order:"4",descr:"Switch on boiler date",topic:"/prefix/00000-00004/date1",ws:1},{widget:"input",type:"time",status:"12:00",page:"Inputs",order:"1",descr:"Switch on boiler time",topic:"/prefix/00000-00001/time",ws:1},{widget:"input",type:"number",status:"30.5",after:"°С",page:"Inputs",order:"2",descr:"Boiler temperature",topic:"/prefix/00000-00002/temp",ws:1},{widget:"input",type:"text",status:"Hello",page:"Inputs",order:"3",descr:"Message to be send",topic:"/prefix/00000-00003/text",ws:1},{widget:"toggle",status:0,page:"Toggles",order:"3",descr:"Light in my room",topic:"/prefix/00000-00003/btn1",ws:1},{widget:"toggle",status:0,page:"Toggles",order:"3",descr:"Light in my room",topic:"/prefix/00000-00003/btn2",ws:1},{widget:"toggle",status:0,page:"Toggles",order:"3",descr:"Light in my room",topic:"/prefix/00000-00003/btn3",ws:1},{widget:"anydata",status:30.5,after:"°С",page:"Any data",order:"3",descr:"Temperature",topic:"/prefix/00000-00003/tmp10",ws:1},{widget:"anydata",status:1032,after:"mm",page:"Any data",order:"3",descr:"Pressure",topic:"/prefix/00000-00003/tmp10",ws:1},{widget:"anydata",status:50,after:"%",page:"Any data",order:"3",descr:"Level",topic:"/prefix/00000-00003/tmp10",ws:1},{widget:"anydata",status:"opened",page:"Any data",order:"3",descr:"Status",topic:"/prefix/00000-00003/tmp10",ws:1}];let o=[],a=!1,i=[],c=[];function l(){o[0]=new WebSocket("ws://"+r+"/ws"),o[0].addEventListener("open",(function(t){console.log("WS CONNECTED! "+r),n(1,a=!0),o[0].send("HELLO")})),o[0].addEventListener("message",(function(t){console.log("NEW data packet "+r,t.data),f("test",t.data)})),o[0].addEventListener("close",(t=>{n(1,a=!1),console.log("ws close "+r)})),o[0].addEventListener("error",(function(t){n(1,a=!1),console.log(r+" WebSocket error: ",t)}))}function u(){1==o[0].readyState?console.log("web socket connected"):(console.log("Try reconnect to web socket"),l())}const d=t=>{try{t=JSON.stringify(JSON.parse(t),null,4)}catch(e){return t}return t=(t=t.replace(/&/g,"&").replace(//g,">")).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,(function(t){return t}))};function p(){n(2,i=[]);Array.from(new Set(Array.from(s,(({page:t})=>t)))).forEach((function(t,e,r){n(2,i=[...i,JSON.parse(JSON.stringify({page:t}))])})),i.sort((function(t,e){return t.pagee.page?1:0}))}O((async()=>{console.log("mounted"),l(),p(),setInterval(u,3e3)}));const f=(t,e)=>{const n=e.toString(),r=(new Date).getTime();g(t,n,r)},g=(t,e,r)=>{c.length>Number(10)&&n(3,c=c.slice(0)),n(3,c=[...c,{topic:t,msg:e,time:r,colored:d(e),closed:!0}]),c.sort((function(t,e){return t.closed=!0,t.time>e.time?-1:t.time