UNPKG

webix

Version:

Webix UI

20 lines (19 loc) 689 kB
/** * @license * webix UI v.11.4.0 * This software is allowed to use under GPL or you need to obtain Commercial License * to use it in non-GPL project. Please contact sales@webix.com for details */ !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.webix={})}(this,function(O){"use strict";function x(t){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function P(t,i){return function(t){if(Array.isArray(t))return t}(t)||e(t,i)||V(t,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||V(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,i){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var s,n,h=[],r=!0,o=!1;try{for(e=e.call(t);!(r=(s=e.next()).done)&&(h.push(s.value),!i||h.length!==i);r=!0);}catch(a){o=!0,n=a}finally{try{r||null==e["return"]||e["return"]()}finally{if(o)throw n}}return h}}function V(t,i){var e;if(t)return"string"==typeof t?n(t,i):"Map"===(e="Object"===(e=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:e)||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?n(t,i):void 0}function n(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,s=new Array(i);e<i;e++)s[e]=t[e];return s}function L(t,i){var e,s,n,h,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return s=!(e=!0),{s:function(){r=r.call(t)},n:function(){var t=r.next();return e=t.done,t},e:function(t){s=!0,n=t},f:function(){try{e||null==r["return"]||r["return"]()}finally{if(s)throw n}}};if(Array.isArray(t)||(r=V(t))||i&&t&&"number"==typeof t.length)return r&&(t=r),h=0,{s:i=function(){},n:function(){return h>=t.length?{done:!0}:{done:!1,value:t[h++]}},e:function(t){throw t},f:i};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i=window,j=1,W={},U=!1;function Y(t){i.setImmediate?i.setImmediate(t):i.importScripts||!i.addEventListener?setTimeout(t):(W[++j]=t,i.postMessage(j,"*"))}function N(t){if("function"!=typeof t&&t!=undefined)throw TypeError();if("object"!=x(this)||this&&this.then)throw TypeError();var i,e,n=this,h=0,r=0,s=[],o=((n.promise=n).resolve=function(t){return i=n.fn,e=n.er,h||(r=t,h=1,Y(u)),n},n.reject=function(t){return i=n.fn,e=n.er,h||(r=t,h=2,Y(u)),n},n.i=1,n.then=function(t,i){if(1!=this.i)throw TypeError();var e=new N;return e.fn=t,e.er=i,3==h?e.resolve(r):4==h?e.reject(r):s.push(e),e},n["finally"]=function(i){var e,t=function(t){return e=t,i()},s=function(){var t=new N;return 4==h?t.reject(e):t.resolve(e)};return n.then(t,t).then(s,s)},n["catch"]=function(t){return n.then(null,t)},n.fail=function(t){return n.then(null,t)},function(t){h=t||4;for(var i=0;i<s.length;i++){var e=s[i];3==h&&e.resolve(r)||e.reject(r)}});try{"function"==typeof t&&t(n.resolve,n.reject)}catch(c){n.reject(c)}return n;function a(t,i,e,s){if(2==h)return s();if("object"!=x(r)&&"function"!=typeof r||"function"!=typeof t)s();else try{var n=0;t.call(r,function(t){n++||(r=t,i())},function(t){n++||(r=t,e())})}catch(c){r=c,e()}}function u(){var t;try{t=r&&r.then}catch(c){return r=c,h=2,u()}a(t,function(){h=1,u()},function(){h=2,u()},function(){try{1==h&&"function"==typeof i?r=i(r):2==h&&"function"==typeof e&&(r=e(r),h=1)}catch(c){return r=c,o()}r==n?(r=TypeError(),o()):a(t,function(){o(3)},o,function(){o(1==h&&3)})})}}!i.setImmediate&&i.addEventListener&&i.addEventListener("message",function(t){if(t.source==i)if(U)Y(W[t.data]);else{U=!0;try{"function"==typeof W[t.data]&&W[t.data]()}catch(t){}delete W[t.data],U=!1}}), N.resolve=function(i){if(1!=this.i)throw TypeError();return i instanceof N?i:new N(function(t){t(i)})},N.reject=function(e){if(1!=this.i)throw TypeError();return new N(function(t,i){i(e)})},N.all=function(e){if(1!=this.i)throw TypeError();var s;return e instanceof Array?(s=new N,function n(t,i){return i?s.resolve(i):t?s.reject(t):(0==e.reduce(function(t,i){return i&&i.then?t+1:t},0)&&s.resolve(e),void e.map(function(t,i){t&&t.then&&t.then(function(t){return e[i]=t,n(),t},n)}))}(),s):N.reject(TypeError())},N.race=function(e){if(1!=this.i)throw TypeError();var s;return e instanceof Array?0==e.length?new N:(s=new N,function n(t,i){return i?s.resolve(i):t?s.reject(t):(0==e.reduce(function(t,i){return i&&i.then?t+1:t},0)&&s.resolve(e),void e.map(function(t){t&&t.then&&t.then(function(t){n(null,t)},n)}))}(),s):N.reject(TypeError())},N.i=1,N.defer=function(){return new N(null)};var G={};function q(t,i){G[t]=i}var K={};function X(t){var i=X.h;return i.prototype=t,new i}function b(t,i,e){var s,n,h=!!(window.Map&&window.Set&&window.WeakMap&&window.WeakSet);for(n in i?(s=t,t=i):s=M(t)?[]:{},t){var r,o=t[n];!o||"object"!=x(o)||o instanceof RegExp?s[n]=o:(r=!!o.o&&!!o.$init&&!!o.define,et(o)?s[n]=new Date(o):h&&(o instanceof Map||o instanceof Set||o instanceof WeakMap||o instanceof WeakSet)||e&&r||o instanceof HTMLElement?s[n]=o:(s[n]=M(o)?[]:{},b(s[n],o,e)))}return s}function f(t,i){return function(){return t.apply(i,arguments)}}function Z(t){return window.eval(t)}function z(t){return void 0===t}function g(i,e,s,t){return window.setTimeout(function(){var t;if(!e||!e.$destructed)return t=i.apply(e,s||[]),i=e=s=null,t},t||1)}function J(t){var i=!0;return function(){i&&(i=!1,t.apply(this,arguments))}}X.h=function(){},O.extend=function(t,i,e){if(t.$protoWait)st.insertAt.call(t.$protoWait,i,1);else{for(var s in i)s in t&&!e||(t[s]=i[s]);i.defaults&&O.extend(t.defaults,i.defaults),i.$init&&i.$init.call(t)}return t};var I=(new Date).valueOf();function Q(){return++I}function tt(t){return"string"==typeof t?document.getElementById(t):t}function it(t,i){var e;return"string"==typeof t?(e=t.replace("()",""),i&&i[e]?i[e]:window[e]||Z(t)):t}function M(t){return Array.isArray(t)}function et(t){return t instanceof Date}function C(t){return O.extend(t||[],st,!0)}var st={removeAt:function(t,i){0<=t&&this.splice(t,i||1)},remove:function(t){this.removeAt(this.find(t))},insertAt:function(t,i){i||0===i?this.splice(i,0,t):this.push(t)},find:function(t){for(var i=0;i<this.length;i++)if(t==this[i])return i;return-1},each:function(t,i){for(var e=0;e<this.length;e++)t.call(i||this,this[e])},map:function(t,i){for(var e=0;e<this.length;e++)this[e]=t.call(i||this,this[e]);return this},filter:function(t,i){for(var e=0;e<this.length;e++)t.call(i||this,this[e])||(this.splice(e,1),e--);return this}},B={parseFormat:"%Y-%m-%d %H:%i:%s",parseTimeFormat:"%H:%i:%s"};function nt(t){var i=Date.prototype.toJSON;return Date.prototype.toJSON=function(){return B.parseFormatStr(this)},t=t instanceof Date?t.toJSON():JSON.stringify(t),Date.prototype.toJSON=i,t}var s={$init:function(){this.u||(this.u={},this._={},this.m={})},blockEvent:function(){this.u.w=!0},unblockEvent:function(){this.u.w=!1},mapEvent:function(t){O.extend(this.m,t,!0)},on_setter:function(t){if(t)for(var i in t){var e=it(t[i],this.$scope),s=i.indexOf("->");-1!==s?this[i.substr(0,s)].attachEvent(i.substr(s+2),f(e,this)):this.attachEvent(i,e)}},callEvent:function(t,i){var e=this.S||this;if(this.u.w)return!0;t=t.toLowerCase();var s,n=this.u[t.toLowerCase()],h=!0;if(n)for(var r=0;r<n.length;r++)!1===n[r].apply(e,i||[])&&(h=!1);return this.m[t]&&((s=this.m[t]).$eventSource=this,s.callEvent(t,i)||(h=!1),s.$eventSource=null),h},attachEvent:function(t,i,e){t=t.toLowerCase(),e=e||++I,i=it(i,this.$scope);var s=this.u[t]||C();return arguments[3]?s.unshift(i):s.push(i),this.u[t]=s,this._[e]={f:i,t:t},e},detachEvent:function(t){var i,e;this._[t]?(i=this._[t].t,e=this._[t].f,this.u[i].remove(e),delete this._[t]):(i=(t+"").toLowerCase(),this.u[i]&&(this.u[i]=C()))},hasEvent:function(t){t=t.toLowerCase();var i=this.u[t];return!( !i||!i.length)||!!(i=this.m[t])&&i.hasEvent(t)}},ht={},p=(O.extend(ht,s,!0),function(t,i){return ht.callEvent(t,i)}),rt=function(t,i,e,s){return ht.attachEvent(t,i,e,s)},ot=function(t){return ht.detachEvent(t)},at={k:function(t){return!t||!t.documentElement||t.getElementsByTagName("parsererror").length?null:t},toObject:function(t,i){i=i?i.rawxml?i.rawxml():i:null;return this.k(i)||(i="string"==typeof t?this.fromString(t.replace(/^[\s]+/,"")):t,this.k(i))?i:null},getRecords:function(t){return this.xpath(t,this.records)},records:"/*/item",child:"item",config:"/*/config",getDetails:function(t){return this.tagToObject(t,{})},getOptions:function(){return!1},getInfo:function(t){var i=(i=this.xpath(t,this.config)).length?this.assignTypes(this.tagToObject(i[0],{})):null;return{size:t.documentElement.getAttribute("total_count")||0,from:t.documentElement.getAttribute("pos"),parent:t.documentElement.getAttribute("parent")||0,config:i}},xpath:function(t,i){if(window.XPathResult){for(var e=t,s=[],n=(t=-1==t.nodeName.indexOf("document")?t.ownerDocument:t).evaluate(i,e,null,XPathResult.ANY_TYPE,null),h=n.iterateNext();h;)s.push(h),h=n.iterateNext();return s}var e=!0;try{"undefined"==typeof t.selectNodes&&(e=!1)}catch(r){}return e?t.selectNodes(i):(e=i.split("/").pop(),t.getElementsByTagName(e))},assignTypes:function(t){for(var i in t){var e=t[i];"object"==x(e)?this.assignTypes(e):"string"==typeof e&&""!==e&&("true"==e?t[i]=!0:"false"==e?t[i]=!1:e==+e&&(t[i]=+t[i]))}return t},tagToObject:function(t,i){var e=0;if(1==t.nodeType&&t.getAttribute("stack")){i=[];for(var s=t.childNodes,n=0;n<s.length;n++)1==s[n].nodeType&&i.push(this.tagToObject(s[n],{}))}else{i=i||{};var h=t.attributes;if(h&&h.length)for(var r=0;r<h.length;r++)i[h[r].name]=h[r].value,e=1;for(var o,a=t.childNodes,u=0;u<a.length;u++)1==a[u].nodeType&&(i[o=a[u].tagName]?("function"!=typeof i[o].push&&(i[o]=[i[o]]),i[o].push(this.tagToObject(a[u],{}))):i[o]=this.tagToObject(a[u],{}),e=2);if(!e)return this.nodeValue(t);e<2&&(i.value=i.value||this.nodeValue(t))}return i},nodeValue:function(t){return t.firstChild?t.firstChild.wholeText||t.firstChild.data:""},fromString:function(t){try{if(window.DOMParser)return(new DOMParser).parseFromString(t,"text/xml");var i;if(window.ActiveXObject)return(i=new ActiveXObject("Microsoft.xmlDOM")).loadXML(t),i}catch(e){return null}}},ut={toObject:function(t){if(!t)return null;if("string"==typeof t)try{var e;t=this.parseDates?(e=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d{1-3})?Z/,JSON.parse(t,function(t,i){return"string"==typeof i&&e.test(i)?new Date(i):i})):JSON.parse(t)}catch(i){return null}return t},getRecords:function(t){return(t=t&&t.data?t.data:t)&&!M(t)?[t]:t},getDetails:function(t){return"string"==typeof t?{id:t||++I,value:t}:t},getOptions:function(t){return t.collections},getInfo:function(t){return{size:t.total_count||0,from:t.pos,parent:t.parent||0,config:t.config}},child:"data",parseDates:!1};function ct(t,i,e){return 0!==arguments.length?(new ct).get(t,i,e):this&&this.getXHR?this:new ct}ct.count=0,ct.prototype={master:null,getXHR:function(){return new XMLHttpRequest},stringify:nt,I:function(t,i,s,e){i&&(M(i)||"function"==typeof(i.success||i.error||i))&&(n=s,s=i,i=null);var n,h=N.defer(),r=this.getXHR(),o=this.T||{};if(!p("onBeforeAjax",[e,t,i,r,o,null,h]))return h.reject(r);var a=!1;if("GET"!==e){var u,c=!1;for(u in o)"content-type"==u.toString().toLowerCase()&&(c=!0,"application/json"==o[u]&&(a=!0));c||window.FormData&&i instanceof window.FormData||(o["Content-Type"]="application/x-www-form-urlencoded")}if("object"==x(i)&&!(window.FormData&&i instanceof window.FormData))if(a)i=this.stringify(i);else{var l,f=[];for(l in i){var d=i[l];"object"===x(d=null!==d&&d!==undefined?d:"")&&(d=this.stringify(d)),f.push(encodeURIComponent(l)+"="+encodeURIComponent(d))}i=f.join("&")}i&&"GET"===e&&(t=t+(-1!=t.indexOf("?")?"&":"?")+i,i=null),r.open(e,t,!this.D);var _,e=this.$;for(_ in e&&(r.responseType=e),o)r.setRequestHeader(_,o[_]);var v=this;return this.master=this.master||n,r.onreadystatechange=function(){var t,i,e;r.readyState&&4!=r.readyState||( ct.count++,t=400<=r.status||0===r.status,e="blob"==r.responseType||"arraybuffer"==r.responseType?(i="",r.response):(i=r.responseText||"",v.R(r)),t?(p("onAjaxError",[r]),h.reject(r)):h.resolve(e),s&&ct.$callback(v.master||window,s,i,e,r,t))},this.P&&(r.timeout=this.P),this.D?r.send(i||null):setTimeout(function(){r.send(i||null)},0),this.master&&!this.D&&h.then(function(t){return v.master=null,s=v=n=null,t}),this.D?r:h},R:function(i){return{xml:function(){try{return at.tagToObject(at.toObject(i.responseText,this))}catch(t){i.responseText,t.toString()}},rawxml:function(){return window.XPathResult?i.responseXML:at.fromString(i.responseText)},text:function(){return i.responseText},json:function(){return ut.toObject(i.responseText,!1)}}},get:function(t,i,e){return this.I(t,i,e,"GET")},post:function(t,i,e){return this.I(t,i,e,"POST")},put:function(t,i,e){return this.I(t,i,e,"PUT")},del:function(t,i,e){return this.I(t,i,e,"DELETE")},patch:function(t,i,e){return this.I(t,i,e,"PATCH")},sync:function(){return this.D=!0,this},timeout:function(t){return this.P=t,this},response:function(t){return this.$=t,this},headers:function(t){return this.T=O.extend(this.T||{},t),this},bind:function(t){return this.master=t,this}},ct.$callback=function(t,i,e,s,n,h){var r;t.$destructed||(h&&p("onAjaxError",[n]),i&&(r=i.success||i,(r=h?i.error:r)&&r.call&&r.call(t,e,s,n)))};var lt={$proxy:!0,load:function(){var i=this.source.split("@"),e=i[0].split(".").pop();return ct().response("arraybuffer").get(i[0]).then(function(t){return{data:t,options:{ext:e,dataurl:i[1]}}})}},ft={$proxy:!0,load:function(){},save:function(t,i,e){g(function(){window.console.log("[DP] "+i.id+" -> "+i.operation,i.data);var t={id:i.data.id,newid:i.data.id,status:i.data.operation};e.processResult(t,t)})}},dt={$proxy:!0,load:function(){return ct(this.source)},save:function(t,i){return dt.H.call(this,i,ct())},H:function(t,i){var e=this.source,s="",n=e.indexOf("?"),n=(-1!==n&&(s=e.substr(n),e=e.substr(0,n)),e+="/"==e.charAt(e.length-1)?"":"/",t.operation),t=t.data;return"insert"==n&&delete t.id,"update"==n?i.put(e+t.id+s,t):"delete"==n?i.del(e+t.id+s,t):i.post(e+s,t)}},_t={$proxy:!0,load:function(){return ct(this.source)},save:function(t,i){var e=ct().headers({"Content-Type":"application/json"});return dt.H.call(this,i,e)}},vt={$proxy:!0,load:function(t,i){return i=O.extend(i||{},this.params||{},!0),ct().post(this.source,i)}};var pt={$proxy:!0,ignoreErrors:!0,save:function(t){return this.load(t)},load:function(t){var r,i={query:this.source},o=1<arguments.length;return o||(i.variables=t),ct().headers({"Content-type":"application/json"}).post(this.url,i,function(){r=arguments.length<=2?undefined:arguments[2]}).then(function(t){var t=t.json(),i=t.data,t=t.errors;if(t&&!pt.ignoreErrors)return N.reject(o?r:{xhr:r,errors:t});var e=i;if(!e||"object"===!x(e)||Array.isArray(e))return e;var s,n="",h=0;for(s in e){if(2==++h)return e;n=s}return e[n]})}};function mt(t,i,e){t=b(mt[t]);return t.source=i,e&&O.extend(t,e,!0),t.init&&t.init(),t}mt.$parse=function(t){var i;return"string"==typeof t&&-1!=t.indexOf("->")?mt((i=t.split("->"))[0],i[1]):t},mt.binary=lt,mt.debug=ft,mt.json=_t,mt.post=vt,mt.rest=dt,mt.GraphQL=pt;var lt={toObject:function(t){return"string"==typeof t?JSON.parse(t):t},getRecords:function(t){return t=t&&t.data?t.data:t},getDetails:function(t){for(var i={},e=0;e<t.length;e++)i["data"+e]=t[e];return null!==this.idColumn&&(i.id=t[this.idColumn]),i},getOptions:function(){return!1},getInfo:function(){return{size:0}},idColumn:null},ft={toObject:function(t){var i;return"string"==typeof t?(i=null,(i=-1==t.indexOf("<")?tt(t):i)||((i=document.createElement("DIV")).innerHTML=t),i.firstChild):t},getRecords:function(t){return t.getElementsByTagName(this.tag)},getDetails:function(t){return at.tagToObject(t)},getOptions:function(){return!1},getInfo:function(){return{size:0}},tag:"LI"},bt=0,gt={},xt={};function wt(){bt=bt||document.onselectstart,document.onselectstart=Rt}function yt(){0!==bt&&(document.onselectstart=bt||null),bt=0}function St(t){for(var i=0;t=t.previousSibling;)i++;return i} function Mt(t,i){var e,s="";for(e in i=i||"",t)s+=e+":"+t[e]+";";var n=xt[s+i];return n||(Ct("."+(n="s"+ ++I)+(i||"")+"{"+s+"}"),xt[s+i]=n),n}function Ct(t,i){var e=i?gt[i]:gt["default"];e||((e=document.createElement("style")).setAttribute("type","text/css"),e.setAttribute("media","screen,print"),document.getElementsByTagName("head")[0].appendChild(e),i?gt[i]=e:gt["default"]=e),e.appendChild(document.createTextNode(t))}function kt(t){t=gt[t||"default"];t&&(t.innerHTML="")}function w(t,i,e){i=i||{};var s,n=document.createElement(t);for(s in i)n.setAttribute(s,i[s]);return i.style&&(n.style.cssText=i.style),i["class"]&&(n.className=i["class"]),e&&(n.innerHTML=e),n}function It(t){return(t=tt(t))?z(t.value)?t.innerHTML:t.value:""}function y(t){if(t instanceof Array)for(var i=0;i<t.length;i++)y(t[i]);else t&&t.parentNode&&t.parentNode.removeChild(t)}function Tt(t,i,e){t&&(i&&i.parentNode?i.parentNode.insertBefore(t,i):e.appendChild(t))}function Dt(t,i){for(var e=t.tagName?t:t.target;e;){if(e.getAttribute){var s=e.getAttribute(i);if(s)return s}e=e.parentNode}return null}function At(t){var i=t.getBoundingClientRect(),e=document.body,s=document.documentElement,n=window.pageYOffset||s.scrollTop||e.scrollTop,h=window.pageXOffset||s.scrollLeft||e.scrollLeft,r=s.clientTop||e.clientTop||0,s=s.clientLeft||e.clientLeft||0,e=i.top+n-r,n=i.left+h-s;return{y:Math.round(e),x:Math.round(n),width:t.offsetWidth,height:t.offsetHeight}}function Et(t){return{x:t.offsetX,y:t.offsetY}}function $t(t){return t.type?{x:(t=t.touches&&t.touches[0]?t.touches[0]:t).pageX,y:t.pageY}:{x:t.x,y:t.y}}function d(t){return t.preventDefault(),Rt(t)}function Rt(t){return t.stopPropagation(),!1}function Ft(t,i,e,s){var n;"function"==typeof window[i]?(s=O.extend(s||{},{bubbles:!0,cancelable:!0}),n=new window[i](e,s)):(n=document.createEvent(i)).initEvent(e,!0,!0),t.dispatchEvent(n)}function u(t,i,e){e&&-1!==t.className.indexOf(i)||(t.className+=" "+i)}function c(t,i){t.className=t.className.replace(RegExp(" "+i,"g"),"")}function Pt(t,i,e){for(var s=w("DIV",{"class":"webix_view webix_measure_size "+(i||"")},""),n=(s.style.cssText="height:auto;visibility:hidden; position:absolute; top:0px; left:0px; overflow:hidden;"+(e?"width:"+e+"px;":"width:auto;white-space:nowrap;"),document.body.appendChild(s),"object"!==x(t)?[t]:t),h=0,r=0,o=0;o<n.length;o++){s.innerHTML=n[o];var a=s.getBoundingClientRect(),h=Math.max(h,Math.ceil(a.width)),r=Math.max(r,Math.ceil(a.height))}return y(s),{width:h,height:r}}function Ht(t,i){var e=!1;if("object"==x(t)){if(window.navigator.msSaveBlob)return window.navigator.msSaveBlob(t,i);t=window.URL.createObjectURL(t),e=!0}var s=document.createElement("a");s.href=t,s.download=i,document.body.appendChild(s),s.click(),g(function(){e&&window.URL.revokeObjectURL(t),document.body.removeChild(s),s.remove()})}function Nt(t){return t&&(t=(t=t.className||"").baseVal?t.baseVal:t).indexOf?t:""}function Ot(t,i,e){t.focus();t.setSelectionRange&&["password","search","tel","text","url"].includes(t.type)&&t.setSelectionRange(i=i||0,e=e||i)}function zt(t){return{start:t.selectionStart||0,end:t.selectionEnd||0}}function Bt(t,i){document.getElementsByTagName("head").item(0).appendChild(w("meta",{name:t,content:i}))}var Vt,_t=Object.freeze({denySelect:wt,allowSelect:yt,index:St,createCss:Mt,addStyle:Ct,removeStyle:kt,create:w,getValue:It,remove:y,insertBefore:Tt,locate:Dt,offset:At,posRelative:Et,pos:$t,preventEvent:d,stopEvent:Rt,triggerEvent:Ft,addCss:u,removeCss:c,getTextSize:Pt,download:Ht,N:Nt,setSelectionRange:Ot,getSelectionRange:zt,addMeta:Bt}),vt={toObject:function(t){(t=tt(t)).tagName.toLowerCase();var i=t.rows;return y(t),i},getRecords:function(t){for(var i=[],e=t[0]&&t[0].O?1:0;e<t.length;e++)i.push(t[e]);return i},getDetails:function(t){var i=t.getElementsByTagName("td");t={};for(var e=0;e<i.length;e++)t["data"+e]=i[e].innerHTML;return t},getInfo:function(){return{size:0}},getOptions:function(){},getConfig:function(t){var i=[],e=t[0].getElementsByTagName("th");e.length&&(t[0].O=!0);for(var s=0;s<e.length;s++){var n={id:"data"+s,header:this.B(e[s ].innerHTML)},h=this.V(e[s]),n=O.extend(n,h);i.push(n)}return i},B:function(t){var i=t.indexOf("json://");return t=-1!=i?JSON.parse(t.substr(i+7)):t},V:function(t){for(var i=t.attributes,e={},s=0;s<i.length;s++)e[i[s].nodeName]=this.B(i[s].nodeValue);return e.width=parseInt(e.width,10),e}},k={cdn:"//cdn.webix.com",codebase:"",zIndexBase:100,scrollSize:17},Lt=(k.strict=!!window.webix_strict,k.https="https:"===document.location.protocol,navigator.userAgentData),jt=Lt&&Lt.platform&&Lt.brands.length?null:navigator.userAgent,Wt={Chromium:"Chrom",IE:"Trident",Edge:"Edg",FF:"Firefox",Safari:"Safari"};for(Vt in Wt)if("break"===function(i){var t=jt?-1!=jt.indexOf(Wt[i]):Lt.brands.find(function(t){return-1!=t.brand.indexOf(Wt[i])});if(t&&(k["is"+i]=!0,"Chromium"!=i))return"break"}(Vt))break;var Ut=jt||Lt.platform;k.isMac=-1!=Ut.toLowerCase().indexOf("mac"),/iPad|iPhone|iPod/.test(Ut)&&(k.isIOS=!0),-1!=Ut.indexOf("Android")&&(k.isAndroid=!0),jt?(k.isIOS||k.isAndroid||-1!=jt.indexOf("Mobile")||-1!=jt.indexOf("Windows Phone"))&&(k.mobile=!0):k.mobile=Lt.mobile,(k.mobile||1<navigator.maxTouchPoints)&&(k.touch=!0),k.fastClick=!k.touch,(k.isIE||k.isEdge||k.isFF)&&(k.maxHTMLElementSize=1e7),k.isSafari&&(k.maxHTMLElementSize=1e8),k.transform="transform",k.transition="transition",k.transitionDuration="transitionDuration",k.translate="translate3d",k.transitionEnd="transitionend",k.passiveEventListeners=!1;try{var Yt=Object.defineProperty({},"passive",{get:function(){k.passiveEventListeners=!0}});window.addEventListener("testPassive",null,Yt),window.removeEventListener("testPassive",null,Yt)}catch(Ln){}k.svg=document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"),k.svganimation=document.implementation.hasFeature("https://www.w3.org/TR/SVG11/feature#SVG-animation","1.1");var Gt={};function qt(e,t,i){var s=N.defer();if(t&&!0!==t&&(s=s.then(function(){t.call(i||this)})),qt.disabled)s.resolve();else if("string"!=typeof e){var n=e.length||0;if(n){var h=function(){n?(n--,qt(e[e.length-n-1]).then(h,function(){return s.reject()})):s.resolve()};h()}else{for(var r in e)n++;var o,a=function(){0===--n&&s.resolve()};for(o in e)qt(o).then(a,function(){return s.reject()})}}else if(!0!==Gt[e]){var u=e;if(!0===t)return Z(ct().sync().get(u).responseText),Gt[e]=!0,s.resolve();if(Gt[e])return Gt[e].push(s),s;Gt[e]=[s];var c,l=function(){var t=Gt[e];Gt[e]=!1;for(var i=0;i<t.length;i++)t[i].reject()},f=function(){var t=Gt[e];Gt[e]=!0;for(var i=0;i<t.length;i++)t[i].resolve()},d=e.split("?");".css"===d[0].substring(d[0].length-".css".length)?((c=w("LINK",{type:"text/css",rel:"stylesheet",href:u})).onload=f,c.onerror=l,document.getElementsByTagName("head")[0].appendChild(c)):(c=document.createElement("script"),".mjs"===d[0].substring(d[0].length-".mjs".length)&&(c.type="module"),c.onload=f,c.onerror=l,document.getElementsByTagName("head")[0].appendChild(c),c.src=u)}else s.resolve();return s}var Ut=O.extend({toObject:function(t){var i,e,s;return t.excel?t:((i=t.options||{}).dataurl&&O.extend(i,this.j(i.dataurl)),t=t.data||t,e=N.defer(),t.name?(i.ext=t.name.split(".").pop(),(s=new FileReader).onload=f(function(t){e.resolve(this.parseData(t.target.result,i))},this),s.readAsArrayBuffer(t)):e.resolve(this.parseData(t,i)),e)},parseData:function(t,e){t=new Uint8Array(t);for(var s=[],i=0;i!=t.length;++i)s[i]=String.fromCharCode(t[i]);var n=(e.ext||e).toLowerCase();return"xls"!=n&&(n="xlsx"),qt(k.cdn+"/extras/xlsx.core.styles.min.js").then(f(function(){var t=("xls"==n?XLS:XLSX).read(s.join(""),{type:"binary",cellStyles:!!z(e.cellStyles)||e.cellStyles,cellDates:!!z(e.cellDates)||e.cellDates,sheetStubs:e.sheetStubs}),i=t.Workbook,i={sheets:t.Sheets,names:t.SheetNames,options:e,ranges:i&&i.Names||[],states:i&&i.Sheets?i.Sheets.map(function(t){return["visible","hidden","veryHidden"][t.Hidden]}):t.SheetNames.map(function(){return"visible"})};return O.extend(this.getSheet(i,e),i)},this))},getSheet:function(t,i){var e=i.name||t.names[0];return t=this.sheetToArray(t.sheets[e],i),i.rows&&i.rows.length&&(t.data=t.data.splice(i.rows[0],Math.min( i.rows[1],t.data.length)-i.rows[0])),t},sheetToArray:function(t,i){var e=[],s=[],n=[],h=[],r=[],o=[],a=[],u=[],c=[],l={},f={n:"number",d:"date",s:"string",b:"boolean"};if(t&&t["!ref"]){for(var d=XLS.utils.decode_range(t["!ref"]),_=d.s.c,v=d.s.r+(i.rows?i.rows[0]:0),p=d.s.r;p<=d.e.r;p++){for(var m,b,g=[],x=d.s.c;x<=d.e.c;x++)(b=t[XLS.utils.encode_cell({r:p,c:x})])?(m="",m=i.math&&b.f?"="==b.f.charAt(0)?b.f:"="+b.f:"d"==b.t&&et(b.v)?B.dateFormatStr(b.v):b.v,g.push(m),b.s&&n.push([p-v,x-_,b.s]),b.t&&r.push([p-v,x-_,f[b.t]]),b.l&&a.push([p-v,x-_,b.l.location?"#"+b.l.location:b.l.Target])):g.push("");e.push(g)}if(t["!merges"])for(var w=t["!merges"],y=0;y<w.length;y++){var S=w[y].s,M=w[y].e;(!i.rows||0<=S.r-v&&M.r-v<=i.rows[1])&&s.push([S.r-v,S.c-_,M.c-S.c+1,M.r-S.r+1])}if(t["!cols"])for(var C=t["!cols"],k=0;k<C.length;k++){var I,T=C[k];T&&(I=k-_,T.outlineLevel&&(c[I]=T.outlineLevel),T.wch&&h.push(["column",I,Math.round(T.wch/(8.43/70))]),T.hidden&&o.push(["column",I]))}if(t["!rows"])for(var D=t["!rows"],A=0;A<D.length;A++){var E,$=D[A];$&&(E=A-v,$.outlineLevel&&(u[E]=$.outlineLevel),$.hpx&&h.push(["row",E,$.hpx]),$.hidden&&o.push(["row",E]))}t["!settings"]&&(l=t["!settings"])}return{data:e,spans:s,styles:n,sizes:h,types:r,hidden:o,links:a,sheetSettings:l,rowGroups:u,columnGroups:c,excel:!0}},j:function(t){var t=t.split("["),i={};return i.name=t[0],t[1]&&((t=t[1].split(/[^0-9]+/g))[0]=+t[0]||0,t[1]=+t[1]||9999999,i.rows=t),i}},lt),Kt={json:ut,jsarray:lt,xml:at,csv:{toObject:function(t){return t},getRecords:function(t){return t.split(this.row)},getDetails:function(t){t=this.stringToArray(t);for(var i={},e=0;e<t.length;e++)i["data"+e]=t[e];return null!==this.idColumn&&(i.id=t[this.idColumn]),i},getOptions:function(){return!1},getInfo:function(){return{size:0}},stringToArray:function(t){t=t.split(this.cell);for(var i=0;i<t.length;i++)t[i]=t[i].replace(/^[ \t\n\r]*("|)/g,"").replace(/("|)[ \t\n\r]*$/g,"");return t},idColumn:null,row:"\n",cell:","},html:ft,htmltable:vt,excel:Ut},Xt={},Zt={$init:function(t){this.W=0,this.data={},this.waitData=N.defer(),t&&(this.o.datatype=t.datatype||"json"),this.$ready.push(this.U)},U:function(){this.Y=!0,this.o.url&&this.url_setter(this.o.url),this.o.data&&this.data_setter(this.o.data)},url_setter:function(t){return t=mt.$parse(t),this.Y&&this.load(t,this.o.datatype),t},data_setter:function(t){return this.Y?(this.parse(t,this.o.datatype),!0):t},load:function(t,i,e,s){var n,h=this,t=("string"==typeof i&&(n=i,i=e),this.G(t,n,e||null));if(t&&t.then)return t.then(function(t){return h.q(t,s),i&&ct.$callback(h,i,"",t,-1),t},function(t){return h.K(t)})},G:function(t,i,e){var s=this;if(!i&&this.data.driver||(this.data.driver=Kt[i||"json"]),!this.callEvent("onBeforeLoad",[]))return N.reject();(i=(t=mt.$parse(t)).$proxy&&t.load?t.load(this,e):"function"==typeof t?t.call(this,e):ct().bind(this).get(t))&&!i.then&&(i=N.resolve(i));var n=++this.W;return i&&i.then?i.then(function(t){return s.$destructed||s.W!==n?N.reject(Xt):t}):i},parse:function(t,i,e){var s,n=this;if(t&&"function"==typeof t.then)return s=++this.W,t.then(function(t){if(n.$destructed||n.W!==s)return N.reject();n.parse(t,i,e)});if(t&&t.sync&&this.sync)this.X(t);else{if(!this.callEvent("onBeforeLoad",[]))return N.reject();!i&&this.data.driver||(this.data.driver=Kt[i||"json"]),this.q(t,e)}return N.resolve()},X:function(t){this.data&&this.data.attachEvent&&this.data.attachEvent("onSyncApply",f(function(){this.Z&&this.Z()},this)),this.sync(t)},J:function(t){var i=this.data.driver,t=i.getRecords(t)[0],t=t?b(i.getDetails(t)):{};this.setValues?this.setValues(t,!1,"auto"):this.data=t},Q:function(t,i){t?this.$onLoad&&this.$onLoad(t,this.data.driver,i)||(this.data&&this.data.J?(i&&this.data.clearAll(!0),this.data):(i&&this.clearAll(!0),this)).J(t):this.K(t),this.Z&&this.Z(),this.callEvent("onAfterLoad",[]),this.waitData.resolve()},q:function(t,i){var e=this;t&&"function"==typeof t.text&&!t.name&&(t=t.text()),(t=this.data.driver.toObject(t))&&t.then?t.then(function(t){return e.Q(t,i)}):this.Q(t,i)},K:function(t){return t!==Xt&&(this.$destructed||( this.callEvent("onAfterLoad",[]),this.callEvent("onLoadError",arguments)),p("onLoadError",[t,this])),N.reject(t)},tt:function(t){var i;return!(this.o.dataFeed&&!this.it&&t)||("function"==typeof(i=this.o.dataFeed)?i.call(this,t.id||t,t):(i=i+(-1==i.indexOf("?")?"?":"&")+"action=get&id="+encodeURIComponent(t.id||t),this.callEvent("onBeforeLoad",[])&&ct(i,function(t,i,e){this.it=!0;var s=Kt.json,t=s.toObject(t,i);t?this.setValues(s.getDetails(s.getRecords(t)[0]),!1,"auto"):this.K(e),this.it=!1,this.callEvent("onAfterLoad",[])},this),!1))}},Jt={collapseNames:function(t,i,e,s){if(e=e||{},i=i||"",s=s||function(){return!0},!t||"object"!=x(t))return null;for(var n in t){var h=t[n],n=i+n;h&&"object"==x(h)&&!et(h)&&!M(h)&&s(n)?Jt.collapseNames(h,n+".",e,s):e[n]=h}return e},expandNames:function(t){var i,e,s,n,h,r={};for(h in t){for(e=(s=h.split(".")).length-1,n=r,i=0;i<e;i++)n[s[i]]||(n[s[i]]={}),n=n[s[i]];n[s[e]]=t[h]}return r}},Qt={},ti={},ii=new RegExp("(\\r\\n|\\n)","g"),ei=new RegExp('(\\")',"g"),si=new RegExp("(\\\\)","g"),ni={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},hi=/[&<>"'`]/g,ri=function(t){return ni[t]||"&amp;"};function _(e){if("function"==typeof e)return e;if(!Qt[e]){if(-1!=(e=(e||"").toString()).indexOf("->")){var t=e.split("->");switch(t[0]){case"html":e=It(t[1]);break;case"http":e=(new ct).sync().get(t[1],{uid:++I}).responseText}}if(e=(e||"").toString(),k.strict){if(!ti[e]){ti[e]=[];var h=[];if(e.replace(/\{obj\.([^}?]+)\?([^:]*):([^}]*)\}/g,function(t,i,e,s,n){h.push({pos:n,str:t,fn:function(t){return t[i]?e:s}})}),e.replace(/\{common\.([^}(]*)\}/g,function(t,e,i){h.push({pos:i,str:t,fn:function(t,i){return i[e]||""}})}),e.replace(/\{common\.([^}(]*)\(\)\}/g,function(t,e,i){h.push({pos:i,str:t,fn:function(t,i){return i[e]?i[e].apply(this,arguments):""}})}),e.replace(/\{obj\.([^:}]*)\}/g,function(t,i,e){h.push({pos:e,str:t,fn:function(t){return t[i]}})}),e.replace("{obj}",function(t,i){h.push({pos:i,str:t,fn:function(t){return t}})}),e.replace(/#([^#'";, ]+)#/gi,function(t,i,e){"!"==i.charAt(0)?(i=i.substr(1),h.push({pos:e,str:t,fn:function(t){return-1!=i.indexOf(".")&&(t=Jt.collapseNames(t)),_.escape(t[i])}})):h.push({pos:e,str:t,fn:function(t){return(t=-1!=i.indexOf(".")?Jt.collapseNames(t):t)[i]}})}),h.sort(function(t,i){return t.pos>i.pos?1:-1}),h.length){for(var i=0,s=function(t,i,e){ti[t].push(function(){return t.slice(i,e)})},n=0;n<h.length;n++){var r=h[n].pos;s(e,i,r),ti[e].push(h[n].fn),i=r+h[n].str.length}s(e,i,e.length)}else ti[e].push(function(){return e})}return function(){for(var t="",i=0;i<ti[e].length;i++)t+=ti[e][i].apply(this,arguments);return t}}var o,a=!1;e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(si,"\\\\")).replace(ii,"\\n")).replace(ei,'\\"')).replace(/\{obj\.([^}?]+)\?([^:]*):([^}]*)\}/g,'"+(obj.$1?"$2":"$3")+"')).replace(/\{common\.([^}(]*)\}/g,"\"+(common.$1||'')+\"")).replace(/\{common\.([^}(]*)\(\)\}/g,'"+(common.$1?common.$1.apply(this, arguments):"")+"')).replace(/\{obj\.([^}]*)\}/g,'"+(obj.$1)+"')).replace("{obj}",'"+obj+"')).replace(/#([^#'";, ]+)#/gi,function(t,i){return"!"==i.charAt(0)?(a=!0,'"+template.escape(obj.'+i.substr(1)+')+"'):'"+(obj.'+i+')+"'});try{a?(o=Function("obj","common","marks","value","template",'return "'+e+'";'),Qt[e]=function(t,i,e,s){return o(t,i,e,s,_)}):Qt[e]=Function("obj","common",'return "'+e+'";')}catch(Ln){}}return Qt[e]}_.escape=function(t){return t===undefined||null===t?"":(t.toString()||"").replace(hi,ri)},_.empty=function(){return""};var oi={et:function(t){return t.$empty?"":this.o.template(t,this)},render:function(){var t=this.o;return!!this.isVisible(t.id)&&(this.callEvent&&!this.callEvent("onBeforeRender",[this.data])||(this.data&&!t.content&&(this.st.innerHTML="",this.st.innerHTML=this.et(this.data)),this.callEvent&&this.callEvent("onAfterRender",[])),!0)},sync:function(i){this.nt=!1,"DataStore"!=i.name&&(i.data&&"DataStore"==i.data.name?i=i.data:this.nt=!0),this.nt?i.bind("change",f(function(t){t.id==this.data.id&&(this.data=t.attributes,this.refresh())},this)):i.attachEvent("onStoreUpdated",f(function(t){ t&&t!=this.data.id||(this.data=i.pull[t],this.refresh())},this))},template_setter:_},ai={ht:function(t){var i=this.o.dragscroll,e=-1!==(i="string"!=typeof i?this.o.layout||"xy":i).indexOf("x"),i=-1!==i.indexOf("y"),s=At(this.rt||this.$view),n=Math.max((this.o.rowHeight||(this.type&&!isNaN(parseFloat(this.type.height))?this.type.height:0))+5,40),h=!1;i&&this.ot(t,s,n)&&(h=!0),(h=e&&this.at(t,s,n)?!0:h)&&(this.ut=g(this.ht,this,[t],100))},ct:function(t){var i,e=this.o.dragscroll;"string"==typeof e&&-1===e.indexOf("x")||(e=At(this.T||this.$view),i=Math.max(this.o.headerRowHeight||0,40),this.at(t,e,i)&&(this.ut=g(this.ct,this,[t],100)))},ot:function(t,i,e){var s=i.y,i=s+i.height,n=this.getScrollState(),h=this.o;return h.topSplit&&(s+=(h=this.lt(this.getIdByIndex(h.topSplit-1),this.columnId(0))).top+h.height),t.y<s+e?this.ft(n.x,n.y-2*e,t,"y"):t.y>i-e&&this.ft(n.x,n.y+2*e,t,"y")},at:function(t,i,e){var s=i.x,i=s+i.width,n=this.getScrollState();return t.x<s+e?this.ft(n.x-2*e,n.y,t,"x"):t.x>i-e&&this.ft(n.x+2*e,n.y,t,"x")},ft:function(t,i,e,s){var n;return!!this.callEvent("onBeforeAutoScroll",[e])&&(this.scrollTo(t,i),this.callEvent("onAfterAutoScroll",[]),e=this.getScrollState(),n=!this.dt&&this._t||0,Math.abs(("x"===s?t:i)-e[s]+n)<1)}},ui={};function ci(){for(var t in ui)li(t)}function o(t,i,e,s){(s=s||{}).inner=!0,l(t,i,e,s)}function l(t,i,e,s){s=s||{},t=tt(t);var n=s.id||++I,h=[t,i,e=s.bind?f(e,s.bind):e,s.capture],h=(s.inner||(ui[n]=h),!!s.capture);return!z(s.passive)&&k.passiveEventListeners&&(h={passive:s.passive,capture:h}),t.addEventListener(i,e,h),n}function li(t){var i;t&&(ui[t],(i=ui[t])[0].removeEventListener(i[1],i[2],!!i[3]),delete ui[t])}function fi(t,i){if(!t.$protoWait){(t="function"==typeof t?t.prototype:t).types||(t.types={"default":t.type},t.type.name="default");var e,s=i.name,n=t.type;for(e in s&&(n=t.types[s]=X(i.baseType?t.types[i.baseType]:t.type)),i)0===e.indexOf("template")?n[e]=_(i[e]):n[e]=i[e];return s}t.vt||(t.vt=[]),t.vt.push(i)}var S={top_views:[],pt:null,mt:null,bt:null,gt:null,xt:null,wt:null,yt:null,St:null,Mt:0,Ct:null,kt:null,It:[],destructors:[],Tt:null,Dt:[],At:C(),Et:null},di={};function a(t,i,e){S.Mt++;var s,n=S.pt,h=S.mt;S.pt=t.$scope||n;try{s=function(t,i,e){var s,n=M(t),h=tt(t.container||i||document.body);h.o&&(e=function(t,i,e){var s=[t];if(i)s=t.getChildViews();else if(t.$t)s=[t.$t];else{if("number"==typeof e)return e;if(e)return vi(s=[v(e)]),s[0].config.id}return vi(s),e}(h,n,e));var r=!1,o=h==document.body;t.o||h&&n?(s=t,r=!0):(h&&o&&(t.$topView=!0),t.Rt||(t.Rt={}),i&&i.getParentView&&(S.yt=e||0===e?i:i.getParentView()),s=pi(t));!o||s.setPosition||s.$apiOnly||(0,G.fixHeight)();s.o&&s.o.Ft&&!h.$view?s.o.Pt=h:s.$apiOnly||(h.appendChild?_i(h,s,t):h.destructor?(n=h,(h=e||0===e||M(s)?h:(e=h).getParentView())&&h.Ht?(r&&s.getParentView&&((i=s.getParentView())&&i.Nt&&i.Nt(s),s.yt=h,s.$scope=h.$scope),h.Ht(s,e)):(o=n.$view.parentNode,n.destructor(),_i(o,s,t))):t.container);return s}(t,i,e)}finally{S.Mt--,S.pt=n,S.mt=h}return s}function _i(t,i,e){t.appendChild(i.Ot),i.getParentView()||((i.setPosition&&!i.o.fullscreen||t!=document.body)&&!i.o.position||S.top_views.push(i.zt),e.skipResize||i.adjust())}function vi(t){for(var i=t.length-1;0<=i;i--){var e=t[i];delete di[e.config.id],e.config.id="x"+ ++I,(di[e.config.id]=e).getChildViews&&vi(e.getChildViews()),e.Bt&&vi(e.Bt)}}function pi(t){if(t.view)return new a[t.view](t);if(t.rows||t.cols){for(var i=t.rows||t.cols,e=!1,s=0;s<i.length;s++)!i[s].body||i[s].view||i[s].align||(e=!0);return new(e?a.headerlayout:a.layout)(t)}return new(t.cells?a.multiview:t.template||t.content?a.template:t.align&&t.body?a.align:a.spacer)(t)}function v(t){if(!t)return null;if(di[t])return di[t];var i=t;if("object"==x(t)){if(t.o)return t;i=t.target||t}return di[Dt({target:tt(i)},"view_id")]}a.views=di,a.Vt=pi,"undefined"==typeof window.$$&&(window.$$=v),O.protoUI=function(){var h=arguments[0].name,r=function(t){if(!r)return a[h].prototype;var i=r.$protoWait;if(i){for(var e=[i[0]],s=1;s<i.length;s++)e[s]=i[s],e[s].$protoWait&&(e[s]=e[s].call(-1,e[s].name)),e[s ].prototype&&e[s].prototype.name&&(a[e[s].prototype.name]=e[s]);if(a[h]=O.proto.apply(-1,e),r.vt)for(var n=0;n<r.vt.length;n++)fi(a[h],r.vt[n]);r=i=null}return-1!=this?new a[h](t):a[h]};return r.$protoWait=Array.prototype.slice.call(arguments,0),a[h]=r},O.proto=function(){for(var t=arguments,i=t[0],e=!!i.$init,s=[],n=t.length-1;0<n;n--){if(t[n],"function"==typeof t[n]&&(t[n]=t[n].prototype),t[n].$init&&s.push(t[n].$init),t[n].defaults){var h,r=t[n].defaults;for(h in i.defaults||(i.defaults={}),r)z(i.defaults[h])&&(i.defaults[h]=r[h])}if(t[n].type&&i.type)for(var o in t[n].type)i.type[o]||(i.type[o]=t[n].type[o]);for(var a in t[n])i[a]||!1===i[a]||(i[a]=t[n][a])}e&&s.push(i.$init),i.$init=function(){for(var t=0;t<s.length;t++)s[t].apply(this,arguments)},i.$skin&&i.$skin();e=function(t){this.$ready=[],this.$init,this.$init(t),this.Lt&&this.Lt(t,this.defaults);for(var i=0;i<this.$ready.length;i++)this.$ready[i].call(this)};return e.prototype=i,i=t=null,e},rt("onClick",function(t){var i=v(t);if(i&&i.touchable&&(G.UIManager.applyChanges(i),!i.config.disabled)){var e="",s=t.target;if(!s.className||0!==s.className.toString().indexOf("webix_view")){for(i&&G.UIManager.jt(i);s&&s.parentNode;){if(s.getAttribute){if(s.getAttribute("view_id"))break;if(e=s.className)for(var e=e.toString().split(" "),n=0;n<e.length;n++)if(i.on_click[e[n]])if(!1===i.on_click[e[n]].call(i,t,i.o.id,s))return}s=s.parentNode}!i.o.click||(r=it(i.o.click,i.$scope))&&r.call&&r.call(i,i.o.id,t);var h,r=i.o.popup;!r||i.o.readonly||t.longtouch_drag||(r=v(r)).isVisible()||(h=i.getInputNode()||i.getNode(),r.o.master=i.o.id,r.show(h,null,!0),h.setAttribute("aria-expanded",!0),r.o.id!=i.o.suggest&&G.UIManager.setFocus(r.getBody())),i.callEvent("onItemClick",[i.o.id,t])}}});var mi={Wt:C(["dummy"]),Ut:0,overflow:!1,delay:400,addTooltip:function(t,i){var e,s,n=this,i=((t=tt(t))instanceof Element?(e=t,"string"==typeof i?e.setAttribute("webix_tooltip",i):s=i):(e=t.$view,s=t),this.Wt.find(s=s||this));-1===i&&(i=this.Wt.length,this.Wt.push(s)),e.webix_tooltip=i,this.Ut++,this.Yt||(this.Yt=new a.tooltip({}),this.Yt.Gt="webix_tooltip webix_global_tooltip",this.qt=l(document,"pointermove",function(t){return n.Kt(t)}),this.Xt=l(document.body,"pointerleave",function(){return n.Zt()}),this.Jt=rt("onDragMode",function(){return n.Zt()}),this.Qt=rt("onClick",function(){return n.Zt()}))},getTooltip:function(){return this.Yt},Kt:function(t){if("mouse"===t.pointerType){for(var i,e={},s=t.target;s instanceof Element&&"HTML"!=s.tagName;){if(e.first&&e.overflow||(i=s.getAttribute("webix_tooltip"),e.first=e.first||i,i&&s.scrollWidth>s.clientWidth&&(e.overflow=i)),this.Wt[s.webix_tooltip])return this.ti&&this.ti!=s?(this.$tooltipOut(this.ti,s,t),void(this.ti=null)):(this.ti||(this.ti=this.$tooltipIn(s,t)),this.$tooltipMove(s,t,e));s=s.parentElement}this.ti&&(this.ti=this.$tooltipOut(this.ti,null,t))}},Zt:function(){clearTimeout(this.ii),this.Yt.hide()},getMaster:function(t){return this.Wt[t.webix_tooltip]},removeTooltip:function(t){var i=(t=(t=tt(t))instanceof Element?t:t.$view).webix_tooltip;i&&(this.ti==t&&(this.Zt(),this.ti=null),delete t.webix_tooltip,this.Ut--,this.Wt[i]=null),!this.Ut&&this.Yt&&(this.qt=li(this.qt),this.Xt=li(this.Xt),this.Jt=ot(this.Jt),this.Qt=ot(this.Qt),this.Yt.destructor(),this.Yt=this.ti=null,this.Wt=C(["dummy"]))},$tooltipIn:function(t,i){var e=this.Wt[t.webix_tooltip];return e.$tooltipIn&&e!=this?e.$tooltipIn(t,i):(this.Yt.define({dx:20,dy:0,template:"",css:""}),t)},$tooltipOut:function(t,i,e){var s=this.Wt[t.webix_tooltip];return s.$tooltipOut&&s!=this?s.$tooltipOut(t,i,e):(this.Zt(),null)},$tooltipMove:function(t,i,e){var s=this.Wt[t.webix_tooltip];if(s.$tooltipMove&&s!=this)return s.$tooltipMove(t,i,e);t=(z(s.overflow)?this:s).overflow,s=(z(s.delay)?this:s).delay,t=t?e.overflow:e.first;0<s&&this.Zt(),this.ii=g(this.Yt.show,this.Yt,[t||{},$t(i)],s)}};function bi(t){return"$"+t+(gi[t]=(gi[t]||0)+1)}var gi={},xi=!1;function wi(t,i){xi=!0;t=t();return t&&t.then?t=t.then(function(t){return(xi=!1)!==i&&yi(),t}):(xi=!1)!==i&&yi(),t}function yi(){if( G.UIManager.applyChanges(),p("onClick",[]),S.ei=!0,!xi)for(var t=S.top_views.length-1;0<=t;t--)S.top_views[t].obj&&S.top_views[t].obj.resize();S.ei=!1}function Si(t,i,e,s){if(t)for(var n=s?[t]:t.getChildViews(),h=0;h<n.length;h++)!1!==i.call(e,n[h])&&Si(n[h],i,e)}function Mi(t){return z(t)?k.zIndexBase++:(k.zIndexBase=Math.max(k.zIndexBase,t+1),t)}function Ci(t,i){t=0<arguments.length&&t!==undefined?t:"",i=1<arguments.length?i:undefined;return t.includes(i)||(t+=" ".concat(i)),t}function ki(t,i,e){o(t,"compositionend",function(t){e(t)}),o(t,i,function(t){if("keydown"!==i||"Process"!==t.key){if(t.isComposing)if(!["Enter","Escape","Tab","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(t.key))return;e(t)}})}function Ii(t){Ti?t.call():Di.push(t)}l(window,"resize",function(){k.touch&&S.St&&new Date-S.St<1e3||yi()});var Ti=!1,Di=[],Yt=document.getElementsByTagName("SCRIPT"),lt=(Yt.length,Yt.length&&((Yt=(Yt[Yt.length-1].getAttribute("src")||"").split("/")).splice(Yt.length-1,1),k.codebase=Yt.slice(0,Yt.length).join("/")+"/"),function(){k.isIE&&(document.body.className+=" webix_ie"),p("onReady",[])}),Ai=function(){Ti=!0,window.webix_ready&&M(webix_ready)&&(Di=webix_ready.concat(Di));for(var t=0;t<Di.length;t++)Di[t].call();Di=[]},Ei=(rt("onReady",function(t){t?Ai():g(Ai)}),"complete"==document.readyState?lt():l(window,"load",lt),Ii(function(){l(document.body,"click",function(t){p("onClick",[t])})}),{isEmail:function(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test((t||"").toString())},isNumber:function(t){return parseFloat(t)==t},isChecked:function(t){return!!t||"0"===t},isNotEmpty:function(t){return 0===t||t}});function $i(t,i){if(-1!=t.type.indexOf("prompt"))if(!1===i)t.si.reject();else{var e=t.ni.querySelector(".webix_popup_input"),s=e.querySelector("input");if(t.input.required&&!s.value)return t.input.invalid=!0,void u(e,"webix_popup_invalid");i=s.value||"",t.si.resolve(i)}-1!=t.type.indexOf("confirm")&&!1===i?t.si.reject():t.si.resolve(i);e=t.callback;e&&e(i,t.details),Wi.hide(t.id)}function Ri(t){var i=Wi.order,e=i.length,s=t.target;if(0<e&&Ui.keyboard){var n=t.which||t.keyCode;if(13==n||32==n||27==n){for(var h,r=e-1;0<=r;r--){var o=Wi.pull[i[r]];if(o.ni!=s&&o.ni.contains(s)&&32==n)return;if(o.container&&o.container.contains(s)){h=o;break}}return h=h||Wi.pull[i[i.length-1]],13==n||32==n?$i(h,!0):27==n&&$i(h,!1),d(t),!(t.cancelBubble=!0)}}}function Fi(t,i){var e,s=i||document.body;return z(s.modality)?((e=w("DIV",{"class":"webix_modal_cover",style:"position:"+(i?"absolute":"fixed")+";"})).onkeydown=Ri,i&&"fixed"!=(i=window.getComputedStyle(i).position)&&"absolute"!=i&&"sticky"!=i&&"relative"!=i&&(s.style.position="relative"),s.appendChild(e),s.modality=1):t?s.modality++:s.modality--,(t&&1===s.modality||0===s.modality)&&(e=e||Array.prototype.slice.call(s.querySelectorAll(".webix_modal_cover")).filter(function(t){return t.parentNode==s})[0])&&(s.modality?1==s.modality&&(e.style.display="inline-block",u(s,"webix_modalbox_inside")):(e.style.display="none",c(s,"webix_modalbox_inside"))),e}function Pi(t,i,e){return"<div role='button' tabindex='0' aria-label='"+t+"' class='webix_popup_button"+(e?" "+e:"")+"' result='"+i+"' ><div>"+t+"</div></div>"}function Hi(e,t,i,s){var n,h=document.createElement("DIV"),r=e.css?" "+e.css:"",o=(h.className="webix_modal_box webix_"+e.type+r,h.setAttribute("webixbox",1),h.setAttribute("role","alertdialog"),h.setAttribute("aria-label",e.title||""),h.setAttribute("tabindex","0"),"");if(e.width&&(h.style.width=e.width+(Ei.isNumber(e.width)?"px":"")),e.height&&(h.style.height=e.height+(Ei.isNumber(e.height)?"px":"")),e.title&&(o+='<div class="webix_popup_title">'+e.title+"</div>"),o=o+('<div class="webix_popup_text'+(s?" webix_popup_label":"")+'"><span>'+(!e.content&&e.text||"")+"</span></div>")+'<div class="webix_popup_controls">',s&&(o+="<div tabindex='0' class='webix_popup_input webix_el_text"+((r=e.input).required?" webix_required":"")+"'><input value='"+_.escape(r.value||"")+"' placeholder='"+_.escape(r.placeholder||"")+"'></input></div>"),i&&(o+=Pi( e.cancel||B.message.cancel,!1)),t&&(o+=Pi(e.ok||B.message.ok,!0,"confirm")),e.buttons&&!t&&!i)for(var a=0;a<e.buttons.length;a++)o+=Pi(e.buttons[a],a);return h.innerHTML=o+="</div>",e.content&&("none"==(s="string"==typeof(s=e.content)?document.getElementById(s):s).style.display&&(s.style.display=""),h.childNodes[e.title?1:0].appendChild(s)),-1!=e.type.indexOf("prompt")&&((n=h.querySelector(".webix_popup_input")).querySelector("input").oninput=function(){e.input.invalid&&(c(n,"webix_popup_invalid"),e.input.invalid=!1)}),h.onclick=function(t){var i=t.target;-1!=(i=i.className?i:i.parentNode).className.indexOf("webix_popup_button")&&(i=i.getAttribute("result"),$i(e,i="true"==i||"false"!=i&&i)),t.cancelBubble=!0},e.ni=h}function Ni(t,i,e,s){var i=t.tagName?t:Hi(t,i,e,s),e=t.container,n=e?e.offsetWidth:window.innerWidth||document.documentElement.offsetWidth,h=e?e.offsetHeight:window.innerHeight||document.documentElement.offsetHeight,r=e?e.scrollLeft:0,e=e?e.scrollTop:0,o=(t.container&&(i.style.position="absolute"),tt((t.container||document.body).appendChild(i)),Fi(!0,t.container)),n=t.left||Math.abs(r+Math.floor((n-i.offsetWidth)/2)),h=t.top||Math.abs(e+Math.floor((h-i.offsetHeight)/2));return"top"==t.position?i.style.top="-3px":(i.style.top=h+"px",o&&(o.style.top=e+"px",o.style.left=r+"px")),i.style.left=n+"px",i.onkeydown=Ri,(s?i.querySelector(".webix_popup_input input"):i).focus(),t.id?Wi.pull[t.id]&&Wi.hide(t.id):t.id=bi("modalbox"),Wi.order.push(t.id),(Wi.pull[t.id]=t).si=N.defer(),t.si}function Oi(t){return Ni(t,!0)}function zi(t){return Ni(t,!0,!0)}function Bi(t){return Ni(t)}function Vi(t){return Ni(t,!0,!0,!0)}function Li(t,i,e){return"object"!=x(t)&&("function"==typeof i&&(e=i,i=""),t={text:t,type:i,callback:e}),t}function ji(){var t=Li.apply(this,arguments);return t.type=t.type||"confirm",zi(t)}function Wi(){var t=Li.apply(this,arguments);return t.type=t.type||"alert",Bi(t)}function Ui(t,i,e,s){var n,h;switch((t=function(t,i,e,s){return(t="object"!=x(t)?{text:t,type:i,expire:e,id:s}:t).id=t.id||bi("message"),t.expire=t.expire||r.expire,t}.apply(this,arguments)).type=t.type||"info",t.type.split("-")[0]){case"alert":return Oi(t);case"confirm":return zi(t);case"modalbox":return Bi(t);case"prompt":return Vi(t);default:return n=t,r.area||(r.area=document.createElement("DIV"),r.area.className="webix_message_area",r.area.style[r.position]="5px",document.body.appendChild(r.area)),r.area.setAttribute("role","alert"),r.area.setAttribute("aria-atomic",!0),r.hide(n.id),(h=document.createElement("DIV")).innerHTML="<div>"+n.text+"</div>",h.className="webix_message webix_"+n.type,h.onclick=function(){n&&r.hide(n.id),n=null},"bottom"==r.position&&r.area.firstChild?r.area.insertBefore(h,r.area.firstChild):r.area.appendChild(h),0<n.expire&&(r.timers[n.id]=window.setTimeout(function(){r.hide(n.id)},n.expire)),h.style.height=h.offsetHeight-2+"px",r.pull[n.id]=h,h=null,n.id}}l(document,"keydown",Ri,{capture:!0}),Wi.pull={},Wi.order=[],Wi.hide=function(t){var i;t&&Wi.pull[t]&&((i=Wi.pull[t].ni)&&(i.parentNode.removeChild(i),Wi.order.splice(Wi.order.indexOf(t),1),Fi(!1,Wi.pull[t].container),delete Wi.pull[t]))},Wi.hideAll=function(){for(var t in Wi.pull)this.hide(t)};var $,Yi,r=Ui,Gi=(r.expire=4e3,r.keyboard=!0,r.position="top",r.pull={},r.timers={},r.hideAll=function(){for(var t in r.pull)r.hide(t)},r.hide=function(t){var i=r.pull[t];i&&i.parentNode&&(window.setTimeout(function(){i.parentNode.removeChild(i),i=null},2e3),i.style.height=0,i.className+=" hidden",r.area.removeAttribute("role"),r.timers[t]&&window.clearTimeout(r.timers[t]),delete r.pull[t])},q("message",Ui),{set:function(t,i){i=i||{},this.Vt&&this.exit(),v(t)?t=v(t):(t="string"==typeof t?document.getElementById(t):t)instanceof Element&&(t={$view:t,$html:!0}),this.Vt=t,this.hi=this.ri();var e=t.config;return t.setPosition?(e.fullscreen=!0,t.resize(),t):(this.oi=a({view:"window",head:this.ai(i),css:i.css||"",fullscreen:!0,borderless:!0,body:{rows:[]}}),e&&(this.ci={width:e.width,minWidth:e.minWidth,maxWidth:e.maxWidth,height:e.height,minHeight:e.minHeight,maxHeight:e.maxHeight }),t.getParentView&&t.getParentView()?(this.li=t.getParentView(),this.li.index&&(this.hi.index=this.li.index(t),this.hi.active=!!this.li.getActiveId&&this.li.getActiveId()==e.id)):(this.li=t.$view.parentNode,this.hi.node=w("div"),this.li.replaceChild(this.hi.node,t.$view)),this.oi.getBody().addView(t.$html?{view:"template",content:t.$view,css:"webix_fullscreen_html"}:t),this.oi.show(),this.fi(t),this.oi)},exit:function(){var t;this.Vt&&(t=this.Vt.config,this.ri(!0),this.Vt.setPosition?(t.fullscreen=!1,this.Vt.resize()):(this.li instanceof Element?(this.Vt.yt=null,this.Vt.di&&this.Vt.di(this.Vt.config),this.li.replaceChild(this.Vt.$view,this.hi.node)):z(this.hi.index)?(this.Vt.yt=this.li,this.li.Ht(this.Vt))