[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.135.220.239: ~ $
"use strict";function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.In order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _createForOfIteratorHelper(t,e){var n,a,o,r,i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return o=!(a=!0),{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){o=!0,n=t},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw n}}};if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length)return i&&(t=i),r=0,{s:e=function(){},n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.In order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ownKeys(e,t){var n,a=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,n)),a}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t)}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.In order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){var n;if(t)return"string"==typeof t?_arrayLikeToArray(t,e):"Map"===(n="Object"===(n={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function _iterableToArrayLimit(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var a,o,r,i,s=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(s.push(a.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _callSuper(t,e,n){return e=_getPrototypeOf(e),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(e,n||[],_getPrototypeOf(t).constructor):e.apply(t,n))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _superPropGet(t,e,n,a){var o=_get(_getPrototypeOf(1&a?t.prototype:t),e,n);return 2&a&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function _get(){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var a=_superPropBase(t,e);if(a)return(a=Object.getOwnPropertyDescriptor(a,e)).get?a.get.call(arguments.length<3?t:n):a.value}).apply(null,arguments)}function _superPropBase(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){t=_toPrimitive(t,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _typeof(t){return(_typeof="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)}jQuery(document).ready(function(e){function Q(t){var e,n=t.canvas.parentNode.querySelector("div");return n||((n=document.createElement("div")).classList.add("wps-chart-tooltip"),n.style.opacity=1,n.style.pointerEvents="none",n.style.position="absolute",n.style.transition="all .1s ease",(e=document.createElement("table")).style.margin="0px",n.appendChild(e),t.canvas.parentNode.appendChild(n)),n}s=function(l){function n(t){return c.hasOwnProperty(t)&&0<c[t].length||d.hasOwnProperty(t)}var c={},d={};l.ajaxq=function(e,n){if(void 0===n)throw"AjaxQ: queue name is not provided";var a=l.Deferred(),t=a.promise(),o=(t.success=t.done,t.error=t.fail,t.complete=t.always,"function"==typeof n),r=o?null:l.extend(!0,{},n),i=function(){var t;return(t=l.ajax.apply(window,[o?n():r])).done(function(){a.resolve.apply(this,arguments)}),t.fail(function(){a.reject.apply(this,arguments)}),t.always(s),t};return c[e]?c[e].push(i):(c[e]=[],i=i(),d[e]=i),t;function s(){var t;c[e]&&((t=c[e].shift())?(t=t(),d[e]=t):(delete c[e],delete d[e]))}},l.each(["getq","postq"],function(t,r){l[r]=function(t,e,n,a,o){return l.isFunction(n)&&(o=o||a,a=n,n=void 0),l.ajaxq(t,{type:"postq"===r?"post":"get",url:e,data:n,success:a,dataType:o})}}),l.ajaxq.isRunning=function(t){if(t)return n(t);for(var e in c)if(n(e))return!0;return!1},l.ajaxq.getActiveRequest=function(t){if(t)return d[t];throw"AjaxQ: queue name is required"},l.ajaxq.abort=function(t){if(!t)throw"AjaxQ: queue name is required";var e=l.ajaxq.getActiveRequest(t);delete c[t],delete d[t],e&&e.abort()},l.ajaxq.clear=function(t){if(t)c[t]&&(c[t]=[]);else for(var e in c)c.hasOwnProperty(e)&&(c[e]=[])}},"function"==typeof define&&define.amd?define(["jquery"],s):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=s(require("jquery")):s(jQuery),s=this,t=function(Q){function T(t){return null===t||!0===t||!1===t?NaN:(t=Number(t),isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t))}function M(t,e){if(e.length<t)throw new TypeError(t+" argument"+(1<t?"s":"")+" required, but only "+e.length+" present")}function S(t){M(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==_typeof(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function a(t,e){return M(2,arguments),t=S(t),e=T(e),isNaN(e)?new Date(NaN):(e&&t.setDate(t.getDate()+e),t)}function o(t,e){M(2,arguments);var n,a,t=S(t),e=T(e);return isNaN(e)?new Date(NaN):e?(n=t.getDate(),(a=new Date(t.getTime())).setMonth(t.getMonth()+e+1,0),a.getDate()<=n?a:(t.setFullYear(a.getFullYear(),a.getMonth(),n),t)):t}function r(t,e){return M(2,arguments),t=S(t).getTime(),e=T(e),new Date(t+e)}function i(t,e){M(1,arguments);var e=e||{},n=null==(n=(n=e.locale)&&n.options&&n.options.weekStartsOn)?0:T(n);if(0<=(n=null==e.weekStartsOn?n:T(e.weekStartsOn))&&n<=6)return t=((t=(e=S(t)).getDay())<n?7:0)+t-n,e.setDate(e.getDate()-t),e.setHours(0,0,0,0),e;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}function Y(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function s(t){return M(1,arguments),(t=S(t)).setHours(0,0,0,0),t}function l(t,e){return M(2,arguments),t=S(t),e=S(e),(t=t.getTime()-e.getTime())<0?-1:0<t?1:t}function d(t){return M(1,arguments),t=S(t),!isNaN(t)}function c(t,e){return(t=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds())<0?-1:0<t?1:t}function u(t,e){M(2,arguments);var t=S(t),e=S(e),n=c(t,e),a=Math.abs(function(t,e){return M(2,arguments),t=s(t),e=s(e),t=t.getTime()-Y(t),e=e.getTime()-Y(e),Math.round((t-e)/864e5)}(t,e));return t.setDate(t.getDate()-n*a),0==(a=n*(a-(c(t,e)===-n)))?0:a}function p(t,e){return M(2,arguments),t=S(t),e=S(e),t.getTime()-e.getTime()}function _(t){return M(1,arguments),(t=S(t)).setHours(23,59,59,999),t}function f(t){M(1,arguments);var t=S(t),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function h(t,e){M(2,arguments);var n=S(t),e=S(e),a=l(n,e),o=Math.abs(function(t,e){return M(2,arguments),t=S(t),e=S(e),12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth())}(n,e));return 0==(a=o<1?0:(1===n.getMonth()&&27<n.getDate()&&n.setDate(30),n.setMonth(n.getMonth()-a*o),n=l(n,e)===-a,a*(o-(n=(!function(t){return M(1,arguments),_(t=S(t)).getTime()===f(t).getTime()}(S(t))||1!==o||1!==l(t,e))&&n))))?0:a}var g={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function t(e){return function(t){return t=(t=t||{}).width?String(t.width):e.defaultWidth,e.formats[t]||e.formats[e.defaultWidth]}}var A={date:t({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:t({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:t({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},I={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function e(o){return function(t,e){var n,a;return("formatting"===((e=e||{}).context?String(e.context):"standalone")&&o.formattingValues?(a=o.defaultFormattingWidth||o.defaultWidth,n=e.width?String(e.width):a,o.formattingValues[n]||o.formattingValues[a]):(n=o.defaultWidth,a=e.width?String(e.width):o.defaultWidth,o.values[a]||o.values[n]))[o.argumentCallback?o.argumentCallback(t):t]}}function n(r){return function(t,e){var a,t=String(t),n=(e=e||{}).width,o=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth];return(o=t.match(o))?(a=o[0],o=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],n=("[object Array]"===Object.prototype.toString.call(o)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}:function(t){for(var e in t)if(t.hasOwnProperty(e)&&(n=t[e],n.test(a)))return e;var n})(o),n=r.valueCallback?r.valueCallback(n):n,{value:e.valueCallback?e.valueCallback(n):n,rest:t.slice(a.length)}):null}}var m,z={code:"en-US",formatDistance:function(t,e,n){return n=n||{},t="string"==typeof g[t]?g[t]:1===e?g[t].one:g[t].other.replace("{{count}}",e),n.addSuffix?0<n.comparison?"in "+t:t+" ago":t},formatLong:A,formatRelative:function(t,e,n,a){return I[t]},localize:{ordinalNumber:function(t,e){var n=Number(t);if(20<(t=n%100)||t<10)switch(t%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:e({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:e({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:e({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:e({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:e({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(m={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n,e=e||{},a=(t=String(t)).match(m.matchPattern);return a&&(a=a[0],n=t.match(m.parsePattern))?(n=m.valueCallback?m.valueCallback(n[0]):n[0],{value:n=e.valueCallback?e.valueCallback(n):n,rest:t.slice(a.length)}):null}),era:n({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:n({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:n({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:n({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:n({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function B(t,e){return M(2,arguments),r(t,-T(e))}function w(t,e){for(var n=t<0?"-":"",a=Math.abs(t).toString();a.length<e;)a="0"+a;return n+a}function y(t){M(1,arguments);var t=S(t),e=((e=t.getUTCDay())<1?7:0)+e-1;return t.setUTCDate(t.getUTCDate()-e),t.setUTCHours(0,0,0,0),t}function $(t){M(1,arguments);var t=S(t),e=t.getUTCFullYear(),n=((n=new Date(0)).setUTCFullYear(e+1,0,4),n.setUTCHours(0,0,0,0),y(n)),a=((a=new Date(0)).setUTCFullYear(e,0,4),a.setUTCHours(0,0,0,0),y(a));return t.getTime()>=n.getTime()?e+1:t.getTime()>=a.getTime()?e:e-1}function U(t){return M(1,arguments),t=y(t=S(t)).getTime()-function(t){M(1,arguments);var t=$(t),e=new Date(0);return e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0),y(e)}(t).getTime(),Math.round(t/6048e5)+1}function b(t,e){M(1,arguments);var e=e||{},n=null==(n=(n=e.locale)&&n.options&&n.options.weekStartsOn)?0:T(n);if(0<=(n=null==e.weekStartsOn?n:T(e.weekStartsOn))&&n<=6)return t=((t=(e=S(t)).getUTCDay())<n?7:0)+t-n,e.setUTCDate(e.getUTCDate()-t),e.setUTCHours(0,0,0,0),e;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}function v(t,e){M(1,arguments);var n,t=S(t,e),a=t.getUTCFullYear(),o=e||{},r=null==(r=(r=o.locale)&&r.options&&r.options.firstWeekContainsDate)?1:T(r);if(1<=(r=null==o.firstWeekContainsDate?r:T(o.firstWeekContainsDate))&&r<=7)return(o=new Date(0)).setUTCFullYear(a+1,0,r),o.setUTCHours(0,0,0,0),o=b(o,e),(n=new Date(0)).setUTCFullYear(a,0,r),n.setUTCHours(0,0,0,0),r=b(n,e),t.getTime()>=o.getTime()?a+1:t.getTime()>=r.getTime()?a:a-1;throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}function R(t,e){return M(1,arguments),t=b(t=S(t),e).getTime()-function(t,e){M(1,arguments);var n=null==(n=(n=(a=e||{}).locale)&&n.options&&n.options.firstWeekContainsDate)?1:T(n),n=null==a.firstWeekContainsDate?n:T(a.firstWeekContainsDate),a=v(t,e),t=new Date(0);return t.setUTCFullYear(a,0,n),t.setUTCHours(0,0,0,0),b(t,e)}(t,e).getTime(),Math.round(t/6048e5)+1}function W(t,e){var n=0<t?"-":"+",t=Math.abs(t),a=Math.floor(t/60);return 0==(t=t%60)?n+String(a):(e=e||"",n+String(a)+e+w(t,2))}function N(t,e){return t%60==0?(0<t?"-":"+")+w(Math.abs(t)/60,2):x(t,e)}function x(t,e){var e=e||"",n=0<t?"-":"+",t=Math.abs(t);return n+w(Math.floor(t/60),2)+e+w(t%60,2)}var H={G:function(t,e,n){var a=0<t.getUTCFullYear()?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});default:return n.era(a,{width:"wide"})}},y:function(t,e,n){var a;return"yo"===e?(a=t.getUTCFullYear(),n.ordinalNumber(0<a?a:1-a,{unit:"year"})):(n=e,a=0<(a=(a=t).getUTCFullYear())?a:1-a,w("yy"===n?a%100:a,n.length))},Y:function(t,e,n,a){return a=0<(t=v(t,a))?t:1-t,"YY"===e?w(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):w(a,e.length)},R:function(t,e){return w($(t),e.length)},u:function(t,e){return w(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(a);case"QQ":return w(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,e,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(a);case"qq":return w(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,e,n){var a,o,r=t.getUTCMonth();switch(e){case"M":case"MM":return o=e,a=(a=t).getUTCMonth(),"M"===o?String(a+1):w(a+1,2);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var a=t.getUTCMonth();switch(e){case"L":return String(a+1);case"LL":return w(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,e,n,a){return t=R(t,a),"wo"===e?n.ordinalNumber(t,{unit:"week"}):w(t,e.length)},I:function(t,e,n){return t=U(t),"Io"===e?n.ordinalNumber(t,{unit:"week"}):w(t,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):(n=e,w(t.getUTCDate(),n.length))},D:function(t,e,n){return t=function(t){M(1,arguments);var t=S(t),e=t.getTime(),t=(t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t.getTime());return Math.floor((e-t)/864e5)+1}(t),"Do"===e?n.ordinalNumber(t,{unit:"dayOfYear"}):w(t,e.length)},E:function(t,e,n){var a=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,e,n,a){var o=t.getUTCDay(),r=(o-a.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return w(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,n,a){var o=t.getUTCDay(),r=(o-a.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return w(r,e.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,n){var a=t.getUTCDay(),o=0===a?7:a;switch(e){case"i":return String(o);case"ii":return w(o,e.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,e,n){var a=1<=t.getUTCHours()/12?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){var a=12===(t=t.getUTCHours())?"noon":0===t?"midnight":1<=t/12?"pm":"am";switch(e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){var a=17<=(t=t.getUTCHours())?"evening":12<=t?"afternoon":4<=t?"morning":"night";switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){var a;return"ho"===e?(a=t.getUTCHours()%12,n.ordinalNumber(0==a?12:a,{unit:"hour"})):(n=e,w(t.getUTCHours()%12||12,n.length))},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):(n=e,w(t.getUTCHours(),n.length))},K:function(t,e,n){return t=t.getUTCHours()%12,"Ko"===e?n.ordinalNumber(t,{unit:"hour"}):w(t,e.length)},k:function(t,e,n){return 0===(t=t.getUTCHours())&&(t=24),"ko"===e?n.ordinalNumber(t,{unit:"hour"}):w(t,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):(n=e,w(t.getUTCMinutes(),n.length))},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):(n=e,w(t.getUTCSeconds(),n.length))},S:function(t,e){return n=t,a=(e=e).length,n=t.getUTCMilliseconds(),w(Math.floor(n*Math.pow(10,a-3)),e.length);var n,a},X:function(t,e,n,a){var o=(a._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return N(o);case"XXXX":case"XX":return x(o);default:return x(o,":")}},x:function(t,e,n,a){var o=(a._originalDate||t).getTimezoneOffset();switch(e){case"x":return N(o);case"xxxx":case"xx":return x(o);default:return x(o,":")}},O:function(t,e,n,a){var o=(a._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+W(o,":");default:return"GMT"+x(o,":")}},z:function(t,e,n,a){var o=(a._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+W(o,":");default:return"GMT"+x(o,":")}},t:function(t,e,n,a){return a=a._originalDate||t,w(Math.floor(a.getTime()/1e3),e.length)},T:function(t,e,n,a){return w((a._originalDate||t).getTime(),e.length)}};function F(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}}function G(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}}var X={p:G,P:function(t,e){var n,a=t.match(/(P+)(p+)?/),o=a[1];if(!(a=a[2]))return F(t,e);switch(o){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",F(o,e)).replace("{{time}}",G(a,e))}},V=["D","DD"],K=["YY","YYYY"];function Z(t){return-1!==V.indexOf(t)}function J(t){return-1!==K.indexOf(t)}function P(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var tt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,et=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nt=/^'([^]*?)'?$/,at=/''/g,ot=/[a-zA-Z]/;function k(t,e,n){M(2,arguments);var n=n||{},a=null==(a=(a=n.locale)&&a.options&&a.options.weekStartsOn)?0:T(a);if(0<=(a=null==n.weekStartsOn?a:T(n.weekStartsOn))&&a<=6)return n=S(t),e=((7+(t=T(e))%7)%7<a?7:0)+t-n.getUTCDay(),n.setUTCDate(n.getUTCDate()+e),n;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}var rt=/^(1[0-2]|0?\d)/,it=/^(3[0-1]|[0-2]?\d)/,st=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,lt=/^(5[0-3]|[0-4]?\d)/,ct=/^(2[0-3]|[0-1]?\d)/,dt=/^(2[0-4]|[0-1]?\d)/,ut=/^(1[0-1]|0?\d)/,pt=/^(1[0-2]|0?\d)/,_t=/^[0-5]?\d/,ft=/^[0-5]?\d/,ht=/^\d/,gt=/^\d{1,2}/,mt=/^\d{1,3}/,wt=/^\d{1,4}/,yt=/^-?\d+/,bt=/^-?\d/,vt=/^-?\d{1,2}/,xt=/^-?\d{1,3}/,kt=/^-?\d{1,4}/,Ct=/^([+-])(\d{2})(\d{2})?|Z/,Et=/^([+-])(\d{2})(\d{2})|Z/,jt=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Dt=/^([+-])(\d{2}):(\d{2})|Z/,Tt=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function C(t,e,n){var a;return(t=e.match(t))?(a=parseInt(t[0],10),{value:n?n(a):a,rest:e.slice(t[0].length)}):null}function E(t,e){return(t=e.match(t))?"Z"===t[0]?{value:0,rest:e.slice(1)}:{value:("+"===t[1]?1:-1)*(36e5*(t[2]?parseInt(t[2],10):0)+6e4*(t[3]?parseInt(t[3],10):0)+1e3*(t[5]?parseInt(t[5],10):0)),rest:e.slice(t[0].length)}:null}function Mt(t,e){return C(yt,t,e)}function j(t,e,n){switch(t){case 1:return C(ht,e,n);case 2:return C(gt,e,n);case 3:return C(mt,e,n);case 4:return C(wt,e,n);default:return C(new RegExp("^\\d{1,"+t+"}"),e,n)}}function St(t,e,n){switch(t){case 1:return C(bt,e,n);case 2:return C(vt,e,n);case 3:return C(xt,e,n);case 4:return C(kt,e,n);default:return C(new RegExp("^-?\\d{1,"+t+"}"),e,n)}}function D(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Yt(t,e){var n=0<e;return e=(e=n?e:1-e)<=50?t||100:(e+=50,t+100*Math.floor(e/100)-(e%100<=t?100:0)),n?e:1-e}var Pt=[31,28,31,30,31,30,31,31,30,31,30,31],Ot=[31,29,31,30,31,30,31,31,30,31,30,31];function Lt(t){return t%400==0||t%4==0&&t%100!=0}var qt={G:{priority:140,parse:function(t,e,n,a){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}},set:function(t,e,n,a){return e.era=n,t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(t,e,n,a){function o(t){return{year:t,isTwoDigitYear:"yy"===e}}switch(e){case"y":return j(4,t,o);case"yo":return n.ordinalNumber(t,{unit:"year",valueCallback:o});default:return j(e.length,t,o)}},validate:function(t,e,n){return e.isTwoDigitYear||0<e.year},set:function(t,e,n,a){var o=t.getUTCFullYear();return o=n.isTwoDigitYear?Yt(n.year,o):"era"in e&&1!==e.era?1-n.year:n.year,t.setUTCFullYear(o,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(t,e,n,a){function o(t){return{year:t,isTwoDigitYear:"YY"===e}}switch(e){case"Y":return j(4,t,o);case"Yo":return n.ordinalNumber(t,{unit:"year",valueCallback:o});default:return j(e.length,t,o)}},validate:function(t,e,n){return e.isTwoDigitYear||0<e.year},set:function(t,e,n,a){var o=v(t,a);return o=n.isTwoDigitYear?Yt(n.year,o):"era"in e&&1!==e.era?1-n.year:n.year,t.setUTCFullYear(o,0,a.firstWeekContainsDate),t.setUTCHours(0,0,0,0),b(t,a)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(t,e,n,a){return St("R"===e?4:e.length,t)},set:function(t,e,n,a){var o=new Date(0);return o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0),y(o)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(t,e,n,a){return St("u"===e?4:e.length,t)},set:function(t,e,n,a){return t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(t,e,n,a){switch(e){case"Q":case"QQ":return j(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return 1<=e&&e<=4},set:function(t,e,n,a){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(t,e,n,a){switch(e){case"q":case"qq":return j(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return 1<=e&&e<=4},set:function(t,e,n,a){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(t,e,n,a){function o(t){return t-1}switch(e){case"M":return C(rt,t,o);case"MM":return j(2,t,o);case"Mo":return n.ordinalNumber(t,{unit:"month",valueCallback:o});case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return 0<=e&&e<=11},set:function(t,e,n,a){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(t,e,n,a){function o(t){return t-1}switch(e){case"L":return C(rt,t,o);case"LL":return j(2,t,o);case"Lo":return n.ordinalNumber(t,{unit:"month",valueCallback:o});case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return 0<=e&&e<=11},set:function(t,e,n,a){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(t,e,n,a){switch(e){case"w":return C(lt,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return j(e.length,t)}},validate:function(t,e,n){return 1<=e&&e<=53},set:function(t,e,n,a){return b(function(t,e,n){return M(2,arguments),t=S(t),e=T(e),n=R(t,n)-e,t.setUTCDate(t.getUTCDate()-7*n),t}(t,n,a),a)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(t,e,n,a){switch(e){case"I":return C(lt,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return j(e.length,t)}},validate:function(t,e,n){return 1<=e&&e<=53},set:function(t,e,n,a){return y(function(t,e){return M(2,arguments),t=S(t),e=T(e),e=U(t)-e,t.setUTCDate(t.getUTCDate()-7*e),t}(t,n,a),a)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(t,e,n,a){switch(e){case"d":return C(it,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return j(e.length,t)}},validate:function(t,e,n){var a=Lt(t.getUTCFullYear()),t=t.getUTCMonth();return a?1<=e&&e<=Ot[t]:1<=e&&e<=Pt[t]},set:function(t,e,n,a){return t.setUTCDate(n),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(t,e,n,a){switch(e){case"D":case"DD":return C(st,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return j(e.length,t)}},validate:function(t,e,n){return Lt(t.getUTCFullYear())?1<=e&&e<=366:1<=e&&e<=365},set:function(t,e,n,a){return t.setUTCMonth(0,n),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(t,e,n,a){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return 0<=e&&e<=6},set:function(t,e,n,a){return(t=k(t,n,a)).setUTCHours(0,0,0,0),t},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(t,e,n,a){function o(t){var e=7*Math.floor((t-1)/7);return(t+a.weekStartsOn+6)%7+e}switch(e){case"e":case"ee":return j(e.length,t,o);case"eo":return n.ordinalNumber(t,{unit:"day",valueCallback:o});case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return 0<=e&&e<=6},set:function(t,e,n,a){return(t=k(t,n,a)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(t,e,n,a){function o(t){var e=7*Math.floor((t-1)/7);return(t+a.weekStartsOn+6)%7+e}switch(e){case"c":case"cc":return j(e.length,t,o);case"co":return n.ordinalNumber(t,{unit:"day",valueCallback:o});case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return 0<=e&&e<=6},set:function(t,e,n,a){return(t=k(t,n,a)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(t,e,n,a){function o(t){return 0===t?7:t}switch(e){case"i":case"ii":return j(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return n.day(t,{width:"abbreviated",context:"formatting",valueCallback:o})||n.day(t,{width:"short",context:"formatting",valueCallback:o})||n.day(t,{width:"narrow",context:"formatting",valueCallback:o});case"iiiii":return n.day(t,{width:"narrow",context:"formatting",valueCallback:o});case"iiiiii":return n.day(t,{width:"short",context:"formatting",valueCallback:o})||n.day(t,{width:"narrow",context:"formatting",valueCallback:o});default:return n.day(t,{width:"wide",context:"formatting",valueCallback:o})||n.day(t,{width:"abbreviated",context:"formatting",valueCallback:o})||n.day(t,{width:"short",context:"formatting",valueCallback:o})||n.day(t,{width:"narrow",context:"formatting",valueCallback:o})}},validate:function(t,e,n){return 1<=e&&e<=7},set:function(t,e,n,a){return(t=function(t,e){return M(2,arguments),(e=T(e))%7==0&&(e-=7),e=((e%7+7)%7<1?7:0)+e-(t=S(t)).getUTCDay(),t.setUTCDate(t.getUTCDate()+e),t}(t,n,a)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(t,e,n,a){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n,a){return t.setUTCHours(D(n),0,0,0),t},incompatibleTokens:["b","B","H","K","k","t","T"]},b:{priority:80,parse:function(t,e,n,a){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n,a){return t.setUTCHours(D(n),0,0,0),t},incompatibleTokens:["a","B","H","K","k","t","T"]},B:{priority:80,parse:function(t,e,n,a){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n,a){return t.setUTCHours(D(n),0,0,0),t},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(t,e,n,a){switch(e){case"h":return C(pt,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return j(e.length,t)}},validate:function(t,e,n){return 1<=e&&e<=12},set:function(t,e,n,a){var o=12<=t.getUTCHours();return o&&n<12?t.setUTCHours(n+12,0,0,0):o||12!==n?t.setUTCHours(n,0,0,0):t.setUTCHours(0,0,0,0),t},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(t,e,n,a){switch(e){case"H":return C(ct,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return j(e.length,t)}},validate:function(t,e,n){return 0<=e&&e<=23},set:function(t,e,n,a){return t.setUTCHours(n,0,0,0),t},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(t,e,n,a){switch(e){case"K":return C(ut,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return j(e.length,t)}},validate:function(t,e,n){return 0<=e&&e<=11},set:function(t,e,n,a){return 12<=t.getUTCHours()&&n<12?t.setUTCHours(n+12,0,0,0):t.setUTCHours(n,0,0,0),t},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(t,e,n,a){switch(e){case"k":return C(dt,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return j(e.length,t)}},validate:function(t,e,n){return 1<=e&&e<=24},set:function(t,e,n,a){return t.setUTCHours(n<=24?n%24:n,0,0,0),t},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(t,e,n,a){switch(e){case"m":return C(_t,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return j(e.length,t)}},validate:function(t,e,n){return 0<=e&&e<=59},set:function(t,e,n,a){return t.setUTCMinutes(n,0,0),t},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(t,e,n,a){switch(e){case"s":return C(ft,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return j(e.length,t)}},validate:function(t,e,n){return 0<=e&&e<=59},set:function(t,e,n,a){return t.setUTCSeconds(n,0),t},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(t,e,n,a){return j(e.length,t,function(t){return Math.floor(t*Math.pow(10,3-e.length))})},set:function(t,e,n,a){return t.setUTCMilliseconds(n),t},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(t,e,n,a){switch(e){case"X":return E(Ct,t);case"XX":return E(Et,t);case"XXXX":return E(jt,t);case"XXXXX":return E(Tt,t);default:return E(Dt,t)}},set:function(t,e,n,a){return e.timestampIsSet?t:new Date(t.getTime()-n)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(t,e,n,a){switch(e){case"x":return E(Ct,t);case"xx":return E(Et,t);case"xxxx":return E(jt,t);case"xxxxx":return E(Tt,t);default:return E(Dt,t)}},set:function(t,e,n,a){return e.timestampIsSet?t:new Date(t.getTime()-n)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(t,e,n,a){return Mt(t)},set:function(t,e,n,a){return[new Date(1e3*n),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(t,e,n,a){return Mt(t)},set:function(t,e,n,a){return[new Date(n),{timestampIsSet:!0}]},incompatibleTokens:"*"}},Qt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,At=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,It=/^'([^]*?)'?$/,zt=/''/g,Bt=/\S/,$t=/[a-zA-Z]/;function Ut(t,e){return e.timestampIsSet?t:((e=new Date(0)).setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),e.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),e)}var O={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Rt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Wt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Nt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function L(t){return t?parseInt(t):1}function q(t){return t&&parseFloat(t.replace(",","."))||0}var Ht=[31,null,31,30,31,30,31,31,30,31,30,31];function Ft(t){return t%400==0||t%4==0&&t%100}var Gt={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Q._adapters._date.override({_id:"date-fns",formats:function(){return Gt},parse:function(t,e){var n;return null!=t&&("number"==(n=_typeof(t))||t instanceof Date?t=S(t):"string"==n&&(t="string"==typeof e?function(t,e,n,a){M(3,arguments);var o=String(t),r=String(e),i=a||{},s=i.locale||z;if(!s.match)throw new RangeError("locale must contain match property");if(a=null==(e=s.options&&s.options.firstWeekContainsDate)?1:T(e),!(1<=(e=null==i.firstWeekContainsDate?a:T(i.firstWeekContainsDate))&&e<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");if(a=null==(a=s.options&&s.options.weekStartsOn)?0:T(a),!(0<=(a=null==i.weekStartsOn?a:T(i.weekStartsOn))&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===r)return""===o?S(n):new Date(NaN);for(var l={firstWeekContainsDate:e,weekStartsOn:a,locale:s},c=[{priority:10,subPriority:-1,set:Ut,index:0}],d=r.match(At).map(function(t){var e=t[0];return"p"===e||"P"===e?(0,X[e])(t,s.formatLong,l):t}).join("").match(Qt),u=[],p=0;p<d.length;p++){var _=d[p],f=(!i.useAdditionalWeekYearTokens&&J(_)&&P(_,r,t),!i.useAdditionalDayOfYearTokens&&Z(_)&&P(_,r,t),_[0]),h=qt[f];if(h){var g=h.incompatibleTokens;if(Array.isArray(g)){for(var m=void 0,w=0;w<u.length;w++){var y=u[w].token;if(-1!==g.indexOf(y)||y===f){m=u[w];break}}if(m)throw new RangeError("The format string mustn't contain `".concat(m.fullToken,"` and `").concat(_,"` at the same time"))}else if("*"===h.incompatibleTokens&&u.length)throw new RangeError("The format string mustn't contain `".concat(_,"` and any other token at the same time"));u.push({token:f,fullToken:_});var b=h.parse(o,_,s.match,l);if(!b)return new Date(NaN);c.push({priority:h.priority,subPriority:h.subPriority||0,set:h.set,validate:h.validate,value:b.value,index:c.length}),o=b.rest}else{if(f.match($t))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");if("''"===_?_="'":"'"===f&&(_=_.match(It)[1].replace(zt,"'")),0!==o.indexOf(_))return new Date(NaN);o=o.slice(_.length)}}if(0<o.length&&Bt.test(o))return new Date(NaN);var v=c.map(function(t){return t.priority}).sort(function(t,e){return e-t}).filter(function(t,e,n){return n.indexOf(t)===e}).map(function(e){return c.filter(function(t){return t.priority===e}).sort(function(t,e){return e.subPriority-t.subPriority})}).map(function(t){return t[0]}),e=S(n);if(isNaN(e))return new Date(NaN);for(var x=B(e,Y(e)),k={},p=0;p<v.length;p++){var C=v[p];if(C.validate&&!C.validate(x,C.value,l))return new Date(NaN);if((C=C.set(x,k,C.value,l))[0]){var E,x=C[0],j=void 0,D=void 0,E=void 0,j=k,D=C[1];if(null==j)throw new TypeError("assign requires that input parameter not be null or undefined");for(E in D=D||{})D.hasOwnProperty(E)&&(j[E]=D[E])}else x=C}return x}(t,e,new Date,this.options):function(t,e){M(1,arguments);var n,a,o,r,i,s,l,c,e=e||{},e=null==e.additionalDigits?2:T(e.additionalDigits);if(2!==e&&1!==e&&0!==e)throw new RangeError("additionalDigits must be 0, 1 or 2");return"string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t)||(o={},2<(c=t.split(O.dateTimeDelimiter)).length||(/:/.test(c[0])?(o.date=null,a=c[0]):(o.date=c[0],a=c[1],O.timeZoneDelimiter.test(o.date)&&(o.date=t.split(O.timeZoneDelimiter)[0],a=t.substr(o.date.length,t.length))),a&&((c=O.timezone.exec(a))?(o.time=a.replace(c[1],""),o.timezone=c[1]):o.time=a)),(t=o).date&&(c=t.date,a=e,a=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+a)+"})|(\\d{2}|[+-]\\d{"+(2+a)+"})$)"),e=(o=(a=c.match(a))?(o=a[1]&&parseInt(a[1]),{year:null==(e=a[2]&&parseInt(a[2]))?o:100*e,restDateString:c.slice((a[1]||a[2]).length)}):{year:null}).restDateString,n=null!==(c=o.year)&&(e=e.match(Rt))?(o=!!e[4],i=L(e[1]),r=L(e[2])-1,s=L(e[3]),l=L(e[4]),e=L(e[5])-1,o?1<=l&&l<=53&&0<=e&&e<=6?(o=c,(n=new Date(0)).setUTCFullYear(o,0,4),o=7*(l-1)+e+1-(n.getUTCDay()||7),n.setUTCDate(n.getUTCDate()+o),n):new Date(NaN):(l=new Date(0),0<=r&&r<=11&&1<=s&&s<=(Ht[r]||(Ft(c)?29:28))&&1<=i&&i<=(Ft(c)?366:365)?(l.setUTCFullYear(c,r,Math.max(i,s)),l):new Date(NaN))):null),isNaN(n))||!n||(e=n.getTime(),o=0,t.time&&(o=(c=(c=t.time).match(Wt))?(r=q(c[1]),i=q(c[2]),c=q(c[3]),(24===r?0===i&&0===c:0<=c&&c<60&&0<=i&&i<60&&0<=r&&r<25)?36e5*r+6e4*i+1e3*c:NaN):null,isNaN(o)||null===o))?new Date(NaN):t.timezone?(t="Z"!==(s=t.timezone)&&(s=s.match(Nt))?(l="+"===s[1]?-1:1,c=parseInt(s[2]),0<=(s=s[3]&&parseInt(s[3])||0)&&s<=59?l*(36e5*c+6e4*s):NaN):0,isNaN(t)?new Date(NaN):new Date(e+o+t)):(c=new Date(e+o),(t=new Date(0)).setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),t.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),t)}(t,this.options)),d(t))?t.getTime():null},format:function(t,e){return function(a,o,t){M(2,arguments);var e=String(o),r=t||{},i=r.locale||z,t=i.options&&i.options.firstWeekContainsDate,t=null==t?1:T(t),t=null==r.firstWeekContainsDate?t:T(r.firstWeekContainsDate);if(!(1<=t&&t<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var n=null==(n=i.options&&i.options.weekStartsOn)?0:T(n);if(!(0<=(n=null==r.weekStartsOn?n:T(r.weekStartsOn))&&n<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!i.localize)throw new RangeError("locale must contain localize property");if(!i.formatLong)throw new RangeError("locale must contain formatLong property");var s,l,c=S(a);if(d(c))return s=B(c,Y(c)),l={firstWeekContainsDate:t,weekStartsOn:n,locale:i,_originalDate:c},e.match(et).map(function(t){var e=t[0];return"p"===e||"P"===e?(0,X[e])(t,i.formatLong,l):t}).join("").match(tt).map(function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return t.match(nt)[1].replace(at,"'");var n=H[e];if(n)return!r.useAdditionalWeekYearTokens&&J(t)&&P(t,o,a),!r.useAdditionalDayOfYearTokens&&Z(t)&&P(t,o,a),n(s,t,i.localize,l);if(e.match(ot))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t}).join("");throw new RangeError("Invalid time value")}(t,e,this.options)},add:function(t,e,n){switch(n){case"millisecond":return r(t,e);case"second":return function(t,e){return M(2,arguments),r(t,1e3*T(e))}(t,e);case"minute":return function(t,e){return M(2,arguments),r(t,6e4*T(e))}(t,e);case"hour":return function(t,e){return M(2,arguments),r(t,36e5*T(e))}(t,e);case"day":return a(t,e);case"week":return function(t,e){return M(2,arguments),a(t,7*T(e))}(t,e);case"month":return o(t,e);case"quarter":return function(t,e){return M(2,arguments),o(t,3*T(e))}(t,e);case"year":return function(t,e){return M(2,arguments),o(t,12*T(e))}(t,e);default:return t}},diff:function(t,e,n){switch(n){case"millisecond":return p(t,e);case"second":return function(t,e){return M(2,arguments),0<(t=p(t,e)/1e3)?Math.floor(t):Math.ceil(t)}(t,e);case"minute":return function(t,e){return M(2,arguments),0<(t=p(t,e)/6e4)?Math.floor(t):Math.ceil(t)}(t,e);case"hour":return function(t,e){return M(2,arguments),0<(t=p(t,e)/36e5)?Math.floor(t):Math.ceil(t)}(t,e);case"day":return u(t,e);case"week":return function(t,e){return M(2,arguments),0<(t=u(t,e)/7)?Math.floor(t):Math.ceil(t)}(t,e);case"month":return h(t,e);case"quarter":return function(t,e){return M(2,arguments),0<(t=h(t,e)/3)?Math.floor(t):Math.ceil(t)}(t,e);case"year":return function(t,e){M(2,arguments);var t=S(t),e=S(e),n=l(t,e),a=Math.abs(function(t,e){return M(2,arguments),t=S(t),e=S(e),t.getFullYear()-e.getFullYear()}(t,e));return t.setFullYear("1584"),e.setFullYear("1584"),0==(a=n*(a-(l(t,e)===-n)))?0:a}(t,e);default:return 0}},startOf:function(t,e,n){switch(e){case"second":return function(t){return M(1,arguments),(t=S(t)).setMilliseconds(0),t}(t);case"minute":return function(t){return M(1,arguments),(t=S(t)).setSeconds(0,0),t}(t);case"hour":return function(t){return M(1,arguments),(t=S(t)).setMinutes(0,0,0),t}(t);case"day":return s(t);case"week":return i(t);case"isoWeek":return i(t,{weekStartsOn:+n});case"month":return function(t){return M(1,arguments),(t=S(t)).setDate(1),t.setHours(0,0,0,0),t}(t);case"quarter":return function(t){M(1,arguments);var t=S(t),e=t.getMonth();return t.setMonth(e-e%3,1),t.setHours(0,0,0,0),t}(t);case"year":return function(t){M(1,arguments);var t=S(t),e=new Date(0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}(t);default:return t}},endOf:function(t,e){switch(e){case"second":return function(t){return M(1,arguments),(t=S(t)).setMilliseconds(999),t}(t);case"minute":return function(t){return M(1,arguments),(t=S(t)).setSeconds(59,999),t}(t);case"hour":return function(t){return M(1,arguments),(t=S(t)).setMinutes(59,59,999),t}(t);case"day":return _(t);case"week":return function(t){M(1,arguments);var e={},n=null==(n=(n=e.locale)&&n.options&&n.options.weekStartsOn)?0:T(n);if(0<=(n=null==e.weekStartsOn?n:T(e.weekStartsOn))&&n<=6)return t=6+((t=(e=S(t)).getDay())<n?-7:0)-(t-n),e.setDate(e.getDate()+t),e.setHours(23,59,59,999),e;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}(t);case"month":return f(t);case"quarter":return function(t){M(1,arguments);var t=S(t),e=t.getMonth();return t.setMonth(e-e%3+3,0),t.setHours(23,59,59,999),t}(t);case"year":return function(t){M(1,arguments);var t=S(t),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}(t);default:return t}}})},"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?t(require("chart.js")):"function"==typeof define&&define.amd?define(["chart.js"],t):t(("undefined"!=typeof globalThis?globalThis:s||self).Chart),t=this,s=function(t,e,_){var n=function(){function t(){return _classCallCheck(this,t),_callSuper(this,t,arguments)}return _inherits(t,e.DatasetController),_createClass(t,[{key:"initialize",value:function(){this.enableOptionSharing=!0,_superPropGet(t,"initialize",this,3)([])}},{key:"update",value:function(t){var e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}},{key:"updateElements",value:function(t,e,n,a){for(var o=this,r="reset"===a,i=o._cachedMeta,s=i.xScale,l=i.yScale,i=o.resolveDataElementOptions(e,a),i=o.getSharedOptions(a,t[e],i),c=e;c<e+n;c++){var d=!r&&o.getParsed(c),u=r?s.getBasePixel():s.getPixelForValue(d.x),d=r?l.getBasePixel():l.getPixelForValue(d.y),p=o.resolveDataElementOptions(c,a),_=p.width,f=p.height,h=p.anchorX,g=p.anchorY,h={x:"left"===h||"start"===h?u:"right"===h||"end"===h?u-_:u-_/2,y:"top"===g||"start"===g?d:"bottom"===g||"end"===g?d-f:d-f/2,width:_,height:f,options:p};o.updateElement(t[c],c,h,a)}o.updateSharedOptions(i,a)}},{key:"draw",value:function(){for(var t=this.getMeta().data||[],e=0,n=t.length;e<n;++e)t[e].draw(this._ctx)}}])}();function f(t,e){var n=t.getProps(["x","y","width","height"],e);return{left:t=n.x,top:e=n.y,right:t+n.width,bottom:e+n.height}}function h(t,e,n){return Math.max(Math.min(t,n),e)}function a(t,e,n,a){var o=null===e,r=null===n;return(t=!(!t||o&&r)&&f(t,a))&&(o||e>=t.left&&e<=t.right)&&(r||n>=t.top&&n<=t.bottom)}_defineProperty(n,"id","matrix"),_defineProperty(n,"version","2.0.1"),_defineProperty(n,"defaults",{dataElementType:"matrix",animations:{numbers:{type:"number",properties:["x","y","width","height"]}}}),_defineProperty(n,"overrides",{interaction:{mode:"nearest",intersect:!0},scales:{x:{type:"linear",offset:!0},y:{type:"linear",reverse:!0}}});var o=function(){function n(t){var e;return _classCallCheck(this,n),(e=_callSuper(this,n)).options=void 0,e.width=void 0,e.height=void 0,t&&Object.assign(_assertThisInitialized(e),t),e}return _inherits(n,e.Element),_createClass(n,[{key:"draw",value:function(t){var e,n,a,o,r,i,s,l=this.options,c=(u=(d=f(e=this)).right-d.left,p=d.bottom-d.top,n=u/2,a=p/2,c=e.options.borderWidth,_.isObject(c)?(o=+c.top||0,r=+c.right||0,i=+c.bottom||0,s=+c.left||0):o=r=i=s=+c||0,e={t:h(o,0,a),r:h(r,0,n),b:h(i,0,a),l:h(s,0,n)},{outer:{x:d.left,y:d.top,w:u,h:p},inner:{x:d.left+e.l,y:d.top+e.t,w:u-e.l-e.r,h:p-e.t-e.b}}),d=c.inner,u=c.outer,p=_.toTRBLCorners(l.borderRadius);t.save(),u.w!==d.w||u.h!==d.h?(t.beginPath(),_.addRoundedRectPath(t,{x:u.x,y:u.y,w:u.w,h:u.h,radius:p}),_.addRoundedRectPath(t,{x:d.x,y:d.y,w:d.w,h:d.h,radius:p}),t.fillStyle=l.backgroundColor,t.fill(),t.fillStyle=l.borderColor,t.fill("evenodd")):(t.beginPath(),_.addRoundedRectPath(t,{x:d.x,y:d.y,w:d.w,h:d.h,radius:p}),t.fillStyle=l.backgroundColor,t.fill()),t.restore()}},{key:"inRange",value:function(t,e,n){return a(this,t,e,n)}},{key:"inXRange",value:function(t,e){return a(this,t,null,e)}},{key:"inYRange",value:function(t,e){return a(this,null,t,e)}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y","width","height"],t),t=e.x,n=e.y;return{x:t+e.width/2,y:n+e.height/2}}},{key:"tooltipPosition",value:function(){return this.getCenterPoint()}},{key:"getRange",value:function(t){return"x"===t?this.width/2:this.height/2}}])}();_defineProperty(o,"id","matrix"),_defineProperty(o,"defaults",{backgroundColor:void 0,borderColor:void 0,borderWidth:void 0,borderRadius:0,anchorX:"center",anchorY:"center",width:20,height:20}),(400<e.Chart.version.replace(/\./g,"")?e.Chart:e.Chart.plugins).register(n,o),t.MatrixController=n,t.MatrixElement=o},"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?s(exports,require("chart.js"),require("chart.js/helpers")):"function"==typeof define&&define.amd?define(["exports","chart.js","chart.js/helpers"],s):s((t="undefined"!=typeof globalThis?globalThis:t||self)["chartjs-chart-matrix"]={},t.Chart,t.Chart.helpers),jQuery(document).ready(function(){var t,e,n,a,o,r,i,s,l,c=jQuery(".js-date-range-picker-btn"),d=jQuery(".js-date-range-picker-input"),u=jQuery(".js-date-range-picker-form"),p=jQuery(".wps-js-calendar-field"),_=k.isset(k.global,"options","wp_timezone")?k.global.options.wp_timezone:null,f=_,h=(_&&(_.startsWith("+")||_.startsWith("-"))&&(f="UTC"+_),c.length&&moment.updateLocale("en",{week:{dow:parseInt(k._("start_of_week"))}}),f?f.startsWith("UTC")||f.startsWith("+")||f.startsWith("-")?(_=(h=_slicedToArray(f.replace("UTC","").split(":").map(Number),2))[0],h=h[1],_=60*_+(_<0?-Math.abs(h):h),moment().utcOffset(_)):moment.tz.zone(f)?moment().tz(f):moment().utc():moment().utc());c.length&&d.length&&u.length&&(i=function(){return new URLSearchParams(window.location.search).get("post_id")},c.on("click",function(){d.trigger("click")}),_={Today:[h.clone().startOf("day"),h.clone().startOf("day")],Yesterday:[h.clone().subtract(1,"days").startOf("day"),h.clone().subtract(1,"days").startOf("day")],"This Week":[h.clone().startOf("week"),h.clone().endOf("week")],"Last Week":[h.clone().subtract(1,"week").startOf("week"),h.clone().subtract(1,"week").endOf("week")],"This Month":[h.clone().startOf("month"),h.clone().endOf("month")],"Last Month":[h.clone().subtract(1,"month").startOf("month"),h.clone().subtract(1,"month").endOf("month")],"Last 7 Days":[h.clone().subtract(6,"days"),h.clone()],"Last 30 Days":[h.clone().subtract(29,"days"),h.clone()],"Last 90 Days":[h.clone().subtract(89,"days"),h.clone()],"Last 6 Months":[h.clone().subtract(6,"months"),h.clone()],"This Year":[h.clone().startOf("year"),h.clone().endOf("year")]},c.hasClass("js-date-range-picker-all-time")&&(h=moment(0),h=i()?k.global.post_creation_date?moment(k.global.post_creation_date):moment(0):k.global.initial_post_date?moment(k.global.initial_post_date):moment(0),_["All Time"]=[h,moment()]),h=c.attr("data-date-format")?c.attr("data-date-format"):"MM/DD/YYYY",l={d:"DD",j:"D",S:"Do",n:"M",m:"MM",F:"MMMM",M:"MMM",y:"YY",Y:"YYYY"},t=h.replace(/([a-zA-Z])/g,function(t){return l[t]||t}),e=moment(k.global.user_date_range.from).format("YYYY-MM-DD"),n=moment(k.global.user_date_range.to).format("YYYY-MM-DD"),d.daterangepicker({autoApply:!0,ranges:_,startDate:e,endDate:n}),k.isset(k.global,"request_params","from")&&k.isset(k.global,"request_params","to")?(r=k.global.request_params.from,i()&&k.global.post_creation_date&&(r=k.global.post_creation_date),_=k.global.request_params.to,d.data("daterangepicker").setStartDate(moment(r).format("MM/DD/YYYY")),d.data("daterangepicker").setEndDate(moment(_).format("MM/DD/YYYY")),d.data("daterangepicker").updateCalendars(),i=d.data("daterangepicker").chosenLabel,r=moment(r),_=moment(_),a=r.year()===_.year()?(o=t.replace(/,?\s?(YYYY|YY)[-/\s]?,?|[-/\s]?(YYYY|YY)[-/\s]?,?/g,""),r.format(o)+" - "+_.format(t)):r.format(t)+" - "+_.format(t),"Custom Range"!==i&&("All Time"!==i?(a='<span class="wps-date-range">'.concat(i,"</span>")+a,document.querySelector(".js-date-range-picker-btn").classList.add("custom-range")):a=i),c.find("span").html(a)):(o=moment(e),r=moment(n),d.data("daterangepicker").setStartDate(moment(e).format("MM/DD/YYYY")),d.data("daterangepicker").setEndDate(moment(n).format("MM/DD/YYYY")),d.data("daterangepicker").updateCalendars(),i=o.year()===r.year()?(_=t.replace(/,?\s?(YYYY|YY)[-/\s]?,?|[-/\s]?(YYYY|YY)[-/\s]?,?/g,""),o.format(_)+" - "+r.format(t)):o.format(t)+" - "+r.format(t),s=d.data("daterangepicker").container.find(".ranges li.active").text(),d.data("daterangepicker").container.find(".ranges li.active").removeClass("active"),d.data("daterangepicker").container.find('.ranges li[data-range-key="'+s+'"]').addClass("active"),"Custom Range"!==s&&"All Time"!==s&&(i='<span class="wps-date-range">'.concat(s,"</span>")+i,document.querySelector(".js-date-range-picker-btn").classList.add("custom-range")),c.find("span").html(i),d.on("show.daterangepicker",function(t,e){d.data("daterangepicker").container.find(".ranges li.active").removeClass("active"),d.data("daterangepicker").container.find('.ranges li[data-range-key="'+s+'"]').addClass("active")})),d.on("show.daterangepicker",function(t,e){e=e.container,jQuery(e).addClass(t.target.className)}),d.on("apply.daterangepicker",function(t,e){var n=u.find(".js-date-range-picker-input-from").first(),a=u.find(".js-date-range-picker-input-to").first(),o=e.startDate.utcOffset(f).format("YYYY-MM-DD"),e=e.endDate.utcOffset(f).format("YYYY-MM-DD"),o=(n.val(o),a.val(e),d.data("daterangepicker").chosenLabel);c.find("span").html(o),"All Time"!==o?jQuery.ajax({url:k.global.ajax_url,method:"POST",data:{wps_nonce:k.global.rest_api_nonce,action:"wp_statistics_store_date_range",date:{from:n.val(),to:a.val()}},beforeSend:function(){c.addClass("wps-disabled")},complete:function(t){u.submit()}}):u.submit()})),p.length&&(p.daterangepicker({singleDatePicker:!0,showDropdowns:!0,minYear:1998,maxYear:parseInt((new Date).getFullYear()+1),locale:{format:"YYYY-MM-DD"}}),p.on("show.daterangepicker",function(t,e){e=e.container,jQuery(e).addClass(t.target.className)}),p.on("apply.daterangepicker",function(t,e){jQuery(".wps-today-datepicker").submit()}))}),s=function(b){function t(){this.__$emitterPrivate=b({}),this.__$emitterPublic=b({}),this.__instancesLatestArr=[],this.__plugins={},this._env=v}var l={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!0,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:null,plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:9999999},o="undefined"!=typeof window?window:null,v={hasTouchCapability:!(!o||!("ontouchstart"in o||o.DocumentTouch&&o.document instanceof o.DocumentTouch||o.navigator.maxTouchPoints)),hasTransitions:function(){if(o){var t=(o.document.body||o.document.documentElement).style,e=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[n="transition"])return!0;for(var n=n.charAt(0).toUpperCase()+n.substr(1),a=0;a<e.length;a++)if("string"==typeof t[e[a]+n])return!0}return!1}(),IE:!1,semVer:"4.2.8",window:o};function e(t){this.$container,this.constraints=null,this.__$tooltip,this.__init(t)}function r(n,a){var o=!0;return b.each(n,function(t,e){if(void 0===a[t]||n[t]!==a[t])return o=!1}),o}function c(t){var e=t.attr("id");return(e=e?v.window.document.getElementById(e):null)?e===t[0]:b.contains(v.window.document.body,t[0])}t.prototype={__bridge:function(t,n,a){var e,o;return n[a]||((e=function(){}).prototype=t,(o=new e).__init&&o.__init(n),b.each(t,function(t,e){0!=t.indexOf("__")&&(n[t]?l.debug&&console.log("The "+t+" method of the "+a+" plugin conflicts with another plugin or native methods"):(n[t]=function(){return o[t].apply(o,Array.prototype.slice.apply(arguments))},n[t].bridged=o))}),n[a]=o),this},__setWindow:function(t){return v.window=t,this},_getRuler:function(t){return new e(t)},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_plugin:function(t){var n,a,e=this;if("string"==typeof t)return a=null,0<(n=t).indexOf(".")?a=e.__plugins[n]:b.each(e.__plugins,function(t,e){if(e.name.substring(e.name.length-n.length-1)=="."+n)return a=e,!1}),a;if(t.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");return(e.__plugins[t.name]=t).core&&e.__bridge(t.core,e,t.name),this},_trigger:function(){var t=Array.prototype.slice.apply(arguments);return"string"==typeof t[0]&&(t[0]={type:t[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,t),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,t),this},instances:function(t){var a=[];return b(t||".tooltipstered").each(function(){var n=b(this),t=n.data("tooltipster-ns");t&&b.each(t,function(t,e){a.push(n.data(e))})}),a},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(t){return b((t?t+" ":"")+".tooltipstered").toArray()},setDefaults:function(t){return b.extend(l,t),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},b.tooltipster=new t,b.Tooltipster=function(t,e){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.__$emitterPrivate=b({}),this.__$emitterPublic=b({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace="tooltipster-"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state="closed",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(t,e)},b.Tooltipster.prototype={__init:function(t,e){var n,a=this;a._$origin=b(t),a.__options=b.extend(!0,{},l,e),a.__optionsFormat(),!v.IE||v.IE>=a.__options.IEmin?(t=null,void 0===a._$origin.data("tooltipster-initialTitle")&&(t=a._$origin.attr("title"),a._$origin.data("tooltipster-initialTitle",t=void 0===t?null:t)),null!==a.__options.content?a.__contentSet(a.__options.content):(n=(e=a._$origin.attr("data-tooltip-content"))?b(e):n)&&n[0]?a.__contentSet(n.first()):a.__contentSet(t),a._$origin.removeAttr("title").addClass("tooltipstered"),a.__prepareOrigin(),a.__prepareGC(),b.each(a.__options.plugins,function(t,e){a._plug(e)}),v.hasTouchCapability&&b(v.window.document.body).on("touchmove."+a.__namespace+"-triggerOpen",function(t){a._touchRecordEvent(t)}),a._on("created",function(){a.__prepareTooltip()})._on("repositioned",function(t){a.__lastPosition=t.position})):a.__options.disabled=!0},__contentInsert:function(){var t=this,e=t._$tooltip.find(".tooltipster-content"),n=t.__Content;return t._trigger({type:"format",content:t.__Content,format:function(t){n=t}}),"string"!=typeof(n=t.__options.functionFormat?t.__options.functionFormat.call(t,t,{origin:t._$origin[0]},t.__Content):n)||t.__options.contentAsHTML?e.empty().append(n):e.text(n),t},__contentSet:function(t){return t instanceof b&&this.__options.contentCloning&&(t=t.clone(!0)),this.__Content=t,this._trigger({type:"updated",content:t}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.")},__geometry:function(){var t=this,e=t._$origin,n=t._$origin.is("area"),a=(n&&(a=t._$origin.parent().attr("name"),e=b('img[usemap="#'+a+'"]')),e[0].getBoundingClientRect()),o=b(v.window.document),r=b(v.window),i=e,s={available:{document:null,window:null},document:{size:{height:o.height(),width:o.width()}},window:{scroll:{left:v.window.scrollX||v.window.document.documentElement.scrollLeft,top:v.window.scrollY||v.window.document.documentElement.scrollTop},size:{height:r.height(),width:r.width()}},origin:{fixedLineage:!1,offset:{},size:{height:a.bottom-a.top,width:a.right-a.left},usemapImage:n?e[0]:null,windowOffset:{bottom:a.bottom,left:a.left,right:a.right,top:a.top}}};if(n){var o=t._$origin.attr("shape"),l=t._$origin.attr("coords");if(l&&(l=l.split(","),b.map(l,function(t,e){l[e]=parseInt(t)})),"default"!=o)switch(o){case"circle":var c=l[0],d=(d=l[1])-(u=l[2]),c=c-u;s.origin.size.height=2*u,s.origin.size.width=s.origin.size.height,s.origin.windowOffset.left+=c,s.origin.windowOffset.top+=d;break;case"rect":var u=l[0],c=l[1],d=l[2],p=l[3];s.origin.size.height=p-c,s.origin.size.width=d-u,s.origin.windowOffset.left+=u,s.origin.windowOffset.top+=c;break;case"poly":for(var _=0,f=0,h=0,g=0,m="even",w=0;w<l.length;w++)var y=l[w],m="even"==m?(y<(_=h<y&&(h=y,0===w)?h:_)&&(_=y),"odd"):(y<(f=g<y&&(g=y,1==w)?g:f)&&(f=y),"even");s.origin.size.height=g-f,s.origin.size.width=h-_,s.origin.windowOffset.left+=_,s.origin.windowOffset.top+=f}}for(t._trigger({type:"geometry",edit:function(t){s.origin.size.height=t.height,s.origin.windowOffset.left=t.left,s.origin.windowOffset.top=t.top,s.origin.size.width=t.width},geometry:{height:s.origin.size.height,left:s.origin.windowOffset.left,top:s.origin.windowOffset.top,width:s.origin.size.width}}),s.origin.windowOffset.right=s.origin.windowOffset.left+s.origin.size.width,s.origin.windowOffset.bottom=s.origin.windowOffset.top+s.origin.size.height,s.origin.offset.left=s.origin.windowOffset.left+s.window.scroll.left,s.origin.offset.top=s.origin.windowOffset.top+s.window.scroll.top,s.origin.offset.bottom=s.origin.offset.top+s.origin.size.height,s.origin.offset.right=s.origin.offset.left+s.origin.size.width,s.available.document={bottom:{height:s.document.size.height-s.origin.offset.bottom,width:s.document.size.width},left:{height:s.document.size.height,width:s.origin.offset.left},right:{height:s.document.size.height,width:s.document.size.width-s.origin.offset.right},top:{height:s.origin.offset.top,width:s.document.size.width}},s.available.window={bottom:{height:Math.max(s.window.size.height-Math.max(s.origin.windowOffset.bottom,0),0),width:s.window.size.width},left:{height:s.window.size.height,width:Math.max(s.origin.windowOffset.left,0)},right:{height:s.window.size.height,width:Math.max(s.window.size.width-Math.max(s.origin.windowOffset.right,0),0)},top:{height:Math.max(s.origin.windowOffset.top,0),width:s.window.size.width}};"html"!=i[0].tagName.toLowerCase();){if("fixed"==i.css("position")){s.origin.fixedLineage=!0;break}i=i.parent()}return s},__optionsFormat:function(){return"number"==typeof this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),"number"==typeof this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),"number"==typeof this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),"string"==typeof this.__options.theme&&(this.__options.theme=[this.__options.theme]),null===this.__options.parent?this.__options.parent=b(v.window.document.body):"string"==typeof this.__options.parent&&(this.__options.parent=b(this.__options.parent)),"hover"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):"click"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var t=this;return t.__options.selfDestruction?t.__garbageCollector=setInterval(function(){var n=(new Date).getTime();t.__touchEvents=b.grep(t.__touchEvents,function(t,e){return 6e4<n-t.time}),c(t._$origin)||t.close(function(){t.destroy()})},2e4):clearInterval(t.__garbageCollector),t},__prepareOrigin:function(){var t,e=this;return e._$origin.off("."+e.__namespace+"-triggerOpen"),v.hasTouchCapability&&e._$origin.on("touchstart."+e.__namespace+"-triggerOpen touchend."+e.__namespace+"-triggerOpen touchcancel."+e.__namespace+"-triggerOpen",function(t){e._touchRecordEvent(t)}),(e.__options.triggerOpen.click||e.__options.triggerOpen.tap&&v.hasTouchCapability)&&(t="",e.__options.triggerOpen.click&&(t+="click."+e.__namespace+"-triggerOpen "),e.__options.triggerOpen.tap&&v.hasTouchCapability&&(t+="touchend."+e.__namespace+"-triggerOpen"),e._$origin.on(t,function(t){e._touchIsMeaningfulEvent(t)&&e._open(t)})),(e.__options.triggerOpen.mouseenter||e.__options.triggerOpen.touchstart&&v.hasTouchCapability)&&(t="",e.__options.triggerOpen.mouseenter&&(t+="mouseenter."+e.__namespace+"-triggerOpen "),e.__options.triggerOpen.touchstart&&v.hasTouchCapability&&(t+="touchstart."+e.__namespace+"-triggerOpen"),e._$origin.on(t,function(t){!e._touchIsTouchEvent(t)&&e._touchIsEmulatedEvent(t)||(e.__pointerIsOverOrigin=!0,e._openShortly(t))})),(e.__options.triggerClose.mouseleave||e.__options.triggerClose.touchleave&&v.hasTouchCapability)&&(t="",e.__options.triggerClose.mouseleave&&(t+="mouseleave."+e.__namespace+"-triggerOpen "),e.__options.triggerClose.touchleave&&v.hasTouchCapability&&(t+="touchend."+e.__namespace+"-triggerOpen touchcancel."+e.__namespace+"-triggerOpen"),e._$origin.on(t,function(t){e._touchIsMeaningfulEvent(t)&&(e.__pointerIsOverOrigin=!1)})),e},__prepareTooltip:function(){var n=this,t=n.__options.interactive?"auto":"";return n._$tooltip.attr("id",n.__namespace).css({"pointer-events":t,zIndex:n.__options.zIndex}),b.each(n.__previousThemes,function(t,e){n._$tooltip.removeClass(e)}),b.each(n.__options.theme,function(t,e){n._$tooltip.addClass(e)}),n.__previousThemes=b.merge([],n.__options.theme),n},__scrollHandler:function(t){var r,i,e,n,a=this;return a.__options.triggerClose.scroll?a._close(t):c(a._$origin)&&c(a._$tooltip)&&(r=null,t.target===v.window.document?a.__Geometry.origin.fixedLineage||a.__options.repositionOnScroll&&a.reposition(t):(r=a.__geometry(),i=!1,"fixed"!=a._$origin.css("position")&&a.__$originParents.each(function(t,e){var n=b(e),a=n.css("overflow-x"),o=n.css("overflow-y");if("visible"!=a||"visible"!=o){if(e=e.getBoundingClientRect(),"visible"!=a&&(r.origin.windowOffset.left<e.left||r.origin.windowOffset.right>e.right))return!(i=!0);if("visible"!=o&&(r.origin.windowOffset.top<e.top||r.origin.windowOffset.bottom>e.bottom))return!(i=!0)}if("fixed"==n.css("position"))return!1}),i?a._$tooltip.css("visibility","hidden"):(a._$tooltip.css("visibility","visible"),a.__options.repositionOnScroll?a.reposition(t):(e=r.origin.offset.left-a.__Geometry.origin.offset.left,n=r.origin.offset.top-a.__Geometry.origin.offset.top,a._$tooltip.css({left:a.__lastPosition.coord.left+e,top:a.__lastPosition.coord.top+n})))),a._trigger({type:"scroll",event:t,geo:r})),a},__stateSet:function(t){return this.__state=t,this._trigger({type:"state",state:t}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,b.each(this.__timeouts.close,function(t,e){clearTimeout(e)}),this.__timeouts.close=[],this},__trackerStart:function(){var n=this,a=n._$tooltip.find(".tooltipster-content");return n.__options.trackTooltip&&(n.__contentBcr=a[0].getBoundingClientRect()),n.__tracker=setInterval(function(){var t,e;c(n._$origin)&&c(n._$tooltip)?(n.__options.trackOrigin&&(t=!1,r((e=n.__geometry()).origin.size,n.__Geometry.origin.size)&&(n.__Geometry.origin.fixedLineage?r(e.origin.windowOffset,n.__Geometry.origin.windowOffset)&&(t=!0):r(e.origin.offset,n.__Geometry.origin.offset)&&(t=!0)),t||(n.__options.triggerClose.mouseleave?n._close():n.reposition())),!n.__options.trackTooltip||(e=a[0].getBoundingClientRect()).height===n.__contentBcr.height&&e.width===n.__contentBcr.width||(n.reposition(),n.__contentBcr=e)):n._close()},n.__options.trackerInterval),n},_close:function(n,t,e){var a,o=this,r=!0;return o._trigger({type:"close",event:n,stop:function(){r=!1}}),(r||e)&&(t&&o.__callbacks.close.push(t),o.__callbacks.open=[],o.__timeoutsClear(),a=function(){b.each(o.__callbacks.close,function(t,e){e.call(o,o,{event:n,origin:o._$origin[0]})}),o.__callbacks.close=[]},"closed"!=o.__state?(e=!0,t=(new Date).getTime()+o.__options.animationDuration[1],(e=!("disappearing"==o.__state&&t>o.__closingTime&&0<o.__options.animationDuration[1])&&e)&&(o.__closingTime=t,"disappearing"!=o.__state&&o.__stateSet("disappearing"),e=function(){clearInterval(o.__tracker),o._trigger({type:"closing",event:n}),o._$tooltip.off("."+o.__namespace+"-triggerClose").removeClass("tooltipster-dying"),b(v.window).off("."+o.__namespace+"-triggerClose"),o.__$originParents.each(function(t,e){b(e).off("scroll."+o.__namespace+"-triggerClose")}),o.__$originParents=null,b(v.window.document.body).off("."+o.__namespace+"-triggerClose"),o._$origin.off("."+o.__namespace+"-triggerClose"),o._off("dismissable"),o.__stateSet("closed"),o._trigger({type:"after",event:n}),o.__options.functionAfter&&o.__options.functionAfter.call(o,o,{event:n,origin:o._$origin[0]}),a()},v.hasTransitions?(o._$tooltip.css({"-moz-animation-duration":o.__options.animationDuration[1]+"ms","-ms-animation-duration":o.__options.animationDuration[1]+"ms","-o-animation-duration":o.__options.animationDuration[1]+"ms","-webkit-animation-duration":o.__options.animationDuration[1]+"ms","animation-duration":o.__options.animationDuration[1]+"ms","transition-duration":o.__options.animationDuration[1]+"ms"}),o._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),0<o.__options.animationDuration[1]&&o._$tooltip.delay(o.__options.animationDuration[1]),o._$tooltip.queue(e)):o._$tooltip.stop().fadeOut(o.__options.animationDuration[1],e))):a()),o},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(t,e){var n,a,o,r,i,s=this;return s.__destroying||c(s._$origin)&&s.__enabled&&!(n=!0)!==(n="closed"==s.__state&&(s._trigger({type:"before",event:t,stop:function(){n=!1}}),n)&&s.__options.functionBefore?s.__options.functionBefore.call(s,s,{event:t,origin:s._$origin[0]}):n)&&null!==s.__Content&&(e&&s.__callbacks.open.push(e),s.__callbacks.close=[],s.__timeoutsClear(),o=function(){"stable"!=s.__state&&s.__stateSet("stable"),b.each(s.__callbacks.open,function(t,e){e.call(s,s,{origin:s._$origin[0],tooltip:s._$tooltip[0]})}),s.__callbacks.open=[]},"closed"!==s.__state?(a=0,"disappearing"===s.__state?(s.__stateSet("appearing"),v.hasTransitions?(s._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),0<s.__options.animationDuration[0]&&s._$tooltip.delay(s.__options.animationDuration[0]),s._$tooltip.queue(o)):s._$tooltip.stop().fadeIn(o)):"stable"==s.__state&&o()):(s.__stateSet("appearing"),a=s.__options.animationDuration[0],s.__contentInsert(),s.reposition(t,!0),v.hasTransitions?(s._$tooltip.addClass("tooltipster-"+s.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":s.__options.animationDuration[0]+"ms","-ms-animation-duration":s.__options.animationDuration[0]+"ms","-o-animation-duration":s.__options.animationDuration[0]+"ms","-webkit-animation-duration":s.__options.animationDuration[0]+"ms","animation-duration":s.__options.animationDuration[0]+"ms","transition-duration":s.__options.animationDuration[0]+"ms"}),setTimeout(function(){"closed"!=s.__state&&(s._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),0<s.__options.animationDuration[0]&&s._$tooltip.delay(s.__options.animationDuration[0]),s._$tooltip.queue(o))},0)):s._$tooltip.css("display","none").fadeIn(s.__options.animationDuration[0],o),s.__trackerStart(),b(v.window).on("resize."+s.__namespace+"-triggerClose",function(t){var e=b(document.activeElement);(e.is("input")||e.is("textarea"))&&b.contains(s._$tooltip[0],e[0])||s.reposition(t)}).on("scroll."+s.__namespace+"-triggerClose",function(t){s.__scrollHandler(t)}),s.__$originParents=s._$origin.parents(),s.__$originParents.each(function(t,e){b(e).on("scroll."+s.__namespace+"-triggerClose",function(t){s.__scrollHandler(t)})}),(s.__options.triggerClose.mouseleave||s.__options.triggerClose.touchleave&&v.hasTouchCapability)&&(s._on("dismissable",function(t){t.dismissable?t.delay?(i=setTimeout(function(){s._close(t.event)},t.delay),s.__timeouts.close.push(i)):s._close(t):clearTimeout(i)}),e=s._$origin,r=t="",i=null,s.__options.interactive&&(e=e.add(s._$tooltip)),s.__options.triggerClose.mouseleave&&(t+="mouseenter."+s.__namespace+"-triggerClose ",r+="mouseleave."+s.__namespace+"-triggerClose "),s.__options.triggerClose.touchleave&&v.hasTouchCapability&&(t+="touchstart."+s.__namespace+"-triggerClose",r+="touchend."+s.__namespace+"-triggerClose touchcancel."+s.__namespace+"-triggerClose"),e.on(r,function(t){var e;!s._touchIsTouchEvent(t)&&s._touchIsEmulatedEvent(t)||(e="mouseleave"==t.type?s.__options.delay:s.__options.delayTouch,s._trigger({delay:e[1],dismissable:!0,event:t,type:"dismissable"}))}).on(t,function(t){!s._touchIsTouchEvent(t)&&s._touchIsEmulatedEvent(t)||s._trigger({dismissable:!1,event:t,type:"dismissable"})})),s.__options.triggerClose.originClick&&s._$origin.on("click."+s.__namespace+"-triggerClose",function(t){s._touchIsTouchEvent(t)||s._touchIsEmulatedEvent(t)||s._close(t)}),(s.__options.triggerClose.click||s.__options.triggerClose.tap&&v.hasTouchCapability)&&setTimeout(function(){var t,e;"closed"!=s.__state&&(t="",e=b(v.window.document.body),s.__options.triggerClose.click&&(t+="click."+s.__namespace+"-triggerClose "),s.__options.triggerClose.tap&&v.hasTouchCapability&&(t+="touchend."+s.__namespace+"-triggerClose"),e.on(t,function(t){s._touchIsMeaningfulEvent(t)&&(s._touchRecordEvent(t),s.__options.interactive&&b.contains(s._$tooltip[0],t.target)||s._close(t))}),s.__options.triggerClose.tap)&&v.hasTouchCapability&&e.on("touchstart."+s.__namespace+"-triggerClose",function(t){s._touchRecordEvent(t)})},0),s._trigger("ready"),s.__options.functionReady&&s.__options.functionReady.call(s,s,{origin:s._$origin[0],tooltip:s._$tooltip[0]})),0<s.__options.timer)&&(i=setTimeout(function(){s._close()},s.__options.timer+a),s.__timeouts.close.push(i)),s},_openShortly:function(t){var e,n=this,a=!0;return"stable"==n.__state||"appearing"==n.__state||n.__timeouts.open||(n._trigger({type:"start",event:t,stop:function(){a=!1}}),a&&((e=0==t.type.indexOf("touch")?n.__options.delayTouch:n.__options.delay)[0]?n.__timeouts.open=setTimeout(function(){n.__timeouts.open=null,n.__pointerIsOverOrigin&&n._touchIsMeaningfulEvent(t)?(n._trigger("startend"),n._open(t)):n._trigger("startcancel")},e[0]):(n._trigger("startend"),n._open(t)))),n},_optionsExtract:function(t,e){var a=this,n=b.extend(!0,{},e),o=a.__options[t];return o||(o={},b.each(e,function(t,e){var n=a.__options[t];void 0!==n&&(o[t]=n)})),b.each(n,function(t,e){void 0!==o[t]&&("object"!=_typeof(e)||e instanceof Array||null==e||"object"!=_typeof(o[t])||o[t]instanceof Array||null==o[t]?n[t]=o[t]:b.extend(n[t],o[t]))}),n},_plug:function(t){var e=b.tooltipster._plugin(t);if(e)return e.instance&&b.tooltipster.__bridge(e.instance,this,e.name),this;throw new Error('The "'+t+'" plugin is not defined')},_touchIsEmulatedEvent:function(t){for(var e=!1,n=(new Date).getTime(),a=this.__touchEvents.length-1;0<=a;a--){var o=this.__touchEvents[a];if(!(n-o.time<500))break;o.target===t.target&&(e=!0)}return e},_touchIsMeaningfulEvent:function(t){return this._touchIsTouchEvent(t)&&!this._touchSwiped(t.target)||!this._touchIsTouchEvent(t)&&!this._touchIsEmulatedEvent(t)},_touchIsTouchEvent:function(t){return 0==t.type.indexOf("touch")},_touchRecordEvent:function(t){return this._touchIsTouchEvent(t)&&(t.time=(new Date).getTime(),this.__touchEvents.push(t)),this},_touchSwiped:function(t){for(var e=!1,n=this.__touchEvents.length-1;0<=n;n--){var a=this.__touchEvents[n];if("touchmove"==a.type){e=!0;break}if("touchstart"==a.type&&t===a.target)break}return e},_trigger:function(){var t=Array.prototype.slice.apply(arguments);return"string"==typeof t[0]&&(t[0]={type:t[0]}),t[0].instance=this,t[0].origin=this._$origin?this._$origin[0]:null,t[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,t),b.tooltipster._trigger.apply(b.tooltipster,t),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,t),this},_unplug:function(n){var t,a=this;return a[n]&&((t=b.tooltipster._plugin(n)).instance&&b.each(t.instance,function(t,e){a[t]&&a[t].bridged===a[n]&&delete a[t]}),a[n].__destroy&&a[n].__destroy(),delete a[n]),a},close:function(t){return this.__destroyed?this.__destroyError():this._close(null,t),this},content:function(t){var e,n=this;return void 0===t?n.__Content:(n.__destroyed?n.__destroyError():(n.__contentSet(t),null!==n.__Content?"closed"!==n.__state&&(n.__contentInsert(),n.reposition(),n.__options.updateAnimation)&&(v.hasTransitions?(e=n.__options.updateAnimation,n._$tooltip.addClass("tooltipster-update-"+e),setTimeout(function(){"closed"!=n.__state&&n._$tooltip.removeClass("tooltipster-update-"+e)},1e3)):n._$tooltip.fadeTo(200,.5,function(){"closed"!=n.__state&&n._$tooltip.fadeTo(200,1)})):n._close()),n)},destroy:function(){var t,e,n=this;return n.__destroyed?n.__destroyError():("closed"!=n.__state?n.option("animationDuration",0)._close(null,null,!0):n.__timeoutsClear(),n._trigger("destroy"),n.__destroyed=!0,n._$origin.removeData(n.__namespace).off("."+n.__namespace+"-triggerOpen"),b(v.window.document.body).off("."+n.__namespace+"-triggerOpen"),(t=n._$origin.data("tooltipster-ns"))&&(1===t.length?(e=null,"previous"==n.__options.restoration?e=n._$origin.data("tooltipster-initialTitle"):"current"==n.__options.restoration&&(e="string"==typeof n.__Content?n.__Content:b("<div></div>").append(n.__Content).html()),e&&n._$origin.attr("title",e),n._$origin.removeClass("tooltipstered"),n._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")):(t=b.grep(t,function(t,e){return t!==n.__namespace}),n._$origin.data("tooltipster-ns",t))),n._trigger("destroyed"),n._off(),n.off(),n.__Content=null,n.__$emitterPrivate=null,n.__$emitterPublic=null,n.__options.parent=null,n._$origin=null,n._$tooltip=null,b.tooltipster.__instancesLatestArr=b.grep(b.tooltipster.__instancesLatestArr,function(t,e){return n!==t}),clearInterval(n.__garbageCollector)),n},disable:function(){return this.__destroyed?this.__destroyError():(this._close(),this.__enabled=!1),this},elementOrigin:function(){if(!this.__destroyed)return this._$origin[0];this.__destroyError()},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(t){return this.close(t)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(t){return this.__destroyed?this.__destroyError():this._open(null,t),this},option:function(t,e){return void 0===e?this.__options[t]:(this.__destroyed?this.__destroyError():(this.__options[t]=e,this.__optionsFormat(),0<=b.inArray(t,["trigger","triggerClose","triggerOpen"])&&this.__prepareOrigin(),"selfDestruction"===t&&this.__prepareGC()),this)},reposition:function(t,e){var n=this;return n.__destroyed?n.__destroyError():"closed"!=n.__state&&c(n._$origin)&&(e||c(n._$tooltip))&&(e||n._$tooltip.detach(),n.__Geometry=n.__geometry(),n._trigger({type:"reposition",event:t,helper:{geo:n.__Geometry}})),n},show:function(t){return this.open(t)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:"closed"!==this.__state,state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},b.fn.tooltipster=function(){var n,o,t,e,a,r,i=Array.prototype.slice.apply(arguments),s="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.";return 0===this.length?this:"string"==typeof i[0]?(n="#*$~&",this.each(function(){var t=b(this).data("tooltipster-ns");if(!(t=t?b(this).data(t[0]):null))throw new Error("You called Tooltipster's \""+i[0]+'" method on an uninitialized element');if("function"!=typeof t[i[0]])throw new Error('Unknown method "'+i[0]+'"');1<this.length&&"content"==i[0]&&(i[1]instanceof b||"object"==_typeof(i[1])&&null!=i[1]&&i[1].tagName)&&!t.__options.contentCloning&&t.__options.debug&&console.log(s);var e=t[i[0]](i[1],i[2]);if(e!==t||"instance"===i[0])return n=e,!1}),"#*$~&"!==n?n:this):(b.tooltipster.__instancesLatestArr=[],t=i[0]&&void 0!==i[0].multiple,o=t&&i[0].multiple||!t&&l.multiple,t=(t=i[0]&&void 0!==i[0].content)&&i[0].content||!t&&l.content,e=(e=i[0]&&void 0!==i[0].contentCloning)&&i[0].contentCloning||!e&&l.contentCloning,a=i[0]&&void 0!==i[0].debug,r=a&&i[0].debug||!a&&l.debug,1<this.length&&(t instanceof b||"object"==_typeof(t)&&null!=t&&t.tagName)&&!e&&r&&console.log(s),this.each(function(){var t=!1,e=b(this),n=e.data("tooltipster-ns"),a=null;!n||o?t=!0:r&&(console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)),t&&(a=new b.Tooltipster(this,i[0]),(n=n||[]).push(a.__namespace),e.data("tooltipster-ns",n),e.data(a.__namespace,a),a.__options.functionInit&&a.__options.functionInit.call(a,a,{origin:this}),a._trigger("init")),b.tooltipster.__instancesLatestArr.push(a)}),this)},e.prototype={__init:function(t){this.__$tooltip=t,this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto"),this.$container=b('<div class="tooltipster-ruler"></div>').append(this.__$tooltip).appendTo(v.window.document.body)},__forceRedraw:function(){var t=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(t)},constrain:function(t,e){return this.constraints={width:t,height:e},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:t}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""}),this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){this.__forceRedraw();var t,e,n,a=this.__$tooltip[0].getBoundingClientRect(),o={size:{height:a.height||a.bottom-a.top,width:a.width||a.right-a.left}};return this.constraints&&(t=this.__$tooltip.find(".tooltipster-content"),n=this.__$tooltip.outerHeight(),e=t[0].getBoundingClientRect(),n={height:n<=this.constraints.height,width:a.width<=this.constraints.width&&e.width>=t[0].scrollWidth-1},o.fits=n.height&&n.width),v.IE&&v.IE<=11&&o.size.width!==v.window.document.documentElement.clientWidth&&(o.size.width=Math.ceil(o.size.width)+1),o}};var n=navigator.userAgent.toLowerCase(),a=(-1!=n.indexOf("msie")?v.IE=parseInt(n.split("msie")[1]):-1!==n.toLowerCase().indexOf("trident")&&-1!==n.indexOf(" rv:11")?v.IE=11:-1!=n.toLowerCase().indexOf("edge/")&&(v.IE=parseInt(n.toLowerCase().split("edge/")[1])),"tooltipster.sideTip");return b.tooltipster._plugin({name:a,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(t){var e=this;e.__instance=t,e.__namespace="tooltipster-sideTip-"+Math.round(1e6*Math.random()),e.__previousState="closed",e.__options,e.__optionsFormat(),e.__instance._on("state."+e.__namespace,function(t){"closed"==t.state?e.__close():"appearing"==t.state&&"closed"==e.__previousState&&e.__create(),e.__previousState=t.state}),e.__instance._on("options."+e.__namespace,function(){e.__optionsFormat()}),e.__instance._on("reposition."+e.__namespace,function(t){e.__reposition(t.event,t.helper)})},__close:function(){this.__instance.content()instanceof b&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var t=b('<div class="tooltipster-base tooltipster-sidetip"><div class="tooltipster-box"><div class="tooltipster-content"></div></div><div class="tooltipster-arrow"><div class="tooltipster-arrow-uncropped"><div class="tooltipster-arrow-border"></div><div class="tooltipster-arrow-background"></div></div></div></div>');this.__options.arrow||t.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide(),this.__options.minWidth&&t.css("min-width",this.__options.minWidth+"px"),this.__options.maxWidth&&t.css("max-width",this.__options.maxWidth+"px"),this.__instance._$tooltip=t,this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var t=this;t.__options=t.__instance._optionsExtract(a,t.__defaults()),t.__options.position&&(t.__options.side=t.__options.position),"object"!=_typeof(t.__options.distance)&&(t.__options.distance=[t.__options.distance]),t.__options.distance.length<4&&(void 0===t.__options.distance[1]&&(t.__options.distance[1]=t.__options.distance[0]),void 0===t.__options.distance[2]&&(t.__options.distance[2]=t.__options.distance[0]),void 0===t.__options.distance[3])&&(t.__options.distance[3]=t.__options.distance[1]),t.__options.distance={top:t.__options.distance[0],right:t.__options.distance[1],bottom:t.__options.distance[2],left:t.__options.distance[3]},"string"==typeof t.__options.side&&(t.__options.side=[t.__options.side,{top:"bottom",right:"left",bottom:"top",left:"right"}[t.__options.side]],"left"==t.__options.side[0]||"right"==t.__options.side[0]?t.__options.side.push("top","bottom"):t.__options.side.push("right","left")),6===b.tooltipster._env.IE&&!0!==t.__options.arrow&&(t.__options.arrow=!1)},__reposition:function(l,c){var e,d=this,u=d.__targetFind(c),p=[],n=(d.__instance._$tooltip.detach(),d.__instance._$tooltip.clone()),_=b.tooltipster._getRuler(n),f=!1;switch((a=d.__instance.option("animation"))&&n.removeClass("tooltipster-"+a),b.each(["window","document"],function(t,o){var r=null;if(d.__instance._trigger({container:o,helper:c,satisfied:f,takeTest:function(t){r=t},results:p,type:"positionTest"}),1==r||0!=r&&0==f&&("window"!=o||d.__options.viewportAware))for(t=0;t<d.__options.side.length;t++){var i={horizontal:0,vertical:0},s=d.__options.side[t];"top"==s||"bottom"==s?i.vertical=d.__options.distance[s]:i.horizontal=d.__options.distance[s],d.__sideChange(n,s),b.each(["natural","constrained"],function(t,e){if(r=null,d.__instance._trigger({container:o,event:l,helper:c,mode:e,results:p,satisfied:f,side:s,takeTest:function(t){r=t},type:"positionTest"}),1==r||0!=r&&0==f){var n={container:o,distance:i,fits:null,mode:e,outerSize:null,side:s,size:null,target:u[s],whole:null},a=("natural"==e?_.free():_.constrain(c.geo.available[o][s].width-i.horizontal,c.geo.available[o][s].height-i.vertical)).measure();if(n.size=a.size,n.outerSize={height:a.size.height+i.vertical,width:a.size.width+i.horizontal},"natural"==e?c.geo.available[o][s].width>=n.outerSize.width&&c.geo.available[o][s].height>=n.outerSize.height?n.fits=!0:n.fits=!1:n.fits=a.fits,"window"==o&&(n.whole=!!n.fits&&("top"==s||"bottom"==s?c.geo.origin.windowOffset.right>=d.__options.minIntersection&&c.geo.window.size.width-c.geo.origin.windowOffset.left>=d.__options.minIntersection:c.geo.origin.windowOffset.bottom>=d.__options.minIntersection&&c.geo.window.size.height-c.geo.origin.windowOffset.top>=d.__options.minIntersection)),p.push(n),n.whole)f=!0;else if("natural"==n.mode&&(n.fits||n.size.width<=c.geo.available[o][s].width))return!1}})}}),d.__instance._trigger({edit:function(t){p=t},event:l,helper:c,results:p,type:"positionTested"}),p.sort(function(t,e){var n,a;return t.whole&&!e.whole?-1:!t.whole&&e.whole?1:t.whole&&e.whole?(n=d.__options.side.indexOf(t.side))<(a=d.__options.side.indexOf(e.side))||!(a<n)&&"natural"==t.mode?-1:1:t.fits&&!e.fits?-1:!t.fits&&e.fits?1:t.fits&&e.fits?(n=d.__options.side.indexOf(t.side))<(a=d.__options.side.indexOf(e.side))||!(a<n)&&"natural"==t.mode?-1:1:"document"==t.container&&"bottom"==t.side&&"natural"==t.mode?-1:1}),(e=p[0]).coord={},e.side){case"left":case"right":e.coord.top=Math.floor(e.target-e.size.height/2);break;case"bottom":case"top":e.coord.left=Math.floor(e.target-e.size.width/2)}switch(e.side){case"left":e.coord.left=c.geo.origin.windowOffset.left-e.outerSize.width;break;case"right":e.coord.left=c.geo.origin.windowOffset.right+e.distance.horizontal;break;case"top":e.coord.top=c.geo.origin.windowOffset.top-e.outerSize.height;break;case"bottom":e.coord.top=c.geo.origin.windowOffset.bottom+e.distance.vertical}"window"==e.container?"top"==e.side||"bottom"==e.side?e.coord.left<0?0<=c.geo.origin.windowOffset.right-this.__options.minIntersection?e.coord.left=0:e.coord.left=c.geo.origin.windowOffset.right-this.__options.minIntersection-1:e.coord.left>c.geo.window.size.width-e.size.width&&(c.geo.origin.windowOffset.left+this.__options.minIntersection<=c.geo.window.size.width?e.coord.left=c.geo.window.size.width-e.size.width:e.coord.left=c.geo.origin.windowOffset.left+this.__options.minIntersection+1-e.size.width):e.coord.top<0?0<=c.geo.origin.windowOffset.bottom-this.__options.minIntersection?e.coord.top=0:e.coord.top=c.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:e.coord.top>c.geo.window.size.height-e.size.height&&(c.geo.origin.windowOffset.top+this.__options.minIntersection<=c.geo.window.size.height?e.coord.top=c.geo.window.size.height-e.size.height:e.coord.top=c.geo.origin.windowOffset.top+this.__options.minIntersection+1-e.size.height):(e.coord.left>c.geo.window.size.width-e.size.width&&(e.coord.left=c.geo.window.size.width-e.size.width),e.coord.left<0&&(e.coord.left=0)),d.__sideChange(n,e.side),c.tooltipClone=n[0],c.tooltipParent=d.__instance.option("parent").parent[0],c.mode=e.mode,c.whole=e.whole,c.origin=d.__instance._$origin[0],c.tooltip=d.__instance._$tooltip[0],delete e.container,delete e.fits,delete e.mode,delete e.outerSize,delete e.whole,e.distance=e.distance.horizontal||e.distance.vertical;var t,a=b.extend(!0,{},e);d.__instance._trigger({edit:function(t){e=t},event:l,helper:c,position:a,type:"position"}),d.__options.functionPosition&&(a=d.__options.functionPosition.call(d,d.__instance,c,a))&&(e=a),_.destroy(),a="top"==e.side||"bottom"==e.side?(t={prop:"left",val:e.target-e.coord.left},e.size.width-this.__options.minIntersection):(t={prop:"top",val:e.target-e.coord.top},e.size.height-this.__options.minIntersection),t.val<this.__options.minIntersection?t.val=this.__options.minIntersection:t.val>a&&(t.val=a),a=c.geo.origin.fixedLineage?c.geo.origin.windowOffset:{left:c.geo.origin.windowOffset.left+c.geo.window.scroll.left,top:c.geo.origin.windowOffset.top+c.geo.window.scroll.top},e.coord={left:a.left+(e.coord.left-c.geo.origin.windowOffset.left),top:a.top+(e.coord.top-c.geo.origin.windowOffset.top)},d.__sideChange(d.__instance._$tooltip,e.side),c.geo.origin.fixedLineage?d.__instance._$tooltip.css("position","fixed"):d.__instance._$tooltip.css("position",""),d.__instance._$tooltip.css({left:e.coord.left,top:e.coord.top,height:e.size.height,width:e.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(t.prop,t.val),d.__instance._$tooltip.appendTo(d.__instance.option("parent")),d.__instance._trigger({type:"repositioned",event:l,position:e})},__sideChange:function(t,e){t.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+e)},__targetFind:function(t){var e={},n=this.__instance._$origin[0].getClientRects();return 1<n.length&&1==this.__instance._$origin.css("opacity")&&(this.__instance._$origin.css("opacity",.99),n=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1)),n.length<2?(e.top=Math.floor(t.geo.origin.windowOffset.left+t.geo.origin.size.width/2),e.bottom=e.top,e.left=Math.floor(t.geo.origin.windowOffset.top+t.geo.origin.size.height/2),e.right=e.left):(t=n[0],e.top=Math.floor(t.left+(t.right-t.left)/2),t=2<n.length?n[Math.ceil(n.length/2)-1]:n[0],e.right=Math.floor(t.top+(t.bottom-t.top)/2),t=n[n.length-1],e.bottom=Math.floor(t.left+(t.right-t.left)/2),t=2<n.length?n[Math.ceil((n.length+1)/2)-1]:n[n.length-1],e.left=Math.floor(t.top+(t.bottom-t.top)/2)),e}}}),b},"function"==typeof define&&define.amd?define(["jquery"],s):"object"==("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=s(require("jquery")):s(jQuery);var a,k={},o=(k.global="undefined"!=typeof wps_global?wps_global:[],k._=function(t){return t in this.global.i18n?this.global.i18n[t]:""},k.is_active=function(t){return 1===k.global.options[t]},k.ajax_queue={key:"wp-statistics",time:400},k.ajaxQ=function(a,o,e,r){var t=4<arguments.length&&void 0!==arguments[4]?arguments[4]:"GET",i=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];!1!==a&&"metabox"!==a||(a=k.global.meta_box_api),o.wps_nonce=k.global.rest_api_nonce,t={url:a,type:t,dataType:"json",crossDomain:!0,cache:!1,data:o,success:function(t){a===k.global.meta_box_api&&!0===i?(t.no_data?jQuery(k.meta_box_inner(o.name)).empty().html(k.no_meta_box_data()):(jQuery(k.meta_box_inner(o.name)).empty().html(k[e].view(t)),k[e].meta_box_init&&setTimeout(function(){k[e].meta_box_init(t)},150)),!k.is_active("overview_page")&&"index.php"!==k.global.page.file||k.meta_box_footer(o.name,t)):k[e](t)},error:function(t,e,n){a===k.global.meta_box_api&&!0===i?jQuery(k.meta_box_inner(o.name)).empty().html(k[r](t.responseText)):k[r](t.responseText)}},a===k.global.meta_box_api&&(t.beforeSend=function(t){t.setRequestHeader("Access-Control-Allow-Origin","*")}),jQuery.ajaxq(k.ajax_queue.key,t)},k.placeholder=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return'<div class="wps-ph-item"><div class="wps-ph-col-12">'.concat(k.placeholder_content("picture"),"").concat(k.placeholder_content("line"),"</div>")+(!1!==t?t:"")+"</div>"},k.line_placeholder=function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,e='<div class="wps-ph-item">',n=0;n<t;n++)e+='<div class="wps-ph-col-12"> <div class="wps-ph-row"><div class="wps-ph-col-6 big"></div><div class="wps-ph-col-4 empty big"></div><div class="wps-ph-col-4"></div><div class="wps-ph-col-8 empty"></div><div class="wps-ph-col-6"></div><div class="wps-ph-col-6 empty"></div><div class="wps-ph-col-12"></div> </div></div>';return e+"</div>"},k.rectangle_placeholder=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return'<div class="wps-ph-item'+(0<t.length?" "+t:"")+'"><div class="wps-ph-col-12">'.concat(k.placeholder_content("picture"),"</div></div>")},k.placeholder_content=function(){var t="";switch(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"line"){case"picture":t='<div class="wps-ph-picture"></div>';break;case"line":t='<div class="wps-ph-row"><div class="wps-ph-col-6 big"></div><div class="wps-ph-col-4 empty big"></div><div class="wps-ph-col-2 big"></div><div class="wps-ph-col-4"></div><div class="wps-ph-col-8 empty"></div><div class="wps-ph-col-6"></div><div class="wps-ph-col-6 empty"></div><div class="wps-ph-col-12"></div> </div>';break;case"circle":t='<div class="wps-ph-col-2"></div><div class="wps-ph-col-8"><div class="wps-ph-avatar"></div></div>'}return t},k.exist_tag=function(t){return jQuery(t).length},k.loading_button=function(t){t.classList.add("wps-loading-button")},k.date_picker=function(){var t=jQuery("input[data-wps-date-picker]");t.length&&(t.daterangepicker({singleDatePicker:!0,showDropdowns:!0,minYear:1998,drops:"up",opens:document.getElementById("TB_window")?"center":"right",maxYear:parseInt((new Date).getFullYear()+1),locale:{format:"YYYY-MM-DD"}}),t.on("show.daterangepicker",function(t,e){e=e.container,jQuery(e).addClass(t.target.className)}))},k.formatNumber=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;if(null===t)return null;if(t=parseFloat(t.toString().trim().replace(/[, ]/g,"")),isNaN(t))return null;if(0===t)return"0";e=!e||e<0?0:e;var n=parseInt(t).toPrecision(2).split("e");return((t=(n=1===n.length?0:Math.floor(Math.min(n[1].slice(1),14)/3))<1?t.toFixed(0+e):(t/Math.pow(10,3*n)).toFixed(1+e))<0?t:Math.abs(t))+["","K","M","B","T"][n]},k.select2=function(){jQuery("select[data-type-show=select2]").select2()},jQuery(".wps-select2")),t=jQuery("body"),A=jQuery(".wps-dropdown"),I=(o.length&&(s=jQuery(".wps-filter-page"),O=jQuery(".wps-filter-visitor"),a=t.hasClass("rtl")?"rtl":"ltr",t=s.length?s:O,c=function(t,n){o.select2({dropdownParent:t,dir:a,dropdownAutoWidth:!0,dropdownCssClass:"wps-select2-filter-dropdown",minimumInputLength:1,ajax:{delay:500,url:k.global.ajax_url,dataType:"json",data:function(t){var e,t={wps_nonce:k.global.rest_api_nonce,search:t.term,action:n,paged:t.page||1};return k.isset(k.global,"request_params")&&((e=k.global.request_params).author_id&&(t.author_id=e.author_id),e.page&&(t.page=e.page),e.pt&&(t.post_type=e.pt),e.pid)&&(t.post_id=e.pid),t},processResults:function(t){return t&&Array.isArray(t.results)?{results:t.results.map(function(t){return{id:t.id,text:t.text}}),pagination:{more:!1}}:(console.error("Expected an array of results but got:",t),{results:[]})},error:function(t,e,n){console.error("AJAX request error:",e,n)}}})},o.select2({dropdownParent:t,dir:a,dropdownAutoWidth:!0,dropdownCssClass:"wps-select2-filter-dropdown"}),o.on("select2:open",function(){return A.addClass("active")}),o.on("select2:close",function(){return A.removeClass("active")}),o.on("change",function(){var t=jQuery(this).find("option:selected").val();t&&(window.location.href=t)}),s.length&&(c(s,"wp_statistics_get_page_filter_items"),s.on("click",function(){return o.select2("open")})),O.length)&&(c(O,"wp_statistics_search_visitors"),O.on("click",function(){return o.select2("open")})),k.tooltip=function(){jQuery(".wps-tooltip").tooltipster({theme:"tooltipster-flat",contentCloning:!0}),jQuery("body").on("mouseenter touchstart",".wps-tooltip:not(.tooltipstered)",function(){e(this).tooltipster({theme:"tooltipster-flat"}).tooltipster("open")})},k.tooltip(),k.redirect=function(t){window.location.replace(t)},k.horizontal_bar=function(t,e,n,a){if(t=document.getElementById(t)){var o=t.parentNode,r=t.nextSibling,i=(o.removeChild(t),n.reduce(function(t,e){return t+e},0)),s=document.createElement("div");s.classList.add("wps-horizontal-bar");for(var l=0;l<n.length;l++){var c=i?n[l]/i*100:0,d=c%1==0?c.toFixed(0):c.toFixed(1),u=(d.endsWith(".0")&&(d=d.slice(0,-2)),document.createElement("div")),p=(u.classList.add("wps-horizontal-bar__item"),document.createElement("div")),_=(p.classList.add("wps-horizontal-bar__label-image-container"),a&&a[l]&&"undefined"!==a[l]&&((_=document.createElement("img")).src=a[l],_.alt=e[l],_.classList.add("wps-horizontal-bar__image"),p.appendChild(_)),document.createElement("div"));_.innerHTML=e[l],_.setAttribute("title",e[l]),_.classList.add("wps-horizontal-bar__label"),p.appendChild(_),u.appendChild(p);(p=document.createElement("div")).classList.add("wps-horizontal-bar__data-percent-container");var f=document.createElement("div");f.innerHTML="<span>".concat(k.formatNumber(n[l]),"</span><span>").concat(d,"%</span>"),f.classList.add("wps-horizontal-bar__data"),p.appendChild(f),u.appendChild(p),(f=document.createElement("div")).classList.add("wps-horizontal-bar__background"),f.style.width=c+"%",u.appendChild(f),s.appendChild(u)}r?o.insertBefore(s,r):o.appendChild(s)}},k.chart_id=function(t){return"wp-statistics-"+t+"-meta-box-chart"},k.wordpress_postbox_ajax=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"enable",e=jQuery(".postbox .hndle, .postbox .handlediv");"enable"===t?e.on("click",window.postboxes.handle_click):e.off("click",window.postboxes.handle_click)},k.isset=function(t){for(var e=Array.prototype.slice.call(arguments,1),n=0;n<e.length;n++){if(!t||!t.hasOwnProperty(e[n]))return!1;t=t[e[n]]}return!0},k.number_format=function(t,e,n,a){var o;if(null!=t&&isFinite(t))return e=e||(1<(o=t.toString().split(".").length)?o:0),n=n||".",a=a||",",(o=(t=(t=parseFloat(t).toFixed(e)).replace(".",n)).split(n))[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,a),o.join(n);throw new TypeError("number is not valid")},k.set_equal_height=function(t,e){var n=jQuery(t).height(),a=jQuery(e).height(),o=n;n<a&&(e=t,o=a),jQuery(e).css("height",o+"px")},k.Create_Half_PostBox=function(t,e){return'<div class="postbox-container wps-postbox-half '.concat(t,'"><div class="metabox-holder"><div class="meta-box-sortables"> <div class="postbox" id="').concat(e,'"> <div class="inside"></div></div></div></div></div>')},k.isIP=function(t){var e="(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)";return new RegExp("^".concat(e,"\\.").concat(e,"\\.").concat(e,"\\.").concat(e,"$")).test(t)},k.getLinkParams=function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return(e=(e=e||window.location.href).match(new RegExp("(?:[?&]"+t+"=)([^&]+)")))?e[1]:null},k.sum=function(t){return t.reduce(function(t,e){return t+e},0)},k.no_results=function(){return'<div class="o-wrap o-wrap--no-data wps-center">'+k._("no_result")+"</div>"},k.hex_to_rgba=function(t,e){t=(t=4===(t="string"!=typeof t||"#"!==t[0]||7!==t.length&&4!==t.length?"#3288D7":t).length?"#"+t[1].repeat(2)+t[2].repeat(2)+t[3].repeat(2):t).replace("#","");var n=parseInt(t.substring(0,2),16),a=parseInt(t.substring(2,4),16),t=parseInt(t.substring(4,6),16);return k.rgba_to_hex(n,a,t,e)},k.rgba_to_hex=function(t,e,n,a){return"#"+t.toString(16).padStart(2,"0")+e.toString(16).padStart(2,"0")+n.toString(16).padStart(2,"0")+Math.round(255*a).toString(16).padStart(2,"0")},k.setTooltipPosition=function(t,e,n){var a=e.canvas,e=a.offsetLeft,o=a.offsetTop,r=a.clientWidth,a=a.clientHeight,i=n,n=i.caretX,i=i.caretY,s=t.offsetWidth,l=t.offsetHeight,c=e+n+16,i=o+i-l/2;(c=e+r<c+s+16?e+n-s-16:c)<e+16&&(c=e+16),(i=i<o+16?o+16:i)+l+16>o+a&&(i=o+a-l-16),t.style.opacity=1,t.style.left=c+"px",t.style.top=i+"px"},{id:"drawVerticalLine",beforeDatasetDraw:function(t){var e=t,t=e.ctx,n=(_objectDestructuringEmpty(e.scales),e.tooltip),e=e.chartArea,a=e.top,e=e.bottom;n&&n._active&&n._active.length&&(n=n._active[0].element.x,t.beginPath(),t.strokeStyle="#A9AAAE",t.lineWidth=1,t.setLineDash([6,6]),t.moveTo(n,a),t.lineTo(n,e),t.stroke(),t.setLineDash([]))}}),C=function(t){var e={d:"DD",j:"D",S:"Do",n:"M",m:"MM",F:"MMM",M:"MMM",y:"YY",Y:"YYYY"};return t.replace(/([a-zA-Z])/g,function(t){return e[t]||t})};function z(){var t=window.outerWidth||document.documentElement.clientWidth,e=document.getElementById("feedback-bird-app"),n=document.querySelector(".c-fbb-widget__header__title"),a=document.querySelector(".wps-mobileMenuContent>div:last-child"),o=document.querySelector(".wps-adminHeader__side");e&&document.body.classList.contains("wps_page")&&(t<=1030?(t=e.parentNode.removeChild(e),a.parentNode.insertBefore(t,a)):(t=e.parentNode.removeChild(e),o.appendChild(t)),e.style.display="block",e.setAttribute("title",n.innerHTML))}k.new_line_chart=function(f,t){var n,a,c,e,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"line",i=k.isset(k.global,"options","wp_date_format")?k.global.options.wp_date_format:"MM/DD/YYYY",h=C(i),g=null!==document.getElementById(t).closest("#dashboard-widgets"),i=function(s,l,c){var t,d=[],u=[],p=l.map(function(){return[]}),_=[],f=null==(t=s[0])?void 0:t.date;return s.forEach(function(t,e){var n,a,o,r,i=moment(t.date);i.isValid()?(i="week"===c&&0===i.day()||"month"===c&&i.date()===i.daysInMonth(),_.push(_objectSpread(_objectSpread({},t),{},{index:e})),!i&&e!==s.length-1||(i=(null==(n=s[e])?void 0:n.date)||f,d.push((n=f,a=i,o=c,r=h.replace(/,?\s?(YYYY|YY)[-/\s]?,?|[-/\s]?(YYYY|YY)[-/\s]?,?/g,""),"month"===o?moment(n).format("MMM YYYY"):g?moment(n).format(r)+" to "+moment(a).format(r):moment(n).format(r)+" to "+moment(a).format(h))),"month"===c&&u.push((o=f,n=i,r=h.replace(/,?\s?(YYYY|YY)[-/\s]?,?|[-/\s]?(YYYY|YY)[-/\s]?,?/g,""),moment(o).format(r)+" to "+moment(n).format(h))),l.forEach(function(n,t){var e=_.reduce(function(t,e){return e=n.data[e.index],isNaN(e)||null==e?t:t+e},0);p[t].push(e)}),_=[],f=(null==(a=s[e+1])?void 0:a.date)||"")):console.error("Invalid date found at index ".concat(e,":"),t.date)}),{aggregatedLabels:d,aggregatedData:p,monthTooltipTitle:u}},m=f.data.labels.map(function(t){return t.formatted_date}),w=[],y=[],b=[],s=m.length,l="performance"===r&&2<f.data.datasets.length,v=s<=("performance"===r?30:60)?"day":s<=180?"week":"month",d=(f.previousData&&0<f.previousData.datasets.length&&(w=f.previousData.labels.map(function(t){return t.formatted_date})),"week"!=v&&"month"!=v||(n=i(f.data.labels,f.data.datasets,v),m=n.aggregatedLabels,f.data.datasets.forEach(function(t,e){t.data=n.aggregatedData[e]}),f.previousData&&0<f.previousData.datasets.length&&(a=i(f.previousData.labels,f.previousData.datasets,v),w=a.aggregatedLabels,f.previousData.datasets.forEach(function(t,e){t.data=a.aggregatedData[e]}),b=a.monthTooltipTitle),y=n.monthTooltipTitle),{Total:"#27A765",Views:"#7362BF",Visitors:"#3288D7",Posts:"#8AC3D0",Other1:"#3288D7",Other2:"#7362BF",Other3:"#8AC3D0"}),u=[.1,.3,.5,.7],r=document.getElementById(t).getContext("2d"),p=[],_=(Object.keys(f.data.datasets).forEach(function(t,e){var n=d[f.data.datasets[t].label]||d["Other"+(e+1)];p.push(l&&2===e?{type:"bar",label:f.data.datasets[t].label,data:f.data.datasets[t].data,backgroundColor:n,hoverBackgroundColor:n,hoverPointBackgroundColor:n,yAxisID:"y1"}:{type:"line",label:f.data.datasets[t].label,data:f.data.datasets[t].data,borderColor:n,backgroundColor:n,fill:!1,yAxisID:"y",borderWidth:2,pointRadius:0,pointBorderColor:"transparent",pointBackgroundColor:n,pointBorderWidth:2,hoverPointRadius:6,hoverPointBorderColor:"#fff",hoverPointBackgroundColor:n,hoverPointBorderWidth:4,tension:u[e%u.length],hitRadius:10})}),null!=f&&f.previousData&&Object.keys(f.previousData.datasets).forEach(function(t,e){var n=d[f.previousData.datasets[t].label]||d["Other"+e],e=u[e%u.length];p.push({type:"line",label:f.previousData.datasets[t].label+" (Previous)",data:f.previousData.datasets[t].data,borderColor:k.hex_to_rgba(n,.7),hoverBorderColor:n,backgroundColor:n,fill:!1,yAxisID:"y",borderWidth:1,borderDash:[5,5],pointRadius:0,pointBorderColor:"transparent",pointBackgroundColor:n,pointBorderWidth:2,hoverPointRadius:6,hoverPointBorderColor:"#fff",hoverPointBackgroundColor:n,hoverPointBorderWidth:4,tension:e,hitRadius:10})}),s={maintainAspectRatio:!1,resizeDelay:200,animation:{duration:0},responsive:!0,interaction:{intersect:!1,mode:"index"},plugins:{legend:!1,tooltip:{enabled:!1,external:function(t){return i=f,s=v,o=m,l=w,r=y,c=b,_=(n=t=t).chart,n=n.tooltip,t=Q(_),void(0===n.opacity?t.style.opacity=0:n.body&&(e=n.title||[],d=n.dataPoints[0].dataIndex,u=_.data.datasets,p="<div>",e.forEach(function(t){var e,n=(i.data||i).labels[d],a=n.date,n=n.day;"day"===s?(e=k.isset(k.global,"options","wp_date_format")?k.global.options.wp_date_format:"MM/DD/YYYY",e=C(e),p+='<div class="chart-title">'.concat(moment(a).format(e)," (").concat(n,")</div>")):p+='<div class="chart-title">'.concat(("month"===s?r:o)[d]," </div>")}),u.forEach(function(e,n){var t=_.getDatasetMeta(n),a=_.data.datasets.find(function(t,e){return t.label===u[n].label+" (Previous)"&&_.getDatasetMeta(e)}),o=e.data[d],r=e.label.includes("(Previous)");t.hidden||r||(p+='<div class="current-data"><div><span class="current-data__color" style="background-color: '.concat(e.hoverPointBackgroundColor,';"></span>').concat(e.label,'</div><span class="current-data__value">').concat(o.toLocaleString(),"</span></div>")),null!=i&&i.previousData&&a&&!_.getDatasetMeta(_.data.datasets.indexOf(a)).hidden&&(t=i.previousData.datasets.find(function(t){return t.label===e.label.replace(" (Previous)","")}),a=(o=document.querySelector(".wps-postbox-chart--previousPeriod"))&&o.classList.contains("wps-line-through"),void 0===t||""===t||!t.data||r||a||(o=t.data[d],t=null,t="day"===s?(r=k.isset(k.global,"options","wp_date_format")?k.global.options.wp_date_format:"MM/DD/YYYY",a=C(r),moment(i.previousData.labels[d].date).format(a)):("month"===s?c:l)[d],p+='<div class="previous-data"><div><span class="previous-data__colors"><span class="previous-data__color" style="background-color: '.concat(e.hoverPointBackgroundColor,';"></span><span class="previous-data__color" style="background-color: ').concat(e.hoverPointBackgroundColor,';"></span></span>').concat(t,'</div><span class="previous-data__value"> ').concat(o.toLocaleString(),"</span></div>")))}),p+="</div>",t.innerHTML=p,k.setTooltipPosition(t,_,n)));var i,s,o,l,r,c,e,d,u,p,n,_},callbacks:{title:function(t){return t[0].label},label:function(t){return t.formattedValue}}}},scales:{x:{offset:m.length<=1,grid:{display:!1,drawBorder:!1,tickLength:0,drawTicks:!1},border:{color:"transparent",width:0},ticks:{align:"inner",autoSkip:!0,maxTicksLimit:g?"week"==v?2:4:"week"==v?3:"month"==v?7:9,font:{color:"#898A8E",style:"italic",weight:"lighter",size:g?"week"==v?9:11:"week"==v?11:13},padding:8}},y:{min:0,suggestedMax:4,ticks:{maxTicksLimit:g?4:7,fontColor:"#898A8E",fontSize:13,fontStyle:"italic",fontWeight:"lighter ",padding:8,lineHeight:15,stepSize:1},border:{color:"transparent",width:0},type:"linear",position:"right",grid:{display:!0,tickMarkLength:0,drawBorder:!1,tickColor:"#EEEFF1",color:"#EEEFF1"},gridLines:{drawTicks:!1},title:{display:!1}}}},l&&(s.scales.y1={type:"linear",position:"left",border:{color:"transparent",width:0},grid:{display:!1,drawBorder:!1,tickLength:0},ticks:{maxTicksLimit:7,fontColor:"#898A8E",fontSize:13,fontStyle:"italic",fontFamily:'"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',fontWeight:"lighter ",padding:8,lineHeight:15,stepSize:1},title:{display:!0,text:k._("published")+" Posts",color:"#898A8E",fontSize:13}},s.scales.y={border:{color:"transparent",width:0},ticks:{maxTicksLimit:9,fontColor:"#898A8E",fontSize:13,fontStyle:"italic",fontFamily:'"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',fontWeight:"lighter ",padding:8,lineHeight:15,stepSize:1},position:l?"right":"left",grid:{display:!0,borderDash:[5,5],tickColor:"#EEEFF1",color:"#EEEFF1"},title:{display:!0,text:k._("visits"),color:"#898A8E",fontSize:13}}),s=Object.assign({},s,o),new Chart(r,{type:l?"bar":"line",data:{labels:m,datasets:p},plugins:[I],options:s})),x=(o=document.getElementById(t)).parentElement.parentElement.querySelector(".wps-postbox-chart--items");return x&&(x.innerHTML="",p.sort(function(t,e){return"Total"===t.label?-1:"Total"===e.label?1:"Total (Previous)"===t.label?-1:"Total (Previous)"===e.label?1:0}),(c=o.parentElement.parentElement.querySelector(".wps-postbox-chart--previousPeriod"))&&(e=!1,p.forEach(function(t){t.label.includes("(Previous)")&&(e=!0)}),e)&&(c.style.display="flex",c.style.cursor="pointer",c.addEventListener("click",function(){var n=c.classList.contains("wps-line-through");c.classList.toggle("wps-line-through"),p.forEach(function(t,e){t.label.includes("(Previous)")&&(_.getDatasetMeta(e).hidden=!n)}),x.querySelectorAll(".previous-data").forEach(function(t){n?t.classList.remove("wps-line-through"):t.classList.add("wps-line-through")}),_.update()})),p.forEach(function(n,a){var t,e,o,r,i,s,l;n.label.includes("(Previous)")||(t=n.data.reduce(function(t,e){return Number(t)+Number(e)},0),0<((o=e=null)==f||null==(i=f.previousData)?void 0:i.datasets.length)&&(r=f.previousData.datasets.find(function(t,e){return t.label===n.label&&(o=e,!0)}))&&r.data&&(e=r.data.reduce(function(t,e){return Number(t)+Number(e)},0)),(r=document.createElement("div")).className="wps-postbox-chart--item",i=null!==e?'<div class="previous-data"><span><span class="wps-postbox-chart--item--color" style="border-color: '.concat(n.borderColor,'"></span><span class="wps-postbox-chart--item--color" style="border-color: ').concat(n.borderColor,'"></span></span>').concat(e.toLocaleString(),"</div>"):"",r.innerHTML="<span>".concat(n.label,'</span><div><div class="current-data"><span class="wps-postbox-chart--item--color" style="border-color: ').concat(n.borderColor,'"></span>').concat(t.toLocaleString(),"</div>").concat(i,"</div>"),(s=r.querySelector(".current-data")).addEventListener("click",function(){var t=_.getDatasetMeta(a);t.hidden=!t.hidden,s.classList.toggle("wps-line-through"),_.update()}),(l=r.querySelector(".previous-data"))&&null!==o&&l.addEventListener("click",function(){var t=_.data.datasets.find(function(t,e){return t.label===p[a].label+" (Previous)"&&_.getDatasetMeta(e)});t&&(t=_.data.datasets.indexOf(t),(t=_.getDatasetMeta(t)).hidden=!t.hidden,l.classList.toggle("wps-line-through"),t=x.querySelectorAll(".previous-data"),t=Array.from(t).every(function(t){return t.classList.contains("wps-line-through")}),c&&(t?c.classList.add("wps-line-through"):c.classList.remove("wps-line-through")),_.update())}),x.appendChild(r))})),k.new_line_chart.aggregateData=i,_},jQuery(document).ready(function(){var t=document.querySelectorAll(".wps-head-filters__item"),e=(t.forEach(function(n){n.classList.remove("loading"),n.addEventListener("click",function(t){var e=n.querySelector(".dropdown-content");e&&e.classList.toggle("show")})}),jQuery(".wps-search-dropdown"));e.on("click",function(t){t.stopPropagation()}),e.on("input",function(){var t=jQuery(this).val().toLowerCase();jQuery(this).parent().find(".dropdown-item").each(function(){-1<(jQuery(this).text()||jQuery(this).innerText).toLowerCase().indexOf(t)?jQuery(this).show():jQuery(this).hide()})}),window.addEventListener("click",function(n){t.forEach(function(t){var e=t.querySelector(".dropdown-content");e&&!t.contains(n.target)&&e.classList.remove("show")})})}),jQuery(document).ready(function(){var t=document.querySelector(".wp-header-end"),e=document.querySelector(".notice.notice-warning.update-nag");t&&e&&t.parentNode.insertBefore(e,t.nextSibling)}),window.addEventListener("resize",z),jQuery(document).ready(function(){z();var t=document.querySelectorAll(".wps-admin-header__link--has-dropdown"),e=(t.forEach(function(e){e.addEventListener("click",function(t){t.preventDefault(),(t=this.nextElementSibling)&&(t.classList.toggle("is-open"),e.classList.toggle("is-open"))})}),document.addEventListener("click",function(n){t.forEach(function(t){var e=t.nextElementSibling;!e||t.contains(n.target)||e.contains(n.target)||e.classList.remove("is-open")})}),document.querySelector(".wp-header-end")),n=document.querySelector(".notice.notice-warning.update-nag");e&&n&&e.parentNode.insertBefore(n,e.nextSibling)});function B(){r&&(r.style.display="none",document.body.style.overflow="")}var $,t=document.querySelectorAll(".js-wps-premiumModalClose"),r=document.querySelector(".js-wps-premiumModal"),i=document.querySelector(".js-wps-premiumModalWelcomeContent"),U=document.querySelector(".js-wps-premiumModalSteps"),n=document.querySelectorAll(".js-wps-premiumModalStep"),R=document.querySelectorAll(".js-wps-premiumModal-welcome .js-wps-premiumModalStep"),s=document.querySelector(".js-wps-premiumModalExploreBtn"),l=document.querySelectorAll(".js-wps-premiumStepFeature"),c=document.querySelectorAll(".js-wps-openPremiumModal"),d=document.querySelectorAll(".wps-premium-step__action-container"),u=document.querySelectorAll(".js-wps-premium-steps__title"),W=document.querySelectorAll(".js-wps-premium-first-step__head"),N=document.querySelectorAll(".js-wps-premium-steps__head"),p=1,H=function(){var a;0!==n.length&&(a=0,n.forEach(function(t){var e=t.style.display,n=(t.style.display="block",t.style.minHeight="auto",t.getBoundingClientRect().height);a=Math.max(a,n),t.style.display=e}),n.forEach(function(t){t.style.minHeight=a+"px"}))},F=(window.addEventListener("resize",H),0<c.length&&c.forEach(function(n){n.addEventListener("click",function(t){t.preventDefault();var e,t=n.getAttribute("href"),t=n.getAttribute("data-target");e=t,r&&(r.style.display="block",document.body.style.overflow="hidden"),-1!==(t=Array.from(l).findIndex(function(t){return t.getAttribute("data-modal")===e}))&&(p=t,i&&(i.style.display="none"),F(),_(p+1),U.style.display="block",X())})}),0<t.length&&t.forEach(function(t){t.addEventListener("click",B)}),n.forEach(function(t){t.classList.remove("wps-modal__premium-step--active")}),s&&s.addEventListener("click",function(){p=0,F(),i.style.display="none",U.style.display="block",_(p),G()}),function(){document.querySelectorAll(".wps-premium-step__image").forEach(function(t){t.src=t.dataset.src})}),_=function(t){var e;setTimeout(function(){H()},100),t<0||t>=n.length||(n.forEach(function(t){return t.classList.remove("wps-modal__premium-step--active")}),d&&0<d.length&&(d.forEach(function(t){t&&t.classList.remove("active")}),d[t-1])&&d[t-1].classList.add("active"),u&&0<u.length&&(u.forEach(function(t){t&&t.classList.remove("active")}),u[t-1])&&u[t-1].classList.add("active"),l.forEach(function(t){return t.classList.remove("active")}),n[t].classList.add("wps-modal__premium-step--active"),e=function(t,e){t.forEach(function(t){t.style.display=e})},0<t?(e(W,"none"),e(N,"block"),l[t-1].classList.add("active")):(e(W,"block"),e(N,"none")))},G=function(){$=setInterval(function(){p=(p+1)%R.length,_(p)},5e3)},X=function(){clearInterval($)};0<l.length&&l.forEach(function(t,e){t.addEventListener("click",function(){X(),_(p=e+1)})});new(function(){return _createClass(function t(){_classCallCheck(this,t),this.init()},[{key:"init",value:function(){var n=this;document.addEventListener("click",function(t){var e=t.target.closest('[class*="js-openModal-"]');(e=e&&n.extractModalIdFromClass(e.classList))&&n.openModal(e),(e=t.target.closest("button[data-action]"))&&(t=e.getAttribute("data-action"))&&(e=e.closest(".wps-modal"),n.handleModalAction(e,t))}),this.attachOpenEvent(),this.attachCloseEvent()}},{key:"attachOpenEvent",value:function(){var e=this;document.addEventListener("click",function(t){(t=(t=t.target.closest('[class*="js-openModal-"]'))&&e.extractModalIdFromClass(t.classList))&&e.openModal(t)})}},{key:"extractModalIdFromClass",value:function(t){var e,n=_createForOfIteratorHelper(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;if(a.startsWith("js-openModal-"))return a.replace("js-openModal-","").toLowerCase()}}catch(t){n.e(t)}finally{n.f()}return null}},{key:"openModal",value:function(t){var e=document.getElementById(t);e?e.classList.add("wps-modal--open"):console.error('Modal with ID "'.concat(t,'" not found.'))}},{key:"attachCloseEvent",value:function(){document.addEventListener("click",function(t){(t=(t=t.target.closest(".wps-modal__close"))&&t.closest(".wps-modal"))&&t.classList.remove("wps-modal--open")})}},{key:"handleModalAction",value:function(t,e){switch(e){case"resolve":break;case"closeModal":this.closeModal(t);break;default:console.warn("Unknown action:",e)}}},{key:"closeModal",value:function(t){t.classList.remove("wps-modal--open")}}])}());var V,f,K,Z,h,J,g,m,w,tt,y,b,v,et,nt,x,E,j,at,D,T,M,S,Y,P,O=document.querySelector(".wps-admin-column__unlock"),c=document.querySelector(".wp-list-table"),t=(O&&c&&c.classList.add("wps-admin-mini-chart__unlock"),k.sanitize_meta_box_name=function(t){return t.replace(new RegExp("-","g"),"_")},k.get_meta_box_method=function(t){return this.sanitize_meta_box_name(t)+"_meta_box"},k.getMetaBoxKey=function(t){return"wp-statistics-"+t+"-widget"},k.no_meta_box_data=function(){return'<div class="o-wrap o-wrap--no-data">'+k._("no_data")+"</div>"},k.error_meta_box_data=function(t){if(void 0!==t)try{var e=JSON.parse(t);if(k.isset(e,"message"))return'<div class="o-wrap o-wrap--no-data">'+e.message+"</div>"}catch(e){console.log("An unexpected error occurred: ",t,e)}return'<div class="o-wrap o-wrap--no-data">'+k._("rest_connect")+"</div>"},k.get_meta_box_info=function(t){return t in k.global.meta_boxes?k.global.meta_boxes[t]:[]},k.meta_box_lang=function(t,e){return e in k.global.meta_boxes[t].lang?k.global.meta_boxes[t].lang[e]:""},k.meta_box_inner=function(t){return"#"+k.getMetaBoxKey(t)+" div.inside"},k.meta_box_name_by_id=function(t){return t.split("statistics-").pop().split("-widget")[0]},k.meta_box_button=function(t){var e="#"+k.getMetaBoxKey(t)+" .handle-actions button:first",n=(k.get_meta_box_info(t),"right");k.is_active("rtl")&&(n="left"),jQuery("#"+k.getMetaBoxKey(t)+" button[class*=wps-refresh]").remove(),jQuery('<button class="handlediv wps-refresh"'+(k.is_active("gutenberg")?' style="z-index: 9999;position: absolute;top: 1px;display:none;right: calc(44px + 3.24rem) !important;height: 44px !important;'.concat(n,': 3%;" '):'style="line-height: 28px;"')+' type="button" title="'+k._("reload")+'"></button>').insertBefore(e),k.is_active("gutenberg")&&jQuery("body").addClass("wps-gutenberg"),jQuery("#"+k.getMetaBoxKey(t)+" .hndle, #"+k.getMetaBoxKey(t)+" .handlediv").on("click",function(){jQuery(this).closest(".postbox").addClass("handle")})},k.meta_box_tooltip=function(t){var e,n="#"+k.getMetaBoxKey(t)+" h2.hndle";(t=k.get_meta_box_info(t)).hasOwnProperty("description")&&(jQuery(n).text(),e='<a href="#" class="wps-tooltip" title="'+(t=t.description)+'"><i class="wps-tooltip-icon"></i></a>',t)&&jQuery(n).append(e)},k.run_meta_box=function(t){var e,n,a=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];k.exist_tag("#"+k.getMetaBoxKey(t))&&(k.is_active("gutenberg")||!k.is_active("gutenberg")&&jQuery("#"+k.getMetaBoxKey(t)).is(":visible"))&&(n=jQuery(k.meta_box_inner(t)),e=k.get_meta_box_method(t),k.meta_box_tooltip(t),e in k)&&("placeholder"in k[e]?n.html(k[e].placeholder()):n.html(k.placeholder()),!0===o&&k.meta_box_button(t),!(n={name:t})!==a&&(n=Object.assign(a,n)),"params"in k[e]&&(n=Object.assign(n,k[e].params())),k.ajaxQ("metabox",n,e,"error_meta_box_data"))},k.prepare_date_filter_data=function(t){var e={ago:""};return t.hasOwnProperty("footer_options")&&(t=t.footer_options.default_date_filter).length&&("filter"==(t=t.split("|"))[0]?e.ago=t[1]:(t=t[1].split(":"),e.ago="",e.from=t[1],e.to=t[2])),e},k.run_meta_boxes=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];(t=!1===t?Object.keys(k.global.meta_boxes):t).forEach(function(t){var e=k.global.meta_boxes[t],e=k.prepare_date_filter_data(e);k.run_meta_box(t,e)})},k.meta_box_footer=function(n,t){var e,a={filter_by_date:!1,default_date_filter:"",display_more_link:!1,more_link_title:""},o=k.global.meta_boxes[n],r=(o.hasOwnProperty("footer_options")&&Object.assign(a,o.footer_options),""),i=(t.hasOwnProperty("filter")?r=t.filter:void 0!==a.default_date_filter&&(r=a.default_date_filter),""),s=(t.hasOwnProperty("filter_start_date")&&(i=t.filter_start_date),""),l=(t.hasOwnProperty("filter_end_date")&&(s=t.filter_end_date),""),c=(t.hasOwnProperty("from")&&(l=t.from),"");t.hasOwnProperty("to")&&(c=t.to),(a.filter_by_date||a.display_more_link)&&(e='<div class="c-footer"><div class="c-footer__filter js-widget-filters">',a.filter_by_date&&(e+='<button class="c-footer__filter__btn js-filters-toggle">'+k._("str_"+r)+'</button><div class="c-footer__filters"><div class="c-footer__filters__current-filter"><span class="c-footer__current-filter__title js-filter-title">Last 7 days</span><span class="c-footer__current-filter__date-range hs-filter-range">May 12,2020-May 20, 2020</span></div><div class="c-footer__filters__list"><button data-metabox-key="'.concat(n,'" data-filter="today" class="c-footer__filters__list-item">')+k._("str_today")+'</button><button data-metabox-key="'.concat(n,'" data-filter="yesterday" class="c-footer__filters__list-item">')+k._("str_yesterday")+'</button><button data-metabox-key="'.concat(n,'" data-filter="this_week" class="c-footer__filters__list-item">')+k._("str_this_week")+'</button><button data-metabox-key="'.concat(n,'" data-filter="last_week" class="c-footer__filters__list-item">')+k._("str_last_week")+'</button><button data-metabox-key="'.concat(n,'" data-filter="this_month" class="c-footer__filters__list-item">')+k._("str_this_month")+'</button><button data-metabox-key="'.concat(n,'" data-filter="last_month" class="c-footer__filters__list-item">')+k._("str_last_month")+"</button><button class=\"c-footer__filters__list-item c-footer__filters__list-item--more\" onclick=\"jQuery(this).closest('.c-footer__filters__list').find('.js-more-filters').addClass('is-open')\">"+k._("str_more")+'</button><div class="c-footer__filters__more-filters js-more-filters"><button data-metabox-key="'.concat(n,'" data-filter="7days" class="c-footer__filters__list-item">')+k._("str_7days")+'</button><button data-metabox-key="'.concat(n,'" data-filter="30days" class="c-footer__filters__list-item">')+k._("str_30days")+'</button><button data-metabox-key="'.concat(n,'" data-filter="90days" class="c-footer__filters__list-item">')+k._("str_90days")+'</button><button data-metabox-key="'.concat(n,'" data-filter="6months" class="c-footer__filters__list-item">')+k._("str_6months")+'</button><button data-metabox-key="'.concat(n,'" data-filter="this_year" class="c-footer__filters__list-item">')+k._("str_this_year")+"</button><button class=\"c-footer__filters__close-more-filters\" onclick=\"jQuery(this).closest('.js-more-fi' + 'lters').removeClass('is-open')\">"+k._("str_back")+'</button></div><input type="text" class="c-footer__filters__custom-date-input js-datepicker-input"/><button data-metabox-key="'.concat(n,'" data-filter="custom" class="c-footer__filters__list-item c-footer__filters__list-item--custom js-custom-datepicker">')+k._("str_custom")+"</button></div></div>"),e+='</div><div class="c-footer__more">',a.display_more_link&&(e+='<a class="c-footer__more__link" href="'+o.page_url+'">'.concat(a.more_link_title,'<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.4191 7.98577L7.73705 5.22727L8.44415 4.5L12.3333 8.50003L8.44415 12.5L7.73705 11.7727L10.4191 9.01429H4.33325V7.98577H10.4191Z" fill="#56585A"/></svg></a>')),e+="</div></div>",jQuery(k.meta_box_inner(n)).append(e),(t=jQuery(k.meta_box_inner(n)).find(".js-datepicker-input").first()).daterangepicker({autoApply:!0}),t.on("apply.daterangepicker",function(t,e){k.run_meta_box(n,{from:e.startDate.format("YYYY-MM-DD"),to:e.endDate.format("YYYY-MM-DD")})}),jQuery(".js-filters-toggle:not(.is-ready)").on("click",function(){jQuery(".js-widget-filters").removeClass("is-active"),jQuery(".postbox").removeClass("has-focus"),jQuery(this).closest(".js-widget-filters").toggleClass("is-active"),jQuery(this).closest(".postbox").toggleClass("has-focus"),jQuery(this).hasClass("is-active")||jQuery(this)[0].getBoundingClientRect().top<350&&jQuery(this).closest(".js-widget-filters").addClass("is-down")}),jQuery(".js-filters-toggle:not(.is-ready)").addClass("is-ready"),k.set_date_filter_as_selected(n,r,i,s,l,c))},k.set_date_filter_as_selected=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"30days",n=2<arguments.length?arguments[2]:void 0,a=3<arguments.length?arguments[3]:void 0,o=4<arguments.length?arguments[4]:void 0,r=5<arguments.length?arguments[5]:void 0,i=jQuery(k.meta_box_inner(t)),s=jQuery(i).find(".c-footer__filter__btn"),l=jQuery(i).find(".c-footer__filters__list"),c=jQuery(i).find(".c-footer__current-filter__title"),i=jQuery(i).find(".c-footer__current-filter__date-range");(e=e||"30days").length&&(l.find("button[data-filter]").removeClass("is-selected"),l.find('button[data-filter="'+e+'"').addClass("is-selected"),s.text(k._("str_"+e)),c.text(k._("str_"+e)),"custom"==e)&&(s.text(n+" - "+a),(l=jQuery(k.meta_box_inner(t)).find(".js-datepicker-input").first()).data("daterangepicker").setStartDate(moment(o).format("MM/DD/YYYY")),l.data("daterangepicker").setEndDate(moment(r).format("MM/DD/YYYY"))),n.length&&a.length&&i.text(n+" - "+a)},jQuery(document).on("click","button[data-filter]:not(.c-footer__filters__list-item--custom)",function(){k.run_meta_box(jQuery(this).attr("data-metabox-key"),{ago:jQuery(this).attr("data-filter")})}),jQuery(document).on("mouseenter mouseleave",".wps-refresh, .wps-more",function(t){"mouseenter"===t.type?k.wordpress_postbox_ajax("disable"):k.wordpress_postbox_ajax("enable")}),jQuery(document).on("click",'input[type=checkbox][id^="wp-statistics-"][id$="-widget-hide"]',function(){var t;jQuery(this).is(":checked")&&(t=jQuery(this).attr("id"),t=k.meta_box_name_by_id(t),k.run_meta_box(t))}),k.btn_group_chart=function(e){var n,t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],a={7:k._("str_week"),30:k._("str_month"),365:k._("str_year")},o=("ago"==t.type&&(n=parseInt(t.days)),'<div class="wps-btn-group"><div class="btn-group" role="group">');return Object.keys(a).forEach(function(t){o+='<button type="button" class="btn '+(t==n?"btn-primary":"btn-default")+'" data-chart-time="'.concat(e,'" data-time="').concat(t,'">').concat(a[t],"</button>")}),o=(o=o+('<button type="button" class="btn '+("between"==t.type?"btn-primary":"btn-default")+'" data-custom-date-picker="'.concat(e,'">').concat(k._("custom"),"</button>"))+"</div></div>")+'<div data-chart-date-picker="'.concat(e,'"')+("ago"==t.type?' style="display:none;"':"")+'><input type="text" size="18" name="date-from" data-wps-date-picker="from" value="'.concat(t.from,'" placeholder="YYYY-MM-DD" autocomplete="off">')+k._("to")+'<input type="text" size="18" name="date-to" data-wps-date-picker="to" value="'.concat(t.to,'" placeholder="YYYY-MM-DD" autocomplete="off"><input type="submit" value="')+k._("go")+'" data-between-chart-show="'.concat(e,'" class="button-primary"><input type="hidden" name="" id="date-from" value="').concat(t.from,'"><input type="hidden" name="" id="date-to" value="').concat(t.to,'"></div>')},jQuery(document).on("click",".wps-btn-group button",function(){jQuery(".wps-btn-group button").attr("class","btn btn-default"),jQuery(this).attr("class","btn btn-primary")}),jQuery(document).on("click","button[data-custom-date-picker]",function(){jQuery("div[data-chart-date-picker= "+jQuery(this).attr("data-custom-date-picker")+"]").slideDown()}),jQuery(document).on("click","button[data-chart-time]",function(){k.run_meta_box(jQuery(this).attr("data-chart-time"),{ago:jQuery(this).attr("data-time"),"no-data":"no"})}),jQuery(document).on("click","input[data-between-chart-show]",function(){var t=jQuery(this).attr("data-between-chart-show");k.run_meta_box(t,{from:jQuery("div[data-chart-date-picker="+t+"] input[id=date-from]").val(),to:jQuery("div[data-chart-date-picker="+t+"] input[id=date-to]").val(),"no-data":"no"})}),jQuery(document).on("click",function(t){var e;jQuery(t.target).closest(".js-widget-filters").length?(e=t.target.classList).contains("c-footer__filter__btn")&&e.contains("is-active")?(t.target.classList.remove("is-active"),jQuery(".js-widget-filters").removeClass("is-active"),jQuery(".postbox.has-focus").removeClass("has-focus"),setTimeout(function(){jQuery(".js-widget-filters").removeClass("is-down")},500)):e.contains("c-footer__filter__btn")&&!e.contains("is-active")&&t.target.classList.add("is-active"):(jQuery(".js-widget-filters").removeClass("is-active"),jQuery(".postbox.has-focus").removeClass("has-focus"),jQuery(".c-footer__filter__btn.is-active").removeClass("is-active"),setTimeout(function(){jQuery(".js-widget-filters").removeClass("is-down")},500))}),document.getElementById("wp-statistics-about-widget")),ot=(!t||t.querySelector(".js-wps-widget-customization-empty")||t.querySelector(".wps-about-widget__premium")||t.classList.add("wp-statistics-about-widget__customize"),k.countries_meta_box={view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e="";return t.countries&&0<t.countries.length?(e+='<div class="o-table-wrapper"><table width="100%" class="o-table wps-new-table"><thead><tr><th class="wps-pd-l">'.concat(k._("country"),'</th><th class="wps-pd-l"><span class="wps-order">').concat(k._("visitor_count"),"</span></th></tr></thead><tbody>"),t.countries.forEach(function(t){e+='<tr> <td class="wps-pd-l"><img src="'.concat(t.flag,'" title="').concat(t.name,'" alt="').concat(t.name,'" class="wps-flag wps-flag--first"/> ').concat(t.name,'</td><td class="wps-pd-l wps-middle-vertical"><a href="').concat(t.link,'" title="').concat(t.name,'" target="_blank">').concat(k.number_format(t.number),"</a></td></tr>"),0}),e+="</tbody></table></div>"):k.no_meta_box_data()}},k.horizontal_bar_metabox=function(t,e,n,a,o,r){t&&t.response&&(k.metaBoxInner(e).html(t.response.output),k.horizontal_bar(n,a,o,r),k.initDatePickerHandlers())},k.render_horizontal_bar_data=function(t,e){var n,e=e.replace(/_/g,"-");null!=(n=t.response)&&n.data&&(n=t.response.data,k.horizontal_bar_metabox(t,e,n.tag_id,n.labels,n.data,n.icons))},k.render_wp_statistics_browsers_widget=function(t,e){k.render_horizontal_bar_data(t,e)},k.render_wp_statistics_platforms_widget=function(t,e){k.render_horizontal_bar_data(t,e)},k.render_wp_statistics_devices_widget=function(t,e){k.render_horizontal_bar_data(t,e)},k.render_wp_statistics_models_widget=function(t,e){k.render_horizontal_bar_data(t,e)},k.render_line_chart=function(t,e){var n,a;e=e.replace(/_/g,"-"),t&&t.response&&(k.metaBoxInner(e).html(t.response.output),null!=(n=t.response)&&n.data&&(t={data:(t=t.response.data).data,previousData:t.previousData},"wp-statistics-quickstats-widget"!==e?k.new_line_chart(t,e+"-chart"):(a=k.new_line_chart(t,"wp-statistics-quickstats-widget-chart",{scales:{x:{offset:1,grid:{display:!1,drawBorder:!1,tickLength:0,drawTicks:!1},border:{color:"transparent",width:0},ticks:{align:"inner",autoSkip:!0,maxTicksLimit:3,font:{color:"#AAABAE",weight:"lighter",size:11},padding:8}},y:{min:0,ticks:{font:{color:"#AAABAE",weight:"lighter",size:12},fontColor:"#AAABAE",fontSize:12,fontWeight:"lighter ",padding:8,lineHeight:14.06,stepSize:1},border:{color:"transparent",width:0},type:"linear",position:"left",grid:{display:!0,tickMarkLength:0,drawBorder:!1,tickColor:"#EEF1F7",color:"#EEF1F7"},gridLines:{drawTicks:!1},title:{display:!1}}}}),document.querySelectorAll("#wp-statistics-quickstats-widget .wps-postbox-chart--items:nth-child(2) .wps-postbox-chart--item").forEach(function(t,e){var n=t.querySelector(".current-data span:first-child");n&&t.addEventListener("click",function(){var t;n.classList.toggle("wps-line-through"),(t=a.getDatasetMeta(t=e)).hidden=!t.hidden,a.update()})}))),k.initDatePickerHandlers())},k.render_wp_statistics_search_widget=k.render_line_chart,k.render_wp_statistics_hits_widget=k.render_line_chart,k.render_wp_statistics_traffic_summary_widget=k.render_line_chart,k.render_wp_statistics_quickstats_widget=k.render_line_chart,k.pages_meta_box={view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],a="";return t.pages&&0<t.pages.length?(a+='<div class="o-table-wrapper"><table width="100%" class="o-table wps-new-table"><thead><tr><th class="wps-pd-l">'.concat(k._("title"),'</th><th class="wps-pd-l"><span class="wps-order">').concat(k._("views"),"</span></th><th></th></tr></thead><tbody> "),k.global.admin_url.replace("/wp-admin/",""),t.pages.forEach(function(t){var e=document.getElementById("wp-statistics-pages-widget"),n=k._("view");e&&(n=(e=null!==e.closest("#dashboard-widgets"))||window.innerWidth<=500?k._("view"):k._("view_content")),a+='<tr><td class="wps-pd-l"><div class="wps-ellipsis-parent" title="'.concat(t.title,'"><span class="wps-ellipsis-text">').concat(t.title,'</span></div></td><td class="wps-pd-l"><a href="').concat(t.hits_page,'">').concat(t.number,'</a></td><td class="wps-pd-l"><a target="_blank" class="wps-view-content" href="').concat(t.link,'">').concat(n,"</a></td></tr>"),0}),a+="</tbody></table></div>"):k.no_meta_box_data()}},window.addEventListener("resize",function(){window.addEventListener("resize",function(){var t=document.getElementById("wp-statistics-pages-widget"),e=null;t&&(e=null!==t.closest("#dashboard-widgets")),0<(t=document.querySelectorAll(".wps-view-content")).length&&t.forEach(function(t){t.textContent=e||window.innerWidth<=500?k._("view"):k._("view_content")})})}),k.render_wp_statistics_post_summary_widget=function(t,e){var n,a,o,r,i,s;t&&t.response&&(k.metaBoxInner(e).html(t.response.output),null!=(i=t.response)&&i.data&&(t=(i=["postSummaryChart",e=t.response.data])[0],n=(e=void 0===(i=i[1])?[]:i).postChartData,a="Visitors",o="#A5AAEA",void 0!==e.postChartSettings&&null!==e.postChartSettings&&((e=e.postChartSettings).color&&(o=e.color),e.label)&&(a=e.label),e={animation:!1,responsive:!0,maintainAspectRatio:!0,plugins:{legend:{display:!1},tooltip:{enabled:!1,displayColors:!1,position:"nearest",intersect:!1,external:function(t){var n,e,a,o,r,i,s=t,t=s.chart,s=s.tooltip,l=t.canvas.parentNode.querySelector("div");l||((l=document.createElement("div")).classList.add("c-wps-mini-chart-post-summary-tooltip"),t.canvas.parentNode.appendChild(l)),0===s.opacity?l.style.opacity=0:s.body&&(e=s.title||[],r=s.body.map(function(t){return t.lines}),n="<div>",e.forEach(function(t){n+='<div class="chart-title">'.concat(t,"</div>")}),r.forEach(function(t,e){t=t.join(": "),n+="<div>".concat(t,"</div>")}),l.innerHTML=n,e=(o=t.canvas).offsetLeft,t=o.offsetTop,a=o.offsetWidth,o=o.offsetHeight,l.style.opacity=0===r[0].length?0:1,r=l.offsetWidth,i=e+s.caretX-r/2,s=t+o,(i=i<e?e:i)+r>e+a&&(i=e+a-r),l.style.left=i+"px",l.style.top=s+"px")},callbacks:{title:function(t){return n[t[0].label].fullDate},label:function(t){return t=t.formattedValue,'<div class="content-itemss"> <div class="content-item"><span>'.concat(a,"</span> <span>").concat(t,"</span></div>")}}}},scales:{x:{offset:!0,grid:{display:!1},border:{color:"transparent",width:0},ticks:{align:"inner",maxTicksLimit:3,fontColor:"#898A8E",fontSize:10,padding:5}},y:{position:"right",beginAtZero:!0,grid:{display:!1},border:{color:"transparent",width:0},ticks:{align:"inner",maxTicksLimit:5,fontColor:"#898A8E",fontSize:10,padding:8,stepSize:1}}},layout:{padding:{left:0,right:0,top:0,bottom:0}}},t=jQuery("#"+t)[0].getContext("2d"),"line"==(s=(i=Object.entries(n).map(function(t){return _slicedToArray(t,2)[1].hits})).length<=30?"bar":"line")&&((r=t.createLinearGradient(0,0,0,t.canvas.height-10)).addColorStop(0,k.hex_to_rgba(o,1)),r.addColorStop(.5,k.hex_to_rgba(o,.25)),r.addColorStop(.75,k.hex_to_rgba(o,0)),r.addColorStop(1,k.hex_to_rgba(o,0))),new Chart(t,{type:s,data:{labels:Object.entries(n).map(function(t){return _slicedToArray(t,1)[0]}),datasets:[{data:i,backgroundColor:"line"==s?r:Object.entries(n).map(function(t){return 0===_slicedToArray(t,2)[1].hits?"#000000b3":k.hex_to_rgba(o,.5)}),hoverBackgroundColor:"line"==s?r:Object.entries(n).map(function(t){return 0===_slicedToArray(t,2)[1].hits?"#000000b3":o}),pointBackgroundColor:o,fill:"line"==s,barPercentage:.9,categoryPercentage:1,tension:.5,minBarLength:1,borderWidth:"line"==s?1:0,pointRadius:"line"==s?0:void 0,pointHoverRadius:"line"==s?5:void 0,borderColor:o}]},options:e})),k.initDatePickerHandlers())},k.post_meta_box={params:function(){return{ID:k.global.page.ID}},view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];return t.hasOwnProperty("content")?' <div class="wps-center" style="padding: 15px;"> '+t.content+"</div>":' <div class="wps-wrap"> '+t.visitors+"</div>"},meta_box_init:function(){(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).hasOwnProperty("content")&&jQuery("#"+k.getMetaBoxKey("post")+" button[onclick]").remove()}},k.set_content=function(t,e){t&&t.response&&(k.metaBoxInner(e.replace(/_/g,"-")).html(t.response),k.initDatePickerHandlers())},k.render_table_content=k.set_content,k.render_wp_statistics_countries_widget=k.render_table_content,k.render_wp_statistics_traffic_summary_widget=k.render_table_content,k.render_wp_statistics_referring_widget=k.render_table_content,k.render_wp_statistics_pages_widget=k.render_table_content,k.render_wp_statistics_top_visitors_widget=k.render_table_content,k.render_wp_statistics_recent_widget=k.render_table_content,k.render_wp_statistics_useronline_widget=k.render_table_content,k.render_wp_statistics_go_premium_widget=k.render_table_content,k.render_wp_statistics_about_metabox=k.render_table_content,k.render_wp_statistics_weekly_performance_widget=k.render_table_content,k.render_wp_statistics_post_visitors_widget=k.render_table_content,k.render_wp_statistics_hourly_usage_widget=function(t,e){var h,g,o,n,r,i,a;t&&t.response&&k.metaBoxInner(e).html(t.response.output),null!=(n=t.response)&&n.data&&(h={data:(e=t.response.data).data,previousData:e.previousData},t=document.getElementById("hourly-usage-chart").getContext("2d"),g={Views:"#7362BF",Visitors:"#3288D7"},o=[],Object.keys(h.data.datasets).forEach(function(t,e){var n=g[h.data.datasets[t].label];o.push({type:"bar",label:h.data.datasets[t].label,data:h.data.datasets[t].data,backgroundColor:k.hex_to_rgba(n,.5),fill:!1,yAxisID:"y",hitRadius:10})}),null!=h&&h.previousData&&Object.keys(h.previousData.datasets).forEach(function(t,e){var n,a=h.previousData.datasets[t].label;o.push({type:"bar",label:h.previousData.datasets[t].label+" (Previous)",data:h.previousData.datasets[t].data,backgroundColor:(t=k.hex_to_rgba(g[a],.5),n=(a=document.createElement("canvas")).getContext("2d"),a.width=5,a.height=5,n.fillStyle=t,n.fillRect(0,0,a.width,a.height),n.strokeStyle="white",n.lineWidth=2,n.beginPath(),n.moveTo(a.width,0),n.lineTo(0,a.height),n.stroke(),n.createPattern(a,"repeat")),fill:!1,yAxisID:"y",pointRadius:0,hitRadius:10})}),e={maintainAspectRatio:!1,resizeDelay:200,animation:{duration:0},responsive:!0,interaction:{intersect:!1,mode:"index"},plugins:{legend:!1,tooltip:{enabled:!1,external:function(t){var o,r,i,e,n,a,s,l,c,d,u=g,p=h,_=t,f=_.chart,_=_.tooltip;t=Q(f),0===_.opacity?t.style.opacity=0:_.body&&(o=_.dataPoints[0].dataIndex,r=f.data.datasets,i="<div>",e=r.filter(function(t){return!t.label.includes("(Previous)")}),n=r.filter(function(t){return t.label.includes("(Previous)")}),c=(new Date).getHours(),l=p.data.labels[o].hour,a=parseInt(l.match(/\d+/)[0]),l=l.includes("PM"),l=12===a?l?12:0:l?a+12:a,a=e.some(function(t){return 0<t.data[o]}),s=n.some(function(t){return 0<t.data[o]}),c=(l=l<=c)&&(a||!a&&!s)?p.data.labels[o].formatted_date+" ("+p.data.labels[o].hour+")":p.previousData.labels[o].formatted_date+" ("+p.data.labels[o].hour+")",i+='<div class="chart-title">'.concat(c,"</div>"),l&&(a||!a&&!s)&&e.forEach(function(t){var e;f.getDatasetMeta(r.indexOf(t)).hidden||(e=t.data[o],i+='<div class="current-data"><div><span class="current-data__color" style="background-color: '.concat(t.backgroundColor,';"></span>').concat(t.label,'</div><span class="current-data__value">').concat(e.toLocaleString(),"</span></div>"))}),l&&!s||(d=Object.values(u),n.forEach(function(t,e){var n=f.getDatasetMeta(r.indexOf(t)),a=t.label.replace(" (Previous)","");n.hidden||(n=t.data[o],i+='<div class="previous-data"><div> <span class="previous-data__colors"><span class="previous-data__color" style="background-color:'.concat(k.hex_to_rgba(d[e],.5),';"></span><span class="previous-data__color" style="background-color: ').concat(k.hex_to_rgba(d[e],.5),'"></span> </span> ').concat(a,' </div><span class="current-data__value">').concat(n.toLocaleString(),"</span></div>"))})),i+="</div>",t.innerHTML=i,k.setTooltipPosition(t,f,_))},callbacks:{title:function(t){return t[0].label},label:function(t){return t.formattedValue}}}},scales:{x:{offset:!0,grid:{display:!1,drawBorder:!1,tickLength:0,drawTicks:!1},border:{color:"transparent",width:0},ticks:{align:"inner",autoSkip:!1,maxRotation:90,minRotation:90,callback:function(t,e){return" "+this.getLabelForValue(t)},font:{color:"#898A8E",style:"italic",size:window.innerWidth<768?8:13},padding:window.innerWidth<768?3:8}},y:{min:0,ticks:{maxTicksLimit:7,font:{color:"#898A8E",style:"italic",size:window.innerWidth<768?8:13},padding:window.innerWidth<768?2:8,lineHeight:window.innerWidth<768?10:15,stepSize:1},border:{color:"transparent",width:0},type:"linear",position:"right",grid:{display:!0,tickMarkLength:0,drawBorder:!1,tickColor:"#EEEFF1",color:"#EEEFF1"},gridLines:{drawTicks:!1},title:{display:!1}}}},n=h.data.labels.map(function(t){return t.hour}),r=new Chart(t,{type:"bar",data:{labels:n,datasets:o},options:e}),i=document.getElementById("hourly-usage-chart").parentElement.parentElement.querySelector(".wps-postbox-chart--items"))&&(i.innerHTML="",o.sort(function(t,e){return"Total"===t.label?-1:"Total"===e.label?1:"Total (Previous)"===t.label?-1:"Total (Previous)"===e.label?1:0}),0<(t=document.querySelectorAll(".wps-postbox-chart--previousPeriod")).length&&(a=!1,o.forEach(function(t){t.label.includes("(Previous)")&&(a=!0)}),a)&&t.forEach(function(t){t.style.display="flex"}),o.forEach(function(t,e){var n,a;t.label.includes("(Previous)")||(t.data.reduce(function(t,e){return Number(t)+Number(e)},0),(n=document.createElement("div")).className="wps-postbox-chart--item",n.innerHTML='<span class="current-data"> <span class="wps-postbox-chart--item--color" style="border-color: '.concat(t.backgroundColor,'"></span> ').concat(t.label,"</span> "),(a=n.querySelector(".current-data")).addEventListener("click",function(){var t=r.getDatasetMeta(e);t.hidden=!t.hidden,a.classList.toggle("wps-line-through"),r.update()}),i.appendChild(n))})),k.initDatePickerHandlers()},k.render_wp_statistics_hitsmap_widget=function(t,e){var n,o,r,i,s,l;null!=t&&t.response&&(e=e.replace(/_/g,"-"),n=(t=t.response).output,o=t.data,r=Array(),i={},k.metaBoxInner(e).html(n),0<(null==o||null==(t=o.codes)?void 0:t.length)&&(s={},o.codes.forEach(function(t,e){var n=Number(o.raw_data[e])||0,a=o.data[e];s[t.toLowerCase()]={label:o.labels[e],flag:o.flags[e],visitors_raw:n,visitors:a}}),l=Math.max.apply(Math,[1].concat(_toConsumableArray(Object.values(s).map(function(t){return t.visitors_raw})))),Object.keys(s).forEach(function(t){var e=s[t],n=e.visitors_raw/l,a=Math.round(235-185*n),o=Math.round(245-109*n),n=Math.round(255-40*n);i[t]="rgb(".concat(a,", ").concat(o,", ").concat(n,")"),r[t]="<div class='map-html-marker'><div class=\"map-country-header\"><img src='".concat(e.flag,"' alt=\"").concat(e.label,"\" title='").concat(e.label,"' class='log-tools wps-flag'/> <span>").concat(e.label,'</span></div><div class="map-country-content"><div>').concat(k._("visitors"),"</div><div>").concat(e.visitors,"</div></div></div>")})),jQuery("#wp-statistics-visitors-map").vectorMap({map:"world_en",backgroundColor:"#fff",borderColor:"#fff",borderOpacity:.6,color:"#e6e6e6",selectedColor:"#596773",hoverColor:"#596773",colors:i,onLabelShow:function(t,e,n){var a,o;n=n.toLowerCase(),r[n]?e.html(r[n]):(a=k.global.assets_url+"/images/flags/".concat(n,".svg"),o=e.text(),fetch(a).then(function(t){t=t.ok?"<img src='".concat(a,"' alt=\"").concat(o,'" title="').concat(o,"\" class='log-tools wps-flag'/>"):"",e.html("<div class='map-html-marker'><div class=\"map-country-header\">".concat(t,"<span>").concat(o,'</span></div><div class="map-country-content"><div>').concat(k._("visitors"),"</div><div>0</div></div></div>"))}).catch(function(t){console.error("Error fetching the image:",t),e.html("<div class='map-html-marker'><div class=\"map-country-header\"><span>".concat(o,'</span></div><div class="map-country-content"><div>').concat(k._("visitors"),"</div><div>0</div></div></div>"))}))}}),k.initDatePickerHandlers())},k.isset(k.global,"request_params","page")&&"plugins"===k.global.request_params.page&&jQuery(document).ready(function(){function l(){g&&0<g.length&&h&&h.classList.remove("wps-hide")}function n(){m=[],s.forEach(function(t){t.checked&&m.push(t.getAttribute("data-slug"))})}function i(t,e,n,a,o){var r;n<t.length?(r=t[n],r=_objectSpread(_objectSpread({},y),{},{action:e,plugin_slug:r}),o&&k.loading_button(o),v(r,o,function(){return i(t,e,n+1,a,o)})):a()}function t(t,n,a){0<t.length&&t.forEach(function(e){e.addEventListener("click",function(t){t.stopPropagation(),t=e.getAttribute("data-slug"),t=_objectSpread(_objectSpread({},y),{},_defineProperty({action:n},a,t)),v(t,e)})})}function c(t,e,n){var a,o;"wp_statistics_check_license"===t.action&&(b(e),a=document.createElement("div"),null!=(o=n)&&null!=(o=o.data)&&null!=(o=o.message)&&o.toLowerCase().includes("domain")?(e.parentElement.querySelector("input").classList.add("wps-warning"),a.classList.add("wps-alert","wps-alert--warning")):(e.parentElement.querySelector("input").classList.add("wps-danger"),a.classList.add("wps-alert","wps-alert--danger")),a.innerHTML='<span class="icon"></span><div><p>'.concat(null==(o=n)||null==(o=o.data)?void 0:o.message,"</p></div>"),o=t.tab?document.querySelector(".wps-addon__step__active-license"):e.parentElement)&&o.parentNode.insertBefore(a,o.nextSibling),"wp_statistics_download_plugin"===t.action&&(n=document.querySelector('[data-slug="'.concat(t.plugin_slug,'"]')))&&((e=n.parentElement.parentElement.querySelector(".wps-postbox-addon__status"))&&e.remove(),(a=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--danger"),a.textContent=k._("failed"),n.parentElement.parentElement.insertBefore(a,n.parentElement.parentElement.firstChild),"get-started"===t.tab)&&((e=document.createElement("a")).classList.add("wps-postbox-addon__button","button-retry-addon-download","js-addon-retry-btn"),e.textContent=k._("retry"),e.setAttribute("data-slug",t.plugin_slug),n.parentElement.parentElement.insertBefore(e,a.nextSibling)),"wp_statistics_activate_plugin"===t.action&&(n=document.querySelector('[data-slug="'.concat(t.plugin_slug,'"]')))&&((e=n.parentElement.parentElement.querySelector(".wps-postbox-addon__status"))&&e.remove(),(a=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--danger"),a.textContent=k._("failed"),n.parentElement.parentElement.insertBefore(a,n.parentElement.parentElement.firstChild),n.style.display="flex")}var e,a,o=document.querySelectorAll(".js-addon-show-more"),r=document.querySelectorAll(".js-wps-addon-license-button"),s=document.querySelectorAll(".js-wps-addon-check-box"),d=document.querySelectorAll(".js-addon-retry-btn"),u=document.querySelector(".js-wps-addon-select-all"),p=document.querySelector(".js-addon-active-license"),_=document.querySelector(".js-addon-download-button"),f=document.querySelector(".wps-addon__step__active-license input"),h=document.querySelector(".js-addon_active-all"),g=document.querySelectorAll(".js-addon-active-plugin-btn"),m=[],w=[],y={wps_nonce:k.global.rest_api_nonce,action:"wp_statistics_check_license"},b=("plugins"===(y=Object.assign(y,k.global.request_params)).page&&"downloads"===(null==(e=y)?void 0:e.tab)&&_&&0===s.length&&(_.textContent=k._("continue_to_next_step"),_.classList.remove("disabled"),_.href="admin.php?page=wps_plugins_page&tab=get-started&license_key="+y.license_key),l(),function(t){(t=t.parentElement.parentElement.querySelector(".wps-alert"))&&t.remove()}),v=(0<s.length?(u&&(u.addEventListener("click",function(t){t.stopPropagation(),s.forEach(function(t){t.checked=!0,t.parentElement.parentElement.parentElement.classList.add("wps-has-checkbox")}),_.classList.remove("disabled"),n()}),u.click()),a=function(){var e=!1;s.forEach(function(t){t.checked&&(e=!0)}),e?_.classList.remove("disabled"):_.classList.add("disabled"),n()},s.forEach(function(t){t.addEventListener("change",a)})):u&&u.classList.add("wps-hide"),t(d,"wp_statistics_download_plugin","plugin_slug"),t(g,"wp_statistics_activate_plugin","plugin_slug"),document.addEventListener("click",function(t){var e;t.target.classList.contains("js-addon-retry-btn")?(t.stopPropagation(),e=t.target.getAttribute("data-slug"),e=_objectSpread(_objectSpread({},y),{},{action:"wp_statistics_download_plugin",plugin_slug:e}),v(e,t.target)):t.target.classList.contains("js-addon-active-plugin-btn")?(t.stopPropagation(),e=t.target.getAttribute("data-slug"),e=_objectSpread(_objectSpread({},y),{},{action:"wp_statistics_activate_plugin",plugin_slug:e}),v(e,t.target)):t.target.classList.contains("js-addon_active-all")&&(t.stopPropagation(),h.classList.add("wps-hide"),g=document.querySelectorAll(".js-addon-active-plugin-btn"),w=[],g.forEach(function(t){w.push(t.getAttribute("data-slug"))}),g)&&0<g.length&&(g.forEach(function(t,e){0<e&&((e=t.parentElement.parentElement.querySelector(".wps-postbox-addon__status"))&&e.remove(),(e=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--waiting"),e.textContent=k._("waiting"),t.parentElement.parentElement.insertBefore(e,t.parentElement.parentElement.firstChild),t.parentElement.classList.add("wps-hide"))}),i(w,"wp_statistics_activate_plugin",0,function(){g.forEach(function(t,e){t.parentElement.classList.remove("wps-hide")}),g=document.querySelectorAll(".js-addon-active-plugin-btn"),l()}))}),_&&_.addEventListener("click",function(t){_.classList.contains("disable")||(t.stopPropagation(),s.forEach(function(t){t.checked||(t.disabled=!0)}),u.classList.add("wps-hide"),s.forEach(function(t,e){t.checked&&0<e&&((e=t.parentElement.parentElement.querySelector(".wps-postbox-addon__status"))&&e.remove(),(e=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--waiting"),e.textContent=k._("waiting"),t.parentElement.parentElement.insertBefore(e,t.parentElement.parentElement.firstChild),t.parentElement.classList.add("wps-hide"))}),i(m,"wp_statistics_download_plugin",0,function(){_.classList.add("redirecting"),_.textContent=k._("redirecting");var e=new URLSearchParams;m.forEach(function(t){return e.append("addons[]",t)}),window.location.href="admin.php?page=wps_plugins_page&tab=get-started&license_key=".concat(y.license_key,"&")+e.toString()},_))}),0<o.length&&(o.forEach(function(t){t.addEventListener("click",function(t){t.stopPropagation(),t=this.parentElement.classList.contains("active"),document.querySelectorAll(".js-addon-show-more").forEach(function(t){t.parentElement.classList.remove("active")}),t||this.parentElement.classList.add("active")})}),document.body.addEventListener("click",function(){document.querySelectorAll(".js-addon-show-more").forEach(function(t){t.parentElement.classList.remove("active")})})),0<r.length&&r.forEach(function(t){t.addEventListener("click",function(t){var e,n,a;t.stopPropagation(),t=this.classList.contains("active"),document.querySelectorAll(".js-wps-addon-license-button").forEach(function(t){t.classList.remove("active"),t.closest(".wps-postbox-addon__item").classList.remove("active")}),t||(this.classList.add("active"),(t=this.closest(".wps-postbox-addon__item"))&&(e=function(){n.classList.remove("wps-danger","wps-warning"),b(a),""===n.value.trim()?(a.classList.add("disabled"),a.disabled=!0):(a.classList.remove("disabled"),a.disabled=!1)},t.classList.add("active"),n=t.querySelector(".wps-addon__item__update_license input"),a=t.querySelector(".wps-addon__item__update_license button"),n&&a&&(e(),n.addEventListener("input",function(){e()})),a)&&a.addEventListener("click",function(t){t.stopPropagation();var t=n.value.trim(),e=n.dataset.addonSlug;t&&e&&(t=_objectSpread({license_key:t,addon_slug:e},y),v(t,a))}))})}),function(r,i,s){var t,e;i&&k.loading_button(i),"wp_statistics_download_plugin"===r.action&&(e=document.querySelector('[data-slug="'.concat(r.plugin_slug,'"]')))&&((t=e.parentElement.parentElement.querySelector(".wps-postbox-addon__status"))&&t.remove(),(t=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--purple"),t.textContent=k._("downloading"),e)&&e.parentElement.parentElement&&(e.parentElement.parentElement.insertBefore(t,e.parentElement.parentElement.firstChild),e.style.display="none"),"wp_statistics_activate_plugin"===r.action&&(t=document.querySelector('[data-slug="'.concat(r.plugin_slug,'"]')))&&((e=t.parentElement.parentElement.querySelector(".wps-postbox-addon__status"))&&e.remove(),(e=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--purple"),e.textContent=k._("activating"),t)&&t.parentElement.parentElement&&(t.parentElement.parentElement.insertBefore(e,t.parentElement.parentElement.firstChild),t.style.display="none"),jQuery.ajax({url:k.global.admin_url+"admin-ajax.php",type:"GET",dataType:"json",data:r,timeout:3e4,success:function(t){var e,n,a,o;i&&i.classList.remove("wps-loading-button"),t.success?(i&&i.classList.add("disabled"),"wp_statistics_check_license"===r.action&&(null!=(e=k.global.request_params)&&e.tab?(i.classList.add("redirecting"),i.textContent=k._("redirecting"),window.location.href="admin.php?page=wps_plugins_page&tab=downloads&license_key="+r.license_key):(b(i),i.parentElement.querySelector("input").classList.remove("wps-danger"),(o=i.parentElement.parentElement.parentElement.querySelector(".wps-postbox-addon__status")).classList.contains("wps-postbox-addon__status--danger")&&(o.classList.add("wps-postbox-addon__status--success"),o.classList.remove("wps-postbox-addon__status--danger"),o.textContent=k._("activated")),(o=document.createElement("div")).classList.add("wps-alert","wps-alert--success"),o.innerHTML='<span class="icon"></span><div><p>'.concat(null==t||null==(e=t.data)?void 0:e.message,"</p></div>"),(n=i.parentElement)&&n.parentNode.insertBefore(o,n.nextSibling))),"wp_statistics_download_plugin"===r.action&&(o=document.querySelector('[data-slug="'.concat(r.plugin_slug,'"]')))&&(n=o.parentElement.parentElement.querySelector(".wps-postbox-addon__status--purple"),a=o.parentElement.parentElement.querySelector(".wps-postbox-addon__label--updated"),n&&n.remove(),a&&a.remove(),(n=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--installed"),n.textContent=k._("already_installed"),o&&o.parentElement.parentElement&&o.parentElement.parentElement.insertBefore(n,o.parentElement.parentElement.firstChild),"downloads"===r.tab&&n.parentElement.parentElement.classList.add("wps-addon__download__item--disabled"),"get-started"===r.tab&&((a=document.createElement("a")).classList.add("wps-postbox-addon__button","button-activate-addon","js-addon-active-plugin-btn"),a.textContent=k._("active"),a.setAttribute("data-slug",r.plugin_slug),o.parentElement.insertBefore(a,n.nextSibling),a=document.querySelector(".js-addon-show-more"),g=document.querySelectorAll(".js-addon-active-plugin-btn"),l(),a)&&a.classList.remove("wps-hide"),o.remove()),"wp_statistics_activate_plugin"===r.action&&(n=document.querySelector('[data-slug="'.concat(r.plugin_slug,'"]')))&&((a=n.parentElement.parentElement.querySelector(".wps-postbox-addon__status--purple"))&&a.remove(),(o=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--success"),o.textContent=k._("activated"),n.parentElement.parentElement.insertBefore(o,n.parentElement.parentElement.firstChild),n.remove())):c(r,i,t),s&&s()},error:function(t,e,n){i&&i.classList.remove("wps-loading-button"),s&&s(),c(r,i,n)}})});function x(){f.classList.remove("wps-danger","wps-warning"),b(p),""===f.value.trim()?(p.classList.add("disabled"),p.disabled=!0):(p.classList.remove("disabled"),p.disabled=!1)}f&&p&&(x(),f.addEventListener("input",function(){x()})),p&&p.addEventListener("click",function(t){t.stopPropagation(),(t=f.value.trim())&&(t=_objectSpread({license_key:t},y),v(t,p))})}),k.isset(k.global,"request_params","page")&&"author-analytics"===k.global.request_params.page&&(V={init:function(){"undefined"==typeof Wp_Statistics_Author_Analytics_Object?console.log("Variable Wp_Statistics_Author_Analytics_Object not found."):this.generateCharts()},generateCharts:function(){this.generatePublishingOverviewChart(),this.generateViewsPerPostsChart(),this.generateOperatingSystemChart(),this.generateBrowsersChartData()},generateBrowsersChartData:function(){var t;k.isset(Wp_Statistics_Author_Analytics_Object,"browser_chart_data")&&((t=Wp_Statistics_Author_Analytics_Object.browser_chart_data).data&&0!=t.data.length?k.horizontal_bar("wps-browsers",t.labels,t.data,t.icons):jQuery("#wps-browsers").parent().html(k.no_results()))},generateOperatingSystemChart:function(){var t;k.isset(Wp_Statistics_Author_Analytics_Object,"os_chart_data")&&((t=Wp_Statistics_Author_Analytics_Object.os_chart_data).data&&0!=t.labels.length&&0!=t.data.length?k.horizontal_bar("wps-operating-systems",t.labels,t.data,t.icons):jQuery("#wps-operating-systems").parent().html(k.no_results()))},generateViewsPerPostsChart:function(){var t,s,e,n;k.isset(Wp_Statistics_Author_Analytics_Object,"views_per_posts_chart_data")&&(t=Wp_Statistics_Author_Analytics_Object.views_per_posts_chart_data,s=t.datasets.map(function(t){return t.img}).map(function(t){var e=new Image;return e.src=t,e}),e={id:"afterRenderPlugin",afterDraw:function(r,t,e){var i=document.getElementById("publishedChart").getContext("2d");r.data.datasets.forEach(function(t,e){t.data.forEach(function(t,e){var e=s[e%s.length],n=r.scales.x.getPixelForValue(t.x),a=n-15,o=(t=r.scales.y.getPixelForValue(t.y))-15;i.beginPath(),i.arc(n,t,17,0,2*Math.PI),i.lineWidth=4,i.strokeStyle="rgba(81,0,253,20%)",i.stroke(),i.closePath(),i.save(),i.beginPath(),i.arc(n,t,15,0,2*Math.PI),i.clip(),i.drawImage(e,a,o,30,30),i.restore()})})}},(400<Chart.version.replace(/\./g,"")?Chart:Chart.plugins).register(e),Chart.Tooltip.positioners.top=function(t,e){var n=this.chart,n=(_objectDestructuringEmpty(n.chartArea),n.scales),a=n.x,n=n.y;return{x:a.getPixelForValue(a.getValueForPixel(e.x)),y:n.getPixelForValue(n.getValueForPixel(e.y))-20,xAlign:"center",yAlign:"bottom"}},n={type:"scatter",data:n={datasets:[{label:t.labels.chartLabel,data:t.datasets,backgroundColor:"#E8EAEE"}]},options:{responsive:!0,pointRadius:16,pointHoverRadius:16,tooltipPosition:{x:10,y:30},layout:{padding:{Right:20,Left:20}},scales:{y:{type:"linear",ticks:{stepSize:4,color:"#56585A",fontSize:13,padding:15},title:{display:!0,text:t.labels.yAxisLabel,fontSize:14,color:"#000"},grid:{drawBorder:!1,tickLength:0}},x:{type:"linear",position:"bottom",title:{display:!0,text:t.labels.xAxisLabel,fontSize:14,color:"#000"},ticks:{stepSize:5e4,autoSkip:!1,maxRotation:90,minRotation:90,color:"#56585A",padding:15,fontSize:13},grid:{drawBorder:!1,tickLength:0}}},plugins:{legend:{display:!1},tooltip:{position:"top",callbacks:{label:function(t){return t=t.raw,["".concat(k._("visits"),"/").concat(k._("published"),": (").concat(t.x,", ").concat(t.y,")"),k._("author")+": "+t.author]}}}}},plugins:[e]},new Chart(document.getElementById("publishedChart"),n))},generatePublishingOverviewChart:function(){var t;k.isset(Wp_Statistics_Author_Analytics_Object,"publish_chart_data")&&(t={type:"matrix",data:{datasets:[{label:"overview",data:Wp_Statistics_Author_Analytics_Object.publish_chart_data.datasets,backgroundColor:function(t){return n=(t=t).dataset.data[t.dataIndex].v,a=Math.min.apply(Math,_toConsumableArray(t.dataset.data.map(function(t){return t.v}))),t=Math.max.apply(Math,_toConsumableArray(t.dataset.data.map(function(t){return t.v}))),0===n?"#e8eaee":(e=["#B28DFF","#5100FD","#4915B9","#250766"],n=Math.floor((n-a)/(t-a)*(e.length-1)),e[Math.min(Math.max(n,0),e.length-1)]);var e,n,a},borderColor:"transparent",borderWidth:4,borderRadius:2,boxShadow:0,width:function(t){return((t=t.chart.chartArea||{}).right-t.left)/53-1-2},height:function(t){return((t=t.chart.chartArea||{}).bottom-t.top)/7-1-1}}]},options:{maintainAspectRatio:!1,scales:{y:{type:"time",offset:!0,time:{unit:"day",round:"day",isoWeek:1,parser:"i",displayFormats:{day:"iiiiii"}},reverse:!0,position:"left",ticks:{maxRotation:0,autoSkip:!0,padding:5,color:"#000",font:{size:12}},grid:{display:!1,drawBorder:!1,tickLength:0},border:{display:!1}},x:{type:"time",offset:!0,position:"top",time:{unit:"month",round:"week",isoWeekday:1,displayFormats:{week:"MMM"}},ticks:{maxRotation:0,autoSkip:!0,padding:5,color:"#000000",font:{size:12},callback:function(t,e,n){var a=(t=new Date(t)).toLocaleString("default",{month:"short"});return 1===(t=t.getDate())?a:a+" "+t}},border:{display:!1},grid:{display:!1,drawBorder:!1,tickLength:0}}},aspectRatio:10,animation:!1,plugins:{chartAreaBorder:{borderWidth:5,borderColor:"#fff"},legend:!1,tooltip:{displayColors:!1,callbacks:{title:function(){return""},label:function(t){return t=t.dataset.data[t.dataIndex],[k._("date")+": "+t.d,k.global.active_post_type+": "+t.v]}}}}}},new Chart(document.getElementById("overviewPublishChart"),t))}},jQuery(document).ready(function(){V.init()})),k.isset(k.global,"request_params","page")&&"browser"===k.global.request_params.page&&(f={},["from","to"].forEach(function(t){k.isset(k.global,"request_params",t)&&(f[t]=k.global.request_params[t])}),["browsers-table","browsers"].forEach(function(t){jQuery("#"+k.getMetaBoxKey(t)+" .inside").css("height","430px")}),jQuery("#wp-statistics-browsers-table-widget .inside").html(k.placeholder()),jQuery(".wps-ph-picture").attr("style","height: 310px;"),k.run_meta_box("browsers",f,!1)),k.isset(k.global,"request_params","page")&&"category-analytics"===k.global.request_params.page&&(K={data:[],init:function(){"undefined"==typeof Wp_Statistics_Category_Analytics_Object?console.log("Variable Wp_Statistics_Category_Analytics_Object not found."):(this.data=Wp_Statistics_Category_Analytics_Object,this.generateCharts())},generateCharts:function(){document.getElementById("performance-category-chart")&&this.generatePerformanceChart(),document.getElementById("performance-category-chart-single")&&this.generatePerformanceChartSingle(),document.getElementById("category_operating_systems")&&this.generateOperatingSystemChart(),document.getElementById("category_browsers")&&this.generateBrowsersChartData(),document.getElementById("category_device_models")&&this.generateDeviceModelsChart(),document.getElementById("category_device_usage")&&this.generateDeviceUsageChart(),document.getElementById("category-search-engines-chart")&&this.generateSearchEngineChart()},generatePerformanceChart:function(){var t=this.data.performance_chart_data;k.new_line_chart(t,"performance-category-chart",null,"performance")},generatePerformanceChartSingle:function(){var t=this.data.performance_chart_data;k.new_line_chart(t,"performance-category-chart-single",null,"performance")},generateOperatingSystemChart:function(){var t=this.data.os_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("category_operating_systems",t.labels,t.data,t.icons):jQuery("#category_operating_systems").parent().html(k.no_results())},generateBrowsersChartData:function(){var t=this.data.browser_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("category_browsers",t.labels,t.data,t.icons):jQuery("#category_browsers").parent().html(k.no_results())},generateDeviceModelsChart:function(){var t=this.data.model_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("category_device_models",t.labels,t.data,null):jQuery("#category_device_models").parent().html(k.no_results())},generateDeviceUsageChart:function(){var t=this.data.device_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("category_device_usage",t.labels,t.data,null):jQuery("#category_device_usage").parent().html(k.no_results())},generateSearchEngineChart:function(){var t=this.data.search_engine_chart_data;t.data.datasets&&0!=t.data.datasets.length?k.new_line_chart(t,"category-search-engines-chart",null):(jQuery("#category-search-engines-chart").parent().html(k.no_results()),jQuery(".wps-postbox-chart--data").remove())}},jQuery(document).ready(function(){K.init()})),k.isset(k.global,"request_params","page")&&"content-analytics"===k.global.request_params.page&&(Z={data:[],init:function(){"undefined"==typeof Wp_Statistics_Content_Analytics_Object?console.log("Variable Wp_Statistics_Content_Analytics_Object not found."):(this.data=Wp_Statistics_Content_Analytics_Object,this.generateCharts())},generateCharts:function(){document.getElementById("performance-chart")&&this.generatePerformanceChart(),document.getElementById("performance-chart-single")&&this.generatePerformanceChartSingle(),document.getElementById("content_operating_systems")&&this.generateOperatingSystemChart(),document.getElementById("content_browsers")&&this.generateBrowsersChartData(),document.getElementById("content_device_models")&&this.generateDeviceModelsChart(),document.getElementById("content_device_usage")&&this.generateDeviceUsageChart(),document.getElementById("content-search-engines-chart")&&this.generateSearchEngineChart()},generatePerformanceChart:function(){var t=this.data.performance_chart_data;k.new_line_chart(t,"performance-chart",null,"performance")},generateOperatingSystemChart:function(){var t=this.data.os_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("content_operating_systems",t.labels,t.data,t.icons):jQuery("#content_operating_systems").parent().html(k.no_results())},generateBrowsersChartData:function(){var t=this.data.browser_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("content_browsers",t.labels,t.data,t.icons):jQuery("#content_browsers").parent().html(k.no_results())},generateDeviceModelsChart:function(){var t=this.data.model_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("content_device_models",t.labels,t.data,null):jQuery("#content_device_models").parent().html(k.no_results())},generateDeviceUsageChart:function(){var t=this.data.device_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("content_device_usage",t.labels,t.data,null):jQuery("#content_device_usage").parent().html(k.no_results())},generateSearchEngineChart:function(){var t=this.data.search_engine_chart_data;t.data.datasets&&0!=t.data.datasets.length?k.new_line_chart(t,"content-search-engines-chart"):(jQuery("#content-search-engines-chart").parent().html(k.no_results()),jQuery(".wps-postbox-chart--data").remove())},generatePerformanceChartSingle:function(){var t=this.data.performance_chart_data;k.new_line_chart(t,"performance-chart-single",null,"performance")}},jQuery(document).ready(function(){Z.init()})),k.isset(k.global,"request_params","page")&&"countries"===k.global.request_params.page&&(h={limit:0},["from","to"].forEach(function(t){k.isset(k.global,"request_params",t)&&(h[t]=k.global.request_params[t])}),k.run_meta_box("countries",h,!1)),k.isset(k.global,"request_params","page")&&"exclusions"===k.global.request_params.page&&(s=Wp_Statistics_Exclusions_Object.exclusions_chart_data,O="exclusionsChart",c=s,document.getElementById(O))&&(t=jQuery("#"+O).parent(),s=k.rectangle_placeholder(),t.append(s),null!=c&&null!=(s=c.data)&&s.datasets&&0!==c.data.datasets.length?(jQuery(".wps-ph-item").remove(),jQuery(".wps-postbox-chart--data").removeClass("c-chart__wps-skeleton--legend"),t.removeClass("c-chart__wps-skeleton"),k.new_line_chart(c,O,null)):(t.html(k.no_results()),jQuery(".wps-ph-item").remove())),k.isset(k.global,"request_params","page")&&"hits"===k.global.request_params.page&&(s={},s=k.isset(k.global,"request_params","from")&&k.isset(k.global,"request_params","to")?{from:k.global.request_params.from,to:k.global.request_params.to}:{ago:30},jQuery("span[id^='number-total-chart-']").html(k.rectangle_placeholder("wps-text-placeholder")),k.run_meta_box("hits",s,!1)),0),rt=document.querySelectorAll(".wps-slider__slide"),L=rt.length,q=document.querySelector(".wps-slider__dots");function it(n){rt.forEach(function(t,e){t.style.display=e===n?"block":"none"});var e=n;if(q.innerHTML="",1<L){for(var a,t=function(t){(a=document.createElement("span")).className="wps-slider__dot",a.addEventListener("click",function(){it(t),clearInterval(J),st()}),a.classList.toggle("active",t===e),q.appendChild(a)},o=0;o<L;o++)t(o);q.style.display="block"}else q.style.display="none"}function st(){1<L&&(J=setInterval(function(){it(ot=(ot+1)%L)},5e3))}function lt(t){jQuery(".wp-statistics-settings .wps-optionsMenu .wps-optionsMenuItem").removeClass("current"),jQuery(".wp-statistics-settings .tab-content").removeClass("current"),jQuery("[data-tab="+t+"]").addClass("current"),jQuery("#"+t).addClass("current"),jQuery("#wp-statistics-settings-form").length&&(t=jQuery(location).attr("href")+"&tab="+t,jQuery("#wp-statistics-settings-form").attr("action",t).submit())}0<L&&(it(ot),st()),("index.php"===k.global.page.file||k.is_active("overview_page")||"post-new.php"===k.global.page.file||"post.php"===k.global.page.file&&k.isset(k.global,"page","ID"))&&(g=function(r){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,s=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,l=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return new Promise(function(e,n){var t={action:r.replace(/-/g,"_").replace("widget","metabox")+"_get_data",wps_nonce:k.global.rest_api_nonce,current_page:k.global.page},a=(l&&(t.date_filter=l),i&&s&&(t.from=i,t.to=s),r+"_success"),o=r+"_error";k[a]=function(t){return e(t),t},k[o]=function(t){return n(t),t},k.ajaxQ(k.global.admin_url+"admin-ajax.php",t,a,o,"GET",!1)})},m=function(e){g(e).then(function(t){k.handleMetaBoxRender(t,e)})},w=function(){return _createClass(function t(){_classCallCheck(this,t)},null,[{key:"getDateRange",value:function(t){var e=moment().format("YYYY-MM-DD"),n=moment().endOf("week").format("YYYY-MM-DD");return{today:{start:e,end:e},yesterday:{start:moment().subtract(1,"days").format("YYYY-MM-DD"),end:moment().subtract(1,"days").format("YYYY-MM-DD")},this_week:{start:moment().startOf("week").format("YYYY-MM-DD"),end:n},last_week:{start:moment().subtract(1,"week").startOf("week").format("YYYY-MM-DD"),end:moment().subtract(1,"week").endOf("week").format("YYYY-MM-DD")},this_month:{start:moment().startOf("month").format("YYYY-MM-DD"),end:moment().endOf("month").format("YYYY-MM-DD")},last_month:{start:moment().subtract(1,"month").startOf("month").format("YYYY-MM-DD"),end:moment().subtract(1,"month").endOf("month").format("YYYY-MM-DD")},"7days":{start:moment().subtract(6,"days").format("YYYY-MM-DD"),end:e},"30days":{start:moment().subtract(29,"days").format("YYYY-MM-DD"),end:e},"90days":{start:moment().subtract(89,"days").format("YYYY-MM-DD"),end:e},"6months":{start:moment().subtract(6,"months").format("YYYY-MM-DD"),end:e},this_year:{start:moment().startOf("year").format("YYYY-MM-DD"),end:moment().endOf("year").format("YYYY-MM-DD")},last_year:{start:moment().subtract(1,"year").startOf("year").format("YYYY-MM-DD"),end:moment().subtract(1,"year").endOf("year").format("YYYY-MM-DD")}}[t]||{start:null,end:null}}},{key:"formatDateRange",value:function(t,e){return t&&e?(t=moment(t),e=moment(e),t.isSame(e,"day")?t.format("MMM D, YYYY"):t.format("MMM D, YYYY")+" - "+e.format("MMM D, YYYY")):""}},{key:"getDefaultDateRange",value:function(){var t=moment().format("YYYY-MM-DD");return{start:moment().subtract(29,"days").format("YYYY-MM-DD"),end:t}}}])}(),t=function(){return _createClass(function t(){_classCallCheck(this,t),this.initializeEventListeners()},[{key:"initializeEventListeners",value:function(){this.initializeFilterToggles(),this.initializeMoreFilters(),this.initializeDatePicker(),this.initializeCustomDatePicker(),this.initializeDateSelection(),this.initializeFilterClicks()}},{key:"initializeFilterToggles",value:function(){jQuery(document).off("click",".js-filters-toggle").on("click",".js-filters-toggle",function(t){t=jQuery(t.currentTarget);jQuery(".js-widget-filters").removeClass("is-active"),jQuery(".postbox").removeClass("has-focus"),t.closest(".js-widget-filters").toggleClass("is-active"),t.closest(".postbox").toggleClass("has-focus"),t[0].getBoundingClientRect().top<350&&t.closest(".js-widget-filters").addClass("is-down")})}},{key:"initializeMoreFilters",value:function(){jQuery(document).off("click",".js-show-more-filters").on("click",".js-show-more-filters",function(t){t.preventDefault(),jQuery(t.currentTarget).closest(".c-footer__filters__list").find(".js-more-filters").addClass("is-open")}),jQuery(document).off("click",".js-close-more-filters").on("click",".js-close-more-filters",function(t){t.preventDefault(),jQuery(t.currentTarget).closest(".js-more-filters").removeClass("is-open")})}},{key:"initializeDatePicker",value:function(){jQuery(".js-datepicker-input").each(function(){jQuery(this).data("daterangepicker")||jQuery(this).daterangepicker({autoUpdateInput:!1,autoApply:!0,locale:{cancelLabel:"Clear",format:"YYYY-MM-DD"}})})}},{key:"initializeCustomDatePicker",value:function(){var n=this;jQuery(document).off("click",'button[data-filter="custom"]').on("click",'button[data-filter="custom"]',function(t){var t=jQuery(t.currentTarget).attr("data-metabox-key"),e=jQuery("#"+t+" .inside .js-datepicker-input").first();n.setupDateRangePicker(e,t),e.data("daterangepicker").show()})}},{key:"setupDateRangePicker",value:function(t,a){var o=this;t.data("daterangepicker")||(t.daterangepicker({autoUpdateInput:!1,autoApply:!0,locale:{cancelLabel:"Clear",format:"YYYY-MM-DD"}}),t.on("apply.daterangepicker",function(t,e){var n={startDate:e.startDate.format("YYYY-MM-DD"),endDate:e.endDate.format("YYYY-MM-DD")};o.handleDateSelection(a,n,e)}))}},{key:"initializeDateSelection",value:function(){var a=this;jQuery(".js-datepicker-input").off("apply.daterangepicker").on("apply.daterangepicker",function(t,e){var t=jQuery(t.currentTarget).closest(".postbox").attr("id"),n={startDate:e.startDate.format("YYYY-MM-DD"),endDate:e.endDate.format("YYYY-MM-DD")};a.handleDateSelection(t,n,e)}),jQuery(".js-datepicker-input").off("hide.daterangepicker").on("hide.daterangepicker",function(t,e){var n;e.startDate&&(t=jQuery(t.currentTarget).closest(".postbox").attr("id"),n={startDate:e.startDate.format("YYYY-MM-DD"),endDate:(e.endDate||e.startDate).format("YYYY-MM-DD")},a.handleDateSelection(t,n,e,!0))})}},{key:"handleDateSelection",value:function(t,e,n){var a,o=this,r=3<arguments.length&&void 0!==arguments[3]&&arguments[3];return n=n,a=jQuery("#"+t),n=e.startDate===e.endDate?n.startDate.format("MMM D, YYYY"):n.startDate.format("MMM D, YYYY")+" - "+n.endDate.format("MMM D, YYYY"),o.updateUIElements(a,n,r),void o.loadMetaBoxData(t,e)}},{key:"updateUIElements",value:function(t,e,n){n=n?"Custom Range":k._("str_custom"),t.find(".js-filter-title").text(n),t.find(".hs-filter-range").text(e),t.find(".js-filters-toggle").text(n),t.find(".c-footer__filters").removeClass("is-active"),jQuery(".postbox.has-focus").removeClass("has-focus")}},{key:"initializeFilterClicks",value:function(){var r=this;jQuery(document).off("click",'.c-footer__filters__list-item:not(.js-show-more-filters):not(.js-close-more-filters):not([data-filter="custom"])').on("click",'.c-footer__filters__list-item:not(.js-show-more-filters):not(.js-close-more-filters):not([data-filter="custom"])',function(t){var e=(t=jQuery(t.currentTarget)).data("filter"),n=t.closest(".postbox"),a=n.attr("id"),o=w.getDateRange(e);r.updateFilterUI(n,t,o),r.loadMetaBoxData(a,o,e)})}},{key:"updateFilterUI",value:function(t,e,n){t.find(".js-filter-title").text(e.text()),t.find(".hs-filter-range").text(w.formatDateRange(n.start,n.end)),t.find(".js-filters-toggle").text(e.text()),t.find(".c-footer__filters").removeClass("is-active"),e.closest(".postbox.has-focus").removeClass("has-focus")}},{key:"loadMetaBoxData",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"custom";k.showLoadingSkeleton(e),g(e,t.startDate||t.start,t.endDate||t.end,n).then(function(t){k.handleMetaBoxRender(t,e)}).catch(function(t){return console.error("Error loading metabox ".concat(e,":"),t)})}}])}(),k.datePickerHandler=new t,k.initDatePickerHandlers=function(){k.datePickerHandler.initializeEventListeners()},s=k.global.meta_boxes,k.handleMetaBoxRender=function(t,e){var n=e.replace(/-/g,"_");"function"==typeof k["render_"+n]&&(k["render_"+n](t,e),k.handelReloadButton(e),k.handelMetaBoxFooter(e,t))},y=[],0<e("#adv-settings").length?e('#adv-settings input[type="checkbox"]').each(function(){var t;e(this).is(":checked")&&(t=e(this).attr("id").replace("-hide",""),y.push(t))}):y=s,tt=y,s.forEach(function(t){tt.includes(t)&&m(t)}),jQuery(document).on("change",'#adv-settings input[type="checkbox"]',function(){var t=e(this).attr("id").replace("-hide","");e(this).is(":checked")&&m(t)}),s.forEach(function(t){jQuery(document).on("click","#".concat(t," .wps-refresh"),function(){k.showLoadingSkeleton(t),m(t)})}),k.metaBoxInner=function(t){return jQuery("#"+t+" .inside")},k.showLoadingSkeleton=function(t){jQuery("#"+t+" .inside").html('<div class="wps-skeleton-container"><div class="wps-skeleton-container__skeleton wps-skeleton-container__skeleton--full wps-skeleton-container__skeleton--h-150"></div></div>')},k.handelReloadButton=function(t){var e="#"+t+" .handle-actions button:first";jQuery("#"+t+" .wps-refresh").length||jQuery('<button class="handlediv wps-refresh" type="button" title="'.concat(k._("reload"),'"></button>')).insertBefore(e)},k.handelMetaBoxFooter=function(t,e){var n,a,o,r,i,s,l,c='<div class="c-footer"><div class="c-footer__filter js-widget-filters">',d=(e.options&&e.options.datepicker&&(l=k._("str_30days"),d=k._("str_30days"),null!=e&&e.filters&&e.filters.date&&e.filters.date.filter&&(r=k.isset(k.global,"options","wp_date_format")?k.global.options.wp_date_format:"MM/DD/YYYY",s=(r=C(r)).replace(/,?\s?(YYYY|YY)[-/\s]?,?|[-/\s]?(YYYY|YY)[-/\s]?,?/g,""),i=moment(e.filters.date.from),o=moment(e.filters.date.to),n=i.year()===o.year()?i.format(s):i.format(r),a=o.format(r),d="custom"===e.filters.date.type?n+" _ "+a:k._("str_"+e.filters.date.filter),l="custom"===e.filters.date.type?k._("str_custom"):k._("str_"+e.filters.date.filter)),c+='<button class="c-footer__filter__btn js-filters-toggle">'+d+'</button><div class="c-footer__filters"><div class="c-footer__filters__current-filter"><span class="c-footer__current-filter__title js-filter-title">'+l+'</span> <span class="c-footer__current-filter__date-range hs-filter-range">'+n+" - "+a+'</span></div><div class="c-footer__filters__list"><button data-metabox-key="'.concat(t,'" data-filter="today" class="c-footer__filters__list-item">')+k._("str_today")+'</button><button data-metabox-key="'.concat(t,'" data-filter="yesterday" class="c-footer__filters__list-item">')+k._("str_yesterday")+'</button><button data-metabox-key="'.concat(t,'" data-filter="this_week" class="c-footer__filters__list-item">')+k._("str_this_week")+'</button><button data-metabox-key="'.concat(t,'" data-filter="last_week" class="c-footer__filters__list-item">')+k._("str_last_week")+'</button><button data-metabox-key="'.concat(t,'" data-filter="this_month" class="c-footer__filters__list-item">')+k._("str_this_month")+'</button><button data-metabox-key="'.concat(t,'" data-filter="last_month" class="c-footer__filters__list-item">')+k._("str_last_month")+'</button><button class="c-footer__filters__list-item c-footer__filters__list-item--more js-show-more-filters">'+k._("str_more")+'</button><div class="c-footer__filters__more-filters js-more-filters"><button data-metabox-key="'.concat(t,'" data-filter="7days" class="c-footer__filters__list-item">')+k._("str_7days")+'</button><button data-metabox-key="'.concat(t,'" data-filter="30days" class="c-footer__filters__list-item">')+k._("str_30days")+'</button><button data-metabox-key="'.concat(t,'" data-filter="90days" class="c-footer__filters__list-item">')+k._("str_90days")+'</button><button data-metabox-key="'.concat(t,'" data-filter="6months" class="c-footer__filters__list-item">')+k._("str_6months")+'</button><button data-metabox-key="'.concat(t,'" data-filter="this_year" class="c-footer__filters__list-item">')+k._("str_this_year")+'</button><button data-metabox-key="'.concat(t,'" data-filter="last_year" class="c-footer__filters__list-item">')+k._("str_last_year")+'</button><button class="c-footer__filters__close-more-filters js-close-more-filters">'+k._("str_back")+'</button></div><input type="text" class="c-footer__filters__custom-date-input js-datepicker-input"/><button data-metabox-key="'.concat(t,'" data-filter="custom" class="c-footer__filters__list-item c-footer__filters__list-item--custom js-custom-datepicker">')+k._("str_custom")+"</button></div></div> "),c+="</div>",e.options&&e.options.button&&(c+=e.options.button),c+="</div></div>",jQuery("#"+t+" h2.hndle"));"wp-statistics-useronline-widget"===t&&((s=jQuery(".wps-currently-online")).length&&0<=s.text()?(i=d.find(".wps-wps-currently-online__container")).length?i.find(".wps-wps-currently-online__text").text(s.text()):(o='<span class="wps-wps-currently-online__container"><span class="wps-wps-currently-online__dot"></span><span class="wps-wps-currently-online__text">'.concat(s.text(),"</span></span>"),d.append(o)):d.find(".wps-wps-currently-online__container").remove()),"wp-statistics-quickstats-widget"===t&&(l=jQuery("#"+t+" div.handle-actions")).length&&!l.find(".wps-overview-btn").length&&(r='<a href="'.concat(k.global.admin_url,'admin.php?page=wps_overview_page" class="wps-overview-btn">').concat(k._("go_to_overview"),"</a>"),l.prepend(r),(i=l.find(".wps-overview-btn")).length)&&i.on("click",function(t){t.preventDefault(),window.location.href=this.href}),e.meta&&e.meta.description&&d.length&&!d.find(".wps-tooltip").length&&(s=e.meta.description)&&d.append('<a href="#" class="wps-tooltip" title="'+s+'"><i class="wps-tooltip-icon"></i></a>'),k.metaBoxInner(t).append(c)},document.addEventListener("click",function(n){var t;n.target&&"js-close-notice"===n.target.id&&(t={action:"wp_statistics_dismiss_notices",wps_nonce:k.global.rest_api_nonce,notice_id:"enable_email_metabox_notice"},jQuery.ajax({url:k.global.admin_url+"admin-ajax.php",type:"POST",dataType:"json",data:t,timeout:3e4,success:function(t){var e=t.data;if(!1===t.success)return console.log(e);n.target.parentElement.parentElement.style.display="none"},error:function(t,e,n){console.log(n)}}))})),k.isset(k.global,"request_params","page")&&"platform"===k.global.request_params.page&&(b={},["from","to"].forEach(function(t){k.isset(k.global,"request_params",t)&&(b[t]=k.global.request_params[t])}),["platforms-table","platforms"].forEach(function(t){jQuery("#"+k.getMetaBoxKey(t)+" .inside").css("height","430px")}),jQuery("#wp-statistics-platforms-table-widget .inside").html(k.placeholder()),jQuery(".wps-ph-picture").attr("style","height: 310px;"),k.run_meta_box("platforms",b,!1)),k.isset(k.global,"request_params","page")&&"privacy-audit"===k.global.request_params.page&&(v=function(t,e){var n=jQuery(e);n.html(""),n.parent().removeClass("loading"),(t=Array.isArray(t)?t:Object.values(t)).forEach(function(t){t=et(t),n.append(t)}),0===t.length?jQuery(e).parent().css("display","none"):jQuery(e).parent().css("display","block")},et=function(t){var e="",n=t.status,a=t.compliance.value,o=(t.hasOwnProperty("action")&&(a=t.action.value,"resolve"===t.action.key?(e+='data-audit="'.concat(t.name,'"data-action-modal="').concat(t.action.key,'"'),n=t.action.key+" js-openModal-privacy-audit-confirmation",document.querySelector("#privacy-audit-confirmation .wps-privacy-list__button").setAttribute("data-audit",t.name)):(e+='data-audit="'.concat(t.name,'" data-action="').concat(t.action.key,'"'),n=t.action.key)),'<div id="'.concat(t.name,'"class="wps-audit-card wps-audit-card--').concat(t.status,'"><div class="wps-audit-card__header"><div class="wps-audit-card__top"><div class="wps-audit-card__details"> ').concat(x(null==t?void 0:t.icon),'<div><h3 class="wps-audit-card__title">').concat(t.title,'</h3></div></div><div class="wps-audit-card__status">'));return t.hasOwnProperty("action")||(o+=' <span class="wps-audit-card__status-indicator"></span>'),o+"<a ".concat(e,' class="wps-privacy-list__button wps-privacy-list__button--').concat(n,'">').concat(a,'</a><button class="wps-audit-card__toggle" aria-expanded="false"></button></div></div></div><div class="wps-audit-card__body"><div class="wps-audit-card__content-text">').concat(t.notes,"</div></div></div>")},nt=function(t){var e='<div class="wps-audit-card wps-audit-card--'.concat(t.status,'"><div class="wps-audit-card__header"><div class="wps-audit-card__top"><div class="wps-audit-card__details">').concat(x(t.icon),'<div><h3 class="wps-audit-card__title">').concat(t.title,'</h3><p class="wps-audit-card__summary">').concat(t.summary,'</p></div></div><div class="wps-audit-card__status"><span class="wps-audit-card__status-indicator"></span>');return"warning"===t.status&&(e+='<span class="wps-audit-card__status-text">'.concat(k._("action_required"),"</span>")),e+'<button class="wps-audit-card__toggle" aria-expanded="false"></button></div></div></div><div class="wps-audit-card__body"><div class="wps-audit-card__content-text">'.concat(t.notes,"</div> </div></div>")},jQuery(document).ready(function(){var t={wps_nonce:k.global.rest_api_nonce,action:"wp_statistics_getPrivacyStatus"},t=Object.assign(t,k.global.request_params);jQuery.ajax({url:k.global.admin_url+"admin-ajax.php",type:"GET",dataType:"json",data:t,timeout:3e4,success:function(t){var e,n,a,o=t.data;if(0==t.success)return console.log(o);t=o.compliance_status,n=jQuery(".wps-adminHeader .wps-adminHeader__side .privacy"),(a=jQuery(".wps-privacy-status")).removeClass("loading success warning"),a.find(".wps-privacy-status__bar-passed").css("display","none"),a.addClass(100==t.percentage_ready?"success":"warning"),a.find(".wps-privacy-status__percent-value").text(t.percentage_ready),a.find(".wps-privacy-status__rules-mapped-value").text(t.rules_mapped),a.find(".wps-privacy-status__passed-value").text(t.summary.passed),a.find(".wps-privacy-status__final-value").text(t.rules_mapped),0<t.summary.action_required?n.addClass("warning"):n.removeClass("warning"),0<t.summary.passed&&(a.find(".wps-privacy-status__bar-passed").css("display","block"),a.find(".wps-privacy-status__bar-passed").css("width",t.percentage_ready+"%")),o.unpassed_audits&&(n=o.unpassed_audits,v(n,".wps-privacy-unpassed .wps-audit-cards__container")),o.passed_audits&&(a=o.passed_audits,v(a,".wps-privacy-passed .wps-audit-cards__container")),o.recommended_audits&&(t=o.recommended_audits,v(t,".wps-privacy-recommended .wps-audit-cards__container"),0<Object.keys(t).length)&&(document.querySelector(".wps-privacy-recommended").style.display="block"),n=o.faq_list,(e=jQuery(".wps-privacy-questions .wps-audit-cards__container")).html(""),e.removeClass("loading"),n.forEach(function(t){t=nt(t),e.append(t)})},error:function(t,e,n){console.log(n)}})}),document.addEventListener("click",function(t){var e,n;(t=t.target.closest(".wps-privacy-list__button[data-action]"))&&(e=(t=jQuery(t)).data("audit"),n=t.data("action"),jQuery("#"+e),t.hasClass("loading")||(t.addClass("loading"),jQuery(".wps-privacy-questions .wps-privacy-list__items").addClass("loading"),jQuery(".wps-privacy-status").addClass("loading"),t={wps_nonce:k.global.rest_api_nonce,action:"wp_statistics_updatePrivacyStatus",audit_name:e,audit_action:n},t=Object.assign(t,k.global.request_params),jQuery.ajax({url:k.global.admin_url+"admin-ajax.php",type:"POST",dataType:"json",data:t,timeout:3e4,success:function(t){var e=t.data;if(0==t.success)return console.log(e);location.reload()},error:function(t,e,n){console.log(n)}})))}),x=function(t){return t?'<div class="wps-audit-card__icon">'.concat(t,"</div>"):""}),k.isset(k.global,"request_params","page")&&"referrals"===k.global.request_params.page&&(t=function(t,e){var n,a;document.getElementById(t)&&(n=jQuery("#"+t).parent(),a=k.rectangle_placeholder(),n.append(a),null!=e&&null!=(a=e.data)&&a.datasets&&0!==e.data.datasets.length?(jQuery(".wps-ph-item").remove(),jQuery(".wps-postbox-chart--data").removeClass("c-chart__wps-skeleton--legend"),n.removeClass("c-chart__wps-skeleton"),k.new_line_chart(e,t,null)):(n.html(k.no_results()),jQuery(".wps-ph-item").remove()))},"undefined"!=typeof Wp_Statistics_Referrals_Object&&(t("sourceCategoriesChart",Wp_Statistics_Referrals_Object.source_category_chart_data),t("socialMediaChart",Wp_Statistics_Referrals_Object.social_media_chart_data),t("incomeVisitorChart",Wp_Statistics_Referrals_Object.search_engine_chart_data)),jQuery(document).on("click","div#referral-filter",function(t){t.preventDefault(),tb_show(k._("filters"),"#TB_inline?&width=430&height=205&inlineId=referral-filter-popup"),setTimeout(function(){var t,e,n,a="#wps-referral-filter-div";k.exist_tag(a+" button[type=submit]")||(jQuery(a).html('<div style="height: 50px;"></div>'+k.line_placeholder(1)),a=a,t=null===k.getLinkParams("referrer")?"disabled":"",e=(e=(e='<table class="o-table wps-referrals-filter">')+'<tr><td colspan="2" class="wps-referrals-filter-title">'.concat(k._("referrer"),"</td></tr>")+'<tr><td colspan="2" class="wps-referrals-filter-content"><select name="referrer" class="wps-select2 wps-width-100">')+"<option value=''>".concat(k._("all"),"</option>")+"<option value='test'>test</option>",null!=(n=k.getLinkParams("referrer"))&&(e+="<option value='".concat(n,"'selected>").concat(n,"</option>")),e=(e+="</select></td></tr>")+'<tr class="wps-tb-window-footer"><td><button class="js-reset-filter wps-reset-filter" type="button" '.concat(t,">").concat(k._("reset"),'</button></td><td><button type="submit" class="button-primary">').concat(k._("apply"),"</button></td></tr>")+"</table>",jQuery(a).html(e),jQuery(".wps-select2").select2({ajax:{delay:500,url:k.global.ajax_url,dataType:"json",data:function(t){var e,t={wps_nonce:k.global.rest_api_nonce,search:t.term,action:"wp_statistics_search_referrers",paged:t.page||1};return k.isset(k.global,"request_params")&&(e=k.global.request_params).page&&(t.page=e.page),t},error:function(t,e,n){console.error("AJAX request error:",e,n)}}}))},500)}),P="#wps-referrals-filter-form",jQuery(document).on("submit",P,function(){var t={select:["referrer"]};Object.keys(t).forEach(function(e){t[e].forEach(function(t){(t=jQuery(P+" "+e+"[name="+t+"]")).val().length<1&&t.prop("disabled",!0)})}),jQuery(".wps-tb-window-footer .button-primary").html(k._("loading")).addClass("loading")}),jQuery(document).on("click",".js-reset-filter",function(){var t=new URL(window.location.href);t.searchParams.delete("referrer"),window.location.href=t.toString()})),jQuery(".wp-statistics-settings").length&&(s=function(){j.checked=!0},(t=function(t){if(t=new RegExp("[?&]"+t+"=([^&#]*)").exec(window.location.href))return t[1]}("tab"))&&lt(t),jQuery(".wp-statistics-settings .wps-optionsMenu .wps-optionsMenuItem").click(function(){lt(jQuery(this).attr("data-tab"))}),E=document.querySelector('input[name="user_custom_header_ip_method"]'),j=document.getElementById("custom-header"),E)&&j&&(j.addEventListener("change",function(){j.checked&&E.focus()}),E.addEventListener("click",s),E.addEventListener("paste",s),E.addEventListener("input",s),E.addEventListener("dragover",s),E.addEventListener("drop",s)),t="input[name=wps_referrerspam]",at="tr.referrerspam_field",jQuery(document).on("change",t,function(t){t.preventDefault(),t=jQuery(at),this.checked?t.show("slow"):(t.hide("slow"),t.find("input[type=checkbox]").prop("checked",!1))}),k.isset(k.global,"request_params","page")&&"settings"===k.global.request_params.page&&(s=function(){"yes"===D.value?(T.style.display="table-row",M.style.display="table-row"):(T.style.display="none",M.style.display="none")},jQuery("#wp-statistics-settings-form ul.tabs li").click(function(t){t.preventDefault(),t=e(this).attr("data-tab"),"undefined"!=typeof localStorage&&localStorage.setItem("wp-statistics-settings-active-tab",t)}),"undefined"!=typeof localStorage&&k.isset(k.global,"request_params","save_setting")&&"yes"===k.global.request_params.save_setting&&(t=localStorage.getItem("wp-statistics-settings-active-tab"))&&0<t.length&&e("#wp-statistics-settings-form ul.tabs li[data-tab="+t+"]").click(),D=document.getElementById("wps_addon_settings[customization][show_wps_about_widget_overview]"),T=document.querySelector('label[for="wps_addon_settings[customization][wps_about_widget_title]"]').parentElement.parentElement,M=document.querySelector('label[for="wps_addon_settings[customization][wps_about_widget_content]"]').parentElement.parentElement,D)&&(s(),D.addEventListener("change",s)),k.isset(k.global,"request_params","page")&&"taxonomies"===k.global.request_params.page&&(S={ago:0,type:k.global.request_params.taxonomy,ID:0},["from","to","ID"].forEach(function(t){k.isset(k.global,"request_params",t)&&(S[t]=k.global.request_params[t])}),jQuery("span[id^='number-total-']").html(k.rectangle_placeholder("wps-text-placeholder")),k.run_meta_box("pages-chart",S,!1)),document.addEventListener("click",function(t){var e,n;!k.isset(k.global,"request_params","page")||"privacy-audit"!==k.global.request_params.page&&"tracker-debugger"!==k.global.request_params.page||t.target.closest(".js-openModal-wps-modal-privacy-audit-confirmation")||t.target.closest("a[data-action]")||(e=t.target.closest(".wps-audit-card__header"))&&(t.preventDefault(),n=e.closest(".wps-audit-card"))&&(t=document.querySelectorAll(".wps-audit-card"),e=n.classList.contains("wps-audit-card--expanded"),t.forEach(function(t){t!==n&&(t.classList.remove("wps-audit-card--expanded"),t.classList.add("wps-audit-card--collapsed"),t=t.querySelector(".wps-audit-card__toggle"))&&t.setAttribute("aria-expanded","false")}),e?(n.classList.remove("wps-audit-card--expanded"),n.classList.add("wps-audit-card--collapsed"),(t=n.querySelector(".wps-audit-card__toggle"))&&t.setAttribute("aria-expanded","false")):(n.classList.remove("wps-audit-card--collapsed"),n.classList.add("wps-audit-card--expanded"),(e=n.querySelector(".wps-audit-card__toggle"))&&e.setAttribute("aria-expanded","true")))}),k.isset(k.global,"request_params","page")&&"visitors"===k.global.request_params.page&&(Y=function(t,a){var o='<table class="o-table">',r={browsers:["agent","browsers"],country:["location","location"],platform:["platform","platform"],referrer:["referrer","referrer"],user:["user_id","users"]};Object.keys(r).forEach(function(e){o=(o=(o+="<tr><td>".concat(k._(e),"</td></tr>"))+'<tr><td><select name="'.concat(r[e][0],'" class="select2 wps-width-100" data-type-show="select2">'))+"<option value=''>".concat(k._("all"),"</option>");var n=k.getLinkParams(r[e][0]);Object.keys(a[r[e][1]]).forEach(function(t){o+="<option value='".concat(t,"' ").concat(null!=n&&n.replace(/\+/g," ")==t?"selected":"",">").concat(a[r[e][1]][t],"</option>")}),o+="</select></td></tr>"}),o=(o=(o+="<tr><td>".concat(k._("ip_hash"),"</td></tr>"))+'<tr><td><input placeholder="'.concat(k._("ip_hash_placeholder"),'" name="ip" value="').concat(null!=k.getLinkParams("ip")?decodeURIComponent(k.getLinkParams("ip")):"",'" class="wps-width-100" placeholder=\'\' autocomplete="off"></td></tr>')+"<tr><td></td></tr>")+'<tr class="wps-tb-window-footer"><td></td><td><button type="submit" class="button-primary">'.concat(k._("filter"),"</button></td></tr>")+"</table>",jQuery(t).html(o),k.select2()},jQuery(document).on("click","div#visitors-filter",function(t){t.preventDefault(),tb_show(k._("filters"),"#TB_inline?&width=430&height=510&inlineId=visitors-filter-popup"),setTimeout(function(){var t,e,n="#wps-visitors-filter-form";k.exist_tag(n+" button[type=submit]")||(jQuery(n).html('<div style="height: 50px;"></div>'+k.line_placeholder(5)),t=localStorage.getItem("wp-statistics-visitors-filter")?JSON.parse(localStorage.getItem("wp-statistics-visitors-filter")):{},!k.isset(t,"timestamp")||!k.isset(t,"value")||k.isset(t,"timestamp")&&k.isset(t,"value")?(e={wps_nonce:k.global.rest_api_nonce,action:"wp_statistics_visitors_page_filters"},e=Object.assign(e,k.global.request_params),jQuery.ajax({url:k.global.admin_url+"admin-ajax.php",type:"GET",dataType:"json",data:e,timeout:3e4,success:function(t){Y(n,t)},error:function(t,e,n){jQuery("span.tb-close-icon").click()}})):Y(n,t.value))},500)}),P="#wp_statistics_visitors_filter_form",jQuery(document).on("submit",P,function(){var t={input:["ip"],select:["agent","platform","location","referrer","user_id"]},e=(Object.keys(t).forEach(function(e){t[e].forEach(function(t){(t=jQuery(P+" "+e+"[name="+t+"]")).val().length<1&&t.prop("disabled",!0)})}),k.getLinkParams("order"));return null!=e&&jQuery(this).append('<input type="hidden" name="order" value="'+e+'" /> '),jQuery(".wps-tb-window-footer .button-primary").html(k._("loading")).addClass("loading"),!0}),document.getElementById("trafficTrendsChart")&&(t=Wp_Statistics_Visitors_Object.traffic_chart_data,k.new_line_chart(t,"trafficTrendsChart",null)),document.getElementById("LoggedInUsersChart"))&&(s=Wp_Statistics_Visitors_Object.logged_in_chart_data,k.new_line_chart(s,"LoggedInUsersChart",null)),k.date_picker(),("index.php"===k.global.page.file||k.is_active("overview_page")||"post-new.php"===k.global.page.file||"post.php"===k.global.page.file&&k.isset(k.global,"page","ID"))&&k.run_meta_boxes(),jQuery(document).ready(function(e){var a;e(document.body).on("click",".wps_img_settings_upload_button",function(t){t.preventDefault();var n=e(this);a||((a=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",library:{type:["image"]},multiple:!1})).on("menu:render:default",function(t){t.unset("library-separator"),t.unset("gallery"),t.unset("featured-image"),t.unset("embed"),t.unset("playlist"),t.unset("video-playlist"),t.set({})}),a.on("insert",function(){a.state().get("selection").each(function(t,e){t=t.toJSON(),n.parent().parent().find('input[type="text"]').val(t.url),n.parent().parent().parent().find("#wps-upload-image-preview").attr("src",t.url),n.parent().parent().find(".wps_img_settings_clear_upload_button").show()})})),a.open()}),e(document.body).on("click",".wps_img_settings_clear_upload_button",function(t){t.preventDefault(),e(this).parent().prev().val(""),e("#wps-upload-image-preview").attr("src",wps_ar_vars.default_avatar_url),e(".wps_img_settings_clear_upload_button").hide()})})});

Filemanager

Name Type Size Permission Actions
chartjs Folder 0755
datepicker Folder 0755
jqvmap Folder 0755
select2 Folder 0755
admin.min.js File 208.8 KB 0644
mini-chart.js File 915 B 0644
mini-chart.min.js File 928 B 0644
tinymce.min.js File 3.23 KB 0644
tracker.js File 3.81 KB 0644
tracker.min.js File 12.34 KB 0644