media-us1.digital.nuance.com Open in urlscan Pro
2620:1ec:27::cafe:1834  Public Scan

URL: https://media-us1.digital.nuance.com/media/launch/acif/acif.js
Submission Tags: falconsandbox
Submission: On December 21 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

/**
 * Automaton Customer Interface Framework
 * Version: release-5.53.5-2 -- 5892f11
 * Release Date: 6/27/2018
 * (c) Nuance Communications (http://www.nuance.com)
 */

var loader,define,requireModule,require,requirejs;!function(e){"use strict";function t(){var e=Object.create(null);return e.__=void 0,delete e.__,e}function n(e){throw new Error("an unsupported module was defined, expected `define(name, deps, module)` instead got: `"+e+"` arguments to define`")}function i(e,t,n,i){this.id=p++,this.name=e,this.deps=!t.length&&n.length?h:t,this.module={exports:{}},this.callback=n,this.hasExportsAsDep=!1,this.isAlias=i,this.reified=new Array(t.length),this.state="new"}function o(e){this.name=e}function r(e,t){throw new Error("Could not find module `"+e+"` imported from `"+t+"`")}function a(e,t,n){for(var i=d[e]||d[e+"/index"];i&&i.isAlias;)i=d[i.name];return i||r(e,t),n&&"pending"!==i.state&&"finalized"!==i.state&&(i.findDeps(n),n.push(i)),i}function s(e,t){if("."!==e.charAt(0))return e;for(var n=e.split("/"),i=t.split("/"),o=i.slice(0,-1),r=0,a=n.length;r<a;r++){var s=n[r];if(".."===s){if(0===o.length)throw new Error("Cannot access parent module of root");o.pop()}else{if("."===s)continue;o.push(s)}}return o.join("/")}function l(e){return!(!d[e]&&!d[e+"/index"])}var u=(e.heimdall,{loader:loader,define:define,requireModule:requireModule,require:require,requirejs:requirejs});requirejs=require=requireModule=function(e){for(var t=[],n=a(e,"(require)",t),i=t.length-1;i>=0;i--)t[i].exports();return n.module.exports},loader={noConflict:function(t){var n,i;for(n in t)t.hasOwnProperty(n)&&u.hasOwnProperty(n)&&(i=t[n],e[i]=e[n],e[n]=u[n])}};var c;c=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var d=t(),f=t(),p=0,h=["require","exports","module"];i.prototype.makeDefaultExport=function(){var e=this.module.exports;null===e||"object"!=typeof e&&"function"!=typeof e||void 0!==e.default||!Object.isExtensible(e)||(e.default=e)},i.prototype.exports=function(){if("finalized"===this.state||"reifying"===this.state)return this.module.exports;loader.wrapModules&&(this.callback=loader.wrapModules(this.name,this.callback)),this.reify();var e=this.callback.apply(this,this.reified);return this.state="finalized",this.hasExportsAsDep&&void 0===e||(this.module.exports=e),this.makeDefaultExport(),this.module.exports},i.prototype.unsee=function(){this.state="new",this.module={exports:{}}},i.prototype.reify=function(){if("reified"!==this.state){this.state="reifying";try{this.reified=this._reify(),this.state="reified"}finally{"reifying"===this.state&&(this.state="errored")}}},i.prototype._reify=function(){for(var e=this.reified.slice(),t=0;t<e.length;t++){var n=e[t];e[t]=n.exports?n.exports:n.module.exports()}return e},i.prototype.findDeps=function(e){if("new"===this.state){this.state="pending";for(var t=this.deps,n=0;n<t.length;n++){var i=t[n],o=this.reified[n]={exports:void 0,module:void 0};"exports"===i?(this.hasExportsAsDep=!0,o.exports=this.module.exports):"require"===i?o.exports=this.makeRequire():"module"===i?o.exports=this.module:o.module=a(s(i,this.name),this.name,e)}}},i.prototype.makeRequire=function(){var e=this.name,t=function(t){return require(s(t,e))};return t.default=t,t.has=function(t){return l(s(t,e))},t},define=function(e,t,r){var a=d[e];a&&"new"!==a.state||(arguments.length<2&&n(arguments.length),c(t)||(r=t,t=[]),d[e]=r instanceof o?new i(r.name,t,r,!0):new i(e,t,r,!1))},define.alias=function(e){return new o(e)},requirejs.entries=requirejs._eak_seen=d,requirejs.has=l,requirejs.unsee=function(e){a(e,"(unsee)",!1).unsee()},requirejs.clear=function(){requirejs.entries=requirejs._eak_seen=d=t(),f=t()},define("foo",function(){}),define("foo/bar",[],function(){}),define("foo/asdf",["module","exports","require"],function(e,t,n){n.has("foo/bar")&&n("foo/bar")}),define("foo/baz",[],define.alias("foo")),define("foo/quz",define.alias("foo")),define("foo/bar",["foo","./quz","./baz","./asdf","./bar","../foo"],function(){}),define("foo/main",["foo/bar"],function(){}),require("foo/main"),require.unsee("foo/bar"),requirejs.clear(),"object"==typeof exports&&"object"==typeof module&&module.exports&&(module.exports={require:require,define:define})}(this),function(e,t){"use strict";"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.returnExports=t()}(this,function(){var e,t=Array.prototype,n=Object.prototype,i=Function.prototype,o=String.prototype,r=Number.prototype,a=t.slice,s=t.splice,l=t.push,u=t.unshift,c=t.concat,d=i.call,f=n.toString,p=Array.isArray||function(e){return"[object Array]"===f.call(e)},h="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,m=Function.prototype.toString,g=function(e){try{return m.call(e),!0}catch(e){return!1}};e=function(e){if("function"!=typeof e)return!1;if(h)return g(e);var t=f.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t};var v,y=RegExp.prototype.exec,b=function(e){try{return y.call(e),!0}catch(e){return!1}};v=function(e){return"object"==typeof e&&(h?b(e):"[object RegExp]"===f.call(e))};var _,w=String.prototype.valueOf,x=function(e){try{return w.call(e),!0}catch(e){return!1}};_=function(e){return"string"==typeof e||"object"==typeof e&&(h?x(e):"[object String]"===f.call(e))};var A=function(t){var n=f.call(t),i="[object Arguments]"===n;return i||(i=!p(t)&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&e(t.callee)),i},C=function(e){var t,n=Object.defineProperty&&function(){try{var e={};Object.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(e){return!1}}();return t=n?function(e,t,n,i){!i&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,i){!i&&t in e||(e[t]=n)},function(n,i,o){for(var r in i)e.call(i,r)&&t(n,r,i[r],o)}}(n.hasOwnProperty),T=function(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},E={ToInteger:function(e){var t=+e;return t!==t?t=0:0!==t&&t!==1/0&&t!==-1/0&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,i,o;if(T(t))return t;if(i=t.valueOf,e(i)&&(n=i.call(t),T(n)))return n;if(o=t.toString,e(o)&&(n=o.call(t),T(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)},ToUint32:function(e){return e>>>0}},D=function(){};C(i,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var i,o=a.call(arguments,1),r=function(){if(this instanceof i){var e=n.apply(this,c.call(o,a.call(arguments)));return Object(e)===e?e:this}return n.apply(t,c.call(o,a.call(arguments)))},s=Math.max(0,n.length-o.length),l=[],u=0;u<s;u++)l.push("$"+u);return i=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this, arguments); }")(r),n.prototype&&(D.prototype=n.prototype,i.prototype=new D,D.prototype=null),i}});var S=d.bind(n.hasOwnProperty),k=function(){var e=[1,2],t=e.splice();return 2===e.length&&p(t)&&0===t.length}();C(t,{splice:function(e,t){return 0===arguments.length?[]:s.apply(this,arguments)}},!k);var I=function(){var e={};return t.splice.call(e,0,0,1),1===e.length}();C(t,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=Math.max(E.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=a.call(arguments),n.length<2?n.push(this.length-e):n[1]=E.ToInteger(t)),s.apply(this,n)}},!I);var M=1!==[].unshift(0);C(t,{unshift:function(){return u.apply(this,arguments),this.length}},M),C(Array,{isArray:p});var N=Object("a"),j="a"!==N[0]||!(0 in N),F=function(e){var t=!0,n=!0;return e&&(e.call("foo",function(e,n,i){"object"!=typeof i&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")),!!e&&t&&n};C(t,{forEach:function(t){var n,i=E.ToObject(this),o=j&&_(this)?this.split(""):i,r=-1,a=o.length>>>0;if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++r<a;)r in o&&(void 0!==n?t.call(n,o[r],r,i):t(o[r],r,i))}},!F(t.forEach)),C(t,{map:function(t){var n,i=E.ToObject(this),o=j&&_(this)?this.split(""):i,r=o.length>>>0,a=Array(r);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.map callback must be a function");for(var s=0;s<r;s++)s in o&&(a[s]=void 0!==n?t.call(n,o[s],s,i):t(o[s],s,i));return a}},!F(t.map)),C(t,{filter:function(t){var n,i,o=E.ToObject(this),r=j&&_(this)?this.split(""):o,a=r.length>>>0,s=[];if(arguments.length>1&&(i=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var l=0;l<a;l++)l in r&&(n=r[l],(void 0===i?t(n,l,o):t.call(i,n,l,o))&&s.push(n));return s}},!F(t.filter)),C(t,{every:function(t){var n,i=E.ToObject(this),o=j&&_(this)?this.split(""):i,r=o.length>>>0;if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;a<r;a++)if(a in o&&!(void 0===n?t(o[a],a,i):t.call(n,o[a],a,i)))return!1;return!0}},!F(t.every)),C(t,{some:function(t){var n,i=E.ToObject(this),o=j&&_(this)?this.split(""):i,r=o.length>>>0;if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;a<r;a++)if(a in o&&(void 0===n?t(o[a],a,i):t.call(n,o[a],a,i)))return!0;return!1}},!F(t.some));var O=!1;t.reduce&&(O="object"==typeof t.reduce.call("es5",function(e,t,n,i){return i})),C(t,{reduce:function(t){var n=E.ToObject(this),i=j&&_(this)?this.split(""):n,o=i.length>>>0;if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var r,a=0;if(arguments.length>=2)r=arguments[1];else for(;;){if(a in i){r=i[a++];break}if(++a>=o)throw new TypeError("reduce of empty array with no initial value")}for(;a<o;a++)a in i&&(r=t(r,i[a],a,n));return r}},!O);var P=!1;t.reduceRight&&(P="object"==typeof t.reduceRight.call("es5",function(e,t,n,i){return i})),C(t,{reduceRight:function(t){var n=E.ToObject(this),i=j&&_(this)?this.split(""):n,o=i.length>>>0;if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,a=o-1;if(arguments.length>=2)r=arguments[1];else for(;;){if(a in i){r=i[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(a<0)return r;do{a in i&&(r=t(r,i[a],a,n))}while(a--);return r}},!P);var $=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);C(t,{indexOf:function(e){var t=j&&_(this)?this.split(""):E.ToObject(this),n=t.length>>>0;if(0===n)return-1;var i=0;for(arguments.length>1&&(i=E.ToInteger(arguments[1])),i=i>=0?i:Math.max(0,n+i);i<n;i++)if(i in t&&t[i]===e)return i;return-1}},$);var q=Array.prototype.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);C(t,{lastIndexOf:function(e){var t=j&&_(this)?this.split(""):E.ToObject(this),n=t.length>>>0;if(0===n)return-1;var i=n-1;for(arguments.length>1&&(i=Math.min(i,E.ToInteger(arguments[1]))),i=i>=0?i:n-Math.abs(i);i>=0;i--)if(i in t&&e===t[i])return i;return-1}},q);var R=!{toString:null}.propertyIsEnumerable("toString"),L=function(){}.propertyIsEnumerable("prototype"),H=!S("x","0"),V=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],W=V.length;C(Object,{keys:function(t){var n=e(t),i=A(t),o=null!==t&&"object"==typeof t,r=o&&_(t);if(!o&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var a=[],s=L&&n;if(r&&H||i)for(var l=0;l<t.length;++l)a.push(String(l));if(!i)for(var u in t)s&&"prototype"===u||!S(t,u)||a.push(String(u));if(R)for(var c=t.constructor,d=c&&c.prototype===t,f=0;f<W;f++){var p=V[f];d&&"constructor"===p||!S(t,p)||a.push(p)}return a}});var B=Object.keys&&function(){return 2===Object.keys(arguments).length}(1,2),z=Object.keys;C(Object,{keys:function(e){return z(A(e)?t.slice.call(e):e)}},!B);var U=-621987552e5,Y="-000001",J=Date.prototype.toISOString&&-1===new Date(U).toISOString().indexOf(Y);C(Date.prototype,{toISOString:function(){var e,t,n,i,o;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(i=this.getUTCFullYear(),o=this.getUTCMonth(),i+=Math.floor(o/12),o=(o%12+12)%12,e=[o+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],i=(i<0?"-":i>9999?"+":"")+("00000"+Math.abs(i)).slice(0<=i&&i<=9999?-4:-6),t=e.length;t--;)(n=e[t])<10&&(e[t]="0"+n);return i+"-"+e.slice(0,2).join("-")+"T"+e.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"}},J),function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&-1!==new Date(U).toJSON().indexOf(Y)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}()||(Date.prototype.toJSON=function(t){var n=Object(this),i=E.ToPrimitive(n);if("number"==typeof i&&!isFinite(i))return null;var o=n.toISOString;if(!e(o))throw new TypeError("toISOString property is not callable");return o.call(n)});var G=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),Q=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),K=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));Date.parse&&!K&&!Q&&G||(Date=function(e){var t=function(n,i,o,r,a,s,l){var u,c=arguments.length;return u=this instanceof e?1===c&&String(n)===n?new e(t.parse(n)):c>=7?new e(n,i,o,r,a,s,l):c>=6?new e(n,i,o,r,a,s):c>=5?new e(n,i,o,r,a):c>=4?new e(n,i,o,r):c>=3?new e(n,i,o):c>=2?new e(n,i):c>=1?new e(n):new e:e.apply(this,arguments),C(u,{constructor:t},!0),u},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),i=[0,31,59,90,120,151,181,212,243,273,304,334,365],o=function(e,t){var n=t>1?1:0;return i[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},r=function(t){return Number(new e(1970,0,1,0,0,0,t))};for(var a in e)S(e,a)&&(t[a]=e[a]);return C(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,C(t.prototype,{constructor:t},!0),C(t,{parse:function(t){var i=n.exec(t);if(i){var a,s=Number(i[1]),l=Number(i[2]||1)-1,u=Number(i[3]||1)-1,c=Number(i[4]||0),d=Number(i[5]||0),f=Number(i[6]||0),p=Math.floor(1e3*Number(i[7]||0)),h=Boolean(i[4]&&!i[8]),m="-"===i[9]?1:-1,g=Number(i[10]||0),v=Number(i[11]||0);return c<(d>0||f>0||p>0?24:25)&&d<60&&f<60&&p<1e3&&l>-1&&l<12&&g<24&&v<60&&u>-1&&u<o(s,l+1)-o(s,l)&&(a=60*(24*(o(s,l)+u)+c+g*m),a=1e3*(60*(a+d+v*m)+f)+p,h&&(a=r(a)),-864e13<=a&&a<=864e13)?a:NaN}return e.parse.apply(this,arguments)}}),t}(Date)),Date.now||(Date.now=function(){return(new Date).getTime()});var X=r.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0)),Z={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,i=t;++n<Z.size;)i+=e*Z.data[n],Z.data[n]=i%Z.base,i=Math.floor(i/Z.base)},divide:function(e){for(var t=Z.size,n=0;--t>=0;)n+=Z.data[t],Z.data[t]=Math.floor(n/e),n=n%e*Z.base},numToString:function(){for(var e=Z.size,t="";--e>=0;)if(""!==t||0===e||0!==Z.data[e]){var n=String(Z.data[e]);""===t?t=n:t+="0000000".slice(0,7-n.length)+n}return t},pow:function e(t,n,i){return 0===n?i:n%2==1?e(t,n-1,i*t):e(t*t,n/2,i)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}};C(r,{toFixed:function(e){var t,n,i,o,r,a,s,l;if(t=Number(e),(t=t!==t?0:Math.floor(t))<0||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if((n=Number(this))!==n)return"NaN";if(n<=-1e21||n>=1e21)return String(n);if(i="",n<0&&(i="-",n=-n),o="0",n>1e-21)if(r=Z.log(n*Z.pow(2,69,1))-69,a=r<0?n*Z.pow(2,-r,1):n/Z.pow(2,r,1),a*=4503599627370496,(r=52-r)>0){for(Z.multiply(0,a),s=t;s>=7;)Z.multiply(1e7,0),s-=7;for(Z.multiply(Z.pow(10,s,1),0),s=r-1;s>=23;)Z.divide(1<<23),s-=23;Z.divide(1<<s),Z.multiply(1,1),Z.divide(2),o=Z.numToString()}else Z.multiply(0,a),Z.multiply(1<<-r,0),o=Z.numToString()+"0.00000000000000000000".slice(2,2+t);return t>0?(l=o.length,o=l<=t?i+"0.0000000000000000000".slice(0,t-l+2)+o:i+o.slice(0,l-t)+"."+o.slice(l-t)):o=i+o,o}},X);var ee=o.split;2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?function(){var e=void 0===/()??/.exec("")[1];o.split=function(t,n){var i=this;if(void 0===t&&0===n)return[];if(!v(t))return ee.call(this,t,n);var o,r,a,s,u=[],c=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.extended?"x":"")+(t.sticky?"y":""),d=0,f=new RegExp(t.source,c+"g");i+="",e||(o=new RegExp("^"+f.source+"$(?!\\s)",c));var p=void 0===n?-1>>>0:E.ToUint32(n);for(r=f.exec(i);r&&!((a=r.index+r[0].length)>d&&(u.push(i.slice(d,r.index)),!e&&r.length>1&&r[0].replace(o,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(r[e]=void 0)}),r.length>1&&r.index<i.length&&l.apply(u,r.slice(1)),s=r[0].length,d=a,u.length>=p));)f.lastIndex===r.index&&f.lastIndex++,r=f.exec(i);return d===i.length?!s&&f.test("")||u.push(""):u.push(i.slice(d)),u.length>p?u.slice(0,p):u}}():"0".split(void 0,0).length&&(o.split=function(e,t){return void 0===e&&0===t?[]:ee.call(this,e,t)});var te=o.replace;(function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){e.push(n)}),1===e.length&&void 0===e[0]})()||(o.replace=function(t,n){var i=e(n),o=v(t)&&/\)[*?]/.test(t.source);if(i&&o){var r=function(e){var i=arguments.length,o=t.lastIndex;t.lastIndex=0;var r=t.exec(e)||[];return t.lastIndex=o,r.push(arguments[i-2],arguments[i-1]),n.apply(this,r)};return te.call(this,t,r)}return te.call(this,t,n)});var ne=o.substr,ie="".substr&&"b"!=="0b".substr(-1);C(o,{substr:function(e,t){var n=e;return e<0&&(n=Math.max(this.length+e,0)),ne.call(this,n,t)}},ie);var oe="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",re="​",ae="["+oe+"]",se=new RegExp("^"+ae+ae+"*"),le=new RegExp(ae+ae+"*$"),ue=o.trim&&(oe.trim()||!re.trim());C(o,{trim:function(){if(void 0===this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(se,"").replace(le,"")}},ue),8===parseInt(oe+"08")&&22===parseInt(oe+"0x16")||(parseInt=function(e){var t=/^0[xX]/;return function(n,i){var o=String(n).trim(),r=Number(i)||(t.test(o)?16:10);return e(o,r)}}(parseInt))}),function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t,n){t=t||ae;var i,o=t.createElement("script");if(o.text=e,n)for(i in _e)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function i(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?fe[pe.call(e)]||"object":typeof e}function o(e){var t=!!e&&"length"in e&&e.length,n=i(e);return!ye(e)&&!be(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function a(e,t,n){return ye(t)?we.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?we.grep(e,function(e){return e===t!==n}):"string"!=typeof t?we.grep(e,function(e){return de.call(t,e)>-1!==n}):we.filter(t,e,n)}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function l(e){var t={};return we.each(e.match(Ne)||[],function(e,n){t[n]=!0}),t}function u(e){return e}function c(e){throw e}function d(e,t,n,i){var o;try{e&&ye(o=e.promise)?o.call(e).done(t).fail(n):e&&ye(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function f(){ae.removeEventListener("DOMContentLoaded",f),e.removeEventListener("load",f),we.ready()}function p(e,t){return t.toUpperCase()}function h(e){return e.replace(Pe,"ms-").replace($e,p)}function m(){this.expando=we.expando+m.uid++}function g(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:He.test(e)?JSON.parse(e):e)}function v(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Ve,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=g(n)}catch(e){}Le.set(e,t,n)}else n=void 0;return n}function y(e,t,n,i){var o,r,a=20,s=i?function(){return i.cur()}:function(){return we.css(e,t,"")},l=s(),u=n&&n[3]||(we.cssNumber[t]?"":"px"),c=(we.cssNumber[t]||"px"!==u&&+l)&&Be.exec(we.css(e,t));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)we.style(e,t,c+u),(1-r)*(1-(r=s()/l||.5))<=0&&(a=0),c/=r;c*=2,we.style(e,t,c+u),n=n||[]}return n&&(c=+c||+l||0,o=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=o)),o}function b(e){var t,n=e.ownerDocument,i=e.nodeName,o=Je[i];return o||(t=n.body.appendChild(n.createElement(i)),o=we.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),Je[i]=o,o)}function _(e,t){for(var n,i,o=[],r=0,a=e.length;r<a;r++)i=e[r],i.style&&(n=i.style.display,t?("none"===n&&(o[r]=Re.get(i,"display")||null,o[r]||(i.style.display="")),""===i.style.display&&Ue(i)&&(o[r]=b(i))):"none"!==n&&(o[r]="none",Re.set(i,"display",n)));for(r=0;r<a;r++)null!=o[r]&&(e[r].style.display=o[r]);return e}function w(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&r(e,t)?we.merge([e],n):n}function x(e,t){for(var n=0,i=e.length;n<i;n++)Re.set(e[n],"globalEval",!t||Re.get(t[n],"globalEval"))}function A(e,t,n,o,r){for(var a,s,l,u,c,d,f=t.createDocumentFragment(),p=[],h=0,m=e.length;h<m;h++)if((a=e[h])||0===a)if("object"===i(a))we.merge(p,a.nodeType?[a]:a);else if(Ze.test(a)){for(s=s||f.appendChild(t.createElement("div")),l=(Qe.exec(a)||["",""])[1].toLowerCase(),u=Xe[l]||Xe._default,s.innerHTML=u[1]+we.htmlPrefilter(a)+u[2],d=u[0];d--;)s=s.lastChild;we.merge(p,s.childNodes),s=f.firstChild,s.textContent=""}else p.push(t.createTextNode(a));for(f.textContent="",h=0;a=p[h++];)if(o&&we.inArray(a,o)>-1)r&&r.push(a);else if(c=we.contains(a.ownerDocument,a),s=w(f.appendChild(a),"script"),c&&x(s),n)for(d=0;a=s[d++];)Ke.test(a.type||"")&&n.push(a);return f}function C(){return!0}function T(){return!1}function E(){try{return ae.activeElement}catch(e){}}function D(e,t,n,i,o,r){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)D(e,s,n,i,t[s],r);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=T;else if(!o)return e;return 1===r&&(a=o,o=function(e){return we().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=we.guid++)),e.each(function(){we.event.add(this,t,o,i,n)})}function S(e,t){return r(e,"table")&&r(11!==t.nodeType?t:t.firstChild,"tr")?we(e).children("tbody")[0]||e:e}function k(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function I(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function M(e,t){var n,i,o,r,a,s,l,u;if(1===t.nodeType){if(Re.hasData(e)&&(r=Re.access(e),a=Re.set(t,r),u=r.events)){delete a.handle,a.events={};for(o in u)for(n=0,i=u[o].length;n<i;n++)we.event.add(t,o,u[o][n])}Le.hasData(e)&&(s=Le.access(e),l=we.extend({},s),Le.set(t,l))}}function N(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ge.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function j(e,t,i,o){t=ue.apply([],t);var r,a,s,l,u,c,d=0,f=e.length,p=f-1,h=t[0],m=ye(h);if(m||f>1&&"string"==typeof h&&!ve.checkClone&&at.test(h))return e.each(function(n){var r=e.eq(n);m&&(t[0]=h.call(this,n,r.html())),j(r,t,i,o)});if(f&&(r=A(t,e[0].ownerDocument,!1,e,o),a=r.firstChild,1===r.childNodes.length&&(r=a),a||o)){for(s=we.map(w(r,"script"),k),l=s.length;d<f;d++)u=r,d!==p&&(u=we.clone(u,!0,!0),l&&we.merge(s,w(u,"script"))),i.call(e[d],u,d);if(l)for(c=s[s.length-1].ownerDocument,we.map(s,I),d=0;d<l;d++)u=s[d],Ke.test(u.type||"")&&!Re.access(u,"globalEval")&&we.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?we._evalUrl&&we._evalUrl(u.src):n(u.textContent.replace(st,""),c,u))}return e}function F(e,t,n){for(var i,o=t?we.filter(t,e):e,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||we.cleanData(w(i)),i.parentNode&&(n&&we.contains(i.ownerDocument,i)&&x(w(i,"script")),i.parentNode.removeChild(i));return e}function O(e,t,n){var i,o,r,a,s=e.style;return n=n||ut(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||we.contains(e.ownerDocument,e)||(a=we.style(e,t)),!ve.pixelBoxStyles()&&lt.test(a)&&ct.test(t)&&(i=s.width,o=s.minWidth,r=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=o,s.maxWidth=r)),void 0!==a?a+"":a}function P(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function $(e){if(e in gt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=mt.length;n--;)if((e=mt[n]+t)in gt)return e}function q(e){var t=we.cssProps[e];return t||(t=we.cssProps[e]=$(e)||e),t}function R(e,t,n){var i=Be.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function L(e,t,n,i,o,r){var a="width"===t?1:0,s=0,l=0;if(n===(i?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=we.css(e,n+ze[a],!0,o)),i?("content"===n&&(l-=we.css(e,"padding"+ze[a],!0,o)),"margin"!==n&&(l-=we.css(e,"border"+ze[a]+"Width",!0,o))):(l+=we.css(e,"padding"+ze[a],!0,o),"padding"!==n?l+=we.css(e,"border"+ze[a]+"Width",!0,o):s+=we.css(e,"border"+ze[a]+"Width",!0,o));return!i&&r>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-l-s-.5))),l}function H(e,t,n){var i=ut(e),o=O(e,t,i),r="border-box"===we.css(e,"boxSizing",!1,i),a=r;if(lt.test(o)){if(!n)return o;o="auto"}return a=a&&(ve.boxSizingReliable()||o===e.style[t]),("auto"===o||!parseFloat(o)&&"inline"===we.css(e,"display",!1,i))&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(o=parseFloat(o)||0)+L(e,t,n||(r?"border":"content"),a,i,o)+"px"}function V(e,t,n,i,o){return new V.prototype.init(e,t,n,i,o)}function W(){yt&&(!1===ae.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(W):e.setTimeout(W,we.fx.interval),we.fx.tick())}function B(){return e.setTimeout(function(){vt=void 0}),vt=Date.now()}function z(e,t){var n,i=0,o={height:e};for(t=t?1:0;i<4;i+=2-t)n=ze[i],o["margin"+n]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function U(e,t,n){for(var i,o=(G.tweeners[t]||[]).concat(G.tweeners["*"]),r=0,a=o.length;r<a;r++)if(i=o[r].call(n,t,e))return i}function Y(e,t,n){var i,o,r,a,s,l,u,c,d="width"in t||"height"in t,f=this,p={},h=e.style,m=e.nodeType&&Ue(e),g=Re.get(e,"fxshow");n.queue||(a=we._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,f.always(function(){f.always(function(){a.unqueued--,we.queue(e,"fx").length||a.empty.fire()})}));for(i in t)if(o=t[i],bt.test(o)){if(delete t[i],r=r||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||!g||void 0===g[i])continue;m=!0}p[i]=g&&g[i]||we.style(e,i)}if((l=!we.isEmptyObject(t))||!we.isEmptyObject(p)){d&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],u=g&&g.display,null==u&&(u=Re.get(e,"display")),c=we.css(e,"display"),"none"===c&&(u?c=u:(_([e],!0),u=e.style.display||u,c=we.css(e,"display"),_([e]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===we.css(e,"float")&&(l||(f.done(function(){h.display=u}),null==u&&(c=h.display,u="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",f.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),l=!1;for(i in p)l||(g?"hidden"in g&&(m=g.hidden):g=Re.access(e,"fxshow",{display:u}),r&&(g.hidden=!m),m&&_([e],!0),f.done(function(){m||_([e]),Re.remove(e,"fxshow");for(i in p)we.style(e,i,p[i])})),l=U(m?g[i]:0,i,f),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}}function J(e,t){var n,i,o,r,a;for(n in e)if(i=h(n),o=t[i],r=e[n],Array.isArray(r)&&(o=r[1],r=e[n]=r[0]),n!==i&&(e[i]=r,delete e[n]),(a=we.cssHooks[i])&&"expand"in a){r=a.expand(r),delete e[i];for(n in r)n in e||(e[n]=r[n],t[n]=o)}else t[i]=o}function G(e,t,n){var i,o,r=0,a=G.prefilters.length,s=we.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=vt||B(),n=Math.max(0,u.startTime+u.duration-t),i=n/u.duration||0,r=1-i,a=0,l=u.tweens.length;a<l;a++)u.tweens[a].run(r);return s.notifyWith(e,[u,r,n]),r<1&&l?n:(l||s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:we.extend({},t),opts:we.extend(!0,{specialEasing:{},easing:we.easing._default},n),originalProperties:t,originalOptions:n,startTime:vt||B(),duration:n.duration,tweens:[],createTween:function(t,n){var i=we.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(i),i},stop:function(t){var n=0,i=t?u.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),c=u.props;for(J(c,u.opts.specialEasing);r<a;r++)if(i=G.prefilters[r].call(u,e,c,u.opts))return ye(i.stop)&&(we._queueHooks(u.elem,u.opts.queue).stop=i.stop.bind(i)),i;return we.map(c,U,u),ye(u.opts.start)&&u.opts.start.call(e,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),we.fx.timer(we.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u}function Q(e){return(e.match(Ne)||[]).join(" ")}function K(e){return e.getAttribute&&e.getAttribute("class")||""}function X(e){return Array.isArray(e)?e:"string"==typeof e?e.match(Ne)||[]:[]}function Z(e,t,n,o){var r;if(Array.isArray(t))we.each(t,function(t,i){n||Mt.test(e)?o(e,i):Z(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,o)});else if(n||"object"!==i(t))o(e,t);else for(r in t)Z(e+"["+r+"]",t[r],n,o)}function ee(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,o=0,r=t.toLowerCase().match(Ne)||[];if(ye(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function te(e,t,n,i){function o(s){var l;return r[s]=!0,we.each(e[s]||[],function(e,s){var u=s(t,n,i);return"string"!=typeof u||a||r[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),o(u),!1)}),l}var r={},a=e===Wt;return o(t.dataTypes[0])||!r["*"]&&o("*")}function ne(e,t){var n,i,o=we.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:i||(i={}))[n]=t[n]);return i&&we.extend(!0,e,i),e}function ie(e,t,n){for(var i,o,r,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(o in s)if(s[o]&&s[o].test(i)){l.unshift(o);break}if(l[0]in n)r=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){r=o;break}a||(a=o)}r=r||a}if(r)return r!==l[0]&&l.unshift(r),n[r]}function oe(e,t,n,i){var o,r,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(r=c.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=c.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=u[l+" "+r]||u["* "+r]))for(o in u)if(s=o.split(" "),s[1]===r&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[o]:!0!==u[o]&&(r=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}var re=[],ae=e.document,se=Object.getPrototypeOf,le=re.slice,ue=re.concat,ce=re.push,de=re.indexOf,fe={},pe=fe.toString,he=fe.hasOwnProperty,me=he.toString,ge=me.call(Object),ve={},ye=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},be=function(e){return null!=e&&e===e.window},_e={type:!0,src:!0,noModule:!0},we=function(e,t){return new we.fn.init(e,t)},xe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;we.fn=we.prototype={jquery:"3.3.1",constructor:we,length:0,toArray:function(){return le.call(this)},get:function(e){return null==e?le.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=we.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){
return we.each(this,e)},map:function(e){return this.pushStack(we.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(le.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ce,sort:re.sort,splice:re.splice},we.extend=we.fn.extend=function(){var e,t,n,i,o,r,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||ye(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],i=e[t],a!==i&&(u&&i&&(we.isPlainObject(i)||(o=Array.isArray(i)))?(o?(o=!1,r=n&&Array.isArray(n)?n:[]):r=n&&we.isPlainObject(n)?n:{},a[t]=we.extend(u,r,i)):void 0!==i&&(a[t]=i));return a},we.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==pe.call(e))&&(!(t=se(e))||"function"==typeof(n=he.call(t,"constructor")&&t.constructor)&&me.call(n)===ge)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){n(e)},each:function(e,t){var n,i=0;if(o(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(xe,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(o(Object(e))?we.merge(n,"string"==typeof e?[e]:e):ce.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:de.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,o=e.length;i<n;i++)e[o++]=t[i];return e.length=o,e},grep:function(e,t,n){for(var i=[],o=0,r=e.length,a=!n;o<r;o++)!t(e[o],o)!==a&&i.push(e[o]);return i},map:function(e,t,n){var i,r,a=0,s=[];if(o(e))for(i=e.length;a<i;a++)null!=(r=t(e[a],a,n))&&s.push(r);else for(a in e)null!=(r=t(e[a],a,n))&&s.push(r);return ue.apply([],s)},guid:1,support:ve}),"function"==typeof Symbol&&(we.fn[Symbol.iterator]=re[Symbol.iterator]),we.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){fe["[object "+t+"]"]=t.toLowerCase()});var Ae=function(e){function t(e,t,n,i){var o,r,a,s,l,c,f,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!i&&((t?t.ownerDocument||t:R)!==M&&I(t),t=t||M,j)){if(11!==h&&(l=me.exec(e)))if(o=l[1]){if(9===h){if(!(a=t.getElementById(o)))return n;if(a.id===o)return n.push(a),n}else if(p&&(a=p.getElementById(o))&&$(t,a)&&a.id===o)return n.push(a),n}else{if(l[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&_.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(o)),n}if(_.qsa&&!B[e+" "]&&(!F||!F.test(e))){if(1!==h)p=t,f=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(be,_e):t.setAttribute("id",s=q),c=C(e),r=c.length;r--;)c[r]="#"+s+" "+d(c[r]);f=c.join(","),p=ge.test(e)&&u(t.parentNode)||t}if(f)try{return Q.apply(n,p.querySelectorAll(f)),n}catch(e){}finally{s===q&&t.removeAttribute("id")}}}return E(e.replace(re,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[q]=!0,e}function o(e){var t=M.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var n=e.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&xe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return i(function(t){return t=+t,i(function(n,i){for(var o,r=e([],n.length,t),a=r.length;a--;)n[o=r[a]]&&(n[o]=!(i[o]=n[o]))})})}function u(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function d(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function f(e,t,n){var i=t.dir,o=t.next,r=o||i,a=n&&"parentNode"===r,s=H++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||a)return e(t,n,o);return!1}:function(t,n,l){var u,c,d,f=[L,s];if(l){for(;t=t[i];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||a)if(d=t[q]||(t[q]={}),c=d[t.uniqueID]||(d[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[i]||t;else{if((u=c[r])&&u[0]===L&&u[1]===s)return f[2]=u[2];if(c[r]=f,f[2]=e(t,n,l))return!0}return!1}}function p(e){return e.length>1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function h(e,n,i){for(var o=0,r=n.length;o<r;o++)t(e,n[o],i);return i}function m(e,t,n,i,o){for(var r,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(r=e[s])&&(n&&!n(r,i,o)||(a.push(r),u&&t.push(s)));return a}function g(e,t,n,o,r,a){return o&&!o[q]&&(o=g(o)),r&&!r[q]&&(r=g(r,a)),i(function(i,a,s,l){var u,c,d,f=[],p=[],g=a.length,v=i||h(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?v:m(v,f,e,s,l),b=n?r||(i?e:g||o)?[]:a:y;if(n&&n(y,b,s,l),o)for(u=m(b,p),o(u,[],s,l),c=u.length;c--;)(d=u[c])&&(b[p[c]]=!(y[p[c]]=d));if(i){if(r||e){if(r){for(u=[],c=b.length;c--;)(d=b[c])&&u.push(y[c]=d);r(null,b=[],u,l)}for(c=b.length;c--;)(d=b[c])&&(u=r?X(i,d):f[c])>-1&&(i[u]=!(a[u]=d))}}else b=m(b===a?b.splice(g,b.length):b),r?r(null,a,b,l):Q.apply(a,b)})}function v(e){for(var t,n,i,o=e.length,r=w.relative[e[0].type],a=r||w.relative[" "],s=r?1:0,l=f(function(e){return e===t},a,!0),u=f(function(e){return X(t,e)>-1},a,!0),c=[function(e,n,i){var o=!r&&(i||n!==D)||((t=n).nodeType?l(e,n,i):u(e,n,i));return t=null,o}];s<o;s++)if(n=w.relative[e[s].type])c=[f(p(c),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[q]){for(i=++s;i<o&&!w.relative[e[i].type];i++);return g(s>1&&p(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(re,"$1"),n,s<i&&v(e.slice(s,i)),i<o&&v(e=e.slice(i)),i<o&&d(e))}c.push(n)}return p(c)}function y(e,n){var o=n.length>0,r=e.length>0,a=function(i,a,s,l,u){var c,d,f,p=0,h="0",g=i&&[],v=[],y=D,b=i||r&&w.find.TAG("*",u),_=L+=null==y?1:Math.random()||.1,x=b.length;for(u&&(D=a===M||a||u);h!==x&&null!=(c=b[h]);h++){if(r&&c){for(d=0,a||c.ownerDocument===M||(I(c),s=!j);f=e[d++];)if(f(c,a||M,s)){l.push(c);break}u&&(L=_)}o&&((c=!f&&c)&&p--,i&&g.push(c))}if(p+=h,o&&h!==p){for(d=0;f=n[d++];)f(g,v,a,s);if(i){if(p>0)for(;h--;)g[h]||v[h]||(v[h]=J.call(l));v=m(v)}Q.apply(l,v),u&&!i&&v.length>0&&p+n.length>1&&t.uniqueSort(l)}return u&&(L=_,D=y),g};return o?i(a):a}var b,_,w,x,A,C,T,E,D,S,k,I,M,N,j,F,O,P,$,q="sizzle"+1*new Date,R=e.document,L=0,H=0,V=n(),W=n(),B=n(),z=function(e,t){return e===t&&(k=!0),0},U={}.hasOwnProperty,Y=[],J=Y.pop,G=Y.push,Q=Y.push,K=Y.slice,X=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",ie=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",oe=new RegExp(ee+"+","g"),re=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ue=new RegExp(ie),ce=new RegExp("^"+te+"$"),de={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},fe=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ge=/[+~]/,ve=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ye=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},be=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,_e=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){I()},xe=f(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(Y=K.call(R.childNodes),R.childNodes),Y[R.childNodes.length].nodeType}catch(e){Q={apply:Y.length?function(e,t){G.apply(e,K.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}_=t.support={},A=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},I=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:R;return i!==M&&9===i.nodeType&&i.documentElement?(M=i,N=M.documentElement,j=!A(M),R!==M&&(n=M.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),_.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),_.getElementsByTagName=o(function(e){return e.appendChild(M.createComment("")),!e.getElementsByTagName("*").length}),_.getElementsByClassName=he.test(M.getElementsByClassName),_.getById=o(function(e){return N.appendChild(e).id=q,!M.getElementsByName||!M.getElementsByName(q).length}),_.getById?(w.filter.ID=function(e){var t=e.replace(ve,ye);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&j){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(ve,ye);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&j){var n,i,o,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(o=t.getElementsByName(e),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),w.find.TAG=_.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):_.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},w.find.CLASS=_.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&j)return t.getElementsByClassName(e)},O=[],F=[],(_.qsa=he.test(M.querySelectorAll))&&(o(function(e){N.appendChild(e).innerHTML="<a id='"+q+"'></a><select id='"+q+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+q+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+q+"+*").length||F.push(".#.+[+~]")}),o(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=M.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&F.push(":enabled",":disabled"),N.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(_.matchesSelector=he.test(P=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&o(function(e){_.disconnectedMatch=P.call(e,"*"),P.call(e,"[s!='']:x"),O.push("!=",ie)}),F=F.length&&new RegExp(F.join("|")),O=O.length&&new RegExp(O.join("|")),t=he.test(N.compareDocumentPosition),$=t||he.test(N.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return k=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!_.sortDetached&&t.compareDocumentPosition(e)===n?e===M||e.ownerDocument===R&&$(R,e)?-1:t===M||t.ownerDocument===R&&$(R,t)?1:S?X(S,e)-X(S,t):0:4&n?-1:1)}:function(e,t){if(e===t)return k=!0,0;var n,i=0,o=e.parentNode,r=t.parentNode,s=[e],l=[t];if(!o||!r)return e===M?-1:t===M?1:o?-1:r?1:S?X(S,e)-X(S,t):0;if(o===r)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?a(s[i],l[i]):s[i]===R?-1:l[i]===R?1:0},M):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&I(e),n=n.replace(le,"='$1']"),_.matchesSelector&&j&&!B[n+" "]&&(!O||!O.test(n))&&(!F||!F.test(n)))try{var i=P.call(e,n);if(i||_.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&I(e),$(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&I(e);var n=w.attrHandle[t.toLowerCase()],i=n&&U.call(w.attrHandle,t.toLowerCase())?n(e,t,!j):void 0;return void 0!==i?i:_.attributes||!j?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(be,_e)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,o=0;if(k=!_.detectDuplicates,S=!_.sortStable&&e.slice(0),e.sort(z),k){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return S=null,e},x=t.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=x(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=x(t);return n},w=t.selectors={cacheLength:50,createPseudo:i,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ve,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(ve,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ue.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ve,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=V[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&V(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(o){var r=t.attr(o,e);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(oe," ")+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,o){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,f,p,h,m=r!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(g){if(r){for(;m;){for(f=t;f=f[m];)if(s?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(f=g,d=f[q]||(f[q]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),u=c[e]||[],p=u[0]===L&&u[1],b=p&&u[2],f=p&&g.childNodes[p];f=++p&&f&&f[m]||(b=p=0)||h.pop();)if(1===f.nodeType&&++b&&f===t){c[e]=[L,p,b];break}}else if(y&&(f=t,d=f[q]||(f[q]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),u=c[e]||[],p=u[0]===L&&u[1],b=p),!1===b)for(;(f=++p&&f&&f[m]||(b=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++b||(y&&(d=f[q]||(f[q]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),c[e]=[L,b]),f!==t)););return(b-=o)===i||b%i==0&&b/i>=0}}},PSEUDO:function(e,n){var o,r=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[q]?r(n):r.length>1?(o=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,o=r(e,n),a=o.length;a--;)i=X(e,o[a]),e[i]=!(t[i]=o[a])}):function(e){return r(e,0,o)}):r}},pseudos:{not:i(function(e){var t=[],n=[],o=T(e.replace(re,"$1"));return o[q]?i(function(e,t,n,i){for(var r,a=o(e,null,i,[]),s=e.length;s--;)(r=a[s])&&(e[s]=!(t[s]=r))}):function(e,i,r){return t[0]=e,o(t,null,r,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ve,ye),function(t){return(t.textContent||t.innerText||x(t)).indexOf(e)>-1}}),lang:i(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ve,ye).toLowerCase(),function(t){var n;do{if(n=j?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===N},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return fe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:l(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},w.pseudos.nth=w.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[b]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(b);for(b in{submit:!0,reset:!0})w.pseudos[b]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(b);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,C=t.tokenize=function(e,n){var i,o,r,a,s,l,u,c=W[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=w.preFilter;s;){i&&!(o=ae.exec(s))||(o&&(s=s.slice(o[0].length)||s),l.push(r=[])),i=!1,(o=se.exec(s))&&(i=o.shift(),r.push({value:i,type:o[0].replace(re," ")}),s=s.slice(i.length));for(a in w.filter)!(o=de[a].exec(s))||u[a]&&!(o=u[a](o))||(i=o.shift(),r.push({value:i,type:a,matches:o}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):W(e,l).slice(0)},T=t.compile=function(e,t){var n,i=[],o=[],r=B[e+" "];if(!r){for(t||(t=C(e)),n=t.length;n--;)r=v(t[n]),r[q]?i.push(r):o.push(r);r=B(e,y(o,i)),r.selector=e}return r},E=t.select=function(e,t,n,i){var o,r,a,s,l,c="function"==typeof e&&e,f=!i&&C(e=c.selector||e);if(n=n||[],1===f.length){if(r=f[0]=f[0].slice(0),r.length>2&&"ID"===(a=r[0]).type&&9===t.nodeType&&j&&w.relative[r[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(ve,ye),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=de.needsContext.test(e)?0:r.length;o--&&(a=r[o],!w.relative[s=a.type]);)if((l=w.find[s])&&(i=l(a.matches[0].replace(ve,ye),ge.test(r[0].type)&&u(t.parentNode)||t))){if(r.splice(o,1),!(e=i.length&&d(r)))return Q.apply(n,i),n;break}}return(c||T(e,f))(i,t,!j,n,!t||ge.test(e)&&u(t.parentNode)||t),n},_.sortStable=q.split("").sort(z).join("")===q,_.detectDuplicates=!!k,I(),_.sortDetached=o(function(e){return 1&e.compareDocumentPosition(M.createElement("fieldset"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),_.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||r(Z,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);we.find=Ae,we.expr=Ae.selectors,we.expr[":"]=we.expr.pseudos,we.uniqueSort=we.unique=Ae.uniqueSort,we.text=Ae.getText,we.isXMLDoc=Ae.isXML,we.contains=Ae.contains,we.escapeSelector=Ae.escape;var Ce=function(e,t,n){for(var i=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&we(e).is(n))break;i.push(e)}return i},Te=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Ee=we.expr.match.needsContext,De=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;we.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?we.find.matchesSelector(i,e)?[i]:[]:we.find.matches(e,we.grep(t,function(e){return 1===e.nodeType}))},we.fn.extend({find:function(e){var t,n,i=this.length,o=this;if("string"!=typeof e)return this.pushStack(we(e).filter(function(){for(t=0;t<i;t++)if(we.contains(o[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)we.find(e,o[t],n);return i>1?we.uniqueSort(n):n},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&Ee.test(e)?we(e):e||[],!1).length}});var Se,ke=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(we.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||Se,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ke.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof we?t[0]:t,we.merge(this,we.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:ae,!0)),De.test(i[1])&&we.isPlainObject(t))for(i in t)ye(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return o=ae.getElementById(i[2]),o&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):ye(e)?void 0!==n.ready?n.ready(e):e(we):we.makeArray(e,this)}).prototype=we.fn,Se=we(ae);var Ie=/^(?:parents|prev(?:Until|All))/,Me={children:!0,contents:!0,next:!0,prev:!0};we.fn.extend({has:function(e){var t=we(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(we.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,o=this.length,r=[],a="string"!=typeof e&&we(e);if(!Ee.test(e))for(;i<o;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&we.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?we.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?de.call(we(e),this[0]):de.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(we.uniqueSort(we.merge(this.get(),we(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),we.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Ce(e,"parentNode")},parentsUntil:function(e,t,n){return Ce(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return Ce(e,"nextSibling")},prevAll:function(e){return Ce(e,"previousSibling")},nextUntil:function(e,t,n){return Ce(e,"nextSibling",n)},prevUntil:function(e,t,n){return Ce(e,"previousSibling",n)},siblings:function(e){return Te((e.parentNode||{}).firstChild,e)},children:function(e){return Te(e.firstChild)},contents:function(e){return r(e,"iframe")?e.contentDocument:(r(e,"template")&&(e=e.content||e),we.merge([],e.childNodes))}},function(e,t){we.fn[e]=function(n,i){var o=we.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=we.filter(i,o)),this.length>1&&(Me[e]||we.uniqueSort(o),Ie.test(e)&&o.reverse()),this.pushStack(o)}});var Ne=/[^\x20\t\r\n\f]+/g;we.Callbacks=function(e){e="string"==typeof e?l(e):we.extend({},e);var t,n,o,r,a=[],s=[],u=-1,c=function(){for(r=r||e.once,o=t=!0;s.length;u=-1)for(n=s.shift();++u<a.length;)!1===a[u].apply(n[0],n[1])&&e.stopOnFalse&&(u=a.length,n=!1);e.memory||(n=!1),t=!1,r&&(a=n?[]:"")},d={add:function(){return a&&(n&&!t&&(u=a.length-1,s.push(n)),function t(n){we.each(n,function(n,o){ye(o)?e.unique&&d.has(o)||a.push(o):o&&o.length&&"string"!==i(o)&&t(o)})}(arguments),n&&!t&&c()),this},remove:function(){return we.each(arguments,function(e,t){for(var n;(n=we.inArray(t,a,n))>-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?we.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return r=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return r=s=[],n||t||(a=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||c()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!o}};return d},we.extend({Deferred:function(t){var n=[["notify","progress",we.Callbacks("memory"),we.Callbacks("memory"),2],["resolve","done",we.Callbacks("once memory"),we.Callbacks("once memory"),0,"resolved"],["reject","fail",we.Callbacks("once memory"),we.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return we.Deferred(function(t){we.each(n,function(n,i){var o=ye(e[i[4]])&&e[i[4]];r[i[1]](function(){var e=o&&o.apply(this,arguments);e&&ye(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(t,i,o){function r(t,n,i,o){return function(){var s=this,l=arguments,d=function(){var e,d;if(!(t<a)){if((e=i.apply(s,l))===n.promise())throw new TypeError("Thenable self-resolution");d=e&&("object"==typeof e||"function"==typeof e)&&e.then,ye(d)?o?d.call(e,r(a,n,u,o),r(a,n,c,o)):(a++,d.call(e,r(a,n,u,o),r(a,n,c,o),r(a,n,u,n.notifyWith))):(i!==u&&(s=void 0,l=[e]),(o||n.resolveWith)(s,l))}},f=o?d:function(){try{d()}catch(e){we.Deferred.exceptionHook&&we.Deferred.exceptionHook(e,f.stackTrace),t+1>=a&&(i!==c&&(s=void 0,l=[e]),n.rejectWith(s,l))}};t?f():(we.Deferred.getStackHook&&(f.stackTrace=we.Deferred.getStackHook()),e.setTimeout(f))}}var a=0;return we.Deferred(function(e){n[0][3].add(r(0,e,ye(o)?o:u,e.notifyWith)),n[1][3].add(r(0,e,ye(t)?t:u)),n[2][3].add(r(0,e,ye(i)?i:c))}).promise()},promise:function(e){return null!=e?we.extend(e,o):o}},r={};return we.each(n,function(e,t){var a=t[2],s=t[5];o[t[1]]=a.add,s&&a.add(function(){i=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),r[t[0]]=function(){return r[t[0]+"With"](this===r?void 0:this,arguments),this},r[t[0]+"With"]=a.fireWith}),o.promise(r),t&&t.call(r,r),r},when:function(e){var t=arguments.length,n=t,i=Array(n),o=le.call(arguments),r=we.Deferred(),a=function(e){return function(n){i[e]=this,o[e]=arguments.length>1?le.call(arguments):n,--t||r.resolveWith(i,o)}};if(t<=1&&(d(e,r.done(a(n)).resolve,r.reject,!t),"pending"===r.state()||ye(o[n]&&o[n].then)))return r.then();for(;n--;)d(o[n],a(n),r.reject);return r.promise()}});var je=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;we.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&je.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},we.readyException=function(t){e.setTimeout(function(){throw t})};var Fe=we.Deferred();we.fn.ready=function(e){return Fe.then(e).catch(function(e){we.readyException(e)}),this},we.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--we.readyWait:we.isReady)||(we.isReady=!0,!0!==e&&--we.readyWait>0||Fe.resolveWith(ae,[we]))}}),we.ready.then=Fe.then,"complete"===ae.readyState||"loading"!==ae.readyState&&!ae.documentElement.doScroll?e.setTimeout(we.ready):(ae.addEventListener("DOMContentLoaded",f),e.addEventListener("load",f));var Oe=function(e,t,n,o,r,a,s){var l=0,u=e.length,c=null==n;if("object"===i(n)){r=!0;for(l in n)Oe(e,t,l,n[l],!0,a,s)}else if(void 0!==o&&(r=!0,ye(o)||(s=!0),c&&(s?(t.call(e,o),t=null):(c=t,t=function(e,t,n){return c.call(we(e),n)})),t))for(;l<u;l++)t(e[l],n,s?o:o.call(e[l],l,t(e[l],n)));return r?e:c?t.call(e):u?t(e[0],n):a},Pe=/^-ms-/,$e=/-([a-z])/g,qe=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};m.uid=1,m.prototype={cache:function(e){var t=e[this.expando];return t||(t={},qe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,o=this.cache(e);if("string"==typeof t)o[h(t)]=n;else for(i in t)o[h(i)]=t[i];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][h(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){Array.isArray(t)?t=t.map(h):(t=h(t),t=t in i?[t]:t.match(Ne)||[]),n=t.length;for(;n--;)delete i[t[n]]}(void 0===t||we.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!we.isEmptyObject(t)}};var Re=new m,Le=new m,He=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ve=/[A-Z]/g;we.extend({hasData:function(e){return Le.hasData(e)||Re.hasData(e)},data:function(e,t,n){return Le.access(e,t,n)},removeData:function(e,t){Le.remove(e,t)},_data:function(e,t,n){return Re.access(e,t,n)},_removeData:function(e,t){Re.remove(e,t)}}),we.fn.extend({data:function(e,t){var n,i,o,r=this[0],a=r&&r.attributes;if(void 0===e){if(this.length&&(o=Le.get(r),1===r.nodeType&&!Re.get(r,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=h(i.slice(5)),v(r,i,o[i])));Re.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){Le.set(this,e)}):Oe(this,function(t){var n;if(r&&void 0===t){if(void 0!==(n=Le.get(r,e)))return n;if(void 0!==(n=v(r,e)))return n}else this.each(function(){Le.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Le.remove(this,e)})}}),we.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=Re.get(e,t),n&&(!i||Array.isArray(n)?i=Re.access(e,t,we.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx"
;var n=we.queue(e,t),i=n.length,o=n.shift(),r=we._queueHooks(e,t),a=function(){we.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete r.stop,o.call(e,a,r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Re.get(e,n)||Re.access(e,n,{empty:we.Callbacks("once memory").add(function(){Re.remove(e,[t+"queue",n])})})}}),we.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?we.queue(this[0],e):void 0===t?this:this.each(function(){var n=we.queue(this,e,t);we._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&we.dequeue(this,e)})},dequeue:function(e){return this.each(function(){we.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,o=we.Deferred(),r=this,a=this.length,s=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Re.get(r[a],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),o.promise(t)}});var We=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Be=new RegExp("^(?:([+-])=|)("+We+")([a-z%]*)$","i"),ze=["Top","Right","Bottom","Left"],Ue=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&we.contains(e.ownerDocument,e)&&"none"===we.css(e,"display")},Ye=function(e,t,n,i){var o,r,a={};for(r in t)a[r]=e.style[r],e.style[r]=t[r];o=n.apply(e,i||[]);for(r in t)e.style[r]=a[r];return o},Je={};we.fn.extend({show:function(){return _(this,!0)},hide:function(){return _(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ue(this)?we(this).show():we(this).hide()})}});var Ge=/^(?:checkbox|radio)$/i,Qe=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Ke=/^$|^module$|\/(?:java|ecma)script/i,Xe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ze=/<|&#?\w+;/;!function(){var e=ae.createDocumentFragment(),t=e.appendChild(ae.createElement("div")),n=ae.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ve.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ve.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var et=ae.documentElement,tt=/^key/,nt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,it=/^([^.]*)(?:\.(.+)|)/;we.event={global:{},add:function(e,t,n,i,o){var r,a,s,l,u,c,d,f,p,h,m,g=Re.get(e);if(g)for(n.handler&&(r=n,n=r.handler,o=r.selector),o&&we.find.matchesSelector(et,o),n.guid||(n.guid=we.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(t){return void 0!==we&&we.event.triggered!==t.type?we.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Ne)||[""],u=t.length;u--;)s=it.exec(t[u])||[],p=m=s[1],h=(s[2]||"").split(".").sort(),p&&(d=we.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=we.event.special[p]||{},c=we.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&we.expr.match.needsContext.test(o),namespace:h.join(".")},r),(f=l[p])||(f=l[p]=[],f.delegateCount=0,d.setup&&!1!==d.setup.call(e,i,h,a)||e.addEventListener&&e.addEventListener(p,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),o?f.splice(f.delegateCount++,0,c):f.push(c),we.event.global[p]=!0)},remove:function(e,t,n,i,o){var r,a,s,l,u,c,d,f,p,h,m,g=Re.hasData(e)&&Re.get(e);if(g&&(l=g.events)){for(t=(t||"").match(Ne)||[""],u=t.length;u--;)if(s=it.exec(t[u])||[],p=m=s[1],h=(s[2]||"").split(".").sort(),p){for(d=we.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,f=l[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=f.length;r--;)c=f[r],!o&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(f.splice(r,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,g.handle)||we.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)we.event.remove(e,p+t[u],n,i,!0);we.isEmptyObject(l)&&Re.remove(e,"handle events")}},dispatch:function(e){var t,n,i,o,r,a,s=we.event.fix(e),l=new Array(arguments.length),u=(Re.get(this,"events")||{})[s.type]||[],c=we.event.special[s.type]||{};for(l[0]=s,t=1;t<arguments.length;t++)l[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=we.event.handlers.call(this,s,u),t=0;(o=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(r.namespace)||(s.handleObj=r,s.data=r.data,void 0!==(i=((we.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,l))&&!1===(s.result=i)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,i,o,r,a,s=[],l=t.delegateCount,u=e.target;if(l&&u.nodeType&&!("click"===e.type&&e.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(r=[],a={},n=0;n<l;n++)i=t[n],o=i.selector+" ",void 0===a[o]&&(a[o]=i.needsContext?we(o,this).index(u)>-1:we.find(o,this,null,[u]).length),a[o]&&r.push(i);r.length&&s.push({elem:u,handlers:r})}return u=this,l<t.length&&s.push({elem:u,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(we.Event.prototype,e,{enumerable:!0,configurable:!0,get:ye(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[we.expando]?e:new we.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==E()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===E()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&r(this,"input"))return this.click(),!1},_default:function(e){return r(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},we.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},we.Event=function(e,t){if(!(this instanceof we.Event))return new we.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?C:T,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&we.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[we.expando]=!0},we.Event.prototype={constructor:we.Event,isDefaultPrevented:T,isPropagationStopped:T,isImmediatePropagationStopped:T,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=C,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=C,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=C,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},we.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&tt.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&nt.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},we.event.addProp),we.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){we.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,o=e.relatedTarget,r=e.handleObj;return o&&(o===i||we.contains(i,o))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}}),we.fn.extend({on:function(e,t,n,i){return D(this,e,t,n,i)},one:function(e,t,n,i){return D(this,e,t,n,i,1)},off:function(e,t,n){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,we(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=T),this.each(function(){we.event.remove(this,e,n,t)})}});var ot=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,rt=/<script|<style|<link/i,at=/checked\s*(?:[^=]|=\s*.checked.)/i,st=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;we.extend({htmlPrefilter:function(e){return e.replace(ot,"<$1></$2>")},clone:function(e,t,n){var i,o,r,a,s=e.cloneNode(!0),l=we.contains(e.ownerDocument,e);if(!(ve.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||we.isXMLDoc(e)))for(a=w(s),r=w(e),i=0,o=r.length;i<o;i++)N(r[i],a[i]);if(t)if(n)for(r=r||w(e),a=a||w(s),i=0,o=r.length;i<o;i++)M(r[i],a[i]);else M(e,s);return a=w(s,"script"),a.length>0&&x(a,!l&&w(e,"script")),s},cleanData:function(e){for(var t,n,i,o=we.event.special,r=0;void 0!==(n=e[r]);r++)if(qe(n)){if(t=n[Re.expando]){if(t.events)for(i in t.events)o[i]?we.event.remove(n,i):we.removeEvent(n,i,t.handle);n[Re.expando]=void 0}n[Le.expando]&&(n[Le.expando]=void 0)}}}),we.fn.extend({detach:function(e){return F(this,e,!0)},remove:function(e){return F(this,e)},text:function(e){return Oe(this,function(e){return void 0===e?we.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return j(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){S(this,e).appendChild(e)}})},prepend:function(){return j(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return j(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return j(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(we.cleanData(w(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return we.clone(this,e,t)})},html:function(e){return Oe(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!rt.test(e)&&!Xe[(Qe.exec(e)||["",""])[1].toLowerCase()]){e=we.htmlPrefilter(e);try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(we.cleanData(w(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return j(this,arguments,function(t){var n=this.parentNode;we.inArray(this,e)<0&&(we.cleanData(w(this)),n&&n.replaceChild(t,this))},e)}}),we.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){we.fn[e]=function(e){for(var n,i=[],o=we(e),r=o.length-1,a=0;a<=r;a++)n=a===r?this:this.clone(!0),we(o[a])[t](n),ce.apply(i,n.get());return this.pushStack(i)}});var lt=new RegExp("^("+We+")(?!px)[a-z%]+$","i"),ut=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},ct=new RegExp(ze.join("|"),"i");!function(){function t(){if(u){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",et.appendChild(l).appendChild(u);var t=e.getComputedStyle(u)||{};i="1%"!==t.top,s=12===n(t.marginLeft),u.style.right="60%",a=36===n(t.right),o=36===n(t.width),u.style.position="absolute",r=36===u.offsetWidth||"absolute",et.removeChild(l),u=null}}function n(e){return Math.round(parseFloat(e))}var i,o,r,a,s,l=ae.createElement("div"),u=ae.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",ve.clearCloneStyle="content-box"===u.style.backgroundClip,we.extend(ve,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),s},scrollboxSize:function(){return t(),r}}))}();var dt=/^(none|table(?!-c[ea]).+)/,ft=/^--/,pt={position:"absolute",visibility:"hidden",display:"block"},ht={letterSpacing:"0",fontWeight:"400"},mt=["Webkit","Moz","ms"],gt=ae.createElement("div").style;we.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=O(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,a,s=h(t),l=ft.test(t),u=e.style;if(l||(t=q(s)),a=we.cssHooks[t]||we.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(o=a.get(e,!1,i))?o:u[t];r=typeof n,"string"===r&&(o=Be.exec(n))&&o[1]&&(n=y(e,t,o),r="number"),null!=n&&n===n&&("number"===r&&(n+=o&&o[3]||(we.cssNumber[s]?"":"px")),ve.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,i))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,i){var o,r,a,s=h(t);return ft.test(t)||(t=q(s)),a=we.cssHooks[t]||we.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=O(e,t,i)),"normal"===o&&t in ht&&(o=ht[t]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),we.each(["height","width"],function(e,t){we.cssHooks[t]={get:function(e,n,i){if(n)return!dt.test(we.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?H(e,t,i):Ye(e,pt,function(){return H(e,t,i)})},set:function(e,n,i){var o,r=ut(e),a="border-box"===we.css(e,"boxSizing",!1,r),s=i&&L(e,t,i,a,r);return a&&ve.scrollboxSize()===r.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-L(e,t,"border",!1,r)-.5)),s&&(o=Be.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=we.css(e,t)),R(e,n,s)}}}),we.cssHooks.marginLeft=P(ve.reliableMarginLeft,function(e,t){if(t)return(parseFloat(O(e,"marginLeft"))||e.getBoundingClientRect().left-Ye(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),we.each({margin:"",padding:"",border:"Width"},function(e,t){we.cssHooks[e+t]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+ze[i]+t]=r[i]||r[i-2]||r[0];return o}},"margin"!==e&&(we.cssHooks[e+t].set=R)}),we.fn.extend({css:function(e,t){return Oe(this,function(e,t,n){var i,o,r={},a=0;if(Array.isArray(t)){for(i=ut(e),o=t.length;a<o;a++)r[t[a]]=we.css(e,t[a],!1,i);return r}return void 0!==n?we.style(e,t,n):we.css(e,t)},e,t,arguments.length>1)}}),we.Tween=V,V.prototype={constructor:V,init:function(e,t,n,i,o,r){this.elem=e,this.prop=n,this.easing=o||we.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(we.cssNumber[n]?"":"px")},cur:function(){var e=V.propHooks[this.prop];return e&&e.get?e.get(this):V.propHooks._default.get(this)},run:function(e){var t,n=V.propHooks[this.prop];return this.options.duration?this.pos=t=we.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):V.propHooks._default.set(this),this}},V.prototype.init.prototype=V.prototype,V.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=we.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){we.fx.step[e.prop]?we.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[we.cssProps[e.prop]]&&!we.cssHooks[e.prop]?e.elem[e.prop]=e.now:we.style(e.elem,e.prop,e.now+e.unit)}}},V.propHooks.scrollTop=V.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},we.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},we.fx=V.prototype.init,we.fx.step={};var vt,yt,bt=/^(?:toggle|show|hide)$/,_t=/queueHooks$/;we.Animation=we.extend(G,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return y(n.elem,e,Be.exec(t),n),n}]},tweener:function(e,t){ye(e)?(t=e,e=["*"]):e=e.match(Ne);for(var n,i=0,o=e.length;i<o;i++)n=e[i],G.tweeners[n]=G.tweeners[n]||[],G.tweeners[n].unshift(t)},prefilters:[Y],prefilter:function(e,t){t?G.prefilters.unshift(e):G.prefilters.push(e)}}),we.speed=function(e,t,n){var i=e&&"object"==typeof e?we.extend({},e):{complete:n||!n&&t||ye(e)&&e,duration:e,easing:n&&t||t&&!ye(t)&&t};return we.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in we.fx.speeds?i.duration=we.fx.speeds[i.duration]:i.duration=we.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){ye(i.old)&&i.old.call(this),i.queue&&we.dequeue(this,i.queue)},i},we.fn.extend({fadeTo:function(e,t,n,i){return this.filter(Ue).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=we.isEmptyObject(e),r=we.speed(t,n,i),a=function(){var t=G(this,we.extend({},e),r);(o||Re.get(this,"finish"))&&t.stop(!0)};return a.finish=a,o||!1===r.queue?this.each(a):this.queue(r.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",r=we.timers,a=Re.get(this);if(o)a[o]&&a[o].stop&&i(a[o]);else for(o in a)a[o]&&a[o].stop&&_t.test(o)&&i(a[o]);for(o=r.length;o--;)r[o].elem!==this||null!=e&&r[o].queue!==e||(r[o].anim.stop(n),t=!1,r.splice(o,1));!t&&n||we.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Re.get(this),i=n[e+"queue"],o=n[e+"queueHooks"],r=we.timers,a=i?i.length:0;for(n.finish=!0,we.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<a;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),we.each(["toggle","show","hide"],function(e,t){var n=we.fn[t];we.fn[t]=function(e,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(z(t,!0),e,i,o)}}),we.each({slideDown:z("show"),slideUp:z("hide"),slideToggle:z("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){we.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),we.timers=[],we.fx.tick=function(){var e,t=0,n=we.timers;for(vt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||we.fx.stop(),vt=void 0},we.fx.timer=function(e){we.timers.push(e),we.fx.start()},we.fx.interval=13,we.fx.start=function(){yt||(yt=!0,W())},we.fx.stop=function(){yt=null},we.fx.speeds={slow:600,fast:200,_default:400},we.fn.delay=function(t,n){return t=we.fx?we.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,i){var o=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(o)}})},function(){var e=ae.createElement("input"),t=ae.createElement("select"),n=t.appendChild(ae.createElement("option"));e.type="checkbox",ve.checkOn=""!==e.value,ve.optSelected=n.selected,e=ae.createElement("input"),e.value="t",e.type="radio",ve.radioValue="t"===e.value}();var wt,xt=we.expr.attrHandle;we.fn.extend({attr:function(e,t){return Oe(this,we.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){we.removeAttr(this,e)})}}),we.extend({attr:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?we.prop(e,t,n):(1===r&&we.isXMLDoc(e)||(o=we.attrHooks[t.toLowerCase()]||(we.expr.match.bool.test(t)?wt:void 0)),void 0!==n?null===n?void we.removeAttr(e,t):o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:(i=we.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!ve.radioValue&&"radio"===t&&r(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,o=t&&t.match(Ne);if(o&&1===e.nodeType)for(;n=o[i++];)e.removeAttribute(n)}}),wt={set:function(e,t,n){return!1===t?we.removeAttr(e,n):e.setAttribute(n,n),n}},we.each(we.expr.match.bool.source.match(/\w+/g),function(e,t){var n=xt[t]||we.find.attr;xt[t]=function(e,t,i){var o,r,a=t.toLowerCase();return i||(r=xt[a],xt[a]=o,o=null!=n(e,t,i)?a:null,xt[a]=r),o}});var At=/^(?:input|select|textarea|button)$/i,Ct=/^(?:a|area)$/i;we.fn.extend({prop:function(e,t){return Oe(this,we.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[we.propFix[e]||e]})}}),we.extend({prop:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&we.isXMLDoc(e)||(t=we.propFix[t]||t,o=we.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=we.find.attr(e,"tabindex");return t?parseInt(t,10):At.test(e.nodeName)||Ct.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ve.optSelected||(we.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),we.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){we.propFix[this.toLowerCase()]=this}),we.fn.extend({addClass:function(e){var t,n,i,o,r,a,s,l=0;if(ye(e))return this.each(function(t){we(this).addClass(e.call(this,t,K(this)))});if(t=X(e),t.length)for(;n=this[l++];)if(o=K(n),i=1===n.nodeType&&" "+Q(o)+" "){for(a=0;r=t[a++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");s=Q(i),o!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,o,r,a,s,l=0;if(ye(e))return this.each(function(t){we(this).removeClass(e.call(this,t,K(this)))});if(!arguments.length)return this.attr("class","");if(t=X(e),t.length)for(;n=this[l++];)if(o=K(n),i=1===n.nodeType&&" "+Q(o)+" "){for(a=0;r=t[a++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");s=Q(i),o!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,i="string"===n||Array.isArray(e);return"boolean"==typeof t&&i?t?this.addClass(e):this.removeClass(e):ye(e)?this.each(function(n){we(this).toggleClass(e.call(this,n,K(this),t),t)}):this.each(function(){var t,o,r,a;if(i)for(o=0,r=we(this),a=X(e);t=a[o++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||(t=K(this),t&&Re.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Re.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+Q(K(n))+" ").indexOf(t)>-1)return!0;return!1}});var Tt=/\r/g;we.fn.extend({val:function(e){var t,n,i,o=this[0];{if(arguments.length)return i=ye(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,we(this).val()):e,null==o?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=we.map(o,function(e){return null==e?"":e+""})),(t=we.valHooks[this.type]||we.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return(t=we.valHooks[o.type]||we.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(Tt,""):null==n?"":n)}}}),we.extend({valHooks:{option:{get:function(e){var t=we.find.attr(e,"value");return null!=t?t:Q(we.text(e))}},select:{get:function(e){var t,n,i,o=e.options,a=e.selectedIndex,s="select-one"===e.type,l=s?null:[],u=s?a+1:o.length;for(i=a<0?u:s?a:0;i<u;i++)if(n=o[i],(n.selected||i===a)&&!n.disabled&&(!n.parentNode.disabled||!r(n.parentNode,"optgroup"))){if(t=we(n).val(),s)return t;l.push(t)}return l},set:function(e,t){for(var n,i,o=e.options,r=we.makeArray(t),a=o.length;a--;)i=o[a],(i.selected=we.inArray(we.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),we.each(["radio","checkbox"],function(){we.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=we.inArray(we(e).val(),t)>-1}},ve.checkOn||(we.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),ve.focusin="onfocusin"in e;var Et=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){e.stopPropagation()};we.extend(we.event,{trigger:function(t,n,i,o){var r,a,s,l,u,c,d,f,p=[i||ae],h=he.call(t,"type")?t.type:t,m=he.call(t,"namespace")?t.namespace.split("."):[];if(a=f=s=i=i||ae,3!==i.nodeType&&8!==i.nodeType&&!Et.test(h+we.event.triggered)&&(h.indexOf(".")>-1&&(m=h.split("."),h=m.shift(),m.sort()),u=h.indexOf(":")<0&&"on"+h,t=t[we.expando]?t:new we.Event(h,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:we.makeArray(n,[t]),d=we.event.special[h]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!be(i)){for(l=d.delegateType||h,Et.test(l+h)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(i.ownerDocument||ae)&&p.push(s.defaultView||s.parentWindow||e)}for(r=0;(a=p[r++])&&!t.isPropagationStopped();)f=a,t.type=r>1?l:d.bindType||h,c=(Re.get(a,"events")||{})[t.type]&&Re.get(a,"handle"),c&&c.apply(a,n),(c=u&&a[u])&&c.apply&&qe(a)&&(t.result=c.apply(a,n),!1===t.result&&t.preventDefault());return t.type=h,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),n)||!qe(i)||u&&ye(i[h])&&!be(i)&&(s=i[u],s&&(i[u]=null),we.event.triggered=h,t.isPropagationStopped()&&f.addEventListener(h,Dt),i[h](),t.isPropagationStopped()&&f.removeEventListener(h,Dt),we.event.triggered=void 0,s&&(i[u]=s)),t.result}},simulate:function(e,t,n){var i=we.extend(new we.Event,n,{type:e,isSimulated:!0});we.event.trigger(i,null,t)}}),we.fn.extend({trigger:function(e,t){return this.each(function(){we.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return we.event.trigger(e,t,n,!0)}}),ve.focusin||we.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){we.event.simulate(t,e.target,we.event.fix(e))};we.event.special[t]={setup:function(){var i=this.ownerDocument||this,o=Re.access(i,t);o||i.addEventListener(e,n,!0),Re.access(i,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=Re.access(i,t)-1;o?Re.access(i,t,o):(i.removeEventListener(e,n,!0),Re.remove(i,t))}}});var St=e.location,kt=Date.now(),It=/\?/;we.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||we.error("Invalid XML: "+t),n};var Mt=/\[\]$/,Nt=/\r?\n/g,jt=/^(?:submit|button|image|reset|file)$/i,Ft=/^(?:input|select|textarea|keygen)/i;we.param=function(e,t){var n,i=[],o=function(e,t){var n=ye(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!we.isPlainObject(e))we.each(e,function(){o(this.name,this.value)});else for(n in e)Z(n,e[n],t,o);return i.join("&")},we.fn.extend({serialize:function(){return we.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=we.prop(this,"elements");return e?we.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!we(this).is(":disabled")&&Ft.test(this.nodeName)&&!jt.test(e)&&(this.checked||!Ge.test(e))}).map(function(e,t){var n=we(this).val();return null==n?null:Array.isArray(n)?we.map(n,function(e){return{name:t.name,value:e.replace(Nt,"\r\n")}}):{name:t.name,value:n.replace(Nt,"\r\n")}}).get()}});var Ot=/%20/g,Pt=/#.*$/,$t=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Vt={},Wt={},Bt="*/".concat("*"),zt=ae.createElement("a");zt.href=St.href,we.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:Rt.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":we.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ne(ne(e,we.ajaxSettings),t):ne(we.ajaxSettings,e)},ajaxPrefilter:ee(Vt),ajaxTransport:ee(Wt),ajax:function(t,n){function i(t,n,i,s){var u,f,p,_,w,x=n;c||(c=!0,l&&e.clearTimeout(l),o=void 0,a=s||"",A.readyState=t>0?4:0,u=t>=200&&t<300||304===t,i&&(_=ie(h,A,i)),_=oe(h,_,A,u),u?(h.ifModified&&(w=A.getResponseHeader("Last-Modified"),w&&(we.lastModified[r]=w),(w=A.getResponseHeader("etag"))&&(we.etag[r]=w)),204===t||"HEAD"===h.type?x="nocontent":304===t?x="notmodified":(x=_.state,f=_.data,p=_.error,u=!p)):(p=x,!t&&x||(x="error",t<0&&(t=0))),A.status=t,A.statusText=(n||x)+"",u?v.resolveWith(m,[f,x,A]):v.rejectWith(m,[A,x,p]),A.statusCode(b),b=void 0,d&&g.trigger(u?"ajaxSuccess":"ajaxError",[A,h,u?f:p]),y.fireWith(m,[A,x]),d&&(g.trigger("ajaxComplete",[A,h]),--we.active||we.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var o,r,a,s,l,u,c,d,f,p,h=we.ajaxSetup({},n),m=h.context||h,g=h.context&&(m.nodeType||m.jquery)?we(m):we.event,v=we.Deferred(),y=we.Callbacks("once memory"),b=h.statusCode||{},_={},w={},x="canceled",A={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=qt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)A.always(e[A.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||x;return o&&o.abort(t),i(0,t),this}};if(v.promise(A),h.url=((t||h.url||St.href)+"").replace(Ht,St.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(Ne)||[""],null==h.crossDomain){u=ae.createElement("a");try{u.href=h.url,u.href=u.href,h.crossDomain=zt.protocol+"//"+zt.host!=u.protocol+"//"+u.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=we.param(h.data,h.traditional)),te(Vt,h,n,A),c)return A;d=we.event&&h.global,d&&0==we.active++&&we.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Lt.test(h.type),r=h.url.replace(Pt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ot,"+")):(p=h.url.slice(r.length),h.data&&(h.processData||"string"==typeof h.data)&&(r+=(It.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(r=r.replace($t,"$1"),p=(It.test(r)?"&":"?")+"_="+kt+++p),h.url=r+p),h.ifModified&&(we.lastModified[r]&&A.setRequestHeader("If-Modified-Since",we.lastModified[r]),we.etag[r]&&A.setRequestHeader("If-None-Match",we.etag[r])),
(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&A.setRequestHeader("Content-Type",h.contentType),A.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Bt+"; q=0.01":""):h.accepts["*"]);for(f in h.headers)A.setRequestHeader(f,h.headers[f]);if(h.beforeSend&&(!1===h.beforeSend.call(m,A,h)||c))return A.abort();if(x="abort",y.add(h.complete),A.done(h.success),A.fail(h.error),o=te(Wt,h,n,A)){if(A.readyState=1,d&&g.trigger("ajaxSend",[A,h]),c)return A;h.async&&h.timeout>0&&(l=e.setTimeout(function(){A.abort("timeout")},h.timeout));try{c=!1,o.send(_,i)}catch(e){if(c)throw e;i(-1,e)}}else i(-1,"No Transport");return A},getJSON:function(e,t,n){return we.get(e,t,n,"json")},getScript:function(e,t){return we.get(e,void 0,t,"script")}}),we.each(["get","post"],function(e,t){we[t]=function(e,n,i,o){return ye(n)&&(o=o||i,i=n,n=void 0),we.ajax(we.extend({url:e,type:t,dataType:o,data:n,success:i},we.isPlainObject(e)&&e))}}),we._evalUrl=function(e){return we.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},we.fn.extend({wrapAll:function(e){var t;return this[0]&&(ye(e)&&(e=e.call(this[0])),t=we(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return ye(e)?this.each(function(t){we(this).wrapInner(e.call(this,t))}):this.each(function(){var t=we(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ye(e);return this.each(function(n){we(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){we(this).replaceWith(this.childNodes)}),this}}),we.expr.pseudos.hidden=function(e){return!we.expr.pseudos.visible(e)},we.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},we.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Yt=we.ajaxSettings.xhr();ve.cors=!!Yt&&"withCredentials"in Yt,ve.ajax=Yt=!!Yt,we.ajaxTransport(function(t){var n,i;if(ve.cors||Yt&&!t.crossDomain)return{send:function(o,r){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(a in o)s.setRequestHeader(a,o[a]);n=function(e){return function(){n&&(n=i=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?r(0,"error"):r(s.status,s.statusText):r(Ut[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),i=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&i()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),we.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),we.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return we.globalEval(e),e}}}),we.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),we.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=we("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),ae.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Jt=[],Gt=/(=)\?(?=&|$)|\?\?/;we.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Jt.pop()||we.expando+"_"+kt++;return this[e]=!0,e}}),we.ajaxPrefilter("json jsonp",function(t,n,i){var o,r,a,s=!1!==t.jsonp&&(Gt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=ye(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Gt,"$1"+o):!1!==t.jsonp&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return a||we.error(o+" was not called"),a[0]},t.dataTypes[0]="json",r=e[o],e[o]=function(){a=arguments},i.always(function(){void 0===r?we(e).removeProp(o):e[o]=r,t[o]&&(t.jsonpCallback=n.jsonpCallback,Jt.push(o)),a&&ye(r)&&r(a[0]),a=r=void 0}),"script"}),ve.createHTMLDocument=function(){var e=ae.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),we.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,r;return t||(ve.createHTMLDocument?(t=ae.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=ae.location.href,t.head.appendChild(i)):t=ae),o=De.exec(e),r=!n&&[],o?[t.createElement(o[1])]:(o=A([e],t,r),r&&r.length&&we(r).remove(),we.merge([],o.childNodes))},we.fn.load=function(e,t,n){var i,o,r,a=this,s=e.indexOf(" ");return s>-1&&(i=Q(e.slice(s)),e=e.slice(0,s)),ye(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&we.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){r=arguments,a.html(i?we("<div>").append(we.parseHTML(e)).find(i):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,r||[e.responseText,t,e])})}),this},we.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){we.fn[t]=function(e){return this.on(t,e)}}),we.expr.pseudos.animated=function(e){return we.grep(we.timers,function(t){return e===t.elem}).length},we.offset={setOffset:function(e,t,n){var i,o,r,a,s,l,u,c=we.css(e,"position"),d=we(e),f={};"static"===c&&(e.style.position="relative"),s=d.offset(),r=we.css(e,"top"),l=we.css(e,"left"),u=("absolute"===c||"fixed"===c)&&(r+l).indexOf("auto")>-1,u?(i=d.position(),a=i.top,o=i.left):(a=parseFloat(r)||0,o=parseFloat(l)||0),ye(t)&&(t=t.call(e,n,we.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):d.css(f)}},we.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){we.offset.setOffset(this,e,t)});var t,n,i=this[0];if(i)return i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,i=this[0],o={top:0,left:0};if("fixed"===we.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===we.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&(o=we(e).offset(),o.top+=we.css(e,"borderTopWidth",!0),o.left+=we.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-we.css(i,"marginTop",!0),left:t.left-o.left-we.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===we.css(e,"position");)e=e.offsetParent;return e||et})}}),we.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;we.fn[e]=function(i){return Oe(this,function(e,i,o){var r;if(be(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===o)return r?r[t]:e[i];r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):e[i]=o},e,i,arguments.length)}}),we.each(["top","left"],function(e,t){we.cssHooks[t]=P(ve.pixelPosition,function(e,n){if(n)return n=O(e,t),lt.test(n)?we(e).position()[t]+"px":n})}),we.each({Height:"height",Width:"width"},function(e,t){we.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){we.fn[i]=function(o,r){var a=arguments.length&&(n||"boolean"!=typeof o),s=n||(!0===o||!0===r?"margin":"border");return Oe(this,function(t,n,o){var r;return be(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===o?we.css(t,n,s):we.style(t,n,o,s)},t,a?o:void 0,a)}})}),we.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){we.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),we.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),we.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),we.proxy=function(e,t){var n,i,o;if("string"==typeof t&&(n=e[t],t=e,e=n),ye(e))return i=le.call(arguments,2),o=function(){return e.apply(t||this,i.concat(le.call(arguments)))},o.guid=e.guid=e.guid||we.guid++,o},we.holdReady=function(e){e?we.readyWait++:we.ready(!0)},we.isArray=Array.isArray,we.parseJSON=JSON.parse,we.nodeName=r,we.isFunction=ye,we.isWindow=be,we.camelCase=h,we.type=i,we.now=Date.now,we.isNumeric=function(e){var t=we.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return we});var Qt=e.jQuery,Kt=e.$;return we.noConflict=function(t){return e.$===we&&(e.$=Kt),t&&e.jQuery===we&&(e.jQuery=Qt),we},t||(e.jQuery=e.$=we),we}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.flatpickr={})}(this,function(e){"use strict";function t(e,t,n){void 0===n&&(n=!1);var i;return function(){var o=this,r=arguments;null!==i&&clearTimeout(i),i=window.setTimeout(function(){i=null,n||e.apply(o,r)},t),n&&!i&&e.apply(o,r)}}function n(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}function i(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function o(e,t,n){var i=window.document.createElement(e);return t=t||"",n=n||"",i.className=t,void 0!==n&&(i.textContent=n),i}function r(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function a(e,t){return t(e)?e:e.parentNode?a(e.parentNode,t):void 0}function s(e,t){var n=o("div","numInputWrapper"),i=o("input","numInput "+e),r=o("span","arrowUp"),a=o("span","arrowDown");if(i.type="text",i.pattern="\\d*",void 0!==t)for(var s in t)i.setAttribute(s,t[s]);return n.appendChild(i),n.appendChild(r),n.appendChild(a),n}function l(e,l){function u(){Ee.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=Ee.currentMonth),void 0===t&&(t=Ee.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:Ee.l10n.daysInMonth[e]}}}function h(e){return e.bind(Ee)}function m(e){Ee.config.noCalendar&&0===Ee.selectedDates.length&&(Ee.setDate(void 0!==Ee.config.minDate?new Date(Ee.config.minDate.getTime()):(new Date).setHours(Ee.config.defaultHour,Ee.config.defaultMinute,Ee.config.defaultSeconds,0),!1),C(),Ae()),Te(e),0!==Ee.selectedDates.length&&("input"!==e.type?(C(),Ae()):setTimeout(function(){C(),Ae()},T))}function v(e,t){return e%12+12*f(t===Ee.l10n.amPM[1])}function x(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}function C(){if(void 0!==Ee.hourElement&&void 0!==Ee.minuteElement){var e=(parseInt(Ee.hourElement.value.slice(-2),10)||0)%24,t=(parseInt(Ee.minuteElement.value,10)||0)%60,i=void 0!==Ee.secondElement?(parseInt(Ee.secondElement.value,10)||0)%60:0;void 0!==Ee.amPM&&(e=v(e,Ee.amPM.textContent));var o=void 0!==Ee.config.minTime||Ee.config.minDate&&Ee.minDateHasTime&&Ee.latestSelectedDateObj&&0===n(Ee.latestSelectedDateObj,Ee.config.minDate,!0);if(void 0!==Ee.config.maxTime||Ee.config.maxDate&&Ee.maxDateHasTime&&Ee.latestSelectedDateObj&&0===n(Ee.latestSelectedDateObj,Ee.config.maxDate,!0)){var r=void 0!==Ee.config.maxTime?Ee.config.maxTime:Ee.config.maxDate;e=Math.min(e,r.getHours()),e===r.getHours()&&(t=Math.min(t,r.getMinutes())),t===r.getMinutes()&&(i=Math.min(i,r.getSeconds()))}if(o){var a=void 0!==Ee.config.minTime?Ee.config.minTime:Ee.config.minDate;e=Math.max(e,a.getHours()),e===a.getHours()&&(t=Math.max(t,a.getMinutes())),t===a.getMinutes()&&(i=Math.max(i,a.getSeconds()))}S(e,t,i)}}function D(e){var t=e||Ee.latestSelectedDateObj;t&&S(t.getHours(),t.getMinutes(),t.getSeconds())}function S(e,t,n){void 0!==Ee.latestSelectedDateObj&&Ee.latestSelectedDateObj.setHours(e%24,t,n||0,0),Ee.hourElement&&Ee.minuteElement&&!Ee.isMobile&&(Ee.hourElement.value=d(Ee.config.time_24hr?e:(12+e)%12+12*f(e%12==0)),Ee.minuteElement.value=d(t),void 0!==Ee.amPM&&(Ee.amPM.textContent=Ee.l10n.amPM[f(e>=12)]),void 0!==Ee.secondElement&&(Ee.secondElement.value=d(n)))}function k(e){var t=parseInt(e.target.value)+(e.delta||0);4!==t.toString().length&&"Enter"!==e.key||(Ee.currentYearElement.blur(),/[^\d]/.test(t.toString())||K(t))}function I(e,t,n,i){return t instanceof Array?t.forEach(function(t){return I(e,t,n,i)}):e instanceof Array?e.forEach(function(e){return I(e,t,n,i)}):(e.addEventListener(t,n,i),void Ee._handlers.push({element:e,event:t,handler:n}))}function M(e){return function(t){1===t.which&&e(t)}}function N(){ye("onChange")}function j(){if(Ee.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(Ee.element.querySelectorAll("[data-"+e+"]"),function(t){return I(t,"click",Ee[e])})}),Ee.isMobile)return void ge();var e=t(te,50);if(Ee._debouncedChange=t(N,T),Ee.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&I(Ee.daysContainer,"mouseover",function(e){"range"===Ee.config.mode&&ee(e.target)}),I(window.document.body,"keydown",Z),Ee.config.static||I(Ee._input,"keydown",Z),Ee.config.inline||Ee.config.static||I(window,"resize",e),void 0!==window.ontouchstart&&I(window.document,"touchstart",Q),I(window.document,"mousedown",M(Q)),I(window.document,"focus",Q,{capture:!0}),!0===Ee.config.clickOpens&&(I(Ee._input,"focus",Ee.open),I(Ee._input,"mousedown",M(Ee.open))),void 0!==Ee.daysContainer&&(I(Ee.monthNav,"mousedown",M(Ce)),I(Ee.monthNav,["keyup","increment"],k),I(Ee.daysContainer,"mousedown",M(ue))),void 0!==Ee.timeContainer&&void 0!==Ee.minuteElement&&void 0!==Ee.hourElement){var n=function(e){return e.target.select()};I(Ee.timeContainer,["input","increment"],m),I(Ee.timeContainer,"mousedown",M(O)),I(Ee.timeContainer,["input","increment"],Ee._debouncedChange,{passive:!0}),I([Ee.hourElement,Ee.minuteElement],["focus","click"],n),void 0!==Ee.secondElement&&I(Ee.secondElement,"focus",function(){return Ee.secondElement&&Ee.secondElement.select()}),void 0!==Ee.amPM&&I(Ee.amPM,"mousedown",M(function(e){m(e),N()}))}}function F(e){var t=void 0!==e?Ee.parseDate(e):Ee.latestSelectedDateObj||(Ee.config.minDate&&Ee.config.minDate>Ee.now?Ee.config.minDate:Ee.config.maxDate&&Ee.config.maxDate<Ee.now?Ee.config.maxDate:Ee.now);try{void 0!==t&&(Ee.currentYear=t.getFullYear(),Ee.currentMonth=t.getMonth())}catch(e){e.message="Invalid date supplied: "+t,Ee.config.errorHandler(e)}Ee.redraw()}function O(e){~e.target.className.indexOf("arrow")&&P(e,e.target.classList.contains("arrowUp")?1:-1)}function P(e,t,n){var i=e&&e.target,o=n||i&&i.parentNode&&i.parentNode.firstChild,r=be("increment");r.delta=t,o&&o.dispatchEvent(r)}function $(){var e=window.document.createDocumentFragment();if(Ee.calendarContainer=o("div","flatpickr-calendar"),Ee.calendarContainer.tabIndex=-1,!Ee.config.noCalendar){if(e.appendChild(H()),Ee.innerContainer=o("div","flatpickr-innerContainer"),Ee.config.weekNumbers){var t=B(),n=t.weekWrapper,r=t.weekNumbers;Ee.innerContainer.appendChild(n),Ee.weekNumbers=r,Ee.weekWrapper=n}Ee.rContainer=o("div","flatpickr-rContainer"),Ee.rContainer.appendChild(W()),Ee.daysContainer||(Ee.daysContainer=o("div","flatpickr-days"),Ee.daysContainer.tabIndex=-1),L(),Ee.rContainer.appendChild(Ee.daysContainer),Ee.innerContainer.appendChild(Ee.rContainer),e.appendChild(Ee.innerContainer)}Ee.config.enableTime&&e.appendChild(V()),i(Ee.calendarContainer,"rangeMode","range"===Ee.config.mode),Ee.calendarContainer.appendChild(e);var a=void 0!==Ee.config.appendTo&&void 0!==Ee.config.appendTo.nodeType;if((Ee.config.inline||Ee.config.static)&&(Ee.calendarContainer.classList.add(Ee.config.inline?"inline":"static"),Ee.config.inline&&(!a&&Ee.element.parentNode?Ee.element.parentNode.insertBefore(Ee.calendarContainer,Ee._input.nextSibling):void 0!==Ee.config.appendTo&&Ee.config.appendTo.appendChild(Ee.calendarContainer)),Ee.config.static)){var s=o("div","flatpickr-wrapper");Ee.element.parentNode&&Ee.element.parentNode.insertBefore(s,Ee.element),s.appendChild(Ee.element),Ee.altInput&&s.appendChild(Ee.altInput),s.appendChild(Ee.calendarContainer)}Ee.config.static||Ee.config.inline||(void 0!==Ee.config.appendTo?Ee.config.appendTo:window.document.body).appendChild(Ee.calendarContainer)}function q(e,t,r,a){var s=X(t,!0),l=o("span","flatpickr-day "+e,t.getDate().toString());return l.dateObj=t,l.$i=a,l.setAttribute("aria-label",Ee.formatDate(t,Ee.config.ariaDateFormat)),0===n(t,Ee.now)&&(Ee.todayDateElem=l,l.classList.add("today")),s?(l.tabIndex=-1,_e(t)&&(l.classList.add("selected"),Ee.selectedDateElem=l,"range"===Ee.config.mode&&(i(l,"startRange",Ee.selectedDates[0]&&0===n(t,Ee.selectedDates[0])),i(l,"endRange",Ee.selectedDates[1]&&0===n(t,Ee.selectedDates[1]))))):(l.classList.add("disabled"),Ee.selectedDates[0]&&Ee.minRangeDate&&t>Ee.minRangeDate&&t<Ee.selectedDates[0]?Ee.minRangeDate=t:Ee.selectedDates[0]&&Ee.maxRangeDate&&t<Ee.maxRangeDate&&t>Ee.selectedDates[0]&&(Ee.maxRangeDate=t)),"range"===Ee.config.mode&&(we(t)&&!_e(t)&&l.classList.add("inRange"),1===Ee.selectedDates.length&&void 0!==Ee.minRangeDate&&void 0!==Ee.maxRangeDate&&(t<Ee.minRangeDate||t>Ee.maxRangeDate)&&l.classList.add("notAllowed")),Ee.weekNumbers&&"prevMonthDay"!==e&&r%7==1&&Ee.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+Ee.config.getWeek(t)+"</span>"),ye("onDayCreate",l),l}function R(e,t){var n=e+t||0,i=void 0!==e?Ee.days.childNodes[n]:Ee.selectedDateElem||Ee.todayDateElem||Ee.days.childNodes[0];void 0===i&&0!==t&&(t>0?(Ee.changeMonth(1,!0,!0),n%=42):t<0&&(Ee.changeMonth(-1,!0,!0),n+=42)),function(){i=i||Ee.days.childNodes[n],i.focus(),"range"===Ee.config.mode&&ee(i)}()}function L(){if(void 0!==Ee.daysContainer){var e=(new Date(Ee.currentYear,Ee.currentMonth,1).getDay()-Ee.l10n.firstDayOfWeek+7)%7,t="range"===Ee.config.mode,n=Ee.utils.getDaysInMonth((Ee.currentMonth-1+12)%12),i=Ee.utils.getDaysInMonth(),a=window.document.createDocumentFragment(),s=n+1-e,l=0;for(Ee.weekNumbers&&Ee.weekNumbers.firstChild&&(Ee.weekNumbers.textContent=""),t&&(Ee.minRangeDate=new Date(Ee.currentYear,Ee.currentMonth-1,s),Ee.maxRangeDate=new Date(Ee.currentYear,Ee.currentMonth+1,(42-e)%i));s<=n;s++,l++)a.appendChild(q("prevMonthDay",new Date(Ee.currentYear,Ee.currentMonth-1,s),s,l));for(s=1;s<=i;s++,l++)a.appendChild(q("",new Date(Ee.currentYear,Ee.currentMonth,s),s,l));for(var u=i+1;u<=42-e;u++,l++)a.appendChild(q("nextMonthDay",new Date(Ee.currentYear,Ee.currentMonth+1,u%i),u,l));t&&1===Ee.selectedDates.length&&a.childNodes[0]?(Ee._hidePrevMonthArrow=Ee._hidePrevMonthArrow||!!Ee.minRangeDate&&Ee.minRangeDate>a.childNodes[0].dateObj,Ee._hideNextMonthArrow=Ee._hideNextMonthArrow||!!Ee.maxRangeDate&&Ee.maxRangeDate<new Date(Ee.currentYear,Ee.currentMonth+1,1)):xe();var c=o("div","dayContainer");c.appendChild(a),r(Ee.daysContainer),Ee.daysContainer.insertBefore(c,Ee.daysContainer.firstChild),Ee.days=Ee.daysContainer.firstChild}}function H(){var e=window.document.createDocumentFragment();Ee.monthNav=o("div","flatpickr-month"),Ee.prevMonthNav=o("span","flatpickr-prev-month"),Ee.prevMonthNav.innerHTML=Ee.config.prevArrow,Ee.currentMonthElement=o("span","cur-month");var t=s("cur-year",{tabindex:"-1"});return Ee.currentYearElement=t.childNodes[0],Ee.config.minDate&&Ee.currentYearElement.setAttribute("data-min",Ee.config.minDate.getFullYear().toString()),Ee.config.maxDate&&(Ee.currentYearElement.setAttribute("data-max",Ee.config.maxDate.getFullYear().toString()),Ee.currentYearElement.disabled=!!Ee.config.minDate&&Ee.config.minDate.getFullYear()===Ee.config.maxDate.getFullYear()),Ee.nextMonthNav=o("span","flatpickr-next-month"),Ee.nextMonthNav.innerHTML=Ee.config.nextArrow,Ee.navigationCurrentMonth=o("div","flatpickr-current-month"),Ee.navigationCurrentMonth.appendChild(Ee.currentMonthElement),Ee.navigationCurrentMonth.appendChild(t),e.appendChild(Ee.prevMonthNav),e.appendChild(Ee.navigationCurrentMonth),e.appendChild(Ee.nextMonthNav),Ee.monthNav.appendChild(e),Object.defineProperty(Ee,"_hidePrevMonthArrow",{get:function(){return Ee.__hidePrevMonthArrow},set:function(e){Ee.__hidePrevMonthArrow!==e&&(Ee.prevMonthNav.style.display=e?"none":"block"),Ee.__hidePrevMonthArrow=e}}),Object.defineProperty(Ee,"_hideNextMonthArrow",{get:function(){return Ee.__hideNextMonthArrow},set:function(e){Ee.__hideNextMonthArrow!==e&&(Ee.nextMonthNav.style.display=e?"none":"block"),Ee.__hideNextMonthArrow=e}}),xe(),Ee.monthNav}function V(){Ee.calendarContainer.classList.add("hasTime"),Ee.config.noCalendar&&Ee.calendarContainer.classList.add("noCalendar"),Ee.timeContainer=o("div","flatpickr-time"),Ee.timeContainer.tabIndex=-1;var e=o("span","flatpickr-time-separator",":"),t=s("flatpickr-hour");Ee.hourElement=t.childNodes[0];var n=s("flatpickr-minute");if(Ee.minuteElement=n.childNodes[0],Ee.hourElement.tabIndex=Ee.minuteElement.tabIndex=-1,Ee.hourElement.value=d(Ee.latestSelectedDateObj?Ee.latestSelectedDateObj.getHours():Ee.config.time_24hr?Ee.config.defaultHour:x(Ee.config.defaultHour)),Ee.minuteElement.value=d(Ee.latestSelectedDateObj?Ee.latestSelectedDateObj.getMinutes():Ee.config.defaultMinute),Ee.hourElement.setAttribute("data-step",Ee.config.hourIncrement.toString()),Ee.minuteElement.setAttribute("data-step",Ee.config.minuteIncrement.toString()),Ee.hourElement.setAttribute("data-min",Ee.config.time_24hr?"0":"1"),Ee.hourElement.setAttribute("data-max",Ee.config.time_24hr?"23":"12"),Ee.minuteElement.setAttribute("data-min","0"),Ee.minuteElement.setAttribute("data-max","59"),Ee.timeContainer.appendChild(t),Ee.timeContainer.appendChild(e),Ee.timeContainer.appendChild(n),Ee.config.time_24hr&&Ee.timeContainer.classList.add("time24hr"),Ee.config.enableSeconds){Ee.timeContainer.classList.add("hasSeconds");var i=s("flatpickr-second");Ee.secondElement=i.childNodes[0],Ee.secondElement.value=d(Ee.latestSelectedDateObj?Ee.latestSelectedDateObj.getSeconds():Ee.config.defaultSeconds),Ee.secondElement.setAttribute("data-step",Ee.minuteElement.getAttribute("data-step")),Ee.secondElement.setAttribute("data-min",Ee.minuteElement.getAttribute("data-min")),Ee.secondElement.setAttribute("data-max",Ee.minuteElement.getAttribute("data-max")),Ee.timeContainer.appendChild(o("span","flatpickr-time-separator",":")),Ee.timeContainer.appendChild(i)}return Ee.config.time_24hr||(Ee.amPM=o("span","flatpickr-am-pm",Ee.l10n.amPM[f((Ee.latestSelectedDateObj?Ee.hourElement.value:Ee.config.defaultHour)>11)]),Ee.amPM.title=Ee.l10n.toggleTitle,Ee.amPM.tabIndex=-1,Ee.timeContainer.appendChild(Ee.amPM)),Ee.timeContainer}function W(){Ee.weekdayContainer||(Ee.weekdayContainer=o("div","flatpickr-weekdays"));var e=Ee.l10n.firstDayOfWeek,t=Ee.l10n.weekdays.shorthand.slice();return e>0&&e<t.length&&(t=t.splice(e,t.length).concat(t.splice(0,e))),Ee.weekdayContainer.innerHTML="\n    <span class=flatpickr-weekday>\n      "+t.join("</span><span class=flatpickr-weekday>")+"\n    </span>\n    ",Ee.weekdayContainer}function B(){Ee.calendarContainer.classList.add("hasWeeks");var e=o("div","flatpickr-weekwrapper");e.appendChild(o("span","flatpickr-weekday",Ee.l10n.weekAbbreviation));var t=o("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}function z(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!1);var i=t?e:e-Ee.currentMonth;if(!(i<0&&Ee._hidePrevMonthArrow||i>0&&Ee._hideNextMonthArrow)&&(Ee.currentMonth+=i,(Ee.currentMonth<0||Ee.currentMonth>11)&&(Ee.currentYear+=Ee.currentMonth>11?1:-1,Ee.currentMonth=(Ee.currentMonth+12)%12,ye("onYearChange")),L(),ye("onMonthChange"),xe(),n&&document.activeElement&&document.activeElement.$i)){R(document.activeElement.$i,0)}}function U(e){void 0===e&&(e=!0),Ee.input.value="",Ee.altInput&&(Ee.altInput.value=""),Ee.mobileInput&&(Ee.mobileInput.value=""),Ee.selectedDates=[],Ee.latestSelectedDateObj=void 0,Ee.showTimeInput=!1,Ee.config.enableTime&&(void 0!==Ee.config.minDate?D(Ee.config.minDate):S(Ee.config.defaultHour,Ee.config.defaultMinute,Ee.config.defaultSeconds)),Ee.redraw(),e&&ye("onChange")}function Y(){Ee.isOpen=!1,Ee.isMobile||(Ee.calendarContainer.classList.remove("open"),Ee._input.classList.remove("active")),ye("onClose")}function J(){void 0!==Ee.config&&ye("onDestroy");for(var e=Ee._handlers.length;e--;){var t=Ee._handlers[e];t.element.removeEventListener(t.event,t.handler)}Ee._handlers=[],Ee.mobileInput?(Ee.mobileInput.parentNode&&Ee.mobileInput.parentNode.removeChild(Ee.mobileInput),Ee.mobileInput=void 0):Ee.calendarContainer&&Ee.calendarContainer.parentNode&&Ee.calendarContainer.parentNode.removeChild(Ee.calendarContainer),Ee.altInput&&(Ee.input.type="text",Ee.altInput.parentNode&&Ee.altInput.parentNode.removeChild(Ee.altInput),delete Ee.altInput),Ee.input&&(Ee.input.type=Ee.input._type,Ee.input.classList.remove("flatpickr-input"),Ee.input.removeAttribute("readonly"),Ee.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete Ee[e]}catch(e){}})}function G(e){return!(!Ee.config.appendTo||!Ee.config.appendTo.contains(e))||Ee.calendarContainer.contains(e)}function Q(e){if(Ee.isOpen&&!Ee.config.inline){var t=G(e.target),n=e.target===Ee.input||e.target===Ee.altInput||Ee.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(Ee.input)||~e.path.indexOf(Ee.altInput)),i="blur"===e.type?n&&e.relatedTarget&&!G(e.relatedTarget):!n&&!t,o=!Ee.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});i&&o&&(Ee.close(),"range"===Ee.config.mode&&1===Ee.selectedDates.length&&(Ee.clear(!1),Ee.redraw()))}}function K(e){if(!(!e||Ee.currentYearElement.getAttribute("data-min")&&e<parseInt(Ee.currentYearElement.getAttribute("data-min"))||Ee.currentYearElement.getAttribute("data-max")&&e>parseInt(Ee.currentYearElement.getAttribute("data-max")))){var t=e,n=Ee.currentYear!==t;Ee.currentYear=t||Ee.currentYear,Ee.config.maxDate&&Ee.currentYear===Ee.config.maxDate.getFullYear()?Ee.currentMonth=Math.min(Ee.config.maxDate.getMonth(),Ee.currentMonth):Ee.config.minDate&&Ee.currentYear===Ee.config.minDate.getFullYear()&&(Ee.currentMonth=Math.max(Ee.config.minDate.getMonth(),Ee.currentMonth)),n&&(Ee.redraw(),ye("onYearChange"))}}function X(e,t){void 0===t&&(t=!0);var i=Ee.parseDate(e,void 0,t);if(Ee.config.minDate&&i&&n(i,Ee.config.minDate,void 0!==t?t:!Ee.minDateHasTime)<0||Ee.config.maxDate&&i&&n(i,Ee.config.maxDate,void 0!==t?t:!Ee.maxDateHasTime)>0)return!1;if(!Ee.config.enable.length&&!Ee.config.disable.length)return!0;if(void 0===i)return!1;for(var o=Ee.config.enable.length>0,r=o?Ee.config.enable:Ee.config.disable,a=0,s=void 0;a<r.length;a++){if("function"==typeof(s=r[a])&&s(i))return o;if(s instanceof Date&&void 0!==i&&s.getTime()===i.getTime())return o;if("string"==typeof s&&void 0!==i){var l=Ee.parseDate(s,void 0,!0);return l&&l.getTime()===i.getTime()?o:!o}if("object"==typeof s&&void 0!==i&&s.from&&s.to&&i.getTime()>=s.from.getTime()&&i.getTime()<=s.to.getTime())return o}return!o}function Z(e){var t=e.target===Ee._input,n=G(e.target),i=Ee.config.allowInput,o=Ee.isOpen&&(!i||!t),r=Ee.config.inline&&t&&!i;if(13===e.keyCode&&t){if(i)return Ee.setDate(Ee._input.value,!0,e.target===Ee.altInput?Ee.config.altFormat:Ee.config.dateFormat),e.target.blur();Ee.open()}else if(n||o||r){var a=!!Ee.timeContainer&&Ee.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?Ae():ue(e);break;case 27:e.preventDefault(),Ee.close();break;case 8:case 46:t&&!Ee.config.allowInput&&Ee.clear();break;case 37:case 39:if(a)Ee.hourElement&&Ee.hourElement.focus();else if(e.preventDefault(),Ee.daysContainer){var s=39===e.keyCode?1:-1;e.ctrlKey?z(s,!0,!0):R(e.target.$i,s)}break;case 38:case 40:e.preventDefault();var l=40===e.keyCode?1:-1;Ee.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(K(Ee.currentYear-l),R(e.target.$i,0)):a||R(e.target.$i,7*l):Ee.config.enableTime&&(!a&&Ee.hourElement&&Ee.hourElement.focus(),m(e),Ee._debouncedChange());break;case 9:e.target===Ee.hourElement?(e.preventDefault(),Ee.minuteElement.select()):e.target===Ee.minuteElement&&(Ee.secondElement||Ee.amPM)?(e.preventDefault(),void 0!==Ee.secondElement?Ee.secondElement.focus():void 0!==Ee.amPM&&Ee.amPM.focus()):e.target===Ee.secondElement&&Ee.amPM&&(e.preventDefault(),Ee.amPM.focus())}switch(e.key){case Ee.l10n.amPM[0].charAt(0):void 0!==Ee.amPM&&e.target===Ee.amPM&&(Ee.amPM.textContent=Ee.l10n.amPM[0],C(),Ae());break;case Ee.l10n.amPM[1].charAt(0):void 0!==Ee.amPM&&e.target===Ee.amPM&&(Ee.amPM.textContent=Ee.l10n.amPM[1],C(),Ae())}ye("onKeyDown",e)}}function ee(e){if(1===Ee.selectedDates.length&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&void 0!==Ee.minRangeDate&&void 0!==Ee.maxRangeDate){for(var t=e.dateObj,n=Ee.parseDate(Ee.selectedDates[0],void 0,!0),i=Math.min(t.getTime(),Ee.selectedDates[0].getTime()),o=Math.max(t.getTime(),Ee.selectedDates[0].getTime()),r=!1,a=i;a<o;a+=A.DAY)if(!X(new Date(a))){r=!0;break}for(var s=0,l=Ee.days.childNodes[s].dateObj;s<42;s++,l=Ee.days.childNodes[s]&&Ee.days.childNodes[s].dateObj)!function(a,s){var l=s.getTime(),u=l<Ee.minRangeDate.getTime()||l>Ee.maxRangeDate.getTime(),c=Ee.days.childNodes[a];if(u)return c.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){c.classList.remove(e)}),"continue";if(r&&!u)return"continue";["startRange","inRange","endRange","notAllowed"].forEach(function(e){c.classList.remove(e)});var d=Math.max(Ee.minRangeDate.getTime(),i),f=Math.min(Ee.maxRangeDate.getTime(),o);e.classList.add(t<Ee.selectedDates[0]?"startRange":"endRange"),n<t&&l===n.getTime()?c.classList.add("startRange"):n>t&&l===n.getTime()&&c.classList.add("endRange"),l>=d&&l<=f&&c.classList.add("inRange")}(s,l)}}function te(){!Ee.isOpen||Ee.config.static||Ee.config.inline||ae()}function ne(e,t){if(void 0===t&&(t=Ee._input),Ee.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),setTimeout(function(){void 0!==Ee.mobileInput&&Ee.mobileInput.click()},0),void ye("onOpen");if(!Ee._input.disabled&&!Ee.config.inline){var n=Ee.isOpen;Ee.isOpen=!0,n||(Ee.calendarContainer.classList.add("open"),Ee._input.classList.add("active"),ye("onOpen"),ae(t))}}function ie(e){return function(t){var n=Ee.config["_"+e+"Date"]=Ee.parseDate(t,Ee.config.dateFormat),i=Ee.config["_"+("min"===e?"max":"min")+"Date"];void 0!==n&&(Ee["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),Ee.selectedDates&&(Ee.selectedDates=Ee.selectedDates.filter(function(e){return X(e)}),Ee.selectedDates.length||"min"!==e||D(n),Ae()),Ee.daysContainer&&(se(),void 0!==n?Ee.currentYearElement[e]=n.getFullYear().toString():Ee.currentYearElement.removeAttribute(e),Ee.currentYearElement.disabled=!!i&&void 0!==n&&i.getFullYear()===n.getFullYear())}}
function oe(){var t=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],n=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],i=c({},l,JSON.parse(JSON.stringify(e.dataset||{}))),o={};Ee.config.parseDate=i.parseDate,Ee.config.formatDate=i.formatDate,Object.defineProperty(Ee.config,"enable",{get:function(){return Ee.config._enable||[]},set:function(e){Ee.config._enable=pe(e)}}),Object.defineProperty(Ee.config,"disable",{get:function(){return Ee.config._disable||[]},set:function(e){Ee.config._disable=pe(e)}}),!i.dateFormat&&i.enableTime&&(o.dateFormat=i.noCalendar?"H:i"+(i.enableSeconds?":S":""):E.defaultConfig.dateFormat+" H:i"+(i.enableSeconds?":S":"")),i.altInput&&i.enableTime&&!i.altFormat&&(o.altFormat=i.noCalendar?"h:i"+(i.enableSeconds?":S K":" K"):E.defaultConfig.altFormat+" h:i"+(i.enableSeconds?":S":"")+" K"),Object.defineProperty(Ee.config,"minDate",{get:function(){return Ee.config._minDate},set:ie("min")}),Object.defineProperty(Ee.config,"maxDate",{get:function(){return Ee.config._maxDate},set:ie("max")});var r=function(e){return function(t){Ee.config["min"===e?"_minTime":"_maxTime"]=Ee.parseDate(t,"H:i")}};Object.defineProperty(Ee.config,"minTime",{get:function(){return Ee.config._minTime},set:r("min")}),Object.defineProperty(Ee.config,"maxTime",{get:function(){return Ee.config._maxTime},set:r("max")}),Object.assign(Ee.config,o,i);for(var a=0;a<t.length;a++)Ee.config[t[a]]=!0===Ee.config[t[a]]||"true"===Ee.config[t[a]];for(var a=n.length;a--;)void 0!==Ee.config[n[a]]&&(Ee.config[n[a]]=p(Ee.config[n[a]]||[]).map(h));"time"===Ee.config.mode&&(Ee.config.noCalendar=!0,Ee.config.enableTime=!0);for(var a=0;a<Ee.config.plugins.length;a++){var s=Ee.config.plugins[a](Ee)||{};for(var u in s)~n.indexOf(u)?Ee.config[u]=p(s[u]).map(h).concat(Ee.config[u]):void 0===i[u]&&(Ee.config[u]=s[u])}Ee.isMobile=!Ee.config.disableMobile&&!Ee.config.inline&&"single"===Ee.config.mode&&!Ee.config.disable.length&&!Ee.config.enable.length&&!Ee.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),ye("onParseConfig")}function re(){"object"!=typeof Ee.config.locale&&void 0===E.l10ns[Ee.config.locale]&&Ee.config.errorHandler(new Error("flatpickr: invalid locale "+Ee.config.locale)),Ee.l10n=c({},E.l10ns.default,"object"==typeof Ee.config.locale?Ee.config.locale:"default"!==Ee.config.locale?E.l10ns[Ee.config.locale]:void 0),g.K="("+Ee.l10n.amPM[0]+"|"+Ee.l10n.amPM[1]+"|"+Ee.l10n.amPM[0].toLowerCase()+"|"+Ee.l10n.amPM[1].toLowerCase()+")",Ee.formatDate=b(Ee)}function ae(e){if(void 0!==Ee.calendarContainer){ye("onPreCalendarPosition");var t=e||Ee._positionElement,n=Array.prototype.reduce.call(Ee.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),o=Ee.calendarContainer.offsetWidth,r=Ee.config.position,a=t.getBoundingClientRect(),s=window.innerHeight-a.bottom,l="above"===r||"below"!==r&&s<n&&a.top>n,u=window.pageYOffset+a.top+(l?-n-2:t.offsetHeight+2);if(i(Ee.calendarContainer,"arrowTop",!l),i(Ee.calendarContainer,"arrowBottom",l),!Ee.config.inline){var c=window.pageXOffset+a.left,d=window.document.body.offsetWidth-a.right,f=c+o>window.document.body.offsetWidth;i(Ee.calendarContainer,"rightMost",f),Ee.config.static||(Ee.calendarContainer.style.top=u+"px",f?(Ee.calendarContainer.style.left="auto",Ee.calendarContainer.style.right=d+"px"):(Ee.calendarContainer.style.left=c+"px",Ee.calendarContainer.style.right="auto"))}}}function se(){Ee.config.noCalendar||Ee.isMobile||(W(),xe(),L())}function le(){Ee._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(Ee.close,0):Ee.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")},i=a(e.target,t);if(void 0!==i){var o=i,r=Ee.latestSelectedDateObj=new Date(o.dateObj.getTime()),s=r.getMonth()!==Ee.currentMonth&&"range"!==Ee.config.mode;if(Ee.selectedDateElem=o,"single"===Ee.config.mode)Ee.selectedDates=[r];else if("multiple"===Ee.config.mode){var l=_e(r);l?Ee.selectedDates.splice(parseInt(l),1):Ee.selectedDates.push(r)}else"range"===Ee.config.mode&&(2===Ee.selectedDates.length&&Ee.clear(),Ee.selectedDates.push(r),0!==n(r,Ee.selectedDates[0],!0)&&Ee.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),s){var u=Ee.currentYear!==r.getFullYear();Ee.currentYear=r.getFullYear(),Ee.currentMonth=r.getMonth(),u&&ye("onYearChange"),ye("onMonthChange")}if(L(),Ee.config.minDate&&Ee.minDateHasTime&&Ee.config.enableTime&&0===n(r,Ee.config.minDate)&&D(Ee.config.minDate),Ae(),Ee.config.enableTime&&setTimeout(function(){return Ee.showTimeInput=!0},50),"range"===Ee.config.mode&&(1===Ee.selectedDates.length?(ee(o),Ee._hidePrevMonthArrow=Ee._hidePrevMonthArrow||void 0!==Ee.minRangeDate&&Ee.minRangeDate>Ee.days.childNodes[0].dateObj,Ee._hideNextMonthArrow=Ee._hideNextMonthArrow||void 0!==Ee.maxRangeDate&&Ee.maxRangeDate<new Date(Ee.currentYear,Ee.currentMonth+1,1)):xe()),s?Ee.selectedDateElem&&Ee.selectedDateElem.focus():R(o.$i,0),void 0!==Ee.hourElement&&setTimeout(function(){return void 0!==Ee.hourElement&&Ee.hourElement.select()},451),Ee.config.closeOnSelect){var c="single"===Ee.config.mode&&!Ee.config.enableTime,d="range"===Ee.config.mode&&2===Ee.selectedDates.length&&!Ee.config.enableTime;(c||d)&&le()}N()}}function ce(e,t){null!==e&&"object"==typeof e?Object.assign(Ee.config,e):(Ee.config[e]=t,void 0!==De[e]&&De[e].forEach(function(e){return e()})),Ee.redraw(),F()}function de(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return Ee.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[Ee.parseDate(e,t)];else if("string"==typeof e)switch(Ee.config.mode){case"single":n=[Ee.parseDate(e,t)];break;case"multiple":n=e.split(Ee.config.conjunction).map(function(e){return Ee.parseDate(e,t)});break;case"range":n=e.split(Ee.l10n.rangeSeparator).map(function(e){return Ee.parseDate(e,t)})}else Ee.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));Ee.selectedDates=n.filter(function(e){return e instanceof Date&&X(e,!1)}),"range"===Ee.config.mode&&Ee.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function fe(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=Ee.config.dateFormat),0!==e&&!e)return Ee.clear(t);de(e,n),Ee.showTimeInput=Ee.selectedDates.length>0,Ee.latestSelectedDateObj=Ee.selectedDates[0],Ee.redraw(),F(),D(),Ae(t),t&&ye("onChange")}function pe(e){return e.map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?Ee.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:Ee.parseDate(e.from,void 0),to:Ee.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function he(){Ee.selectedDates=[],Ee.now=new Date;var e=Ee.config.defaultDate||Ee.input.value;e&&de(e,Ee.config.dateFormat);var t=Ee.selectedDates.length?Ee.selectedDates[0]:Ee.config.minDate&&Ee.config.minDate.getTime()>Ee.now.getTime()?Ee.config.minDate:Ee.config.maxDate&&Ee.config.maxDate.getTime()<Ee.now.getTime()?Ee.config.maxDate:Ee.now;Ee.currentYear=t.getFullYear(),Ee.currentMonth=t.getMonth(),Ee.selectedDates.length&&(Ee.latestSelectedDateObj=Ee.selectedDates[0]),void 0!==Ee.config.minTime&&(Ee.config.minTime=Ee.parseDate(Ee.config.minTime,"H:i")),void 0!==Ee.config.maxTime&&(Ee.config.maxTime=Ee.parseDate(Ee.config.maxTime,"H:i")),Ee.minDateHasTime=!!Ee.config.minDate&&(Ee.config.minDate.getHours()>0||Ee.config.minDate.getMinutes()>0||Ee.config.minDate.getSeconds()>0),Ee.maxDateHasTime=!!Ee.config.maxDate&&(Ee.config.maxDate.getHours()>0||Ee.config.maxDate.getMinutes()>0||Ee.config.maxDate.getSeconds()>0),Object.defineProperty(Ee,"showTimeInput",{get:function(){return Ee._showTimeInput},set:function(e){Ee._showTimeInput=e,Ee.calendarContainer&&i(Ee.calendarContainer,"showTimeInput",e),Ee.isOpen&&ae()}})}function me(){if(Ee.input=Ee.config.wrap?e.querySelector("[data-input]"):e,!Ee.input)return void Ee.config.errorHandler(new Error("Invalid input element specified"));Ee.input._type=Ee.input.type,Ee.input.type="text",Ee.input.classList.add("flatpickr-input"),Ee._input=Ee.input,Ee.config.altInput&&(Ee.altInput=o(Ee.input.nodeName,Ee.input.className+" "+Ee.config.altInputClass),Ee._input=Ee.altInput,Ee.altInput.placeholder=Ee.input.placeholder,Ee.altInput.disabled=Ee.input.disabled,Ee.altInput.required=Ee.input.required,Ee.altInput.tabIndex=Ee.input.tabIndex,Ee.altInput.type="text",Ee.input.type="hidden",!Ee.config.static&&Ee.input.parentNode&&Ee.input.parentNode.insertBefore(Ee.altInput,Ee.input.nextSibling)),Ee.config.allowInput||Ee._input.setAttribute("readonly","readonly"),Ee._positionElement=Ee.config.positionElement||Ee._input}function ge(){var e=Ee.config.enableTime?Ee.config.noCalendar?"time":"datetime-local":"date";Ee.mobileInput=o("input",Ee.input.className+" flatpickr-mobile"),Ee.mobileInput.step=Ee.input.getAttribute("step")||"any",Ee.mobileInput.tabIndex=1,Ee.mobileInput.type=e,Ee.mobileInput.disabled=Ee.input.disabled,Ee.mobileInput.required=Ee.input.required,Ee.mobileInput.placeholder=Ee.input.placeholder,Ee.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",Ee.selectedDates.length&&(Ee.mobileInput.defaultValue=Ee.mobileInput.value=Ee.formatDate(Ee.selectedDates[0],Ee.mobileFormatStr)),Ee.config.minDate&&(Ee.mobileInput.min=Ee.formatDate(Ee.config.minDate,"Y-m-d")),Ee.config.maxDate&&(Ee.mobileInput.max=Ee.formatDate(Ee.config.maxDate,"Y-m-d")),Ee.input.type="hidden",void 0!==Ee.altInput&&(Ee.altInput.type="hidden");try{Ee.input.parentNode&&Ee.input.parentNode.insertBefore(Ee.mobileInput,Ee.input.nextSibling)}catch(e){}I(Ee.mobileInput,"change",function(e){Ee.setDate(e.target.value,!1,Ee.mobileFormatStr),ye("onChange"),ye("onClose")})}function ve(){if(Ee.isOpen)return Ee.close();Ee.open()}function ye(e,t){var n=Ee.config[e];if(void 0!==n&&n.length>0)for(var i=0;n[i]&&i<n.length;i++)n[i](Ee.selectedDates,Ee.input.value,Ee,t);"onChange"===e&&(Ee.input.dispatchEvent(be("change")),Ee.input.dispatchEvent(be("input")))}function be(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function _e(e){for(var t=0;t<Ee.selectedDates.length;t++)if(0===n(Ee.selectedDates[t],e))return""+t;return!1}function we(e){return!("range"!==Ee.config.mode||Ee.selectedDates.length<2)&&(n(e,Ee.selectedDates[0])>=0&&n(e,Ee.selectedDates[1])<=0)}function xe(){Ee.config.noCalendar||Ee.isMobile||!Ee.monthNav||(Ee.currentMonthElement.textContent=w(Ee.currentMonth,Ee.config.shorthandCurrentMonth,Ee.l10n)+" ",Ee.currentYearElement.value=Ee.currentYear.toString(),Ee._hidePrevMonthArrow=void 0!==Ee.config.minDate&&(Ee.currentYear===Ee.config.minDate.getFullYear()?Ee.currentMonth<=Ee.config.minDate.getMonth():Ee.currentYear<Ee.config.minDate.getFullYear()),Ee._hideNextMonthArrow=void 0!==Ee.config.maxDate&&(Ee.currentYear===Ee.config.maxDate.getFullYear()?Ee.currentMonth+1>Ee.config.maxDate.getMonth():Ee.currentYear>Ee.config.maxDate.getFullYear()))}function Ae(e){if(void 0===e&&(e=!0),!Ee.selectedDates.length)return Ee.clear(e);void 0!==Ee.mobileInput&&Ee.mobileFormatStr&&(Ee.mobileInput.value=void 0!==Ee.latestSelectedDateObj?Ee.formatDate(Ee.latestSelectedDateObj,Ee.mobileFormatStr):"");var t="range"!==Ee.config.mode?Ee.config.conjunction:Ee.l10n.rangeSeparator;Ee.input.value=Ee.selectedDates.map(function(e){return Ee.formatDate(e,Ee.config.dateFormat)}).join(t),void 0!==Ee.altInput&&(Ee.altInput.value=Ee.selectedDates.map(function(e){return Ee.formatDate(e,Ee.config.altFormat)}).join(t)),!1!==e&&ye("onValueUpdate")}function Ce(e){e.preventDefault();var t=Ee.prevMonthNav.contains(e.target),n=Ee.nextMonthNav.contains(e.target);t||n?z(t?-1:1):e.target===Ee.currentYearElement?Ee.currentYearElement.select():e.target.classList.contains("arrowUp")?Ee.changeYear(Ee.currentYear+1):e.target.classList.contains("arrowDown")&&Ee.changeYear(Ee.currentYear-1)}function Te(e){e.preventDefault();var t="keydown"===e.type,n=e.target;void 0!==Ee.amPM&&e.target===Ee.amPM&&(Ee.amPM.textContent=Ee.l10n.amPM[f(Ee.amPM.textContent===Ee.l10n.amPM[0])]);var i=parseFloat(n.getAttribute("data-min")),o=parseFloat(n.getAttribute("data-max")),r=parseFloat(n.getAttribute("data-step")),a=parseInt(n.value,10),s=e.delta||(t?38===e.which?1:-1:0),l=a+r*s;if(void 0!==n.value&&2===n.value.length){var u=n===Ee.hourElement,c=n===Ee.minuteElement;l<i?(l=o+l+f(!u)+(f(u)&&f(!Ee.amPM)),c&&P(void 0,-1,Ee.hourElement)):l>o&&(l=n===Ee.hourElement?l-o-f(!Ee.amPM):i,c&&P(void 0,1,Ee.hourElement)),Ee.amPM&&u&&(1===r?l+a===23:Math.abs(l-a)>r)&&(Ee.amPM.textContent=Ee.l10n.amPM[f(Ee.amPM.textContent===Ee.l10n.amPM[0])]),n.value=d(l)}}var Ee={config:c({},E.defaultConfig),l10n:y};Ee.parseDate=_({config:Ee.config,l10n:Ee.l10n}),Ee._handlers=[],Ee._bind=I,Ee._setHoursFromDate=D,Ee.changeMonth=z,Ee.changeYear=K,Ee.clear=U,Ee.close=Y,Ee._createElement=o,Ee.destroy=J,Ee.isEnabled=X,Ee.jumpToDate=F,Ee.open=ne,Ee.redraw=se,Ee.set=ce,Ee.setDate=fe,Ee.toggle=ve;var De={locale:[re]};return function(){Ee.element=Ee.input=e,Ee.isOpen=!1,oe(),re(),me(),he(),u(),Ee.isMobile||$(),j(),(Ee.selectedDates.length||Ee.config.noCalendar)&&(Ee.config.enableTime&&D(Ee.config.noCalendar?Ee.latestSelectedDateObj||Ee.config.minDate:void 0),Ae(!1)),Ee.showTimeInput=Ee.selectedDates.length>0||Ee.config.noCalendar,void 0!==Ee.weekWrapper&&void 0!==Ee.daysContainer&&(Ee.calendarContainer.style.visibility="hidden",Ee.calendarContainer.style.display="block",Ee.calendarContainer.style.width=Ee.daysContainer.offsetWidth+Ee.weekWrapper.offsetWidth+"px",Ee.calendarContainer.style.visibility="visible",Ee.calendarContainer.style.display=null);var t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!Ee.isMobile&&t&&ae(),ye("onReady")}(),Ee}function u(e,t){for(var n=Array.prototype.slice.call(e),i=[],o=0;o<n.length;o++){var r=n[o];try{if(null!==r.getAttribute("data-fp-omit"))continue;void 0!==r._flatpickr&&(r._flatpickr.destroy(),r._flatpickr=void 0),r._flatpickr=l(r,t||{}),i.push(r._flatpickr)}catch(e){console.error(e)}}return 1===i.length?i[0]:i}var c=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},d=function(e){return("0"+e).slice(-2)},f=function(e){return!0===e?1:0},p=function(e){return e instanceof Array?e:[e]},h=function(){},m={D:h,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*f(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t){var n=parseInt(t);return new Date(e.getFullYear(),0,2+7*(n-1),0,0,0,0)},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:h,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},w:h,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},g={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},v={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[v.w(e,t,n)]},F:function(e,t,n){return w(v.n(e,t,n)-1,!1,t)},G:function(e,t,n){return d(v.h(e,t,n))},H:function(e){return d(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[f(e.getHours()>11)]},M:function(e,t){return w(e.getMonth(),!0,t)},S:function(e){return d(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return d(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return d(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return d(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},y={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"]},b=function(e){var t=e.config,n=void 0===t?C:t,i=e.l10n,o=void 0===i?y:i;return function(e,t,i){if(void 0!==n.formatDate)return n.formatDate(e,t);var r=i||o;return t.split("").map(function(t,i,o){return v[t]&&"\\"!==o[i-1]?v[t](e,r,n):"\\"!==t?t:""}).join("")}},_=function(e){var t=e.config,n=void 0===t?C:t,i=e.l10n,o=void 0===i?y:i;return function(e,t,i){if(0===e||e){var r,a=e;if(e instanceof Date)r=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)r=new Date(e);else if("string"==typeof e){var s=t||(n||C).dateFormat,l=String(e).trim();if("today"===l)r=new Date,i=!0;else if(/Z$/.test(l)||/GMT$/.test(l))r=new Date(e);else if(n&&n.parseDate)r=n.parseDate(e,s);else{r=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var u=void 0,c=[],d=0,f=0,p="";d<s.length;d++){var h=s[d],v="\\"===h,y="\\"===s[d-1]||v;if(g[h]&&!y){p+=g[h];var b=new RegExp(p).exec(e);b&&(u=!0)&&c["Y"!==h?"push":"unshift"]({fn:m[h],val:b[++f]})}else v||(p+=".");c.forEach(function(e){var t=e.fn,n=e.val;return r=t(r,n,o)||r})}r=u?r:void 0}}return r instanceof Date?(!0===i&&r.setHours(0,0,0,0),r):void n.errorHandler(new Error("Invalid date provided: "+a))}}},w=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},x=function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},A={DAY:864e5},C={_disable:[],_enable:[],allowInput:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:console.warn,getWeek:x,hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};"function"!=typeof Object.assign&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var i=0,o=t;i<o.length;i++){var r=o[i];!function(t){t&&Object.keys(t).forEach(function(n){return e[n]=t[n]})}(r)}return e});var T=300;"undefined"!=typeof HTMLElement&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return u(this,e)},HTMLElement.prototype.flatpickr=function(e){return u([this],e)});var E;E=function(e,t){return e instanceof NodeList?u(e,t):"string"==typeof e?u(window.document.querySelectorAll(e),t):u([e],t)},"object"==typeof window&&(window.flatpickr=E),E.defaultConfig=C,E.l10ns={en:c({},y),default:c({},y)},E.localize=function(e){E.l10ns.default=c({},E.l10ns.default,e)},E.setDefaults=function(e){E.defaultConfig=c({},E.defaultConfig,e)},E.parseDate=_({}),E.formatDate=b({}),E.compareDates=n,"undefined"!=typeof jQuery&&(jQuery.fn.flatpickr=function(e){return u(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))};var D=E;e.default=D,Object.defineProperty(e,"__esModule",{value:!0})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){e.ui=e.ui||{};var t=(e.ui.version="1.12.1",0),n=Array.prototype.slice;e.cleanData=function(t){return function(n){var i,o,r;for(r=0;null!=(o=n[r]);r++)try{i=e._data(o,"events"),i&&i.remove&&e(o).triggerHandler("remove")}catch(e){}t(n)}}(e.cleanData),e.widget=function(t,n,i){var o,r,a,s={},l=t.split(".")[0];t=t.split(".")[1];var u=l+"-"+t;return i||(i=n,n=e.Widget),e.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr[":"][u.toLowerCase()]=function(t){return!!e.data(t,u)},e[l]=e[l]||{},o=e[l][t],r=e[l][t]=function(e,t){if(!this._createWidget)return new r(e,t);arguments.length&&this._createWidget(e,t)},e.extend(r,o,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),a=new n,a.options=e.widget.extend({},a.options),e.each(i,function(t,i){if(!e.isFunction(i))return void(s[t]=i);s[t]=function(){function e(){return n.prototype[t].apply(this,arguments)}function o(e){return n.prototype[t].apply(this,e)}return function(){var t,n=this._super,r=this._superApply;return this._super=e,this._superApply=o,t=i.apply(this,arguments),this._super=n,this._superApply=r,t}}()}),r.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||t:t},s,{constructor:r,namespace:l,widgetName:t,widgetFullName:u}),o?(e.each(o._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,r,n._proto)}),delete o._childConstructors):n._childConstructors.push(r),e.widget.bridge(t,r),r},e.widget.extend=function(t){for(var i,o,r=n.call(arguments,1),a=0,s=r.length;a<s;a++)for(i in r[a])o=r[a][i],r[a].hasOwnProperty(i)&&void 0!==o&&(e.isPlainObject(o)?t[i]=e.isPlainObject(t[i])?e.widget.extend({},t[i],o):e.widget.extend({},o):t[i]=o);return t},e.widget.bridge=function(t,i){var o=i.prototype.widgetFullName||t;e.fn[t]=function(r){var a="string"==typeof r,s=n.call(arguments,1),l=this;return a?this.length||"instance"!==r?this.each(function(){var n,i=e.data(this,o);return"instance"===r?(l=i,!1):i?e.isFunction(i[r])&&"_"!==r.charAt(0)?(n=i[r].apply(i,s),n!==i&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+r+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+r+"'")}):l=void 0:(s.length&&(r=e.widget.extend.apply(null,[r].concat(s))),this.each(function(){var t=e.data(this,o);t?(t.option(r||{}),t._init&&t._init()):e.data(this,o,new i(r,this))})),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(n,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,n){t._removeClass(n,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,o,r,a=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(a={},i=t.split("."),t=i.shift(),i.length){for(o=a[t]=e.widget.extend({},this.options[t]),r=0;r<i.length-1;r++)o[i[r]]=o[i[r]]||{},o=o[i[r]];if(t=i.pop(),1===arguments.length)return void 0===o[t]?null:o[t];o[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];a[t]=n}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var n,i,o;for(n in t)o=this.classesElementLookup[n],t[n]!==this.options.classes[n]&&o&&o.length&&(i=e(o.get()),this._removeClass(o,n),i.addClass(this._classes({element:i,keys:n,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){function n(n,r){var a,s;for(s=0;s<n.length;s++)a=o.classesElementLookup[n[s]]||e(),a=e(t.add?e.unique(a.get().concat(t.element.get())):a.not(t.element).get()),o.classesElementLookup[n[s]]=a,i.push(n[s]),r&&t.classes[n[s]]&&i.push(t.classes[n[s]])}var i=[],o=this;return t=e.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&n(t.keys.match(/\S+/g)||[],!0),t.extra&&n(t.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(t){var n=this;e.each(n.classesElementLookup,function(i,o){-1!==e.inArray(t.target,o)&&(n.classesElementLookup[i]=e(o.not(t.target).get()))})},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,i){i="boolean"==typeof i?i:n;var o="string"==typeof e||null===e,r={extra:o?t:n,keys:o?e:t,element:o?this.element:e,add:i};return r.element.toggleClass(this._classes(r),i),this},_on:function(t,n,i){var o,r=this;"boolean"!=typeof t&&(i=n,n=t,t=!1),i?(n=o=e(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,o=this.widget()),e.each(i,function(i,a){function s(){if(t||!0!==r.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof a?r[a]:a).apply(r,arguments)}"string"!=typeof a&&(s.guid=a.guid=a.guid||s.guid||e.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?o.on(u,c,s):n.on(u,s)})},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(n).off(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function n(){return("string"==typeof e?i[e]:e).apply(i,arguments)}var i=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,n,i){var o,r,a=this.options[t];if(i=i||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],r=n.originalEvent)for(o in r)o in n||(n[o]=r[o]);return this.element.trigger(n,i),!(e.isFunction(a)&&!1===a.apply(this.element[0],[n].concat(i))||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(i,o,r){"string"==typeof o&&(o={effect:o});var a,s=o?!0===o||"number"==typeof o?n:o.effect||n:t;o=o||{},"number"==typeof o&&(o={duration:o}),a=!e.isEmptyObject(o),o.complete=r,o.delay&&i.delay(o.delay),a&&e.effects&&e.effects.effect[s]?i[t](o):s!==t&&i[s]?i[s](o.duration,o.easing,r):i.queue(function(n){e(this)[t](),r&&r.call(i[0]),n()})}});e.widget;!function(){function t(e,t,n){return[parseFloat(e[0])*(d.test(e[0])?t/100:1),parseFloat(e[1])*(d.test(e[1])?n/100:1)]}function n(t,n){return parseInt(e.css(t,n),10)||0}function i(t){var n=t[0];return 9===n.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}var o,r=Math.max,a=Math.abs,s=/left|center|right/,l=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,d=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==o)return o;var t,n,i=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=i.children()[0];return e("body").append(i),t=r.offsetWidth,i.css("overflow","scroll"),n=r.offsetWidth,t===n&&(n=i[0].clientWidth),i.remove(),o=t-n},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),o="scroll"===n||"auto"===n&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?e.position.scrollbarWidth():0,height:o?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),i=e.isWindow(n[0]),o=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:i,isDocument:o,offset:i||o?{left:0,top:0}:e(t).offset(),scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:n.outerWidth(),height:n.outerHeight()}}},e.fn.position=function(o){if(!o||!o.of)return f.apply(this,arguments);o=e.extend({},o);var d,p,h,m,g,v,y=e(o.of),b=e.position.getWithinInfo(o.within),_=e.position.getScrollInfo(b),w=(o.collision||"flip").split(" "),x={};return v=i(y),y[0].preventDefault&&(o.at="left top"),p=v.width,h=v.height,m=v.offset,g=e.extend({},m),e.each(["my","at"],function(){var e,t,n=(o[this]||"").split(" ");1===n.length&&(n=s.test(n[0])?n.concat(["center"]):l.test(n[0])?["center"].concat(n):["center","center"]),
n[0]=s.test(n[0])?n[0]:"center",n[1]=l.test(n[1])?n[1]:"center",e=u.exec(n[0]),t=u.exec(n[1]),x[this]=[e?e[0]:0,t?t[0]:0],o[this]=[c.exec(n[0])[0],c.exec(n[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===o.at[0]?g.left+=p:"center"===o.at[0]&&(g.left+=p/2),"bottom"===o.at[1]?g.top+=h:"center"===o.at[1]&&(g.top+=h/2),d=t(x.at,p,h),g.left+=d[0],g.top+=d[1],this.each(function(){var i,s,l=e(this),u=l.outerWidth(),c=l.outerHeight(),f=n(this,"marginLeft"),v=n(this,"marginTop"),A=u+f+n(this,"marginRight")+_.width,C=c+v+n(this,"marginBottom")+_.height,T=e.extend({},g),E=t(x.my,l.outerWidth(),l.outerHeight());"right"===o.my[0]?T.left-=u:"center"===o.my[0]&&(T.left-=u/2),"bottom"===o.my[1]?T.top-=c:"center"===o.my[1]&&(T.top-=c/2),T.left+=E[0],T.top+=E[1],i={marginLeft:f,marginTop:v},e.each(["left","top"],function(t,n){e.ui.position[w[t]]&&e.ui.position[w[t]][n](T,{targetWidth:p,targetHeight:h,elemWidth:u,elemHeight:c,collisionPosition:i,collisionWidth:A,collisionHeight:C,offset:[d[0]+E[0],d[1]+E[1]],my:o.my,at:o.at,within:b,elem:l})}),o.using&&(s=function(e){var t=m.left-T.left,n=t+p-u,i=m.top-T.top,s=i+h-c,d={target:{element:y,left:m.left,top:m.top,width:p,height:h},element:{element:l,left:T.left,top:T.top,width:u,height:c},horizontal:n<0?"left":t>0?"right":"center",vertical:s<0?"top":i>0?"bottom":"middle"};p<u&&a(t+n)<p&&(d.horizontal="center"),h<c&&a(i+s)<h&&(d.vertical="middle"),r(a(t),a(n))>r(a(i),a(s))?d.important="horizontal":d.important="vertical",o.using.call(this,e,d)}),l.offset(e.extend(T,{using:s}))})},e.ui.position={fit:{left:function(e,t){var n,i=t.within,o=i.isWindow?i.scrollLeft:i.offset.left,a=i.width,s=e.left-t.collisionPosition.marginLeft,l=o-s,u=s+t.collisionWidth-a-o;t.collisionWidth>a?l>0&&u<=0?(n=e.left+l+t.collisionWidth-a-o,e.left+=l-n):e.left=u>0&&l<=0?o:l>u?o+a-t.collisionWidth:o:l>0?e.left+=l:u>0?e.left-=u:e.left=r(e.left-s,e.left)},top:function(e,t){var n,i=t.within,o=i.isWindow?i.scrollTop:i.offset.top,a=t.within.height,s=e.top-t.collisionPosition.marginTop,l=o-s,u=s+t.collisionHeight-a-o;t.collisionHeight>a?l>0&&u<=0?(n=e.top+l+t.collisionHeight-a-o,e.top+=l-n):e.top=u>0&&l<=0?o:l>u?o+a-t.collisionHeight:o:l>0?e.top+=l:u>0?e.top-=u:e.top=r(e.top-s,e.top)}},flip:{left:function(e,t){var n,i,o=t.within,r=o.offset.left+o.scrollLeft,s=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,u=e.left-t.collisionPosition.marginLeft,c=u-l,d=u+t.collisionWidth-s-l,f="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,h=-2*t.offset[0];c<0?((n=e.left+f+p+h+t.collisionWidth-s-r)<0||n<a(c))&&(e.left+=f+p+h):d>0&&((i=e.left-t.collisionPosition.marginLeft+f+p+h-l)>0||a(i)<d)&&(e.left+=f+p+h)},top:function(e,t){var n,i,o=t.within,r=o.offset.top+o.scrollTop,s=o.height,l=o.isWindow?o.scrollTop:o.offset.top,u=e.top-t.collisionPosition.marginTop,c=u-l,d=u+t.collisionHeight-s-l,f="top"===t.my[1],p=f?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,h="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];c<0?((i=e.top+p+h+m+t.collisionHeight-s-r)<0||i<a(c))&&(e.top+=p+h+m):d>0&&((n=e.top-t.collisionPosition.marginTop+p+h+m-l)>0||a(n)<d)&&(e.top+=p+h+m)}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}}}();e.ui.position,e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])}}),e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},e.fn.scrollParent=function(t){var n=this.css("position"),i="absolute"===n,o=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=e(this);return(!i||"static"!==t.css("position"))&&o.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&r.length?r:e(this[0].ownerDocument||document)},e.fn.extend({uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t,n,i=this.options.icons;i&&(t=e("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+i.header),t.prependTo(this.headers),n=this.active.children(".ui-accordion-header-icon"),this._removeClass(n,i.header)._addClass(n,null,i.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){if("active"===e)return void this._activate(t);"event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons())},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!e)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var n=e.ui.keyCode,i=this.headers.length,o=this.headers.index(t.target),r=!1;switch(t.keyCode){case n.RIGHT:case n.DOWN:r=this.headers[(o+1)%i];break;case n.LEFT:case n.UP:r=this.headers[(o-1+i)%i];break;case n.SPACE:case n.ENTER:this._eventHandler(t);break;case n.HOME:r=this.headers[0];break;case n.END:r=this.headers[i-1]}r&&(e(t.target).attr("tabIndex",-1),e(r).attr("tabIndex",0),e(r).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=e()):!1===t.active?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,n=this.options,i=n.heightStyle,o=this.element.parent();this.active=this._findActive(n.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=e(this),n=t.uniqueId().attr("id"),i=t.next(),o=i.uniqueId().attr("id");t.attr("aria-controls",o),i.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(n.event),"fill"===i?(t=o.height(),this.element.siblings(":visible").each(function(){var n=e(this),i=n.css("position");"absolute"!==i&&"fixed"!==i&&(t-=n.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===i&&(t=0,this.headers.next().each(function(){var n=e(this).is(":visible");n||e(this).show(),t=Math.max(t,e(this).css("height","").height()),n||e(this).hide()}).height(t))},_activate:function(t){var n=this._findActive(t)[0];n!==this.active[0]&&(n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var n={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var n,i,o=this.options,r=this.active,a=e(t.currentTarget),s=a[0]===r[0],l=s&&o.collapsible,u=l?e():a.next(),c=r.next(),d={oldHeader:r,oldPanel:c,newHeader:l?e():a,newPanel:u};t.preventDefault(),s&&!o.collapsible||!1===this._trigger("beforeActivate",t,d)||(o.active=!l&&this.headers.index(a),this.active=s?e():a,this._toggle(d),this._removeClass(r,"ui-accordion-header-active","ui-state-active"),o.icons&&(n=r.children(".ui-accordion-header-icon"),this._removeClass(n,null,o.icons.activeHeader)._addClass(n,null,o.icons.header)),s||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),o.icons&&(i=a.children(".ui-accordion-header-icon"),this._removeClass(i,null,o.icons.header)._addClass(i,null,o.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(t){var n=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=i,this.options.animate?this._animate(n,i,t):(i.hide(),n.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),n.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):n.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),n.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,n){var i,o,r,a=this,s=0,l=e.css("box-sizing"),u=e.length&&(!t.length||e.index()<t.index()),c=this.options.animate||{},d=u&&c.down||c,f=function(){a._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(o=d),o=o||d.easing||c.easing,r=r||d.duration||c.duration,t.length?e.length?(i=e.show().outerHeight(),t.animate(this.hideProps,{duration:r,easing:o,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:r,easing:o,complete:f,step:function(e,n){n.now=Math.round(e),"height"!==n.prop?"content-box"===l&&(s+=n.now):"content"!==a.options.heightStyle&&(n.now=Math.round(i-t.outerHeight()-s),s=0)}})):t.animate(this.hideProps,r,o,f):e.animate(this.showProps,r,o,f)},_toggleComplete:function(e){var t=e.oldPanel,n=t.prev();this._removeClass(t,"ui-accordion-content-active"),this._removeClass(n,"ui-accordion-header-active")._addClass(n,"ui-accordion-header-collapsed"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}});e.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,n){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(n),t.data("ui-tooltip-id",n).attr("aria-describedby",e.trim(i.join(" ")))},_removeDescribedBy:function(t){var n=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),o=e.inArray(n,i);-1!==o&&i.splice(o,1),t.removeData("ui-tooltip-id"),i=e.trim(i.join(" ")),i?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=e([])},_setOption:function(t,n){var i=this;this._super(t,n),"content"===t&&e.each(this.tooltips,function(e,t){i._updateContent(t.element)})},_setOptionDisabled:function(e){this[e?"_disable":"_enable"]()},_disable:function(){var t=this;e.each(this.tooltips,function(n,i){var o=e.Event("blur");o.target=o.currentTarget=i.element[0],t.close(o,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=e(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=e([])},open:function(t){var n=this,i=e(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&i.parents().each(function(){var t,i=e(this);i.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,n.close(t,!0)),i.attr("title")&&(i.uniqueId(),n.parents[this.id]={element:this,title:i.attr("title")},i.attr("title",""))}),this._registerCloseHandlers(t,i),this._updateContent(i,t))},_updateContent:function(e,t){var n,i=this.options.content,o=this,r=t?t.type:null;if("string"==typeof i||i.nodeType||i.jquery)return this._open(t,e,i);(n=i.call(e[0],function(n){o._delay(function(){e.data("ui-tooltip-open")&&(t&&(t.type=r),this._open(t,e,n))})}))&&this._open(t,e,n)},_open:function(t,n,i){function o(e){u.of=e,a.is(":hidden")||a.position(u)}var r,a,s,l,u=e.extend({},this.options.position);if(i){if(r=this._find(n))return void r.tooltip.find(".ui-tooltip-content").html(i);n.is("[title]")&&(t&&"mouseover"===t.type?n.attr("title",""):n.removeAttr("title")),r=this._tooltip(n),a=r.tooltip,this._addDescribedBy(n,a.attr("id")),a.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),l=e("<div>").html(a.find(".ui-tooltip-content").html()),l.removeAttr("name").find("[name]").removeAttr("name"),l.removeAttr("id").find("[id]").removeAttr("id"),l.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:o}),o(t)):a.position(e.extend({of:n},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(s=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(u.of),clearInterval(s))},e.fx.interval)),this._trigger("open",t,{tooltip:a})}},_registerCloseHandlers:function(t,n){var i={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var i=e.Event(t);i.currentTarget=n[0],this.close(i,!0)}}};n[0]!==this.element[0]&&(i.remove=function(){this._removeTooltip(this._find(n).tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,n,i)},close:function(t){var n,i=this,o=e(t?t.currentTarget:this.element),r=this._find(o);if(!r)return void o.removeData("ui-tooltip-open");n=r.tooltip,r.closing||(clearInterval(this.delayedShow),o.data("ui-tooltip-title")&&!o.attr("title")&&o.attr("title",o.data("ui-tooltip-title")),this._removeDescribedBy(o),r.hiding=!0,n.stop(!0),this._hide(n,this.options.hide,function(){i._removeTooltip(e(this))}),o.removeData("ui-tooltip-open"),this._off(o,"mouseleave focusout keyup"),o[0]!==this.element[0]&&this._off(o,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,n){e(n.element).attr("title",n.title),delete i.parents[t]}),r.closing=!0,this._trigger("close",t,{tooltip:n}),r.hiding||(r.closing=!1))},_tooltip:function(t){var n=e("<div>").attr("role","tooltip"),i=e("<div>").appendTo(n),o=n.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(n,"ui-tooltip","ui-widget ui-widget-content"),n.appendTo(this._appendTo(t)),this.tooltips[o]={element:t,tooltip:n}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_appendTo:function(e){var t=e.closest(".ui-front, dialog");return t.length||(t=this.document[0].body),t},_destroy:function(){var t=this;e.each(this.tooltips,function(n,i){var o=e.Event("blur"),r=i.element;o.target=o.currentTarget=r[0],t.close(o,!0),e("#"+n).remove(),r.data("ui-tooltip-title")&&(r.attr("title")||r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==e.uiBackCompat&&e.widget("ui.tooltip",e.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var e=this._superApply(arguments);return this.options.tooltipClass&&e.tooltip.addClass(this.options.tooltipClass),e}});e.ui.tooltip}),function(){function e(e){function t(t,n,i,o,r,a){for(;r>=0&&r<a;r+=e){var s=o?o[r]:r;i=n(i,t[s],s,t)}return i}return function(n,i,o,r){i=b(i,r,4);var a=!E(n)&&y.keys(n),s=(a||n).length,l=e>0?0:s-1;return arguments.length<3&&(o=n[a?a[l]:l],l+=e),t(n,i,o,a,l,s)}}function t(e){return function(t,n,i){n=_(n,i);for(var o=T(t),r=e>0?0:o-1;r>=0&&r<o;r+=e)if(n(t[r],r,t))return r;return-1}}function n(e,t,n){return function(i,o,r){var a=0,s=T(i);if("number"==typeof r)e>0?a=r>=0?r:Math.max(r+s,a):s=r>=0?Math.min(r+1,s):r+s+1;else if(n&&r&&s)return r=n(i,o),i[r]===o?r:-1;if(o!==o)return r=t(c.call(i,a,s),y.isNaN),r>=0?r+a:-1;for(r=e>0?a:s-1;r>=0&&r<s;r+=e)if(i[r]===o)return r;return-1}}function i(e,t){var n=M.length,i=e.constructor,o=y.isFunction(i)&&i.prototype||s,r="constructor";for(y.has(e,r)&&!y.contains(t,r)&&t.push(r);n--;)(r=M[n])in e&&e[r]!==o[r]&&!y.contains(t,r)&&t.push(r)}var o=this,r=o._,a=Array.prototype,s=Object.prototype,l=Function.prototype,u=a.push,c=a.slice,d=s.toString,f=s.hasOwnProperty,p=Array.isArray,h=Object.keys,m=l.bind,g=Object.create,v=function(){},y=function(e){return e instanceof y?e:this instanceof y?void(this._wrapped=e):new y(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=y),exports._=y):o._=y,y.VERSION="1.8.3";var b=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,o){return e.call(t,n,i,o)};case 4:return function(n,i,o,r){return e.call(t,n,i,o,r)}}return function(){return e.apply(t,arguments)}},_=function(e,t,n){return null==e?y.identity:y.isFunction(e)?b(e,t,n):y.isObject(e)?y.matcher(e):y.property(e)};y.iteratee=function(e,t){return _(e,t,1/0)};var w=function(e,t){return function(n){var i=arguments.length;if(i<2||null==n)return n;for(var o=1;o<i;o++)for(var r=arguments[o],a=e(r),s=a.length,l=0;l<s;l++){var u=a[l];t&&void 0!==n[u]||(n[u]=r[u])}return n}},x=function(e){if(!y.isObject(e))return{};if(g)return g(e);v.prototype=e;var t=new v;return v.prototype=null,t},A=function(e){return function(t){return null==t?void 0:t[e]}},C=Math.pow(2,53)-1,T=A("length"),E=function(e){var t=T(e);return"number"==typeof t&&t>=0&&t<=C};y.each=y.forEach=function(e,t,n){t=b(t,n);var i,o;if(E(e))for(i=0,o=e.length;i<o;i++)t(e[i],i,e);else{var r=y.keys(e);for(i=0,o=r.length;i<o;i++)t(e[r[i]],r[i],e)}return e},y.map=y.collect=function(e,t,n){t=_(t,n);for(var i=!E(e)&&y.keys(e),o=(i||e).length,r=Array(o),a=0;a<o;a++){var s=i?i[a]:a;r[a]=t(e[s],s,e)}return r},y.reduce=y.foldl=y.inject=e(1),y.reduceRight=y.foldr=e(-1),y.find=y.detect=function(e,t,n){var i;if(void 0!==(i=E(e)?y.findIndex(e,t,n):y.findKey(e,t,n))&&-1!==i)return e[i]},y.filter=y.select=function(e,t,n){var i=[];return t=_(t,n),y.each(e,function(e,n,o){t(e,n,o)&&i.push(e)}),i},y.reject=function(e,t,n){return y.filter(e,y.negate(_(t)),n)},y.every=y.all=function(e,t,n){t=_(t,n);for(var i=!E(e)&&y.keys(e),o=(i||e).length,r=0;r<o;r++){var a=i?i[r]:r;if(!t(e[a],a,e))return!1}return!0},y.some=y.any=function(e,t,n){t=_(t,n);for(var i=!E(e)&&y.keys(e),o=(i||e).length,r=0;r<o;r++){var a=i?i[r]:r;if(t(e[a],a,e))return!0}return!1},y.contains=y.includes=y.include=function(e,t,n,i){return E(e)||(e=y.values(e)),("number"!=typeof n||i)&&(n=0),y.indexOf(e,t,n)>=0},y.invoke=function(e,t){var n=c.call(arguments,2),i=y.isFunction(t);return y.map(e,function(e){var o=i?t:e[t];return null==o?o:o.apply(e,n)})},y.pluck=function(e,t){return y.map(e,y.property(t))},y.where=function(e,t){return y.filter(e,y.matcher(t))},y.findWhere=function(e,t){return y.find(e,y.matcher(t))},y.max=function(e,t,n){var i,o,r=-1/0,a=-1/0;if(null==t&&null!=e){e=E(e)?e:y.values(e);for(var s=0,l=e.length;s<l;s++)(i=e[s])>r&&(r=i)}else t=_(t,n),y.each(e,function(e,n,i){((o=t(e,n,i))>a||o===-1/0&&r===-1/0)&&(r=e,a=o)});return r},y.min=function(e,t,n){var i,o,r=1/0,a=1/0;if(null==t&&null!=e){e=E(e)?e:y.values(e);for(var s=0,l=e.length;s<l;s++)(i=e[s])<r&&(r=i)}else t=_(t,n),y.each(e,function(e,n,i){((o=t(e,n,i))<a||o===1/0&&r===1/0)&&(r=e,a=o)});return r},y.shuffle=function(e){for(var t,n=E(e)?e:y.values(e),i=n.length,o=Array(i),r=0;r<i;r++)t=y.random(0,r),t!==r&&(o[r]=o[t]),o[t]=n[r];return o},y.sample=function(e,t,n){return null==t||n?(E(e)||(e=y.values(e)),e[y.random(e.length-1)]):y.shuffle(e).slice(0,Math.max(0,t))},y.sortBy=function(e,t,n){return t=_(t,n),y.pluck(y.map(e,function(e,n,i){return{value:e,index:n,criteria:t(e,n,i)}}).sort(function(e,t){var n=e.criteria,i=t.criteria;if(n!==i){if(n>i||void 0===n)return 1;if(n<i||void 0===i)return-1}return e.index-t.index}),"value")};var D=function(e){return function(t,n,i){var o={};return n=_(n,i),y.each(t,function(i,r){var a=n(i,r,t);e(o,i,a)}),o}};y.groupBy=D(function(e,t,n){y.has(e,n)?e[n].push(t):e[n]=[t]}),y.indexBy=D(function(e,t,n){e[n]=t}),y.countBy=D(function(e,t,n){y.has(e,n)?e[n]++:e[n]=1}),y.toArray=function(e){return e?y.isArray(e)?c.call(e):E(e)?y.map(e,y.identity):y.values(e):[]},y.size=function(e){return null==e?0:E(e)?e.length:y.keys(e).length},y.partition=function(e,t,n){t=_(t,n);var i=[],o=[];return y.each(e,function(e,n,r){(t(e,n,r)?i:o).push(e)}),[i,o]},y.first=y.head=y.take=function(e,t,n){if(null!=e)return null==t||n?e[0]:y.initial(e,e.length-t)},y.initial=function(e,t,n){return c.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},y.last=function(e,t,n){if(null!=e)return null==t||n?e[e.length-1]:y.rest(e,Math.max(0,e.length-t))},y.rest=y.tail=y.drop=function(e,t,n){return c.call(e,null==t||n?1:t)},y.compact=function(e){return y.filter(e,y.identity)};var S=function(e,t,n,i){for(var o=[],r=0,a=i||0,s=T(e);a<s;a++){var l=e[a];if(E(l)&&(y.isArray(l)||y.isArguments(l))){t||(l=S(l,t,n));var u=0,c=l.length;for(o.length+=c;u<c;)o[r++]=l[u++]}else n||(o[r++]=l)}return o};y.flatten=function(e,t){return S(e,t,!1)},y.without=function(e){return y.difference(e,c.call(arguments,1))},y.uniq=y.unique=function(e,t,n,i){y.isBoolean(t)||(i=n,n=t,t=!1),null!=n&&(n=_(n,i));for(var o=[],r=[],a=0,s=T(e);a<s;a++){var l=e[a],u=n?n(l,a,e):l;t?(a&&r===u||o.push(l),r=u):n?y.contains(r,u)||(r.push(u),o.push(l)):y.contains(o,l)||o.push(l)}return o},y.union=function(){return y.uniq(S(arguments,!0,!0))},y.intersection=function(e){for(var t=[],n=arguments.length,i=0,o=T(e);i<o;i++){var r=e[i];if(!y.contains(t,r)){for(var a=1;a<n&&y.contains(arguments[a],r);a++);a===n&&t.push(r)}}return t},y.difference=function(e){var t=S(arguments,!0,!0,1);return y.filter(e,function(e){return!y.contains(t,e)})},y.zip=function(){return y.unzip(arguments)},y.unzip=function(e){for(var t=e&&y.max(e,T).length||0,n=Array(t),i=0;i<t;i++)n[i]=y.pluck(e,i);return n},y.object=function(e,t){for(var n={},i=0,o=T(e);i<o;i++)t?n[e[i]]=t[i]:n[e[i][0]]=e[i][1];return n},y.findIndex=t(1),y.findLastIndex=t(-1),y.sortedIndex=function(e,t,n,i){n=_(n,i,1);for(var o=n(t),r=0,a=T(e);r<a;){var s=Math.floor((r+a)/2);n(e[s])<o?r=s+1:a=s}return r},y.indexOf=n(1,y.findIndex,y.sortedIndex),y.lastIndexOf=n(-1,y.findLastIndex),y.range=function(e,t,n){null==t&&(t=e||0,e=0),n=n||1;for(var i=Math.max(Math.ceil((t-e)/n),0),o=Array(i),r=0;r<i;r++,e+=n)o[r]=e;return o};var k=function(e,t,n,i,o){if(!(i instanceof t))return e.apply(n,o);var r=x(e.prototype),a=e.apply(r,o);return y.isObject(a)?a:r};y.bind=function(e,t){if(m&&e.bind===m)return m.apply(e,c.call(arguments,1));if(!y.isFunction(e))throw new TypeError("Bind must be called on a function");var n=c.call(arguments,2),i=function(){return k(e,i,t,this,n.concat(c.call(arguments)))};return i},y.partial=function(e){var t=c.call(arguments,1),n=function(){for(var i=0,o=t.length,r=Array(o),a=0;a<o;a++)r[a]=t[a]===y?arguments[i++]:t[a];for(;i<arguments.length;)r.push(arguments[i++]);return k(e,n,this,this,r)};return n},y.bindAll=function(e){var t,n,i=arguments.length;if(i<=1)throw new Error("bindAll must be passed function names");for(t=1;t<i;t++)n=arguments[t],e[n]=y.bind(e[n],e);return e},y.memoize=function(e,t){var n=function(i){var o=n.cache,r=""+(t?t.apply(this,arguments):i);return y.has(o,r)||(o[r]=e.apply(this,arguments)),o[r]};return n.cache={},n},y.delay=function(e,t){var n=c.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},y.defer=y.partial(y.delay,y,1),y.throttle=function(e,t,n){var i,o,r,a=null,s=0;n||(n={});var l=function(){s=!1===n.leading?0:y.now(),a=null,r=e.apply(i,o),a||(i=o=null)};return function(){var u=y.now();s||!1!==n.leading||(s=u);var c=t-(u-s);return i=this,o=arguments,c<=0||c>t?(a&&(clearTimeout(a),a=null),s=u,r=e.apply(i,o),a||(i=o=null)):a||!1===n.trailing||(a=setTimeout(l,c)),r}},y.debounce=function(e,t,n){var i,o,r,a,s,l=function(){var u=y.now()-a;u<t&&u>=0?i=setTimeout(l,t-u):(i=null,n||(s=e.apply(r,o),i||(r=o=null)))};return function(){r=this,o=arguments,a=y.now();var u=n&&!i;return i||(i=setTimeout(l,t)),u&&(s=e.apply(r,o),r=o=null),s}},y.wrap=function(e,t){return y.partial(t,e)},y.negate=function(e){return function(){return!e.apply(this,arguments)}},y.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,i=e[t].apply(this,arguments);n--;)i=e[n].call(this,i);return i}},y.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},y.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},y.once=y.partial(y.before,2);var I=!{toString:null}.propertyIsEnumerable("toString"),M=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];y.keys=function(e){if(!y.isObject(e))return[];if(h)return h(e);var t=[];for(var n in e)y.has(e,n)&&t.push(n);return I&&i(e,t),t},y.allKeys=function(e){if(!y.isObject(e))return[];var t=[];for(var n in e)t.push(n);return I&&i(e,t),t},y.values=function(e){for(var t=y.keys(e),n=t.length,i=Array(n),o=0;o<n;o++)i[o]=e[t[o]];return i},y.mapObject=function(e,t,n){t=_(t,n);for(var i,o=y.keys(e),r=o.length,a={},s=0;s<r;s++)i=o[s],a[i]=t(e[i],i,e);return a},y.pairs=function(e){for(var t=y.keys(e),n=t.length,i=Array(n),o=0;o<n;o++)i[o]=[t[o],e[t[o]]];return i},y.invert=function(e){for(var t={},n=y.keys(e),i=0,o=n.length;i<o;i++)t[e[n[i]]]=n[i];return t},y.functions=y.methods=function(e){var t=[];for(var n in e)y.isFunction(e[n])&&t.push(n);return t.sort()},y.extend=w(y.allKeys),y.extendOwn=y.assign=w(y.keys),y.findKey=function(e,t,n){t=_(t,n);for(var i,o=y.keys(e),r=0,a=o.length;r<a;r++)if(i=o[r],t(e[i],i,e))return i},y.pick=function(e,t,n){var i,o,r={},a=e;if(null==a)return r;y.isFunction(t)?(o=y.allKeys(a),i=b(t,n)):(o=S(arguments,!1,!1,1),i=function(e,t,n){return t in n},a=Object(a));for(var s=0,l=o.length;s<l;s++){var u=o[s],c=a[u];i(c,u,a)&&(r[u]=c)}return r},y.omit=function(e,t,n){if(y.isFunction(t))t=y.negate(t);else{var i=y.map(S(arguments,!1,!1,1),String);t=function(e,t){return!y.contains(i,t)}}return y.pick(e,t,n)},y.defaults=w(y.allKeys,!0),y.create=function(e,t){var n=x(e);return t&&y.extendOwn(n,t),n},y.clone=function(e){return y.isObject(e)?y.isArray(e)?e.slice():y.extend({},e):e},y.tap=function(e,t){return t(e),e},y.isMatch=function(e,t){var n=y.keys(t),i=n.length;if(null==e)return!i;for(var o=Object(e),r=0;r<i;r++){var a=n[r];if(t[a]!==o[a]||!(a in o))return!1}return!0};var N=function(e,t,n,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof y&&(e=e._wrapped),t instanceof y&&(t=t._wrapped);var o=d.call(e);if(o!==d.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t}var r="[object Array]"===o;if(!r){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(y.isFunction(a)&&a instanceof a&&y.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],i=i||[];for(var l=n.length;l--;)if(n[l]===e)return i[l]===t;if(n.push(e),i.push(t),r){if((l=e.length)!==t.length)return!1;for(;l--;)if(!N(e[l],t[l],n,i))return!1}else{var u,c=y.keys(e);if(l=c.length,y.keys(t).length!==l)return!1;for(;l--;)if(u=c[l],!y.has(t,u)||!N(e[u],t[u],n,i))return!1}return n.pop(),i.pop(),!0};y.isEqual=function(e,t){return N(e,t)},y.isEmpty=function(e){return null==e||(E(e)&&(y.isArray(e)||y.isString(e)||y.isArguments(e))?0===e.length:0===y.keys(e).length)},y.isElement=function(e){return!(!e||1!==e.nodeType)},y.isArray=p||function(e){return"[object Array]"===d.call(e)},y.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},y.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){y["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}}),y.isArguments(arguments)||(y.isArguments=function(e){return y.has(e,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(y.isFunction=function(e){return"function"==typeof e||!1}),y.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},y.isNaN=function(e){return y.isNumber(e)&&e!==+e},y.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===d.call(e)},y.isNull=function(e){return null===e},y.isUndefined=function(e){return void 0===e},y.has=function(e,t){return null!=e&&f.call(e,t)},y.noConflict=function(){return o._=r,this},y.identity=function(e){return e},y.constant=function(e){return function(){return e}},y.noop=function(){},y.property=A,y.propertyOf=function(e){
return null==e?function(){}:function(t){return e[t]}},y.matcher=y.matches=function(e){return e=y.extendOwn({},e),function(t){return y.isMatch(t,e)}},y.times=function(e,t,n){var i=Array(Math.max(0,e));t=b(t,n,1);for(var o=0;o<e;o++)i[o]=t(o);return i},y.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},y.now=Date.now||function(){return(new Date).getTime()};var j={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},F=y.invert(j),O=function(e){var t=function(t){return e[t]},n="(?:"+y.keys(e).join("|")+")",i=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(o,t):e}};y.escape=O(j),y.unescape=O(F),y.result=function(e,t,n){var i=null==e?void 0:e[t];return void 0===i&&(i=n),y.isFunction(i)?i.call(e):i};var P=0;y.uniqueId=function(e){var t=++P+"";return e?e+t:t},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var $=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},R=/\\|'|\r|\n|\u2028|\u2029/g,L=function(e){return"\\"+q[e]};y.template=function(e,t,n){!t&&n&&(t=n),t=y.defaults({},t,y.templateSettings);var i=RegExp([(t.escape||$).source,(t.interpolate||$).source,(t.evaluate||$).source].join("|")+"|$","g"),o=0,r="__p+='";e.replace(i,function(t,n,i,a,s){return r+=e.slice(o,s).replace(R,L),o=s+t.length,n?r+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?r+="'+\n((__t=("+i+"))==null?'':__t)+\n'":a&&(r+="';\n"+a+"\n__p+='"),t}),r+="';\n",t.variable||(r="with(obj||{}){\n"+r+"}\n"),r="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+r+"return __p;\n";try{var a=new Function(t.variable||"obj","_",r)}catch(e){throw e.source=r,e}var s=function(e){return a.call(this,e,y)};return s.source="function("+(t.variable||"obj")+"){\n"+r+"}",s},y.chain=function(e){var t=y(e);return t._chain=!0,t};var H=function(e,t){return e._chain?y(t).chain():t};y.mixin=function(e){y.each(y.functions(e),function(t){var n=y[t]=e[t];y.prototype[t]=function(){var e=[this._wrapped];return u.apply(e,arguments),H(this,n.apply(y,e))}})},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=a[e];y.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],H(this,n)}}),y.each(["concat","join","slice"],function(e){var t=a[e];y.prototype[e]=function(){return H(this,t.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return y})}.call(this),define("acif/automaton/index",["exports","module","./utils","../utils","./initializer","../ci/ijsf-adapter","../environment","../view","../view/forms","../transitions","../chat","../data","../models/Model","../models/Automaton","../models/Node","../models/Style","../view/Template"],function(e,t,n,i,o,r,a,s,l,u,c,d,f,p,h,m,g){function v(e){return e&&e.__esModule?e:{default:e}}function y(e){this.options=e||{},this.Env=new T.default(e),this.utils=new w.default(this),this.initializedModels={},this.id=parseInt(this.Env.dbSync)||this.options.automatonId,this.namespace="inq-"+this.id+"-",this.hash=this.id+"::"+e.context+"::"+e.location,this.id||ACIF.Utils.throwError("An automaton ID was not specified"),this.Data=new I.default(this),this.View=new E.default(this),this.Forms=new D.default(this),this.Chat=new k.default(this),this.Transitions=new S.default(this),this.displayedPath=[],this.flashVars=this.Env.flashVars,this.Data.on("storageReady",this.getAndSaveDatapass.bind(this))}var b=function(){function e(e,t){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){o=!0,r=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=v(n),x=v(i),A=v(o),C=v(r),T=v(a),E=v(s),D=v(l),S=v(u),k=v(c),I=v(d),M=v(f),N=v(p),j=v(h),F=v(m),O=v(g);t.exports=y;var P=y.prototype={constructor:y};y.load=function(e){var t=new y(e);return A.default.initialize(t),$(t).one("didRenderNode",function(e,t){C.default.logDiagnosticInfoToServer("Automaton rendered (nodeId: "+t+")")}),t},P.close=function(){var e=this.options,t=e.automatonId,n=e.location,i=e.context;return ACIF.closeAutomaton({automatonID:t,location:n,context:i})},P.getProp=function(e,t){e=[].concat(e),t=t||this.node;var n=[t,this.settings],i=void 0,o=void 0,r=void 0,a=void 0,s=void 0;for(o=0;o<n.length;o++)if(i=n[o])for(r=0;r<e.length;r++){a=e[r];var l=a.split("."),u=i;for(s=0;s<l.length;s++){var c=l[s];if(void 0===u[c]){u=void 0;break}u=u[c]}if(u)return u}};var q={automaton:N.default,node:j.default,style:F.default,template:O.default,default:M.default};P.getRecord=function(e){var t=arguments.length<=1||void 0===arguments[1]?"node":arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(e instanceof M.default)return e;if(e){var i=this.ensureModulePath(e,t);if(!i){if(!1===n.throws)return;x.default.throwError('Could not resolve "'+e+'" to a modulePath in automaton configs.')}var o=this.initializedModels[i];if(!o){var r=require(i),a=q[t]||q.default;n.Automaton=n.Automaton||this,n.modulePath=i,o=new a(r,n),"template"!==t&&(this.initializedModels[i]=o)}return o}},P.ensureModulePath=function(e,t){if(require.entries[e])return e;if(x.default.string.isReferenceString(e))return this.referenceStringToModulePath(e);var n="Automatons/"+t+"s/"+e;return n&&require.entries[n]?n:void 0},P.referenceStringToModulePath=function(e){var t=e.split("::"),n=b(t,2),i=n[0],o=n[1],r="Automatons/"+i+"s/"+o;if(require.entries[r])return r},P.isPreChat=function(){return"br"===this.options.startedBy.type},P.addDependent=function(e){if(e){var t=this.Data.get("dependents");t=t||[],t.push(e.storageKey),this.Data.save("dependents",t)}},P.removeDependent=function(e){if(e){var t=this.Data.get("dependents");t=t||[];var n=t.indexOf(e.storageKey);t.splice(n,1),this.Data.save("dependents",t)}},P.getAndSaveDatapass=function(){var e=this.Data.get("datapass")||{};_.defaults(this.options.datapass,e),this.Data.save("datapass",this.options.datapass)},P.setAsActive=function(){this.View.setCircularTabbing(this.View.$viewContainer),this.View.Aria.getFirstSelectableElement().focus()}}),define("acif/automaton/initializer",["exports","module","../utils/mixins","../ci/ijsf-adapter","../utils"],function(e,t,n,i,o){function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e;this.Automaton=t,this.Data=t.Data,this.initPromise=t.utils.makePromise("automaton initializing"),this.benchmark=l.default.benchmark,this.benchmark("init").start(),l.default.console("Initializing framework"),Array.isArray(t.Env.top.inqAcifEventsRegistry)&&l.default.events.loadHandlers(t.Env.top.inqAcifEventsRegistry),t.Data.init().then(this.init.bind(this))}var s=r(i),l=r(o);t.exports=a,a.initialize=function(e){return new a(e).initPromise};var u=a.prototype={constructor:a};u.init=function(){var e=this.Automaton;if(this.isSessionInitializing=!e.Data.Storage.get("state.started"),e.isSessionInitializing=this.isSessionInitializing,this.Automaton.settings=this.Automaton.getRecord(this.Automaton.id,"automaton"),this.shouldCloseCustomerInterface())return e.View.Exit.closeCI(),this.status="Cancelled automaton initialization. Closing CI.",void this.initPromise.resolve(this);this.benchmark("init").mark("starting View.initializeViewport()"),e.View.initializeViewport(),this.benchmark("init").mark("finishing View.initializeViewport()"),this.initializeSessionData(),this.createPublicAPI();var t=this.Automaton.Data.get("automaton");if(e.settings.extend(t),e.settings.onPageLanding&&e.settings.runHook("onPageLanding"),this.isSessionInitializing)return e.Data.triggerStarted(e.options.startedBy),this.runAutomatonOnInitHook().then(this.persistInitialSessionData.bind(this)).then(this.doAfterAutomatonIsInitialized.bind(this));this.doAfterAutomatonIsInitialized()},u.shouldCloseCustomerInterface=function(){var e=this.Data.get("currentNodeModulePath");if(e){var t=this.Automaton.getRecord(e);return!(!t||!t.isExitNode)}},u.createPublicAPI=function(){var e=this,t=this.Automaton,n=t.Chat,i=t.View,o=t.Env,r=t.Data,a=t.Transitions,u=t.settings,c=t.utils,d=c.timers,f=l.default.get(t,"options.datapass"),p={hideLayer:s.default.hideLayer,showLayer:s.default.showLayer,shrinkLayer:s.default.shrinkLayer,growLayer:s.default.growLayer,fireAssistedEvent:s.default.fireAssistedEvent,fireCustomEvent:s.default.fireCustomEvent,minimize:s.default.minimizeStage,engageChat:n.engageChat.bind(n),map:f,automatonDataMap:f,datapass:f,flashVars:o.flashVars,position:i.position.set.bind(i.position),resize:i.resizeStage.bind(i),sendToAgent:s.default.sendDatapassMessage,sendCustomerMessage:s.default.sendMessageAsCustomer,console:l.default.console.bind(l.default),top:o.win,document:o.document,getFormData:r.CRM.toDatapassString.bind(r.CRM),getAllFormData:r.CRM.toSimpleObject.bind(r.CRM),updateFormItemResponse:r.CRM.updateFormItemResponse.bind(r.CRM),getPath:n.createPathForDatapass.bind(n),checkAA:n.checkAA.bind(n),automaton:u,cookies:l.default.cookies,getBreadcrumbs:a.getBreadcrumbs.bind(a),triggerTransition:a.trigger.bind(a),setTimeout:d.setTimeout.bind(d),setInterval:d.setInterval.bind(d),forms:r.CRM.apiData,getAutomatonAttribute:r.DW.getAutomatonAttr.bind(r.DW),setAutomatonAttribute:r.DW.setAutomatonAttr.bind(r.DW),removeAutomatonAttribute:r.DW.removeAutomatonAttr.bind(r.DW),IJSF:s.default};p.ciCloseChat=s.default.closeCI,p.ciGrowLayer=p.growLayer,p.ciHideLayer=p.hideLayer,p.ciMinimize=p.minimize,p.ciShowLayer=p.showLayer,p.ciShrinkLayer=p.shrinkLayer,p.getNodeById=function(e){return t.getRecord(e)},this.Automaton.Data.StorageClass.create(p,"public-api");try{p.emailTranscript=s.default.requestTranscript}catch(e){}p.getPreviousNode=function(){var e=r.get("previousNodeID");if(e)return t.getRecord(e)},p.loadAutomaton=function(e){var t=arguments.length<=1||void 0===arguments[1]?{dependent:!0}:arguments[1],n=this,i=ACIF.loadAutomaton(e,{type:"automaton",id:n.id});t.dependent&&n.addDependent(i)},p.closeAutomaton=function(e){var t=this,n=ACIF.closeAutomaton(e);t.removeDependent(n)},p.sendFormDataToAgent=function(n){var i={},o=e.Automaton,r=o.View.$viewContainer.find("form");o.Forms.validateAllFields(r),n?n.forEach(function(t){i[t]=e.Data.CRM.getAnswerValueByQuestionId(t)}):i=e.Data.CRM.getResponseValues(),t.Data.triggerCustomerResponded(),s.default.sendDatapassMessage(i)},p.logData=function(e,n){t.Data.store.addToLogQueue("custom: "+e,n)},p.getTargetChatNode=function(){return e.Automaton.settings._targetChatNode},t.api=p},u.initializeSessionData=function(){if(this.isSessionInitializing){var e=this.Automaton,t=e.settings,n=e.getRecord(t.initialNode),i=e.options.automatonDataMap,o=_.extend({type:t.type,sub_type:t.sub_type||t.subType},t.automatonAttributes,_.pick(i,"type","sub_type"),i.automatonAttributes,{name:t.name,automaton_id:e.id,acif_version:ACIF.VERSION});this.Automaton.Data.save({automaton_id:this.Automaton.id,automatonDataMap:i,automaton:{},automatonAttributes:o,path:[n.id],currentNodeModulePath:n.modulePath,previousNodeID:null,dbSync:this.Automaton.Env.dbSync||void 0})}},u.runAutomatonOnInitHook=function(){function e(e){if(!!Number(e)&&ACIF.Utils.throwError("Automaton onInit hook can no longer return an integer. It must return a reference string"),l.default.string.isReferenceString(e)){var i=t.getRecord(e),o=n.Data.get("path");n.Data.save("currentNodeModulePath",i.modulePath),o.pop(),o.push(e),n.Data.save("path",o)}}var t=this.Automaton,n=this,i=t.utils.makePromise("automaton onInit hook");if(this.isSessionInitializing&&t.settings.onInit){var o=t.settings.runHook("onInit");l.default.isPromise(o)?o.always(e).always(i.resolve):(e(o),i.resolve())}else i.resolve();return i},u.persistInitialSessionData=function(){this.Automaton.settings.onInit&&this.Automaton.Data.persistCustomAutomatonProperties()},u.doAfterAutomatonIsInitialized=function(){this.configureInitialNodePath(),this.benchmark("init").mark("starting to load first node"),this.loadFirstNodeOnPageLanding(),this.isSessionInitializing=!1,l.default.events.trigger("initialized"),this.initPromise.resolve(this)},u.configureInitialNodePath=function(){var e=this.Automaton,t=e.settings;if(Array.isArray(t.root_path)){var n=_.clone(t.root_path),i=n.indexOf(this.Data.storage.path[0]);i>-1&&n.splice(i,1),e.root_path=n}else e.root_path=[];e.Transitions.updateDisplayedPath()},u.loadFirstNodeOnPageLanding=function(){var e=this.Automaton,t=e.getRecord(this.Data.storage.currentNodeModulePath);e.Transitions.loadNode(t),this.benchmark("init").mark("finished loading first node"),this.benchmark("init").end()}}),define("acif/automaton/utils/get-active-automatons",["exports","module"],function(e,t){function n(){var e=inQ.Storage.peek("acif-loaded-automatons","engagement")||{};return Object.keys(e).filter(function(t){return e[t]}).map(function(e){return JSON.parse(e)})}t.exports=n}),define("acif/automaton/utils/index",["exports","module","./timers","./promises"],function(e,t,n,i){function o(e){return e&&e.__esModule?e:{default:e}}function r(e){this.timers=new a.default}var a=o(n),s=o(i);t.exports=r;var l=r.prototype={constructor:r};l.makePromise=function(e){return s.default.makePromise(this.timers,e)},l.doAfter=function(e,t,n,i){if(1===arguments.length){var o=arguments[0];e=o.condFn,t=o.afterFn,n=o.poll,i=o.maxWait}var r=this,a=void 0;this.timers.setTimeout(function(){clearTimeout(a)},i||1e4),function i(){e()?t():a=r.timers.setTimeout(i,n||10)}()}}),define("acif/automaton/utils/promises",["exports","module"],function(e,t){function n(e,t){var n=new $.Deferred,i=0,o=e.setInterval(function(){i++;var r=2e3*i/1e3;"pending"===n.state()?r<60?ACIF.Utils.logger("Pending promise - "+t+" | "+r+"s","warn"):(ACIF.Utils.logger("Max wait time reached - "+t+" | "+r+"s","error"),e.clearInterval(o),n.reject()):e.clearInterval(o)},2e3);return n}t.exports={makePromise:n}}),define("acif/automaton/utils/timers",["exports","module"],function(e,t){function n(){this._timeouts=[],this._intervals=[]}t.exports=n;var i=n.prototype={constructor:n};i.setTimeout=function(e,t){var n=setTimeout(e,t);return this._timeouts.push(n),n},i.setInterval=function(e,t){var n=setInterval(e,t);return this._intervals.push(n),n},i.clearTimers=function(){this._timeouts.forEach(function(e){return clearTimeout(e)}),this._intervals.forEach(function(e){return clearInterval(e)}),this._timeouts=[],this._intervals=[]},i.clearTimeout=function(e){var t=this._timeouts.indexOf(e);t>-1&&(this._timeouts.splice(t,1),clearTimeout(e))},i.clearInterval=function(e){var t=this._intervals.indexOf(e);t>-1&&(this._intervals.splice(t,1),clearInterval(e))}}),define("acif/chat/chat",["exports","module","../environment/is-dev-mode","../ci/ijsf-adapter","../utils"],function(e,t,n,i,o){function r(e){return e&&e.__esModule?e:{default:e}}function a(e){this.Automaton=e,this.engageChatCalled=!1}var s=r(n),l=r(i),u=r(o);t.exports=a;var c=a.prototype={constructor:a};c.loadChatNode=function(e){var t=this,n=this.Automaton,i=n.Data,o=n.Transitions;this.node=e,o.runNodeEntry(e).then(function(n){n||(e.viewport&&t.setChatWindowSizeAndPosition(),t.engageChatCalled||t.engageChat(),i.Storage.persist())})},c.logChatOutcome=function(e){var t=this.Automaton.Data,n=[];t.triggerContentSentToCustomer(e,n),t.triggerEnded(e)},c.setChatWindowSizeAndPosition=function(){var e=this.Automaton.View,t=this.node.viewport||{};(t.height||t.width)&&e.resizeStage(t.width,t.height),t.position&&e.position.set(t.position)},c.resolveChatNode=function(e){var t=this.Automaton,n=!!t.activeEvent&&t.activeEvent.$element.is("[acif-ignore-aa]"),i=!e.chatRouter.checkAgentAvailability||n;if(t.utils.timers.clearTimers(),i){return t.utils.makePromise().resolve(e.id)}return delete t.settings._targetChatNode,this.Automaton.settings.runHook("willCheckAvailability",e),e.runHook("willCheckAvailability"),this.checkAA(e).then(function(n){if(n.AA&&n.inHOP)return e.id;t.settings._targetChatNode=e.id;var i=e.chatRouter;return n.outsideHOP&&i.outsideHopNode?(u.default.console("Outside hours of operation. Routing to outside HOP node"),i.outsideHopNode):i.agentsBusyNode?(u.default.console("All agents are busy. Routing to agents busy node."),i.agentsBusyNode):(u.default.console("No agents available. Customer will be queued."),e.id)})},c.checkAA=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.chatRouter||{businessUnit:e.business_unit_id,agentGroup:e.agent_group_id},n=this.Automaton.getProp.bind(this.Automaton),i={},o=t.agentAttributes||n(["chatRouter.agentAttributes","agentAttributes"]),r=t.agentGroup||n(["chatRouter.agentGroup","agentGroup"]),a=t.businessUnit||n(["chatRouter.businessUnit","businessUnit"]),s=e.qThreshold||t.qThreshold||n(["chatRouter.qThreshold","qThreshold"]);i.buID=a,i.siteID=l.default.getSiteId(),i.buID||u.default.throwError("Business Unit ID must be specified in order to check for agent availability."),i.siteID||u.default.throwError("Site ID must be specified in order to check for agent availability."),r&&(i.agID=r),s&&(i["q-thresh"]=s),o&&function(){var e=o.split(";"),t=[];_.each(e,function(e){var n=e.split(","),i=(n[0]||"").trim(),o=(n[1]||"").trim();t.push({name:i,value:o})}),i.agentAttributes=JSON.stringify(t)}(),this.aaData=i,this.aaPromise=this.Automaton.utils.makePromise("agent availability check");var c=this.checkAAFromCache(i);if(c&&_.now()-c.timestamp<5e3)return this.aaPromise.resolve(c.status),this.aaPromise;var d=_.clone(i);d["no-cache"]=Date.now(),u.default.console("Checking agent availability for: "+JSON.stringify(d));var f=l.default.getAgentsAvailabilityCheckUrl(),p="t"+Date.now();return d.callback="ACIF._jsonpCallbacks."+p,window.ACIF._jsonpCallbacks[p]=this.aaCallback.bind(this),f+="?"+$.param(d),document.body.appendChild(document.createElement("script")).src=f,this.aaPromise},c.aaCallback=function(e){e.AA="true"===e.availability,e.inHOP="true"===e.inHOP,e.online="online"===e.status,e.outsideHOP=!e.inHOP,this.updateAAStatusCache(this.aaData,e),this.aaData=null,this.aaPromise.resolve(e)},c.aaStatusCache={},c.checkAAFromCache=function(e){var t=JSON.stringify(e);return this.aaStatusCache[t]},c.updateAAStatusCache=function(e,t){var n=JSON.stringify(e);this.aaStatusCache[n]={status:t,timestamp:_.now()}},c.createPathForDatapass=function(e){var t=this;e=e||"Selections";var n="",i=u.default.generateBreadcrumbs(this.Automaton.Data.storage.path);return i=i.map(function(e){var n=t.Automaton.getRecord(e);return n.breadcrumb||n.name}),i.length&&function(){var t=0;i=i.map(function(e){return"\n    "+ ++t+") "+e}),n+="- "+e+":"+i.join("")}(),n},c.engageChat=function(e){this.engageChatCalled=!0,this.logChatOutcome(this.node);var t=e||{},n=this.node,i=this.Automaton.getProp.bind(this.Automaton),o=i("circularTabbing"),r=t.publicUserId||i("publicUserId",n),a=t.agentDatapass||i(["chatRouter.agentOutcome","agentDatapass"],n)||"",c=t.agentName||i("chatRouter.agentName",n),d=(t.autoOpener||i(["chatRouter.clientOutcome","autoOpener"],n)||"")+"",f=(t.agentAttributes||i("chatRouter.agentAttributes",n)||"")+"",p=(t.businessUnitID||i("chatRouter.businessUnit",n)||"")+"",h=(t.agentGroupId||i("chatRouter.agentGroup",n)||"")+"",m=(t.path_prefix||i("path_prefix",n)||"")+"",g=(t.scriptTreeId||i(["chatRouter.scriptTree","scriptTreeId","scriptTreeID"],n)||"")+"",v=$.trim(t.hideLayers||i("chatRouter.hideLayers",n)||""),y=$.trim(t.showLayers||i("chatRouter.showLayers",n)||""),b=t.deferChatRouting||i("deferChatRouting",n)||!1,w=t.routingAllocationSpec||i("routingAllocationSpec",n),x=t.isWebRTCAudio||i("isWebRTCAudio",n)||!1,A=t.isWebRTCVideo||i("isWebRTCVideo",n)||!1,C=t.virtualAssistantId||i("chatRouter.virtualAssistantId",n),T=t.phone||"",E=void 0!==t.guidePath?t.guidePath:i("guidePath",n),D="",S=[];!1!==E&&(E="string"==typeof E?E:this.createPathForDatapass(m)),!1!==t.formData&&(D="string"==typeof t.formData?t.formData:this.Automaton.Data.CRM.toDatapassString()),E&&S.push(E),D&&S.push(D),a&&S.push(a),a=S.join("\n"),a=a?"\n"+a:"";var k={automatonID:this.Automaton.id,context:"ci",location:this.Automaton.options.location,isEngagingChat:!0};ACIF.closeAutomaton(k),v&&_.each(v.split(/[\s,;]+/),function(e){l.default.hideLayer(e)}),y?(y=y.split(/[\s,;]+/),-1===y.indexOf("chat")&&y.push("chat")):y=["chat"],y.forEach(function(e){l.default.showLayer(e)});var I={agentAttrs:f,agentGroupId:h,agentName:c,agentOutcome:a,businessUnitID:p,circularTabbing:o,clientOutcome:d,closeOnEnd:!0,phone:T,publicUserId:r,routingAllocSpecs:w,scriptTreeId:g,automatonId:C};if(x?l.default.engageAudio(I):A?l.default.engageVideo(I):b?l.default.setEngageParameters(I):l.default.engageChat(I),(0,s.default)()){var M="Routing customer to chat with the following parameters:";for(var N in I)M+="\n** "+N+': "'+I[N]+'"';u.default.console(M)}}}),define("acif/chat/index",["exports","module","./chat"],function(e,t,n){e.default=function(e){return e&&e.__esModule?e.default:e}(n),t.exports=e.default}),define("acif/ci/ijsf-adapter",["exports","module","../environment/get-env-var","../utils/tryCatch"],function(e,t,n,i){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=e.match(/^on/)?e:"on"+e;return ve.addListener(r({},n,t))}function s(){return ACIF.Utils.logger("Closing CI"),ve.ciCloseChat()}function l(){return ve.ciPreparingClosingChat()}function u(e){inqFrame.com.inq.flash.client.control.WebRTCMgr.engageAudio(e)}function c(e){return ve.ciEngageChat(e)}function d(e){inqFrame.com.inq.flash.client.control.WebRTCMgr.engageVideo(e)}function f(){return Inq.fireCustomEvent("AssistedEvent")}function p(e,t,n){return-1===ye.indexOf(e)&&a(e,function(){}),Inq.fireCustomEvent(e,t,n)}function h(){return ve.getChatRule()}function m(e){return(0,ge.default)(function(){var t=inqFrame.Inq.CHM.getChat(),n=t&&t.getChatData().agtAttrs;if(n){e=e.toLowerCase();for(var i in n)if(i.toLowerCase()===e)return decodeURIComponent(n[i])}})}function g(){return ve.getAgentsAvailabilityCheckUrl()}function v(){return A(C())}function y(){return ve.getAgentGroupName()}function b(){return ve.getAgentID()}function w(){return ve.getAutomatonSpecData()||{}}function x(){return ve.getBrowserTypeAndVersion()}function A(e){return ve.getBuRuleAgentGroupID(e)}function C(){return ve.getBrID()}function T(){return ve.getBrName()}function E(){return ve.getBusinessUnitID()}function D(){return ve.getBusinessUnitName()}function S(){return ve.getMediaBaseURL()+"/sites/"+R()}function k(){return ve.getCustID()}function I(){try{return ve.getCustGeoData()||{}}catch(e){return{}}}function M(){return I().country_code}function N(){return I().region_code}function j(){return I().zip_code}function F(){return ve.getDeviceType()}function O(){return inqFrame.Inq.CHM.getChatID()}function P(){return ve.getPageID()}function $(){return ve.getPageMarker()}function q(e){return ve.ciGrowLayer(e)}function R(){return inqFrame.Inq.siteID}function L(e){return ve.ciHideLayer(e)}function H(){return window.inqFrame.com.inq.flash.client.control.XFrameWorker.hideLayerAndEndChat.apply(null,arguments)}function V(){return ve.isChatConnected()}function W(){return ve.ciIsMinimized()}function B(){return inqFrame.com.inq.flash.client.control.isWebRTCCapable()}function z(e){if((ve.getSiteConstants()||{}).ACIF_DIAGNOSTIC_LOGGING_ENABLED)return ve.logInfoToServer("ACIF-Diagnostics - "+e)}function U(){return ve.ciMinimize.apply(null,arguments)}function Y(e,t,n){ve.ciMoveStage(e,t,n)}function J(e){var t=(0,me.default)("nuance-env")||"production";_.each(e,function(n,i){e[i]=function(){for(var e=arguments.length,i=Array(e),o=0;o<e;o++)i[o]=arguments[o];switch(t){case"production":try{n.apply(null,i)}catch(e){throw ACIF.Utils.logger(e,"error"),e}break;case"test":n.apply(null,i);break;case"development":setTimeout(function(){n.apply(null,i)})}}}),ve.addListener(e)}function G(e){return ve.submitNativePostChatSurvey(e)}function Q(){return ve.ciRemoveCircularModalWindow()}function K(){return ve.ciTransitionPage()}function X(e,t){return ve.ciResizeStage(e,t)}function Z(){return ve.ciRestore.apply(null,arguments)}function ee(e,t){return ve.requestTranscript(e,t)}function te(e,t,n){return Inq.sendAutomatonMessage(e,t,n)}function ne(e){e="object"==typeof e?e:{"Automaton-Datapass":e};var t={agentID:b(),engagementID:O()};return Inq.sendAutomatonMessage("datapass",_.extend(e,t))}function ie(e){var t=arguments.length<=1||void 0===arguments[1]?"":arguments[1];return Inq.sendAutomatonMessage("system",e,"automaton-system-message "+t)}function oe(e){return ve.ciSendAutomatonDataAsCustomerMessage(e)}function re(){return ve.ciSetAutomatonDataMapXcd.apply(null,arguments)}function ae(e,t,n){return ve.ciSetCircularModalWindow(e,t,n)}function se(e,t){return ve.setElementPosition(e,t)}function le(e){return ve.ciSetEngageParameters(e)}function ue(){return ve.ciSetFocusOnChatInputField()}function ce(){return ve.showAutomaton.apply(null,arguments)}function de(e){return ve.ciShowLayer(e)}function fe(e){return ve.ciShrinkLayer(e)}function pe(e,t){var n=inqFrame.Inq.xforms;if(n&&n.bindOrbeonListeners){var i="acif::"+e;return n.unbindOrbeonListeners(i),t?n.bindOrbeonListeners(i,t):void 0}}function he(e,t){return inqFrame.com.inq.flash.client.control.UploadHandler.engageFileUpload(e,t)}var me=o(n),ge=o(i),ve=inqFrame.Inq.FlashPeer;!function(e){Object.keys(e).forEach(function(t){window[t]=e[t]})}({setAutomatonDataMap:re,showAutomaton:ce,isChatConnected:V}),t.exports={addListener:a,closeCI:s,endSession:l,engageAudio:u,engageChat:c,engageVideo:d,fireAssistedEvent:f,fireCustomEvent:p,getActiveRule:h,getAgentsAvailabilityCheckUrl:g,getAgentAttr:m,getAgentGroupId:v,getAgentGroupName:y,getAgentId:b,getAutomatonDataMap:w,getBrowserTypeAndVersion:x,getBusinessRuleAgentGroupId:A,getBusinessUnitId:E,getBusinessUnitName:D,getBusinessRuleName:T,getClientMediaBaseUrl:S,getCustomerId:k,getCustomerCountryCode:M,getCustomerRegionCode:N,getCustomerZipCode:j,getDeviceType:F,getEngagementId:O,getPageId:P,getPageMarker:$,getSiteId:R,growLayer:q,hideLayer:L,hideLayerAndEndChat:H,isChatConnected:V,isMinimized:W,isWebRTCCapable:B,logDiagnosticInfoToServer:z,minimizeStage:U,moveStage:Y,processSurveyAlerts:G,registerIJSFListeners:J,removeCircularTabbing:Q,resetPhoneXframe:K,resizeStage:X,restoreStage:Z,requestTranscript:ee,sendAutomatonMessage:te,sendDatapassMessage:ne,sendMessageAsCustomer:oe,sendSystemMessage:ie,setAutomatonDataMap:re,setCircularTabbing:ae,setElementPosition:se,setEngageParameters:le,setFocusOnChatInput:ue,shrinkLayer:fe,showAutomaton:ce,showLayer:de,updateInputListeners:pe,uploadFile:he};var ye=[]}),define("acif/ci/index",["exports","module","../utils","./push-content","./ijsf-adapter"],function(e,t,n,i,o){function r(e){return e&&e.__esModule?e:{default:e}}function a(){var e=k.default.getActiveRule();k.default.logDiagnosticInfoToServer("getBusinessRuleAutomatonParams called ActiveRuleId: "+e.id);var t=e.getAutomatonParams(),n=k.default.getAutomatonDataMap(),i=!!n.acif_id;if(t=t.concat(D.default.get(parent,"NUANCE_PREVIEW.automatons")||[]),t.forEach(function(e){var t=e.datapass||{};e.context=e.context||"ci",e.automatonID=e.automatonID||e.id||e.automatonId,e.location=e.location||D.default.getAutomatonProp(e.automatonID,"attributes.panel.location")||"center",e.datapass=_.extend(n,t)}),t.length)return t;if(!i)return[];var o=!!require.entries["Automatons/automatons/"+n.acif_id],r=y("div[data-acif-v2-frame]"),a=r.attr("id"),s=!(!r||!r.length),l=a&&a.replace(/^tcChat_/,"");if(s&&!o&&!k.default.isChatConnected())return k.default.showLayer(l),[];var u=n.location||D.default.getAutomatonProp(n.acif_id,"attributes.panel.location")||"center",c=w(u),d=b(c),f=!(!d||!d.length);return f&&s&&k.default.hideLayer(l),!(!s&&!f)&&o&&t.push({datapass:n,location:f?u:"V2Frame",context:"ci",automatonID:n.acif_id,shouldSuppress:n.should_suppress}),t}function s(e,t){var n=void 0,i=void 0,o=void 0,r=void 0;if("ci"===e){var a=l();n=a.$skin,i=a.frame,r=a.document,o=$('[id$="'+t+'"]',r.body)}else{if("page"!==e)throw new Error('Expected automaton "context" parameter to equal "ci" or "page". Received "'+e+'"');o=$("#"+t,parent.document),i=parent,r=parent.document}if(!o||!o.length)throw new Error('Could not find automaton container element "'+t+'"');return{frame:i,$container:o,$skin:n,document:r}}function l(){var e=parent.document.getElementById("tcChat_Skin"),t=void 0,n=void 0;return e?(t=parent,n=parent.document):(e=inqFrame.frameElement,n=inqFrame.document,t=inqFrame),{$skin:$(e),frame:t,document:n}}function u(){ACIF.loaded={}}function c(e,t){var n=e.panel,i=ACIF.Utils,o=i.get(t,"panel.width"),r=i.get(t,"panel.height");ACIF.ci=ACIF.ci||{},ACIF.ci[n]=ACIF.ci[n]||{},ACIF.ci[n].automatonId=e.automatonId;o=o?parseInt(o):null,r=r?parseInt(r):null;var a=!(!r&&!o),s={};E(n)?s.height=r||200:T(n)?s.width=o||350:a&&(s.height=r,s.width=o),/left/gi.test(n)&&h({x:-s.width}),/top/gi.test(n)&&h({y:-s.height});var l=!(!s.height&&!s.width);!A(n)&&l&&f(n,s);var u=w("V2Frame");u&&n===u||k.default.showLayer(n)}function d(e,t){v(e)||ACIF.Utils.throwError(e+" does not exist and therefore cannot be closed.");var n=!!(ACIF.ci[e].width>0||ACIF.ci[e].height>0),i={};E(e)?i.height=0:T(e)?i.width=0:n&&(i.height=0,i.width=0);var o=b(e),r=o.width(),a=o.height();!A(e)&&n&&f(e,i);var s=/left/gi.test(e),l=!t;if(s&&l&&h({x:r}),/top/gi.test(e)&&l&&h({y:a}),k.default.hideLayer(e),ACIF.loadedStack.length){var u=JSON.parse(ACIF.loadedStack.slice(-1)).params.automatonID;ACIF.getAutomatonById(u).setAsActive()}else k.default.setFocusOnChatInput()}function f(e,t){var n=t.width,i=t.height,o=b(e);o||ACIF.Utils.throwError(e+" does not exist and therefore cannot be resized.");var r=0,a=0,s=i>=0,l=n>=0;if(s||l||ACIF.Utils.throwError('Automaton does not contain property "panel" with a specified height or width'),s){a=i-o.height(),k.default.setElementPosition(e,{height:i}),ACIF.ci[e].height=i}if(l){r=n-o.width(),k.default.setElementPosition(e,{width:n}),ACIF.ci[e].width=n}var u="Phone"!==k.default.getDeviceType(),c=C(e);u&&c&&g({width:r,height:a})}function p(e){if(T(e)){var t=ACIF.ci[e].width;k.default.setElementPosition(e,{width:t})}else if(E(e)){var n=ACIF.ci[e].height;k.default.setElementPosition(e,{height:n})}else if(!A(e)){var i=x(e);k.default.setElementPosition(e,i)}}function h(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.x,n=void 0===t?0:t,i=e.y,o=void 0===i?0:i,r=ACIF.$skin,a=r.position(),s=a.left,l=a.top,u=Math.max(s+n,0),c=Math.max(l+o,0);k.default.moveStage("ABSOLUTE",u,c)}function m(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=ACIF.$skin,n=t.width(),i=t.height(),o=e.width,r=e.height,a=o||n,s=r||i;k.default.resizeStage(a,s)}function g(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=ACIF.$skin,n=e.width,i=void 0===n?0:n,o=e.height,r=void 0===o?0:o,a=t.width(),s=t.height(),l=a+i,u=s+r;k.default.resizeStage(l,u)}function v(e){return!!b(e).length}function y(e){var t=l().$skin;return t.is("div")?t.find(e):t.contents().find(e)}function b(e){var t=l().$skin;return t.is("div")?t.find('[id$="'+e+'"]'):t.contents().find('[id$="'+e+'"]')}function w(e){if("V2Frame"===e){return(y("[data-acif-v2-frame]").attr("id")||"").replace(/^tcChat_/,"")}return"acif"+e.split(/\W+/g).map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join("")}function x(e){var t=ACIF.ci[e],n=t.width,i=t.height,o={};return n&&(o.width=n),i&&(o.height=i),o}function A(e){return["acifCenter","acifInnerFull","acifOuterFull"].indexOf(e)>-1||!!y('div[id$="'+e+'"][data-acif-v2-frame]').length}function C(e){return T(e)||E(e)}function T(e){
return["acifOuterLeft","acifInnerLeft","acifInnerRight","acifOuterRight"].indexOf(e)>-1}function E(e){return["acifOuterTop","acifTranscriptTop","acifTranscriptBottom","acifOuterBottom"].indexOf(e)>-1}var D=r(n),S=r(i),k=r(o),I={};t.exports={listeners:I,findInSkin:y,getBusinessRuleAutomatonParams:a,getStage:s,getSkin:l,initializePanel:c,closePanel:d,isHorizontalPanel:E,isMainPanel:A,isVerticalPanel:T,reinstatePanel:p,resizePanel:f,resizeStage:m,toPanelName:w},I.onChatClosed=function(){u()},I.onAgentMsg=function(e){S.default.extractAgentScriptCommands(e)},I.onAgentDataPass=function(e){var t=void 0;try{t=JSON.parse(e.agentDataPass.data.messageText)}catch(t){ACIF.Utils.throwError("Unable to parse messageText. Received: "+e.agentDataPass.data.messageText)}t&&S.default.processAgentDataPass(t)}}),define("acif/ci/push-content",["exports","module","./ijsf-adapter","../utils","../utils/logger"],function(e,t,n,i,o){function r(e){var t=e.textLine,n=$("<div>").append(t).find("[acif-automaton-id], [data-automaton-id]"),r=n.attr("acif-automaton-id")||n.attr("data-automaton-id"),a=n.attr("acif-context")||n.attr("data-context")||"ci",l=n.attr("acif-panel")||n.attr("data-panel")||(0,i.getAutomatonProp)(r,"attributes.panel.location"),u=n.attr("acif-action")||n.attr("data-action"),c="show"===u&&r&&l,d="hide"===u&&r&&l;if(!(!c&&!d)){var f={automatonID:r,context:a,location:l},p={type:"agent",id:s.default.getAgentId()};c?$.when(ACIF.onStorageReady,ACIF.onConfigsReady).then(function(){ACIF.loadAutomaton(f,p)}).catch(o.logError):d?ACIF.closeAutomaton(f):ACIF.Utils.throwError("The action '"+u+"' sent by the agent can not be handled by the ACIF")}}function a(e){var t=_.pick(e.data,"automatonID","location","context","datapass");t.location=t.location||(0,i.getAutomatonProp)(t.automatonID,"attributes.panel.location"),"loadAutomaton"===e.action?function(){var e={type:"agent",id:s.default.getAgentId()};$.when(ACIF.onStorageReady,ACIF.onConfigsReady).then(function(){ACIF.loadAutomaton(t,e)}).catch(o.logError)}():"closeAutomaton"===e.action&&ACIF.closeAutomaton(t)}var s=function(e){return e&&e.__esModule?e:{default:e}}(n);t.exports={extractAgentScriptCommands:r,processAgentDataPass:a}}),define("acif/data/alerts",["exports","module","../ci/ijsf-adapter"],function(e,t,n){function i(e){this.Automaton=e}var o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.exports=i;var r=i.prototype;r.checkAlertConditions=function(){var e=this;this.surveyAlertConfigs=this.Automaton.getProp("surveyAlerts"),Array.isArray(this.surveyAlertConfigs)&&$(this.Automaton.Data.DW).one("onEventsReported",function(t,n){if(n){var i=e.getPostData();o.default.processSurveyAlerts(i)}})},r.getPostData=function(){return{engagementId:o.default.getEngagementId(),siteId:o.default.getSiteId(),surveyQuestions:this.getResponsesWithEncodedAnswers(),surveyAlerts:this.getSurveyAlerts()}},r.getSurveyAlerts=function(){var e=this,t=this.surveyAlertConfigs;return t=t.map(function(t){var n=_.clone(t);return n.emailSubject=t.emailSubject||"Survey Submission Alert",n.emailTemplate=e.getEmailBody(t.emailTemplate)||"[all-customer-responses]",n})},r.getEmailBody=function(e){if(e){return this.Automaton.getRecord(e,"template").getHTML().innerHTML}},r.getResponsesWithEncodedAnswers=function(){return this.Automaton.Data.CRM.getResponseList().map(function(e){return{id:e.questionId,question:e.questionText,answer:e.answerText||""}})}}),define("acif/data/customer-response-manager",["exports","module","../utils"],function(e,t,n){function i(e){var t=this;this.Data=e,this.Automaton=e.Automaton,this.storage=e.StorageClass.create(this,"CRM"),this.responsesToBeLogged={},this.apiData={_:{}},_.each(this.storage,function(e){t.exposeResponseToApi(e)})}var o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.exports=i;var r=i.prototype={constructor:i};r.addNodeSelection=function(e){var t=o.default.generateBreadcrumbs(this.Automaton.displayedPath),n=_.indexOf(t,e)>-1,i=!!this.Automaton.View.$viewport.find("form:visible").length;if(!n&&!i){var r=this.Automaton.node.id+"-"+e;this.addNodeTransition(r)}},r.addTransitionSelection=function(e){var t=this.Automaton.node.id+"-"+e;this.addNodeTransition(t)},r.addNodeTransition=function(e){var t=this.getCurrentQuestion(),n=this.getAnswerText(e),i=this.answerTypes.NON_FREE_FORM;if(t.questionText&&n){var o=_.extend({answerId:e,answerType:i,answerText:n},t);this.addResponse(o)}},r.getCurrentQuestion=function(){var e=this.Automaton.View.$viewport,t=e.find("[acif-question]").text().trim()||this.Automaton.node.form_field_name,n=void 0,i=void 0;if(t)i=!1,n=t;else{i=!0;var o=e.find("h1,h2,h3").last();t=o.data("original-text")||o.text().trim()||this.Automaton.node.name,n=this.Automaton.node.id}return{questionId:n,questionText:t,isTransitionQuestion:i}},r.getAnswerText=function(e){var t=this.Automaton.activeEvent,n=t?t.$element.data("original-text")||t.$element.text().trim():null,i=e.split("-")[1];return n||i},r.getAnswerValueByQuestionId=function(e){return this.getResponseList().find(function(t){return t.questionId===e}).answerValue},r.addResponse=function(e){var t=void 0!==e.answerType?e.answerType:this.answerTypes.FREE_FORM;e={questionText:e.questionText||"",questionId:e.questionId||"",answerText:this.limitResponseValue(e.answerText)||"",answerId:e.answerId||"",answerValue:this.limitResponseValue(e.answerValue)||"",questionNumber:e.questionNumber||"",answerNumber:e.answerNumber||"",answerType:t,isMasked:e.isMasked,isFieldDisabled:e.isFieldDisabled,isTransitionQuestion:e.isTransitionQuestion||!1},this.responsesToBeLogged[e.questionId]=e,this.save(e.questionId,e),this.exposeResponseToApi(e)},r.limitResponseValue=function(e){if(e){return Array.isArray(e)?e.map(function(e){return e.substring(0,1e4)}):e.substring(0,1e4)}},r.clearResponse=function(e){var t=o.default.underscore(e);delete this.apiData[e],delete this.apiData["_"+t],delete this.apiData._[t],delete this.responsesToBeLogged[e],this.save(e,void 0)},r.exposeResponseToApi=function(e){var t=o.default.underscore(e.questionId),n=o.default.underscore(e.answerText);this.apiData[e.questionId]=e.answerText,this.apiData["_"+t]=n,this.apiData._[t]=n},r.getResponseList=function(){var e=_.values(this.storage);return e=e.filter(function(e){return!!e}),e=_.sortBy(e,"questionNumber")},r.updateFormItemResponse=function(e,t,n){var i=this.get(e);i&&(i.isMasked&&(t="((masked{["+t+"]}masked))",n=n?"((masked{["+n+"]}masked))":i.answerValue),i.answerText=t,i.answerValue=n||i.answerValue,this.addResponse(i))},r.emptyResponses=function(){var e=_.values(this.responsesToBeLogged);return this.responsesToBeLogged={},e},r.answerTypes={FREE_FORM:1,NON_FREE_FORM:0},r.toDatapassString=function(){return _.values(this.storage).filter(function(e){return e&&!e.isTransitionQuestion}).filter(function(e){return!e.isFieldDisabled}).map(function(e){var t="- "+e.questionId+":",n=e.answerText;return t+=Array.isArray(n)?"\n"+n.map(function(e){return"    ** "+e}).join("\n"):" "+n}).join("\n")},r.toSimpleObject=function(){var e={};return _.each(this.storage,function(t){t&&!t.isTransitionQuestion&&(e[t.questionId]=t.answerText)}),e},r.getResponseValues=function(){var e={};return this.getResponseList().forEach(function(t){e[t.questionId]=t.answerValue}),e}}),define("acif/data/data-warehouse",["exports","module","../utils/hash-code","../ci/ijsf-adapter","../utils"],function(e,t,n,i,o){function r(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function s(e){this.Automaton=e.Automaton,this.Storage=e.Storage,this.CRM=e.CRM,this.isLogInProgress=!1,this.queue=this.Storage.get("dw.queue",[]),this.queue.length&&this.sendWithDebounce(),this.eventHistory=this.Storage.get("dw.eventHistory",[])}function l(e){return e=e||"guide",{type:e,automatonType:e}}function u(e){var t={};return _.each(e,function(e,n){n===y.answerTypes?t[n]=e.join(","):t[n]=Array.isArray(e)?c(e):e}),t}function c(e){return e=e.map(function(e){return encodeURIComponent(void 0!==e?e:"")}),encodeURIComponent(e.join(","))}function d(e){var t=y,n={};return _.each(e,function(e,i){var o=t[i]?t[i]:i;n[o]=e}),n}function f(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return{previous_node_id:e.id||"",previous_node_name:e.name||"",next_node_id:t.id||t,next_node_name:t.name||t}}function p(e){var t=e.chatRouter||{};return{node_id:e.id,node_name:e.name,node_type:e.type,node_is_outcome:e.isOutcomeNode,node_business_unit_id:t.businessUnit,node_agent_group_id:t.agentGroup,node_agent_attributes:t.agentAttributes,node_auto_opener:t.clientOutcome,node_redirect_url:e.redirectUrl,check_agent_availability:t.checkAgentAvailability,agents_busy_backup_node:t.agentsBusyNode,outside_hop_backup_node:t.outsideHopNode}}function h(e){if(!e)return"";var t=[];return Object.keys(e).forEach(function(n){var i=e[n];void 0!==i&&(i=m(i),t.push(encodeURIComponent(n)+","+encodeURIComponent(i)))}),t.join(";")}function m(e){return String(e).replace(/,/g,"")}var g=r(n),v=r(i);t.exports=s;var y={nodeId:"unique_node_id",nodeName:"custom.decisiontree.nodeID",questions:"custom.decisiontree.questions",questionIds:"custom.decisiontree.questionIDs",answers:"custom.decisiontree.answers",answerIds:"custom.decisiontree.answerIDs",answerNumbers:"custom.decisiontree.answersNumeric",answerTypes:"custom.decisiontree.answerTypes",nodeAttributes:"automatonNodeAttributes",automatonAttributes:"automatonAttributes",outcomeType:"automaton.outcomeType",outcomeMessage:"automaton.outcome"},b=s.prototype={constructor:s};b.automatonStarted=function(e){this.Automaton.isPreChat()&&this.triggerEngagementRequested(),this._log("started",{automatonName:this.Automaton.settings.name,automatonStartedBy:e.type+","+e.id,startedIn:"chat",countryCode:v.default.getCustomerCountryCode(),regionCode:v.default.getCustomerRegionCode()}),this.Storage.save("state.started",!0)},b.triggerEngagementRequested=function(){this._log("engagement.requested",{_domain:"engagement",evt:"requested","automaton.automatonID":this.Automaton.id,automatonType:"acif_automaton",resourceNeeded:"automaton",countryCode:v.default.getCustomerCountryCode(),regionCode:v.default.getCustomerRegionCode()})},b.getAutomatonAttr=function(e){var t="automatonAttributes."+e;return this.Automaton.Data.get(t)},b.setAutomatonAttr=function(e,t){var n="automatonAttributes."+e;return this.Automaton.Data.save(n,t)},b.removeAutomatonAttr=function(e){var t="automatonAttributes."+e;return this.Automaton.Data.save(t,void 0)},b.contentSentToCustomer=function(e,t){t.length||(t=[this.CRM.getCurrentQuestion()]);var n=t.map(function(e){return e.questionText}),i=t.map(function(e){return e.questionId}),r=p(e),a=_.extend({},r,e.nodeAttributes),s=h(a);if("object"==typeof e.automatonAttributes){var l=_.extend({},this.Automaton.Data.get("automatonAttributes"),e.automatonAttributes);this.Automaton.Data.save("automatonAttributes",l)}this.updateOutcomeType(e);var u=this.Automaton.settings.type,c=(0,o.isTerminalNode)(e),d="satisfactionSurvey"===u&&!this.Storage.get("hasTransitioned"),f=this.Automaton.node.id===this.Automaton.displayedPath[0],m=!c&&d&&!f,g=(0,o.get)(e,"automatonTransition");g&&g!==u?(this._log("transition",{transitionFrom:u,transitionTo:g,outcomeType:"Completed",outcomeMessage:this.Storage.get("outcomeMessage")}),this.Storage.save("hasTransitioned",!0)):m&&(this.ended(),this.Automaton.settings.type=e.automatonType||"guide",this.didEnd=!1,this.Storage.save("outcomeType","Refused"),this.automatonStarted({type:"automaton",id:this.Automaton.id})),this._log("contentSentToCustomer",{nodeId:e.id,nodeName:e.name,nodeAttributes:s,questions:n,questionIds:i}),c&&this.ended()},b.updateOutcomeType=function(e){var t=this.Storage.get("outcomeType");"Completed"!==t&&(t=e.isOutcomeNode?"Completed":this.Automaton.Data.get("path.length")>1?"Abandoned":"Refused",this.Storage.save("outcomeType",t))},b.customerResponded=function(e,t,n){var i=this.getResponsesToLog(),o=f(e,n),r=p(t),a=_.extend({},o,r,t.nodeAttributes),s=h(a);"satisfactionSurvey"===this.Automaton.settings.type&&this.savePostChatSurveyResponses(i),this._log("customerResponded",_.extend({nodeId:t.id,nodeName:t.name,nodeAttributes:s},i))},b.savePostChatSurveyResponses=function(e){var t=e.questions.map(function(t,n){return{question:t,answer:e.answers[n]}}),n={responses:t,agentGroup:{id:v.default.getAgentGroupId(),name:v.default.getAgentGroupName()},engagementId:v.default.getEngagementId()};inQ.Storage.set("acif.lastSurvey",n,"lifetime")},b.getResponsesToLog=function(){function e(e){t.questions.push(e.questionText),t.questionIds.push(_.dasherize(e.questionId)),t.answers.push(e.answerText),t.answerIds.push(_.dasherize(e.answerId)),t.answerTypes.push(e.answerType),t.answerNumbers.push(e.answerNumber)}var t={questionIds:[],questions:[],answerIds:[],answers:[],answerTypes:[],answerNumbers:[]},n=this.CRM.emptyResponses();return n=_.sortBy(n,"questionNumber"),n.forEach(function(t){Array.isArray(t.answerText)?t.answerText.forEach(function(n,i){var o=t.answerType,r=t.questionText,a=t.questionId;e({answerId:t.answerId[i],answerNumber:t.answerNumber[i],answerText:n,answerType:o,questionId:a,questionText:r})}):e(t)}),t},b.ended=function(e){if(!this.didEnd){this.didEnd=!0,e=e||{};var t=this.Automaton.Data,n=t.get("path");t.DW.setAutomatonAttr("nodeIdPath",n.join("."));var i=e.chatRouter||{};this._log("ended",{businessUnitID:i.businessUnit,agentGroupID:i.agentGroup,outcomeType:this.Storage.get("outcomeType"),outcomeMessage:this.Storage.get("outcomeMessage")}),this.Storage.save("state.started",!1)}},b._log=function(e,t){this._addToEventQueue(e,t),this.sendWithDebounce()},b.sendWithDebounce=function(){var e=this;clearTimeout(this.logEventsTimer),this.logEventsTimer=setTimeout(function(){e.logEventsTimer=null,e._sendEventLog()},500)},b._addToEventQueue=function(e,t){"engagement.requested"!==e&&(t=this._loadAutomatonEventData(e,t)),this.isDuplicateEvent(t)||(t.clientTimestamp=Date.now(),t.attempts=0,this.eventHistory.push(t),this.Storage.save("dw.eventHistory",this.eventHistory),t=u(t),this.queue.push(t),this.Storage.save("dw.queue",this.queue))},b._loadAutomatonEventData=function(e,t){var n=this.Automaton.settings,i=this.Automaton.Data.get("automatonAttributes"),o=l(n.type);return t=_.extend({_domain:"automaton",evt:e,acifVersion:ACIF.VERSION,automatonID:n.id,automatonType:o.automatonType,type:o.type,automatonAttributes:h(i)},t),["acifVersion","automatonID","automatonName","outcome","outcomeType"].forEach(function(e){t.hasOwnProperty(e)&&(t[e]=encodeURIComponent(t[e]))}),_.each(t,function(e,n){"undefined"===String(e)&&delete t[n]}),t=d(t)},b.isDuplicateEvent=function(e){var t=(0,g.default)(e),n=this.Storage.get("lastEventHash."+e.evt+"."+e._domain),i=t===n;return i||this.Storage.save("lastEventHash."+e.evt+"."+e._domain,t),i},b._sendEventLog=function(){if(0!==this.queue.length&&!this.isSendingEvents){var e=this.queue,t=this.Automaton.Env;this.queue=[],(t.showEvents||t.devMode)&&this.sendEventHistoryToConsole(),e.forEach(function(e){return e.attempts++});var n=this._eventStatusCallback.bind(this,e),i=this._eventStatusErrorCallback.bind(this,e);this.isSendingEvents=!0,v.default.fireCustomEvent("LogToDW",{eventList:e,callback:n,errorCallback:i}),(this.Automaton.Env.showEvents||this.Automaton.Env.devMode)&&console.log("ACIF Events LogToDW:",e)}},b._eventStatusErrorCallback=function(e){var t,n=this;(t=this.queue).unshift.apply(t,a(e)),this.Storage.save("dw.queue",this.queue),this.isSendingEvents=!1;var i=Math.min.apply(Math,a(e.map(function(e){return e.attempts})));i>=20||setTimeout(function(){n.sendWithDebounce()},1e3*i)},b._eventStatusCallback=function(e,t){this.Storage.save("dw.queue",this.queue),this.isSendingEvents=!1,this.sendWithDebounce();var n=t.responseStatus,i=this.Storage.get("dw.allEventsReportedSuccesfully",!0);i&&(i=n>=200&&n<300,this.Storage.save("dw.allEventsReportedSuccesfully",i)),$(this).trigger("onEventsReported",i)},b.sendEventHistoryToConsole=function(){var e={},t=_.last(this.eventHistory).evt;this.eventHistory.forEach(function(t,n){var i=n+1,o=i+") "+t.evt,r={};_.each(t,function(e,t){r[t]=Array.isArray(e)?e.join(","):e}),e[o]=r}),console.log("ACIF Events Log (last event: "+t+")",e)}}),define("acif/data/data",["exports","module","../utils","./data-warehouse","./customer-response-manager","./local-storage","./storage-mixin","./alerts"],function(e,t,n,i,o,r,a,s){function l(e){return e&&e.__esModule?e:{default:e}}function u(e){this.Automaton=e,this.Storage=new p.default(e),this.Alerts=new m.default(e)}var c=l(n),d=l(i),f=l(o),p=l(r),h=l(a),m=l(s);t.exports=u;var g=u.prototype={constructor:u};g.init=function(){var e=this;return this.Storage.init().then(function(t){return e.StorageClass=(0,h.default)(e),e.storage=e.StorageClass.create(e,"Automaton.Data"),e.CRM=new f.default(e),e.DW=new d.default(e),e.trigger("storageReady"),t})},g.triggerCustomerResponded=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=this.Automaton.api.getPreviousNode()||{},n=this.Automaton.node;if("exit"===e||e.isOutcomeNode||e.chatRouter){var i="object"==typeof e?e.outcomeMessage:this.Automaton.node.outcomeMessage;i=i||n.outcomeMessage||"",this.Storage.save("outcomeMessage",i)}this.DW.customerResponded(t,n,e),this.persistCustomAutomatonProperties(),this.Automaton.activeEvent=null},g.triggerStarted=function(){this.DW.automatonStarted.apply(this.DW,arguments)},g.triggerContentSentToCustomer=function(e,t){this.DW.contentSentToCustomer(e,t)},g.triggerEnded=function(e){this.DW.ended(e)},g.checkAlertConditions=function(){this.Alerts.checkAlertConditions()},g.logCustomData=function(){var e=$(this),t=e.attr("acif-element"),n=e.attr("acif-element-response"),i=e.is("[acif-log-multiple]"),o=e.attr("acif-occurence")||0;t&&n&&(i&&(o+=1,n=n+" ("+o+")",e.attr("acif-occurence",o)),this.Store.addToLogQueue("custom","custom: "+t,n))},g.persistCustomAutomatonProperties=function(){var e=this.Automaton.settings.getCustomProperties();if(Object.keys(e).length){c.default.logger.deprecate('Saving custom data on the automaton object is deprecated. To save (and get) custom data, use `api.save("key", value)` and `api.get("key")`'),this.save("automaton",e)}return e},g.on=function(e,t){var n=this.allTriggers||{},i=n[e]||[];i.push({name:e,method:t}),n[e]=i,this.allTriggers=n},g.trigger=function(e){((this.allTriggers||{})[e]||[]).forEach(function(e){e.method.call()})}}),define("acif/data/evaluator",["exports","module","../utils","../ci/ijsf-adapter"],function(e,t,n,i){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){this.totalEvaluated=0,this.responses=t;var n=Array.isArray(e)?{and:e}:e,i=this.evaluateConditional(n);this._isSatisfied=i}function a(e){return Array.isArray(e)?e.map(function(e){return a(e)}):String(e).toLowerCase()}var s=o(n),l=o(i);t.exports=r;var u=r.prototype,c={equals:"equals","==":"equals","=":"equals","===":"equals","!=":"not-equal","!==":"not-equal","contains any":"contains-any","contains none":"contains-none",contains:"contains","does not contain":"not-contain","doesn't contain":"not-contain","starts with":"starts-with","ends with":"ends-with","does not start with":"not-start-with","doesn't start with":"not-start-with","does not end with":"not-end-with","doesn't end with":"not-end-with",">":"greater-than",">=":"greater-than-or-equal-to","<":"less-than","<=":"less-than-or-equal-to","is greater than or equal to":"greater-than-or-equal-to","is greater than":"greater-than","is less than or equal to":"less-than-or-equal-to","is less than":"less-than",in:"in","not in":"not-in","is blank":"is-blank","is not blank":"is-not-blank","is not":"not-equal",is:"equals"},d=["equals","not-equal","contains-any","contains-none","contains","starts-with","not-start-with","ends-with","not-end-with","in","not in"];u.and=function(e){var t=this;return-1===_.findIndex(e,function(e){return!0!==t.evaluateConditional(e)})},u.or=function(e){var t=this;return _.findIndex(e,function(e){return t.evaluateConditional(e)})>-1},u.not=function(e){return!this.and(e)},u.nor=function(e){return!this.or(e)},u.evaluateConditional=function(e){var t=this;return s.default.tryCatch(function(){return t._evaluateConditional(e)},function(t){try{e=JSON.stringify(e,null,4)}catch(e){}s.default.console.log("Could not evaluate condition: "+e),s.default.console.log(t.stack)})},u._evaluateConditional=function(e){if(Array.isArray(e.or))return this.or(e.or);if(Array.isArray(e.and))return this.and(e.and);if(Array.isArray(e.not))return this.not(e.not);if(Array.isArray(e.nor))return this.nor(e.nor);this.totalEvaluated++;var t=r.parse(e);t||s.default.throwError(e+" is not a valid condition");var n=t.ref,i=t.operator,o=t.expected,l=this.getActualValue(n);o=this.getKeywordReference(o)||o,i=r.operators[i]?i:c[i],d.indexOf(i)>-1&&(o=a(o),l=a(l));var u=r.operators[i];if("function"==typeof u){var f=u(o,l);return f||(this.firstInvalid=e),f}return void s.default.console.log(t.operator+" is not a valid operator")},u.getActualValue=function(e){var t=this.getKeywordReference(e);if(t)return t;var n=_.findIndex(this.responses,function(t){return t.questionId.toString()===e.toString()});if(-1!==n){return t=this.responses[n].answerText}};var f={"br-name":l.default.getBusinessRuleName,"co-browse":"","agent-group-id":l.default.getAgentGroupId,"agent-group-name":l.default.getAgentGroupName,"business-unit-id":l.default.getBusinessUnitId,"business-unit-name":l.default.getBusinessUnitName},p=new RegExp("^("+Object.keys(f).join("|")+")$","i");u.getKeywordReference=function(e){if("string"==typeof e){var t=/^agent-attribute\.(.*)/i,n=e.match(t);if(n){var i=n[1];return l.default.getAgentAttr(i)}var o=e.match(p);if(o)try{var r=o[1];return f[r]()}catch(e){}}},u.isSatisfied=function(){return this._isSatisfied};var h=r.operators={};h.equals=function(e,t){return e===t},h["not-equal"]=function(e,t){return!h.equals(e,t)},h.contains=function(e,t){return t.indexOf(e)>-1},h["not-contain"]=function(e,t){return!h.contains(e,t)},h["contains-any"]=function(e,t){return _.findIndex(e,function(e){return t.match(e)})>-1},h["contains-none"]=function(e,t){return!h["contains-any"](e,t)},h["starts-with"]=function(e,t){return 0===t.indexOf(e)},h["not-start-with"]=function(e,t){return!h["starts-with"](e,t)},h["ends-with"]=function(e,t){return!!t.match(new RegExp(e+"$","i"))},h["not-end-with"]=function(e,t){return!h["ends-with"](e,t)},h["is-blank"]=function(e,t){return""===String(t||"").trim()},h["is-not-blank"]=function(e,t){return!h["is-blank"](e,t)},h.in=function(e,t){return e.indexOf(t)>-1},h["not-in"]=function(e,t){return!h.in(e,t)},h["greater-than"]=function(e,t){return Number(t)>Number(e)},h["greater-than-or-equal-to"]=function(e,t){return Number(t)>=Number(e)},h["less-than"]=function(e,t){return Number(t)<Number(e)},h["less-than-or-equal-to"]=function(e,t){return Number(t)<=Number(e)},r.parse=function(e){return"string"==typeof e?this.parse.string(e):Array.isArray(e)?this.parse.array(e):void 0},r.parse.string=function(e){var t=Object.keys(c).map(function(e){return e.replace(/\s+/g,"[\\s_-]")}).join("|"),n=new RegExp("^([\\w-\\.\\[\\]'\"]+)\\b\\s*("+t+")\\s*\\b([\\w-\\.\\[\\]'\"\\s,]+)$","i"),i=e.match(n);if(i){var o=i[1],r=i[2],a=i[3];"is"===r&&"blank"===a?(r="is-blank",a=null):"is not"===r&&"blank"===a?(r="is-not-blank",a=null):r=c[r];return!!r.match(/^(|not-)in|contains-any|contains-none$/)&&(a=a.split(/\s*,\s*/g)),{ref:o,operator:r,expected:a}}},r.parse.array=function(e){var t=e.shift(),n=e.shift(),i=e;if(i.length){n.toString().match(/^(|not-)in$/i)||(i=i[0])}else i=n,n=i instanceof RegExp?"regex":"equals";return{ref:t,operator:n,expected:i}}}),define("acif/data/index",["exports","module","./data"],function(e,t,n){e.default=function(e){return e&&e.__esModule?e.default:e}(n),t.exports=e.default}),define("acif/data/local-storage",["exports","module","../utils"],function(e,t,n){function i(e){this.Automaton=e}var o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.exports=i;var r=i.prototype={constructor:i};r.init=function(){var e=this,t=this.Automaton,n=t.utils.makePromise("local-storage initializing"),i=t.options,o=i.startedBy;return this.scope="ci"===i.context?"engagement":"tab",this.storageKey="automaton-"+t.id+"|"+o.name+"|"+i.location,parent.inQ.Storage.get(this.storageKey,this.scope,function(t,i){if(t)return n.reject(t);i?e.data=i:(e.data={},e.persist()),n.resolve(e.data)}),n},r.get=function(e,t){var n=o.default.get(this.data,e);return void 0===n&&void 0!==t&&(this.save(e,t),n=t),n},r.save=function(e,t){o.default.set(this.data,e,t),this.persist()},r.persist=_.debounce(function(){this._immediatePersist()},100),r._immediatePersist=function(){parent.inQ.Storage.set(this.storageKey,this.data,this.scope)}}),define("acif/data/storage-mixin",["exports","module"],function(e,t){function n(e){function t(e){var t=n+"::"+e;if(this.storageKey=t,this.LocalStorage=o,this.data=o.get(t),!this.data){var i={};o.save(this.storageKey,i),this.data=i}}var n=e.Automaton.hash,o=e.Storage;return t.prototype=i,t.create=function(e,n){var o=new t(n);return _.each(i,function(t,n){e[n]=t.bind(o)}),o.getAll()},t}t.exports=n;var i={};i.save=function(e,t){var n=this;if("object"==typeof e)return void _.each(e,function(e,t){n.save(t,e)});e=this.storageKey+"."+e,this.LocalStorage.save(e,t)},i.get=function(e,t){e=this.storageKey+"."+e;var n=this.LocalStorage.get(e);return void 0===n&&void 0!==t&&(this.save(e,t),n=t),n},i.getAll=function(){return this.data},i.emptyStorage=function(){this.data={},this.LocalStorage.save(this.storageKey,this.data)}}),define("acif/environment/flashvars",["exports","module","../ci/ijsf-adapter"],function(e,t,n){function i(){var e=r.default.getBrowserTypeAndVersion(),t={browserType:e[0],browserVersion:e[1],automatonDataMap:r.default.getAutomatonDataMap(),operatingSystemType:o(),agentGroupID:r.default.getAgentGroupId(),businessUnitID:r.default.getBusinessUnitId(),brName:r.default.getBusinessRuleName(),pageMarker:r.default.getPageMarker(),pageID:r.default.getPageId()};return t.brName.match(/-P-/)?t.launchType="proactive":t.brName.match(/-R-/)?t.launchType="reactive":t.launchType="unknown",t.deviceType||(t.deviceType=r.default.getDeviceType()||"unknown"),t}function o(){var e="Unknown",t=window.navigator.platform,n=window.navigator.userAgent;return/Android/.test(n)?e="Android":/iPhone/.test(n)||/iPad/.test(n)||/iPod/.test(n)?e="iOS":/Win/.test(t)?e="Windows":/Linux/.test(t)?e="Linux":/Mac/.test(t)&&(e="Mac OS"),e}var r=function(e){return e&&e.__esModule?e:{default:e}}(n);t.exports=i}),define("acif/environment/get-env-var",["exports","module","./globals"],function(e,t,n){function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=r[e];if(void 0!==n)return n;var i=o.default.window,a=new RegExp(e+"=?([^&]*|)([&#]|$)","i"),s=o.default.location.href.match(a);return n=(s?s[1]||!0:null)||(sessionStorage?sessionStorage.getItem(e):null)||(localStorage?localStorage.getItem(e):null)||i[e]||i[e.replace(/-/g,"_")],t.persist&&n&&window.sessionStorage&&sessionStorage.setItem(e,n),r[e]=n,n}t.exports=i;var o=function(e){return e&&e.__esModule?e:{default:e}}(n),r={}}),define("acif/environment/globals",["exports","module"],function(e,t){var n=void 0;try{n=window.top}catch(e){n=parent.parent}t.exports={window:n,location:n.location}}),define("acif/environment/index",["exports","module","./flashvars","./globals","./get-env-var","./is-dev-mode"],function(e,t,n,i,o,r){function a(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=e.top,n=e.frame,i=n.document,o=n===t,r=!!u.default.location.href.match("inqChat.html"),a=document.getElementById("acif-preview-container"),s=!!a,f=(0,l.default)(),p=f.deviceType||"",h=f.operatingSystemType||"",m=(0,c.default)("nuance-env")||"production";this.devMode=(0,d.default)(),this.win=u.default.window,this.flashVars=f,this.location=u.default.location,this.is_top_frame=o,this.top=t,this.document=i,this.isIE7=-1!==navigator.appVersion.indexOf("MSIE 7."),this.isIE8=void 0===document.addEventListener,this.isAndroidMobile=!(!p.match(/phone|tablet/i)||!h.match(/android/i)),this.isIOS=!!h.match(/ios/i),this.isIOS9=!!navigator.userAgent.match(/iPhone OS 9/i),this.isFF=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,this.is_touch_enabled="ontouchstart"in window,this.is_preview_mode=s,this.previewContainerEl=a,this.isPersistentWindow=r,this.dbSync=this.getDbSync(),this.dbSyncClient=this.getDbSyncClient(),this.showEvents=this.get("nuance-show-events",{persist:!0}),this.environment=m,this.isTest=!!m.match(/^test|agvsptest01/i),this.isDev=!!m.match(/^dev/i),this.isProd=!!m.match(/^prod/i)}var l=a(n),u=a(i),c=a(o),d=a(r);t.exports=s;var f=s.prototype={constructor:s};f.get=c.default,f.getDbSyncClient=function(){return(0,c.default)("tc-client-id")},f.getDbSync=function(){return(0,c.default)("tc-db-sync",{persist:!0})}}),define("acif/environment/is-dev-mode",["exports","module","./get-env-var"],function(e,t,n){var i=function(e){return e&&e.__esModule?e:{default:e}}(n),o=void 0;t.exports=function(){if(void 0!==o)return o;var e=(0,i.default)("nuance-env")||"production";return o=!!e.match(/^dev/i)}}),define("acif/environment/location",["exports","module"],function(e,t){var n;try{n=window.top.location}catch(e){n=parent.parent.location}t.exports=n}),define("acif/index",["exports","./utils/mixins","./utils","./automaton","./ci","./ci/ijsf-adapter","./automaton/utils/get-active-automatons","./utils/logger","./environment/get-env-var"],function(e,t,n,i,o,r,a,s,l){function u(e){return e&&e.__esModule?e:{default:e}}function c(){C.default.logDiagnosticInfoToServer("onStorageReady fired");var e=inQ.Storage.peek(D,"engagement");ACIF.ci=e||ACIF.ci,ACIF.onStorageReady.resolve()}function d(){C.default.logDiagnosticInfoToServer("onSkinLoaded fired"),$.when(ACIF.onStorageReady,ACIF.onConfigsReady).then(f).catch(s.logError)}function f(){C.default.logDiagnosticInfoToServer("prepareAutomatonParamsForCI fired");var e=g(),t=b(),n=(0,T.default)();ACIF.$skin=A.default.getSkin().$skin,n.forEach(function(e){ACIF.loadAutomaton(e.params,e.startedBy,null,{initializePanel:!1})}),C.default.isChatConnected()||e.filter(function(e){return!e.shouldSuppress}).forEach(function(e){ACIF.loadAutomaton(e,t)})}function p(e){setTimeout(function(){h(e)})}function h(e){var t=A.default.getSkin();if(t.$skin&&t.$skin.is(":visible")){var i=e.surveyId,o=e.context,r=void 0===o?"ci":o,a=e.location,s=void 0===a?"center":a,l={type:"survey",id:"survey"},u={automatonID:i,context:r,location:s};C.default.hideLayer("thankYou"),(0,T.default)().forEach(function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=(0,n.get)(e,"params.automatonID"),i=ACIF.getAutomatonById(t);i&&i.close()}),ACIF.loadAutomaton(u,l)}}function m(){var e=inQ.Storage.peek("acif-loaded-automatons","engagement")||{};return Object.keys(e).filter(function(t){return!1===e[t]}).map(function(e){return JSON.parse(e)})}function g(){var e=A.default.getBusinessRuleAutomatonParams(),t=m();return e.filter(function(e){var n=!0;return t.forEach(function(t){var i=e.automatonID===t.params.automatonID,o=e.context===t.params.context,r=e.location===t.params.location;i&&o&&r&&(n=!1)}),n})}function v(e,t,n){var i=e.automatonID,o=e.context,r=e.location,a=e.datapass,s=void 0===a?{}:a,l=r||null;i||w.default.throwError("'"+i+"' is not a valid automaton ID.  Likely configuration issue in the business rules."),"ci"===o&&(l=A.default.toPanelName(r));var u=A.default.getStage(o,l);return u.$container.empty(),{automatonId:i,context:o,location:r,panel:l,automatonDataMap:n||C.default.getAutomatonDataMap(),datapass:s,startedBy:t,top:parent,frame:u.frame,document:u.document,$container:u.$container,$skin:u.$skin}}function y(e,t){return JSON.stringify({params:{automatonID:e.automatonID,context:e.context,location:e.location},startedBy:t})}function b(){var e=C.default.getActiveRule()||{};return{type:"br",id:e.id,name:e.name}}var w=u(n),x=u(i),A=u(o),C=u(r),T=u(a),E=u(l),D="acif-ci",S=(0,E.default)("nuance-toolbox",{persist:!0});if(S){
var k=parent.document,I="local"===S?"http://localhost:4204/index.js":"https://agvsptest01.touchcommerce.com/toolbox/index.js";k.body.appendChild(k.createElement("script")).src=I}if(_.extend(ACIF,{VERSION:"release-5.53.5-2 -- 5892f11",frame:window,Utils:w.default,_jsonpCallbacks:{},$:$,_:_,automatons:{},loaded:{},loadedStack:[],IJSF:C.default,onStorageReady:new $.Deferred,onConfigsReady:new $.Deferred,ciPanelAutomatonMap:{}}),C.default.logDiagnosticInfoToServer("Initializing"),ACIF.onConfigsReady.then(function(){C.default.logDiagnosticInfoToServer("onConfigsReady Fired")}),function(){ACIF.EVM=ACIF.EVM||{queue:[]};var e={onStorageReady:c,onSkinLoaded:d,onLoadPostChatSurvey:p,onChatClosed:A.default.listeners.onChatClosed,onAgentMsg:A.default.listeners.onAgentMsg,onAgentDataPass:A.default.listeners.onAgentDataPass};_.extend(ACIF.EVM,e),C.default.registerIJSFListeners(e),ACIF.EVM.queue.forEach(function(t){var n=t.event,i=t.args;"function"==typeof e[n]&&e[n].apply(null,i)})}(),!ACIF.isLoadedNatively){(A.default.findInSkin('div[id$="acifCenter"]').length||A.default.findInSkin("div[data-acif-v2-frame]").length)&&d()}ACIF.loadAutomaton=function(e,t,n,i){if(i=i||{},"object"!=typeof t)throw w.default.throwError("loadAutomaton requires a `startedBy` object to be passed. Received: "+t);var o=y(e,t);if(!this.loaded[o]){var r=v(e,t,n),a=x.default.load(r);if(a.storageKey=o,"ci"===r.context){var s=ACIF.ciPanelAutomatonMap[r.panel];if(s&&s.close(),!1===i.initializePanel)A.default.reinstatePanel(r.panel);else{var l=a.getRecord(r.automatonId,"automaton");A.default.initializePanel(r,l)}}if(this.automatons.active=a,this.automatons["a"+a.id]=a,this.loaded[o]=!0,this.loadedStack.push(o),"ci"===r.context){var u=r.panel;ACIF.ciPanelAutomatonMap[u]=a}return ACIF.persistLoadedAutomatons(),C.default.logDiagnosticInfoToServer("loadAutomatonID: "+a.id),a}},ACIF.closeAutomaton=function(e){e=e||{};var t=e,n=t.automatonID,i=t.location,o=t.context,r=ACIF.getAutomatonById(n);if(!r)return w.default.console("Could not find automaton '"+n+"' to close.","error"),void C.default.sendDatapassMessage({Warning:"Agent-pushed content ID "+n+" is not available to close."});var a=r.Data.get("dependents");a&&(a.forEach(function(e){var t=JSON.parse(e),n=t.params;ACIF.closeAutomaton(n)}),r.Data.save("dependents",[]));var s=r.options.startedBy,l=y(e,s);if(this.loadedStack.splice(this.loadedStack.indexOf(l),1),r.Data.CRM.emptyStorage(),r.View.Exit.unload(e),this.loaded[l]=!1,"ci"===o){var u=A.default.toPanelName(i);ACIF.ciPanelAutomatonMap[u]=null}return ACIF.persistLoadedAutomatons(),r},ACIF.getAutomatonById=function(e){return this.automatons["a"+e]},ACIF.persistLoadedAutomatons=_.debounce(function(){var e=inQ.Storage.peek("acif-loaded-automatons","engagement");_.defaults(ACIF.loaded,e),inQ.Storage.set("acif-loaded-automatons",ACIF.loaded,"engagement"),inQ.Storage.set(D,ACIF.ci,"engagement")},100)}),define("acif/models/Automaton",["exports","module","./Model"],function(e,t,n){function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];o.default.call(this,e,t),this.loadCustomNodeProperties(),this._originalProperties=Object.keys(this).concat("_originalProperties")}var o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.exports=i;var r=i.prototype=new o.default;r.constructor=i,r._modelType="automaton",r.getCustomProperties=function(){var e={};for(var t in this){this.hasOwnProperty(t)&&-1===this._originalProperties.indexOf(t)&&(e[t]=this[t])}return e},r.extend=function(e){e&&"object"==typeof e&&_.extend(this,e)},r.loadCustomNodeProperties=function(){if(this.proto&&"object"==typeof this.proto.nodeProperties&&"object"==typeof this.nodeProperties)for(var e in this.proto.nodeProperties)this.nodeProperties[e]=_.extend({},this.nodeProperties[e],this.proto.nodeProperties[e])}}),define("acif/models/Model",["exports","module","../utils"],function(exports,module,_utils){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Model(e,t){void 0===e&&(e={});var n=_.omit(e,"default");try{n=JSON.parse(JSON.stringify(n))}catch(e){}_.extend(this,e.attributes,t,{id:e.id,_recordSource:n}),this.Automaton&&this.Automaton.Data.save&&this.Automaton.Data.save(_defineProperty({},"records."+this._modelType+"."+this.id,this.modulePath)),this.proto&&this.inheritFromPrototype()}var _Utils=_interopRequireDefault(_utils);module.exports=Model;var fn=Model.prototype={constructor:Model};fn.inheritFromPrototype=function(){this.proto=this.Automaton.getRecord(this.proto,this._modelType),"object"==typeof this.proto.transitions&&"object"==typeof this.transitions&&_.each(this.proto.transitions,function(e,t){this.transitions[t]=this.transitions[t]?[].concat(this.transitions[t]).concat(this.proto.transitions[t]):e}),_.defaults(this,this.proto)},fn.extendVersions=function(){var e=void 0,t=this.versions||this.automatons,n=this.Automaton.settings;t&&n&&t.forEach(function(t,i){var o=t[n.id]||t[n.name];void 0!==o&&(e[i]=o)}),_.extend(this,e)},fn.runHook=function(methodName,context){context=context||this,api=this.Automaton.api;var self=context,code=this[methodName]||"",hookMethodResponse=void 0;if(code)return"string"==typeof code&&(code=code.replace(/(?:\/\*(?:[\s\S]*?)\*\/)|(?:([\s;])+\/\/(?:.*)$)/gm,""),code=code.trim()),_Utils.default.tryCatch(function(){self._super=self.createSuper(methodName);var fn=void 0;"string"==typeof code?code.match(/^function\s*\([\s\S]*\}$/)?eval("fn = "+code+";"):eval("fn = function() {"+code+"};"):"function"==typeof code&&(fn=code.bind(self)),hookMethodResponse=fn.apply(context,[])},function(e){var t='Failed to evaluate the "'+methodName+'" custom code for '+self._modelType+" "+self.id+' ("'+self.name+'").\nReceived error: '+e.message;_Utils.default.console(t,"error")}),hookMethodResponse},fn.createSuper=function(e){return function(){var t=void 0;if(e?this.proto?this.proto[e]||(t='Prototype model has no "'+e+'" method.'):t="Model has no prototype model assigned":t="Custom method name not specified.",!t)return this.proto.runHook(e,this);_Utils.default.console("Error calling this._super() - "+t,"error")}},fn.get=function(e){return _Utils.default.getPropFromAlias(this,e)}}),define("acif/models/Node",["exports","module","./Model","../utils"],function(e,t,n,i){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){s.default.call(this,e,t),this.loadCustomNodeProperties(),this.validateActions()}function a(e){return!(!e||"object"!=typeof e||Array.isArray(e))}var s=o(n),l=o(i);t.exports=r;var u=new s.default;r.prototype=u,u.constructor=r,u._modelType="node",u.loadCustomNodeProperties=function(){var e=this,t=this.Automaton.nodeProperties;if("object"==typeof t){var n=(this.tags||"").toString().replace(","," ").split(/\s+/);n.push(this.type.toLowerCase()),n.forEach(function(n){t[n]&&_.extend(e,t[n])})}};var c=["closeAutomaton","console","fireAssistedEvent","fireCustomEvent","growLayer","hideLayer","loadAutomaton","position","resize","sendFormDataToAgent","sendToAgent","showLayer","shrinkLayer"];u.runCustomAction=function(e){var t=this.actions,n=this.Automaton,i=t?t[e]:null;if(!a(i))return!1;var o=i.action,r=i.params;return n.api[o].call(n,r),!0},u.validateActions=function(){var e=this.actions;return!!e&&Object.keys(e).forEach(function(t){var n=e[t];a(n)||l.default.throwError('Custom action "'+t+'" must be an object.');var i=n.action;c.indexOf(i)>-1||l.default.throwError('Unrecognized action "'+i+'" found in "'+t+'"\nSupported actions: '+c)}),!0}}),define("acif/models/Style",["exports","module","../ci/ijsf-adapter"],function(e,t,n){function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];this.css=e.replace(/{{clientMediaBaseUrl}}/g,o.default.getClientMediaBaseUrl()),_.extend(this,t)}var o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.exports=i;var r=i.prototype={constructor:i};r._modelType="style",r.addNamespace=function(e){var t=this,n=/#viewport[^{]*/gm;return(this.css.match(n)||[]).forEach(function(n){var i=n.replace(/([\.#])/gm,"$1"+e);t.css=t.css.replace(n,i)}),this},r.updateTooltipClassName=function(){var e="inq-"+this.Automaton.id+"-ui-tooltip";return this.css=this.css.replace(/#[\w-]*viewport\s+(.*\.[\w-]*tooltip)\b/g,"$1"),this.css="body ."+e+" { background: white; z-index: "+this.Automaton.View.$skin.css("z-index")+";}\n"+this.css,this},r.addToDOM=function(){var e=this.Automaton,t="tc-"+e.options.location+"-styles",n=e.Env.document;$("#"+t,n).remove();var o=i.loadStyleSheet(this.css,t,null,n);return $(o).attr("acif-automaton-id",e.id),this},r.getCSS=function(){return this.css},r.preloadImages=function(){for(var e=/url\(['"]?([^'"\)]+)['"]?\)/g,t=void 0,n=void 0;n=e.exec(this.css);)t=new Image,t.src=n[1];return this},i.loadStyleSheet=function(e,t,n,i){var o=i.createElement(n?"link":"style");return o.type="text/css",t&&(o.id=t),n?$(o).attr("href",e).attr("rel","stylesheet"):o.styleSheet?o.styleSheet.cssText=e:o.appendChild(i.createTextNode(e)),$("head",i).append(o),o}}),define("acif/transitions/TransitionEvaluator",["exports","module","../utils"],function(exports,module,_utils){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function TransitionEvaluator(e,t){this.name=e,this.Automaton=t,this.index=-1,this.entries=this.findMatchingTransitionEntries(e),this.evaluateAllEntriesPromise=new $.Deferred,this.nextEntry()}var _Utils=_interopRequireDefault(_utils);module.exports=TransitionEvaluator;var fn=TransitionEvaluator.prototype={constructor:TransitionEvaluator};fn.findMatchingTransitionEntries=function(e){var t=this.Automaton.node||{},n=t.transitions||{},i=this.Automaton.settings.transitions||{},o=[].concat(i[e]).concat(n[e]);return _.compact(o)},fn.nextEntry=function(){this.index++,this.index<this.entries.length?(this.entry=this.entries[this.index],this.evaluate()):(_Utils.default.console('Transition event "'+this.name+'" was triggered, but did not result in a node transition.'),this.evaluateAllEntriesPromise.reject())},fn.evaluate=function(){var e=this.entry;if(_.isNumber(e)||_.isString(e))return void this.chooseNode(e);var t=e.target;if(!t)return void this.nextEntry();if(e.automaton_id){if(-1===[].concat(e.automaton_id).indexOf(this.Automaton.settings.id))return void this.nextEntry()}return e.condition&&!this.conditionPassed()?void this.nextEntry():_.isBoolean(e.AA)||_.isBoolean(e.inHOP)||_.isBoolean(e.outsideHOP)||_.isBoolean(e.chatSlots)||_.isBoolean(e.queueSlots)||!!e.targetChatNode?void this.checkAgentAvailability():void this.chooseNode(t)},fn.chooseNode=function(e){if("string"==typeof e&&!_Utils.default.string.isReferenceString(e)){var t=e;switch(t){case"back":e=this.Automaton.Data.storage.previousNodeID;break;case"close":return this.Automaton.close();case"start_over":e=this.Automaton.settings.initialNode;break;default:_Utils.default.throwError('Transition keyword "'+t+'" not recognized.')}}this.evaluateAllEntriesPromise.resolve(e)},fn.conditionPassed=function(){var e=this,t=!1,n=this.entry.condition;return _Utils.default.tryCatch(function(){t=e.evaluateCondition(n)},function(t){e.onEvalFailure(t)}),t},fn.evaluateCondition=function(condition){var automaton=this.Automaton.settings,passed=!1,condFn=void 0;if("function"==typeof condition)condFn=condition;else if("string"==typeof condition)if("function"==typeof automaton[condition])condFn=automaton[condition];else if("function"==typeof this.Automaton.node[condition])condFn=this.Automaton.node[condition];else{var that=this,vars=["api = that.Automaton.api","forms = api.forms","_ = forms._"];vars=vars.map(function(e){return"\tvar "+e+";"}).join("\n"),eval("condFn = function(node) {\n"+vars+"\n\treturn ( "+condition+" );\n};")}return passed=condFn.call(this.Automaton.node,this.Automaton.node)},fn.onEvalFailure=function(e){var t="Failed to evaluate transition entry # "+(this.index+1)+' of transition event named "'+this.transitionName+'". Received error: '+e.message;_Utils.default.console(t,"error")},fn.checkAgentAvailability=function(){var e=this,t=this.entry,n=t.targetChatNode||t.target,i=this.Automaton.getRecord(n),o=_.extend({},i,t);this.Automaton.Chat.checkAA(o).then(function(n){var i=!0;if(i&&_.isBoolean(t.AA)&&(i=t.AA===n.AA),i&&_.isBoolean(t.inHOP)&&(i=t.inHOP===n.inHOP),i&&_.isBoolean(t.outsideHOP)&&(i=t.outsideHOP===n.outsideHOP),i&&_.isBoolean(t.chatSlots)){var o="online"===n.status&&!0===n.AA;i=t.chatSlots===o}if(i&&_.isBoolean(t.queueSlots)){var r="busy"===n.status&&!0===n.AA;i=t.queueSlots===r}i?e.chooseNode(t.target):e.nextEntry()})},fn.getPromise=function(){return this.evaluateAllEntriesPromise}}),define("acif/transitions/index",["exports","module","./transitions"],function(e,t,n){e.default=function(e){return e&&e.__esModule?e.default:e}(n),t.exports=e.default}),define("acif/transitions/redirect",["exports","module","../utils"],function(e,t,n){function i(e){this.Automaton=e,this.env=e.Env}function o(e,t){function n(e){return e.replace(/:.*/,":")}function i(e){return e.replace(/^(.*\/\/)([^:\/]+)(.*$)/,"$2")}function o(e){var t=e.match(/^.*\/\/.*:([^\/]*).*/);return t?t[1]:""}return n(e)===n(t)&&(i(e)===i(t)&&o(e)===o(t))}var r=function(e){return e&&e.__esModule?e:{default:e}}(n);t.exports=i;var a=i.prototype={constructor:i};a.openPopup=function(e){this.availHeight=this.env.win.screen.availHeight,this.availWidth=this.env.win.screen.availWidth;var t=this.Automaton.getProp("redirectWidth",e),n=this.Automaton.getProp("redirectHeight",e),i=Math.min(t||700,this.availWidth),a=Math.min(n||500,this.availHeight),s="left=0,top=0,width="+i+",height="+a+",toolbar=1,resizable=1,scrollbars=1",l=window.open(e.redirectUrl,"_blank",s);l?(this.popup=l,o(this.env.top.location.href,e.redirectUrl)&&this.Automaton.utils.timers.setTimeout(this.positionPopup.bind(this,e),100)):r.default.console("Popup window failed to load.","error")},a.positionPopup=function(){var e=this.availWidth,t=this.availHeight,n=this.Automaton.getProp("redirectPosition",this.node),i=this.popup,o=i.outerWidth||i.document.documentElement.offsetWidth||i.document.body.offsetWidth,r=i.outerHeight||i.document.documentElement.offsetHeight||i.document.body.offsetHeight,a=0,s=0;switch(n){case"cc":s=.5*(e-o),a=.5*(t-r);break;case"tl":a=0,s=0;break;case"bl":s=0,a=t-r;break;case"tr":a=0,s=e-o;break;case"br":a=t-r,s=e-o}i.moveTo(s,a)},a.current=function(e){var t=this.Automaton.View,n=t.Env.location.href===e.redirectUrl;e.isExitNode?n?t.Exit.closeCI():this.exitThenRedirectCurrent(e):n||(this.toggleRedirectClass(t.$viewContainer,t.NS),this.openCurrentNow(e))},a.exitThenRedirectCurrent=function(e){var t=this.Automaton.Env.win.top.document,n=t.createElement("script"),i='setTimeout(function() {location.href = "'+e.redirectUrl+'";}, 1000);';n.type="text/javascript";try{n.innerHTML=i}catch(e){n.text=i}$("body",t)[0].appendChild(n),this.Automaton.Data.DW.updateOutcomeType(e),this.Automaton.close()},a.openCurrentNow=function(e){this.Automaton.Env.location.href=e.redirectUrl},a.toggleRedirectClass=function(e,t){e.addClass(t+"redirecting"),e.find("."+t+"redirect-panel").length||$("<div>").addClass(t+"redirect-panel").appendTo(e)}}),define("acif/transitions/transitions",["exports","module","../utils","../ci/ijsf-adapter","./TransitionEvaluator","./redirect"],function(e,t,n,i,o,r){function a(e){return e&&e.__esModule?e:{default:e}}function s(e){this.Automaton=e,this.Redirect=new d.default(e)}var l=a(n),u=a(i),c=a(o),d=a(r);t.exports=s;var f=s.prototype={constructor:s};f.loadNode=function(e){var t=this;if(e.chatRouter)return void this.Automaton.Chat.resolveChatNode(e).then(function(n){var i=e.id!==n&&"node::"+e.id!==n;e=t.Automaton.getRecord(n),i?t.loadNode(e):(t.Automaton.node=e,t.Automaton.Chat.loadChatNode(e))});this.Automaton.node=e,this.Automaton.utils.timers.clearTimers(),this.Automaton.Forms.clearLastFocusedElement(),"Phone"===u.default.getDeviceType()&&u.default.resetPhoneXframe(),this.runNodeEntry(e).then(function(i){if(!i){t.updateDisplayedPath(),t.updateOutcomeType(),t.pollAgentAvailability(),t.Automaton.node.template&&t.Automaton.View.initializeNode(e),e.endSession&&(0,n.isTerminalNode)(e)&&u.default.endSession();var o=t.Automaton.View.getQuestions();t.Automaton.Data.triggerContentSentToCustomer(e,o)}})},f.runNodeEntry=function(e){var t=this.Automaton.utils.makePromise("node retransition check"),n=null;(n=this.Automaton.settings.runHook("onNodeEntry"))||(n=e.runHook("onEntry"));var i="number"==typeof n,o=i&&n!==e.id;if(i&&l.default.logger.deprecate("Hook response should be a reference string. Saw a number '"+n+"'"),l.default.string.isReferenceString(n)||o){var r=this.Automaton.getRecord(n);if(r.id!==e.id)return e=r,this.selectNextNode(e.id),t.resolve(!0),t}if(e.onFirstEntry){var a=this.Automaton.Data.storage.path;(1===a.length||_.indexOf(a,e.id)===a.length-1)&&e.runHook("onFirstEntry")}return e.onEntryTransition&&this.trigger(e.onEntryTransition).then(function(e){t.resolve(e)},function(e){t.resolve()}),!e.onEntryTransition&&!n&&t.resolve(),t},f.updateDisplayedPath=function(){var e=this.Automaton;e.displayedPath=[].concat(e.root_path).concat(e.Data.storage.path)},f.updateOutcomeType=function(){var e=this.Automaton.Data;if(1!==e.storage.path.length){var t=e.storage.outcomeType,n="Completed"===t||this.Automaton.node.isOutcomeNode?"Completed":"Abandoned";e.save("outcomeType",n)}},f.pollAgentAvailability=function(){var e=this,t=["pollAA","poll_aa","pollAgentAvailability","poll_agent_availability"],n=this.Automaton.node,i=n.get(t);if(i){var o=void 0,r=void 0,a=void 0,s=void 0,l="number"==typeof i?i:i.interval;l=Math.max(l||30,10);var u=!(i.target||i.toggleClass||i.callback);u?o="string"==typeof i.transition?i.transition:"pollAA":(r=i.target?this.Automaton.getRecord(i.target):null,a=i.toggleClass||"agents-ready",s="function"==typeof n[i.callback]?n[i.callback]:$.noop),this.Automaton.utils.timers.setInterval(function(){u?e.trigger(o):r&&e.Automaton.Chat.checkAA(r).then(function(t){var n=t.AA?"addClass":"removeClass";e.Automaton.View.$viewport[n](a),s(t)})},1e3*l)}},f.trigger=function(e){var t=this;return this.evaluate(e).then(function(n){return t.selectNextNode(n,e),n},function(e){return!1})},f.evaluate=function(e){var t=this;return new c.default(e,this.Automaton).getPromise().then(function(e){var n=t.Automaton.getRecord(e);return n.chatRouter?t.Automaton.Chat.resolveChatNode(n):e})},f.setCurrentNode=function(e,t){var n=this.Automaton,i=n.Data;i.CRM.addNodeSelection(t||e.id),i.triggerCustomerResponded(e),i.save({previousNodeID:n.node.id,currentNodeModulePath:e.modulePath}),n.node=e},f.selectNextNode=function(e,t){var n=this;l.default.benchmark("btn click").mark("selectNextNode");var i=this.Automaton,o=i.Data,r=i.View,a=i.Chat,s=i.getRecord(e);if(s.chatRouter)return i.node.onExit&&i.node.runHook("onExit"),a.resolveChatNode(s).then(function(e){s.id!==e&&"node::"+s.id!==e?n.selectNextNode(e,t):(n.setCurrentNode(s,t),a.loadChatNode(s))});var u=i.node;this.setCurrentNode(s,t);var c=o.storage.path;return c[c.length-1]!==s.id&&(c.push(s.id),o.save({path:c})),u.onExit&&u.runHook("onExit"),s.isExitNode&&s.onExit&&s.runHook("onExit"),s.isExitNode&&!s.redirectUrl?(i.Data.DW.updateOutcomeType(s),i.close()):"current"===s.redirectTarget?this.Redirect.current(s):(l.default.benchmark("btn click").mark("me.loadNode(node);"),this.loadNode(s)),"popup"===s.redirectTarget&&(this.Redirect.openPopup(s),s.isExitNode&&r.Exit.closeCI()),!1},f.getBreadcrumbs=function(){var e=this.Automaton,t=l.default.generateBreadcrumbs(e.displayedPath);return _.map(t,function(t){return e.getRecord(t)})}}),define("acif/utils/benchmark",["exports","module","../environment/is-dev-mode","./logger"],function(e,t,n,i){function o(e){return e&&e.__esModule?e:{default:e}}function r(){if(!((0,a.default)()||window.sessionStorage&&window.sessionStorage.getItem("tc_acif_benchmark"))){var e=function(){var e=function e(){return e};return{v:e.start=e.mark=e.end=e}}();if("object"==typeof e)return e.v}var t={};return function(){function e(e){return e=e||"Staring benchmark",r.startTime=r.lastMarkTime=Date.now(),r.markNum=0,this}function n(e){if(!r.startTime)return this;var t=Date.now(),n=t-r.startTime,i=t-r.lastMarkTime;return r.markNum++,r.lastMarkTime=t,e=e||"Mark: "+r.markNum,e+=", Lapsed: "+i+"ms",e+=", Total: "+n+"ms",r.marks.push({msg:e,duration:i,total:n}),this}function i(){if(r.startTime){var e=Date.now()-r.startTime,n="Benchmark: "+o+" - Total time = "+e+"ms";window.console&&console.group?console.group(n):(0,s.default)(n),r.marks.forEach(function(t,n){var i=Math.floor(1e3*t.duration/e)/10+"%";(0,s.default)(++n+") ["+i+"] "+t.msg)}),window.console&&console.groupEnd&&console.groupEnd(),delete t[o]}}var o=arguments.length<=0||void 0===arguments[0]?"anon":arguments[0],r=t[o]=t[o]||{marks:[]},a=n;return a.start=e,a.mark=n,a.end=i,a}}var a=o(n),s=o(i);t.exports=r}),define("acif/utils/cookies",["exports","module"],function(e,t){t.exports={set:function(e,t,n){var i="";if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toGMTString()}document.cookie=e+"="+t+i+"; path=/"},remove:function(e){this.set(e,null,-1)},get:function(e){if(document.cookie.length>0){var t=document.cookie.indexOf(e+"=");if(-1!==t){t=t+e.length+1;var n=document.cookie.indexOf(";",t);return-1===n&&(n=document.cookie.length),window.unescape(document.cookie.substring(t,n))}}return""}}}),define("acif/utils/events",["exports","module","./tryCatch","./logger"],function(e,t,n,i){function o(e){return e&&e.__esModule?e:{default:e}}var r=o(n),a=o(i),s={trigger:function(e){var t=Array.prototype.slice.call(arguments);t.shift(),this.handlers.forEach(function(n){"function"==typeof n[e]&&(0,r.default)(function(){n[e].apply(null,t)},function(t){var i="An error occurred in the "+e+" event handler. Received error:\n"+t.message+"\n"+n[e].toString();(0,a.default)(i,"error")})})},handlers:[],loadHandlers:function(e){this.handlers=this.handlers.concat(e)},addListener:function(e,t){var n={};n[e]=t,this.loadHandlers(n)}};t.exports=s}),define("acif/utils/get",["exports","module","./logger"],function(e,t,n){function i(e,t){if(e)try{var n=(t||"").split("."),r=n.shift(),a=e[r];return n.length?i(a,n.join(".")):a}catch(e){o.default.error(e)}}var o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.exports=i}),define("acif/utils/getAutomatonProp",["exports","module","./get"],function(e,t,n){function i(e,t){if(e&&t){var n="Automatons/automatons/"+e,i=!!require.entries[n],r=i&&require(n);return(0,o.default)(r,t)}}var o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.exports=i}),define("acif/utils/hash-code",["exports","module"],function(e,t){function n(e){if(e){"object"==typeof e?e=JSON.stringify(e):"string"!=typeof e&&(e=String(e));var t,n,i,o=0;if(0===e.length)return o;for(t=0,i=e.length;t<i;t++)n=e.charCodeAt(t),o=(o<<5)-o+n,o|=0;return o}}t.exports=n}),define("acif/utils/index",["exports","module","./isJSON","./tryCatch","./isNumber","./isTerminalNode","./string","./logger","./cookies","./underscore","./events","./throwError","./getAutomatonProp","./get","./set","./benchmark"],function(e,t,n,i,o,r,a,s,l,u,c,d,f,p,h,m){function g(e){return e&&e.__esModule?e:{default:e}}function v(e,t){t=[].concat(t);for(var n=0;n<t.length;n++)if(e.hasOwnProperty([t[n]]))return e[t[n]]}function y(){var e=$(this),t=["date","datetime","datetime-local","email","month","number","password","search","tel","text","time","week","url"];return e.is("textarea")||e.is("input")&&_.indexOf(t,$(this).attr("type"))>-1}function b(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};return String(e).replace(/[&<>"'\/]/g,function(e){return t[e]})}function w(e){var t,n,i=[];for(e=_.clone(e);e.length;)t=e.shift(),n=_.indexOf(e,t),n>-1?e=e.splice(n,e.length-n):i.push(t);return i}function x(e){return Number(e)&&!isNaN(Number(e))&&e.length<17?e=Number(e):e.match(/^true$/i)?e=!0:e.match(/^false$/i)?e=!1:(0,E.default)(e)&&(e=JSON.parse(e)),e}function A(e,t){return t.trim().split(/\s+/g).map(function(t){return e+t}).join(" ")}function C(e){return"object"==typeof e&&"function"==typeof e.then}function T(e){return C(e)?e:(new $.Deferred).resolve(e)}var E=g(n),D=g(i),S=g(o),k=g(r),I=g(a),M=g(s),N=g(l),j=g(u),F=g(c),O=g(d),P=g(f),q=g(p),R=g(h),L=g(m);t.exports={console:M.default,logger:M.default,isNumber:S.default,isTerminalNode:k.default,string:I.default,tryCatch:D.default,isJSON:E.default,cookies:N.default,underscore:j.default,events:F.default,throwError:O.default,getPropFromAlias:v,isTextbox:y,htmlEncode:b,generateBreadcrumbs:w,isPromise:C,promisify:T,smartTypeCast:x,getAutomatonProp:P.default,get:q.default,set:R.default,namespaceString:A,benchmark:(0,L.default)()}}),define("acif/utils/isJSON",["exports","module"],function(e,t){var n=function(e){try{return"object"==typeof JSON.parse(e)}catch(e){return!1}};t.exports=n}),define("acif/utils/isNumber",["exports","module"],function(e,t){var n=function(e){e=(e||"").toString();var t=!!e.match(/^\d+\.?\d?$/);return"number"==typeof e||t};t.exports=n}),define("acif/utils/isTerminalNode",["exports","module"],function(e,t){function n(e){var t=e.Automaton.View.$viewport,n=["[acif-node]","[acif-transition]","[acif-next-node]","[acif-next-transition]",'[acif-action][acif-action!="exit"]'],i=t.find(n.join(",")).filter(":visible").length,o=_.isObject(e.transitions)&&Object.keys(e.transitions).length>0;return!(i||o)}t.exports=n}),define("acif/utils/logger",["exports","../environment/is-dev-mode"],function(e,t){function n(e){o(e,"error")}Object.defineProperty(e,"__esModule",{value:!0}),e.logError=n;var i=function(e){return e&&e.__esModule?e:{default:e}}(t),o=function(){var e="tc_acif: ",t=function e(t,n){n=n||"log",e[n](t)},n=window.console=window.console||{};return t.log=void 0!==n.log?function(t){n.log(e+t)}:$.noop,t.debug=void 0!==n.debug?function(t){n.debug(e+t)}:t.log,t.error=function(i){void 0!==n.error?n.error(e+i):t.log(i);var o=i&&i.stack?i.stack:i;return inqFrame.Inq.FlashPeer.logAcifError("ACIF-ERROR: "+encodeURIComponent(o)+"; acifVersion: "+ACIF.VERSION+";")},t.warn=void 0!==n.warn?function(t){n.warn(e+t)}:t.log,(0,i.default)()&&(t.log=t.debug),t.deprecate=function(e){e="DEPRECATION NOTICE: "+e,this.warn(e)},t}();e.default=o}),define("acif/utils/mixins/index",["exports","./jquery","./underscore","./native"],function(e,t,n,i){}),define("acif/utils/mixins/jquery",["exports","../../environment"],function(e,t){var n=function(e){return e&&e.__esModule?e:{default:e}}(t);jQuery.fn.removeClassPrefix=function(e){return this.each(function(t,n){var i=_.filter(n.className.split(" "),function(t){return 0!==t.lastIndexOf(e,0)});n.className=$.trim(i.join(" "))}),this},jQuery.fn.values=function(e){var t=this.find(":input").get();return 0===arguments.length?(e={},$.each(t,function(){this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))&&(void 0===e[this.name]&&(e[this.name]=[]),e[this.name].push($(this).val()))}),e):($.each(t,function(){if(this.name&&e[this.name]){var t=e[this.name],n=$(this);if("[object Array]"!==Object.prototype.toString.call(t)&&(t=[t]),"checkbox"==this.type||"radio"==this.type){for(var i=n.val(),o=!1,r=0;r<t.length;r++)if(t[r]==i){o=!0;break}n.attr("checked",o)}else n.val(t[0])}}),this)},n.default.isIOS&&function(){var e=jQuery.fn.focus;jQuery.fn.focus=function(){return arguments.length?e.apply(this,arguments):this.trigger("touchstart").trigger("focus")}}()}),define("acif/utils/mixins/native",["exports"],function(e){Number.prototype.match=function(e){return(this+"").match(e)},function(){"use strict";if(window.getComputedStyle){var e=window.getComputedStyle;window.getComputedStyle=function(t){try{for(var n=window,i=t.ownerDocument;n!==window.top&&n.document!==i;)n=n.parent;return(n===window?e:n.getComputedStyle).apply(n,arguments)}catch(t){return e.apply(window,arguments)}}}}()}),define("acif/utils/mixins/underscore",["exports"],function(e){function t(e){return e=String(e),e.replace(/\W+/g," ").replace(/^\s+|\s+$/g,"").replace(/\s/g,"-").toLowerCase()}function n(e,t){if(void 0===e||void 0===t)return!1;if(_.isArray(e))return _.indexOf(e,t)>-1;if("string"==typeof e){var n=new RegExp(t);return!!e.match(n)}return!1}function i(e){return e=String(e),e.replace(/[\s-]+/g,"-").split("-").map(function(e){return e[0].toUpperCase()+e.slice(1).toLowerCase()}).join(" ")}function o(e){if(Array.isArray(e))e.forEach(function(e){return o(e)});else if(!e)return;return _.each(e,function(t,n){var i=r(n);delete e[n],e[i]=t,t&&"object"==typeof t&&o(t)}),e}function r(e){return e.toString().replace(/[-_\s]+(\w)/g,function(e,t){return t?t.toUpperCase():""})}_.mixin({contains:n,dasherize:t,titleCase:i,camelize:r,camelizeObject:o})}),define("acif/utils/set",["exports","module","./throwError"],function(e,t,n){function i(e,t,n){"object"!=typeof e?(0,o.default)("set() expected an object as the first argument. Received "+e):"string"!=typeof t&&(0,o.default)("set() expected a string as the second argument. Received "+t);var r=t.split("."),a=r.shift();if(r.length){i(e[a]=e[a]||{},r.join("."),n)}else e[a]=n}var o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.exports=i}),define("acif/utils/string",["exports","module"],function(e,t){t.exports={isReferenceString:function(e){return e=(e||"").toString(),new RegExp("::").test(e)}}}),define("acif/utils/throwError",["exports","module","./events","./logger"],function(e,t,n,i){function o(e){var t=new Error(e);throw t.name="ACIF Error",(0,i.logError)(t),r.default.trigger("error",t),t}t.exports=o;var r=function(e){return e&&e.__esModule?e:{default:e}}(n)}),define("acif/utils/tryCatch",["exports","module","../environment/is-dev-mode","./logger"],function(e,t,n,i){function o(e){return e&&e.__esModule?e:{default:e}}var r=o(n),a=o(i);t.exports=function(e,t){if((0,r.default)())return e();try{return e()}catch(e){if("function"==typeof t)return t(e);"string"==typeof t&&(0,a.default)(t)}}}),define("acif/utils/underscore",["exports","module"],function(e,t){function n(e){if(e)return Array.isArray(e)?e.map(n):(e=String(e),e.replace(/\W+/g," ").replace(/[^\w\s]+/g,"").trim().replace(/\s+/g," ").replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase())}t.exports=n}),define("acif/view/FieldsetView",["exports","module","../utils/throwError","../environment"],function(e,t,n,i){function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(this.el=e,this.$el=$(e),this.$inputs=this.$el.find(":input"),this.$invalids=this.$el.find("[acif-invalid]"),this.name=this.$el.attr("name")||"",this.type=this.$el.attr("type")||this.$el.attr("acif-type")||"",this.$el.removeAttr("name"),this.$el.addClass("pristine"),this.$invalids.attr("hidden","true"),this.type?this.addTypeAttributeToInputs():this.type=this.$inputs.first().attr("type")||(this.$inputs.length?this.$inputs[0].tagName.toLowerCase():""),this.type&&(this.$el.addClass(this.type+"-fieldset"),this.$el.attr("acif-field-type",this.type)),this.name?this.addNameAttributeToInputs():this.name=this.$inputs.first().attr("name"),!this.name){var t=this.$el.clone(),n=$("<div>").append(t).html();(0,a.default)("Fieldset with the content below must contain a name attribute.\n\n"+n)}this.type.match(/^select/i)&&this.$el.find("option:not([value])").each(function(){var e=$(this);e.attr("value",e.text().trim())}),this.$el.attr("acif-field-name",this.name),this.$el.is("[required]")&&(this.$inputs.first().prop("required",!0),this.$el.attr("acif-required",!0),this.$el.removeAttr("required")),this.$el.is("[acif-masked]")&&(this.$el.removeAttr("acif-masked"),this.$inputs.attr("acif-masked",!0)),this.type.match(/checkbox|radio/)&&this.wrapInputsInLabelElements()}var a=o(n),s=o(i);t.exports=r;var l=r.prototype={constructor:r};l.addTypeAttributeToInputs=function(){if(s.default.isIE8){var e=this;this.$inputs.each(function(){var t=$(this),n=t.is('[value=""]')?"":t.val(),i=$('<input type="'+e.type+'"'+(e.name?'name="'+e.name+'"':"")+"/>");n&&i.attr("value",n),t.replaceWith(i)
}),this.$inputs=this.$el.find(":input")}else this.$inputs.attr("type",this.type)},l.addNameAttributeToInputs=function(){if(s.default.isIE8&&this.type.match(/^select/i)){var e=this.$inputs.first(),t=e.html(),n=$('<select name="'+this.name+'" >'+t+"</select>");e.replaceWith(n),this.$inputs=this.$el.find(":input")}else this.$inputs.not("[name]").prop("name",this.name)},l.wrapInputsInLabelElements=function(){this.$inputs.each(function(){var e=$(this),t=e.closest("label");if(t.length||(0,a.default)("Checkbox and radio <input> elements must be wrapped in <label> elements."),!e.is("[value]")||e.is('[value=""]')){var n=t.text().trim();e.attr("value",n)}})}}),define("acif/view/FileUpload",["exports","module","../ci/ijsf-adapter"],function(e,t,n){function i(e,t){this.Automaton=t;var n=t.node,i=n.fileUpload&&n.fileUpload.messages?n.fileUpload.messages:{};this.messages={typeError:i.typeError||"Invalid file format",sizeError:i.sizeError||"File exceeds the allowed file size",badError:i.badFileError||"Bad file, may be corrupt",serverError:i.serverError||"Error occured while uploading the file",success:i.success||"The file uploaded successfully"},o.default.uploadFile(e,_.extend(this.messages,{cb:this.onUpload.bind(this)}))}var o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.exports=i,i.prototype.onUpload=function(e){var t=this.Automaton;t.api.fileUploadStatus=e,t.Transitions.trigger("fileUpload"),t.View.$skin.find("[acif-file-upload-status]").text(this.messages[e])}}),define("acif/view/NodeView",["exports","module","../utils","./FieldsetView","./formify"],function(e,t,n,i,o){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){this.node=e,this.Automaton=t,this.fieldsetViews=[];var n=this.getTemplateData(),i=void 0;this.node.template&&(i=this.Automaton.getRecord(this.node.template,"template",{data:n,Automaton:t}),this.html=i.getHTML()),this.createViewContainer(),this.enableCustomDataLogging(),this.makeModalCloseButtons(),this.$tooltips=this.$container.find("[role=tooltip]").hide()}var s=r(n),l=r(i),u=r(o);t.exports=a;var c=a.prototype={constructor:a};c.getTemplateData=function(){var e=_.clone(this.node),t=this.Automaton.api.getBreadcrumbs();return e.breadcrumbs=t.filter(function(e){return!!e.breadcrumb}),e.api=this.Automaton.api,"object"==typeof e.formify&&(e.formify=u.default.process(e.formify),this.Automaton.node.fieldsList=this.getFieldsList(e.formify)),e},c.getFieldsList=function(e){var t=this,n={};return e.fields.forEach(function(e){e.fields?function(){var i=t.getFieldsList(e);Object.keys(i).forEach(function(e){n[i[e].id]=i[e]})}():n[e.id]=e}),n},c.createViewContainer=function(){var e=this.Automaton.node,t=_.dasherize(this.node.name),n=_.dasherize(e.type),i=["view-container","acif-wrapping",t,"node-"+e.id,"node-type-"+n],o=$("<div>").html(this.html).attr("id","view-container").addClass(i.join(" ")).attr("acif-node-name",e.name).attr("acif-node-id",e.id);return this.$container=o,this.createFieldsetViews(),this.hideInputGroupErrors(),this.initializeForm(),this},c.createFieldsetViews=function(){var e=this;this.$container.find("fieldset").each(function(){var t=new l.default(this);e.fieldsetViews.push(t)})},c.hideInputGroupErrors=function(){this.$container.find("[acif-input-group-constraint]").attr("hidden","true")},c.initializeForm=function(){var e=this.$container.find("form");if(!e.length)return!1;e.addClass("form-pristine")},c.hideBackButtons=function(){return this.$container.find('[acif-action="back"]').hide(),this},c.enableCustomDataLogging=function(){var e=this.Automaton.Data;return this.$container.find("[acif-log]").each(function(){var t=$(this),n=t.attr("acif-on")||"click";t.is("[acif-log-multiple]")?t.on(n,e.logCustomData):t.one(n,e.logCustomData)}),this},c.makeModalCloseButtons=function(){var e=this;return this.$container.find(".modal-window-invalid [acif-close]").on("click",function(){e.$container.removeClass(e.NS+"invalid-form")}),this},c.addNamespace=function(e){var t=$("<div>").append(this.$container),n=["id","class","for","aria-labelledby","aria-describedby"],i=this.Automaton.getProp("skipNamespacing");n.forEach(function(n){t.find("["+n+"]").each(function(){var t=$(this),o=t.attr(n),r=s.default.namespaceString(e,o);i?t.closest(i).length||t.attr(n,r):t.attr(n,r)})})},c.addIdsToDivTags=function(){this.$container.find("div:not([id])").each(function(){$(this).attr("id",_.uniqueId("tc-"))})},c.initializeAccordionMenus=function(){this.$container.find("[role=accordion]").removeAttr("role").each(function(){var e=$(this),t=s.default.smartTypeCast,n={},i=e.attr("active"),o=e.attr("header-icon"),r=e.attr("active-header-icon"),a=e.attr("animate"),l=e.attr("collapsible"),u=e.attr("event"),c=e.attr("header"),d=e.attr("height-style");e.removeAttr("active header-icon active-header-icon animate collapsible event header height-style"),n.header=o||"ui-icon-triangle-1-e",n.activeHeader=r||"ui-icon-triangle-1-s",e.accordion({icons:n,active:void 0===i?0:i,animate:a?t(a):{},collapsible:!!l&&t(l),event:u||"click",header:c||"> li > :first-child,> :not(li):even",heightStyle:d||"auto"})})},c.initializeTooltips=function(){var e=this;this.$tooltips.each(function(){var t=$(this),n=t.attr("for"),i="#"+n,o=i?$(i,e.$container):t.prev();if(!o.length)return void ACIF.Utils.logger('Element for tooltip with id "'+n+'" not found in dom.',"error");var r=s.default.smartTypeCast,a=t.attr("show"),l=t.attr("hide"),u=t.attr("track"),c={},d=t.attr("position-my"),f=t.attr("position-at"),p=t.attr("position-of"),h=t.attr("position-collision");c.my=d||"left top+15",c.at=f||"left bottom",c.collision=h||"flipfit",c.of=c.Of?e.$container.find(p):o,c.within=e.Automaton.Env.top,a=!a||r(a),l=!l||r(l),u=!!u&&r(u),t.show().removeAttr("role for style show hide track position-my position-at position-of position-collision"),o.tooltip({items:o,position:c,show:a,hide:l,track:u,tooltipClass:"-ui-tooltip",content:$("<div>").append(t).html()})})},c.initializeDatepickers=function(){var e=this;this.$container.find("[acif-datepicker]").each(function(t,n){var i=$(n),o=i.attr("acif-datepicker");i.removeAttr("acif-datepicker");var r=s.default.get(e,"node.datepickers."+o)||{},a=_.defaults({appendTo:e.$container[0],static:!0},r,{allowInput:!0,ariaDateFormat:"F j, Y"});["onMonthChange","onOpen","onYearChange"].forEach(function(t){a[t]=function(n,i,o){e._updateFlatpickrClassNames(n,i,o,r[t])}}),a.inline&&["onReady","onValueUpdate"].forEach(function(t){a[t]=function(n,i,o){e._updateFlatpickrClassNames(n,i,o,r[t])}});var l=flatpickr(n,a);$(l.calendarContainer).find(":input").data("acif-skip-validation",!0),i.parent().css("width","100%"),i.on("blur",function(){l.close()})})},c._updateFlatpickrClassNames=function(e,t,n,i){var o=this,r=n.calendarContainer,a=$(r);a.find("[class]").each(function(e,t){$(t).attr("class").split(" ").forEach(function(e){var t=o.Automaton.View.NS,n=e.indexOf(t)<0;if(e&&n){var i=s.default.namespaceString(t,e);$("."+e,a).addClass(i)}})}),"function"==typeof i&&i(e,t,n)}}),define("acif/view/Template",["exports","module","../utils","./formify","../ci/ijsf-adapter"],function(e,t,n,i,o){function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];"string"==typeof e?this._rawHtml=e:"function"==typeof e?this._templateFn=e:this._rawHtml="\x3c!-- empty view --\x3e",_.extend(this,t)}var s=r(n),l=r(i),u=r(o);t.exports=a;var c=a.prototype={constructor:a};c._modelType="template",c.getHTML=function(){var e=this,t="Failed to render "+this.modulePath+". Received error: ";s.default.tryCatch(function(){return e._rawHtml?e.getHTMLNotPrecompiled():e.getHTMLPrecompiled()},function(e){s.default.throwError(t+e.message)}),this.html=this.html.replace(/{{clientMediaBaseUrl}}/g,u.default.getClientMediaBaseUrl());var n=$(this.html);return n=n.length>1?$("<div>").html(n):n,this.$html=n,n[0]},c.getHTMLPrecompiled=function(){var e=this,t=function(t){return e.getTemplate(t,{precompiled:!0})};this.html=this._templateFn(Object.assign({},this.data,{getSubTemplate:t}))},c.getHTMLNotPrecompiled=function(){var e=this.loadSubTemplates(this._rawHtml),t=_.template(e);this.html=t(this.data)},c.loadSubTemplates=function(e){var t=this,n=/<(div|span)([^>]*acif-template="(template::[\w-]+?|formify[-\w]*)"[^\/>]*)(?:\/>|>[^<]*<\/\1>)/gi;return e.replace(n,function(e,n,i,o){var r=t.getTemplate(o);return"<"+n+" "+i+">"+t.loadSubTemplates(r._rawHtml)+"</"+n+">"})},c.getTemplate=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=this.Automaton.getRecord(e,"template",{throws:!1});return n||(n=l.default.getTemplate(e,{precompiled:t.precompiled}),t.precompiled?n:{_rawHtml:n})}}),define("acif/view/aria",["exports","module","../utils/mixins","../utils","../ci"],function(e,t,n,i,o){function r(e){this.View=e}function a(){var e=$(this),t=e.attr("aria-describedby")||"";t=t?t.replace(/[\w-_]*invalid-[\w-_]+/g,""):null,e.attr("aria-describedby",t)}t.exports=r;var s=r.prototype={constructor:r};s.init=function(e){var t=this;this.createSpeaker(),this.View.Env.isAndroidMobile&&function(){var e=t.View.NS+"invalid",n=t;$(t.View.$viewport).on("focus","fieldset."+e+" :input",function(){n.speakErrorMessageOnFocus(this)})}()},s.createSpeaker=function(){var e=this.View.Env.document.createElement("DIV"),t=$(e),n=this.View.Env.isAndroidMobile?"presentation":"log";t.attr({id:"tc-acif-aria-speaker",role:n,"aria-live":"polite","aria-relevant":"additions"}),t.css({border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px"}),t.appendTo(this.View.$viewport),this.$speaker=t},s.enableAriaHtml=function(e){var t=this.View.Env;this.$speaker.children().hide().attr("aria-hidden",!0),e.find("button:not([type])").attr("type","button"),this.repositionAncestorLabels(e),e.find("[acif-node], [acif-transition], [acif-action]").not(":input, a, button").not(':has(":input, a, button")').each(function(){var e=$(this),n=e.html(),i=$('<button type="button"></button>'),o=$("<span></span>").html(n).appendTo(i),r=e.attr("title"),a=e.attr("aria-labelledby"),s=e.attr("aria-describedby");if(r&&(e.removeAttr("title"),t.isAndroidMobile&&(r=e.text()+". "+r),i.attr("title",r)),e.parent().is("[aria-describedby]")){var l=e.parent().attr("aria-describedby"),u=_.uniqueId("tc-");e.parent().removeAttr("aria-describedby"),o.attr("id",u),t.isAndroidMobile?a=l+" "+u:(s=l,a=u)}a&&(e.removeAttr("aria-labelledby"),i.attr("aria-labelledby",a)),s&&(e.removeAttr("aria-describedby"),i.attr("aria-describedby",s)),e.html(i)}),e.find('[role="menu"]').each(function(){$(this).find("> *").attr("role","menuitem")}),e.find("form").length&&this.enableAriaForm(e)},s.saveInitialDescribedby=function(e){e.find("[aria-describedby]").each(function(e,t){var n=$(t),i=n.attr("aria-describedby");n.data("original-aria-describedby",i)})},s.placeInitialFocusOnView=function(){var e,t=this,n=this.View.$viewport.find("[acif-aria-speak]"),r=n.text(),a=void 0;1===(0,i.get)(this,"View.Automaton.displayedPath.length")&&(a=(0,i.get)(this,"View.Automaton.settings.initialFocusElement")),a=(0,i.get)(this,"View.Automaton.node.initialFocusElement")||a,a&&(e=(0,o.findInSkin)(a)[0]),e||(e=this.getFirstSelectableElement()),e||(e=this.View.Exit.$exitButton,r=r||this.getVisibleViewportText()),this.elementToBeFocused=e;var s=this.View.Env.isIOS?5e3:500;r&&setTimeout(function(){t.speak(r)},s),this.placeFocusOnView(),this.View.Automaton.node.initialReadableElementIds&&this.enableAriaLabelledBy()},s.placeFocusOnView=function(){if(this.View.$viewport&&window){var e=this.getElementToBeFocused(),t="SAFARI"===this.View.Env.flashVars.browserType.toUpperCase()?1e3:500;this.View.Env.isIOS9&&this.speakElementToBeFocused(e),e.blur(),e.attr("data-first-focus","first-focus"),setTimeout(function(){e.focus()},t)}},s.enableAriaLabelledBy=function(){var e=this.View.NS,t=(0,i.namespaceString)(e,this.View.Automaton.node.initialReadableElementIds),n=this.getElementToBeFocused(),o=n.attr("aria-labelledby"),r=t+" "+(o||""),a=n.prop("tagName"),s=void 0,l=e+_.uniqueId();"BUTTON"!==a&&"A"!==a||(s=$("<div></div>"),s.attr("id",l),s.attr("style","position:absolute;right:-99999px;opacity:0;"),s.append(document.createTextNode(n.text())),n.prepend(s)),s&&(r=r+" "+l),n.attr("aria-labelledby",r);var u=function(){o?n.attr("aria-labelledby",o):n.removeAttr("aria-labelledby"),s&&s.remove()};"Phone"===this.View.Env.flashVars.deviceType?setTimeout(u,6e3):n.one("blur",u)},s.getElementToBeFocused=function(){return this.View.$lastFocusedElement||$(this.elementToBeFocused)},s.speakElementToBeFocused=function(e){var t=this,n=e.closest("fieldset");if(n.length){n=n.clone().appendTo(this.View.$xframe).find(":hidden").remove().end();var i=n.text().trim(),o=n.find(":input").first().is("[required],[aria-required]");if(n.remove(),i){var r=n.attr("acif-field-type")||"";i+=". "+r+" field"+(o?". required":""),setTimeout(function(){t.speak(i)},1e3)}}},s.speakErrorMessageOnFocus=function(e){var t=$(e).closest("fieldset").find("[acif-invalid]:visible").text().trim();t&&this.speak(t)},s.returnFocusToDropdown=function(e){var t=$(e);setTimeout(function(){t.blur().focus()},1e3)},s.speak=function(e){var t=this.View.Env.document.createElement("DIV"),n=$(t);n.text(e),n.appendTo(this.$speaker),setTimeout(function(){n.siblings().hide().attr("aria-hidden",!0)},1e4)},s.enableAriaForm=function(e){var t=e.find("fieldset");this.View.$viewport.find("form[aria-enabled]").removeAttr("aria-enabled");var n=this;t.each(function(){n.enableAriaFieldset(this)})},s.enableAriaFieldset=function(e){function t(){var e=$(this),t=e.attr("acif-invalid");e.attr("id","invalid-"+t+"-"+u).attr("hidden","true").attr("aria-hidden","true")}function n(){var e=this,t=$(this),n=t.closest("label");n.length||(0,i.throwError)("Radio and checkbox <input> elements must be wrapped inside <label> elements");var o,r=n.text().trim(),a=n.children(),s=a.filter(function(){return $(e).text().trim()===r});1===s.length?o=s.attr("id"):(s=$("<span>").text(r),n.empty().append(t).append(s)),o=o||_.uniqueId("tc-"),s.attr("id",o),t.attr("aria-labelledby",o)}var o=$(e);if(!o.is("[acif-aria-ignore]")){var r=o.find(":input"),a=r.first(),s=o.find("[acif-invalid]"),l=o.attr("acif-field-name")||a.attr("name")||"",u=_.dasherize(l),c=o.attr("aria-describedby"),d=u+"-label",f=d,p=a.attr("type")||o.attr("type")||"",h=o.is("[required], [aria-required]")||!!o.find(":input[required], :input[aria-required]").length,m=o.find("legend").first();if(m.length||(m=o.find("label").first().filter(function(){return 0===$(this).find(":input").length})),m.length||(0,i.throwError)('Fieldset for "'+l+'" is missing a leading <label> or <legend> element.'),!u){var g=o.clone(),v=$("<div>").append(g).html();(0,i.throwError)("Fieldset with the content below must contain a name attribute to support aria-enabled behavior.\n\n"+v)}o.removeAttr("name").removeAttr("type"),c&&(m=this.View.$viewport.find("#"+c),o.removeAttr("aria-describedby")),s.each(t),m.attr("id")||m.attr("id",d),p.match(/radio|checkbox/)&&(r.each(n),f=d+" "+a.attr("aria-labelledby"),"checkbox"===p&&"IE"===this.View.Env.flashVars.browserType&&o.attr("tabindex",0)),a.attr("aria-labelledby",f),(o.hasClass("formify-fieldset-radio")||o.hasClass("formify-scale-item"))&&(o.attr("role","radiogroup").attr("aria-labelledby",d),r.removeAttr("aria-labelledby")),r.filter("[required]").attr("aria-required","true").removeAttr("required"),this.View.Env.isAndroidMobile&&h&&function(){var e=m.text().trim();e.match(/\*$/)||m.text(e+" *")}()}},s.resetErrorMessages=function(e){var t=e.find("[acif-invalid]"),n=e.find("[aria-invalid]");t.attr("aria-hidden","true").removeAttr("role"),n.removeAttr("aria-invalid"),n.each(a)},s.makeInvalid=function(e,t){var n=e.find(":input"),i=n.first(),o=i.data("original-aria-describedby")||"",r=o+" "+t.attr("id");t.removeAttr("aria-hidden"),n.attr("aria-invalid","true"),i.attr("aria-describedby",r)},s.createScreenReaderDiv=function(e){var t=this.View.Env.document.createElement("DIV"),n=$(t).text(e);return n.css({border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px"}),n.attr("aria-hidden",!0),n},s.repositionAncestorLabels=function(e){var t=this;e.find("[aria-labelledby]").each(function(){var n=$(this),i=n.attr("aria-labelledby"),o=e.find("#"+i);if(!!n.closest(o).length){var r=_.uniqueId("tc-"),a=o.text(),s=t.createScreenReaderDiv(a);s.attr("id",r),n.attr("aria-labelledby",r),s.insertBefore(n)}})},s.getFirstSelectableElement=function(){var e=this.View.$viewport.find("[role=main]");return e=e.length?e:this.View.$viewport,this.View.getTabbables(e).first()[0]},s.getVisibleViewportText=function(){var e=this.View.$viewContainer.clone();return e.appendTo(this.View.$xframe).find(":hidden").remove().end().remove(),e.text()}}),define("acif/view/exit",["exports","module","../utils","../ci/ijsf-adapter","../ci/index"],function(e,t,n,i,o){function r(e){return e&&e.__esModule?e:{default:e}}function a(e){this.View=e,this.NS=e.NS,this.Data=e.Automaton.Data,this.Env=e.Automaton.Env,this.timers=e.Automaton.utils.timers}var s=r(n),l=r(i),u=r(o);t.exports=a;var c=a.prototype={constructor:a};c.registerExitListener=function(){var e=this;s.default.events.addListener("error",this.onError.bind(this)),l.default.addListener("onChatClosed",function(t){var n=e.View.Automaton.node;e.unload(n)}),this.$exitButton=this.getExitButton(),"satisfactionSurvey"===this.View.Automaton.settings.type&&this.$exitButton.on("click",function(){l.default.closeCI()})},c.getExitButton=function(){return(this.View.$skin.is("iframe")?this.View.Automaton.options.$container.closest("body"):this.View.$skin).find("[id$=btnCloseChat_img]")},c.unloaded=!1,c.unload=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];if(!this.unloaded){this.cleanup(),this.Data.save("currentNodeModulePath",null),this.Data.triggerEnded(e);var t=this.View.Automaton.options,n=t.context,i=t.panel,o=t.startedBy;if("ci"===n){ACIF.ciPanelAutomatonMap[location]=null;var r=!!e&&!0===e.minimize,a=u.default.isMainPanel(i),s=!!o&&"agent"===o.type;r?(l.default.minimizeStage(),u.default.closePanel(i,this.View.Automaton.Env.isPersistentWindow)):s?u.default.closePanel(i,this.View.Automaton.Env.isPersistentWindow):a&&!e.isEngagingChat?l.default.closeCI():u.default.closePanel(i,this.View.Automaton.Env.isPersistentWindow)}return!1}},c.cleanup=function(){this.unloaded=!0,this.timers.clearTimers(),this.removeListeners(),this.View.$viewport.remove(),this.View.$viewport=$("<div>"),this.View.$lightbox&&this.View.$lightbox.remove()},c.removeListeners=function(){var e="."+this.NS;l.default.updateInputListeners(this.View.Automaton.hash),$(this.Env.top).off(".inq-acif").off(e),$(this.Env.document).off(".inq-acif").off(e)},c.closeCI=function(){this.timers.clearTimers();try{l.default.closeCI()}catch(e){s.default.logger.error("Failed to close CI. Received error: "+e.message)}},c.onError=function(){this.removeListeners(),this.unloaded=!0}}),define("acif/view/formify/formify-footer",["exports","module"],function(e,t){t.exports='<footer class="formify-footer">\n  <button class="formify-submit" type="submit" <%= formify._toggle_attr %>><%= formify.submit %></button>\n</footer>'}),define("acif/view/formify/formify-header",["exports","module"],function(e,t){t.exports='<header class="formify-header" acif-aria-speak>\n    <% if (formify.heading) { %>\n    <h1 class="formify-heading"><%= formify.heading %></h1>\n    <% } %>\n    <p class="formify-heading-required">Required items indicated with *.</p>\n</header>'}),define("acif/view/formify/formify-master",["exports","module"],function(e,t){t.exports='<form class="formify-form" <%= formify._attrs %> novalidate>\n  <div class="formify-form-body" role="main">\n\n    <div acif-template="formify-header"></div>\n\n    <% _.each(formify.fields, function(field) { %>\n\n      <% if (field.fields) { %>\n        <% _.each(field.fields, function(groupItem){ %>\n          <% if (groupItem._order === 1) { %>\n            <div class="formify-group" acif-fieldset-group>\n            <h2><%= this.group %></h2>\n          <% } %>\n            <div acif-template="formify-type" acif-scope-variables="field, groupItem"></div>\n          <% if (groupItem._order === this._size) { %>\n            </div>\n          <% } %>\n        <% }, field); %>\n    <% } %>\n\n      <div acif-template="formify-type" acif-scope-variables="field"></div>\n\n    <% }); %>\n  </div>\n\n  <% if (!formify.submitOnClick) { %>\n    <div acif-template="formify-footer"></div>\n  <% } %>\n\n</form>'}),define("acif/view/formify/formify-type-checkbox",["exports","module"],function(e,t){t.exports='<fieldset class="formify-fieldset-checkbox <%= field.inline ? \'formify-fieldset-inline\' : \'\' %>" name="<%= field.id %>" acif-field-type="<%= field.type_attr %>" <%= field._attrs + field._max_attr + field._min_attr %>>\n  <legend class="formify-legend"><%= field.label %></legend>\n  <% _.each(field.options, function(rawOption) {\n    var option = {};\n    option.label = rawOption.label || rawOption;\n    option.value = rawOption.value || rawOption;\n  %>\n\n    <label class="formify-label">\n      <input class="formify-input" type="<%= field.type %>" name="<%= field.id %>" value="<%= option.value %>" />\n      <span class="formify-option-label"><%= option.label %></span>\n    </label>\n\n  <% }); %>\n  <%= field.validate._html %>\n</fieldset>'}),define("acif/view/formify/formify-type-email",["exports","module"],function(e,t){t.exports='<fieldset class="formify-fieldset-email" name="<%= field.id %>" acif-field-type="<%= field.type_attr %>" <%= field._attrs %>>\n  <label class="formify-label"><%= field.label %></label>\n  <input class="formify-input" type="<%= field.type %>" <%= field.validate._attrs + field._placeholder_attr %> />\n  <%= field.validate._html %>\n</fieldset>'}),define("acif/view/formify/formify-type-label",["exports","module"],function(e,t){t.exports='<fieldset class="formify-fieldset-label" name="<%= field.id %>" acif-field-type="<%= field._type_attr %>" <%= field._attrs %>>\n  <label class="formify-label"><%= field.label %></label>\n</fieldset>'}),define("acif/view/formify/formify-type-radio-scale",["exports","module"],function(e,t){t.exports='<div class="formify-group" acif-fieldset-group>\n  <h2><%= field.label %></h2>\n    <div class="formify-scale-row formify-scale-header">\n    <div class="formify-scale-cell formify-scale-statement"></div>\n      <% _.each(field.scale, function(rawScaleItem) {\n        var scaleItem = {};\n        scaleItem.label = rawScaleItem.label || rawScaleItem;\n        scaleItem.value = rawScaleItem.value || rawScaleItem;\n      %>\n      <div class="formify-scale-cell">\n      <%= scaleItem.label %>\n      </div>\n      <% }); %>\n    </div>\n  <% _.each(field.options, function(rawOption) {\n    var option = {};\n    option.label = rawOption.label || rawOption;\n    option.id = rawOption.id || _.dasherize(rawOption);\n  %>\n    <fieldset class="formify-scale-item" acif-field-type="radio" name="<%= option.id %>" <%= field._required_attr %>>\n      <div class="formify-scale-row">\n      <div class="formify-scale-cell formify-scale-statement">\n        <legend class="formify-legend"><%= option.label %></legend>\n      </div>\n      <% _.each(field.scale, function(rawScaleItem) {\n        var scaleItem = {};\n        scaleItem.label = rawScaleItem.label || rawScaleItem;\n        scaleItem.value = rawScaleItem.value || rawScaleItem;\n      %>\n      <label class="formify-scale-cell formify-scale-option">\n        <input class="formify-scale-input" type="radio" value="<%= scaleItem.value %>" />\n        <span class="formify-scale-label"><%= scaleItem.label %></span>\n      </label>\n      <% }); %>\n      </div>\n    </fieldset>\n  <% }); %>\n  <%= field.validate._html %>\n</div>'}),define("acif/view/formify/formify-type-radio",["exports","module"],function(e,t){t.exports='<fieldset class="formify-fieldset-radio <%= field.inline ? \'formify-fieldset-inline\' : \'\' %>"  name="<%= field.id %>" acif-field-type="<%= field.type_attr %>" <%= field._attrs %>>\n  <legend class="formify-legend"><%= field.label %></legend>\n  <% _.each(field.options, function(rawOption) {\n    var option = {};\n    option.label = rawOption.label || rawOption;\n    option.value = rawOption.value || rawOption;\n  %>\n    <label class="formify-label">\n      <input class="formify-input" type="<%= field.type %>" name="<%= field.id %>" value="<%= option.value %>" />\n      <span class="formify-option-label"><%= option.label %></span>\n    </label>\n  <% }); %>\n  <%= field.validate._html %>\n</fieldset>'}),define("acif/view/formify/formify-type-select",["exports","module"],function(e,t){t.exports='<fieldset class="formify-fieldset-select" name="<%= field.id %>" acif-field-type="<%= field.type_attr %>" <%= field._attrs %>>\n  <label class="formify-label"><%= field.label %></label>\n  <select class="formify-input" <%= field._multiple_attr + field._min_attr + field._max_attr %> >\n\n    <% if (!field.multiple) { %>\n      <option value=""><%= field.placeholder %></option>\n    <% } %>\n\n    <% _.each(field.options, function(rawOption) {\n        var option = {};\n        option.label = rawOption.label || rawOption;\n        option.value = rawOption.value || rawOption;\n    %>\n    <option value="<%= option.value %>"><%= option.label %></option>\n\n    <% }); %>\n  </select>\n  <%= field.validate._html %>\n</fieldset>'}),define("acif/view/formify/formify-type-text",["exports","module"],function(e,t){t.exports='<fieldset class="formify-fieldset-text" name="<%= field.id %>" acif-field-type="<%= field.type_attr %>" <%= field._attrs %>>\n  <label class="formify-label"><%= field.label %></label>\n  <input class="formify-input" type="<%= field.type %>" <%= field.validate._attrs + field._placeholder_attr %> />\n  <%= field.validate._html %>\n</fieldset>'}),define("acif/view/formify/formify-type-textarea",["exports","module"],function(e,t){t.exports='<fieldset class="formify-fieldset-textarea" name="<%= field.id %>" acif-field-type="<%= field.type_attr %>" <%= field._attrs %>>\n  <label class="formify-label"><%= field.label %></label>\n  <textarea class="formify-input" <%= field.validate._attrs + field._placeholder_attr %>></textarea>\n  <%= field.validate._html %>\n</fieldset>'}),define("acif/view/formify/formify-type",["exports","module"],function(e,t){t.exports='<%\n  var groupItem = groupItem ? groupItem : false;\n  var field = groupItem || field;\n%>\n\n<% if (field.type === \'text\') { %>\n\n    <div acif-template="formify-type-text" acif-scope-variables="field"></div>\n\n<% } else if (field.type === \'email\') { %>\n\n    <div acif-template="formify-type-email" acif-scope-variables="field"></div>\n\n<% } else if (field.type === \'textarea\') { %>\n\n    <div acif-template="formify-type-textarea" acif-scope-variables="field"></div>\n\n<% } else if (field.type === \'select\') { %>\n\n    <div acif-template="formify-type-select" acif-scope-variables="field"></div>\n\n<% } else if (field.type === \'radio\') { %>\n\n    <% if (field.scale) { %>\n      <div acif-template="formify-type-radio-scale" acif-scope-variables="field"></div>\n    <% } else { %>\n      <div acif-template="formify-type-radio" acif-scope-variables="field"></div>\n    <% } %>\n\n<% } else if (field.type === \'checkbox\') { %>\n\n    <div acif-template="formify-type-checkbox" acif-scope-variables="field"></div>\n\n<% } else if (field.type === \'label\') { %>\n\n    <div acif-template="formify-type-label" acif-scope-variables="field"></div>\n\n<% } %>'}),define("acif/view/formify/index",["exports","module","../../utils","./templates","./templates-precompiled"],function(e,t,n,i,o){function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=$.extend(!0,{},e);return l(t),u(t),c(t),t}function s(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=require("Automatons/templates/formify-map");if(n&&n[e]){var i=n[e];return require("Automatons/templates/"+i)}return t.precompiled?b.default[e]:y.default[e]}function l(e){_.isUndefined(e.fields)?v.default.console.error('Formify: formify object is missing "fields" array.'):e.fields.forEach(function(e){_.isUndefined(e.group)&&_.isUndefined(e.id)&&v.default.console.error('Formify: field is missing property "id".')})}function u(e){var t=e||{},n=void 0;t.submit=t.submit||"Submit",t.next=t.next||"submit",n=_.isNumber(t.next)?"acif-next-node":"acif-next-transition",t._next_attr=" "+n+'="'+t.next+'" ',t._toggle_attr="",t._submitOnClick_attr="",t.toggle&&(t._toggle_attr=" acif-toggle-disabled-submit "),t.submitOnClick&&(t._submitOnClick_attr=" acif-submit-on-click "),t._attrs=t._next_attr+t._submitOnClick_attr}function c(e){e.fields.forEach(function(e){e.fields?e.fields.forEach(function(t){e._size=e.fields.length,t._order=_.indexOf(e.fields,t)+1,d(t)}):d(e)})}function d(e){var t=e||{};f(t),p(t),h(t),m(t),g(t.validate)}function f(e){e.label=e.label||e.id,e.type=e.type||"text",e._type_attr="scale"===e.type?"radio":e.type,e.placeholder="select"===e.type?e.placeholder||"Select One&#8230;":e.placeholder||"",e._placeholder_attr=e.placeholder?' placeholder="'+e.placeholder+'" ':""}function p(e){e._required_attr="",e._dynamic_attr="",e._autoscroll_attr="",e._masked_attr="",e._omit_attr="",e._exposure_attr="",e.required&&(e._required_attr=' required class="required" '),e.dynamic&&(e.dynamic.check=e.dynamic.check||"",e.dynamic.logic=e.dynamic.logic||"equals",e.dynamic.value=e.dynamic.value||"",e._dynamic_value_prop="equals"===e.dynamic.logic?" acif-base-field-value":" acif-base-field-value-"+e.dynamic.logic,e._dynamic_attr=' acif-base-field-name="'+e.dynamic.check+'" '+e._dynamic_value_prop+'="'+e.dynamic.value+'" '),e.conditions&&(e._dynamic_attr=" acif-conditional"),e.autoscroll&&(e._autoscroll_attr=" acif-scroll-on-change "),e.masked&&(e._masked_attr=" acif-masked "),e.omit&&(e._omit_attr=" acif-omit-datapass "),e.exposureRate>-1&&(e._exposure_attr=' acif-base-exposure-rate="'+e.exposureRate+'" '),e._attrs=e._required_attr+e._dynamic_attr+e._autoscroll_attr+e._masked_attr+e._omit_attr+e._exposure_attr}function h(e){e.validate=e.validate||{},e.validate.required=e.required||"",e.validate._error_types=["required","min","max","pattern","minlength","maxlength"],e.validate._html="",e.multiple=!("select"!==e.type||!e.validate.min)||(e.multiple||!1),e._multiple_attr=e.multiple?" multiple ":"",e._pattern_attr="",e._min_attr="",e._max_attr="",e._minlength_attr="",e._maxlength_attr="",e.validate.pattern&&(e._pattern_attr=' pattern="'+e.validate.pattern+'" '),e.validate.min&&(e._min_attr=' min="'+e.validate.min+'" '),e.validate.max&&(e._max_attr=' max="'+e.validate.max+'" '),e.validate.minlength&&(e._minlength_attr=' minlength="'+e.validate.minlength+'" '),e.validate.maxlength&&(e._maxlength_attr=' maxlength="'+e.validate.maxlength+'" '),e.validate._attrs=e._pattern_attr+e._min_attr+e._max_attr+e._minlength_attr+e._maxlength_attr}function m(e){var t=e.validate;t.requiredError=t.requiredError||e.requiredError||"This is a required field",t.minError=t.minError||"You must select at least "+t.min+" options.",t.maxError=t.maxError||"You cannot select more than "+t.min+" options.",t.patternError=t.patternError||"Please enter a valid "+e.label+".",t.minlengthError=t.minlengthError||e.label+" must be at least "+t.minlength+" characters.",t.maxlengthError=t.maxlengthError||e.label+" must be at less than "+t.maxlength+" characters."}function g(e){var t="",n={required:"requiredError",min:"minError",max:"maxError",pattern:"patternError",minlength:"minlengthError",maxlength:"maxlengthError"};Object.keys(n).forEach(function(i){e[i]&&(t+='<p acif-invalid="'+i+'">'+e[n[i]]+"</p>\n")}),e._html=t}var v=r(n),y=r(i),b=r(o);t.exports={process:a,getTemplate:s}}),define("acif/view/formify/precompiled/formify-footer",["exports","module"],function(exports,module){module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){
__p+=__j.call(arguments,"")};with(obj||{})__p+='<footer class="formify-footer">\n  <button class="formify-submit" type="submit" '+(null==(__t=formify._toggle_attr)?"":__t)+">"+(null==(__t=formify.submit)?"":__t)+"</button>\n</footer>";return __p}}),define("acif/view/formify/precompiled/formify-header",["exports","module"],function(exports,module){module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<header class="formify-header" acif-aria-speak>\n    ',formify.heading&&(__p+='\n    <h1 class="formify-heading">'+(null==(__t=formify.heading)?"":__t)+"</h1>\n    "),__p+='\n    <p class="formify-heading-required">Required items indicated with *.</p>\n</header>';return __p}}),define("acif/view/formify/precompiled/formify-master",["exports","module"],function(exports,module){module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<form class="formify-form" '+(null==(__t=formify._attrs)?"":__t)+' novalidate>\n  <div class="formify-form-body" role="main">\n\n    <div  acif-template="formify-header">'+(null==(__t=getSubTemplate("formify-header")(Object.assign({},obj)))?"":__t)+" </div>\n\n    ",_.each(formify.fields,function(e){__p+="\n\n      ",e.fields&&(__p+="\n        ",_.each(e.fields,function(t){__p+="\n          ",1===t._order&&(__p+='\n            <div class="formify-group" acif-fieldset-group>\n            <h2>'+(null==(__t=this.group)?"":__t)+"</h2>\n          "),__p+='\n            <div  acif-template="formify-type">'+(null==(__t=getSubTemplate("formify-type")(Object.assign({field:e,groupItem:t},obj)))?"":__t)+" </div>\n          ",t._order===this._size&&(__p+="\n            </div>\n          "),__p+="\n        "},e),__p+="\n    "),__p+='\n\n      <div  acif-template="formify-type">'+(null==(__t=getSubTemplate("formify-type")(Object.assign({field:e},obj)))?"":__t)+" </div>\n\n    "}),__p+="\n  </div>\n\n  ",formify.submitOnClick||(__p+='\n    <div  acif-template="formify-footer">'+(null==(__t=getSubTemplate("formify-footer")(Object.assign({},obj)))?"":__t)+" </div>\n  "),__p+="\n\n</form>";return __p}}),define("acif/view/formify/precompiled/formify-type-checkbox",["exports","module"],function(exports,module){module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<fieldset class="formify-fieldset-checkbox '+(null==(__t=field.inline?"formify-fieldset-inline":"")?"":__t)+'" name="'+(null==(__t=field.id)?"":__t)+'" acif-field-type="'+(null==(__t=field.type_attr)?"":__t)+'" '+(null==(__t=field._attrs+field._max_attr+field._min_attr)?"":__t)+'>\n  <legend class="formify-legend">'+(null==(__t=field.label)?"":__t)+"</legend>\n  ",_.each(field.options,function(e){var t={};t.label=e.label||e,t.value=e.value||e,__p+='\n\n    <label class="formify-label">\n      <input class="formify-input" type="'+(null==(__t=field.type)?"":__t)+'" name="'+(null==(__t=field.id)?"":__t)+'" value="'+(null==(__t=t.value)?"":__t)+'" />\n      <span class="formify-option-label">'+(null==(__t=t.label)?"":__t)+"</span>\n    </label>\n\n  "}),__p+="\n  "+(null==(__t=field.validate._html)?"":__t)+"\n</fieldset>";return __p}}),define("acif/view/formify/precompiled/formify-type-email",["exports","module"],function(exports,module){module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<fieldset class="formify-fieldset-email" name="'+(null==(__t=field.id)?"":__t)+'" acif-field-type="'+(null==(__t=field.type_attr)?"":__t)+'" '+(null==(__t=field._attrs)?"":__t)+'>\n  <label class="formify-label">'+(null==(__t=field.label)?"":__t)+'</label>\n  <input class="formify-input" type="'+(null==(__t=field.type)?"":__t)+'" '+(null==(__t=field.validate._attrs+field._placeholder_attr)?"":__t)+" />\n  "+(null==(__t=field.validate._html)?"":__t)+"\n</fieldset>";return __p}}),define("acif/view/formify/precompiled/formify-type-label",["exports","module"],function(exports,module){module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<fieldset class="formify-fieldset-label" name="'+(null==(__t=field.id)?"":__t)+'" acif-field-type="'+(null==(__t=field._type_attr)?"":__t)+'" '+(null==(__t=field._attrs)?"":__t)+'>\n  <label class="formify-label">'+(null==(__t=field.label)?"":__t)+"</label>\n</fieldset>";return __p}}),define("acif/view/formify/precompiled/formify-type-radio-scale",["exports","module"],function(exports,module){module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="formify-group" acif-fieldset-group>\n  <h2>'+(null==(__t=field.label)?"":__t)+'</h2>\n    <div class="formify-scale-row formify-scale-header">\n    <div class="formify-scale-cell formify-scale-statement"></div>\n      ',_.each(field.scale,function(e){var t={};t.label=e.label||e,t.value=e.value||e,__p+='\n      <div class="formify-scale-cell">\n      '+(null==(__t=t.label)?"":__t)+"\n      </div>\n      "}),__p+="\n    </div>\n  ",_.each(field.options,function(e){var t={};t.label=e.label||e,t.id=e.id||_.dasherize(e),__p+='\n    <fieldset class="formify-scale-item" acif-field-type="radio" name="'+(null==(__t=t.id)?"":__t)+'" '+(null==(__t=field._required_attr)?"":__t)+'>\n      <div class="formify-scale-row">\n      <div class="formify-scale-cell formify-scale-statement">\n        <legend class="formify-legend">'+(null==(__t=t.label)?"":__t)+"</legend>\n      </div>\n      ",_.each(field.scale,function(e){var t={};t.label=e.label||e,t.value=e.value||e,__p+='\n      <label class="formify-scale-cell formify-scale-option">\n        <input class="formify-scale-input" type="radio" value="'+(null==(__t=t.value)?"":__t)+'" />\n        <span class="formify-scale-label">'+(null==(__t=t.label)?"":__t)+"</span>\n      </label>\n      "}),__p+="\n      </div>\n    </fieldset>\n  "}),__p+="\n  "+(null==(__t=field.validate._html)?"":__t)+"\n</div>";return __p}}),define("acif/view/formify/precompiled/formify-type-radio",["exports","module"],function(exports,module){module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<fieldset class="formify-fieldset-radio '+(null==(__t=field.inline?"formify-fieldset-inline":"")?"":__t)+'"  name="'+(null==(__t=field.id)?"":__t)+'" acif-field-type="'+(null==(__t=field.type_attr)?"":__t)+'" '+(null==(__t=field._attrs)?"":__t)+'>\n  <legend class="formify-legend">'+(null==(__t=field.label)?"":__t)+"</legend>\n  ",_.each(field.options,function(e){var t={};t.label=e.label||e,t.value=e.value||e,__p+='\n    <label class="formify-label">\n      <input class="formify-input" type="'+(null==(__t=field.type)?"":__t)+'" name="'+(null==(__t=field.id)?"":__t)+'" value="'+(null==(__t=t.value)?"":__t)+'" />\n      <span class="formify-option-label">'+(null==(__t=t.label)?"":__t)+"</span>\n    </label>\n  "}),__p+="\n  "+(null==(__t=field.validate._html)?"":__t)+"\n</fieldset>";return __p}}),define("acif/view/formify/precompiled/formify-type-select",["exports","module"],function(exports,module){module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<fieldset class="formify-fieldset-select" name="'+(null==(__t=field.id)?"":__t)+'" acif-field-type="'+(null==(__t=field.type_attr)?"":__t)+'" '+(null==(__t=field._attrs)?"":__t)+'>\n  <label class="formify-label">'+(null==(__t=field.label)?"":__t)+'</label>\n  <select class="formify-input" '+(null==(__t=field._multiple_attr+field._min_attr+field._max_attr)?"":__t)+" >\n\n    ",field.multiple||(__p+='\n      <option value="">'+(null==(__t=field.placeholder)?"":__t)+"</option>\n    "),__p+="\n\n    ",_.each(field.options,function(e){var t={};t.label=e.label||e,t.value=e.value||e,__p+='\n    <option value="'+(null==(__t=t.value)?"":__t)+'">'+(null==(__t=t.label)?"":__t)+"</option>\n\n    "}),__p+="\n  </select>\n  "+(null==(__t=field.validate._html)?"":__t)+"\n</fieldset>";return __p}}),define("acif/view/formify/precompiled/formify-type-text",["exports","module"],function(exports,module){module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<fieldset class="formify-fieldset-text" name="'+(null==(__t=field.id)?"":__t)+'" acif-field-type="'+(null==(__t=field.type_attr)?"":__t)+'" '+(null==(__t=field._attrs)?"":__t)+'>\n  <label class="formify-label">'+(null==(__t=field.label)?"":__t)+'</label>\n  <input class="formify-input" type="'+(null==(__t=field.type)?"":__t)+'" '+(null==(__t=field.validate._attrs+field._placeholder_attr)?"":__t)+" />\n  "+(null==(__t=field.validate._html)?"":__t)+"\n</fieldset>";return __p}}),define("acif/view/formify/precompiled/formify-type-textarea",["exports","module"],function(exports,module){module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<fieldset class="formify-fieldset-textarea" name="'+(null==(__t=field.id)?"":__t)+'" acif-field-type="'+(null==(__t=field.type_attr)?"":__t)+'" '+(null==(__t=field._attrs)?"":__t)+'>\n  <label class="formify-label">'+(null==(__t=field.label)?"":__t)+'</label>\n  <textarea class="formify-input" '+(null==(__t=field.validate._attrs+field._placeholder_attr)?"":__t)+"></textarea>\n  "+(null==(__t=field.validate._html)?"":__t)+"\n</fieldset>";return __p}}),define("acif/view/formify/precompiled/formify-type",["exports","module"],function(exports,module){module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";var groupItem=groupItem||!1,field=groupItem||field;__p+="\n\n","text"===field.type?__p+='\n\n    <div  acif-template="formify-type-text">'+(null==(__t=getSubTemplate("formify-type-text")(Object.assign({field:field},obj)))?"":__t)+" </div>\n\n":"email"===field.type?__p+='\n\n    <div  acif-template="formify-type-email">'+(null==(__t=getSubTemplate("formify-type-email")(Object.assign({field:field},obj)))?"":__t)+" </div>\n\n":"textarea"===field.type?__p+='\n\n    <div  acif-template="formify-type-textarea">'+(null==(__t=getSubTemplate("formify-type-textarea")(Object.assign({field:field},obj)))?"":__t)+" </div>\n\n":"select"===field.type?__p+='\n\n    <div  acif-template="formify-type-select">'+(null==(__t=getSubTemplate("formify-type-select")(Object.assign({field:field},obj)))?"":__t)+" </div>\n\n":"radio"===field.type?(__p+="\n\n    ",field.scale?__p+='\n      <div  acif-template="formify-type-radio-scale">'+(null==(__t=getSubTemplate("formify-type-radio-scale")(Object.assign({field:field},obj)))?"":__t)+" </div>\n    ":__p+='\n      <div  acif-template="formify-type-radio">'+(null==(__t=getSubTemplate("formify-type-radio")(Object.assign({field:field},obj)))?"":__t)+" </div>\n    ",__p+="\n\n"):"checkbox"===field.type?__p+='\n\n    <div  acif-template="formify-type-checkbox">'+(null==(__t=getSubTemplate("formify-type-checkbox")(Object.assign({field:field},obj)))?"":__t)+" </div>\n\n":"label"===field.type&&(__p+='\n\n    <div  acif-template="formify-type-label">'+(null==(__t=getSubTemplate("formify-type-label")(Object.assign({field:field},obj)))?"":__t)+" </div>\n\n"),__p+=""}return __p}}),define("acif/view/formify/templates-precompiled",["exports","module","./precompiled/formify-master","./precompiled/formify-footer","./precompiled/formify-header","./precompiled/formify-type","./precompiled/formify-type-checkbox","./precompiled/formify-type-email","./precompiled/formify-type-label","./precompiled/formify-type-radio","./precompiled/formify-type-radio-scale","./precompiled/formify-type-select","./precompiled/formify-type-text","./precompiled/formify-type-textarea"],function(e,t,n,i,o,r,a,s,l,u,c,d,f,p){function h(e){return e&&e.__esModule?e:{default:e}}var m=h(n),g=h(i),v=h(o),y=h(r),b=h(a),_=h(s),w=h(l),x=h(u),A=h(c),C=h(d),T=h(f),E=h(p);t.exports={formify:m.default,"formify-footer":g.default,"formify-header":v.default,"formify-type":y.default,"formify-type-checkbox":b.default,"formify-type-email":_.default,"formify-type-label":w.default,"formify-type-radio":x.default,"formify-type-radio-scale":A.default,"formify-type-select":C.default,"formify-type-text":T.default,"formify-type-textarea":E.default}}),define("acif/view/formify/templates",["exports","module","./formify-master","./formify-footer","./formify-header","./formify-type","./formify-type-checkbox","./formify-type-email","./formify-type-label","./formify-type-radio","./formify-type-radio-scale","./formify-type-select","./formify-type-text","./formify-type-textarea"],function(e,t,n,i,o,r,a,s,l,u,c,d,f,p){function h(e){return e&&e.__esModule?e:{default:e}}var m=h(n),g=h(i),v=h(o),y=h(r),b=h(a),_=h(s),w=h(l),x=h(u),A=h(c),C=h(d),T=h(f),E=h(p);t.exports={formify:m.default,"formify-footer":g.default,"formify-header":v.default,"formify-type":y.default,"formify-type-checkbox":b.default,"formify-type-email":_.default,"formify-type-label":w.default,"formify-type-radio":x.default,"formify-type-radio-scale":A.default,"formify-type-select":C.default,"formify-type-text":T.default,"formify-type-textarea":E.default}}),define("acif/view/forms",["exports","module","../utils","../data/evaluator"],function(e,t,n,i){function o(e){return e&&e.__esModule?e:{default:e}}function r(e){this.Automaton=e,this.View=e.View,this.errors={},this.serializedValuesArray=null,this.NS=this.View.NS,this.onChange=_.throttle(this.onChange.bind(this))}var a=o(n),s=o(i);t.exports=r;var l=r.prototype={constructor:r};l.submitOnClick=function(e){var t=$(e);t.find("input").prop("checked",!0);var n=t.closest("form")[0];this.submitForm(n)},l.submitForm=function(e){var t=this,n=this.Automaton.Transitions,i=$(e),o=i.attr("acif-next-node"),r=i.attr("acif-next-transition"),s=this.NS;o||r||a.default.throwError('Form element is missing one of the following required attributes: "acif-next-node" or "acif-next-transition".  See Confluence documentation.'),this.errors={},this.serializedValuesArray=i.serializeArray(),this.validateAllFields(i);var l=Object.keys(this.errors);if(!!l.length){var u=this.View.$viewport.find("."+s+"invalid :input, ."+s+"invalid:input"),c=u.first();c.focus(),this.View.$viewContainer.scrollTop(0);var d=c.closest("fieldset").position();return d&&this.View.$viewContainer.scrollTop(d.top),a.default.console("Form had errors in these fields: "+l.join(", "))}a.default.promisify(this.Automaton.node.runHook("onFormSubmit")).then(function(e){t.Automaton.Data.checkAlertConditions(),r&&(o=n.evaluate(r)),a.default.isPromise(o)?o.then(function(e){n.selectNextNode(e)}):n.selectNextNode(o)}).catch(function(){})},l.validateAllFields=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=this;e.find(":input:data(acif-original-input)").not(function(){return!!$(this).closest("[acif-field-enabled=no]").length}).not(":data(acif-skip-validation)").not("button, input[type=submit]").not("[type=radio]:not(:checked)").each(function(){n.validateField(this,t)}),e.find("fieldset").not(function(){return!!$(this).closest("[acif-field-enabled=no]").length}).has("[type=radio]:data(acif-original-input)").not(":has(:checked)").each(function(){n.validateField(this,t)})},l.validateField=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=$(e),i=n.closest("form"),o=n.attr("acif-input-group");o?this.validateInputGroup(o,i,t):this.validateIndividualField(n,t)},l.validateIndividualField=function(e,t){var n=t.existingError||"",i=this.getAttributes(e),o=e.is(a.default.isTextbox),r=e.closest("form"),s=!!e.attr("acif-input-group"),l=!(e.val()&&e.val().trim().length);s&&l||n||(o?n=this.validateTextField(e,i):e.is("select")?n=this.validateSelect(e,i):e.has("input[type=radio], input[type=checkbox]")&&(n=this.validateCheckbox(i),e=e.closest("fieldset").add(this.View.$viewport.find('form fieldset[acif-field-name="'+name+'"]')).first()));var u=e.closest("fieldset");t.validateFieldsSilently||this.clearFieldErrors(u,i),n?(t.validateFieldsSilently||(this.markFieldInvalid(r,u,i,n),this.markFormInvalid(r)),this.disableAcifToggleDisabledSubmit(r)):t.validateFieldsSilently||this.markFieldAsValid(r,u,i),this.Automaton.Data.CRM.addResponse(i.response)},l.validateInputGroup=function(e,t){var n=this,i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],o=!1,r=t.find('[acif-input-group="'+e+'"]');t.find('[acif-input-group-constraint="'+e+'"]').each(function(e,t){var n=$(t),i=parseInt(n.attr("max")),a=parseInt(n.attr("min")),s=r.filter(function(e,t){return $(t).val().trim().length>0}),l=!isNaN(a)&&s.length<a,u=!isNaN(i)&&s.length>i;l||u?(o=!0,n.removeAttr("hidden")):n.attr("hidden","true")}),r.each(function(e,t){var r=o?"group":"";i.existingError=r,n.validateIndividualField($(t),i)})},l.validateTextField=function(e,t){return t.required&&""===t.value?"required":"email"!==t.type||this.isValidEmail(t.value)?t.pattern&&!this.isValidPattern(t)?"pattern":t.min&&1*t.value<t.min?"min":t.max&&1*t.value>t.max?"max":t.minlength&&t.value.length<t.minlength?"minlength":t.maxlength&&t.value.length>t.maxlength?"maxlength":void 0:"pattern"},l.validateSelect=function(e,t){var n=e.parent().values();return n=n[t.name][0],t.required&&!n?"required":t.min&&n.length<t.min?"min":t.max&&n.length>t.max?"max":void 0},l.validateCheckbox=function(e){var t=null===e.value?[]:[].concat(e.value);return e.required&&0===t.length?"required":e.min&&t.length<e.min?"min":e.max&&t.length>e.max?"max":void 0},l.markFieldInvalid=function(e,t,n,i){var o=this.View,r=o.NS,a=o.$viewContainer,s=_.dasherize("invalid-"+n.name+"-"+i);this.errors[n.name]=!0,a.addClass(r+s),t.removeClass(r+"valid").addClass(r+"invalid").addClass(r+"invalid-"+i);var l=void 0;l="group"===i?e.find('[acif-input-group-constraint="'+n.inputGroupName+'"]:visible'):t.find('[acif-invalid="'+i+'"]'),l.removeAttr("hidden"),this.View.isAriaEnabled&&this.View.Aria.makeInvalid(t,l)},l.clearFieldErrors=function(e,t){var n=this.NS,i=this.View,o=e.find("[acif-invalid]");i.$viewContainer.removeClassPrefix(n+"invalid-"+_.dasherize(t.name)+"-"),e.removeClassPrefix(n+"invalid-"),o.attr("hidden","true"),i.isAriaEnabled&&i.Aria.resetErrorMessages(e)},l.markFieldAsValid=function(e,t,n){var i=this.NS,o=n.name;delete this.errors[o],t.removeClass(i+"invalid").addClass(i+"valid"),this.addValidationClassesToForm(e)},l.addValidationClassesToForm=function(e){_.isEmpty(this.errors)?this.allVisibleRequiredFieldsHaveValue()&&this.markFormAsValid(e):(this.markFormInvalid(e),this.disableAcifToggleDisabledSubmit(e))},l.markFormInvalid=function(e){var t=this.NS;this.View.$viewContainer.addClass(t+"invalid-form"),e.removeClass(t+"form-pristine").removeClass(t+"form-dirty").removeClass(t+"valid-form").addClass(t+"form-invalid")},l.disableAcifToggleDisabledSubmit=function(e){e.find("[acif-toggle-disabled-submit]").attr("disabled",!0)},l.markFormAsValid=function(e){var t=this.NS,n=e.find("[acif-toggle-disabled-submit][disabled]");this.View.$viewContainer.removeClass(t+"invalid-form"),n.removeAttr("disabled"),e.removeClass(t+"form-pristine").removeClass(t+"form-dirty").removeClass(t+"form-invalid").addClass(t+"valid-form")},l.allVisibleRequiredFieldsHaveValue=function(){var e=this.View.$viewContainer,t=e.find(":input").not(function(){return!!$(this).closest("[acif-field-enabled=no]").length}).filter("[required], [aria-required]"),n=!0;return t.each(function(){var t=void 0;if($(this).is("select"))t=$(this).find(":selected").length>0&&!!$(this).find(":selected").val().trim();else if($(this).is("[type=radio]")){var i=$(this).prop("name");t=e.find('[name="'+i+'"]:checked').val()}else t=!!$(this).val().trim();if(!t)return n=!1,!1}),n},l.getSerializedValuesArray=function(){return this.serializedValuesArray||(this.serializedValuesArray=this.Automaton.View.$viewport.find("form").serializeArray()),this.serializedValuesArray},l.toggleFields=function(e){var t=this,n=this.View.$viewContainer.find("form"),i=!1;return e=e||$("[acif-base-field-name]",n),e.length||(e=$("[acif-conditional]",n)),e.each(function(){var e=$(this),o=void 0;if(e.is("[acif-conditional]")){var r=e.attr("acif-field-name"),a=t.Automaton.node.fieldsList[r],l=t.Automaton.Data.CRM.getResponseList();o=new s.default(a.conditions,l).isSatisfied()}else o=t.shouldShowElement(e,n);var u=!t.View.$viewport.find(e).length;o?(u||e.is(":hidden"))&&(i=!0,e.show().attr("acif-field-enabled","yes")):(u||t.resetField(this),i=!0,e.hide().attr("acif-field-enabled","no"))}),this.validateAllFields(n,{validateFieldsSilently:!0}),i},l.shouldShowElement=function(e,t){var n=!1,i=e.attr("acif-base-field-name"),o=$.trim(e.attr("acif-base-field-value")||""),r=$.trim(e.attr("acif-base-field-value-any")||""),a=$.trim(e.attr("acif-base-field-value-all")||""),s=$.trim(e.attr("acif-base-field-value-contains")||""),l=$.trim(e.attr("acif-base-field-value-not")||""),u=t.find('[acif-field-name="'+i+'"]'),c=u.values(),d=c[i],f=/\s*;\s*/g;return o?n=d==o:r?(r=r.split(f),n=!!_.intersection(d,r).length):a?(a=a.split(f),n=_.intersection(d,a).length===a.length):s?(d&&1===d.length&&(d=d[0]),n=_.contains(d,s)):l&&(l=l.split(f),n=!_.intersection(l,d).length),n},l.throttleElements=function(){var e=this.View.$viewContainer.find("form");$("[acif-base-exposure-rate]",e).each(function(){var e=$(this),t=!1,n=e.attr("acif-base-exposure-rate")||"",i=_.random(99)+1;n&&(t=i<=n),t||(e.hide().attr("acif-field-enabled","no"),e.removeAttr("acif-base-field-name"))})},l.markOriginalInputs=function(){this.View.$viewport.find(":input").data("acif-original-input",!0)},l.resetField=function(e){var t=this,n=$(e),i=n.find("fieldset");if(i.length)return i.each(function(){t.resetField(this)});var o=n.attr("acif-field-name")||n.find(":input").first().attr("name"),r=n.find(":input"),a=r.first(),s=n.attr("acif-field-type")||a.attr("type")||"",l=this.NS;s.match(/radio|checkbox/)?r.prop("checked",!1):a.is("select")?a.prop("selectedIndex",0):r.val(""),n.removeClass(l+"valid").removeClass(l+"invalid"),$("[aria-invalid]",n).removeAttr("aria-invalid"),$("[acif-invalid]",n).attr("aria-hidden",!0).attr("hidden",!0),n.is("[acif-base-field-name]")&&n.hide().attr("acif-field-enabled","no"),this.Automaton.Data.CRM.clearResponse(o),$('[acif-base-field-name="'+o+'"]',this.Automaton.View.$viewContainer).each(function(){var e=$(this);e.is("fieldset")?t.resetField(e):e.find("fieldset").each(function(){t.resetField(this)})})},l.onFocus=function(e){var t=this.NS,n=$(e),i=n.closest("fieldset");this.Automaton.View.$lastFocusedElement=n,i.addClass(t+"focus").removeClass(t+"pristine").removeClass(t+"filled").removeClass(t+"empty").removeClass(t+"blurred"),n.closest("form").removeClass(t+"form-pristine").removeClass(t+"valid-form").addClass(t+"form-dirty")},l.onBlur=function(e){var t=this.NS,n=$(e).closest("fieldset"),i=""!==e.value,o=i?"filled":"empty";n.removeClass(t+"focus").addClass(t+"blurred").addClass(t+o)},l.onChange=function(e){this.serializedValuesArray=null,this.validateField(e);var t=$(e),n=t.attr("name"),i=t.scrollParent(),o=i.scrollTop(),r=this.Automaton.View.$viewport.find('form [acif-base-field-name="'+n+'"]'),a=t.closest("[acif-scroll-on-change]"),s=a.offset();r.length||(r=this.Automaton.View.$viewport.find("form [acif-conditional]"));var l=this.toggleFields(r);i.scrollTop(o),l&&a.length&&this.scrollToTop(a,s)},l.storeCurrentValue=function(e){var t=$(e);t.attr("acif-original-value",t.val())},l.fireOnChangeManually=function(e){var t=this,n=$(e);setTimeout(function(){n.val()!==n.attr("acif-original-value")&&t.onChange(e)},0)},l.toggleCheckbox=function(e){this.View.Env.isIOS&&this.onFocus(e);var t=$(e);t.is(":checked")?t.attr("checked","checked"):t.removeAttr("checked")},l.scrollToTop=function(e,t){var n=e.scrollParent(),i=n.scrollTop(),o=n.height(),r=e.offset().top,a=o-(r+e.height()),s=n[0].scrollHeight,l=s-o,u=s-(o+i),c=Math.min(u,l,r);(c>100||a<100)&&(r-c<t.top?n.animate({scrollTop:i+=c},500):n.scrollTop(i+c))},l.clearLastFocusedElement=function(){this.Automaton.View.$lastFocusedElement=null},l.isValidEmail=function(e){return"string"==typeof e&&/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},l.isValidPattern=function(e){var t=/^\/([\w\W]*)\/([gimuy]*)$/.exec(e.pattern)||[],n=t[1]||e.pattern,i=t[2]||"gim",o=new RegExp("^"+n+"$",i);return!!e.value.match(o)},l.getAttributes=function(e){var t=this,n=$(e);n.is(":input")||n.is("fieldset")||a.default.throwError("Forms.getAttributes() expected an input or fieldset to be passed.");var i=this.Automaton.Data.CRM.answerTypes,o=n.closest("fieldset"),r=o.closest("form"),s=o.find(":input"),l=n.is(":input")?n:s.first(),u=l.attr("type")||o.attr("acif-field-type")||l[0].tagName.toLowerCase(),c=!!u.match(/^(radio|checkbox)$/),d=l.attr("name")||o.attr("acif-field-name"),f=this.Automaton.node.fieldsList||{},p=f[d]||{},h=o.find("legend, label").first(),m=p.label||h.data("original-text")||"";m=m.replace(/\*+$/,"");var g=r.find("fieldset").index(o)+1,v=o.find(":input").index(l)+1,y=l.is("[required], [aria-required]")||o.is("[required], [aria-required], [acif-required]"),b="no"===o.attr("acif-field-enabled"),w=l.is("[multiple]")||o.is("[multiple]"),x="checkbox"===u||w,A=!u.match(/^(radio|checkbox|select|button)$/),C=l.is("[acif-masked]")||o.is("[acif-masked]"),T=c?l.is(":checked")?l.val():null:$.trim(l.val()||""),E=null===T?null:c?l.closest("label").data("original-text")||l.closest("label").text().trim():T;if("select"===u){var D=l.find("option"),S=D.filter('[value="'+T+'"]');v=D.index(S)}else x&&function(){var e=t.getSerializedValuesArray(),n=_.where(e,{name:d});T=_.pluck(n,"value"),E=T;var i=[];s.each(function(){var e=$(this).closest("label").text().trim();i.push(e)}),v=E.map(function(e){return i.indexOf(e.trim())+1}).sort()}();var k={type:u,name:d,value:T,multiple:w,required:y,min:1*(l.attr("min")||o.attr("min")),max:1*(l.attr("max")||o.attr("max")),inputGroupName:l.attr("acif-input-group"),minlength:1*l.attr("minlength"),maxlength:1*l.attr("maxlength"),pattern:l.attr("pattern")};C&&(E="((masked{["+E+"]}masked))",T="((masked{["+T+"]}masked))");var I={questionText:m,questionId:d,answerText:E,answerId:A?"":T,answerType:A?i.FREE_FORM:i.NON_FREE_FORM,answerValue:T,questionNumber:g,answerNumber:v,isFieldDisabled:b,isMasked:C};return k.response=I,k}}),define("acif/view/index",["exports","module","./view"],function(e,t,n){e.default=function(e){return e&&e.__esModule?e.default:e}(n),t.exports=e.default}),define("acif/view/position",["exports","module","../utils","../ci/ijsf-adapter"],function(e,t,n,i){function o(e){return e&&e.__esModule?e:{default:e}}function r(e){this.View=e,this.Env=e.Env}function a(e){var t=["upper_left","upper_center","upper_right","center_left","center","center_right","lower_left","lower_center","lower_right"],n=e.toLowerCase().replace(/[-\s]+/,"_").replace("top","upper").replace("bottom","lower").replace("middle","center").replace("center_center","center");if(-1===_.indexOf(t,n)){var i='"'+n+'" is not a valid CI position keyword. The 9 valid position keywords are: ['+t.join(", ")+']. Defaulting to "center" position.';l.default.console(i,"error"),n="center"}return n}function s(e){if(e=e instanceof jQuery?e[0]:e,!!!e.tagName)return!0;var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=$(this.Env.top).height()&&t.right<=$(this.Env.top).width()}var l=o(n),u=o(i);t.exports=r;var c=r.prototype={constructor:r};c.set=function(e){if("Phone"!==this.Env.flashVars.deviceType&&!this.Env.isPersistentWindow){if(!e)return void this.repositionInsideViewport();var t=[];if(_.has(e,"x")&&_.has(e,"y")||_.has(e,"top")&&_.has(e,"left")){var n=e.x||e.left,i=e.y||e.top;if(_.isString(n)&&_.isString(i))t=[a(i+"_"+n)];else if(_.isNumber(n)&&_.isNumber(i))t=[e.type||"relative",n,i];else{var o="The x and y coordinates were unrecognized. You passed: x = "+n+", y = "+i+". Defaulting to center position.";l.default.console(o,"error"),t=["center"]}}else if("string"==typeof e)t=[a(e)];else{if(!(e.my||e.at||e.of))return void l.default.console("Unrecognized position settings.  Skipping CI positioning","error");t=this.getCustomPositionSettings(e)}var r=function(){u.default.moveStage.apply(null,t)};if(e.didScroll)setTimeout(r,550);else{var s=this.View.$skin.position();r(),e&&e.animate&&!this.Env.is_preview_mode&&this.animate(s,e,t)}}},c.fit=function(){if("Phone"!==this.Env.flashVars.deviceType&&!this.Env.isPersistentWindow&&!u.default.isMinimized()){var e=this.View.$skin.position();u.default.moveStage("lower_right");var t=this.View.$skin.position(),n=Math.min(e.left,t.left),i=Math.min(e.top,t.top);u.default.moveStage("absolute",n,i)}},c.getCustomPositionSettings=function(e){var t=this.Env.top.document.createElement("div"),n=$(t);e.within=this.Env.top,e.of?"window"===e.of||e.of===window?e.of=this.Env.top:e.of!==this.Env.top&&(e.of=$(e.of,this.Env.top.document),e.element=e.of[0],0===e.of.length&&(e.of=this.Env.top)):e.of=this.Env.top,!(!e.element||s(e.element)||"function"!=typeof e.element.scrollIntoView)&&(e.element.scrollIntoView(),e.didScroll=!0),n.appendTo($("body",this.Env.top.document)),n.css({position:"absolute",width:this.View.$skin.outerWidth(),height:this.View.$skin.outerHeight()}),n.position(e);var i=n.position(),o=$(this.Env.top),r=o.scrollTop(),a=o.scrollLeft(),l=i.left-a,u=i.top-r;return n.remove(),["relative",l,u]},c.animate=function(e,t,n){var i=this;u.default.moveStage("relative",e.left,e.top);var o="object"==typeof t.animate?t.animate:{},r=o.delay||500;delete o.delay;var a=this.View.$skin.position(),s="function"==typeof o.always?o.always:$.noop;o.always=function(){u.default.moveStage.apply(null,n),s()},setTimeout(function(){i.View.$skin.animate(a,o)},r)}}),define("acif/view/view",["exports","module","../utils","../ci/ijsf-adapter","../models/Style","./aria","./exit","./FileUpload","./position","./NodeView","../ci/index"],function(e,t,n,i,o,r,a,s,l,u,c){function d(e){return e&&e.__esModule?e:{default:e}}function f(e){this.Automaton=e,this.Env=e.Env,this.NS=e.namespace,this.Aria=new g.default(this),this.Exit=new v.default(this),this.position=new b.default(this)}var p=d(n),h=d(i),m=d(o),g=d(r),v=d(a),y=d(s),b=d(l),w=d(u),x=d(c);t.exports=f;var A=f.prototype={constructor:f};A.initializeViewport=function(){var e=this.Automaton,t=this.Automaton.settings;p.default.benchmark("init").mark("initializeViewport"),this.setFrames(),this.disableBackAndForwardCaching(),this.Env.is_touch_enabled&&this.makeButtonsTapResponsive(),this.loadViewport(),this.Exit.registerExitListener(),this.isAriaEnabled=!(!t.ariaEnabled||this.Env.isIE7),this.isAriaEnabled&&this.Aria.init(this),this.viewportSettings=e.settings.viewport,p.default.benchmark("init").mark("starting to load CSS"),t.style&&this.loadStyles(),p.default.benchmark("init").mark("finished loading CSS"),t.escToClose&&this.enableCloseOnEscape(),t.lightbox&&this.createLightbox(),this.position.fit()},A.saveOriginalQuestionText=function(){this.$viewport.find("legend,label,h1,h2,h3,[acif-node]").each(function(e,t){var n=$(t),i=n.text().trim();n.data("original-text",i)})},A.registerEventListeners=function(){function e(e){return function(t){return p.default.benchmark("btn click").start(),n.setActiveEvent(t,this),e.call(this),!1}}var t=this,n=this,i=this.Automaton,o=i.hash,r=i.Forms,a=i.Transitions,s=this.$viewport,l=$("input, textarea, select",s);h.default.updateInputListeners(o,l),$("[acif-node]",s).on("click",e(function(){var e=$(this).attr("acif-node");a.selectNextNode(e)})),$("[acif-transition]",s).on("click",e(function(){var e=$(this).attr("acif-transition");a.trigger(e)})),$("[acif-action]",s).on("click",e(function(){n.selectAction(this)})),$('input[type="file"][acif-upload-to-agent]',s).on("change",function(e){
(this.value||"").length&&new y.default(e,i)}),$("form",s).on("submit",function(e){return e.preventDefault(),n.setActiveEvent(e,n.Env.document.activeElement),r.submitForm(this),!1}),$("form[acif-submit-on-click] label:has(input)",s).on("click",e(function(){return r.submitOnClick(this),!1})),$("form[acif-validate-onkeyup] :input",s).on("keyup",function(){r.validateField(this)}),$("form :input",s).on("focus",function(){r.onFocus(this)}),$("form :input",s).on("blur",function(){r.onBlur(this)}),$("form :input",s).on("change",function(){r.onChange(this)}),$("form :input[acif-auto-format=currency]",s).each(function(e,n){var i=$(n);t.hideAttributes(i,["acif-auto-format","acif-thousands-separator","acif-currency-symbol","acif-decimal-separator"]),i.on("input",t.autoFormatCurrencyField)}),$("form select",s).on("focus",function(){r.storeCurrentValue(this)}),$("form select",s).on("keydown",function(){r.fireOnChangeManually(this)}),$("form :input[type=checkbox], form :input[type=radio]",s).on("change",function(){r.toggleCheckbox(this)}),this.isAriaEnabled&&this.Env.isAndroidMobile&&$("select",s).on("change",function(){n.Aria.returnFocusToDropdown(this)})},A.initializeNode=function(){var e=this,t=this.Automaton;p.default.benchmark("btn click").mark("renderNode start");var n=new w.default(t.node,t),i=n.$container;this.isAriaEnabled&&(this.Aria.enableAriaHtml(i),this.Aria.saveInitialDescribedby(i)),this.setCircularTabbing(i),t.node.id===t.displayedPath[0]&&n.hideBackButtons(),n.addNamespace(this.NS),n.addIdsToDivTags();var o=function(){e.renderNode(i,n)},r=t.node.animation||t.settings.animation;if(this.$viewContainer&&r){var a=_.defaults({},t.node.animation,t.settings.animation);return void this.runAnimation(this.$viewContainer,i,a).then(o).catch(function(e){ACIF.Utils.logger(e)})}this.$viewContainer&&this.$viewContainer.remove(),o()},A.renderNode=function(e,t){var n=this.Automaton;this.$viewContainer=e,$("form [acif-base-field-name]",e).each(function(){var t=$(this).attr("acif-base-field-name");$('form fieldset[acif-field-name="'+t+'"]',e).attr("acif-is-base-field",!0)}),n.Forms.throttleElements(),e.prependTo(this.$viewportOutlet||this.$viewport),n.Forms.markOriginalInputs(),n.Forms.toggleFields(),t.initializeAccordionMenus(),t.initializeTooltips(),t.initializeDatepickers(),this.saveOriginalQuestionText(),this.registerEventListeners(),this.isAriaEnabled&&this.Aria.placeInitialFocusOnView();var i=p.default.get(n,"node.panel")||p.default.get(n,"settings.panel")||{},o=p.default.get(n,"options.panel"),r=i.height,a=i.width,s=!(x.default.isHorizontalPanel(o)||!a),l=!(x.default.isVerticalPanel(o)||!r);s&&l?h.default.setElementPosition(o,{width:a,height:r}):(s&&h.default.setElementPosition(o,{width:a}),l&&h.default.setElementPosition(o,{height:r}));var u=n.node.viewport||{};if(n.isSessionInitializing){var c=n.settings.viewport||{};u.width=u.width||c.width,u.height=u.height||c.height,u.position=u.position||c.position}return(u.width||u.height)&&x.default.resizeStage({width:u.width,height:u.height}),n.settings.autoResizeHeight&&!u.height&&this.autoResizeHeight(),u.position&&this.position.set(u.position),$(n).trigger("didRenderNode",n.node.id),p.default.benchmark("btn click").mark("renderNode end").end(),top.loadAcifEvent&&(top.loadAcifEvent=null),!1},A.autoResizeHeight=function(){this.$viewport.css({top:"",left:"",right:"",bottom:"",height:""});var e=this.$skin.height(),t=this.$xframe.height(),n=this.$viewContainer.outerHeight(!0),i=this.Automaton.settings.minHeight||0,o=e-t+n-i;this.$viewport.css({top:0,left:0,right:0,bottom:0,height:"100%"}),this.resizeStage(null,o)},A.resizeStage=function(e,t){var n=this.Env;if("Phone"!==n.flashVars.deviceType&&(this.$skin.length||this.$viewport)){var i=p.default.benchmark("resizeStage").start();if(!n.isPersistentWindow){var o=$(this.Env.top).height(),r=$(this.Env.top).width(),a=this.$skin.height()||this.$viewport.height(),s=this.$skin.width()||this.$viewport.width();e=Math.min(e||s,r),t=Math.min(t||a,o)}i("setup"),h.default.resizeStage(e,t),i("IJSF.resizeStage()"),this.position.fit(),i("view.position.fit()"),this.$viewport.siblings().hide(),i.end()}},A.getTabbables=function(e){e=e||this.$viewport;return e.find(":input,a,button,[tabindex]").not(":hidden")},A.setFrames=function(){this.$xframe=this.Automaton.options.$container,this.$skin=this.Automaton.options.$skin},A.makeButtonsTapResponsive=function(){var e=this;if(!this.Env.top.FastClick){var t=ACIF.baseUrl+"/assets/FastClick/fastclick-1.0.6.js";this.Env.top.document.body.appendChild(document.createElement("script")).src=t,this.Automaton.utils.doAfter({condFn:function(){return!!e.Env.top.FastClick},afterFn:function(){try{e.Env.top.FastClick.attach?e.Env.top.FastClick.attach(e.$viewport[0]):new e.Env.top.FastClick(e.$viewport[0])}catch(e){p.default.console("Failed to initialize FastClick.","error")}},poll:10,maxWait:2e3})}},A.loadViewport=function(){this.$xframe.children().hide().attr("aria-hidden","true"),this.$viewport=$("<div>").attr("id",this.NS+"viewport").addClass(p.default.namespaceString(this.NS,"viewport acif-wrapping")).css({overflowY:"auto",backgroundColor:"white",position:"absolute",zIndex:1,top:0,left:0,right:0,bottom:0,height:"100%",boxSizing:"border-box"}).appendTo(this.$xframe),this.Env.is_preview_mode||this.reAttachViewportToDOM()},A.reAttachViewportToDOM=function(){var e=this,t=(new Date).getTime(),n=this.Automaton.utils.timers.setInterval(function(){e.$viewport.parent()[0]!==e.$xframe[0]&&(p.default.console("re-appending $viewport after "+((new Date).getTime()-t)+"ms"),e.$viewport.appendTo(e.$xframe),e.isAriaEnabled&&e.Aria.placeFocusOnView(),clearInterval(n))},10);this.Automaton.utils.timers.setTimeout(function(){clearInterval(n)},1e4)},A.createLightbox=function(){var e=this,t=this.Automaton.settings,n="object"==typeof t.lightbox?t.lightbox:{},i=$("body",this.Env.top.document),o=_.pick(n,["background","background-color","backgroundColor","opacity","zIndex","z-index"]),r=this.Env.top.document.createElement("DIV"),a=$(r),s={position:"fixed",top:0,left:0,width:"999999px",height:"999999px",background:"black",opacity:.5,zIndex:2147e6};_.extend(s,o),a.attr("id","inq-lightbox-"+this.Automaton.namespace).addClass("inq-lightbox").appendTo(i).css(s),n.closeOnEscape&&i.on("keydown.inq-lightbox",function(t){t.keyCode===$.ui.keyCode.ESCAPE&&(e.Exit.unload(),i.off(".inq-lightbox"))}),n.closeOnClick&&a.one("click",this.Exit.unload.bind(this.Exit)),this.$lightbox=a},A.loadStyles=function(){var e=ACIF.baseUrl+"/assets/jquery-ui/jquery-ui.min.css",t=ACIF.baseUrl+"/assets/flatpickr/flatpickr.min.css";m.default.loadStyleSheet(e,null,!0,this.Automaton.Env.document),m.default.loadStyleSheet(t,null,!0,this.Automaton.Env.document),m.default.loadStyleSheet("#tcChat_Skin .flatpickr-calendar { display: none; }",null,!1,this.Automaton.Env.document);var n=this.Automaton.getRecord(this.Automaton.settings.style,"style");n.addNamespace(this.NS);var i=this.Automaton.settings;if(i.tooltips){n.updateTooltipClassName();var o="object"==typeof i.tooltips?i.tooltips:{};o.tooltipClass="-ui-tooltip",o.position=o.position||{},o.position.within=this.Env.top,this.$viewport.tooltip(o)}n.addToDOM(),n.preloadImages()},A.selectAction=function(e){var t=$(e).attr("acif-action"),n=t.split(/[\s;,]+/g),i=this.Automaton,o=i.options.panel,r=void 0;return n.forEach(function(e){switch(e){case"exit":i.close();break;case"close-panel":x.default.closePanel(o,i.Env.isPersistentWindow);break;case"back":var t=p.default.generateBreadcrumbs(i.displayedPath);r=t[t.length-2];break;case"start_over":case"start-over":r=i.displayedPath[0];break;default:i.node.runCustomAction(e)||p.default.throwError('Unrecognized acif-action: "'+e+'"')}}),r&&this.Automaton.Transitions.selectNextNode(r),!1},A.enableCircularTabbing=function(e,t){var n=t.shouldTrapFocus,i=this.$skin[0],o=$("[id$=btnMinimize_img]:visible",i)[0],r=o||this.Exit.$exitButton[0],a=this.getTabbables(e),s=a.length?a[a.length-1]:r;n&&(r=a.get(0),s=a.get(-1),i=this.Automaton.options.$container[0]),h.default.setCircularTabbing(i,r,s)},A.setActiveEvent=function(e,t){this.Automaton.activeEvent={event:e,element:t,$element:$(t),currentNode:this.Automaton.node,previousNode:this.Automaton.api.getPreviousNode()}},A.enableCloseOnEscape=function(){var e=this;$("body",this.Env.document).on("keyup."+this.NS,function(t){27===t.keyCode&&($("body",e.Env.document).off("."+e.NS),e.Exit.unload(),e.Exit.closeCI())})},A.disableBackAndForwardCaching=function(){$(this.Env.top).on("unload.inq-acif beforeunload.inq-acif",$.noop)},A.getQuestions=function(){var e=[],t=this.Automaton.Forms;return this.$viewport.find("fieldset").each(function(){var n=t.getAttributes(this);e.push({questionText:n.response.questionText,questionId:n.response.questionId})}),e},A.hideAttributes=function(e,t){t.forEach(function(t){var n=e.attr(t);e.removeAttr(t),e.data(t,n)})},A.autoFormatCurrencyField=function(e){var t=$(e.target),n=this.selectionStart,i=this.selectionEnd,o=t.data("acif-currency-symbol"),r=t.data("acif-thousands-separator"),a=t.data("acif-decimal-separator"),s=t.val(),l=(s.slice(0,n).match(/,/g)||[]).length,u=s.replace(/\D/g,"");if(u){if("00"===u)return void t.val("");var c=u.slice(-2),d=u.slice(0,-2);1===c.length&&(c="0"+c),d=d.replace(/^0*/,""),r&&(d=d.replace(/(\d)(?=(\d{3})+$)/g,"$1"+r)),d.length||(d="0");var f=""+o+d+a+c,p=(f.slice(0,n).match(/,/g)||[]).length;t.val(f),s.length!==n&&(n+=p-l,i+=p-l,this.setSelectionRange(n,i))}},A.setCircularTabbing=function(e){var t=this.Automaton,n=t.getProp("circularTabbing"),i=t.getProp("shouldTrapFocus");n?this.enableCircularTabbing(e,{shouldTrapFocus:i}):!1===n&&h.default.removeCircularTabbing()},A.runAnimation=function(e,t,n){return"slide"===n.type?this.triggerSlideAnimation(e,t,n):(new $.Deferred).reject("Animation type '"+n.type+"' is invalid")},A.triggerSlideAnimation=function(e,t,n){var i=this.$viewport,o=i.parent().outerWidth(),r=this.Automaton.utils.makePromise("trigger slide animation");i.css({overflow:"hidden",whiteSpace:"nowrap"});var a=$("<div></div>").css({background:"none",height:"100%",width:"100%",position:"absolute",zIndex:999});i.prepend(a),e.attr("id","view-container-animation");var s={display:"inline-block",position:"relative",whiteSpace:"normal",height:"100%",width:o+"px"};return e.css(s),t.css(s),"right"===n.direction?(i.css({right:"-"+o+"px",transform:"translateX(-"+o+"px)"}),e.before(t)):(i.css({left:"-"+o+"px",transform:"translateX("+o+"px)"}),e.after(t)),parent.requestAnimationFrame(function(){i.css({transition:n.duration?n.duration/1e3+"s":"0.2s",transitionTimingFunction:"linear",transform:"none"}),i.one("transitionend",function(){e.remove(),a.remove(),i.css({left:"0px",overflow:"",right:"0px",transform:"",transition:"",transitionTimingFunction:"",whiteSpace:""}),t.css({display:"",height:"auto",position:"",whiteSpace:"",width:""}),r.resolve()})}),r}}),define("boot/index",["exports"],function(e){var t=!!window.name.match("acif"),n=!(window.inQ&&"test"===window.inQ.ENV);t?require("storage"):n&&(window.ACIF=parent.inQ.ACIF||{},parent.inQ.ACIF=ACIF,require("storage"),require("acif"))}),define("storage/iframe/index",["exports","../utils/frame-messenger","./storage"],function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}var o=i(t),r=i(n),a=new o.default({frame:window,name:"tc-storage-iframe",targetFrame:parent,targetName:"tc-storage-top-frame"}),s=void 0;try{var l=JSON.parse(decodeURIComponent(window.name));a.targetOrigin=l.targetOrigin,window.localStorage,s=new r.default(l);var u=s.getAllData();a.postMessage({code:"initial storage data",storage:u})}catch(e){a.postMessage({code:"local storage failed"})}a.onMessage(function(e,t){var n=s[e.method],i=void 0;if("function"==typeof n)try{return t(null,n.call(s,e.params))}catch(e){i=e}else i='"'+e.method+'" is not a valid TcSorage method.';i&&(t(i),window.console&&"function"==typeof console.error&&console.error(i))})}),define("storage/iframe/storage",["exports","module","../utils/get","../utils/set"],function(e,t,n,i){function o(e){return e&&e.__esModule?e:{default:e}}function r(e){this.ids={site:e.siteId,session:e.sessionId,engagement:e.engagementId,tab:e.tabId},this._storageKey="nuance-acif-"+e.siteId;var t=this._getStorage();this.options=e,this._initStore(t,"session"),this._initStore(t,"engagement"),this._initStore(t,"tab"),t.lifetime=t.lifetime||{data:{}},t.custom=t.custom||{data:{},registry:{}},this._purgeExpiredItems(t),this._ieSyncFix(),this._setStorage(t)}function a(e){var t=new Date,n=(e.match(/(\d+)y/i)||[])[1],i=(e.match(/(\d+)M/)||[])[1],o=(e.match(/(\d+)d/i)||[])[1],r=(e.match(/(\d+)h/i)||[])[1],a=(e.match(/(\d+)m/)||[])[1],s=(e.match(/(\d+)s/i)||[])[1];return n&&t.setFullYear(t.getFullYear()+Number(n)),i&&t.setMonth(t.getMonth()+Number(i)),o&&t.setDate(t.getDate()+Number(o)),r&&t.setHours(t.getHours()+Number(r)),a&&t.setMinutes(t.getMinutes()+Number(a)),s&&t.setSeconds(t.getSeconds()+Number(s)),t}var s=o(n),l=o(i);t.exports=r,r.get=function(e){var t=localStorage.getItem(e);if(!t)return t;try{t=JSON.parse(t)}catch(t){console.error('"'+e+'" is not a valid localStorage JSON string')}return t};var u=r.prototype={constructor:r};u._initStore=function(e,t){e[t]=e[t]||{};var n=this.ids[t];n!==e[t].id&&(e[t]={id:n,data:{}})},u._ieSyncFix=function(){var e=function(){};document.addEventListener?document.addEventListener("storage",e,!1):document.attachEvent?document.attachEvent("onstorage",e):document.onstorage=e,this._ieSyncFix=function(){localStorage.setItem("inq-dummy",1),localStorage.removeItem("inq-dummy")}},u.set=function(e){e.engagementId&&(this.ids.engagement=e.engagementId);var t=e.path,n=e.value,i=e.scope,o=this._getStorage(),r=this._getStore(o,i),a=void 0;r||(i?(a=this._getExpirationDate(i),i="custom"):i="session",r=this._getStore(o,i));var u=(0,s.default)(r,t);return(0,l.default)(r,t,n),a&&(o.custom.registry[t]=a.getTime()),this._setStorage(o),this._ieSyncFix(),{storage:o,changes:u===n?void 0:{path:t,previous:u,current:n,scope:i,expires:a}}},u._setStorage=function(e){e=JSON.stringify(e),localStorage.setItem(this._storageKey,e)},u.get=function(e){e.engagementId&&(this.ids.engagement=e.engagementId);var t=e.scope||"session";if(!(["engagement","tab","session","lifetime","custom"].indexOf(t)>-1))throw new Error('"'+t+'" is not a valid TC Storage scope. Expected one of: engagement, tab, session, lifetime, or custom');var n=this._getStorage(),i=this._getStore(n,t);return(0,s.default)(i,e.path)},u._getStore=function(e,t){var n=e[t];if(t.match(/custom|lifetime/i))return n.data;var i=this.ids[t];return i!==n.id&&(n=e[t]={id:i,data:{}}),n.data},u._getStorage=function(){var e=localStorage.getItem(this._storageKey);return e?JSON.parse(e):{}},u.getAllData=function(){return this._getStorage()},u._getExpirationDate=function(e){var t=void 0;return e instanceof Date?t=e:"number"==typeof e?t=new Date(e):"string"==typeof e&&(t=a(e)),t instanceof Date&&t>new Date?t:a("1d")},u._purgeExpiredItems=function(e){var t=(new Date).getTime(),n=e.__registry__;for(var i in n){t<n[i]||((0,l.default)(e,i,void 0),delete n[i])}}}),define("storage/index",["exports"],function(e){var t="undefined"==typeof inqFrame;require(t?"storage/iframe":"storage/top-frame")}),define("storage/top-frame/id-manager",["exports","module"],function(e,t){function n(e){var t=l[e];if(t)return t(e);throw new Error(e+" is not a valid TC Local Storage scope")}function i(){return inqFrame.Inq.siteID}function o(){return inqFrame.Inq.FlashPeer.getSessionID()}function r(){var e=void 0;try{e=window.Inq.API.get("engagementId")}catch(e){}if(e)return e;try{return window.Inq.getData().CHM.id}catch(e){}}function a(){var e=sessionStorage.getItem("nuance-tab-id");return e||(e=Math.random().toString().substr(2,99),sessionStorage.setItem("nuance-tab-id",e)),e}function s(e){return e}t.exports=n;var l={site:i,session:o,engagement:r,tab:a,lifetime:s,custom:s}}),define("storage/top-frame/index",["exports","../utils/frame-messenger","./local-storage-api","./session-storage-api","./id-manager"],function(e,t,n,i,o){function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=document.createElement("a");t.href=e;var n=t.protocol,i=t.hostname,o=t.port;return n+"//"+i+(o?":"+o:"")}var s=r(t),l=r(n),u=r(i),c=r(o),d=window.inQ=window.inQ||{},f=function(){if(Inq.API.get("noJSHostingEnabled"))return Inq.API.get("staticClientURL")+"/acif/storage.html";var e=inqFrame.Inq.urls.skinURL.replace(/flash\/$/,"");return ACIF.baseUrl&&ACIF.baseUrl.match("localhost")?ACIF.baseUrl+"/storage.html":ACIF.isLoadedNatively?inqFrame.Inq.urls.baseURL+"/acif/storage.html":e+"assets/local-storage/storage.html"}(),p=function(){var e=document.createElement("iframe"),t="test"===d.ENV?$("script").filter('[src*="acif.js"], [src*="acif-debug.js"]').last().attr("src"):$("script").last().attr("src"),n={siteId:(0,c.default)("site"),sessionId:(0,c.default)("session"),engagementId:(0,c.default)("engagement"),tabId:(0,c.default)("tab"),jsUrl:t,targetOrigin:a(location.href)};return f=f.replace(/^https?/,"https"),e.name=encodeURIComponent(JSON.stringify(n)),e.src=f,e.style.display="none",Inq.API.get("noJSHostingEnabled")&&(e.sandbox="allow-scripts allow-same-origin"),document.body.appendChild(e),e}();!function(e){var t=new s.default({frame:window,name:"tc-storage-top-frame",targetFrame:e.contentWindow,targetName:"tc-storage-iframe",targetOrigin:a(f)});t.onMessage(function(e,n){var i=void 0;"initial storage data"===e.code?i=new l.default(t,e.storage):"local storage failed"===e.code&&(i=new u.default(e.storage)),i&&(d.Storage=i,Inq.fireCustomEvent("StorageReady"))})}(p)}),define("storage/top-frame/local-storage-api",["exports","module","../utils/get","../utils/set","./id-manager"],function(e,t,n,i,o){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){this.frameMessenger=e,this.storage=t}var s=r(n),l=r(i),u=r(o);t.exports=a;var c=a.prototype;c.peek=function(e,t,n){t&&"function"!=typeof t||(n=t,t="session");var i=(0,u.default)("engagement");if("engagement"!==t||i){var o=this._getStore(t);if(!o)return void console.error('"'+t+'" is not a valid TC Storage scope. Expected one of: engagment, tab, session, lifetime, or custom');var r=(0,s.default)(o,e);return"function"==typeof n?n(null,r):r}},c._getStore=function(e){var t=this.storage[e],n=(0,u.default)(e);return n!==t.id&&(t=this.storage[e]={id:n,data:{}}),t.data},c.get=function(e,t,n){t&&"function"!=typeof t||(n=t,t="session");var i=(0,u.default)("engagement");this.frameMessenger.postMessage({method:"get",params:{path:e,scope:t,engagementId:i}},n)},c.set=function(e,t,n){"object"==typeof e&&(t=e.value,n=e.scope,e=e.path||e.key);var i=(0,u.default)("engagement");if("engagement"!==(n=n||"session")||i){var o=this._getStore(n);(0,l.default)(o,e,t),this.frameMessenger.postMessage({method:"set",params:{path:e,value:t,scope:n,engagementId:i}},function(e,t){if(e)return window.inqFrame.Inq.log(e,"error");this.storage=t.storage,t.changes&&Inq.fireCustomEvent("StorageChanged",t.changes)})}}}),define("storage/top-frame/session-storage-api",["exports","module","../utils/get","../utils/set","./id-manager"],function(e,t,n,i,o){function r(e){return e&&e.__esModule?e:{default:e}}function a(){this.ids={site:(0,u.default)("site"),session:(0,u.default)("session"),engagement:(0,u.default)("engagement"),tab:(0,u.default)("tab")},this._storageKey="nuance-acif-"+this.ids.site;var e=this._getStorage();this._initStore(e,"session"),this._initStore(e,"engagement"),this._initStore(e,"tab"),e.lifetime=e.lifetime||{data:{}},e.custom=e.custom||{data:{},registry:{}},this._setStorage(e),this.storage=e}var s=r(n),l=r(i),u=r(o);t.exports=a;var c=a.prototype;c.peek=function(e,t,n){t&&"function"!=typeof t||(n=t,t="session");var i=(0,u.default)("engagement");if("engagement"!==t||i){var o=this._getStore(this.storage,t);if(!o)return void console.error('"'+t+'" is not a valid TC Storage scope. Expected one of: engagment, tab, session, lifetime, or custom');var r=(0,s.default)(o,e);return"function"==typeof n?setTimeout(function(){return n(null,r)},100):r}},c._getStore=function(e,t){var n=e[t];if(t.match(/custom|lifetime/i))return n.data;var i=(0,u.default)(t);return i!==n.id&&(n=e[t]={id:i,data:{}}),n.data},c.get=function(e,t,n){t&&"function"!=typeof t||(n=t,t="session");var i=(0,u.default)("engagement");if(i&&(this.ids.engagement=i),!(["engagement","tab","session","lifetime","custom"].indexOf(t)>-1))throw new Error('"'+t+'" is not a valid TC Storage scope. Expected one of: engagement, tab, session, lifetime, or custom');var o=this._getStorage(),r=this._getStore(o,t),a=(0,s.default)(r,e);setTimeout(function(){return n(null,a)},100)},c.set=function(e,t,n){"object"==typeof e&&(t=e.value,n=e.scope,e=e.path||e.key);var i=(0,u.default)("engagement");if("engagement"!==(n=n||"session")||i){var o=this._getStorage(),r=this._getStore(o,n);(0,l.default)(r,e,t),i&&(this.ids.engagement=i);var a=void 0;r||(n?(a=this._getExpirationDate(n),n="custom"):n="session",r=this._getStore(o,n));var c=(0,s.default)(r,e);(0,l.default)(r,e,t),a&&(o.custom.registry[e]=a.getTime()),this._setStorage(o),this._ieSyncFix();var d=c===t?void 0:{path:e,previous:c,current:t,scope:n,expires:a};this.storage=o,d&&Inq.fireCustomEvent("StorageChanged",d)}},c._initStore=function(e,t){e[t]=e[t]||{};var n=this.ids[t];n!==e[t].id&&(e[t]={id:n,data:{}})},c._getStorage=function(){var e=sessionStorage.getItem(this._storageKey);return e?JSON.parse(e):{}},c._setStorage=function(e){e=JSON.stringify(e),sessionStorage.setItem(this._storageKey,e)},c._ieSyncFix=function(){var e=function(){};document.addEventListener?document.addEventListener("storage",e,!1):document.attachEvent?document.attachEvent("onstorage",e):document.onstorage=e,this._ieSyncFix=function(){localStorage.setItem("inq-dummy",1),localStorage.removeItem("inq-dummy")}}}),define("storage/utils/frame-messenger",["exports","module"],function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){try{return JSON.parse(e)}catch(e){return{}}}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){function i(e){return!(!e||!e.postMessage||"function"!=typeof e.postMessage)}if(n(this,e),t=t||{},this.name=t.name,this.frame=t.frame,this.targetName=t.targetName,this.targetFrame=t.targetFrame,this.targetOrigin=t.targetOrigin,this.Promise=t.Promise,this.callbackCount=0,this.callbacks={},this.listeners={},"string"!=typeof this.name)throw new Error("FrameMessenger must be initialized with a string in the `name` property");if("string"!=typeof this.targetName)throw new Error("FrameMessenger must be initialized with a string in the `targetName` property");if(!i(this.frame))throw new Error("FrameMessenger must be initialized with a frame in the `frame` property");if(!i(this.targetFrame))throw new Error("FrameMessenger must be initialized with a frame in the `targetFrame` property");this.frame.addEventListener("message",this._processMessage.bind(this))}return o(e,[{key:"postMessage",value:function(e,t,n,i){var o=this,r="c"+this.callbackCount++;i&&(i instanceof Error?i={name:i.name,message:i.message,stack:i.stack}:"object"==typeof i&&(i=JSON.parse(JSON.stringify(i))));var a=JSON.stringify({__name__:this.targetName,__origin_name__:this.name,__reply__:r,__callback__:n,__error__:i,data:e});if(this.targetFrame.postMessage(a,this.targetOrigin),"function"==typeof t)this.callbacks[r]=t;else{if(this.Promise)return new this.Promise(function(e,t){o.callbacks[r]={resolve:e,reject:t}});this.callbacks[r]=function(){}}}},{key:"_processMessage",value:function(e){var t=this,n=e.data,o=i(n);if(e.source===this.targetFrame&&o.__name__===this.name){var r=o.__callback__,a=this.callbacks[r],s=function(e,n,i){t.postMessage(n,i,o.__reply__,e)};a?(delete this.callbacks[r],o.__error__?a.reject?a.reject(o.__error__):a(o.__error__):a.resolve?a.resolve(o.data):a(null,o.data,s)):this._onMessage?this._onMessage(o.data,s):console.error("No callback existed to handle callback ID "+r)}}},{key:"onMessage",value:function(e){this._onMessage=e}}]),e}();t.exports=r}),define("storage/utils/get",["exports","module"],function(e,t){function n(e,t){if(e)try{var i=(t||"").split("."),o=i.shift(),r=e[o];return i.length?n(r,i.join(".")):r}catch(e){console.error(e)}}t.exports=n}),define("storage/utils/set",["exports","module"],function(e,t){function n(e,t,i){if("object"!=typeof e)throw new Error("set() expected an object as the first argument. Received "+e);if("string"!=typeof t)throw new Error("set() expected a string as the second argument. Received "+t);var o=t.split("."),r=o.shift();if(o.length){n(e[r]=e[r]||{},o.join("."),i)}else e[r]=i}t.exports=n}),require("boot");
//# sourceMappingURL=acif.map