vendor: 13,229 bytes, lines 1-27
1/**! 2 3 @license 4 handlebars v4.7.7 5 6Copyright (C) 2011-2019 by Yehuda Katz 7 8Permission is hereby granted, free of charge, to any person obtaining a copy 9of this software and associated documentation files (the "Software"), to deal 10in the Software without restriction, including without limitation the rights 11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12copies of the Software, and to permit persons to whom the Software is 13furnished to do so, subject to the following conditions: 14 15The above copyright notice and this permission notice shall be included in 16all copies or substantial portions of the Software. 17 18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24THE SOFTWARE. 25 26*/ 27!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a.parseWithoutProcessing=j.parseWithoutProcessing,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(45),i=e(h),j=c(46),k=c(51),l=c(52),m=e(l),n=c(49),o=e(n),p=c(44),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(37),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(38),p=e(o),q=c(44),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(10),j=c(30),k=c(32),l=e(k),m=c(33),n="4.7.7";b.VERSION=n;var o=8;b.COMPILER_REVISION=o;var p=7;b.LAST_COMPATIBLE_COMPILER_REVISION=p;var q={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function e(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return!a&&0!==a||!(!p(a)||0!==a.length)}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l<f.length;l++)this[f[l]]=k[f[l]];Error.captureStackTrace&&Error.captureStackTrace(this,d);try{c&&(this.lineNumber=g,this.endLineNumber=h,e?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0})):(this.column=i,this.endColumn=j))}catch(m){}}var e=c(7)["default"];b.__esModule=!0;var f=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];d.prototype=new Error,b["default"]=d,a.exports=b["default"]},function(a,b,c){a.exports={"default":c(8),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b,c){return d.setDesc(a,b,c)}},function(a,b){var c=Object;a.exports={create:c.create,getProto:c.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:c.getOwnPropertyDescriptor,setDesc:c.defineProperty,setDescs:c.defineProperties,getKeys:c.keys,getNames:c.getOwnPropertyNames,getSymbols:c.getOwnPropertySymbols,each:[].forEach}},function(a,b,c){"use strict";function d(a){h["default"](a),j["default"](a),l["default"](a),n["default"](a),p["default"](a),r["default"](a),t["default"](a)}function e(a,b,c){a.helpers[b]&&(a.hooks[b]=a.helpers[b],c||delete a.helpers[b])}var f=c(1)["default"];b.__esModule=!0,b.registerDefaultHelpers=d,b.moveHelperToHooks=e;var g=c(11),h=f(g),i=c(12),j=f(i),k=c(25),l=f(k),m=c(26),n=f(m),o=c(27),p=f(o),q=c(28),r=f(q),s=c(29),t=f(s)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(d.isArray(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){(function(d){"use strict";var e=c(13)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(5),h=c(6),i=f(h);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){l&&(l.key=b,l.index=c,l.first=0===c,l.last=!!d,m&&(l.contextPath=m+b)),k+=f(a[b],{data:l,blockParams:g.blockParams([a[b],b],[m+b,null])})}if(!b)throw new i["default"]("Must pass iterator to #each");var f=b.fn,h=b.inverse,j=0,k="",l=void 0,m=void 0;if(b.data&&b.ids&&(m=g.appendContextPath(b.data.contextPath,b.ids[0])+"."),g.isFunction(a)&&(a=a.call(this)),b.data&&(l=g.createFrame(b.data)),a&&"object"==typeof a)if(g.isArray(a))for(var n=a.length;j<n;j++)j in a&&c(j,j,j===a.length-1);else if(d.Symbol&&a[d.Symbol.iterator]){for(var o=[],p=a[d.Symbol.iterator](),q=p.next();!q.done;q=p.next())o.push(q.value);a=o;for(var n=a.length;j<n;j++)c(j,j,j===a.length-1)}else!function(){var b=void 0;e(a).forEach(function(a){void 0!==b&&c(b,j-1),b=a,j++}),void 0!==b&&c(b,j-1,!0)}();return 0===j&&(k=h(this)),k})},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b,c){a.exports={"default":c(14),__esModule:!0}},function(a,b,c){c(15),a.exports=c(21).Object.keys},function(a,b,c){var d=c(16);c(18)("keys",function(a){return function(b){return a(d(b))}})},function(a,b,c){var d=c(17);a.exports=function(a){return Object(d(a))}},function(a,b){a.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(19),e=c(21),f=c(24);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(20),e=c(21),f=c(22),g="prototype",h=function(a,b,c){var i,j,k,l=a&h.F,m=a&h.G,n=a&h.S,o=a&h.P,p=a&h.B,q=a&h.W,r=m?e:e[b]||(e[b]={}),s=m?d:n?d[b]:(d[b]||{})[g];m&&(c=b);for(i in c)j=!l&&s&&i in s,j&&i in r||(k=j?s[i]:c[i],r[i]=m&&"function"!=typeof s[i]?c[i]:p&&j?f(k,d):q&&s[i]==k?function(a){var b=function(b){return this instanceof a?new a(b):a(b)};return b[g]=a[g],b}(k):o&&"function"==typeof k?f(Function.call,k):k,o&&((r[g]||(r[g]={}))[i]=k))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,a.exports=h},function(a,b){var c=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b){var c=a.exports={version:"1.2.6"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(23);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("if",function(a,b){if(2!=arguments.length)throw new g["default"]("#if requires exactly one argument");return e.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||e.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){if(2!=arguments.length)throw new g["default"]("#unless requires exactly one argument");return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("lookup",function(a,b,c){return a?c.lookupProperty(a,b):a})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("with",function(a,b){if(2!=arguments.length)throw new g["default"]("#with requires exactly one argument");e.isFunction(a)&&(a=a.call(this));var c=b.fn;if(e.isEmpty(a))return b.inverse(this);var d=b.data;return b.data&&b.ids&&(d=e.createFrame(b.data),d.contextPath=e.appendContextPath(b.data.contextPath,b.ids[0])),c(a,{data:d,blockParams:e.blockParams([a],[d&&d.contextPath])})})},a.exports=b["default"]},function(a,b,c){"use strict";function d(a){g["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultDecorators=d;var f=c(31),g=e(f)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerDecorator("inline",function(a,b,c,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=c.partials;c.partials=d.extend({},g,b.partials);var h=a(e,f);return c.partials=g,h}),b.partials[e.args[0]]=e.fn,f})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5),e={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=d.indexOf(e.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a}
27,log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=i(null);b.constructor=!1,b.__defineGetter__=!1,b.__defineSetter__=!1,b.__lookupGetter__=!1;var c=i(null);return c.__proto__=!1,{properties:{whitelist:l.createNewLookupObject(c,a.allowedProtoProperties),defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:l.createNewLookupObject(b,a.allowedProtoMethods),defaultValue:a.allowProtoMethodsByDefault}}}function e(a,b,c){return"function"==typeof a?f(b.methods,c):f(b.properties,c)}function f(a,b){return void 0!==a.whitelist[b]?a.whitelist[b]===!0:void 0!==a.defaultValue?a.defaultValue:(g(b),!1)}function g(a){o[a]!==!0&&(o[a]=!0,n.log("error",'Handlebars: Access has been denied to resolve the property "'+a+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function h(){j(o).forEach(function(a){delete o[a]})}var i=c(34)["default"],j=c(13)["default"],k=c(3)["default"];b.__esModule=!0,b.createProtoAccessControl=d,b.resultIsAllowed=e,b.resetLoggedProperties=h;var l=c(36),m=c(32),n=k(m),o=i(null)},function(a,b,c){a.exports={"default":c(35),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b){return d.create(a,b)}},function(a,b,c){"use strict";function d(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return f.extend.apply(void 0,[e(null)].concat(b))}var e=c(34)["default"];b.__esModule=!0,b.createNewLookupObject=d;var f=c(5)},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=v.COMPILER_REVISION;if(!(b>=v.LAST_COMPATIBLE_COMPILER_REVISION&&b<=v.COMPILER_REVISION)){if(b<v.LAST_COMPATIBLE_COMPILER_REVISION){var d=v.REVISION_CHANGES[c],e=v.REVISION_CHANGES[b];throw new u["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new u["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=s.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=s.extend({},e,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),g=b.VM.invokePartial.call(this,c,d,f);if(null==g&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),g=e.partials[e.name](d,f)),null!=g){if(e.indent){for(var h=g.split("\n"),i=0,j=h.length;i<j&&(h[i]||i+1!==j);i++)h[i]=e.indent+h[i];g=h.join("\n")}return g}throw new u["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(g,b,g.helpers,g.partials,f,i,h)}var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],f=e.data;d._setup(e),!e.partial&&a.useData&&(f=j(b,f));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=e.depths?b!=e.depths[0]?[b].concat(e.depths):e.depths:[b]),(c=k(a.main,c,g,e.depths||[],f,i))(b,e)}if(!b)throw new u["default"]("No environment passed to template");if(!a||!a.main)throw new u["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e=a.compiler&&7===a.compiler[0],g={strict:function(a,b,c){if(!(a&&b in a))throw new u["default"]('"'+b+'" not defined in '+a,{loc:c});return g.lookupProperty(a,b)},lookupProperty:function(a,b){var c=a[b];return null==c?c:Object.prototype.hasOwnProperty.call(a,b)?c:y.resultIsAllowed(c,g.protoAccessControl,b)?c:void 0},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++){var e=a[d]&&g.lookupProperty(a[d],b);if(null!=e)return a[d][b]}},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:s.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},mergeIfNeeded:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=s.extend({},b,a)),c},nullContext:n({}),noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){if(c.partial)g.protoAccessControl
27=c.protoAccessControl,g.helpers=c.helpers,g.partials=c.partials,g.decorators=c.decorators,g.hooks=c.hooks;else{var d=s.extend({},b.helpers,c.helpers);l(d,g),g.helpers=d,a.usePartial&&(g.partials=g.mergeIfNeeded(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(g.decorators=s.extend({},b.decorators,c.decorators)),g.hooks={},g.protoAccessControl=y.createProtoAccessControl(c);var f=c.allowCallsToHelperMissing||e;w.moveHelperToHooks(g,"helperMissing",f),w.moveHelperToHooks(g,"blockHelperMissing",f)}},d._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new u["default"]("must pass block params");if(a.useDepths&&!e)throw new u["default"]("must pass parent depths");return f(g,b,a[b],c,0,d,e)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return!g||b==g[0]||b===a.nullContext&&null===g[0]||(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function h(a,b,c){var d=c.data&&c.data["partial-block"];c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var e=void 0;if(c.fn&&c.fn!==i&&!function(){c.data=v.createFrame(c.data);var a=c.fn;e=c.data["partial-block"]=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.data=v.createFrame(c.data),c.data["partial-block"]=d,a(b,c)},a.partials&&(c.partials=s.extend({},c.partials,a.partials))}(),void 0===a&&e&&(a=e),void 0===a)throw new u["default"]("The partial "+c.name+" could not be found");if(a instanceof Function)return a(b,c)}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?v.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),s.extend(b,g)}return b}function l(a,b){o(a).forEach(function(c){var d=a[c];a[c]=m(d,b)})}function m(a,b){var c=b.lookupProperty;return x.wrapHelper(a,function(a){return s.extend({lookupProperty:c},a)})}var n=c(39)["default"],o=c(13)["default"],p=c(3)["default"],q=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var r=c(5),s=p(r),t=c(6),u=q(t),v=c(4),w=c(10),x=c(43),y=c(33)},function(a,b,c){a.exports={"default":c(40),__esModule:!0}},function(a,b,c){c(41),a.exports=c(21).Object.seal},function(a,b,c){var d=c(42);c(18)("seal",function(a){return function(b){return a&&d(b)?a(b):b}})},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b){"use strict";function c(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}
27b.__esModule=!0,b.wrapHelper=c},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return a;i["default"].yy=o,o.locInfo=function(a){return new o.SourceLocation(b&&b.srcName,a)};var c=i["default"].parse(a);return c}function e(a,b){var c=d(a,b),e=new k["default"](b);return e.accept(c)}var f=c(1)["default"],g=c(3)["default"];b.__esModule=!0,b.parseWithoutProcessing=d,b.parse=e;var h=c(47),i=f(h),j=c(48),k=f(j),l=c(50),m=g(l),n=c(5);b.parser=i["default"];var o={};n.extend(o,m)},function(a,b){"use strict";b.__esModule=!0
vendor: 10,920 bytes, line 27
27;var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{
27
vendor: 16,586 bytes, line 28
2833:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(null!==n&&"undefined"!=typeof n||(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(
2849
vendor: 6,533 bytes, line 28
28),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i<j;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;b<c;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substring(1,a.length-1):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g=0,h=b.length;g<h;g++){var i=b[g].part,j=b[g].original!==i;if(d+=(b[g].separator||"")+i,j||".."!==i&&"."!==i&&"this"!==i)e.push(i);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=m.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),
vendor: 11,631 bytes, lines 28-29
28f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(m.isArray(a)&&m.isArray(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!g(a[c],b[c]))return!1;return!0}}function h(a){if(!a.path.parts){var b=a.path;a.path={type:"PathExpression",data:!1,depth:0,parts:[b.original+""],original:b.original+"",loc:b.loc}}}var i=c(34)["default"],j=c(1)["default"];b.__esModule=!0,b.Compiler=d,b.precompile=e,b.compile=f;var k=c(6),l=j(k),m=c(5),n=c(45),o=j(n),p=[].slice;d.prototype={compiler:d,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;c<b;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;c<b;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[],b.knownHelpers=m.extend(i(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},b.knownHelpers),this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new l["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;d<c;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new l["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,o["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=o["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c<d;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:p.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=o["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&o["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;b<c;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||o["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;b<c;b++){var d=this.options.blockParams[b],e=d&&m.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;f<g;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),", ",JSON.stringify(b.source.currentLocation)," )"]:e}var g=c(13)["default"],h=c(1)["default"];b.__esModule=!0;var i=c(4),j=c(6),k=h(j),l=c(5),m=c(53),n=h(m);e.prototype={nameLookup:function(a,b){return this.internalNameLookup(a,b)},depthedLookup:function(a){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(a),")"]},compilerInfo:function(){var a=i.COMPILER_REVISION,b=i.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return l.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(a,b){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",a,",",JSON.stringify(b),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;h<i;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new k["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),";\n"]), 29this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var j=this.createFunctionContext(d);if(this.isChild)return j;var l={compiler:this.compilerInfo(),main:j};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;h<i;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new n["default"](this.options.srcName),this.decorators=new n["default"](this.options.srcName)},createFunctionContext:function(a){var b=this,c="",d=this.stackVars.concat(this.registers.list);d.length>0&&(c+=", "+d.join(", "));var e=0;g(this.aliases).forEach(function(a){var d=b.aliases[a];d.children&&d.referenceCount>1&&(c+=", alias"+ ++e+"="+a,d.children[0]="alias"+e)}),this.lookupPropertyFunctionIsUsed&&(c+=", "+this.lookupPropertyFunctionVarDeclaration());var f=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&f.push("blockParams"),this.useDepths&&f.push("depths");var h=this.mergeSource(c);return a?(f.push(h),Function.apply(this,f)):this.source.wrap(["function(",f.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\
29n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(a){var b=this.aliasable("container.hooks.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;c<h;c++)this.replaceStack(function(e){var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=[];c&&f.push(e.name),f.push(d),this.options.strict||f.push(this.aliasable("container.hooks.helperMissing"));var g=["(",this.itemsSeparatedBy(f,"||"),")"],h=this.source.functionCall(g,"call",e.callParams);this.push(h)},itemsSeparatedBy:function(a,b){var c=[];c.push(a[0]);for(var d=1;d<a.length;d++)c.push(b,a[d]);return c},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"Sub
29Expression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;f<g;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);if(null==h){this.context.programs.push("");var i=this.context.programs.length;d.index=i,d.name="program"+i,this.context.programs[i]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[i]=e.decorators,this.context.environments[i]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams,d.useDepths=this.useDepths,d.useBlockParams=this.useBlockParams}else d.index=h.index,d.name="program"+h.index,this.useDepths=this.useDepths||h.useDepths,this.useBlockParams=this.useBlockParams||h.useBlockParams}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a))return d}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new k["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b<c;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new k["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e.loc=JSON.stringify(this.source.currentLocation),e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["o
29ptions=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;c<d;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(g.isArray(a)){for(var d=[],e=0,f=a.length;e<f;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}var f=c(13)["default"];b.__esModule=!0;var g=c(5),h=void 0;try{}catch(i){}h||(h=function(a,b,c,d){this.src="",d&&this.add(d)},h.prototype={add:function(a){g.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){g.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;b<c;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new h(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof h?a:(a=d(a,this,b),new h(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=this,c=[];f(a).forEach(function(e){var f=d(a[e],b);"undefined"!==f&&c.push([b.quotedString(e),":",f])});var e=this.generateList(c);
29return e.prepend("{"),e.add("}"),e},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;c<e;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])});; 30 31Handlebars.registerHelper("limit", (array, count) => array.slice(0, count)); 32 33Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) { 34 switch (operator) { 35 case '===': 36 return (v1 === v2) ? options.fn(this) : options.inverse(this); 37 // Add more comparison operators if needed 38 default: 39 return options.inverse(this); 40 } 41}); 42 43const mdcObjectData = () => { 44 45 const siteUrl = ('http://localhost' === document.location.origin) ? 'http://localhost/mdc4' : document.location.origin; 46 47 return { 48 site_url: siteUrl, 49 merit_api: mdc_object.rest_api || '', 50 ajax_url: '', 51 rest_url: `${siteUrl}/wp-json/`, 52 } 53 54} 55 56const mdcObj = mdcObjectData(); 57 58/** 59 * Build the ajax request 60 * 61 * @param {string} type - Request type 62 * @returns {object} AJAX object request 63 */ 64async function mdcRequestData(type) { 65 const fetchConfig = { 66 method: "GET", 67 redirect: "follow", 68 }; 69 try { 70 const response = await window.fetch(mdc_object.rest_api + type, fetchConfig); 71 if (!response.ok) { 72 throw Error(response.statusText); 73 } 74 const data = await response.json(); 75 return data; 76 } catch (error) { 77 // eslint-disable-next-line no-console 78 console.error(error); 79 return error; 80 } 81} 82 83/** 84 * Process API data 85 * 86 * @param data {string} type 87 * @param templateName {string} type 88 * @returns {object} API object request 89 */ 90function mdcProcessData(data,templateName){ 91 var source = document.getElementById(templateName); 92 if (typeof (source) != 'undefined' && source != null) { 93 var template = Handlebars.compile(source.innerHTML); 94 return template(data); 95 }else{ 96 return false; 97 } 98} 99 100/** 101 * Get Wordpess Internal Rest API Data 102 * 103 * @param endpoint {string} type 104 * @returns {object} API object request 105 */ 106async function meritFeatchData( endpoint ) { 107 108 if(!endpoint){ 109 return false; 110 } 111 112 const fetchConfig = { 113 method: "GET", 114 redirect: "follow", 115 }; 116 117 try { 118 const response = await window.fetch( mdc_helper.rest_url + endpoint, fetchConfig ); 119 if ( ! response.ok ) { 120 throw Error( response.statusText ); 121 } 122 const data = await response.json(); 123 return data; 124 } catch ( error ) { 125 console.error(error); 126 return error; 127 } 128} 129 130/** 131 * Get Merit API Data 132 * 133 * @param endpoint {string} type 134 * @returns {object} API object request 135 */ 136async function meritFeatchProductsData( endpoint ){ 137 138 if(!endpoint){ 139 return false; 140 } 141 142 const featchConfig = { 143 method: "GET", 144 redirect: "follow" 145 } 146 147 try{ 148 const response = await window.fetch( endpoint, featchConfig ) 149 if ( ! response.ok ) { 150 throw Error( response.statusText ); 151 } 152 const data = await response.json(); 153 return data; 154 }catch( error ) { 155 console.error(error); 156 return false; 157 } 158} 159 160/** 161 * 162 * @param {string} screenSize 163 * @returns boolean 164 */ 165 166function mdc_media_queries( screenSize = 'max-lg' ) { 167 168 let mobileWidth = window.matchMedia("(max-width: 1024px)"); 169 170 171 if( 'max-md' == screenSize ){ 172 mobileWidth = window.matchMedia("(max-width: 767px)"); 173 } 174 175 if( 'max-sm' == screenSize ){ 176 mobileWidth = window.matchMedia("(max-width: 575px)"); 177 } 178 179 if( 'lg' == screenSize ){ 180 mobileWidth = window.matchMedia("(min-width: 1025px)"); 181 182 } 183 184 if( 'md' == screenSize ){ 185 mobileWidth = window.matchMedia("(min-width: 768px)"); 186 } 187 188 if( 'sm' == screenSize ){ 189 mobileWidth = window.matchMedia("(min-width: 576px)"); 190 } 191 192 if( ! mobileWidth.matches ){ 193 return false;
194 } 195 196 return true; 197} 198/** 199 * Merit slick slider 200 * slidesToShow = 1, dots = true, arrows = true, nextArrow = '', prevArrow = '', autoplay = false 201 */ 202 203function meritSlickSlider( container, args = null ){ 204 205 args = { 206 slidesToShow: 1, 207 dots: true, 208 dotsClass: 'slick-dots', 209 arrows: false, 210 nextArrow: '<button type="button" class="slick-prev">Next</button>', 211 prevArrow: '<button type="button" class="slick-prev">Prev</button>', 212 autoplay: false, 213 visibleOn: '' 214 } 215 216 let slider = jQuery(container); 217 218 if( slider ){ 219 slider.slick({ 220 dots: args.dots, 221 arrows: args.arrows, 222 slidesToShow: args.slidesToShow, 223 dotsClass: args.dotsClass, 224 prevArrow: args.prevArrow, 225 nextArrow: args.nextArrow, 226 adaptiveHeight: true, 227 }); 228 } 229} 230 231/** 232* Merit accordion script 233*/ 234const mdcAccordion = ( eventSelector, openFrist = true ) => { 235 236 const mdcFilter = document.querySelectorAll(eventSelector); 237 238 if( mdcFilter === null){ 239 return; 240 } 241 242 if( true === openFrist ){ 243 if( mdcFilter[0] ){ 244 const firstElement = mdcFilter[0].nextElementSibling; 245 firstElement.style.maxHeight = firstElement.scrollHeight + "px"; 246 mdcFilter[0].classList.add("is-open"); 247 } 248 } 249 250 mdcFilter.forEach((acc) => { 251 let contentWrapper = acc.nextElementSibling; 252 contentWrapper.classList.add('mdc-acc-content'); 253 acc.onclick = function () { 254 this.classList.toggle("is-open"); 255 let content = this.nextElementSibling; 256 257 if ( content.style.maxHeight ) { 258 content.style.maxHeight = null; 259 } else { 260 content.style.maxHeight = content.scrollHeight + "px"; 261 } 262 } 263 }); 264} 265/** 266* Merit Product accordion script 267*/ 268const mdcProductAccordion = ( wrapper) => { 269 //console.log(wrapper); 270 wrapper.forEach((acc, key) => { 271 let contentWrapper = acc.parentElement; 272 let title = acc.parentElement.previousElementSibling; 273 title.onclick = function () { 274 this.classList.toggle("is-open"); 275 let accorContent = this.nextElementSibling; 276 accorContent.classList.toggle('open-accordion'); 277 } 278 }); 279} 280 281/** 282 * Get unique category list 283 */ 284const getUniqueCatList = ( arr, key ) => { 285 return [...new Map( arr.map( item => [ item[key], item ] ) ).values() ] 286} 287 288const mdcSetCookie = (cname, cvalue, exdays) => { 289 const d = new Date(); 290 d.setTime(d.getTime() + (exdays*24*60*60*1000)); 291 let expires = "expires="+ d.toUTCString(); 292 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 293} 294 295const mdcGetCookie = (cname) => { 296 let name = cname + "="; 297 let decodedCookie = decodeURIComponent(document.cookie); 298 let ca = decodedCookie.split(';'); 299 for(let i = 0; i <ca.length; i++) { 300 let c = ca[i]; 301 while (c.charAt(0) == ' ') { 302 c = c.substring(1); 303 } 304 if (c.indexOf(name) == 0) { 305 return c.substring(name.length, c.length); 306 } 307 } 308 return ""; 309 } 310 311; 312;(function(){ 313 const meritMegaMenu = function(){ 314 315 const siteUrl = mdcObj.site_url; 316 const meritApi = mdcObj.merit_api; 317 const restUrl = mdcObj.rest_url; 318 319 320 321 const getData = async ( endpoint = null, dataType = 'product' ) =>{ 322 323 if( null === endpoint ) return; 324 325 if( 'category-infos' == dataType ){ 326 const data = await meritFeatchProductsData( endpoint ); 327 if( data ){ 328 const sortedCatName = Object.keys( data ).sort(); 329 let productCatByAlphabet = {}; 330 sortedCatName.forEach( ( key ) => { 331 productCatByAlphabet[key] = data[key]; 332 }); 333 334 productElements( productCatByAlphabet ); 335 } 336 }else if( 'parent-category' == dataType ){ 337 const data = await meritFeatchProductsData( endpoint ); 338 if(data){ 339 parentCategoryElement(data); 340 } 341 }else if( 'procedure' == dataType ){ 342 const data = await meritFeatchData(endpoint); 343 if(data){ 344 procedureElements(data); 345 procedureMobileElements(data); 346 } 347 }else if( 'featured' == dataType ){ 348 const data = await meritFeatchData(endpoint); 349 const response = data.response ?? false; 350 351 if(response){ 352 for (const key in response) { 353 if (response.hasOwnProperty(key)) { 354 const value = response[key]; 355 featuredElement(value, key) 356 } 357 } 358 } 359 } 360 361 return false 362 } 363 364 const isEmptyItem = (item) => { 365 return ( 366 item === null || 367 item === undefined || 368 (Array.isArray(item) && item.length === 0) || 369 (typeof item === 'object' && !Array.isArray(item) && Object.keys(item).length === 0) 370 ); 371 } 372 373 const getIconSrc = (name, type) =>{ 374 if( 'category' == type ){ 375 const catName = name.replace(/^primarycat\./, ''); 376 377 return siteUrl + `/wp-content/themes/mdc/assets/images/icons/menu/${catName}.svg`; 378 } 379 380 if( 'procedure' == type ){ 381 return siteUrl + `/wp-content/themes/mdc/assets/images/icons/menu/${name}.svg`; 382 } 383 384 return ''; 385 } 386 387 /** 388 * Creat Megamenu Product elements 389 */ 390 const productElements = ( productData = null )=>{ 391 392 if( null === productData ){ 393 return false;
394 } 395 396 const productTabContent = document.getElementById('megamenu-categories-content'); 397 const productTabContentMobile = document.getElementById('mobile-megamenu-categories'); 398 const featuredCategoryContent = document.querySelector('.featured-category-listing-area'); 399 400 if( null === productTabContent ){ 401 return false; 402 } 403 404 if( null === productTabContentMobile ){ 405 return false; 406 } 407 408 let catElement = ''; 409 let catElementMobile = ''; 410 411 for(const category in productData ){ 412 const {name, code, desc, child_cat} = productData[category]; 413 414 catElement += `<div class="mdc-megamunu-cat-data-item 2xl:w-1/4 lg:w-1/3 sm:w-1/2 w-full p-4 pt-0"> 415 ${name ? `<h3 class="text-xl text-merit-red font-medium leading-loose">${name}</h3>` : ''} 416 <ul id="mdc-cat-${code}" class="mdc-megamenu-cat-list">`; 417 418 for( let i=0; i < 2; i++){ 419 if( child_cat[i] ){ 420 catElement += `<li class="mdc-cat-item"> 421 <a href="${siteUrl}/primary/${code}/#${child_cat[i].CODE}" class="text-lg !text-charcoal font-light hover:!text-merit-red leading-normal" aria-label="MDC Category Item">${child_cat[i].NAME}</a> 422 </li>`; 423 } 424 } 425 426 catElement += ` 427 </ul> 428 <a class="mdc-megamenu-semore text-lg !text-merit-red font-light block leading-normal relative pl-5 mt-3 hover:!text-charcoal" aria-label="Megamenu Seemore" href="${siteUrl}/primary/${code}/"> See More</a> 429 </div>`; 430 431 /** 432 * Megamenu mobile data 433 */ 434 if( child_cat.length > 0 ){ 435 catElementMobile += `<li class="megamenu-mobile-cat-item group my-2 cursor-pointer" id="mobile-cat-item-${code}"> 436 <span class="megamenu-mobile-cat-span inline-block pr-5 text-base font-light text-charcoal group-[.child-active]:font-normal leading-loose transition-all relative before:block before:w-2 before:h-2 before:absolute before:right-0 before:top-1/2 before:-translate-y-1/2 before:border-r before:border-b before:border-merit-red before:rotate-45 before:transition-all group-[.child-active]:before:-rotate-[135deg] group-[.child-active]:before:top-[55%]">${name}</span> 437 <ul class="pl-2 transition-all hidden group-[.child-active]:block my-3">`; 438 child_cat.forEach( ( childCat ) => { 439 catElementMobile += `<li class="mdcchild-cat-item"> 440 <a href="${siteUrl}/primary/${code}/#${childCat.CODE}" data-category-code="${code}" class="megamenu-mobile-cate-link !text-base !font-light !text-charcoal leading-normal no-underline !py-0">${childCat.NAME}</a> 441 </li>` 442 }); 443 catElementMobile += '</ul></li>'; 444 } 445 } 446 447 productTabContent.innerHTML = catElement; 448 productTabContentMobile.innerHTML = catElementMobile; 449 450 if( null !== featuredCategoryContent ){ 451 featuredCategoryContent.innerHTML = catElement; 452 } 453 454 childItemActive(); 455 } 456 457 const parentCategoryElement = (data) =>{ 458 if( !data ){ 459 return false; 460 } 461 462 const parentCatGroup = parentCatSortByAlphabet(data); 463 const productTabContent = document.getElementById('megamenu-parent-categories-content'); 464 const productTabContentMobile = document.getElementById('megamenu-parent-categories-content-mobile'); 465 const showMoreBtn = document.getElementById('show-more-btn-categories'); 466 467 if( !productTabContent || !productTabContentMobile || !parentCatGroup ){ 468 return false;
469 } 470 471 let catElement = ''; 472 473 catElement += `<ul class="mdc-megamunu-parent-cat-list flex flex-wrap">`; 474 475 for (const group in parentCatGroup) { 476 const groupItems = parentCatGroup[group]; 477 478 groupItems.forEach((category) => { 479 const iconSrc = getIconSrc(category.CODE, 'category'); 480 catElement += `<li class="2xl:w-1/4 w-1/3 p-3 pl-0 pt-0 flex items-start gap-1"> 481 <span class="pr-[2px]"> 482 <img src="${iconSrc}" alt="${category.NAME}" class="w-4 h-4" onerror="this.onerror=null; this.src='${siteUrl}/wp-content/themes/mdc/assets/images/icons/menu/default.svg';" /> 483 </span> 484 <a href="${siteUrl}/primary/${category.CODE}/" class="text-base font-light !text-charcoal leading-normal hover:!text-merit-red block category-menu-link">${category.NAME} </a> 485 </li>`; 486 }); 487 } 488 489 catElement += `</ul>`; 490 491 492 /** 493 * For Mobile 494 */ 495 496 let isExpanded = false; 497 const renderItems = () => { 498 const visibleItems = isExpanded ? data : data.slice(0, 10); 499 let catElementMobile = ''; 500 501 visibleItems.forEach((category) => { 502 const iconSrc = getIconSrc(category.CODE, 'category'); 503 catElementMobile += `<li class="flex items-center gap-1 w-1/2"> 504 <span class="pr-[2px]"> 505 <img src="${iconSrc}" alt="${category.NAME}" class="w-4 h-4" onerror="this.onerror=null; this.src='${siteUrl}/wp-content/themes/mdc/assets/images/icons/menu/default.svg';" /> 506 </span> 507 <a href="${siteUrl}/primary/${category.CODE}/" data-category-code="${category.NAME}" class="block font-light md:text-lg !text-[15px] !text-charcoal no-underline md:leading-4 !leading-4 md:py-[10px] !pb-0 mb-2 category-menu-link">${category.NAME}</a> 508 </li>`; 509 }); 510 511 productTabContentMobile.innerHTML = catElementMobile; 512 513 if (data.length <= 10) { 514 showMoreBtn.style.display = 'none'; 515 } else { 516 showMoreBtn.textContent = isExpanded ? 'Show Less' : 'Show More'; 517 showMoreBtn.style.display = 'block'; 518 } 519 }; 520 521 522 productTabContent.innerHTML = catElement; 523 showMoreBtn.addEventListener('click', () => { 524 isExpanded = !isExpanded; 525 renderItems(); 526 }); 527 528 renderItems(); 529 } 530 531 const featuredElement = ( data, type ) =>{ 532 if( !type ){ 533 return false; 534 } 535 536 const featuredContentWrap = document.getElementById('mdc-megamenu-'+type); 537 const featuredContentMobileWrap = document.getElementById('mdc-mobile-menu-'+type); 538 const featuredPost = data; 539 540 if( !featuredContentWrap || !featuredContentMobileWrap ){ 541 return false; 542 } 543 544 let badgeText = 'Product'; 545 546 if( 'featured-solution' == type){ 547 badgeText = 'Solution'; 548 }else if('featured-investors' == type){ 549 badgeText = 'Events'; 550 }else if('featured-education' == type){ 551 badgeText = 'Conference'; 552 }else if('featured-careers' == type){ 553 badgeText = 'Location'; 554 } 555 556 featuredContentWrap.innerText = ''; 557 featuredContentMobileWrap.innerText = ''; 558 559 let element = ''; 560 561 if( 'featured-solution' == type || 'featured-product' == type ){ 562 const {title, link, btn_title, thumbnail, desc} = featuredPost; 563 564 element += `<div class="relative h-5"> 565 <span class="text-white bg-merit-red inline-block px-3 font-medium text-sm italic absolute top-0 left-0" itemprop="text">${badgeText}</span> 566 </div> 567 <div class="pl-4 pr-4 pb-4 max-sm:mb-5"> 568 ${ thumbnail ? `<div class="h-[170px] bg-cover bg-center shadow bg-white"> 569 <img class="w-full h-40 object-contain" src="${thumbnail}" alt="${badgeText} Thumbnail"> 570 </div>`: ``} 571 <div> 572 ${ title ? ` <header class="featured-title flex"> 573 <h2 class="mt-2" itemprop="headline"> 574 <a href="${link}" class="text-charcoal text-xl font-medium ">${title}</a></h2> 575 </header> `: ``} 576 ${ desc ? ` <p class=" text-[15px]" itemprop="description">Our diverse product portfolio is continuously evolving, helping healthcare systems around the globe provide care that leads to positive patient outcomes.</p> `: ``} 577 </div> 578 579 ${ link ? `<div> 580 <a href="${link}" class="overlay-btn hover:underline !hover:text-charcoal !decoration-charcoal transition duration-300 hover:underline-offset-4 text-[16px] text-merit-red">${btn_title}</a> 581 </div>`: ``} 582 </div>`; 583 } 584 585 if( 'featured-investors' == type || 'featured-education' == type){ 586 const {title, link, btn_title, short_info, location, time_zone, target, start_date, end_date} = featuredPost; 587 const startDate = start_date ? start_date.replace(",", "") : ''; 588 const endDate = end_date ? end_date.replace(",", "") : ''; 589 590 element += `<div class="card rounded-[10px] relative p-6 bg-white "> 591 ${ badgeText ? `<span class="text-white text-sm font-normal inline-block mb-2.5 px-3 py-1 rounded-[10px_0] bg-merit-red absolute top-0 left-0 ">${badgeText}</span>`: ``} 592 ${ !isEmptyItem(featuredPost) ? ` 593 ${ title ? `<h2 class="card-title text-red-600 text-xl font-medium mb-3 pt-6">${title}</h2>`: ``} 594 ${ short_info ? `<p class="card-description text-gray-600 text-sm mb-4">${short_info}</p>` : ''} 595 <div class="location bg-gray-100 text-gray-700 text-sm font-medium px-4 py-2 rounded-full inline-block mb-5 w-fit"> 596 ${ location ? location : '' }, ${ time_zone ? time_zone : '' } (${ startDate } - ${ endDate }) 597 </div> 598 ${ link ? `<a href="${link}" ${ target ? `target="${target}"` : ''} class=" more info text-red-600 text-base font-medium flex items-center leading-[10px] no-u
598nderline"> > ${btn_title}</a>` : ''} 599 ` : '<p class="card-description text-gray-600 text-sm mb-4 mt-4">Stay tuned — no events are currently open at the moment!</p>' } 600 </div>`; 601 } 602 603 if('featured-careers' == type){ 604 const {title, link, btn_title, address, short_info} = featuredPost; 605 606 element += `<div class="card rounded-[10px] relative p-6 bg-white "> 607 ${ badgeText ? `<span class="text-white text-sm font-normal inline-block mb-2.5 px-3 py-1 rounded-[10px_0] bg-merit-red absolute top-0 left-0 ">${badgeText}</span>`: ``} 608 ${ !isEmptyItem(featuredPost) ? ` 609 ${ title ? `<h2 class="card-title text-red-600 text-xl font-medium mb-3 pt-6">${title}</h2>`: ``} 610 ${ address ? `<p class="card-description text-gray-600 text-sm mb-4">${address}</p>` : ''} 611 ${ link ? `<a href="${link}" class=" more info text-red-600 text-base font-medium flex items-center leading-[10px] no-underline"> > ${btn_title}</a>` : ''} 612 ` : '<p class="card-description text-gray-600 text-sm mb-4 mt-4">Stay tuned — no location are found!</p>' } 613 </div>`; 614 } 615 616 featuredContentWrap.innerHTML = element; 617 featuredContentMobileWrap.innerHTML = element; 618 619 mdcAccordion('.mdc-megamenu-filter-heading', false); 620 } 621 622 const parentCatSortByAlphabet = ( data ) =>{ 623 if(!data){ 624 return false; 625 } 626 627 data.sort((a, b) => a.NAME.localeCompare(b.NAME)); 628 629 // Group the data by the first letter of NAME 630 const groupedData = data.reduce((groups, item) => { 631 const groupKey = item.NAME[0].toUpperCase(); // First letter of NAME 632 if (!groups[groupKey]) { 633 groups[groupKey] = []; 634 } 635 groups[groupKey].push(item); 636 return groups; 637 }, {}); 638 639 return groupedData; 640 } 641 642 /** 643 * Creat Megamenu Procedure elements 644 */ 645 const procedureElements = ( procedureData = null ) =>{ 646 647 if( null === procedureData ) return false; 648 /** 649 * Procedure Desktop 650 */ 651 const megaMenuProcedureContent = document.getElementById('megamenu-procedure-content'); 652 const featuredProcedureContent = document.querySelector('.featured-content-type-solutions'); 653 if( null !== megaMenuProcedureContent ){ 654 let procedureElements = ''; 655 656 procedureElements += `<ul class="mdc-megamunu-procedure-list flex flex-wrap">`; 657 658 procedureData.forEach((procedure) => { 659 let iconSrc = getIconSrc(procedure.post_name, 'category'); 660 procedureElements += `<li class="2xl:w-1/4 w-1/3 p-3 pl-0 pt-0 flex items-start gap-1"> 661 <span class="pr-[2px]"> 662 <img src="${iconSrc}" alt="${procedure.title}" class="w-4 h-4" onerror="this.onerror=null; this.src='${siteUrl}/wp-content/themes/mdc/assets/images/icons/menu/default.svg';" /> 663 </span> 664 <a href="${procedure.link}" class="text-base font-light !text-charcoal leading-normal hover:!text-merit-red block procedure-menu-link"> ${procedure.title} </a> 665 </li>`; 666 }); 667 668 procedureElements += `</ul>`; 669 670 megaMenuProcedureContent.innerHTML = procedureElements; 671 672 if( null !== featuredProcedureContent ){ 673 featuredProcedureContent.innerHTML = procedureElements; 674 } 675 676 } 677 678 /** 679 * Filter on mobile 680 */ 681 procedureFilter( procedureData ); 682 683 } 684 685 const procedureMobileElements = (dataArr = null) => { 686 if (dataArr === null) return false; 687 688 const procedureAlphabets = document.getElementById('mobile-megamenu-procedure-id'); 689 const showMoreBtn = document.getElementById('show-more-btn-procedure'); 690 if (!procedureAlphabets || !showMoreBtn) return false;
691 692 let isExpanded = false; 693 694 const renderItems = () => { 695 const visibleItems = isExpanded ? dataArr : dataArr.slice(0, 10); 696 let procedureElements = ''; 697 698 visibleItems.forEach((procedure) => { 699 let iconSrc = getIconSrc(procedure.post_name, 'category'); 700 procedureElements += `<li class="flex items-center gap-1 w-1/2"> 701 <span class="pr-[2px]"> 702 <img src="${iconSrc}" alt="${procedure.title}" class="w-4 h-4" onerror="this.onerror=null; this.src='${siteUrl}/wp-content/themes/mdc/assets/images/icons/menu/default.svg';" /> 703 </span> 704 <a href="${procedure.link}" class="block font-light md:text-lg !text-[15px] !text-charcoal no-underline md:leading-4 !leading-4 md:py-[10px] !pb-0 mb-2 procedure-menu-link">${procedure.title}</a> 705 </li>`; 706 }); 707 708 procedureAlphabets.innerHTML = procedureElements; 709 710 if (dataArr.length <= 10) { 711 showMoreBtn.style.display = 'none'; 712 } else { 713 showMoreBtn.textContent = isExpanded ? 'Show Less' : 'Show More'; 714 showMoreBtn.style.display = 'block'; 715 } 716 }; 717 718 showMoreBtn.addEventListener('click', () => { 719 isExpanded = !isExpanded; 720 renderItems(); 721 }); 722 723 renderItems(); 724 }; 725 726 /** 727 * Procedure filter on Mobile 728 */ 729 const procedureFilter = ( dataArr = null ) =>{ 730 731 if( dataArr === null){ 732 return; 733 } 734 735 const procedureAlphabetsItem = document.getElementsByClassName('mobile-megamenu-procedure-alphabet-item'); 736 737 if( procedureAlphabetsItem.length > 0 ){ 738 for( const alphabet of procedureAlphabetsItem ){ 739 const alphabetItem = alphabet.getAttribute('data-alphabet'); 740 alphabet.style.pointerEvents = 'none'; 741 alphabet.classList.add('disabled'); 742 743 for( const group in dataArr ){ 744 const groupItems = dataArr[group]; 745 746 if( group === alphabetItem ){ 747 alphabet.style.pointerEvents = null; 748 alphabet.classList.remove('disabled'); 749 } 750 751 } 752 753 alphabet.onclick = (event) =>{ 754 const alphabetGroup = event.target.getAttribute('data-alphabet'); 755 const getData = dataArr[alphabetGroup]; 756 757 if( getData.length > 0 ){ 758 procedureMobileElements( getData ); 759 } 760 761 } 762 } 763 } 764 765 return false; 766 } 767 768 function switchMenuContent(id) { 769 770 const tabsContent = document.querySelectorAll(".mdc-megamenu-tab-content"); 771 let tabBtns = document.querySelectorAll('.megamenu-tab-btn'); 772 773 tabsContent.forEach( tab => { 774 tab.style.display = 'none'; 775 }); 776 777 tabBtns.forEach(tabBtn => { 778 tabBtn.classList.remove('selected'); 779 }); 780 781 document.getElementById(id).style.display = 'block'; 782 document.getElementById('btn-'+id).classList.add('selected'); 783 784 } 785 786 /** 787 * Megamenu Filter tab 788 */ 789 const megamenuFilterTab = () => { 790 791 const firstContent = document.querySelectorAll(".mdc-megamenu-tab-content"); 792 const tabBtn = document.querySelectorAll('.megamenu-tab-btn'); 793 794 if( tabBtn === null){ 795 return; 796 } 797 798 if(firstContent[0]){ 799 firstContent[0].style.display = 'block'; 800 } 801
802 tabBtn.forEach((btn) => { 803 btn.onclick = function () { 804 let tabContent = this.getAttribute('data-content'); 805 switchMenuContent(tabContent); 806 } 807 }); 808 } 809 810 /** 811 * Mobile child item active 812 */ 813 const childItemActive = () =>{ 814 const childItem = document.getElementsByClassName('megamenu-mobile-cat-item'); 815 if( childItem.length > 0 ){ 816 for( const item of childItem ){ 817 item.addEventListener('click', function(e){ 818 const target = e.target; 819 if( target.classList.contains('megamenu-mobile-cat-span') ){ 820 this.classList.toggle('child-active'); 821 } 822 823 if( target.classList.contains('megamenu-mobile-cate-link') ){ 824 const siteUrl = window.location.href; 825 const categoryCode = target.getAttribute('data-category-code'); 826 const offCanvas = document.getElementById('mdc-offcanvas'); 827 const MenuToggle = document.getElementById('menu-toggle'); 828 829 if( siteUrl.includes('#') && categoryCode && siteUrl.includes(categoryCode) ){
830 if( MenuToggle && offCanvas ){ 831 offCanvas.classList.remove('offcanvas-open'); 832 MenuToggle.classList.remove('active-menu-toggle'); 833 } 834 835 } 836 } 837 838 }); 839 } 840 } 841 842 return false; 843 } 844 845 const mobileFilterHeadAccor = () => { 846 const filterHeading = document.querySelectorAll('.mdc-mobile-megamenu-products-data-heading'); 847 filterHeading.forEach( heading => { 848 heading.addEventListener('click', function(){ 849 const $this = this; 850 $this.classList.toggle('active-filter-heading'); 851 $this.nextElementSibling.classList.toggle('active-filter-list') 852 }); 853 } ) 854 } 855 856 const productTabs = ( device = false ) =>{ 857 let tabSelector = device == 'mobile' ? '.mdc-megamenu-product-tabs-mobile' : '.mdc-megamenu-product-tabs'; 858 const productTab = document.querySelector(tabSelector); 859 860 if( !productTab ){ 861 return false; 862 } 863 864 const tabButtons = productTab.querySelectorAll('[role="tab"]'); 865 const tabPanels = Array.from(productTab.querySelectorAll('[role="tabpanel"]')); 866 867 function tabClickHandler(e) { 868 let protudcBtnSelector = device == 'mobile' ? 'mdc-megamenu-featured-product-mobile' : 'mdc-megamenu-featured-product'; 869 let solutionBtnSelector = device == 'mobile' ? 'mdc-megamenu-featured-solution-mobile' : 'mdc-megamenu-featured-solution'; 870 const productFeatured = document.getElementById(protudcBtnSelector); 871 const solutionFeatured = document.getElementById(solutionBtnSelector); 872 873 874 //Hide All Tabpane 875 tabPanels.forEach(panel => { 876 panel.hidden = 'true'; 877 }); 878 879 //Deselect Tab Button 880 tabButtons.forEach( button => { 881 button.setAttribute('aria-selected', 'false'); 882 }); 883 884 //Mark New Tab 885 e.currentTarget.setAttribute('aria-selected', 'true'); 886 887 //Show New Tab 888 const { id } = e.currentTarget; 889 890 const currentTab = tabPanels.find( 891 panel => panel.getAttribute('aria-labelledby') === id 892 ); 893 894 //Show hide featured content 895 if( solutionFeatured && productFeatured ){ 896 if( 'mobile' == device ){ 897 if( id == 'mdc-tab-categories-mobile' ){ 898 productFeatured.classList.remove('hidden') 899 solutionFeatured.classList.add('hidden'); 900 }else if( id == 'mdc-tab-procedure-mobile' ){ 901 productFeatured.classList.add('hidden') 902 solutionFeatured.classList.remove('hidden'); 903 } 904 }else{ 905 if( id == 'mdc-tab-categories' ){ 906 productFeatured.classList.remove('hidden') 907 solutionFeatured.classList.add('hidden'); 908 }else if( id == 'mdc-tab-procedure' ){ 909 productFeatured.classList.add('hidden') 910 solutionFeatured.classList.remove('hidden'); 911 } 912 } 913 } 914 915 currentTab.hidden = false; 916 } 917 918 tabButtons.forEach(button => { 919 button.addEventListener('click', tabClickHandler); 920 }) 921 } 922 923 const megaMenu = () =>{ 924 productTabs(); 925 productTabs('mobile'); 926 927 /** 928 * Product categories and child category data 929 */ 930 // let endpoint = `${meritApi}category-infos`; 931 // getData( endpoint, 'category-infos' ); 932 933 /** 934 * Product parante category 935 */ 936 let endpoint = `${meritApi}/mdc/category/all-primary`; 937 getData( endpoint, 'parent-category' ); 938 939 /** 940 * Featured 941 */ 942 endpoint = `merit-core/v1/get-featured`; 943 getData(endpoint, 'featured'); 944 945 /** 946 * Procedure solutions data 947 */ 948 endpoint = `merit-core/v1/get-procedure`; 949 getData( endpoint, 'procedure' ); 950 951 mdcAccordion('.mdc-megamenu-filter-heading', false); 952 mobileFilterHeadAccor(); 953 megamenuFilterTab(); 954 955 const scrollToBottom = document.querySelectorAll('.mdc-megamenu-scroll-more'); 956 957 if( null !== scrollToBottom ){ 958 scrollToBottom.forEach( btn => { 959 btn.onclick = () => { 960 961 const ScrollBottom = btn.getAttribute('data-scroll-bottom'); 962 const megaMenuCategory = document.getElementById(ScrollBottom); 963 964 if( null !== megaMenuCategory ){ 965 const scrollOptions = { 966 top: megaMenuCategory.scrollHeight, 967 behavior: 'smooth' 968 }; 969 970 megaMenuCategory.scrollTo(scrollOptions); 971 } 972 } 973 } ); 974 } 975 } 976 977 return{ 978 main: megaMenu 979 } 980 981 }(); 982 983 meritMegaMenu.main(); 984})();; 985;( function () { 986 987 /** 988 * Unitek Blog Filter script 989 */ 990 const meritArticle = function(){ 991 const siteUrl = mdcObj.site_url; 992 const restUrl = mdcObj.rest_url; 993 994 let isProcessing = false;
995 const articleContainer = document.querySelector('.merit-article-container'); 996 997 if( articleContainer === null ){ 998 return false; 999 } 1000 1001 const archiveData = articleContainer.getAttribute('data-archive'); 1002 1003 1004 1005 /** 1006 * Get Wordpess Internal Rest API Data 1007 * 1008 * @param endpoint {string} type 1009 * @returns {object} API object request 1010 */ 1011 async function featchArticleData( endpoint ) { 1012 1013 if( ! endpoint ){ 1014 return false; 1015 } 1016 1017 const fetchConfig = { 1018 method: "GET", 1019 redirect: "follow", 1020 }; 1021 1022 try { 1023 const response = await window.fetch( restUrl + endpoint, fetchConfig ); 1024 if ( ! response.ok ) { 1025 throw Error( response.statusText ); 1026 } 1027 const data = await response.json(); 1028 return { 1029 data: data, 1030 wpTotalPages: response.headers.get('X-WP-TotalPages'), 1031 wpTotal: response.headers.get('x-wp-total') 1032 }; 1033 } catch ( error ) { 1034 console.error(error); 1035 return error; 1036 } 1037 } 1038 1039 /** 1040 * Get posts 1041 */ 1042 const getData = (page) =>{ 1043 1044 if( ! page ){ 1045 return false; 1046 } 1047 1048 articleContainer.setAttribute('data-currentpage', page ); 1049 let getArchive = ''; 1050 1051 if( archiveData ){ 1052 const archiveObj = JSON.parse(archiveData); 1053 if( 'category' === archiveObj.taxonomy ){ 1054 getArchive = `categories=${archiveObj.id}&` 1055 }else if('tag' === archiveObj.taxonomy){ 1056 getArchive = `tags=${archiveObj.id}&` 1057 }else if('author' === archiveObj.taxonomy){ 1058 getArchive = `user=${archiveObj.id}&` 1059 } 1060 } 1061 1062 const endpoint = `wp/v2/posts?${getArchive}page=${page}&per_page=9&_embed=author,wp:featuredmedia&_fields=id,date,excerpt,title.rendered,link,_links.wp:featuredmedia,_embedded.wp:featuredmedia`; 1063 1064 featchArticleData(endpoint) 1065 .then( articleData => { 1066 const articles = articleData.data; 1067 const totalPage = articleData.wpTotalPages; 1068 let postElement = `<div class="merit-article-page-item flex flex-wrap items-stretch md:-mx-4" data-pageItem="${page}">`; 1069 1070 articles.forEach( ( article ) => { 1071 console.log(article); 1072 1073 let postThumb = ''; 1074 let altText = ''; 1075 if( article._embedded && article._embedded['wp:featuredmedia'] ){ 1076 postThumb = article._embedded['wp:featuredmedia'][0]['source_url']; 1077 altText = article._embedded['wp:featuredmedia'][0]['alt_text']; 1078 } 1079 postElement += `<article id="post-${article.id}" class="merit-article-card-item relative min-h-[515px] w-1/3 px-5 max-xl:w-1/2 mb-10 max-md:w-full"> 1080 <div class="flex flex-col bg-white h-full merit-box-shadow"> 1081 <div class="h-[200px]"> 1082 <img src="${postThumb}" class="w-full h-full object-cover" width="410" height="200" alt="${altText}"> 1083 </div> 1084 <div class="article-card-info pl-6 pr-12 pt-4 pb-10 flex flex-col justify-between h-full"> 1085 <h3 class="mb-4"> 1086 <a href="${article.link}" class="text-2xl font-normal text-charcoal ">${article.title.rendered}</a> 1087 </h3> 1088 ${article.excerpt.rendered} 1089 <div class="mt-12"> 1090 <a href="${article.link}" class="merit-btn-secondary-alt">Learn More</a> 1091 </div> 1092 </div> 1093 </div> 1094 </article>`; 1095 }); 1096 1097 postElement += `</div>` 1098 articleContainer.innerHTML += postElement; 1099 isProcessing = false;
1100 }); 1101 } 1102 1103 /** 1104 * Unitek blog filter main script 1105 */ 1106 const articleMain = () => { 1107 let last_scroll = 0; 1108 const siteFooter = document.querySelector('footer.wp-block-template-part'); 1109 const footerOfset = siteFooter.clientHeight + 200; 1110 1111 /** 1112 * mostly visible function 1113 */ 1114 function mostlyVisible(element) { 1115 let scroll_pos = jQuery(window).scrollTop(); 1116 let window_height = jQuery(window).height(); 1117 let el_top = jQuery(element).offset().top; 1118 let el_height = jQuery(element).height(); 1119 let el_bottom = el_top + el_height; 1120 return ( ( el_bottom - el_height*0.25 > scroll_pos ) && ( el_top < ( scroll_pos+0.5*window_height ) ) ); 1121 } 1122 1123 /** 1124 * Post load init 1125 */ 1126 window.onload = () => { 1127 1128 /** 1129 * chack page on url 1130 */ 1131 const checkPage = (data) =>{ 1132 return data === 'page'; 1133 } 1134 const currentUrl = window.location.pathname.split("/"); 1135 const findPage = currentUrl.find(checkPage); 1136 1137 if( findPage ){ 1138 let pageNnItem = document.querySelector('.merit-article-page-item'); 1139 const urlIndex = currentUrl.indexOf(findPage) + 1; 1140 1141 articleContainer.setAttribute('data-currentpage', Number( currentUrl[urlIndex] ) ); 1142 pageNnItem.setAttribute('data-pageitem', Number( currentUrl[urlIndex] ) ); 1143 } 1144 1145 } 1146 1147 1148 window.addEventListener('scroll', () => { 1149 1150 const currentpage = Number(articleContainer.getAttribute('data-currentpage')); 1151 const maxPage = Number(articleContainer.getAttribute('data-maxpage')); 1152 1153 let scroll_pos = jQuery(window).scrollTop(); 1154 1155 if (currentpage < maxPage) { 1156 if (!isProcessing && window.scrollY + window.innerHeight >= document.documentElement.scrollHeight - footerOfset) { 1157 const getPage = currentpage + 1; 1158 isProcessing = true; 1159 getData(getPage); 1160 } 1161 } 1162 1163 if (Math.abs(scroll_pos - last_scroll) > jQuery(window).height() * 0.1) { 1164 last_scroll = scroll_pos; 1165 1166 const currentPageItem = jQuery(".merit-article-page-item"); 1167 1168 currentPageItem.each(function () { 1169 if (mostlyVisible(this)) { 1170 1171 let paged = jQuery(this).attr("data-pageitem"); 1172 1173 if (archiveData) { 1174 const archiveDataObj = JSON.parse(archiveData); 1175 1176 if (paged && maxPage > 1) { 1177 const updateUrl = `${siteUrl}/${archiveDataObj.taxonomy}/${archiveDataObj.term}/page/${paged}/`; 1178 history.replaceState(null, null, updateUrl); 1179 } 1180 } else { 1181 if (paged && maxPage > 1) { 1182 const updateUrl = `${siteUrl}/articles/page/${paged}/`; 1183 history.replaceState(null, null, updateUrl); 1184 } 1185 } 1186 1187 return false; 1188 } 1189 }); 1190 } 1191 }); 1192 } 1193 1194 return{ 1195 main:articleMain, 1196 } 1197 1198 }(); 1199 1200 meritArticle.main(); 1201 1202})(); 1203; 1204/*! Magnific Popup - v1.1.0 - 2016-02-20 1205* http://dimsemenov.com/plugins/magnific-popup/ 1206* Copyright (c) 2016 Dmitry Semenov; */ 1207!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.
1207st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;
1207if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;
1207var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});
1207var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});; 1208(function () { 1209 1210 1211 /** 1212 * Pull product information and show using data table 1213 * @param {*} container DOM where it placed 1214 * @param {*} code Product Code 1215 * @returns HTML 1216 */ 1217 const getOrderInformationData = async (container,code) => { 1218 1219 if(!code){ 1220 return false;
1221 } 1222 1223 const response = await mdcRequestData("/product/information-table/"+code); 1224 1225 if (response && response.data.length > 0) { 1226 1227 const indexedItems = response.data.reduce((result, item) => { 1228 const catalogNumber = item.CATALOG_NUMBER; 1229 const attrName = item.ATTRIBUTE_NAME; 1230 const value = item.VALUE; 1231 1232 if (!result[catalogNumber]) { 1233 result[catalogNumber] = {}; 1234 } 1235 result[catalogNumber][attrName] = value; 1236 return result; 1237 }, {}); 1238 1239 const result = { 1240 attr_name: response.attr_name, 1241 catalog_number: response.catalog_number, 1242 data: indexedItems, 1243 }; 1244 1245 const gtinFields = ["GS1", "GTIN Unit", "GTIN Carton", "GTIN Shipper"]; 1246 1247 const emptyGtinFields = gtinFields.filter(attr => 1248 result.catalog_number.every(cn => 1249 !( 1250 result.data[cn] && 1251 result.data[cn][attr] && 1252 result.data[cn][attr].trim() !== "" 1253 ) 1254 ) 1255 ); 1256 1257 // container.innerHTML = mdcProcessData(result, "orderDataTemplate"); 1258 1259 const orderInformationTemplate = `<table class="merit-order-table shop_table shop_table_responsive table table-striped table-bordered max-w-full"> 1260 <thead> 1261 <tr> 1262 <th>Catalog Number</th> 1263 ${result.attr_name.filter(attr => !emptyGtinFields.includes(attr)).map(attr => `<th>${attr}</th>`).join('')} 1264 </tr> 1265 </thead> 1266 <tbody> 1267 ${result.catalog_number.map(catalogNumber => ` 1268 <tr> 1269 <td>${catalogNumber}</td> 1270 ${result.attr_name.filter(attr => !emptyGtinFields.includes(attr)).map(attr => `<td>${result.data[catalogNumber]?.[attr] ?? ''}</td>`).join('')} 1271 </tr> 1272 `).join('')} 1273 </tbody> 1274 </table>`; 1275 1276 container.innerHTML = orderInformationTemplate; 1277 1278 let orderTable = container.querySelector('.merit-order-table'); 1279 1280 if (orderTable !== null && typeof DataTable !== "undefined") { 1281 1282 new DataTable(orderTable, 1283 { 1284 ordering: true, 1285 responsive: { 1286 details: true 1287 }, 1288 language: { 1289 search: "_INPUT_", 1290 searchPlaceholder: "Search Catalog Number" 1291 } 1292 }); 1293 1294 } 1295 1296 } else { 1297 container.innerHTML = '<div class="alert alert-danger" role="alert">No product information was found.</div>'; 1298 } 1299 }; 1300 1301 1302 /** 1303 * Set cookie helper 1304 * @doto can remove after final testing 1305 */ 1306 function mdcSetCookie(name, value, days = 1) { 1307 const date = new Date(); 1308 date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000); 1309 const expires = "expires=" + date.toUTCString(); 1310 document.cookie = `${name}=${encodeURIComponent(value)};${expires};path=/`; 1311 } 1312 1313 /** 1314 * get cookie helper 1315 * @doto can remove after final testing 1316 */ 1317 function mdcGetCookie(name) { 1318 const nameEQ = name + "="; 1319 const ca = document.cookie.split(';'); 1320 for (let i = 0; i < ca.length; i++) { 1321 let c = ca[i]; 1322 while (c.charAt(0) === ' ') c = c.substring(1, c.length); 1323 if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length); 1324 } 1325 return null; 1326 } 1327 1328 const ifu_set_preview = new URLSearchParams(window.location.search).get('ifu_preview') || ''; 1329 1330 if ( ifu_set_preview === 'yes') { 1331 mdcSetCookie('ifu_preview', 'yes', 7); 1332 } 1333 1334 const getDocumentData = async (container,code) => { 1335 if(!code){ 1336 return false; 1337 } 1338 1339 const response = await mdcRequestData("/ifus-brochures/" + code); 1340 const ifu_preview = mdcGetCookie('ifu_preview') || ''; 1341 1342 if (response) { 1343 const document_template = ` 1344 ${response.current_ifus[0] ? 1345 `<div class="merit-docs--pdf lg:w-1/2 w-full lg:px-4 mb-7 last:max-lg:mb-0"> 1346 <h3 class="document-section-title">Current IFUs</h3> 1347 <a href="/ifu-library/?p=${code}" class="hover:!text-merit-red" style="display: ${ifu_preview == 'yes' ? 'block' : 'none'}">View Current IFUs ></a> 1348 <div id="merit-aws-current-documents-list" class="merit-documents-list merit-limited-doc ${ifu_preview == 'yes' ? 'hidden' : ''}"> 1349 ${response.current_ifus.map((ifu, index) => ` 1350 <div id="current-document-attach-id-${ifu.IFU_ID}" class="attach-single" data-id="${ifu.IFU_ID}"> 1351 <a href="${ifu.PRIMARY_LINK_CONTEXT}${ifu.PRIMARY_LINK}" target="_blank" class="transition-colors hover:!text-merit-red"> 1352 ${ifu.NAME} <img src="${mdcObj.site_url}/wp-content/themes/mdc/images/pdf.svg" loading="lazy" class="lazy" width="15" height="18"> 1353 </a> 1354 ${index === 4 ? '<button class="document-load-more underline underline-offset-[5px] decoration-1 text-lg font-medium text-bright-red">Load more</button>' : ''} 1355 </div>`).join('')} 1356 </div> 1357 </div>` : '' 1358 } 1359 1360 ${response.historic_ifus[0] ? 1361 `<div class="merit-docs--pdf lg:w-1/2 w-full lg:px-4 mb-7 last:max-lg:mb-0"> 1362 <h3 class="document-section-title">Historic IFUs</h3> 1363 <div id="merit-aws-current-documents-list" class="merit-documents-list merit-limited-doc"> 1364 ${response.historic_ifus.map((historic_ifu, index) => ` 1365 <div id="current-document-attach-id-${historic_ifu.IFU_ID}" class="attach-single" data-id="${historic_ifu.IFU_ID}"> 1366 <a href="${historic_ifu.PRIMARY_LINK_CONTEXT}${historic_ifu.PRIMARY_LINK}" target="_blank" class="transition-colors hover:!text-merit-red"> 1367 ${historic_ifu.NAME || ''} (${ historic_ifu.START_DATE ? historic_ifu.START_DATE.split(' ')[0] : ''} - ${historic_ifu.END_DATE ? historic_ifu.END_DATE.split(' ')[0] : ''}) <img src="${mdcObj.site_url}/wp-content/themes/mdc/images/pdf.svg" loading="lazy" class="lazy" width="15" height="18"> 1368 </a> 1369 ${index === 4 ? '<button class="document-load-more underline underline-offset-[5px] decoration-1 text-lg font-medium text-bright-red">Load more</button>' : ''} 1370 </div>`).join('')} 1371 </div> 1372 </div>` : '' 1373 } 1374 1375 ${response.current_brochures[0] ? 1376 `<div class="merit-docs--pdf lg:w-1/2 w-full lg:px-4 mb-7 last:max-lg:mb-0"> 1377 <h3 class="document-section-title">Current Brochures</h3> 1378 <div id="merit-aws-current-documents-list" class="merit-documents-list merit-limited-doc"> 1379 ${response.current_brochures.map((brochure, index) => ` 1380 <div id="current-document-attach-id-${brochure.IFU_ID}" class="attach-single" data-id="${brochure.IFU_ID}"> 1381 <a href="${brochure.PRIMARY_LINK_CONTEXT}${brochure.PRIMARY_LINK}" target="_blank" class="transition-colors hover:!text-merit-red"> 1382 ${brochure.NAME} <img src="${mdcObj.site_url}/wp-content/themes/mdc/images/pdf.svg" loading="lazy" class="lazy" width="15" height="18"> 1383 </a> 1384 ${index === 4 ? '<button class="document-load-more underline underline-offset-[5px] decoration-1 text-lg font-medium text-bright-red">Load more</button>' : ''} 1385 </div>`).join('')} 1386 </div> 1387 </div>` : '' 1388 } 1389 `; 1390 // container.innerHTML = mdcProcessData(response, "documentTemplate"); 1391 container.innerHTML = document_template; 1392 } else { 1393 container.innerHTML = '<div class="alert alert-info" role="alert">No Document found.</div>'; 1394 } 1395 }; 1396 1397 const orderDataContainer = document.getElementsByClassName("merit-order-information-table"); 1398 1399 if (orderDataContainer.length > 0) { 1400 for (var i = 0; i < orderDataContainer.length; i++) { 1401 getOrderInformationData(orderDataContainer[i],orderDataContainer[i].dataset.productC
1401ode); 1402 } 1403 1404 1405 1406 } 1407 1408 const documentDataContainer = document.getElementsByClassName("merit-documents"); 1409 1410 if (documentDataContainer.length > 0) { 1411 for (var i = 0; i < documentDataContainer.length; i++) { 1412 getDocumentData( documentDataContainer[i], documentDataContainer[i].dataset.productCode ); 1413 } 1414 } 1415 1416})();; 1417(function () { 1418 1419 1420 const getDocumentAndIfuData = (response)=>{ 1421 1422 if( null == response ){ 1423 return false; 1424 } 1425 1426 let document_and_ifu_Template = ""; 1427 1428 response.forEach((element)=>{ 1429 document_and_ifu_Template += ` <div class="merit-ifu-lists" itemscope="itemscope" itemtype="https://schema.org/CreativeWork"> 1430 <div class="single-ifu-document"> 1431 <a itemprop="url" target="_blank" href="${ element.LINK_CONTEXT }${ element.LINK }" rel="noopener"> 1432 <span itemprop="name">${ element.NAME }</span> 1433 </a> 1434 </div> 1435 </div>`; 1436 }); 1437 1438 return document_and_ifu_Template; 1439 } 1440 1441 const getDocumentsTabData = async (container,lang) => { 1442 1443 if( null == container ){ 1444 return false; 1445 } 1446 1447 const response = await mdcRequestData("/ifu/brochure/"+lang+"/type/brochure"); 1448 1449 if (response) { 1450 // container.innerHTML = mdcProcessData(response, "document_tab_Template"); 1451 container.innerHTML = getDocumentAndIfuData(response); 1452 } else { 1453 container.innerHTML = '<div class="alert alert-danger" role="alert">No Document found.</div>'; 1454 } 1455 }; 1456 1457 const getInstructionsForUse = async (container,lang) => { 1458 if( null == container){ 1459 return false; 1460 } 1461 1462 const response = await mdcRequestData("/ifu/brochure/"+lang+"/type/ifu"); 1463 1464 if (response) { 1465 // container.innerHTML = mdcProcessData(response, "document_tab_Template"); 1466 container.innerHTML = getDocumentAndIfuData(response); 1467 1468 } else { 1469 container.innerHTML = '<div class="alert alert-danger" role="alert">No Document found.</div>'; 1470 } 1471 }; 1472 1473 const brochureTab = document.getElementById("brochure_tab"); 1474 1475 if(brochureTab){ 1476 const tabsLinks = brochureTab.querySelectorAll(".nav-link"); 1477 1478 tabsLinks.forEach((element) => { 1479 1480 if(element.classList.contains('active')){ 1481 var lang = element.getAttribute("data-document-language"); 1482 var target = element.getAttribute("data-bs-target"); 1483 var targetContainer = brochureTab.querySelector(target); 1484 if(targetContainer){ 1485 targetContainer.classList.add("active") 1486 } 1487 var targetContainerList = targetContainer.querySelector('.brochures_list'); 1488 getDocumentsTabData(targetContainerList,lang); 1489 } 1490 element.addEventListener("click", (event) => { 1491 console.log(event); 1492 var lang = event.target.getAttribute("data-document-language"); 1493 var target = event.target.getAttribute("data-bs-target"); 1494 const targetContainer = brochureTab.querySelector(target); 1495 if(targetContainer){ 1496 //remove any other active class 1497 document.querySelector('#v-pills-tabContent .active').classList.remove('active'); 1498 //add current div active 1499 targetContainer.classList.add("active"); 1500 document.querySelector('#v-pills-tab .active').classList.remove('active'); 1501 event.target.classList.add("active"); 1502 } 1503 var targetContainerList = targetContainer.querySelector('.brochures_list'); 1504 getDocumentsTabData(targetContainerList,lang); 1505 }); 1506 } 1507 ); 1508 } 1509 1510 const instructionsTab = document.getElementById("instructions_tab"); 1511 if(instructionsTab){ 1512 var targetContainerList = instructionsTab.querySelector('.brochures_list'); 1513 getInstructionsForUse(targetContainerList,'en'); 1514 } 1515 1516 1517 1518})();; 1519/*! 1520 SpryMedia Ltd. 1521 1522 This source file is free software, available under the following license: 1523 MIT license - http://datatables.net/license 1524 1525 This source file is distributed in the hope that it will be useful, but 1526 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 1527 or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. 1528 1529 For details please refer to: http://www.datatables.net 1530 DataTables 1.12.1 1531 ©2008-2022 SpryMedia Ltd - datatables.net/license 1532*/ 1533var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(l,y,A){l instanceof String&&(l=String(l));for(var q=l.length,E=0;E<q;E++){var P=l[E];if(y.call(A,P,E,l))return{i:E,v:P}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1; 1534$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(l,y,A){if(l==Array.prototype||l==Object.prototype)return l;l[y]=A.value;return l};$jscomp.getGlobal=function(l){l=["object"==typeof globalThis&&globalThis,l,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var y=0;y<l.length;++y){var A=l[y];if(A&&A.Math==Math)return A}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this); 1535$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(l,y){var A=$jscomp.propertyToPolyfillSymbol[y];if(null==A)return l[y];A=l[A];return void 0!==A?A:l[y]}; 1536$jscomp.polyfill=function(l,y,A,q){y&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(l,y,A,q):$jscomp.polyfillUnisolated(l,y,A,q))};$jscomp.polyfillUnisolated=function(l,y,A,q){A=$jscomp.global;l=l.split(".");for(q=0;q<l.length-1;q++){var E=l[q];if(!(E in A))return;A=A[E]}l=l[l.length-1];q=A[l];y=y(q);y!=q&&null!=y&&$jscomp.defineProperty(A,l,{configurable:!0,writable:!0,value:y})}; 1537$jscomp.polyfillIsolated=function(l,y,A,q){var E=l.split(".");l=1===E.length;q=E[0];
1537q=!l&&q in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var P=0;P<E.length-1;P++){var la=E[P];if(!(la in q))return;q=q[la]}E=E[E.length-1];A=$jscomp.IS_SYMBOL_NATIVE&&"es6"===A?q[E]:null;y=y(A);null!=y&&(l?$jscomp.defineProperty($jscomp.polyfills,E,{configurable:!0,writable:!0,value:y}):y!==A&&($jscomp.propertyToPolyfillSymbol[E]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(E):$jscomp.POLYFILL_PREFIX+E, 1538E=$jscomp.propertyToPolyfillSymbol[E],$jscomp.defineProperty(q,E,{configurable:!0,writable:!0,value:y})))};$jscomp.polyfill("Array.prototype.find",function(l){return l?l:function(y,A){return $jscomp.findInternal(this,y,A).v}},"es6","es3"); 1539(function(l){"function"===typeof define&&define.amd?define(["jquery"],function(y){return l(y,window,document)}):"object"===typeof exports?module.exports=function(y,A){y||(y=window);A||(A="undefined"!==typeof window?require("jquery"):require("jquery")(y));return l(A,y,y.document)}:window.DataTable=l(jQuery,window,document)})(function(l,y,A,q){function E(a){var b,c,d={};l.each(a,function(e,h){(b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" ")&&(c=e.replace(b[0], 1540b[2].toLowerCase()),d[c]=e,"o"===b[1]&&E(a[e]))});a._hungarianMap=d}function P(a,b,c){a._hungarianMap||E(a);var d;l.each(b,function(e,h){d=a._hungarianMap[e];d===q||!c&&b[d]!==q||("o"===d.charAt(0)?(b[d]||(b[d]={}),l.extend(!0,b[d],b[e]),P(a[d],b[d],c)):b[d]=b[e])})}function la(a){var b=u.defaults.oLanguage,c=b.sDecimal;c&&bb(c);if(a){var d=a.sZeroRecords;!a.sEmptyTable&&d&&"No data available in table"===b.sEmptyTable&&Y(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&d&&"Loading..."===b.sLoadingRecords&& 1541Y(a,a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&bb(a)}}function Db(a){S(a,"ordering","bSort");S(a,"orderMulti","bSortMulti");S(a,"orderClasses","bSortClasses");S(a,"orderCellsTop","bSortCellsTop");S(a,"order","aaSorting");S(a,"orderFixed","aaSortingFixed");S(a,"paging","bPaginate");S(a,"pagingType","sPaginationType");S(a,"pageLength","iDisplayLength");S(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%": 1542"");"boolean"===typeof a.scrollX&&(a.scrollX=a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&P(u.models.oSearch,a[b])}function Eb(a){S(a,"orderable","bSortable");S(a,"orderData","aDataSort");S(a,"orderSequence","asSorting");S(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"!==typeof b||Array.isArray(b)||(a.aDataSort=[b])}function Fb(a){if(!u.__browser){var b={};u.__browser=b;var c=l("<div/>").css({position:"fixed",top:0,left:-1*l(y).scrollLeft(),height:1, 1543width:1,overflow:"hidden"}).append(l("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(l("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}l.extend(a.oBrowser,u.__browser);a.oScroll.iBarWidth=u.__browser.barWidth} 1544function Gb(a,b,c,d,e,h){var f=!1;if(c!==q){var g=c;f=!0}for(;d!==e;)a.hasOwnProperty(d)&&(g=f?b(g,a[d],d,a):a[d],f=!0,d+=h);return g}function cb(a,b){var c=u.defaults.column,d=a.aoColumns.length;c=l.extend({},u.models.oColumn,c,{nTh:b?b:A.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=l.extend({},u.models.oSearch,c[d]);Ia(a,d,l(b).data())}function Ia(a,b,c){b=a.aoColumns[b]; 1545var d=a.oClasses,e=l(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var h=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);h&&(b.sWidthOrig=h[1])}c!==q&&null!==c&&(Eb(c),P(u.defaults.column,c,!0),c.mDataProp===q||c.mData||(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),h=b.sClass,l.extend(b,c),Y(b,c,"sWidth","sWidthOrig"),h!==b.sClass&&(b.sClass=h+" "+b.sClass),c.iDataSort!==q&&(b.aDataSort=[c.iDataSort]), 1546Y(b,c,"aDataSort"));var f=b.mData,g=ma(f),k=b.mRender?ma(b.mRender):null;c=function(m){return"string"===typeof m&&-1!==m.indexOf("@")};b._bAttrSrc=l.isPlainObject(f)&&(c(f.sort)||c(f.type)||c(f.filter));b._setter=null;b.fnGetData=function(m,n,p){var t=g(m,n,q,p);return k&&n?k(t,n,m,p):t};b.fnSetData=function(m,n,p){return ha(f)(m,n,p)};"number"!==typeof f&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==l.inArray("asc",b.asSorting);c=-1!==l.inArray("desc", 1547b.asSorting);b.bSortable&&(a||c)?a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI):(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI="")}function sa(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;db(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;""===b.sY&&""===b.sX||Ja(a);F(a,null,"column-sizing", 1548[a])}function ta(a,b){a=Ka(a,"bVisible");return"number"===typeof a[b]?a[b]:null}function ua(a,b){a=Ka(a,"bVisible");
1548b=l.inArray(b,a);return-1!==b?b:null}function na(a){var b=0;l.each(a.aoColumns,function(c,d){d.bVisible&&"none"!==l(d.nTh).css("display")&&b++});return b}function Ka(a,b){var c=[];l.map(a.aoColumns,function(d,e){d[b]&&c.push(e)});return c}function eb(a){var b=a.aoColumns,c=a.aoData,d=u.ext.type.detect,e,h,f;var g=0;for(e=b.length;g<e;g++){var k=b[g];var m=[];if(!k.sType&&k._sManualType)k.sType= 1549k._sManualType;else if(!k.sType){var n=0;for(h=d.length;n<h;n++){var p=0;for(f=c.length;p<f;p++){m[p]===q&&(m[p]=T(a,p,g,"type"));var t=d[n](m[p],a);if(!t&&n!==d.length-1)break;if("html"===t&&!aa(m[p]))break}if(t){k.sType=t;break}}k.sType||(k.sType="string")}}}function Hb(a,b,c,d){var e,h,f,g=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){var k=b[e];var m=k.target!==q?k.target:k.targets!==q?k.targets:k.aTargets;Array.isArray(m)||(m=[m]);var n=0;for(h=m.length;n<h;n++)if("number"===typeof m[n]&&0<=m[n]){for(;g.length<= 1550m[n];)cb(a);d(m[n],k)}else if("number"===typeof m[n]&&0>m[n])d(g.length+m[n],k);else if("string"===typeof m[n]){var p=0;for(f=g.length;p<f;p++)("_all"==m[n]||l(g[p].nTh).hasClass(m[n]))&&d(p,k)}}if(c)for(e=0,a=c.length;e<a;e++)d(e,c[e])}function ia(a,b,c,d){var e=a.aoData.length,h=l.extend(!0,{},u.models.oRow,{src:c?"dom":"data",idx:e});h._aData=b;a.aoData.push(h);for(var f=a.aoColumns,g=0,k=f.length;g<k;g++)f[g].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==q&&(a.aIds[b]=h);!c&&a.oFeatures.bDeferRender|| 1551fb(a,e,c,d);return e}function La(a,b){var c;b instanceof l||(b=l(b));return b.map(function(d,e){c=gb(a,e);return ia(a,c.data,e,c.cells)})}function T(a,b,c,d){"search"===d?d="filter":"order"===d&&(d="sort");var e=a.iDraw,h=a.aoColumns[c],f=a.aoData[b]._aData,g=h.sDefaultContent,k=h.fnGetData(f,d,{settings:a,row:b,col:c});if(k===q)return a.iDrawError!=e&&null===g&&(ea(a,0,"Requested unknown parameter "+("function"==typeof h.mData?"{function}":"'"+h.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError= 1552e),g;if((k===f||null===k)&&null!==g&&d!==q)k=g;else if("function"===typeof k)return k.call(f);if(null===k&&"display"===d)return"";"filter"===d&&(a=u.ext.type.search,a[h.sType]&&(k=a[h.sType](k)));return k}function Ib(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function hb(a){return l.map(a.match(/(\\.|[^\.])+/g)||[""],function(b){return b.replace(/\\\./g,".")})}function ib(a){return U(a.aoData,"_aData")}function Ma(a){a.aoData.length=0;a.aiDisplayMaster.length= 15530;a.aiDisplay.length=0;a.aIds={}}function Na(a,b,c){for(var d=-1,e=0,h=a.length;e<h;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===q&&a.splice(d,1)}function va(a,b,c,d){var e=a.aoData[b],h,f=function(k,m){for(;k.childNodes.length;)k.removeChild(k.firstChild);k.innerHTML=T(a,b,m,"display")};if("dom"!==c&&(c&&"auto"!==c||"dom"!==e.src)){var g=e.anCells;if(g)if(d!==q)f(g[d],d);else for(c=0,h=g.length;c<h;c++)f(g[c],c)}else e._aData=gb(a,e,d,d===q?q:e._aData).data;e._aSortData=null;e._aFilterData=null;f= 1554a.aoColumns;if(d!==q)f[d].sType=null;else{c=0;for(h=f.length;c<h;c++)f[c].sType=null;jb(a,e)}}function gb(a,b,c,d){var e=[],h=b.firstChild,f,g=0,k,m=a.aoColumns,n=a._rowReadObject;d=d!==q?d:n?{}:[];var p=function(x,w){if("string"===typeof x){var r=x.indexOf("@");-1!==r&&(r=x.substring(r+1),ha(x)(d,w.getAttribute(r)))}},t=function(x){if(c===q||c===g)f=m[g],k=x.innerHTML.trim(),f&&f._bAttrSrc?(ha(f.mData._)(d,k),p(f.mData.sort,x),p(f.mData.type,x),p(f.mData.filter,x)):n?(f._setter||(f._setter=ha(f.mData)), 1555f._setter(d,k)):d[g]=k;g++};if(h)for(;h;){var v=h.nodeName.toUpperCase();if("TD"==v||"TH"==v)t(h),e.push(h);h=h.nextSibling}else for(e=b.anCells,h=0,v=e.length;h<v;h++)t(e[h]);(b=b.firstChild?b:b.nTr)&&(b=b.getAttribute("id"))&&ha(a.rowId)(d,b);return{data:d,cells:e}}function fb(a,b,c,d){var e=a.aoData[b],h=e._aData,f=[],g,k;if(null===e.nTr){var m=c||A.createElement("tr");e.nTr=m;e.anCells=f;m._DT_RowIndex=b;jb(a,e);var n=0;for(g=a.aoColumns.length;n<g;n++){var p=a.aoColumns[n];e=(k=c?!1:!0)?A.createElement(p.sCellType): 1556d[n];e._DT_CellIndex={row:b,column:n};f.push(e);if(k||!(!p.mRender&&p.mData===n||l.isPlainObject(p.mData)&&p.mData._===n+".display"))e.innerHTML=T(a,b,n,"display");p.sClass&&(e.className+=" "+p.sClass);p.bVisible&&!c?m.appendChild(e):!p.bVisible&&c&&e.parentNode.removeChild(e);p.fnCreatedCell&&p.fnCreatedCell.call(a.oInstance,e,T(a,b,n),h,b,n)}F(a,"aoRowCreatedCallback",null,[m,h,b,f])}}function jb(a,b){var c=b.nTr,d=b._aData;if(c){if(a=a.rowIdFn(d))c.id=a;d.DT_RowClass&&(a=d.DT_RowClass.split(" "), 1557b.__rowc=b.__rowc?Oa(b.__rowc.concat(a)):a,l(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&l(c).attr(d.DT_RowAttr);d.DT_RowData&&l(c).data(d.DT_RowData)}}function Jb(a){var b,c,d=a.nTHead,e=a.nTFoot,h=0===l("th, td",d).length,f=a.oClasses,g=a.aoColumns;h&&(c=l("<tr/>").appendTo(d));var k=0;for(b=g.length;k<b;k++){var m=g[k];var n=l(m.nTh).addClass(m.sClass);h&&n.appendTo(c);a.oFeatures.bSort&&(n.addClass(m.sSortingClass),!1!==m.bSortable&&(n.attr("tabindex",a.iTabIndex).attr("aria-controls", 1558a.sTableId),kb(a,m.nTh,k)));m.sTitle!=n[0].innerHTML&&n.html(m.sTitle);lb(a,"header")(a,n,m,f)}h&&wa(a.aoHeader,d);l(d).children("tr").children("th, td").addClass(f.sHeaderTH);l(e).children("tr").children("th, td").addClass(f.sFooterTH);if(null!==e)for(a=a.aoFooter[0],k=0,b=a.length;k<b;k++)m=g[k],m.nTf=a[k].cell,m.sClass&&l(m.nTf).addClass(m.sClass)}function xa(a,b,c){var d,e,h=[],f=[],g=a.aoColumns.length;if(b){c===q&&(c=!1);var k=0;for(d=b.length;k<d;k++){h[k]=b[k].slice();h[k].nTr=b[k].nTr;for(e= 1559g-1;0<=e;e--)a.aoColumns[e].bVisible||c||h[k].splice(e,1);f.push([])}k=0;for(d=h.length;k<d;k++){if(a=h[k].nTr)for(;e=a.firstChild;)a.removeChild(e);e=0;for(b=h[k].length;e<b;e++){var m=g=1;if(f[k][e]===q){a.appendChild(h[k][e].cell);for(f[k][e]=1;h[k+g]!==q&&h[k][e].cell==h[k+g][e].cell;)f[k+g][e]=1,g++;for(;h[k][e+m]!==q&&h[k][e].cell==h[k][e+m].cell;){for(c=0;c<g;c++)f[k+c][e+m]=1;m++}l(h[k][e].cell).attr("rowspan",g).attr("colspan",m)}}}}}function ja(a,b){var c="ssp"==Q(a),d=a.iInitDisplayStart; 1560d!==q&&-1!==d&&(a._iDisplayStart=c?d:d>=a.fnRecordsDisplay()?0:d,a.iInitDisplayStart=-1);c=F(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==l.inArray(!1,c))V(a,!1);else{c=[];var e=0;d=a.asStripeClasses;var h=d.length,f=a.oLanguage,g="ssp"==Q(a),k=a.aiDisplay,m=a._iDisplayStart,n=a.fnDisplayEnd();a.bDrawing=!0;
1560if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,V(a,!1);else if(!g)a.iDraw++;else if(!a.bDestroying&&!b){Kb(a);return}if(0!==k.length)for(b=g?a.aoData.length:n,f=g?0:m;f<b;f++){g=k[f];var p=a.aoData[g]; 1561null===p.nTr&&fb(a,g);var t=p.nTr;if(0!==h){var v=d[e%h];p._sRowStripe!=v&&(l(t).removeClass(p._sRowStripe).addClass(v),p._sRowStripe=v)}F(a,"aoRowCallback",null,[t,p._aData,e,f,g]);c.push(t);e++}else e=f.sZeroRecords,1==a.iDraw&&"ajax"==Q(a)?e=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(e=f.sEmptyTable),c[0]=l("<tr/>",{"class":h?d[0]:""}).append(l("<td />",{valign:"top",colSpan:na(a),"class":a.oClasses.sRowEmpty}).html(e))[0];F(a,"aoHeaderCallback","header",[l(a.nTHead).children("tr")[0], 1562ib(a),m,n,k]);F(a,"aoFooterCallback","footer",[l(a.nTFoot).children("tr")[0],ib(a),m,n,k]);d=l(a.nTBody);d.children().detach();d.append(l(c));F(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function ka(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&Lb(a);d?ya(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;ja(a);a._drawHold=!1}function Mb(a){var b=a.oClasses,c=l(a.nTable);c=l("<div/>").insertBefore(c);var d=a.oFeatures, 1563e=l("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];
1563a.nTableReinsertBefore=a.nTable.nextSibling;for(var h=a.sDom.split(""),f,g,k,m,n,p,t=0;t<h.length;t++){f=null;g=h[t];if("<"==g){k=l("<div/>")[0];m=h[t+1];if("'"==m||'"'==m){n="";for(p=2;h[t+p]!=m;)n+=h[t+p],p++;"H"==n?n=b.sJUIHeader:"F"==n&&(n=b.sJUIFooter);-1!=n.indexOf(".")?(m=n.split("."),k.id=m[0].substr(1,m[0].length-1),k.className=m[1]):"#"==n.charAt(0)?k.id=n.substr(1, 1564n.length-1):k.className=n;t+=p}e.append(k);e=l(k)}else if(">"==g)e=e.parent();else if("l"==g&&d.bPaginate&&d.bLengthChange)f=Nb(a);else if("f"==g&&d.bFilter)f=Ob(a);else if("r"==g&&d.bProcessing)f=Pb(a);else if("t"==g)f=Qb(a);else if("i"==g&&d.bInfo)f=Rb(a);else if("p"==g&&d.bPaginate)f=Sb(a);else if(0!==u.ext.feature.length)for(k=u.ext.feature,p=0,m=k.length;p<m;p++)if(g==k[p].cFeature){f=k[p].fnInit(a);break}f&&(k=a.aanFeatures,k[g]||(k[g]=[]),k[g].push(f),e.append(f))}c.replaceWith(e);a.nHolding= 1565null}function wa(a,b){b=l(b).children("tr");var c,d,e;a.splice(0,a.length);var h=0;for(e=b.length;h<e;h++)a.push([]);h=0;for(e=b.length;h<e;h++){var f=b[h];for(c=f.firstChild;c;){if("TD"==c.nodeName.toUpperCase()||"TH"==c.nodeName.toUpperCase()){var g=1*c.getAttribute("colspan");var k=1*c.getAttribute("rowspan");g=g&&0!==g&&1!==g?g:1;k=k&&0!==k&&1!==k?k:1;var m=0;for(d=a[h];d[m];)m++;var n=m;var p=1===g?!0:!1;for(d=0;d<g;d++)for(m=0;m<k;m++)a[h+m][n+d]={cell:c,unique:p},a[h+m].nTr=f}c=c.nextSibling}}} 1566function Pa(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],wa(c,b)));b=0;for(var e=c.length;b<e;b++)for(var h=0,f=c[b].length;h<f;h++)!c[b][h].unique||d[h]&&a.bSortCellsTop||(d[h]=c[b][h].cell);return d}function Qa(a,b,c){F(a,"aoServerParams","serverParams",[b]);if(b&&Array.isArray(b)){var d={},e=/(.*?)\[\]$/;l.each(b,function(n,p){(n=p.name.match(e))?(n=n[0],d[n]||(d[n]=[]),d[n].push(p.value)):d[p.name]=p.value});b=d}var h=a.ajax,f=a.oInstance,g=function(n){var p=a.jqXHR?a.jqXHR.status:null;if(null=== 1567n||"number"===typeof p&&204==p)n={},za(a,n,[]);(p=n.error||n.sError)&&ea(a,0,p);a.json=n;F(a,null,"xhr",[a,n,a.jqXHR]);c(n)};if(l.isPlainObject(h)&&h.data){var k=h.data;var m="function"===typeof k?k(b,a):k;b="function"===typeof k&&m?m:l.extend(!0,b,m);delete h.data}m={data:b,success:g,dataType:"json",cache:!1,type:a.sServerMethod,error:function(n,p,t){t=F(a,null,"xhr",[a,null,a.jqXHR]);-1===l.inArray(!0,t)&&("parsererror"==p?ea(a,0,"Invalid JSON response",1):4===n.readyState&&ea(a,0,"Ajax error", 15687));V(a,!1)}};a.oAjaxData=b;F(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(f,a.sAjaxSource,l.map(b,function(n,p){return{name:p,value:n}}),g,a):a.sAjaxSource||"string"===typeof h?a.jqXHR=l.ajax(l.extend(m,{url:h||a.sAjaxSource})):"function"===typeof h?a.jqXHR=h.call(f,b,g,a):(a.jqXHR=l.ajax(l.extend(m,h)),h.data=k)}function Kb(a){a.iDraw++;V(a,!0);Qa(a,Tb(a),function(b){Ub(a,b)})}function Tb(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,h=a.aoPreSearchCols,f=[],g=oa(a); 1569var k=a._iDisplayStart;var m=!1!==d.bPaginate?a._iDisplayLength:-1;var n=function(x,w){f.push({name:x,value:w})};n("sEcho",a.iDraw);n("iColumns",c);n("sColumns",U(b,"sName").join(","));n("iDisplayStart",k);n("iDisplayLength",m);var p={draw:a.iDraw,columns:[],order:[],start:k,length:m,search:{value:e.sSearch,regex:e.bRegex}};for(k=0;k<c;k++){var t=b[k];var v=h[k];m="function"==typeof t.mData?"function":t.mData;p.columns.push({data:m,name:t.sName,searchable:t.bSearchable,orderable:t.bSortable,search:{value:v.sSearch, 1570regex:v.bRegex}});n("mDataProp_"+k,m);d.bFilter&&(n("sSearch_"+k,v.sSearch),n("bRegex_"+k,v.bRegex),n("bSearchable_"+k,t.bSearchable));d.bSort&&n("bSortable_"+k,t.bSortable)}d.bFilter&&(n("sSearch",e.sSearch),n("bRegex",e.bRegex));d.bSort&&(l.each(g,function(x,w){p.order.push({column:w.col,dir:w.dir});n("iSortCol_"+x,w.col);n("sSortDir_"+x,w.dir)}),n("iSortingCols",g.length));b=u.ext.legacy.ajax;return null===b?a.sAjaxSource?f:p:b?f:p}function Ub(a,b){var c=function(f,g){return b[f]!==q?b[f]:b[g]}, 1571d=za(a,b),e=c("sEcho","draw"),h=c("iTotalRecords","recordsTotal");c=c("iTotalDisplayRecords","recordsFiltered");if(e!==q){if(1*e<a.iDraw)return;a.iDraw=1*e}d||(d=[]);Ma(a);a._iRecordsTotal=parseInt(h,10);a._iRecordsDisplay=parseInt(c,10);e=0;for(h=d.length;e<h;e++)ia(a,d[e]);a.aiDisplay=a.aiDisplayMaster.slice();ja(a,!0);a._bInitComplete||Ra(a,b);V(a,!1)}function za(a,b,c){a=l.isPlainObject(a.ajax)&&a.ajax.dataSrc!==q?a.ajax.dataSrc:a.sAjaxDataProp;if(!c)return"data"===a?b.aaData||b[a]:""!==a?ma(a)(b): 1572b;ha(a)(b,c)}function Ob(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,h=a.aanFeatures,f='<input type="search" class="'+b.sFilterInput+'"/>',g=d.sSearch;g=g.match(/_INPUT_/)?g.replace("_INPUT_",f):g+f;b=l("<div/>",{id:h.f?null:c+"_filter","class":b.sFilter}).append(l("<label/>").append(g));var k=function(n){var p=this.value?this.value:"";e.return&&"Enter"!==n.key||p==e.sSearch||(ya(a,{sSearch:p,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive,"return":e.return}), 1573a._iDisplayStart=0,ja(a))};h=null!==a.searchDelay?a.searchDelay:"ssp"===Q(a)?400:0;var m=l("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?mb(k,h):k).on("mouseup",function(n){setTimeout(function(){k.call(m[0],n)},10)}).on("keypress.DT",function(n){if(13==n.keyCode)return!1}).attr("aria-controls",c);l(a.nTable).on("search.dt.DT",function(n,p){if(a===p)try{m[0]!==A.activeElement&&m.val(e.sSearch)}catch(t){}});return b[0]}function ya(a, 1574b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,h=function(g){d.sSearch=g.sSearch;d.bRegex=g.bRegex;d.bSmart=g.bSmart;d.bCaseInsensitive=g.bCaseInsensitive;d.return=g.return},f=function(g){return g.bEscapeRegex!==q?!g.bEscapeRegex:g.bRegex};eb(a);if("ssp"!=Q(a)){Vb(a,b.sSearch,c,f(b),b.bSmart,b.bCaseInsensitive,b.return);h(b);for(b=0;b<e.length;b++)Wb(a,e[b].sSearch,b,f(e[b]),e[b].bSmart,e[b].bCaseInsensitive);Xb(a)}else h(b);a.bFiltered=!0;F(a,null,"search",[a])}function Xb(a){for(var b=u.ext.search, 1575c=a.aiDisplay,d,e,h=0,f=b.length;h<f;h++){for(var g=[],k=0,m=c.length;k<m;k++)e=c[k],d=a.aoData[e],b[h](a,d._aFilterData,e,d._aData,k)&&g.push(e);c.length=0;l.merge(c,g)}}function Wb(a,b,c,d,e,h){if(""!==b){var f=[],g=a.aiDisplay;d=nb(b,d,e,h);for(e=0;e<g.length;e++)b=a.aoData[g[e]]._aFilterData[c],d.test(b)&&f.push(g[e]);a.aiDisplay=f}}function Vb(a,b,c,d,e,h){e=nb(b,d,e,h);var f=a.oPreviousSearch.sSearch,g=a.aiDisplayMaster;h=[];0!==u.ext.search.length&&(c=!0);var k=Yb(a);if(0>=b.length)a.aiDisplay= 1576g.slice();else{if(k||c||d||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c<b.length;c++)e.test(a.aoData[b[c]]._sFilterRow)&&h.push(b[c]);a.aiDisplay=h}}function nb(a,b,c,d){a=b?a:ob(a);c&&(a="^(?=.*?"+l.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(e){if('"'===e.charAt(0)){var h=e.match(/^"(.*)"$/);e=h?h[1]:e}return e.replace('"',"")}).join(")(?=.*?")+").*$");return new RegExp(a,d?"i":"")}function Yb(a){var b=a.aoColumns,c,d;var e=!1;var h=0;for(c=a.aoData.length;h< 1577c;h++){var f=a.aoData[h];if(!f._aFilterData){var g=[];e=0;for(d=b.length;e<d;e++){var k=b[e];k.bSearchable?(k=T(a,h,e,"filter"),null===k&&(k=""),"string"!==typeof k&&k.toString&&(k=k.toString())):k="";k.indexOf&&-1!==k.indexOf("&")&&(Sa.innerHTML=k,k=Bc?Sa.textContent:Sa.innerText);k.replace&&(k=k.replace(/[\r\n\u2028]/g,""));g.push(k)}f._aFilterData=g;f._sFilterRow=g.join(" ");e=!0}}return e}
1577function Zb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}} 1578function $b(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function Rb(a){var b=a.sTableId,c=a.aanFeatures.i,d=l("<div/>",{"class":a.oClasses.sInfo,id:c?null:b+"_info"});c||(a.aoDrawCallback.push({fn:ac,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),l(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function ac(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),h=a.fnRecordsTotal(), 1579f=a.fnRecordsDisplay(),g=f?c.sInfo:c.sInfoEmpty;f!==h&&(g+=" "+c.sInfoFiltered);g+=c.sInfoPostFix;g=bc(a,g);c=c.fnInfoCallback;null!==c&&(g=c.call(a.oInstance,a,d,e,h,f,g));l(b).html(g)}}function bc(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,h=a.fnRecordsDisplay(),f=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,h)).replace(/_PAGE_/g,c.call(a,f?1:Math.ceil(d/ 1580e))).replace(/_PAGES_/g,c.call(a,f?1:Math.ceil(h/e)))}function Aa(a){var b=a.iInitDisplayStart,c=a.aoColumns;var d=a.oFeatures;var e=a.bDeferLoading;if(a.bInitialised){Mb(a);Jb(a);xa(a,a.aoHeader);xa(a,a.aoFooter);V(a,!0);d.bAutoWidth&&db(a);var h=0;for(d=c.length;h<d;h++){var f=c[h];f.sWidth&&(f.nTh.style.width=K(f.sWidth))}F(a,null,"preInit",[a]);ka(a);c=Q(a);if("ssp"!=c||e)"ajax"==c?Qa(a,[],function(g){var k=za(a,g);for(h=0;h<k.length;h++)ia(a,k[h]);a.iInitDisplayStart=b;ka(a);V(a,!1);Ra(a,g)}, 1581a):(V(a,!1),Ra(a))}else setTimeout(function(){Aa(a)},200)}function Ra(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&sa(a);F(a,null,"plugin-init",[a,b]);F(a,"aoInitComplete","init",[a,b])}function pb(a,b){b=parseInt(b,10);a._iDisplayLength=b;qb(a);F(a,null,"length",[a,b])}function Nb(a){var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=Array.isArray(d[0]),h=e?d[0]:d;d=e?d[1]:d;e=l("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect});for(var f=0,g=h.length;f<g;f++)e[0][f]=new Option("number"=== 1582typeof d[f]?a.fnFormatNumber(d[f]):d[f],h[f]);var k=l("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(k[0].id=c+"_length");k.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));l("select",k).val(a._iDisplayLength).on("change.DT",function(m){pb(a,l(this).val());ja(a)});l(a.nTable).on("length.dt.DT",function(m,n,p){a===n&&l("select",k).val(p)});return k[0]}function Sb(a){var b=a.sPaginationType,c=u.ext.pager[b],d="function"===typeof c,e=function(f){ja(f)};b=l("<div/>").addClass(a.oClasses.sPaging+ 1583b)[0];var h=a.aanFeatures;d||c.fnInit(a,b,e);h.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(f){if(d){var g=f._iDisplayStart,k=f._iDisplayLength,m=f.fnRecordsDisplay(),n=-1===k;g=n?0:Math.ceil(g/k);k=n?1:Math.ceil(m/k);m=c(g,k);var p;n=0;for(p=h.p.length;n<p;n++)lb(f,"pageButton")(f,h.p[n],n,m,g,k)}else c.fnUpdate(f,e)},sName:"pagination"}));return b}function Ta(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,h=a.fnRecordsDisplay();0===h||-1===e?d=0:"number"===typeof b?(d=b* 1584e,d>h&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<h&&(d+=e):"last"==b?d=Math.floor((h-1)/e)*e:ea(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(F(a,null,"page",[a]),c&&ja(a));return b}function Pb(a){return l("<div/>",{id:a.aanFeatures.r?null:a.sTableId+"_processing","class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).append("<div><div></div><div></div><div></div><div></div></div>").insertBefore(a.nTable)[0]}function V(a, 1585b){a.oFeatures.bProcessing&&l(a.aanFeatures.r).css("display",b?"block":"none");F(a,null,"processing",[a,b])}function Qb(a){var b=l(a.nTable),c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,h=a.oClasses,f=b.children("caption"),g=f.length?f[0]._captionSide:null,k=l(b[0].cloneNode(!1)),m=l(b[0].cloneNode(!1)),n=b.children("tfoot");n.length||(n=null);k=l("<div/>",{"class":h.sScrollWrapper}).append(l("<div/>",{"class":h.sScrollHead}).css({overflow:"hidden",position:"relative",border:0, 1586width:d?d?K(d):null:"100%"}).append(l("<div/>",{"class":h.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(k.removeAttr("id").css("margin-left",0).append("top"===g?f:null).append(b.children("thead"))))).append(l("<div/>",{"class":h.sScrollBody}).css({position:"relative",overflow:"auto",width:d?K(d):null}).append(b));n&&k.append(l("<div/>",{"class":h.sScrollFoot}).css({overflow:"hidden",border:0,width:d?d?K(d):null:"100%"}).append(l("<div/>",{"class":h.sScrollFootInner}).append(m.removeAttr("id").css("margin-left", 15870).append("bottom"===g?f:null).append(b.children("tfoot")))));
1587b=k.children();var p=b[0];h=b[1];var t=n?b[2]:null;if(d)l(h).on("scroll.DT",function(v){v=this.scrollLeft;p.scrollLeft=v;n&&(t.scrollLeft=v)});l(h).css("max-height",e);c.bCollapse||l(h).css("height",e);a.nScrollHead=p;a.nScrollBody=h;a.nScrollFoot=t;a.aoDrawCallback.push({fn:Ja,sName:"scrolling"});return k[0]}function Ja(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY;b=b.iBarWidth;var h=l(a.nScrollHead),f=h[0].style,g=h.children("div"),k= 1588g[0].style,m=g.children("table");g=a.nScrollBody;var n=l(g),p=g.style,t=l(a.nScrollFoot).children("div"),v=t.children("table"),x=l(a.nTHead),w=l(a.nTable),r=w[0],C=r.style,G=a.nTFoot?l(a.nTFoot):null,ba=a.oBrowser,L=ba.bScrollOversize;U(a.aoColumns,"nTh");var O=[],I=[],H=[],fa=[],Z,Ba=function(D){D=D.style;D.paddingTop="0";D.paddingBottom="0";D.borderTopWidth="0";D.borderBottomWidth="0";D.height=0};var X=g.scrollHeight>g.clientHeight;if(a.scrollBarVis!==X&&a.scrollBarVis!==q)a.scrollBarVis=X,sa(a); 1589else{a.scrollBarVis=X;w.children("thead, tfoot").remove();if(G){X=G.clone().prependTo(w);var ca=G.find("tr");var Ca=X.find("tr");X.find("[id]").removeAttr("id")}var Ua=x.clone().prependTo(w);x=x.find("tr");X=Ua.find("tr");Ua.find("th, td").removeAttr("tabindex");Ua.find("[id]").removeAttr("id");c||(p.width="100%",h[0].style.width="100%");l.each(Pa(a,Ua),function(D,W){Z=ta(a,D);W.style.width=a.aoColumns[Z].sWidth});G&&da(function(D){D.style.width=""},Ca);h=w.outerWidth();""===c?(C.width="100%",L&& 1590(w.find("tbody").height()>g.offsetHeight||"scroll"==n.css("overflow-y"))&&(C.width=K(w.outerWidth()-b)),h=w.outerWidth()):""!==d&&(C.width=K(d),h=w.outerWidth());da(Ba,X);da(function(D){var W=y.getComputedStyle?y.getComputedStyle(D).width:K(l(D).width());H.push(D.innerHTML);O.push(W)},X);da(function(D,W){D.style.width=O[W]},x);l(X).css("height",0);G&&(da(Ba,Ca),da(function(D){fa.push(D.innerHTML);I.push(K(l(D).css("width")))},Ca),da(function(D,W){D.style.width=I[W]},ca),l(Ca).height(0));da(function(D, 1591W){D.innerHTML='<div class="dataTables_sizing">'+H[W]+"</div>";D.childNodes[0].style.height="0";D.childNodes[0].style.overflow="hidden";D.style.width=O[W]},X);G&&da(function(D,W){D.innerHTML='<div class="dataTables_sizing">'+fa[W]+"</div>";D.childNodes[0].style.height="0";D.childNodes[0].style.overflow="hidden";D.style.width=I[W]},Ca);Math.round(w.outerWidth())<Math.round(h)?(ca=g.scrollHeight>g.offsetHeight||"scroll"==n.css("overflow-y")?h+b:h,L&&(g.scrollHeight>g.offsetHeight||"scroll"==n.css("overflow-y"))&& 1592(C.width=K(ca-b)),""!==c&&""===d||ea(a,1,"Possible column misalignment",6)):ca="100%";p.width=K(ca);f.width=K(ca);G&&(a.nScrollFoot.style.width=K(ca));!e&&L&&(p.height=K(r.offsetHeight+b));c=w.outerWidth();m[0].style.width=K(c);k.width=K(c);d=w.height()>g.clientHeight||"scroll"==n.css("overflow-y");e="padding"+(ba.bScrollbarLeft?"Left":"Right");k[e]=d?b+"px":"0px";G&&(v[0].style.width=K(c),t[0].style.width=K(c),t[0].style[e]=d?b+"px":"0px");w.children("colgroup").insertBefore(w.children("thead")); 1593n.trigger("scroll");!a.bSorted&&!a.bFiltered||a._drawHold||(g.scrollTop=0)}}function da(a,b,c){for(var d=0,e=0,h=b.length,f,g;e<h;){f=b[e].firstChild;for(g=c?c[e].firstChild:null;f;)1===f.nodeType&&(c?a(f,g,d):a(f,d),d++),f=f.nextSibling,g=c?g.nextSibling:null;e++}}function db(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,h=d.sX,f=d.sXInner,g=c.length,k=Ka(a,"bVisible"),m=l("th",a.nTHead),n=b.getAttribute("width"),p=b.parentNode,t=!1,v,x=a.oBrowser;d=x.bScrollOversize;(v=b.style.width)&&-1!== 1594v.indexOf("%")&&(n=v);for(v=0;v<k.length;v++){var w=c[k[v]];null!==w.sWidth&&(w.sWidth=cc(w.sWidthOrig,p),t=!0)}if(d||!t&&!h&&!e&&g==na(a)&&g==m.length)for(v=0;v<g;v++)k=ta(a,v),null!==k&&(c[k].sWidth=K(m.eq(v).width()));else{g=l(b).clone().css("visibility","hidden").removeAttr("id");g.find("tbody tr").remove();var r=l("<tr/>").appendTo(g.find("tbody"));g.find("thead, tfoot").remove();g.append(l(a.nTHead).clone()).append(l(a.nTFoot).clone());g.find("tfoot th, tfoot td").css("width","");m=Pa(a,g.find("thead")[0]); 1595for(v=0;v<k.length;v++)w=c[k[v]],m[v].style.width=null!==w.sWidthOrig&&""!==w.sWidthOrig?K(w.sWidthOrig):"",w.sWidthOrig&&h&&l(m[v]).append(l("<div/>").css({width:w.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(v=0;v<k.length;v++)t=k[v],w=c[t],l(dc(a,t)).clone(!1).append(w.sContentPadding).appendTo(r);l("[name]",g).removeAttr("name");w=l("<div/>").css(h||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(g).appendTo(p);h&&f?g.width(f):h? 1596(g.css("width","auto"),g.removeAttr("width"),g.width()<p.clientWidth&&n&&g.width(p.clientWidth)):e?g.width(p.clientWidth):n&&g.width(n);for(v=e=0;v<k.length;v++)p=l(m[v]),f=p.outerWidth()-p.width(),p=x.bBounding?Math.ceil(m[v].getBoundingClientRect().width):p.outerWidth(),e+=p,c[k[v]].sWidth=K(p-f);b.style.width=K(e);w.remove()}n&&(b.style.width=K(n));!n&&!h||a._reszEvt||(b=function(){l(y).on("resize.DT-"+a.sInstance,mb(function(){sa(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0)}function cc(a,b){if(!a)return 0; 1597a=l("<div/>").css("width",K(a)).appendTo(b||A.body);
1597b=a[0].offsetWidth;a.remove();return b}function dc(a,b){var c=ec(a,b);if(0>c)return null;var d=a.aoData[c];return d.nTr?d.anCells[b]:l("<td/>").html(T(a,c,b,"display"))[0]}function ec(a,b){for(var c,d=-1,e=-1,h=0,f=a.aoData.length;h<f;h++)c=T(a,h,b,"display")+"",c=c.replace(Cc,""),c=c.replace(/ /g," "),c.length>d&&(d=c.length,e=h);return e}function K(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function oa(a){var b= 1598[],c=a.aoColumns;var d=a.aaSortingFixed;var e=l.isPlainObject(d);var h=[];var f=function(n){n.length&&!Array.isArray(n[0])?h.push(n):l.merge(h,n)};Array.isArray(d)&&f(d);e&&d.pre&&f(d.pre);f(a.aaSorting);e&&d.post&&f(d.post);for(a=0;a<h.length;a++){var g=h[a][0];f=c[g].aDataSort;d=0;for(e=f.length;d<e;d++){var k=f[d];var m=c[k].sType||"string";h[a]._idx===q&&(h[a]._idx=l.inArray(h[a][1],c[k].asSorting));b.push({src:g,col:k,dir:h[a][1],index:h[a]._idx,type:m,formatter:u.ext.type.order[m+"-pre"]})}}return b} 1599function Lb(a){var b,c=[],d=u.ext.type.order,e=a.aoData,h=0,f=a.aiDisplayMaster;eb(a);var g=oa(a);var k=0;for(b=g.length;k<b;k++){var m=g[k];m.formatter&&h++;fc(a,m.col)}if("ssp"!=Q(a)&&0!==g.length){k=0;for(b=f.length;k<b;k++)c[f[k]]=k;h===g.length?f.sort(function(n,p){var t,v=g.length,x=e[n]._aSortData,w=e[p]._aSortData;for(t=0;t<v;t++){var r=g[t];var C=x[r.col];var G=w[r.col];C=C<G?-1:C>G?1:0;if(0!==C)return"asc"===r.dir?C:-C}C=c[n];G=c[p];return C<G?-1:C>G?1:0}):f.sort(function(n,p){var t,v=g.length, 1600x=e[n]._aSortData,w=e[p]._aSortData;for(t=0;t<v;t++){var r=g[t];var C=x[r.col];var G=w[r.col];r=d[r.type+"-"+r.dir]||d["string-"+r.dir];C=r(C,G);if(0!==C)return C}C=c[n];G=c[p];return C<G?-1:C>G?1:0})}a.bSorted=!0}function gc(a){var b=a.aoColumns,c=oa(a);a=a.oLanguage.oAria;for(var d=0,e=b.length;d<e;d++){var h=b[d];var f=h.asSorting;var g=h.ariaTitle||h.sTitle.replace(/<.*?>/g,"");var k=h.nTh;k.removeAttribute("aria-sort");h.bSortable&&(0<c.length&&c[0].col==d?(k.setAttribute("aria-sort","asc"== 1601c[0].dir?"ascending":"descending"),h=f[c[0].index+1]||f[0]):h=f[0],g+="asc"===h?a.sSortAscending:a.sSortDescending);k.setAttribute("aria-label",g)}}function rb(a,b,c,d){var e=a.aaSorting,h=a.aoColumns[b].asSorting,f=function(g,k){var m=g._idx;m===q&&(m=l.inArray(g[1],h));return m+1<h.length?m+1:k?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=l.inArray(b,U(e,"0")),-1!==c?(b=f(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=h[b],e[c]._idx=b)): 1602(e.push([b,h[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=f(e[0]),e.length=1,e[0][1]=h[b],e[0]._idx=b):(e.length=0,e.push([b,h[0]]),e[0]._idx=0);ka(a);"function"==typeof d&&d(a)}function kb(a,b,c,d){var e=a.aoColumns[c];sb(b,{},function(h){!1!==e.bSortable&&(a.oFeatures.bProcessing?(V(a,!0),setTimeout(function(){rb(a,c,h.shiftKey,d);"ssp"!==Q(a)&&V(a,!1)},0)):rb(a,c,h.shiftKey,d))})}function Va(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=oa(a),e=a.oFeatures,h;if(e.bSort&&e.bSortClasses){e= 16030;for(h=b.length;e<h;e++){var f=b[e].src;l(U(a.aoData,"anCells",f)).removeClass(c+(2>e?e+1:3))}e=0;for(h=d.length;e<h;e++)f=d[e].src,l(U(a.aoData,"anCells",f)).addClass(c+(2>e?e+1:3))}a.aLastSort=d}function fc(a,b){var c=a.aoColumns[b],d=u.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ua(a,b)));for(var h,f=u.ext.type.order[c.sType+"-pre"],g=0,k=a.aoData.length;g<k;g++)if(c=a.aoData[g],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)h=d?e[g]:T(a,g,b,"sort"),c._aSortData[b]=f?f(h):h} 1604function Da(a){if(!a._bLoadingState){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:l.extend(!0,[],a.aaSorting),search:Zb(a.oPreviousSearch),columns:l.map(a.aoColumns,function(c,d){return{visible:c.bVisible,search:Zb(a.aoPreSearchCols[d])}})};a.oSavedState=b;F(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oFeatures.bStateSave&&!a.bDestroying&&a.fnStateSaveCallback.call(a.oInstance,a,b)}}function hc(a,b,c){if(a.oFeatures.bStateSave)return b=a.fnStateLoadCallback.call(a.oInstance, 1605a,function(d){tb(a,d,c)}),b!==q&&tb(a,b,c),!0;c()}function tb(a,b,c){var d,e=a.aoColumns;a._bLoadingState=!0;var h=a._bInitComplete?new u.Api(a):null;if(b&&b.time){var f=F(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1!==l.inArray(!1,f))a._bLoadingState=!1;else if(f=a.iStateDuration,0<f&&b.time<+new Date-1E3*f)a._bLoadingState=!1;else if(b.columns&&e.length!==b.columns.length)a._bLoadingState=!1;else{a.oLoadedState=l.extend(!0,{},b);b.length!==q&&(h?h.page.len(b.length):a._iDisplayLength=b.length); 1606b.start!==q&&(null===h?(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start):Ta(a,b.start/a._iDisplayLength));b.order!==q&&(a.aaSorting=[],l.each(b.order,function(k,m){a.aaSorting.push(m[0]>=e.length?[0,m[1]]:m)}));b.search!==q&&l.extend(a.oPreviousSearch,$b(b.search));if(b.columns){f=0;for(d=b.columns.length;f<d;f++){var g=b.columns[f];g.visible!==q&&(h?h.column(f).visible(g.visible,!1):e[f].bVisible=g.visible);g.search!==q&&l.extend(a.aoPreSearchCols[f],$b(g.search))}h&&h.columns.adjust()}a._bLoadingState= 1607!1;F(a,"aoStateLoaded","stateLoaded",[a,b])}}else a._bLoadingState=!1;c()}function Wa(a){var b=u.settings;a=l.inArray(a,U(b,"nTable"));return-1!==a?b[a]:null}function ea(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)y.console&&console.log&&console.log(c);else if(b=u.ext,b=b.sErrMode||b.errMode,a&&F(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"== 1608typeof b&&b(a,d,c)}}function Y(a,b,c,d){Array.isArray(c)?l.each(c,function(e,h){Array.isArray(h)?Y(a,b,h[0],h[1]):Y(a,b,h)}):(d===q&&(d=c),b[c]!==q&&(a[d]=b[c]))}function ub(a,b,c){var d;for(d in b)if(b.hasOwnProperty(d)){var e=b[d];l.isPlainObject(e)?(l.isPlainObject(a[d])||(a[d]={}),l.extend(!0,a[d],e)):c&&"data"!==d&&"aaData"!==d&&Array.isArray(e)?a[d]=e.slice():a[d]=e}return a}
1608function sb(a,b,c){l(a).on("click.DT",b,function(d){l(a).trigger("blur");c(d)}).on("keypress.DT",b,function(d){13===d.which&& 1609(d.preventDefault(),c(d))}).on("selectstart.DT",function(){return!1})}function R(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function F(a,b,c,d){var e=[];b&&(e=l.map(a[b].slice().reverse(),function(h,f){return h.fn.apply(a.oInstance,d)}));null!==c&&(b=l.Event(c+".dt"),l(a.nTable).trigger(b,d),e.push(b.result));return e}function qb(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function lb(a,b){a=a.renderer;var c=u.ext.renderer[b]; 1610return l.isPlainObject(a)&&a[b]?c[a[b]]||c._:"string"===typeof a?c[a]||c._:c._}function Q(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Ea(a,b){var c=ic.numbers_length,d=Math.floor(c/2);b<=c?a=pa(0,b):a<=d?(a=pa(0,c-2),a.push("ellipsis"),a.push(b-1)):(a>=b-1-d?a=pa(b-(c-2),b):(a=pa(a-d+2,a+d-1),a.push("ellipsis"),a.push(b-1)),a.splice(0,0,"ellipsis"),a.splice(0,0,0));a.DT_el="span";return a}function bb(a){l.each({num:function(b){return Xa(b,a)},"num-fmt":function(b){return Xa(b, 1611a,vb)},"html-num":function(b){return Xa(b,a,Ya)},"html-num-fmt":function(b){return Xa(b,a,Ya,vb)}},function(b,c){M.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(M.type.search[b+a]=M.type.search.html)})}function jc(a,b,c,d,e){return y.moment?a[b](e):y.luxon?a[c](e):d?a[d](e):a}function Za(a,b,c){if(y.moment){var d=y.moment.utc(a,b,c,!0);if(!d.isValid())return null}else if(y.luxon){d=b?y.luxon.DateTime.fromFormat(a,b):y.luxon.DateTime.fromISO(a);if(!d.isValid)return null;d.setLocale(c)}else b?(kc|| 1612alert("DataTables warning: Formatted date without Moment.js or Luxon - https://datatables.net/tn/17"),kc=!0):d=new Date(a);return d}function wb(a){return function(b,c,d,e){0===arguments.length?(d="en",b=c=null):1===arguments.length?(d="en",c=b,b=null):2===arguments.length&&(d=c,c=b,b=null);var h="datetime-"+c;u.ext.type.order[h]||(u.ext.type.detect.unshift(function(f){return f===h?h:!1}),u.ext.type.order[h+"-asc"]=function(f,g){f=f.valueOf();g=g.valueOf();return f===g?0:f<g?-1:1},u.ext.type.order[h+ 1613"-desc"]=function(f,g){f=f.valueOf();g=g.valueOf();return f===g?0:f>g?-1:1});return function(f,g){if(null===f||f===q)"--now"===e?(f=new Date,f=new Date(Date.UTC(f.getFullYear(),f.getMonth(),f.getDate(),f.getHours(),f.getMinutes(),f.getSeconds()))):f="";if("type"===g)return h;if(""===f)return"sort"!==g?"":Za("0000-01-01 00:00:00",null,d);if(null!==c&&b===c&&"sort"!==g&&"type"!==g&&!(f instanceof Date))return f;var k=Za(f,b,d);if(null===k)return f;if("sort"===g)return k;f=null===c?jc(k,"toDate","toJSDate", 1614"")[a]():jc(k,"format","toFormat","toISOString",c);return"display"===g?$a(f):f}}}function lc(a){return function(){var b=[Wa(this[u.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return u.ext.internal[a].apply(this,b)}}var u=function(a,b){if(this instanceof u)return l(a).DataTable(b);b=a;this.$=function(f,g){return this.api(!0).$(f,g)};this._=function(f,g){return this.api(!0).rows(f,g).data()};this.api=function(f){return f?new B(Wa(this[M.iApiIndex])):new B(this)};this.fnAddData=function(f, 1615g){var k=this.api(!0);f=Array.isArray(f)&&(Array.isArray(f[0])||l.isPlainObject(f[0]))?k.rows.add(f):k.row.add(f);(g===q||g)&&k.draw();return f.flatten().toArray()};this.fnAdjustColumnSizing=function(f){var g=this.api(!0).columns.adjust(),k=g.settings()[0],m=k.oScroll;f===q||f?g.draw(!1):(""!==m.sX||""!==m.sY)&&Ja(k)};this.fnClearTable=function(f){var g=this.api(!0).clear();(f===q||f)&&g.draw()};this.fnClose=function(f){this.api(!0).row(f).child.hide()};this.fnDeleteRow=function(f,g,k){var m=this.api(!0); 1616f=m.rows(f);var n=f.settings()[0],p=n.aoData[f[0][0]];f.remove();g&&g.call(this,n,p);(k===q||k)&&m.draw();return p};this.fnDestroy=function(f){this.api(!0).destroy(f)};this.fnDraw=function(f){this.api(!0).draw(f)};this.fnFilter=function(f,g,k,m,n,p){n=this.api(!0);null===g||g===q?n.search(f,k,m,p):n.column(g).search(f,k,m,p);n.draw()};this.fnGetData=function(f,g){var k=this.api(!0);if(f!==q){var m=f.nodeName?f.nodeName.toLowerCase():"";return g!==q||"td"==m||"th"==m?k.cell(f,g).data():k.row(f).data()|| 1617null}return k.data().toArray()};this.fnGetNodes=function(f){var g=this.api(!0);return f!==q?g.row(f).node():g.rows().nodes().flatten().toArray()};this.fnGetPosition=function(f){var g=this.api(!0),k=f.nodeName.toUpperCase();return"TR"==k?g.row(f).index():"TD"==k||"TH"==k?(f=g.cell(f).index(),[f.row,f.columnVisible,f.column]):null};this.fnIsOpen=function(f){return this.api(!0).row(f).child.isShown()};this.fnOpen=function(f,g,k){return this.api(!0).row(f).child(g,k).show().child()[0]};this.fnPageChange= 1618function(f,g){f=this.api(!0).page(f);(g===q||g)&&f.draw(!1)};
1618this.fnSetColumnVis=function(f,g,k){f=this.api(!0).column(f).visible(g);(k===q||k)&&f.columns.adjust().draw()};this.fnSettings=function(){return Wa(this[M.iApiIndex])};this.fnSort=function(f){this.api(!0).order(f).draw()};this.fnSortListener=function(f,g,k){this.api(!0).order.listener(f,g,k)};this.fnUpdate=function(f,g,k,m,n){var p=this.api(!0);k===q||null===k?p.row(g).data(f):p.cell(g,k).data(f);(n===q||n)&&p.columns.adjust();(m===q||m)&& 1619p.draw();return 0};this.fnVersionCheck=M.fnVersionCheck;var c=this,d=b===q,e=this.length;d&&(b={});this.oApi=this.internal=M.internal;for(var h in u.ext.internal)h&&(this[h]=lc(h));this.each(function(){var f={},g=1<e?ub(f,b,!0):b,k=0,m;f=this.getAttribute("id");var n=!1,p=u.defaults,t=l(this);if("table"!=this.nodeName.toLowerCase())ea(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{Db(p);Eb(p.column);P(p,p,!0);P(p.column,p.column,!0);P(p,l.extend(g,t.data()),!0);var v=u.settings; 1620k=0;for(m=v.length;k<m;k++){var x=v[k];if(x.nTable==this||x.nTHead&&x.nTHead.parentNode==this||x.nTFoot&&x.nTFoot.parentNode==this){var w=g.bRetrieve!==q?g.bRetrieve:p.bRetrieve;if(d||w)return x.oInstance;if(g.bDestroy!==q?g.bDestroy:p.bDestroy){x.oInstance.fnDestroy();break}else{ea(x,0,"Cannot reinitialise DataTable",3);return}}if(x.sTableId==this.id){v.splice(k,1);break}}if(null===f||""===f)this.id=f="DataTables_Table_"+u.ext._unique++;var r=l.extend(!0,{},u.models.oSettings,{sDestroyWidth:t[0].style.width, 1621sInstance:f,sTableId:f});r.nTable=this;r.oApi=c.internal;r.oInit=g;v.push(r);r.oInstance=1===c.length?c:t.dataTable();Db(g);la(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=Array.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);g=ub(l.extend(!0,{},p),g);Y(r.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));Y(r,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod", 1622"aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);Y(r.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);Y(r.oLanguage,g,"fnInfoCallback"); 1623R(r,"aoDrawCallback",g.fnDrawCallback,"user");R(r,"aoServerParams",g.fnServerParams,"user");R(r,"aoStateSaveParams",g.fnStateSaveParams,"user");R(r,"aoStateLoadParams",g.fnStateLoadParams,"user");R(r,"aoStateLoaded",g.fnStateLoaded,"user");R(r,"aoRowCallback",g.fnRowCallback,"user");R(r,"aoRowCreatedCallback",g.fnCreatedRow,"user");R(r,"aoHeaderCallback",g.fnHeaderCallback,"user");R(r,"aoFooterCallback",g.fnFooterCallback,"user");R(r,"aoInitComplete",g.fnInitComplete,"user");R(r,"aoPreDrawCallback", 1624g.fnPreDrawCallback,"user");r.rowIdFn=ma(g.rowId);Fb(r);var C=r.oClasses;l.extend(C,u.ext.classes,g.oClasses);t.addClass(C.sTable);r.iInitDisplayStart===q&&(r.iInitDisplayStart=g.iDisplayStart,r._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(r.bDeferLoading=!0,f=Array.isArray(g.iDeferLoading),r._iRecordsDisplay=f?g.iDeferLoading[0]:g.iDeferLoading,r._iRecordsTotal=f?g.iDeferLoading[1]:g.iDeferLoading);var G=r.oLanguage;l.extend(!0,G,g.oLanguage);G.sUrl?(l.ajax({dataType:"json",url:G.sUrl, 1625success:function(I){P(p.oLanguage,I);la(I);l.extend(!0,G,I,r.oInit.oLanguage);F(r,null,"i18n",[r]);Aa(r)},error:function(){Aa(r)}}),n=!0):F(r,null,"i18n",[r]);null===g.asStripeClasses&&(r.asStripeClasses=[C.sStripeOdd,C.sStripeEven]);f=r.asStripeClasses;var ba=t.children("tbody").find("tr").eq(0);-1!==l.inArray(!0,l.map(f,function(I,H){return ba.hasClass(I)}))&&(l("tbody tr",this).removeClass(f.join(" ")),r.asDestroyStripes=f.slice());f=[];v=this.getElementsByTagName("thead");0!==v.length&&(wa(r.aoHeader, 1626v[0]),f=Pa(r));if(null===g.aoColumns)for(v=[],k=0,m=f.length;k<m;k++)v.push(null);else v=g.aoColumns;k=0;for(m=v.length;k<m;k++)cb(r,f?f[k]:null);Hb(r,g.aoColumnDefs,v,function(I,H){Ia(r,I,H)});if(ba.length){var L=function(I,H){return null!==I.getAttribute("data-"+H)?H:null};l(ba[0]).children("th, td").each(function(I,H){var fa=r.aoColumns[I];if(fa.mData===I){var Z=L(H,"sort")||L(H,"order");H=L(H,"filter")||L(H,"search");if(null!==Z||null!==H)fa.mData={_:I+".display",sort:null!==Z?I+".@data-"+Z:q, 1627type:null!==Z?I+".@data-"+Z:q,filter:null!==H?I+".@data-"+H:q},Ia(r,I)}})}var O=r.oFeatures;f=function(){if(g.aaSorting===q){var I=r.aaSorting;k=0;for(m=I.length;k<m;k++)I[k][1]=r.aoColumns[k].asSorting[0]}Va(r);O.bSort&&R(r,"aoDrawCallback",function(){if(r.bSorted){var Z=oa(r),Ba={};l.each(Z,function(X,ca){Ba[ca.src]=ca.dir});F(r,null,"order",[r,Z,Ba]);gc(r)}});R(r,"aoDrawCallback",function(){(r.bSorted||"ssp"===Q(r)||O.bDeferRender)&&Va(r)},"sc");I=t.children("caption").each(function(){this._captionSide= 1628l(this).css("caption-side")});var H=t.children("thead");0===H.length&&(H=l("<thead/>").appendTo(t));r.nTHead=H[0];var fa=t.children("tbody");0===fa.length&&(fa=l("<tbody/>").insertAfter(H));r.nTBody=fa[0];H=t.children("tfoot");0===H.length&&0<I.length&&(""!==r.oScroll.sX||""!==r.oScroll.sY)&&(H=l("<tfoot/>").appendTo(t));0===H.length||0===H.children().length?t.addClass(C.sNoFooter):0<H.length&&(r.nTFoot=H[0],wa(r.aoFooter,r.nTFoot));if(g.aaData)for(k=0;k<g.aaData.length;k++)ia(r,g.aaData[k]);else(r.bDeferLoading|| 1629"dom"==Q(r))&&La(r,l(r.nTBody).children("tr"));r.aiDisplay=r.aiDisplayMaster.slice();r.bInitialised=!0;!1===n&&Aa(r)};R(r,"aoDrawCallback",Da,"state_save");g.bStateSave?(O.bStateSave=!0,hc(r,g,f)):f()}});c=null;return this},M,z,J,xb={},mc=/[\r\n\u2028]/g,Ya=/<.*?>/g,Dc=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,Ec=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,vb=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,aa=function(a){return a&&!0!==a&&"-"!== 1630a?!1:!0},nc=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},oc=function(a,b){xb[b]||(xb[b]=new RegExp(ob(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(xb[b],"."):a},yb=function(a,b,c){var d="string"===typeof a;if(aa(a))return!0;b&&d&&(a=oc(a,b));c&&d&&(a=a.replace(vb,""));return!isNaN(parseFloat(a))&&isFinite(a)},pc=function(a,b,c){return aa(a)?!0:aa(a)||"string"===typeof a?yb(a.replace(Ya,""),b,c)?!0:null:null},U=function(a,b,c){var d=[],e=0,h=a.length; 1631if(c!==q)for(;e<h;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<h;e++)a[e]&&d.push(a[e][b]);return d},Fa=function(a,b,c,d){var e=[],h=0,f=b.length;if(d!==q)for(;h<f;h++)a[b[h]][c]&&e.push(a[b[h]][c][d]);else for(;h<f;
1631h++)e.push(a[b[h]][c]);return e},pa=function(a,b){var c=[];if(b===q){b=0;var d=a}else d=b,b=a;for(a=b;a<d;a++)c.push(a);return c},qc=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},Oa=function(a){a:{if(!(2>a.length)){var b=a.slice().sort();for(var c=b[0], 1632d=1,e=b.length;d<e;d++){if(b[d]===c){b=!1;break a}c=b[d]}}b=!0}if(b)return a.slice();b=[];e=a.length;var h,f=0;d=0;a:for(;d<e;d++){c=a[d];for(h=0;h<f;h++)if(b[h]===c)continue a;b.push(c);f++}return b},rc=function(a,b){if(Array.isArray(b))for(var c=0;c<b.length;c++)rc(a,b[c]);else a.push(b);return a},sc=function(a,b){b===q&&(b=0);return-1!==this.indexOf(a,b)};Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});Array.prototype.includes||(Array.prototype.includes= 1633sc);String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")});String.prototype.includes||(String.prototype.includes=sc);u.util={throttle:function(a,b){var c=b!==q?b:200,d,e;return function(){var h=this,f=+new Date,g=arguments;d&&f<d+c?(clearTimeout(e),e=setTimeout(function(){d=q;a.apply(h,g)},c)):(d=f,a.apply(h,g))}},escapeRegex:function(a){return a.replace(Ec,"\\$1")},set:function(a){if(l.isPlainObject(a))return u.util.set(a._);if(null=== 1634a)return function(){};if("function"===typeof a)return function(c,d,e){a(c,"set",d,e)};if("string"!==typeof a||-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("("))return function(c,d){c[a]=d};var b=function(c,d,e){e=hb(e);var h=e[e.length-1];for(var f,g,k=0,m=e.length-1;k<m;k++){if("__proto__"===e[k]||"constructor"===e[k])throw Error("Cannot set prototype values");f=e[k].match(Ga);g=e[k].match(qa);if(f){e[k]=e[k].replace(Ga,"");c[e[k]]=[];h=e.slice();h.splice(0,k+1);f=h.join(".");if(Array.isArray(d))for(g= 16350,m=d.length;g<m;g++)h={},b(h,d[g],f),c[e[k]].push(h);else c[e[k]]=d;return}g&&(e[k]=e[k].replace(qa,""),c=c[e[k]](d));if(null===c[e[k]]||c[e[k]]===q)c[e[k]]={};c=c[e[k]]}if(h.match(qa))c[h.replace(qa,"")](d);else c[h.replace(Ga,"")]=d};return function(c,d){return b(c,d,a)}},get:function(a){if(l.isPlainObject(a)){var b={};l.each(a,function(d,e){e&&(b[d]=u.util.get(e))});return function(d,e,h,f){var g=b[e]||b._;return g!==q?g(d,e,h,f):d}}if(null===a)return function(d){return d};if("function"===typeof a)return function(d, 1636e,h,f){return a(d,e,h,f)};if("string"!==typeof a||-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("("))return function(d,e){return d[a]};var c=function(d,e,h){if(""!==h){var f=hb(h);for(var g=0,k=f.length;g<k;g++){h=f[g].match(Ga);var m=f[g].match(qa);if(h){f[g]=f[g].replace(Ga,"");""!==f[g]&&(d=d[f[g]]);m=[];f.splice(0,g+1);f=f.join(".");if(Array.isArray(d))for(g=0,k=d.length;g<k;g++)m.push(c(d[g],e,f));d=h[0].substring(1,h[0].length-1);d=""===d?m:m.join(d);break}else if(m){f[g]=f[g].replace(qa, 1637"");d=d[f[g]]();continue}if(null===d||d[f[g]]===q)return q;d=d[f[g]]}}return d};return function(d,e){return c(d,e,a)}}};var S=function(a,b,c){a[b]!==q&&(a[c]=a[b])},Ga=/\[.*?\]$/,qa=/\(\)$/,ma=u.util.get,ha=u.util.set,ob=u.util.escapeRegex,Sa=l("<div>")[0],Bc=Sa.textContent!==q,Cc=/<.*?>/g,mb=u.util.throttle,tc=[],N=Array.prototype,Fc=function(a){var b,c=u.settings,d=l.map(c,function(h,f){return h.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase()){var e= 1638l.inArray(a,d);return-1!==e?[c[e]]:null}if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?b=l(a):a instanceof l&&(b=a)}else return[];if(b)return b.map(function(h){e=l.inArray(this,d);return-1!==e?c[e]:null}).toArray()};var B=function(a,b){if(!(this instanceof B))return new B(a,b);var c=[],d=function(f){(f=Fc(f))&&c.push.apply(c,f)};if(Array.isArray(a))for(var e=0,h=a.length;e<h;e++)d(a[e]);else d(a);this.context=Oa(c);b&&l.merge(this,b);this.selector={rows:null, 1639cols:null,opts:null};B.extend(this,this,tc)};u.Api=B;l.extend(B.prototype,{any:function(){return 0!==this.count()},concat:N.concat,context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new B(b[a],this[a]):null},filter:function(a){var b=[];if(N.filter)b=N.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]); 1640return new B(this.context,b)},flatten:function(){var a=[];return new B(this.context,a.concat.apply(a,this.toArray()))},join:N.join,indexOf:N.indexOf||function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1},iterator:function(a,b,c,d){var e=[],h,f,g=this.context,k,m=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);var n=0;for(h=g.length;n<h;n++){var p=new B(g[n]);if("table"===b){var t=c.call(p,g[n],n);t!==q&&e.push(t)}else if("columns"===b||"rows"===b)t=c.call(p,g[n], 1641this[n],n),t!==q&&e.push(t);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){var v=this[n];"column-rows"===b&&(k=ab(g[n],m.opts));var x=0;for(f=v.length;x<f;x++)t=v[x],t="cell"===b?c.call(p,g[n],t.row,t.column,n,x):c.call(p,g[n],t,n,x,k),t!==q&&e.push(t)}}return e.length||d?(a=new B(g,a?e.concat.apply([],e):e),b=a.selector,b.rows=m.rows,b.cols=m.cols,b.opts=m.opts,a):this},lastIndexOf:N.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0, 1642map:function(a){var b=[];if(N.map)b=N.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new B(this.context,b)},pluck:function(a){var b=u.util.get(a);return this.map(function(c){return b(c)})},pop:N.pop,push:N.push,reduce:N.reduce||function(a,b){return Gb(this,a,b,0,this.length,1)},reduceRight:N.reduceRight||function(a,b){return Gb(this,a,b,this.length-1,-1,-1)}
1642,reverse:N.reverse,selector:null,shift:N.shift,slice:function(){return new B(this.context, 1643this)},sort:N.sort,splice:N.splice,toArray:function(){return N.slice.call(this)},to$:function(){return l(this)},toJQuery:function(){return l(this)},unique:function(){return new B(this.context,Oa(this))},unshift:N.unshift});B.extend=function(a,b,c){if(c.length&&b&&(b instanceof B||b.__dt_wrapper)){var d,e=function(g,k,m){return function(){var n=k.apply(g,arguments);B.extend(n,n,m.methodExt);return n}};var h=0;for(d=c.length;h<d;h++){var f=c[h];b[f.name]="function"===f.type?e(a,f.val,f):"object"=== 1644f.type?{}:f.val;b[f.name].__dt_wrapper=!0;B.extend(a,b[f.name],f.propExt)}}};B.register=z=function(a,b){if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)B.register(a[c],b);else{d=a.split(".");var e=tc,h;a=0;for(c=d.length;a<c;a++){var f=(h=-1!==d[a].indexOf("()"))?d[a].replace("()",""):d[a];a:{var g=0;for(var k=e.length;g<k;g++)if(e[g].name===f){g=e[g];break a}g=null}g||(g={name:f,val:{},methodExt:[],propExt:[],type:"object"},e.push(g));a===c-1?(g.val=b,g.type="function"===typeof b?"function":l.isPlainObject(b)? 1645"object":"other"):e=h?g.methodExt:g.propExt}}};B.registerPlural=J=function(a,b,c){B.register(a,c);B.register(b,function(){var d=c.apply(this,arguments);return d===this?this:d instanceof B?d.length?Array.isArray(d[0])?new B(d.context,d[0]):d[0]:q:d})};var uc=function(a,b){if(Array.isArray(a))return l.map(a,function(d){return uc(d,b)});if("number"===typeof a)return[b[a]];var c=l.map(b,function(d,e){return d.nTable});return l(c).filter(a).map(function(d){d=l.inArray(this,c);return b[d]}).toArray()}; 1646z("tables()",function(a){return a!==q&&null!==a?new B(uc(a,this.context)):this});z("table()",function(a){a=this.tables(a);var b=a.context;return b.length?new B(b[0]):a});J("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});J("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});J("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead}, 16471)});J("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});J("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});z("draw()",function(a){return this.iterator("table",function(b){"page"===a?ja(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),ka(b,!1===a))})});z("page()",function(a){return a===q?this.page.info().page:this.iterator("table",function(b){Ta(b,a)})});z("page.info()", 1648function(a){if(0===this.context.length)return q;a=this.context[0];var b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===Q(a)}});z("page.len()",function(a){return a===q?0!==this.context.length?this.context[0]._iDisplayLength:q:this.iterator("table",function(b){pb(b,a)})});var vc=function(a,b, 1649c){if(c){var d=new B(a);d.one("draw",function(){c(d.ajax.json())})}if("ssp"==Q(a))ka(a,b);else{V(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();Qa(a,[],function(h){Ma(a);h=za(a,h);for(var f=0,g=h.length;f<g;f++)ia(a,h[f]);ka(a,b);V(a,!1)})}};z("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});z("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});z("ajax.reload()",function(a,b){return this.iterator("table",function(c){vc(c,!1===b,a)})}); 1650z("ajax.url()",function(a){var b=this.context;if(a===q){if(0===b.length)return q;b=b[0];return b.ajax?l.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(c){l.isPlainObject(c.ajax)?c.ajax.url=a:c.ajax=a})});z("ajax.url().load()",function(a,b){return this.iterator("table",function(c){vc(c,!1===b,a)})});var zb=function(a,b,c,d,e){var h=[],f,g,k;var m=typeof b;b&&"string"!==m&&"function"!==m&&b.length!==q||(b=[b]);m=0;for(g=b.length;m<g;m++){var n=b[m]&&b[m].split&& 1651!b[m].match(/[\[\(:]/)?b[m].split(","):[b[m]];var p=0;for(k=n.length;p<k;p++)(f=c("string"===typeof n[p]?n[p].trim():n[p]))&&f.length&&(h=h.concat(f))}a=M.selector[a];if(a.length)for(m=0,g=a.length;m<g;m++)h=a[m](d,e,h);return Oa(h)},Ab=function(a){a||(a={});a.filter&&a.search===q&&(a.search=a.filter);return l.extend({search:"none",order:"current",page:"all"},a)},Bb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length= 16520;return a},ab=function(a,b){var c=[],d=a.aiDisplay;var e=a.aiDisplayMaster;var h=b.search;var f=b.order;b=b.page;if("ssp"==Q(a))return"removed"===h?[]:pa(0,e.length);if("current"==b)for(f=a._iDisplayStart,a=a.fnDisplayEnd();f<a;f++)c.push(d[f]);else if("current"==f||"applied"==f)if("none"==h)c=e.slice();else if("applied"==h)c=d.slice();else{if("removed"==h){var g={};f=0;for(a=d.length;f<a;f++)g[d[f]]=null;c=l.map(e,function(k){return g.hasOwnProperty(k)?null:k})}}else if("index"==f||"original"== 1653f)for(f=0,a=a.aoData.length;f<a;f++)"none"==h?c.push(f):(e=l.inArray(f,d),(-1===e&&"removed"==h||0<=e&&"applied"==h)&&c.push(f));return c},Gc=function(a,b,c){var d;return zb("row",b,function(e){var h=nc(e),f=a.aoData;if(null!==h&&!c)return[h];d||(d=ab(a,c));if(null!==h&&-1!==l.inArray(h,d))return[h];if(null===e||e===q||""===e)return d;if("function"===typeof e)return l.map(d,function(k){var m=f[k];return e(k,m._aData,m.nTr)?k:null});if(e.nodeName){h=e._DT_RowIndex;var g=e._DT_CellIndex;if(h!==q)return f[h]&& 1654f[h].nTr===e?[h]:[];if(g)return f[g.row]&&f[g.row].nTr===e.parentNode?[g.row]:[];h=l(e).closest("*[data-dt-row]");return h.length?[h.data("dt-row")]:[]}if("string"===typeof e&&"#"===e.charAt(0)&&(h=a.aIds[e.replace(/^#/,"")],h!==q))return[h.idx];h=qc(Fa(a.aoData,d,"nTr"));return l(h).filter(e).map(function(){return this._DT_RowIndex}).toArray()},a,c)};z("rows()",function(a,b){a===q?a="":l.isPlainObject(a)&&(b=a,a="");b=Ab(b);var c=this.iterator("table",function(d){return Gc(d,a,b)},1);c.selector.rows= 1655a;c.selector.opts=b;return c});z("rows().nodes()",function(){return this.iterator("row",function(a,b){return a.aoData[b].nTr||q},1)});z("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return Fa(a.aoData,b,"_aData")},1)});J("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){b
1655=b.aoData[c];return"search"===a?b._aFilterData:b._aSortData},1)});J("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){va(b, 1656c,a)})});J("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,b){return b},1)});J("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,d=0,e=c.length;d<e;d++)for(var h=0,f=this[d].length;h<f;h++){var g=c[d].rowIdFn(c[d].aoData[this[d][h]]._aData);b.push((!0===a?"#":"")+g)}return new B(c,b)});J("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,h=e[c],f,g;e.splice(c,1);var k=0;for(f=e.length;k< 1657f;k++){var m=e[k];var n=m.anCells;null!==m.nTr&&(m.nTr._DT_RowIndex=k);if(null!==n)for(m=0,g=n.length;m<g;m++)n[m]._DT_CellIndex.row=k}Na(b.aiDisplayMaster,c);Na(b.aiDisplay,c);Na(a[d],c,!1);0<b._iRecordsDisplay&&b._iRecordsDisplay--;qb(b);c=b.rowIdFn(h._aData);c!==q&&delete b.aIds[c]});this.iterator("table",function(b){for(var c=0,d=b.aoData.length;c<d;c++)b.aoData[c].idx=c});return this});z("rows.add()",function(a){var b=this.iterator("table",function(d){var e,h=[];var f=0;for(e=a.length;f<e;f++){var g= 1658a[f];g.nodeName&&"TR"===g.nodeName.toUpperCase()?h.push(La(d,g)[0]):h.push(ia(d,g))}return h},1),c=this.rows(-1);c.pop();l.merge(c,b);return c});z("row()",function(a,b){return Bb(this.rows(a,b))});z("row().data()",function(a){var b=this.context;if(a===q)return b.length&&this.length?b[0].aoData[this[0]]._aData:q;var c=b[0].aoData[this[0]];c._aData=a;Array.isArray(a)&&c.nTr&&c.nTr.id&&ha(b[0].rowId)(a,c.nTr.id);va(b[0],this[0],"data");return this});z("row().node()",function(){var a=this.context;return a.length&& 1659this.length?a[0].aoData[this[0]].nTr||null:null});z("row.add()",function(a){a instanceof l&&a.length&&(a=a[0]);var b=this.iterator("table",function(c){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?La(c,a)[0]:ia(c,a)});return this.row(b[0])});l(A).on("plugin-init.dt",function(a,b){a=new B(b);a.on("stateSaveParams",function(d,e,h){d=e.rowIdFn;e=e.aoData;for(var f=[],g=0;g<e.length;g++)e[g]._detailsShow&&f.push("#"+d(e[g]._aData));h.childRows=f});var c=a.state.loaded();c&&c.childRows&&a.rows(l.map(c.childRows, 1660function(d){return d.replace(/:/g,"\\:")})).every(function(){F(b,null,"requestChild",[this])})});var Hc=function(a,b,c,d){var e=[],h=function(f,g){if(Array.isArray(f)||f instanceof l)for(var k=0,m=f.length;k<m;k++)h(f[k],g);else f.nodeName&&"tr"===f.nodeName.toLowerCase()?e.push(f):(k=l("<tr><td></td></tr>").addClass(g),l("td",k).addClass(g).html(f)[0].colSpan=na(a),e.push(k[0]))};h(c,d);b._details&&b._details.detach();b._details=l(e);b._detailsShow&&b._details.insertAfter(b.nTr)},wc=u.util.throttle(function(a){Da(a[0])}, 1661500),Cb=function(a,b){var c=a.context;c.length&&(a=c[0].aoData[b!==q?b:a[0]])&&a._details&&(a._details.remove(),a._detailsShow=q,a._details=q,l(a.nTr).removeClass("dt-hasChild"),wc(c))},xc=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];d._details&&((d._detailsShow=b)?(d._details.insertAfter(d.nTr),l(d.nTr).addClass("dt-hasChild")):(d._details.detach(),l(d.nTr).removeClass("dt-hasChild")),F(c[0],null,"childRow",[b,a.row(a[0])]),Ic(c[0]),wc(c))}},Ic=function(a){var b=new B(a), 1662c=a.aoData;b.off("draw.dt.DT_details column-sizing.dt.DT_details destroy.dt.DT_details");0<U(c,"_details").length&&(b.on("draw.dt.DT_details",function(d,e){a===e&&b.rows({page:"current"}).eq(0).each(function(h){h=c[h];h._detailsShow&&h._details.insertAfter(h.nTr)})}),b.on("column-sizing.dt.DT_details",function(d,e,h,f){if(a===e)for(e=na(e),h=0,f=c.length;h<f;h++)d=c[h],d._details&&d._details.children("td[colspan]").attr("colspan",e)}),b.on("destroy.dt.DT_details",function(d,e){if(a===e)for(d=0,e= 1663c.length;d<e;d++)c[d]._details&&Cb(b,d)}))};z("row().child()",function(a,b){var c=this.context;if(a===q)return c.length&&this.length?c[0].aoData[this[0]]._details:q;!0===a?this.child.show():!1===a?Cb(this):c.length&&this.length&&Hc(c[0],c[0].aoData[this[0]],a,b);return this});z(["row().child.show()","row().child().show()"],function(a){xc(this,!0);return this});z(["row().child.hide()","row().child().hide()"],function(){xc(this,!1);return this});z(["row().child.remove()","row().child().remove()"],function(){Cb(this); 1664return this});z("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var Jc=/^([^:]+):(name|visIdx|visible)$/,yc=function(a,b,c,d,e){c=[];d=0;for(var h=e.length;d<h;d++)c.push(T(a,e[d],b));return c},Kc=function(a,b,c){var d=a.aoColumns,e=U(d,"sName"),h=U(d,"nTh");return zb("column",b,function(f){var g=nc(f);if(""===f)return pa(d.length);if(null!==g)return[0<=g?g:d.length+g];if("function"===typeof f){var k=ab(a,c);return l.map(d, 1665function(p,t){return f(t,yc(a,t,0,0,k),h[t])?t:null})}var m="string"===typeof f?f.match(Jc):"";if(m)switch(m[2]){case "visIdx":case "visible":g=parseInt(m[1],10);if(0>g){var n=l.map(d,function(p,t){return p.bVisible?t:null});return[n[n.length+g]]}return[ta(a,g)];case "name":return l.map(e,function(p,t){return p===m[1]?t:null});default:return[]}if(f.nodeName&&f._DT_CellIndex)return[f._DT_CellIndex.column];g=l(h).filter(f).map(function(){return l.inArray(this,h)}).toArray();if(g.length||!f.nodeName)return g; 1666g=l(f).closest("*[data-dt-column]");return g.length?[g.data("dt-column")]:[]},a,c)};z("columns()",function(a,b){a===q?a="":l.isPlainObject(a)&&(b=a,a="");b=Ab(b);var c=this.iterator("table",function(d){return Kc(d,a,b)},1);c.selector.cols=a;c.selector.opts=b;return c});J("columns().header()","column().header()",function(a,b){return this.iterator("column",function(c,d){return c.aoColumns[d].nTh},1)});J("columns().footer()","column().footer()",function(a,b){return this.iterator("column",function(c, 1667d){return c.aoColumns[d].nTf}
1667,1)});J("columns().data()","column().data()",function(){return this.iterator("column-rows",yc,1)});J("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});J("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,h){return Fa(b.aoData,h,"search"===a?"_aFilterData":"_aSortData",c)},1)});J("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows", 1668function(a,b,c,d,e){return Fa(a.aoData,e,"anCells",b)},1)});J("columns().visible()","column().visible()",function(a,b){var c=this,d=this.iterator("column",function(e,h){if(a===q)return e.aoColumns[h].bVisible;var f=e.aoColumns,g=f[h],k=e.aoData,m;if(a!==q&&g.bVisible!==a){if(a){var n=l.inArray(!0,U(f,"bVisible"),h+1);f=0;for(m=k.length;f<m;f++){var p=k[f].nTr;e=k[f].anCells;p&&p.insertBefore(e[h],e[n]||null)}}else l(U(e.aoData,"anCells",h)).detach();g.bVisible=a}});a!==q&&this.iterator("table",function(e){xa(e, 1669e.aoHeader);xa(e,e.aoFooter);e.aiDisplay.length||l(e.nTBody).find("td[colspan]").attr("colspan",na(e));Da(e);c.iterator("column",function(h,f){F(h,null,"column-visibility",[h,f,a,b])});(b===q||b)&&c.columns.adjust()});return d});J("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?ua(b,c):c},1)});z("columns.adjust()",function(){return this.iterator("table",function(a){sa(a)},1)});z("column.index()",function(a,b){if(0!==this.context.length){var c= 1670this.context[0];if("fromVisible"===a||"toData"===a)return ta(c,b);if("fromData"===a||"toVisible"===a)return ua(c,b)}});z("column()",function(a,b){return Bb(this.columns(a,b))});var Lc=function(a,b,c){var d=a.aoData,e=ab(a,c),h=qc(Fa(d,e,"anCells")),f=l(rc([],h)),g,k=a.aoColumns.length,m,n,p,t,v,x;return zb("cell",b,function(w){var r="function"===typeof w;if(null===w||w===q||r){m=[];n=0;for(p=e.length;n<p;n++)for(g=e[n],t=0;t<k;t++)v={row:g,column:t},r?(x=d[g],w(v,T(a,g,t),x.anCells?x.anCells[t]:null)&& 1671m.push(v)):m.push(v);return m}if(l.isPlainObject(w))return w.column!==q&&w.row!==q&&-1!==l.inArray(w.row,e)?[w]:[];r=f.filter(w).map(function(C,G){return{row:G._DT_CellIndex.row,column:G._DT_CellIndex.column}}).toArray();if(r.length||!w.nodeName)return r;x=l(w).closest("*[data-dt-row]");return x.length?[{row:x.data("dt-row"),column:x.data("dt-column")}]:[]},a,c)};z("cells()",function(a,b,c){l.isPlainObject(a)&&(a.row===q?(c=a,a=null):(c=b,b=null));l.isPlainObject(b)&&(c=b,b=null);if(null===b||b=== 1672q)return this.iterator("table",function(n){return Lc(n,a,Ab(c))});var d=c?{page:c.page,order:c.order,search:c.search}:{},e=this.columns(b,d),h=this.rows(a,d),f,g,k,m;d=this.iterator("table",function(n,p){n=[];f=0;for(g=h[p].length;f<g;f++)for(k=0,m=e[p].length;k<m;k++)n.push({row:h[p][f],column:e[p][k]});return n},1);d=c&&c.selected?this.cells(d,c):d;l.extend(d.selector,{cols:b,rows:a,opts:c});return d});J("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a= 1673a.aoData[b])&&a.anCells?a.anCells[c]:q},1)});z("cells().data()",function(){return this.iterator("cell",function(a,b,c){return T(a,b,c)},1)});J("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});J("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return T(b,c,d,a)},1)});J("cells().indexes()","cell().index()",function(){return this.iterator("cell", 1674function(a,b,c){return{row:b,column:c,columnVisible:ua(a,c)}},1)});J("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){va(b,c,a,d)})});z("cell()",function(a,b,c){return Bb(this.cells(a,b,c))});z("cell().data()",function(a){var b=this.context,c=this[0];if(a===q)return b.length&&c.length?T(b[0],c[0].row,c[0].column):q;Ib(b[0],c[0].row,c[0].column,a);va(b[0],c[0].row,"data",c[0].column);return this});z("order()",function(a,b){var c=this.context;if(a=== 1675q)return 0!==c.length?c[0].aaSorting:q;"number"===typeof a?a=[[a,b]]:a.length&&!Array.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(d){d.aaSorting=a.slice()})});z("order.listener()",function(a,b,c){return this.iterator("table",function(d){kb(d,a,b,c)})});
1675z("order.fixed()",function(a){if(!a){var b=this.context;b=b.length?b[0].aaSortingFixed:q;return Array.isArray(b)?{pre:b}:b}return this.iterator("table",function(c){c.aaSortingFixed=l.extend(!0,{},a)})}); 1676z(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];l.each(b[d],function(h,f){e.push([f,a])});c.aaSorting=e})});z("search()",function(a,b,c,d){var e=this.context;return a===q?0!==e.length?e[0].oPreviousSearch.sSearch:q:this.iterator("table",function(h){h.oFeatures.bFilter&&ya(h,l.extend({},h.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});J("columns().search()","column().search()", 1677function(a,b,c,d){return this.iterator("column",function(e,h){var f=e.aoPreSearchCols;if(a===q)return f[h].sSearch;e.oFeatures.bFilter&&(l.extend(f[h],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),ya(e,e.oPreviousSearch,1))})});z("state()",function(){return this.context.length?this.context[0].oSavedState:null});z("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});z("state.loaded()",function(){return this.context.length? 1678this.context[0].oLoadedState:null});z("state.save()",function(){return this.iterator("table",function(a){Da(a)})});u.versionCheck=u.fnVersionCheck=function(a){var b=u.version.split(".");a=a.split(".");for(var c,d,e=0,h=a.length;e<h;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};u.isDataTable=u.fnIsDataTable=function(a){var b=l(a).get(0),c=!1;if(a instanceof u.Api)return!0;l.each(u.settings,function(d,e){d=e.nScrollHead?l("table",e.nScrollHead)[0]:null;var h=e.nScrollFoot? 1679l("table",e.nScrollFoot)[0]:null;if(e.nTable===b||d===b||h===b)c=!0});return c};u.tables=u.fnTables=function(a){var b=!1;l.isPlainObject(a)&&(b=a.api,a=a.visible);var c=l.map(u.settings,function(d){if(!a||a&&l(d.nTable).is(":visible"))return d.nTable});return b?new B(c):c};u.camelToHungarian=P;z("$()",function(a,b){b=this.rows(b).nodes();b=l(b);return l([].concat(b.filter(a).toArray(),b.find(a).toArray()))});l.each(["on","one","off"],function(a,b){z(b+"()",function(){var c=Array.prototype.slice.call(arguments); 1680c[0]=l.map(c[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var d=l(this.tables().nodes());d[b].apply(d,c);return this})});z("clear()",function(){return this.iterator("table",function(a){Ma(a)})});z("settings()",function(){return new B(this.context,this.context)});z("init()",function(){var a=this.context;return a.length?a[0].oInit:null});z("data()",function(){return this.iterator("table",function(a){return U(a.aoData,"_aData")}).flatten()});z("destroy()",function(a){a=a|| 1681!1;return this.iterator("table",function(b){var c=b.oClasses,d=b.nTable,e=b.nTBody,h=b.nTHead,f=b.nTFoot,g=l(d);e=l(e);var k=l(b.nTableWrapper),m=l.map(b.aoData,function(p){return p.nTr}),n;b.bDestroying=!0;F(b,"aoDestroyCallback","destroy",[b]);a||(new B(b)).columns().visible(!0);k.off(".DT").find(":not(tbody *)").off(".DT");l(y).off(".DT-"+b.sInstance);d!=h.parentNode&&(g.children("thead").detach(),g.append(h));f&&d!=f.parentNode&&(g.children("tfoot").detach(),g.append(f));b.aaSorting=[];b.aaSortingFixed= 1682[];Va(b);l(m).removeClass(b.asStripeClasses.join(" "));l("th, td",h).removeClass(c.sSortable+" "+c.sSortableAsc+" "+c.sSortableDesc+" "+c.sSortableNone);e.children().detach();e.append(m);h=b.nTableWrapper.parentNode;f=a?"remove":"detach";g[f]();k[f]();!a&&h&&(h.insertBefore(d,b.nTableReinsertBefore),g.css("width",b.sDestroyWidth).removeClass(c.sTable),(n=b.asDestroyStripes.length)&&e.children().each(function(p){l(this).addClass(b.asDestroyStripes[p%n])}));c=l.inArray(b,u.settings);-1!==c&&u.settings.splice(c, 16831)})});l.each(["column","row","cell"],function(a,b){z(b+"s().every()",function(c){var d=this.selector.opts,e=this;return this.iterator(b,function(h,f,g,k,m){c.call(e[b](f,"cell"===b?g:d,"cell"===b?d:q),f,g,k,m)})})});z("i18n()",function(a,b,c){var d=this.context[0];a=ma(a)(d.oLanguage);a===q&&(a=b);c!==q&&l.isPlainObject(a)&&(a=a[c]!==q?a[c]:a._);return a.replace("%d",c)});u.version="1.12.1";u.settings=[];u.models={};u.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0,"return":!1}; 1684u.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};u.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,f
vendor: 7,060 bytes, lines 1684-1698
1684nSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null, 1685sWidth:null,sWidthOrig:null};u.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g, 1686this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+ 1687a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries", 1688sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:l.extend({},u.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};E(u.defaults); 1689u.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};E(u.defaults.column);u.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null, 1690bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[], 1691aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,jqXHR:null,json:q,oAjaxData:q,fnServerData:null,aoServerParams:[],sServerMethod:null, 1692fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Q(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Q(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+ 1693a,d=this.aiDisplay.length,e=this.oFeatures,h=e.bPaginate;return e.bServerSide?!1===h||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!h||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};u.ext=M={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[], 1694search:{},order:{}},_unique:0,fnVersionCheck:u.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:u.version};l.extend(M,{afnFiltering:M.search,aTypes:M.type.detect,ofnSearch:M.type.search,oSort:M.type.order,afnSortData:M.order,aoFeatures:M.feature,oApi:M.internal,oStdClasses:M.classes,oPagination:M.pager});l.extend(u.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty", 1695sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_desc_disabled",sSortableDesc:"sorting_asc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner", 1696sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var ic=u.ext.pager;l.extend(ic,{simple:function(a,b){return["previous","next"]},full:function(a,b){return["first","previous","next","last"]},numbers:function(a,b){return[Ea(a,b)]},simple_numbers:function(a,b){return["previous", 1697Ea(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Ea(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",Ea(a,b),"last"]},_numbers:Ea,numbers_length:7});l.extend(!0,u.ext.renderer,{pageButton:{_:function(a,b,c,d,e,h){var f=a.oClasses,g=a.oLanguage.oPaginate,k=a.oLanguage.oAria.paginate||{},m,n,p=0,t=function(x,w){var r,C=f.sPageButtonDisabled,G=function(I){Ta(a,I.data.action,!0)};var ba=0;for(r=w.length;ba<r;ba++){var L=w[ba];if(Array.isArray(L)){var O=l("<"+(L.DT_el|| 1698"div")+"/>").appendTo(x);t(O,L)}else{m=null;n=L;O=a.iTabIndex;switch(L){case "ellipsis":x.append('<span class="ellipsis">…
1698</span>');break;case "first":m=g.sFirst;0===e&&(O=-1,n+=" "+C);break;case "previous":m=g.sPrevious;0===e&&(O=-1,n+=" "+C);break;case "next":m=g.sNext;if(0===h||e===h-1)O=-1,n+=" "+C;break;case "last":m=g.sLast;if(0===h||e===h-1)O=-1,n+=" "+C;break;default:m=a.fnFormatNumber(L+1),n=e===L?f.sPageButtonActive:""}null!==m&&(O=l("<a>",{"class":f.sPageButton+" "+n,"aria-controls":a.sTableId, 1699"aria-label":k[L],"data-dt-idx":p,tabindex:O,id:0===c&&"string"===typeof L?a.sTableId+"_"+L:null}).html(m).appendTo(x),sb(O,{action:L},G),p++)}}};try{var v=l(b).find(A.activeElement).data("dt-idx")}catch(x){}t(l(b).empty(),d);v!==q&&l(b).find("[data-dt-idx="+v+"]").trigger("focus")}}});l.extend(u.ext.type.detect,[function(a,b){b=b.oLanguage.sDecimal;return yb(a,b)?"num"+b:null},function(a,b){if(a&&!(a instanceof Date)&&!Dc.test(a))return null;b=Date.parse(a);return null!==b&&!isNaN(b)||aa(a)?"date": 1700null},function(a,b){b=b.oLanguage.sDecimal;return yb(a,b,!0)?"num-fmt"+b:null},function(a,b){b=b.oLanguage.sDecimal;return pc(a,b)?"html-num"+b:null},function(a,b){b=b.oLanguage.sDecimal;return pc(a,b,!0)?"html-num-fmt"+b:null},function(a,b){return aa(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);l.extend(u.ext.type.search,{html:function(a){return aa(a)?a:"string"===typeof a?a.replace(mc," ").replace(Ya,""):""},string:function(a){return aa(a)?a:"string"===typeof a?a.replace(mc," "): 1701a}});var Xa=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=oc(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};l.extend(M.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return aa(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return aa(a)?"":"string"===typeof a?a.toLowerCase():a.toString?a.toString():""},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a, 1702b){return a<b?1:a>b?-1:0}});bb("");l.extend(!0,u.ext.renderer,{header:{_:function(a,b,c,d){l(a.nTable).on("order.dt.DT",function(e,h,f,g){a===h&&(e=c.idx,b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==g[e]?d.sSortAsc:"desc"==g[e]?d.sSortDesc:c.sSortingClass))})},jqueryui:function(a,b,c,d){l("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(l("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);l(a.nTable).on("order.dt.DT",function(e,h,f,g){a===h&&(e=c.idx, 1703b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==g[e]?d.sSortAsc:"desc"==g[e]?d.sSortDesc:c.sSortingClass),b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass("asc"==g[e]?d.sSortJUIAsc:"desc"==g[e]?d.sSortJUIDesc:c.sSortingClassJUI))})}}});var $a=function(a){Array.isArray(a)&&(a=a.join(","));return"string"===typeof a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g, 1704"""):a},kc=!1,zc=",",Ac=".";if(Intl)try{for(var Ha=(new Intl.NumberFormat).formatToParts(100000.1),ra=0;ra<Ha.length;ra++)"group"===Ha[ra].type?zc=Ha[ra].value:"decimal"===Ha[ra].type&&(Ac=Ha[ra].value)}catch(a){}u.datetime=function(a,b){var c="datetime-detect-"+a;b||(b="en");u.ext.type.order[c]||(u.ext.type.detect.unshift(function(d){var e=Za(d,a,b);return""===d||e?c:!1}),u.ext.type.order[c+"-pre"]=function(d){return Za(d,a,b)||0})};u.render={date:wb("toLocaleDateString"),datetime:wb("toLocaleString"), 1705time:wb("toLocaleTimeString"),number:function(a,b,c,d,e){if(null===a||a===q)a=zc;if(null===b||b===q)b=Ac;return{display:function(h){if("number"!==typeof h&&"string"!==typeof h||""===h||null===h)return h;var f=0>h?"-":"",g=parseFloat(h);if(isNaN(g))return $a(h);g=g.toFixed(c);h=Math.abs(g);g=parseInt(h,10);h=c?b+(h-g).toFixed(c).substring(2):"";0===g&&0===parseFloat(h)&&(f="");return f+(d||"")+g.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+h+(e||"")}}},text:function(){return{display:$a,filter:$a}}}; 1706l.extend(u.ext.internal,{_fnExternApiFunc:lc,_fnBuildAjax:Qa,_fnAjaxUpdate:Kb,_fnAjaxParameters:Tb,_fnAjaxUpdateDraw:Ub,_fnAjaxDataSrc:za,_fnAddColumn:cb,_fnColumnOptions:Ia,_fnAdjustColumnSizing:sa,_fnVisibleToColumnIndex:ta,_fnColumnIndexToVisible:ua,_fnVisbleColumns:na,_fnGetColumns:Ka,_fnColumnTypes:eb,_fnApplyColumnDefs:Hb,_fnHungarianMap:E,_fnCamelToHungarian:P,_fnLanguageCompat:la,_fnBrowserDetect:Fb,_fnAddData:ia,_fnAddTr:La,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==q?b._DT_RowIndex: 1707null},_fnNodeToColumnIndex:function(a,b,c){return l.inArray(c,a.aoData[b].anCells)},_fnGetCellData:T,_fnSetCellData:Ib,_fnSplitObjNotation:hb,_fnGetObjectDataFn:ma,_fnSetObjectDataFn:ha,_fnGetDataMaster:ib,_fnClearTable:Ma,_fnDeleteIndex:Na,_fnInvalidate:va,_fnGetRowElements:gb,_fnCreateTr:fb,_fnBuildHead:Jb,_fnDrawHead:xa,_fnDraw:ja,_fnReDraw:ka,_fnAddOptionsHtml:Mb,_fnDetectHeader:wa,_fnGetUniqueThs:Pa,_fnFeatureHtmlFilter:Ob,_fnFilterComplete:ya,_fnFilterCustom:Xb,_fnFilterColumn:Wb,_fnFilter:Vb, 1708_fnFilterCreateSearch:nb,_fnEscapeRegex:ob,_fnFilterData:Yb,_fnFeatureHtmlInfo:Rb,_fnUpdateInfo:ac,_fnInfoMacros:bc,_fnInitialise:Aa,_fnInitComplete:Ra,_fnLengthChange:pb,_fnFeatureHtmlLength:Nb,_fnFeatureHtmlPaginate:Sb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:Pb,_fnProcessingDisplay:V,_fnFeatureHtmlTable:Qb,_fnScrollDraw:Ja,_fnApplyToChildren:da,_fnCalculateColumnWidths:db,_fnThrottle:mb,_fnConvertToWidth:cc,_fnGetWidestNode:dc,_fnGetMaxLenString:ec,_fnStringToCss:K,_fnSortFlatten:oa,_fnSort:Lb, 1709_fnSortAria:gc,_fnSortListener:rb,_fnSortAttachListener:kb,_fnSortingClasses:Va,_fnSortData:fc,_fnSaveState:Da,_fnLoadState:hc,_fnImplementState:tb,_fnSettingsFromNode:Wa,_fnLog:ea,_fnMap:Y,_fnBindAction:sb,_fnCallbackReg:R,_fnCallbackFire:F,_fnLengthOverflow:qb,_fnRenderer:lb,_fnDataSource:Q,_fnRowAttributes:jb,_fnExtend:ub,_fnCalculateEnd:function(){}});l.fn.dataTable=u;u.$=l;l.fn.dataTableSettings=u.settings;l.fn.dataTableExt=u.ext;l.fn.DataTable=function(a){return l(this).dataTable(a).api()}; 1710l.each(u,function(a,b){l.fn.DataTable[a]=b});return u}); 1711; 1712/*! 1713 Copyright 2014-2021 SpryMedia Ltd. 1714 1715 This source file is free software, available under the following license:
1716 MIT license - http://datatables.net/license/mit 1717 1718 This source file is distributed in the hope that it will be useful, but 1719 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 1720 or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. 1721 1722 For details please refer to: http://www.datatables.net 1723 Responsive 2.2.7 1724 2014-2021 SpryMedia Ltd - datatables.net/license 1725*/ 1726var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,k,m){b instanceof String&&(b=String(b));for(var n=b.length,p=0;p<n;p++){var y=b[p];if(k.call(m,y,p,b))return{i:p,v:y}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1; 1727$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,k,m){if(b==Array.prototype||b==Object.prototype)return b;b[k]=m.value;return b};$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var k=0;k<b.length;++k){var m=b[k];if(m&&m.Math==Math)return m}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this); 1728$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,k){var m=$jscomp.propertyToPolyfillSymbol[k];if(null==m)return b[k];m=b[m];return void 0!==m?m:b[k]}; 1729$jscomp.polyfill=function(b,k,m,n){k&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,k,m,n):$jscomp.polyfillUnisolated(b,k,m,n))};$jscomp.polyfillUnisolated=function(b,k,m,n){m=$jscomp.global;b=b.split(".");for(n=0;n<b.length-1;n++){var p=b[n];if(!(p in m))return;m=m[p]}b=b[b.length-1];n=m[b];k=k(n);k!=n&&null!=k&&$jscomp.defineProperty(m,b,{configurable:!0,writable:!0,value:k})}; 1730$jscomp.polyfillIsolated=function(b,k,m,n){var p=b.split(".");b=1===p.length;n=p[0];n=!b&&n in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var y=0;y<p.length-1;y++){var z=p[y];if(!(z in n))return;n=n[z]}p=p[p.length-1];m=$jscomp.IS_SYMBOL_NATIVE&&"es6"===m?n[p]:null;k=k(m);null!=k&&(b?$jscomp.defineProperty($jscomp.polyfills,p,{configurable:!0,writable:!0,value:k}):k!==m&&($jscomp.propertyToPolyfillSymbol[p]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(p):$jscomp.POLYFILL_PREFIX+p,p= 1731$jscomp.propertyToPolyfillSymbol[p],$jscomp.defineProperty(n,p,{configurable:!0,writable:!0,value:k})))};$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(k,m){return $jscomp.findInternal(this,k,m).v}},"es6","es3"); 1732(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(k){return b(k,window,document)}):"object"===typeof exports?module.exports=function(k,m){k||(k=window);m&&m.fn.dataTable||(m=require("datatables.net")(k,m).$);return b(m,k,k.document)}:b(jQuery,window,document)})(function(b,k,m,n){function p(a,c,d){var f=c+"-"+d;if(A[f])return A[f];var g=[];a=a.cell(c,d).node().childNodes;c=0;for(d=a.length;c<d;c++)g.push(a[c]);return A[f]=g}function y(a,c,d){var f=c+"-"+ 1733d;if(A[f]){a=a.cell(c,d).node();d=A[f][0].parentNode.childNodes;c=[];for(var g=0,l=d.length;g<l;g++)c.push(d[g]);d=0;for(g=c.length;d<g;d++)a.appendChild(c[d]);A[f]=n}}var z=b.fn.dataTable,u=function(a,c){if(!z.versionCheck||!z.versionCheck("1.10.10"))throw"DataTables Responsive requires DataTables 1.10.10 or newer";this.s={dt:new z.Api(a),columns:[],current:[]};this.s.dt.settings()[0].responsive||(c&&"string"===typeof c.details?c.details={type:c.details}:c&&!1===c.details?c.details={type:!1}:c&& 1734!0===c.details&&(c.details={type:"inline"}),this.c=b.extend(!0,{},u.defaults,z.defaults.responsive,c),a.responsive=this,this._constructor())};b.extend(u.prototype,{_constructor:function(){var a=this,c=this.s.dt,d=c.settings()[0],f=b(k).innerWidth();c.settings()[0]._responsive=this;b(k).on("resize.dtr orientationchange.dtr",z.util.throttle(function(){var g=b(k).innerWidth();g!==f&&(a._resize(),f=g)}));d.oApi._fnCallbackReg(d,"aoRowCreatedCallback",function(g,l,h){-1!==b.inArray(!1,a.s.current)&&b(">td, >th", 1735g).each(function(e){e=c.column.index("toData",e);!1===a.s.current[e]&&b(this).css("display","none")})});c.on("destroy.dtr",function(){c.off(".dtr");b(c.table().body()).off(".dtr");b(k).off("resize.dtr orientationchange.dtr");c.cells(".dtr-control").nodes().to$().removeClass("dtr-control");b.each(a.s.current,function(g,l){!1===l&&a._setColumnVis(g,!0)})});this.c.breakpoints.sort(function(g,l){return g.width<l.width?1:g.width>l.width?-1:0});this._classLogic();this._resizeAuto();d=this.c.details;!1!== 1736d.type&&(a._detailsInit(),c.on("column-visibility.dtr",function(){a._timer&&clearTimeout(a._timer);a._timer=setTimeout(function(){a._timer=null;a._classLogic();a._resizeAuto();a._resize(!0);a._redrawChildren()},100)}),c.on("draw.dtr",function(){a._redrawChildren()}),b(c.table().node()).addClass("dtr-"+d.type));c.on("column-reorder.dtr",function(g,l,h){a._classLogic();a._resizeAuto();a._resize(!0)});c.on("column-sizing.dtr",function(){a._resizeAuto();a._resize()});c.on("preXhr.dtr",function(){var g= 1737[];c.rows().every(function(){this.child.isShown()&&g.push(this.id(!0))});c.one("draw.dtr",function(){a._resizeAuto();a._resize();c.rows(g).every(function(){a._detailsDisplay(this,!1)})})});c.on("draw.dtr",function(){a._controlClass()}).on("init.dtr",function(g,l,h){"dt"===g.namespace&&(a._resizeAuto(),a._resize(),b.inArray(!1,a.s.current)&&c.columns.adjust())});this._resize()},_columnsVisiblity:function(a){var c=this.s.dt,d=this.s.columns,f,g=d.map(function(t,v){return{columnIdx:v,priority:t.priority}}).sort(function(t, 1738v){return t.priority!==v.priority?t.priority-v.priority:t.columnIdx-v.columnIdx}),l=b.map(d,function(t,v){return!1===c.column(v).visible()?"not-visible":t.auto&&null===t.minWidth?!1:!0===t.auto?"-":-1!==b.inArray(a,t.includeIn)}),h=0;var e=0;for(f=l.length;e<f;e++)!0===l[e]&&(h+=d[e].minWidth);e=c.settings()[0].oScroll;e=e.sY||e.sX?e.iBarWidth:0;h=c.table().container().offsetWidth-e-h;e=0;for(f=l.length;e<f;e++)d[e].control&&(h-=d[e].minWidth);var r=!1;e=0;for(f=g.length;e<f;e++){var q=g[e].columnIdx; 1739"-"===l[q]&&!d[q].control&&d[q].minWidth&&(r||0>h-d[q].minWidth?(r=!0,l[q]=!1):l[q]=!0,h-=d[q].minWidth)}g=!1;e=0;for(f=d.length;e<f;e++)if(!d[e].control&&!d[e].never&&!1===l[e]){g=!0;break}e=0;for(f=d.length;e<f;e++)d[e].control&&(l[e]=g),"not-visible"===l[e]&&(l[e]=!1);-1===b.inArray(!0,l)&&(l[0]=!0);return l},_classLogic:function(){var a=this,c=this.c.breakpoints,d=this.s.dt,f=d.columns().eq(0).map(function(h){var e=this.column(h),r=e.header().className;h=d.settings()[0].aoColumns[h].responsivePriority; 1740e=e.header().getAttribute("data-priority");h===n&&(h=e===n||null===e?1E4:1*e);return{className:r,includeIn:[],auto:!1,control:!1,never:r.match(/\bnever\b/)?!0:!1,priority:h}}),g=function(h,e){h=f[h].includeIn;-1===b.inArray(e,h)&&h.push(e)},l=function(h,e,r,q){if(!r)f[h].includeIn.push(e);else if("max-"===r)for(q=a._find(e).width,e=0,r=c.length;e<r;e++)c[e].width<=q&&g(h,c[e].name);else if("min-"===r)for(q=a._find(e).width,e=0,r=c.length;e<r;e++)c[e].width>=q&&g(h,c[e].name);else if("not-"===r)for(e= 17410,r=c.length;e<r;e++)-1===c[e].name.indexOf(q)&&g(h,c[e].name)};f.each(function(h,e){for(var r=h.className.split(" "),q=!1,t=0,v=r.length;t<v;t++){var B=r[t].trim();if("all"===B){q=!0;h.includeIn=b.map(c,function(w){return w.name});return}if("none"===B||h.never){q=!0;return}
1741if("control"===B||"dtr-control"===B){q=!0;h.control=!0;return}b.each(c,function(w,D){w=D.name.split("-");var x=B.match(new RegExp("(min\\-|max\\-|not\\-)?("+w[0]+")(\\-[_a-zA-Z0-9])?"));x&&(q=!0,x[2]===w[0]&&x[3]==="-"+w[1]?l(e, 1742D.name,x[1],x[2]+x[3]):x[2]!==w[0]||x[3]||l(e,D.name,x[1],x[2]))})}q||(h.auto=!0)});this.s.columns=f},_controlClass:function(){if("inline"===this.c.details.type){var a=this.s.dt,c=b.inArray(!0,this.s.current);a.cells(null,function(d){return d!==c},{page:"current"}).nodes().to$().filter(".dtr-control").removeClass("dtr-control");a.cells(null,c,{page:"current"}).nodes().to$().addClass("dtr-control")}},_detailsDisplay:function(a,c){var d=this,f=this.s.dt,g=this.c.details;if(g&&!1!==g.type){var l=g.display(a, 1743c,function(){return g.renderer(f,a[0],d._detailsObj(a[0]))});!0!==l&&!1!==l||b(f.table().node()).triggerHandler("responsive-display.dt",[f,a,l,c])}},_detailsInit:function(){var a=this,c=this.s.dt,d=this.c.details;"inline"===d.type&&(d.target="td.dtr-control, th.dtr-control");c.on("draw.dtr",function(){a._tabIndexes()});a._tabIndexes();b(c.table().body()).on("keyup.dtr","td, th",function(g){13===g.keyCode&&b(this).data("dtr-keyboard")&&b(this).click()});var f=d.target;d="string"===typeof f?f:"td, th"; 1744if(f!==n||null!==f)b(c.table().body()).on("click.dtr mousedown.dtr mouseup.dtr",d,function(g){if(b(c.table().node()).hasClass("collapsed")&&-1!==b.inArray(b(this).closest("tr").get(0),c.rows().nodes().toArray())){if("number"===typeof f){var l=0>f?c.columns().eq(0).length+f:f;if(c.cell(this).index().column!==l)return}l=c.row(b(this).closest("tr"));"click"===g.type?a._detailsDisplay(l,!1):"mousedown"===g.type?b(this).css("outline","none"):"mouseup"===g.type&&b(this).trigger("blur").css("outline","")}})}, 1745_detailsObj:function(a){var c=this,d=this.s.dt;return b.map(this.s.columns,function(f,g){if(!f.never&&!f.control)return f=d.settings()[0].aoColumns[g],{className:f.sClass,columnIndex:g,data:d.cell(a,g).render(c.c.orthogonal),hidden:d.column(g).visible()&&!c.s.current[g],rowIndex:a,title:null!==f.sTitle?f.sTitle:b(d.column(g).header()).text()}})},_find:function(a){for(var c=this.c.breakpoints,d=0,f=c.length;d<f;d++)if(c[d].name===a)return c[d]},_redrawChildren:function(){var a=this,c=this.s.dt;c.rows({page:"current"}).iterator("row", 1746function(d,f){c.row(f);a._detailsDisplay(c.row(f),!0)})},_resize:function(a){var c=this,d=this.s.dt,f=b(k).innerWidth(),g=this.c.breakpoints,l=g[0].name,h=this.s.columns,e,r=this.s.current.slice();for(e=g.length-1;0<=e;e--)if(f<=g[e].width){l=g[e].name;break}var q=this._columnsVisiblity(l);this.s.current=q;g=!1;e=0;for(f=h.length;e<f;e++)if(!1===q[e]&&!h[e].never&&!h[e].control&&!1===!d.column(e).visible()){g=!0;break}b(d.table().node()).toggleClass("collapsed",g);var t=!1,v=0;d.columns().eq(0).each(function(B, 1747w){!0===q[w]&&v++;if(a||q[w]!==r[w])t=!0,c._setColumnVis(B,q[w])});t&&(this._redrawChildren(),b(d.table().node()).trigger("responsive-resize.dt",[d,this.s.current]),0===d.page.info().recordsDisplay&&b("td",d.table().body()).eq(0).attr("colspan",v));c._controlClass()},_resizeAuto:function(){var a=this.s.dt,c=this.s.columns;if(this.c.auto&&-1!==b.inArray(!0,b.map(c,function(e){return e.auto}))){b.isEmptyObject(A)||b.each(A,function(e){e=e.split("-");y(a,1*e[0],1*e[1])});a.table().node();var d=a.table().node().cloneNode(!1), 1748f=b(a.table().header().cloneNode(!1)).appendTo(d),g=b(a.table().body()).clone(!1,!1).empty().appendTo(d);d.style.width="auto";var l=a.columns().header().filter(function(e){return a.column(e).visible()}).to$().clone(!1).css("display","table-cell").css("width","auto").css("min-width",0);b(g).append(b(a.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");if(g=a.table().footer()){g=b(g.cloneNode(!1)).appendTo(d);var h=a.columns().footer().filter(function(e){return a.column(e).visible()}).to$().clone(!1).css("display", 1749"table-cell");b("<tr/>").append(h).appendTo(g)}b("<tr/>").append(l).appendTo(f);"inline"===this.c.details.type&&b(d).addClass("dtr-inline collapsed");b(d).find("[name]").removeAttr("name");b(d).css("position","relative");d=b("<div/>").css({width:1,height:1,overflow:"hidden",clear:"both"}).append(d);d.insertBefore(a.table().node());l.each(function(e){e=a.column.index("fromVisible",e);c[e].minWidth=this.offsetWidth||0});d.remove()}},_responsiveOnlyHidden:function(){var a=this.s.dt;return b.map(this.s.current, 1750function(c,d){return!1===a.column(d).visible()?!0:c})},_setColumnVis:function(a,c){var d=this.s.dt;c=c?"":"none";b(d.column(a).header()).css("display",c);b(d.column(a).footer()).css("display",c);d.column(a).nodes().to$().css("display",c);b.isEmptyObject(A)||d.cells(null,a).indexes().each(function(f){y(d,f.row,f.column)})},_tabIndexes:function(){var a=this.s.dt,c=a.cells({page:"current"}).nodes().to$(),d=a.settings()[0],f=this.c.details.target;c.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]"); 1751"number"===typeof f?a.cells(null,f,{page:"current"}).nodes().to$().attr("tabIndex",d.iTabIndex).data("dtr-keyboard",1):("td:first-child, th:first-child"===f&&(f=">td:first-child, >th:first-child"),b(f,a.rows({page:"current"}).nodes()).attr("tabIndex",d.iTabIndex).data("dtr-keyboard",1))}});u.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];u.display={childRow:function(a,c,d){if(c){if(b(a.node()).hasClass("parent"))return a.child(d(), 1752"child").show(),!0}else{if(a.child.isShown())return a.child(!1),b(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();b(a.node()).addClass("parent");return!0}},childRowImmediate:function(a,c,d){if(!c&&a.child.isShown()||!a.responsive.hasHidden())return a.child(!1),b(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();b(a.node()).addClass("parent");return!0},modal:function(a){return function(c,d,f){if(d)b("div.dtr-modal-content").empty().append(f());else{var g=function(){l.remove(); 1753b(m).off("keypress.dtr")},l=b('<div class="dtr-modal"/>').append(b('<div class="dtr-modal-display"/>').append(b('<div class="dtr-modal-content"/>').append(f())).append(b('<div class="dtr-modal-close">×</div>').click(function(){g()}))).append(b('<div class="dtr-modal-background"/>').click(function(){g()})).appendTo("body");b(m).on("keyup.dtr",function(h){27===h.keyCode&&(h.stopPropagation(),g())})}a&&a.header&&b("div.dtr-modal-content").prepend("<h2>"+a.header(c)+"</h2>")}}};var A={};u.renderer= 1754{listHiddenNodes:function(){return function(a,c,d){var f=b('<ul data-dtr-index="'+c+'" class="dtr-details"/>'),g=!1;b.each(d,function(l,h){h.hidden&&(b("<li "+(h.className?'class="'+h.className+'"':"")+' data-dtr-index="'+h.columnIndex+'" data-dt-row="'+h.rowIndex+'" data-dt-column="'+h.columnIndex+'"><span class="dtr-title">'+h.title+"</span> </li>").append(b('<span class="dtr-data"/>').append(p(a,h.rowIndex,h.columnIndex))).appendTo(f),g=!0)});return g?f:!1}},listHidden:function(){return function(a, 1755c,d){return(a=b.map(d,function(f){var g=f.className?'class="'+f.className+'"':"";return f.hidden?"<li "+g+' data-dtr-index="'+f.columnIndex+'" data-dt-row="'+f.rowIndex+'" data-dt-column="'+f.columnIndex+'"><span class="dtr-title">'+f.title+'</span> <span class="dtr-data">'+f.data+"</span></li>":""}).join(""))?b('<ul data-dtr-index="'+c+'" class="dtr-details"/>').append(a):!1}},tableAll:function(a){a=b.extend({tableClass:""},a);return function(c,d,f){c=b.map(f,function(g){return"<tr "+(g.className? 1756'class="'+g.className+'"':"")+' data-dt-row="'+g.rowIndex+'" data-dt-column="'+g.columnIndex+'"><td>'+g.title+":</td> <td>"+g.data+"</td></tr>"}).join("");return b('<table class="'+a.tableClass+' dtr-details" width="100%"/>').append(c)}}};u.defaults={breakpoints:u.breakpoints,auto:!0,details:{display:u.display.childRow,renderer:u.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var C=b.fn.dataTable.Api;C.register("responsive()",function(){return this});C.register("responsive.index()", 1757function(a){a=b(a);return{column:a.data("dtr-index"),row:a.parent().data("dtr-index")}});C.register("responsive.rebuild()",function(){return this.iterator("table",function(a){a._responsive&&a._responsive._classLogic()})});C.register("responsive.recalc()",function(){return this.iterator("table",function(a){a._responsive&&(a._responsive._resizeAuto(),a._responsive._resize())})});C.register("responsive.hasHidden()",function(){var a=this.context[0];return a._responsive?-1!==b.inArray(!1,a._responsive._responsiveOnlyHidden()): 1758!1});C.registerPlural("columns().responsiveHidden()","column().responsiveHidden()",function(){return this.iterator("column",function(a,c){return a._responsive?a._responsive._responsiveOnlyHidden()[c]:!1},1)});u.version="2.2.7";b.fn.dataTable.Responsive=u;b.fn.DataTable.Responsive=u;b(m).on("preInit.dt.dtr",function(a,c,d){"dt"===a.namespace&&(b(c.nTable).hasClass("responsive")||b(c.nTable).hasClass("dt-responsive")||c.oInit.responsive||z.defaults.responsive)&&(a=c.oInit.responsive,!1!==a&&new u(c, 1759b.isPlainObject(a)?a:{}))});return u}); 1760; 1761/* jQuery Nice Select - v1.1.0 1762 https://github.com/hernansartorio/jquery-nice-select 1763 Made by Hernán Sartorio */ 1764 1765(function($) { 1766 1767 $.fn.niceSelect = function(method) { 1768 1769 // Methods 1770 if (typeof method == 'string') { 1771 if (method == 'update') { 1772 this.each(function() { 1773 var $select = $(this); 1774 var $dropdown = $(this).next('.nice-select'); 1775 var open = $dropdown.hasClass('open'); 1776 1777 if ($dropdown.length) { 1778 $dropdown.remove(); 1779 create_nice_select($select); 1780 1781 if (open) { 1782 $select.next().trigger('click'); 1783 } 1784 } 1785 }); 1786 } else if (method == 'destroy') { 1787 this.each(function() { 1788 var $select = $(this); 1789 var $dropdown = $(this).next('.nice-select'); 1790 1791 if ($dropdown.length) { 1792 $dropdown.remove(); 1793 $select.css('display', ''); 1794 } 1795 }); 1796 if ($('.nice-select').length == 0) { 1797 $(document).off('.nice_select'); 1798 } 1799 } else { 1800 console.log('Method "' + method + '" does not exist.') 1801 } 1802 return this; 1803 } 1804 1805 // Hide native select 1806 this.hide(); 1807 1808 // Create custom markup 1809 this.each(function() { 1810 var $select = $(this); 1811 1812 if (!$select.next().hasClass('nice-select')) { 1813 create_nice_select($select); 1814 } 1815 }); 1816 1817 function create_nice_select($select) { 1818 $select.after($('<div></div>') 1819 .addClass('nice-select') 1820 .addClass($select.attr('class') || '') 1821 .addClass($select.attr('disabled') ? 'disabled' : '') 1822 .attr('tabindex', $select.attr('disabled') ? null : '0') 1823 .html('<span class="current"></span><ul class="list"></ul>') 1824 ); 1825 1826 var $dropdown = $select.next(); 1827 var $options = $select.find('option'); 1828 var $selected = $select.find('option:selected'); 1829 1830 $dropdown.find('.current').html($selected.data('display') || $selected.text()); 1831 1832 $options.each(function(i) { 1833 var $option = $(this); 1834 var display = $option.data('display'); 1835 1836 $dropdown.find('ul').append($('<li></li>') 1837 .attr('data-value', $option.val()) 1838 .attr('data-display', (display || null)) 1839 .addClass('option' + 1840 ($option.is(':selected') ? ' selected' : '') + 1841 ($option.is(':disabled') ? ' disabled' : '')) 1842 .html($option.text()) 1843 ); 1844 }); 1845 } 1846 1847 /* Event listeners */ 1848 1849 // Unbind existing events in case that the plugin has been initialized before 1850 $(document).off('.nice_select'); 1851 1852 // Open/close 1853 $(document).on('click.nice_select', '.nice-select', function(event) { 1854 var $dropdown = $(this); 1855 1856 $('.nice-select').not($dropdown).removeClass('open'); 1857 $dropdown.toggleClass('open'); 1858 1859 if ($dropdown.hasClass('open')) { 1860 $dropdown.find('.option'); 1861 $dropdown.find('.focus').removeClass('focus'); 1862 $dropdown.find('.selected').addClass('focus'); 1863 } else { 1864 $dropdown.focus(); 1865 } 1866 }); 1867 1868 // Close when clicking outside 1869 $(document).on('click.nice_select', function(event) { 1870 if ($(event.target).closest('.nice-select').length === 0) { 1871 $('.nice-select').removeClass('open').find('.option'); 1872 } 1873 }); 1874 1875 // Option click 1876 $(document).on('click.nice_select', '.nice-select .option:not(.disabled)', function(event) { 1877 var $option = $(this); 1878 var $dropdown = $option.closest('.nice-select'); 1879 1880 $dropdown.find('.selected').removeClass('selected'); 1881 $option.addClass('selected'); 1882 1883 var text = $option.data('display') || $option.text(); 1884 $dropdown.find('.current').text(text); 1885 1886 $dropdown.prev('select').val($option.data('value')).trigger('change'); 1887 }); 1888 1889 // Keyboard events 1890 $(document).on('keydown.nice_select', '.nice-select', function(event) { 1891 var $dropdown = $(this);
1892 var $focused_option = $($dropdown.find('.focus') || $dropdown.find('.list .option.selected')); 1893 1894 // Space or Enter 1895 if (event.keyCode == 32 || event.keyCode == 13) { 1896 if ($dropdown.hasClass('open')) { 1897 $focused_option.trigger('click'); 1898 } else { 1899 $dropdown.trigger('click'); 1900 } 1901 return false; 1902 // Down 1903 } else if (event.keyCode == 40) { 1904 if (!$dropdown.hasClass('open')) { 1905 $dropdown.trigger('click'); 1906 } else { 1907 var $next = $focused_option.nextAll('.option:not(.disabled)').first(); 1908 if ($next.length > 0) { 1909 $dropdown.find('.focus').removeClass('focus'); 1910 $next.addClass('focus'); 1911 } 1912 } 1913 return false; 1914 // Up 1915 } else if (event.keyCode == 38) { 1916 if (!$dropdown.hasClass('open')) { 1917 $dropdown.trigger('click'); 1918 } else { 1919 var $prev = $focused_option.prevAll('.option:not(.disabled)').first(); 1920 if ($prev.length > 0) { 1921 $dropdown.find('.focus').removeClass('focus'); 1922 $prev.addClass('focus'); 1923 } 1924 } 1925 return false; 1926 // Esc 1927 } else if (event.keyCode == 27) { 1928 if ($dropdown.hasClass('open')) { 1929 $dropdown.trigger('click'); 1930 } 1931 // Tab 1932 } else if (event.keyCode == 9) { 1933 if ($dropdown.hasClass('open')) { 1934 return false; 1935 } 1936 } 1937 }); 1938 1939 // Detect CSS pointer-events support, for IE <= 10. From Modernizr. 1940 var style = document.createElement('a').style; 1941 style.cssText = 'pointer-events:auto'; 1942 if (style.pointerEvents !== 'auto') { 1943 $('html').addClass('no-csspointerevents'); 1944 } 1945 1946 return this; 1947 1948 }; 1949 1950}(jQuery));; 1951!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Sweetalert2=t()}(this,function(){"use strict";var q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}}(),r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},a=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},u=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},M=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},t="SweetAlert2:",A=function(e){console.warn(t+" "+e)},H=function(e){console.error(t+" "+e)},n=[],l=function(e){-1===n.indexOf(e)&&(n.push(e),A(e))},I=function(e){return"function"==typeof e?e():e},R=function(e){return"object"===(void 0===e?"undefined":q(e))&&"function"==typeof e.then},e=Object.freeze({cancel:"cancel",backdrop:"overlay",close:"close",esc:"esc",timer:"timer"}),c=function(e){var t={};for(var n in e)t[e[n]]="swal2-"+e[n];return t},D=c(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","toast","toast-shown","fade","show","hide","noanimation","close","title","header","content","actions","confirm","cancel","footer","icon","icon-text","image","input","has-input","file","range","select","radio","checkbox","textarea","inputerror","validationerror","progresssteps","activeprogressstep","progresscircle","progressline","loading","styled","top","top-start","to
1951p-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen"]),E=c(["success","warning","info","question","error"]),d={previousBodyPadding:null},p=function(e,t){return!!e.classList&&e.classList.contains(t)},N=function(e){if(e.focus(),"file"!==e.type){var t=e.value;e.value="",e.value=t}},f=function(e,t,n){e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach(function(t){e.forEach?e.forEach(function(e){n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)}))},W=function(e,t){f(e,t,!0)},P=function(e,t){f(e,t,!1)},z=function(e,t){for(var n=0;n<e.childNodes.length;n++)if(p(e.childNodes[n],t))return e.childNodes[n]},U=function(e){e.style.opacity="",e.style.display=e.id===D.content?"block":"flex"},F=function(e){e.style.opacity="",e.style.display="none"},S=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},K=function(e){return e&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},O=function(e,t){e.style.removeProperty?e.style.removeProperty(t):e.style.removeAttribute(t)},L=function(){return document.body.querySelector("."+D.container)},m=function(e){var t=L();return t?t.querySelector("."+e):null},Z=function(){return m(D.popup)},Q=function(){return Z().querySelectorAll("."+D.icon)},Y=function(){return m(D.title)},$=function(){return m(D.content)},J=function(){return m(D.image)},X=function(){return m(D.progresssteps)},G=function(){return m(D.confirm)},ee=function(){return m(D.cancel)},te=function(){return m(D.actions)},ne=function(){return m(D.footer)},oe=function(){return m(D.close)},re=function(){var e=Array.prototype.slice.call(Z().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(e,t){return e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))<e?1:e<t?-1:0}),t=Array.prototype.slice.call(Z().querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable], audio[controls], video[controls]'));return function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(e.concat(t))},h=function(){return!document.body.classList.contains(D["toast-shown"])},g=function(){return document.body.classList.contains(D["toast-shown"])},v=function(){return"undefined"==typeof window||"undefined"==typeof document},y=('\n <div aria-labelledby="'+D.title+'" aria-describedby="'+D.content+'" class="'+D.popup+'" tabindex="-1">\n <div class="'+D.header+'">\n <ul class="'+D.progresssteps+'"></ul>\n <div class="'+D.icon+" "+E.error+'">\n <span class="swal2-x-mark"><span class="swal2-x-mark-line-left"></span><span class="swal2-x-mark-line-right"></span></span>\n </div>\n <div class="'+D.icon+" "+E.question+'">\n <span class="'+D["icon-text"]+'">?</span>\n </div>\n <div class="'+D.icon+" "+E.warning+'">\n <span class="'+D["icon-text"]+'">!</span>\n </div>\n <div class="'+D.icon+" "+E.info+'">\n <span class="'+D["icon-text"]+'">i</span>\n </div>\n <div class="'+D.icon+" "+E.success+'">\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n </div>\n <img class="'+D.image+'" />\n <h2 class="'+D.title+'" id="'+D.title+'"></h2>\n <button type="button" class="'+D.close+'">×</button>\n </div>\n <div class="'+D.content+'">\n <div id="'+D.content+'"></div>\n <input class="'+D.input+'" />\n <input type="file" class="'+D.file+'" />\n <div class="'+D.range+'">\n <input type="range" />\n <output></output>\n </div>\n <select class="'+D.select+'"></select>\n <div class="'+D.radio+'"></div>\n <label for="'+D.checkbox+'" class="'+D.checkbox+'">\n <input type="checkbox" />\n </label>\n <textarea class="'+D.textarea+'"></textarea>\n <div class="'+D.validationerror+'" id="'+D.validationerror+'"></div>\n </div>\n <div class="'+D.actions+'">\n <button type="button" class="'+D.confirm+'">OK</button>\n <button type="button" class="'+D.cancel+'">Cancel</button>\n </div>\n <div class="'+D.footer+'">\n </div>\n </div>\n').replace(/(^|\n)\s*/g,""),ie=function(e){var t=L();if(t&&(t.parentNode.removeChild(t),P([document.documentElement,document.body],[D["no-backdrop"],D["has-input"],D["toast-shown"]])),!v()){var n=document.createElement("div");n.className=D.container,n.innerHTML=y,("string"==typeof e.target?document.querySelector(e.target):e.target).appendChild(n);var o=Z(),r=$(),i=z(r,D.input),a=z(r,D.file),s=r.querySelector("."+D.range+" input"),u=r.querySelector("."+D.range+" output"),l=z(r,D.select),c=r.querySelector("."+D.checkbox+" input"),d=z(r,D.textarea);o.setAttribute("role",e.toast?"alert":"dialog"),o.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||o.setAttribute("aria-modal","true");var p=void 0,f=function(e){Be.isVisible()&&p!==e.target.value&&Be.resetValidationError(),p=e.target.value};return i.oninput=f,a.onchange=f,l.onchange=f,c.onchange=f,d.oninput=f,s.onin
1951put=function(e){f(e),u.value=s.value},s.onchange=function(e){f(e),s.nextSibling.value=s.value},o}H("SweetAlert2 requires document to initialize")},ae=function(e,t){if(!e)return F(t);if("object"===(void 0===e?"undefined":q(e)))if(t.innerHTML="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0));else e&&(t.innerHTML=e);U(t)},b=function(){if(v())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in t)if(t.hasOwnProperty(n)&&void 0!==e.style[n])return t[n];return!1}(),w=function(){null===d.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(d.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=d.previousBodyPadding+function(){if("ontouchstart"in window||navigator.msMaxTouchPoints)return 0;var e=document.createElement("div");e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}()+"px")},se={},C=function(e,n){var o=L(),t=Z();if(t){null!==e&&"function"==typeof e&&e(t),P(t,D.show),W(t,D.hide);var r=function(){var e,t;g()||(e=window.scrollX,t=window.scrollY,se.restoreFocusTimeout=setTimeout(function(){se.previousActiveElement&&se.previousActiveElement.focus&&(se.previousActiveElement.focus(),se.previousActiveElement=null)},100),void 0!==e&&void 0!==t&&window.scrollTo(e,t),se.keydownTarget.removeEventListener("keydown",se.keydownHandler,{capture:se.keydownListenerCapture}),se.keydownHandlerAdded=!1),o.parentNode&&o.parentNode.removeChild(o),P([document.documentElement,document.body],[D.shown,D["height-auto"],D["no-backdrop"],D["has-input"],D["toast-shown"]]),h()&&(null!==d.previousBodyPadding&&(document.body.style.paddingRight=d.previousBodyPadding,d.previousBodyPadding=null),function(){if(p(document.body,D.iosfix)){var e=parseInt(document.body.style.top,10);P(document.body,D.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}}()),null!==n&&"function"==typeof n&&setTimeout(function(){n()})};b&&!p(t,D.noanimation)?t.addEventListener(b,function e(){t.removeEventListener(b,e),p(t,D.hide)&&r()}):r()}};function k(e){var t=function e(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];if(!(this instanceof e))return new(Function.prototype.bind.apply(e,[null].concat(n)));Object.getPrototypeOf(e).apply(this,n)};return t.prototype=r(Object.create(e.prototype),{constructor:t}),"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}var x={title:"",titleText:"",text:"",html:"",footer:"",type:null,toast:!1,customClass:"",target:"body",backdrop:!0,animation:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:null,confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:null,cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageAlt:"",imageClass:null,timer:null,width:null,padding:null,background:null,input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,grow:!1,position:"center",progressSteps:[],currentProgressStep:null,progressStepsDistance:null,onBeforeOpen:null,onAfterClose:null,onOpen:null,onClose:null,useRejections:!1,expectRejections:!1},B=["useRejections","expectRejections"],T=function(e){return x.hasOwnProperty(e)||"extraParams"===e},j=function(e){return-1!==B.indexOf(e)},ue=function(e){for(var t in e)T(t)||A('Unknown parameter "'+t+'"'),j(t)&&l('The parameter "'+t+'" is deprecated and will be removed in the next major release.')}
1951,_='"setDefaults" & "resetDefaults" methods are deprecated in favor of "mixin" method and will be removed in the next major release. For new projects, use "mixin". For past projects already using "setDefaults", support will be provided through an additional package.',V={};var le=[],ce=function(){var e=Z();e||Be(""),e=Z();var t=te(),n=G(),o=ee();U(t),U(n),W([e,t],D.loading),n.disabled=!0,o.disabled=!0,e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},de=Object.freeze({isValidParameter:T,isDeprecatedParameter:j,argsToParams:function(n){var o={};switch(q(n[0])){case"string":["title","html","type"].forEach(function(e,t){switch(q(n[t])){case"string":o[e]=n[t];break;case"undefined":break;default:H("Unexpected type of "+e+'! Expected "string", got '+q(n[t]))}});break;case"object":r(o,n[0]);break;default:return H('Unexpected type of argument! Expected "string" or "object", got '+q(n[0])),!1}return o},adaptInputValidator:function(n){return function(e,t){return n.call(this,e,t).then(function(){},function(e){return e})}},close:C,closePopup:C,closeModal:C,closeToast:C,isVisible:function(){return!!Z()},clickConfirm:function(){return G().click()},clickCancel:function(){return ee().click()},getPopup:Z,getTitle:Y,getContent:$,getImage:J,getButtonsWrapper:function(){return l("swal.getButtonsWrapper() is deprecated and will be removed in the next major release, use swal.getActions() instead"),m(D.actions)},getActions:te,getConfirmButton:G,getCancelButton:ee,getFooter:ne,isLoading:function(){return Z().hasAttribute("data-loading")},fire:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return new(Function.prototype.bind.apply(this,[null].concat(t)))},mixin:function(n){return k(function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),o(t,[{key:"_main",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_main",this).call(this,r({},n,e))}}]),t}(this))},queue:function(e){var i=this;le=e;var a=function(){le=[],document.body.removeAttribute("data-swal2-queue-step")},s=[];return new Promise(function(r,e){!function t(n,o){n<le.length?(document.body.setAttribute("data-swal2-queue-step",n),i(le[n]).then(function(e){void 0!==e.value?(s.push(e.value),t(n+1,o)):(a(),r({dismiss:e.dismiss}))})):(a(),r({value:s}))}(0)})},getQueueStep:function(){return document.body.getAttribute("data-swal2-queue-step")},insertQueueStep:function(e,t){return t&&t<le.length?le.splice(t,0,e):le.push(e)},deleteQueueStep:function(e){void 0!==le[e]&&le.splice(e,1)},showLoading:ce,enableLoading:ce,getTimerLeft:function(){return se.timeout&&se.timeout.getTimerLeft()}}),pe="function"==typeof Symbol?Symbol:function(){var t=0;function e(e){return"__"+e+"_"+Math.floor(1e9*Math.random())+"_"+ ++t+"__"}return e.iterator=e("Symbol.iterator"),e}(),fe="function"==typeof WeakMap?WeakMap:function(n,o,t){function e(){o(this,n,{value:pe("WeakMap")})}return e.prototype={delete:function(e){delete e[this[n]]},get:function(e){return e[this[n]]},has:function(e){return t.call(e,this[n])},set:function(e,t){o(e,this[n],{configurable:!0,value:t})}},e}(pe("WeakMap"),Object.defineProperty,{}.hasOwnProperty),me={promise:new fe,innerParams:new fe,domCache:new fe};function he(){var e=me.innerParams.get(this),t=me.domCache.get(this);e.showConfirmButton||(F(t.confirmButton),e.showCancelButton||F(t.actions)),P([t.popup,t.actions],D.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.cancelButton.disabled=!1}var ge=function e(t,n){var o,r,i;s(this,e);var a=n;this.start=function(){i=!0,r=new Date,o=setTimeout(t,a)},this.stop=function(){i=!1,clearTimeout(o),a-=new Date-r},this.getTimerLeft=function(){return i&&(this.stop(),this.start()),a},this.getStateRunning=function(){return i},this.start()},ve={email:function(e,t){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.reject(t&&t.validationMessage?t.validationMessage:"Invalid email address")},url:function(e,t){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/.test(e)?Promise.resolve():Promise.reject(t&&t.validationMessage?t.validationMessage:"Invalid URL")}};var ye=function(e){var t=L(),n=Z();null!==e.onBeforeOpen&&"function"==typeof e.onBeforeOpen&&e.onBeforeOpen(n),e.animation?(W(n,D.show),W(t,D.fade),P(n,D.hide)):P(n,D.fade),U(n),t.style.overflowY="hidden",b&&!p(n,D.noanimation)?n.addEventListener(b,function e(){n.removeEventListener(b,e),t.style.overflowY="auto"}):t.style.overflowY="auto",W([document.documentElement,document.body,t],D.shown),e.heightAuto&&e.backdrop&&!e.toast&&W([document.documentElement,document.body],D["height-auto"]),h()&&(w(),function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!p(document.body,D.iosfix)){var e=document.body.scrollTop;document.body.style.top=-1*e+"px",W(document.body,D.iosfix)}}()),g()||se.previousActiveElement||(se.previousActiveElement=document.activeElement),null!==e.onOpen&&"function"==typeof e.onOpen&&setTimeout(function(){e.onOpen(n)})};
1951var be=Object.freeze({hideLoading:he,disableLoading:he,getInput:function(e){var t=me.innerParams.get(this),n=me.domCache.get(this);if(!(e=e||t.input))return null;switch(e){case"select":case"textarea":case"file":return z(n.content,D[e]);case"checkbox":return n.popup.querySelector("."+D.checkbox+" input");case"radio":return n.popup.querySelector("."+D.radio+" input:checked")||n.popup.querySelector("."+D.radio+" input:first-child");case"range":return n.popup.querySelector("."+D.range+" input");default:return z(n.content,D.input)}},enableButtons:function(){var e=me.domCache.get(this);e.confirmButton.disabled=!1,e.cancelButton.disabled=!1},disableButtons:function(){var e=me.domCache.get(this);e.confirmButton.disabled=!0,e.cancelButton.disabled=!0},enableConfirmButton:function(){me.domCache.get(this).confirmButton.disabled=!1},disableConfirmButton:function(){me.domCache.get(this).confirmButton.disabled=!0},enableInput:function(){var e=this.getInput();if(!e)return!1;if("radio"===e.type)for(var t=e.parentNode.parentNode.querySelectorAll("input"),n=0;n<t.length;n++)t[n].disabled=!1;else e.disabled=!1},disableInput:function(){var e=this.getInput();if(!e)return!1;if(e&&"radio"===e.type)for(var t=e.parentNode.parentNode.querySelectorAll("input"),n=0;n<t.length;n++)t[n].disabled=!0;else e.disabled=!0},showValidationError:function(e){var t=me.domCache.get(this);t.validationError.innerHTML=e;var n=window.getComputedStyle(t.popup);t.validationError.style.marginLeft="-"+n.getPropertyValue("padding-left"),t.validationError.style.marginRight="-"+n.getPropertyValue("padding-right"),U(t.validationError);var o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedBy",D.validationerror),N(o),W(o,D.inputerror))},resetValidationError:function(){var e=me.domCache.get(this);e.validationError&&F(e.validationError);var t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedBy"),P(t,D.inputerror))},_main:function(e){var T=this;ue(e);var j=r({},x,e);!function(r){r.inputValidator||Object.keys(ve).forEach(function(e){r.input===e&&(r.inputValidator=r.expectRejections?ve[e]:Be.adaptInputValidator(ve[e]))}),(!r.target||"string"==typeof r.target&&!document.querySelector(r.target)||"string"!=typeof r.target&&!r.target.appendChild)&&(A('Target parameter is not valid, defaulting to "body"'),r.target="body");var e=void 0,t=Z(),n="string"==typeof r.target?document.querySelector(r.target):r.target;e=t&&n&&t.parentNode!==n.parentNode?ie(r):t||ie(r),r.width&&(e.style.width="number"==typeof r.width?r.width+"px":r.width),r.padding&&(e.style.padding="number"==typeof r.padding?r.padding+"px":r.padding),r.background&&(e.style.background=r.background);for(var o=window.getComputedStyle(e).getPropertyValue("background-color"),i=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),a=0;a<i.length;a++)i[a].style.backgroundColor=o;
1951var s=L(),u=Y(),l=$().querySelector("#"+D.content),c=te(),d=G(),p=ee(),f=oe(),m=ne();if(r.titleText?u.innerText=r.titleText:r.title&&(u.innerHTML=r.title.split("\n").join("<br />")),"string"==typeof r.backdrop?L().style.background=r.backdrop:r.backdrop||W([document.documentElement,document.body],D["no-backdrop"]),r.html?ae(r.html,l):r.text?(l.textContent=r.text,U(l)):F(l),r.position in D?W(s,D[r.position]):(A('The "position" parameter is not valid, defaulting to "center"'),W(s,D.center)),r.grow&&"string"==typeof r.grow){var h="grow-"+r.grow;h in D&&W(s,D[h])}"function"==typeof r.animation&&(r.animation=r.animation.call()),r.showCloseButton?(f.setAttribute("aria-label",r.closeButtonAriaLabel),U(f)):F(f),e.className=D.popup,r.toast?(W([document.documentElement,document.body],D["toast-shown"]),W(e,D.toast)):W(e,D.modal),r.customClass&&W(e,r.customClass);var g=X(),v=parseInt(null===r.currentProgressStep?Be.getQueueStep():r.currentProgressStep,10);r.progressSteps&&r.progressSteps.length?(U(g),S(g),v>=r.progressSteps.length&&A("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),r.progressSteps.forEach(function(e,t){var n=document.createElement("li");if(W(n,D.progresscircle),n.innerHTML=e,t===v&&W(n,D.activeprogressstep),g.appendChild(n),t!==r.progressSteps.length-1){var o=document.createElement("li");W(o,D.progressline),r.progressStepsDistance&&(o.style.width=r.progressStepsDistance),g.appendChild(o)}})):F(g);for(var y=Q(),b=0;b<y.length;b++)F(y[b]);if(r.type){var w=!1;for(var C in E)if(r.type===C){w=!0;break}if(!w)return H("Unknown alert type: "+r.type);var k=e.querySelector("."+D.icon+"."+E[r.type]);U(k),r.animation&&W(k,"swal2-animate-"+r.type+"-icon")}var x=J();if(r.imageUrl?(x.setAttribute("src",r.imageUrl),x.setAttribute("alt",r.imageAlt),U(x),r.imageWidth?x.setAttribute("width",r.imageWidth):x.removeAttribute("width"),r.imageHeight?x.setAttribute("height",r.imageHeight):x.removeAttribute("height"),x.className=D.image,r.imageClass&&W(x,r.imageClass)):F(x),r.showCancelButton?p.style.display="inline-block":F(p),r.showConfirmButton?O(d,"display"):F(d),r.showConfirmButton||r.showCancelButton?U(c):F(c),d.innerHTML=r.confirmButtonText,p.innerHTML=r.cancelButtonText,d.setAttribute("aria-label",r.confirmButtonAriaLabel),p.setAttribute("aria-label",r.cancelButtonAriaLabel),d.className=D.confirm,W(d,r.confirmButtonClass),p.className=D.cancel,W(p,r.cancelButtonClass),r.buttonsStyling){W([d,p],D.styled),r.confirmButtonColor&&(d.style.backgroundColor=r.confirmButtonColor),r.cancelButtonColor&&(p.style.backgroundColor=r.cancelButtonColor);var B=window.getComputedStyle(d).getPropertyValue("background-color");d.style.borderLeftColor=B,d.style.borderRightColor=B}else P([d,p],D.styled),d.style.backgroundColor=d.style.borderLeftColor=d.style.borderRightColor="",p.style.backgroundColor=p.style.borderLeftColor=p.style.borderRightColor="";ae(r.footer,m),!0===r.animation?P(e,D.noanimation):W(e,D.noanimation),r.showLoaderOnConfirm&&!r.preConfirm&&A("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request")}(j),Object.freeze(j),me.innerParams.set(this,j),se.timeout&&(se.timeout.stop(),delete se.timeout),clearTimeout(se.restoreFocusTimeout);var _={popup:Z(),container:L(),content:$(),actions:te(),confirmButton:G(),cancelButton:ee(),closeButton:oe(),validationError:m(D.validationerror),progressSteps:X()};me.domCache.set(this,_);var V=this.constructor;return new Promise(function(t,n){var o=function(e){V.closePopup(j.onClose,j.onAfterClose),j.useRejections?t(e):t({value:e})},l=function(e){V.closePopup(j.onClose,j.onAfterClose),j.useRejections?n(e):t({dismiss:e})},c=function(e){V.closePopup(j.onClose,j.onAfterClose),n(e)};j.timer&&(se.timeout=new ge(function(){l("timer"),delete se.timeout},j.timer)),j.input&&setTimeout(function(){var e=T.getInput();e&&N(e)},0);for(var d=function(t){if(j.showLoaderOnConfirm&&V.showLoading(),j.preConfirm){T.resetValidationError();var e=Promise.resolve().then(function(){return j.preConfirm(t,j.extraParams)});j.expectRejections?e.then(function(e){return o(e||t)}
1951,function(e){T.hideLoading(),e&&T.showValidationError(e)}):e.then(function(e){K(_.validationError)||!1===e?T.hideLoading():o(e||t)},function(e){return c(e)})}else o(t)},e=function(e){var t=e||window.event,n=t.target||t.srcElement,o=_.confirmButton,r=_.cancelButton,i=o&&(o===n||o.contains(n)),a=r&&(r===n||r.contains(n));switch(t.type){case"click":if(i&&V.isVisible())if(T.disableButtons(),j.input){var s=function(){var e=T.getInput();if(!e)return null;switch(j.input){case"checkbox":return e.checked?1:0;case"radio":return e.checked?e.value:null;case"file":return e.files.length?e.files[0]:null;default:return j.inputAutoTrim?e.value.trim():e.value}}();if(j.inputValidator){T.disableInput();var u=Promise.resolve().then(function(){return j.inputValidator(s,j.extraParams)});j.expectRejections?u.then(function(){T.enableButtons(),T.enableInput(),d(s)},function(e){T.enableButtons(),T.enableInput(),e&&T.showValidationError(e)}):u.then(function(e){T.enableButtons(),T.enableInput(),e?T.showValidationError(e):d(s)},function(e){return c(e)})}else d(s)}else d(!0);else a&&V.isVisible()&&(T.disableButtons(),l(V.DismissReason.cancel))}},r=_.popup.querySelectorAll("button"),i=0;i<r.length;i++)r[i].onclick=e,r[i].onmouseover=e,r[i].onmouseout=e,r[i].onmousedown=e;if(_.closeButton.onclick=function(){l(V.DismissReason.close)},j.toast)_.popup.onclick=function(e){j.showConfirmButton||j.showCancelButton||j.showCloseButton||j.input||(V.closePopup(j.onClose,j.onAfterClose),l(V.DismissReason.close))};else{var a=!1;_.popup.onmousedown=function(){_.container.onmouseup=function(e){_.container.onmouseup=void 0,e.target===_.container&&(a=!0)}},_.container.onmousedown=function(){_.popup.onmouseup=function(e){_.popup.onmouseup=void 0,(e.target===_.popup||_.popup.contains(e.target))&&(a=!0)}},_.container.onclick=function(e){a?a=!1:e.target===_.container&&I(j.allowOutsideClick)&&l(V.DismissReason.backdrop)}}j.reverseButtons?_.confirmButton.parentNode.insertBefore(_.cancelButton,_.confirmButton):_.confirmButton.parentNode.insertBefore(_.confirmButton,_.cancelButton);var s=function(e,t){for(var n=re(j.focusCancel),o=0;o<n.length;o++){(e+=t)===n.length?e=0:-1===e&&(e=n.length-1);var r=n[e];if(K(r))return r.focus()}_.popup.focus()};se.keydownHandlerAdded&&(se.keydownTarget.removeEventListener("keydown",se.keydownHandler,{capture:se.keydownListenerCapture}),se.keydownHandlerAdded=!1),j.toast||(se.keydownHandler=function(e){return function(e,t){if(t.stopKeydownPropagation&&e.stopPropagation(),"Enter"!==e.key||e.isComposing)if("Tab"===e.key){for(var n=e.target||e.srcElement,o=re(t.focusCancel),r=-1,i=0;i<o.length;i++)if(n===o[i]){r=i;break}e.shiftKey?s(r,-1):s(r,1),e.stopPropagation(),e.preventDefault()}else-1!==["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"].indexOf(e.key)?document.activeElement===_.confirmButton&&K(_.cancelButton)?_.cancelButton.focus():document.activeElement===_.cancelButton&&K(_.confirmButton)&&_.confirmButton.focus():"Escape"!==e.key&&"Esc"!==e.key||!0!==I(t.allowEscapeKey)||l(V.DismissReason.esc);else if(e.target&&T.getInput()&&e.target.outerHTML===T.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(t.input))return;V.clickConfirm(),e.preventDefault()}}(e,j)},se.keydownTarget=j.keydownListenerCapture?window:_.popup,se.keydownListenerCapture=j.keydownListenerCapture,se.keydownTarget.addEventListener("keydown",se.keydownHandler,{capture:se.keydownListenerCapture}),se.keydownHandlerAdded=!0),T.enableButtons(),T.hideLoading(),T.resetValidationError(),j.input&&W(document.body,D["has-input"]);for(var u=["input","file","range","select","radio","checkbox","textarea"],p=void 0,f=0;f<u.length;f++){var m=D[u[f]],h=z(_.content,m);if(p=T.getInput(u[f])){for(var g in p.attributes)if(p.attributes.hasOwnProperty(g)){var v=p.attributes[g].name;"type"!==v&&"value"!==v&&p.removeAttribute(v)}for(var y in j.inputAttributes)p.setAttribute(y,j.inputAttributes[y])}h.className=m,j.inputClass&&W(h,j.inputClass),F(h)}var b=void 0;switch(j.input){case"text":case"email":case"password":case"number":case"tel":case"url":(p=z(_.content,D.input)).value=j.inputValue,p.placeholder=j.inputPlaceholder,p.type=j.input,U(p);break;case"file":(p=z(_.content,D.file)).placeholder=j.inputPlaceholder,p.type=j.input,U(p);break;case"range":var w=z(_.content,D.range),C=w.querySelector("input"),k=w.querySelector("output");C.value=j.inputValue,C.type=j.input,k.value=j.inputValue,U(w);break;case"select":var x=z(_.content,D.select);if(x.innerHTML="",j.inputPlaceholder){var B=document.createElement("option");B.innerHTML=j.inputPlaceholder,B.value="",B.disabled=!0,B.selected=!0,x.appendChild(B)}b=function(e){e.forEach(function(e){var t=M(e,2),n=t[0],o=t[1],r=document.createElement("option");r.value=n,r.innerHTML=o,j.inputValue.toString()===n.toString()&&(r.selected=!0),x.appendChild(r)}),U(x),x.focus()};break;case"radio":var A=z(_.content,D.radio);A.innerHTML="",b=function(e){e.forEach(function(e){var t=M(e,2),n=t[0],o=t[1],r=document.createElement("input"),i=document.createElement("label");r.type="radio",r.name=D.radio,r.value=n,j.inputValue.toString()===n.toString()&&(r.checked=!0),i.innerHTML=o,i.insertBefore(r,i.firstChild),A.appendChild(i)}),U(A);var t=A.querySelectorAll("input");t.length&&t[0].focus()};break;case"checkbox":var E=z(_.content,D.checkbox),P=T.getInput("checkbox");P.type="checkbox",P.value=1,P.id=D.checkbox,P.checked=Boolean(j.inputValue);var S=E.getElementsByTagName("span");S.length&&E.removeChild(S[0]),(S=document.createElement("span")).innerHTML=j.inputPlaceholder,E.appendChild(S),U(E);break;case"textarea":var O=z(_.content,D.textarea);O.value=j.inputValue,O.placeholder=j.inputPlaceholder,U(O);break;case null:break;default:H('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'+j.input+'"')}if("select"===j.input||"radio"===j.input){var L=function(e){return b((t=e,n=[],"undefined"!=typeof Map&&t instanceof Map?t.forEach(function(e,t){n.push([t,e])}):Object.keys(t).forEach(function(e){n.push([e,t[e]])}),n));var t,n};R(j.inputOptions)?(V.showLoading(),j.inputOptions.then(function(e){T.hideL
1951oading(),L(e)})):"object"===q(j.inputOptions)?L(j.inputOptions):H("Unexpected type of inputOptions! Expected object, Map or Promise, got "+q(j.inputOptions))}else-1!==["text","email","number","tel","textarea"].indexOf(j.input)&&R(j.inputValue)&&(V.showLoading(),F(p),j.inputValue.then(function(e){p.value="number"===j.input?parseFloat(e)||0:e+"",U(p),T.hideLoading()}).catch(function(e){H("Error in inputValue promise: "+e),p.value="",U(p),T.hideLoading()}));ye(j),j.toast||(I(j.allowEnterKey)?j.focusCancel&&K(_.cancelButton)?_.cancelButton.focus():j.focusConfirm&&K(_.confirmButton)?_.confirmButton.focus():s(-1,1):document.activeElement&&document.activeElement.blur()),_.container.scrollTop=0})}}),we=void 0;function Ce(){if("undefined"!=typeof window){"undefined"==typeof Promise&&H("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)");for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(void 0===t[0])return H("SweetAlert2 expects at least 1 attribute!"),!1;we=this;var o=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0}});var r=this._main(this.params);me.promise.set(this,r)}}Ce.prototype.then=function(e,t){return me.promise.get(this).then(e,t)},Ce.prototype.catch=function(e){return me.promise.get(this).catch(e)},Ce.prototype.finally=function(e){return me.promise.get(this).finally(e)},r(Ce.prototype,be),r(Ce,de),Object.keys(be).forEach(function(t){Ce[t]=function(){var e;if(we)return(e=we)[t].apply(e,arguments)}}),Ce.DismissReason=e,Ce.noop=function(){},Ce.version="7.24.4";var ke,xe,Be=k((ke=Ce,xe=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,ke),o(t,[{key:"_main",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_main",this).call(this,r({},V,e))}}],[{key:"setDefaults",value:function(t){if(l(_),!t||"object"!==(void 0===t?"undefined":q(t)))throw new TypeError("SweetAlert2: The argument for setDefaults() is required and has to be a object");ue(t),Object.keys(t).forEach(function(e){ke.isValidParameter(e)&&(V[e]=t[e])})}},{key:"resetDefaults",value:function(){l(_),V={}}}]),t}(),"undefined"!=typeof window&&"object"===q(window._swalDefaults)&&xe.setDefaults(window._swalDefaults),xe));return Be.default=Be}),"undefined"!=typeof window&&window.Sweetalert2&&(window.swal=window.sweetAlert=window.Swal=window.SweetAlert=window.Sweetalert2); 1952"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,"@-webkit-keyframes swal2-show{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes swal2-show{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.875em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;
1952left:.875em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}
195250%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}80%{margin-top:-.375em;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{margin-top:0;-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}50%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}80%{margin-top:-.375em;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{margin-top:0;-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}body.swal2-toast-shown.swal2-has-input>.swal2-container>.swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-shown.swal2-has-input>.swal2-container>.swal2-toast .swal2-actions{flex:1;align-self:stretch;justify-content:flex-end;height:2.2em}body.swal2-toast-shown.swal2-has-input>.swal2-container>.swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-shown.swal2-has-input>.swal2-container>.swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-shown.swal2-has-input>.swal2-container>.swal2-toast .swal2-validationerror{font-size:1em}body.swal2-toast-shown>.swal2-container{position:fixed;background-color:transparent}body.swal2-toast-shown>.swal2-container.swal2-shown{background-color:transparent}body.swal2-toast-shown>.swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-toast-shown>.swal2-container.swal2-top-end,body.swal2-toast-shown>.swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown>.swal2-container.swal2-top-left,body.swal2-toast-shown>.swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown>.swal2-container.swal2-center-left,body.swal2-toast-shown>.swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-toast-shown>.swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.swal2-toast-shown>.swal2-container.swal2-center-end,body.swal2-toast-shown>.swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-toast-shown>.swal2-container.swal2-bottom-left,body.swal2-toast-shown>.swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown>.swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-toast-shown>.swal2-container.swal2-bottom-end,body.swal2-toast-shown>.swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}.swal2-popup.swal2-toast{flex-direction:row;align-items:center;width:auto;padding:.625em;box-shadow:0 0 .625em #d9d9d9;overflow-y:hidden}.swal2-popup.swal2-toast .swal2-header{flex-direction:row}.swal2-popup.swal2-toast .swal2-title{justify-content:flex-start;margin:0 .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-close{position:initial}.swal2-popup.swal2-toast .swal2-content{justify-content:flex-start;font-size:1em}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin:0}.swal2-popup.swal2-toast .swal2-icon-text{font-size:2em;font-weight:700;line-height:1em}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{height:auto;margin:0 .3125em}.swal2-popup.swal2-toast .swal2-styled{margin:0 .3125em;padding:.3125em .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 .0625em #fff,0 0 0 .125em rgba(50,100,150,.4)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:2em;height:2.8125em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.25em;
1952left:-.9375em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:2em 2em;transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;-webkit-transform-origin:0 2em;transform-origin:0 2em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:showSweetToast .5s;animation:showSweetToast .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:hideSweetToast .2s forwards;animation:hideSweetToast .2s forwards}.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-tip{-webkit-animation:animate-toast-success-tip .75s;animation:animate-toast-success-tip .75s}.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-long{-webkit-animation:animate-toast-success-long .75s;animation:animate-toast-success-long .75s}@-webkit-keyframes showSweetToast{0%{-webkit-transform:translateY(-.625em) rotateZ(2deg);transform:translateY(-.625em) rotateZ(2deg);opacity:0}
195233%{-webkit-transform:translateY(0) rotateZ(-2deg);transform:translateY(0) rotateZ(-2deg);opacity:.5}66%{-webkit-transform:translateY(.3125em) rotateZ(2deg);transform:translateY(.3125em) rotateZ(2deg);opacity:.7}100%{-webkit-transform:translateY(0) rotateZ(0);transform:translateY(0) rotateZ(0);opacity:1}}@keyframes showSweetToast{0%{-webkit-transform:translateY(-.625em) rotateZ(2deg);transform:translateY(-.625em) rotateZ(2deg);opacity:0}33%{-webkit-transform:translateY(0) rotateZ(-2deg);transform:translateY(0) rotateZ(-2deg);opacity:.5}66%{-webkit-transform:translateY(.3125em) rotateZ(2deg);transform:translateY(.3125em) rotateZ(2deg);opacity:.7}100%{-webkit-transform:translateY(0) rotateZ(0);transform:translateY(0) rotateZ(0);opacity:1}}@-webkit-keyframes hideSweetToast{0%{opacity:1}33%{opacity:.5}100%{-webkit-transform:rotateZ(1deg);transform:rotateZ(1deg);opacity:0}}@keyframes hideSweetToast{0%{opacity:1}33%{opacity:.5}100%{-webkit-transform:rotateZ(1deg);transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes animate-toast-success-tip{0%{top:.5625em;
1952left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes animate-toast-success-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes animate-toast-success-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes animate-toast-success-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-shown{top:auto;right:auto;bottom:auto;left:auto;background-color:transparent}body.swal2-no-backdrop .swal2-shown>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-shown.swal2-top{top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-top-left,body.swal2-no-backdrop .swal2-shown.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-shown.swal2-top-end,body.swal2-no-backdrop .swal2-shown.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-shown.swal2-center{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-shown.swal2-center-left,body.swal2-no-backdrop .swal2-shown.swal2-center-start{top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-center-end,body.swal2-no-backdrop .swal2-shown.swal2-center-right{top:50%;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-bottom{bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-bottom-left,body.swal2-no-backdrop .swal2-shown.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-shown.swal2-bottom-end,body.swal2-no-backdrop .swal2-shown.swal2-bottom-right{right:0;bottom:0}.swal2-container{display:flex;position:fixed;top:0;right:0;bottom:0;left:0;flex-direction:row;align-items:center;justify-content:center;padding:10px;background-color:transparent;z-index:1060;overflow-x:hidden;-webkit-overflow-scrolling:touch}.swal2-container.swal2-top{align-items:flex-start}.swal2-container.swal2-top-left,.swal2-container.swal2-top-start{align-items:flex-start;justify-content:flex-start}.swal2-container.swal2-top-end,.swal2-container.swal2-top-right{align-items:flex-start;justify-content:flex-end}.swal2-container.swal2-center{align-items:center}.swal2-container.swal2-center-left,.swal2-container.swal2-center-start{align-items:center;justify-content:flex-start}.swal2-container.swal2-center-end,.swal2-container.swal2-center-right{align-items:center;justify-content:flex-end}.swal2-container.swal2-bottom{align-items:flex-end}.swal2-container.swal2-bottom-left,.swal2-container.swal2-bottom-start{align-items:flex-end;justify-content:flex-start}.swal2-container.swal2-bottom-end,.swal2-container.swal2-bottom-right{align-items:flex-end;justify-content:flex-end}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not
1952(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-container.swal2-fade{transition:background-color .1s}.swal2-container.swal2-shown{background-color:rgba(0,0,0,.4)}.swal2-popup{display:none;position:relative;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border-radius:.3125em;background:#fff;font-family:inherit;font-size:1rem;box-sizing:border-box}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-popup .swal2-header{display:flex;flex-direction:column;align-items:center}.swal2-popup .swal2-title{display:block;position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-popup .swal2-actions{align-items:center;justify-content:center;margin:1.25em auto 0}.swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-confirm{width:2.5em;height:2.5em;margin:.46875em;padding:0;border:.25em solid transparent;border-radius:100%;border-color:transparent;background-color:transparent!important;color:transparent;cursor:default;box-sizing:border-box;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-cancel{margin-right:30px;margin-left:30px}.swal2-popup .swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after{display:inline-block;width:15px;height:15px;margin-left:5px;border:3px solid #999;border-radius:50%;border-right-color:transparent;box-shadow:1px 1px 1px #fff;content:'';-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal}.swal2-popup .swal2-styled{margin:0 .3125em;padding:.625em 2em;font-weight:500;box-shadow:none}.swal2-popup .swal2-styled:not([disabled]){cursor:pointer}.swal2-popup .swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#3085d6;color:#fff;font-size:1.0625em}.swal2-popup .swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#aaa;color:#fff;font-size:1.0625em}.swal2-popup .swal2-styled:focus{outline:0;box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(50,100,150,.4)}.swal2-popup .swal2-styled::-moz-focus-inner{border:0}.swal2-popup .swal2-footer{justify-content:center;margin:1.25em 0 0;padding-top:1em;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-popup .swal2-image{max-width:100%;margin:1.25em auto}.swal2-popup .swal2-close{position:absolute;top:0;right:0;justify-content:center;width:1.2em;height:1.2em;padding:0;transition:color .1s ease-out;border:none;border-radius:0;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer;overflow:hidden}.swal2-popup .swal2-close:hover{-webkit-transform:none;transform:none;color:#f27474}.swal2-popup>.swal2-checkbox,.swal2-popup>.swal2-file,.swal2-popup>.swal2-input,.swal2-popup>.swal2-radio,.swal2-popup>.swal2-select,.swal2-popup>.swal2-textarea{display:none}.swal2-popup .swal2-content{justify-content:center;margin:0;padding:0;color:#545454;font-size:1.125em;font-weight:300;line-height:normal;word-wrap:break-word}.swal2-popup #swal2-content{text-align:center}.swal2-popup .swal2-checkbox,.swal2-popup .swal2-file,.swal2-popup .swal2-input,.swal2-popup .swal2-radio,.swal2-popup .swal2-select,.swal2-popup .swal2-textarea{margin:1em auto}.swal2-popup .swal2-file,.swal2-popup .swal2-input,.swal2-popup .swal2-textarea{width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;font-size:1.125em;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);box-sizing:border-box}.swal2-popup .swal2-file.swal2-inputerror,.swal2-popup .swal2-input.swal2-inputerror,.swal2-popup .swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-popup .swal2-file:focus,.swal2-popup .swal2-input:focus,.swal2-popup .swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 3px #c4e6f5}.swal2-popup .swal2-file::-webkit-input-placeholder,.swal2-popup .swal2-input::-webkit-input-placeholder,.swal2-popup .swal2-textarea::-webkit-input-placeholder{color:#ccc}.swal2-popup .swal2-file:-ms-input-placeholder,.swal2-popup .swal2-input:-ms-input-placeholder,.swal2-popup .swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-popup .swal2-file::-ms-input-placeholder,.swal2-popup .swal2-input::-ms-input-placeholder,.swal2-popup .swal2-textarea::-ms-input-placeholder{color:#ccc}.swal2-popup .swal2-file::placeholder,.swal2-popup .swal2-input::placeholder,.swal2-popup .swal2-textarea::placeholder{color:#ccc}.swal2-popup .swal2-range input{width:80%}.swal2-popup .swal2-range output{width:20%;font-weight:600;text-align:center}.swal2-popup .swal2-range input,.swal2-popup .swal2-range output{height:2.625em;margin:1em auto;padding:0;font-size:1.125em;line-height:2.625em}.swal2-popup .swal2-input{height:2.625em;padding:.75em}.swal2-popup .swal2-input[type=number]{max-width:10em}.swal2-popup .swal2-file{font-size:1.125em}.swal2-popup .swal2-textarea{height:6.75em;padding:.75em}.swal2-popup .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;color:#545454;font-size:1.125em}.swal2-popup .swal2-checkbox,.swal2-popup .swal2-radio{align-items:center;justify-content:center}.swal2-popup .swal2-checkbox label,.swal2-popup .swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-popup .swal2-checkbox input,.swal2-popup .swal2-radio input{margin:0 .4em}.swal2-popup .swal2-validationerror{display:none;align-items:center;justify-content:center;padding:.625em;background:#f0f0f0;color:#666;font-size:1em;font-weight:300;overflow:hidden}.swal2-popup .swal2-validationerror::before{display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center;content:'!';zoom:normal}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-moz-document url-prefix(){.swal2-close:focus{outline:2px solid rgba(50,100,150,.4)}}.swal2-icon{position:relative;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;line-height:5em;cursor:default;box-sizing:content-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;zoom:normal}.swal2-icon-text{font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:3.75em 3.75em;transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 3.75em;transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;top:-.25em;
1952left:-.25em;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%;z-index:2;box-sizing:content-box}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;top:.5em;left:1.625em;width:.4375em;height:5.625em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);z-index:1}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;height:.3125em;border-radius:.125em;background-color:#a5dc86;z-index:2}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.875em;width:1.5625em;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-progresssteps{align-items:center;margin:0 0 1.25em;padding:0;font-weight:600}.swal2-progresssteps li{display:inline-block;position:relative}.swal2-progresssteps .swal2-progresscircle{width:2em;height:2em;border-radius:2em;background:#3085d6;color:#fff;line-height:2em;text-align:center;z-index:20}.swal2-progresssteps .swal2-progresscircle:first-child{margin-left:0}.swal2-progresssteps .swal2-progresscircle:last-child{margin-right:0}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep{background:#3085d6}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep~.swal2-progresscircle{background:#add8e6}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep~.swal2-progressline{background:#add8e6}.swal2-progresssteps .swal2-progressline{width:2.5em;height:.4em;margin:0 -1px;background:#3085d6;z-index:10}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-show.swal2-noanimation{-webkit-animation:none;animation:none}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-hide.swal2-noanimation{-webkit-animation:none;animation:none}[dir=rtl] .swal2-close{right:auto;left:0}.swal2-animate-success-icon .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-animate-success-icon .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-animate-success-icon .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-animate-error-icon{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-animate-error-icon .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}@-webkit-keyframes swal2-rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}");; 1953!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(d){"use strict";var s,l=window.Slick||{};s=0,(l=function(i,e){var t,o=this;o.defaults={adaptiveHeight:!1,appendArrows:d(i),appendDots:d(i),arrows:!0,arrowsPlacement:null,asNavFor:null,prevArrow:'<button class="slick-prev" type="button"><span class="slick-prev-icon" aria-hidden="true"></span><span class="slick-sr-only">Previous</span></button>',nextArrow:'<button class="slick-next" type="button"><span class="slick-next-icon" aria-hidden="true"></span><span class="slick-sr-only">Next</span></button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(i,e){return d('<button type="button"><span class="slick-dot-icon" aria-hidden="true"></span><span class="slick-sr-only">Go to slide '+(e+1)+"</span></button>")},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,infinite:!0,initialSlide:0,instructionsText:null,lazyLoad:"ondemand",mobileFirst:!1,playIcon:'<span class="slick-play-icon" aria-hidden="true"></span>',pauseIcon:'<span class="slick-pause-icon" aria-hidden="true"></span>',pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,regionLabel:"carousel",respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useAutoplayToggleButton:!0,useCSS:!0,useGroupRole:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},o.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,$instructionsText:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$pauseButton:null,$pauseIcon:null,$playIcon:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,
vendor: 6,685 bytes, line 1953
1953sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},d.extend(o,o.initials),o.activeBreakpoint=null,o.animType=null,o.animProp=null,o.breakpoints=[],o.breakpointSettings=[],o.cssTransitions=!1,o.focussed=!1,o.interrupted=!1,o.hidden="hidden",o.paused=!0,o.positionProp=null,o.respondTo=null,o.rowCount=1,o.shouldClick=!0,o.$slider=d(i),o.$slidesCache=null,o.transformType=null,o.transitionType=null,o.visibilityChange="visibilitychange",o.windowWidth=0,o.windowTimer=null,t=d(i).data("slick")||{},o.options=d.extend({},o.defaults,e,t),o.currentSlide=o.options.initialSlide,o.originalSettings=o.options,void 0!==document.mozHidden?(o.hidden="mozHidden",o.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(o.hidden="webkitHidden",o.visibilityChange="webkitvisibilitychange"),o.autoPlay=d.proxy(o.autoPlay,o),o.autoPlayClear=d.proxy(o.autoPlayClear,o),o.autoPlayIterator=d.proxy(o.autoPlayIterator,o),o.autoPlayToggleHandler=d.proxy(o.autoPlayToggleHandler,o),o.changeSlide=d.proxy(o.changeSlide,o),o.clickHandler=d.proxy(o.clickHandler,o),o.selectHandler=d.proxy(o.selectHandler,o),o.setPosition=d.proxy(o.setPosition,o),o.swipeHandler=d.proxy(o.swipeHandler,o),o.dragHandler=d.proxy(o.dragHandler,o),o.instanceUid=s++,o.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,o.registerBreakpoints(),o.init(!0)}).prototype.addSlide=l.prototype.slickAdd=function(i,e,t){var o=this;if("boolean"==typeof e)t=e,e=null;else if(e<0||e>=o.slideCount)return!1;o.unload(),"number"==typeof e?0===e&&0===o.$slides.length?d(i).appendTo(o.$slideTrack):t?d(i).insertBefore(o.$slides.eq(e)):d(i).insertAfter(o.$slides.eq(e)):!0===t?d(i).prependTo(o.$slideTrack):d(i).appendTo(o.$slideTrack),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slides.each(function(i,e){d(e).attr("data-slick-index",i),d(e).attr("role","group"),d(e).attr("aria-label","slide "+i)}),o.$slidesCache=o.$slides,o.reinit()},l.prototype.animateHeight=function(){var i,e=this;1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical&&(i=e.$slides.eq(e.currentSlide).outerHeight(!0),e.$list.animate({height:i},e.options.speed))},l.prototype.animateSlide=function(i,e){var t={},o=this;o.animateHeight(),!0===o.options.rtl&&!1===o.options.vertical&&(i=-i),!1===o.transformsEnabled?!1===o.options.vertical?o.$slideTrack.animate({left:i},o.options.speed,o.options.easing,e):o.$slideTrack.animate({top:i},o.options.speed,o.options.easing,e):!1===o.cssTransitions?(!0===o.options.rtl&&(o.currentLeft=-o.currentLeft),d({animStart:o.currentLeft}).animate({animStart:i},{duration:o.options.speed,easing:o.options.easing,step:function(i){i=Math.ceil(i),!1===o.options.vertical?t[o.animType]="translate("+i+"px, 0px)":t[o.animType]="translate(0px,"+i+"px)",o.$slideTrack.css(t)},complete:function(){e&&e.call()}})):(o.applyTransition(),i=Math.ceil(i),!1===o.options.vertical?t[o.animType]="translate3d("+i+"px, 0px, 0px)":t[o.animType]="translate3d(0px,"+i+"px, 0px)",o.$slideTrack.css(t),e&&setTimeout(function(){o.disableTransition(),e.call()},o.options.speed))},l.prototype.getNavTarget=function(){var i=this.options.asNavFor;return i&&null!==i&&(i=d(i).not(this.$slider)),i},l.prototype.asNavFor=function(e){var i=this.getNavTarget();null!==i&&"object"==typeof i&&i.each(function(){var i=d(this).slick("getSlick");i.unslicked||i.slideHandler(e,!0)})},l.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},l.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},l.prototype.autoPlayClear=function(){this.autoPlayTimer&&clearInterval(this.autoPlayTimer)},l.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},l.prototype.autoPlayToggleHandler=function(){var i=this;i.paused?(i.$playIcon.css("display","none"),i.$pauseIcon.css("display","inline"),i.$pauseButton.find(".slick-play-text").attr("style","display: none"),i.$pauseButton.find(".slick-pause-text").removeAttr("style"),i.slickPlay()):(i.$playIcon.css("display","inline"),i.$pauseIcon.css("display","none"),i.$pauseButton.find(".slick-play-text").removeAttr("style"),i.$pauseButton.find(".slick-pause-text").attr("style","display: none"),i.slickPause())},l.prototype.buildArrows=function(){var i=this;if(!0===i.options.arrows)if(i.$prevArrow=d(i.options.prevArrow).addClass("slick-arrow"),i.$nextArrow=d(i.options.nextArrow).addClass("slick-arrow"),i.slideCount>i.options.slidesToShow){if(i.htmlExpr.test(i.options.prevArrow))if(null!=i.options.arrowsPlacement)switch(i.options.arrowsPlacement){case"beforeSlides":case"split":i.$prevArrow.prependTo(i.options.appendArrows);break;case"afterSlides":i.$prevArrow.appendTo(i.options.appendArrows)}else i.$prevArrow.prependTo(i.options.appendArrows);if(i.htmlExpr.test(i.options.nextArrow))if(null!=i.options.arrowsPlacement)switch(i.options.arrowsPlacement){case"beforeSlides":i.$prevArrow.after(i.$nextArrow);break;case"afterSlides":case"split":i.$nextArrow.appendTo(i.options.appendArrows)}else i.$nextArrow.appendTo(i.options.appendArrows);!0!==i.options.infinite&&i.$prevArrow.addClass("slick-disabled").prop("disabled",!0)}else i.$prevArrow.add(i.$nextArrow).addClass("slick-hidden").prop("disabled",!0)},l.prototype.buildDots=function(){var i,e,t=this;if(!0===t.options.dots&&t.slideCount>t.options.slidesToShow){for(t.$slider.addClass("slick-dotted"),e=d("<ul />").addClass(t.options.dotsClass),i=0;i<=t.getDotCount();i+=1)e.append(d("<li />").append(t.options.customPaging.call(this,t,i)));t.$dots=e.appendTo(t.options.appendDots),t.$dots.find("li").first().addClass("slick-active")}},l.prototype.buildOut=function(){var t=this;t.$slides=t.$slider.children(t.options.slide+":not(.slick-cloned)").addClass("slick-slide"),t.slideCount=t.$slides.length,t.$slides.each(function(i,e){d(e).attr("data-slick-index",i).data("originalStyling",d(e).attr("style")||""),t.options.useGroupRole&&d(e).attr("role","group").attr("aria-label","slide "+(i+1))}),t.$slider.addClass("slick-slider"),t.$slider.attr("role","regi
1953on"),t.$slider.attr("aria-label",t.options.regionLabel),t.$slider.attr("tabindex",-1
vendor: 24,444 bytes, line 1953
1953),t.$slideTrack=0===t.slideCount?d('<div class="slick-track"/>').appendTo(t.$slider):t.$slides.wrapAll('<div class="slick-track"/>').parent(),t.$list=t.$slideTrack.wrap('<div class="slick-list"/>').parent(),t.$slideTrack.css("opacity",0),!0!==t.options.centerMode&&!0!==t.options.swipeToSlide||(t.options.slidesToScroll=1),d("img[data-lazy]",t.$slider).not("[src]").addClass("slick-loading"),t.setupInfinite(),t.buildArrows(),t.buildDots(),t.updateDots(),t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0),!0===t.options.draggable&&t.$list.addClass("draggable"),t.options.autoplay&&t.options.useAutoplayToggleButton&&(t.$pauseIcon=d(t.options.pauseIcon).attr("aria-hidden",!0),t.$playIcon=d(t.options.playIcon).attr("aria-hidden",!0),t.$pauseButton=d('<button type="button" class="slick-autoplay-toggle-button">'),t.$pauseButton.append(t.$pauseIcon),t.$pauseButton.append(t.$playIcon.css("display","none")),t.$pauseButton.append(d('<span class="slick-pause-text slick-sr-only">Pause</span>')),t.$pauseButton.append(d('<span class="slick-play-text slick-sr-only" style="display: none">Play</span>')),t.$pauseButton.prependTo(t.$slider)),null!=t.options.instructionsText&&""!=t.options.instructionsText&&(t.$instructionsText=d('<p class="slick-instructions slick-sr-only">'+t.options.instructionsText+"</p>"),t.$instructionsText.prependTo(t.$slider))},l.prototype.buildRows=function(){var i,e,t,o=this,s=document.createDocumentFragment(),n=o.$slider.children();if(0<o.options.rows){for(t=o.options.slidesPerRow*o.options.rows,e=Math.ceil(n.length/t),i=0;i<e;i++){for(var l=document.createElement("div"),r=0;r<o.options.rows;r++){for(var a=document.createElement("div"),d=0;d<o.options.slidesPerRow;d++){var p=i*t+(r*o.options.slidesPerRow+d);n.get(p)&&a.appendChild(n.get(p))}l.appendChild(a)}s.appendChild(l)}o.$slider.empty().append(s),o.$slider.children().children().children().css({width:100/o.options.slidesPerRow+"%",display:"inline-block"})}},l.prototype.checkResponsive=function(i,e){var t,o,s,n=this,l=!1,r=n.$slider.width(),a=window.innerWidth||d(window).width();if("window"===n.respondTo?s=a:"slider"===n.respondTo?s=r:"min"===n.respondTo&&(s=Math.min(a,r)),n.options.responsive&&n.options.responsive.length&&null!==n.options.responsive){for(t in o=null,n.breakpoints)n.breakpoints.hasOwnProperty(t)&&(!1===n.originalSettings.mobileFirst?s<n.breakpoints[t]&&(o=n.breakpoints[t]):s>n.breakpoints[t]&&(o=n.breakpoints[t]));null!==o?null!==n.activeBreakpoint&&o===n.activeBreakpoint&&!e||(n.activeBreakpoint=o,"unslick"===n.breakpointSettings[o]?n.unslick(o):(n.options=d.extend({},n.originalSettings,n.breakpointSettings[o]),!0===i&&(n.currentSlide=n.options.initialSlide),n.refresh(i)),l=o):null!==n.activeBreakpoint&&(n.activeBreakpoint=null,n.options=n.originalSettings,!0===i&&(n.currentSlide=n.options.initialSlide),n.refresh(i),l=o),i||!1===l||n.$slider.trigger("breakpoint",[n,l])}},l.prototype.changeSlide=function(i,e){var t,o,s=this,n=d(i.currentTarget);switch(n.is("a")&&i.preventDefault(),n.is("li")||(n=n.closest("li")),t=s.slideCount%s.options.slidesToScroll!=0?0:(s.slideCount-s.currentSlide)%s.options.slidesToScroll,i.data.message){case"previous":o=0==t?s.options.slidesToScroll:s.options.slidesToShow-t,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide-o,!1,e);break;case"next":o=0==t?s.options.slidesToScroll:t,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide+o,!1,e);break;case"index":var l=0===i.data.index?0:i.data.index||n.index()*s.options.slidesToScroll;s.slideHandler(s.checkNavigable(l),!1,e),n.children().trigger("focus");break;default:return}},l.prototype.checkNavigable=function(i){var e=this.getNavigableIndexes(),t=0;if(i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},l.prototype.cleanUpEvents=function(){var i=this;i.options.autoplay&&i.options.useAutoplayToggleButton&&i.$pauseButton.off("click.slick",i.autoPlayToggleHandler),i.options.dots&&null!==i.$dots&&d("li",i.$dots).off("click.slick",i.changeSlide).off("mouseenter.slick",d.proxy(i.interrupt,i,!0)).off("mouseleave.slick",d.proxy(i.interrupt,i,!1)),i.$slider.off("focus.slick blur.slick"),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow&&i.$prevArrow.off("click.slick",i.changeSlide),i.$nextArrow&&i.$nextArrow.off("click.slick",i.changeSlide)),i.$list.off("touchstart.slick mousedown.slick",i.swipeHandler),i.$list.off("touchmove.slick mousemove.slick",i.swipeHandler),i.$list.off("touchend.slick mouseup.slick",i.swipeHandler),i.$list.off("touchcancel.slick mouseleave.slick",i.swipeHandler),i.$list.off("click.slick",i.clickHandler),d(document).off(i.visibilityChange,i.visibility),i.cleanUpSlideEvents(),d(window).off("orientationchange.slick.slick-"+i.instanceUid,i.orientationChange),d(window).off("resize.slick.slick-"+i.instanceUid,i.resize),d("[draggable!=true]",i.$slideTrack).off("dragstart",i.preventDefault),d(window).off("load.slick.slick-"+i.instanceUid,i.setPosition)},l.prototype.cleanUpSlideEvents=function(){var i=this;i.$list.off("mouseenter.slick",d.proxy(i.interrupt,i,!0)),i.$list.off("mouseleave.slick",d.proxy(i.interrupt,i,!1))},l.prototype.cleanUpRows=function(){var i;0<this.options.rows&&((i=this.$slides.children().children()).removeAttr("style"),this.$slider.empty().append(i))},l.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},l.prototype.destroy=function(i){var e=this;e.autoPlayClear(),e.touchObject={},e.cleanUpEvents(),d(".slick-cloned",e.$slider).detach(),e.options.autoplay&&e.options.useAutoplayToggleButton&&e.$pauseButton.remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.$prevArrow.length&&(e.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").prop("disabled",!1).css("display",""),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove()),e.$nextArrow&&e.$nextArrow.length&&(e.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").prop("disabled",!1).css("display",""),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove()),e.$slides&&(e.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){d(this).attr("style",d(this).data("originalStyling"))}),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.detach(),e.$list.detach(),e.$slider.append(e.$slides)),e.cleanUpRows(),e.$slider.removeClass("slick-slider"),e.$slider.removeClass("slick-initialized"),e.$slider.removeClass("slick-dotted"),e.unslicked=!0,i||e.$slider.trigger("destroy",[e])},l.prototype.disableTransition=function(i){var e={};e[this.transitionType]="",!1===this.options.fade?this.$slideTrack.css(e):this.$slides.eq(i).css(e)},l.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},l.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},l.prototype.filterSlides=l.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},l.prototype.focusHandler=function(){var t=this;t.$slider.off("focus.slick blur.slick").on("focus.slick","*",function(i){var e=d(this);setTimeout(function(){t.options.pauseOnFocus&&e.is(":focus")&&(t.focussed=!0,t.autoPlay())},0)}).on("blur.slick","*",function(i){d(this);t.options.pauseOnFocus&&(t.focussed=!1,t.autoPlay())})},l.prototype.getCurrent=l.prototype.slickCurrentSlide=function(){return this.currentSlide},l.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},l.prototype.getLeft=function(i){var e,t,o,s,n=this,l=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),l=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(l=i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,l=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(l=n.slideOffset=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+l,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},l.prototype.getOption=l.prototype.slickGetOption=function(i){return this.options[i]},l.prototype.getNavigableIndexes=function(){for(var i=this,e=0,t=0,o=[],s=!1===i.options.infinite?i.slideCount:(e=-1*i.options.slidesToScroll,t=-1*i.options.slidesToScroll,2*i.slideCount);e<s;)o.push(e),e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;return o},l.prototype.getSlick=function(){return this},l.prototype.getSlideCount=function(){var s,n=this,i=!0===n.options.centerMode?Math.floor(n.$list.width()/2):0,l=-1*n.swipeLeft+i;return!0===n.options.swipeToSlide?(n.$slideTrack.find(".slick-slide").each(function(i,e){var t=d(e).outerWidth(),o=e.offsetLeft;if(!0!==n.options.centerMode&&(o+=t/2),l<o+t)return s=e,!1}),Math.abs(d(s).attr("data-slick-index")-n.currentSlide)||1):n.options.slidesToScroll},l.prototype.goTo=l.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:parseInt(i)}},e)},l.prototype.init=function(i){var e=this;d(e.$slider).hasClass("slick-initialized")||(d(e.$slider).addClass("slick-initialized"),e.buildRows(),e.buildOut(),e.setProps(),e.startLoad(),e.loadSlider(),e.initializeEvents(),e.updateArrows(),e.updateDots(),e.checkResponsive(!0),e.focusHandler()),i&&e.$slider.trigger("init",[e]),e.options.autoplay&&(e.paused=!1,e.autoPlay()),e.updateSlideVisibility(),null!=e.options.accessibility&&console.warn("accessibility setting is no longer supported."),null!=e.options.focusOnChange&&console.warn("focusOnChange is no longer supported."),null!=e.options.focusOnSelect&&console.warn("focusOnSelect is no longer supported.")},l.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide))},l.prototype.initDotEvents=function(){var i=this;!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&d("li",i.$dots).on("click.slick",{message:"index"},i.changeSlide),!0===i.options.dots&&!0===i.options.pauseOnDotsHover&&i.slideCount>i.options.slidesToShow&&d("li",i.$dots).on("mouseenter.slick",d.proxy(i.interrupt,i,!0)).on("mouseleave.slick",d.proxy(i.interrupt,i,!1))},l.prototype.initSlideEvents=function(){var i=this;i.options.pauseOnHover&&(i.$list.on("mouseenter.slick",d.proxy(i.interrupt,i,!0)),i.$list.on("mouseleave.slick",d.proxy(i.interrupt,i,!1)))},l.prototype.initializeEvents=function(){var i=this;i.initArrowEvents(),i.initDotEvents(),i.initSlideEvents(),i.options.autoplay&&i.options.useAutoplayToggleButton&&i.$pauseButton.on("click.slick",i.autoPlayToggleHandler),i.$list.on("touchstart.slick mousedown.slick",{action:"start"},i.swipeHandler),i.$list.on("touchmove.slick mousemove.slick",{action:"move"},i.swipeHandler),i.$list.on("touchend.slick mouseup.slick",{action:"end"},i.swipeHandler),i.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},i.swipeHandler),i.$list.on("click.slick",i.clickHandler),d(document).on(i.visibilityChange,d.proxy(i.visibility,i)),d(window).on("orientationchange.slick.slick-"+i.instanceUid,d.proxy(i.orientationChange,i)),d(window).on("resize.slick.slick-"+i.instanceUid,d.proxy(i.resize,i)),d("[draggable!=true]",i.$slideTrack).on("dragstart",i.preventDefault),d(window).on("load.slick.slick-"+i.instanceUid,i.setPosition),d(i.setPosition)},l.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},l.prototype.lazyLoad=function(){var i,e,t,n=this;function o(i){d("img[data-lazy]",i).each(function(){var i=d(this),e=d(this).attr("data-lazy"),t=d(this).attr("data-srcset"),o=d(this).attr("data-sizes")||n.$slider.attr("data-sizes"),s=document.createElement("img");s.onload=function(){i.animate({opacity:0},100,function(){t&&(i.attr("srcset",t),o&&i.attr("sizes",o)),i.attr("src",e).animate({opacity:1},200,function(){i.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,i,e])})},s.onerror=function(){i.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,i,e])},s.src=e})}if(!0===n.options.centerMode?t=!0===n.options.infinite?(e=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(e=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),n.options.slidesToShow/2+1+2+n.currentSlide):(e=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,t=Math.ceil(e+n.options.slidesToShow),!0===n.options.fade&&(0<e&&e--,t<=n.slideCount&&t++)),i=n.$slider.find(".slick-slide").slice(e,t),"anticipated"===n.options.lazyLoad)for(var s=e-1,l=t,r=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)s<0&&(s=n.slideCount-1),i=(i=i.add(r.eq(s))).add(r.eq(l)),s--,l++;o(i),n.slideCount<=n.options.slidesToShow?o(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?o(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&o(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},l.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},l.prototype.next=l.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},l.prototype.orientationChange=function(){this.checkResponsive(),this.setPosition()},l.prototype.pause=l.prototype.slickPause=function(){this.autoPlayClear(),this.paused=!0},l.prototype.play=l.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},l.prototype.postSlide=function(i){var e=this;e.unslicked||(e.$slider.trigger("afterChange",[e,i]),e.animating=!1,e.slideCount>e.options.slidesToShow&&e.setPosition(),e.swipeLeft=null,e.options.autoplay&&e.autoPlay(),e.updateSlideVisibility())},l.prototype.prev=l.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},l.prototype.preventDefault=function(i){i.preventDefault()},l.prototype.progressiveLazyLoad=function(i){i=i||1;var e,t,o,s,n,l=this,r=d("img[data-lazy]",l.$slider);r.length?(e=r.first(),t=e.attr("data-lazy"),o=e.attr("data-srcset"),s=e.attr("data-sizes")||l.$slider.attr("data-sizes"),(n=document.createElement("img")).onload=function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,e,t]),l.progressiveLazyLoad()},n.onerror=function(){i<3?setTimeout(function(){l.progressiveLazyLoad(i+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,e,t]),l.progressiveLazyLoad())},n.src=t):l.$slider.trigger("allImagesLoaded",[l])},l.prototype.refresh=function(i){var e,t=this,o=t.slideCount-t.options.slidesToShow;!t.options.infinite&&t.currentSlide>o&&(t.currentSlide=o),t.slideCount<=t.options.slidesToShow&&(t.currentSlide=0),e=t.currentSlide,t.destroy(!0),d.extend(t,t.initials,{currentSlide:e}),t.init(),i||t.changeSlide({data:{message:"index",index:e}},!1)},l.prototype.registerBreakpoints=function(){var i,e,t,o=this,s=o.options.responsive||null;if("array"===d.type(s)&&s.length){for(i in o.respondTo=o.options.respondTo||"window",s)if(t=o.breakpoints.length-1,s.hasOwnProperty(i)){for(e=s[i].breakpoint;0<=t;)o.breakpoints[t]&&o.breakpoints[t]===e&&o.breakpoints.splice(t,1),t--;o.breakpoints.push(e),o.breakpointSettings[e]=s[i].settings}o.breakpoints.sort(function(i,e){return o.options.mobileFirst?i-e:e-i})}},l.prototype.reinit=function(){var i=this;i.$slides=i.$slideTrack.children(i.options.slide).addClass("slick-slide"),i.slideCount=i.$slides.length,i.currentSlide>=i.slideCount&&0!==i.currentSlide&&(i.currentSlide=i.currentSlide-i.options.slidesToScroll),i.slideCount<=i.options.slidesToShow&&(i.currentSlide=0),i.registerBreakpoints(),i.setProps(),i.setupInfinite(),i.buildArrows(),i.updateArrows(),i.initArrowEvents(),i.buildDots(),i.updateDots(),i.initDotEvents(),i.cleanUpSlideEvents(),i.initSlideEvents(),i.checkResponsive(!1,!0),i.setSlideClasses("number"==typeof i.currentSlide?i.currentSlide:0),i.setPosition(),i.focusHandler(),i.paused=!i.options.autoplay,i.autoPlay(),i.$slider.trigger("reInit",[i])},l.prototype.resize=function(){var i=this;d(window).width()!==i.windowWidth&&(clearTimeout(i.windowDelay),i.windowDelay=window.setTimeout(function(){i.windowWidth=d(window).width(),i.checkResponsive(),i.unslicked||i.setPosition()},50))},l.prototype.removeSlide=l.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},l.prototype.setCSS=function(i){var e,t,o=this,s={};!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled||(!(s={})===o.cssTransitions?s[o.animType]="translate("+e+", "+t+")":s[o.animType]="translate3d("+e+", "+t+", 0px)"),o.$slideTrack.css(s)},l.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},l.prototype.setFade=function(){var t,o=this;o.$slides.each(function(i,e){t=o.slideWidth*i*-1,!0===o.options.rtl?d(e).css({position:"relative",right:t,top:0,zIndex:o.options.zIndex-2,opacity:0}):d(e).css({position:"relative",left:t,top:0,zIndex:o.options.zIndex-2,opacity:0})}),o.$slides.eq(o.currentSlide).css({zIndex:o.options.zIndex-1,opacity:1})},l.prototype.setHeight=function(){var i,e=this;1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical&&(i=e.$slides.eq(e.currentSlide).outerHeight(!0),e.$list.css("height",i))},l.prototype.setOption=l.prototype.slickSetOption=function(){var i,e,t,o,s,n=this,l=!1;if("object"===d.type(arguments[0])?(t=arguments[0],l=arguments[1],s="multiple"):"string"===d.type(arguments[0])&&(o=arguments[1],l=arguments[2],"responsive"===(t=arguments[0])&&"array"===d.type(arguments[1])?s="responsive":void 0!==arguments[1]&&(s="single")),"single"===s)n.options[t]=o;else if("multiple"===s)d.each(t,function(i,e){n.options[i]=e});else if("responsive"===s)for(e in o)if("array"!==d.type(n.options.responsive))n.options.responsive=[o[e]];else{for(i=n.options.responsive.length-1;0<=i;)n.options.responsive[i].breakpoint===o[e].breakpoint&&n.options.responsive.splice(i,1),i--;n.options.responsive.push(o[e])}l&&(n.unload(),n.reinit())},l.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},l.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},l.prototype.setSlideClasses=function(i){var e,t,o,s,n=this,l=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true")
1953;!1!==n.options.useGroupRole&&!0===n.options.centerMode&&l.attr("aria-label",function(){return d(this).attr("aria-label").replace(" (centered)","")}),
vendor: 8,911 bytes, line 1953
1953n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode?(o=n.options.slidesToShow%2==0?1:0,s=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(s<=i&&i<=n.slideCount-1-s?n.$slides.slice(i-s+o,i+s+1).addClass("slick-active").removeAttr("aria-hidden"):(e=n.options.slidesToShow+i,l.slice(e-s+1+o,e+s+2).addClass("slick-active").removeAttr("aria-hidden")),0===i?l.eq(n.options.slidesToShow+n.slideCount+1).addClass("slick-center").attr("aria-label",function(){return d(this).attr("aria-label")+" (centered)"}):i===n.slideCount-1&&l.eq(n.options.slidesToShow).addClass("slick-center").attr("aria-label",function(){return d(this).attr("aria-label")+" (centered)"})),n.$slides.eq(i).addClass("slick-center").attr("aria-label",function(){return d(this).attr("aria-label")+" (centered)"})):0<=i&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").removeAttr("aria-hidden"):l.length<=n.options.slidesToShow?l.addClass("slick-active").removeAttr("aria-hidden"):(t=n.slideCount%n.options.slidesToShow,e=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?l.slice(e-(n.options.slidesToShow-t),e+t).addClass("slick-active").removeAttr("aria-hidden"):l.slice(e,e+n.options.slidesToShow).addClass("slick-active").removeAttr("aria-hidden")),"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},l.prototype.setupInfinite=function(){var i,e,t,o=this;if(!0===o.options.fade&&(o.options.centerMode=!1),!0===o.options.infinite&&!1===o.options.fade&&(e=null,o.slideCount>o.options.slidesToShow)){for(t=!0===o.options.centerMode?o.options.slidesToShow+1:o.options.slidesToShow,i=o.slideCount;i>o.slideCount-t;--i)e=i-1,d(o.$slides[e]).clone(!0).attr("id","").attr("data-slick-index",e-o.slideCount).prependTo(o.$slideTrack).addClass("slick-cloned");for(i=0;i<t+o.slideCount;i+=1)e=i,d(o.$slides[e]).clone(!0).attr("id","").attr("data-slick-index",e+o.slideCount).appendTo(o.$slideTrack).addClass("slick-cloned");o.$slideTrack.find(".slick-cloned").find("[id]").each(function(){d(this).attr("id","")})}},l.prototype.interrupt=function(i){i||this.autoPlay(),this.interrupted=i},l.prototype.selectHandler=function(i){var e=d(i.target).is(".slick-slide")?d(i.target):d(i.target).parents(".slick-slide"),t=(t=parseInt(e.attr("data-slick-index")))||0;this.slideCount<=this.options.slidesToShow?this.slideHandler(t,!1,!0):this.slideHandler(t)},l.prototype.slideHandler=function(i,e,t){var o,s,n,l,r,a,d=this;if(e=e||!1,!(!0===d.animating&&!0===d.options.waitForAnimate||!0===d.options.fade&&d.currentSlide===i))if(!1===e&&d.asNavFor(i),o=i,r=d.getLeft(o),l=d.getLeft(d.currentSlide),d.currentLeft=null===d.swipeLeft?l:d.swipeLeft,!1===d.options.infinite&&!1===d.options.centerMode&&(i<0||i>d.getDotCount()*d.options.slidesToScroll))!1===d.options.fade&&(o=d.currentSlide,!0!==t&&d.slideCount>d.options.slidesToShow?d.animateSlide(l,function(){d.postSlide(o)}):d.postSlide(o));else if(!1===d.options.infinite&&!0===d.options.centerMode&&(i<0||i>d.slideCount-d.options.slidesToScroll))!1===d.options.fade&&(o=d.currentSlide,!0!==t&&d.slideCount>d.options.slidesToShow?d.animateSlide(l,function(){d.postSlide(o)}):d.postSlide(o));else{if(d.options.autoplay&&clearInterval(d.autoPlayTimer),s=o<0?d.slideCount%d.options.slidesToScroll!=0?d.slideCount-d.slideCount%d.options.slidesToScroll:d.slideCount+o:o>=d.slideCount?d.slideCount%d.options.slidesToScroll!=0?0:o-d.slideCount:o,d.animating=!0,d.$slider.trigger("beforeChange",[d,d.currentSlide,s]),n=d.currentSlide,d.currentSlide=s,d.setSlideClasses(d.currentSlide),d.options.asNavFor&&(a=(a=d.getNavTarget()).slick("getSlick")).slideCount<=a.options.slidesToShow&&a.setSlideClasses(d.currentSlide),d.updateDots(),d.updateArrows(),!0===d.options.fade)return!0!==t?(d.fadeSlideOut(n),d.fadeSlide(s,function(){d.postSlide(s)})):d.postSlide(s),void d.animateHeight();!0!==t&&d.slideCount>d.options.slidesToShow?d.animateSlide(r,function(){d.postSlide(s)}):d.postSlide(s)}},l.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},l.prototype.swipeDirection=function(){var i=this,e=i.touchObject.startX-i.touchObject.curX,t=i.touchObject.startY-i.touchObject.curY,o=Math.atan2(t,e),s=Math.round(180*o/Math.PI);return s<0&&(s=360-Math.abs(s)),s<=45&&0<=s||s<=360&&315<=s?!1===i.options.rtl?"left":"right":135<=s&&s<=225?!1===i.options.rtl?"right":"left":!0===i.options.verticalSwiping?35<=s&&s<=135?"down":"up":"vertical"},l.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1;if(o.interrupted=!1,o.shouldClick=!(10<o.touchObject.swipeLength),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},l.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},l.prototype.swipeMove=function(i){var e,t,o,s,n,l=this,r=void 0!==i.originalEvent?i.originalEvent.touches:null;return!(!l.dragging||l.scrolling||r&&1!==r.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==r?r[0].pageX:i.clientX,l.touchObject.curY=void 0!==r?r[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),n=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&4<n?!(l.scrolling=!0):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=n),t=l.swipeDirection(),void 0!==i.originalEvent&&4<l.touchObject.swipeLength&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,(l.touchObject.edgeHit=!1)===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},l.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return!(t.touchObject={});void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},l.prototype.unfilterSlides=l.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},l.prototype.unload=function(){var i=this;d(".slick-cloned",i.$slider).remove(),i.$dots&&i.$dots.remove(),i.$prevArrow&&i.htmlExpr.test(i.options.prevArrow)&&i.$prevArrow.remove(),i.$nextArrow&&i.htmlExpr.test(i.options.nextArrow)&&i.$nextArrow.remove(),i.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},l.prototype.unslick=function(i){this.$slider.trigger("unslick",[this,i]),this.destroy()},l.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2);!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").prop("disabled",!1),i.$nextArrow.removeClass("slick-disabled").prop("disabled",!1),0===i.currentSlide?(
1953document.activeElement===i.$prevArrow.get(0)&&i.$slider.get(0).focus(),i.$prevArrow.addClass("slick-disabled").prop("disabled",!0),i.$nextArrow.removeClass("slick-disabled").prop("disabled",!1)):(i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode||i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode)&&(document.activeElement===i.$nextArrow.get(0)&&i.$slider.get(0).focus(),i.$nextArrow.addClass("slick-disabled").prop("disabled",!0),i.$prevArrow.removeClass("slick-disabled").prop("disabled",!1)))},l.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").find("button").removeAttr("aria-current").end().end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active").find("button").attr("aria-current",!0).end().end())},l.prototype.updateSlideVisibility=function(){this.$slideTrack.find(".slick-slide").attr("aria-hidden","true").find("a, input, button, select").attr("tabindex","-1"),this.$slideTrack.find(".slick-active").removeAttr("aria-hidden").find("a, input, button, select").removeAttr("tabindex")},l.prototype.visibility=function(){this.options.autoplay&&(document[this.hidden]?this.interrupted=!0:this.interrupted=!1)},d.fn.slick=function(){for(var i,e=this,t=arguments[0],o=Array.prototype.slice.call(arguments,1),s=e.length,n=0;n<s;n++)if("object"==typeof t||void 0===t?e[n].slick=new l(e[n],t):i=e[n].slick[t].apply(e[n].slick,o),void 0!==i)return i;return e}});; 1954(function($){ 1955 1956 let MeritCoreObjJquery = {}; 1957 1958 MeritCoreObjJquery.leftArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20.71" height="35.667" viewBox="0 0 20.71 35.667"> 1959 <path id="icons8-more-than-64" d="M23.75,2.008l2,2.185L8.723,19.836,25.749,35.467l-2,2.208L5.516,20.928a1.491,1.491,0,0,1,0-2.185Z" transform="translate(-5.039 -2.008)" fill="#332A2A"/> 1960</svg>`; 1961MeritCoreObjJquery.rightArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20.71" height="35.667" viewBox="0 0 20.71 35.667"> 1962<path id="icons8-more-than-64" d="M7.038,2.008l-2,2.185L22.065,19.836,5.039,35.467l2,2.208L25.273,20.928a1.491,1.491,0,0,0,0-2.185Z" transform="translate(-5.039 -2.008)" fill="#332A2A"/> 1963</svg>`; 1964 1965MeritCoreObjJquery.blogleftArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20.71" height="35.667" viewBox="0 0 20.71 35.667"> 1966<path id="icons8-more-than-64" d="M23.75,2.008l2,2.185L8.723,19.836,25.749,35.467l-2,2.208L5.516,20.928a1.491,1.491,0,0,1,0-2.185Z" transform="translate(-5.039 -2.008)" fill="#ffffff"/> 1967</svg>`; 1968MeritCoreObjJquery.blogrightArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20.71" height="35.667" viewBox="0 0 20.71 35.667"> 1969<path id="icons8-more-than-64" d="M7.038,2.008l-2,2.185L22.065,19.836,5.039,35.467l2,2.208L25.273,20.928a1.491,1.491,0,0,0,0-2.185Z" transform="translate(-5.039 -2.008)" fill="#ffffff"/> 1970</svg>`; 1971 1972 // jquery magnific popup 1973 MeritCoreObjJquery.infoboxPopupVideo = function(){ 1974 1975 let infoPopupBtns = $('.merit-video-popup'); 1976 1977 if( infoPopupBtns.length > 0 ){ 1978 1979 infoPopupBtns.magnificPopup({ 1980 disableOn: 700, 1981 type: 'iframe', 1982 mainClass: 'mfp-fade', 1983 removalDelay: 160, 1984 preloader: false, 1985 fixedContentPos: false 1986 }); 1987 1988 } 1989 1990 } 1991 1992 MeritCoreObjJquery.videoGallerySlider = function(){ 1993 let videoSlider = $('.merit-gallery-slider'); 1994 1995 if(videoSlider.length > 0){ 1996 videoSlider.slick({ 1997 prevArrow: '<button type="button" class="slick-prev slick-arrow" aria-label="Slick Previous Arrow">'+ MeritCoreObjJquery.blogleftArrow+'</button>', 1998 nextArrow: '<button type="button" class="slick-next slick-arrow" aria-label="Slick Next Arrow">'+ MeritCoreObjJquery.blogrightArrow+'</button>' 1999 }); 2000 } 2001 } 2002 2003 MeritCoreObjJquery.relatedProductSlider = function(){ 2004 let slider = $('.related-products'); 2005 let leftArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20.71" height="35.667" viewBox="0 0 20.71 35.667"> 2006 <path id="icons8-more-than-64" d="M23.75,2.008l2,2.185L8.723,19.836,25.749,35.467l-2,2.208L5.516,20.928a1.491,1.491,0,0,1,0-2.185Z" transform="translate(-5.039 -2.008)" fill="#332A2A"/> 2007 </svg>`; 2008 let rightArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20.71" height="35.667" viewBox="0 0 20.71 35.667"> 2009 <path id="icons8-more-than-64" d="M7.038,2.008l-2,2.185L22.065,19.836,5.039,35.467l2,2.208L25.273,20.928a1.491,1.491,0,0,0,0-2.185Z" transform="translate(-5.039 -2.008)" fill="#332A2A"/> 2010 </svg>`; 2011 2012 if(slider.length > 0){ 2013 slider.slick({ 2014 dots: true, 2015 dotsClass: 'related-product-dots', 2016 slidesToShow: 2, 2017 prevArrow: '<button type="button" class="slick-prev relate-arrow">'+leftArrow+'</button>', 2018 nextArrow: '<button type="button" class="slick-next related-arrow">'+rightArrow+'</button>', 2019 responsive: [ 2020 { 2021 breakpoint: 767, 2022 settings: { 2023 slidesToShow: 1, 2024 } 2025 } 2026 ] 2027 }); 2028 } 2029 } 2030 2031// 404 page end 2032 MeritCoreObjJquery.productHeroSlider = function(){ 2033 let slider = $('.merit-product-hero-image-slider'); 2034 let leftArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20.71" height="35.667" viewBox="0 0 20.71 35.667"> 2035 <path id="icons8-more-than-64" d="M23.75,2.008l2,2.185L8.723,19.836,25.749,35.467l-2,2.208L5.516,20.928a1.491,1.491,0,0,1,0-2.185Z" transform="translate(-5.039 -2.008)" fill="#332A2A"/> 2036 </svg>`; 2037 let rightArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20.71" height="35.667" viewBox="0 0 20.71 35.667"> 2038 <path id="icons8-more-than-64" d="M7.038,2.008l-2,2.185L22.065,19.836,5.039,35.467l2,2.208L25.273,20.928a1.491,1.491,0,0,0,0-2.185Z" transform="translate(-5.039 -2.008)" fill="#332A2A"/> 2039 </svg>`; 2040 2041 if(slider.length > 0){ 2042 slider.slick({ 2043 dots: true, 2044 dotsClass: 'product-hero-dots', 2045 prevArrow: '<button type="button" class="slick-prev product-arrow">'+leftArrow+'</button>', 2046 nextArrow: '<button type="button" class="slick-next product-arrow">'+rightArrow+'</button>', 2047 adaptiveHeight: true 2048 }); 2049 } 2050 } 2051 2052 2053 MeritCoreObjJquery.contentSlider = function(container){ 2054 2055 if($(container).length == 0){ 2056 return false;
2057 2058 } 2059 2060 $(container).each( function(){ 2061 2062 let $this = $( this ) ; 2063 2064 if(!$this.hasClass( "slick-initialized" )){ 2065 2066 $this.slick({ 2067 autoplay: $this.data('autoplay') ? true : false, 2068 dots: $this.data('dots') ? true : false, 2069 dotsClass: 'merit-white-dots', 2070 infinite: true, 2071 speed: 1500, 2072 slidesToShow: $this.data('slidestoshow'), 2073 adaptiveHeight: true, 2074 autoplaySpeed: $this.data('timeout'), 2075 arrows: $this.data('nav') ? true : false, 2076 margin:30, 2077 lazyLoad: 'ondemand', 2078 prevArrow: '<button type="button" class="slick-prev">'+ MeritCoreObjJquery.leftArrow+'</button>', 2079 nextArrow: '<button type="button" class="slick-next">'+MeritCoreObjJquery.rightArrow+'</button>', 2080 responsive: [ 2081 { 2082 breakpoint: 1599, 2083 settings: { 2084 slidesToShow: 3 2085 } 2086 }, 2087 { 2088 breakpoint: 1025, 2089 settings: { 2090 slidesToShow: 1, 2091 rows: $this.data('rows') 2092 } 2093 } 2094 ] 2095 }); 2096 2097 $this.find('source').each( function( i, source ){ 2098 2099 let $source = $( source ); 2100 $source.attr('srcset', $source.data('lazy-srcset')); 2101 2102 }); 2103 2104 } 2105 2106 }); 2107 2108} 2109 2110MeritCoreObjJquery.newsSlider = function(container){ 2111 2112 if($(container).length == 0){ 2113 return false; 2114 2115 } 2116 2117 let isMobile = window.innerWidth < 768; 2118 2119 2120 function slider(container){ 2121 2122 $(container).each( function(){ 2123 2124 let $this = $( this ) ; 2125 2126 if(!$this.hasClass( "slick-initialized" )){ 2127 2128 $this.slick({ 2129 autoplay: false, 2130 dots: true, 2131 dotsClass: 'merit-white-dots', 2132 infinite: true, 2133 speed: 1500, 2134 slidesToShow: 1, 2135 adaptiveHeight: true, 2136 arrows: true, 2137 margin:0, 2138 lazyLoad: 'ondemand', 2139 prevArrow: '<button type="button" class="slick-prev slick-arrow" aria-label="Slick Previous Arrow">'+ MeritCoreObjJquery.blogleftArrow+'</button>', 2140 nextArrow: '<button type="button" class="slick-next slick-arrow" aria-label="Slick Next Arrow">'+ MeritCoreObjJquery.blogrightArrow+'</button>' 2141 }); 2142 2143 $this.find('source').each( function( i, source ){ 2144 2145 let $source = $( source ); 2146 $source.attr('srcset', $source.data('lazy-srcset')); 2147 2148 }); 2149 2150 } 2151 2152 }); 2153 } 2154 2155 if(isMobile){ 2156 slider(container); 2157 }else{ 2158 2159 $(container).each( function(){ 2160 let $this = $( this ); 2161 if($this.hasClass( "slick-initialized" )){ 2162 $this.slick('unslick'); 2163 } 2164 2165 }); 2166 2167 } 2168 2169} 2170 2171MeritCoreObjJquery.productFinderSlider = function(container){ 2172 2173 if($(container).length == 0){ 2174 return false; 2175 2176 } 2177 2178 $(container).each( function(){ 2179 2180 let $this = $( this ) ; 2181 2182 if(!$this.hasClass( "slick-initialized" )){ 2183 2184 $this.slick({ 2185 dots: true, 2186 dotsClass: 'merit-white-dots', 2187 infinite: true, 2188 speed: 1500, 2189 slidesToShow: 1, 2190 adaptiveHeight: true, 2191 arrows: true, 2192 lazyLoad: 'ondemand', 2193 prevArrow: '<button type="button" class="slick-prev">'+ MeritCoreObjJquery.leftArrow+'</button>', 2194 nextArrow: '<button type="button" class="slick-next">'+MeritCoreObjJquery.rightArrow+'</button>', 2195 }); 2196 2197 $this.find('source').each( function( i, source ){ 2198 2199 let $source = $( source ); 2200 $source.attr('srcset', $source.data('lazy-srcset')); 2201 2202 }); 2203 2204 } 2205 2206 }); 2207 2208} 2209 2210MeritCoreObjJquery.niceSelect = function(){ 2211 $('.merit-nice-select').niceSelect(); 2212} 2213 2214 MeritCoreObjJquery.infoboxPopupVideo(); 2215 MeritCoreObjJquery.videoGallerySlider(); 2216 MeritCoreObjJquery.relatedProductSlider(); 2217 MeritCoreObjJquery.productHeroSlider(); 2218 MeritCoreObjJquery.contentSlider('.merit-content-slider'); 2219 MeritCoreObjJquery.newsSlider('.merit-blog-area'); 2220 MeritCoreObjJquery.newsSlider('.merit-white-slider'); 2221 MeritCoreObjJquery.contentSlider('.merit-post-card-slider'); 2222 MeritCoreObjJquery.contentSlider('.merit-procedural-slider'); 2223 MeritCoreObjJquery.niceSelect(); 2224 2225 window.onresize = function(event) { 2226 MeritCoreObjJquery.newsSlider('.merit-blog-area'); 2227 MeritCoreObjJquery.newsSlider('.merit-white-slider'); 2228 }; 2229 2230})(jQuery);; 2231(function ($) { 2232 2233 var mdcObj = mdcObj || {}; 2234 2235 // mdcObj.accordion = function(){ 2236 2237 // $( ".mdc_pages_accorcion" ).accordion(); 2238 2239 // }; 2240 2241 mdcObj.isMobile = { 2242 Android: function() { 2243 return navigator.userAgent.match(/Android/i); 2244 }, 2245 BlackBerry: function() { 2246 return navigator.userAgent.match(/BlackBerry/i); 2247 }, 2248 iOS: function() { 2249 return navigator.userAgent.match(/iPhone|iPad|iPod/i); 2250 }, 2251 Opera: function() { 2252 return navigator.userAgent.match(/Opera Mini/i); 2253 }, 2254 Windows: function() { 2255 return navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i); 2256 }, 2257 Width: function() { 2258 return $(window).width() < 960; 2259 }, 2260 any: function() { 2261 return (this.Android() || this.BlackBerry() || this.iOS() || this.Opera() || this.Windows() || this.Width()); 2262 } 2263 }; 2264 2265 mdcObj.backgroundLazyLoader = function(){ 2266
2267 function BackgroundNode({node, loadedClassName, selector}) { 2268 let src = node.getAttribute(selector); 2269 let show = (onComplete) => { 2270 requestAnimationFrame(() => { 2271 node.style.backgroundImage = `url(${src})` 2272 node.classList.add(loadedClassName); 2273 onComplete(); 2274 }) 2275 } 2276 return { 2277 node, 2278 2279 // onComplete is called after the image is done loading. 2280 load: (onComplete) => { 2281 let img = new Image(); 2282 img.onload = show(onComplete); 2283 img.src = src; 2284 } 2285 } 2286 } 2287 2288 let defaultOptions = { 2289 selector: (mdcObj.isMobile.Width()) ? 'data-background-mobile-image-url' : 'data-background-desktop-image-url', 2290 loadedClassName: 'loaded' 2291 } 2292 2293 function BackgroundLazyLoader({selector, loadedClassName} = defaultOptions) { 2294 let nodes = [].slice.apply(document.querySelectorAll('['+selector+']')) 2295 .map(node => new BackgroundNode({node, loadedClassName, selector})); 2296 2297 let callback = (entries, observer) => { 2298 entries.forEach(({target, isIntersecting}) => { 2299 if (!isIntersecting) { 2300 return; 2301 } 2302 2303 let obj = nodes.find(it => it.node.isSameNode(target)); 2304 2305 if (obj) { 2306 obj.load(() => { 2307 // Unobserve the node: 2308 observer.unobserve(target); 2309 // Remove this node from our list: 2310 nodes = nodes.filter(n => !n.node.isSameNode(target)); 2311 2312 // If there are no remaining unloaded nodes, 2313 // disconnect the observer since we don't need it anymore. 2314 if (!nodes.length) { 2315 observer.disconnect(); 2316 } 2317 }); 2318 } 2319 }) 2320 }; 2321 2322 let observer = new IntersectionObserver(callback); 2323 nodes.forEach(node => observer.observe(node.node)); 2324 }; 2325 2326 BackgroundLazyLoader(); 2327 }; 2328 2329 mdcObj.showGtranslate = function (){ 2330 2331 var currentUrl = new URL(window.location.href); 2332 var getSwitcher = document.getElementsByClassName('switcher'); 2333 2334 if (currentUrl.searchParams.get('gtranslate')) { 2335 localStorage.setItem('switcher', 'show'); 2336 if (getSwitcher.length > 0) { 2337 getSwitcher[0].style.display='block'; 2338 } 2339 } 2340 2341 var getswitcherLocal = localStorage.getItem('switcher'); 2342 2343 if(getswitcherLocal && getSwitcher.length > 0){ 2344 getSwitcher[0].style.display='block'; 2345 } 2346 2347 2348 }; 2349 2350 mdcObj.contentSlider = function(container){ 2351 2352 if($(container).length == 0){ 2353 return false; 2354 } 2355 2356 let leftArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20.71" height="35.667" viewBox="0 0 20.71 35.667"> 2357 <path id="icons8-more-than-64" d="M23.75,2.008l2,2.185L8.723,19.836,25.749,35.467l-2,2.208L5.516,20.928a1.491,1.491,0,0,1,0-2.185Z" transform="translate(-5.039 -2.008)" fill="#fff"/> 2358 </svg>`; 2359 let rightArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20.71" height="35.667" viewBox="0 0 20.71 35.667"> 2360 <path id="icons8-more-than-64" d="M7.038,2.008l-2,2.185L22.065,19.836,5.039,35.467l2,2.208L25.273,20.928a1.491,1.491,0,0,0,0-2.185Z" transform="translate(-5.039 -2.008)" fill="#fff"/> 2361 </svg> 2362 `; 2363 2364 console.log($(container)); 2365 $(container).each( function(){ 2366 2367 let $this = $( this ) ; 2368 2369 $this.slick({ 2370 autoplay: $this.data('autoplay') ? true : false, 2371 dots: $this.data('dots') ? true : false, 2372 infinite: true, 2373 speed: 300, 2374 slidesToShow: 1, 2375 adaptiveHeight: true, 2376 autoplaySpeed: $this.data('timeout'), 2377 arrows: $this.data('nav') ? true : false, 2378 margin:0, 2379 lazyLoad: 'ondemand', 2380 prevArrow: '<button type="button" class="slick-prev">'+leftArrow+'</button>', 2381 nextArrow: '<button type="button" class="slick-next">'+rightArrow+'</button>' 2382 }); 2383 2384 $this.find('source').each( function( i, source ){ 2385 2386 let $source = $( source ); 2387 $source.attr('srcset', $source.data('lazy-srcset')); 2388 2389 }); 2390 2391 }); 2392 2393 } 2394 2395 //mdcObj.accordion(); 2396 mdcObj.backgroundLazyLoader(); 2397 $(window).on('resize', function(){ 2398 mdcObj.backgroundLazyLoader(); 2399 }); 2400 mdcObj.showGtranslate(); 2401 //mdcObj.contentSlider('.merit-content-slider'); 2402 2403 2404 2405 2406 2407 2408 2409 2410})(jQuery);; 2411 2412// resources/js/app.js 2413(function () { 2414 2415 let MeritCoreObj = {}; 2416 2417 // menu toggle 2418 MeritCoreObj.menuToggle = function () { 2419 const menuToggle = document.getElementById("menu-toggle"); 2420 const offCanvas = document.getElementById("mdc-offcanvas"); 2421 const mobileNavAccor = document.querySelectorAll(".mobile-main-menu .has-sub-menu .merit-menu-item-link"); 2422 const header = document.querySelector('.merit-site-header'); 2423 const adminBar = document.getElementById('wpadminbar'); 2424 2425 2426 2427 if (menuToggle && offCanvas && header) { 2428 2429 menuToggle.addEventListener("click", function () { 2430 let bodyOffset = document.documentElement.scrollTop; 2431 this.classList.toggle("active-menu-toggle"); 2432 offCanvas.classList.toggle("offcanvas-open"); 2433 if (adminBar && bodyOffset == 0) { 2434 offCanvas.style.top = (header.clientHeight + adminBar.clientHeight + 4) + 'px'; 2435 offCanvas.style.height = 'calc(100vh - ' + (header.clientHeight + adminBar.clientHeight + 4) + 'px)'; 2436 } else { 2437 offCanvas.style.top = (header.clientHeight + 4) + 'px'; 2438 offCanvas.style.height = 'calc(100vh - ' + (header.clientHeight + 4) + 'px)'; 2439 } 2440 2441 2442 }); 2443 2444 window.onscroll = function () { 2445 let bodyOffset = document.documentElement.scrollTop; 2446 if (bodyOffset > 100 && offCanvas) { 2447 offCanvas.style.top = (header.clientHeight + 4) + 'px'; 2448 offCanvas.style.height = 'calc(100vh - ' + (header.clientHeight + 4) + 'px)'; 2449 } else { 2450 if (adminBar && offCanvas) { 2451 offCanvas.style.top = (header.clientHeight + adminBar.clientHeight + 4) + 'px'; 2452 offCanvas.style.height = 'calc(100vh - ' + (header.clientHeight + adminBar.clientHeight + 4) + 'px)'; 2453 } 2454 2455 } 2456 2457 } 2458 } 2459 2460 2461 2462 if (mobileNavAccor) { 2463 mobileNavAccor.forEach(item => { 2464 2465 item.onclick = function (e) { 2466 e.preventDefault(); 2467 this.nextElementSibling.classList.toggle('active-mega-mobile'); 2468 this.classList.toggle('active-menu-accordion') 2469 2470 } 2471 }) 2472 } 2473 2474 2475 2476 }; 2477 2478 MeritCoreObj.counterySelector = function () { 2479 2480 const selectedCountry = document.getElementById("selected-location"); 2481 2482 if (!selectedCountry) { 2483 return false;
2484 } 2485 2486 2487 const countrySwitcherBtn = document.querySelector(".ht-location-switcher"); 2488 const countryDropdown = document.querySelector(".merit-country-selector-area"); 2489 const countryItems = document.querySelectorAll(".merit-country-item"); 2490 const getSelectedCookie = mdcGetCookie('selected_country'); 2491 const meritLangDropdown = document.querySelector('.merit-language-dropdown'); 2492 2493 if (getSelectedCookie) { 2494 const countryObj = JSON.parse(getSelectedCookie); 2495 selectedCountry.innerText = countryObj.country; 2496 } 2497 2498 if (countrySwitcherBtn) { 2499 countrySwitcherBtn.addEventListener('click', function () { 2500 if (countryDropdown) { 2501 countryDropdown.classList.toggle('active-country-drowdown'); 2502 } 2503 if (meritLangDropdown) { 2504 meritLangDropdown.classList.remove('active-lang-dropdown'); 2505 } 2506 }) 2507 } 2508 2509 if (countryItems) { 2510 2511 countryItems.forEach(country => { 2512 country.addEventListener('click', function () { 2513 let $this = this; 2514 let countryValue = $this.innerText; 2515 let closestOffice = $this.getAttribute('data-countryid'); 2516 let contryCode = $this.getAttribute('data-country-code'); 2517 2518 if (countryDropdown) { 2519 countryDropdown.classList.remove('active-country-drowdown'); 2520 } 2521 2522 const data = {}; 2523 2524 if (countryValue) { 2525 selectedCountry.innerText = countryValue; 2526 data.country = countryValue; 2527 } 2528 2529 if (closestOffice) { 2530 data.closest_office = closestOffice 2531 } 2532 2533 if (contryCode) { 2534 data.country_code = contryCode 2535 } 2536 2537 mdcSetCookie('selected_country', JSON.stringify(data), 1); 2538 2539 }) 2540 }) 2541 } 2542 2543 2544 } 2545 2546 MeritCoreObj.languageSelector = function () { 2547 const languageLinks = document.querySelectorAll('.merit-language-list-wrap a'); 2548 const langBtn = document.querySelector('.merit-language-selector'); 2549 const meritLangDropdown = document.querySelector('.merit-language-dropdown'); 2550 const countryDropdown = document.querySelector(".merit-country-selector-area"); 2551 const html = document.querySelector('html'); 2552 const htmlLang = html.getAttribute('lang'); 2553 2554 // check language attribute on page load 2555 switch (htmlLang) { 2556 case 'fr': 2557 data = { 2558 name: 'French', 2559 code: 'fr' 2560 } 2561 break; 2562 case 'de': 2563 data = { 2564 name: 'German', 2565 code: 'de' 2566 } 2567 break; 2568 case 'it': 2569 data = { 2570 name: 'Italian', 2571 code: 'it' 2572 } 2573 break; 2574 case 'pt': 2575 data = { 2576 name: 'Portuguese', 2577 code: 'pt' 2578 } 2579 break; 2580 case 'es': 2581 data = { 2582 name: 'Spanish', 2583 code: 'es' 2584 } 2585 break; 2586 default: 2587 data = { 2588 name: 'English', 2589 code: 'en-US' 2590 } 2591 } 2592 2593 2594 // get cookies 2595 const selectedLang = mdcGetCookie('selected_lang'); 2596 2597 // initail button label 2598 let langBtnLabel = 'English'; 2599 2600 // check if cookies exist on the first load 2601 if (selectedLang) { 2602 const langObj = JSON.parse(selectedLang); 2603 2604 langBtnLabel = langObj.name; 2605 2606 //if current langunage did not match with current url, set cookie again 2607 if (langObj.name !== data.name) { 2608 mdcSetCookie('selected_lang', JSON.stringify(data), 1); 2609 langBtnLabel = data.name; 2610 } 2611 2612 } else { 2613 //create cookies if there is no cookies 2614 mdcSetCookie('selected_lang', JSON.stringify(data), 1); 2615 2616 langBtnLabel = data.name; 2617 } 2618 2619 2620 if (langBtn) { 2621 langBtn.innerText = langBtnLabel; 2622 2623 // add cookies on click by language dropdown 2624 langBtn.addEventListener('click', function () { 2625 if (null !== meritLangDropdown) { 2626 meritLangDropdown.classList.toggle('active-lang-dropdown'); 2627 } 2628 2629 if (null !== countryDropdown) { 2630 countryDropdown.classList.remove('active-country-drowdown'); 2631 } 2632 }); 2633 } 2634 2635 2636 if (null !== languageLinks) { 2637 languageLinks.forEach((link) => { 2638 /* 2639 @todo 2640 *this is temporary if we have pro version we don't need it 2641 */ 2642 let lagCode = link.getAttribute('data-gt-lang') || null;
2643 if ('pt' == lagCode) { 2644 link.innerText += " (Brazilian)"; 2645 } 2646 link.addEventListener('click', function (e) { 2647 const $this = this; 2648 const langName = $this.innerText; 2649 const langCode = $this.getAttribute('data-gt-lang'); 2650 const data = { 2651 name: langName, 2652 code: langCode 2653 } 2654 2655 mdcSetCookie('selected_lang', JSON.stringify(data), 1); 2656 }); 2657 }) 2658 } 2659 2660 // click on outside 2661 //active-country-drowdown 2662 document.addEventListener('click', function (e) { 2663 if (countryDropdown.classList.contains('active-country-drowdown') || meritLangDropdown.classList.contains('active-lang-dropdown')) { 2664 2665 const countryDropdownArea = e.target.closest('.merit-country-selector-area'); 2666 const countryDropdownBtn = e.target.closest('.ht-location-switcher'); 2667 2668 const languageDropdownArea = e.target.closest('.merit-language-dropdown'); 2669 const languageDropdownBtn = e.target.closest('.merit-language-selector '); 2670 if (!countryDropdownArea && !countryDropdownBtn) { 2671 if (countryDropdown) { 2672 countryDropdown.classList.remove('active-country-drowdown'); 2673 } 2674 } 2675 2676 if (!languageDropdownArea && !languageDropdownBtn) { 2677 if (meritLangDropdown) { 2678 meritLangDropdown.classList.remove('active-lang-dropdown'); 2679 } 2680 } 2681 console.log('Hello form inside condition'); 2682 } 2683 2684 2685 }); 2686 } 2687 2688 //doc accordion 2689 2690 MeritCoreObj.docAccordion = function () { 2691 document.addEventListener('click', function (e) { 2692 if (e.target.classList.contains('merit-doc-head')) { 2693 e.target.nextElementSibling.classList.toggle("active-doc-menu-list"); 2694 } 2695 }); 2696 2697 2698 } 2699 2700 // category scroll to bottom 2701 MeritCoreObj.categoryScrollToBottom = function () { 2702 const scrollBtn = document.getElementById('merit-scroll-more'); 2703 2704 if (scrollBtn == null) { 2705 return false; 2706 } 2707 2708 scrollBtn.addEventListener('click', function () { 2709 2710 let scrollElement = this.parentElement.previousElementSibling; 2711 const scrollOptions = { 2712 top: scrollElement.scrollHeight, 2713 behavior: 'smooth' 2714 }; 2715 2716 scrollElement.scrollTo(scrollOptions); 2717 }); 2718 } 2719 2720 /** 2721 * Header sticky menu 2722 * @since 2723 */ 2724 MeritCoreObj.stickyMenu = function () { 2725 2726 window.addEventListener('scroll', function () { 2727 let bodyOffset = document.documentElement.scrollTop; 2728 const header = document.querySelector('.merit-site-header'); 2729 let forMobile = mdc_media_queries('max-lg'); 2730 2731 if (forMobile) { 2732 if (header == null) { 2733 return false; 2734 } 2735 if (bodyOffset > 100) { 2736 document.body.classList.add('sticky-header-triggered'); 2737 header.classList.add('active-sticky'); 2738 } else { 2739 document.body.classList.remove('sticky-header-triggered'); 2740 header.classList.remove('active-sticky'); 2741 } 2742 } 2743 2744 }); 2745 2746 const searchButton = document.querySelectorAll('.search-btn > img'); 2747 2748 if (searchButton == null) { 2749 return false; 2750 } 2751 searchButton.forEach(btn => { 2752 btn.addEventListener('click', function () { 2753 const search_wrapper = document.querySelector('.merit-search-area'); 2754 const search_field = document.querySelector('.search-form-input'); 2755 2756 if (search_wrapper) { 2757 search_wrapper.classList.toggle('active-search-wrapper'); 2758 } 2759 2760 if (search_field) { 2761 search_field.focus() 2762 } 2763 2764 }); 2765 }); 2766 2767 2768 const closeButton = document.querySelector('.close-btn'); 2769 2770 if (closeButton == null) { 2771 return false; 2772 } 2773 2774 closeButton.addEventListener('click', function () { 2775 const search_wrapper = document.querySelector('.merit-search-area'); 2776 search_wrapper.classList.remove('active-search-wrapper'); 2777 }) 2778 2779 }; 2780 2781 // footer accordion 2782 MeritCoreObj.footerAccordion = function () { 2783 2784 let widgetTitlte = document.querySelectorAll(".footer-title"); 2785 2786 if (widgetTitlte.length > 0) { 2787 2788 widgetTitlte.forEach(element => { 2789 2790 element.addEventListener("click", function () { 2791 if (this.nextElementSibling) { 2792 this.nextElementSibling.classList.toggle("active-menu-widget"); 2793 } 2794 }); 2795 2796 }); 2797 2798 } 2799 }; 2800 2801 // featured category 2802 MeritCoreObj.featuredCategoryEvent = function () { 2803 2804 // overlay background open on mobile 2805 function overlayBgOpen(screen, target) { 2806 if (!target) return; 2807 const overlayBg = target.querySelector('.featured-overlay-bg'); 2808 if (!overlayBg) return; 2809 2810 if (screen.matches) { 2811 overlayBg.classList.add('active-overlay-bg'); 2812 } else { 2813 overlayBg.classList.remove('active-overlay-bg'); 2814 } 2815 2816 } 2817 2818 // overlay background close on mobile 2819 function overlayBgClose(screen, target) { 2820 if (screen.matches && target) { 2821 target.classList.remove('active-overlay-bg'); 2822 } 2823 2824 } 2825 2826 document.addEventListener("click", function (e) { 2827 2828 if (e.target.classList.contains("overlay-btn")) { 2829 2830 let overlayDiv = e.target.closest('.merit-featured-area'); 2831 2832 if (overlayDiv) { 2833 let featuredOverlay = overlayDiv.querySelector('.featured-overlay'); 2834 if (featuredOverlay) { 2835 e.preventDefault(); 2836 let screen = window.matchMedia("(max-width: 1024px)"); 2837 featuredOverlay.classList.add("active-featured-overlay"); 2838 overlayBgOpen(screen, overlayDiv); 2839 } 2840 } 2841 2842 } 2843 2844 if (e.target.classList.contains("merit-overlay--close") || e.target.classList.contains("merit-overlay--times")) { 2845 let overlayDiv = e.target.closest(".featured-overlay"); 2846 2847 if (overlayDiv) { 2848 e.preventDefault(); 2849 let screen = window.matchMedia("(max-width: 1024px)"); 2850 overlayDiv.classList.remove("active-featured-overlay"); 2851 if (overlayDiv.previousElementSibling) { 2852 overlayBgClose(screen, overlayDiv.previousElementSibling); 2853 } 2854 } 2855 2856 } 2857 2858 }); 2859 2860 }; 2861 2862 // product sub menu open 2863 MeritCoreObj.openSubNavigation = function () { 2864 let subNavBtn = document.getElementById('sub-navigation'); 2865 let subNav = document.querySelector('.product-sub-navigation'); 2866 let lastScroll = 0; 2867 let subNavList = document.querySelector('.sub-navigation-content'); 2868 2869 if (!subNavBtn) { 2870 return; 2871 } 2872 2873 localStorage.setItem("mdcSubNav", 'open'); 2874 2875 subNavBtn.addEventListener('click', function (e) { 2876 if (this.nextElementSibling) { 2877 this.nextElementSibling.classList.toggle('active-navigation-list'); 2878 } 2879 subNav.classList.toggle('sub-nav-collapse'); 2880 2881 if (subNav.classList.contains('sub-nav-collapse')) { 2882 localStorage.setItem("mdcSubNav", 'closed'); 2883 } else { 2884 localStorage.setItem("mdcSubNav", 'open'); 2885 } 2886 }); 2887 2888 2889 document.addEventListener('scroll', function () { 2890 let currentScroll = document.documentElement.scrollTop; 2891 let mdcSubNavState = localStorage.getItem("mdcSubNav"); 2892 if ('open' == mdcSubNavState) { 2893 if (mdc_media_queries('lg')) { 2894 if (currentScroll < lastScroll) { 2895 subNav.classList.add('sub-nav-collapse'); 2896 subNavList.classList.add('active-navigation-list'); 2897 } else { 2898 subNav.classList.remove('sub-nav-collapse'); 2899 subNavList.classList.remove('active-navigation-list'); 2900 } 2901 } 2902 } 2903 2904 lastScroll = currentScroll <= 0 ? 0 : currentScroll; 2905 }); 2906 2907 if (mdc_media_queries()) { 2908 subNav.classList.add('sub-nav-collapse'); 2909 subNavList.classList.add('active-navigation-list'); 2910 } 2911 2912 window.addEventListener('resize', function () { 2913 if (mdc_media_queries()) { 2914 subNav.classList.add('sub-nav-collapse'); 2915 subNavList.classList.add('active-navigation-list'); 2916 } 2917 }); 2918 } 2919 2920 MeritCoreObj.documentLoadMore = function () { 2921 document.addEventListener('click', function (e) { 2922 if (e.target.classList.contains('document-load-more')) { 2923 let btnParent = e.target.parentElement; 2924 if (btnParent) { 2925 btnParent.classList.remove('merit-limited-doc'); 2926 } 2927 e.target.remove(); 2928 } 2929 }); 2930 } 2931 2932 MeritCoreObj.visionValueAccordion = function () { 2933 2934 document.addEventListener('click', function (e) { 2935 // merit visioni and value accordion 2936 if (e.target.classList.contains('merit-collapsible-card-title')) { 2937 e.target.classList.toggle('active-image-cart-title'); 2938 if (e.target.nextElementSibling) { 2939 e.target.nextElementSibling.classList.toggle('active-image-card-desc'); 2940 } 2941 } 2942 2943 // work with us accordion 2944 if (e.target.classList.contains('merit-icon-box-head')) { 2945 e.target.classList.toggle('active-icon-box-head'); 2946 if (e.target.nextElementSibling) { 2947 e.target.nextElementSibling.classList.toggle('active-icon-box-content'); 2948 } 2949 } 2950 }); 2951 2952 2953 } 2954 2955 MeritCoreObj.meritPageBannerBg = function () { 2956 2957 const banner = document.getElementById('merit-page-banner-wrap'); 2958 2959 if (banner === null) { 2960 return; 2961 } 2962 2963 let tabletBg = banner.dataset.tabletBg; 2964 let mobileBg = banner.dataset.mobileBg; 2965 let desktopBg = banner.dataset.desktopBg; 2966 let desktopSize = window.matchMedia("(min-width: 1025px)"); 2967 let tabletSize = window.matchMedia("(max-width: 1024px)"); 2968 let mobileSize = window.matchMedia("(max-width: 767px)"); 2969 2970 if (desktopSize.matches && desktopBg) { 2971 banner.dataset.bg = desktopBg; 2972 banner.style.backgroundImage = "url(" + desktopBg + ")"; 2973 } 2974 2975 if (tabletSize.matches && tabletBg) { 2976 banner.dataset.bg = tabletBg; 2977 banner.style.backgroundImage = "url(" + tabletBg + ")"; 2978 } 2979 2980 if (mobileSize.matches && mobileBg) { 2981 banner.dataset.bg = mobileBg; 2982 banner.style.backgroundImage = "url(" + mobileBg + ")"; 2983 } 2984 2985 window.addEventListener('resize', function () { 2986 2987 if (desktopSize.matches & desktopBg) { 2988 banner.dataset.bg = desktopBg; 2989 banner.style.backgroundImage = "url(" + desktopBg + ")"; 2990 } 2991 2992 if (tabletSize.matches & tabletBg) { 2993 banner.dataset.bg = tabletBg; 2994 banner.style.backgroundImage = "url(" + tabletBg + ")"; 2995 } 2996 2997 if (mobileSize.matches && mobileBg) { 2998 banner.dataset.bg = mobileBg; 2999 banner.style.backgroundImage = "url(" + mobileBg + ")"; 3000 } 3001 3002 }); 3003 3004 } 3005 3006 /** 3007 * merit FAQf 3008 * @returns Meru 3009 */ 3010 MeritCoreObj.meritFAQs = function () { 3011 3012 const faqHeading = document.querySelectorAll(".merit-faqs-heading"); 3013 3014 if (faqHeading === null) { 3015 return; 3016 } 3017 3018 faqHeading.forEach((faq) => { 3019 faq.onclick = function () { 3020 this.classList.toggle("is-open"); 3021 3022 let content = this.nextElementSibling; 3023 3024 if (content && content.style.maxHeight) { 3025 content.style.maxHeight = null; 3026 } else if (content) { 3027 content.style.maxHeight = content.scrollHeight + "px"; 3028 } 3029 } 3030 }); 3031 } 3032 3033 MeritCoreObj.meritVisualAccordion = function () { 3034
3035 const visualAccordionTitle = document.querySelectorAll(".visual-accordion-title"); 3036 3037 if (visualAccordionTitle === null) { 3038 return; 3039 } 3040 3041 visualAccordionTitle.forEach((accordion) => { 3042 accordion.onclick = function () { 3043 const isOpening = !this.classList.contains("is-open"); 3044 this.classList.toggle("is-open"); 3045 3046 // Refresh Slick slider when opening accordion 3047 if (isOpening) { 3048 setTimeout(() => { 3049 const sliders = this.parentElement.querySelectorAll('.merit-gallery-slider'); 3050 sliders.forEach(slider => { 3051 if (jQuery(slider).hasClass('slick-initialized')) { 3052 jQuery(slider).slick('setPosition'); 3053 } 3054 }); 3055 }, 10); 3056 } 3057 } 3058 }); 3059 } 3060 3061 MeritCoreObj.searchTab = function () { 3062 const tabBtns = document.querySelectorAll('.search-tab-nav'); 3063 const tabContent = document.querySelectorAll('.search-tab-content'); 3064 if (tabBtns) { 3065 tabBtns.forEach((btn, index) => { 3066 btn.addEventListener('click', function () { 3067 // tabBtns.forEach(btn2 => { 3068 // btn2.classList.remove('active', 'active-color'); 3069 // }); 3070 3071 btn.classList.add('active', 'active-color'); 3072 3073 tabContent.forEach(ele => { 3074 ele.style.display = 'none'; 3075 }); 3076 3077 tabContent[index].style.display = 'block'; 3078 }); 3079 }); 3080 } 3081 } 3082 3083 3084 3085 MeritCoreObj.initSelect2 = function () { 3086 let selectField = document.getElementById('merit-country-select'); 3087 3088 if (selectField) { 3089 selectField.select2(); 3090 } 3091 3092 } 3093 3094 MeritCoreObj.productSubMenu = function () { 3095 3096 const subMenuWrap = document.querySelector('.product-sub-navigation'); 3097 3098 if (!subMenuWrap) { 3099 return false; 3100 } 3101 3102 let html = ''; 3103 // const productHeaderLink = document.querySelector('.request-a-product-quote'); 3104 // const submenuMainLink = subMenuWrap.querySelector('.sub-nav-request'); 3105 let subMenuContainer = subMenuWrap.querySelector('#merit-product-menu'); 3106 3107 if (!subMenuContainer) { 3108 return false; 3109 } 3110 3111 const postType = subMenuContainer.getAttribute('data-type') ? subMenuContainer.getAttribute('data-type') : ''; 3112 // let section_titles = []; 3113 3114 if ('merit_product' == postType) { 3115 section_titles = document.querySelectorAll('.product-section-title'); 3116 } else { 3117 section_titles = document.querySelectorAll('.merit-section-title'); 3118 } 3119 3120 if (section_titles.length > 0) {
3121 section_titles.forEach(title => { 3122 let parentSection = title.closest('section'); 3123 3124 if (!parentSection.id) { 3125 let sectionTitle = title.innerText; 3126 if (sectionTitle) { 3127 let createId = sectionTitle.replace(/\s+/g, '_').toLowerCase(); 3128 parentSection.id = createId; 3129 } 3130 } 3131 3132 let sectinoID = parentSection.id; 3133 3134 html += '<li><a href="#' + sectinoID + '" class="hover:text-merit-red">' + title.innerText + '</a>'; 3135 }); 3136 } else { 3137 subMenuWrap.classList.add('hidden'); 3138 } 3139 3140 // if( productHeaderLink ){ 3141 // const productHeaderUrl = productHeaderLink.getAttribute('href'); 3142 // if( submenuMainLink && productHeaderUrl ){ 3143 // submenuMainLink.setAttribute('href', productHeaderUrl); 3144 // } 3145 // } 3146 3147 subMenuContainer.innerHTML = html; 3148 } 3149 3150 MeritCoreObj.regionMap = function (wrapper) { 3151 3152 if (!wrapper) { 3153 return false; 3154 } 3155 3156 let regionMap = wrapper.querySelector("#region-map-large area"); 3157 let meritRegionBox = document.querySelectorAll('.merit-region-box'); 3158 let midDesktop = window.matchMedia("(max-width: 1799px)"); 3159 let smallDestop = window.matchMedia("(max-width: 1535px)"); 3160 let extraSmallDesktop = window.matchMedia("(max-width: 1279px)"); 3161 let mobile = window.matchMedia("(max-width: 1025px)") 3162 3163 if (midDesktop.matches) { 3164 regionMap = wrapper.querySelector("#region-map-medium area"); 3165 } 3166 3167 if (smallDestop.matches) { 3168 regionMap = wrapper.querySelector("#region-map-small area"); 3169 } 3170 3171 if (extraSmallDesktop.matches) { 3172 regionMap = wrapper.querySelector("#region-map-extra-small area"); 3173 } 3174 3175 if (mobile.matches) { 3176 regionMap = wrapper.querySelector("#region-map-mobile area"); 3177 } 3178 3179 3180 if (!regionMap) { 3181 return false; 3182 } 3183 3184 regionMap.forEach((item) => { 3185 item.onclick = function () { 3186 let region = this.getAttribute("data-region"); 3187 3188 if (meritRegionBox) { 3189 meritRegionBox.forEach(item => { 3190 item.classList.remove('active-region'); 3191 }) 3192 } 3193 3194 if (region) { 3195 let regionARea = document.getElementById(region); 3196 regionARea.classList.add("active-region"); 3197 3198 setTimeout(function () { 3199 regionARea.classList.remove("active-region"); 3200 }, 3000); 3201 } 3202 }; 3203 }); 3204 } 3205 3206 3207 const getPrimaryCategoryNameList = async () => { 3208 3209 3210 const container = document.querySelector(".feature-primary-category-list"); 3211 3212 if (container === null) return false; 3213 3214 const response = await mdcRequestData("/mdc/category/primary"); 3215 3216 if (response) { 3217 const pCatlists = getUniqueCatList(response, 'NAME'); 3218 let html = ''; 3219 pCatlists.forEach(function (item, index) { 3220 html += `<li><a href="${mdcObj.site_url}/primary/${item.PARENT_CODE}/">${item.NAME}</a>`; 3221 }); 3222 3223 container.innerHTML = html; 3224 } 3225 3226 }; 3227 3228 MeritCoreObj.videoCard = function () { 3229 const btn = document.querySelector('.video-load-more-btn'); 3230 if (btn) { 3231 btn.onclick = function () { 3232 let $this = this; 3233 const videoBox = $this.parentElement ? $this.parentElement.previousElementSibling : null; 3234 const btnWrap = $this.parentElement; 3235 if (videoBox) { 3236 videoBox.classList.add('active-video-box'); 3237 } 3238 if (btnWrap) { 3239 btnWrap.style.display = 'none' 3240 } 3241 } 3242 } 3243 } 3244 3245 MeritCoreObj.meritPopup = function () { 3246 const meritPopup = document.getElementById('merit-product-popup'); 3247 3248 if (!meritPopup) { 3249 return false; 3250 } 3251 3252 const popupType = meritPopup.getAttribute('data-popup-type') || ''; 3253 const popupTitle = meritPopup.getAttribute('data-popup-title') || ''; 3254 const popupContent = meritPopup.getAttribute('data-popup-content') || ''; 3255 3256 setTimeout(function () { 3257 swal({ 3258 type: popupType, 3259 title: popupTitle, 3260 html: popupContent 3261 }); 3262 }, 1000); 3263 }; 3264 3265 3266 MeritCoreObj.facultyMember = function () { 3267 const FacultyMemberArea = document.querySelector('.course-member-content-area'); 3268 3269 if (!FacultyMemberArea) { 3270 return false;
3271 } 3272 const memeberThumb = FacultyMemberArea.querySelectorAll('.faculty-member-thumb'); 3273 const memeberInfoItems = FacultyMemberArea.querySelectorAll('.course-member-info-content'); 3274 3275 memeberThumb.forEach(thumb => { 3276 thumb.onclick = function () { 3277 const $this = this; 3278 const memeberID = $this.getAttribute('data-member-id'); 3279 3280 memeberThumb.forEach(innerThumb => { 3281 innerThumb.classList.remove('active-faculty-thumb'); 3282 }); 3283 3284 $this.classList.add('active-faculty-thumb'); 3285 3286 if (memeberInfoItems) { 3287 memeberInfoItems.forEach(memeber => { 3288 memeber.style.display = 'none' 3289 }) 3290 } 3291 3292 if (memeberID) { 3293 const singleMember = FacultyMemberArea.querySelector('#' + memeberID); 3294 singleMember.style.display = 'block'; 3295 } 3296 } 3297 3298 thumb.onmouseover = function () { 3299 const $this = this; 3300 const memeberID = $this.getAttribute('data-member-id'); 3301 3302 3303 if (memeberInfoItems) { 3304 memeberInfoItems.forEach(memeber => { 3305 memeber.style.display = 'none'; 3306 }) 3307 } 3308 3309 if (memeberID) { 3310 const singleMember = FacultyMemberArea.querySelector('#' + memeberID); 3311 singleMember.style.display = 'block'; 3312 } 3313 } 3314 }); 3315 3316 } 3317 3318 MeritCoreObj.webinarHover = function () { 3319 const webinarContainer = document.querySelectorAll('.webinar-content-wrap'); 3320 3321 if (webinarContainer.length > 0) { 3322 for (let container of webinarContainer) { 3323 const courseCard = container.querySelectorAll('.webinar-course-card'); 3324 3325 if (courseCard) { 3326 courseCard.forEach(card => { 3327 card.onmouseover = function () { 3328 const $this = this; 3329 const webinarData = $this.getAttribute('data-webinar'); 3330 const webinarMetas = container.querySelectorAll('.webninar-meta-data'); 3331 if (webinarMetas) { 3332 webinarMetas.forEach(meta => { 3333 meta.style.display = 'none' 3334 }); 3335 } 3336 if (webinarData) { 3337 const webinarMeta = container.querySelector('#' + webinarData); 3338 webinarMeta.style.display = 'block' 3339 } 3340 } 3341 }); 3342 } 3343 } 3344 } 3345 } 3346 3347 let setCrossIconOnCourseAndEducationSearchField = function ($inputFieldClassName) { 3348 let courseSeachField = document.getElementById($inputFieldClassName); 3349 let displayCrossIconField = document.querySelector(".display-cross-icon"); 3350 if (null == courseSeachField || null == displayCrossIconField) { 3351 return false; 3352 } 3353 courseSeachField.addEventListener("keyup", function (event) { 3354 displayCrossIconField.classList.remove("hidden"); 3355 }); 3356 3357 } 3358 3359 // 404 page 3360 MeritCoreObj.suggested_contentSlider = function () { 3361 3362 let slider = jQuery('.suggested_content'); 3363 3364 let leftArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20.71" height="35.667" viewBox="0 0 20.71 35.667"> 3365 <path id="icons8-more-than-64" d="M23.75,2.008l2,2.185L8.723,19.836,25.749,35.467l-2,2.208L5.516,20.928a1.491,1.491,0,0,1,0-2.185Z" transform="translate(-5.039 -2.008)" fill="#332A2A"/> 3366 </svg>`; 3367 let rightArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20.71" height="35.667" viewBox="0 0 20.71 35.667"> 3368 <path id="icons8-more-than-64" d="M7.038,2.008l-2,2.185L22.065,19.836,5.039,35.467l2,2.208L25.273,20.928a1.491,1.491,0,0,0,0-2.185Z" transform="translate(-5.039 -2.008)" fill="#332A2A"/> 3369 </svg>`; 3370 3371 if (slider && mdc_media_queries()) { 3372 if (!slider.hasClass('slick-initialized')) { 3373 slider.slick({ 3374 dots: true, 3375 slidesToShow: 1, 3376 adaptiveHeight: true, 3377 dotsClass: 'related-product-dots', 3378 prevArrow: '<button type="button" class="slick-prev relate-arrow">' + leftArrow + '</button>', 3379 nextArrow: '<button type="button" class="slick-next relate-arrow">' + rightArrow + '</button>', 3380 }); 3381 } 3382 } else { 3383 if (slider.hasClass('slick-initialized')) { 3384 slider.slick('unslick'); 3385 } 3386 } 3387 3388 3389 3390 } 3391 3392 MeritCoreObj.infoboxVideo = async function () { 3393 const palyBtns = document.querySelectorAll('.mdc-start-infobox-video'); 3394 3395 if (palyBtns && mdc_media_queries('lg')) { 3396 palyBtns.forEach(btn => { 3397 3398 btn.addEventListener('click', function () {
3399 let $this = this; 3400 const videoArea = $this.nextElementSibling; 3401 $this.classList.add('hidden'); 3402 3403 if (videoArea) { 3404 const iframeSrc = videoArea.src; 3405 const url = new URL(iframeSrc); 3406 url.searchParams.set('autoplay', '1'); 3407 3408 videoArea.src = url; 3409 } 3410 3411 3412 }) 3413 }); 3414 3415 } 3416 3417 } 3418 3419 setCrossIconOnCourseAndEducationSearchField("merit-courses"); 3420 setCrossIconOnCourseAndEducationSearchField("merit-product-cat-search"); 3421 3422 getPrimaryCategoryNameList(); 3423 MeritCoreObj.meritFAQs(); 3424 MeritCoreObj.menuToggle(); 3425 MeritCoreObj.stickyMenu(); 3426 MeritCoreObj.meritVisualAccordion(); 3427 MeritCoreObj.footerAccordion(); 3428 MeritCoreObj.featuredCategoryEvent(); 3429 MeritCoreObj.docAccordion(); 3430 MeritCoreObj.categoryScrollToBottom(); 3431 MeritCoreObj.openSubNavigation(); 3432 MeritCoreObj.documentLoadMore(); 3433 MeritCoreObj.visionValueAccordion(); 3434 MeritCoreObj.meritPageBannerBg(); 3435 MeritCoreObj.productSubMenu(); 3436 //MeritCoreObj.counterySelector(); 3437 MeritCoreObj.languageSelector(); 3438 MeritCoreObj.videoCard(); 3439 MeritCoreObj.meritPopup(); 3440 MeritCoreObj.facultyMember(); 3441 MeritCoreObj.webinarHover(); 3442 3443 const mdc_interective_map_wrapper = document.querySelector("#interective_map"); 3444 MeritCoreObj.regionMap(mdc_interective_map_wrapper); 3445 window.onresize = function () { 3446 MeritCoreObj.regionMap(mdc_interective_map_wrapper); 3447 } 3448 3449 MeritCoreObj.suggested_contentSlider(); 3450 3451 MeritCoreObj.infoboxVideo(); 3452 3453 3454 window.addEventListener('resize', function () { 3455 MeritCoreObj.suggested_contentSlider(); 3456 }) 3457 3458 3459 3460})(); 3461; 3462;(function () { 3463 const siteUrl = mdcObj.site_url; 3464 const meritApi = mdcObj.merit_api; 3465 const restUrl = mdcObj.rest_url; 3466 3467 /** 3468 * Merit global javascript 3469 */ 3470 let meritGlobal = function(){ 3471 3472 const getSupportVideo = async ( endpoint ) => { 3473 if( ! endpoint ) return false; 3474 const supportVideoWrap = document.querySelector('.support-video-card-wrap'); 3475 if( null === supportVideoWrap ) return false; 3476 3477 supportVideoWrap.innerText = ''; 3478 const response = await meritFeatchData(endpoint); 3479 const data = response.response; 3480 if ( data ) { 3481 let videoItem =`<div class="products-video-card merit-box-shadow w-2/3 max-sm:w-full mx-auto mt-10 "> 3482 <div class="products-video-thumb"> 3483 <a href="${data.link}" target="_blank"> 3484 <img src="${data.image}" class="w-full" alt="${data.title}"> 3485 </a> 3486 </div> 3487 <div class="video-card-content pl-6 pt-6 pb-9"> 3488 <h2 class="text-2xl text-merit-red">${data.title}</h2> 3489 <p class="pt-4">${data.description}</p> 3490 <a class="merit-btn-hv-bright-red mt-6" href="${data.link}" target="_blank">Go To Video</a> 3491 </div> 3492 </div>`; 3493 3494 supportVideoWrap.innerHTML = videoItem; 3495 } 3496 3497 return true; 3498 }; 3499 3500 const getClosestOffice = async ( endpoint ) =>{ 3501 if( ! endpoint ) return false; 3502 3503 const officeInfoWwrap = document.querySelector('.merit-office-location-wrap'); 3504 3505 if( null == officeInfoWwrap ){ 3506 return false; 3507 } 3508 3509 const response = await meritFeatchData(endpoint); 3510 3511 if( response.length > 0 ){ 3512 const iconPath = mdcObj.icon_path; 3513 let officeLocation = ''; 3514 response.map( location => { 3515 const {title, address, country, fax, phone_1, phone_2, state, distributors, email} = location; 3516 const {facebook, instagram, linkedin, twitter, youtube} = location.social_links; 3517 3518 officeLocation = `<div class="location-heading mb-7"> 3519 <h3 class="inline text-2xl font-normal merit-office-title">Merit Medical ${title} Ltd.</h3> 3520 </div> 3521 <div class="location-info mb-24"> 3522 <ul class="merit-contact-ireland"> 3523 ${ address ? `<li class="flex">
3524 <span><img src="${iconPath}place-marker-dark.png" alt="" width="23" height="23"></span> 3525 <p class="mb-4 text-charcoal underline text-lg cursor-pointer pl-9 leading-6">${address}</p> 3526 </li>` : ''} 3527 ${ phone_1 ? ` <li class="flex"> 3528 <span><img src="${iconPath}phone-dark.png" alt="" width="23" height="23"></span> 3529 <a href="tel:${phone_1}" class="mb-4 text-charcoal underline text-lg cursor-pointer pl-9">${phone_1}</a> 3530 </li>` : ''} 3531 ${ phone_2 ? ` <li class="flex"> 3532 <span><img src="${iconPath}phone-dark.png" alt="" width="23" height="23"></span> 3533 <a href="tel:${phone_2}" class="mb-4 text-charcoal underline text-lg cursor-pointer pl-9">${phone_2}</a> 3534 </li>` : ''} 3535 ${ email ? ` <li class="flex"> 3536 <span><img src="${iconPath}email-dark.png" alt="" width="23" height="23"></span> 3537 <a href="mailto:${email}" class="mb-4 text-charcoal underline text-lg cursor-pointer pl-9">Contact Merit via email</a> 3538 </li>` : ''} 3539 ${ distributors ? ` <li class="flex"> 3540 <span><img src="${iconPath}internet-dark.png" alt="" width="23" height="23"></span> 3541 <a href="${distributors}" class="mb-4 text-charcoal underline text-lg cursor-pointer pl-9">Distributor</a> 3542 </li>` : ''} 3543 </ul> 3544 </div> 3545 <div class="merit-social"> 3546 ${ facebook ? `<a href="${facebook}" class="cursor-pointer"><img src="${iconPath}facebook-dark.png" alt="facebook-icon" class="max-w-full" width="34" height="34"></a>` : ''} 3547 ${ instagram ? `<a href="${instagram}" class="cursor-pointer ml-8 max-lg:ml-4"><img src="${iconPath}instagram-dark.png" alt="instagram-icon" class="max-w-full" width="34" height="34"></a>` : ''} 3548 ${ linkedin ? `<a href="${linkedin}" class="cursor-pointer ml-8 max-lg:ml-4"><img src="${iconPath}linkedIn-dark.png" alt="linkedin-icon" class="max-w-full" width="34" height="34"></a>` : ''} 3549 ${ twitter ? `<a href="${twitter}" class="cursor-pointer ml-8 max-lg:ml-4"><img src="${iconPath}twitter-dark.png" alt="twitter-icon" class="max-w-full" width="34" height="34"></a>` : ''} 3550 ${ youtube ? `<a href="${youtube}" class="cursor-pointer ml-8 max-lg:ml-4"><img src="${iconPath}youtube-dark.png" alt="youtube-icon" class="max-w-full" width="34" height="34"></a>` : ''} 3551 </div>` 3552 }); 3553 3554 officeInfoWwrap.innerHTML = officeLocation; 3555 }else{ 3556 officeInfoWwrap.innerHTML = "<h3 class='text-xl leading-2 text-merit-red'>Merit Medical Closest office not found!<h3/>"; 3557 } 3558 } 3559 3560 /** 3561 * Global main 3562 */ 3563 const main = () => { 3564 let endpoint = ''; 3565 /** 3566 * Support video select 3567 */ 3568 const supportVideoSelect = document.getElementById('merit-video-select'); 3569 if( supportVideoSelect ){ 3570 supportVideoSelect.onchange = ( event ) =>{ 3571 endpoint = `merit-core/v1/videoby-id?id=${ Number( event.target.value ) }`; 3572 getSupportVideo( endpoint ) 3573 } 3574 } 3575 3576 /** 3577 * home page Product Category 3578 */ 3579 const featuredProductCatContainer = document.querySelector('featured-category--list-wrap'); 3580 if( featuredProductCatContainer ){ 3581 endpoint = `${meritApi}/mdc/category/primary`; 3582 getFeaturedProductCat( endpoint ) 3583 } 3584 3585 const selectedCountry = mdcGetCookie('selected_country'); 3586 let countryId = 809051; 3587 3588 if( selectedCountry ){ 3589 const countryObj = JSON.parse(selectedCountry); 3590 countryId = Number(countryObj.closest_office); 3591 } 3592 3593 endpoint = `merit-core/v1/location-by-id?id=${countryId}`; 3594 getClosestOffice(endpoint); 3595 3596 } 3597 3598 return{ 3599 init:main, 3600 } 3601 3602 }(); 3603 3604 meritGlobal.init(); 3605 3606}
3606)();; 3607jQuery(document).ready(function(e){function t(e){for(var t=e+"=",a=document.cookie.split(";"),i=0;i<a.length;i++){for(var r=a[i];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return r.substring(t.length,r.length)}return""}function a(e){var t,a,i=decodeURIComponent(window.location.search.substring(1)).split("&");for(a=0;a<i.length;a++)if((t=i[a].split("="))[0]===e)return void 0===t[1]||t[1]}if(e('iframe[src*="youtube.com"]').each(function(){var t=e(this).attr("src");-1==t.indexOf("rel=0")&&e(this).attr("src",t+"&rel=0")}),e(document).on("click","a.mfp-iframe",function(){e("iframe.mfp-iframe").each(function(){var t=e(this).attr("src");-1==t.indexOf("rel=0")&&e(this).attr("src",t+"&rel=0")})}),e(document).on("click",".merit-ad-banner .ad-banner-close",function(){e(this).parent().hide(0)}),e("#code-data-tables").length){var i=e("#code-data-tables table").DataTable({columnDefs:[{targets:0,searchable:!1},{targets:1,searchable:!0},{targets:2,searchable:!1}],iDisplayLength:25,language:{zeroRecords:"No C-Code found for this part number."}});e("#code-data-tables .dataTables_info,#code-data-tables .dataTables_paginate").hide(),e("#code-search").on("keyup",function(t){e("#code-data-tables table,#code-data-tables .dataTables_info,#code-data-tables .dataTables_paginate").show();var a=e(this).val();i.search(a).draw()})}function r(t){if(e(t).length){var a=e(t).find(":selected").val();e(".merit-job-listings .merit-job-info,.merit-job-listings .merit-job-listing").hide(0),e("#merit_job_info_"+a).show(),e("#merit_job_feed_"+a).show()}}e(".search-menu").click(function(t){t.preventDefault(),e("#search-form-container").toggle()}),e.fn.wrapInTag=function(t){var a=t.tag||"sup",i=RegExp((t.words||[]).join("|"),"gi"),r="<"+a+">$&</"+a+">";return this.html(function(){return e(this).text().replace(i,r)})},e("#product_title h1,h1.main-title.entry-title,.product-filter a:not(a:has(img)),.single-related-product a:not(a:has(img)),.sidebar a:not(a:has(img))").wrapInTag({tag:"sup",words:["\xae","™"]}),e(".sidebar a,.single-related-product h4").each(function(){e(this).html(e(this).html().replace(/®/gi,'<span class="reg">®</span>').replace(/®/gi,'<span class="reg">®</span>')),e(this).html(e(this).html().replace(/™/gi,'<span class="trade">™</span>').replace(/™/gi,'<span class="trade">™</span>'))}),e(".widget_archive ul li a").each(function(){var t=e(this);t.text().match("2015")&&t.parent().css("display","none"),t.text().match("2014")&&t.parent().css("display","none"),t.text().match("2013")&&t.parent().css("display","none"),t.text().match("2012")&&t.parent().css("display","none"),t.text().match("2011")&&t.parent().css("display","none")}),e(".single-post .entry-content-wrapper .entry-content-header>h1.post-title").length&&e(".single-post .entry-content-wrapper .entry-content-header>h1.post-title").remove(),e(".hero-video-link").length>0&&e(".hero-video-link").magnificPopup({type:"iframe",iframe:{patterns:{youtube:{index:"youtube.com/",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"}}}}),window.location.hash&&"#showvideo"==window.location.hash&&e(".hero-video-link").length&&e(".hero-video-link").trigger("click"),e(".merit-location-carousel").length&&e(".merit-location-carousel").owlCarousel({loop:!0,margin:10,responsiveClass:!0,items:3,nav:!0,responsive:{0:{items:1,nav:!0},600:{items:2,nav:!0},1e3:{items:3,nav:!0,loop:!1}}}),r("#merit_job_locations"),e("#merit_job_locations").on("change",function(){r("#merit_job_locations")}),e(".merit-icon-box").length&&setTimeout(function(){e(".merit-icon-box").matchHeight()},200),e(".merit-match-height").length&&setTimeout(function(){e(".merit-match-height").matchHeight()},200),"fr-FR"===e("html").attr("lang")&&""==t("fr_agree")&&swal({type:"warning",title:"",text:"En application de la loi du 29 d\xe9cembre 2011 relative au renforcement de la s\xe9curit\xe9 sanitaire des produits de sant\xe9 (dite loi \xab Bertrand \xbb), je certifie \xeatre un professionnel de sant\xe9 et \xeatre ainsi autoris\xe9 \xe0 acc\xe9der \xe0 cet espace."}).then(function(){var e,t,a;e=!0,(t=new Date).setTime(t.getTime()+31536e6),a="expires="+t.toUTCString(),document.cookie="fr_agree="+e+";"+a+";path=/"});var n=e(".demo-content-box");function o(e,t){var a=e.split("@");return 2===a.length&&a[1]===t}function s(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())}function l(t){var a=e(t);a.length>0&&a.owlCarousel({items:1,lazyLoad:!0,lazyLoadEager:1,loop:!0,margin:0,autoHeight:!0,autoplay:!0,autoplayHoverPause:!0,dots:!1})}n.length&&n.on("hover",function(){n.removeClass("rs-active"),e(this).addClass("rs-active")});var c="showresource";function d(a,i,r){e.ajax({type:"POST",url:meritChildAjax.ajaxurl,data:{action:"ajax_resource",cookie:t(c),email:a,source:i},dataType:"json",success:function(e){return r(e),!0}})}e("#physician-resource-form").length>0&&e("#physician-resource-form").hasClass("type__endotek")&&(c="show_endotek_resource"),p=e(".widget.home-press-release .feedzy-rss"),0!=p.length&&e.ajax({type:"POST",url:meritChildAjax.ajaxurl,data:{action:"press_releases_callback"},success:function(e){"200"==e.code&&p.empty().append(e.data)},error:function(e,t,a){console.log(e,t,a)}}),e("#newproduct").length>0&&e("#newproduct").dataTable({responsive:{details:!0}});var u=document.getElementById("home-video"),f=!1;if(u&&(u.onplay=function(){f||(f=!0,dataLayer.push({event:"home_video_play"}))}),function(){var t=e("#brochure_tab"),a=e("#instructions_tab");if(t.length>0||a.length>0){var i=e("#brochure_tab_btn"),r=e("#instructions_tab_btn");t.show(),a.hide(),i.click(function(i){i.preventDefault(),e(this).addClass("active"),r.removeClass("active"),t.show(0),a.hide(0)}),r.click(function(r){r.preventDefault(),e(this).addClass("active"),i.removeClass("active"),t.hide(0),a.show(0)})}}(),!function(){var t=e(".merit-order-dataTable");if(0!=t.length){var i=t.dataTable({paging:!1,ordering:!0,responsive:{details:!0},drawCallback:function(t){var i=this.api();(function t(a){if(void 0!==a){var i=e(".merit-order-dataTable td:contains("+a+")");i.length>0&&(e('p[data-fake-id="#toggle-id-3"]').length>0&&(e('p[data-fake-id="#toggle-id-3"]').addClass("activeTitle"),e("#toggle-id-3-container").addClass("active_tc").css("display","block")),setTimeout(function(){e("html,body").animate({scrollTop:i.offset().top-e("#header").height()-50},550),i.trigger("click")},50))}})(a("catalog_id")),r(i)}}).api();e(window).resize(function(){r(i)})}function r(e){a("product_code")&&setTimeout(function(){e.rows(":not(.parent)").nodes().to$().find("td:first-child").trigger("click")},100)}}(),e("#home-video").length>0&&e("#home-video").prop("muted",!0),e(document.body).on("click","#ifu_tabs ul.tabs li",function(){var t=e(this).attr("data-tab");e("#ifu_tabs ul.tabs li").removeClass("current"),e("#ifu_tabs .tab-content").removeClass("current"),e(this).addClass("current"),e("#"+t).addClass("current")}),e(".top-content-catalog span.sidebar-subtitle").click(function(t){t.preventDefault(),e(this).siblings("ul").hasClass("active")?(e(this).siblings("ul").not(":animated").toggleClass("active").slideToggle(),e(this).toggleClass("active")):(e(".top-content-catalog ul.sidebar-list.active").not(":animated").removeClass("active").slideUp(),e(this).siblings("ul").not(":animated").toggleClass("active").slideToggle(),e(".top-content-catalog span.sidebar-subtitle").removeClass("active"),e(this).toggleClass("active"))}),e("#data-tables").length){var p,h,v=e("#data-tables table").DataTable({responsive:!0,columnDefs:[{targets:[0],orderData:[0,1]},{targets:[1],orderData:[1,0]},{targets:[2],orderData:[2,0]}
3607],iDisplayLength:25,submitOnReturn:!0,fnDrawCallback:function(){},initComplete:function(t,a){var i;(i=sessionStorage.getItem("productFilter"))&&""!=i&&(i=JSON.parse(i),e("#product-search").val(i.search),e("#filter-type").val(i.type),e("#filter-portfolio").val(i.portfolio),e("#filter-division").val(i.division),v.draw()),e("#product-search").keyup(function(){g()}),e("#filter-type, #filter-portfolio, #filter-division").change(function(){g()})},language:{url:"https://www.merit.com/datatable-lang/"+e("html").attr("lang")+".txt"}});function g(){var t=e("#product-search").val(),a=e("#filter-type").val(),i=e("#filter-portfolio").val(),r=e("#filter-division").val(),n=JSON.stringify({search:t,type:a,portfolio:i,division:r});sessionStorage.setItem("productFilter",n)}function m(){var t=v.page.info(),a=t.start;0===a?e(".controls .first, .controls .prev").attr("disabled",!0).addClass("disabled"):e(".controls .first, .controls .prev").attr("disabled",!1).removeClass("disabled"),t.page===t.pages-1?e(".controls .last, .controls .next").attr("disabled",!0).addClass("disabled"):e(".controls .last, .controls .next").attr("disabled",!1).removeClass("disabled");var i="";0!==t.pages&&(i="Showing "+(a+1)+" to "+t.end+" of "+t.recordsDisplay+" entries."),e(".stats").html(i)}function $(){var e=document.getElementById("product-search").value,t=document.getElementById("filter-type").value,a=document.getElementById("filter-portfolio").value,i=document.getElementById("filter-division").value,r=y(e,null,a,i),n=y(e,t,null,i),o=y(e,t,a,null);!function e(t,a,i){for(var r=document.getElementById("filter-type").children,n=0;n<r.length;n++)if(""!==r[n].value){var o=b(L(r[n].value),t.types);r[n].innerHTML=r[n].value+" ("+o+" results)",0===o?r[n].classList.add("hide"):r[n].classList.remove("hide")}for(var s=document.getElementById("filter-portfolio").children,n=0;n<s.length;n++)if(""!==s[n].value){var o=b(L(s[n].value),a.portfolios);s[n].innerHTML=s[n].value+" ("+o+" results)",0===o?s[n].classList.add("hide"):s[n].classList.remove("hide")}for(var l=document.getElementById("filter-division").children,n=0;n<l.length;n++)if(""!==l[n].value){var o=b(L(l[n].value),i.divisions);l[n].innerHTML=l[n].value+" ("+o+" results)",0===o?l[n].classList.add("hide"):l[n].classList.remove("hide")}}(r,n,o)}function b(e,t){for(var a=0,i=0;i<t.length;i++)t[i]===e&&a++;return a}function y(e,t,a,i){for(var r=v.data(),n={types:[],portfolios:[],divisions:[],data:[]},o=0;o<r.length;o++){var s=", <br>",l=r[o][1].toLowerCase().split(s),c=r[o][2].toLowerCase().split(s),d=r[o][3].toLowerCase().split(s),u=r[o][1].split(s),f=r[o][2].split(s),p=r[o][3].split(s);(null==e||""===e||-1!==C(r[o][0]).toLowerCase().indexOf(e.toLowerCase())||-1!==r[o][1].toLowerCase().indexOf(e.toLowerCase())||-1!==r[o][2].toLowerCase().indexOf(e.toLowerCase())||-1!==x(r[o][0]).toLowerCase().indexOf(e.toLowerCase())||-1!==x(r[o][1]).toLowerCase().indexOf(e.toLowerCase())||-1!==x(r[o][2]).toLowerCase().indexOf(e.toLowerCase()))&&(null==t||""===t||-1!==l.indexOf(w(t)))&&(null==a||""===a||-1!==c.indexOf(w(a)))&&(null==i||""===i||-1!==d.indexOf(w(i)))&&(n.data.push(r[o]),n.types.push.apply(n.types,u),n.portfolios.push.apply(n.portfolios,f),n.divisions.push.apply(n.divisions,p))}return n}function _(){document.getElementById("product-search").value="",document.getElementById("filter-type").selectedIndex=0,document.getElementById("filter-portfolio").selectedIndex=0,document.getElementById("filter-division").selectedIndex=0,v.draw()}function w(e){return e=(e=e.toLowerCase()).replace(/&/,"&")}function C(t){var a;return(a=document.createElement("div")).innerHTML=t,anchor=a.querySelector("a"),e.trim(anchor.text)}function x(e){return e=e.replace(/<br>/,"")}function L(e){return e=e.replace(/&/,"&")}e("#product-search").on("keyup",function(t){var a=e(this).val();v.search(a).draw(),m(),$()}),e(".product-filter form").on("submit",function(e){e.preventDefault()}),e.fn.dataTable.ext.search.push(function(t,a,i){var r="^(.*?, )?",n="(, .*?)?$",o=e(".filter-type").val(),s=e(".filter-portfolio").val(),l=e(".filter-division").val(),c=a[1],d=a[2],u=a[3];return(""===(o=o.replace(/(?=[()])/g,"\\"))||-1!==c.search(r+o+n))&&(""===s||-1!==d.search(r+s+n))&&(""===l||-1!==u.search(r+l+n))}),e(".filter").on("change",function t(){e(this).val(),e(this).attr("data-column"),v.draw(),$(),m()}),e(".view select").on("change",function(){var t;null!=(t=e(this).val())?v.page.len(t).draw():v.page.len(10).draw(),m(),m()}),$(),(h=document.querySelector(".filters .toggle")).addEventListener("click",function(e){h.parentNode.classList.toggle("active"),e.preventDefault()}),function t(){if(e("#product-search").val()){var a=e("#product-search").val();v.search(a).draw(),m(),$()}if(e("#filter-division").val()){var a=e("#filter-division").val();v.search(a).draw(),m(),$()}if(e("#filter-portfolio").val()){var a=e("#filter-portfolio").val();v.search(a).draw(),m(),$()}if(e("#filter-type").val()){var a=e("#filter-type").val();v.search(a).draw(),m(),$()}}(),m()}});; 3608( function ( $ ) { 3609 3610 3611 function meritResourceRegistrationInit(){ 3612 3613 3614 3615 var resourceContent = $('.page-template-resource .merit-template-section'); 3616 3617 var resource_cookie_name = 'mdc_resource'; 3618 3619 var staticAsset = resourceContent.find('#merit-resource__static_assets'); 3620 var dynamicAsset = resourceContent.find('#merit-resource__dynamic_assets'); 3621 var resourceFormWrapper = resourceContent.find('#merit-resource__registration_form'); 3622 var resourceFormId = resourceFormWrapper.data("formid"); 3623 var sourceId = resourceFormWrapper.data("sourceid"); 3624 3625 var form = resourceFormWrapper.find(".gform_wrapper"); 3626 3627 3628 function emailDomainCheck(email, domain) 3629 { 3630 var parts = email.split('@'); 3631 if (parts.length === 2) { 3632 if (parts[1] === domain) { 3633 return true; 3634 } 3635 } 3636 return false;
3637 } 3638 3639 function validateEmail(email) { 3640 var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; 3641 return re.test(String(email).toLowerCase()); 3642 } 3643 3644 function setCookie(cname, cvalue, exdays) { 3645 var d = new Date(); 3646 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 3647 var expires = "expires="+d.toUTCString(); 3648 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 3649 } 3650 3651 function getCookie(cname) { 3652 var name = cname + "="; 3653 var ca = document.cookie.split(';'); 3654 for(var i = 0; i < ca.length; i++) { 3655 var c = ca[i]; 3656 while (c.charAt(0) == ' ') { 3657 c = c.substring(1); 3658 } 3659 if (c.indexOf(name) == 0) { 3660 return c.substring(name.length, c.length); 3661 } 3662 } 3663 return ""; 3664 } 3665 3666 3667 function getResource(email, source, callback){ 3668 3669 $.ajax({ 3670 type: "POST", 3671 url: meritChildAjax.ajaxurl, 3672 data: { 3673 action: "resource_data", 3674 cookie: getCookie(resource_cookie_name), 3675 email: email, 3676 source: source, 3677 nonce: meritChildAjax.resource_data_nonce 3678 }, 3679 dataType: 'json', 3680 success: function (data) { 3681 //console.log(data) 3682 callback(data); 3683 return true; 3684 } 3685 }); 3686 3687 3688 } 3689 3690 3691 //Do initial check 3692 3693 if(getCookie(resource_cookie_name)){ 3694 3695 //console.log(sourceId); 3696 3697 getResource( null, sourceId, function (data) { 3698 3699 //console.log(data); 3700 3701 if(data.code == '200') { 3702 3703 //Hide form 3704 resourceFormWrapper.hide(0); 3705 //show dynamic content 3706 dynamicAsset.show(0); 3707 dynamicAsset.find('.resource-container').empty().append(data.data); 3708 3709 3710 } 3711 if(data.code == '500') { 3712 3713 $physicianDynamicAsset.find(".message").empty().append(data.data); 3714 3715 } 3716 3717 3718 3719 }); 3720 3721 }else{ 3722 3723 //show static content 3724 3725 //hide loader 3726 3727 //show static content 3728 staticAsset.show(); 3729 3730 } 3731 3732 3733 $(document).on("gform_confirmation_loaded", function (event, formId) { 3734 //console.log(event) 3735 //console.log(formId) 3736 // code to run upon successful form submission 3737 if(formId == resourceFormId) { 3738 3739 //create cookie on the browser 3740 setCookie(resource_cookie_name, true, 365); 3741 3742 //Hide form 3743 resourceFormWrapper.hide(0); 3744 3745 getResource( null, sourceId, function (data) { 3746 3747 //console.log(data); 3748 3749 if(data.code == '200') { 3750 3751 //Hide form 3752 resourceFormWrapper.hide(0); 3753 //show dynamic content 3754 dynamicAsset.show(0); 3755 dynamicAsset.find('.resource-container').empty().append(data.data); 3756 3757 } 3758 if(data.code == '500') { 3759 3760 $physicianDynamicAsset.find(".message").empty().append(data.data); 3761 3762 } 3763 3764 3765 }); 3766 3767 } 3768 3769 }); 3770 3771 3772 3773$(document).on('click', '#merit-resource__registration_form .ufe-resource-email-check', function(e){ 3774 3775 e.preventDefault(); 3776 3777 var $this = $(this); 3778 3779 var emailContainer = form.find('.ginput_container_email'); 3780 3781 var email = form.find("input[type=email]").val(); 3782 3783 emailContainer.find(".error").remove(); 3784 3785 //show loader 3786 3787 $this.addClass('loading'); 3788 3789 //Check email 3790 if( !email || !validateEmail(email)) { 3791 3792 emailContainer.append('<label class="error">Please add a valid email address.</label>'); 3793 //hide loader 3794 $this.removeClass('loading'); 3795 3796 return false;
3797 3798 } 3799 3800 //Check merit email 3801 if( emailDomainCheck(email,'merit.com')) { 3802 3803 //console.log('merit email') 3804 //create cookie on the browser 3805 setCookie(resource_cookie_name, true, 365); 3806 3807 getResource( email, sourceId, function (data) { 3808 3809 //console.log(data); 3810 3811 if(data.code == '200') { 3812 3813 //Hide form 3814 resourceFormWrapper.hide(0); 3815 //show dynamic content 3816 dynamicAsset.show(0); 3817 dynamicAsset.find('.resource-container').empty().append(data.data); 3818 3819 3820 } 3821 if(data.code == '500') { 3822 3823 dynamicAsset.find(".message").empty().append(data.data); 3824 3825 } 3826 3827 3828 }); 3829 3830 3831 }else{ 3832 //other email 3833 3834 getResource( email, sourceId, function (data) { 3835 //console.log(data) 3836 3837 //email verificaiton failed! 3838 if(data.code == '500') { 3839 3840 emailContainer.append('<label class="error">'+data.data+'</label>'); 3841 3842 //hide loader 3843 $this.removeClass('loading'); 3844 3845 } 3846 3847 //need more data from user 3848 if(data.code == '300') { 3849 $this.hide(0); 3850 //show the rest of the form to collect more data 3851 form.closest('div').addClass('physician-resource-center-full-form'); 3852 //make email input disabled for further edit 3853 form.find("input[type=email]").attr('readonly', 'readonly'); 3854 3855 3856 } 3857 3858 //all good! show content 3859 if(data.code == '200') { 3860 3861 //Hide form 3862 resourceFormWrapper.hide(0); 3863 dynamicAsset.show(0); 3864 dynamicAsset.find('.resource-container').empty().append(data.data); 3865 3866 //create cookie on the browser 3867 setCookie(resource_cookie_name, true, 365); 3868 3869 } 3870 3871 3872 }); 3873 3874 } 3875 3876 3877 return true; 3878 3879}); 3880 3881 3882 3883 3884 } 3885 3886 if($('.page-template-resource .merit-template-section').length>0){ 3887 3888 meritResourceRegistrationInit(); 3889 } 3890 3891 3892} )( jQuery );; 3893(function () { // Scoping function to avoid globals 3894 /**
3895 * init method called if the epas endpoint is defined 3896 */ 3897 function mdcEsSearchInit() { 3898 3899 //Number of rsult ES will return 3900 const esResultLimit = 10; 3901 3902 let hostName = window.location.hostname; 3903 let siteOrigin = window.location.origin; 3904 const searchResultContainer = document.querySelector('.merit-search-result-area'); 3905 3906 // Search type mapping for better logging 3907 const SEARCH_TYPES = { 3908 0: 'top_search', 3909 1: 'single_entry_search', 3910 2: 'video_search', 3911 3: 'document_search', 3912 4: 'ifu_id_search', 3913 5: 'ifu_kit_search', 3914 6: 'ifu_product_search', 3915 7: 'ccode_search' 3916 }; 3917 3918 // Store log_id from initial search to correlate with click tracking 3919 let currentSearchLogId = null; 3920 3921 /** 3922 * Simple throttling function for waiting a set amount of time after the last keypress 3923 * So we don't overload the server with too many requests at once 3924 * 3925 * @param {Function} fn - function to be debounced 3926 * @param {number} delay - integer 3927 * @returns {Function} - new function, with the provided function wrapped in a timeout 3928 */ 3929 const debounce = (fn, delay) => { 3930 let timer = null; 3931 3932 // don't use a fat arrow in order to preserve the proper context 3933 return function debouncedFunction(...args) { 3934 const context = this; 3935 3936 if (timer) { 3937 window.clearTimeout(timer); 3938 } 3939 3940 timer = window.setTimeout(() => { 3941 fn.apply(context, args); 3942 }, delay); 3943 }; 3944 }; 3945 3946 /** 3947 * Helper function to get language for URL paremeter 3948 * 3949 * @param {sParam} string - string to 2be escaped 3950 * @returns {string} escaped string 3951 */ 3952 3953 function getCurrentLanguageFromUrl() { 3954 let output = ''; 3955 // let arr = ['de','fr', 'it', 'ja']; 3956 let arr = ['de', 'es', 'it', 'ja', 'zh-CN', 'fr']; 3957 arr.forEach(function (lang) { 3958 let slang = '/' + lang + '/'; 3959 if (window.location.href.indexOf(slang) != -1) { 3960 output = lang; 3961 } 3962 }); 3963 return output; 3964 }; 3965 3966 const getLanguageFromUrl = getCurrentLanguageFromUrl(); 3967 3968 /** 3969 * Helper function to get URL paremeter 3970 * 3971 * @param {sParam} string - string to be escaped 3972 * @returns {string} escaped string 3973 */ 3974 const getUrlParameter = (sParam) => { 3975 3976 let sPageURL = decodeURIComponent(window.location.search.substring(1)), 3977 sURLVariables = sPageURL.split('&'), 3978 sParameterName, 3979 i; 3980 3981 for (i = 0; i < sURLVariables.length; i++) { 3982 sParameterName = sURLVariables[i].split('='); 3983 3984 if (sParameterName[0] === sParam) { 3985 return sParameterName[1] === undefined ? true : sParameterName[1]; 3986 } 3987 } 3988 }; 3989 3990 /** 3991 * Helper function to escape input to be treated as a literal string with a RegEx 3992 * 3993 * @param {string} string - string to be escaped 3994 * @returns {string} escaped string 3995 */ 3996 const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); 3997 3998 /** 3999 * Helper function to escape input to be treated as a literal string with a RegEx 4000 * 4001 * @param {string} string - string to replace 4002 * @param {string} term - tearm to search for 4003 * @param {string} replacement replace value to use 4004 * @returns {string} replaced string 4005 */ 4006 const replaceGlobally = (string, term, replacement) => { 4007 return string.replace(new RegExp(escapeRegExp(term), 'g'), replacement); 4008 }; 4009 4010 /** 4011 * Escapes double quotes for specific data-attr 4012 * 4013 * @param {string} str The provided string containing double quotes 4014 * @returns {string} The escaped string 4015 */ 4016 const escapeDoubleQuotes = (str) => str.replace(/\\([\s\S])|(")/g, '"'); 4017 4018 /** 4019 * Finds parent node with the provided class param 4020 * 4021 * @param {*} el - node to search for its ancestor 4022 * @param {*} className - class attribute to search for 4023 * @returns {Element} - ancestor element of provided el 4024 */ 4025 const findAncestorByClass = (el, className) => { 4026 // eslint-disable-next-line 4027 while ((el = el.parentElement) && !el.classList.contains(className)); 4028 return el; 4029 }; 4030 4031 /** 4032 * Array pluck 4033 * 4034 * @param {Array} array - array to search 4035 * @param {string} key - array to search 4036 * @returns {Array} - new array 4037 */ 4038 const pluck = (array, key) => { 4039 return array.map((o) => o[key]); 4040 }; 4041 4042 /** 4043 * Formats object like a url query string, which is how ajax methods 4044 * in PHP expect to receive the data, e.g. action_wp_ajax_ep_save_feature 4045 * from dashboard.php 4046 * 4047 * @param {object} obj - js object 4048 * @returns {string} urlencoded string for POST ajax request 4049 */ 4050 const formatPostBody = (obj) => { 4051 return Object.keys(obj) 4052 .map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`) 4053 .join('&') 4054 .replace(/%20/g, '+'); 4055 }; 4056 4057 /** 4058 * Helper method to wrap show/hide elements. Not exported. 4059 * 4060 * @param {Array} els - could possibly be a single node, or an array of nodes 4061 * @param {string} display - css display property to set 4062 */ 4063 const showOrHideNodes = (els, display) => { 4064 let nodes = []; 4065 4066 // convert nodelist to array 4067 // eslint-disable-next-line no-prototype-builtins 4068 if (NodeList.prototype.isPrototypeOf(els)) { 4069 nodes = Array.from(els); 4070 } 4071 4072 // if not converted, then it was a single node, 4073 // so create an array 4074 if (!nodes.length) { 4075 if (Array.isArray(els)) { 4076 nodes = [...els, ...nodes]; 4077 } else { 4078 nodes.push(els); 4079 } 4080 } 4081
4082 nodes.forEach((el) => { 4083 el.style.display = display; // eslint-disable-line no-param-reassign 4084 }); 4085 }; 4086 4087 /** 4088 * Decorated helper function to show node/NodeList/array of nodes 4089 * 4090 * @param {Array} els - Nodelist/array of Nodes to show 4091 * @returns {Function} - showOrHideNodes 4092 */ 4093 const showElements = (els) => showOrHideNodes(els, 'inline-block'); 4094 4095 /** 4096 * Decorated helper function to hide node/NodeList/array of nodes 4097 * 4098 * @param {Array} els - Nodelist/array of Nodes to show 4099 * @returns {Function} - showOrHideNodes 4100 */ 4101 const hideElements = (els) => showOrHideNodes(els, 'none'); 4102 4103 4104 /** 4105 * helper function Return Langunage from langunage code 4106 * @param {string} code 4107 * @returns 4108 */ 4109 const getLanguageName = (code) => { 4110 4111 var data = [{ "Code": "af", "Name": "Afrikaans" }, { "Code": "af-ZA", "Name": "Afrikaans (South Africa)" }, { "Code": "ar", "Name": "Arabic" }, { "Code": "ar-AE", "Name": "Arabic (U.A.E.)" }, { "Code": "ar-BH", "Name": "Arabic (Bahrain)" }, { "Code": "ar-DZ", "Name": "Arabic (Algeria)" }, { "Code": "ar-EG", "Name": "Arabic (Egypt)" }, { "Code": "ar-IQ", "Name": "Arabic (Iraq)" }, { "Code": "ar-JO", "Name": "Arabic (Jordan)" }, { "Code": "ar-KW", "Name": "Arabic (Kuwait)" }, { "Code": "ar-LB", "Name": "Arabic (Lebanon)" }, { "Code": "ar-LY", "Name": "Arabic (Libya)" }, { "Code": "ar-MA", "Name": "Arabic (Morocco)" }, { "Code": "ar-OM", "Name": "Arabic (Oman)" }, { "Code": "ar-QA", "Name": "Arabic (Qatar)" }, { "Code": "ar-SA", "Name": "Arabic (Saudi Arabia)" }, { "Code": "ar-SY", "Name": "Arabic (Syria)" }, { "Code": "ar-TN", "Name": "Arabic (Tunisia)" }, { "Code": "ar-YE", "Name": "Arabic (Yemen)" }, { "Code": "az", "Name": "Azeri (Latin)" }, { "Code": "az-AZ", "Name": "Azeri (Latin) (Azerbaijan)" }, { "Code": "az-AZ", "Name": "Azeri (Cyrillic) (Azerbaijan)" }, { "Code": "be", "Name": "Belarusian" }, { "Code": "be-BY", "Name": "Belarusian (Belarus)" }, { "Code": "bg", "Name": "Bulgarian" }, { "Code": "bg-BG", "Name": "Bulgarian (Bulgaria)" }, { "Code": "bs-BA", "Name": "Bosnian (Bosnia and Herzegovina)" }, { "Code": "ca", "Name": "Catalan" }, { "Code": "ca-ES", "Name": "Catalan (Spain)" }, { "Code": "cs", "Name": "Czech" }, { "Code": "cs-CZ", "Name": "Czech (Czech Republic)" }, { "Code": "cy", "Name": "Welsh" }, { "Code": "cy-GB", "Name": "Welsh (United Kingdom)" }, { "Code": "da", "Name": "Danish" }, { "Code": "da-DK", "Name": "Danish (Denmark)" }, { "Code": "de", "Name": "German" }, { "Code": "de-AT", "Name": "German (Austria)" }, { "Code": "de-CH", "Name": "German (Switzerland)" }, { "Code": "de-DE", "Name": "German (Germany)" }, { "Code": "de-LI", "Name": "German (Liechtenstein)" }, { "Code": "de-LU", "Name": "German (Luxembourg)" }, { "Code": "dv", "Name": "Divehi" }, { "Code": "dv-MV", "Name": "Divehi (Maldives)" }, { "Code": "el", "Name": "Greek" }, { "Code": "el-GR", "Name": "Greek (Greece)" }, { "Code": "en", "Name": "English" }, { "Code": "en-AU", "Name": "English (Australia)" }, { "Code": "en-BZ", "Name": "English (Belize)" }, { "Code": "en-CA", "Name": "English (Canada)" }, { "Code": "en-CB", "Name": "English (Caribbean)" }, { "Code": "en-GB", "Name": "English (United Kingdom)" }, { "Code": "en-IE", "Name": "English (Ireland)" }, { "Code": "en-JM", "Name": "English (Jamaica)" }, { "Code": "en-NZ", "Name": "English (New Zealand)" }, { "Code": "en-PH", "Name": "English (Republic of the Philippines)" }, { "Code": "en-TT", "Name": "English (Trinidad and Tobago)" }, { "Code": "en-US", "Name": "English (United States)" }, { "Code": "en-ZA", "Name": "English (South Africa)" }, { "Code": "en-ZW", "Name": "English (Zimbabwe)" }, { "Code": "eo", "Name": "Esperanto" }, { "Code": "es", "Name": "Spanish" }, { "Code": "es-AR", "Name": "Spanish (Argentina)" }, { "Code": "es-BO", "Name": "Spanish (Bolivia)" }, { "Code": "es-CL", "Name": "Spanish (Chile)" }, { "Code": "es-CO", "Name": "Spanish (Colombia)" }, { "Code": "es-CR", "Name": "Spanish (Costa Rica)" }, { "Code": "es-DO", "Name": "Spanish (Dominican Republic)" }, { "Code": "es-EC", "Name": "Spanish (Ecuador)" }, { "Code": "es-ES", "Name": "Spanish (Castilian)" }
4111, { "Code": "es-ES", "Name": "Spanish (Spain)" }, { "Code": "es-GT", "Name": "Spanish (Guatemala)" }, { "Code": "es-HN", "Name": "Spanish (Honduras)" }, { "Code": "es-MX", "Name": "Spanish (Mexico)" }, { "Code": "es-NI", "Name": "Spanish (Nicaragua)" }, { "Code": "es-PA", "Name": "Spanish (Panama)" }, { "Code": "es-PE", "Name": "Spanish (Peru)" }, { "Code": "es-PR", "Name": "Spanish (Puerto Rico)" }, { "Code": "es-PY", "Name": "Spanish (Paraguay)" }, { "Code": "es-SV", "Name": "Spanish (El Salvador)" }, { "Code": "es-UY", "Name": "Spanish (Uruguay)" }, { "Code": "es-VE", "Name": "Spanish (Venezuela)" }, { "Code": "et", "Name": "Estonian" }, { "Code": "et-EE", "Name": "Estonian (Estonia)" }, { "Code": "eu", "Name": "Basque" }, { "Code": "eu-ES", "Name": "Basque (Spain)" }, { "Code": "fa", "Name": "Farsi" }, { "Code": "fa-IR", "Name": "Farsi (Iran)" }, { "Code": "fi", "Name": "Finnish" }, { "Code": "fi-FI", "Name": "Finnish (Finland)" }, { "Code": "fo", "Name": "Faroese" }, { "Code": "fo-FO", "Name": "Faroese (Faroe Islands)" }, { "Code": "fr", "Name": "French" }, { "Code": "fr-BE", "Name": "French (Belgium)" }, { "Code": "fr-CA", "Name": "French (Canada)" }, { "Code": "fr-CH", "Name": "French (Switzerland)" }, { "Code": "fr-FR", "Name": "French (France)" }, { "Code": "fr-LU", "Name": "French (Luxembourg)" }, { "Code": "fr-MC", "Name": "French (Principality of Monaco)" }, { "Code": "gl", "Name": "Galician" }, { "Code": "gl-ES", "Name": "Galician (Spain)" }, { "Code": "gu", "Name": "Gujarati" }, { "Code": "gu-IN", "Name": "Gujarati (India)" }, { "Code": "he", "Name": "Hebrew" }, { "Code": "he-IL", "Name": "Hebrew (Israel)" }, { "Code": "hi", "Name": "Hindi" }, { "Code": "hi-IN", "Name": "Hindi (India)" }, { "Code": "hr", "Name": "Croatian" }, { "Code": "hr-BA", "Name": "Croatian (Bosnia and Herzegovina)" }, { "Code": "hr-HR", "Name": "Croatian (Croatia)" }
4111, { "Code": "hu", "Name": "Hungarian" }, { "Code": "hu-HU", "Name": "Hungarian (Hungary)" }, { "Code": "hy", "Name": "Armenian" }, { "Code": "hy-AM", "Name": "Armenian (Armenia)" }, { "Code": "id", "Name": "Indonesian" }, { "Code": "id-ID", "Name": "Indonesian (Indonesia)" }, { "Code": "is", "Name": "Icelandic" }, { "Code": "is-IS", "Name": "Icelandic (Iceland)" }, { "Code": "it", "Name": "Italian" }, { "Code": "it-CH", "Name": "Italian (Switzerland)" }, { "Code": "it-IT", "Name": "Italian (Italy)" }, { "Code": "ja", "Name": "Japanese" }, { "Code": "ja-JP", "Name": "Japanese (Japan)" }, { "Code": "ka", "Name": "Georgian" }, { "Code": "ka-GE", "Name": "Georgian (Georgia)" }, { "Code": "kk", "Name": "Kazakh" }, { "Code": "kk-KZ", "Name": "Kazakh (Kazakhstan)" }, { "Code": "kn", "Name": "Kannada" }, { "Code": "kn-IN", "Name": "Kannada (India)" }, { "Code": "ko", "Name": "Korean" }, { "Code": "ko-KR", "Name": "Korean (Korea)" }, { "Code": "kok", "Name": "Konkani" }, { "Code": "kok-IN", "Name": "Konkani (India)" }, { "Code": "ky", "Name": "Kyrgyz" }, { "Code": "ky-KG", "Name": "Kyrgyz (Kyrgyzstan)" }, { "Code": "lt", "Name": "Lithuanian" }, { "Code": "lt-LT", "Name": "Lithuanian (Lithuania)" }, { "Code": "lv", "Name": "Latvian" }, { "Code": "lv-LV", "Name": "Latvian (Latvia)" }, { "Code": "mi", "Name": "Maori" }, { "Code": "mi-NZ", "Name": "Maori (New Zealand)" }, { "Code": "mk", "Name": "FYRO Macedonian" }, { "Code": "mk-MK", "Name": "FYRO Macedonian (Former Yugoslav Republic of Macedonia)" }, { "Code": "mn", "Name": "Mongolian" }, { "Code": "mn-MN", "Name": "Mongolian (Mongolia)" }, { "Code": "mr", "Name": "Marathi" }, { "Code": "mr-IN", "Name": "Marathi (India)" }, { "Code": "ms", "Name": "Malay" }, { "Code": "ms-BN", "Name": "Malay (Brunei Darussalam)" }, { "Code": "ms-MY", "Name": "Malay (Malaysia)" }, { "Code": "mt", "Name": "Maltese" }, { "Code": "mt-MT", "Name": "Maltese (Malta)" }, { "Code": "nl", "Name": "Dutch" }, { "Code": "nl-BE", "Name": "Dutch (Belgium)" }, { "Code": "nl-NL", "Name": "Dutch (Netherlands)" }, { "Code": "no", "Name": "Norsk" }, { "Code": "ns", "Name": "Northern Sotho" }, { "Code": "ns-ZA", "Name": "Northern Sotho (South Africa)" }, { "Code": "pa", "Name": "Punjabi" }, { "Code": "pa-IN", "Name": "Punjabi (India)" }, { "Code": "pl", "Name": "Polish" }, { "Code": "pl-PL", "Name": "Polish (Poland)" }, { "Code": "ps", "Name": "Pashto" }, { "Code": "ps-AR", "Name": "Pashto (Afghanistan)" }, { "Code": "pt", "Name": "Portuguese" }, { "Code": "pt-BR", "Name": "Portuguese (Brazil)" }, { "Code": "ptbr", "Name": "Portuguese (Brazil)" }, { "Code": "pt-PT", "Name": "Portuguese (Portugal)" }, { "Code": "qu", "Name": "Quechua" }, { "Code": "qu-BO", "Name": "Quechua (Bolivia)" }, { "Code": "qu-EC", "Name": "Quechua (Ecuador)" }, { "Code": "qu-PE", "Name": "Quechua (Peru)" }, { "Code": "ro", "Name": "Romanian" }, { "Code": "ro-RO", "Name": "Romanian (Romania)" }, { "Code": "ru", "Name": "Russian" }, { "Code": "ru-RU", "Name": "Russian (Russia)" }, { "Code": "sa", "Name": "Sanskrit" }, { "Code": "sa-IN", "Name": "Sanskrit (India)" }, { "Code": "se", "Name": "Sami (Northern)" }, { "Code": "se-FI", "Name": "Sami (Northern) (Finland)" }, { "Code": "se-FI", "Name": "Sami (Skolt) (Finland)" }, { "Code": "se-FI", "Name": "Sami (Inari) (Finland)" }, { "Code": "se-NO", "Name": "Sami (Northern) (Norway)" }, { "Code": "se-NO", "Name": "Sami (Lule) (Norway)" }, { "Code": "se-NO", "Name": "Sami (Southern) (Norway)" }, { "Code": "se-SE", "Name": "Sami (Northern) (Sweden)" }, { "Code": "se-SE", "Name": "Sami (Lule) (Sweden)" }, { "Code": "se-SE", "Name": "Sami (Southern) (Sweden)" }, { "Code": "sk", "Name": "Slovak" }, { "Code": "sk-SK", "Name": "Slovak (Slovakia)" }, { "Code": "sl", "Name": "Slovenian" }, { "Code": "sl-SI", "Name": "Slovenian (Slovenia)" }, { "Code": "sq", "Name": "Albanian" }, { "Code": "sq-AL", "Name": "Albanian (Albania)" }, { "Code": "sr-BA", "Name": "Serbian (Latin) (Bosnia and Herzegovina)" }, { "Code": "sr-BA", "Name": "Serbian (Cyrillic) (Bosnia and Herzegovina)" }, { "Code": "sr-SP", "Name": "Serbian (Latin) (Serbia and Montenegro)" }, { "Code": "sr-SP", "Name": "Serbian (Cyrillic) (Serbia and Montenegro)" }, { "Code": "sv", "Name": "Swedish" }, { "Code": "sv-FI", "Name": "Swedish (Finland)" }, { "Code": "sv-SE", "Name": "Swedish (Sweden)" }, { "Code": "sw", "Name": "Swahili" }, { "Code": "sw-KE", "Name": "Swahili (Kenya)" }, { "Code": "syr", "Name": "Syriac" }, { "Code": "syr-SY", "Name": "Syriac (Syria)" }, { "Code": "ta", "Name": "Tamil" }, { "Code": "ta-IN", "Name": "Tamil (India)" }, { "Code": "te", "Name": "Telugu" }, { "Code": "te-IN", "Name": "Telugu (India)" }, { "Code": "th", "Name": "Thai" }, { "Code": "th-TH", "Name": "Thai (Thailand)" }, { "Code": "tl", "Name": "Tagalog" }, { "Code": "tl-PH", "Name": "Tagalog (Philippines)" }, { "Code": "tn", "Name": "Tswana" }, { "Code": "tn-ZA", "Name": "Tswana (South Africa)" }, { "Code": "tr", "Name": "Turkish" }, { "Code": "tr-TR", "Name": "Turkish (Turkey)" }, { "Code": "tt", "Name": "Tatar" }, { "Code": "tt-RU", "Name": "Tatar (Russia)" }, { "Code": "ts", "Name": "Tsonga" }, { "Code": "uk", "Name": "Ukrainian" }, { "Code": "uk-UA", "Name": "Ukrainian (Ukraine)" }, { "Code": "ur", "Name": "Urdu" }, { "Code": "ur-PK", "Name": "Urdu (Islamic Republic of Pakistan)" }, { "Code": "uz", "Name": "Uzbek (Latin)" }, { "Code": "uz-UZ", "Name": "Uzbek (Latin) (Uzbekistan)" }, { "Code": "uz-UZ", "Name": "Uzbek (Cyrillic) (Uzbekistan)" }, { "Code": "vi", "Name": "Vietnamese" }, { "Code": "vi-VN", "Name": "Vietnamese (Viet Nam)" }, { "Code": "xh", "Name": "Xhosa" }, { "Code": "xh-ZA", "Name": "Xhosa (South Africa)" }, { "Code": "zh", "Name": "Chinese" }, { "Code": "zh-CN", "Name": "Chinese (S)" }, { "Code": "zh-HK", "Name": "Chinese (Hong Kong)" }, { "Code": "zh-MO", "Name": "Chinese (Macau)" }, { "Code": "zh-SG", "Name": "Chinese (Singapore)" }
4111, { "Code": "zh-TW", "Name": "Chinese (T)" }, { "Code": "zu", "Name": "Zulu" }, { "Code": "zu-ZA", "Name": "Zulu (South Africa)" }]; 4112 var country = data.find(el => el.Code === code); 4113 4114 if (country && country["Name"]) { 4115 4116 return country["Name"]; 4117 4118 } else { 4119 //return code if not found 4120 return code; 4121 } 4122 4123 } 4124 4125 /** 4126 * Submit the search form 4127 * 4128 * @param {Node} input - input element 4129 */ 4130 function submitSearchForm(input) { 4131 input.closest('form').submit(); 4132 } 4133 4134 /** 4135 * Set the expanded aria state on the input 4136 * 4137 * @param {boolean} haveOptions - whether or not the autosuggest list contains results 4138 * @param {Node} input - search input 4139 */ 4140 function toggleInputAria(haveOptions, input) { 4141 input.setAttribute('aria-expanded', haveOptions); 4142 } 4143 4144 /** 4145 * Set the active descendant aria attribute input 4146 * 4147 * @param {string} id - id of the currently selected element 4148 * @param {Node} input - search input 4149 */ 4150 function setInputActiveDescendant(id, input) { 4151 input.setAttribute('aria-activedescendant', id); 4152 } 4153 4154 /** 4155 * Take selected item and fill the search input 4156 * 4157 * @param {Node} input - input element 4158 * @param {string} text - new input value 4159 */ 4160 function selectAutosuggestItem(input, text) { 4161 input.value = text; // eslint-disable-line no-param-reassign 4162 } 4163 4164 4165 /** 4166 * Respond to an item selection based on the predefined behavior. 4167 * If epas.action is set to "navigate" (the default), redirects the browser to the URL of the selected item 4168 * If epas.action is set to any other value (such as "search"), fill in the value and perform the search 4169 * 4170 * @param {Node} input - search input 4171 * @param {Node} element - search term result item 4172 * @returns {Function} calls the submitSearchForm function 4173 */ 4174 function selectItem(input, element) { 4175 if (epas.action === 'navigate') { 4176 return goToAutosuggestItem(input.value, element.dataset.url); 4177 } 4178 4179 selectAutosuggestItem(input, element.innerText); 4180 return submitSearchForm(input); 4181 } 4182 4183 /** 4184 * Build the ajax request for Log data 4185 * 4186 * @param {string} logData - json string 4187 * @returns {object} AJAX object request 4188 */ 4189 async function logEsSearch(searchTerm, logData, searchType, userIp, linkData = {}) { 4190 4191 const fetchConfig = { 4192 body: JSON.stringify({ 4193 action: 'log', 4194 lang: document.getElementsByTagName('html')[0].getAttribute('lang'), 4195 term: searchTerm, 4196 createdAt: Date.now(), 4197 log_data: logData, 4198 search_type: SEARCH_TYPES[searchType] || 'unknown_search', 4199 link_data: linkData 4200 }), 4201 method: 'POST', 4202 mode: 'cors', 4203 credentials: 'include', 4204 headers: { 4205 'Content-Type': 'application/json', 4206 'X-WP-Nonce': meritChildAjax.api_nonce 4207 } 4208 }; 4209 4210 //console.log(fetchConfig); 4211 4212 try { 4213 const response = await window.fetch(meritChildAjax.api_url + 'log', fetchConfig); 4214 if (!response.ok) { 4215 throw Error(response.statusText); 4216 } 4217 4218 const data = await response.json(); 4219 console.log(data); 4220 return data; 4221 } catch (error) { 4222 // eslint-disable-next-line no-console 4223 console.log(error); 4224 return error; 4225 } 4226 } 4227 4228 /** 4229 * Update an existing search log with link_data (what user clicked) 4230 * 4231 * @param {string} logId - the log_id from the initial search 4232 * @param {object} linkData - clicked link data (id, type, link, text) 4233 * @returns {object} AJAX response 4234 */ 4235 async function updateSearchLog(logId, linkData) { 4236 const fetchConfig = { 4237 body: JSON.stringify({ 4238 log_id: logId, 4239 link_data: linkData 4240 }), 4241 method: 'POST', 4242 mode: 'cors', 4243 credentials: 'include', 4244 headers: { 4245 'Content-Type': 'application/json', 4246 'X-WP-Nonce': meritChildAjax.rest_nonce 4247 } 4248 }; 4249 4250 try { 4251 const response = await window.fetch(meritChildAjax.api_url + 'log-update', fetchConfig); 4252 if (!response.ok) { 4253 throw Error(response.statusText); 4254 } 4255 return await response.json(); 4256 } catch (error) { 4257 console.log(error); 4258 return error; 4259 } 4260 } 4261 4262 /** 4263 * Build the ajax request 4264 * 4265 * @param {string} query - json string 4266 * @param {string} searchTerm - user search term 4267 * @returns {object} AJAX object request 4268 */ 4269 async function esSearch(searchTerm, searchType, from = 0) { 4270 const fetchConfig = { 4271 body: JSON.stringify({ 4272 term: searchTerm, 4273 action: searchType, 4274 from: from, 4275 language: getLanguageFromUrl 4276 4277 }), 4278 method: 'POST', 4279 mode: 'cors', 4280 credentials: 'include', 4281 headers: { 4282 'Content-Type': 'application/json', 4283 'X-WP-Nonce': meritChildAjax.api_nonce 4284 } 4285 }; 4286 4287 try { 4288 const response = await window.fetch(meritChildAjax.api_url + 'es-search', fetchConfig); 4289 if (!response.ok) { 4290 throw Error(response.statusText); 4291 } 4292 4293 const data = await response.json(); 4294 4295 // Check if response contains an error 4296 if (data.error) { 4297 console.error('Search API error:', data.message || data.code); 4298 return { hits: { hits: [] }, error: data.message || data.code }; 4299 } 4300 4301 console.log(data); 4302 return data; 4303 } catch (error) { 4304 console.error(error); 4305 return { hits: { hits: [] }, error: error.message }; 4306 } 4307 } 4308 4309 function logTopLinkData(event, items) { 4310 4311 event.preventDefault(); 4312 4313 if (items.includes(event.target) && event.target.classList.contains('search-result-link')) { 4314 //console.log(event.target); 4315 let link_data = { 4316 id: event.target.getAttribute('data-id'), 4317 type: event.target.getAttribute('data-type'), 4318 link: event.target.getAttribute('href'), 4319 text: event.target.innerText 4320 4321 }; 4322 4323 if (currentSearchLogId) { 4324 updateSearchLog(currentSearchLogId, link_data).then(() => { 4325 window.location.href = link_data.link; 4326 }); 4327 } else { 4328 window.location.href = link_data.link; 4329 } 4330 } else { 4331 window.location.href = event.target.href; 4332 } 4333 4334 } 4335 4336 document.addEventListener('click', function (event) { 4337 if (event.target.classList.contains('single-es-entry')) { 4338 4339 let link_data = { 4340 id: event.target.getAttribute('data-id'), 4341 type: event.target.getAttribute('data-type'), 4342 link: event.target.getAttribute('href'), 4343 text: event.target.innerText 4344 4345 }; 4346 4347 if (currentSearchLogId) { 4348 updateSearchLog(currentSearchLogId, link_data).then(data => { 4349 window.location.href = link_data.link; 4350 }); 4351 } else { 4352 window.location.href = link_data.link; 4353 } 4354 4355 } 4356 }); 4357 4358 4359 function logFullLinkData(event, items) { 4360 4361 event.preventDefault(); 4362 console.log(event.target); 4363 if (items.includes(event.target)) { 4364 // console.log(event.target); 4365 let link_data = { 4366 id: event.target.getAttribute('data-id'), 4367 type: event.target.getAttribute('data-type'), 4368 link: event.target.getAttribute('href'), 4369 text: event.target.innerText 4370 4371 }; 4372 4373 if (currentSearchLogId) { 4374 updateSearchLog(currentSearchLogId, link_data).then(() => { 4375 window.location.href = link_data.link; 4376 }); 4377 } else { 4378 window.location.href = link_data.link; 4379 } 4380 } 4381 4382 } 4383 4384 function videoLinkData(event, items) { 4385 4386 event.preventDefault(); 4387 4388 if (items.includes(event.target)) { 4389 //console.log(event.target); 4390 let link_data = { 4391 id: event.target.getAttribute('data-id'), 4392 type: event.target.getAttribute('data-type'), 4393 link: event.target.getAttribute('href'), 4394 text: event.target.innerText 4395 4396 }; 4397 if (currentSearchLogId) { 4398 updateSearchLog(currentSearchLogId, link_data).then(() => { 4399 window.location.href = link_data.link; 4400 }); 4401 } else { 4402 window.location.href = link_data.link; 4403 } 4404 } 4405 4406 } 4407 4408 function documentsLinkData(event, items) { 4409 4410 event.preventDefault(); 4411 4412 if (items.includes(event.target)) { 4413 //console.log(event.target); 4414 let link_data = { 4415 id: event.target.getAttribute('data-id'), 4416 type: event.target.getAttribute('data-type'), 4417 link: event.target.getAttribute('href'), 4418 text: event.target.innerText 4419 4420 }; 4421 if (currentSearchLogId) { 4422 updateSearchLog(currentSearchLogId, link_data).then(() => { 4423 window.location.href = link_data.link; 4424 }); 4425 } else { 4426 window.location.href = link_data.link; 4427 } 4428 } 4429 4430 } 4431 4432 function ifuIdLinkData(event, items) { 4433 4434 event.preventDefault(); 4435 4436 if (items.includes(event.target)) { 4437 //console.log(event.target); 4438 let link_data = { 4439 id: event.target.getAttribute('data-id'), 4440 type: event.target.getAttribute('data-type'), 4441 link: event.target.getAttribute('href'), 4442 text: event.target.innerText 4443 4444 }; 4445 if (currentSearchLogId) { 4446 updateSearchLog(currentSearchLogId, link_data).then(() => { 4447 window.location.href = link_data.link; 4448 }); 4449 } else { 4450 window.location.href = link_data.link; 4451 } 4452 } 4453 4454 } 4455 4456 function ifuKitIdLinkData(event, items) { 4457 4458 event.preventDefault(); 4459 4460 if (items.includes(event.target)) { 4461 //console.log(event.target); 4462 let link_data = { 4463 id: event.target.getAttribute('data-id'), 4464 type: event.target.getAttribute('data-type'), 4465 link: event.target.getAttribute('href'), 4466 text: event.target.innerText 4467 4468 }; 4469 if (currentSearchLogId) { 4470 updateSearchLog(currentSearchLogId, link_data).then(() => { 4471 window.location.href = link_data.link; 4472 }); 4473 } else { 4474 window.location.href = link_data.link; 4475 } 4476 } 4477 4478 } 4479 4480 4481 function ifuProductLinkData(event, items) { 4482 4483 event.preventDefault(); 4484 4485 if (items.includes(event.target)) { 4486 //console.log(event.target); 4487 let link_data = { 4488 id: event.target.getAttribute('data-id'), 4489 type: event.target.getAttribute('data-type'), 4490 link: event.target.getAttribute('href'), 4491 text: event.target.innerText 4492 4493 }; 4494 if (currentSearchLogId) { 4495 updateSearchLog(currentSearchLogId, link_data).then(() => { 4496 window.location.href = link_data.link; 4497 }); 4498 } else { 4499 window.location.href = link_data.link; 4500 } 4501 } 4502 4503 } 4504 4505 /** 4506 * Hide the auto suggest box 4507 * 4508 * @returns {boolean} returns true 4509 */ 4510 function hideAutosuggestBox() { 4511 4512 const lists = document.querySelectorAll('.search-results-suggest'); 4513 const containers = document.querySelectorAll('.search-results-container'); 4514 4515 // empty all EP results lists
4516 lists.forEach((list) => { 4517 while (list.firstChild) { 4518 list.removeChild(list.firstChild); 4519 } 4520 }); 4521 4522 // hide all EP results containers 4523 containers.forEach((container) => { 4524 // eslint-disable-next-line 4525 container.style = 'display: none;'; 4526 }); 4527 4528 return true; 4529 } 4530 4531 4532 4533 4534 /** 4535 * Helper function to format search results for consumption 4536 * by the showTopSearchData function 4537 * 4538 * @param {object} hits - results from ES 4539 * @returns {Array} formatted hits 4540 */ 4541 const logSearchData = async (searchTerm, logData, searchType) => { 4542 4543 const entryObj = await logEsSearch(searchTerm, logData, searchType, {}); 4544 4545 // Store log_id for click tracking correlation 4546 if (entryObj && entryObj.log_id) { 4547 currentSearchLogId = entryObj.log_id; 4548 } 4549 4550 console.log(entryObj); 4551 }; 4552 4553 /** 4554 * Helper function to format pagination 4555 * 4556 * @param {int} c - Current Item 4557 * @returns {int} m - Last item 4558 */ 4559 4560 function generatePageRange(currentPage, lastPage, delta = 2) { 4561 // creates array with base 1 index 4562 const range = Array(lastPage) 4563 .fill() 4564 .map((_, index) => index + 1); 4565 4566 return range.reduce((pages, page) => { 4567 // allow adding of first and last pages 4568 if (page === 1 || page === lastPage) { 4569 return [...pages, page]; 4570 } 4571 4572 // if within delta range add page 4573 if (page - delta <= currentPage && page + delta >= currentPage) { 4574 return [...pages, page]; 4575 } 4576 4577 // otherwise add 'gap if gap was not the last item added. 4578 if (pages[pages.length - 1] !== '...') { 4579 return [...pages, '...']; 4580 } 4581 4582 return pages; 4583 }, []); 4584 } 4585 4586 const getDocumentData = async (productCode, container) => { 4587 const ifuWrapperItem = container.querySelector(".mdc-ifu--data-wrapper"); const ifuBrochureWrapperItem = container.querySelector(".mdc-ifu-brochers-data-wrapper"); const partNumberWrapper = container.querySelector(".mdc-part-no-wrapper"); const mdcPartBtn = container.querySelector(".mdc-part-semore-btn"); const mdcIfutBtn = container.querySelector(".mdc-ifu-semore-btn"); const mdcIfuBrochersBtn = container.querySelector(".mdc-ifu-brochers-semore-btn"); if (productCode !== '') { 4588 const response = await mdcRequestData("/ifus-brochures/" + productCode); const responseForOrderInformation = await mdcRequestData("/product/information-table/" + productCode); if (responseForOrderInformation) { 4589 partNumberWrapper.innerText = ''; let partsNumbers = responseForOrderInformation.catalog_number; let partNumberDom = ''; if (partsNumbers.length > 0) { 4590 let countLen = partsNumbers.length; let sortLen = countLen < 5 ? countLen : 5; for (let i = 0; i < sortLen; i++) { partNumberDom += `<p class="font-light ifus-part-no text-[18px]">${partsNumbers[i]}</p>` } 4591 partNumberWrapper.innerHTML = partNumberDom 4592 } else { 4593 if (mdcPartBtn) { mdcPartBtn.style.display = 'none' } 4594 partNumberWrapper.innerHTML = "<p class='font-light ifus-part-no'>Not Found.</p>" 4595 } 4596 } 4597 if (response) { 4598 ifuWrapperItem.innerText = ''; ifuBrochureWrapperItem.innerText = ''; const currentIfus = response.current_ifus; const currentBrochures = response.current_brochures; let ifuBrochuresData = ''; let ifuData = ''; if (currentIfus.length > 0) { 4599 currentIfus.forEach((ifu) => { 4600 ifuData += `<p class="font-light"> 4601 <a href="${ifu.PRIMARY_LINK_CONTEXT}${ifu.PRIMARY_LINK}" class="hover:underline hover:decoration-merit-red" target="_blank"> 4602 ${ifu.NAME} 4603 </a> 4604 </p>`}); ifuWrapperItem.innerHTML = ifuData 4605 } else { 4606 if (mdcIfutBtn) { mdcIfutBtn.style.display = 'none' } 4607 ifuWrapperItem.innerHTML = "<p class='font-light'>Not Found.</p>" 4608 } 4609 if (currentBrochures.length == 0) { 4610 if (mdcIfuBrochersBtn) { mdcIfuBrochersBtn.style.display = 'none' } 4611 ifuBrochureWrapperItem.innerHTML = "<p class='font-light'>Not Found.</p>" 4612 } else { 4613 currentBrochures.forEach((ifuBrochure) => { 4614 ifuBrochuresData += ` 4615 <p class="font-light"> 4616 <a href="${ifuBrochure.PRIMARY_LINK_CONTEXT}${ifuBrochure.PRIMARY_LINK}"> 4617 ${ifuBrochure.NAME} 4618 </a> 4619 </p> 4620 `}); ifuBrochureWrapperItem.innerHTML = ifuBrochuresData 4621 } 4622 } else { 4623 if (mdcIfutBtn) { mdcIfutBtn.style.display = 'none' } 4624 ifuWrapperItem.innerHTML = "<p class='font-light'>Not Found.</p>" 4625 } 4626 } else { 4627 if (mdcIfutBtn) { mdcIfutBtn.style.display = 'none' } 4628 if (mdcIfuBrochersBtn) { mdcIfuBrochersBtn.style.display = 'none' } 4629 if (mdcPartBtn) { mdcPartBtn.style.display = 'none' } 4630 partNumberWrapper.innerHTML = "<p class='font-light ifus-part-no'>Not Found.</p>"; ifuWrapperItem.innerHTML = "<p class='font-light'>Not Found.</p>"; ifuBrochureWrapperItem.innerHTML = "<p class='font-light'>Not Found.</p>" 4631 } 4632 }; 4633 4634 const mayBeDisplayPagination = (options, type, from, container) => { 4635 4636 const pageSize = 10; 4637 let i; 4638 let itemString = '';
4639 const resultsContainer = container.querySelector('#pagin_' + type); 4640 4641 if (resultsContainer.length == 0) { 4642 return false; 4643 } 4644 4645 let totalPages = Math.ceil(options.total.value / pageSize); 4646 //Make sure its always 1 4647 let currentPage = (from == 0) ? 1 : from; 4648 const paginationArray = generatePageRange(from, totalPages); 4649 4650 4651 itemString += '<ul>'; 4652 4653 paginationArray.forEach(function (item) { 4654 itemString += `<li class="pagination-item" role="option" aria-selected="false"> 4655 ${item != '...' ? 4656 `<a href="#${type}-${item}" data-id="${item - 1}" data-type="${type}" class="pagination-link ${item - 1 == from ? 'active' : ''} no-underline">${item}</a>` 4657 : `<span>${item}</span>`} 4658 4659 </li>`; 4660 }); 4661 4662 itemString += '</ul>'; 4663 4664 // append list items to the list 4665 resultsContainer.innerHTML = itemString; 4666 4667 const autosuggestItems = Array.from(resultsContainer.querySelectorAll('.pagination-link')); 4668 4669 resultsContainer.addEventListener('click', (event) => { 4670 4671 event.preventDefault(); 4672 4673 if (autosuggestItems.includes(event.target)) { 4674 //console.log(event.target); 4675 //add actve class on current link 4676 4677 //cache event 4678 const $this = event.target; 4679 //$this.classList.add("active"); 4680 const from = $this.getAttribute('data-id'); 4681 const type = $this.getAttribute('data-type'); 4682 const getSearchText = getUrlParameter('st'); 4683 //console.log('logId:' + type); 4684 fetchFullResults(getSearchText, type, from, container); 4685 } 4686 4687 }); 4688 4689 return true; 4690 4691 } 4692 4693 const mayBeDisplayPaginationIfu = (options, type, searchText, from) => { 4694 4695 const pageSize = 10; 4696 let i; 4697 let itemString = ''; 4698 const resultsContainer = document.getElementById('pagin_' + type); 4699 4700 if (resultsContainer.length == 0) { 4701 return false; 4702 } 4703 4704 let totalPages = Math.ceil(options.total.value / pageSize); 4705 //Make sure its always 1 4706 let currentPage = (from == 0) ? 1 : from; 4707 const paginationArray = generatePageRange(from, totalPages); 4708 4709 4710 itemString += '<ul>'; 4711 4712 paginationArray.forEach(function (item) { 4713 itemString += `<li class="pagination-item" role="option" aria-selected="false"> 4714 ${item != '...' ? 4715 `<a href="#${type}-${item}" data-id="${item - 1}" data-type="${type}" class="pagination-link ${item - 1 == from ? 'active' : ''}">${item}</a>` 4716 : `<span>${item}</span>`} 4717 4718 </li>`; 4719 }); 4720 4721 itemString += '</ul>'; 4722 4723 // append list items to the list 4724 resultsContainer.innerHTML = itemString; 4725 4726 const autosuggestItems = Array.from(resultsContainer.querySelectorAll('.pagination-link')); 4727 4728 resultsContainer.addEventListener('click', (event) => { 4729 4730 event.preventDefault(); 4731 4732 if (autosuggestItems.includes(event.target)) { 4733 //console.log(event.target); 4734 //add actve class on current link 4735 4736 //cache event 4737 const $this = event.target; 4738 //$this.classList.add("active"); 4739 const from = $this.getAttribute('data-id'); 4740 //const type = $this.getAttribute('data-type'); 4741 //const getSearchText = getUrlParameter('st'); 4742 //console.log('logId:' + type); 4743 fetchIfuProductResults(searchText, from); 4744 } 4745 4746 }); 4747 4748 return true; 4749 4750 } 4751 4752 /** 4753 * Helper function to format search results for consumption 4754 * by the showTopSearchData function 4755 * 4756 * @param {object} hits - results from ES 4757 * @returns {Array} formatted hits 4758 */ 4759 const formatSearchResults = (hits) => { 4760 return hits.map((hit) => { 4761 const post_id = hit._source.post_id; 4762 const post_type = hit._source.post_type; 4763 const text = hit._source.post_title; 4764 const url = (hit._source.redirect_url !== 'undefined' && hit._source.redirect_url) ? hit._source.redirect_url : hit._source.permalink; 4765 4766 return { post_id, post_type, text, url }; 4767 }); 4768 }; 4769 4770 /** 4771 * Helper function to format search results for consumption 4772 * by the showTopSearchData function 4773 * 4774 * @param {object} hits - results from ES 4775 * @returns {Array} formatted hits 4776 */ 4777 const formatFullSearchResults = (hits) => { 4778 return hits.map((hit) => { 4779 const post_id = hit._source.post_id; 4780 const post_type = hit._source.post_type; 4781 const text = hit._source.post_title; 4782 const thumbnail_url = (hit._source.thumbnail_url !== 'undefined' && hit._source.thumbnail_url) ? hit._source.thumbnail_url : '/wp-content/themes/enfold-child/images/merit-fd-logo.jpg'; 4783 const url = (hit._source.redirect_url !== 'undefined' && hit._source.redirect_url) ? hit._source.redirect_url : hit._source.permalink; 4784 const post_name = hit._source.post_name; 4785 return { post_id, post_type, text, thumbnail_url, url, post_name }; 4786 }); 4787 }; 4788 4789 /** 4790 * Helper function to format search results for consumption 4791 * by the showTopSearchData function 4792 * 4793 * @param {object} hits - results from ES 4794 * @returns {Array} formatted hits 4795 */ 4796 const formatIfuSearchResults = (hits) => { 4797 4798 return hits.map((hit) => { 4799 const post_id = hit._source.post_id; 4800 const post_type = hit._source.post_type; 4801 const text = hit._source.post_title; 4802 const ifu_base_part_number = (hit._source.guid !== 'undefined' && hit._source.guid) ? hit._source.guid : ''; 4803 const ifu_lang = getLanguageName(hit._source.post_name); 4804 const url = hit._source.permalink; 4805 4806 return { post_id, post_type, text, ifu_base_part_number, ifu_lang, url }; 4807 }); 4808 }; 4809 4810 /** 4811 * Helper function to format search results for consumption 4812 * by the showTopSearchData function 4813 * 4814 * @param {object} hits - results from ES 4815 * @returns {Array} formatted hits 4816 */ 4817 const formatIfuKitSearchResults = (hits) => { 4818 return hits.map((hit) => { 4819 const post_id = hit._source.post_id; 4820 const post_type = hit._source.post_type; 4821 const text = (hit._source.post_title !== 'undefined' && hit._source.post_title) ? hit._source.post_title : ''; 4822 const url = hit._source.permalink; 4823 4824 return { post_id, post_type, text, url }; 4825 }); 4826 }; 4827 4828 /** 4829 * Helper function to format search results for consumption 4830 * by the showTopSearchData function 4831 * 4832 * @param {object} hits - results from ES 4833 * @returns {Array} formatted hits 4834 */ 4835 const formatCcodeSearchResults = (hits) => { 4836 return hits.map((hit) => { 4837 const post_id = hit._source.post_id; 4838 const post_type = hit._source.post_type; 4839 const text = hit._source.post_title; 4840 const content = hit._source.post_content; 4841 const url = hit._source.permalink; 4842 return { post_id, post_type, text, content, url }; 4843 }); 4844 }; 4845 4846 /** 4847 * Helper function to format search results for consumption 4848 * by the showTopSearchData function 4849 * 4850 * @param {object} hits - results from ES 4851 * @returns {Array} formatted hits 4852 */ 4853 const formatIfuProductSearchResults = (hits) => { 4854 return hits.map((hit) => { 4855 const post_id = hit._source.post_id; 4856 const post_type = hit._source.post_type; 4857 const text = hit._source.post_title; 4858 const content = hit._source.post_content; 4859 const url = hit._source.permalink; 4860 const lang = hit._source.post_name; 4861 return { post_id, post_type, text, content, url, lang }; 4862 }); 4863 }; 4864 4865 /** 4866 * Helper function to format search results for consumption 4867 * by the showTopSearchData function 4868 * 4869 * @param {object} hits - results from ES 4870 * @returns {Array} formatted hits 4871 */ 4872 const formatDocumentSearchResults = (hits) => { 4873 return hits.map((hit) => { 4874 const post_id = hit._source.post_id; 4875 const post_type = hit._source.post_type; 4876 const text = hit._source.post_title; 4877 const content = hit._source.post_content; 4878 const url = hit._source.permalink; 4879 return { post_id, post_type, text, content, url }; 4880 }); 4881 }; 4882 4883 /** 4884 * Helper function to format search results for consumption 4885 * by the showTopSearchData function 4886 * 4887 * @param {object} hits - results from ES 4888 * @returns {Array} formatted hits 4889 */ 4890 const formatCourseSearchResults = (hits) => { 4891 return hits.map((hit) => { 4892 const post_id = hit._source.post_id; 4893 const post_type = hit._source.post_type; 4894 const title = hit._source.post_title; 4895 const thumbnail_url = (hit._source.thumbnail_url !== 'undefined' && hit._source.thumbnail_url) ? hit._source.thumbnail_url : "#"; 4896 const url = (hit._source.redirect_url !== 'undefined' && hit._source.redirect_url) ? hit._source.redirect_url : hit._source.permalink;
4897 const keywords = (hit._source.keywords !== 'undefined' && hit._source.keywords) ? hit._source.keywords : ""; 4898 return { post_id, post_type, title, thumbnail_url, url, keywords }; 4899 }); 4900 }; 4901 4902 /** 4903 * Update the auto suggest box with new options or hide if none 4904 * 4905 * @param {Array} options - formatted results 4906 * @param {string} input - search string 4907 * @returns {boolean} return true 4908 */ 4909 const showTopSearchData = (options, input, type, container) => { 4910 let i; 4911 let itemString = ''; 4912 4913 if ('localhost' == hostName) { 4914 siteOrigin = window.location.origin + '/mdc4'; 4915 } 4916 const suggestList = container.querySelector('#' + type + '-search-results-suggest'); 4917 4918 // anticipating the future... a setting where we configure 4919 // a limit of results to show, and optionally append a 4920 // link to "all results" or something of that nature 4921 const resultsLimit = options.length; 4922 4923 // create markup for list items 4924 // eslint-disable-next-line 4925 if (resultsLimit > 0) { 4926 itemString += '<ul class="merit-searched-product-list">'; 4927 for (i = 0; resultsLimit > i; ++i) { 4928 const { post_id, post_type, text, url } = options[i]; 4929 if (i >= 2) { 4930 break; 4931 } 4932 let updatedUrl = url; 4933 if (getLanguageFromUrl != '' && (post_type == 'video' || post_type == 'part')) { 4934 4935 updatedUrl = url.replace("https://www.merit.com/", "https://www.merit.com/" + getLanguageFromUrl + "/"); 4936 4937 } 4938 // if(type == 'product'){ 4939 // updatedUrl = updatedUrl.replace("https://meritreskin.decort.co/", "https://www.merit.com/"); 4940 // } 4941 itemString += `<li class="autosuggest-item" role="option" aria-selected="false" id="autosuggest-option-${i}"> 4942 <a href="${updatedUrl}" class="search-result-link" data-id="${post_id}" data-type="${post_type}" tabindex="-1"> 4943 ${text} 4944 </a> 4945 </li>`; 4946 } 4947 itemString += '</ul>'; 4948 itemString += '<a href="' + siteOrigin + '/search/?st=' + input.value + '&tab=' + type + '" class="merit-link-search">See More</a>'; 4949 } else { 4950 itemString += '<span class="pt-2 block">' + suggestList.getAttribute('data-empty') + '</span>'; 4951 } 4952 4953 4954 4955 // append list items to the list 4956 4957 suggestList.innerHTML = itemString; 4958 4959 const autosuggestItems = Array.from(suggestList.querySelectorAll('.search-result-link')); 4960 4961 suggestList.addEventListener('click', (event) => { logTopLinkData(event, autosuggestItems); }); 4962 4963 return true; 4964 } 4965 4966 /** 4967 * Update the auto suggest box with new options or hide if none 4968 * 4969 * @param {Array} options - formatted results 4970 * @param {string} input - search string 4971 * @returns {boolean} return true 4972 */ 4973 const updateFullSearchData = (options, type, container) => { 4974 //console.log(options); 4975 let i; 4976 let itemString = ''; 4977 4978 const resultsContainer = container.querySelector('#' + type + '_search_result'); 4979 //Bail ealry if container dont exsit 4980 if (resultsContainer.length == 0) { 4981 return false; 4982 } 4983 // anticipating the future... a setting where we configure 4984 // a limit of results to show, and optionally append a 4985 // link to "all results" or something of that nature 4986 const resultsLimit = options.length; 4987 4988 if (resultsLimit > 0) { 4989 4990 // create markup for list items 4991 // eslint-disable-next-line 4992 for (i = 0; resultsLimit > i; ++i) { 4993 const { post_id, post_type, text, thumbnail_url, url, post_name } = options[i]; 4994 4995 let updatedUrl = url; 4996 if (getLanguageFromUrl != '' && (type == 'video' || type == 'part')) { 4997 4998 updatedUrl = url.replace("https://www.merit.com/", "https://www.merit.com/" + getLanguageFromUrl + "/"); 4999 5000 } 5001 5002 // itemString += `<div class="single-result" role="option" aria-selected="false" id="${type}-search-result-${i}"> 5003 // <div class="single-result-text"><a href="${updatedUrl}" class="single-es-entry" data-id="${post_id}" data-type="${post_type}" tabindex="0">${text}</a></div> 5004 // </div>`; 5005 5006 if (type == 'product') { 5007 5008 5009 //updatedUrl = updatedUrl.replace("https://meritreskin.decort.co/", "https://www.merit.com/"); 5010 5011 itemString += `<div class="search-tab-inner"> 5012 <div class="merit-search-accordion-wrapper"> 5013 <div class="merit-main-search-item flex justify-between py-6"> 5014 <h2 class="merit-main-search-title"><a href="${updatedUrl}" class="text-[28px] single-es-entry decoration-merit-red hover:underline" data-id="${post_id}" data-type="${post_type}">${text}</a></h2> 5015 <div class="merit-main-search-button"> 5016 <a class="merit-search-product single-es-entry text-xl text-white bg-charcoal rounded-3xl px-[30px] py-[5px] max-xl:px-[15px] hover:bg-bright-red no-underline max-md:hidden" href="${updatedUrl}" data-id="${post_id}" data-type="${post_type}">Go to Product</a> 5017 <button class="list-accordion-btn" data-product_code="${post_name}"> 5018 <div class="list-icon"> 5019 <img alt="list" class="merit-icon" width="27" height="27" src="/wp-content/plugins/merit-acf-icon-picker/assets/img/acf/list.svg"> 5020 </div> 5021 <div class="times-icon"> 5022 <img src="/wp-content/plugins/merit-acf-icon-picker/assets/img/acf/times.svg" alt="times" class="merit-icon " width="27" height="27"> 5023 </div> 5024 </button> 5025 </div> 5026 </div> 5027 <div class="merit-search-accordion"> 5028 <div class="merit-search-content-wrapper max-md:flex-wrap flex border rounded-[5px]"> 5029 <div class="accordion-col-1 border-r w-full md:w-2/12 text-lg pt-[15px] pl-[25px] pb-5"> 5030 <h3 class="italic font-medium text-merit-red pb-2">Part no</h3> 5031 <div class="mdc-part-no-wrapper"> 5032 <p class="font-light ifus-part-no">Loading...</p> 5033 </div> 5034 <a class="mdc-part-semore-btn text-merit-red text-lg inline-block mt-1 no-underline hover:underline" href="${updatedUrl}#order_information">> See More</a> 5035 </div> 5036 <div class="accordion-col-2 border-r w-full md:w-5/12 text-lg pt-[15px] pl-[32px] pb-9"> 5037 <h3 class="italic font-medium text-merit-red pb-2">Documents</h3> 5038 <div class="pb-[15px]"> 5039 <h3 class="font-medium">IFUs</h3> 5040 5041 <div class="mdc-ifu--data-wrapper"> 5042 <p class="font-light">Loading...</p> 5043 </div> 5044 <a class="mdc-ifu-semore-btn text-merit-red text-lg no-underline hover:underline" href="${updatedUrl}#documents_education">> See More</a> 5045 </div> 5046 5047 </div> 5048 <div class="accordion-col-3 w-full md:w-5/12 text-lg pt-[15px] pl-[35px] pb-5"> 5049 <div class=""> 5050 <h3 class="font-medium">Brochures</h3> 5051 <div class="mdc-ifu-brochers-data-wrapper"> 5052 <p class="font-light">Loading...</p> 5053 </div> 5054 <a class="mdc-ifu-brochers-semore-btn text-merit-red text-lg no-underline hover:underline" href="${updatedUrl}#documents_education">> See More</a> 5055 </div> 5056 </div> 5057 </div> 5058 </div> 5059 </div> 5060 </div>`; 5061 5062 } else { 5063 itemString += `<div class="merit-search-item-wrap" role="option" id="${type}-search-result-${i}"> 5064 <div class="merit-main-search-item"> 5065 <h2 class="merit-main-search-title text-3xl"><a href="${updatedUrl}" class="single-es-entry block decoration-merit-red hover:underline" data-id="${post_id}" data-type="${post_type}">${text}</a></h2> 5066 </div> 5067 </div>`; 5068 } 5069 5070 5071 5072 5073 } 5074 5075 } else { 5076 5077 //No results found 5078 5079 itemString += resultsContainer.getAttribute('data-empty'); 5080 5081 } 5082 5083 // append list items to the list 5084 resultsContainer.innerHTML = itemString; 5085 5086 //const autosuggestItems = Array.from(resultsContainer.querySelectorAll('.single-es-entry')); 5087 5088 //resultsContainer.addEventListener('click', (event) => { logFullLinkData(event, autosuggestItems); }); 5089 5090 5091 return true; 5092 } 5093 5094 /** 5095 * Update the auto suggest box with new options or hide if none 5096 * 5097 * @param {Array} options - formatted results 5098 * @param {string} input - search string 5099 * @returns {boolean} return true 5100 */ 5101 const updateIfuSearchData = (options, type) => { 5102 let i; 5103 let itemStringTab = ''; 5104 let itemString = ''; 5105 5106 const container = document.getElementById('ifu_tabs'); 5107 5108 // console.log(container); 5109 5110 //Bail ealry if container dont exsit 5111 if (container.length == 0) { 5112 return false;
5113 } 5114 5115 const tabsTitleContainer = container.querySelector('.tabs'); 5116 const tabsContainer = container.querySelector('#ifu_tab'); 5117 5118 // anticipating the future... a setting where we configure 5119 // a limit of results to show, and optionally append a 5120 // link to "all results" or something of that nature 5121 const resultsLimit = options.length; 5122 5123 // create markup for list items 5124 // eslint-disable-next-line 5125 for (i = 0; resultsLimit > i; ++i) { 5126 const { post_id, post_type, text, ifu_lang, url } = options[i]; 5127 5128 //Want to show EN results first 5129 if (ifu_lang == 'English') { 5130 5131 itemStringTab += `<li class="tab-link current" data-tab="tab-${i}" data-id="${post_id}" data-type="${post_type}">${ifu_lang}</li>`; 5132 5133 itemString += `<div class="tab-content current" id="tab-${i}"> 5134 <div class="single-result-text"><a href="${url}" class="single-es-entry" data-id="${post_id}" data-type="${post_type}" tabindex="0">${text}</a></div> 5135 </div>`; 5136 } 5137 5138 } 5139 for (i = 0; resultsLimit > i; ++i) { 5140 const { post_id, post_type, text, ifu_lang, url } = options[i]; 5141 5142 if (ifu_lang !== 'English') { 5143 let currentClass = i === 1 ? 'current' : ''; 5144 5145 itemStringTab += `<li class="tab-link" data-tab="tab-${i}" data-id="${post_id}" data-type="${post_type}">${ifu_lang}</li>`; 5146 5147 itemString += `<div class="tab-content" id="tab-${i}"> 5148 <div class="single-result-text"><a href="${url}" class="single-es-entry" data-id="${post_id}" data-type="${post_type}" tabindex="0">${text}</a></div> 5149 </div>`; 5150 } 5151 5152 } 5153 // append list items to the list 5154 tabsTitleContainer.innerHTML = itemStringTab; 5155 tabsContainer.innerHTML = itemString; 5156 5157 const autosuggestItems = Array.from(tabsContainer.querySelectorAll('.single-es-entry')); 5158 5159 tabsContainer.addEventListener('click', (event) => { ifuIdLinkData(event, autosuggestItems); }); 5160 5161 return true; 5162 } 5163 5164 /** 5165 * Update the auto suggest box with new options or hide if none 5166 * 5167 * @param {Array} options - formatted results 5168 * @param {string} input - search string 5169 * @returns {boolean} return true 5170 */ 5171 const updateIfuKitData = (options, type) => { 5172 let i; 5173 let itemString = ''; 5174 5175 const container = document.getElementById('ifu_kit'); 5176 //Bail ealry if container dont exsit 5177 if (container.length == 0) { 5178 return false; 5179 } 5180 // anticipating the future... a setting where we configure 5181 // a limit of results to show, and optionally append a 5182 // link to "all results" or something of that nature 5183 const resultsLimit = options.length; 5184 5185 // create markup for list items 5186 // eslint-disable-next-line 5187 for (i = 0; resultsLimit > i; ++i) { 5188 const { post_id, post_type, text } = options[i]; 5189 5190 itemString += `<div class="single-ifukit-es-entry" id="ifukit-${i}"> 5191 <div class="single-result-text"><a href="/ifu/?i=${post_id}" class="single-es-entry" data-id="${post_id}" data-type="${post_type}" tabindex="0">${text}</a></div> 5192 </div>`; 5193 } 5194 // append list items to the list 5195 container.innerHTML = itemString; 5196 5197 const autosuggestItems = Array.from(container.querySelectorAll('.single-es-entry')); 5198 5199 container.addEventListener('click', (event) => { ifuKitIdLinkData(event, autosuggestItems); }); 5200 5201 return true; 5202 } 5203 5204 /** 5205 * Update video search data 5206 * 5207 * @param {Array} options - formatted results 5208 * @param {string} input - search string 5209 * @returns {boolean} return true 5210 */ 5211 const updateVideoData = (options, type) => { 5212 let i; 5213 let itemString = ''; 5214 5215 const container = document.getElementById('video_results'); 5216 //Bail ealry if container dont exsit 5217 if (container.length == 0) { 5218 return false; 5219 } 5220 // anticipating the future... a setting where we configure 5221 // a limit of results to show, and optionally append a 5222 // link to "all results" or something of that nature 5223 const resultsLimit = options.length; 5224 5225 // create markup for list items 5226 // eslint-disable-next-line 5227 for (i = 0; resultsLimit > i; ++i) { 5228 const { post_id, post_type, thumbnail_url, url, text } = options[i]; 5229 5230 itemString += `<section id="single-video-${post_id}" class="single-video-wrapper"><figure> 5231 <a href="${url}" class="popup-vimeo" data-id="${post_id}" data-type="${post_type}"> 5232 <img src="${thumbnail_url}" alt="${text}"></a><figcaption> 5233 <a href="${url}" data-id="${post_id}" data-type="${post_type}">${text}</a></figcaption></figure> 5234 </section>`; 5235 } 5236 // append list items to the list 5237 container.innerHTML = itemString; 5238 5239 const videoSuggestItems = Array.from(container.querySelectorAll('.single-video-wrapper a')); 5240 5241 container.addEventListener('click', (event) => { videoLinkData(event, videoSuggestItems); }); 5242 5243 return true; 5244 } 5245 5246 /** 5247 * Update the auto suggest box with new options or hide if none 5248 * 5249 * @param {Array} options - formatted results 5250 * @param {string} input - search string 5251 * @returns {boolean} return true 5252 */ 5253 const updateCcodeData = (options, type) => { 5254 let i; 5255 let itemString = ''; 5256 5257 const container = document.getElementById('ccode_search_results'); 5258 //Bail ealry if container dont exsit 5259 if (container.length == 0) { 5260 return false;
5261 } 5262 // anticipating the future... a setting where we configure 5263 // a limit of results to show, and optionally append a 5264 // link to "all results" or something of that nature 5265 const resultsLimit = options.length; 5266 5267 // create markup for list items 5268 // eslint-disable-next-line 5269 for (i = 0; resultsLimit > i; ++i) { 5270 const { post_id, post_type, text, content } = options[i]; 5271 5272 itemString += `<div class="single-ccode-es-entry" id="ccode-${i}"> 5273 ${content} 5274 </div>`; 5275 } 5276 // append list items to the list 5277 container.innerHTML = itemString; 5278 5279 return true; 5280 } 5281 5282 /** 5283 * Update the auto suggest box with new options or hide if none 5284 * 5285 * @param {Array} options - formatted results 5286 * @param {string} input - search string 5287 * @returns {boolean} return true 5288 */ 5289 const updateIfuProductData = (options, type) => { 5290 let i; 5291 let itemString = ''; 5292 5293 const container = document.getElementById('ifu_product_search_results'); 5294 //Bail ealry if container dont exsit 5295 if (container.length == 0) { 5296 return false; 5297 } 5298 // anticipating the future... a setting where we configure 5299 // a limit of results to show, and optionally append a 5300 // link to "all results" or something of that nature 5301 const resultsLimit = options.length; 5302 5303 // create markup for list items 5304 // eslint-disable-next-line 5305 for (i = 0; resultsLimit > i; ++i) { 5306 const { post_id, post_type, text, url, lang } = options[i]; 5307 5308 itemString += `<div class="ifu-product-es-entry" id="ifu_product-${i}"> 5309 <a href="${url}" class="single-es-entry" data-id="${post_id}" data-type="${post_type}" tabindex="0">${text} (${lang.toUpperCase()})</a> 5310 </div>`; 5311 } 5312 // append list items to the list 5313 container.innerHTML = itemString; 5314 5315 const ifuProductSuggestItems = Array.from(container.querySelectorAll('.single-es-entry')); 5316 5317 container.addEventListener('click', (event) => { ifuProductLinkData(event, ifuProductSuggestItems); }); 5318 5319 return true; 5320 } 5321 5322 /** 5323 * Update the auto suggest box with new options or hide if none 5324 * 5325 * @param {Array} options - formatted results 5326 * @param {string} input - search string 5327 * @returns {boolean} return true 5328 */ 5329 const updateDocumentData = (options, type) => { 5330 let i; 5331 let itemString = ''; 5332 5333 const container = document.getElementById('document_product_search_results'); 5334 //Bail ealry if container dont exsit 5335 if (container.length == 0) { 5336 return false; 5337 } 5338 // anticipating the future... a setting where we configure 5339 // a limit of results to show, and optionally append a 5340 // link to "all results" or something of that nature 5341 const resultsLimit = options.length; 5342 5343 // create markup for list items 5344 // eslint-disable-next-line 5345 for (i = 0; resultsLimit > i; ++i) { 5346 const { post_id, post_type, text, url } = options[i]; 5347 5348 itemString += `<div class="document-es-entry" id="merit-document-${i}"> 5349 <a href="${url}" class="single-es-entry" data-id="${post_id}" data-type="${post_type}" tabindex="0">${text}</a> 5350 </div>`; 5351 } 5352 // append list items to the list 5353 container.innerHTML = itemString; 5354 5355 const documentSuggestItems = Array.from(container.querySelectorAll('.single-es-entry')); 5356 5357 container.addEventListener('click', (event) => { documentsLinkData(event, documentSuggestItems); }); 5358 5359 return true; 5360 } 5361 5362 /** 5363 * Calls the ajax request, and outputs the results. 5364 * Called by the handleKeyup callback, debounced. 5365 * 5366 * @param {Node} input - search input field 5367 */ 5368 const fetchResults = async (input, type) => { 5369 5370 const searchText = input.value; 5371 //promess all 5372 const response = await esSearch(searchText, type); 5373 //console.log(response); 5374 if (response && response._shards && response._shards.successful > 0) { 5375 5376 const formattedResults = formatFullSearchResults(response.hits.hits); 5377 5378 showTopSearchData(formattedResults, input, type, searchResultContainer); 5379 5380 return formattedResults; 5381 5382 } else { 5383 5384 return false; 5385 } 5386 5387 }; 5388 5389 5390 /** 5391 * Calls the ajax request, and outputs the results. 5392 * Called by the handleKeyup callback, debounced. 5393 * 5394 * @param {Node} input - search input field 5395 */ 5396 const fetchFullResults = async (searchText, type, from = 0, container) => { 5397 5398 if (searchText) { 5399 5400 //Convert from 2 to 20 to bring results from ES 5401 let searchFrom = (from > 0) ? from * 10 : from; 5402 5403 const response = await esSearch(searchText, type, searchFrom); 5404 5405 //console.log(response); 5406 5407 if (response && response._shards && response._shards.successful > 0) { 5408 5409 const formattedResults = formatFullSearchResults(response.hits.hits); 5410 5411 //console.log(type); 5412 5413 updateFullSearchData(formattedResults, type, container); 5414 5415 //Add count 5416 container.querySelector('#' + type + '_results_count').innerHTML = '(' + response.hits.total.value + ')'; 5417 5418 mayBeDisplayPagination(response.hits, type, from, container); 5419 5420 return formattedResults; 5421 5422 } 5423 5424 } 5425 }; 5426 5427 5428 /**
5429 * Calls the ajax request, and outputs the results. 5430 * Called by the handleKeyup callback, debounced. 5431 * 5432 * @param {Node} input - search input field 5433 */ 5434 const fetchIfuIdResults = async (searchText) => { 5435 const container = document.getElementById('ifu_tabs'); 5436 5437 if (searchText.length >= 1) { 5438 //Bail ealry if container dont exsit 5439 if (container.length == 0) { 5440 return false; 5441 } 5442 5443 const tabsTitleContainer = container.querySelector('.tabs'); 5444 const tabsContainer = container.querySelector('#ifu_tab'); 5445 5446 const response = await esSearch(searchText, 'ifu_id'); 5447 //console.log(response); 5448 if (response && response._shards && response._shards.successful > 0) { 5449 //console.log(response); 5450 5451 const formattedResults = formatIfuSearchResults(response.hits.hits); 5452 5453 logSearchData(searchText, formattedResults, 4); 5454 5455 if (response.hits.total.value > 0) { 5456 5457 //console.log(formattedResults[0].ifu_base_part_number); 5458 if (formattedResults[0].ifu_base_part_number !== 'undefined') { 5459 5460 //Fetch IFu by this 5461 //console.log(typeof formattedResults[0].ifu_base_part_number); 5462 const ifuResponse = await esSearch(formattedResults[0].ifu_base_part_number.toString(), 'ifu_part'); 5463 const formattedIfuResults = formatIfuSearchResults(ifuResponse.hits.hits); 5464 5465 updateIfuSearchData(formattedIfuResults, 'ifu'); 5466 } 5467 } 5468 5469 } else { 5470 // tabsTitleContainer.innerHTML = ""; 5471 // tabsContainer.innerHTML = ""; 5472 } 5473 5474 } else { 5475 container.querySelector('.tabs').innerHTML = ""; 5476 container.querySelector('#ifu_tab').innerHTML = ""; 5477 } 5478 }; 5479 5480 /** 5481 * Calls the ajax request, and outputs the results. 5482 * Called by the handleKeyup callback, debounced. 5483 * 5484 * @param {Node} input - search input field 5485 */ 5486 const fetchIfuKitResults = async (searchText) => { 5487 5488 5489 5490 if (searchText.length >= 1) { 5491 5492 const response = await esSearch(searchText, 'ifu_kit_id'); 5493 5494 if (response && response._shards && response._shards.successful > 0) { 5495 5496 const formattedResults = formatIfuKitSearchResults(response.hits.hits); 5497 5498 // console.log(formattedResults); 5499 updateIfuKitData(formattedResults, 'ifu_kit'); 5500 5501 logSearchData(searchText, formattedResults, 5); 5502 5503 } else { 5504 //Show not found 5505 } 5506 5507 } 5508 }; 5509 5510 /** 5511 * Calls the ajax request, and outputs the results. 5512 * Called by the handleKeyup callback, debounced. 5513 * 5514 * @param {Node} input - search input field 5515 */ 5516 const fetchVideoResults = async (searchText) => { 5517 5518 if (searchText.length >= 1) { 5519 5520 const response = await esSearch(searchText, 'video'); 5521 5522 if (response && response._shards && response._shards.successful > 0) { 5523 5524 const formattedResults = formatFullSearchResults(response.hits.hits); 5525 //console.log(formattedResults); 5526 updateVideoData(formattedResults, 'video'); 5527 5528 logSearchData(searchText, formattedResults, 2); 5529 5530 } else { 5531 //Show not found 5532 } 5533 5534 } 5535 }; 5536 5537 5538 /** 5539 * Update UpdateCourseResultData search data 5540 * 5541 * @param {Array} options - formatted results 5542 * @param {string} input - search string 5543 * @returns {boolean} return true 5544 */ 5545 const UpdateCourseResultData = (options, container) => { 5546 5547 let course_template = ''; 5548 course_template += ` 5549 <div class="merit-on-demand-course-card-wrap xl:w-1/4 lg:w-1/3 md:w-1/2 w-full md:px-4 mb-8 md:min-h-[515px] min-h-[160px]"></div> 5550 `; 5551 options.forEach(element => { 5552 course_template += ` 5553 <div class="merit-on-demand-course-card-wrap xl:w-1/4 lg:w-1/3 md:w-1/2 w-full md:px-4 mb-8" itemscope="itemscope" itemtype="https://schema.org/CreativeWork"> 5554 <div class="merit-on-demand-course-card h-full min-h-[515px] flex flex-col justify-between relative"> 5555 <div> 5556 <div class="merit-course-thumb"> 5557 <img src="${element.thumbnail_url}" alt="${element.title}" class="w-full"> 5558 </div> 5559 <div class="merit-course-info px-6 pt-5 pb-5"> 5560 <h3 class="text-2xl text-charcoal font-normal mb-2"><a href="${element.url}" class="">${element.title}</a></h3> 5561 5562 <ul class="course-designed-list"> 5563 <li class="inline-block text-lg text-charcoal italic">Designed For: ${element.keywords}</li> 5564 </ul> 5565 </div> 5566 </div> 5567 <div class="pb-9 px-6"> 5568 <a href="${element.url}" class="course-see-more-btn merit-btn-secondary">See More</a> 5569 </div> 5570 </div> 5571 </div> 5572 `; 5573 }); 5574 container.innerHTML = course_template; 5575 return true; 5576 } 5577 5578 /**
5579 * Calls the ajax request, and outputs the results. 5580 * Called by the handleKeyup callback, debounced. 5581 * 5582 * @param {Node} input - search input field 5583 */ 5584 5585 const fetchCourseResults = async (searchText, container, currentData) => { 5586 if (searchText.length >= 1) { 5587 5588 const response = await esSearch(searchText, 'course'); 5589 // console.log('shred there'); 5590 // console.log(response.took); 5591 // console.log(response.hits.hits); 5592 if (response && response._shards) { 5593 if (response.hits.hits.length > 0) { 5594 const formattedResults = formatCourseSearchResults(response.hits.hits); 5595 UpdateCourseResultData(formattedResults, container); 5596 logSearchData(searchText, formattedResults, 2); 5597 } else { 5598 //Show not found 5599 container.innerHTML = `<div class="merit-on-demand-course-card-wrap xl:w-1/4 lg:w-1/3 md:w-1/2 w-full md:px-4 mb-8 md:min-h-[515px] min-h-[160px]"></div> 5600 <div class="merit-on-demand-course-card-wrap xl:w-1/4 lg:w-1/3 md:w-1/2 w-full md:px-4"> 5601 <h2>On demand courses not found !</h2> 5602 </div> 5603 `; 5604 } 5605 } 5606 5607 } else { 5608 container.innerHTML = currentData; 5609 } 5610 }; 5611 5612 5613 /** 5614 * Courses Search 5615 * 5616 */ 5617 const courseSearchContainer = document.getElementById('merit-courses'); 5618 const courseSearchResultsContainer = document.querySelector('.merit-on-demand-courses-container'); 5619 5620 5621 if (courseSearchContainer && courseSearchResultsContainer) { 5622 const currentData = courseSearchResultsContainer.innerHTML; 5623 //console.log(currentData); 5624 courseSearchContainer.addEventListener('keyup', debounce((event) => { 5625 event.preventDefault(); 5626 fetchCourseResults(event.target.value, courseSearchResultsContainer, currentData); 5627 }, 200)); 5628 } 5629 5630 5631 /** 5632 * Helper function to format search results for consumption 5633 * by the showTopSearchData function 5634 * 5635 * @param {object} hits - results from ES 5636 * @returns {Array} formatted hits 5637 */ 5638 5639 const formatCategorySearchResults = (hits) => { 5640 return hits.map((hit) => { 5641 const title = hit._source.post_title; 5642 const content = hit._source.post_content; 5643 const thumbnail_url = (hit._source.thumbnail_url !== 'undefined' && hit._source.thumbnail_url) ? hit._source.thumbnail_url : mdcObj.site_url + "/wp-content/themes/mdc/images/instrument.png"; 5644 const product_code = hit._source.comment_status; 5645 return { title, content, thumbnail_url, product_code }; 5646 }); 5647 }; 5648 5649 5650 5651 /** 5652 * Update UpdateCategoryResultData search data 5653 * 5654 * @param {Array} options - formatted results 5655 * @param {string} input - search string 5656 * @returns {boolean} return true 5657 */ 5658 const UpdateCategoryResultData = (options, type) => { 5659 5660 5661 5662 const container = document.querySelector('.merit-product-categories-container'); 5663 5664 if (container.length == 0) { 5665 return false; 5666 } 5667 5668 let product_category_template = ''; 5669 let hostname = mdcObj.site_url; 5670 if (options) { 5671 product_category_template += `<div class="merit-product-categories-card max-lg:hidden w-1/4 px-5 max-xl:w-1/3 max-lg:w-1/2 mb-10 max-md:w-full"> 5672 <div class="merit-archive-post-inner flex flex-col bg-white md:h-full merit-box-shadow"></div> 5673 </div>`; 5674 options.forEach((element) => { 5675 product_category_template += ` 5676 <div class="merit-product-categories-card w-1/4 px-5 max-lg:w-1/2 mb-10 max-md:w-full" itemscope="itemscope" itemtype="https://schema.org/CreativeWork"> 5677 <div class="merit-archive-post-inner flex flex-col bg-white h-full merit-box-shadow"> 5678 <div class="merit-product-categories-thumb h-[200px]" style="background-image: url(../assets/images/product-bg.png)"> 5679 <img src="${element.thumbnail_url}" width="410" height="200" alt="" class="w-full h-full object-cover"> 5680 </div> 5681 <div class="product-categories-text-content pl-6 pr-12 pt-4 pb-10 h-full flex flex-col justify-between"> 5682 <div> 5683 <h3 class="text-2xl font-normal text-charcoal mb-4"> 5684 <a href="${hostname}/primary/${element.product_code}/">${element.title}</a> 5685 </h3> 5686 <p class="text-lg font-light text-charcoal>${element.content}</p> 5687 </div> 5688 <div class="mt-12"> 5689 <a href="${hostname}/primary/${element.product_code}/" class="merit-btn-secondary-alt mt-auto hover:bg-bright-red">Go to category</a> 5690 </div> 5691 </div> 5692 </div> 5693 </div> 5694 `; 5695 }); 5696 } 5697 5698 container.innerHTML = product_category_template; 5699 return true; 5700 } 5701 5702 5703 /**
5704 * Calls the ajax request, and outputs the results. 5705 * Called by the handleKeyup callback, debounced. 5706 * 5707 * @param {Node} input - search input field 5708 */ 5709 5710 const fetchCategoryResults = async (searchText) => { 5711 5712 if (searchText.length >= 1) { 5713 const response = await esSearch(searchText, 'product_cateogry'); 5714 5715 console.log(response); 5716 if (response && response._shards && response._shards.successful > 0) { 5717 const formattedResults = formatCategorySearchResults(response.hits.hits); 5718 UpdateCategoryResultData(formattedResults, 'product_category'); 5719 logSearchData(searchText, formattedResults, 2); 5720 5721 } else { 5722 //Show not found 5723 console.log('Not found'); 5724 } 5725 5726 } 5727 }; 5728 5729 5730 /** 5731 * Product category search 5732 * 5733 */ 5734 5735 const productSearchContainer = document.getElementById('merit-product-cat-search'); 5736 5737 if (productSearchContainer) { 5738 productSearchContainer.addEventListener('keyup', debounce((event) => { 5739 event.preventDefault(); 5740 5741 fetchCategoryResults(event.target.value); 5742 5743 }, 200)); 5744 } 5745 5746 /** 5747 * Calls the ajax request, and outputs the results. 5748 * Called by the handleKeyup callback, debounced. 5749 * 5750 * @param {Node} input - search input field 5751 */ 5752 const fetchCcodeResults = async (searchText) => { 5753 5754 if (searchText.length >= 1) { 5755 5756 const response = await esSearch(searchText, 'ccode'); 5757 5758 if (response && response._shards && response._shards.successful > 0) { 5759 5760 const formattedResults = formatCcodeSearchResults(response.hits.hits); 5761 //console.log(formattedResults); 5762 updateCcodeData(formattedResults, 'ccode'); 5763 5764 logSearchData(searchText, formattedResults, 7); 5765 5766 } else { 5767 //Show not found 5768 } 5769 5770 } 5771 }; 5772 5773 /** 5774 * Calls the ajax request, and outputs the results. 5775 * Called by the handleKeyup callback, debounced. 5776 * 5777 * @param {Node} input - search input field 5778 */ 5779 const fetchIfuProductResults = async (searchText, from = 0) => { 5780 //console.log(from); 5781 if (searchText.length >= 1) { 5782 5783 //Convert from 2 to 20 to bring results from ES 5784 let searchFrom = (from > 0) ? from * 10 : from; 5785 5786 const response = await esSearch(searchText, 'ifu_product', searchFrom); 5787 //console.log(response); 5788 if (response && response._shards && response._shards.successful > 0) { 5789 5790 const formattedResults = formatIfuProductSearchResults(response.hits.hits); 5791 updateIfuProductData(formattedResults, 'ifu_product'); 5792 //console.log(response.hits); 5793 logSearchData(searchText, formattedResults, 6); 5794 mayBeDisplayPaginationIfu(response.hits, 'ifu_product', searchText, from); 5795 5796 } else { 5797 //Show not found 5798 } 5799 5800 } 5801 }; 5802 5803 /** 5804 * Calls the ajax request, and outputs the results. 5805 * Called by the handleKeyup callback, debounced. 5806 * 5807 * @param {Node} input - search input field 5808 */ 5809 const fetchDocumentResults = async (searchText) => { 5810 5811 if (searchText.length >= 1) { 5812 5813 const response = await esSearch(searchText, 'document'); 5814 //console.log(response); 5815 if (response && response._shards && response._shards.successful > 0) { 5816 5817 const formattedResults = formatDocumentSearchResults(response.hits.hits); 5818 updateDocumentData(formattedResults, 'document'); 5819 logSearchData(searchText, formattedResults, 3); 5820 5821 5822 } else { 5823 //Show not found 5824 } 5825 5826 } else { 5827 //hide results 5828 } 5829 }; 5830 5831 /** 5832 * Callback for keyup in Autosuggest container. 5833 * 5834 * Calls a debounced function to get the search results via 5835 * ajax request. 5836 * 5837 * @param {event} event - keyup event 5838 */ 5839 const handleKeyup = (event) => { 5840 event.preventDefault(); 5841 5842 const { target, key, keyCode } = event; 5843 5844 if (key === 'Escape' || key === 'Esc' || keyCode === 27) { 5845 hideAutosuggestBox(); 5846 toggleInputAria(false, target); 5847 setInputActiveDescendant('', target); 5848 return; 5849 } 5850 5851 const input = event.target; 5852 const searchText = input.value; 5853 5854 if (searchText.length >= 1) { 5855 searchResultContainer.classList.remove('hidden'); 5856 } else { 5857 searchResultContainer.classList.add('hidden'); 5858 } 5859 5860 Promise.all([ 5861 fetchResults(input, 'product'), 5862 //fetchResults( input, 'page' ), 5863 fetchResults(input, 'part'), 5864 //fetchResults( input, 'media' ), 5865 fetchResults(input, 'video'), 5866 fetchResults(input, 'post'), 5867 ]).then(([page, part, media, video, post]) => { 5868 5869 const formattedResults = [page, part, media, video, post].flat(); 5870 5871 logSearchData(input.value, formattedResults, 0); 5872 }); 5873 5874 }; 5875 5876 /** 5877 * Listen for any events: 5878 * 5879 * keyup 5880 * send them for a query to the Elasticsearch server 5881 * 5882 * blur 5883 * hide the autosuggest box 5884 */ 5885 5886 const epInputNodes = document.querySelectorAll( 5887 `.search-form-input`, 5888 ); 5889
5890 Array.from(epInputNodes).forEach((input) => { 5891 input.addEventListener('keyup', debounce(handleKeyup, 500)); 5892 // input.addEventListener('blur', function () { 5893 // window.setTimeout(hideAutosuggestBox, 200); 5894 // }); 5895 }); 5896 5897 5898 /** 5899 * Do Full search, use Promise to finish all then log search results 5900 * 5901 */ 5902 5903 const getSearchText = getUrlParameter('st'); 5904 5905 //console.log(getSearchText); 5906 5907 if (getSearchText) { 5908 5909 const mainSearchContainer = document.querySelector('#merit-main-search'); 5910 5911 //console.log(getSearchText); 5912 Promise.all([ 5913 fetchFullResults(getSearchText, 'product', 0, mainSearchContainer), 5914 fetchFullResults(getSearchText, 'page', 0, mainSearchContainer), 5915 fetchFullResults(getSearchText, 'part', 0, mainSearchContainer), 5916 fetchFullResults(getSearchText, 'media', 0, mainSearchContainer), 5917 fetchFullResults(getSearchText, 'video', 0, mainSearchContainer), 5918 fetchFullResults(getSearchText, 'post', 0, mainSearchContainer), 5919 fetchFullResults(getSearchText, 'press_release', 0, mainSearchContainer) 5920 ]).then(([product, page, part, media, video, post, press_release]) => { 5921 // All results loaded! 5922 //console.log(page, part, media, video, post); 5923 //console.log([page, part, media, video, post]); 5924 //console.log([page, part, media, video, post].flat()); 5925 const formattedResults = [product, page, part, media, video, post, press_release].flat(); 5926 //For Development 5927 logSearchData(getSearchText, formattedResults, 1); 5928 }); 5929 5930 } 5931 5932 /** 5933 * get IFU by id 5934 * 5935 */ 5936 5937 const ifuSearchContainer = document.getElementById('ifu_search_field'); 5938 5939 if (ifuSearchContainer) { 5940 5941 ifuSearchContainer.addEventListener('keyup', debounce((event) => { 5942 event.preventDefault(); 5943 fetchIfuIdResults(event.target.value); 5944 5945 }, 200)); 5946 5947 } 5948 5949 5950 const getIfuId = getUrlParameter('i'); 5951 5952 if (getIfuId) { 5953 5954 fetchIfuIdResults(getIfuId); 5955 5956 } 5957 /** 5958 * get IFU Kit by id 5959 * 5960 */ 5961 const ifuKitSearchContainer = document.getElementById('ifu_search_kit_field'); 5962 5963 if (ifuKitSearchContainer) { 5964 5965 ifuKitSearchContainer.addEventListener('keyup', (event) => { 5966 event.preventDefault(); 5967 const debounceFetchResults = debounce(fetchIfuKitResults, 500); 5968 debounceFetchResults(event.target.value); 5969 }); 5970 } 5971 5972 5973 const getIfuKitId = getUrlParameter('k'); 5974 5975 if (getIfuKitId) { 5976 5977 fetchIfuKitResults(getIfuKitId); 5978 5979 } 5980 5981 5982 /** 5983 * Callback for click Show Form. 5984 * 5985 * Calls a debounced function to get the search results via 5986 * ajax request. 5987 * 5988 * @param {event} event - keyup event 5989 */ 5990 const handleFormDisplay = (event) => { 5991 5992 const { target, key, keyCode } = event; 5993 5994 const container = document.getElementById(target.getAttribute('data-results-container')); 5995 5996 if (container.length == 0) { 5997 return false; 5998 } 5999 6000 //Show close icon 6001 6002 if (container.style.display === "none") { 6003 target.parentElement.classList.add("top-search-displayed"); 6004 container.style.display = "block"; 6005 //Focus on search form input 6006 container.querySelector('#st').focus(); 6007 } else { 6008 target.parentElement.classList.remove("top-search-displayed"); 6009 container.style.display = "none"; 6010 } 6011 6012 }; 6013 6014 6015 6016 /** 6017 * IFU Product search 6018 * 6019 */ 6020 6021 const ifuProductSearchContainer = document.getElementById('ifu_product_search_field'); 6022 6023 if (ifuProductSearchContainer) { 6024 6025 ifuProductSearchContainer.addEventListener('keyup', debounce((event) => { 6026 event.preventDefault(); 6027 fetchIfuProductResults(event.target.value); 6028 6029 }, 500)); 6030 } 6031 6032 /** 6033 * Document search 6034 * 6035 */ 6036 6037 const documentSearchContainer = document.getElementById('document_product_search_field'); 6038 6039 if (documentSearchContainer) { 6040 6041 6042 documentSearchContainer.addEventListener('keyup', debounce((event) => { 6043 event.preventDefault(); 6044 fetchDocumentResults(event.target.value); 6045 }, 500)); 6046 } 6047 6048 /** 6049 * Listen for click events: 6050 * 6051 * Show hide search form on top 6052 */ 6053 6054 var meritShowSearchFormContainer = document.getElementById('merit-show-search-form'); 6055 6056 if (meritShowSearchFormContainer) { 6057 6058 const showSearchFormButton = meritShowSearchFormContainer.querySelector('.search-form-icon'); 6059 6060 showSearchFormButton.addEventListener('click', (event) => { 6061 6062 event.preventDefault(); 6063 handleFormDisplay(event); 6064 6065 }); 6066 6067 } 6068 6069 6070 /** 6071 * Listen for click events: 6072 * 6073 * Submit the Es search form when View all button clicked 6074 */ 6075 6076 const epSearchBtnNodes = document.querySelectorAll( 6077 `.view-search-results`, 6078 );
6079 Array.from(epSearchBtnNodes).forEach((input) => { 6080 input.addEventListener('click', (event) => { 6081 6082 const container = findAncestorByClass(input, 'top-search-results-container'); 6083 6084 //console.log(container); 6085 6086 container.firstElementChild.submit(); 6087 6088 }); 6089 }); 6090 6091 6092 6093 var mainSearchContainer = document.getElementById('merit-main-search'); 6094 6095 if (mainSearchContainer) { 6096 6097 /** 6098 * Listen for click events: 6099 * 6100 * Search Tab 6101 */ 6102 6103 const searchTabNavs = mainSearchContainer.querySelectorAll( 6104 `.search-tab-nav`, 6105 ); 6106 const searchTabContents = mainSearchContainer.querySelectorAll( 6107 `.search-tab-content`, 6108 ); 6109 6110 Array.from(searchTabNavs).forEach((input) => { 6111 input.addEventListener('click', (event) => { 6112 const tabId = input.getAttribute('data-tab-id'); 6113 6114 searchTabNavs.forEach(function (tab) { 6115 6116 if (tabId == tab.getAttribute('data-tab-id')) { 6117 tab.classList.add("active"); 6118 } else { 6119 tab.classList.remove("active"); 6120 } 6121 }); 6122 6123 searchTabContents.forEach(function (content) { 6124 6125 if (tabId == content.id) { 6126 content.classList.add("active"); 6127 } else { 6128 content.classList.remove("active"); 6129 } 6130 }); 6131 6132 }); 6133 }); 6134 6135 const tabParam = getUrlParameter('tab'); 6136 6137 if (tabParam) { 6138 searchTabNavs.forEach(function (tab) { 6139 tab.classList.remove("active"); 6140 if ('tabs-' + tabParam == tab.getAttribute('data-tab-id')) { 6141 tab.classList.add("active"); 6142 } 6143 }); 6144 6145 searchTabContents.forEach(function (content) { 6146 content.classList.remove("active"); 6147 if ('tabs-' + tabParam == content.id) { 6148 content.classList.add("active"); 6149 } 6150 }); 6151 } 6152 6153 6154 } 6155 6156 /** 6157 * Video Search 6158 * 6159 */ 6160 const videoSearchContainer = document.getElementById('video_search_field'); 6161 6162 if (videoSearchContainer) { 6163 6164 video_search_field.addEventListener('keyup', debounce((event) => { 6165 6166 event.preventDefault(); 6167 event.target.classList.add("search-value-exist"); 6168 fetchVideoResults(event.target.value); 6169 6170 }, 500)); 6171 } 6172 6173 /** 6174 * CCode Search 6175 * 6176 */ 6177 const ccodeSearchContainer = document.getElementById('ccode_search_field'); 6178 6179 if (ccodeSearchContainer) { 6180 ccodeSearchContainer.addEventListener('keyup', debounce((event) => { 6181 6182 event.preventDefault(); 6183 fetchCcodeResults(event.target.value); 6184 6185 }, 500)); 6186 } 6187 6188 /** 6189 * 6190 * Show hide search list 6191 */ 6192 document.onclick = (event) => { 6193 6194 //console.log(target) 6195 if (event.target && event.target.classList.contains('list-accordion-btn')) { 6196 const target = event.target.closest('.merit-main-search-item'); 6197 //const listAccordionBtn = event.target.closest('.list-accordion-btn'); 6198 const productCode = event.target.getAttribute('data-product_code'); 6199 // console.log(productCode); 6200 target.classList.toggle('active'); 6201 target.nextElementSibling.classList.toggle('active-search-accordion'); 6202 getDocumentData(productCode, target.nextElementSibling); 6203 } 6204 } 6205 6206 6207 6208 } 6209 6210 6211 // Ensure we have an endpoint URL, or 6212 // else this shouldn't happen 6213 if (typeof meritChildAjax !== "undefined" && typeof meritChildAjax.ajax_endpoint !== "undefined" && meritChildAjax.ajax_endpoint !== '') { 6214 6215 mdcEsSearchInit(); 6216 6217 } 6218 6219}());;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.