!function(r){"use strict";var t,e,n;t=[function(r,t,e){e(1),e(53),e(81),e(82),e(93),e(94),e(99),e(100),e(110),e(120),e(122),e(123),e(124),r.exports=e(125)},function(r,t,e){var n=e(2),o=e(4),a=e(48),c=ArrayBuffer.prototype;n&&!("detached"in c)&&o(c,"detached",{configurable:!0,get:function(){return a(this)}})},function(r,t,e){var n=e(3);r.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(r,t,e){r.exports=function(r){try{return!!r()}catch(r){return!0}}},function(r,t,e){var n=e(5),o=e(23);r.exports=function(r,t,e){return e.get&&n(e.get,t,{getter:!0}),e.set&&n(e.set,t,{setter:!0}),o.f(r,t,e)}},function(t,e,n){var o=n(6),a=n(3),c=n(8),i=n(9),u=n(2),s=n(13).CONFIGURABLE,f=n(14),p=n(19),l=p.enforce,y=p.get,v=String,h=Object.defineProperty,g=o("".slice),b=o("".replace),m=o([].join),d=u&&!a((function(){return 8!==h((function(){}),"length",{value:8}).length})),w=String(String).split("String"),E=t.exports=function(t,e,n){"Symbol("===g(v(e),0,7)&&(e="["+b(v(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!i(t,"name")||s&&t.name!==e)&&(u?h(t,"name",{value:e,configurable:!0}):t.name=e),d&&n&&i(n,"arity")&&t.length!==n.arity&&h(t,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?u&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=r)}catch(r){}var o=l(t);return i(o,"source")||(o.source=m(w,"string"==typeof e?e:"")),t};Function.prototype.toString=E((function(){return c(this)&&y(this).source||f(this)}),"toString")},function(r,t,e){var n=e(7),o=Function.prototype,a=o.call,c=n&&o.bind.bind(a,a);r.exports=n?c:function(r){return function(){return a.apply(r,arguments)}}},function(r,t,e){var n=e(3);r.exports=!n((function(){var r=function(){}.bind();return"function"!=typeof r||r.hasOwnProperty("prototype")}))},function(t,e,n){var o="object"==typeof document&&document.all;t.exports=void 0===o&&o!==r?function(r){return"function"==typeof r||r===o}:function(r){return"function"==typeof r}},function(r,t,e){var n=e(6),o=e(10),a=n({}.hasOwnProperty);r.exports=Object.hasOwn||function(r,t){return a(o(r),t)}},function(r,t,e){var n=e(11),o=Object;r.exports=function(r){return o(n(r))}},function(r,t,e){var n=e(12),o=TypeError;r.exports=function(r){if(n(r))throw new o("Can't call method on "+r);return r}},function(t,e,n){t.exports=function(t){return null===t||t===r}},function(r,t,e){var n=e(2),o=e(9),a=Function.prototype,c=n&&Object.getOwnPropertyDescriptor,i=o(a,"name"),u=i&&"something"===function(){}.name,s=i&&(!n||n&&c(a,"name").configurable);r.exports={EXISTS:i,PROPER:u,CONFIGURABLE:s}},function(r,t,e){var n=e(6),o=e(8),a=e(15),c=n(Function.toString);o(a.inspectSource)||(a.inspectSource=function(r){return c(r)}),r.exports=a.inspectSource},function(r,t,e){var n=e(16),o=e(17),a=e(18),c="__core-js_shared__",i=r.exports=o[c]||a(c,{});(i.versions||(i.versions=[])).push({version:"3.39.0",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},function(r,t,e){r.exports=!1},function(r,t,e){var n=function(r){return r&&r.Math===Math&&r};r.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},function(r,t,e){var n=e(17),o=Object.defineProperty;r.exports=function(r,t){try{o(n,r,{value:t,configurable:!0,writable:!0})}catch(e){n[r]=t}return t}},function(r,t,e){var n,o,a,c=e(20),i=e(17),u=e(21),s=e(22),f=e(9),p=e(15),l=e(46),y=e(47),v="Object already initialized",h=i.TypeError,g=i.WeakMap;if(c||p.state){var b=p.state||(p.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,n=function(r,t){if(b.has(r))throw new h(v);return t.facade=r,b.set(r,t),t},o=function(r){return b.get(r)||{}},a=function(r){return b.has(r)}}else{var m=l("state");y[m]=!0,n=function(r,t){if(f(r,m))throw new h(v);return t.facade=r,s(r,m,t),t},o=function(r){return f(r,m)?r[m]:{}},a=function(r){return f(r,m)}}r.exports={set:n,get:o,has:a,enforce:function(r){return a(r)?o(r):n(r,{})},getterFor:function(r){return function(t){var e;if(!u(t)||(e=o(t)).type!==r)throw new h("Incompatible receiver, "+r+" required");return e}}}},function(r,t,e){var n=e(17),o=e(8),a=n.WeakMap;r.exports=o(a)&&/native code/.test(String(a))},function(r,t,e){var n=e(8);r.exports=function(r){return"object"==typeof r?null!==r:n(r)}},function(r,t,e){var n=e(2),o=e(23),a=e(45);r.exports=n?function(r,t,e){return o.f(r,t,a(1,e))}:function(r,t,e){return r[t]=e,r}},function(r,t,e){var n=e(2),o=e(24),a=e(26),c=e(27),i=e(28),u=TypeError,s=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p="enumerable",l="configurable",y="writable";t.f=n?a?function(r,t,e){if(c(r),t=i(t),c(e),"function"==typeof r&&"prototype"===t&&"value"in e&&y in e&&!e[y]){var n=f(r,t);n&&n[y]&&(r[t]=e.value,e={configurable:l in e?e[l]:n[l],enumerable:p in e?e[p]:n[p],writable:!1})}return s(r,t,e)}:s:function(r,t,e){if(c(r),t=i(t),c(e),o)try{return s(r,t,e)}catch(r){}if("get"in e||"set"in e)throw new u("Accessors not supported");return"value"in e&&(r[t]=e.value),r}},function(r,t,e){var n=e(2),o=e(3),a=e(25);r.exports=!n&&!o((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(r,t,e){var n=e(17),o=e(21),a=n.document,c=o(a)&&o(a.createElement);r.exports=function(r){return c?a.createElement(r):{}}},function(r,t,e){var n=e(2),o=e(3);r.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(r,t,e){var n=e(21),o=String,a=TypeError;r.exports=function(r){if(n(r))return r;throw new a(o(r)+" is not an object")}},function(r,t,e){var n=e(29),o=e(31);r.exports=function(r){var t=n(r,"string");return o(t)?t:t+""}},function(t,e,n){var o=n(30),a=n(21),c=n(31),i=n(38),u=n(41),s=n(42),f=TypeError,p=s("toPrimitive");t.exports=function(t,e){if(!a(t)||c(t))return t;var n,s=i(t,p);if(s){if(e===r&&(e="default"),n=o(s,t,e),!a(n)||c(n))return n;throw new f("Can't convert object to primitive value")}return e===r&&(e="number"),u(t,e)}},function(r,t,e){var n=e(7),o=Function.prototype.call;r.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},function(r,t,e){var n=e(32),o=e(8),a=e(33),c=e(34),i=Object;r.exports=c?function(r){return"symbol"==typeof r}:function(r){var t=n("Symbol");return o(t)&&a(t.prototype,i(r))}},function(t,e,n){var o=n(17),a=n(8);t.exports=function(t,e){return arguments.length<2?(n=o[t],a(n)?n:r):o[t]&&o[t][e];var n}},function(r,t,e){var n=e(6);r.exports=n({}.isPrototypeOf)},function(r,t,e){var n=e(35);r.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(r,t,e){var n=e(36),o=e(3),a=e(17).String;r.exports=!!Object.getOwnPropertySymbols&&!o((function(){var r=Symbol("symbol detection");return!a(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(r,t,e){var n,o,a=e(17),c=e(37),i=a.process,u=a.Deno,s=i&&i.versions||u&&u.version,f=s&&s.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&c&&(!(n=c.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=c.match(/Chrome\/(\d+)/))&&(o=+n[1]),r.exports=o},function(r,t,e){var n=e(17).navigator,o=n&&n.userAgent;r.exports=o?String(o):""},function(t,e,n){var o=n(39),a=n(12);t.exports=function(t,e){var n=t[e];return a(n)?r:o(n)}},function(r,t,e){var n=e(8),o=e(40),a=TypeError;r.exports=function(r){if(n(r))return r;throw new a(o(r)+" is not a function")}},function(r,t,e){var n=String;r.exports=function(r){try{return n(r)}catch(r){return"Object"}}},function(r,t,e){var n=e(30),o=e(8),a=e(21),c=TypeError;r.exports=function(r,t){var e,i;if("string"===t&&o(e=r.toString)&&!a(i=n(e,r)))return i;if(o(e=r.valueOf)&&!a(i=n(e,r)))return i;if("string"!==t&&o(e=r.toString)&&!a(i=n(e,r)))return i;throw new c("Can't convert object to primitive value")}},function(r,t,e){var n=e(17),o=e(43),a=e(9),c=e(44),i=e(35),u=e(34),s=n.Symbol,f=o("wks"),p=u?s.for||s:s&&s.withoutSetter||c;r.exports=function(r){return a(f,r)||(f[r]=i&&a(s,r)?s[r]:p("Symbol."+r)),f[r]}},function(r,t,e){var n=e(15);r.exports=function(r,t){return n[r]||(n[r]=t||{})}},function(t,e,n){var o=n(6),a=0,c=Math.random(),i=o(1..toString);t.exports=function(t){return"Symbol("+(t===r?"":t)+")_"+i(++a+c,36)}},function(r,t,e){r.exports=function(r,t){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:t}}},function(r,t,e){var n=e(43),o=e(44),a=n("keys");r.exports=function(r){return a[r]||(a[r]=o(r))}},function(r,t,e){r.exports={}},function(r,t,e){var n=e(17),o=e(49),a=e(51),c=n.ArrayBuffer,i=c&&c.prototype,u=i&&o(i.slice);r.exports=function(r){if(0!==a(r))return!1;if(!u)return!1;try{return u(r,0,0),!1}catch(r){return!0}}},function(r,t,e){var n=e(50),o=e(6);r.exports=function(r){if("Function"===n(r))return o(r)}},function(r,t,e){var n=e(6),o=n({}.toString),a=n("".slice);r.exports=function(r){return a(o(r),8,-1)}},function(r,t,e){var n=e(17),o=e(52),a=e(50),c=n.ArrayBuffer,i=n.TypeError;r.exports=c&&o(c.prototype,"byteLength","get")||function(r){if("ArrayBuffer"!==a(r))throw new i("ArrayBuffer expected");return r.byteLength}},function(r,t,e){var n=e(6),o=e(39);r.exports=function(r,t,e){try{return n(o(Object.getOwnPropertyDescriptor(r,t)[e]))}catch(r){}}},function(t,e,n){var o=n(54),a=n(73);a&&o({target:"ArrayBuffer",proto:!0},{transfer:function(){return a(this,arguments.length?arguments[0]:r,!0)}})},function(t,e,n){var o=n(17),a=n(55).f,c=n(22),i=n(59),u=n(18),s=n(60),f=n(72);t.exports=function(t,e){var n,p,l,y,v,h=t.target,g=t.global,b=t.stat;if(n=g?o:b?o[h]||u(h,{}):o[h]&&o[h].prototype)for(p in e){if(y=e[p],l=t.dontCallGetSet?(v=a(n,p))&&v.value:n[p],!f(g?p:h+(b?".":"#")+p,t.forced)&&l!==r){if(typeof y==typeof l)continue;s(y,l)}(t.sham||l&&l.sham)&&c(y,"sham",!0),i(n,p,y,t)}}},function(r,t,e){var n=e(2),o=e(30),a=e(56),c=e(45),i=e(57),u=e(28),s=e(9),f=e(24),p=Object.getOwnPropertyDescriptor;t.f=n?p:function(r,t){if(r=i(r),t=u(t),f)try{return p(r,t)}catch(r){}if(s(r,t))return c(!o(a.f,r,t),r[t])}},function(r,t,e){var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!n.call({1:2},1);t.f=a?function(r){var t=o(this,r);return!!t&&t.enumerable}:n},function(r,t,e){var n=e(58),o=e(11);r.exports=function(r){return n(o(r))}},function(r,t,e){var n=e(6),o=e(3),a=e(50),c=Object,i=n("".split);r.exports=o((function(){return!c("z").propertyIsEnumerable(0)}))?function(r){return"String"===a(r)?i(r,""):c(r)}:c},function(t,e,n){var o=n(8),a=n(23),c=n(5),i=n(18);t.exports=function(t,e,n,u){u||(u={});var s=u.enumerable,f=u.name!==r?u.name:e;if(o(n)&&c(n,f,u),u.global)s?t[e]=n:i(e,n);else{try{u.unsafe?t[e]&&(s=!0):delete t[e]}catch(r){}s?t[e]=n:a.f(t,e,{value:n,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},function(r,t,e){var n=e(9),o=e(61),a=e(55),c=e(23);r.exports=function(r,t,e){for(var i=o(t),u=c.f,s=a.f,f=0;f<i.length;f++){var p=i[f];n(r,p)||e&&n(e,p)||u(r,p,s(t,p))}}},function(r,t,e){var n=e(32),o=e(6),a=e(62),c=e(71),i=e(27),u=o([].concat);r.exports=n("Reflect","ownKeys")||function(r){var t=a.f(i(r)),e=c.f;return e?u(t,e(r)):t}},function(r,t,e){var n=e(63),o=e(70).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(r){return n(r,o)}},function(r,t,e){var n=e(6),o=e(9),a=e(57),c=e(64).indexOf,i=e(47),u=n([].push);r.exports=function(r,t){var e,n=a(r),s=0,f=[];for(e in n)!o(i,e)&&o(n,e)&&u(f,e);for(;t.length>s;)o(n,e=t[s++])&&(~c(f,e)||u(f,e));return f}},function(r,t,e){var n=e(57),o=e(65),a=e(68),c=function(r){return function(t,e,c){var i=n(t),u=a(i);if(0===u)return!r&&-1;var s,f=o(c,u);if(r&&e!=e){for(;u>f;)if((s=i[f++])!=s)return!0}else for(;u>f;f++)if((r||f in i)&&i[f]===e)return r||f||0;return!r&&-1}};r.exports={includes:c(!0),indexOf:c(!1)}},function(r,t,e){var n=e(66),o=Math.max,a=Math.min;r.exports=function(r,t){var e=n(r);return e<0?o(e+t,0):a(e,t)}},function(r,t,e){var n=e(67);r.exports=function(r){var t=+r;return t!=t||0===t?0:n(t)}},function(r,t,e){var n=Math.ceil,o=Math.floor;r.exports=Math.trunc||function(r){var t=+r;return(t>0?o:n)(t)}},function(r,t,e){var n=e(69);r.exports=function(r){return n(r.length)}},function(r,t,e){var n=e(66),o=Math.min;r.exports=function(r){var t=n(r);return t>0?o(t,9007199254740991):0}},function(r,t,e){r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(r,t,e){t.f=Object.getOwnPropertySymbols},function(r,t,e){var n=e(3),o=e(8),a=/#|\.prototype\./,c=function(r,t){var e=u[i(r)];return e===f||e!==s&&(o(t)?n(t):!!t)},i=c.normalize=function(r){return String(r).replace(a,".").toLowerCase()},u=c.data={},s=c.NATIVE="N",f=c.POLYFILL="P";r.exports=c},function(t,e,n){var o=n(17),a=n(6),c=n(52),i=n(74),u=n(75),s=n(51),f=n(76),p=n(80),l=o.structuredClone,y=o.ArrayBuffer,v=o.DataView,h=Math.min,g=y.prototype,b=v.prototype,m=a(g.slice),d=c(g,"resizable","get"),w=c(g,"maxByteLength","get"),E=a(b.getInt8),x=a(b.setInt8);t.exports=(p||f)&&function(t,e,n){var o,a=s(t),c=e===r?a:i(e),g=!d||!d(t);if(u(t),p&&(t=l(t,{transfer:[t]}),a===c&&(n||g)))return t;if(a>=c&&(!n||g))o=m(t,0,c);else{var b=n&&!g&&w?{maxByteLength:w(t)}:r;o=new y(c,b);for(var O=new v(t),R=new v(o),S=h(c,a),A=0;A<S;A++)x(R,A,E(O,A))}return p||f(t),o}},function(t,e,n){var o=n(66),a=n(69),c=RangeError;t.exports=function(t){if(t===r)return 0;var e=o(t),n=a(e);if(e!==n)throw new c("Wrong length or index");return n}},function(r,t,e){var n=e(48),o=TypeError;r.exports=function(r){if(n(r))throw new o("ArrayBuffer is detached");return r}},function(r,t,e){var n,o,a,c,i=e(17),u=e(77),s=e(80),f=i.structuredClone,p=i.ArrayBuffer,l=i.MessageChannel,y=!1;if(s)y=function(r){f(r,{transfer:[r]})};else if(p)try{l||(n=u("worker_threads"))&&(l=n.MessageChannel),l&&(o=new l,a=new p(2),c=function(r){o.port1.postMessage(null,[r])},2===a.byteLength&&(c(a),0===a.byteLength&&(y=c)))}catch(r){}r.exports=y},function(r,t,e){var n=e(17),o=e(78);r.exports=function(r){if(o){try{return n.process.getBuiltinModule(r)}catch(r){}try{return Function('return require("'+r+'")')()}catch(r){}}}},function(r,t,e){var n=e(79);r.exports="NODE"===n},function(r,t,e){var n=e(17),o=e(37),a=e(50),c=function(r){return o.slice(0,r.length)===r};r.exports=c("Bun/")?"BUN":c("Cloudflare-Workers")?"CLOUDFLARE":c("Deno/")?"DENO":c("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===a(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},function(r,t,e){var n=e(17),o=e(3),a=e(36),c=e(79),i=n.structuredClone;r.exports=!!i&&!o((function(){if("DENO"===c&&a>92||"NODE"===c&&a>94||"BROWSER"===c&&a>97)return!1;var r=new ArrayBuffer(8),t=i(r,{transfer:[r]});return 0!==r.byteLength||8!==t.byteLength}))},function(t,e,n){var o=n(54),a=n(73);a&&o({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return a(this,arguments.length?arguments[0]:r,!1)}})},function(r,t,e){var n=e(54),o=e(6),a=e(39),c=e(11),i=e(83),u=e(92),s=e(16),f=e(3),p=u.Map,l=u.has,y=u.get,v=u.set,h=o([].push),g=s||f((function(){return 1!==p.groupBy("ab",(function(r){return r})).get("a").length}));n({target:"Map",stat:!0,forced:s||g},{groupBy:function(r,t){c(r),a(t);var e=new p,n=0;return i(r,(function(r){var o=t(r,n++);l(e,o)?h(y(e,o),r):v(e,o,[r])})),e}})},function(r,t,e){var n=e(84),o=e(30),a=e(27),c=e(40),i=e(85),u=e(68),s=e(33),f=e(87),p=e(88),l=e(91),y=TypeError,v=function(r,t){this.stopped=r,this.result=t},h=v.prototype;r.exports=function(r,t,e){var g,b,m,d,w,E,x,O=e&&e.that,R=!(!e||!e.AS_ENTRIES),S=!(!e||!e.IS_RECORD),A=!(!e||!e.IS_ITERATOR),T=!(!e||!e.INTERRUPTED),D=n(t,O),_=function(r){return g&&l(g,"normal",r),new v(!0,r)},I=function(r){return R?(a(r),T?D(r[0],r[1],_):D(r[0],r[1])):T?D(r,_):D(r)};if(S)g=r.iterator;else if(A)g=r;else{if(!(b=p(r)))throw new y(c(r)+" is not iterable");if(i(b)){for(m=0,d=u(r);d>m;m++)if((w=I(r[m]))&&s(h,w))return w;return new v(!1)}g=f(r,b)}for(E=S?r.next:g.next;!(x=o(E,g)).done;){try{w=I(x.value)}catch(r){l(g,"throw",r)}if("object"==typeof w&&w&&s(h,w))return w}return new v(!1)}},function(t,e,n){var o=n(49),a=n(39),c=n(7),i=o(o.bind);t.exports=function(t,e){return a(t),e===r?t:c?i(t,e):function(){return t.apply(e,arguments)}}},function(t,e,n){var o=n(42),a=n(86),c=o("iterator"),i=Array.prototype;t.exports=function(t){return t!==r&&(a.Array===t||i[c]===t)}},function(r,t,e){r.exports={}},function(r,t,e){var n=e(30),o=e(39),a=e(27),c=e(40),i=e(88),u=TypeError;r.exports=function(r,t){var e=arguments.length<2?i(r):t;if(o(e))return a(n(e,r));throw new u(c(r)+" is not iterable")}},function(r,t,e){var n=e(89),o=e(38),a=e(12),c=e(86),i=e(42)("iterator");r.exports=function(r){if(!a(r))return o(r,i)||o(r,"@@iterator")||c[n(r)]}},function(t,e,n){var o=n(90),a=n(8),c=n(50),i=n(42)("toStringTag"),u=Object,s="Arguments"===c(function(){return arguments}());t.exports=o?c:function(t){var e,n,o;return t===r?"Undefined":null===t?"Null":"string"==typeof(n=function(r,t){try{return r[t]}catch(r){}}(e=u(t),i))?n:s?c(e):"Object"===(o=c(e))&&a(e.callee)?"Arguments":o}},function(r,t,e){var n={};n[e(42)("toStringTag")]="z",r.exports="[object z]"===String(n)},function(r,t,e){var n=e(30),o=e(27),a=e(38);r.exports=function(r,t,e){var c,i;o(r);try{if(!(c=a(r,"return"))){if("throw"===t)throw e;return e}c=n(c,r)}catch(r){i=!0,c=r}if("throw"===t)throw e;if(i)throw c;return o(c),e}},function(r,t,e){var n=e(6),o=Map.prototype;r.exports={Map,set:n(o.set),get:n(o.get),has:n(o.has),remove:n(o.delete),proto:o}},function(r,t,e){var n=e(54),o=e(32),a=e(6),c=e(39),i=e(11),u=e(28),s=e(83),f=e(3),p=Object.groupBy,l=o("Object","create"),y=a([].push);n({target:"Object",stat:!0,forced:!p||f((function(){return 1!==p("ab",(function(r){return r})).a.length}))},{groupBy:function(r,t){i(r),c(t);var e=l(null),n=0;return s(r,(function(r){var o=u(t(r,n++));o in e?y(e[o],r):e[o]=[r]})),e}})},function(t,e,n){var o=n(54),a=n(17),c=n(95),i=n(96),u=n(97),s=n(39),f=n(98),p=a.Promise,l=!1;o({target:"Promise",stat:!0,forced:!p||!p.try||f((function(){p.try((function(r){l=8===r}),8)})).error||!l},{try:function(t){var e=arguments.length>1?i(arguments,1):[],n=u.f(this),o=f((function(){return c(s(t),r,e)}));return(o.error?n.reject:n.resolve)(o.value),n.promise}})},function(r,t,e){var n=e(7),o=Function.prototype,a=o.apply,c=o.call;r.exports="object"==typeof Reflect&&Reflect.apply||(n?c.bind(a):function(){return c.apply(a,arguments)})},function(r,t,e){var n=e(6);r.exports=n([].slice)},function(t,e,n){var o=n(39),a=TypeError,c=function(t){var e,n;this.promise=new t((function(t,o){if(e!==r||n!==r)throw new a("Bad Promise constructor");e=t,n=o})),this.resolve=o(e),this.reject=o(n)};t.exports.f=function(r){return new c(r)}},function(r,t,e){r.exports=function(r){try{return{error:!1,value:r()}}catch(r){return{error:!0,value:r}}}},function(r,t,e){var n=e(54),o=e(97);n({target:"Promise",stat:!0},{withResolvers:function(){var r=o.f(this);return{promise:r.promise,resolve:r.resolve,reject:r.reject}}})},function(t,e,n){var o=n(54),a=n(17),c=n(32),i=n(45),u=n(23).f,s=n(9),f=n(101),p=n(102),l=n(106),y=n(108),v=n(109),h=n(2),g=n(16),b="DOMException",m=c("Error"),d=c(b),w=function(){f(this,E);var t=arguments.length,e=l(t<1?r:arguments[0]),n=l(t<2?r:arguments[1],"Error"),o=new d(e,n),a=new m(e);return a.name=b,u(o,"stack",i(1,v(a.stack,1))),p(o,this,w),o},E=w.prototype=d.prototype,x="stack"in new m(b),O="stack"in new d(1,2),R=d&&h&&Object.getOwnPropertyDescriptor(a,b),S=!(!R||R.writable&&R.configurable),A=x&&!S&&!O;o({global:!0,constructor:!0,forced:g||A},{DOMException:A?w:d});var T=c(b),D=T.prototype;if(D.constructor!==T)for(var _ in g||u(D,"constructor",i(1,T)),y)if(s(y,_)){var I=y[_],j=I.s;s(T,j)||u(T,j,i(6,I.c))}},function(r,t,e){var n=e(33),o=TypeError;r.exports=function(r,t){if(n(t,r))return r;throw new o("Incorrect invocation")}},function(r,t,e){var n=e(8),o=e(21),a=e(103);r.exports=function(r,t,e){var c,i;return a&&n(c=t.constructor)&&c!==e&&o(i=c.prototype)&&i!==e.prototype&&a(r,i),r}},function(t,e,n){var o=n(52),a=n(21),c=n(11),i=n(104);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r,t=!1,e={};try{(r=o(Object.prototype,"__proto__","set"))(e,[]),t=e instanceof Array}catch(r){}return function(e,n){return c(e),i(n),a(e)?(t?r(e,n):e.__proto__=n,e):e}}():r)},function(r,t,e){var n=e(105),o=String,a=TypeError;r.exports=function(r){if(n(r))return r;throw new a("Can't set "+o(r)+" as a prototype")}},function(r,t,e){var n=e(21);r.exports=function(r){return n(r)||null===r}},function(t,e,n){var o=n(107);t.exports=function(t,e){return t===r?arguments.length<2?"":e:o(t)}},function(r,t,e){var n=e(89),o=String;r.exports=function(r){if("Symbol"===n(r))throw new TypeError("Cannot convert a Symbol value to a string");return o(r)}},function(r,t,e){r.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},function(r,t,e){var n=e(6),o=Error,a=n("".replace),c=String(new o("zxcasd").stack),i=/\n\s*at [^:]*:[^\n]*/,u=i.test(c);r.exports=function(r,t){if(u&&"string"==typeof r&&!o.prepareStackTrace)for(;t--;)r=a(r,i,"");return r}},function(t,e,n){var o,a=n(16),c=n(54),i=n(17),u=n(32),s=n(6),f=n(3),p=n(44),l=n(8),y=n(111),v=n(12),h=n(21),g=n(31),b=n(83),m=n(27),d=n(89),w=n(9),E=n(112),x=n(22),O=n(68),R=n(113),S=n(114),A=n(92),T=n(116),D=n(117),_=n(76),I=n(119),j=n(80),M=i.Object,k=i.Array,P=i.Date,C=i.Error,L=i.TypeError,B=i.PerformanceMark,N=u("DOMException"),U=A.Map,F=A.has,z=A.get,W=A.set,V=T.Set,H=T.add,G=T.has,Y=u("Object","keys"),Q=s([].push),q=s((!0).valueOf),X=s(1..valueOf),K=s("".valueOf),Z=s(P.prototype.getTime),$=p("structuredClone"),J="DataCloneError",rr="Transferring",tr=function(r){return!f((function(){var t=new i.Set([7]),e=r(t),n=r(M(7));return e===t||!e.has(7)||!h(n)||7!=+n}))&&r},er=function(r,t){return!f((function(){var e=new t,n=r({a:e,b:e});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===e.stack)}))},nr=i.structuredClone,or=a||!er(nr,C)||!er(nr,N)||(o=nr,!!f((function(){var r=o(new i.AggregateError([1],$,{cause:3}));return"AggregateError"!==r.name||1!==r.errors[0]||r.message!==$||3!==r.cause}))),ar=!nr&&tr((function(r){return new B($,{detail:r}).detail})),cr=tr(nr)||ar,ir=function(r){throw new N("Uncloneable type: "+r,J)},ur=function(r,t){throw new N((t||"Cloning")+" of "+r+" cannot be properly polyfilled in this engine",J)},sr=function(r,t){return cr||ur(t),cr(r)},fr=function(t,e,n){if(F(e,t))return z(e,t);var o,a,c,u,s,f;if("SharedArrayBuffer"===(n||d(t)))o=cr?cr(t):t;else{var p=i.DataView;p||l(t.slice)||ur("ArrayBuffer");try{if(l(t.slice)&&!t.resizable)o=t.slice(0);else{a=t.byteLength,c="maxByteLength"in t?{maxByteLength:t.maxByteLength}:r,o=new ArrayBuffer(a,c),u=new p(t),s=new p(o);for(f=0;f<a;f++)s.setUint8(f,u.getUint8(f))}}catch(r){throw new N("ArrayBuffer is detached",J)}}return W(e,t,o),o},pr=function(t,e){if(g(t)&&ir("Symbol"),!h(t))return t;if(e){if(F(e,t))return z(e,t)}else e=new U;var n,o,a,c,s,f,p,y,v=d(t);switch(v){case"Array":a=k(O(t));break;case"Object":a={};break;case"Map":a=new U;break;case"Set":a=new V;break;case"RegExp":a=new RegExp(t.source,S(t));break;case"Error":switch(o=t.name){case"AggregateError":a=new(u(o))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":a=new(u(o));break;case"CompileError":case"LinkError":case"RuntimeError":a=new(u("WebAssembly",o));break;default:a=new C}break;case"DOMException":a=new N(t.message,t.name);break;case"ArrayBuffer":case"SharedArrayBuffer":a=fr(t,e,v);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":f="DataView"===v?t.byteLength:t.length,a=function(r,t,e,n,o){var a=i[t];return h(a)||ur(t),new a(fr(r.buffer,o),e,n)}(t,v,t.byteOffset,f,e);break;case"DOMQuad":try{a=new DOMQuad(pr(t.p1,e),pr(t.p2,e),pr(t.p3,e),pr(t.p4,e))}catch(r){a=sr(t,v)}break;case"File":if(cr)try{a=cr(t),d(a)!==v&&(a=r)}catch(r){}if(!a)try{a=new File([t],t.name,t)}catch(r){}a||ur(v);break;case"FileList":if(c=function(){var r;try{r=new i.DataTransfer}catch(t){try{r=new i.ClipboardEvent("").clipboardData}catch(r){}}return r&&r.items&&r.files?r:null}()){for(s=0,f=O(t);s<f;s++)c.items.add(pr(t[s],e));a=c.files}else a=sr(t,v);break;case"ImageData":try{a=new ImageData(pr(t.data,e),t.width,t.height,{colorSpace:t.colorSpace})}catch(r){a=sr(t,v)}break;default:if(cr)a=cr(t);else switch(v){case"BigInt":a=M(t.valueOf());break;case"Boolean":a=M(q(t));break;case"Number":a=M(X(t));break;case"String":a=M(K(t));break;case"Date":a=new P(Z(t));break;case"Blob":try{a=t.slice(0,t.size,t.type)}catch(r){ur(v)}break;case"DOMPoint":case"DOMPointReadOnly":n=i[v];try{a=n.fromPoint?n.fromPoint(t):new n(t.x,t.y,t.z,t.w)}catch(r){ur(v)}break;case"DOMRect":case"DOMRectReadOnly":n=i[v];try{a=n.fromRect?n.fromRect(t):new n(t.x,t.y,t.width,t.height)}catch(r){ur(v)}break;case"DOMMatrix":case"DOMMatrixReadOnly":n=i[v];try{a=n.fromMatrix?n.fromMatrix(t):new n(t)}catch(r){ur(v)}break;case"AudioData":case"VideoFrame":l(t.clone)||ur(v);try{a=t.clone()}catch(r){ir(v)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":ur(v);default:ir(v)}}switch(W(e,t,a),v){case"Array":case"Object":for(p=Y(t),s=0,f=O(p);s<f;s++)y=p[s],E(a,y,pr(t[y],e));break;case"Map":t.forEach((function(r,t){W(a,pr(t,e),pr(r,e))}));break;case"Set":t.forEach((function(r){H(a,pr(r,e))}));break;case"Error":x(a,"message",pr(t.message,e)),w(t,"cause")&&x(a,"cause",pr(t.cause,e)),"AggregateError"===o?a.errors=pr(t.errors,e):"SuppressedError"===o&&(a.error=pr(t.error,e),a.suppressed=pr(t.suppressed,e));case"DOMException":I&&x(a,"stack",pr(t.stack,e))}return a};c({global:!0,enumerable:!0,sham:!j,forced:or},{structuredClone:function(t){var e,n,o=R(arguments.length,1)>1&&!v(arguments[1])?m(arguments[1]):r,a=o?o.transfer:r;a!==r&&(n=function(t,e){if(!h(t))throw new L("Transfer option cannot be converted to a sequence");var n=[];b(t,(function(r){Q(n,m(r))}));for(var o,a,c,u,s,f=0,p=O(n),v=new V;f<p;){if(o=n[f++],"ArrayBuffer"===(a=d(o))?G(v,o):F(e,o))throw new N("Duplicate transferable",J);if("ArrayBuffer"!==a){if(j)u=nr(o,{transfer:[o]});else switch(a){case"ImageBitmap":c=i.OffscreenCanvas,y(c)||ur(a,rr);try{(s=new c(o.width,o.height)).getContext("bitmaprenderer").transferFromImageBitmap(o),u=s.transferToImageBitmap()}catch(r){}break;case"AudioData":case"VideoFrame":l(o.clone)&&l(o.close)||ur(a,rr);try{u=o.clone(),o.close()}catch(r){}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":ur(a,rr)}if(u===r)throw new N("This object cannot be transferred: "+a,J);W(e,o,u)}else H(v,o)}return v}(a,e=new U));var c=pr(t,e);return n&&function(r){D(r,(function(r){j?cr(r,{transfer:[r]}):l(r.transfer)?r.transfer():_?_(r):ur("ArrayBuffer",rr)}))}(n),c}})},function(r,t,e){var n=e(6),o=e(3),a=e(8),c=e(89),i=e(32),u=e(14),s=function(){},f=i("Reflect","construct"),p=/^\s*(?:class|function)\b/,l=n(p.exec),y=!p.test(s),v=function(r){if(!a(r))return!1;try{return f(s,[],r),!0}catch(r){return!1}},h=function(r){if(!a(r))return!1;switch(c(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return y||!!l(p,u(r))}catch(r){return!0}};h.sham=!0,r.exports=!f||o((function(){var r;return v(v.call)||!v(Object)||!v((function(){r=!0}))||r}))?h:v},function(r,t,e){var n=e(2),o=e(23),a=e(45);r.exports=function(r,t,e){n?o.f(r,t,a(0,e)):r[t]=e}},function(r,t,e){var n=TypeError;r.exports=function(r,t){if(r<t)throw new n("Not enough arguments");return r}},function(t,e,n){var o=n(30),a=n(9),c=n(33),i=n(115),u=RegExp.prototype;t.exports=function(t){var e=t.flags;return e!==r||"flags"in u||a(t,"flags")||!c(u,t)?e:o(i,t)}},function(r,t,e){var n=e(27);r.exports=function(){var r=n(this),t="";return r.hasIndices&&(t+="d"),r.global&&(t+="g"),r.ignoreCase&&(t+="i"),r.multiline&&(t+="m"),r.dotAll&&(t+="s"),r.unicode&&(t+="u"),r.unicodeSets&&(t+="v"),r.sticky&&(t+="y"),t}},function(r,t,e){var n=e(6),o=Set.prototype;r.exports={Set,add:n(o.add),has:n(o.has),remove:n(o.delete),proto:o}},function(r,t,e){var n=e(6),o=e(118),a=e(116),c=a.Set,i=a.proto,u=n(i.forEach),s=n(i.keys),f=s(new c).next;r.exports=function(r,t,e){return e?o({iterator:s(r),next:f},t):u(r,t)}},function(t,e,n){var o=n(30);t.exports=function(t,e,n){for(var a,c,i=n?t:t.iterator,u=t.next;!(a=o(u,i)).done;)if((c=e(a.value))!==r)return c}},function(r,t,e){var n=e(3),o=e(45);r.exports=!n((function(){var r=new Error("a");return!("stack"in r)||(Object.defineProperty(r,"stack",o(1,7)),7!==r.stack)}))},function(t,e,n){var o=n(54),a=n(32),c=n(3),i=n(113),u=n(107),s=n(121),f=a("URL"),p=s&&c((function(){f.canParse()})),l=c((function(){return 1!==f.canParse.length}));o({target:"URL",stat:!0,forced:!p||l},{canParse:function(t){var e=i(arguments.length,1),n=u(t),o=e<2||arguments[1]===r?r:u(arguments[1]);try{return!!new f(n,o)}catch(r){return!1}}})},function(t,e,n){var o=n(3),a=n(42),c=n(2),i=n(16),u=a("iterator");t.exports=!o((function(){var t=new URL("b?a=1&b=2&c=3","https://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),o="";return t.pathname="c%20d",e.forEach((function(r,t){e.delete("b"),o+=t+r})),n.delete("a",2),n.delete("b",r),i&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",r)||n.has("b"))||!e.size&&(i||!c)||!e.sort||"https://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[u]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==o||"x"!==new URL("https://x",r).host}))},function(t,e,n){var o=n(54),a=n(32),c=n(113),i=n(107),u=n(121),s=a("URL");o({target:"URL",stat:!0,forced:!u},{parse:function(t){var e=c(arguments.length,1),n=i(t),o=e<2||arguments[1]===r?r:i(arguments[1]);try{return new s(n,o)}catch(r){return null}}})},function(t,e,n){var o=n(59),a=n(6),c=n(107),i=n(113),u=URLSearchParams,s=u.prototype,f=a(s.append),p=a(s.delete),l=a(s.forEach),y=a([].push),v=new u("a=1&a=2&b=3");v.delete("a",1),v.delete("b",r),v+""!="a=2"&&o(s,"delete",(function(t){var e=arguments.length,n=e<2?r:arguments[1];if(e&&n===r)return p(this,t);var o=[];l(this,(function(r,t){y(o,{key:t,value:r})})),i(e,1);for(var a,u=c(t),s=c(n),v=0,h=0,g=!1,b=o.length;v<b;)a=o[v++],g||a.key===u?(g=!0,p(this,a.key)):h++;for(;h<b;)(a=o[h++]).key===u&&a.value===s||f(this,a.key,a.value)}),{enumerable:!0,unsafe:!0})},function(t,e,n){var o=n(59),a=n(6),c=n(107),i=n(113),u=URLSearchParams,s=u.prototype,f=a(s.getAll),p=a(s.has),l=new u("a=1");!l.has("a",2)&&l.has("a",r)||o(s,"has",(function(t){var e=arguments.length,n=e<2?r:arguments[1];if(e&&n===r)return p(this,t);var o=f(this,t);i(e,1);for(var a=c(n),u=0;u<o.length;)if(o[u++]===a)return!0;return!1}),{enumerable:!0,unsafe:!0})},function(r,t,e){var n=e(2),o=e(6),a=e(4),c=URLSearchParams.prototype,i=o(c.forEach);n&&!("size"in c)&&a(c,"size",{get:function(){var r=0;return i(this,(function(){r++})),r},configurable:!0,enumerable:!0})}],e={},(n=function(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}).m=t,n.c=e,n.d=function(r,t,e){n.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:e})},n.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,t){if(1&t&&(r=n(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)n.d(e,o,function(t){return r[t]}.bind(null,o));return e},n.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(t,"a",t),t},n.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},n.p="",n(n.s=0)}();
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,i)}return a}function a(t){for(var a=1;a<arguments.length;a++){var i=null!=arguments[a]?arguments[a]:{};a%2?e(Object(i),!0).forEach(function(e){r(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function i(t,e){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=c(t))||e&&t&&"number"==typeof t.length){a&&(t=a);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,s=!1;return{s:function(){a=a.call(t)},n:function(){var t=a.next();return r=t.done,t},e:function(t){s=!0,o=t},f:function(){try{r||null==a.return||a.return()}finally{if(s)throw o}}}}function n(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){for(var a=0;a<e.length;a++){var i=e[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,s(i.key),i)}}function r(t,e,a){return(e=s(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function s(e){var a=function(e,a){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,a||"default");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===a?String:Number)(e)}(e,"string");return"symbol"==t(a)?a:a+""}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,n,o,r,s=[],l=!0,c=!1;try{if(o=(a=a.call(t)).next,0===e){if(Object(a)!==a)return;l=!1}else for(;!(l=(i=o.call(a)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=a.return&&(r=a.return(),Object(r)!==r))return}finally{if(c)throw n}}return s}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return u(t,e);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,i=Array(e);a<e;a++)i[a]=t[a];return i}!function(e){"use strict";function s(t){if(!t)return!1;if("boolean"==typeof t)return t;var e=String(t).toLowerCase().trim();return!!["1","true","yes","on"].includes(e)||1===t}e.createMiddlewareForExtraQueryParams=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,a){if(function(t){return!!t.path&&-1!==t.path.indexOf("woo-variation-swatches")||!!t.url&&-1!==t.url.indexOf("woo-variation-swatches")}(e)&&Object.keys(t).length>0)for(var i=0,n=Object.entries(t);i<n.length;i++){var o=l(n[i],2),s=o[0],c=o[1];"string"!=typeof e.url||wp.url.hasQueryArg(e.url,s)||(e.url=wp.url.addQueryArgs(e.url,r({},s,c))),"string"!=typeof e.path||wp.url.hasQueryArg(e.path,s)||(e.path=wp.url.addQueryArgs(e.path,r({},s,c)))}return a(e)}};var c,u=(c=jQuery,function(){return t=function t(e,a,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r(this,"defaults",{}),this.name=i,this.element=e,this.$element=c(e),this.settings=c.extend(!0,{},this.defaults,a),this.product_variations=this.$element.data("product_variations")||[],this.is_ajax_variation=this.product_variations.length<1,this.product_id=this.$element.data("product_id"),this.reset_variations=this.$element.find(".reset_variations"),this.attributeFields=this.$element.find(".variations select"),this.attributeSwatchesFields=this.$element.find("ul.variable-items-wrapper"),this.selected_item_template='<span class="woo-selected-variation-item-name" data-default=""></span>',this.$element.addClass("wvs-loaded"),this.init(),this.update(),c(document).trigger("woo_variation_swatches_loaded",this)},(u=[{key:"isAjaxVariation",value:function(){return this.is_ajax_variation}},{key:"init",value:function(){this.prepareLabel(),this.prepareItems(),this.setupItems(),this.setupEvents(),this.setUpStockInfo(),this.deselectNonAvailable()}},{key:"prepareLabel",value:function(){var t=this;s(woo_variation_swatches_options.show_variation_label)&&this.$element.find(".variations .label").each(function(e,a){0===c(a).find(".woo-selected-variation-item-name").length&&c(a).append(t.selected_item_template)})}},{key:"prepareItems",value:function(){this.attributeSwatchesFields.each(function(t,e){c(e).parent().addClass("woo-variation-items-wrapper")})}},{key:"setupItems",value:function(){var t=this;this.attributeSwatchesFields.each(function(e,a){var i="",o=c(a).parent().find("select.woo-variation-raw-select"),r=o.find("option"),s=o.find("option:disabled"),l=o.find("option.enabled.out-of-stock"),u=o.find("option:selected"),d=o.find("option").eq(1),v=(c(a).data("attribute_name"),c(a).data("attribute_values")),f=[],h=[],p=[];r.each(function(){""!==c(this).val()&&(f.push(c(this).val()),i=0===u.length?d.val():u.val())}),s.each(function(){""!==c(this).val()&&p.push(c(this).val())}),l.each(function(){""!==c(this).val()&&h.push(c(this).val())});var m=_.difference(f,p),b=[].concat(n(_.difference(v,f)),p);t.setupItem(a,i,m,h,b)})}},{key:"setupItem",value:function(t,e,a,i,n){var o=this,r=c(t).parent().prev().find(".woo-selected-variation-item-name");c(t).find("li.variable-item").each(function(t,l){var u=c(l).attr("data-value"),d=c(l).attr("data-title");c(l).removeClass("selected disabled no-stock").addClass("disabled"),c(l).attr("aria-checked","false"),c(l).attr("tabindex","-1"),c(l).attr("data-wvstooltip-out-of-stock",""),c(l).find("input.variable-item-radio-input:radio").prop("disabled",!0).prop("checked",!1),e.length<1&&s(woo_variation_swatches_options.show_variation_label)&&r.text(""),o.isAjaxVariation()?(c(l).find("input.variable-item-radio-input:radio").prop("disabled",!1),c(l).removeClass("selected disabled no-stock"),u===e&&(c(l).addClass("selected"),c(l).attr("aria-checked","true"),c(l).attr("tabindex","0"),c(l).find("input.variable-item-radio-input:radio").prop("disabled",!1).prop("checked",!0),s(woo_variation_swatches_options.show_variation_label)&&r.text("".concat(woo_variation_swatches_options.variation_label_separator," ").concat(d)),c(l).trigger("wvs-item-updated",[e,u]))):(_.includes(a,u)&&(c(l).removeClass("selected disabled"),c(l).removeAttr("aria-hidden"),c(l).attr("tabindex","0"),c(l).find("input.variable-item-radio-input:radio").prop("disabled",!1),u===e&&(c(l).addClass("selected"),c(l).attr("aria-checked","true"),c(l).find("input.variable-item-radio-input:radio").prop("checked",!0),s(woo_variation_swatches_options.show_variation_label)&&r.text("".concat(woo_variation_swatches_options.variation_label_separator," ").concat(d)),c(l).trigger("wvs-item-updated",[e,u]))),_.includes(i,u)&&(c(l).attr("data-wvstooltip-out-of-stock",woo_variation_swatches_options.out_of_stock_tooltip_text),s(woo_variation_swatches_options.clickable_out_of_stock)&&c(l).removeClass("disabled").addClass("no-stock")),_.includes(n,u)&&c(l).attr("data-wvstooltip-out-of-stock",woo_variation_swatches_options.unavailable_tooltip_text))})}},{key:"setupEvents",value:function(){var t=this.$element;this.attributeSwatchesFields.each(function(e,a){var i=c(a).parent().find("select.woo-variation-raw-select");s(woo_variation_swatches_options.clear_on_reselect)?(c(a).on("click.wvs","li.variable-item:not(.selected):not(.radio-variable-item)",function(e){e.preventDefault(),e.stopPropagation();var a=c(this).data("attribute_name"),n=c(this).data("value");i.val(n).trigger("change"),i.trigger("click"),c(this).trigger("wvs-selected-item",[a,n,i,t])}),c(a).on("click.wvs","li.variable-item.selected:not(.radio-variable-item)",function(e){e.preventDefault(),e.stopPropagation();var a=c(this).data("attribute_name"),n=c(this).data("value");i.val("").trigger("change"),i.trigger("click"),c(this).trigger("wvs-unselected-item",[a,n,i,t])}),c(a).on("click.wvs","input.variable-item-radio-input:radio",function(t){t.stopPropagation(),c(this).trigger("change.wvs",{radioChange:!0})}),c(a).on("change.wvs","input.variable-item-radio-input:radio",function(e,a){if(e.preventDefault(),e.stopPropagation(),a&&a.radioChange){var n=c(this).data("attribute_name"),o=c(this).val();c(this).parent("li.radio-variable-item").hasClass("selected")?(i.val("").trigger("change"),c(this).closest("li.radio-variable-item").trigger("wvs-unselected-item",[n,o,i,t])):(i.val(o).trigger("change"),c(this).closest("li.radio-variable-item").trigger("wvs-selected-item",[n,o,i,t])),i.trigger("click")}})):(c(a).on("click.wvs","li.variable-item:not(.radio-variable-item)",function(e){e.preventDefault(),e.stopPropagation();var a=c(this).data("attribute_name"),n=c(this).data("value");i.val(n).trigger("change"),i.trigger("click"),c(this).trigger("wvs-selected-item",[a,n,i,t])}),c(a).on("change.wvs","input.variable-item-radio-input:radio",function(e){e.preventDefault(),e.stopPropagation();var a=c(this).data("attribute_name"),n=c(this).val();i.val(n).trigger("change"),i.trigger("click"),c(this).closest("li.radio-variable-item").removeClass("selected disabled no-stock").addClass("selected"),c(this).closest("li.radio-variable-item").trigger("wvs-selected-item",[a,n,i,t])})),c(a).on("keydown.wvs","li.variable-item:not(.disabled)",function(t){(t.keyCode&&32===t.keyCode||t.key&&" "===t.key||t.keyCode&&13===t.keyCode||t.key&&"enter"===t.key.toLowerCase())&&(t.preventDefault(),c(this).trigger("click"))})}),this.$element.on("click.wvs",".woo-variation-swatches-variable-item-more",function(t){t.preventDefault(),c(this).parent().removeClass("enabled-display-limit-mode enabled-catalog-display-limit-mode"),c(this).remove()}),this.$element.find("[data-wvstooltip]").each(function(t,a){c(a).on("mouseenter",function(t){var i=a.getBoundingClientRect(),n=e.getComputedStyle(a,":before"),o=e.getComputedStyle(a,":after"),r=parseInt(o.getPropertyValue("border-top-width"),10),s=parseInt(n.getPropertyValue("height"),10),l=parseInt(n.getPropertyValue("width"),10),c=s+r+2;a.classList.toggle("wvs-tooltip-position-bottom",i.top<c);var u=l/2,d=i.left+i.width/2,v=u-d,f=u>d,h=u+d,p=document.body.clientWidth<h,m=document.body.clientWidth-h;a.style.setProperty("--horizontal-position","0px"),f&&a.style.setProperty("--horizontal-position","".concat(v+2,"px")),p&&a.style.setProperty("--horizontal-position","".concat(m-2,"px"))})})}},{key:"extractAttributes",value:function(t){var e,a=new Set,n=i(this.product_variations);try{for(n.s();!(e=n.n()).done;){var o=e.value.attributes;for(var r in o)o[r].length>0&&a.add(r)}}catch(t){n.e(t)}finally{n.f()}return a.delete(t),Array.from(a)}},{key:"getUnavailableAttributes",value:function(t,e){return 0===this.findMatchingVariations(this.product_variations,t).filter(function(t){return!s(woo_variation_swatches_options.disable_out_of_stock)||t.is_in_stock}).length?this.extractAttributes(e):[]}},{key:"deselectNonAvailable",value:function(){var t=this;s(woo_variation_swatches_options.deselect_unavailable)&&this.$element.on("wvs-selected-item.wvs",function(e,n,o){var s=a(a({},t.getChosenAttributes().data),{},r({},n,o.toString())),l=t.getUnavailableAttributes(s,n);if(l.length>0){var u,d=i(l);try{for(d.s();!(u=d.n()).done;){var v=u.value;t.attributeSwatchesFields.find('li[data-attribute_name="'.concat(v,'"]')).removeClass("selected"),t.attributeFields.filter('[data-attribute_name="'.concat(v,'"]')).each(function(t,e){c(e).val("").trigger("change")})}}catch(t){d.e(t)}finally{d.f()}t.attributeSwatchesFields.filter('[data-attribute_name="'.concat(n,'"]')).each(function(){c(this).find('[data-value="'.concat(o,'"]')).removeClass("disabled").addClass("selected")}),t.attributeFields.filter('[data-attribute_name="'.concat(n,'"]')).each(function(t,e){c(e).val(o).trigger("change")})}})}},{key:"update",value:function(){var t=this;this.$element.on("woocommerce_variation_has_changed.wvs",function(e){t.setupItems()})}},{key:"setUpStockInfo",value:function(){var t=this;if(s(woo_variation_swatches_options.show_variation_stock)){var e=parseInt(woo_variation_swatches_options.stock_label_threshold,10);this.$element.on("wvs-selected-item.wvs",function(a){var i=t.getChosenAttributes(),n=t.findStockVariations(t.product_variations,i);i.count>1&&i.count===i.chosenCount&&t.resetStockInfo(),i.count>1&&i.count===i.mayChosenCount&&n.forEach(function(a){var i='[data-attribute_name="'.concat(a.attribute_name,'"] > [data-value="').concat(a.attribute_value,'"]');a.variation.is_in_stock&&a.variation.max_qty&&a.variation.variation_stock_left&&a.variation.max_qty<=e?(t.$element.find("".concat(i," .wvs-stock-left-info")).attr("data-wvs-stock-info",a.variation.variation_stock_left),t.$element.find(i).addClass("wvs-show-stock-left-info")):(t.$element.find(i).removeClass("wvs-show-stock-left-info"),t.$element.find("".concat(i," .wvs-stock-left-info")).attr("data-wvs-stock-info",""))})}),this.$element.on("hide_variation.wvs",function(){t.resetStockInfo()})}}},{key:"resetStockInfo",value:function(){this.$element.find(".variable-item").removeClass("wvs-show-stock-left-info"),this.$element.find(".wvs-stock-left-info").attr("data-wvs-stock-info","")}},{key:"getChosenAttributes",value:function(){var t={},e=0,a=0;return this.attributeFields.each(function(){var i=c(this).data("attribute_name")||c(this).attr("name"),n=c(this).val()||"";n.length>0&&a++,e++,t[i]=n}),{count:e,chosenCount:a,mayChosenCount:a+1,data:t}}},{key:"findStockVariations",value:function(t,e){for(var a=[],n=0,o=Object.entries(e.data);n<o.length;n++){var s=l(o[n],2),c=s[0];if(0===s[1].length){var u,d=i(this.$element.find("ul[data-attribute_name='".concat(c,"']")).data("attribute_values")||[]);try{for(d.s();!(u=d.n()).done;){var v=u.value,f=_.extend(e.data,r({},c,v)),h=this.findMatchingVariations(t,f);if(h.length>0){var p=h.shift(),m={};m.attribute_name=c,m.attribute_value=v,m.variation=p,a.push(m)}}}catch(t){d.e(t)}finally{d.f()}}}return a}},{key:"findMatchingVariations",value:function(t,e){for(var a=[],i=0;i<t.length;i++){var n=t[i];this.isMatch(n.attributes,e)&&a.push(n)}return a}},{key:"findMatchingVariations2",value:function(t,e){return t.filter(function(t){return Object.entries(e).every(function(e){var a=l(e,2),i=a[0],n=a[1],o=t.attributes[i];return!(void 0!==o&&void 0!==n&&0!==o.length&&0!==n.length&&o!==n)})})}},{key:"isMatch",value:function(t,e){var a=!0;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i],o=e[i];void 0!==n&&void 0!==o&&0!==n.length&&0!==o.length&&n!==o&&(a=!1)}return a}},{key:"destroy",value:function(){this.$element.removeClass("wvs-loaded"),this.$element.removeData(this.name)}}])&&o(t.prototype,u),d&&o(t,d),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,u,d}()),d=function(e){return function(a,i){e.fn[a]=function(n){for(var o=this,r=arguments.length,s=new Array(r>1?r-1:0),l=1;l<r;l++)s[l-1]=arguments[l];return this.each(function(r,l){var c=e(l),u=c.data(a);if(u||(u=new i(c,e.extend({},n),a),c.data(a,u)),"string"==typeof n){if("object"===t(u[n]))return u[n];var d;if("function"==typeof u[n])return(d=u)[n].apply(d,s)}return o})},e.fn[a].Constructor=i,e[a]=function(t){for(var i,n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return(i=e({}))[a].apply(i,[t].concat(o))},e.fn[a].noConflict=function(){return e.fn[a]}}}(jQuery);d("WooVariationSwatches",u)}(window)}(),jQuery(function(t){try{t(document).on("woo_variation_swatches_init",function(){t(".variations_form:not(.wvs-loaded)").WooVariationSwatches(),t(".woo_variation_swatches_variations_form:not(.wvs-loaded)").WooVariationSwatches(),t(".ywcp_inner_selected_container:not(.wvs-loaded)").WooVariationSwatches()})}catch(t){window.console.log("Variation Swatches:",t)}t(document).on("wc_variation_form.wvs",function(e){t(document).trigger("woo_variation_swatches_init")}),t(document).ajaxComplete(function(e,a,i){_.delay(function(){t(".variations_form:not(.wvs-loaded)").each(function(){t(this).wc_variation_form()})},1e3)}),t(document.body).on("wc-composite-initializing",".composite_data",function(e,a){a.actions.add_action("component_options_state_changed",function(e){t(e.$component_content).find(".variations_form").WooVariationSwatches("destroy")})})});
function setVhProperty(){
let vh=window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
}
setVhProperty();
window.addEventListener('resize', setVhProperty);
jQuery(document).ready(function ($){
$(function (){
if($(this).scrollTop() >=100){
$('.site-header').addClass('sticky');
}else{
$('.site-header').removeClass('sticky');
}
$(document).scroll(function (){
if($(this).scrollTop() >=50){
$('.site-header').addClass('sticky');
}else{
$('.site-header').removeClass('sticky');
}});
});
$(document.body).on('added_to_cart', function (){
setTimeout(function (){
$('.header-item-trigger.minicart-trigger').trigger('click');
}, 1000);
});
function isInViewport(node){
const rect=node.getBoundingClientRect();
return ((rect.height > 0||rect.width > 0)&&rect.bottom >=0&&rect.right >=0&&rect.top <=(window.innerHeight||document.documentElement.clientHeight)&&rect.left <=(window.innerWidth||document.documentElement.clientWidth));
}
$('.scroll-effect').each(function (){
const visible=isInViewport(this);
if(visible){
$(this).addClass('appeared');
}});
$(window).scroll(function (){
$('.scroll-effect').each(function (){
const visible=isInViewport(this);
if(visible){
$(this).addClass('appeared');
}});
$('.js-counter span').each(function (){
const visible=isInViewport(this);
if(visible){
if(!$(this).hasClass('animated')){
$(this).addClass('animated');
$(this).prop('Counter', 0).animate({
Counter: $(this).text()
}, {
duration: 3000, easing: 'swing', step: function (now){
$(this).text(Math.ceil(now));
}});
}}
});
});
$(window).click(function (){
$('.header-item-trigger').removeClass('active');
$('.header-item-content').removeClass('active');
$('body').removeClass('modal-active');
});
$('.header-item-trigger').click(function (event){
event.stopPropagation();
if($(this).hasClass('active')){
$('.header-item-trigger').removeClass('active');
$('.header-item-trigger').next('.header-item-content').removeClass('active');
}else{
$('.header-item-trigger').removeClass('active');
$('.header-item-content').removeClass('active');
$(this).addClass('active');
$(this).next('.header-item-content').addClass('active');
}});
$('.header-item-content').click(function (event){
event.stopPropagation();
});
$('.widget-title').click(function (event){
$(this).stop().toggleClass('active');
});
$('.header-item-close').click(function (event){
$('.header-item-trigger').removeClass('active');
$('.header-item-content').removeClass('active');
});
if($('.baobaby-size-chart').length){
$('.baobaby-size-chart-trigger, .baobaby-size-chart-close').on('click', function (){
$('.baobaby-size-chart-modal').stop().toggleClass('active');
});
}
if($('.home-slider').length){
$('.home-slider').owlCarousel({
loop: true,
nav: true,
autoplay: true,
autoplayTimeout: 4000,
autoplayHoverPause: true,
dots: true,
items: 1,
lazyLoad: true,
lazyLoadEager: 1,
});
}
if($('.layered-filter-trigger').length){
$('.layered-filter-trigger, .layered-filter-close').click(function (){
$('.layered-filter-content').stop().toggleClass('active');
});
}
$(document).keydown(function (event){
if(event.which===27){
$(".baobaby-size-chart-modal").stop().removeClass('active');
}});
$('.page-location-nav-item').click(function (){
let trigger=$(this).data('trigger');
$('.page-location-nav').removeClass('active');
$('.page-location-stores').each(function (){
let store=$(this);
store.removeClass('active');
if(store.attr('data-city')===trigger){
store.addClass('active');
}});
});
$('#ws_opt_in').on('click', function (){
if($(this).is(':checked')){
$(this).closest('.checkbox').addClass('active');
}else{
$(this).closest('.checkbox').removeClass('active');
}});
$('.page-location-back').click(function (){
$('.page-location-nav').addClass('active');
$('.page-location-stores').each(function (){
let store=$(this);
store.removeClass('active');
});
});
$('.coupon-label').click(function (){
$(this).stop().toggleClass('active');
});
$("body.single form.cart .quantity input").before('<span class="decrease-qty" type="button">-</span>');
$("body.single form.cart .quantity input").after('<span class="increase-qty" type="button">+</span>');
if($('.woocommerce-cart').length){
$('.shop_table .cart_item').each(function (){
$(this).find('.quantity input').before('<span class="decrease-qty" type="button">-</span>');
$(this).find('.quantity input').after('<span class="increase-qty" type="button">+</span>');
});
$(document.body).on('updated_wc_div', function (){
$('.shop_table .cart_item').each(function (){
$(this).find('.quantity input').before('<span class="decrease-qty" type="button">-</span>');
$(this).find('.quantity input').after('<span class="increase-qty" type="button">+</span>');
});
$('.decrease-qty').on('click', function (){
decreaseQty($(this));
$('.woocommerce-cart-form :input[name="update_cart"]').prop('disabled', false).attr('aria-disabled', false);
});
$('.increase-qty').on('click', function (){
increaseQty($(this));
$('.woocommerce-cart-form :input[name="update_cart"]').prop('disabled', false).attr('aria-disabled', false);
});
});
}
jQuery(document).ready(function ($){
$('.comment-form-rating .stars a').click(function (){
let currentClass=$(this).attr('class');
$(this).closest('span').removeAttr('class').addClass(currentClass);
});
function updateReviewCount(){
var reviewCount=$('#tab-reviews .commentlist').children().length;
$('.reviews_tab a').text('Recenzije (' + reviewCount + ')');
}
updateReviewCount();
$(document.body).on('added_to_cart removed_from_cart updated_wc_div', function (){
updateReviewCount();
});
});
$('ul li.menu-item-has-children').each(function (){
$(this).find('> a').eq(0).after('<div class="sub-menu-trigger"></div>');
});
$('.sub-menu-trigger').on('click', function (event){
$(this).stop().toggleClass('active').prev('a').stop().toggleClass('active');
});
$('.decrease-qty').on('click', function (){
decreaseQty($(this));
$('.woocommerce-cart-form :input[name="update_cart"]').prop('disabled', false).attr('aria-disabled', false);
});
$('.increase-qty').on('click', function (){
increaseQty($(this));
$('.woocommerce-cart-form :input[name="update_cart"]').prop('disabled', false).attr('aria-disabled', false);
});
function decreaseQty(e){
let qtyVal=parseInt(e.next('.input-text.qty').val());
if(qtyVal > 1){
e.next('.input-text.qty').val(qtyVal - 1).attr('value', qtyVal - 1);
e.closest('.product-add-to-cart-wrapper').find('.add_to_cart_button').attr('data-quantity', qtyVal - 1);
e.closest('.product-add-to-cart-wrapper').siblings('.gtm4wp_productdata').attr('data-gtm4wp_quantity', qtyVal - 1);
}else{
}}
function increaseQty(e){
let qtyVal=parseInt(e.prev('.input-text.qty').val());
if(qtyVal < 1000){
e.prev('.input-text.qty').val(qtyVal + 1).attr('value', qtyVal + 1);
e.closest('.product-add-to-cart-wrapper').find('.add_to_cart_button').attr('data-quantity', qtyVal + 1);
e.closest('.product-add-to-cart-wrapper').siblings('.gtm4wp_productdata').attr('data-gtm4wp_quantity', qtyVal + 1);
}else{
}}
$(document.body).on('click input', 'input.qty', function (){
$(this).parent().parent().find('a.ajax_add_to_cart').attr('data-quantity', $(this).val());
$(".added_to_cart").remove();
}).on('click', '.add_to_cart_button', function (){
let button=$(this);
setTimeout(function (){
button.removeClass('added');
}, 2000);
setTimeout(function (){
button.parent().find('.quantity > input.qty').val(1).attr('value', 1);
button.attr('data-quantity', '1');
}, 2000);
});
$(document.body).on('updated_cart_totals', function (){
$('.decrease-qty').click(function (){
decreaseQty($(this));
$('.woocommerce-cart-form :input[name="update_cart"]').prop('disabled', false).attr('aria-disabled', false);
});
$('.increase-qty').click(function (){
increaseQty($(this));
$('.woocommerce-cart-form :input[name="update_cart"]').prop('disabled', false).attr('aria-disabled', false);
});
$('.coupon-label').click(function (){
$(this).stop().toggleClass('active');
});
});
$('.block-accordion-links-item-button').click(function (){
$('.back').removeClass('active');
let accordionTrigger=$(this).attr('data-accordion');
$('.block-accordion-title').removeClass('active');
$('html, body').animate({
scrollTop: $('#' + accordionTrigger).offset().top - 80
}, 1500);
$('#' + accordionTrigger).addClass('active');
history.pushState({modalOpen: false}, '');
if(window.location.hash){
history.pushState("", document.title, window.location.pathname + window.location.search);
}});
$('.block-accordion-links-item .front').click(function (){
$(this).next('.back').addClass('active');
history.pushState({modalOpen: true}, '');
});
$('.block-accordion-links-item .close').click(function (){
$(this).closest('.back').removeClass('active');
history.pushState({modalOpen: false}, '');
if(window.location.hash){
history.pushState("", document.title, window.location.pathname + window.location.search);
}});
$(window).on('popstate', function (event){
if(history.state&&history.state.modalOpen){
$('.back').removeClass('active');
history.pushState({modalOpen: false}, '');
if(window.location.hash){
history.pushState("", document.title, window.location.pathname + window.location.search);
}}
});
$(window).on('hashchange', function (){
if(window.location.hash){
history.replaceState({modalOpen: true}, '');
}else{
$('.back').removeClass('active');
history.replaceState({modalOpen: false}, '');
}});
$(document).on('keyup', function (e){
if(e.key==='Escape'){
if(history.state&&history.state.modalOpen){
$('.back').removeClass('active');
history.pushState({modalOpen: false}, '');
if(window.location.hash){
history.pushState("", document.title, window.location.pathname + window.location.search);
}}
}});
if(window.location.hash){
history.pushState("", document.title, window.location.pathname + window.location.search);
}
$('.home-benefits-carousel').owlCarousel({
loop: true,
margin: 16,
responsiveClass: true,
lazyLoad: true,
lazyLoadEager: 1,
navText: false,
nav: true,
items: 4,
dots: false,
responsive: {
0: {
items: 1, nav: true
}, 480: {
items: 2, nav: false
}, 720: {
items: 4, nav: true, loop: false
}}
});
function initOwlCarousel(){
if($(window).width() >=720){
let featuredHomeCarousel=$('.featured-products-list .products');
featuredHomeCarousel.owlCarousel({
margin: 32, nav: true, dots: false, items: 4
}).addClass('owl-carousel');
}else{
let owl=$('.featured-products-list .products').data('owl.carousel');
$('.featured-products-list .products').removeClass('owl-carousel')
if(owl) owl.destroy();
}}
initOwlCarousel();
$(window).resize(function (){
initOwlCarousel();
});
$('.blog-news-carousel').owlCarousel({
loop: true,
responsiveClass: true,
lazyLoad: true,
lazyLoadEager: 1,
nav: true,
dots: false,
margin: 32,
responsive: {
0: {
items: 1, margin: 24, nav: true
}, 480: {
items: 2, margin: 24, nav: false
}, 768: {
items: 3, margin: 24, nav: true, loop: false
}, 1080: {
margin: 32
}}
});
function applyOwlA11y($carousel){
var strings=window.najnajA11y||{};
var prevText=strings.prevSlide||'Previous slide';
var nextText=strings.nextSlide||'Next slide';
var goToTpl=strings.goToSlide||'Go to slide %d';
$carousel.find('.owl-nav button.owl-prev')
.removeAttr('role')
.attr({'aria-label': prevText, title: prevText});
$carousel.find('.owl-nav button.owl-next')
.removeAttr('role')
.attr({'aria-label': nextText, title: nextText});
$carousel.find('.owl-dot').each(function (index){
var n=index + 1;
var label=goToTpl.replace('%d', n);
$(this).attr('aria-label', label);
});
}
$(document).on('initialized.owl.carousel refreshed.owl.carousel', '.owl-carousel', function (){
applyOwlA11y($(this));
});
$('.owl-carousel').each(function (){
applyOwlA11y($(this));
});
if($('.block-accordion-item').length){
$('.block-accordion-title').click(function (){
$(this).stop().toggleClass('active');
});
}
function initQuantityListeners(){
let clickTimer;
$('.cart_item .product-quantity .quantity span').on('click', function (){
if(clickTimer){
clearTimeout(clickTimer);
}
clickTimer=setTimeout(function (){
$('button[name="update_cart"]').trigger('click');
}, 1000);
});
$('.woocommerce-cart .entry-content > .woocommerce .shop_table_responsive .cart_item .product-quantity .quantity input')
.on('blur', function (){
if(clickTimer){
clearTimeout(clickTimer);
}
clickTimer=setTimeout(function (){
$('button[name="update_cart"]').trigger('click');
}, 1000);
});
}
initQuantityListeners();
$(document).ajaxComplete(function (){
initQuantityListeners();
});
$('.brands-slider').owlCarousel({
loop: true,
margin: 16,
responsiveClass: true,
lazyLoad: true,
lazyLoadEager: 1,
navText: false,
nav: true,
autoplay: true,
autoplayTimeout: 4000,
slideBy: 6,
autoplayHoverPause: true,
dots: false,
responsive: {
0: {
items: 2, dots: false, margin: 8, nav: false, slideBy: 2
}, 480: {
items: 3, dots: false, margin: 12, nav: false, slideBy: 3
}, 768: {
items: 5, dots: false, margin: 16, nav: false, slideBy: 5
}, 1080: {
items: 6, dots: false, margin: 16, nav: true, slideBy: 6
}}
});
if($('.complaints-form').length){
$('select[name="product-selection"]').on('change', function (){
var selectedValue=$(this).val();
console.log(selectedValue);
$('.product-selection-subitems div').removeClass('active');
$('.compliants-from-notice p').removeClass('active');
switch (selectedValue){
case "Ergobaby":
$('.product-selection-subitems .ergobaby').addClass('active');
$('.ergobaby input[type="radio"]').first().prop('checked', true).trigger('change');
break;
case "Baby Tula":
$('.product-selection-subitems .tula').addClass('active');
$('.tula input[type="radio"]').first().prop('checked', true).trigger('change');
break;
case "BeSafe":
$('.product-selection-subitems .besafe').addClass('active');
$('.besafe input[type="radio"]').first().prop('checked', true).trigger('change');
break;
case "iCandy":
$('.product-selection-subitems .icandy').addClass('active');
$('.icandy input[type="radio"]').first().prop('checked', true).trigger('change');
break;
case "MODU":
$('.product-selection-subitems div').removeClass('active');
$('.compliants-from-notice .notice').removeClass('active');
$('.compliants-from-notice-images').removeClass('active').empty();
$('.compliants-from-notice .skip').addClass('active');
break;
case "b.box":
$('.product-selection-subitems div').removeClass('active');
$('.compliants-from-notice-images').removeClass('active').empty();
$('.compliants-from-notice .notice').removeClass('active');
$('.compliants-from-notice .skip').addClass('active');
break;
case "Baobaby":
$('.product-selection-subitems div').removeClass('active');
$('.compliants-from-notice-images').removeClass('active').empty();
$('.compliants-from-notice .notice').removeClass('active');
$('.compliants-from-notice .skip').addClass('active');
break;
case "Magic":
$('.product-selection-subitems div').removeClass('active');
$('.compliants-from-notice-images').removeClass('active').empty();
$('.compliants-from-notice .notice').removeClass('active');
$('.compliants-from-notice .skip').addClass('active');
break;
default:
$('.compliants-from-notice .notice').removeClass('active');
$('.compliants-from-notice .other').addClass('active');
$('.compliants-from-notice-images').removeClass('active').empty();
}});
$('input[name="ergobaby-product-type"], input[name="icandy-product-type"], input[name="besafe-product-type"], input[name="tula-product-type"]').on('change', function (){
let selectedProduct=$('select[name="product-selection"]').val();
let selectedOption=$(this).val();
let noticeClass=selectedProduct.toLowerCase().replace(/\s/g, '') + '-' + selectedOption.toLowerCase().replace(/\s/g, '');
if(noticeClass==='ergobaby-ostalo'||noticeClass==='besafe-ostalo'||noticeClass==='icandy-ostalo'||noticeClass==='babytula-ostalo'){
noticeClass='other';
}
let noticeElement=$('.compliants-from-notice .' + noticeClass);
let imagesElement=$('.compliants-from-notice-images');
$('.compliants-from-notice .notice').removeClass('active');
noticeElement.addClass('active');
imagesElement.empty();
let themeUri=imagesElement.data('theme-uri');
if((noticeElement.attr('data-image')&&noticeElement.attr('data-image').trim()!=='-') ||
(noticeElement.attr('data-image-2')&&noticeElement.attr('data-image-2').trim()!=='-')){
if(noticeElement.attr('data-image')&&noticeElement.attr('data-image').trim()!=='-'){
let img1Src=themeUri + noticeElement.attr('data-image') + '.jpg';
let img1=$('<img>').attr('src', img1Src);
imagesElement.append(img1);
}
if(noticeElement.attr('data-image-2')&&noticeElement.attr('data-image-2').trim()!=='-'){
let img2Src=themeUri + noticeElement.attr('data-image-2') + '.jpg';
let img2=$('<img>').attr('src', img2Src);
imagesElement.append(img2);
}
imagesElement.addClass('active');
}else{
$('.compliants-from-notice-images').removeClass('active');
}});
}});
jQuery(document).ready(function ($){
var variation_id=null;
var attribute=null;
$('.swatch').click(function (){
variation_id=$(this).data('variation-id');
attribute=$(this).data('attribute');
$('.swatch.active').removeClass('active');
$(this).addClass('active');
$(this).closest('.product').find('.ajax_add_to_cart').removeClass('disabled').prop('disabled', false);
});
});
jQuery(document).ajaxComplete(function (event, xhr, settings){
if(settings.type==="POST"&&settings.url.includes('wc-ajax=update_order_review')){
jQuery('.woocommerce-shipping-totals td').attr('colspan', 2);
}});
document.addEventListener('DOMContentLoaded', function (){
const forms=document.querySelectorAll('form.variations_form');
forms.forEach(function (form){
const msg=form.querySelector('.custom-variation-msg');
const variationInput=form.querySelector('.variation_id');
if(!msg||!variationInput) return;
const checkVariationReady=()=> {
if(variationInput.value&&variationInput.value!=='0'){
msg.classList.add('hidden');
}else{
msg.classList.remove('hidden');
}};
const observer=new MutationObserver(checkVariationReady);
observer.observe(variationInput, {
attributes: true,
attributeFilter: ['value']
});
form.addEventListener('change', checkVariationReady);
checkVariationReady();
});
});
!function (a, b, c, d){
function e(b, c){
this.settings=null, this.options=a.extend({}, e.Defaults, c), this.$element=a(b), this._handlers={}, this._plugins={}, this._supress={}, this._current=null, this._speed=null, this._coordinates=[], this._breakpoint=null, this._width=null, this._items=[], this._clones=[], this._mergers=[], this._widths=[], this._invalidated={}, this._pipe=[], this._drag={
time: null,
target: null,
pointer: null,
stage: {start: null, current: null},
direction: null
}, this._states={
current: {},
tags: {initializing: ["busy"], animating: ["busy"], dragging: ["interacting"]}}, a.each(["onResize", "onThrottledResize"], a.proxy(function (b, c){
this._handlers[c]=a.proxy(this[c], this)
}, this)), a.each(e.Plugins, a.proxy(function (a, b){
this._plugins[a.charAt(0).toLowerCase() + a.slice(1)]=new b(this)
}, this)), a.each(e.Workers, a.proxy(function (b, c){
this._pipe.push({filter: c.filter, run: a.proxy(c.run, this)})
}, this)), this.setup(), this.initialize()
}
e.Defaults={
items: 3,
loop: !1,
center: !1,
rewind: !1,
checkVisibility: !0,
mouseDrag: !0,
touchDrag: !0,
pullDrag: !0,
freeDrag: !1,
margin: 0,
stagePadding: 0,
merge: !1,
mergeFit: !0,
autoWidth: !1,
startPosition: 0,
rtl: !1,
smartSpeed: 250,
fluidSpeed: !1,
dragEndSpeed: !1,
responsive: {},
responsiveRefreshRate: 200,
responsiveBaseElement: b,
fallbackEasing: "swing",
slideTransition: "",
info: !1,
nestedItemSelector: !1,
itemElement: "div",
stageElement: "div",
refreshClass: "owl-refresh",
loadedClass: "owl-loaded",
loadingClass: "owl-loading",
rtlClass: "owl-rtl",
responsiveClass: "owl-responsive",
dragClass: "owl-drag",
itemClass: "owl-item",
stageClass: "owl-stage",
stageOuterClass: "owl-stage-outer",
grabClass: "owl-grab"
}, e.Width={Default: "default", Inner: "inner", Outer: "outer"}, e.Type={
Event: "event",
State: "state"
}, e.Plugins={}, e.Workers=[{
filter: ["width", "settings"], run: function (){
this._width=this.$element.width()
}}, {
filter: ["width", "items", "settings"], run: function (a){
a.current=this._items&&this._items[this.relative(this._current)]
}}, {
filter: ["items", "settings"], run: function (){
this.$stage.children(".cloned").remove()
}}, {
filter: ["width", "items", "settings"], run: function (a){
var b=this.settings.margin||"", c = !this.settings.autoWidth, d=this.settings.rtl,
e={width: "auto", "margin-left": d ? b:"", "margin-right": d ? "":b};
!c&&this.$stage.children().css(e), a.css=e
}}, {
filter: ["width", "items", "settings"], run: function (a){
var b=(this.width() / this.settings.items).toFixed(3) - this.settings.margin, c=null,
d=this._items.length, e = !this.settings.autoWidth, f=[];
for (a.items={
merge: !1,
width: b
}; d--;) c=this._mergers[d], c=this.settings.mergeFit&&Math.min(c, this.settings.items)||c, a.items.merge=c > 1||a.items.merge, f[d]=e ? b * c:this._items[d].width();
this._widths=f
}}, {
filter: ["items", "settings"], run: function (){
var b=[], c=this._items, d=this.settings, e=Math.max(2 * d.items, 4),
f=2 * Math.ceil(c.length / 2), g=d.loop&&c.length ? d.rewind ? e:Math.max(e, f):0, h="",
i="";
for (g /=2; g > 0;) b.push(this.normalize(b.length / 2, !0)), h +=c[b[b.length - 1]][0].outerHTML, b.push(this.normalize(c.length - 1 - (b.length - 1) / 2, !0)), i=c[b[b.length - 1]][0].outerHTML + i, g -=1;
this._clones=b, a(h).addClass("cloned").appendTo(this.$stage), a(i).addClass("cloned").prependTo(this.$stage)
}}, {
filter: ["width", "items", "settings"], run: function (){
for (var a=this.settings.rtl ? 1:-1, b=this._clones.length + this._items.length, c=-1, d=0, e=0, f=[]; ++c < b;) d=f[c - 1]||0, e=this._widths[this.relative(c)] + this.settings.margin, f.push(d + e * a);
this._coordinates=f
}}, {
filter: ["width", "items", "settings"], run: function (){
var a=this.settings.stagePadding, b=this._coordinates, c={
width: Math.ceil(Math.abs(b[b.length - 1])) + 2 * a,
"padding-left": a||"",
"padding-right": a||""
};
this.$stage.css(c)
}}, {
filter: ["width", "items", "settings"], run: function (a){
var b=this._coordinates.length, c = !this.settings.autoWidth, d=this.$stage.children();
if(c&&a.items.merge) for (; b--;) a.css.width=this._widths[this.relative(b)], d.eq(b).css(a.css); else c&&(a.css.width=a.items.width, d.css(a.css))
}}, {
filter: ["items"], run: function (){
this._coordinates.length < 1&&this.$stage.removeAttr("style")
}}, {
filter: ["width", "items", "settings"], run: function (a){
a.current=a.current ? this.$stage.children().index(a.current):0, a.current=Math.max(this.minimum(), Math.min(this.maximum(), a.current)), this.reset(a.current)
}}, {
filter: ["position"], run: function (){
this.animate(this.coordinates(this._current))
}}, {
filter: ["width", "position", "items", "settings"], run: function (){
var a, b, c, d, e=this.settings.rtl ? 1:-1, f=2 * this.settings.stagePadding,
g=this.coordinates(this.current()) + f, h=g + this.width() * e, i=[];
for (c=0, d=this._coordinates.length; c < d; c++) a=this._coordinates[c - 1]||0, b=Math.abs(this._coordinates[c]) + f * e, (this.op(a, "<=", g)&&this.op(a, ">", h)||this.op(b, "<", g)&&this.op(b, ">", h))&&i.push(c);
this.$stage.children(".active").removeClass("active"), this.$stage.children(":eq(" + i.join("), :eq(") + ")").addClass("active"), this.$stage.children(".center").removeClass("center"), this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")
}}], e.prototype.initializeStage=function (){
this.$stage=this.$element.find("." + this.settings.stageClass), this.$stage.length||(this.$element.addClass(this.options.loadingClass), this.$stage=a("<" + this.settings.stageElement + ">", {class: this.settings.stageClass}).wrap(a("<div/>", {class: this.settings.stageOuterClass})), this.$element.append(this.$stage.parent()))
}, e.prototype.initializeItems=function (){
var b=this.$element.find(".owl-item");
if(b.length) return this._items=b.get().map(function (b){
return a(b)
}), this._mergers=this._items.map(function (){
return 1
}), void this.refresh();
this.replace(this.$element.children().not(this.$stage.parent())), this.isVisible() ? this.refresh():this.invalidate("width"), this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)
}, e.prototype.initialize=function (){
if(this.enter("initializing"), this.trigger("initialize"), this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl), this.settings.autoWidth&&!this.is("pre-loading")){
var a, b, c;
a=this.$element.find("img"), b=this.settings.nestedItemSelector ? "." + this.settings.nestedItemSelector:d, c=this.$element.children(b).width(), a.length&&c <=0&&this.preloadAutoWidthImages(a)
}
this.initializeStage(), this.initializeItems(), this.registerEventHandlers(), this.leave("initializing"), this.trigger("initialized")
}, e.prototype.isVisible=function (){
return !this.settings.checkVisibility||this.$element.is(":visible")
}, e.prototype.setup=function (){
var b=this.viewport(), c=this.options.responsive, d=-1, e=null;
c ? (a.each(c, function (a){
a <=b&&a > d&&(d=Number(a))
}), e=a.extend({}, this.options, c[d]), "function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()), delete e.responsive, e.responsiveClass&&this.$element.attr("class", this.$element.attr("class").replace(new RegExp("(" + this.options.responsiveClass + "-)\\S+\\s", "g"), "$1" + d))):e=a.extend({}, this.options), this.trigger("change", {
property: {
name: "settings",
value: e
}}), this._breakpoint=d, this.settings=e, this.invalidate("settings"), this.trigger("changed", {
property: {
name: "settings",
value: this.settings
}})
}, e.prototype.optionsLogic=function (){
this.settings.autoWidth&&(this.settings.stagePadding = !1, this.settings.merge = !1)
}, e.prototype.prepare=function (b){
var c=this.trigger("prepare", {content: b});
return c.data||(c.data=a("<" + this.settings.itemElement + "/>").addClass(this.options.itemClass).append(b)), this.trigger("prepared", {content: c.data}), c.data
}, e.prototype.update=function (){
for (var b=0, c=this._pipe.length, d=a.proxy(function (a){
return this[a]
}, this._invalidated), e={}; b < c;) (this._invalidated.all||a.grep(this._pipe[b].filter, d).length > 0)&&this._pipe[b].run(e), b++;
this._invalidated={}, !this.is("valid")&&this.enter("valid")
}, e.prototype.width=function (a){
switch (a=a||e.Width.Default){
case e.Width.Inner:
case e.Width.Outer:
return this._width;
default:
return this._width - 2 * this.settings.stagePadding + this.settings.margin
}}, e.prototype.refresh=function (){
this.enter("refreshing"), this.trigger("refresh"), this.setup(), this.optionsLogic(), this.$element.addClass(this.options.refreshClass), this.update(), this.$element.removeClass(this.options.refreshClass), this.leave("refreshing"), this.trigger("refreshed")
}, e.prototype.onThrottledResize=function (){
b.clearTimeout(this.resizeTimer), this.resizeTimer=b.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate)
}, e.prototype.onResize=function (){
return !!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"), this.trigger("resize").isDefaultPrevented() ? (this.leave("resizing"), !1):(this.invalidate("width"), this.refresh(), this.leave("resizing"), void this.trigger("resized")))))
}, e.prototype.registerEventHandlers=function (){
a.support.transition&&this.$stage.on(a.support.transition.end + ".owl.core", a.proxy(this.onTransitionEnd, this)), !1!==this.settings.responsive&&this.on(b, "resize", this._handlers.onThrottledResize), this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass), this.$stage.on("mousedown.owl.core", a.proxy(this.onDragStart, this)), this.$stage.on("dragstart.owl.core selectstart.owl.core", function (){
return !1
})), this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core", a.proxy(this.onDragStart, this)), this.$stage.on("touchcancel.owl.core", a.proxy(this.onDragEnd, this)))
}, e.prototype.onDragStart=function (b){
var d=null;
3!==b.which&&(a.support.transform ? (d=this.$stage.css("transform").replace(/.*\(|\)| /g, "").split(","), d={
x: d[16===d.length ? 12:4],
y: d[16===d.length ? 13:5]
}):(d=this.$stage.position(), d={
x: this.settings.rtl ? d.left + this.$stage.width() - this.width() + this.settings.margin:d.left,
y: d.top
}), this.is("animating")&&(a.support.transform ? this.animate(d.x):this.$stage.stop(), this.invalidate("position")), this.$element.toggleClass(this.options.grabClass, "mousedown"===b.type), this.speed(0), this._drag.time=(new Date).getTime(), this._drag.target=a(b.target), this._drag.stage.start=d, this._drag.stage.current=d, this._drag.pointer=this.pointer(b), a(c).on("mouseup.owl.core touchend.owl.core", a.proxy(this.onDragEnd, this)), a(c).one("mousemove.owl.core touchmove.owl.core", a.proxy(function (b){
var d=this.difference(this._drag.pointer, this.pointer(b));
a(c).on("mousemove.owl.core touchmove.owl.core", a.proxy(this.onDragMove, this)), Math.abs(d.x) < Math.abs(d.y)&&this.is("valid")||(b.preventDefault(), this.enter("dragging"), this.trigger("drag"))
}, this)))
}, e.prototype.onDragMove=function (a){
var b=null, c=null, d=null, e=this.difference(this._drag.pointer, this.pointer(a)),
f=this.difference(this._drag.stage.start, e);
this.is("dragging")&&(a.preventDefault(), this.settings.loop ? (b=this.coordinates(this.minimum()), c=this.coordinates(this.maximum() + 1) - b, f.x=((f.x - b) % c + c) % c + b):(b=this.settings.rtl ? this.coordinates(this.maximum()):this.coordinates(this.minimum()), c=this.settings.rtl ? this.coordinates(this.minimum()):this.coordinates(this.maximum()), d=this.settings.pullDrag ? -1 * e.x / 5:0, f.x=Math.max(Math.min(f.x, b + d), c + d)), this._drag.stage.current=f, this.animate(f.x))
}, e.prototype.onDragEnd=function (b){
var d=this.difference(this._drag.pointer, this.pointer(b)), e=this._drag.stage.current,
f=d.x > 0 ^ this.settings.rtl ? "left":"right";
a(c).off(".owl.core"), this.$element.removeClass(this.options.grabClass), (0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed), this.current(this.closest(e.x, 0!==d.x ? f:this._drag.direction)), this.invalidate("position"), this.update(), this._drag.direction=f, (Math.abs(d.x) > 3||(new Date).getTime() - this._drag.time > 300)&&this._drag.target.one("click.owl.core", function (){
return !1
})), this.is("dragging")&&(this.leave("dragging"), this.trigger("dragged"))
}, e.prototype.closest=function (b, c){
var e=-1, f=30, g=this.width(), h=this.coordinates();
return this.settings.freeDrag||a.each(h, a.proxy(function (a, i){
return "left"===c&&b > i - f&&b < i + f ? e=a:"right"===c&&b > i - g - f&&b < i - g + f ? e=a + 1:this.op(b, "<", i)&&this.op(b, ">", h[a + 1]!==d ? h[a + 1]:i - g)&&(e="left"===c ? a + 1:a), -1===e
}, this)), this.settings.loop||(this.op(b, ">", h[this.minimum()]) ? e=b = this.minimum():this.op(b, "<", h[this.maximum()])&&(e=b = this.maximum())), e
}, e.prototype.animate=function (b){
var c=this.speed() > 0;
this.is("animating")&&this.onTransitionEnd(), c&&(this.enter("animating"), this.trigger("translate")), a.support.transform3d&&a.support.transition ? this.$stage.css({
transform: "translate3d(" + b + "px,0px,0px)",
transition: this.speed() / 1e3 + "s" + (this.settings.slideTransition ? " " + this.settings.slideTransition:"")
}):c ? this.$stage.animate({left: b + "px"}, this.speed(), this.settings.fallbackEasing, a.proxy(this.onTransitionEnd, this)):this.$stage.css({left: b + "px"})
}, e.prototype.is=function (a){
return this._states.current[a]&&this._states.current[a] > 0
}, e.prototype.current=function (a){
if(a===d) return this._current;
if(0===this._items.length) return d;
if(a=this.normalize(a), this._current!==a){
var b=this.trigger("change", {property: {name: "position", value: a}});
b.data!==d&&(a=this.normalize(b.data)), this._current=a, this.invalidate("position"), this.trigger("changed", {
property: {
name: "position",
value: this._current
}})
}
return this._current
}, e.prototype.invalidate=function (b){
return "string"===a.type(b)&&(this._invalidated[b] = !0, this.is("valid")&&this.leave("valid")), a.map(this._invalidated, function (a, b){
return b
})
}, e.prototype.reset=function (a){
(a=this.normalize(a))!==d&&(this._speed=0, this._current=a, this.suppress(["translate", "translated"]), this.animate(this.coordinates(a)), this.release(["translate", "translated"]))
}, e.prototype.normalize=function (a, b){
var c=this._items.length, e=b ? 0:this._clones.length;
return !this.isNumeric(a)||c < 1 ? a=d:(a < 0||a >=c + e)&&(a=((a - e / 2) % c + c) % c + e / 2), a
}, e.prototype.relative=function (a){
return a -=this._clones.length / 2, this.normalize(a, !0)
}, e.prototype.maximum=function (a){
var b, c, d, e=this.settings, f=this._coordinates.length;
if(e.loop) f=this._clones.length / 2 + this._items.length - 1; else if(e.autoWidth||e.merge){
if(b=this._items.length) for (c=this._items[--b].width(), d=this.$element.width(); b--&&!((c +=this._items[b].width() + this.settings.margin) > d);) ;
f=b + 1
} else f=e.center ? this._items.length - 1:this._items.length - e.items;
return a&&(f -=this._clones.length / 2), Math.max(f, 0)
}, e.prototype.minimum=function (a){
return a ? 0:this._clones.length / 2
}, e.prototype.items=function (a){
return a===d ? this._items.slice():(a=this.normalize(a, !0), this._items[a])
}, e.prototype.mergers=function (a){
return a===d ? this._mergers.slice():(a=this.normalize(a, !0), this._mergers[a])
}, e.prototype.clones=function (b){
var c=this._clones.length / 2, e=c + this._items.length, f=function (a){
return a % 2==0 ? e + a / 2:c - (a + 1) / 2
};
return b===d ? a.map(this._clones, function (a, b){
return f(b)
}):a.map(this._clones, function (a, c){
return a===b ? f(c):null
})
}, e.prototype.speed=function (a){
return a!==d&&(this._speed=a), this._speed
}, e.prototype.coordinates=function (b){
var c, e=1, f=b - 1;
return b===d ? a.map(this._coordinates, a.proxy(function (a, b){
return this.coordinates(b)
}, this)):(this.settings.center ? (this.settings.rtl&&(e=-1, f=b + 1), c=this._coordinates[b], c +=(this.width() - c + (this._coordinates[f]||0)) / 2 * e):c=this._coordinates[f]||0, c=Math.ceil(c))
}, e.prototype.duration=function (a, b, c){
return 0===c ? 0:Math.min(Math.max(Math.abs(b - a), 1), 6) * Math.abs(c||this.settings.smartSpeed)
}, e.prototype.to=function (a, b){
var c=this.current(), d=null, e=a - this.relative(c), f=(e > 0) - (e < 0), g=this._items.length,
h=this.minimum(), i=this.maximum();
this.settings.loop ? (!this.settings.rewind&&Math.abs(e) > g / 2&&(e +=-1 * f * g), a=c + e, (d=((a - h) % g + g) % g + h)!==a&&d - e <=i&&d - e > 0&&(c=d - e, a=d, this.reset(c))):this.settings.rewind ? (i +=1, a=(a % i + i) % i):a=Math.max(h, Math.min(i, a)), this.speed(this.duration(c, a, b)), this.current(a), this.isVisible()&&this.update()
}, e.prototype.next=function (a){
a=a||!1, this.to(this.relative(this.current()) + 1, a)
}, e.prototype.prev=function (a){
a=a||!1, this.to(this.relative(this.current()) - 1, a)
}, e.prototype.onTransitionEnd=function (a){
if(a!==d&&(a.stopPropagation(), (a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))) return !1;
this.leave("animating"), this.trigger("translated")
}, e.prototype.viewport=function (){
var d;
return this.options.responsiveBaseElement!==b ? d=a(this.options.responsiveBaseElement).width():b.innerWidth ? d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth ? d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."), d
}, e.prototype.replace=function (b){
this.$stage.empty(), this._items=[], b&&(b=b instanceof jQuery ? b:a(b)), this.settings.nestedItemSelector&&(b=b.find("." + this.settings.nestedItemSelector)), b.filter(function (){
return 1===this.nodeType
}).each(a.proxy(function (a, b){
b=this.prepare(b), this.$stage.append(b), this._items.push(b), this._mergers.push(1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)
}, this)), this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition:0), this.invalidate("items")
}, e.prototype.add=function (b, c){
var e=this.relative(this._current);
c=c===d ? this._items.length:this.normalize(c, !0), b=b instanceof jQuery ? b:a(b), this.trigger("add", {
content: b,
position: c
}), b=this.prepare(b), 0===this._items.length||c===this._items.length ? (0===this._items.length&&this.$stage.append(b), 0!==this._items.length&&this._items[c - 1].after(b), this._items.push(b), this._mergers.push(1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b), this._items.splice(c, 0, b), this._mergers.splice(c, 0, 1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)), this._items[e]&&this.reset(this._items[e].index()), this.invalidate("items"), this.trigger("added", {
content: b,
position: c
})
}, e.prototype.remove=function (a){
(a=this.normalize(a, !0))!==d&&(this.trigger("remove", {
content: this._items[a],
position: a
}), this._items[a].remove(), this._items.splice(a, 1), this._mergers.splice(a, 1), this.invalidate("items"), this.trigger("removed", {
content: null,
position: a
}))
}, e.prototype.preloadAutoWidthImages=function (b){
b.each(a.proxy(function (b, c){
this.enter("pre-loading"), c=a(c), a(new Image).one("load", a.proxy(function (a){
c.attr("src", a.target.src), c.css("opacity", 1), this.leave("pre-loading"), !this.is("pre-loading")&&!this.is("initializing")&&this.refresh()
}, this)).attr("src", c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))
}, this))
}, e.prototype.destroy=function (){
this.$element.off(".owl.core"), this.$stage.off(".owl.core"), a(c).off(".owl.core"), !1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer), this.off(b, "resize", this._handlers.onThrottledResize));
for (var d in this._plugins) this._plugins[d].destroy();
this.$stage.children(".cloned").remove(), this.$stage.unwrap(), this.$stage.children().contents().unwrap(), this.$stage.children().unwrap(), this.$stage.remove(), this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class", this.$element.attr("class").replace(new RegExp(this.options.responsiveClass + "-\\S+\\s", "g"), "")).removeData("owl.carousel")
}, e.prototype.op=function (a, b, c){
var d=this.settings.rtl;
switch (b){
case"<":
return d ? a > c:a < c;
case">":
return d ? a < c:a > c;
case">=":
return d ? a <=c:a >=c;
case"<=":
return d ? a >=c:a <=c
}}, e.prototype.on=function (a, b, c, d){
a.addEventListener ? a.addEventListener(b, c, d):a.attachEvent&&a.attachEvent("on" + b, c)
}, e.prototype.off=function (a, b, c, d){
a.removeEventListener ? a.removeEventListener(b, c, d):a.detachEvent&&a.detachEvent("on" + b, c)
}, e.prototype.trigger=function (b, c, d, f, g){
var h={item: {count: this._items.length, index: this.current()}},
i=a.camelCase(a.grep(["on", b, d], function (a){
return a
}).join("-").toLowerCase()),
j=a.Event([b, "owl", d||"carousel"].join(".").toLowerCase(), a.extend({relatedTarget: this}, h, c));
return this._supress[b]||(a.each(this._plugins, function (a, b){
b.onTrigger&&b.onTrigger(j)
}), this.register({
type: e.Type.Event,
name: b
}), this.$element.trigger(j), this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this, j)), j
}, e.prototype.enter=function (b){
a.each([b].concat(this._states.tags[b]||[]), a.proxy(function (a, b){
this._states.current[b]===d&&(this._states.current[b]=0), this._states.current[b]++
}, this))
}, e.prototype.leave=function (b){
a.each([b].concat(this._states.tags[b]||[]), a.proxy(function (a, b){
this._states.current[b]--
}, this))
}, e.prototype.register=function (b){
if(b.type===e.Type.Event){
if(a.event.special[b.name]||(a.event.special[b.name]={}), !a.event.special[b.name].owl){
var c=a.event.special[b.name]._default;
a.event.special[b.name]._default=function (a){
return !c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl") ? a.namespace&&a.namespace.indexOf("owl") > -1:c.apply(this, arguments)
}, a.event.special[b.name].owl = !0
}} else b.type===e.Type.State&&(this._states.tags[b.name] ? this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags, this._states.tags[b.name]=a.grep(this._states.tags[b.name], a.proxy(function (c, d){
return a.inArray(c, this._states.tags[b.name])===d
}, this)))
}, e.prototype.suppress=function (b){
a.each(b, a.proxy(function (a, b){
this._supress[b] = !0
}, this))
}, e.prototype.release=function (b){
a.each(b, a.proxy(function (a, b){
delete this._supress[b]
}, this))
}, e.prototype.pointer=function (a){
var c={x: null, y: null};
return a=a.originalEvent||a || b.event, a=a.touches&&a.touches.length ? a.touches[0]:a.changedTouches&&a.changedTouches.length ? a.changedTouches[0]:a, a.pageX ? (c.x=a.pageX, c.y=a.pageY):(c.x=a.clientX, c.y=a.clientY), c
}, e.prototype.isNumeric=function (a){
return !isNaN(parseFloat(a))
}, e.prototype.difference=function (a, b){
return {x: a.x - b.x, y: a.y - b.y}}, a.fn.owlCarousel=function (b){
var c=Array.prototype.slice.call(arguments, 1);
return this.each(function (){
var d=a(this), f=d.data("owl.carousel");
f||(f=new e(this, "object"==typeof b&&b), d.data("owl.carousel", f), a.each(["next", "prev", "to", "destroy", "refresh", "replace", "add", "remove"], function (b, c){
f.register({
type: e.Type.Event,
name: c
}), f.$element.on(c + ".owl.carousel.core", a.proxy(function (a){
a.namespace&&a.relatedTarget!==this&&(this.suppress([c]), f[c].apply(this, [].slice.call(arguments, 1)), this.release([c]))
}, f))
})), "string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f, c)
})
}, a.fn.owlCarousel.Constructor=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
var e=function (b){
this._core=b, this._interval=null, this._visible=null, this._handlers={
"initialized.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.autoRefresh&&this.watch()
}, this)
}, this._core.options=a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers)
};
e.Defaults={autoRefresh: !0, autoRefreshInterval: 500}, e.prototype.watch=function (){
this._interval||(this._visible=this._core.isVisible(), this._interval=b.setInterval(a.proxy(this.refresh, this), this._core.settings.autoRefreshInterval))
}, e.prototype.refresh=function (){
this._core.isVisible()!==this._visible&&(this._visible = !this._visible, this._core.$element.toggleClass("owl-hidden", !this._visible), this._visible&&this._core.invalidate("width")&&this._core.refresh())
}, e.prototype.destroy=function (){
var a, c;
b.clearInterval(this._interval);
for (a in this._handlers) this._core.$element.off(a, this._handlers[a]);
for (c in Object.getOwnPropertyNames(this)) "function"!=typeof this[c]&&(this[c]=null)
}, a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
var e=function (b){
this._core=b, this._loaded=[], this._handlers={
"initialized.owl.carousel change.owl.carousel resized.owl.carousel": a.proxy(function (b){
if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){
var c=this._core.settings, e=c.center&&Math.ceil(c.items / 2)||c.items,
f=c.center&&-1 * e||0,
g=(b.property&&b.property.value!==d ? b.property.value:this._core.current()) + f,
h=this._core.clones().length, i=a.proxy(function (a, b){
this.load(b)
}, this);
for (c.lazyLoadEager > 0&&(e +=c.lazyLoadEager, c.loop&&(g -=c.lazyLoadEager, e++)); f++ < e;) this.load(h / 2 + this._core.relative(g)), h&&a.each(this._core.clones(this._core.relative(g)), i), g++
}}, this)
}, this._core.options=a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers)
};
e.Defaults={lazyLoad: !1, lazyLoadEager: 0}, e.prototype.load=function (c){
var d=this._core.$stage.children().eq(c), e=d&&d.find(".owl-lazy");
!e||a.inArray(d.get(0), this._loaded) > -1||(e.each(a.proxy(function (c, d){
var e, f=a(d),
g=b.devicePixelRatio > 1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");
this._core.trigger("load", {
element: f,
url: g
}, "lazy"), f.is("img") ? f.one("load.owl.lazy", a.proxy(function (){
f.css("opacity", 1), this._core.trigger("loaded", {element: f, url: g}, "lazy")
}, this)).attr("src", g):f.is("source") ? f.one("load.owl.lazy", a.proxy(function (){
this._core.trigger("loaded", {element: f, url: g}, "lazy")
}, this)).attr("srcset", g):(e=new Image, e.onload=a.proxy(function (){
f.css({"background-image": 'url("' + g + '")', opacity: "1"}), this._core.trigger("loaded", {
element: f,
url: g
}, "lazy")
}, this), e.src=g)
}, this)), this._loaded.push(d.get(0)))
}, e.prototype.destroy=function (){
var a, b;
for (a in this.handlers) this._core.$element.off(a, this.handlers[a]);
for (b in Object.getOwnPropertyNames(this)) "function"!=typeof this[b]&&(this[b]=null)
}, a.fn.owlCarousel.Constructor.Plugins.Lazy=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
var e=function (c){
this._core=c, this._previousHeight=null, this._handlers={
"initialized.owl.carousel refreshed.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.autoHeight&&this.update()
}, this), "changed.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()
}, this), "loaded.owl.lazy": a.proxy(function (a){
a.namespace&&this._core.settings.autoHeight&&a.element.closest("." + this._core.settings.itemClass).index()===this._core.current()&&this.update()
}, this)
}, this._core.options=a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers), this._intervalId=null;
var d=this;
a(b).on("load", function (){
d._core.settings.autoHeight&&d.update()
}), a(b).resize(function (){
d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId), d._intervalId=setTimeout(function (){
d.update()
}, 250))
})
};
e.Defaults={autoHeight: !1, autoHeightClass: "owl-height"}, e.prototype.update=function (){
var b=this._core._current, c=b + this._core.settings.items, d=this._core.settings.lazyLoad,
e=this._core.$stage.children().toArray().slice(b, c), f=[], g=0;
a.each(e, function (b, c){
f.push(a(c).height())
}), g=Math.max.apply(null, f), g <=1&&d && this._previousHeight&&(g=this._previousHeight), this._previousHeight=g, this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)
}, e.prototype.destroy=function (){
var a, b;
for (a in this._handlers) this._core.$element.off(a, this._handlers[a]);
for (b in Object.getOwnPropertyNames(this)) "function"!=typeof this[b]&&(this[b]=null)
}, a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
var e=function (b){
this._core=b, this._videos={}, this._playing=null, this._handlers={
"initialized.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.register({type: "state", name: "playing", tags: ["interacting"]})
}, this), "resize.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()
}, this), "refreshed.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()
}, this), "changed.owl.carousel": a.proxy(function (a){
a.namespace&&"position"===a.property.name&&this._playing&&this.stop()
}, this), "prepared.owl.carousel": a.proxy(function (b){
if(b.namespace){
var c=a(b.content).find(".owl-video");
c.length&&(c.css("display", "none"), this.fetch(c, a(b.content)))
}}, this)
}, this._core.options=a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers), this._core.$element.on("click.owl.video", ".owl-video-play-icon", a.proxy(function (a){
this.play(a)
}, this))
};
e.Defaults={video: !1, videoHeight: !1, videoWidth: !1}, e.prototype.fetch=function (a, b){
var c=function (){
return a.attr("data-vimeo-id") ? "vimeo":a.attr("data-vzaar-id") ? "vzaar":"youtube"
}(), d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),
e=a.attr("data-width")||this._core.settings.videoWidth,
f=a.attr("data-height")||this._core.settings.videoHeight, g=a.attr("href");
if(!g) throw new Error("Missing video URL.");
if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/), d[3].indexOf("youtu") > -1) c="youtube"; else if(d[3].indexOf("vimeo") > -1) c="vimeo"; else {
if(!(d[3].indexOf("vzaar") > -1)) throw new Error("Video URL not supported.");
c="vzaar"
}
d=d[6], this._videos[g]={
type: c,
id: d,
width: e,
height: f
}, b.attr("data-video", g), this.thumbnail(a, this._videos[g])
}, e.prototype.thumbnail=function (b, c){
var d, e, f, g=c.width&&c.height ? "width:" + c.width + "px;height:" + c.height + "px;":"",
h=b.find("img"), i="src", j="", k=this._core.settings, l=function (c){
e='<div class="owl-video-play-icon"></div>', d=k.lazyLoad ? a("<div/>", {
class: "owl-video-tn " + j,
srcType: c
}):a("<div/>", {
class: "owl-video-tn",
style: "opacity:1;background-image:url(" + c + ")"
}), b.after(d), b.after(e)
};
if(b.wrap(a("<div/>", {
class: "owl-video-wrapper",
style: g
})), this._core.settings.lazyLoad&&(i="data-src", j="owl-lazy"), h.length) return l(h.attr(i)), h.remove(), !1;
"youtube"===c.type ? (f="//img.youtube.com/vi/" + c.id + "/hqdefault.jpg", l(f)):"vimeo"===c.type ? a.ajax({
type: "GET",
url: "//vimeo.com/api/v2/video/" + c.id + ".json",
jsonp: "callback",
dataType: "jsonp",
success: function (a){
f=a[0].thumbnail_large, l(f)
}}):"vzaar"===c.type&&a.ajax({
type: "GET",
url: "//vzaar.com/api/videos/" + c.id + ".json",
jsonp: "callback",
dataType: "jsonp",
success: function (a){
f=a.framegrab_url, l(f)
}})
}, e.prototype.stop=function (){
this._core.trigger("stop", null, "video"), this._playing.find(".owl-video-frame").remove(), this._playing.removeClass("owl-video-playing"), this._playing=null, this._core.leave("playing"), this._core.trigger("stopped", null, "video")
}, e.prototype.play=function (b){
var c, d=a(b.target), e=d.closest("." + this._core.settings.itemClass),
f=this._videos[e.attr("data-video")], g=f.width||"100%", h=f.height||this._core.$stage.height();
this._playing||(this._core.enter("playing"), this._core.trigger("play", null, "video"), e=this._core.items(this._core.relative(e.index())), this._core.reset(e.index()), c=a('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'), c.attr("height", h), c.attr("width", g), "youtube"===f.type ? c.attr("src", "//www.youtube.com/embed/" + f.id + "?autoplay=1&rel=0&v=" + f.id):"vimeo"===f.type ? c.attr("src", "//player.vimeo.com/video/" + f.id + "?autoplay=1"):"vzaar"===f.type&&c.attr("src", "//view.vzaar.com/" + f.id + "/player?autoplay=true"), a(c).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")), this._playing=e.addClass("owl-video-playing"))
}, e.prototype.isInFullScreen=function (){
var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;
return b&&a(b).parent().hasClass("owl-video-frame")
}, e.prototype.destroy=function (){
var a, b;
this._core.$element.off("click.owl.video");
for (a in this._handlers) this._core.$element.off(a, this._handlers[a]);
for (b in Object.getOwnPropertyNames(this)) "function"!=typeof this[b]&&(this[b]=null)
}, a.fn.owlCarousel.Constructor.Plugins.Video=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
var e=function (b){
this.core=b, this.core.options=a.extend({}, e.Defaults, this.core.options), this.swapping = !0, this.previous=d, this.next=d, this.handlers={
"change.owl.carousel": a.proxy(function (a){
a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(), this.next=a.property.value)
}, this), "drag.owl.carousel dragged.owl.carousel translated.owl.carousel": a.proxy(function (a){
a.namespace&&(this.swapping="translated"==a.type)
}, this), "translate.owl.carousel": a.proxy(function (a){
a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()
}, this)
}, this.core.$element.on(this.handlers)
};
e.Defaults={
animateOut: !1,
animateIn: !1
}, e.prototype.swap=function (){
if(1===this.core.settings.items&&a.support.animation&&a.support.transition){
this.core.speed(0);
var b, c=a.proxy(this.clear, this), d=this.core.$stage.children().eq(this.previous),
e=this.core.$stage.children().eq(this.next), f=this.core.settings.animateIn,
g=this.core.settings.animateOut;
this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous) - this.core.coordinates(this.next), d.one(a.support.animation.end, c).css({left: b + "px"}).addClass("animated owl-animated-out").addClass(g)), f&&e.one(a.support.animation.end, c).addClass("animated owl-animated-in").addClass(f))
}}, e.prototype.clear=function (b){
a(b.target).css({left: ""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.onTransitionEnd()
}, e.prototype.destroy=function (){
var a, b;
for (a in this.handlers) this.core.$element.off(a, this.handlers[a]);
for (b in Object.getOwnPropertyNames(this)) "function"!=typeof this[b]&&(this[b]=null)
}, a.fn.owlCarousel.Constructor.Plugins.Animate=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
var e=function (b){
this._core=b, this._call=null, this._time=0, this._timeout=0, this._paused = !0, this._handlers={
"changed.owl.carousel": a.proxy(function (a){
a.namespace&&"settings"===a.property.name ? this._core.settings.autoplay ? this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)
}, this), "initialized.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.autoplay&&this.play()
}, this), "play.owl.autoplay": a.proxy(function (a, b, c){
a.namespace&&this.play(b, c)
}, this), "stop.owl.autoplay": a.proxy(function (a){
a.namespace&&this.stop()
}, this), "mouseover.owl.autoplay": a.proxy(function (){
this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()
}, this), "mouseleave.owl.autoplay": a.proxy(function (){
this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()
}, this), "touchstart.owl.core": a.proxy(function (){
this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()
}, this), "touchend.owl.core": a.proxy(function (){
this._core.settings.autoplayHoverPause&&this.play()
}, this)
}, this._core.$element.on(this._handlers), this._core.options=a.extend({}, e.Defaults, this._core.options)
};
e.Defaults={
autoplay: !1,
autoplayTimeout: 5e3,
autoplayHoverPause: !1,
autoplaySpeed: !1
}, e.prototype._next=function (d){
this._call=b.setTimeout(a.proxy(this._next, this, d), this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()), this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)
}, e.prototype.read=function (){
return (new Date).getTime() - this._time
}, e.prototype.play=function (c, d){
var e;
this._core.is("rotating")||this._core.enter("rotating"), c=c||this._core.settings.autoplayTimeout, e=Math.min(this._time % (this._timeout||c), c), this._paused ? (this._time=this.read(), this._paused = !1):b.clearTimeout(this._call), this._time +=this.read() % c - e, this._timeout=c, this._call=b.setTimeout(a.proxy(this._next, this, d), c - e)
}, e.prototype.stop=function (){
this._core.is("rotating")&&(this._time=0, this._paused = !0, b.clearTimeout(this._call), this._core.leave("rotating"))
}, e.prototype.pause=function (){
this._core.is("rotating")&&!this._paused&&(this._time=this.read(), this._paused = !0, b.clearTimeout(this._call))
}, e.prototype.destroy=function (){
var a, b;
this.stop();
for (a in this._handlers) this._core.$element.off(a, this._handlers[a]);
for (b in Object.getOwnPropertyNames(this)) "function"!=typeof this[b]&&(this[b]=null)
}, a.fn.owlCarousel.Constructor.Plugins.autoplay=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
"use strict";
var e=function (b){
this._core=b, this._initialized = !1, this._pages=[], this._controls={}, this._templates=[], this.$element=this._core.$element, this._overrides={
next: this._core.next,
prev: this._core.prev,
to: this._core.to
}, this._handlers={
"prepared.owl.carousel": a.proxy(function (b){
b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="' + this._core.settings.dotClass + '">' + a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot") + "</div>")
}, this), "added.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position, 0, this._templates.pop())
}, this), "remove.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position, 1)
}, this), "changed.owl.carousel": a.proxy(function (a){
a.namespace&&"position"==a.property.name&&this.draw()
}, this), "initialized.owl.carousel": a.proxy(function (a){
a.namespace&&!this._initialized&&(this._core.trigger("initialize", null, "navigation"), this.initialize(), this.update(), this.draw(), this._initialized = !0, this._core.trigger("initialized", null, "navigation"))
}, this), "refreshed.owl.carousel": a.proxy(function (a){
a.namespace&&this._initialized&&(this._core.trigger("refresh", null, "navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation"))
}, this)
}, this._core.options=a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers)
};
e.Defaults={
nav: !1,
navText: ['<span aria-label="Previous">&#x2039;</span>', '<span aria-label="Next">&#x203a;</span>'],
navSpeed: !1,
navElement: 'button type="button" role="presentation"',
navContainer: !1,
navContainerClass: "owl-nav",
navClass: ["owl-prev", "owl-next"],
slideBy: 1,
dotClass: "owl-dot",
dotsClass: "owl-dots",
dots: !0,
dotsEach: !1,
dotsData: !1,
dotsSpeed: !1,
dotsContainer: !1
}, e.prototype.initialize=function (){
var b, c=this._core.settings;
this._controls.$relative=(c.navContainer ? a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"), this._controls.$previous=a("<" + c.navElement + ">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click", a.proxy(function (a){
this.prev(c.navSpeed)
}, this)), this._controls.$next=a("<" + c.navElement + ">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click", a.proxy(function (a){
this.next(c.navSpeed)
}, this)), c.dotsData||(this._templates=[a('<button role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]), this._controls.$absolute=(c.dotsContainer ? a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"), this._controls.$absolute.on("click", "button", a.proxy(function (b){
var d=a(b.target).parent().is(this._controls.$absolute) ? a(b.target).index():a(b.target).parent().index();
b.preventDefault(), this.to(d, c.dotsSpeed)
}, this));
for (b in this._overrides) this._core[b]=a.proxy(this[b], this)
}, e.prototype.destroy=function (){
var a, b, c, d, e;
e=this._core.settings;
for (a in this._handlers) this.$element.off(a, this._handlers[a]);
for (b in this._controls) "$relative"===b&&e.navContainer ? this._controls[b].html(""):this._controls[b].remove();
for (d in this.overides) this._core[d]=this._overrides[d];
for (c in Object.getOwnPropertyNames(this)) "function"!=typeof this[c]&&(this[c]=null)
}, e.prototype.update=function (){
var a, b, c, d=this._core.clones().length / 2, e=d + this._core.items().length, f=this._core.maximum(!0),
g=this._core.settings, h=g.center||g.autoWidth||g.dotsData ? 1:g.dotsEach||g.items;
if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy, g.items)), g.dots||"page"==g.slideBy) for (this._pages=[], a=d, b=0, c=0; a < e; a++){
if(b >=h||0===b){
if(this._pages.push({start: Math.min(f, a - d), end: a - d + h - 1}), Math.min(f, a - d)===f) break;
b=0, ++c
}
b +=this._core.mergers(this._core.relative(a))
}}, e.prototype.draw=function (){
var b, c=this._core.settings, d=this._core.items().length <=c.items,
e=this._core.relative(this._core.current()), f=c.loop||c.rewind;
this._controls.$relative.toggleClass("disabled", !c.nav||d), c.nav&&(this._controls.$previous.toggleClass("disabled", !f&&e <=this._core.minimum(!0)), this._controls.$next.toggleClass("disabled", !f&&e >=this._core.maximum(!0))), this._controls.$absolute.toggleClass("disabled", !c.dots||d), c.dots&&(b=this._pages.length - this._controls.$absolute.children().length, c.dotsData&&0!==b ? this._controls.$absolute.html(this._templates.join("")):b > 0 ? this._controls.$absolute.append(new Array(b + 1).join(this._templates[0])):b < 0&&this._controls.$absolute.children().slice(b).remove(), this._controls.$absolute.find(".active").removeClass("active"), this._controls.$absolute.children().eq(a.inArray(this.current(), this._pages)).addClass("active"))
}, e.prototype.onTrigger=function (b){
var c=this._core.settings;
b.page={
index: a.inArray(this.current(), this._pages),
count: this._pages.length,
size: c&&(c.center||c.autoWidth||c.dotsData ? 1:c.dotsEach||c.items)
}}, e.prototype.current=function (){
var b=this._core.relative(this._core.current());
return a.grep(this._pages, a.proxy(function (a, c){
return a.start <=b&&a.end >=b
}, this)).pop()
}, e.prototype.getPosition=function (b){
var c, d, e=this._core.settings;
return "page"==e.slideBy ? (c=a.inArray(this.current(), this._pages), d=this._pages.length, b ? ++c:--c, c=this._pages[(c % d + d) % d].start):(c=this._core.relative(this._core.current()), d=this._core.items().length, b ? c +=e.slideBy:c -=e.slideBy), c
}, e.prototype.next=function (b){
a.proxy(this._overrides.to, this._core)(this.getPosition(!0), b)
}, e.prototype.prev=function (b){
a.proxy(this._overrides.to, this._core)(this.getPosition(!1), b)
}, e.prototype.to=function (b, c, d){
var e;
!d&&this._pages.length ? (e=this._pages.length, a.proxy(this._overrides.to, this._core)(this._pages[(b % e + e) % e].start, c)):a.proxy(this._overrides.to, this._core)(b, c)
}, a.fn.owlCarousel.Constructor.Plugins.Navigation=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
"use strict";
var e=function (c){
this._core=c, this._hashes={}, this.$element=this._core.$element, this._handlers={
"initialized.owl.carousel": a.proxy(function (c){
c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")
}, this), "prepared.owl.carousel": a.proxy(function (b){
if(b.namespace){
var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");
if(!c) return;
this._hashes[c]=b.content
}}, this), "changed.owl.carousel": a.proxy(function (c){
if(c.namespace&&"position"===c.property.name){
var d=this._core.items(this._core.relative(this._core.current())),
e=a.map(this._hashes, function (a, b){
return a===d ? b:null
}).join();
if(!e||b.location.hash.slice(1)===e) return;
b.location.hash=e
}}, this)
}, this._core.options=a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers), a(b).on("hashchange.owl.navigation", a.proxy(function (a){
var c=b.location.hash.substring(1), e=this._core.$stage.children(),
f=this._hashes[c]&&e.index(this._hashes[c]);
f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f), !1, !0)
}, this))
};
e.Defaults={URLhashListener: !1}, e.prototype.destroy=function (){
var c, d;
a(b).off("hashchange.owl.navigation");
for (c in this._handlers) this._core.$element.off(c, this._handlers[c]);
for (d in Object.getOwnPropertyNames(this)) "function"!=typeof this[d]&&(this[d]=null)
}, a.fn.owlCarousel.Constructor.Plugins.Hash=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
function e(b, c){
var e = !1, f=b.charAt(0).toUpperCase() + b.slice(1);
return a.each((b + " " + h.join(f + " ") + f).split(" "), function (a, b){
if(g[b]!==d) return e = !c||b, !1
}), e
}
function f(a){
return e(a, !0)
}
var g=a("<support>").get(0).style, h="Webkit Moz O ms".split(" "), i={
transition: {
end: {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd",
transition: "transitionend"
}},
animation: {
end: {
WebkitAnimation: "webkitAnimationEnd",
MozAnimation: "animationend",
OAnimation: "oAnimationEnd",
animation: "animationend"
}}
}, j={
csstransforms: function (){
return !!e("transform")
}, csstransforms3d: function (){
return !!e("perspective")
}, csstransitions: function (){
return !!e("transition")
}, cssanimations: function (){
return !!e("animation")
}};
j.csstransitions()&&(a.support.transition=new String(f("transition")), a.support.transition.end=i.transition.end[a.support.transition]), j.cssanimations()&&(a.support.animation=new String(f("animation")), a.support.animation.end=i.animation.end[a.support.animation]), j.csstransforms()&&(a.support.transform=new String(f("transform")), a.support.transform3d=j.csstransforms3d())
}(window.Zepto||window.jQuery, window, document);
(function (){
function clearInputs(container){
container.querySelectorAll('input, textarea, select').forEach(function (el){
if(el.type==='checkbox'||el.type==='radio'){
el.checked=false;
}else{
el.value='';
}});
}
function valueMatches(actualValue, expectedValue){
if(actualValue===expectedValue) return true;
if(expectedValue==='other'&&actualValue==='Nešto drugo') return true;
return false;
}
function getInputsByName(form, fieldName){
var out=[];
form.querySelectorAll('input').forEach(function (input){
if(input.name===fieldName||input.name===fieldName + '[]') out.push(input);
});
return out;
}
function shouldShow(form, fieldName, expectedValue){
if(!fieldName) return false;
var select=form.querySelector('select[name="' + fieldName + '"]');
if(select) return select.value===expectedValue;
var inputs=getInputsByName(form, fieldName);
if(!inputs.length) return false;
return Array.prototype.some.call(inputs, function (input){
return input.checked&&valueMatches(input.value, expectedValue);
});
}
function updateConditionalFields(form){
var conditionals=form.querySelectorAll('.nn-cf7-conditional');
conditionals.forEach(function (block){
var fieldName=block.getAttribute('data-condition');
var expectedValue=block.getAttribute('data-value');
var isVisible=shouldShow(form, fieldName, expectedValue);
block.classList.toggle('nn-cf7-hidden', !isVisible);
block.setAttribute('aria-hidden', isVisible ? 'false':'true');
if(!isVisible){
clearInputs(block);
}});
var otherVisible=shouldShow(form, 'purchase_help', 'other');
var issuesVisible=shouldShow(form, 'had_issues', 'DA');
form.classList.toggle('nn-feedback--other-visible', otherVisible);
form.classList.toggle('nn-feedback--issues-visible', issuesVisible);
}
function attachForm(wrapper){
var form=wrapper.closest('form');
if(!form||wrapper.getAttribute('data-nn-cf7-inited')) return;
wrapper.setAttribute('data-nn-cf7-inited', '1');
updateConditionalFields(form);
form.addEventListener('change', function (){
updateConditionalFields(form);
});
}
function runInit(){
var wrappers=document.querySelectorAll('form .nn-feedback-form');
wrappers.forEach(attachForm);
wrappers.forEach(function (wrapper){
var form=wrapper.closest('form');
if(!form) return;
var ratingGroup=wrapper.querySelector('.nn-rating');
if(ratingGroup){
var ratingLabels=Array.prototype.slice.call(ratingGroup.querySelectorAll('label')
);
function applyActive(label){
var targetIndex=ratingLabels.indexOf(label);
ratingLabels.forEach(function (lbl, idx){
lbl.classList.toggle('is-active', idx <=targetIndex);
});
}
ratingLabels.forEach(function (label){
label.addEventListener('mouseenter', function (){
applyActive(label);
});
label.addEventListener('focusin', function (){
applyActive(label);
});
});
ratingGroup.addEventListener('mouseleave', function (){
var checked=ratingGroup.querySelector('input:checked');
if(!checked){
ratingLabels.forEach(function (lbl){
lbl.classList.remove('is-active');
});
return;
}
var checkedLabel=checked.closest('label');
if(checkedLabel){
applyActive(checkedLabel);
}});
ratingGroup.addEventListener('change', function (){
var checked=ratingGroup.querySelector('input:checked');
if(checked){
var checkedLabel=checked.closest('label');
if(checkedLabel) applyActive(checkedLabel);
}});
}});
}
document.addEventListener('change', function (e){
var form=e.target&&e.target.closest&&e.target.closest('form');
if(!form) return;
var wrapper=form.querySelector('.nn-feedback-form');
if(wrapper){
updateConditionalFields(form);
if(!wrapper.getAttribute('data-nn-cf7-inited')) attachForm(wrapper);
}});
if(document.readyState==='loading'){
document.addEventListener('DOMContentLoaded', runInit);
}else{
runInit();
}})();
jQuery(function ($){
$(document).on('input change', 'input.qty', function (){
const $qty=$(this);
const qty=parseFloat($qty.val())||1;
$qty.closest('.product, form.cart')
.find('a.ajax_add_to_cart, button.ajax_add_to_cart')
.attr('data-quantity', qty);
$qty.closest('.product, form.cart').find('a.added_to_cart').remove();
});
$(document.body).on('added_to_cart', function (e, fragments, cart_hash, $button){
if(!$button||!$button.length) return;
setTimeout(function (){
$button.removeClass('added');
$button.closest('.product, form.cart').find('a.added_to_cart').remove();
}, 1500);
setTimeout(function (){
const $ctx=$button.closest('form.cart, .product');
$ctx.find('input.qty').val(1).trigger('change');
$button.attr('data-quantity', '1');
}, 1500);
});
});
document.addEventListener('DOMContentLoaded', function (){
var wrappers=document.querySelectorAll('.wpcf7 form .nn-feedback-form');
if(!wrappers.length) return;
function clearInputs(container){
container.querySelectorAll('input, textarea, select').forEach(function (el){
if(el.type==='checkbox'||el.type==='radio'){
el.checked=false;
}else{
el.value='';
}});
}
function shouldShow(form, fieldName, expectedValue){
if(!fieldName) return false;
var select=form.querySelector('select[name="' + fieldName + '"]');
if(select){
return select.value===expectedValue;
}
var inputs=form.querySelectorAll('input[name="' + fieldName + '"], input[name="' + fieldName + '[]"]'
);
if(!inputs.length) return false;
return Array.prototype.some.call(inputs, function (input){
return input.checked&&input.value===expectedValue;
});
}
function updateConditionalFields(form){
var conditionals=form.querySelectorAll('.nn-cf7-conditional');
conditionals.forEach(function (block){
var fieldName=block.getAttribute('data-condition');
var expectedValue=block.getAttribute('data-value');
var isVisible=shouldShow(form, fieldName, expectedValue);
block.classList.toggle('nn-cf7-hidden', !isVisible);
block.setAttribute('aria-hidden', isVisible ? 'false':'true');
if(!isVisible){
clearInputs(block);
}});
}
wrappers.forEach(function (wrapper){
var form=wrapper.closest('form');
if(!form) return;
updateConditionalFields(form);
form.addEventListener('change', function (){
updateConditionalFields(form);
});
var ratingGroup=wrapper.querySelector('.nn-rating');
if(ratingGroup){
var ratingLabels=Array.prototype.slice.call(ratingGroup.querySelectorAll('label')
);
function applyActive(label){
var targetIndex=ratingLabels.indexOf(label);
ratingLabels.forEach(function (lbl, idx){
lbl.classList.toggle('is-active', idx <=targetIndex);
});
}
ratingLabels.forEach(function (label){
label.addEventListener('mouseenter', function (){
applyActive(label);
});
label.addEventListener('focusin', function (){
applyActive(label);
});
});
ratingGroup.addEventListener('mouseleave', function (){
var checked=ratingGroup.querySelector('input:checked');
if(!checked){
ratingLabels.forEach(function (lbl){
lbl.classList.remove('is-active');
});
return;
}
var checkedLabel=checked.closest('label');
if(checkedLabel){
applyActive(checkedLabel);
}});
ratingGroup.addEventListener('change', function (){
var checked=ratingGroup.querySelector('input:checked');
if(checked){
var checkedLabel=checked.closest('label');
if(checkedLabel) applyActive(checkedLabel);
}});
}});
});
jQuery(document).ready(function ($){
$('ul.tabs li a').on('click', function (){
var $tab=$(this);
var tabId=$tab.attr('href');
if(tabId==='#tab-sigurnosne_informacije'){
var $contentDiv=$('.sigurnosne-informacije-content');
var $filesDiv=$('.sigurnosne-informacije-files');
var productID=$contentDiv.data('productid');
var nonce=$contentDiv.data('nonce');
var docTitle=$contentDiv.data('title');
if(!productID){
return;
}
$.ajax({
url: safetyInfoAjax.ajax_url,
method: 'POST',
data: {
action: 'load_brand_info',
security: nonce,
product_id: productID
},
success: function (response){
if(response.success){
$contentDiv.html(response.data.html).slideDown();
$('.sigurnosne-informacije-content').css('background-image', 'none');
}else{
$('.sigurnosne-informacije-content').css('background-image', 'none');
}},
error: function (jqXHR, textStatus, errorThrown){
$('.sigurnosne-informacije-content').css('background-image', 'none');
}});
$.ajax({
url: safetyInfoAjax.rest_url,
type: 'GET',
data: {product_id: productID},
success: function (response){
if(!response||response.length===0){
}else{
var listHtml='<hr><h3>' + docTitle + '</h3><ul>';
response.forEach(function (file){
listHtml +='<li><a class="' + file.type + '" href="' + file.url + '" target="_blank">' + file.name + '</a></li>';
});
listHtml +='</ul>';
$filesDiv.html(listHtml).slideDown();
}},
error: function (){
$filesDiv.html('<p>Greška pri dohvaćanju dokumenata.</p>').slideDown();
}});
}});
});
document.addEventListener("DOMContentLoaded",function(){let a=document.getElementById("site-navigation");if(a){let n=a.querySelector("button");if(n){let t=a.querySelector("ul");if(t){n.setAttribute("aria-expanded","false"),t.setAttribute("aria-expanded","false"),t.classList.add("nav-menu"),n.addEventListener("click",function(){a.classList.toggle("toggled");var e=a.classList.contains("toggled")?"true":"false";n.setAttribute("aria-expanded",e),t.setAttribute("aria-expanded",e)});var e=document.getElementsByClassName("handheld-navigation");if(0<e.length&&[].forEach.call(e[0].querySelectorAll(".menu-item-has-children > a, .page_item_has_children > a"),function(e){let t=document.createElement("button"),n=(t.setAttribute("aria-expanded","false"),t.classList.add("dropdown-toggle"),document.createElement("span"));n.classList.add("screen-reader-text"),n.appendChild(document.createTextNode(storefrontScreenReaderText.expand)),t.appendChild(n),e.parentNode.insertBefore(t,e.nextSibling),e.parentNode.classList.contains("current-menu-ancestor")&&(t.setAttribute("aria-expanded","true"),t.classList.add("toggled-on"),t.nextElementSibling.classList.add("toggled-on")),t.addEventListener("click",function(){for(t.classList.toggle("toggled-on");n.firstChild;)n.removeChild(n.firstChild);var e=t.classList.contains("toggled-on");t.setAttribute("aria-expanded",e),n.appendChild(document.createTextNode(e?storefrontScreenReaderText.collapse:storefrontScreenReaderText.expand)),t.nextElementSibling.classList.toggle("toggled-on")})}),[].forEach.call(document.querySelectorAll(".site-header .menu-item > a, .site-header .page_item > a, .site-header-cart a"),function(t){t.addEventListener("focus",function(){var e=document.querySelectorAll(".focus");[].forEach.call(e,function(e){e.contains(t)||(e.classList.remove("focus"),e.firstChild&&e.firstChild.classList&&e.firstChild.classList.remove("blocked"))}),t.parentNode.classList.add("focus")})}),[].forEach.call(document.querySelectorAll("body #page > :not(.site-header)"),function(e){e.addEventListener("click",function(){[].forEach.call(document.querySelectorAll(".focus, .blocked"),function(e){e.classList.remove("focus"),e.classList.remove("blocked")})})}),("ontouchstart"in window||window.navigator.maxTouchPoints)&&767<window.innerWidth){[].forEach.call(document.querySelectorAll(".site-header ul ul, .site-header-cart .widget_shopping_cart"),function(e){e.classList.add("sub-menu--is-touch-device")});let n=!1;[].forEach.call(document.querySelectorAll(".site-header .menu-item > a, .site-header .page_item > a, .site-header-cart a"),function(t){t.addEventListener("click",function(e){t.classList.contains("blocked")&&!1===n&&e.preventDefault(),n=!1}),t.addEventListener("pointerup",function(e){!t.classList.contains("blocked")&&"mouse"!==e.pointerType&&("cart-contents"===t.className&&t.parentNode.nextElementSibling&&""!==t.parentNode.nextElementSibling.textContent.trim()||t.nextElementSibling)?t.classList.add("blocked"):n=!0})})}}else n.style.display="none"}}});
function wcml_reset_cart_fragments(){try{document.body.dispatchEvent(new Event("wc_fragment_refresh")),sessionStorage.removeItem("wc_fragments")}catch(err){}}function wcml_cart_clear_removed_items(){var xhr=new XMLHttpRequest,formData=new FormData;formData.append("action","wcml_cart_clear_removed_items"),formData.append("wcml_nonce",document.querySelector("#wcml_clear_removed_items_nonce").value),xhr.open("POST",woocommerce_params.ajax_url),xhr.onload=function(){200===xhr.status&&(window.location=window.location.href)},xhr.send(formData)}document.addEventListener("DOMContentLoaded",(function(){document.addEventListener("click",(function(e){e.target.matches(".wcml_removed_cart_items_clear")&&(e.preventDefault(),wcml_cart_clear_removed_items())}));var name;(!sessionStorage.getItem("woocommerce_cart_hash")&&(name="woocommerce_cart_hash",!document.cookie.match("(^|;)\\s*"+name+"\\s*=\\s*([^;]+)")?.pop())||1==actions.is_lang_switched||1==actions.force_reset)&&setTimeout(wcml_reset_cart_fragments,0)}));
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.sbjs=e()}}(function(){return function e(t,r,n){function a(s,o){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){var r=t[s][1][e];return a(r||e)},p,p.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(e,t,r){"use strict";var n=e("./init"),a={init:function(e){this.get=n(e),e&&e.callback&&"function"==typeof e.callback&&e.callback(this.get)}};t.exports=a},{"./init":6}],2:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/utils"),i={containers:{current:"sbjs_current",current_extra:"sbjs_current_add",first:"sbjs_first",first_extra:"sbjs_first_add",session:"sbjs_session",udata:"sbjs_udata",promocode:"sbjs_promo"},service:{migrations:"sbjs_migrations"},delimiter:"|||",aliases:{main:{type:"typ",source:"src",medium:"mdm",campaign:"cmp",content:"cnt",term:"trm",id:"id",platform:"plt",format:"fmt",tactic:"tct"},extra:{fire_date:"fd",entrance_point:"ep",referer:"rf"},session:{pages_seen:"pgs",current_page:"cpg"},udata:{visits:"vst",ip:"uip",agent:"uag"},promo:"code"},pack:{main:function(e){return i.aliases.main.type+"="+e.type+i.delimiter+i.aliases.main.source+"="+e.source+i.delimiter+i.aliases.main.medium+"="+e.medium+i.delimiter+i.aliases.main.campaign+"="+e.campaign+i.delimiter+i.aliases.main.content+"="+e.content+i.delimiter+i.aliases.main.term+"="+e.term+i.delimiter+i.aliases.main.id+"="+e.id+i.delimiter+i.aliases.main.platform+"="+e.platform+i.delimiter+i.aliases.main.format+"="+e.format+i.delimiter+i.aliases.main.tactic+"="+e.tactic},extra:function(e){return i.aliases.extra.fire_date+"="+a.setDate(new Date,e)+i.delimiter+i.aliases.extra.entrance_point+"="+document.location.href+i.delimiter+i.aliases.extra.referer+"="+(document.referrer||n.none)},user:function(e,t){return i.aliases.udata.visits+"="+e+i.delimiter+i.aliases.udata.ip+"="+t+i.delimiter+i.aliases.udata.agent+"="+navigator.userAgent},session:function(e){return i.aliases.session.pages_seen+"="+e+i.delimiter+i.aliases.session.current_page+"="+document.location.href},promo:function(e){return i.aliases.promo+"="+a.setLeadingZeroToInt(a.randomInt(e.min,e.max),e.max.toString().length)}}};t.exports=i},{"./helpers/utils":5,"./terms":9}],3:[function(e,t,r){"use strict";var n=e("../data").delimiter;t.exports={useBase64:!1,setBase64Flag:function(e){this.useBase64=e},encodeData:function(e){return encodeURIComponent(e).replace(/\!/g,"%21").replace(/\~/g,"%7E").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")},decodeData:function(e){try{return decodeURIComponent(e).replace(/\%21/g,"!").replace(/\%7E/g,"~").replace(/\%2A/g,"*").replace(/\%27/g,"'").replace(/\%28/g,"(").replace(/\%29/g,")")}catch(t){try{return unescape(e)}catch(r){return""}}},set:function(e,t,r,n,a){var i,s;if(r){var o=new Date;o.setTime(o.getTime()+60*r*1e3),i="; expires="+o.toGMTString()}else i="";s=n&&!a?";domain=."+n:"";var c=this.encodeData(t);this.useBase64&&(c=btoa(c).replace(/=+$/,"")),document.cookie=this.encodeData(e)+"="+c+i+s+"; path=/"},get:function(e){for(var t=this.encodeData(e)+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var a=r[n];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t)){var i=a.substring(t.length,a.length);if(/^[A-Za-z0-9+/]+$/.test(i))try{i=atob(i.padEnd(4*Math.ceil(i.length/4),"="))}catch(s){}return this.decodeData(i)}}return null},destroy:function(e,t,r){this.set(e,"",-1,t,r)},parse:function(e){var t=[],r={};if("string"==typeof e)t.push(e);else for(var a in e)e.hasOwnProperty(a)&&t.push(e[a]);for(var i=0;i<t.length;i++){var s;r[this.unsbjs(t[i])]={},s=this.get(t[i])?this.get(t[i]).split(n):[];for(var o=0;o<s.length;o++){var c=s[o].split("="),u=c.splice(0,1);u.push(c.join("=")),r[this.unsbjs(t[i])][u[0]]=this.decodeData(u[1])}}return r},unsbjs:function(e){return e.replace("sbjs_","")}}},{"../data":2}],4:[function(e,t,r){"use strict";t.exports={parse:function(e){for(var t=this.parseOptions,r=t.parser[t.strictMode?"strict":"loose"].exec(e),n={},a=14;a--;)n[t.key[a]]=r[a]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(e,r,a){r&&(n[t.q.name][r]=a)}),n},parseOptions:{strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},getParam:function(e){for(var t={},r=(e||window.location.search.substring(1)).split("&"),n=0;n<r.length;n++){var a=r[n].split("=");if("undefined"==typeof t[a[0]])t[a[0]]=a[1];else if("string"==typeof t[a[0]]){var i=[t[a[0]],a[1]];t[a[0]]=i}else t[a[0]].push(a[1])}return t},getHost:function(e){return this.parse(e).host.replace("www.","")}}},{}],5:[function(e,t,r){"use strict";t.exports={escapeRegexp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},setDate:function(e,t){var r=e.getTimezoneOffset()/60,n=e.getHours(),a=t||0===t?t:-r;return e.setHours(n+r+a),e.getFullYear()+"-"+this.setLeadingZeroToInt(e.getMonth()+1,2)+"-"+this.setLeadingZeroToInt(e.getDate(),2)+" "+this.setLeadingZeroToInt(e.getHours(),2)+":"+this.setLeadingZeroToInt(e.getMinutes(),2)+":"+this.setLeadingZeroToInt(e.getSeconds(),2)},setLeadingZeroToInt:function(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r},randomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}}},{}],6:[function(e,t,r){"use strict";var n=e("./data"),a=e("./terms"),i=e("./helpers/cookies"),s=e("./helpers/uri"),o=e("./helpers/utils"),c=e("./params"),u=e("./migrations");t.exports=function(e){var t,r,p,f,m,d,l,g,h,y,_,v,b,x=c.fetch(e),k=s.getParam(),w=x.domain.host,q=x.domain.isolate,I=x.lifetime;function j(e){switch(e){case a.traffic.utm:t=a.traffic.utm,r="undefined"!=typeof k.utm_source?k.utm_source:"undefined"!=typeof k.gclid?"google":"undefined"!=typeof k.yclid?"yandex":a.none,p="undefined"!=typeof k.utm_medium?k.utm_medium:"undefined"!=typeof k.gclid?"cpc":"undefined"!=typeof k.yclid?"cpc":a.none,f="undefined"!=typeof k.utm_campaign?k.utm_campaign:"undefined"!=typeof k[x.campaign_param]?k[x.campaign_param]:"undefined"!=typeof k.gclid?"google_cpc":"undefined"!=typeof k.yclid?"yandex_cpc":a.none,m="undefined"!=typeof k.utm_content?k.utm_content:"undefined"!=typeof k[x.content_param]?k[x.content_param]:a.none,l=k.utm_id||a.none,g=k.utm_source_platform||a.none,h=k.utm_creative_format||a.none,y=k.utm_marketing_tactic||a.none,d="undefined"!=typeof k.utm_term?k.utm_term:"undefined"!=typeof k[x.term_param]?k[x.term_param]:function(){var e=document.referrer;if(k.utm_term)return k.utm_term;if(!(e&&s.parse(e).host&&s.parse(e).host.match(/^(?:.*\.)?yandex\..{2,9}$/i)))return!1;try{return s.getParam(s.parse(document.referrer).query).text}catch(t){return!1}}()||a.none;break;case a.traffic.organic:t=a.traffic.organic,r=r||s.getHost(document.referrer),p=a.referer.organic,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.referral:t=a.traffic.referral,r=r||s.getHost(document.referrer),p=p||a.referer.referral,f=a.none,m=s.parse(document.referrer).path,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.typein:t=a.traffic.typein,r=x.typein_attributes.source,p=x.typein_attributes.medium,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;default:t=a.oops,r=a.oops,p=a.oops,f=a.oops,m=a.oops,d=a.oops,l=a.oops,g=a.oops,h=a.oops,y=a.oops}var i={type:t,source:r,medium:p,campaign:f,content:m,term:d,id:l,platform:g,format:h,tactic:y};return n.pack.main(i)}function R(e){var t=document.referrer;switch(e){case a.traffic.organic:return!!t&&H(t)&&function(e){var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp("yandex")+"\\..{2,9}$"),n=new RegExp(".*"+o.escapeRegexp("text")+"=.*"),a=new RegExp("^(?:www\\.)?"+o.escapeRegexp("google")+"\\..{2,9}$");if(s.parse(e).query&&s.parse(e).host.match(t)&&s.parse(e).query.match(n))return r="yandex",!0;if(s.parse(e).host.match(a))return r="google",!0;if(!s.parse(e).query)return!1;for(var i=0;i<x.organics.length;i++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.organics[i].host)+"$","i"))&&s.parse(e).query.match(new RegExp(".*"+o.escapeRegexp(x.organics[i].param)+"=.*","i")))return r=x.organics[i].display||x.organics[i].host,!0;if(i+1===x.organics.length)return!1}}(t);case a.traffic.referral:return!!t&&H(t)&&function(e){if(!(x.referrals.length>0))return r=s.getHost(e),!0;for(var t=0;t<x.referrals.length;t++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.referrals[t].host)+"$","i")))return r=x.referrals[t].display||x.referrals[t].host,p=x.referrals[t].medium||a.referer.referral,!0;if(t+1===x.referrals.length)return r=s.getHost(e),!0}}(t);default:return!1}}function H(e){if(x.domain){if(q)return s.getHost(e)!==s.getHost(w);var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp(w)+"$","i");return!s.getHost(e).match(t)}return s.getHost(e)!==s.getHost(document.location.href)}function D(){i.set(n.containers.current_extra,n.pack.extra(x.timezone_offset),I,w,q),i.get(n.containers.first_extra)||i.set(n.containers.first_extra,n.pack.extra(x.timezone_offset),I,w,q)}return i.setBase64Flag(x.base64),u.go(I,w,q),i.set(n.containers.current,function(){var e;if("undefined"!=typeof k.utm_source||"undefined"!=typeof k.utm_medium||"undefined"!=typeof k.utm_campaign||"undefined"!=typeof k.utm_content||"undefined"!=typeof k.utm_term||"undefined"!=typeof k.utm_id||"undefined"!=typeof k.utm_source_platform||"undefined"!=typeof k.utm_creative_format||"undefined"!=typeof k.utm_marketing_tactic||"undefined"!=typeof k.gclid||"undefined"!=typeof k.yclid||"undefined"!=typeof k[x.campaign_param]||"undefined"!=typeof k[x.term_param]||"undefined"!=typeof k[x.content_param])D(),e=j(a.traffic.utm);else if(R(a.traffic.organic))D(),e=j(a.traffic.organic);else if(!i.get(n.containers.session)&&R(a.traffic.referral))D(),e=j(a.traffic.referral);else{if(i.get(n.containers.first)||i.get(n.containers.current))return i.get(n.containers.current);D(),e=j(a.traffic.typein)}return e}(),I,w,q),i.get(n.containers.first)||i.set(n.containers.first,i.get(n.containers.current),I,w,q),i.get(n.containers.udata)?(_=parseInt(i.parse(n.containers.udata)[i.unsbjs(n.containers.udata)][n.aliases.udata.visits])||1,_=i.get(n.containers.session)?_:_+1,v=n.pack.user(_,x.user_ip)):(_=1,v=n.pack.user(_,x.user_ip)),i.set(n.containers.udata,v,I,w,q),i.get(n.containers.session)?(b=parseInt(i.parse(n.containers.session)[i.unsbjs(n.containers.session)][n.aliases.session.pages_seen])||1,b+=1):b=1,i.set(n.containers.session,n.pack.session(b),x.session_length,w,q),x.promocode&&!i.get(n.containers.promocode)&&i.set(n.containers.promocode,n.pack.promo(x.promocode),I,w,q),i.parse(n.containers)}},{"./data":2,"./helpers/cookies":3,"./helpers/uri":4,"./helpers/utils":5,"./migrations":7,"./params":8,"./terms":9}],7:[function(e,t,r){"use strict";var n=e("./data"),a=e("./helpers/cookies");t.exports={go:function(e,t,r){var i,s=this.migrations,o={l:e,d:t,i:r};if(a.get(n.containers.first)||a.get(n.service.migrations)){if(!a.get(n.service.migrations))for(i=0;i<s.length;i++)s[i].go(s[i].id,o)}else{var c=[];for(i=0;i<s.length;i++)c.push(s[i].id);var u="";for(i=0;i<c.length;i++)u+=c[i]+"=1",i<c.length-1&&(u+=n.delimiter);a.set(n.service.migrations,u,o.l,o.d,o.i)}},migrations:[{id:"1418474375998",version:"1.0.0-beta",go:function(e,t){var r=e+"=1",i=e+"=0",s=function(e,t,r){return t||r?e:n.delimiter};try{var o=[];for(var c in n.containers)n.containers.hasOwnProperty(c)&&o.push(n.containers[c]);for(var u=0;u<o.length;u++)if(a.get(o[u])){var p=a.get(o[u]).replace(/(\|)?\|(\|)?/g,s);a.destroy(o[u],t.d,t.i),a.destroy(o[u],t.d,!t.i),a.set(o[u],p,t.l,t.d,t.i)}a.get(n.containers.session)&&a.set(n.containers.session,n.pack.session(0),t.l,t.d,t.i),a.set(n.service.migrations,r,t.l,t.d,t.i)}catch(f){a.set(n.service.migrations,i,t.l,t.d,t.i)}}}]}},{"./data":2,"./helpers/cookies":3}],8:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/uri");t.exports={fetch:function(e){var t=e||{},r={};if(r.lifetime=this.validate.checkFloat(t.lifetime)||6,r.lifetime=parseInt(30*r.lifetime*24*60),r.session_length=this.validate.checkInt(t.session_length)||30,r.timezone_offset=this.validate.checkInt(t.timezone_offset),r.base64=t.base64||!1,r.campaign_param=t.campaign_param||!1,r.term_param=t.term_param||!1,r.content_param=t.content_param||!1,r.user_ip=t.user_ip||n.none,t.promocode?(r.promocode={},r.promocode.min=parseInt(t.promocode.min)||1e5,r.promocode.max=parseInt(t.promocode.max)||999999):r.promocode=!1,t.typein_attributes&&t.typein_attributes.source&&t.typein_attributes.medium?(r.typein_attributes={},r.typein_attributes.source=t.typein_attributes.source,r.typein_attributes.medium=t.typein_attributes.medium):r.typein_attributes={source:"(direct)",medium:"(none)"},t.domain&&this.validate.isString(t.domain)?r.domain={host:t.domain,isolate:!1}:t.domain&&t.domain.host?r.domain=t.domain:r.domain={host:a.getHost(document.location.hostname),isolate:!1},r.referrals=[],t.referrals&&t.referrals.length>0)for(var i=0;i<t.referrals.length;i++)t.referrals[i].host&&r.referrals.push(t.referrals[i]);if(r.organics=[],t.organics&&t.organics.length>0)for(var s=0;s<t.organics.length;s++)t.organics[s].host&&t.organics[s].param&&r.organics.push(t.organics[s]);return r.organics.push({host:"bing.com",param:"q",display:"bing"}),r.organics.push({host:"yahoo.com",param:"p",display:"yahoo"}),r.organics.push({host:"about.com",param:"q",display:"about"}),r.organics.push({host:"aol.com",param:"q",display:"aol"}),r.organics.push({host:"ask.com",param:"q",display:"ask"}),r.organics.push({host:"globososo.com",param:"q",display:"globo"}),r.organics.push({host:"go.mail.ru",param:"q",display:"go.mail.ru"}),r.organics.push({host:"rambler.ru",param:"query",display:"rambler"}),r.organics.push({host:"tut.by",param:"query",display:"tut.by"}),r.referrals.push({host:"t.co",display:"twitter.com"}),r.referrals.push({host:"plus.url.google.com",display:"plus.google.com"}),r},validate:{checkFloat:function(e){return!(!e||!this.isNumeric(parseFloat(e)))&&parseFloat(e)},checkInt:function(e){return!(!e||!this.isNumeric(parseInt(e)))&&parseInt(e)},isNumeric:function(e){return!isNaN(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)}}}},{"./helpers/uri":4,"./terms":9}],9:[function(e,t,r){"use strict";t.exports={traffic:{utm:"utm",organic:"organic",referral:"referral",typein:"typein"},referer:{referral:"referral",organic:"organic",social:"social"},none:"(none)",oops:"(Houston, we have a problem)"}},{}]},{},[1])(1)});
!function(t){"use strict";const e=t.params,n=(document.querySelector.bind(document),(t,e)=>e.split(".").reduce((t,e)=>t&&t[e],t)),i=()=>null,s=t=>null===t||t===undefined?"":t,o="wc/store/checkout";function a(t){document.querySelectorAll("wc-order-attribution-inputs").forEach((t,e)=>{e>0&&t.remove()});for(const e of document.querySelectorAll("wc-order-attribution-inputs"))e.values=t}function r(t){window.wp&&window.wp.data&&window.wp.data.dispatch&&window.wc&&window.wc.wcBlocksData&&window.wp.data.dispatch(window.wc.wcBlocksData.CHECKOUT_STORE_KEY).setExtensionData("woocommerce/order-attribution",t,!0)}function c(){return"undefined"!=typeof sbjs}function d(){if(window.wp&&window.wp.data&&"function"==typeof window.wp.data.subscribe){const e=window.wp.data.subscribe(function(){e(),r(t.getAttributionData())},o)}}t.getAttributionData=function(){const s=e.allowTracking&&c()?n:i,o=c()?sbjs.get:{},a=Object.entries(t.fields).map(([t,e])=>[t,s(o,e)]);return Object.fromEntries(a)},t.setOrderTracking=function(n){if(e.allowTracking=n,n){if(!c())return;sbjs.init({lifetime:Number(e.lifetime),session_length:Number(e.session),base64:Boolean(e.base64),timezone_offset:"0"})}else!function(){const t=window.location.hostname;["sbjs_current","sbjs_current_add","sbjs_first","sbjs_first_add","sbjs_session","sbjs_udata","sbjs_migrations","sbjs_promo"].forEach(e=>{document.cookie=`${e}=; path=/; max-age=-999; domain=.${t};`})}();const i=t.getAttributionData();a(i),r(i)},t.setOrderTracking(e.allowTracking),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d(),window.customElements.define("wc-order-attribution-inputs",class extends HTMLElement{constructor(){if(super(),this._fieldNames=Object.keys(t.fields),this.hasOwnProperty("_values")){let t=this.values;delete this.values,this.values=t||{}}}connectedCallback(){this.innerHTML="";const t=new DocumentFragment;for(const n of this._fieldNames){const i=document.createElement("input");i.type="hidden",i.name=`${e.prefix}${n}`,i.value=s(this.values&&this.values[n]||""),t.appendChild(i)}this.appendChild(t)}set values(t){if(this._values=t,this.isConnected)for(const t of this._fieldNames){const n=this.querySelector(`input[name="${e.prefix}${t}"]`);n?n.value=s(this.values[t]):console.warn(`Field "${t}" not found. `+"Most likely, the '<wc-order-attribution-inputs>' element was manipulated.")}}get values(){return this._values}})}(window.wc_order_attribution);
(function(){
'use strict';
if(typeof wc_facebook_pixel_data==='undefined'){
return;
}
var data=wc_facebook_pixel_data;
var firedEvents={};
function buildEventData(event){
return {
method: event.method||'track',
name: event.name,
params: event.params||{},
eventId: event.eventId||null
};}
function shouldSkipEvent(eventId){
return eventId&&firedEvents[eventId];
}
function markEventFired(eventId){
if(eventId){
firedEvents[eventId]=true;
}}
function logWarning(message, data){
if(typeof console!=='undefined'&&console.warn){
console.warn('[FB Pixel]', message, data);
}}
function fireEvent(event){
var eventData=buildEventData(event);
if(shouldSkipEvent(eventData.eventId)){
return;
}
if(typeof fbq!=='function'){
logWarning('fbq not available, skipping event:', eventData.name);
return;
}
try {
var params=eventData.params;
if(eventData.eventId){
fbq(eventData.method, eventData.name, params, {eventID: eventData.eventId});
}else{
fbq(eventData.method, eventData.name, params);
}
markEventFired(eventData.eventId);
} catch (e){
logWarning('Event error: ' + eventData.name, e);
}}
function fireQueuedEvents(){
var events=data.eventQueue;
if(!events||!Array.isArray(events)){
return;
}
for (var i=0; i < events.length; i++){
try {
fireEvent(events[i]);
} catch (e){
logWarning('fireQueuedEvents loop error:', e);
}}
data.eventQueue=[];
}
function init(){
if(typeof fbq==='function'){
fireQueuedEvents();
return;
}
var _fbq=window.fbq;
Object.defineProperty(window, 'fbq', {
configurable: true,
enumerable: true,
get: function(){ return _fbq; },
set: function(value){
_fbq=value;
if(typeof value==='function'){
Object.defineProperty(window, 'fbq', {
configurable: true,
enumerable: true,
writable: true,
value: value
});
setTimeout(fireQueuedEvents, 0);
}}
});
}
if(document.readyState==='complete'){
init();
}else{
window.addEventListener('load', init);
}})();