diff --git a/build/js/metro.js b/build/js/metro.js index 642589771..152f1c07d 100644 --- a/build/js/metro.js +++ b/build/js/metro.js @@ -107,7 +107,7 @@ var isTouch = (('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || ( var Metro = { version: "4.2.39", - versionFull: "4.2.39.720 ", + versionFull: "4.2.39.721 ", isTouchable: isTouch, fullScreenEnabled: document.fullscreenEnabled, sheet: null, diff --git a/build/js/metro.min.js b/build/js/metro.min.js index 2b75a07c5..d40f9ff5e 100644 --- a/build/js/metro.min.js +++ b/build/js/metro.min.js @@ -4,5 +4,5 @@ * Licensed under MIT */ -!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(s){"use strict";var x=s;if(void 0===s)throw new Error("Metro 4 requires jQuery!");if("MutationObserver"in window==!1)throw new Error("Metro 4 requires MutationObserver!");var e=x("meta[name='metro4:init']").attr("content"),t=x("meta[name='metro4:locale']").attr("content"),n=x("meta[name='metro4:week_start']").attr("content"),i=x("meta[name='metro4:date_format']").attr("content"),a=x("meta[name='metro4:date_format_input']").attr("content"),o=x("meta[name='metro4:animation_duration']").attr("content"),r=x("meta[name='metro4:callback_timeout']").attr("content"),l=x("meta[name='metro4:timeout']").attr("content"),c=x("meta[name='metro4:scroll_multiple']").attr("content"),d=x("meta[name='metro4:cloak']").attr("content"),h=x("meta[name='metro4:cloak_duration']").attr("content");void 0===window.METRO_INIT&&(window.METRO_INIT=void 0===e||JSON.parse(e)),void 0===window.METRO_DEBUG&&(window.METRO_DEBUG=!0),void 0===window.METRO_WEEK_START&&(window.METRO_WEEK_START=void 0!==n?parseInt(n):0),void 0===window.METRO_DATE_FORMAT&&(window.METRO_DATE_FORMAT=void 0!==i?i:"%Y-%m-%d"),void 0===window.METRO_DATE_FORMAT_INPUT&&(window.METRO_DATE_FORMAT_INPUT=void 0!==a?a:"%Y-%m-%d"),void 0===window.METRO_LOCALE&&(window.METRO_LOCALE=void 0!==t?t:"en-US"),void 0===window.METRO_ANIMATION_DURATION&&(window.METRO_ANIMATION_DURATION=void 0!==o?parseInt(o):300),void 0===window.METRO_CALLBACK_TIMEOUT&&(window.METRO_CALLBACK_TIMEOUT=void 0!==r?parseInt(r):500),void 0===window.METRO_TIMEOUT&&(window.METRO_TIMEOUT=void 0!==l?parseInt(l):2e3),void 0===window.METRO_SCROLL_MULTIPLE&&(window.METRO_SCROLL_MULTIPLE=void 0!==c?parseInt(c):20),void 0===window.METRO_CLOAK_REMOVE&&(window.METRO_CLOAK_REMOVE=void 0!==d?(""+d).toLowerCase():"fade"),void 0===window.METRO_CLOAK_DURATION&&(window.METRO_CLOAK_DURATION=void 0!==h?parseInt(h):500),void 0===window.METRO_HOTKEYS_FILTER_CONTENT_EDITABLE&&(window.METRO_HOTKEYS_FILTER_CONTENT_EDITABLE=!0),void 0===window.METRO_HOTKEYS_FILTER_INPUT_ACCEPTING_ELEMENTS&&(window.METRO_HOTKEYS_FILTER_INPUT_ACCEPTING_ELEMENTS=!0),void 0===window.METRO_HOTKEYS_FILTER_TEXT_INPUTS&&(window.METRO_HOTKEYS_FILTER_TEXT_INPUTS=!0),void 0===window.METRO_HOTKEYS_BUBBLE_UP&&(window.METRO_HOTKEYS_BUBBLE_UP=!1),void 0===window.METRO_THROWS&&(window.METRO_THROWS=!0),window.METRO_MEDIA=[],"function"!=typeof Object.create&&(Object.create=function(e){function t(){}return t.prototype=e,new t}),"function"!=typeof Object.values&&(Object.values=function(t){return Object.keys(t).map(function(e){return t[e]})}),"function"!=typeof window.setImmediate&&(window.setImmediate=function(e){return setTimeout(e,0)});var u="ontouchstart"in window||0>16)+t;255>8&255)+t;255","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:METRO_HOTKEYS_FILTER_INPUT_ACCEPTING_ELEMENTS,filterTextInputs:METRO_HOTKEYS_FILTER_TEXT_INPUTS,filterContentEditable:METRO_HOTKEYS_FILTER_CONTENT_EDITABLE},keyHandler:function(e){if("string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys){var r=e.handler,l=e.data.keys.toLowerCase().split(" ");e.handler=function(n){if(this===n.target||!(b.options.filterInputAcceptingElements&&b.textInputTypes.test(n.target.nodeName)||b.options.filterContentEditable&&x(n.target).attr("contenteditable")||b.options.filterTextInputs&&-1>>4&15)+n.charAt(15&t);return s}function k(e){for(var t,n,s="",i=-1;++i>>6&31,128|63&t):t<=65535?s+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(s+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return s}function O(e){var t,n=new Array(e.length>>2);for(t=0;t>5]|=(255&e.charCodeAt(t/8))<>5]>>>n%32&255);return t}function D(e,t){e[t>>5]|=128<>>9<<4)]=t;for(var n=1732584193,s=-271733879,i=-1732584194,a=271733878,o=0;o>>32-r,n);var o,r}function E(e,t,n,s,i,a,o){return M(t&n|~t&s,e,t,i,a,o)}function A(e,t,n,s,i,a,o){return M(t&s|n&~s,e,t,i,a,o)}function P(e,t,n,s,i,a,o){return M(t^n^s,e,t,i,a,o)}function N(e,t,n,s,i,a,o){return M(n^(t|~s),e,t,i,a,o)}function R(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}var F,L,H=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],B="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],V=Array.prototype.slice;if(x.event.fixHooks)for(var z=H.length;z;)x.event.fixHooks[H[--z]]=x.event.mouseHooks;function j(e){var t,n=e||window.event,s=V.call(arguments,1),i=0,a=0,o=0,r=0,l=0;if((e=x.event.fix(n)).type="mousewheel","detail"in n&&(o=-1*n.detail),"wheelDelta"in n&&(o=n.wheelDelta),"wheelDeltaY"in n&&(o=n.wheelDeltaY),"wheelDeltaX"in n&&(a=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(a=-1*o,o=0),i=0===o?a:o,"deltaY"in n&&(i=o=-1*n.deltaY),"deltaX"in n&&(a=n.deltaX,0===o&&(i=-1*a)),0!==o||0!==a){if(1===n.deltaMode){var c=x.data(this,"mousewheel-line-height");i*=c,o*=c,a*=c}else if(2===n.deltaMode){var d=x.data(this,"mousewheel-page-height");i*=d,o*=d,a*=d}if(t=Math.max(Math.abs(o),Math.abs(a)),(!L||t"),i=0;i/g,a=/(^( )?(var|if|for|else|switch|case|break|{|}|;))(.*)?/g,o="with(obj) { var r=[];\n",r=0,l=function(e,t){return o+=t?e.match(a)?e+"\n":"r.push("+e+");\n":""!==e?'r.push("'+e.replace(/"/g,'\\"')+'");\n':"",l};s=i.exec(e);)l(e.slice(r,s.index))(s[1],!0),r=s.index+s[0].length;l(e.substr(r,e.length-r)),o=(o+'return r.join(""); }').replace(/[\r\t\n]/g," ");try{n=new Function("obj",o).apply(t,[t])}catch(e){console.error("'"+e.message+"'"," in \n\nCode:\n",o,"\n")}return n};var X={isUrl:function(e){return/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@\-\/]))?/.test(e)},isTag:function(e){return/^<\/?[\w\s="/.':;#-\/\?]+>/gi.test(e)},isColor:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},isEmbedObject:function(n){var s=!1;return x.each(["iframe","object","embed","video"],function(e,t){"string"==typeof n&&n.toLowerCase()===t?s=!0:void 0!==n.nodeType&&n.tagName.toLowerCase()===t&&(s=!0)}),s},isVideoUrl:function(e){return/youtu\.be|youtube|vimeo/gi.test(e)},isDate:function(e,t){return!("object"!=typeof e||!X.isFunc(e.getMonth))||"Invalid Date"!==(X.isValue(t)?String(e).toDate(t):String(new Date(e)))},isDateObject:function(e){return"object"==typeof e&&void 0!==e.getMonth},isInt:function(e){return Number(e)===e&&e%1==0},isFloat:function(e){return Number(e)===e&&e%1!=0},isTouchDevice:function(){return"ontouchstart"in window||0"+e+""},embedUrl:function(e){return-1!==e.indexOf("youtu.be")&&(e="https://www.youtube.com/embed/"+e.split("/").pop()),"
"},secondsToTime:function(e){var t=e%3600,n=t%60;return{h:Math.floor(e/3600),m:Math.floor(t/60),s:Math.ceil(n)}},hex2rgba:function(e,t){var n;if(t=isNaN(t)?1:t,/^#([A-Fa-f0-9]{3}){1,2}$/.test(e))return 3===(n=e.substring(1).split("")).length&&(n=[n[0],n[0],n[1],n[1],n[2],n[2]]),"rgba("+[(n="0x"+n.join(""))>>16&255,n>>8&255,255&n].join(",")+","+t+")";throw new Error("Hex2rgba error. Bad Hex value")},random:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},uniqueId:function(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})},elementId:function(e){return e+"-"+(new Date).getTime()+X.random(1,1e3)},secondsToFormattedString:function(e){var t=parseInt(e,10),n=Math.floor(t/3600),s=Math.floor((t-3600*n)/60),i=t-3600*n-60*s;return n<10&&(n="0"+n),s<10&&(s="0"+s),i<10&&(i="0"+i),[n,s,i].join(":")},callback:function(e,t,n){return X.exec(e,t,n)},func:function(e){return new Function("a",e)},exec:function(e,t,n){var s;if(null==e)return!1;var i=X.isFunc(e);!1===i&&(i=X.func(e));try{s=i.apply(n,t)}catch(e){if(!(s=null)===METRO_THROWS)throw e}return s},isOutsider:function(e){var t,n=(e=X.isJQueryObject(e)?e:x(e)).clone();return n.removeAttr("data-role").css({visibility:"hidden",position:"absolute",display:"block"}),e.parent().append(n),t=n[0].getBoundingClientRect(),n.remove(),0<=t.top&&0<=t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},inViewport:function(e){var t=X.rect(e);return 0<=t.top&&0<=t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},rect:function(e){return"function"==typeof s&&e instanceof s&&(e=e[0]),e.getBoundingClientRect()},getCursorPosition:function(e,t){var n=X.rect(e);return{x:X.pageXY(t).x-n.left-window.pageXOffset,y:X.pageXY(t).y-n.top-window.pageYOffset}},getCursorPositionX:function(e,t){return X.getCursorPosition(e,t).x},getCursorPositionY:function(e,t){return X.getCursorPosition(e,t).y},objectLength:function(e){return Object.keys(e).length},percent:function(e,t,n){if(0===e)return 0;var s=100*t/e;return!0===n?Math.round(s):Math.round(100*s)/100},camelCase:function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},dashedName:function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})},objectShift:function(e){var t=0;return x.each(e,function(e){0===t?t=e:e>16&255,t>>8&255,255&t]):[0,0,0]},hexColorToRgbA:function(e,t){var n;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)?(3===(n=e.substring(1).split("")).length&&(n=[n[0],n[0],n[1],n[1],n[2],n[2]]),"rgba("+[(n="0x"+n.join(""))>>16&255,n>>8&255,255&n,t||1].join(",")+")"):"rgba(0,0,0,1)"},getInlineStyles:function(e){var t={};X.isJQueryObject(e)&&(e=e[0]);for(var n=0,s=e.style.length;n").addClass("circle").appendTo(n)}();break;case"square":!function(){for(e=0;e<4;e++)x("
").addClass("square").appendTo(n)}();break;case"cycle":x("
").addClass("cycle").appendTo(n);break;case"simple":x('').appendTo(n);break;default:!function(){for(e=0;e<5;e++)t=x("
").addClass("wrap").appendTo(n),x("
").addClass("circle").appendTo(t)}()}X.exec(this.options.onActivityCreate,[this.element]),setImmediate(function(){n.fire("activitycreate")})},changeAttribute:function(e){},destroy:function(){var e=this.element,t=this.options;e.html("").removeClass(t.style+"-style").removeClass("activity-"+t.type)}};S.plugin("activity",Z);var Q={init:function(e,t){return this.options=x.extend({},this.options,e),this.elem=t,this.element=x(t),this._setOptionsFromDOM(),this._create(),this},options:{expand:!(S.activity={open:function(e){var t='
',n=e.text?'
'+e.text+"
":"";return S.dialog.create({content:t+n,defaultAction:!1,clsContent:"d-flex flex-column flex-justify-center flex-align-center bg-transparent no-shadow w-auto",clsDialog:"no-border no-shadow bg-transparent global-dialog",autoHide:e.autoHide?e.autoHide:0,overlayClickClose:!0===e.overlayClickClose,overlayColor:e.overlayColor?e.overlayColor:"#000000",overlayAlpha:e.overlayAlpha?e.overlayAlpha:.5,clsOverlay:"global-overlay"})},close:function(e){S.dialog.close(e)}}),expandPoint:null,duration:100,onAppBarCreate:S.noop},_setOptionsFromDOM:function(){var e=this.element,s=this.options;x.each(e.data(),function(t,n){if(t in s)try{s[t]=JSON.parse(n)}catch(e){s[t]=n}})},_create:function(){var e=this.element,t=this.options;this._createStructure(),this._createEvents(),X.exec(t.onAppBarCreate,[e]),setImmediate(function(){e.fire("appbarcreate")})},_createStructure:function(){var e,t,n=this.element,s=this.options,i=X.elementId("app-bar");if(n.addClass("app-bar"),0===(e=n.find(".hamburger")).length){e=x("").appendTo(n),a[s.view[e]["index-view"]]=n}),t=0;t").addClass("table-inspector")).attr("for",this.element.attr("id")),x("
"+a.inspectorTitle+"
").appendTo(e),t=x("
").addClass("table-wrap").appendTo(e),n=x("").addClass("table subcompact"),s=x("").appendTo(n),n.appendTo(t),this._createInspectorItems(s),i=x("
").appendTo(e),x("
").addClass(a.clsHeadRow).appendTo(o),x.each(this.service,function(){var e=[];s=x("").addClass(s.clsFooter);n.find("tfoot").remove(),0!==this.foots.length&&(e=x("").addClass(s.clsHeadRow).appendTo(i),x.each(this.foots,function(){t=x("").addClass(a.clsBodyRow),m=t%2==0,p=x("").appendTo(f),g=[];if("function"==typeof C.tableToCSV){for(t=X.isValue(t)?t.toLowerCase():"all-filtered",n=X.isValue(n)?n:X.elementId("table")+"-export.csv",l=x(""),o=this.heads,a=0;a"),X.isValue(this.title)&&c.html(this.title),g[u.view[e]["index-view"]]=c)}),a=0;a"),o=r[i],a=0;a").html(this),g[u.view[e]["index-view"]]=c)}),a=0;a").addClass("tab-marker").addClass(t.clsMarker).appendTo(e)),this.openTab(0===s.length?n[0]:s[0])},_createEvents:function(){var a=this,o=this.element,r=this.options,l=o.find("li");o.on(S.events.click,"li",function(e){var t=x(this),n=o.find("li.active"),s=l.index(t)>l.index(n),i=t.children("a").attr("href");if(X.isValue(i)&&"#"===i[0]){if(t.hasClass("active"))return;if(t.hasClass("disabled"))return;if(!1===X.exec(r.onBeforeTabOpen,[t,i,s],this))return;if(!X.isValue(i))return;a.openTab(t,s),e.preventDefault()}});x("html").hasClass("metro-touch-device")||x(o).mousewheel(function(e,t,n,s){var i=t*METRO_SCROLL_MULTIPLE;return o.scrollLeft(o.scrollLeft()-i),!1})},openTab:function(e,t){var n,s,i,a,o=this.element,r=this.options,l=o.find("li"),c=o.scrollLeft(),d=o.width();X.isJQueryObject(e)||(e=x(e)),x.each(l,function(){var e=x(this).find("a").attr("href");X.isValue(e)&&"#"!==e.trim()&&0").addClass("tabs tabs-wrapper");if(X.isValue(n.attr("id"))||n.attr("id",X.elementId("tabs")),o.addClass(s.tabsPosition.replace(["-","_","+"]," ")),n.addClass("tabs-list"),"default"!==s.tabsType&&n.addClass("tabs-"+s.tabsType),a||(o.insertBefore(n),n.appendTo(o)),n.data("expanded",!1),e=x("
").addClass("expand-title"),o.prepend(e),0===(t=o.find(".hamburger")).length){t=x("
"},embedUrl:function(e){return-1!==e.indexOf("youtu.be")&&(e="https://www.youtube.com/embed/"+e.split("/").pop()),"
"},secondsToTime:function(e){var t=e%3600,n=t%60;return{h:Math.floor(e/3600),m:Math.floor(t/60),s:Math.ceil(n)}},hex2rgba:function(e,t){var n;if(t=isNaN(t)?1:t,/^#([A-Fa-f0-9]{3}){1,2}$/.test(e))return 3===(n=e.substring(1).split("")).length&&(n=[n[0],n[0],n[1],n[1],n[2],n[2]]),"rgba("+[(n="0x"+n.join(""))>>16&255,n>>8&255,255&n].join(",")+","+t+")";throw new Error("Hex2rgba error. Bad Hex value")},random:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},uniqueId:function(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})},elementId:function(e){return e+"-"+(new Date).getTime()+X.random(1,1e3)},secondsToFormattedString:function(e){var t=parseInt(e,10),n=Math.floor(t/3600),s=Math.floor((t-3600*n)/60),i=t-3600*n-60*s;return n<10&&(n="0"+n),s<10&&(s="0"+s),i<10&&(i="0"+i),[n,s,i].join(":")},callback:function(e,t,n){return X.exec(e,t,n)},func:function(e){return new Function("a",e)},exec:function(e,t,n){var s;if(null==e)return!1;var i=X.isFunc(e);!1===i&&(i=X.func(e));try{s=i.apply(n,t)}catch(e){if(!(s=null)===METRO_THROWS)throw e}return s},isOutsider:function(e){var t,n=(e=X.isJQueryObject(e)?e:x(e)).clone();return n.removeAttr("data-role").css({visibility:"hidden",position:"absolute",display:"block"}),e.parent().append(n),t=n[0].getBoundingClientRect(),n.remove(),0<=t.top&&0<=t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},inViewport:function(e){var t=X.rect(e);return 0<=t.top&&0<=t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},rect:function(e){return"function"==typeof s&&e instanceof s&&(e=e[0]),e.getBoundingClientRect()},getCursorPosition:function(e,t){var n=X.rect(e);return{x:X.pageXY(t).x-n.left-window.pageXOffset,y:X.pageXY(t).y-n.top-window.pageYOffset}},getCursorPositionX:function(e,t){return X.getCursorPosition(e,t).x},getCursorPositionY:function(e,t){return X.getCursorPosition(e,t).y},objectLength:function(e){return Object.keys(e).length},percent:function(e,t,n){if(0===e)return 0;var s=100*t/e;return!0===n?Math.round(s):Math.round(100*s)/100},camelCase:function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},dashedName:function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})},objectShift:function(e){var t=0;return x.each(e,function(e){0===t?t=e:e>16&255,t>>8&255,255&t]):[0,0,0]},hexColorToRgbA:function(e,t){var n;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)?(3===(n=e.substring(1).split("")).length&&(n=[n[0],n[0],n[1],n[1],n[2],n[2]]),"rgba("+[(n="0x"+n.join(""))>>16&255,n>>8&255,255&n,t||1].join(",")+")"):"rgba(0,0,0,1)"},getInlineStyles:function(e){var t={};X.isJQueryObject(e)&&(e=e[0]);for(var n=0,s=e.style.length;n").addClass("circle").appendTo(n)}();break;case"square":!function(){for(e=0;e<4;e++)x("
").addClass("square").appendTo(n)}();break;case"cycle":x("
").addClass("cycle").appendTo(n);break;case"simple":x('').appendTo(n);break;default:!function(){for(e=0;e<5;e++)t=x("
").addClass("wrap").appendTo(n),x("
").addClass("circle").appendTo(t)}()}X.exec(this.options.onActivityCreate,[this.element]),setImmediate(function(){n.fire("activitycreate")})},changeAttribute:function(e){},destroy:function(){var e=this.element,t=this.options;e.html("").removeClass(t.style+"-style").removeClass("activity-"+t.type)}};S.plugin("activity",Z);var Q={init:function(e,t){return this.options=x.extend({},this.options,e),this.elem=t,this.element=x(t),this._setOptionsFromDOM(),this._create(),this},options:{expand:!(S.activity={open:function(e){var t='
',n=e.text?'
'+e.text+"
":"";return S.dialog.create({content:t+n,defaultAction:!1,clsContent:"d-flex flex-column flex-justify-center flex-align-center bg-transparent no-shadow w-auto",clsDialog:"no-border no-shadow bg-transparent global-dialog",autoHide:e.autoHide?e.autoHide:0,overlayClickClose:!0===e.overlayClickClose,overlayColor:e.overlayColor?e.overlayColor:"#000000",overlayAlpha:e.overlayAlpha?e.overlayAlpha:.5,clsOverlay:"global-overlay"})},close:function(e){S.dialog.close(e)}}),expandPoint:null,duration:100,onAppBarCreate:S.noop},_setOptionsFromDOM:function(){var e=this.element,s=this.options;x.each(e.data(),function(t,n){if(t in s)try{s[t]=JSON.parse(n)}catch(e){s[t]=n}})},_create:function(){var e=this.element,t=this.options;this._createStructure(),this._createEvents(),X.exec(t.onAppBarCreate,[e]),setImmediate(function(){e.fire("appbarcreate")})},_createStructure:function(){var e,t,n=this.element,s=this.options,i=X.elementId("app-bar");if(n.addClass("app-bar"),0===(e=n.find(".hamburger")).length){e=x("
").appendTo(t),X.isValue(this.title)&&s.html(this.title),X.isValue(this.size)&&s.css({width:this.size}),X.isValue(this.cls)&&e.push(this.cls),e.push(a.clsHeadCell),s.addClass(e.join(" "))}),n=this.heads,e=0;e")).data("index",e),X.isValue(t.title)&&s.html(t.title),X.isValue(t.format)&&s.attr("data-format",t.format),X.isValue(t.name)&&s.attr("data-name",t.name),X.isValue(t.colspan)&&s.attr("colspan",t.colspan),X.isValue(l[e].size)&&s.css({width:l[e].size}),!0===t.sortable&&(n.push("sortable-column"),X.isValue(t.sortDir)&&n.push("sort-"+t.sortDir)),X.isValue(t.cls)&&n.push(t.cls),!1===X.bool(l[e].show)&&n.push("hidden"),n.push(a.clsHeadCell),X.bool(l[e].show)&&X.arrayDelete(n,"hidden"),s.addClass(n.join(" ")),r[l[e]["index-view"]]=s}),e=0;e").addClass(this.options.clsBody).insertAfter(e)},_createTableFooter:function(){var e,t,n=this.element,s=this.options,i=x("
").appendTo(e),void 0!==this.title&&t.html(this.title),void 0!==this.name&&t.addClass("foot-column-name-"+this.name),void 0!==this.cls&&t.addClass(this.cls),X.isValue(this.colspan)&&t.attr("colspan",this.colspan),t.appendTo(e)})),n.append(i)},_createTopBlock:function(){var e,t,n,s=this,i=this.element,a=this.options,o=x("
").addClass("table-top").addClass(a.clsTableTop).insertBefore(i.parent());return(e=X.isValue(this.wrapperSearch)?this.wrapperSearch:x("
").addClass("table-search-block").addClass(a.clsSearch).appendTo(o)).addClass(a.clsSearch),x("").attr("type","text").appendTo(e).input({prepend:a.tableSearchTitle}),!0!==a.showSearch&&e.hide(),(t=X.isValue(this.wrapperRows)?this.wrapperRows:x("
").addClass("table-rows-block").appendTo(o)).addClass(a.clsRowsCount),n=x("
").html(t+1),void 0!==s.service[0].clsColumn&&p.addClass(s.service[0].clsColumn),p.appendTo(u),p=x(""),f="checkbox"===a.checkType?x(""):x(""),X.isValue(c)&&Array.isArray(c)&&-1"),x("
").addClass("cell-wrapper").addClass(a.clsCellWrapper).html(this).appendTo(p)):p=x("
").html(this),p.addClass(a.clsBodyCell),X.isValue(s.heads[e].clsColumn)&&p.addClass(s.heads[e].clsColumn),!1===X.bool(d[e].show)&&p.addClass("hidden"),X.bool(d[e].show)&&p.removeClass("hidden"),g[d[e]["index-view"]]=p,X.exec(a.onDrawCell,[p,this,e,s.heads[e]],p[0])}),h=0;hthis.pagesCount))return this._draw(),this;this.currentPage=this.pagesCount}},prev:function(){if(0!==this.items.length){if(this.currentPage--,0!==this.currentPage)return this._draw(),this;this.currentPage=1}},first:function(){if(0!==this.items.length)return this.currentPage=1,this._draw(),this},last:function(){if(0!==this.items.length)return this.currentPage=this.pagesCount,this._draw(),this},page:function(e){return e<=0&&(e=1),e>this.pagesCount&&(e=this.pagesCount),this.currentPage=e,this._draw(),this},addFilter:function(e,t){var n,s=null,i=X.isFunc(e);if(!1!==i){for(n=0;n").appendTo(f),v=x("
").html("").appendTo(n),x("").html(this.title).appendTo(n),x("").html("").appendTo(n),x("").html("").appendTo(n),a[s.view[e]["index-view"]]=n}),t=0;t").addClass("table-inspector")).attr("for",this.element.attr("id")),x("
"+a.inspectorTitle+"
").appendTo(e),t=x("
").addClass("table-wrap").appendTo(e),n=x("").addClass("table subcompact"),s=x("").appendTo(n),n.appendTo(t),this._createInspectorItems(s),i=x("
").appendTo(e),x("
").addClass(a.clsHeadRow).appendTo(o),x.each(this.service,function(){var e=[];s=x("").addClass(s.clsFooter);n.find("tfoot").remove(),0!==this.foots.length&&(e=x("").addClass(s.clsHeadRow).appendTo(i),x.each(this.foots,function(){t=x("").addClass(a.clsBodyRow),m=t%2==0,p=x("").appendTo(f),g=[];if("function"==typeof C.tableToCSV){for(t=X.isValue(t)?t.toLowerCase():"all-filtered",n=X.isValue(n)?n:X.elementId("table")+"-export.csv",l=x(""),o=this.heads,a=0;a"),X.isValue(this.title)&&c.html(this.title),g[u.view[e]["index-view"]]=c)}),a=0;a"),o=r[i],a=0;a").html(this),g[u.view[e]["index-view"]]=c)}),a=0;a").addClass("tab-marker").addClass(t.clsMarker).appendTo(e)),this.openTab(0===s.length?n[0]:s[0])},_createEvents:function(){var a=this,o=this.element,r=this.options,l=o.find("li");o.on(S.events.click,"li",function(e){var t=x(this),n=o.find("li.active"),s=l.index(t)>l.index(n),i=t.children("a").attr("href");if(X.isValue(i)&&"#"===i[0]){if(t.hasClass("active"))return;if(t.hasClass("disabled"))return;if(!1===X.exec(r.onBeforeTabOpen,[t,i,s],this))return;if(!X.isValue(i))return;a.openTab(t,s),e.preventDefault()}});x("html").hasClass("metro-touch-device")||x(o).mousewheel(function(e,t,n,s){var i=t*METRO_SCROLL_MULTIPLE;return o.scrollLeft(o.scrollLeft()-i),!1})},openTab:function(e,t){var n,s,i,a,o=this.element,r=this.options,l=o.find("li"),c=o.scrollLeft(),d=o.width();X.isJQueryObject(e)||(e=x(e)),x.each(l,function(){var e=x(this).find("a").attr("href");X.isValue(e)&&"#"!==e.trim()&&0").addClass("tabs tabs-wrapper");if(X.isValue(n.attr("id"))||n.attr("id",X.elementId("tabs")),o.addClass(s.tabsPosition.replace(["-","_","+"]," ")),n.addClass("tabs-list"),"default"!==s.tabsType&&n.addClass("tabs-"+s.tabsType),a||(o.insertBefore(n),n.appendTo(o)),n.data("expanded",!1),e=x("
").addClass("expand-title"),o.prepend(e),0===(t=o.find(".hamburger")).length){t=x("
"},embedUrl:function(e){return-1!==e.indexOf("youtu.be")&&(e="https://www.youtube.com/embed/"+e.split("/").pop()),"
"},secondsToTime:function(e){var t=e%3600,n=t%60;return{h:Math.floor(e/3600),m:Math.floor(t/60),s:Math.ceil(n)}},hex2rgba:function(e,t){var n;if(t=isNaN(t)?1:t,/^#([A-Fa-f0-9]{3}){1,2}$/.test(e))return 3===(n=e.substring(1).split("")).length&&(n=[n[0],n[0],n[1],n[1],n[2],n[2]]),"rgba("+[(n="0x"+n.join(""))>>16&255,n>>8&255,255&n].join(",")+","+t+")";throw new Error("Hex2rgba error. Bad Hex value")},random:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},uniqueId:function(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})},elementId:function(e){return e+"-"+(new Date).getTime()+X.random(1,1e3)},secondsToFormattedString:function(e){var t=parseInt(e,10),n=Math.floor(t/3600),s=Math.floor((t-3600*n)/60),i=t-3600*n-60*s;return n<10&&(n="0"+n),s<10&&(s="0"+s),i<10&&(i="0"+i),[n,s,i].join(":")},callback:function(e,t,n){return X.exec(e,t,n)},func:function(e){return new Function("a",e)},exec:function(e,t,n){var s;if(null==e)return!1;var i=X.isFunc(e);!1===i&&(i=X.func(e));try{s=i.apply(n,t)}catch(e){if(!(s=null)===METRO_THROWS)throw e}return s},isOutsider:function(e){var t,n=(e=X.isJQueryObject(e)?e:x(e)).clone();return n.removeAttr("data-role").css({visibility:"hidden",position:"absolute",display:"block"}),e.parent().append(n),t=n[0].getBoundingClientRect(),n.remove(),0<=t.top&&0<=t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},inViewport:function(e){var t=X.rect(e);return 0<=t.top&&0<=t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},rect:function(e){return"function"==typeof s&&e instanceof s&&(e=e[0]),e.getBoundingClientRect()},getCursorPosition:function(e,t){var n=X.rect(e);return{x:X.pageXY(t).x-n.left-window.pageXOffset,y:X.pageXY(t).y-n.top-window.pageYOffset}},getCursorPositionX:function(e,t){return X.getCursorPosition(e,t).x},getCursorPositionY:function(e,t){return X.getCursorPosition(e,t).y},objectLength:function(e){return Object.keys(e).length},percent:function(e,t,n){if(0===e)return 0;var s=100*t/e;return!0===n?Math.round(s):Math.round(100*s)/100},camelCase:function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},dashedName:function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})},objectShift:function(e){var t=0;return x.each(e,function(e){0===t?t=e:e>16&255,t>>8&255,255&t]):[0,0,0]},hexColorToRgbA:function(e,t){var n;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)?(3===(n=e.substring(1).split("")).length&&(n=[n[0],n[0],n[1],n[1],n[2],n[2]]),"rgba("+[(n="0x"+n.join(""))>>16&255,n>>8&255,255&n,t||1].join(",")+")"):"rgba(0,0,0,1)"},getInlineStyles:function(e){var t={};X.isJQueryObject(e)&&(e=e[0]);for(var n=0,s=e.style.length;n").addClass("circle").appendTo(n)}();break;case"square":!function(){for(e=0;e<4;e++)x("
").addClass("square").appendTo(n)}();break;case"cycle":x("
").addClass("cycle").appendTo(n);break;case"simple":x('').appendTo(n);break;default:!function(){for(e=0;e<5;e++)t=x("
").addClass("wrap").appendTo(n),x("
").addClass("circle").appendTo(t)}()}X.exec(this.options.onActivityCreate,[this.element]),setImmediate(function(){n.fire("activitycreate")})},changeAttribute:function(e){},destroy:function(){var e=this.element,t=this.options;e.html("").removeClass(t.style+"-style").removeClass("activity-"+t.type)}};S.plugin("activity",Z);var Q={init:function(e,t){return this.options=x.extend({},this.options,e),this.elem=t,this.element=x(t),this._setOptionsFromDOM(),this._create(),this},options:{expand:!(S.activity={open:function(e){var t='
',n=e.text?'
'+e.text+"
":"";return S.dialog.create({content:t+n,defaultAction:!1,clsContent:"d-flex flex-column flex-justify-center flex-align-center bg-transparent no-shadow w-auto",clsDialog:"no-border no-shadow bg-transparent global-dialog",autoHide:e.autoHide?e.autoHide:0,overlayClickClose:!0===e.overlayClickClose,overlayColor:e.overlayColor?e.overlayColor:"#000000",overlayAlpha:e.overlayAlpha?e.overlayAlpha:.5,clsOverlay:"global-overlay"})},close:function(e){S.dialog.close(e)}}),expandPoint:null,duration:100,onAppBarCreate:S.noop},_setOptionsFromDOM:function(){var e=this.element,s=this.options;x.each(e.data(),function(t,n){if(t in s)try{s[t]=JSON.parse(n)}catch(e){s[t]=n}})},_create:function(){var e=this.element,t=this.options;this._createStructure(),this._createEvents(),X.exec(t.onAppBarCreate,[e]),setImmediate(function(){e.fire("appbarcreate")})},_createStructure:function(){var e,t,n=this.element,s=this.options,i=X.elementId("app-bar");if(n.addClass("app-bar"),0===(e=n.find(".hamburger")).length){e=x("
").appendTo(t),X.isValue(this.title)&&s.html(this.title),X.isValue(this.size)&&s.css({width:this.size}),X.isValue(this.cls)&&e.push(this.cls),e.push(a.clsHeadCell),s.addClass(e.join(" "))}),n=this.heads,e=0;e")).data("index",e),X.isValue(t.title)&&s.html(t.title),X.isValue(t.format)&&s.attr("data-format",t.format),X.isValue(t.name)&&s.attr("data-name",t.name),X.isValue(t.colspan)&&s.attr("colspan",t.colspan),X.isValue(l[e].size)&&s.css({width:l[e].size}),!0===t.sortable&&(n.push("sortable-column"),X.isValue(t.sortDir)&&n.push("sort-"+t.sortDir)),X.isValue(t.cls)&&n.push(t.cls),!1===X.bool(l[e].show)&&n.push("hidden"),n.push(a.clsHeadCell),X.bool(l[e].show)&&X.arrayDelete(n,"hidden"),s.addClass(n.join(" ")),r[l[e]["index-view"]]=s}),e=0;e").addClass(this.options.clsBody).insertAfter(e)},_createTableFooter:function(){var e,t,n=this.element,s=this.options,i=x("
").appendTo(e),void 0!==this.title&&t.html(this.title),void 0!==this.name&&t.addClass("foot-column-name-"+this.name),void 0!==this.cls&&t.addClass(this.cls),X.isValue(this.colspan)&&t.attr("colspan",this.colspan),t.appendTo(e)})),n.append(i)},_createTopBlock:function(){var e,t,n,s=this,i=this.element,a=this.options,o=x("
").addClass("table-top").addClass(a.clsTableTop).insertBefore(i.parent());return(e=X.isValue(this.wrapperSearch)?this.wrapperSearch:x("
").addClass("table-search-block").addClass(a.clsSearch).appendTo(o)).addClass(a.clsSearch),x("").attr("type","text").appendTo(e).input({prepend:a.tableSearchTitle}),!0!==a.showSearch&&e.hide(),(t=X.isValue(this.wrapperRows)?this.wrapperRows:x("
").addClass("table-rows-block").appendTo(o)).addClass(a.clsRowsCount),n=x("
").html(t+1),void 0!==s.service[0].clsColumn&&p.addClass(s.service[0].clsColumn),p.appendTo(u),p=x(""),f="checkbox"===a.checkType?x(""):x(""),X.isValue(c)&&Array.isArray(c)&&-1"),x("
").addClass("cell-wrapper").addClass(a.clsCellWrapper).html(this).appendTo(p)):p=x("
").html(this),p.addClass(a.clsBodyCell),X.isValue(s.heads[e].clsColumn)&&p.addClass(s.heads[e].clsColumn),!1===X.bool(d[e].show)&&p.addClass("hidden"),X.bool(d[e].show)&&p.removeClass("hidden"),g[d[e]["index-view"]]=p,X.exec(a.onDrawCell,[p,this,e,s.heads[e]],p[0])}),h=0;hthis.pagesCount))return this._draw(),this;this.currentPage=this.pagesCount}},prev:function(){if(0!==this.items.length){if(this.currentPage--,0!==this.currentPage)return this._draw(),this;this.currentPage=1}},first:function(){if(0!==this.items.length)return this.currentPage=1,this._draw(),this},last:function(){if(0!==this.items.length)return this.currentPage=this.pagesCount,this._draw(),this},page:function(e){return e<=0&&(e=1),e>this.pagesCount&&(e=this.pagesCount),this.currentPage=e,this._draw(),this},addFilter:function(e,t){var n,s=null,i=X.isFunc(e);if(!1!==i){for(n=0;n").appendTo(f),v=x("
").html("").appendTo(n),x("").html(this.title).appendTo(n),x("").html("").appendTo(n),x("").html("").appendTo(n),a[s.view[e]["index-view"]]=n}),t=0;t").addClass("table-inspector")).attr("for",this.element.attr("id")),x("
"+a.inspectorTitle+"
").appendTo(e),t=x("
").addClass("table-wrap").appendTo(e),n=x("").addClass("table subcompact"),s=x("").appendTo(n),n.appendTo(t),this._createInspectorItems(s),i=x("
").appendTo(e),x("
").addClass(a.clsHeadRow).appendTo(o),x.each(this.service,function(){var e=[];s=x("").addClass(s.clsFooter);n.find("tfoot").remove(),0!==this.foots.length&&(e=x("").addClass(s.clsHeadRow).appendTo(i),x.each(this.foots,function(){t=x("").addClass(a.clsBodyRow),m=t%2==0,p=x("").appendTo(f),g=[];if("function"==typeof C.tableToCSV){for(t=X.isValue(t)?t.toLowerCase():"all-filtered",n=X.isValue(n)?n:X.elementId("table")+"-export.csv",l=x(""),o=this.heads,a=0;a"),X.isValue(this.title)&&c.html(this.title),g[u.view[e]["index-view"]]=c)}),a=0;a"),o=r[i],a=0;a").html(this),g[u.view[e]["index-view"]]=c)}),a=0;a").addClass("tab-marker").addClass(t.clsMarker).appendTo(e)),this.openTab(0===s.length?n[0]:s[0])},_createEvents:function(){var a=this,o=this.element,r=this.options,l=o.find("li");o.on(S.events.click,"li",function(e){var t=x(this),n=o.find("li.active"),s=l.index(t)>l.index(n),i=t.children("a").attr("href");if(X.isValue(i)&&"#"===i[0]){if(t.hasClass("active"))return;if(t.hasClass("disabled"))return;if(!1===X.exec(r.onBeforeTabOpen,[t,i,s],this))return;if(!X.isValue(i))return;a.openTab(t,s),e.preventDefault()}});x("html").hasClass("metro-touch-device")||x(o).mousewheel(function(e,t,n,s){var i=t*METRO_SCROLL_MULTIPLE;return o.scrollLeft(o.scrollLeft()-i),!1})},openTab:function(e,t){var n,s,i,a,o=this.element,r=this.options,l=o.find("li"),c=o.scrollLeft(),d=o.width();X.isJQueryObject(e)||(e=x(e)),x.each(l,function(){var e=x(this).find("a").attr("href");X.isValue(e)&&"#"!==e.trim()&&0").addClass("tabs tabs-wrapper");if(X.isValue(n.attr("id"))||n.attr("id",X.elementId("tabs")),o.addClass(s.tabsPosition.replace(["-","_","+"]," ")),n.addClass("tabs-list"),"default"!==s.tabsType&&n.addClass("tabs-"+s.tabsType),a||(o.insertBefore(n),n.appendTo(o)),n.data("expanded",!1),e=x("
").addClass("expand-title"),o.prepend(e),0===(t=o.find(".hamburger")).length){t=x("
"},embedUrl:function(e){return-1!==e.indexOf("youtu.be")&&(e="https://www.youtube.com/embed/"+e.split("/").pop()),"
"},secondsToTime:function(e){var t=e%3600,n=t%60;return{h:Math.floor(e/3600),m:Math.floor(t/60),s:Math.ceil(n)}},hex2rgba:function(e,t){var n;if(t=isNaN(t)?1:t,/^#([A-Fa-f0-9]{3}){1,2}$/.test(e))return 3===(n=e.substring(1).split("")).length&&(n=[n[0],n[0],n[1],n[1],n[2],n[2]]),"rgba("+[(n="0x"+n.join(""))>>16&255,n>>8&255,255&n].join(",")+","+t+")";throw new Error("Hex2rgba error. Bad Hex value")},random:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},uniqueId:function(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})},elementId:function(e){return e+"-"+(new Date).getTime()+X.random(1,1e3)},secondsToFormattedString:function(e){var t=parseInt(e,10),n=Math.floor(t/3600),s=Math.floor((t-3600*n)/60),i=t-3600*n-60*s;return n<10&&(n="0"+n),s<10&&(s="0"+s),i<10&&(i="0"+i),[n,s,i].join(":")},callback:function(e,t,n){return X.exec(e,t,n)},func:function(e){return new Function("a",e)},exec:function(e,t,n){var s;if(null==e)return!1;var i=X.isFunc(e);!1===i&&(i=X.func(e));try{s=i.apply(n,t)}catch(e){if(!(s=null)===METRO_THROWS)throw e}return s},isOutsider:function(e){var t,n=(e=X.isJQueryObject(e)?e:x(e)).clone();return n.removeAttr("data-role").css({visibility:"hidden",position:"absolute",display:"block"}),e.parent().append(n),t=n[0].getBoundingClientRect(),n.remove(),0<=t.top&&0<=t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},inViewport:function(e){var t=X.rect(e);return 0<=t.top&&0<=t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},rect:function(e){return"function"==typeof s&&e instanceof s&&(e=e[0]),e.getBoundingClientRect()},getCursorPosition:function(e,t){var n=X.rect(e);return{x:X.pageXY(t).x-n.left-window.pageXOffset,y:X.pageXY(t).y-n.top-window.pageYOffset}},getCursorPositionX:function(e,t){return X.getCursorPosition(e,t).x},getCursorPositionY:function(e,t){return X.getCursorPosition(e,t).y},objectLength:function(e){return Object.keys(e).length},percent:function(e,t,n){if(0===e)return 0;var s=100*t/e;return!0===n?Math.round(s):Math.round(100*s)/100},camelCase:function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},dashedName:function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})},objectShift:function(e){var t=0;return x.each(e,function(e){0===t?t=e:e>16&255,t>>8&255,255&t]):[0,0,0]},hexColorToRgbA:function(e,t){var n;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)?(3===(n=e.substring(1).split("")).length&&(n=[n[0],n[0],n[1],n[1],n[2],n[2]]),"rgba("+[(n="0x"+n.join(""))>>16&255,n>>8&255,255&n,t||1].join(",")+")"):"rgba(0,0,0,1)"},getInlineStyles:function(e){var t={};X.isJQueryObject(e)&&(e=e[0]);for(var n=0,s=e.style.length;n").addClass("circle").appendTo(n)}();break;case"square":!function(){for(e=0;e<4;e++)x("
").addClass("square").appendTo(n)}();break;case"cycle":x("
").addClass("cycle").appendTo(n);break;case"simple":x('').appendTo(n);break;default:!function(){for(e=0;e<5;e++)t=x("
").addClass("wrap").appendTo(n),x("
").addClass("circle").appendTo(t)}()}X.exec(this.options.onActivityCreate,[this.element]),setImmediate(function(){n.fire("activitycreate")})},changeAttribute:function(e){},destroy:function(){var e=this.element,t=this.options;e.html("").removeClass(t.style+"-style").removeClass("activity-"+t.type)}};S.plugin("activity",Z);var Q={init:function(e,t){return this.options=x.extend({},this.options,e),this.elem=t,this.element=x(t),this._setOptionsFromDOM(),this._create(),this},options:{expand:!(S.activity={open:function(e){var t='
',n=e.text?'
'+e.text+"
":"";return S.dialog.create({content:t+n,defaultAction:!1,clsContent:"d-flex flex-column flex-justify-center flex-align-center bg-transparent no-shadow w-auto",clsDialog:"no-border no-shadow bg-transparent global-dialog",autoHide:e.autoHide?e.autoHide:0,overlayClickClose:!0===e.overlayClickClose,overlayColor:e.overlayColor?e.overlayColor:"#000000",overlayAlpha:e.overlayAlpha?e.overlayAlpha:.5,clsOverlay:"global-overlay"})},close:function(e){S.dialog.close(e)}}),expandPoint:null,duration:100,onAppBarCreate:S.noop},_setOptionsFromDOM:function(){var e=this.element,s=this.options;x.each(e.data(),function(t,n){if(t in s)try{s[t]=JSON.parse(n)}catch(e){s[t]=n}})},_create:function(){var e=this.element,t=this.options;this._createStructure(),this._createEvents(),X.exec(t.onAppBarCreate,[e]),setImmediate(function(){e.fire("appbarcreate")})},_createStructure:function(){var e,t,n=this.element,s=this.options,i=X.elementId("app-bar");if(n.addClass("app-bar"),0===(e=n.find(".hamburger")).length){e=x("
").appendTo(t),X.isValue(this.title)&&s.html(this.title),X.isValue(this.size)&&s.css({width:this.size}),X.isValue(this.cls)&&e.push(this.cls),e.push(a.clsHeadCell),s.addClass(e.join(" "))}),n=this.heads,e=0;e")).data("index",e),X.isValue(t.title)&&s.html(t.title),X.isValue(t.format)&&s.attr("data-format",t.format),X.isValue(t.name)&&s.attr("data-name",t.name),X.isValue(t.colspan)&&s.attr("colspan",t.colspan),X.isValue(l[e].size)&&s.css({width:l[e].size}),!0===t.sortable&&(n.push("sortable-column"),X.isValue(t.sortDir)&&n.push("sort-"+t.sortDir)),X.isValue(t.cls)&&n.push(t.cls),!1===X.bool(l[e].show)&&n.push("hidden"),n.push(a.clsHeadCell),X.bool(l[e].show)&&X.arrayDelete(n,"hidden"),s.addClass(n.join(" ")),r[l[e]["index-view"]]=s}),e=0;e").addClass(this.options.clsBody).insertAfter(e)},_createTableFooter:function(){var e,t,n=this.element,s=this.options,i=x("
").appendTo(e),void 0!==this.title&&t.html(this.title),void 0!==this.name&&t.addClass("foot-column-name-"+this.name),void 0!==this.cls&&t.addClass(this.cls),X.isValue(this.colspan)&&t.attr("colspan",this.colspan),t.appendTo(e)})),n.append(i)},_createTopBlock:function(){var e,t,n,s=this,i=this.element,a=this.options,o=x("
").addClass("table-top").addClass(a.clsTableTop).insertBefore(i.parent());return(e=X.isValue(this.wrapperSearch)?this.wrapperSearch:x("
").addClass("table-search-block").addClass(a.clsSearch).appendTo(o)).addClass(a.clsSearch),x("").attr("type","text").appendTo(e).input({prepend:a.tableSearchTitle}),!0!==a.showSearch&&e.hide(),(t=X.isValue(this.wrapperRows)?this.wrapperRows:x("
").addClass("table-rows-block").appendTo(o)).addClass(a.clsRowsCount),n=x("
").html(t+1),void 0!==s.service[0].clsColumn&&p.addClass(s.service[0].clsColumn),p.appendTo(u),p=x(""),f="checkbox"===a.checkType?x(""):x(""),X.isValue(c)&&Array.isArray(c)&&-1"),x("
").addClass("cell-wrapper").addClass(a.clsCellWrapper).html(this).appendTo(p)):p=x("
").html(this),p.addClass(a.clsBodyCell),X.isValue(s.heads[e].clsColumn)&&p.addClass(s.heads[e].clsColumn),!1===X.bool(d[e].show)&&p.addClass("hidden"),X.bool(d[e].show)&&p.removeClass("hidden"),g[d[e]["index-view"]]=p,X.exec(a.onDrawCell,[p,this,e,s.heads[e]],p[0])}),h=0;hthis.pagesCount))return this._draw(),this;this.currentPage=this.pagesCount}},prev:function(){if(0!==this.items.length){if(this.currentPage--,0!==this.currentPage)return this._draw(),this;this.currentPage=1}},first:function(){if(0!==this.items.length)return this.currentPage=1,this._draw(),this},last:function(){if(0!==this.items.length)return this.currentPage=this.pagesCount,this._draw(),this},page:function(e){return e<=0&&(e=1),e>this.pagesCount&&(e=this.pagesCount),this.currentPage=e,this._draw(),this},addFilter:function(e,t){var n,s=null,i=X.isFunc(e);if(!1!==i){for(n=0;n").appendTo(f),v=x("
").html("").appendTo(n),x("").html(this.title).appendTo(n),x("").html("").appendTo(n),x("").html("").appendTo(n),a[s.view[e]["index-view"]]=n}),t=0;t").addClass("table-inspector")).attr("for",this.element.attr("id")),x("
"+a.inspectorTitle+"
").appendTo(e),t=x("
").addClass("table-wrap").appendTo(e),n=x("").addClass("table subcompact"),s=x("").appendTo(n),n.appendTo(t),this._createInspectorItems(s),i=x("
").appendTo(e),x("
").addClass(a.clsHeadRow).appendTo(o),x.each(this.service,function(){var e=[];s=x("").addClass(s.clsFooter);n.find("tfoot").remove(),0!==this.foots.length&&(e=x("").addClass(s.clsHeadRow).appendTo(i),x.each(this.foots,function(){t=x("").addClass(a.clsBodyRow),m=t%2==0,p=x("").appendTo(f),g=[];if("function"==typeof C.tableToCSV){for(t=X.isValue(t)?t.toLowerCase():"all-filtered",n=X.isValue(n)?n:X.elementId("table")+"-export.csv",l=x(""),o=this.heads,a=0;a"),X.isValue(this.title)&&c.html(this.title),g[u.view[e]["index-view"]]=c)}),a=0;a"),o=r[i],a=0;a").html(this),g[u.view[e]["index-view"]]=c)}),a=0;a").addClass("tab-marker").addClass(t.clsMarker).appendTo(e)),this.openTab(0===s.length?n[0]:s[0])},_createEvents:function(){var a=this,o=this.element,r=this.options,l=o.find("li");o.on(S.events.click,"li",function(e){var t=x(this),n=o.find("li.active"),s=l.index(t)>l.index(n),i=t.children("a").attr("href");if(X.isValue(i)&&"#"===i[0]){if(t.hasClass("active"))return;if(t.hasClass("disabled"))return;if(!1===X.exec(r.onBeforeTabOpen,[t,i,s],this))return;if(!X.isValue(i))return;a.openTab(t,s),e.preventDefault()}});x("html").hasClass("metro-touch-device")||x(o).mousewheel(function(e,t,n,s){var i=t*METRO_SCROLL_MULTIPLE;return o.scrollLeft(o.scrollLeft()-i),!1})},openTab:function(e,t){var n,s,i,a,o=this.element,r=this.options,l=o.find("li"),c=o.scrollLeft(),d=o.width();X.isJQueryObject(e)||(e=x(e)),x.each(l,function(){var e=x(this).find("a").attr("href");X.isValue(e)&&"#"!==e.trim()&&0").addClass("tabs tabs-wrapper");if(X.isValue(n.attr("id"))||n.attr("id",X.elementId("tabs")),o.addClass(s.tabsPosition.replace(["-","_","+"]," ")),n.addClass("tabs-list"),"default"!==s.tabsType&&n.addClass("tabs-"+s.tabsType),a||(o.insertBefore(n),n.appendTo(o)),n.data("expanded",!1),e=x("
").addClass("expand-title"),o.prepend(e),0===(t=o.find(".hamburger")).length){t=x("
").appendTo(t),X.isValue(this.title)&&s.html(this.title),X.isValue(this.size)&&s.css({width:this.size}),X.isValue(this.cls)&&e.push(this.cls),e.push(a.clsHeadCell),s.addClass(e.join(" "))}),n=this.heads,e=0;e")).data("index",e),X.isValue(t.title)&&s.html(t.title),X.isValue(t.format)&&s.attr("data-format",t.format),X.isValue(t.name)&&s.attr("data-name",t.name),X.isValue(t.colspan)&&s.attr("colspan",t.colspan),X.isValue(l[e].size)&&s.css({width:l[e].size}),!0===t.sortable&&(n.push("sortable-column"),X.isValue(t.sortDir)&&n.push("sort-"+t.sortDir)),X.isValue(t.cls)&&n.push(t.cls),!1===X.bool(l[e].show)&&n.push("hidden"),n.push(a.clsHeadCell),X.bool(l[e].show)&&X.arrayDelete(n,"hidden"),s.addClass(n.join(" ")),r[l[e]["index-view"]]=s}),e=0;e").addClass(this.options.clsBody).insertAfter(e)},_createTableFooter:function(){var e,t,n=this.element,s=this.options,i=x("
").appendTo(e),void 0!==this.title&&t.html(this.title),void 0!==this.name&&t.addClass("foot-column-name-"+this.name),void 0!==this.cls&&t.addClass(this.cls),X.isValue(this.colspan)&&t.attr("colspan",this.colspan),t.appendTo(e)})),n.append(i)},_createTopBlock:function(){var e,t,n,s=this,i=this.element,a=this.options,o=x("
").addClass("table-top").addClass(a.clsTableTop).insertBefore(i.parent());return(e=X.isValue(this.wrapperSearch)?this.wrapperSearch:x("
").addClass("table-search-block").addClass(a.clsSearch).appendTo(o)).addClass(a.clsSearch),x("").attr("type","text").appendTo(e).input({prepend:a.tableSearchTitle}),!0!==a.showSearch&&e.hide(),(t=X.isValue(this.wrapperRows)?this.wrapperRows:x("
").addClass("table-rows-block").appendTo(o)).addClass(a.clsRowsCount),n=x("
").html(t+1),void 0!==s.service[0].clsColumn&&p.addClass(s.service[0].clsColumn),p.appendTo(u),p=x(""),f="checkbox"===a.checkType?x(""):x(""),X.isValue(c)&&Array.isArray(c)&&-1"),x("
").addClass("cell-wrapper").addClass(a.clsCellWrapper).html(this).appendTo(p)):p=x("
").html(this),p.addClass(a.clsBodyCell),X.isValue(s.heads[e].clsColumn)&&p.addClass(s.heads[e].clsColumn),!1===X.bool(d[e].show)&&p.addClass("hidden"),X.bool(d[e].show)&&p.removeClass("hidden"),g[d[e]["index-view"]]=p,X.exec(a.onDrawCell,[p,this,e,s.heads[e]],p[0])}),h=0;hthis.pagesCount))return this._draw(),this;this.currentPage=this.pagesCount}},prev:function(){if(0!==this.items.length){if(this.currentPage--,0!==this.currentPage)return this._draw(),this;this.currentPage=1}},first:function(){if(0!==this.items.length)return this.currentPage=1,this._draw(),this},last:function(){if(0!==this.items.length)return this.currentPage=this.pagesCount,this._draw(),this},page:function(e){return e<=0&&(e=1),e>this.pagesCount&&(e=this.pagesCount),this.currentPage=e,this._draw(),this},addFilter:function(e,t){var n,s=null,i=X.isFunc(e);if(!1!==i){for(n=0;n").appendTo(f),v=x("