!(function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)})([(function(e,t,n){function i(){function e(e){var t=n(136),i=[t];i.push(n(138)),i.push(n(144)),i.push(n(147)),i.push(n(150)),i.push(n(152)),i.push(n(162)),i.push(n(166)),i.push(n(169)),i.push(n(173)),i.push(n(177)),i.push(n(181)),i.push(n(186)),i.push(n(188)),i.push(n(189)),i.push(n(192)),i.push(n(196)),i.push(n(201)),i.push(n(202)),g.initialize({clientData:e,plugins:i})}function t(e,t,n){return"/dist/preview_data.js?token=__TOKEN__&preview_layer_ids=__PREVIEW_LAYER_IDS__".replace("__TOKEN__",e).replace("__PROJECT_ID__",t).replace("__PREVIEW_LAYER_IDS__",n.join(",")).replace("__GET_ONLY_PREVIEW_LAYERS__",!0)}window.performance&&window.performance.mark&&window.performance.mark("optimizely:blockBegin");var i=n(1),r=n(63),a=n(5),o=n(11);a.onPreAction(r.onPreAction),a.onPostAction(r.onPostAction);var s=n(19),u=s.get("stores/directive"),c=n(64);if(!c.isCORSSupported())throw new Error("CORS is not supported on this browser, aborting.");var l,d=n(71),f=n(76),p=n(77),h={"layers": [{"holdback": 0, "activation": {}, "integrationSettings": {"google_universal_analytics": {"universal_analytics_tracker": "", "universal_analytics_slot": "19"}}, "integrationStringVersion": null, "viewIds": ["8316446709"], "experiments": [{"weightDistributions": [{"entityId": "8340331969", "endOfRange": 5000}, {"entityId": "8340341046", "endOfRange": 10000}], "audienceName": "Everyone except IE8 or IE9 browsers", "name": "CME & MOC Tab Variation_JavaScript_BS", "bucketingStrategy": null, "variations": [{"id": "8340331969", "actions": [], "name": "Original"}, {"id": "8340341046", "actions": [{"viewId": "8316446709", "changes": [{"dependencies": [], "type": "custom_code", "id": "90082347-B873-4956-8FFE-FE3DC9457A2E", "value": function($){$(document).ready(function() {
  $(".toolbar-cme").css("background-color", "#981B1E");
  $(".toolbar-cme").css("color", "#FFFFFF");
  $(".toolbar-cme").css("font-size", "16px");
  $(".toolbar-cme").css("font-weight", "700");
});
}}, {"selector": ".toolbar-cme", "dependencies": ["90082347-B873-4956-8FFE-FE3DC9457A2E"], "attributes": {"html": "CME &amp MOC"}, "type": "attribute", "id": "500F713C-7F44-49F8-AAD1-18BD03F63518", "css": {}}]}], "name": "Secondary Journal Color with text change"}], "audienceIds": ["or", "8331500995"], "changes": null, "id": "8337421255", "integrationSettings": null}], "id": "8331093601", "weightDistributions": null, "name": "CME & MOC Tab Variation_JavaScript_BS", "groupId": null, "commitId": "8336476659", "decisionMetadata": null, "policy": "single_experiment", "changes": null}, {"holdback": 0, "activation": {}, "integrationSettings": {"google_universal_analytics": {"universal_analytics_tracker": "", "universal_analytics_slot": "19"}}, "integrationStringVersion": null, "viewIds": ["8361114408"], "experiments": [{"weightDistributions": [{"entityId": "8371141664", "endOfRange": 5000}, {"entityId": "8366071890", "endOfRange": 10000}], "audienceName": "Everyone except IE8, IE9 and Safari", "name": "DERM CME & MOC-ALL", "bucketingStrategy": null, "variations": [{"id": "8371141664", "actions": [{"viewId": "8361114408", "changes": []}], "name": "Original"}, {"id": "8366071890", "actions": [{"viewId": "8361114408", "changes": [{"dependencies": [], "type": "custom_code", "id": "5B82B8BC-D464-4E0D-B62E-698E7CDC69BD", "value": function($){$(document).ready(function() {
  
var $list = $('.toolbar'),
$items = $list.children(),
$secondItem = $items.eq(1);
$secondItem.detach();
$items.eq(2).after($secondItem);
 
  window.$(".toolbar-cme").html("CME & MOC");
  window.$(".toolbar-cme").css("background-color", "#3B923F");
  window.$(".toolbar-cme").css("color", "#FFFFFF");
  window.$(".toolbar-cme").css("font-size", "16px");
  window.$(".toolbar-cme").css("font-weight", "700");
});
}}]}], "name": "CME & MOC change in position working"}], "audienceIds": ["or", "8359073186"], "changes": null, "id": "8365603643", "integrationSettings": null}], "id": "8367173137", "weightDistributions": null, "name": "DERM CME & MOC-ALL", "groupId": null, "commitId": "8365914330", "decisionMetadata": null, "policy": "single_experiment", "changes": null}], "listTargetingCookies": [], "views": [{"category": "article", "staticConditions": ["and", ["or", {"type": "url", "value": "fullarticle", "match": "substring"}]], "name": "full text ", "tags": [], "apiName": "full_text_", "id": "8297456199"}, {"category": "article", "staticConditions": ["and", ["or", {"type": "url", "value": "jama/fullarticle", "match": "substring"}]], "name": "JAMA - full text article", "tags": [], "activationType": "polling", "activationCode": function pollingFn() {
  return document.querySelectorAll(".toolbar-cme").length > 0;
}, "apiName": "full_text", "id": "8316446709"}, {"category": "article", "staticConditions": ["and", ["or", {"type": "url", "value": "http://jamanetwork.com/journals/jamadermatology/fullarticle/2478039", "match": "simple"}]], "name": "JAMA Derm", "tags": [], "apiName": "jama_derm", "id": "8334410791"}, {"category": "article", "staticConditions": ["and", ["or", {"type": "url", "value": "jamadermatology/fullarticle/", "match": "substring"}]], "name": "JAMADERM CME Full Article", "tags": [], "activationType": "polling", "activationCode": function pollingFn() {
  return document.querySelectorAll(".toolbar-cme").length > 0;
}, "apiName": "2789921386_jama_cme_full_article", "id": "8361114408"}], "projectId": "2785501806", "namespace": "2785501806", "integrationSettings": [], "dimensions": [{"segmentId": "3265170378", "id": "3263180441", "apiName": "", "name": "Non Subscriber Message Status"}, {"segmentId": "3246051025", "id": "3275910331", "apiName": "", "name": "Institutional Status"}], "audiences": [{"conditions": ["and", ["or", ["not", ["or", {"value": "ie8", "type": "browser_version", "name": null, "match": null}, {"value": "ie9", "type": "browser_version", "name": null, "match": null}]]]], "id": "8331500995", "name": "Everyone except IE8 or IE9 browsers"}, {"conditions": ["and", ["or", ["not", ["or", {"value": "ie8", "type": "browser_version", "name": null, "match": null}, {"value": "ie9", "type": "browser_version", "name": null, "match": null}, {"value": "safari", "type": "browser_version", "name": null, "match": null}]]]], "id": "8359073186", "name": "Everyone except IE8, IE9 and Safari"}], "anonymizeIP": false, "visitorAttributes": [], "accountId": "591102174", "events": [{"category": "other", "name": "CME tab clicks", "eventType": "click", "viewId": "8316446709", "apiName": "cme_tab_clicks", "id": "8310738576", "eventFilter": {"filterType": "target_selector", "selector": ".toolbar-cme"}}, {"category": "other", "name": "CME Tab Clicks", "eventType": "click", "viewId": "8361114408", "apiName": "2789921386_cme_tab_clicks", "id": "8371383560", "eventFilter": {"filterType": "target_selector", "selector": ".toolbar-cme"}}], "revision": "529"},g=n(78);if(d.populateDirectiveData(),u.clientHasAlreadyInitialized())return void o.warn("Main / Disabling because Optimizely has already initialized on this page load. Are there multiple snippets on the page?");if(u.shouldBailForDesktopApp())return void o.log("Main / Disabling because of desktop app.");if(u.shouldLoadInnie())p.registerFunction("getProjectId",(function(){return h.projectId})),f.addScriptAsync("https://app.optimizely.com/js/innie.js"),o.log("Main / Disabling in favor of the editor client.");else if(u.shouldLoadPreview()){var v;v=u.isSlave()?window.optimizely:window.optimizely=window.optimizely||[],v.push({type:"load",data:h}),o.log("Main / Disabling in favor of the preview client."),n(135).setupPreviewGlobal(),n(135).pushToPreviewGlobal({type:"pushPreviewData",name:"liveCommitData",data:h}),u.isSlave()||(p.registerFunction("getProjectId",(function(){return h.projectId})),f.addScriptSync("https://optimizely.s3.amazonaws.com/js/preview2/2785501806.js"))}else if(u.shouldBootstrapDataForPreview()){p.registerFunction("initializeOptimizelyPreview",e);var m=u.isSlave()?PROJECT_ID_FOR_SLAVE_PREVIEW:p.getFunction("getProjectId")();l=t(u.getProjectToken(),m,u.getPreviewLayerIds()),f.addScriptSync(l),n(135).setupPreviewGlobal(),f.addScriptAsync("/dist/js/preview_ui.js")}else u.shouldBootstrapDataForEditor()?(p.registerFunction("initializeOptimizelyPreview",e),f.addScriptAsync(window.optimizely_editor_data_endpoint)):u.shouldInitialize()&&e(h);i.timeEnd("block")}try{i()}catch(e){try{n(133).handleError(e)}catch(e){console.log(e)}}}),(function(e,t,n){function i(){return u.getGlobal("performance")}var r=n(2),a=n(5),o=n(11),s=n(14),u=n(16),c=n(17),l=n(12),d="optimizely:",f=t.Error=r("PerformanceError");t.time=function(e){var t=i();if(t&&t.mark){var n=d+e;t.clearMarks(n+"Begin"),t.mark(n+"Begin")}},t.timeEnd=function(e){var t=i();if(t&&t.mark){var n=d+e,r=t.getEntriesByName(n+"Begin");if(0===r.length)throw new f("Called timeEnd without matching time: "+e);t.clearMarks(n+"End"),t.mark(n+"End");var s=t.getEntriesByName(n+"End"),u=e+"Time";if(a.dispatch(c.SET_PERFORMANCE_MARKS_DATA,{name:u,data:{start:r[0].startTime,end:s[0].startTime}}),o.shouldLog(l.LogLevel.INFO)){var p=d+u;t.measure(p,n+"Begin",n+"End")}else t.clearMarks(n+"Begin"),t.clearMarks(n+"End")}},t.now=function(){var e=i();return e?e.now():s.now()}}),(function(e,t,n){function i(e,t){function n(t){if(!(this instanceof n))return new n(t);try{throw new Error(t)}catch(t){t.name=e,this.stack=t.stack}r&&this.stack&&(this.stack=a(this.stack,e,t)),this.message=t||"",this.name=e}return n.prototype=new(t||Error),n.prototype.constructor=n,n.prototype.inspect=function(){return this.message?"["+e+": "+this.message+"]":"["+e+"]"},n.prototype.name=e,n}var r=n(3)(),a=n(4);e.exports=i}),(function(e,t){"use strict";e.exports=function(){var e=new Error("yep");return!!e.stack&&"Error: yep\n"===e.stack.substr(0,11)}}),(function(e,t){"use strict";e.exports=function(e,t,n){var i=t;return n&&(i+=": "+n),e=i+e.slice(e.indexOf("\n"))}}),(function(e,t,n){var i=n(6);e.exports=i.create()}),(function(e,t,n){function i(e){e=e||{},this.e={},this.t={},this.i=0,this.a=[],this.u=[]}function r(e,t){return function(){var n=e.indexOf(t);n!==-1&&e.splice(n,1)}}var a=n(7),o=n(8);i.prototype.registerStores=function(e){o.forOwn(e,function(e,t){this.e[t]=new a(t,this,e)}.bind(this))},i.prototype.getStore=function(e){return this.e[e]},i.prototype.dispatch=function(e,t){this.dispatchId++,o.each(this.a,function(n){n.call(this,e,t)}.bind(this)),o.forOwn(this.e,(function(n){n.l(e,t)})),o.each(this.u,function(n){n.call(this,e,t)}.bind(this)),o.forOwn(this.e,function(e,t){e.hasChanges()&&this.t[t]&&(e.resetChange(),o.each(this.t[t],(function(t){t(e)})))}.bind(this))},i.prototype.reset=function(){this.t={},o.forOwn(this.e,(function(e,t){e.d()}))},i.prototype.getState=function(){var e={};return o.forOwn(this.e,(function(t,n){e[n]=t.f()})),e},i.prototype.onPreAction=function(e){var t=this.a;return t.push(e),r(t,e)},i.prototype.onPostAction=function(e){var t=this.u;return t.push(e),r(t,e)},i.prototype.h=function(e,t){this.t[e]||(this.t[e]=[]),this.t[e].push(t);var n=this.t[e];return r(n,t)},e.exports={create:function(e){return new i(e)}}}),(function(e,t,n){function i(e,t,n){this.g=e,this.v=t,this.I=0,this.T=!1,this.S={},r.extend(this,n),this.A={},this.initialize&&this.initialize()}var r=n(8);i.prototype.l=function(e,t){var n=this.S[e];n&&"function"==typeof n&&n.call(this,t,e)},i.prototype.f=function(){return r.cloneDeep(this.A)},i.prototype.on=function(e,t){this.S[e]=t.bind(this)},i.prototype.observe=function(e){return this.v.h(this.g,e)},i.prototype.emitChange=function(){this.T=!0,this.I++},i.prototype.hasChanges=function(){return this.T},i.prototype.resetChange=function(){this.T=!1},i.prototype.getStateId=function(){return this.I},i.prototype.d=function(){this.reset&&"function"==typeof this.reset&&this.reset(),this.initialize()},e.exports=i}),(function(e,t,n){e.exports=n(9)._.noConflict()}),(function(e,t,n){(function(e,n){(function(){function i(e,t){return e.set(t[0],t[1]),e}function r(e,t){return e.add(t),e}function a(e,t){return u(De(e),pn)}function o(e,t){return!!e.length&&f(e,t,0)>-1}function s(e,t,n){for(var i=-1,r=e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function u(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function c(e,t,n){for(var i=-1,r=e.length;++i<r;){var a=e[i],o=t(a);if(null!=o&&(s===An?o===o:n(o,s)))var s=o,u=a}return u}function l(e,t,n,i){var r;return n(e,(function(e,n,a){if(t(e,n,a))return r=i?n:e,!1})),r}function d(e,t,n){for(var i=e.length,r=n?i:-1;n?r--:++r<i;)if(t(e[r],r,e))return r;return-1}function f(e,t,n){if(t!==t)return y(e,n);for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}function p(e,t,n,i,r){return r(e,(function(e,r,a){n=i?(i=!1,e):t(n,e,r,a)})),n}function h(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function g(e){return function(t){return e(t)}}function v(e,t){return Ee(t,(function(t){return e[t]}))}function m(e){return e&&e.Object===Object?e:null}function _(e,t){if(e!==t){var n=null===e,i=e===An,r=e===e,a=null===t,o=t===An,s=t===t;if(e>t&&!a||!r||n&&!o&&s||i&&s)return 1;if(e<t&&!n||!s||a&&!i&&r||o&&r)return-1}return 0}function E(e){return hi[e]}function y(e,t,n){for(var i=e.length,r=t+(n?0:-1);n?r--:++r<i;){var a=e[r];if(a!==a)return r}return-1}function I(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function T(e,t){return e="number"==typeof e||di.test(e)?+e:-1,t=null==t?Pn:t,e>-1&&e%1==0&&e<t}function S(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function A(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function b(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function w(e){if(zt(e)&&!dr(e)){if(e instanceof D)return e;if(Di.call(e,"__wrapped__"))return tt(e)}return new D(e)}function D(e,t){this.b=e,this.w=[],this.D=!!t}function R(){}function N(e,t){return C(e,t)&&delete e[t]}function O(e,t){if(Xi){var n=e[t];return n===Rn?An:n}return Di.call(e,t)?e[t]:An}function C(e,t){return Xi?e[t]!==An:Di.call(e,t)}function x(e,t,n){e[t]=Xi&&n===An?Rn:n}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function P(){this.R={hash:new R,map:qi?new qi:[],string:new R}}function k(e){var t=this.R;return Ze(e)?N("string"==typeof e?t.string:t.hash,e):qi?t.map.delete(e):W(t.map,e)}function F(e){var t=this.R;return Ze(e)?O("string"==typeof e?t.string:t.hash,e):qi?t.map.get(e):X(t.map,e)}function V(e){var t=this.R;return Ze(e)?C("string"==typeof e?t.string:t.hash,e):qi?t.map.has(e):$(t.map,e)}function M(e,t){var n=this.R;return Ze(e)?x("string"==typeof e?n.string:n.hash,e,t):qi?n.map.set(e,t):J(n.map,e,t),this}function U(e){var t=-1,n=e?e.length:0;for(this.R=new L;++t<n;)this.push(e[t])}function G(e,t){var n=e.R;if(Ze(t)){var i=n.R,r="string"==typeof t?i.string:i.hash;return r[t]===Rn}return n.has(t)}function B(e){var t=this.R;if(Ze(e)){var n=t.R,i="string"==typeof e?n.string:n.hash;i[e]=Rn}else t.set(e,Rn)}function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function z(){this.R={array:[],map:null}}function H(e){var t=this.R,n=t.array;return n?W(n,e):t.map.delete(e)}function Y(e){var t=this.R,n=t.array;return n?X(n,e):t.map.get(e)}function q(e){var t=this.R,n=t.array;return n?$(n,e):t.map.has(e)}function K(e,t){var n=this.R,i=n.array;i&&(i.length<wn-1?J(i,e,t):(n.array=null,n.map=new L(i)));var r=n.map;return r&&r.set(e,t),this}function W(e,t){var n=Q(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():ji.call(e,n,1),!0}function X(e,t){var n=Q(e,t);return n<0?An:e[n][1]}function $(e,t){return Q(e,t)>-1}function Q(e,t){for(var n=e.length;n--;)if(Ot(e[n][0],t))return n;return-1}function J(e,t,n){var i=Q(e,t);i<0?e.push([t,n]):e[i][1]=n}function Z(e,t,n,i){return e===An||Ot(e,bi[n])&&!Di.call(i,n)?t:e}function ee(e,t,n){(n===An||Ot(e[t],n))&&("number"!=typeof t||n!==An||t in e)||(e[t]=n)}function te(e,t,n){var i=e[t];Di.call(e,t)&&Ot(i,n)&&(n!==An||t in e)||(e[t]=n)}function ne(e,t){return e&&ir(t,sn(t),e)}function ie(e){return"function"==typeof e?e:vn}function re(e,t,n,i,r,a,o){var s;if(i&&(s=a?i(e,r,a,o):i(e)),s!==An)return s;if(!jt(e))return e;var u=dr(e);if(u){if(s=Xe(e),!t)return De(e,s)}else{var c=We(e),l=c==Gn||c==Bn;if(fr(e))return Oe(e,t);if(c==Hn||c==kn||l&&!a){if(I(e))return a?e:{};if(s=$e(l?{}:e),!t)return s=ne(s,e),n?Me(e,s):s}else{if(!pi[c])return a?e:{};s=Qe(e,c,t)}}o||(o=new j);var d=o.get(e);return d?d:(o.set(e,s),(u?tr:fe)(e,(function(r,a){te(s,a,re(r,t,n,i,a,e,o))})),n&&!u?Me(e,s):s)}function ae(e){return jt(e)?Gi(e):{}}function oe(e,t,n){if("function"!=typeof e)throw new TypeError(Dn);return setTimeout((function(){e.apply(An,n)}),t)}function se(e,t,n,i){var r=-1,a=o,u=!0,c=e.length,l=[],d=t.length;if(!c)return l;n&&(t=Ee(t,g(n))),i?(a=s,u=!1):t.length>=wn&&(a=G,u=!1,t=new U(t));e:for(;++r<c;){var f=e[r],p=n?n(f):f;if(u&&p===p){for(var h=d;h--;)if(t[h]===p)continue e;l.push(f)}else a(t,p,i)||l.push(f)}return l}function ue(e,t){var n=!0;return tr(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function ce(e,t){var n=[];return tr(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}function le(e,t,n,i){i||(i=[]);for(var r=-1,a=e.length;++r<a;){var o=e[r];t>0&&Pt(o)&&(n||dr(o)||xt(o))?t>1?le(o,t-1,n,i):u(i,o):n||(i[i.length]=o)}return i}function de(e,t){return null==e?e:nr(e,t,un)}function fe(e,t){return e&&nr(e,t,sn)}function pe(e,t){return ce(t,(function(t){return Gt(e[t])}))}function he(e,t,n,i,r){return e===t||(null==e||null==t||!jt(e)&&!zt(t)?e!==e&&t!==t:ge(e,t,he,n,i,r))}function ge(e,t,n,i,r,a){var o=dr(e),s=dr(t),u=Fn,c=Fn;o||(u=Oi.call(e),u=u==kn?Hn:u),s||(c=Oi.call(t),c=c==kn?Hn:c);var l=u==Hn&&!I(e),d=c==Hn&&!I(t),f=u==c;a||(a=[]);var p=vt(a,(function(t){return t[0]===e}));if(p&&p[1])return p[1]==t;if(a.push([e,t]),f&&!l){var h=o||Qt(e)?He(e,t,n,i,r,a):Ye(e,t,u,n,i,r,a);return a.pop(),h}if(!(r&xn)){var g=l&&Di.call(e,"__wrapped__"),v=d&&Di.call(t,"__wrapped__");if(g||v){var h=n(g?e.value():e,v?t.value():t,i,r,a);return a.pop(),h}}if(!f)return!1;var h=qe(e,t,n,i,r,a);return a.pop(),h}function ve(e){var t=typeof e;return"function"==t?e:null==e?vn:("object"==t?ye:be)(e)}function me(e){return Hi(Object(e))}function _e(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function Ee(e,t){var n=-1,i=Lt(e)?Array(e.length):[];return tr(e,(function(e,r,a){i[++n]=t(e,r,a)})),i}function ye(e){var t=sn(e);return function(n){var i=t.length;if(null==n)return!i;for(n=Object(n);i--;){var r=t[i];if(!(r in n&&he(e[r],n[r],An,Cn|xn)))return!1}return!0}}function Ie(e,t,n,i,r){if(e!==t){var a=dr(t)||Qt(t)?An:un(t);tr(a||t,(function(o,s){if(a&&(s=o,o=t[s]),jt(o))r||(r=new j),Te(e,t,s,n,Ie,i,r);else{var u=i?i(e[s],o,s+"",e,t,r):An;u===An&&(u=o),ee(e,s,u)}}))}}function Te(e,t,n,i,r,a,o){var s=e[n],u=t[n],c=o.get(u);if(c)return void ee(e,n,c);var l=a?a(s,u,n+"",e,t,o):An,d=l===An;d&&(l=u,dr(u)||Qt(u)?dr(s)?l=s:Pt(s)?l=De(s):(d=!1,l=re(u,!a)):Wt(u)||xt(u)?xt(s)?l=tn(s):!jt(s)||i&&Gt(s)?(d=!1,l=re(u,!a)):l=s:d=!1),o.set(u,l),d&&r(l,u,i,a,o),o.delete(u),ee(e,n,l)}function Se(e,t){return e=Object(e),yt(t,(function(t,n){return n in e&&(t[n]=e[n]),t}),{})}function Ae(e,t){var n={};return de(e,(function(e,i){t(e,i)&&(n[i]=e)})),n}function be(e){return function(t){return null==t?An:t[e]}}function we(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(r);++i<r;)a[i]=e[i+t];return a}function De(e){return we(e,0,e.length)}function Re(e,t){var n;return tr(e,(function(e,i,r){return n=t(e,i,r),!n})),!!n}function Ne(e,t){var n=e;return yt(t,(function(e,t){return t.func.apply(t.thisArg,u([e],t.args))}),n)}function Oe(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function Ce(e){var t=new e.constructor(e.byteLength);return new Fi(t).set(new Fi(e)),t}function xe(e){return yt(A(e),i,new e.constructor)}function Le(e){var t=new e.constructor(e.source,ci.exec(e));return t.lastIndex=e.lastIndex,t}function Pe(e){return yt(b(e),r,new e.constructor)}function ke(e){return er?Object(er.call(e)):{}}function Fe(e,t){var n=t?Ce(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ve(e,t,n,i){n||(n={});for(var r=-1,a=t.length;++r<a;){var o=t[r],s=i?i(n[o],e[o],o,n,e):e[o];te(n,o,s)}return n}function Me(e,t){return ir(e,ar(e),t)}function Ue(e){return Dt((function(t,n){var i=-1,r=n.length,a=r>1?n[r-1]:An;for(a="function"==typeof a?(r--,a):An,t=Object(t);++i<r;){var o=n[i];o&&e(t,o,i,a)}return t}))}function Ge(e,t){return function(n,i){if(null==n)return n;if(!Lt(n))return e(n,i);for(var r=n.length,a=t?r:-1,o=Object(n);(t?a--:++a<r)&&i(o[a],a,o)!==!1;);return n}}function Be(e){return function(t,n,i){for(var r=-1,a=Object(t),o=i(t),s=o.length;s--;){var u=o[e?s:++r];if(n(a[u],u,a)===!1)break}return t}}function je(e){return function(){var t=arguments,n=ae(e.prototype),i=e.apply(n,t);return jt(i)?i:n}}function ze(e,t,n,i){function r(){for(var t=-1,s=arguments.length,u=-1,c=i.length,l=Array(c+s),d=this&&this!==Si&&this instanceof r?o:e;++u<c;)l[u]=i[u];for(;s--;)l[u++]=arguments[++t];return d.apply(a?n:this,l)}if("function"!=typeof e)throw new TypeError(Dn);var a=t&Nn,o=je(e);return r}function He(e,t,n,i,r,a){var o=-1,s=r&xn,u=r&Cn,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;for(var d=!0;++o<c;){var f,p=e[o],h=t[o];if(f!==An){if(f)continue;d=!1;break}if(u){if(!Re(t,(function(e){return p===e||n(p,e,i,r,a)}))){d=!1;break}}else if(p!==h&&!n(p,h,i,r,a)){d=!1;break}}return d}function Ye(e,t,n,i,r,a,o){switch(n){case Vn:case Mn:return+e==+t;case Un:return e.name==t.name&&e.message==t.message;case zn:return e!=+e?t!=+t:e==+t;case Yn:case Kn:return e==t+""}return!1}function qe(e,t,n,i,r,a){var o=r&xn,s=sn(e),u=s.length,c=sn(t),l=c.length;if(u!=l&&!o)return!1;for(var d=u;d--;){var f=s[d];if(!(o?f in t:Di.call(t,f)))return!1}for(var p=!0,h=o;++d<u;){f=s[d];var g,v=e[f],m=t[f];if(!(g===An?v===m||n(v,m,i,r,a):g)){p=!1;break}h||(h="constructor"==f)}if(p&&!h){var _=e.constructor,E=t.constructor;_!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof E&&E instanceof E)&&(p=!1)}return p}function Ke(e,t){var n=e[t];return Yt(n)?n:An}function We(e){return Oi.call(e)}function Xe(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Di.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function $e(e){return"function"!=typeof e.constructor||et(e)?{}:ae(Mi(e))}function Qe(e,t,n){var i=e.constructor;switch(t){case $n:return Ce(e);case Vn:case Mn:return new i(+e);case Qn:case Jn:case Zn:case ei:case ti:case ni:case ii:case ri:case ai:return Fe(e,n);case jn:return xe(e);case zn:case Kn:return new i(e);case Yn:return Le(e);case qn:return Pe(e);case Wn:return ke(e)}}function Je(e){var t=e?e.length:An;return Bt(t)&&(dr(e)||$t(e)||xt(e))?h(t,String):null}function Ze(e){var t=typeof e;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!=e||null==e}function et(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||bi;return e===n}function tt(e){var t=new D(e.b,e.D);return t.w=De(e.w),t}function nt(e){return ce(e,Boolean)}function it(e,t){return e&&e.length?d(e,ve(t,3)):-1}function rt(e){var t=e?e.length:0;return t?le(e,1):[]}function at(e){var t=e?e.length:0;return t?le(e,Ln):[]}function ot(e){return e?e[0]:An}function st(e,t,n){var i=e?e.length:0;n="number"==typeof n?n<0?Yi(i+n,0):n:0;for(var r=(n||0)-1,a=t===t;++r<i;){var o=e[r];if(a?o===t:o!==o)return r}return-1}function ut(e){var t=e?e.length:0;return t?e[t-1]:An}function ct(e,t,n){var i=e?e.length:0;return t=null==t?0:+t,n=n===An?i:+n,i?we(e,t,n):[]}function lt(e){var t=w(e);return t.D=!0,t}function dt(e,t){return t(e),e}function ft(e,t){return t(e)}function pt(){return Ne(this.b,this.w)}function ht(e,t,n){return t=n?An:t,ue(e,ve(t))}function gt(e,t){return ce(e,ve(t))}function vt(e,t){return l(e,ve(t),tr)}function mt(e,t){return tr(e,ie(t))}function _t(e,t,n,i){e=Lt(e)?e:pn(e),n=n&&!i?pr(n):0;var r=e.length;return n<0&&(n=Yi(r+n,0)),$t(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&f(e,t,n)>-1}function Et(e,t){return Ee(e,ve(t))}function yt(e,t,n){return p(e,ve(t),n,arguments.length<3,tr)}function It(e){return null==e?0:(e=Lt(e)?e:sn(e),e.length)}function Tt(e,t,n){return t=n?An:t,Re(e,ve(t))}function St(e,t){var n=0;return t=ve(t),Ee(Ee(e,(function(e,i,r){return{value:e,index:n++,criteria:t(e,i,r)}})).sort((function(e,t){return _(e.criteria,t.criteria)||e.index-t.index})),be("value"))}function At(e,t){var n;if("function"!=typeof t)throw new TypeError(Dn);return e=pr(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=An),n}}function bt(e){if("function"!=typeof e)throw new TypeError(Dn);return function(){return!e.apply(this,arguments)}}function wt(e){return At(2,e)}function Dt(e,t){if("function"!=typeof e)throw new TypeError(Dn);return t=Yi(t===An?e.length-1:pr(t),0),function(){for(var n=arguments,i=-1,r=Yi(n.length-t,0),a=Array(r);++i<r;)a[i]=n[t+i];var o=Array(t+1);for(i=-1;++i<t;)o[i]=n[i];return o[t]=a,e.apply(this,o)}}function Rt(e){return jt(e)?dr(e)?De(e):ir(e,sn(e)):e}function Nt(e){return re(e,!0,!0)}function Ot(e,t){return e===t||e!==e&&t!==t}function Ct(e,t){return e>t}function xt(e){return Pt(e)&&Di.call(e,"callee")&&(!Bi.call(e,"callee")||Oi.call(e)==kn)}function Lt(e){return null!=e&&Bt(rr(e))&&!Gt(e)}function Pt(e){return zt(e)&&Lt(e)}function kt(e){return e===!0||e===!1||zt(e)&&Oi.call(e)==Vn}function Ft(e){return zt(e)&&Oi.call(e)==Mn}function Vt(e){if(Lt(e)&&(dr(e)||$t(e)||Gt(e.splice)||xt(e)))return!e.length;for(var t in e)if(Di.call(e,t))return!1;return!0}function Mt(e,t){return he(e,t)}function Ut(e){return"number"==typeof e&&zi(e)}function Gt(e){var t=jt(e)?Oi.call(e):"";return t==Gn||t==Bn}function Bt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Pn}function jt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function zt(e){return!!e&&"object"==typeof e}function Ht(e){return Kt(e)&&e!=+e}function Yt(e){return null!=e&&(Gt(e)?xi.test(wi.call(e)):zt(e)&&(I(e)?xi:li).test(e))}function qt(e){return null===e}function Kt(e){return"number"==typeof e||zt(e)&&Oi.call(e)==zn}function Wt(e){if(!zt(e)||Oi.call(e)!=Hn||I(e))return!1;var t=Mi(e);if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&wi.call(n)==Ni}function Xt(e){return jt(e)&&Oi.call(e)==Yn}function $t(e){return"string"==typeof e||!dr(e)&&zt(e)&&Oi.call(e)==Kn}function Qt(e){return zt(e)&&Bt(e.length)&&!!fi[Oi.call(e)]}function Jt(e){return e===An}function Zt(e,t){return e<t}function en(e){return Lt(e)?e.length?De(e):[]:pn(e)}function tn(e){return ir(e,un(e))}function nn(e){return"string"==typeof e?e:null==e?"":e+""}function rn(e,t){var n=ae(e);return t?gr(n,t):n}function an(e,t){return e&&fe(e,ie(t))}function on(e,t){return null!=e&&Di.call(e,t)}function sn(e){var t=et(e);if(!t&&!Lt(e))return me(e);var n=Je(e),i=!!n,r=n||[],a=r.length;for(var o in e)!Di.call(e,o)||i&&("length"==o||T(o,a))||t&&"constructor"==o||r.push(o);return r}function un(e){for(var t=-1,n=et(e),i=_e(e),r=i.length,a=Je(e),o=!!a,s=a||[],u=s.length;++t<r;){var c=i[t];o&&("length"==c||T(c,u))||"constructor"==c&&(n||!Di.call(e,c))||s.push(c)}return s}function cn(e,t){var n={};return t=ve(t,3),fe(e,(function(e,i,r){n[i]=t(e,i,r)})),n}function ln(e,t){return t=ve(t),Ae(e,(function(e,n){return!t(e,n)}))}function dn(e,t){return null==e?{}:Ae(e,ve(t))}function fn(e,t,n){var i=null==e?An:e[t];return i===An&&(i=n),Gt(i)?i.call(e):i}function pn(e){return e?v(e,sn(e)):[]}function hn(e){return e=nn(e),e&&si.test(e)?e.replace(oi,E):e}function gn(e){return function(){return e}}function vn(e){return e}function mn(e){return ye(gr({},e))}function _n(e,t,n){var i=sn(t),r=pe(t,i);null!=n||jt(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=pe(t,sn(t)));var a=!(jt(n)&&"chain"in n)||n.chain,o=Gt(e);return tr(r,(function(n){var i=t[n];e[n]=i,o&&(e.prototype[n]=function(){var t=this.D;if(a||t){var n=e(this.b),r=n.w=De(this.w);return r.push({func:i,args:arguments,thisArg:e}),n.D=t,n}return i.apply(e,u([this.value()],arguments))})})),e}function En(){return Si._===this&&(Si._=Ci),this}function yn(){}function In(e){var t=++Ri;return nn(e)+t}function Tn(e){return e&&e.length?c(e,vn,Ct):An}function Sn(e){return e&&e.length?c(e,vn,Zt):An}var An,bn="4.6.1",wn=200,Dn="Expected a function",Rn="__lodash_hash_undefined__",Nn=1,On=32,Cn=1,xn=2,Ln=1/0,Pn=9007199254740991,kn="[object Arguments]",Fn="[object Array]",Vn="[object Boolean]",Mn="[object Date]",Un="[object Error]",Gn="[object Function]",Bn="[object GeneratorFunction]",jn="[object Map]",zn="[object Number]",Hn="[object Object]",Yn="[object RegExp]",qn="[object Set]",Kn="[object String]",Wn="[object Symbol]",Xn="[object WeakMap]",$n="[object ArrayBuffer]",Qn="[object Float32Array]",Jn="[object Float64Array]",Zn="[object Int8Array]",ei="[object Int16Array]",ti="[object Int32Array]",ni="[object Uint8Array]",ii="[object Uint8ClampedArray]",ri="[object Uint16Array]",ai="[object Uint32Array]",oi=/[&<>"'`]/g,si=RegExp(oi.source),ui=/[\\^$.*+?()[\]{}|]/g,ci=/\w*$/,li=/^\[object .+?Constructor\]$/,di=/^(?:0|[1-9]\d*)$/,fi={};fi[Qn]=fi[Jn]=fi[Zn]=fi[ei]=fi[ti]=fi[ni]=fi[ii]=fi[ri]=fi[ai]=!0,fi[kn]=fi[Fn]=fi[$n]=fi[Vn]=fi[Mn]=fi[Un]=fi[Gn]=fi[jn]=fi[zn]=fi[Hn]=fi[Yn]=fi[qn]=fi[Kn]=fi[Xn]=!1;var pi={};pi[kn]=pi[Fn]=pi[$n]=pi[Vn]=pi[Mn]=pi[Qn]=pi[Jn]=pi[Zn]=pi[ei]=pi[ti]=pi[jn]=pi[zn]=pi[Hn]=pi[Yn]=pi[qn]=pi[Kn]=pi[Wn]=pi[ni]=pi[ii]=pi[ri]=pi[ai]=!0,pi[Un]=pi[Gn]=pi[Xn]=!1;var hi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},gi={function:!0,object:!0},vi=gi[typeof t]&&t&&!t.nodeType?t:An,mi=gi[typeof e]&&e&&!e.nodeType?e:An,_i=mi&&mi.exports===vi?vi:An,Ei=m(vi&&mi&&"object"==typeof n&&n),yi=m(gi[typeof self]&&self),Ii=m(gi[typeof window]&&window),Ti=m(gi[typeof this]&&this),Si=Ei||Ii!==(Ti&&Ti.window)&&Ii||yi||Ti||Function("return this")(),Ai=Array.prototype,bi=Object.prototype,wi=Function.prototype.toString,Di=bi.hasOwnProperty,Ri=0,Ni=wi.call(Object),Oi=bi.toString,Ci=Si._,xi=RegExp("^"+wi.call(Di).replace(ui,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Li=_i?Si.Buffer:An,Pi=Si.Reflect,ki=Si.Symbol,Fi=Si.Uint8Array,Vi=Pi?Pi.enumerate:An,Mi=Object.getPrototypeOf,Ui=Object.getOwnPropertySymbols,Gi=Object.create,Bi=bi.propertyIsEnumerable,ji=Ai.splice,zi=Si.isFinite,Hi=Object.keys,Yi=Math.max,qi=Ke(Si,"Map"),Ki=Ke(Si,"Set"),Wi=Ke(Si,"WeakMap"),Xi=Ke(Object,"create"),$i=qi?wi.call(qi):"",Qi=Ki?wi.call(Ki):"",Ji=Wi?wi.call(Wi):"",Zi=ki?ki.prototype:An,er=Zi?Zi.valueOf:An,tr=Ge(fe),nr=Be();Vi&&!Bi.call({valueOf:1},"valueOf")&&(_e=function(e){return S(Vi(e))});var ir=Ve,rr=be("length"),ar=Ui||function(){return[]};(qi&&We(new qi)!=jn||Ki&&We(new Ki)!=qn||Wi&&We(new Wi)!=Xn)&&(We=function(e){var t=Oi.call(e),n=t==Hn?e.constructor:null,i="function"==typeof n?wi.call(n):"";if(i)switch(i){case $i:return jn;case Qi:return qn;case Ji:return Xn}return t});var or=Dt((function(e,t){return dr(e)||(e=null==e?[]:[Object(e)]),t=le(t,1),a(e,t)})),sr=Dt((function(e,t,n){return ze(e,Nn|On,t,n)})),ur=Dt((function(e,t){return oe(e,1,t)})),cr=Dt((function(e,t,n){return oe(e,hr(t)||0,n)})),lr=Dt((function(e,t){return ze(e,On,An,t)})),dr=Array.isArray,fr=Li?function(e){return e instanceof Li}:gn(!1),pr=Number,hr=Number,gr=Ue((function(e,t){ir(t,sn(t),e)})),vr=Ue((function(e,t){ir(t,un(t),e)})),mr=Ue((function(e,t,n,i){Ve(t,un(t),e,i)})),_r=Dt((function(e){return e.push(An,Z),mr.apply(An,e)})),Er=Ue((function(e,t,n){Ie(e,t,n)})),yr=Dt((function(e,t){return null==e?{}:(t=Ee(le(t,1),String),Se(e,se(un(e),t)))})),Ir=Dt((function(e,t){return null==e?{}:Se(e,le(t,1))})),Tr=ve;D.prototype=ae(w.prototype),D.prototype.constructor=D,R.prototype=Xi?Xi(null):bi,L.prototype.clear=P,L.prototype.delete=k,L.prototype.get=F,L.prototype.has=V,L.prototype.set=M,U.prototype.push=B,j.prototype.clear=z,j.prototype.delete=H,j.prototype.get=Y,j.prototype.has=q,j.prototype.set=K,w.assign=gr,w.assignIn=vr,w.before=At,w.bind=sr,w.chain=lt,w.compact=nt,w.concat=or,w.create=rn,w.defaults=_r,w.defer=ur,w.delay=cr,w.filter=gt,w.flatten=rt,w.flattenDeep=at,w.iteratee=Tr,w.keys=sn,w.map=Et,w.mapValues=cn,w.matches=mn,w.merge=Er,w.mixin=_n,w.negate=bt,w.omit=yr,w.omitBy=ln,w.once=wt,w.partial=lr,w.pick=Ir,w.pickBy=dn,w.slice=ct,w.sortBy=St,w.tap=dt,w.thru=ft,w.toArray=en,w.values=pn,w.extend=vr,_n(w,w),w.clone=Rt,w.cloneDeep=Nt,w.escape=hn,w.every=ht,w.find=vt,w.findIndex=it,w.forEach=mt,w.forOwn=an,w.has=on,w.head=ot,w.identity=vn,w.includes=_t,w.indexOf=st,w.isArguments=xt,w.isArray=dr,w.isBoolean=kt,w.isDate=Ft,w.isEmpty=Vt,w.isEqual=Mt,w.isFinite=Ut,w.isFunction=Gt,w.isNaN=Ht,w.isNull=qt,w.isNumber=Kt,w.isObject=jt,w.isRegExp=Xt,w.isString=$t,w.isUndefined=Jt,w.last=ut,w.max=Tn,w.min=Sn,w.noConflict=En,w.noop=yn,w.reduce=yt,w.result=fn,w.size=It,w.some=Tt,w.uniqueId=In,w.each=mt,w.first=ot,_n(w,(function(){var e={};return fe(w,(function(t,n){Di.call(w.prototype,n)||(e[n]=t)})),e})(),{chain:!1}),w.VERSION=bn,tr(["pop","join","replace","reverse","split","push","shift","sort","splice","unshift"],(function(e){var t=(/^(?:replace|split)$/.test(e)?String.prototype:Ai)[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|join|replace|shift)$/.test(e);w.prototype[e]=function(){var e=arguments;return i&&!this.D?t.apply(this.value(),e):this[n]((function(n){return t.apply(n,e)}))}})),w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=pt,(Ii||yi||{})._=w,vi&&mi&&(_i&&((mi.exports=w)._=w),vi._=w)}).call(this)}).call(t,n(10)(e),(function(){return this})())}),(function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}}),(function(e,t,n){function i(e){e=a.extend({logLevel:"ERROR",logMatch:""},e),this.setLogMatcher(e.logMatch),this.setLogLevel(e.logLevel),this.logs=[],this.timebase=s.now()}function r(){var e=u.getQueryParamValue("optimizely_log");if(e){var t=e.split(":"),n=""===t[0]?"OFF":String(t[0]).toUpperCase(),i="undefined"==typeof t[1]?"":t[1];return{logLevel:n,logMatch:i}}return{logLevel:"OFF",logMatch:""}}var a=n(8),o=n(12),s=n(14),u=n(15),c=n(5),l=n(17),d=n(18);i.prototype.setLogLevel=function(e){var t=this.N(e),n=this.logLevel;null===t?console.error("Unknown log level: "+e):(this.logLevel=t,this.logLevel>o.LogLevel.OFF&&(console.log("Setting log level to "+t),a.isUndefined(n)||this.flush()))},i.prototype.setLogMatcher=function(e){a.isString(e)?this.logMatcher=e:this.logMatcher="",this.logGroup=0},i.prototype.shouldLog=function(e){return this.logLevel>=e},i.prototype.matchesLogMessage=function(e,t){var n=this.logMatcher;if(!this.logMatcher)return!0;if(this.logGroup)return"GROUPSTART"===e?this.logGroup++:"GROUPEND"===e&&this.logGroup--,!0;var i=a.some(t,(function(e){if(!a.isString(e))try{e=d.stringify(e)}catch(e){}return a.isString(e)&&a.includes(e,n)}));return i&&"GROUPSTART"===e&&this.logGroup++,i},i.prototype.storeLog=function(e,t){var n={logLevel:e,logMessage:t};c.dispatch(l.LOG,n)},i.prototype.flush=function(){var e=n(19),t=e.get("stores/log");this.logGroup=0;var i=t.getLogs();a.each(i,function(e){this.O(e.logLevel,e.logMessage,!0)}.bind(this))},i.prototype.O=function(e,t,n){var i,r=e;if(console)switch(e){case"GROUPSTART":i=console.groupCollapsed,r=o.LogLevel.DEBUG;break;case"GROUPEND":i=console.groupEnd,r=o.LogLevel.DEBUG;break;case o.LogLevel.ERROR:i=console.error;break;case o.LogLevel.WARN:i=console.warn;break;case o.LogLevel.DEBUG:i=console.debug;break;default:i=console.log}try{!n&&this.shouldLog(r)&&(a.isArray(t)&&a.isString(t[0])&&(t=this.C(t)),this.storeLog(e,t)),i&&this.shouldLog(r)&&this.matchesLogMessage(e,t)&&i.apply(console,t)}catch(e){console&&(console.error?console.error(e):console.log(e))}},i.prototype.debug=function(){this.O(o.LogLevel.DEBUG,[].slice.call(arguments))},i.prototype.log=function(){this.O(o.LogLevel.INFO,[].slice.call(arguments))},i.prototype.logAlways=function(){var e=this.C([].slice.call(arguments));console&&console.log&&console.log.apply&&console.log.apply(console,e),this.storeLog(o.LogLevel.INFO,e)},i.prototype.warn=function(){this.O(o.LogLevel.WARN,[].slice.call(arguments))},i.prototype.error=function(e){var t=[].slice.call(arguments);1===t.length&&e.stack?(this.O(o.LogLevel.ERROR,[this.x(),e]),this.O(o.LogLevel.INFO,[e.stack])):this.O(o.LogLevel.ERROR,t)},i.prototype.groupCollapsed=function(){this.O("GROUPSTART",[].slice.call(arguments))},i.prototype.groupEnd=function(){this.O("GROUPEND",[].slice.call(arguments))},i.prototype.C=function(e){var t=this.x().toString();return t.length<6&&(t=("     "+t).slice(-6)),[t+"| Optly / "+e[0]].concat(e.slice(1))},i.prototype.x=function(){return this.timebase?s.now()-this.timebase:0},i.prototype.N=function(e){return e&&(e=e.toUpperCase(),"TRUE"===e&&(e="INFO"),"FALSE"===e&&(e="OFF"),!a.isUndefined(o.LogLevel[e]))?o.LogLevel[e]:null},e.exports=new i(r())}),(function(e,t,n){var i=n(13);t.COOKIES={OPT_OUT:"optimizelyOptOut",PREVIEW:"optimizelyPreview",REDIRECT:"optimizelyRedirectData",SESSION_STATE:"optimizelySessionState",TOKEN:"optimizelyToken",VISITOR_ID:"optimizelyEndUserId",VISITOR_UUID:"optimizelyPPID"},t.LayerActivationTypes={CONDITIONAL:"conditional",IMMEDIATE:"immediate",MANUAL:"manual",READY:"ready",TIMEOUT:"timeout"},t.LogLevel={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4,ALL:5},t.Lifecycle=i({preActivate:null,postVisitorProfileLoad:null,postViewsActivated:null,postActivate:null}),t.ViewActivationTypes=i({immediate:null,manual:null,callback:null,polling:null}),t.StorageKeys={PENDING_EVENTS:"pending_events"},t.PluginTypes=i({visitorProfileProviders:null,viewProviders:null,audienceMatchers:null,viewMatchers:null,analyticsTrackers:null,viewTagLocators:null,userFeatureDefs:null,apiModules:null,changeAppliers:null,deciders:null,eventImplementations:null}),t.ResourceTimingAttributes=i({connectStart:null,connectEnd:null,decodedBodySize:null,domainLookupStart:null,domainLookupEnd:null,
duration:null,encodedBodySize:null,fetchStart:null,requestStart:null,responseStart:null,responseEnd:null,secureConnectionStart:null,startTime:null,transferSize:null}),t.RUMPerformanceTimingAttributes=i({blockTime:null}),t.AttributionTypes=i({FIRST_TOUCH:null,LAST_TOUCH:null}),t.SandboxedFunctions=i({XMLHttpRequest:null}),t.PerformanceData=i({performance_marks:null,resource_timing:null,performance_timing:null}),t.VisitorStorageKeys={EVENTS:"events",EVENT_QUEUE:"event_queue",LAYER_MAP:"layer_map",LAYER_STATES:"layer_states",SESSION_STATE:"session_state",VISITOR_PROFILE:"visitor_profile",VARIATION_MAP:"variation_map"}}),(function(e,t){"use strict";var n=function(e){var t,n={};if(!(e instanceof Object)||Array.isArray(e))throw new Error("keyMirror(...): Argument must be an object.");for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=n}),(function(e,t){t.now=function(){return+new Date}}),(function(e,t,n){var i=n(8),r=n(16);t.getQueryParams=function(){var e=r.getLocationSearch()||"";if(0===e.indexOf("?")&&(e=e.substring(1)),0===e.length)return[];for(var t=e.split("&"),n=[],i=0;i<t.length;i++){var a="",o="",s=t[i].split("=");s.length>0&&(a=s[0]),s.length>1&&(o=s[1]),n.push([a,o])}return n},t.getQueryParamValue=function(e){for(var n=t.getQueryParams(),i=0;i<n.length;i++)if(n[i][0]===e)return n[i][1];return null},t.queryStringFromMap=function(e){return i.map(e,(function(e,t){return t+"="+e})).join("&")}}),(function(e,t){t.getUserAgent=function(){return window.navigator.userAgent},t.getLocationSearch=function(){return window.location.search},t.getNavigatorLanguage=function(){return window.navigator.language||window.navigator.userLanguage},t.getHref=function(){return window.location.href},t.getLocation=function(){return window.location},t.setLocation=function(e){window.location.replace(e)},t.setGlobal=function(e,t){window[e]=t},t.getGlobal=function(e){return window[e]},t.addEventListener=function(){return window.addEventListener.apply(window,arguments)}}),(function(e,t,n){var i=n(13);e.exports=i({LOG:null,SET_LOGLEVEL:null,INITIALIZE_STATE:null,ACTIVATE:null,UPDATE_BEHAVIOR_STORE:null,DATA_LOADED:null,LOAD_PERSISTED_LAYER_STATES:null,RECORD_GLOBAL_DECISION:null,RECORD_LAYER_DECISION:null,RECORD_LAYER_DECISION_TICKET:null,SET_VISITOR_ATTRIBUTES:null,SET_VISITOR_ATTRIBUTE_PENDING:null,LOAD_EXISTING_VISITOR_PROFILE:null,SET_VISITOR_EVENTS:null,SET_FOREIGN_VISITOR_EVENTS:null,SET_FOREIGN_VISITOR_EVENT_QUEUE:null,SET_VISITOR_ID:null,REFRESH_SESSION:null,LOAD_SESSION_STATE:null,UPDATE_VARIATION_ID_MAP:null,MERGE_VARIATION_ID_MAP:null,UPDATE_PREFERRED_LAYER_MAP:null,MERGE_PREFERRED_LAYER_MAP:null,RECORD_LAYER_DECISION_EVENT_ID:null,TRACK_VIEW_ACTIVATED_EVENT:null,REGISTER_ASYNC_DEFERRED:null,RESOLVE_DEFERRED:null,REJECT_DEFERRED:null,REGISTER_PLUGIN:null,ADD_CLEANUP_FN:null,CLEAR_CLEANUP_FN:null,ACTION_EXECUTED:null,REGISTER_ACTION:null,SET_VIEW_ACTIVE_STATE:null,UPDATE_PARSED_VIEW_METADATA:null,UPDATE_USER_SUPPLIED_METADATA:null,REGISTER_VIEWS:null,SET_GLOBAL_TAGS:null,ATTACH_EVENT_STREAM_PUBLISHERS:null,DETACH_EVENT_STREAM_PUBLISHERS:null,LOAD_DIRECTIVE:null,SET_COOKIE_AGE:null,SET_COOKIE_DOMAIN:null,XDOMAIN_SET_DEFAULT_FRAME:null,XDOMAIN_ADD_FRAME:null,XDOMAIN_SET_MESSAGE:null,XDOMAIN_ADD_SUBSCRIBER:null,XDOMAIN_SET_CANONICAL_ORIGINS:null,XDOMAIN_SET_DISABLED:null,ADD_EMITTER_HANDLER:null,REMOVE_EMITTER_HANDLER:null,SET_INTEGRATION_SETTINGS:null,ADD_CHANGE:null,ADD_PREPARED_CHANGE:null,ANNOUNCE_PENDING_REDIRECT:null,LOAD_REDIRECT_DATA:null,REGISTER_TRACKED_REDIRECT_DATA:null,SET_PENDING_EVENT:null,REMOVE_PENDING_EVENT:null,LOAD_PENDING_EVENTS:null,SANDBOXED_FUNCTIONS_ADDED:null,SET_RUM_DATA:null,SET_PERFORMANCE_DATA:null,SET_RESOURCE_TIMING_DATA:null,SET_PERFORMANCE_MARKS_DATA:null,REGISTER_TRACKER_VISITOR:null,REGISTER_TRACKER_EVENT:null,REGISTER_TRACKER_DECISION:null,RESET_TRACKER_EVENTS:null,RESET_TRACKER_STORE:null,SET_TRACKER_POLLING:null,SET_TRACKER_BATCHING:null,SET_UA_DATA:null})}),(function(e,t,n){function i(e){var t=[Array.prototype],n=[];r.each(t,(function(e){r.isUndefined(e.toJSON)||(n.push(e.toJSON),delete e.toJSON)}));var i,a;try{i=e()}catch(e){a=e}finally{r.each(n,(function(e,n){t[n].toJSON=e}))}if(a)throw a;return i}var r=n(8);t.stringify=function(){return i(function(){return JSON.stringify.apply(null,this)}.bind(arguments))},t.parse=JSON.parse}),(function(e,t,n){var i=n(8),r=n(5),a=n(20),o=a.create(),s={action_data:n(21),async_request:n(22),audience_data:n(23),change_data:n(24),cleanup:n(25),cookie_options:n(26),event_data:n(27),event_emitter:n(28),dimension_data:n(29),directive:n(30),global:n(31),global_state:n(32),integration_settings:n(33),layer:n(34),layer_data:n(35),log:n(36),observed_redirect:n(37),pending_events:n(38),performance:n(39),plugins:n(40),prepared_change:n(41),provider_status:n(42),pending_redirect:n(43),rum:n(44),sandbox:n(45),session:n(46),tracker_optimizely:n(48),ua_data:n(49),view:n(50),view_data:n(51),visitor:n(52),visitor_attribute_entity:n(53),visitor_events:n(54),visitor_events_manager:n(60),visitor_id:n(61),xdomain:n(62)};r.registerStores(s),i.forOwn(s,(function(e,t){o.register("stores/"+t,r.getStore(t))})),e.exports=o}),(function(e,t,n){function i(){this.L={}}var r=n(8);i.prototype.register=function(e,t){if(1===arguments.length){var n=this;return void r.each(e,(function(e,t){n.register(t,e)}))}if(this.L[e])throw new Error("Module already registered for: "+e);this.L[e]=t},i.prototype.get=function(e){return this.L[e]},i.prototype.getModuleKeys=function(){var e=this.L;return r.keys(e)},i.prototype.evaluate=function(e){var t=e.length,n=e.slice(0,t-1),i=e[t-1];if("function"!=typeof i)throw new Error("Evaluate must take a function as last element in array");var a=r.map(n,this.get.bind(this));return i.apply(null,a)},i.prototype.reset=function(){this.L={}},e.exports={create:function(){return new i}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={},this.on(r.DATA_LOADED,this.P)},P:function(e){var t=this;i.isEmpty(e.data.layers)||(i.each(e.data.layers,(function(e){if(e.changes){var n="layerId:"+e.id;t.A[n]={id:n,layerId:e.id,changeSet:e.changes,type:"layer"}}i.each(e.experiments,(function(n){if(n.changes){var r="experimentId:"+n.id;t.A[r]={id:r,layerId:e.id,experimentId:n.id,changeSet:n.changes,type:"experiment"}}i.each(n.variations,(function(r){i.each(r.actions,(function(i){var a=n.id+":"+r.id+":"+i.viewId;t.A[a]={id:a,layerId:e.id,experimentId:n.id,variationId:r.id,viewId:i.viewId,changeSet:i.changes,type:"variation"}}))}))}))})),this.emitChange())},getByChangeId:function(e){return i.find(this.A,{changeSet:[{id:e}]})},getExperimentVariationActions:function(e,t){return i.cloneDeep(i.filter(this.A,{experimentId:e,variationId:t}))},getLayerActions:function(e){return i.cloneDeep(i.filter(this.A,{id:"layerId:"+e}))},getExperimentActions:function(e){return i.cloneDeep(i.filter(this.A,{id:"experimentId:"+e}))}}}),(function(e,t,n){var i=n(17);e.exports={initialize:function(){this.A={},this.on(i.REGISTER_ASYNC_DEFERRED,this.k),this.on(i.RESOLVE_DEFERRED,this.F),this.on(i.REJECT_DEFERRED,this.V),this.on(i.ACTIVATE,this.M)},getRequest:function(e){return this.A[e]},getPromise:function(e){var t=this.getRequest(e);if(t)return t.promise},M:function(){this.A={},this.emitChange()},k:function(e){this.A[e.source]={promise:e.promise,resolver:e.resolver,rejecter:e.rejecter}},F:function(e){var t=this.getRequest(e.source);if(!t)throw new Error("No request registered for source: "+e.source);t.resolver(e.resolveWith)},V:function(e){var t=this.getRequest(e.source);if(!t)throw new Error("No request registered for source: "+e.source);if(!t.rejecter)throw new Error("No rejecter registered for source: "+e.source);t.rejecter(e.rejectWith)}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={},this.on(r.DATA_LOADED,this.P)},P:function(e){i.isEmpty(e.data.audiences)||(i.each(e.data.audiences,function(e){this.A[e.id]=e}.bind(this)),this.emitChange())},getAll:function(){return i.cloneDeep(i.values(this.A))},get:function(e){return i.cloneDeep(this.A[e])},getAudienceName:function(e){var t=i.find(i.values(this.A),{id:e});return t.name||"Aud "+e}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={},this.on(r.ADD_CHANGE,this.U),this.on(r.DATA_LOADED,this.P)},getChange:function(e){return this.A[e]},P:function(e){i.isEmpty(e.data.changes)||i.each(e.data.changes,this.U.bind(this))},U:function(e){var t=e.id,n=this.getChange(t);this.A[t]=n?i.extend(n,e):e,this.emitChange()}}}),(function(e,t,n){var i=n(8),r=n(17),a=n(12);e.exports={initialize:function(){this.A={},i.each(a.Lifecycle,function(e){this.A[e]=[]}.bind(this)),this.on(r.ADD_CLEANUP_FN,this.G),this.on(r.CLEAR_CLEANUP_FN,this.B)},getCleanupFns:function(e){return i.cloneDeep(this.A[e])},G:function(e){this.A[e.lifecycle].push(e.cleanupFn),this.emitChange()},B:function(e){var t=this.A[e.lifecycle];if(e.cleanupFn){var n=t.indexOf(e.cleanupFn);n>-1&&(t.splice(n,1),this.emitChange())}else this.A[e.lifecycle]=[],this.emitChange()}}}),(function(e,t,n){var i=n(17),r=31536e4;e.exports={initialize:function(){this.A={currentDomain:null,defaultAgeSeconds:r},this.on(i.SET_COOKIE_DOMAIN,this.j),this.on(i.SET_COOKIE_AGE,this.z)},getCurrentDomain:function(){return this.A.currentDomain},getDefaultAgeInSeconds:function(){return this.A.defaultAgeSeconds},j:function(e){this.A.currentDomain=e,this.emitChange()},z:function(e){this.A.defaultAgeSeconds=e,this.emitChange()}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={},this.on(r.DATA_LOADED,this.P)},getAll:function(){return i.cloneDeep(i.values(this.A))},get:function(e){return i.cloneDeep(this.A[e])},getByApiName:function(e){return i.find(i.values(this.A),{apiName:e})},getByViewId:function(e){return i.cloneDeep(i.filter(this.A,{viewId:e}))},P:function(e){i.isEmpty(e.data.events)||(i.each(e.data.events,function(e){this.A[e.id]=e}.bind(this)),this.emitChange())}}}),(function(e,t,n){function i(e){var t=[];return e&&r.isObject(e)?(e.type&&t.push(e.type),t.push(o),e.type&&e.name&&t.push(e.name),t.join("")):o}var r=n(8),a=n(17),o="|";e.exports={initialize:function(){this.A={handlers:{}},this.on(a.ADD_EMITTER_HANDLER,this.H),this.on(a.REMOVE_EMITTER_HANDLER,this.Y)},getHandlers:function(e,t){var n=[null,{type:e.type},{type:e.type,name:e.name}],a=[];return r.each(n,function(e){var t=i(e),n=this.A.handlers[t];n&&(a=a.concat(n))}.bind(this)),t&&(a=r.filter(a,(function(e){return!e.publicOnly}))),a},H:function(e){var t=i(e.filter);this.A.handlers[t]||(this.A.handlers[t]=[]),this.A.handlers[t].push({handler:e.handler,token:e.token,publicOnly:!!e.publicOnly,emitErrors:!!e.emitErrors}),this.emitChange()},Y:function(e){var t=!1,n=e.token;r.forOwn(this.A.handlers,(function(e,i){r.each(e,(function(i,r){i.token===n&&(t=!0,e.splice(r,1))}))})),t&&this.emitChange()}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={},this.on(r.DATA_LOADED,this.P)},P:function(e){i.isEmpty(e.data.dimensions)||(i.each(e.data.dimensions,function(e){this.A[e.id]=e}.bind(this)),this.emitChange())},getAll:function(){return i.cloneDeep(i.values(this.A))},getById:function(e){return i.cloneDeep(this.A[e])},getByApiName:function(e){return i.cloneDeep(i.find(i.values(this.A),{apiName:e}))}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={disabled:!1,forceAudienceIds:[],forceVariationIds:[],alreadyInitialized:!1,isEditor:!1,isPreview:!1,isLegacyPreview:!1,isSlave:!1,previewLayerIds:[],projectToken:null,shouldOptOut:!1,trackingDisabled:!1,isRunningInV2Editor:!1,isRunningInDesktopApp:!1,forceTracking:!1},this.on(r.LOAD_DIRECTIVE,this.q)},getAll:function(){return i.cloneDeep(this.A)},isDisabled:function(){return this.A.disabled},isEditor:function(){return this.A.isEditor},clientHasAlreadyInitialized:function(){return this.A.alreadyInitialized},getForceAudienceIds:function(){return this.A.forceAudienceIds},getForceVariationIds:function(){return this.A.forceVariationIds},getPreviewLayerIds:function(){return this.A.previewLayerIds},getProjectToken:function(){return this.A.projectToken},getForceTracking:function(){return this.A.forceTracking},shouldActivate:function(){return!this.A.isEditor&&!this.isDisabled()},shouldBootstrapDataForPreview:function(){return this.A.isPreview},shouldBootstrapDataForEditor:function(){return this.A.isEditor},shouldInitialize:function(){return!(this.shouldOptOut()||this.shouldLoadPreview()||this.isDisabled()||this.getProjectToken())},shouldLoadPreview:function(){return!(this.A.isPreview||this.A.isLegacyPreview||!this.getProjectToken()||this.A.isEditor)},shouldBailForDesktopApp:function(){return!this.A.isEditor&&this.A.isRunningInDesktopApp},shouldLoadInnie:function(){return!this.A.isSlave&&!this.A.isEditor&&this.A.isRunningInV2Editor},shouldOptOut:function(){return this.A.shouldOptOut},shouldSendTrackingData:function(){return!this.A.trackingDisabled&&(!!this.A.forceTracking||!this.A.isPreview&&i.isEmpty(this.getForceVariationIds())&&i.isEmpty(this.getForceAudienceIds()))},isSlave:function(){return this.A.isSlave},isRunningInDesktopApp:function(){return this.A.isRunningInDesktopApp},isRunningInV2Editor:function(){return this.A.isRunningInV2Editor},q:function(e){i.extend(this.A,e),this.emitChange()}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={holdback:0,isGlobalHoldback:null,listTargetingCookies:[],revision:null,projectId:null,accountId:null,namespace:null,activationId:null,dcpServiceId:null,dcpKeyfieldLocators:[],recommenderServices:[],anonymizeIP:null,projectJS:null,snippetId:null,plugins:[]},this.on(r.DATA_LOADED,this.K),this.on(r.ACTIVATE,this.W),this.on(r.RECORD_GLOBAL_DECISION,this.X)},getRevision:function(){return this.A.revision},getGlobalHoldbackThreshold:function(){return this.A.holdback},getProjectId:function(){return this.A.projectId},getSnippetId:function(){return this.A.snippetId},getAccountId:function(){return this.A.accountId},getNamespace:function(){return this.A.namespace},getActivationId:function(){return this.A.activationId},getAnonymizeIP:function(){return this.A.anonymizeIP},isGlobalHoldback:function(){return!!this.A.isGlobalHoldback},getListTargetingCookieNames:function(){return this.A.listTargetingCookies.slice()},getDCPServiceId:function(){return this.A.dcpServiceId},getDCPKeyfieldLocators:function(){return this.A.dcpKeyfieldLocators},getRecommenderServices:function(){return this.A.recommenderServices},getProjectJS:function(){return this.A.projectJS},getPlugins:function(){return this.A.plugins},W:function(e){this.A.activationId=e.activationId,this.A.isGlobalHoldback=null},X:function(e){var t=e.isGlobalHoldback;if(null!==this.A.isGlobalHoldback&&this.A.isGlobalHoldback!==t)throw new Error("Attempted to change already set global holdback!");this.A.isGlobalHoldback=t,this.emitChange()},K:function(e){var t=i.pick(e.data,["holdback","accountId","projectId","snippetId","namespace","revision","listTargetingCookies","dcpServiceId","dcpKeyfieldLocators","recommenderServices","anonymizeIP","plugins","projectJS"]);if(0!==i.keys(t).length){var n={listTargetingCookies:[],dcpServiceId:null,dcpKeyfieldLocators:[]};i.extend(this.A,n,t),this.emitChange()}}}}),(function(e,t,n){var i=n(17);e.exports={initialize:function(){this.A={effectiveReferrer:null,effectiveVariationId:null},this.on(i.INITIALIZE_STATE,this.Q)},getEffectiveReferrer:function(){return this.A.effectiveReferrer},getEffectiveVariationId:function(){return this.A.effectiveVariationId},Q:function(e){e.effectiveReferrer&&(this.A.effectiveReferrer=e.effectiveReferrer),e.effectiveVariationId&&(this.A.effectiveVariationId=e.effectiveVariationId),this.emitChange()}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={},this.on(r.DATA_LOADED,this.P),this.on(r.SET_INTEGRATION_SETTINGS,this.J)},P:function(e){i.isEmpty(e.data.integrationSettings)||(i.each(e.data.integrationSettings,function(e){this.A[e.id]=e}.bind(this)),this.emitChange())},J:function(e){var t=this.A[e.id];t?i.extend(t,e):this.A[e.id]=e},getAll:function(){return i.cloneDeep(i.values(this.A))},get:function(e){return i.cloneDeep(this.A[e])},getReference:function(e){return this.A[e]}}}),(function(e,t,n){var i=n(8),r=n(11),a=n(17),o="*";e.exports={initialize:function(){this.A={},this.on(a.LOAD_PERSISTED_LAYER_STATES,this.Z),this.on(a.RECORD_LAYER_DECISION,this.ee),this.on(a.RECORD_LAYER_DECISION_EVENT_ID,this.te),this.on(a.ACTION_EXECUTED,this.ne)},getLayerState:function(e,t){if(this.A[e]){var n=this.A[e];if(i.keys(n).length>1&&!t)throw new Error("View Id must be specified when more than one layerState for layer.");return t?i.cloneDeep(i.find(n,{viewId:t})):i.cloneDeep(n[o])}},getLayerStates:function(e){var t=[];for(var n in this.A)i.forEach(this.A[n],(function(n){(i.isUndefined(e)||n.namespace===e)&&t.push(i.cloneDeep(n))}));return t},Z:function(e){e.merge||(this.A={}),i.each(e.layerStates,function(e){var t=e.layerId,n=e.viewId||o,r=this.A[t];if(i.isUndefined(r))this.A[t]={},this.A[t][n]=e;else{var a=r[n];(!a||e.decisionTimestamp>(a.decisionTimestamp||0))&&(this.A[t][n]=e)}}.bind(this)),this.emitChange()},ne:function(e){var t=e.action.layerId,n=e.action.viewId;if(!this.A[t])return void r.warn("No Campaign registered for action executed",e);var i;this.A[t][n]?i=this.A[t][n]:this.A[t][o]&&(i=this.A[t][o]),i&&(i.actionTriggered=!0,i.actionSessionId=e.sessionId,i.actionActivationId=e.activationId,i.actionTimestamp=e.timestamp),this.emitChange()},ee:function(e){var t={layerId:e.layerId,revision:e.revision,decision:e.decision,decisionSessionId:e.sessionId,decisionActivationId:e.activationId,decisionTimestamp:e.timestamp,decisionEventId:null,actionTriggered:!1,actionSessionId:null,actionActivationId:null,actionTimestamp:null,decisionTicket:e.decisionTicket,decisionTicketTimestamp:e.timestamp,namespace:e.namespace,viewId:e.viewId},n=this.A[e.layerId]||{};e.viewId?(delete n[o],n[e.viewId]=t):(n={},n[o]=t),this.A[e.layerId]=n,this.emitChange()},te:function(e){var t=e.layerId,n=e.viewId||o;return this.A[t]?this.A[t][n]?(this.A[t][n].decisionEventId=e.decisionId,void this.emitChange()):void r.warn("Not recording decision event: Layer state not found for view",n):void r.warn("Not recording decision event: Campaign not registered",t)}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={},this.on(r.DATA_LOADED,this.P)},P:function(e){i.isEmpty(e.data.layers)||(i.each(e.data.layers,function(e){this.A[e.id]=e}.bind(this)),this.emitChange())},getAll:function(){return i.cloneDeep(i.values(this.A))},getCount:function(){return i.keys(this.A).length},getAllByViewId:function(e){return i.cloneDeep(i.filter(i.values(this.A),(function(t){return i.includes(t.viewIds,e)})))},get:function(e){return i.cloneDeep(this.A[e])},getLayerByExperimentId:function(e){var t=i.values(this.A),n=i.find(t,(function(t){return i.find(t.experiments,{id:e})}));return n},getExperimentByVariationId:function(e){var t,n=i.values(i.cloneDeep(this.A));return i.some(n,(function(n){return i.some(n.experiments,(function(n){return i.find(n.variations,{id:e})&&(t=n),t})),t})),t}}}),(function(e,t,n){var i=n(17);e.exports={initialize:function(){this.A={logs:[]},this.on(i.LOG,this.re)},getLogs:function(){return this.A.logs},re:function(e){this.A.logs.push(e),this.emitChange()},f:function(){return this.A.logs.slice()}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={data:null,hasTracked:null},this.on(r.LOAD_REDIRECT_DATA,this.ae),this.on(r.REGISTER_TRACKED_REDIRECT_DATA,this.oe)},get:function(){return i.cloneDeep(this.A.data)},hasTracked:function(){return this.A.hasTracked},ae:function(e){this.A.data=e,this.A.hasTracked=!1,this.emitChange()},oe:function(){this.A.hasTracked=!0}}}),(function(e,t,n){var i=n(8),r=n(17),a=1e3;e.exports={initialize:function(){this.A={},this.on(r.SET_PENDING_EVENT,this.se),this.on(r.REMOVE_PENDING_EVENT,this.ue),this.on(r.LOAD_PENDING_EVENTS,this.ce)},getEvents:function(){return this.A},se:function(e){i.keys(this.A).length>=a&&this.le();var t=e.id,n=e.retryCount;this.A[t]&&this.A[t].retryCount===n||(this.A[t]={id:t,timeStamp:e.timeStamp,data:e.data,retryCount:n},this.emitChange())},ue:function(e){delete this.A[e.id],this.emitChange()},ce:function(e){this.A=e.events,this.le(),this.emitChange()},le:function(){for(var e=i.sortBy(this.A,"timeStamp"),t=0;t<=e.length-a;t++)delete this.A[e[t].id];this.emitChange()}}}),(function(e,t,n){var i=n(8),r=n(17),a=n(12);e.exports={initialize:function(){this.A={},this.A[a.PerformanceData.performance_marks]={},this.A[a.PerformanceData.resource_timing]=[],this.on(r.SET_PERFORMANCE_DATA,this.de),this.on(r.SET_PERFORMANCE_MARKS_DATA,this.fe),this.on(r.SET_RESOURCE_TIMING_DATA,this.pe)},de:function(e){i.extend(this.A,e.data),this.emitChange()},fe:function(e){i.isUndefined(this.A[a.PerformanceData.performance_marks][e.name])&&(this.A[a.PerformanceData.performance_marks][e.name]=[]),this.A[a.PerformanceData.performance_marks][e.name].push(e.data),this.emitChange()},pe:function(e){this.A[a.PerformanceData.resource_timing].push(e.data),this.emitChange()},get:function(){return i.cloneDeep(this.A)},getMarks:function(){return i.cloneDeep(this.A[a.PerformanceData.performance_marks])}}}),(function(e,t,n){var i=n(17),r=n(12),a=n(8),o=n(11);e.exports={initialize:function(){this.A=a.mapValues(r.PluginTypes,(function(){return{}})),this.on(i.REGISTER_PLUGIN,this.he)},he:function(e){var t=e.type,n=e.name,i=e.plugin;if(!(t&&n&&i))throw new Error("Missing information needed to register plugins: "+t+":"+n);if(!this.A[t])throw new Error("Invalid plugin type specified: "+t);this.A[t][n]=i,o.debug("Plugin Store: Registering Plugin :",e)},getAllPlugins:function(e){if(e){if(this.A[e])return this.A[e];throw new Error("Invalid plugin type: "+e)}return this.A},getPlugin:function(e,t){if(!t||!e)throw new Error("Missing plugin parameters");var n=this.getAllPlugins(e);return n[t]||null}}}),(function(e,t,n){var i=n(17);e.exports={initialize:function(){this.A={},this.on(i.ADD_PREPARED_CHANGE,this.ge)},getPreparedChange:function(e){return this.A[e]},ge:function(e){var t=e.id;this.A[t]=e,this.emitChange()}}}),(function(e,t,n){var i=n(17);e.exports={initialize:function(){this.A={},this.on(i.SET_VISITOR_ATTRIBUTE_PENDING,this.ve)},getPendingAttributeValue:function(e){if(this.A[e])return this.A[e].pending},ve:function(e){this.A[e.key]={pending:e.pending},this.emitChange()}}}),(function(e,t,n){var i=n(17);e.exports={initialize:function(){this.A={dest:null},this.on(i.ANNOUNCE_PENDING_REDIRECT,this.ae)},isExpectingRedirect:function(){return!!this.A.dest},ae:function(e){this.isExpectingRedirect()||(this.A.dest=e.dest,this.emitChange())}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={inRumSample:!1,src:null,RumHost:null,data:{}},this.on(r.SET_RUM_DATA,this.de)},de:function(e){i.merge(this.A,e),this.emitChange()},getSampleRum:function(){return this.A.inRumSample},getRumHost:function(){return this.A.RumHost},getRumData:function(){return i.cloneDeep(this.A.data)},getScriptSrc:function(){return this.A.src}}}),(function(e,t,n){var i=n(17);e.exports={initialize:function(){this.A={initialized:!1,natives:{}},this.on(i.SANDBOXED_FUNCTIONS_ADDED,this.me)},me:function(e){if(!e.sandboxedFunctions)throw new Error("No sandboxedFunctions found in payload");this.A.natives=e.sandboxedFunctions,this.A.initialized=!0,this.emitChange()},getAll:function(){return this.A.natives},get:function(e){if(!e)throw new Error("Missing name parameter");return this.A.natives[e]||null},isInitialized:function(){return this.A.initialized}}}),(function(e,t,n){var i=n(8),r=n(17),a=n(14),o=n(47),s=18e5;e.exports={initialize:function(){this.A={lastSessionTimestamp:0,sessionId:null},this.on(r.REFRESH_SESSION,this._e),this.on(r.LOAD_SESSION_STATE,this.Ee)},getState:function(){return i.cloneDeep(this.A)},getSessionId:function(){return this.A.sessionId},Ee:function(e){this.A.sessionId=e.sessionId,this.A.lastSessionTimestamp=e.lastSessionTimestamp,this.emitChange()},_e:function(){var e=a.now(),t=this.A.lastSessionTimestamp;(!this.A.sessionId||e-t>s)&&(this.A.sessionId=o.generate()),this.A.lastSessionTimestamp=e,this.emitChange()}}}),(function(e,t){t.generate=function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}}),(function(e,t,n){var i=n(17),r=n(8);e.exports={initialize:function(){this.M(),this.on(i.REGISTER_TRACKER_VISITOR,this.ye),this.on(i.REGISTER_TRACKER_EVENT,this.Ie),this.on(i.REGISTER_TRACKER_DECISION,this.Te),this.on(i.RESET_TRACKER_EVENTS,this.Se),this.on(i.RESET_TRACKER_STORE,this.M),this.on(i.SET_TRACKER_POLLING,this.Ae),this.on(i.SET_TRACKER_BATCHING,this.be)},Ie:function(e){var t=this.we();t.snapshots.length?this.De().events.push(e.event):t.snapshots.push({decisions:this.Re(),events:[e.event]}),this.emitChange()},Te:function(e){this.A.decisions.push(e.decision);var t=this.De(),n=this.we();r.isEmpty(t)||t.events.length!==t.decisions.length?n.snapshots.push({decisions:this.Re(),events:[e.decisionEvent]}):(t.decisions.push(e.decision),t.events.push(e.decisionEvent)),this.emitChange()},ye:function(e){r.isEmpty(this.A.data)&&(this.A.data=e.data),this.A.data.visitors.push(e.visitor),this.A.decisions=e.decisions,this.emitChange()},M:function(){this.A={polling:!1,shouldBatch:!0,data:{},decisions:[]},this.emitChange()},Se:function(){var e=this.we();this.A.data.visitors=[e],e.snapshots=[],this.emitChange()},Ae:function(){this.A.polling=!0,this.emitChange()},be:function(e){this.A.shouldBatch=e,this.emitChange()},getEventBatch:function(){return r.cloneDeep(this.A.data)},Re:function(){return this.A.decisions.slice()},isPolling:function(){return this.A.polling},shouldBatch:function(){return this.A.shouldBatch},De:function(){return r.last(this.we().snapshots)},we:function(){return r.last(this.A.data.visitors)},shouldSend:function(){return!r.isEmpty(this.A.data)&&0!==this.we().snapshots.length}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={},this.on(r.SET_UA_DATA,this.P)},P:function(e){i.isEmpty(this.A)&&(this.A=e.data)},get:function(){return i.cloneDeep(this.A)}}}),(function(e,t,n){var i=n(8),r=n(11),a=n(17),o={globalTags:{},viewStates:{}};e.exports={initialize:function(){this.A=i.cloneDeep(o),this.on(a.REGISTER_VIEWS,this.Ne),this.on(a.SET_VIEW_ACTIVE_STATE,this.Oe),this.on(a.UPDATE_PARSED_VIEW_METADATA,this.Ce),this.on(a.UPDATE_USER_SUPPLIED_METADATA,this.xe),this.on(a.TRACK_VIEW_ACTIVATED_EVENT,this.Le),this.on(a.SET_GLOBAL_TAGS,this.Pe),this.on(a.ACTIVATE,this.ke)},getAll:function(){var e={};for(var t in this.A.viewStates)e[t]=this.getViewState(t);return e},getViewState:function(e){var t=i.cloneDeep(this.A.viewStates[e]),n=this.A.globalTags;return t.metadata=i.extend({},t.parsedMetadata,n,t.userSuppliedMetadata),t},getActiveViewTags:function(){var e=this.getActiveViewStates(),t=i.map(e,(function(e){return e.metadata})),n=[{}].concat(t);return i.extend.apply(i,n)},getActivationEventId:function(e){return this.A.viewStates[e]?this.A.viewStates[e].activationEventId:null},getActiveViewStates:function(){return i.reduce(this.A.viewStates,function(e,t,n){return this.isViewActive(n)&&e.push(this.getViewState(n)),e}.bind(this),[])},isViewActive:function(e){var t=this.A.viewStates[e];return t||r.warn("No Page registered with id",e),!!t.isActive},getGlobalTags:function(){return i.cloneDeep(this.A.globalTags)},ke:function(){var e=i.cloneDeep(o);i.isEmpty(this.A.globalTags)||(e.globalTags=this.A.globalTags),this.A=e,this.emitChange()},Ne:function(e){i.each(e.views,function(e){var t=e.id;this.A.viewStates[t]={id:t,isActive:!1,activatedTimestamp:null,activationEventId:null,parsedMetadata:{},userSuppliedMetadata:{}}}.bind(this)),this.emitChange()},Oe:function(e){var t=e.view.id;if(!this.A.viewStates[t])throw new Error("No view exists with id "+t);this.A.viewStates[t].isActive=e.isActive,e.isActive?this.A.viewStates[t].activatedTimestamp=e.timestamp:(this.A.viewStates[t].parsedMetadata={},this.A.viewStates[t].userSuppliedMetadata={}),this.emitChange()},Ce:function(e){var t=e.viewId;if(!this.A.viewStates[t])throw new Error("No view exists with id "+t);i.merge(this.A.viewStates[t].parsedMetadata,e.metadata),this.emitChange()},xe:function(e){var t=e.viewId;if(!this.A.viewStates[t])throw new Error("No view exists with id "+t);i.merge(this.A.viewStates[t].userSuppliedMetadata,e.metadata),this.emitChange()},Le:function(e){var t=e.viewId;this.A.viewStates[t]&&(this.A.viewStates[t].activationEventId=e.eventData.eventId,this.emitChange())},Pe:function(e){i.extend(this.A.globalTags,e),this.emitChange()}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={},this.on(r.DATA_LOADED,this.P)},getAll:function(){return i.cloneDeep(i.values(this.A))},get:function(e){return i.cloneDeep(this.A[e])},getByApiName:function(e){return i.cloneDeep(i.find(i.values(this.A),{apiName:e}))},P:function(e){i.isEmpty(e.data.views)||(i.each(e.data.views,function(e){this.A[e.id]=e}.bind(this)),this.emitChange())}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={profile:{},metadata:{}},this.on(r.SET_VISITOR_ATTRIBUTES,this.Fe),this.on(r.LOAD_EXISTING_VISITOR_PROFILE,this.Ve)},getVisitorProfile:function(){return this.A.profile},getVisitorProfileMetadata:function(){return this.A.metadata},getAttribute:function(e,t){var n=this.A.profile;return t&&(n=n[t]||{}),i.cloneDeep(n[e])},getAttributeMetadata:function(e){return i.cloneDeep(this.A.metadata[e])},Ve:function(e){this.A.profile=e.profile,this.A.metadata=e.metadata,this.emitChange()},Fe:function(e){var t,n;i.each(e.attributes,function(e){t=this.A.profile,n=this.A.metadata,e.type&&(t=this.A.profile[e.type]=this.A.profile[e.type]||{}),t[e.key]=e.value,e.metadata&&i.forOwn(e.metadata,function(t,i){e.type&&(n=this.A.metadata[e.type]=this.A.metadata[e.type]||{}),n[e.key]=n[e.key]||{},n[e.key][i]=t}.bind(this))}.bind(this)),this.emitChange()}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={},this.on(r.DATA_LOADED,this.Me)},getCustomBehavioralAttributes:function(){return i.filter(this.A,(function(e){return!!e.rule_json}))},getVisitorAttribute:function(e){var t=i.values(this.A);if(e.datasourceId&&(t=i.filter(t,{dcp_datasource_id:String(e.datasourceId)})),e.attributeName&&e.attributeId)throw new Error("Must not specify both attribute name and attribute ID");if(e.attributeId){var n=this.A[e.attributeId];if(!n)throw new Error("Unrecognized attribute ID: "+e.attributeId);return n}if(e.attributeName){var r=i.filter(t,{name:e.attributeName});if(!r.length)throw new Error("Unrecognized attribute name: "+e.attributeName);if(r.length>1)throw new Error("Too many attributes with name: "+e.attributeName);return r[0]}throw new Error("Must specify attribute name or attribute ID")},Me:function(e){i.isEmpty(e.data.visitorAttributes)||(i.each(e.data.visitorAttributes,function(e){this.A[e.id]=e}.bind(this)),this.emitChange())}}}),(function(e,t,n){var i=(n(8),n(17));n(55).Event;e.exports={initialize:function(){this.A={events:[],foreignEvents:{},foreignEventQueues:{}},this.on(i.SET_VISITOR_EVENTS,this.P),this.on(i.SET_FOREIGN_VISITOR_EVENTS,this.Ue),this.on(i.SET_FOREIGN_VISITOR_EVENT_QUEUE,this.Ge)},getEvents:function(){return this.A.events},getForeignEvents:function(){return this.A.foreignEvents},getForeignEventQueues:function(){return this.A.foreignEventQueues},P:function(e){this.A.events=e,this.emitChange()},Ue:function(e){this.A.foreignEvents[e.key]=e.value},Ge:function(e){this.A.foreignEventQueues[e.key]=e.value}}}),(function(e,t,n){function i(e,t,n,i,r){this[o.FIELDS.NAME]=e,this[o.FIELDS.TYPE]=t,a.isString(n)&&n.trim().length>0&&(this[o.FIELDS.CATEGORY]=n),i&&a.keys(i).length>0&&(this[o.FIELDS.OPTIONS]=i),a.isUndefined(r)||(this[o.FIELDS.REVENUE]=r)}function r(e,t,n){this.eventBase=e,this[o.FIELDS.TIME]=t,a.isUndefined(n)||(this[o.FIELDS.SESSION_ID]=n)}var a=n(8),o=n(56),s=n(57),u=n(59).getFieldValue;t.EventBase=i,i.prototype.digest=function(){var e=function(e,t){return encodeURIComponent(e)+"="+encodeURIComponent(t)},t=[];if(t.push(e(o.FIELDS.NAME,this[o.FIELDS.NAME])),
t.push(e(o.FIELDS.TYPE,this[o.FIELDS.TYPE])),this[o.FIELDS.CATEGORY]&&t.push(e(o.FIELDS.CATEGORY,this[o.FIELDS.CATEGORY])),this[o.FIELDS.REVENUE]&&t.push(e(o.FIELDS.REVENUE,this[o.FIELDS.REVENUE])),!this[o.FIELDS.OPTIONS])return t.join("&");var n=this[o.FIELDS.OPTIONS]||{},i=a.filter(a.keys(n),(function(e){return n.hasOwnProperty(e)}));i=i.sort();for(var r=0;r<i.length;r++)t.push(e(i[r],n[i[r]]));return t.join("&")},i.prototype.hash=function(){return this.hash_?this.hash_:(this.hash_=s.hashToHex(s.toByteString(this.digest()),s.Seed.BEHAVIOR_EVENT),this.hash_)},i.prototype.setHash=function(e){this.hash_=e},i.prototype.reHash=function(){this.hash_=null,this.hash()},i.prototype.equals=function(e){if(this.hash()!==e.hash())return!1;if(this[o.FIELDS.NAME]!==e[o.FIELDS.NAME]||this[o.FIELDS.TYPE]!==e[o.FIELDS.TYPE]||this[o.FIELDS.CATEGORY]!==e[o.FIELDS.CATEGORY]||this[o.FIELDS.REVENUE]!==e[o.FIELDS.REVENUE])return!1;if(!this[o.FIELDS.OPTIONS]&&!e[o.FIELDS.OPTIONS])return!0;var t=this[o.FIELDS.OPTIONS]||{},n=e[o.FIELDS.OPTIONS]||{},i=a.filter(a.keys(t),(function(e){return t.hasOwnProperty(e)})),r=a.filter(a.keys(n),(function(e){return n.hasOwnProperty(e)}));if(i.length!==r.length)return!1;for(var s=0;s<i.length;s++){var u=i[s];if(!n.hasOwnProperty(u)||t[u]!==n[u])return!1}return!0},i.prototype.getValueOrDefault=function(e,t){var n=u(this,e);return a.isUndefined(n)?t:n},i.prototype.setFieldValue=function(e,t){e!==o.FIELDS.NAME&&e!==o.FIELDS.TYPE&&e!==o.FIELDS.CATEGORY&&e!==o.FIELDS.REVENUE&&e!==o.FIELDS.OPTIONS||(this[e]=t,this.reHash())},t.Event=r,r.prototype.getValueOrDefault=function(e,t){if(0===e.length)return this;var n={};n[o.FIELDS.TIME]=this[o.FIELDS.TIME],n[o.FIELDS.SESSION_ID]=this[o.FIELDS.SESSION_ID];var i=u(n,e);return a.isUndefined(i)?this.eventBase.getValueOrDefault(e,t):i},r.prototype.setFieldValue=function(e,t){e===o.FIELDS.TIME||e===o.FIELDS.SESSION_ID?this[e]=t:this.eventBase.setFieldValue(e,t)};var c={n:"name",y:"type",c:"category",r:"revenue",s:"session_id",o:"tags"};r.prototype.readableEvent=function(){var e,t,n=function(e){return a.isString(e)?'"'+e+'"':e},i=this,r=[];a.each([o.FIELDS.NAME,o.FIELDS.TYPE,o.FIELDS.CATEGORY,o.FIELDS.REVENUE,o.FIELDS.SESSION_ID],(function(o){e=c[o],t=i.getValueOrDefault([o]),a.isUndefined(t)||r.push(e+": "+n(t))}));var s=[];if(e=c[o.FIELDS.OPTIONS],t=i.getValueOrDefault([o.FIELDS.OPTIONS]),a.isUndefined(t)||(a.each(t,(function(e,t){s.push(t+": "+String(n(e)))})),r.push(e+": {\n\t\t"+s.join(",\n\t\t")+"\n\t}")),t=i.getValueOrDefault([o.FIELDS.TIME]),a.isNumber(t)&&(t=n(new Date(t).toString())),!a.isUndefined(t)){var u="timestamp";r.push(u+": "+t)}return"{\n\t"+r.join(",\n\t")+"\n}"},r.prototype.toObject=function(e){var t,n,i={},r=this;a.each([o.FIELDS.NAME,o.FIELDS.TYPE,o.FIELDS.CATEGORY,o.FIELDS.REVENUE,o.FIELDS.OPTIONS],(function(e){t=c[e],n=r.getValueOrDefault([e],e===o.FIELDS.OPTIONS?{}:void 0),a.isUndefined(n)||(i[t]=n)}));var s=c[o.FIELDS.OPTIONS],u=c[o.FIELDS.REVENUE];if(e&&e.revenueAsTag&&i[u]&&(i[s]=i[s]||{},i[s][u]=i[u],delete i[u]),n=r.getValueOrDefault([o.FIELDS.TIME]),a.isNumber(n))if(e&&e.timeAsTimestamp){var l="timestamp";i[l]=new Date(n)}else{var d="time";i[d]=n}return i}}),(function(e,t){t.FIELDS={NAME:"n",TIME:"t",TYPE:"y",CATEGORY:"c",REVENUE:"r",SESSION_ID:"s",OPTIONS:"o"},t.FIELDS_V0_2={name:t.FIELDS.NAME,time:t.FIELDS.TIME,type:t.FIELDS.TYPE,category:t.FIELDS.CATEGORY,tags:t.FIELDS.OPTIONS}}),(function(e,t,n){var i=n(58).v3,r={IGNORING:0,BUCKETING:1,FALLBACK:2,HOLDBACK:3,BEHAVIOR_EVENT:2716770798},a=Math.pow(2,32),o=function(e,t,n){return Math.floor(u(e,t)*n)},s=function(e,t){var n=i(e,t);return(n>>>16).toString(16)+(65535&n).toString(16)},u=function(e,t){var n=i(e,t);return(n>>>0)/a},c=function(e){var t=String.fromCharCode;return e.replace(/[\S\s]/gi,(function(e){e=e.charCodeAt(0);var n=t(255&e);return e>255&&(n=t(e>>>8&255)+n),e>65535&&(n=t(e>>>16)+n),n}))};e.exports={Seed:r,hashToHex:s,hashToInt:o,hashToReal:u,toByteString:c}}),(function(e,t,n){!(function(){function t(e,t){for(var n,i=e.length,r=t^i,a=0;i>=4;)n=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24,n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16),n^=n>>>24,n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^n,i-=4,++a;switch(i){case 3:r^=(255&e.charCodeAt(a+2))<<16;case 2:r^=(255&e.charCodeAt(a+1))<<8;case 1:r^=255&e.charCodeAt(a),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)}return r^=r>>>13,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),r^=r>>>15,r>>>0}function n(e,t){var n,i,r,a,o,s,u,c;for(n=3&e.length,i=e.length-n,r=t,o=3432918353,s=461845907,c=0;c<i;)u=255&e.charCodeAt(c)|(255&e.charCodeAt(++c))<<8|(255&e.charCodeAt(++c))<<16|(255&e.charCodeAt(++c))<<24,++c,u=(65535&u)*o+(((u>>>16)*o&65535)<<16)&4294967295,u=u<<15|u>>>17,u=(65535&u)*s+(((u>>>16)*s&65535)<<16)&4294967295,r^=u,r=r<<13|r>>>19,a=5*(65535&r)+((5*(r>>>16)&65535)<<16)&4294967295,r=(65535&a)+27492+(((a>>>16)+58964&65535)<<16);switch(u=0,n){case 3:u^=(255&e.charCodeAt(c+2))<<16;case 2:u^=(255&e.charCodeAt(c+1))<<8;case 1:u^=255&e.charCodeAt(c),u=(65535&u)*o+(((u>>>16)*o&65535)<<16)&4294967295,u=u<<15|u>>>17,u=(65535&u)*s+(((u>>>16)*s&65535)<<16)&4294967295,r^=u}return r^=e.length,r^=r>>>16,r=2246822507*(65535&r)+((2246822507*(r>>>16)&65535)<<16)&4294967295,r^=r>>>13,r=3266489909*(65535&r)+((3266489909*(r>>>16)&65535)<<16)&4294967295,r^=r>>>16,r>>>0}var i=n;i.v2=t,i.v3=n;e.exports=i})()}),(function(e,t,n){var i=n(8);t.getFieldValue=function(e,t){if(i.isArray(t)){for(var n=e,r=0;r<t.length;r++){var a=t[r];if(!i.isObject(n)||!n.hasOwnProperty(a))return;n=n[a]}return n}}}),(function(e,t,n){var i=n(17);e.exports={initialize:function(){this.A={baseMap:{},eventQueue:[],lastEvent:null,initialized:!1,cleared:!1},this.on(i.UPDATE_BEHAVIOR_STORE,this.Be)},getBaseMap:function(){return this.A.baseMap},getEventQueue:function(){return this.A.eventQueue},getLastEvent:function(){return this.A.lastEvent},getCleared:function(){return this.A.cleared},getInitialized:function(){return this.A.initialized},Be:function(e){this.A[e.key]=e.value}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={randomId:null,UUID:null,variationIdMap:{},preferredLayerMap:{}},this.on(r.SET_VISITOR_ID,this.P),this.on(r.UPDATE_VARIATION_ID_MAP,this.je),this.on(r.MERGE_VARIATION_ID_MAP,this.ze),this.on(r.UPDATE_PREFERRED_LAYER_MAP,this.He),this.on(r.MERGE_PREFERRED_LAYER_MAP,this.Ye)},getBucketingId:function(){return this.getUUID()||this.getRandomId()},getRandomId:function(){return this.A.randomId},getUUID:function(){return this.A.UUID},getVariationIdMap:function(){return i.cloneDeep(this.A.variationIdMap)},je:function(e){var t=this.A.variationIdMap,n=t[e.layerId]||{};n[e.experimentId]!==e.variationId&&(n[e.experimentId]=e.variationId,this.A.variationIdMap[e.layerId]=n,this.emitChange())},ze:function(e){var t=this.getVariationIdMap(),n=e.variationIdMap;i.merge(n,t),this.A.variationIdMap=n,this.emitChange()},getPreferredLayerMap:function(){return i.cloneDeep(this.A.preferredLayerMap)},getPreferredLayerId:function(e){return this.A.preferredLayerMap[e]},He:function(e){this.A.preferredLayerMap[e.groupId]!==e.layerId&&(this.A.preferredLayerMap[e.groupId]=e.layerId,this.emitChange())},Ye:function(e){var t=this.getPreferredLayerMap(),n=e.preferredLayerMap;i.merge(n,t),this.A.preferredLayerMap=n,this.emitChange()},P:function(e){i.extend(this.A,e),this.emitChange()}}}),(function(e,t,n){var i=n(8),r=n(17);e.exports={initialize:function(){this.A={frames:[],defaultFrame:null,messages:[],subscribers:[],canonicalOrigins:null,disabled:!1},this.on(r.XDOMAIN_SET_DEFAULT_FRAME,this.qe),this.on(r.XDOMAIN_ADD_FRAME,this.Ke),this.on(r.XDOMAIN_SET_MESSAGE,this.We),this.on(r.XDOMAIN_ADD_SUBSCRIBER,this.Xe),this.on(r.XDOMAIN_SET_CANONICAL_ORIGINS,this.$e),this.on(r.XDOMAIN_SET_DISABLED,this.Qe)},getMessages:function(){return i.cloneDeep(this.A.messages)},getNextMessageId:function(){return this.A.messages.length},getMessageById:function(e){return this.A.messages[e]},getSubscribers:function(){return this.A.subscribers},getFrames:function(){return this.A.frames},getNextFrameId:function(){return this.A.frames.length},getDefaultFrame:function(){return this.A.defaultFrame},getCanonicalOrigins:function(){return i.cloneDeep(this.A.canonicalOrigins)},isDisabled:function(){return this.A.disabled},qe:function(e){this.A.defaultFrame=e},Ke:function(e){this.A.frames.push(e)},We:function(e){this.A.messages[e.messageId]=e.message},Xe:function(e){this.A.subscribers.push(e.subscriber)},$e:function(e){this.A.canonicalOrigins=e.canonicalOrigins},Qe:function(e){this.A.disabled=e.disabled}}}),(function(e,t,n){function i(e){return s[e]||r.LogLevel.ALL}var r=n(12),a=n(11),o=n(18),s={LOG:r.LogLevel.ALL+1};t.onPreAction=function(e,t){var n=a.shouldLog(i(e));if(n){var r="[object]";try{r=o.stringify(t)}catch(e){}r&&r.length>50&&(r=r.substr(0,50)+"..."),a.groupCollapsed("DISPATCH: "+e+" | "+r),a.logAlways("payload: ",t)}},t.onPostAction=function(e,t){a.shouldLog(i(e))&&(a.logAlways("stores:",this.getState()),a.groupEnd())}}),(function(e,t,n){var i=n(8),r=n(17),a=n(5),o=n(65).Promise,s=n(11),u=n(14),c=n(69),l=n(18),d=3;t.isCORSSupported=function(){var e=c.get("XMLHttpRequest");return"withCredentials"in new e},t.request=function(e){return e=i.extend({method:"GET",async:!0},e),new o(function(n,r){if(!t.isCORSSupported())return r("CORS is not supported");var a=c.get("XMLHttpRequest"),o=new a;o.onload=function(){e.success&&e.success(o),n(o)},o.onerror=function(){e.error&&e.error(o),r(o)},i.isObject(e.data)&&(e.data=l.stringify(e.data)),o.open(e.method,e.url,e.async),e.contentType&&o.setRequestHeader("Content-Type",e.contentType),o.send(e.data)})},t.retryableRequest=function(e,n,c,l){if(!n)return o.reject(new Error("No id specified for request."));if(!t.isCORSSupported())return o.reject(new Error("CORS is not supported."));i.isUndefined(l)&&(l=d),i.isUndefined(c)&&(c=0);var f={id:n,timeStamp:u.now(),data:e,retryCount:c};return a.dispatch(r.SET_PENDING_EVENT,f),s.debug("Sending event ",n),t.request(e).then((function(e){return a.dispatch(r.REMOVE_PENDING_EVENT,{id:n}),e}),(function(e){throw f.retryCount>=l?(a.dispatch(r.REMOVE_PENDING_EVENT,{id:n}),s.warn("Event ",f," could not be sent after ",l," attempts.")):(f.retryCount++,a.dispatch(r.SET_PENDING_EVENT,f),s.debug("Event ",f," failed to send, with error ",e," It will be retried ",l-c," times.")),e}))},t.sendBeacon=t.request}),(function(e,t,n){e.exports=n(66)}),(function(e,t,n){(function(t,i){/*!
	 * @overview es6-promise - a tiny implementation of Promises/A+.
	 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
	 * @license   Licensed under MIT license
	 *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
	 * @version   4.1.0
	 */
!(function(t,n){e.exports=n()})(this,(function(){"use strict";function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function r(e){return"function"==typeof e}function a(e){X=e}function o(e){$=e}function s(){return function(){return t.nextTick(f)}}function u(){return"undefined"!=typeof W?function(){W(f)}:d()}function c(){var e=0,t=new Z(f),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function l(){var e=new MessageChannel;return e.port1.onmessage=f,function(){return e.port2.postMessage(0)}}function d(){var e=setTimeout;return function(){return e(f,1)}}function f(){for(var e=0;e<K;e+=2){var t=ne[e],n=ne[e+1];t(n),ne[e]=void 0,ne[e+1]=void 0}K=0}function p(){try{var e=n(68);return W=e.runOnLoop||e.runOnContext,u()}catch(e){return d()}}function h(e,t){var n=arguments,i=this,r=new this.constructor(v);void 0===r[re]&&k(r);var a=i._state;return a?!(function(){var e=n[a-1];$((function(){return x(a,r,e,i._result)}))})():R(i,r,e,t),r}function g(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(v);return A(n,e),n}function v(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function _(){return new TypeError("A promises callback cannot return that same promise.")}function E(e){try{return e.then}catch(e){return ue.error=e,ue}}function y(e,t,n,i){try{e.call(t,n,i)}catch(e){return e}}function I(e,t,n){$((function(e){var i=!1,r=y(n,t,(function(n){i||(i=!0,t!==n?A(e,n):w(e,n))}),(function(t){i||(i=!0,D(e,t))}),"Settle: "+(e._label||" unknown promise"));!i&&r&&(i=!0,D(e,r))}),e)}function T(e,t){t._state===oe?w(e,t._result):t._state===se?D(e,t._result):R(t,void 0,(function(t){return A(e,t)}),(function(t){return D(e,t)}))}function S(e,t,n){t.constructor===e.constructor&&n===h&&t.constructor.resolve===g?T(e,t):n===ue?(D(e,ue.error),ue.error=null):void 0===n?w(e,t):r(n)?I(e,t,n):w(e,t)}function A(t,n){t===n?D(t,m()):e(n)?S(t,n,E(n)):w(t,n)}function b(e){e._onerror&&e._onerror(e._result),N(e)}function w(e,t){e._state===ae&&(e._result=t,e._state=oe,0!==e._subscribers.length&&$(N,e))}function D(e,t){e._state===ae&&(e._state=se,e._result=t,$(b,e))}function R(e,t,n,i){var r=e._subscribers,a=r.length;e._onerror=null,r[a]=t,r[a+oe]=n,r[a+se]=i,0===a&&e._state&&$(N,e)}function N(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var i=void 0,r=void 0,a=e._result,o=0;o<t.length;o+=3)i=t[o],r=t[o+n],i?x(n,i,r,a):r(a);e._subscribers.length=0}}function O(){this.error=null}function C(e,t){try{return e(t)}catch(e){return ce.error=e,ce}}function x(e,t,n,i){var a=r(n),o=void 0,s=void 0,u=void 0,c=void 0;if(a){if(o=C(n,i),o===ce?(c=!0,s=o.error,o.error=null):u=!0,t===o)return void D(t,_())}else o=i,u=!0;t._state!==ae||(a&&u?A(t,o):c?D(t,s):e===oe?w(t,o):e===se&&D(t,o))}function L(e,t){try{t((function(t){A(e,t)}),(function(t){D(e,t)}))}catch(t){D(e,t)}}function P(){return le++}function k(e){e[re]=le++,e._state=void 0,e._result=void 0,e._subscribers=[]}function F(e,t){this._instanceConstructor=e,this.promise=new e(v),this.promise[re]||k(this.promise),q(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?w(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&w(this.promise,this._result))):D(this.promise,V())}function V(){return new Error("Array Methods must be provided an Array")}function M(e){return new F(this,e).promise}function U(e){var t=this;return new t(q(e)?function(n,i){for(var r=e.length,a=0;a<r;a++)t.resolve(e[a]).then(n,i)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function G(e){var t=this,n=new t(v);return D(n,e),n}function B(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function j(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function z(e){this[re]=P(),this._result=this._state=void 0,this._subscribers=[],v!==e&&("function"!=typeof e&&B(),this instanceof z?L(this,e):j())}function H(){var e=void 0;if("undefined"!=typeof i)e=i;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=z}var Y=void 0;Y=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var q=Y,K=0,W=void 0,X=void 0,$=function(e,t){ne[K]=e,ne[K+1]=t,K+=2,2===K&&(X?X(f):ie())},Q="undefined"!=typeof window?window:void 0,J=Q||{},Z=J.MutationObserver||J.WebKitMutationObserver,ee="undefined"==typeof self&&"undefined"!=typeof t&&"[object process]"==={}.toString.call(t),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ne=new Array(1e3),ie=void 0;ie=ee?s():Z?c():te?l():void 0===Q?p():d();var re=Math.random().toString(36).substring(16),ae=void 0,oe=1,se=2,ue=new O,ce=new O,le=0;return F.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ae&&n<e;n++)this._eachEntry(t[n],n)},F.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,i=n.resolve;if(i===g){var r=E(e);if(r===h&&e._state!==ae)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(n===z){var a=new n(v);S(a,e,r),this._willSettleAt(a,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(i(e),t)},F.prototype._settledAt=function(e,t,n){var i=this.promise;i._state===ae&&(this._remaining--,e===se?D(i,n):this._result[t]=n),0===this._remaining&&w(i,this._result)},F.prototype._willSettleAt=function(e,t){var n=this;R(e,void 0,(function(e){return n._settledAt(oe,t,e)}),(function(e){return n._settledAt(se,t,e)}))},z.all=M,z.race=U,z.resolve=g,z.reject=G,z._setScheduler=a,z._setAsap=o,z._asap=$,z.prototype={constructor:z,then:h,catch:function(e){return this.then(null,e)}},z.polyfill=H,z.Promise=z,z}))}).call(t,n(67),(function(){return this})())}),(function(e,t){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function r(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function a(e){if(d===clearTimeout)return clearTimeout(e);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function o(){g&&p&&(g=!1,p.length?h=p.concat(h):v=-1,h.length&&s())}function s(){if(!g){var e=r(o);g=!0;for(var t=h.length;t;){for(p=h,h=[];++v<t;)p&&p[v].run();v=-1,t=h.length}p=null,g=!1,a(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,d,f=e.exports={};!(function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(e){d=i}})();var p,h=[],g=!1,v=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new u(e,t)),1!==h.length||g||r(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}}),(function(e,t){}),(function(e,t,n){var i=n(8),r=n(14),a=n(12),o=n(70),s=n(5),u=n(17),c=n(11),l=n(19),d=l.get("stores/sandbox"),f=n(16);t.shouldSandbox=function(){return!1},t.get=function(e){if(!e)throw new Error("Name is required");if(t.shouldSandbox()){d.isInitialized()||p();var n=d.get(e);if(n)return n}return f.getGlobal(e)};var p=function(){try{var e="optimizely_"+r.now(),t=o.createElement("iframe");t.name=e,t.style.display="none",o.appendToHead(t);var n=t.contentWindow,l=t.contentDocument;l.write("<script></script>"),l.close();var d=i.mapValues(a.SandboxedFunctions,(function(e){return n[e]}));s.dispatch(u.SANDBOXED_FUNCTIONS_ADDED,{sandboxedFunctions:d}),t.parentNode.removeChild(t)}catch(e){c.warn("Unable to create a sandbox: ",e)}}}),(function(e,t){function n(){return"loading"===t.getReadyState()}t.getCookieString=function(){return document.cookie||""},t.setCookie=function(e){document.cookie=e},t.querySelector=function(e){return document.querySelector(e)},t.querySelectorAll=function(e){return document.querySelectorAll(e)},t.createElement=function(e){return document.createElement(e)},t.isReady=function(){return"interactive"===document.readyState||"complete"===document.readyState},t.isLoaded=function(){return"complete"===document.readyState},t.addReadyHandler=function(e){return document.addEventListener("DOMContentLoaded",e),function(){t.removeReadyHandler(e)}},t.removeReadyHandler=function(e){return function(){document.removeEventListener("DOMContentLoaded",e)}},t.getReferrer=function(){return document.referrer},t.getReadyState=function(){return document.readyState},t.write=function(e){if(!n())throw new Error("Aborting attempt to write to already-loaded document");document.write(e)},t.appendToHead=function(e){return document.head.appendChild(e)},t.addEventListener=function(e,t,n){return document.addEventListener(e,t,n),function(){document.removeEventListener(e,t,n)}},t.getCurrentScript=function(){if(document.currentScript)return document.currentScript}}),(function(e,t,n){function i(){var e=Boolean(m.result(window.optimizely,"initialized"));I.dispatch(E.LOAD_DIRECTIVE,{alreadyInitialized:e})}function r(){var e=w.getUserAgent()||"";if(!m.isString(e))return void _.warn("Directive / userAgent not a string");e=e.toLowerCase();var t=["googlebot","yahoo! slurp","bingbot","bingpreview","msnbot","keynote","ktxn","khte","gomezagent","alertsite","yottaamonitor","pingdom.com_bot","aihitbot","baiduspider","adsbot-google","mediapartners-google","applebot","catchpoint","phantomjs","moatbot","facebookexternalhit"],n=function(t){if(m.includes(e,t))return _.warn("Directive / Matches bot:",t),!0};m.some(t,n)&&(_.log("Directive / Disabling tracking"),I.dispatch(E.LOAD_DIRECTIVE,{trackingDisabled:!0}))}function a(){var e=T.get(S.COOKIES.OPT_OUT),n=R.getQueryParamValue(N.OPT_OUT);e?n===e||"true"!==n&&"false"!==n?I.dispatch(E.LOAD_DIRECTIVE,{shouldOptOut:"true"===e}):t.setOptOut("true"===n):"true"===n&&t.setOptOut(!0)}function o(){var e=!1,t=[N.AB_PREVIEW,N.DISABLE];t.push(N.EDITOR);for(var n=0;n<t.length;n++)if("true"===R.getQueryParamValue(t[n])){_.warn("Directive / Not activating because "+t[n]+" is set."),e=!0;break}I.dispatch(E.LOAD_DIRECTIVE,{disabled:e})}function s(){I.dispatch(E.LOAD_DIRECTIVE,{isPreview:!1})}function u(){var e=R.getQueryParamValue(N.LEGACY_PREVIEW);e&&_.log("Directive / Is legacy preview mode"),I.dispatch(E.LOAD_DIRECTIVE,{isLegacyPreview:!!e})}function c(){I.dispatch(E.LOAD_DIRECTIVE,{isEditor:!1})}function l(){I.dispatch(E.LOAD_DIRECTIVE,{isSlave:!1})}function d(){var e=w.getGlobal("optlyDesktop"),t=!(!e||m.isUndefined(e.p13nInner));t&&_.log("Directive / Is running in desktop app editor"),I.dispatch(E.LOAD_DIRECTIVE,{isRunningInDesktopApp:t})}function f(){var e="true"===R.getQueryParamValue(N.EDITOR_V2);e&&_.log("Directive / Is running in editor"),I.dispatch(E.LOAD_DIRECTIVE,{isRunningInV2Editor:e})}function p(){var e=T.get(S.COOKIES.TOKEN)||null,t=R.getQueryParamValue(N.TOKEN)||e;I.dispatch(E.LOAD_DIRECTIVE,{projectToken:t})}function h(){var e=T.get(S.COOKIES.PREVIEW),t=[],n=R.getQueryParamValue(N.FORCE_AUDIENCES);if(n)t=n.split(",");else if(e)try{var i=D.parse(e);t=i.forceAudienceIds}catch(t){var r=new b("Failed to parse previewCookie in registerForceAudienceIds: "+e),a={originalMessage:t.message,userError:!0};y.emitError(r,a)}t.length&&_.warn("Directive / Force parameters disabled - ignoring force audience IDs.")}function g(){var e=T.get(S.COOKIES.PREVIEW),t=[],n=R.getQueryParamValue(N.FORCE_VARIATIONS);if(n)t=n.split(",");else if(e)try{var i=D.parse(e);t=i.forceVariationIds}catch(t){var r=new b("Failed to parse previewCookie in registerForceVariationIds: "+e),a={originalMessage:t.message,userError:!0};y.emitError(r,a)}t.length&&_.warn("Directive / Force parameters disabled - ignoring force variation IDs.")}function v(){var e=R.getQueryParamValue(N.FORCE_TRACKING);e&&I.dispatch(E.LOAD_DIRECTIVE,{forceTracking:e})}var m=n(8),_=n(11),E=n(17),y=n(72),I=n(5),T=n(74),S=n(12),A=n(2),b=t.JSONParseError=A("JSONParseError"),w=n(16),D=n(18),R=n(75),N={AB_PREVIEW:"optimizely_show_preview",DISABLE:"optimizely_disable",EDITOR:"optimizely_editor",EDITOR_V2:"optimizely_p13n",FORCE_AUDIENCES:"optimizely_x_audiences",FORCE_VARIATIONS:"optimizely_x",LEGACY_PREVIEW:"optimizely_show_preview",OPT_OUT:"optimizely_opt_out",PREVIEW_LAYER_IDS:"optimizely_preview_layer_ids",TOKEN:"optimizely_token",FORCE_TRACKING:"optimizely_force_tracking"};t.populateDirectiveData=function(){r(),i(),a(),o(),c(),s(),u(),l(),d(),f(),p(),h(),g(),v()},t.setOptOut=function(e){e?(_.warn("Directive / Opting out"),T.set(S.COOKIES.OPT_OUT,"true",null,!0)):T.remove(S.COOKIES.OPT_OUT),I.dispatch(E.LOAD_DIRECTIVE,{shouldOptOut:e})}}),(function(e,t,n){var i=n(73);t.emitError=function(e,t,n){var r=!0;i.emit({type:"error",name:e.name||"Error",data:{error:e,metadata:t}},n||!1,r)},t.emitInternalError=function(e,n){t.emitError(e,n,!0)},t.emitAnalyticsEvent=function(e,t){var n={type:"analytics",name:"trackEvent",data:e};i.emit(n,t)}}),(function(e,t,n){var i=n(8),r=n(47),a=n(5),o=n(17),s=n(19),u=n(11),c=n(72),l=s.get("stores/event_emitter");t.on=function(e){return e.token||(e.token=r.generate()),a.dispatch(o.ADD_EMITTER_HANDLER,e),e.token},t.off=function(e){a.dispatch(o.REMOVE_EMITTER_HANDLER,{token:e})},t.emit=function(e,t,n){var r=l.getHandlers(e,t);i.each(r,(function(i){try{i.handler.call({$di:s},e)}catch(r){u.warn("Error in event emitter handler",e,r),!n&&i.emitErrors&&c.emitError(r,null,t)}}))}}),(function(e,t,n){function i(e,n){n!==!1&&(n=!0);for(var i,r,o=e.hostname.split("."),s=[],u=null,d=o.length-1;d>=0;d--)if(s.unshift(o[d]),i=s.join("."),!a.includes(g,i)){r={domain:n?"."+i:i};try{t.set(v,Math.random().toString(),r),t.remove(v,r),u=r.domain;break}catch(e){}}return c.dispatch(l.SET_COOKIE_DOMAIN,u),u}var r=n(2),a=n(8),o=n(14),s=n(70),u=n(16),c=n(5),l=n(17),d=n(19),f=d.get("stores/cookie_options"),p=t.SetError=r("CookieSetError"),h=t.MismatchError=r("CookieMismatchError");t.getAll=function(e){a.isUndefined(e)&&(e=!0);var n,i,r,o,u;n=s.getCookieString().split(/\s*;\s*/);var c={};for(r=0;r<n.length;r++)if(i=n[r],o=i.indexOf("="),o>0&&(u=t.safeDecodeURIComponent(i.substring(0,o)),void 0===c[u])){var l=i.substring(o+1);e&&(l=t.safeDecodeURIComponent(l)),c[u]=l}return c},t.safeDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(t){return e}},t.get=function(e,n){var i=t.getAll(n);return i[e]},t.set=function(e,n,r,c){r=a.extend({encodeValue:!0},r),c!==!1&&(c=!0);var l=[];if(a.isUndefined(r.domain)){var d=f.getCurrentDomain();d||(d=i(u.getLocation(),!0)),r.domain=d}if(r.domain&&l.push("domain="+r.domain),a.isUndefined(r.path)&&(r.path="/"),r.path&&l.push("path="+r.path),a.isUndefined(r.expires)){var g=a.isUndefined(r.maxAge)?f.getDefaultAgeInSeconds():r.maxAge;r.expires=new Date(o.now()+1e3*g)}if(a.isUndefined(r.expires)||l.push("expires="+r.expires.toUTCString()),r.secure&&l.push("secure"),l=l.join(";"),s.setCookie(e+"="+(r.encodeValue?encodeURIComponent(n):n)+";"+l),c){var v=r.encodeValue,m=t.get(e,v);if(m!==n){if(!m)throw new p('Failed to set cookie "'+e+'"');throw new h('Expected "'+n+'" for "'+e+'", got "'+m+'"')}}},t.remove=function(e,n){t.set(e,null,a.extend({},n,{expires:new Date(0)}),!1)};var g=["optimizely.test"],v="optimizelyDomainTestCookie"}),(function(e,t,n){var i=n(16),r=n(15);t.getLanguage=function(){return i.getNavigatorLanguage()},t.getQueryParams=r.getQueryParams,t.getQueryParamValue=r.getQueryParamValue,t.getUrl=function(){return i.getHref()}}),(function(e,t,n){var i=n(70),r=n(11),a=n(64);t.addScriptAsync=function(e,t){var n=i.querySelector("head"),a=i.createElement("script");a.type="text/javascript",a.async=!0,a.src=e,t&&(a.onload=t),n.insertBefore(a,n.firstChild),r.debug("Asynchronously requesting "+e)},t.addScriptSync=function(e,n){try{var o="optimizely_synchronous_script_"+Math.floor(1e5*Math.random());if(e.indexOf('"')!==-1)return void r.error("Blocked attempt to load unsafe script: "+e);if(i.write('<script id="'+o+'" src="'+e+'"></script>'),!i.querySelector("#"+o))throw new Error("Document.write failed to append script");n&&n()}catch(i){r.debug("Document.write failed for "+e+": "+i.message);var s=function(e){var t=new Function(e.responseText);t(),n&&n()};return a.request({url:e,async:!1,contentType:"text/plain",success:s}).catch((function(i){r.error("Failed to load "+e+" via synchronous XHR: "+i.message),t.addScriptAsync(e,n)}))}}}),(function(e,t,n){var i=n(16),r="optimizelyDataApi";t.registerFunction=function(e,t){var n=i.getGlobal(r);n||(n={},i.setGlobal(r,n)),n[e]||(n[e]=t)},t.getFunction=function(e){return i.getGlobal(r)[e]}}),(function(e,t,n){function i(){var e=null;I.isNumber(e)&&0===ne.getCount()?(M.log("Activating after delay of",e,"ms because no Experiments are running"),D.dispatch(V.SET_RUM_DATA,{data:{activateDfd:!0}}),setTimeout(R.emitActivateEvent,e)):R.emitActivateEvent()}function r(e){fe.handleError(e.data.error,e.data.metadata)}function a(){I.isArray(window.optimizely)&&(window.optimizely=I.filter(window.optimizely,(function(e){var t=!0;return!de.push(e,t)})))}function o(e){var t=ee.getVisitorProfile();return O.populateEagerVisitorData(e,t)}function s(e,t,n){e=e||[];var i=te.getAllPlugins(U.PluginTypes.visitorProfileProviders),r=re.getGlobalHoldbackThreshold(),a=ee.getVisitorProfile();O.populateLazyVisitorData(i,a);var o=ce.getBucketingId();if(!o)throw new Error("bucketingId not set");var s,u=ee.getVisitorProfile();if(t){var c=ce.getVariationIdMap();s=c[t.id]}var l;n&&(l=n.id);var d={bucketingId:o,visitorProfile:u,audiences:e,globalHoldback:r,preferredVariationMap:s,viewId:l,layer:t};return L.createTicket(d)}function u(e){var t=ne.getAllByViewId(e.id),n=ue.getForceVariationIds(),i=ue.getForceAudienceIds(),r={individual:t};M.log("Deciding Campaigns for Page",k.description(e));var a=I.map(r.individual,C.description).join(", ");M.log("Campaigns not in Groups:",a);var o=[],s=I.map(r.individual,I.partial(c,n,i,e)),u=o.concat(s);return w.all(u).then((function(n){var i=I.filter(n,(function(e){return!!e}));return M.log("All Campaigns for Page",k.description(e),"resolved:",I.map(i,C.description).join(", ")),t}))}function c(e,t,n,i){return new w(function(r,a){try{p(i,e,t,n,(function(a){l(i,e,t,n,a),r(i)}))}catch(e){M.error("Error getting decision for Campaign: "+C.description(i),e),a(e)}})}function l(e,t,n,i,r){var a=C.description(e);M.log("Activating Campaign",a,"on Page",k.description(i));var o=m(e,r,t,n),s=!(!t.length&&!n.length),u=E(e,o,s)||[],c=y(u,i);if(d(c,e,o,i),F.trackDecisionEvent(o,r),o.error)throw o.error;return L.isInCohort(o)?void f(c,e,o,i):void M.log("Not activating Campaign: "+C.description(e)+"; not in the cohort because:",o.reason)}function d(e,t,n,i){var r=C.description(t);M.log("Preparing actions",e,"for Campaign",r,"on Page",k.description(i)),I.forEach(e,x.prepareAction)}function f(e,t,n,i){var r=C.description(t);return M.log("Executing actions",e,"for Campaign",r,"on Page",k.description(i)),w.all(I.map(e,(function(e){return x.executePreparedAction(e).then(I.partial(R.emitActionAppliedEvent,e))}))).then((function(){M.log("All page actions for",n,"applied:",e),R.emitActionsForDecisionAppliedEvent(n,e)})).catch((function(e){M.warn("Error evaluating page actions for decision",n,"because:",e)}))}function p(e,t,n,i,r){if(t.length||n.length)return void r(s([],void 0,i));var a=C.relatedAudienceIds(e),o=I.reduce(a,(function(e,t){var n=ie.get(t);return n&&e.push(n),e}),[]);v(o,C.getActivationTimeout(e),(function(){var t=s(o,e,i);h(t,o,e),r(t)}))}function h(e,t,n){var i=I.map(e.audienceIds,ie.get.bind(ie)),r=I.filter(t,(function(t){return!I.includes(e.audienceIds,t.id)}));M.log("When deciding Campaign",C.description(n),"visitor is in audiences:",g(i),"and not in audiences:",g(r))}function g(e){var t=[];return I.each(e,(function(e){t.push(e.name,e)})),t}function v(e,t,n){var i={},r=te.getAllPlugins(U.PluginTypes.audienceMatchers);I.each(e,(function(e){var t=B.requiredAudienceFields(e,r);I.each(t,(function(e){i[e]=!0}))}));var a=I.reduce(i,(function(e,t,n){if(I.isUndefined(O.getAttribute(n))){var i=O.getPendingAttributeValue(n);I.isUndefined(i)||e.push(i)}return e}),[]);if(0===a.length)return n();var o=j.firstToResolve(I.map(a,(function(t){return w.resolve(t).then((function(){var t=ee.getVisitorProfile(),n=I.map(e,(function(e){return B.isInAudience(t,e,r)}));if(I.some(n,I.isUndefined))throw new Error("Some audience is undefined")}))})));w.race([o,new w(function(e,n){setTimeout(n,t)})]).then((function(){M.log("Activating Campaign after pending Audiences resolved",e),n()}),(function(){M.log("Activating Campaign after timeout on Audiences",e),n()}))}function m(e,t,n,i){var r,a=C.description(e);return n.length?r=L.getDummyLayerDecision(e,n):(i.length&&(M.log("Applying force audienceIds:",i,"to Campaign",a),t=I.cloneDeep(t),t.audienceIds=i),r=L.decideLayer(e,t)),M.log("Recording decision for Campaign",a,t,"->",r),C.recordLayerDecision(e.id,t,r),r.variationId&&r.experimentId&&(O.updateVariationIdMap(e.id,r.experimentId,r.variationId),O.persistVariationId()),R.emitLayerDecided({layer:e,decisionTicket:t,decision:r}),r}function _(e){var t=J.getCleanupFns(e);if(t.length>0){for(;t.length>0;)t.shift()();D.dispatch(V.CLEAR_CLEANUP_FN,{lifecycle:e})}}function E(e,t,n){var i=C.description(e),r="NOT applying changes for Campaign";if(!n&&re.isGlobalHoldback())return M.log(r,i,"(visitor is in global holdback)"),null;if(t.isLayerHoldback)return M.log(r,i,"(visitor is in layer holdback)"),null;if(!t.experimentId||!t.variationId)return M.log(r,i,"(visitor is not eligible for any Experiments)"),null;var a=[].concat(ae.getLayerActions(t.layerId)||[],ae.getExperimentActions(t.experimentId)||[],ae.getExperimentVariationActions(t.experimentId,t.variationId)||[]);return M.log("Got Actions for Campaign:",i,a),a}function y(e,t){return I.filter(e,(function(e){return I.isUndefined(e.viewId)||e.viewId===t.id}))}var I=n(8),T=n(47),S=n(2),A=(t.JSONParseError=S("JSONParseError"),t.ActivationCodeError=S("ActivationCodeError")),b=t.ProjectJSError=S("ProjectJSError"),w=n(65).Promise,D=n(5),R=n(79),N=n(72),O=n(82),C=n(89),x=(n(90),n(91)),L=(n(18),n(96)),P=n(102),k=n(103),F=n(108),V=n(17),M=n(11),U=(n(83).LocalStorage,n(114),n(12)),G=n(73),B=n(101),j=n(115),z=n(80),H=n(116),Y=n(70),q=n(74),K=(n(113),n(93)),W=n(117),X=n(112),$=n(19),Q=$.get("stores/layer"),J=$.get("stores/cleanup"),Z=$.get("stores/session"),ee=$.get("stores/visitor"),te=$.get("stores/plugins"),ne=$.get("stores/layer_data"),ie=$.get("stores/audience_data"),re=$.get("stores/global"),ae=$.get("stores/action_data"),oe=$.get("stores/view_data"),se=$.get("stores/view"),ue=$.get("stores/directive"),ce=$.get("stores/visitor_id"),le=$.get("stores/pending_events"),de=($.get("stores/xdomain"),$.get("stores/group_data"),n(118)),fe=n(133),pe=n(134),he=1e3,ge=t;t.initialize=function(e){var n=3e3;if(pe.initialize(),setTimeout(pe.send,n),G.on({filter:{type:"error"},handler:r}),D.dispatch(V.DATA_LOADED,{data:e.clientData}),M.log("Initialized with DATA:",e.clientData),a(),ue.isDisabled())return void M.log("Controller / Is disabled");var o=!1,s=q.get(U.COOKIES.REDIRECT);if(s){M.debug("Found redirect data:",s);var u=s.match(/^(\d+)\|(.*)/);if(u){var c=u[1],l=u[2];D.dispatch(V.INITIALIZE_STATE,{effectiveVariationId:c,effectiveReferrer:l}),o=!0}}o||X.load();var d=re.getProjectJS();if(I.isFunction(d))try{d()}catch(e){M.error("Error while executing projectJS: ",e),N.emitError(new b(e.message),{originalError:e})}var f=[].concat(e.plugins||[],re.getPlugins()||[]);I.each(f,(function(e){try{e(P)}catch(e){N.emitInternalError(e)}})),ee.observe(O.persistVisitorProfile),Q.observe(O.persistLayerStates),Z.observe(O.persistSessionState),le.observe(W.persistPendingEvents),G.on({filter:{type:"lifecycle",name:"viewActivated"},handler:t.onViewActivated}),t.initializeApi();var p=W.getPendingEvents();if(p&&(D.dispatch(V.LOAD_PENDING_EVENTS,{events:p}),W.retryPendingEvents(p)),G.on({filter:{type:"lifecycle",name:"activate"},handler:t.activate}),R.emitInitializedEvent(),!ue.shouldActivate())return w.resolve();var h=[];return i(),w.all(h)},t.activate=function(){try{var e=[];M.log("Activated client"),I.forEach(se.getActiveViewStates(),(function(e){k.deactivate(oe.get(e.id))})),_(U.Lifecycle.preActivate),D.dispatch(V.ACTIVATE,{activationId:T.generate()}),k.registerViews(oe.getAll()),O.setId(O.getIdFromCookies()),e.push(F.trackPostRedirectDecisionEvent()),D.dispatch(V.MERGE_VARIATION_ID_MAP,{variationIdMap:O.getVariationIdMap()}),O.persistVariationId(),_(U.Lifecycle.postVisitorProfileLoad),e.push(o(te.getAllPlugins(U.PluginTypes.visitorProfileProviders)).then((function(){M.log("Populated visitor profile")})));var t=s(),n=L.decideGlobal(t);M.log("Made global decision",t,"->",n),D.dispatch(V.RECORD_GLOBAL_DECISION,n);var i=F.trackClientActivation();return i?M.log("Tracked activation event",i):M.log("Not tracking activation event"),ge.setUpViewActivation(),_(U.Lifecycle.postViewsActivated),_(U.Lifecycle.postActivate),R.emitActivatedEvent(),w.all(e).then((function(){G.emit({type:z.TYPES.LIFECYCLE,name:"activateDeferredDone"}),M.log("All immediate effects of activation resolved")}),N.emitError)}catch(e){N.emitError(e)}},ge.setUpViewActivation=function(){var e=oe.getAll();I.each(e,(function(e){e.activationType?e.activationType===U.ViewActivationTypes.callback?(M.debug("Setting up conditional activation for Page",k.description(e)),ge.activateViewOnCallback(e)):e.activationType===U.ViewActivationTypes.polling&&(M.debug("Setting up polling activation for Page",k.description(e)),H.pollFor(e.activationCode,null,I.partial(K.isTimedOut,Date.now())).then((function(){k.activate(e)})).catch((function(t){M.warn("Failed to activate view ",e,t)}))):k.activate(e)}))},ge.activateViewOnCallback=function(e){var t=function(t){var n=I.extend({},t,{pageName:e.apiName,type:"page"});de.push(n)},n={pageId:e.id};Object.defineProperty(n,"isActive",{get:function(){return se.isViewActive(e.id)}});try{e.activationCode(t,n)}catch(t){var i=new A("("+t.toString()+") in activationCode for "+k.description(e));N.emitError(i,{originalError:t,userError:!0})}},t.onViewActivated=function(e){var t=e.data.view;try{if(!ce.getBucketingId())throw new Error("View activated with no visitorId set");var n,i=u(t).catch(N.emitError),r=function(){k.parseViewTags(t);var e=F.trackViewActivation(t);e?M.log("Tracked activation for Page",k.description(t),e):M.log("Not Tracking activation for Page",k.description(t))};return n=Y.isReady()?w.resolve(r()):H.pollFor(Y.isReady,he).then(r),w.all([i,n])}catch(e){N.emitError(e)}},t.initializeApi=function(){var e={get:de.get,push:de.push},t=window.optimizely;I.isArray(t)&&I.each(t,(function(t){e.push(t)})),e.data={note:"Obsolete, use optimizely.get('data') instead"},e.state={},window.optimizely=e},t.decideAndExecuteLayerASAP=c}),(function(e,t,n){function i(e){var t=["type","selector","attributes","value"];return r.extend({},e,{changeSet:r.map(e.changeSet,(function(e){return r.pick(e,t)}))})}var r=n(8),a=n(19),o=a.get("stores/audience_data"),s=n(73),u=n(80),c=n(81);t.emitLayerDecided=function(e){var t=e.decisionTicket?e.decisionTicket.audienceIds:[],n=r.map(t,(function(e){return{id:e,name:o.get(e).name}})),i={type:u.TYPES.LIFECYCLE,name:"layerDecided",data:r.extend(e,{audiences:n})},a=c.translateLayerEventToCampaignEvent(i);s.emit(i),s.emit(a)},t.emitViewActivated=function(e){var t={type:u.TYPES.LIFECYCLE,name:"viewActivated",data:e},n=c.translateViewActivatedToPageActivated(t);s.emit(t),s.emit(n)},t.emitActivateEvent=function(){s.emit({type:u.TYPES.LIFECYCLE,name:"activate"},!0)},t.emitActivatedEvent=function(){s.emit({type:u.TYPES.LIFECYCLE,name:"activated"})},t.emitInitializedEvent=function(){var e={type:u.TYPES.LIFECYCLE,name:"initialized"};window.optimizely&&(window.optimizely.initialized=!0),s.emit(e)},t.emitOriginsSyncedEvent=function(){var e={type:u.TYPES.LIFECYCLE,name:"originsSynced"};s.emit(e)},t.emitActionAppliedEvent=function(e){var t={type:u.TYPES.ACTION,name:"applied",data:{type:e.type,changes:i(e).changeSet,campaignId:e.layerId,pageId:e.viewId,experimentId:e.experimentId,variationId:e.variationId}};s.emit(t)},t.emitActionsForDecisionAppliedEvent=function(e,t){var n={type:u.TYPES.ACTION,name:"appliedAllForDecision",data:{actions:r.map(t,i),decision:e}};s.emit(n)}}),(function(e,t){t.TYPES={ACTION:"action",ANALYTICS:"analytics",EDITOR:"editor",LIFECYCLE:"lifecycle"}}),(function(e,t,n){var i=n(8);t.translateDecisionToCampaignDecision=function(e){return r(i.cloneDeep(e),{layerId:"campaignId",isLayerHoldback:"isCampaignHoldback"})},t.translateLayerEventToCampaignEvent=function(e){var t={};return t.campaign=this.translateLayerToCampaign(e.data.layer),t.decisionTicket=e.data.decisionTicket,t.decision=this.translateDecisionToCampaignDecision(e.data.decision),t.audiences=e.data.audiences,{type:"lifecycle",name:"campaignDecided",data:t}},t.translateLayerToCampaign=function(e){var t=i.cloneDeep(e);t.pageIds=e.viewIds,delete t.viewIds;var n=this;return i.forEach(e.experiments,(function(e,r){i.forEach(e.variations,(function(e,i){var a=t.experiments[r].variations[i].actions;t.experiments[r].variations[i].actions=n.translateActionsToCampaignActions(a)}))})),t},t.translateActionsToCampaignActions=function(e){var t=[];return i.forEach(e,(function(e){t.push({pageId:e.viewId,changes:e.changes})})),t},t.translateViewActivatedToPageActivated=function(e){return{type:"lifecycle",name:"pageActivated",data:this.translateViewEventDataToPageEventData(e.data)}},t.translateViewEventDataToPageEventData=function(e){return{page:i.cloneDeep(e.view)}};var r=function(e,t){var n=i.omit(e,i.keys(t));return i.each(t,(function(t,i){n[t]=e[i]})),n}}),(function(e,t,n){function i(e,t){function n(e,n){var i;t.attributionType&&(i=A.now()),I.dispatch(R.SET_VISITOR_ATTRIBUTES,{attributes:[{key:e,value:n,metadata:{lastModified:i}}]})}if(t.getter){var i,r=t.provides;if(!t.isSticky||y.isUndefined(e[r]))try{var a=T.evaluate(t.getter);y.isFunction(a)&&(a=a((function(){return e[r]}),(function(e){return n(r,e)}))),y.isUndefined(a)||(t.isAsync?(i=a.then((function(e){n(r,e)}),(function(e){C.warn('Failed to evaluate provider for "'+t.provides+'"; error was:',e)})),I.dispatch(R.SET_VISITOR_ATTRIBUTE_PENDING,{key:r,pending:i})):n(r,a))}catch(e){C.warn('Failed to evaluate getter for provider for "'+t.provides+'"; error was: '+e.message)}return i}}function r(e){var t=c(e),n=S.getItem(t);if(!n){var i=l(e);n=S.getItem(i),s(e,n)}return n}function a(e){var t=[];return y.each(e,(function(e){y.each(e.item,(function(n){n.namespace=e.namespace,t.push(n)}))})),t}function o(e){var t=V.getBucketingId(),n=[],i=t+"\\$\\$([^$]+?)\\$\\$"+e,r=new RegExp(i);return y.each(S.keys(),(function(e){var i=e.match(r);if(i){var a={namespace:i[1],userId:t,item:S.getItem(e)};n.push(a)}})),n}function s(e,t){var n=c(e),i=l(e);S.setItem(n,t),S.removeItem(i)}function u(e,t){try{var n=c(e);try{S.removeItem(l(e)),S.setItem(n,t)}catch(e){throw C.warn("Visitor / Unable to set localStorage key, error was:",e),new Error("Unable to set localStorage")}}catch(e){C.warn("Unable to persist visitor data:",e.message)}}function c(e){var n=V.getBucketingId();if(!n)throw new Error("Visitor bucketingId not set");var i=t.getNamespace();if(!i)throw new Error("Namespace is not set");return[n,i,e].join("$$")}function l(e){var t=V.getBucketingId();
if(!t)throw new Error("Cannot get legacy key: visitor bucketingId not set");return[t,e].join("$$")}function d(e,t){if(p(e,c(x.EVENT_QUEUE)))I.dispatch(R.SET_FOREIGN_VISITOR_EVENT_QUEUE,{key:e,value:O.deserialize(t)});else if(p(e,c(x.EVENTS)))I.dispatch(R.SET_FOREIGN_VISITOR_EVENTS,{key:e,value:O.deserialize(t)});else if(p(e,c(x.LAYER_STATES)))I.dispatch(R.LOAD_PERSISTED_LAYER_STATES,{layerStates:t,merge:!0});else if(p(e,c(x.VARIATION_MAP)))I.dispatch(R.MERGE_VARIATION_ID_MAP,{variationIdMap:t});else if(p(e,c(x.VISITOR_PROFILE))){var n=["custom"],i=t;y.each(n,(function(e){var t=k.getPlugin(w.PluginTypes.visitorProfileProviders,e);if(t){if(i.profile&&i.metadata){var n=f(i,e,t.attributionType);if(!y.isEmpty(n)){var r=[];y.forOwn(n.data,(function(t,i){var a=n.metadata[i],o={key:i,value:t,type:e,metadata:a};r.push(o)})),I.dispatch(R.SET_VISITOR_ATTRIBUTES,{attributes:r})}}}else C.debug("Attribute type",e,"not used by any audiences")}))}}function f(e,t,n){var i=M.getAttribute(t),r=M.getAttributeMetadata(t),a=e.profile[t],o=e.metadata[t];if(y.isEmpty(i))return{data:a,metadata:o};var s={};return y.forOwn(a,(function(e,t){var i;r&&r[t]&&(i=r[t].lastModified);var a;o&&o[t]&&(a=o[t].lastModified),(n===w.AttributionTypes.FIRST_TOUCH&&i>=a||n===w.AttributionTypes.LAST_TOUCH&&a>=i||y.isUndefined(i)&&a)&&(s.data=s.data||{},s.data[t]=e,a&&(s.metadata=s.metadata||{},s.metadata[t]=s.metadata[t]||{},s.metadata[t].lastModified=a))})),s}function p(e,t){return e.indexOf(t)>0}function h(){var e=M.getVisitorProfile(),t=M.getVisitorProfileMetadata(),n=k.getAllPlugins(w.PluginTypes.visitorProfileProviders);if(n){var i=y.reduce(n,(function(e,t){return t.provides&&(e[t.provides]=t),e}),{});e=y.omitBy(e,(function(e,t){var n=i[t];return n&&n.isTransient}))}return{profile:e,metadata:t}}function g(e,t){N.initializeStore(e,t)}function v(e){I.dispatch(R.LOAD_PERSISTED_LAYER_STATES,{layerStates:y.filter(e,(function(e){return!!e.decision}))})}function m(e){e=y.extend({lastSessionTimestamp:0,sessionId:null},e),I.dispatch(R.LOAD_SESSION_STATE,e)}function _(){return"oeu"+A.now()+"r"+Math.random()}function E(e){var t,n,i=k.getAllPlugins(w.PluginTypes.visitorProfileProviders),r=y.filter(i,(function(e){return y.isFunction(e.restorer)}));e.profile&&e.metadata?(t=e.profile,n=e.metadata):(t=e,n={}),t=y.reduce(t,(function(e,t,n){var i=t,a=y.find(r,{provides:n});return a&&(i=a.restorer(t)),e[n]=i,e}),{}),I.dispatch(R.LOAD_EXISTING_VISITOR_PROFILE,{profile:t,metadata:n})}var y=n(8),I=n(5),T=n(19),S=n(83).LocalStorage,A=n(14),b=n(74),w=n(12),D=n(65).Promise,R=n(17),N=n(85),O=n(86),C=n(11),x=n(12).VisitorStorageKeys,L=T.get("stores/global"),P=T.get("stores/layer"),k=T.get("stores/plugins"),F=T.get("stores/session"),V=T.get("stores/visitor_id"),M=T.get("stores/visitor"),U=T.get("stores/provider_status");t.getIdFromCookies=function(){var e,t=b.get(w.COOKIES.VISITOR_ID);return e=b.get(w.COOKIES.VISITOR_UUID),t||(t=_()),{randomId:t,UUID:e}},t.setId=function(e){var n=V.getBucketingId();if(I.dispatch(R.SET_VISITOR_ID,e),V.getBucketingId()!==n){t.loadData();try{t.persistVisitorId(e)}catch(e){if(e instanceof b.MismatchError)throw C.error("Visitor / Cookie not set to correct value:",e),new Error("Cookie mismatch error while persisting visitorId");throw e}}t.refreshSession()},t.getVariationIdMap=function(){return r(x.VARIATION_MAP)||{}},t.updateVariationIdMap=function(e,t,n){I.dispatch(R.UPDATE_VARIATION_ID_MAP,{layerId:e,experimentId:t,variationId:n})},t.persistVariationId=function(){var e=V.getVariationIdMap();u(x.VARIATION_MAP,e)},t.refreshSession=function(){I.dispatch(R.REFRESH_SESSION)},t.populateEagerVisitorData=function(e,n){var i=y.filter(e,(function(e){return!e.isLazy}));return t.populateVisitorData(i,n)},t.populateLazyVisitorData=function(e,n){var i=y.filter(e,(function(e){return e.isLazy}));return t.populateVisitorData(i,n)},t.populateVisitorData=function(e,t){t=t||{};var n=y.partial(i,t),r=y(e).filter({isAsync:!0}).map(n).filter().value();return y.forEach(y.filter(e,(function(e){return!e.isAsync})),n),r.length>0?D.all(r):D.resolve()},t.loadData=function(){g(r(x.EVENTS)||[],r(x.EVENT_QUEUE)||[]);var e=o(x.LAYER_STATES);v(a(e)),m(r(x.SESSION_STATE)||{}),E(r(x.VISITOR_PROFILE)||{}),t.loadForeignData(),t.removeLegacySessionStateCookies()},t.persistBehaviorEvents=function(e){u(x.EVENTS,e)},t.persistBehaviorEventQueue=function(e){u(x.EVENT_QUEUE,e)},t.persistLayerStates=function(){var e=P.getLayerStates(t.getNamespace());e=y.map(e,(function(e){return y.omit(e,"namespace")})),u(x.LAYER_STATES,e)},t.persistSessionState=function(){u(x.SESSION_STATE,F.getState())},t.persistVisitorProfile=function(){u(x.VISITOR_PROFILE,h())},t.getUserIdFromKey=function(e,n){var i;return y.includes(e,n)&&y.includes(e,"_")&&y.includes(e,"$$")&&y.includes(e.slice(e.indexOf("$$")),t.getNamespace())&&(i=e.slice(e.indexOf("_")+1,e.indexOf("$$"))),i},t.persistVisitorId=function(e){y.isUndefined(e.UUID)?e.randomId&&b.set(w.COOKIES.VISITOR_ID,e.randomId):null===e.UUID?b.remove(w.COOKIES.VISITOR_UUID):b.set(w.COOKIES.VISITOR_UUID,e.UUID)},t.getAttribute=function(e){return M.getAttribute(e)},t.getPendingAttributeValue=function(e){return U.getPendingAttributeValue(e)},t.loadForeignData=function(){y.each(S.keys(),(function(e){var t=S.getItem(e);t&&d(e,t)}))},t.getNamespace=function(){return L.getNamespace()},t.removeLegacySessionStateCookies=function(){var e=b.getAll();y.forEach(y.keys(e),(function(e){0===e.indexOf(w.COOKIES.SESSION_STATE+"$$")&&b.remove(e)}))}}),(function(e,t,n){var i,r=n(2),a="optimizely_data",o=n(84),s=n(16),u=n(72),c=t.Error=r("StorageError"),l=s.getGlobal("localStorage");l?i=o.create(l,a):(u.emitError(new c("Failed to initialize localStorage")),i=o.mockStorage),t.LocalStorage=i}),(function(e,t,n){function i(e,t){this.Je=e,this.Ze=t}var r=n(8),a=n(11),o=n(18),s="$$";i.prototype.et=function(e){return[this.Ze,e].join(s)},i.prototype.tt=function(e){return e.replace(this.Ze+s,"")},i.prototype.setItem=function(e,t){try{this.Je.setItem(this.et(e),o.stringify(t))}catch(t){a.warn("Failed to save",e,"to localStorage:",t)}},i.prototype.removeItem=function(e){this.Je.removeItem(this.et(e))},i.prototype.getItem=function(e){try{return o.parse(this.Je.getItem(this.et(e)))}catch(e){}return null},i.prototype.keys=function(){var e=r.keys(this.Je);return r.map(e,this.tt.bind(this))},e.exports={create:function(e,t){return new i(e,t)},mockStorage:{keys:function(){},getItem:function(e){},removeItem:function(e){},setItem:function(e,t){}}}}),(function(e,t,n){var i=n(86);t.initializeStore=i.initialize,t.addEvent=i.addEvent,t.getEvents=i.getEvents,t.usageInBytes=i.usageInBytes}),(function(e,t,n){function i(e){_.dispatch(y.SET_VISITOR_EVENTS,e)}function r(e){_.dispatch(y.UPDATE_BEHAVIOR_STORE,{key:"baseMap",value:e})}function a(e){_.dispatch(y.UPDATE_BEHAVIOR_STORE,{key:"eventQueue",value:e})}function o(e){_.dispatch(y.UPDATE_BEHAVIOR_STORE,{key:"lastEvent",value:e})}function s(e){_.dispatch(y.UPDATE_BEHAVIOR_STORE,{key:"cleared",value:e})}function u(){_.dispatch(y.UPDATE_BEHAVIOR_STORE,{key:"initialized",value:!0})}function c(){return!0}function l(){return O.getEvents()}function d(){return C.getBaseMap()}function f(){return C.getEventQueue()}function p(){return C.getLastEvent()}function h(){return C.getCleared()}function g(){return C.getInitialized()}function v(){return i(l().concat(f())),a([]),l().length>L&&(i(l().slice(-L)),!0)}var m=n(8),_=n(5),E=n(11),y=n(17),I=n(87),T=n(82),S=n(14),A=t,b=n(55).EventBase,w=n(55).Event,D=n(56),R=n(88),N=n(19),O=N.get("stores/visitor_events"),C=N.get("stores/visitor_events_manager"),x={EVENTBASE:"eb",HASH:"h",TIMEBASE:"tb",TIMESTAMPS:"ts",DELTA:"d",INDEX:"i"},L=1e3;t.initialize=function(e,t){if(!c())return void A.nt();if(!g()){A.it(e,t);var n=l();n.length>0&&o(n[n.length-1]);var i=f();i.length>0&&o(i[i.length-1]),u()}},t.addEvent=function(e){if(!c())return void A.nt();E.debug("Behavior store: adding event",e);var t=A.rt(e);o(t),a(f().concat(t)),A.at(f())},t.getEvents=function(){return c()?(f().length>0&&(v()&&R.sessionize(l()),A.ot(l()),A.at(f())),l()):(A.nt(),[])},A.it=function(e,t){A.st(e,t)&&(A.ot(l()),A.at(f())),R.sessionize(l())},A.st=function(e,t){if(0===e.length&&0===t.length)return i([]),a([]),!1;var n=!1,r=e[0]||t[0];return x.EVENTBASE in r?(i(A.ut(e)),a(A.ut(t))):(n=!0,i(A.ct(e)),a(A.ct(t))),f().length>0&&(v(),n=!0),i(A._updateBaseMapAndMaybeDedupe(l())),A._migrateEventBasesAndUpdateStore()&&(n=!0),n},A.ct=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=A.dt(i);t[n]=new w(r,i[D.FIELDS.TIME])}return t},A._migrateEventBasesAndUpdateStore=function(){var e=!1,t=A.ft();return R.applyMigrations(t)&&(e=!0,r({}),i(A._updateBaseMapAndMaybeDedupe(l())),a(A._updateBaseMapAndMaybeDedupe(f()))),e},A.pt=function(){return S.now()},A.rt=function(e){var t,n=e.name,i=e.type||"default",r=e.category||I.OTHER,a=e.tags||{};e.revenue&&(t=e.revenue);var o=new b(n,i,r,a,t);o=A.ht(o);var s=A.pt(),u=new w(o,s,-1);return R.updateSessionId(p(),u),u},A._updateBaseMapAndMaybeDedupe=function(e){for(var t=0;t<e.length;t++)e[t].eventBase=A.ht(e[t].eventBase);return e},A.ot=function(e){var t=A.vt(e);T.persistBehaviorEvents(t)},A.at=function(e){var t=A.vt(e);T.persistBehaviorEventQueue(t)},A.nt=function(){h()||(i([]),a([]),A.ot(l()),A.at(f()),r({}),o(null),s(!0))},A.ht=function(e){var t=e.hash(),n=d(),i=n[t];if(m.isUndefined(i))return n[t]=[e],r(n),e;for(var a=0;a<i.length;a++)if(e.equals(i[a]))return i[a];return i.push(e),r(n),e},A.ft=function(){var e=[],t=d();for(var n in t)t.hasOwnProperty(n)&&(e=e.concat(t[n]));return e},A.vt=function(e){for(var t=function(e){var t={};t[D.FIELDS.NAME]=e.getValueOrDefault([D.FIELDS.NAME]),t[D.FIELDS.TYPE]=e.getValueOrDefault([D.FIELDS.TYPE]);var n=e.getValueOrDefault([D.FIELDS.CATEGORY]);m.isUndefined(n)||(t[D.FIELDS.CATEGORY]=n);var i=e.getValueOrDefault([D.FIELDS.REVENUE]);m.isUndefined(i)||(t[D.FIELDS.REVENUE]=i);var r=e.getValueOrDefault([D.FIELDS.OPTIONS]);return m.isUndefined(r)||(t[D.FIELDS.OPTIONS]=r),t},n=x,i=[],r="_idx_",a=0;a<e.length;a++){var o,s,u=e[a],c=u.eventBase;if(c.hasOwnProperty(r)){o=i[c[r]];var l=u[D.FIELDS.TIME]-(o[n.TIMEBASE]||0);s={},s[n.DELTA]=l,s[n.INDEX]=a,o[n.TIMESTAMPS].push(s)}else o={},o[n.EVENTBASE]=t(u),o[n.HASH]=c.hash(),o[n.TIMEBASE]=u[D.FIELDS.TIME],s={},s[n.DELTA]=0,s[n.INDEX]=a,o[n.TIMESTAMPS]=[s],i.push(o),c[r]=i.length-1}for(a=0;a<e.length;a++)delete e[a].eventBase[r];return i},A.dt=function(e,t){var n=new b(e[D.FIELDS.NAME],e[D.FIELDS.TYPE],e[D.FIELDS.CATEGORY],e[D.FIELDS.OPTIONS],e[D.FIELDS.REVENUE]);return m.isUndefined(t)||n.setHash(t),n},A.ut=function(e){for(var t=x,n=[],i=0;i<e.length;i++)for(var r=e[i],a=A.dt(r[t.EVENTBASE],r[t.HASH]),o=r[t.TIMEBASE],s=r[t.TIMESTAMPS],u=0;u<s.length;u++){var c=s[u],l=new w(a,o+c[t.DELTA]),d=c[t.INDEX];n[d]=l}return n},t.deserialize=function(e){return A.ut(e)},t.mergeAllEvents=function(e){var t=[].concat.apply([],e);return t.sort(R.sessionSortPredicate),R.sessionize(t),t}}),(function(e,t){e.exports={OTHER:"other"}}),(function(e,t,n){function i(e,t){var n=e.getValueOrDefault([s.FIELDS.TIME],0),i=t.getValueOrDefault([s.FIELDS.TIME],0);return Math.abs(n-i)<u}function r(e,t){var n;n=i(e,t)?e.getValueOrDefault([s.FIELDS.SESSION_ID]):t.getValueOrDefault([s.FIELDS.TIME]),t.setFieldValue(s.FIELDS.SESSION_ID,n)}var a=n(55).Event,o=n(55).EventBase,s=n(56),u=18e5;t.updateSessionId=function(e,t){if(!e)return void t.setFieldValue(s.FIELDS.SESSION_ID,t.getValueOrDefault([s.FIELDS.TIME]));var n=e.getValueOrDefault([s.FIELDS.TIME]),i=e.getValueOrDefault([s.FIELDS.SESSION_ID]),u=t.getValueOrDefault([s.FIELDS.TIME]);n="number"!=typeof n?u-36e5:n,i="number"!=typeof i?n:i,e=new a(new o("",""),n,i),r(e,t)},t.sessionize=function(e){var t=e.length;if(0!==t){e[0].setFieldValue(s.FIELDS.SESSION_ID,e[0].getValueOrDefault([s.FIELDS.TIME]));for(var n=1;n<t;n++)r(e[n-1],e[n])}},t.sessionSortPredicate=function(e,t){return e[s.FIELDS.TIME]-t[s.FIELDS.TIME]},t.applyMigrations=function(e){return!1}}),(function(e,t,n){var i=n(8),r=n(19),a=n(5),o=n(14),s=n(17),u=r.get("stores/global"),c=r.get("stores/session"),l=2e3;t.recordLayerDecision=function(e,t,n){return a.dispatch(s.RECORD_LAYER_DECISION,{layerId:e,decision:n,decisionTicket:t,sessionId:c.getSessionId(),activationId:u.getActivationId(),timestamp:o.now(),revision:u.getRevision(),namespace:u.getNamespace(),viewId:t.viewId}),n},t.relatedAudienceIds=function(e){var t={},n=["and","or","not"];return i.each(e.experiments,(function(e){i.each(i.flattenDeep(e.audienceIds),(function(e){i.includes(n,e)||(t[e]=!0)}))})),i.keys(t)},t.getActivationTimeout=function(e){var t=e.activation;return t&&null!==t.timeout&&void 0!==t.timeout?t.timeout:l},t.description=function(e){return(e.name?'"'+e.name+'" ':"")+"("+e.id+")"}}),(function(e,t,n){function i(e){return r.map(e.weightDistributions,"entityId")}var r=n(8);t.description=function(e){var t=!!e.name,n=t?'"'+e.name+'" ':"",r=i(e).join(", ");return n+"(id "+e.id+", campaigns: "+r+")"}}),(function(e,t,n){function i(e,t){var n={id:e.id,changeApplier:E.create(e,t)};o.dispatch(s.ADD_PREPARED_CHANGE,n)}function r(e,t,n){if(a.includes(n,t))return void u.error("Change with id "+t+" has circular dependencies: "+n.concat(t));if(!e[t]){var o=g.getChange(t);if(!o){var s="Change with id "+t+" is absent";return n.length&&(s+=" but listed as a dependency for "+n[n.length-1]),void u.warn(s)}e[t]=new c(function(s){var l=a.map(o.dependencies||[],(function(i){return r(e,i,n.concat([t]))}));if(o.src){var h="change_"+o.src,g=f.makeAsyncRequest(h,(function(){return p.addScriptAsync("https://cdn.optimizely.com/public/591102174/data"+o.src,(function(){f.resolveRequest(h)}))})).then((function(){i(o,d.now())}));l.push(g)}c.all(l).then((function(){u.debug("Action / Applying change:",o);var e=d.now(),n=v.getPreparedChange(t);return n.changeApplier.apply().then((function(t){return u.debug("Action / Applied change for the first time in "+(d.now()-e)+"ms:",o),t})).then(s)})).catch((function(e){u.error("Action / Failed to apply change:",o,e),s()}))})}return e[t]}var a=n(8),o=n(5),s=n(17),u=n(11),c=n(65).Promise,l=n(19),d=n(14),f=n(92),p=n(76),d=n(14),h=l.get("stores/global"),g=l.get("stores/change_data"),v=l.get("stores/prepared_change"),m=l.get("stores/session"),_=n(93),E=n(95);_.initialize(),t.prepareAction=function(e){u.debug("Action / Preparing:",e),o.dispatch(s.ACTION_EXECUTED,{sessionId:m.getSessionId(),action:e,timestamp:d.now(),activationId:h.getActivationId()});var t=d.now();a.forEach(e.changeSet,(function(e){e.src?o.dispatch(s.ADD_CHANGE,e):(o.dispatch(s.ADD_CHANGE,e),i(e,t))}))},t.executePreparedAction=function(e){u.debug("Action / Executing:",e);var t={},n=a.map(e.changeSet,(function(e){return r(t,e.id,[])}));return c.all(n).then((function(){u.debug("changes for action id="+e.id+" applied")}))}}),(function(e,t,n){var i=n(65).Promise,r=n(5),a=n(17),o=n(19),s=o.get("stores/async_request");t.makeAsyncRequest=function(e,t){var n=s.getPromise(e);if(n)return n;var o,u,c=new i(function(e,t){o=e,u=t});return r.dispatch(a.REGISTER_ASYNC_DEFERRED,{source:e,promise:c,resolver:o,rejecter:u}),t&&t(),c},t.resolveRequest=function(e,t){r.dispatch(a.RESOLVE_DEFERRED,{source:e,resolveWith:t})},t.rejectRequest=function(e,t){r.dispatch(a.REJECT_DEFERRED,{source:e,rejectWith:t})}}),(function(e,t,n){function i(){"interactive"!==document.readyState&&"complete"!==document.readyState||(t.domReadyTime=Date.now())}var r=n(94),a=n(19).get("stores/directive");t.domReadyTime=null,t.initialize=function(){i(),document.addEventListener("readystatechange",i,!0)},t.isTimedOut=function(e){var n=Date.now();if(!t.domReadyTime||!e)return!1;var i=Math.max(e,t.domReadyTime);return a.isEditor()&&(i=t.domReadyTime),!(n-i<r.SELECTOR_POLLING_MAX_TIME)}}),(function(e,t){e.exports={SELECTOR_POLLING_MAX_TIME:2e3,CHANGE_ID_ATTRIBUTE_PREFIX:"data-optly-"}}),(function(e,t,n){var i=n(8),r=n(14),a=n(19),o=a.get("stores/plugins"),s=n(12),u=n(11),c=n(66).Promise;t.create=function(e,t){try{var n=o.getPlugin(s.PluginTypes.changeAppliers,e.type);if(!n)throw new Error("Unrecognized change type "+e.type);return new n(i.cloneDeep(e),{identifier:e.id,startTime:t||r.now()})}catch(e){u.error("Change applier was never properly constructed:",e);var a={apply:function(){return c.reject(e)}};return a}}}),(function(e,t,n){function i(e,t){for(var n=0;n<e.experiments.length;n++)for(var i=0;i<e.experiments[n].variations.length;i++)if(t.indexOf(e.experiments[n].variations[i].id)>-1)return{experimentId:e.experiments[n].id,variationId:e.experiments[n].variations[i].id};return null}function r(e){var t=v.getPlugin(c.PluginTypes.deciders,e);if(o.isEmpty(t))throw new Error("No deciders found for policy: "+e);return t}function a(e,t){var n=v.getAllPlugins(c.PluginTypes.audienceMatchers);return o.reduce(t,(function(t,i){return f.isInAudience(e,i,n)&&t.push(i.id),t}),[])}var o=n(8),s=n(97),u=n(98),c=n(12),l=n(11),d=n(72),f=n(101),p=n(99).DecisionError,h=n(89),g=(n(90),n(19)),v=g.get("stores/plugins"),m=g.get("stores/global"),_=g.get("stores/layer_data"),E="single_experiment";t.createTicket=function(e){var t;if(e.layer){var n=!1,i=r(e.layer.policy);o.isFunction(i.includeViewIdInDecisionTicket)?n=i.includeViewIdInDecisionTicket(e.layer):i.includeViewIdInDecisionTicket===!0&&(n=!0),n&&(t=e.viewId)}var s={bucketingId:e.bucketingId,audienceIds:a(e.visitorProfile,e.audiences),globalHoldback:e.globalHoldback,preferredVariationMap:e.preferredVariationMap,activationId:m.getActivationId(),viewId:t};return s},t.decideGlobal=function(e){var t=s.isHoldback(e.bucketingId,{id:null,holdback:e.globalHoldback});return{isGlobalHoldback:t}},t.decideLayer=function(e,t){l.debug("Deciding: ",e,t);var n,i,a=r(e.policy),c={layerId:e.id,experimentId:null,variationId:null,isLayerHoldback:s.isHoldback(t.bucketingId,e)};if(o.isEmpty(e.experiments))throw new p("No experiments in layer.");try{if(a.decideLayer){l.debug("Decision / Using decider's custom decideLayer.");var f=a.decideLayer(e,t);n=f.experiment,i=f.variation}else l.debug("Decision / Using default decideLayer behavior."),n=a.selectExperiment(e,t.audienceIds,t.bucketingId),i=u.selectVariation(n,t.audienceIds,t.bucketingId,t.activationId,t.preferredVariationMap)}catch(e){e instanceof p?c.reason=e.message:c.error=e}return c.experimentId=n?n.id:null,c.variationId=i?i.id:null,c.error&&(c.error.name="DecisionEngineError",d.emitError(c.error)),c},t.getDummyLayerDecision=function(e,t){var n,r=i(e,t);return r?(l.log("Decision / Applying force variation:",r.variationId,"to Campaign",h.description(e)),n={layerId:e.id,variationId:r.variationId,experimentId:r.experimentId,isLayerHoldback:!1,reason:"force"}):(l.log("No variation matches ids:",t,"in Campaign",h.description(e)),n={layerId:e.id,variationId:null,experimentId:null,isLayerHoldback:!1,reason:"force"}),n},t.isInCohort=function(e){if(!e.experimentId||!e.variationId)return!1;var t=_.get(e.layerId);return!(t.policy===E&&e.isLayerHoldback)}}),(function(e,t,n){var i=n(57),r=t.TOTAL_POINTS=1e4;t.bucketingNumber=function(e,t,n){var a=i.hashToInt(e+t,n,r);return a},t.isHoldback=function(e,n){return t.bucketingNumber(e,n.id,i.Seed.IGNORING)<(n.holdback||0)},t.chooseWeightedCandidate=function(e,n,r){for(var a=t.bucketingNumber(e,n,i.Seed.BUCKETING),o=0;o<r.length;o++)if(r[o].endOfRange>a)return r[o].entityId;throw new Error("Unable to choose candidate")}}),(function(e,t,n){var i=n(8),r=n(97),a=n(99).DecisionError,o=n(100),s=n(11),u="impression";t.isValidExperiment=function(e,t){var n,r=i.partial(i.includes,e);return s.groupCollapsed("Decision / Evaluating audiences for experiment:",t,e),n=!t.audienceIds||o.evaluate(t.audienceIds,r),s.groupEnd(),s.debug("Decision / Experiment",t,"is valid?",n),n},t.selectVariation=function(e,t,n,o,c){if(!e.variations||0===e.variations.length)throw new a('No variations in selected experiment "'+e.id+'"');if(!e.weightDistributions&&e.variations.length>1)throw new a('On selected experiment "'+e.id+'", weightDistributions must be defined if # variations > 1');var l;if(e.bucketingStrategy&&e.bucketingStrategy===u)if(1===e.variations.length)l=e.variations[0].id;else{var d=o;l=r.chooseWeightedCandidate(n+d,e.id,e.weightDistributions)}else if(c&&c[e.id]){s.debug("Decision / Using preferredVariationMap to select variation for experiment:",e.id);var f=c[e.id];if(!i.find(e.variations,{id:f}))return s.debug("Decision / Preferred variation:",f,"not found on experiment:",e.id,". Visitor not bucketed."),null;l=f}else l=1===e.variations.length?e.variations[0].id:r.chooseWeightedCandidate(n,e.id,e.weightDistributions);var p=i.find(e.variations,{id:l});if(p)return s.debug("Decision / Selected variation:",p),p;throw new a('Unable to find selected variation: "'+l+'".')},t.getExperimentById=function(e,t){var n=i.find(e.experiments,{id:t});if(n)return n;throw new a("Unable to find selected experiment.")},t.hasVariationActionsOnView=function(e,t){return s.debug("Decision / Checking variation:",e,"for actions on viewId:",t),!!i.find(e.actions,(function(e){return e.viewId===t&&!i.isEmpty(e.changes)}))}}),(function(e,t){function n(e){this.message=e}n.prototype=new Error,t.DecisionError=n}),(function(e,t,n){function i(e,t){for(var n,i,r=0;r<e.length;r++){if(n=o(e[r],t),n===!1)return!1;s.isUndefined(n)&&(i=!0)}if(!i)return!0}function r(e,t){for(var n,i=!1,r=0;r<e.length;r++){if(n=o(e[r],t),n===!0)return!0;s.isUndefined(n)&&(i=!0)}if(!i)return!1}function a(e,t){if(1!==e.length)return!1;var n=o(e[0],t);return s.isUndefined(n)?void 0:!n}function o(e,t){var n;if(s.isArray(e)){var i,r;e[0]in d?(i=e[0],r=e.slice(1)):(i=l.OR,r=e),u.groupCollapsed('Condition / Applying operator "'+i+'" with args',c.stringify(r));try{n=d[i](r,t),u.debug("Condition / Result:",n)}finally{u.groupEnd()}return n}return n=t(e),u.debug("Condition / Evaluated:",c.stringify(e),":",n),n}var s=n(8),u=n(11),c=n(18),l={AND:"and",OR:"or",NOT:"not"},d={};d[l.AND]=i,d[l.OR]=r,d[l.NOT]=a,e.exports={evaluate:o}}),(function(e,t,n){function i(e,t){var n={};return o.each(e,(function(e){if(o.isArray(e))o.extend(n,i(e,t));else if(o.isObject(e)){var r=t[e.type];r&&o.each(r.fieldsNeeded,(function(e){n[e]=!0}))}})),n}function r(e,t){return function(n){var i=n.type,r=t[i];if(!r)throw new Error("Audience / No matcher found for type="+i);if(r.fieldsNeeded)for(var a,s,c=0;c<r.fieldsNeeded.length;c++)if(a=r.fieldsNeeded[c],s=e[a],o.isUndefined(s))return void u.debug("Audience / Required field",a,"for type",i,"has no value");u.debug("Matching condition:",n,"to values:",e);var l=r.match(e,n);if(!o.isUndefined(l))return!!l}}function a(e){return e.name?e.name+" ("+e.id+")":e.id}var o=n(8),s=n(100),u=n(11);t.isInAudience=function(e,t,n){var i=r(e,n);u.groupCollapsed("Checking audience",t.name,t.id,t),u.debug("Visitor Profile:",e);var o;try{var c=s.evaluate(t.conditions,i)}catch(e){o=e,c=!1}return u.groupEnd(),o&&u.error("Audience / Error evaluating audience",a(t),":",o),u.log("Is "+(c?"in":"NOT in")+" audience:",a(t)),c},t.requiredAudienceFields=function(e,t){return o.keys(i(e.conditions,t))}}),(function(e,t,n){var i=n(8),r=n(73),a=n(5),o=n(19),s=n(17),u=n(12);t.registerApiModule=function(e,t){i.isArray(t)&&(t=o.evaluate(t)),a.dispatch(s.REGISTER_PLUGIN,{type:u.PluginTypes.apiModules,name:e,plugin:t})},t.registerDependency=function(e,t){var n=o.get(e);n||o.register(e,t)},t.registerVisitorProfileProvider=function(e){a.dispatch(s.REGISTER_PLUGIN,{type:u.PluginTypes.visitorProfileProviders,name:e.provides,plugin:e})},t.registerViewProvider=function(e){a.dispatch(s.REGISTER_PLUGIN,{type:u.PluginTypes.viewProviders,name:e.provides,plugin:e})},t.registerAudienceMatcher=function(e,t){a.dispatch(s.REGISTER_PLUGIN,{type:u.PluginTypes.audienceMatchers,name:e,plugin:t})},t.registerViewMatcher=function(e,t){a.dispatch(s.REGISTER_PLUGIN,{type:u.PluginTypes.viewMatchers,name:e,plugin:t})},t.registerAnalyticsTracker=function(e,t){a.dispatch(s.REGISTER_PLUGIN,{type:u.PluginTypes.analyticsTrackers,name:e,plugin:t})},t.registerViewTagLocator=function(e,t){a.dispatch(s.REGISTER_PLUGIN,{type:u.PluginTypes.viewTagLocators,name:e,plugin:t})},t.registerAudiencePlugin=function(e){e.dependencies&&i.each(e.dependencies,(function(e,n){t.registerDependency(n,e)}));var n,r="vendor."+e.vendor;n=i.isString(e.provider)?o.get(e.provider)(e.vendor):i.isFunction(e.provider)?e.provider(e.vendor):i.cloneDeep(e.provider),t.registerVisitorProfileProvider(i.extend(n,{provides:r}));var a;a=i.isString(e.matcher)?o.get(e.matcher):e.matcher;var s={fieldsNeeded:[r],match:function(e,t){return a(e[r],t)}};t.registerAudienceMatcher(r,s)},t.registerWidget=function(e){i.isArray(e)&&(e=o.evaluate(e));var t=r.on({filter:{type:"showWidget",name:e.widgetId},handler:e.showFn}),n=r.on({filter:{type:"hideWidget",name:e.widgetId},handler:e.hideFn});return{showToken:t,hideToken:n}},t.registerChangeApplier=function(e,t){a.dispatch(s.REGISTER_PLUGIN,{type:u.PluginTypes.changeAppliers,name:e,plugin:t})},t.registerDecider=function(e,t){a.dispatch(s.REGISTER_PLUGIN,{type:u.PluginTypes.deciders,name:e,plugin:t})},t.registerEventImplementation=function(e,t){a.dispatch(s.REGISTER_PLUGIN,{type:u.PluginTypes.eventImplementations,name:e,plugin:t})}}),(function(e,t,n){function i(e,t){r.forEach(e,(function(e){if(e.eventType!==s.CUSTOM){var n=g.getPlugin(o.PluginTypes.eventImplementations,e.eventType);n?t?n.attach(e):n.detach(e):l.warn("No implementation found for event type:",e.eventType,"needed for event:",e)}}))}var r=n(8),a=n(19),o=n(12),s=n(104),u=n(5),c=n(14),l=n(11),d=n(17),f=n(100),p=n(79),h=n(105),g=a.get("stores/plugins"),v=a.get("stores/view"),m=a.get("stores/view_data"),_=a.get("stores/event_data");t.parseViewTags=function(e){var n=t.evaluateViewTags(e);t.setParsedViewTags(e.id,n)},t.updateAllViewTags=function(){var e=v.getActiveViewStates();r.each(e,(function(e){var n=m.get(e.id);t.parseViewTags(n)}))},t.evaluateViewTags=function(e){if(!e.tags)return{};var t=r.reduce(e.tags,(function(e,t){try{e[t.apiName]=h.getTagValue(t)}catch(e){e instanceof h.Error?l.warn("Page / Ignoring unparseable tag",t,e):l.error(e)}return e}),{});return t},t.createViewTicket=function(){var e={};return r.each(g.getAllPlugins(o.PluginTypes.viewProviders),(function(t){e[t.provides]=a.evaluate(t.getter)})),e},t.registerViews=function(e){u.dispatch(d.REGISTER_VIEWS,{views:e})},t.activate=function(e,n){var r=v.getViewState(e.id);if(r.isActive)return void l.log("Not activating Page, already active ",t.description(e));var a=t.createViewTicket();if(!t.hasValidStaticConditions(e,a))return void l.log("Page / Failed to match page conditions for "+t.description(e),e.staticConditions);t.setViewActiveState(e,!0),l.log("Activated Page",t.description(e)),t.parseViewTags(e),n&&t.setUserSuppliedViewTags(e.id,n),p.emitViewActivated({view:e,metadata:n});var o=_.getByViewId(e.id);i(o,!0)},t.deactivate=function(e){var n=v.getViewState(e.id);if(!n.isActive)return void l.log("Not deactivating Page, already inactive ",t.description(e));t.setViewActiveState(e,!1),l.log("Deactivated Page",t.description(e));var r=_.getByViewId(e.id);i(r,!1)},t.setViewActiveState=function(e,t){u.dispatch(d.SET_VIEW_ACTIVE_STATE,{view:e,timestamp:c.now(),isActive:t})},t.setGlobalTags=function(e){u.dispatch(d.SET_GLOBAL_TAGS,e)},t.setParsedViewTags=function(e,t){u.dispatch(d.UPDATE_PARSED_VIEW_METADATA,{viewId:e,metadata:t})},t.setUserSuppliedViewTags=function(e,t){u.dispatch(d.UPDATE_USER_SUPPLIED_METADATA,{viewId:e,metadata:t})},t.hasValidStaticConditions=function(e,t){if(r.isEmpty(e.staticConditions))return!0;var n=g.getAllPlugins(o.PluginTypes.viewMatchers);l.groupCollapsed("Page / Evaluating staticConditions:",e.staticConditions),l.debug("Matching to current value:",t);var i=f.evaluate(e.staticConditions,(function(e){var i=e.type,r=n[i];if(!r)throw new Error("Page / No matcher found for type="+i);return r.match(t,e)}));return l.groupEnd(),i},t.description=function(e){return'"'+e.name+'" ('+e.id+")"}}),(function(e,t){e.exports={CLICK:"click",CUSTOM:"custom",ENGAGEMENT:"engagement",PAGEVIEW:"pageview"}}),(function(e,t,n){var i=n(12).PluginTypes,r=n(19),a=r.get("stores/plugins");t.getTagValue=function(e){var n=a.getPlugin(i.viewTagLocators,e.locatorType);if(!n)throw new t.Error("No locator registered for tag locatorType: "+e.locatorType);return n(e)},t.enums=n(106),t.Error=n(107).Error}),(function(e,t){t.locatorType={CSS_SELECTOR:"css_selector",JAVASCRIPT:"javascript",URL_REGEX:"url_regex"},t.valueType={STRING:"string",NUMBER:"number",CURRENCY:"currency"},t.nodeNames={INPUT:"INPUT",SELECT:"SELECT"}}),(function(e,t,n){var i=n(2);t.Error=i("TagError")}),(function(e,t,n){function i(e,t,n,i,r){var a=K.get(t.layerId),o=V.description(a),s=c(e,t,n),u=l(s,t.isLayerHoldback,i),d=X.isExpectingRedirect();d?(G.persist(s,r),b.log("Relaying (redirect) decision for Campaign",o,s),_(P.TrackLayerDecisionTimingFlags.preRedirectPolicy,[P.PreRedirectPolicies.PERSIST_BEFORE_AND_TRACK_DURING_REDIRECT],u),b.log("Called trackLayerDecision for Campaign",o,u)):(_(P.TrackLayerDecisionTimingFlags.nonRedirectPolicy,[P.NonRedirectPolicies.TRACK_IMMEDIATELY],u),b.log("Called trackLayerDecision for Campaign",o,u))}function r(e,t,n,i,r){var a=K.get(t.layerId),o=V.description(a),s=d(e,t,n,i);v("onLayerDecision",s,r?"trackLayerDecision":void 0),b.log("Analytics / Called onLayerDecision for Campaign",o,s)}function a(e,t){var n=f({activeViewStates:H.getActiveViewStates(),visitorProfile:$.getVisitorProfile(),layerStates:q.getLayerStates()}),i=J.getByApiName(e),r=i&&i.viewId?h(i):H.getActiveViewTags(),a=y.extend({},r,t),o=i&&i.category?i.category:k.OTHER;return y.extend(n,{eventEntityId:i&&i.id,eventApiName:e,eventCategory:o,eventTags:a})}function o(e,t){var n=f({activeViewStates:H.getActiveViewStates(),visitorProfile:$.getVisitorProfile(),layerStates:q.getLayerStates()});return y.extend(n,{viewId:e.id,viewCategory:e.category,eventTags:t.metadata})}function s(e){var t=f({activeViewStates:H.getActiveViewStates(),visitorProfile:$.getVisitorProfile(),layerStates:q.getLayerStates()}),n=e.config&&e.config.selector?e.config.selector:e.eventFilter.selector,i=e&&e.category?e.category:k.OTHER,r=h(e);return y.extend(t,{event:e,eventCategory:i,eventTags:r,selector:n})}function u(){var e=f({activeViewStates:[],visitorProfile:$.getVisitorProfile(),layerStates:q.getLayerStates()});return y.extend(e,{eventTags:{}})}function c(e,t,n){var i=K.get(t.layerId),r=null,a=null;if(t.experimentId){var o=y.find(i.experiments,{id:t.experimentId});if(o&&(r=o.name||null,t.variationId)){var s=y.find(o.variations,{id:t.variationId});s&&(a=s.name||null)}}var u=U.getReferrer()||O.getReferrer(),c={sessionId:z.getSessionId(),decisionTicketAudienceIds:n.audienceIds,visitorId:Z.getRandomId(),visitorUUID:Z.getUUID(),decisionId:e,activationId:j.getActivationId(),timestamp:R.now(),variationId:t.variationId,variationName:a,experimentId:t.experimentId,experimentName:r,layerId:t.layerId,layerName:i.name,layerPolicy:i.policy,accountId:j.getAccountId(),projectId:j.getProjectId(),revision:String(j.getRevision()),clientVersion:N.VERSION,referrer:u};return c}function l(e,t,n){var i=y.extend({},e,{isLayerHoldback:t,clientEngine:N.ENGINE,anonymizeIP:y.isNull(j.getAnonymizeIP())?void 0:j.getAnonymizeIP(),userFeatures:g(n)});return i}function d(e,t,n,i){return{decisionId:e,timestamp:R.now(),revision:j.getRevision(),clientEngine:N.ENGINE,clientVersion:N.VERSION,projectId:j.getProjectId(),accountId:j.getAccountId(),activationId:j.getActivationId(),sessionId:z.getSessionId(),visitorId:Z.getRandomId(),visitorUUID:Z.getUUID(),decision:t,decisionTicket:n,userFeatures:g(i)}}function f(e){var t={eventId:A.generate(),timestamp:R.now(),revision:j.getRevision(),clientEngine:N.ENGINE,clientVersion:N.VERSION,projectId:j.getProjectId(),accountId:j.getAccountId(),activationId:j.getActivationId(),sessionId:z.getSessionId(),isGlobalHoldback:j.isGlobalHoldback(),visitorId:Z.getRandomId(),visitorUUID:Z.getUUID(),activeViewStates:e.activeViewStates,layerStates:e.layerStates,userFeatures:g(e.visitorProfile)};return t}function p(e){var t=H.getViewState(e),n=t&&t.isActive?t.metadata:{};return n}function h(e){var t={};return e.viewId?p(e.viewId):t}function g(e){var t=Y.getAllPlugins(L.PluginTypes.visitorProfileProviders),n=y.filter(t,{shouldTrack:!0}),i={id:null,type:null,
name:"",value:null,shouldIndex:!0};return y.reduce(n,(function(t,n){try{var r=n.provides,a=e[r],o=[];if(!y.isUndefined(a)){y.isObject(a)?o=y.map(a,(function(e,t){var n=y.isObject(e)?e:{value:e};return y.extend({},{type:r,name:t},n)})):o.push({type:r,value:a});var s=y(o).map((function(e){return y.pick(y.extend({},i,e),y.keys(i))})).filter((function(e){return!!e.value})).value();t=t.concat(s)}}catch(e){b.warn("Error evaluating userFeature against visitorProfile:",e)}return t}),[])}function v(e,t,n){var i=m(e,n);b.debug("Found "+i.length+" analytics integrations defining a "+e+" hook"),b.debug("Calling each with data: ",t),y.each(i,(function(e){try{b.debug("Calling plugin: "+e.name),e.hookFn(t),b.debug("Called plugin: "+e.name)}catch(e){b.error(e)}}))}function m(e,t){var n=[];return y.each(Y.getAllPlugins(L.PluginTypes.analyticsTrackers),(function(i,r){if(i[e]&&(!t||!i[t]))try{n.push({name:r,hookFn:w.evaluate(i[e])})}catch(e){b.error(e)}})),n}function _(e,t,n){var i=E(e,t);b.debug("Found "+i.length+" analytics integrations  defining a trackLayerDecision "+e+" timing of "+t.join("|")),b.debug("Calling each with data: ",n),y.each(i,(function(e){try{b.debug("Calling plugin: "+e.name),e.hookFn(n),b.debug("Called plugin: "+e.name)}catch(e){b.error(e)}}))}function E(e,t){var n=[];return y.each(Y.getAllPlugins(L.PluginTypes.analyticsTrackers),(function(i,r){y.includes(t,i[e])&&n.push({name:r,hookFn:i.trackLayerDecision})})),n}var y=n(8),I=n(5),T=n(17),S=n(72),A=n(47),b=n(11),w=n(19),D=n(85),R=n(14),N=n(109),O=n(70),C=n(73),x=n(80),L=n(12),P=n(110),k=n(87),F=n(104),V=n(89),M=n(65).Promise,U=n(111),G=n(112),B=n(113),j=w.get("stores/global"),z=w.get("stores/session"),H=w.get("stores/view"),Y=w.get("stores/plugins"),q=w.get("stores/layer"),K=w.get("stores/layer_data"),W=w.get("stores/observed_redirect"),X=w.get("stores/pending_redirect"),$=w.get("stores/visitor"),Q=w.get("stores/directive"),J=w.get("stores/event_data"),Z=w.get("stores/visitor_id"),ee=null,te=!1,ne=1e3;t.trackClientActivation=function(){if(Q.shouldSendTrackingData()){var e=u();return v("onClientActivation",e),e}},t.trackCustomEvent=function(e,t){t=t||{};var n=a(e,t),i=J.getByApiName(e),r={name:e,type:F.CUSTOM,category:n.eventCategory,tags:y.omit(n.eventTags,"revenue")};if(y.isUndefined(t.revenue)||(r.revenue=t.revenue),S.emitAnalyticsEvent({name:i?i.name||i.apiName:e,apiName:i?i.apiName:void 0,type:F.CUSTOM,tags:y.omit(n.eventTags,"revenue"),category:n.eventCategory,metrics:r.revenue?{revenue:r.revenue}:{}},!Q.shouldSendTrackingData()),Q.shouldSendTrackingData())return D.addEvent(r),v("onCustomEvent",n),n},t.trackDecisionEvent=function(e,t){var n=K.get(e.layerId),a=V.description(n);if(!Q.shouldSendTrackingData())return void b.log("Analytics / Not tracking decision for Campaign",a);var o=A.generate();I.dispatch(T.RECORD_LAYER_DECISION_EVENT_ID,{layerId:e.layerId,viewId:t.viewId,decisionId:o});var s=$.getVisitorProfile();ee?(i(o,e,t,s,ee),r(o,e,t,s,!0)):r(o,e,t,s,!1)},t.trackPostRedirectDecisionEvent=function(){if(!Q.shouldSendTrackingData())return M.resolve();if(W.hasTracked())return M.resolve();var e=W.get();if(!e)return M.resolve();var t=$.getVisitorProfile(),n=l(e,!1,t);if(_(P.TrackLayerDecisionTimingFlags.postRedirectPolicy,[P.PostRedirectPolicies.TRACK_IMMEDIATELY],n),te){var i=new M(function(e,t){var n=C.on({filter:{type:x.TYPES.LIFECYCLE,name:"originsSynced"},handler:function(){e(),C.off(n)}})}),r=B.makeTimeoutPromise(ne);return M.race([i,r]).then((function(){b.log("Calling trackers after successful sync")}),(function(e){b.warn("Calling trackers after failed sync:",e)})).then((function(){t=$.getVisitorProfile(),n=l(e,!1,t),_(P.TrackLayerDecisionTimingFlags.postRedirectPolicy,[P.PostRedirectPolicies.TRACK_AFTER_SYNC],n),I.dispatch(T.REGISTER_TRACKED_REDIRECT_DATA)})).catch((function(e){b.error("Error when calling trackers after sync:",e)}))}return _(P.TrackLayerDecisionTimingFlags.postRedirectPolicy,[P.PostRedirectPolicies.TRACK_AFTER_SYNC],n),I.dispatch(T.REGISTER_TRACKED_REDIRECT_DATA),M.resolve()},t.trackClickEvent=function(e){var t=s(e),n={name:e.apiName,type:e.eventType,category:t.eventCategory,tags:t.eventTags};if(S.emitAnalyticsEvent({name:e.name||e.apiName,apiName:e?e.apiName:void 0,type:e.eventType,category:t.eventCategory,tags:t.eventTags,metrics:{}},!Q.shouldSendTrackingData()),Q.shouldSendTrackingData())return D.addEvent(n),v("onClickEvent",t),t},t.trackViewActivation=function(e){var t=H.getViewState(e.id);if(!t.isActive)return void b.debug("Inactive view passed to `trackViewActivation`");var n=o(e,t),i={name:e.apiName,type:F.PAGEVIEW,category:n.viewCategory,tags:n.eventTags};return S.emitAnalyticsEvent({name:e.name||e.apiName,apiName:e.apiName,type:F.PAGEVIEW,category:n.viewCategory,tags:n.eventTags,metrics:{}},!Q.shouldSendTrackingData()),Q.shouldSendTrackingData()?(D.addEvent(i),I.dispatch(T.TRACK_VIEW_ACTIVATED_EVENT,{viewId:e.id,eventData:n}),v("onPageActivated",n),n):void 0}}),(function(e,t,n){t.VERSION="0.55.0",t.ENGINE="js"}),(function(e,t,n){var i=n(13);t.TrackLayerDecisionTimingFlags=i({preRedirectPolicy:null,postRedirectPolicy:null,nonRedirectPolicy:null}),t.PreRedirectPolicies=i({PERSIST_BEFORE_AND_TRACK_DURING_REDIRECT:null,PERSIST_BEFORE_REDIRECT:null}),t.PostRedirectPolicies=i({TRACK_IMMEDIATELY:null,TRACK_AFTER_SYNC:null}),t.NonRedirectPolicies=i({TRACK_IMMEDIATELY:null}),t.RedirectRelayMedia=i({COOKIE:null})}),(function(e,t,n){var i=n(8),r=n(19),a=r.get("stores/global_state"),o=r.get("stores/layer_data"),s=r.get("stores/observed_redirect");t.getReferrer=function(){var e=s.get();return e?e.referrer:i.isString(a.getEffectiveReferrer())?a.getEffectiveReferrer():null},t.getExperimentAndVariation=function(){var e=s.get();if(e&&i.isString(e.variationId))return i.pick(e,["experimentId","variationId"]);if(i.isString(a.getEffectiveVariationId())){var t=a.getEffectiveVariationId(),n=o.getExperimentByVariationId(t),r=n?n.id:null;return{experimentId:r,variationId:t}}return null}}),(function(e,t,n){function i(){var e=c.get(d.COOKIES.REDIRECT,!1);if(e){u.log("Relay / Found redirect cookie:",e);var t=r(e),n=c.get(d.COOKIES.VISITOR_ID);t.visitorId=a.isString(n)?n:null;var i=c.get(d.COOKIES.VISITOR_UUID);return t.visitorUUID=a.isString(i)?i:null,t}}function r(e){var t={},n=e.split("&");return a.forEach(n,(function(e){var n=e.split("=");if(2!==n.length)return void u.warn("Relay / Skipping invalid segment:",e);var i=n[0],r=h[i];if(!r)return void u.warn("Relay / Skipping segment with unknown field identifier:",e,i);var o=n[1];try{o=(r.decodeValueString||c.safeDecodeURIComponent)(o),o=(r.valueFromValueString||a.identity)(o)}catch(t){return u.warn("Relay / Skipping segment due to decode or parse error:",e,t),void l.emitError(t)}t[r.name]=o})),t}var a=n(8),o=n(5),s=n(17),u=n(11),c=n(74),l=n(72),d=n(12),f=(n(110),[{name:"sessionId",relayName:"s"},{name:"decisionTicketAudienceIds",relayName:"as",valueToValueString:function(e){return a.map(e,encodeURIComponent).join(",")},encodeValueString:a.identity,decodeValueString:a.identity,valueFromValueString:function(e){return a.map(e.split(","),c.safeDecodeURIComponent)}},{name:"decisionId",relayName:"d"},{name:"activationId",relayName:"aId"},{name:"variationId",relayName:"v",isNullable:!0},{name:"referrer",relayName:"r"},{name:"timestamp",relayName:"t",valueFromValueString:Number},{name:"visitorId",relayName:"i"},{name:"visitorUUID",relayName:"uuid",isNullable:!0},{name:"projectId",relayName:"p"},{name:"revision",relayName:"n"},{name:"clientVersion",relayName:"cV"},{name:"accountId",relayName:"a"},{name:"layerId",relayName:"l"},{name:"layerName",relayName:"lN",isNullable:!0},{name:"layerPolicy",relayName:"lP"},{name:"experimentId",relayName:"x",isNullable:!0},{name:"experimentName",relayName:"xN",isNullable:!0},{name:"variationName",relayName:"vN",isNullable:!0}]),p={},h={};a.forEach(f,(function(e){p[e.name]=e,h[e.relayName]=e})),t.persist=function(e,t){u.error("Relay / Unsupported redirect relay medium: "+t)},t.load=function(){var e;if(e||(e=i()),e){var t=[];return a.forEach(f,(function(n){(a.isNull(e[n.name])||a.isUndefined(e[n.name]))&&(n.isNullable?e[n.name]=null:(delete e[n.name],t.push(n.name)))})),t.length?void u.error("Relay / Observed redirect data with missing fields:",t):(o.dispatch(s.LOAD_REDIRECT_DATA,e),e)}}}),(function(e,t,n){var i=n(65).Promise;t.makeTimeoutPromise=function(e){return new i(function(t,n){setTimeout((function(){n(new Error("Timed out after "+e+" ms"))}),e)})}}),(function(e,t,n){function i(e){var t;if(!o.find(E.getFrames(),{origin:e.origin}))return void _.debug("XDomain","No frame found for origin: "+e.origin);try{t=m.parse(e.data)}catch(t){return void _.debug("XDomain","Ignoring malformed message event:",e)}if("ERROR"===t.type)c.dispatch(l.XDOMAIN_SET_DISABLED,{disabled:!0}),g.emitInternalError(new y("Xdomain Error: "+t.response.toString()));else if("SYNC"===t.type)o.each(E.getSubscribers(),(function(e){e(t.response.key,t.response.value)}));else{var n=E.getMessageById(t.id);if(!n){if(_.warn("XDomain","No stored message found for ID",t.id),o.isNumber(t.id)){var i=E.getNextMessageId();t.id>=i?g.emitInternalError(new y("Message ID is greater than expected maximum ID ("+t.id+">"+i+")")):t.id<0?g.emitInternalError(new y("Message ID is < 0: "+t.id)):g.emitInternalError(new y("No stored message found for message ID: "+t.id))}else g.emitInternalError(new y("Message ID is not a number: "+t.id.toString()));return}n.resolver(t.response),c.dispatch(l.XDOMAIN_SET_MESSAGE,{messageId:t.id,message:o.extend({},n,{endTime:h.now(),response:t.response})})}}function r(e,t){return t||(t=E.getDefaultFrame()),new s(function(n){var i={data:o.extend({},e,{id:E.getNextMessageId()}),resolver:n};t?E.isDisabled()||a(i,t):c.dispatch(l.XDOMAIN_SET_MESSAGE,{messageId:i.data.id,message:i})})}function a(e,t){var n=e.data;c.dispatch(l.XDOMAIN_SET_MESSAGE,{messageId:e.data.id,message:o.extend({},e,{startTime:h.now()})}),t.target.postMessage(m.stringify(n),t.origin)}var o=n(8),s=n(65).Promise,u=n(2),c=n(5),l=n(17),d=n(19),f=n(70),p=n(16),h=n(14),g=n(72),v=n(82),m=n(18),_=n(11),E=d.get("stores/xdomain"),y=t.Error=u("XDomainStorageError");t.setItem=function(e,t,n){return r({type:"PUT",key:e,value:m.stringify(t)},n)},t.getItem=function(e,t){return r({type:"GET",key:e},t)},t.fetchAll=function(e){return r({type:"GETALL"},e)},t.subscribe=function(e){c.dispatch(l.XDOMAIN_ADD_SUBSCRIBER,{subscriber:e})},t.loadIframe=function(e,t){return new s(function(n){var i=f.createElement("iframe");i.src=e+t,f.appendToHead(i),i.onload=function(){var r={id:E.getNextFrameId(),target:i.contentWindow,origin:e,path:t};c.dispatch(l.XDOMAIN_ADD_FRAME,r),n(r)}})},t.loadCanonicalOrigins=function(e){c.dispatch(l.XDOMAIN_SET_CANONICAL_ORIGINS,{canonicalOrigins:e})},t.getXDomainUserId=function(e,t){var n,i={};return o.each(t,(function(t){i[t]=[],o.each(o.keys(e),(function(e){var r=v.getUserIdFromKey(e,t);!n&&r&&(n=r),r&&!o.includes(i[t],r)&&i[t].push(r)}))})),_.debug("XDomain: Found userIds:",i),n},t.load=function(e,n){return p.addEventListener("message",i),t.loadIframe(e,n).then((function(e){c.dispatch(l.XDOMAIN_SET_DEFAULT_FRAME,e),E.isDisabled()||o.each(E.getMessages(),(function(t){t.startTime||a(t,e)}))}))}}),(function(e,t,n){var i=n(65).Promise,r=n(8);t.firstToResolve=function(e){return new i(function(t){r.each(e,(function(e){i.resolve(e).then(t).catch()}))})}}),(function(e,t,n){var i=n(8),r=n(65).Promise,a=100,o=50;t.pollFor=function(e,t,n){var s,u;return i.isFunction(n)?u=n:(s=n||a,u=function(){return s--,s<-1}),t=t||o,new r(function(n,i){!(function r(){var a;if(!u()){try{var o=e();if(o)return n(o)}catch(e){a=e}return setTimeout(r,t)}i(a||new Error("Poll timed out"))})()})}}),(function(e,t,n){var i=n(8),r=n(83).LocalStorage,a=n(11),o=n(64),s=n(12),u=n(72),c=n(19),l=c.get("stores/pending_events"),d=s.StorageKeys.PENDING_EVENTS;t.persistPendingEvents=function(){try{var e=l.getEvents();r.setItem(d,e)}catch(e){a.warn("PendingEvents / Unable to set localStorage key, error was: ",e),u.emitInternalError(e)}},t.getPendingEvents=function(){return r.getItem(d)},t.retryPendingEvents=function(e){i.forOwn(e,(function(e,t){o.retryableRequest(e.data,t,e.retryCount)})),i.isEmpty(e)||a.log("Retried pending events: ",e)}}),(function(e,t,n){var i=n(8),r=n(11),a=n(119),o=n(19),s=o.get("stores/plugins"),u=n(12),c=[n(130),n(131),n(132)],l=["disable","load"];t.push=function(e,t){var n,a,o,s;if(!i.isArray(e)&&i.isObject(e))s=i.isUndefined(e.version)?1:e.version,n=e.type,o=[e];else if(i.isArray(e))s=0,n=e[0],o=e.slice(1);else{if(!i.isString(e))return r.warn("API / Ignoring non-array/object/string argument:",e),!1;s=0,n=e,o=[]}if(c[s]&&(a=c[s][n]),t&&l.indexOf(n)===-1)return r.debug("API / Ignoring non high priority function:",n,o),!1;if(!a)return r.warn('API / No function found for "'+n+'" (v'+s+") with arguments:",o),!1;r.log('API / Executing: "'+n,'" with arguments:',o);try{a.apply(null,o)}catch(e){r.error(e)}return!0},t.get=function(e){var t=a[e];return t?(i.isArray(t)&&(t=o.evaluate(t)),t):(t=s.getPlugin(u.PluginTypes.apiModules,e))?t:void r.warn('Module "'+e+'" not found.')}}),(function(e,t,n){function i(e,t,n,i,o,s){var l=[],d=e.getLayerStates();s.policy===c&&(d=a.filter(d,(function(e){var n=t.get(e.layerId);return n&&n.policy===c})));var f=a.map(d,(function(e){var t=!!e.decision.variationId,n=e.decisionActivationId&&e.decisionActivationId===i.getActivationId(),r=u.getExperimentAndVariation(),o=r?r.variationId:null,s=t&&e.decision.variationId===o;return a.extend(e,{isActive:t&&n||s,visitorRedirected:s})})),p=o?a.filter(f,o):f;return a.each(p,(function(e){var i=r(e,t,n,s.includeOfferConsistency);i&&l.push(i)})),l}function r(e,t,n,i){var r,o,s=e.layerId,u=t.get(s)||{},l=a.map(u.experiments,(function(e){return a.pick(e,["id","name"])}));if(i||!u.decisionMetadata||!u.decisionMetadata.offerConsistency){var d={id:s,campaignName:u.name||null,experiment:null,allExperiments:l,variation:null,reason:e.decision.reason,isActive:e.isActive,visitorRedirected:e.visitorRedirected,isInCampaignHoldback:e.decision.isLayerHoldback};e.decision&&e.decision.experimentId&&(r=a.find(u.experiments,{id:e.decision.experimentId})),r&&(d.experiment=a.pick(r,["id","name"]),u.policy!==c&&(d.experiment.campaignName=u.name||null)),r&&e.decision.variationId&&(o=a.find(r.variations,{id:e.decision.variationId})),o&&(d.variation=a.pick(o,["id","name"]));var f=a.map(e.decisionTicket.audienceIds,(function(e){return a.pick(n.get(e),["id","name"])}));return d.audiences=f,u.decisionMetadata&&u.decisionMetadata.offerConsistency&&(d.pageId=e.viewId),d}}var a=n(8),o=n(109),s=n(120),u=n(111),c="single_experiment";t.data=["stores/audience_data","stores/event_data","stores/layer_data","stores/view_data","stores/group_data","stores/global",function(e,t,n,i,r,s){var u={audiences:{},events:{},campaigns:{},pages:{},experiments:{},variations:{},projectId:s.getProjectId(),snippetId:s.getSnippetId(),accountId:s.getAccountId(),dcpServiceId:s.getDCPServiceId(),revision:s.getRevision(),clientVersion:o.VERSION};return a.each(e.getAll(),(function(e){u.audiences[e.id]=e})),a.each(t.getAll(),(function(e){u.events[e.id]=e,u.events[e.id].pageId=e.viewId})),a.each(n.getAll(),(function(e){u.campaigns[e.id]=e,u.campaigns[e.id].pageIds=e.viewIds,a.each(e.experiments,(function(t){u.experiments[t.id]=t,e.policy!==c&&(t.campaignName=e.name||null),a.each(t.variations,(function(e){u.variations[e.id]=e,a.each(u.variations[e.id].actions,(function(e){e.pageId=e.viewId}))}))}))})),a.each(i.getAll(),(function(e){u.pages[e.id]=e})),u}],t.session=["stores/session",function(e){return e.getState()}],t.visitor=["stores/visitor",function(e){return a.cloneDeep(e.getVisitorProfile())}],t.visitor_id=["stores/visitor_id",function(e){return{randomId:e.getRandomId(),UUID:e.getUUID()}}],t.state=["stores/audience_data","stores/layer_data","stores/layer","stores/view_data","stores/view","stores/global",function(e,t,n,r,o,l){return{getCampaignStates:function(r){var o={},s=i(n,t,e,l,r,{includeOfferConsistency:!1});return a.each(s,(function(e){o[e.id]=e})),o},getExperimentStates:function(r){var o=i(n,t,e,l,r,{includeOfferConsistency:!1,policy:c}),s=["audiences","variation","reason","visitorRedirected","isActive"],u=a.reduce(o,(function(e,t){var n=t.allExperiments[0];return e[n.id]=a.extend({},a.pick(t,s),{id:n.id,experimentName:n.name,isInExperimentHoldback:t.isInCampaignHoldback}),e}),{});return u},getCampaignStateLists:function(r){var o={},s=i(n,t,e,l,r,{includeOfferConsistency:!0});return a.each(s,(function(e){var t=e.id;o[t]||(o[t]=[]),o[t].push(e)})),o},getPageStates:function(e){var t=o.getAll(),n=e?a.filter(t,e):t;return a.reduce(n,(function(e,t){var n=r.get(t.id);return e[t.id]=a.extend({},a.pick(n,["id","name","apiName","category","staticConditions","tags"]),a.pick(t,["isActive","metadata"])),e}),{})},isGlobalHoldback:function(){return l.isGlobalHoldback()},getActivationId:function(){return l.getActivationId()},getVariationMap:function(){var e=n.getLayerStates(),i={};return a.each(e,(function(e){var n=t.get(e.layerId);if(e.decision&&e.decision.experimentId&&(i[e.decision.experimentId]={id:e.decision.variationId,name:null,index:null},n)){var r=a.find(n.experiments,{id:e.decision.experimentId});if(r&&e.decision.variationId)var o=a.find(r.variations,{id:e.decision.variationId}),s=a.findIndex(r.variations,{id:e.decision.variationId});o&&(i[e.decision.experimentId]={id:e.decision.variationId,name:o.name,index:s})}})),i},getActiveExperimentIds:function(){var e={};return a.each(this.getCampaignStateLists({isActive:!0}),(function(t){a.each(t,(function(t){e[t.experiment.id]=!0}))})),a.keys(e)},getRedirectInfo:function(){var e=u.getExperimentAndVariation();return e&&(e.referrer=u.getReferrer()),e},getDecisionString:function(e){if(!e)return null;e=a.extend({maxLength:255,shouldCleanString:!1},e);var i=n.getLayerState(e.campaignId),r=t.get(e.campaignId);if(!i||!r)return null;var o=i.decision.experimentId,u=i.decision.variationId;if(!o||!u)return null;var c,l;return(c=a.find(r.experiments,{id:o}))?(l=a.find(c.variations,{id:u}),l?s.generateAnalyticsString(r,c,l,i.decision.isLayerHoldback,e.maxLength,e.shouldCleanString):null):null}}}],t.utils=n(121).create(),t.jquery=n(127),t.event_emitter=n(129)}),(function(e,t,n){function i(e){return e.replace(/[^a-zA-Z0-9\.\~\!\*\(\)\']+/g,"_")}function r(e){return!u.isEmpty(e)&&u.includes(["and","or","not"],e[0])}function a(e,t){var n="";return u.isEmpty(t)?n=d:(n=u.reduce(t,(function(t,n){var r=e.get(n);return r?t+i(r.name?r.name:r.id)+",":t}),""),n=n.slice(0,-1)),n}function o(e,n,i,r,a,o){if(e.policy!==g||!r){var s=e.policy!==g&&r,c=t.formatNamesAndIdsForAnalytics(e,n,i,o),d=[c.names.experiment,c.names.variation],p=[c.idStrings.experiment,c.idStrings.variation];e.policy!==g&&(d.unshift(c.names.layer),p.unshift(c.idStrings.layer));var h=u.reduce(p,(function(e,t){return e+t.length}),0),v=d.length-1+(s?1:0),m=v*l.length,_=h+m;if(s&&(_+=f.length),_>a)throw new Error("The analytics string size is too low to send the entity IDs.");for(var E=a-_,y=d.length,I=[],T=d.length-1;T>=0;T--){var S=d[T],A=Math.min(S.length,Math.floor(E/y));E-=A,y--,I.unshift(S.substring(0,A))}var b=u.map(I,(function(e,t){return e+p[t]}));return s&&b.push(f),b.join(l)}}function s(e,n,i,r,a,o){var s=r?f:p,c=3*l.length,d=t.formatNamesAndIdsForAnalytics(e,n,i,o),h=d.names,v=d.idStrings,m=u.reduce(v,(function(e,t){return e+t.length}),0);if(m+c+s.length>a)throw new Error("The analytics string size is too low to send the campaign, experiment, and variation IDs.");var _=a-m-c-s.length,E={};E.variation=Math.min(h.variation.length,Math.floor(_/3)),_-=E.variation,E.experiment=Math.min(h.experiment.length,Math.floor(_/2)),_-=E.experiment,E.layer=_;var y={};u.each(h,(function(e,t){y[t]=e.substring(0,E[t])}));var I=[];return e.policy!==g&&I.push(y.layer+v.layer),I=I.concat([y.experiment+v.experiment,y.variation+v.variation,s]),I.join(l)}var u=n(8),c=n(19),l=":",d="everyone_else",f="holdback",p="treatment",h="",g="single_experiment";t.formatNamesAndIdsForAnalytics=function(e,t,n,o){var s={layer:e.name||h,experiment:t.name||h,variation:n.name||h};if(o&&(s=u.mapValues(s,i)),s.experiment===h&&(!e.integrationStringVersion||1===e.integrationStringVersion))if(r(t.audienceIds))s.experiment="Exp";else{var l=c.get("stores/audience_data");s.experiment=a(l,t.audienceIds)}var d={layer:"("+i(e.id)+")",experiment:"("+i(t.id)+")",variation:"("+i(n.id)+")"};return{names:s,idStrings:d}},t.generateAnalyticsString=function(e,t,n,i,r,a){return e.integrationStringVersion&&2===e.integrationStringVersion?o(e,t,n,i,r,a):s(e,t,n,i,r,a)}}),(function(e,t,n){var i=n(65).Promise,r=n(122).observeSelector,a=n(125).waitForElement,o=n(126).waitUntil,s=n(123).poll;t.create=function(){return{observeSelector:r,poll:s,Promise:i,waitForElement:a,waitUntil:o}}}),(function(e,t,n){function i(e){f[e]&&(f[e].cancelPolling(),delete f[e])}function r(e){if(f[e]){if(a(f[e]))return 0===f[e].matchedCount&&d.isFunction(f[e].options.onTimeout)&&f[e].options.onTimeout(),void i(e);var t=document.querySelectorAll(f[e].selector);t.length&&(d.each(t,(function(t){t.mt&&t.mt[e]||f[e].callbackQueue.push(t)})),o(e))}}function a(e){var t=e.options.timeout;if(null!==t)if("function"==typeof t)try{return t()}catch(e){}else if(Date.now()-e.startTime>t)return!0;return!1}function o(e){for(;f[e]&&f[e].callbackQueue.length;){var t=f[e].callbackQueue.shift();if(s(t,e),f[e].matchedCount=f[e].matchedCount+1,f[e].callback(t),f[e].options.once)return void i(e)}}function s(e,t){e.mt||(e.mt={}),e.mt[t]=!0}function u(e){try{document.querySelector(e)}catch(e){return!1}return!0}var c=n(123),l=n(47).generate,d=n(8),f={},p={once:!1,onTimeout:null,timeout:null};t.observeSelector=function(e,t,n){if(!u(e))throw new Error("observeSelector expects a valid css selector as its first argument");if(!d.isFunction(t))throw new Error("observeSelector expects a function as its second argument");if(n&&(!d.isObject(n)||d.isFunction(n)))throw new Error("observeSelector expects an object as its third argument");var a=l();return n=d.merge({},p,n||{}),f[a]={callback:t,callbackQueue:[],cancelPolling:c.poll(d.partial(r,a)),matchedCount:0,options:n,selector:e,startTime:Date.now()},setTimeout(r.bind(null,a),0),d.partial(i,a)}}),(function(e,t,n){function i(e){u[e]&&a.each(u[e].callbacks,(function(e){e.call(null)}))}function r(e,t){u[t]&&u[t].callbacks[e]&&(delete u[t].callbacks[e],a.some(u[t].callbacks)||(clearInterval(u[t].id),delete u[t]))}var a=n(8),o=n(47).generate,s=n(124).DEFAULT_INTERVAL,u={};t.poll=function(e,t){a.isNumber(t)||(t=s),u[t]||(u[t]={callbacks:{},id:setInterval(a.partial(i,t),t)});var n=o();return u[t].callbacks[n]=e,a.partial(r,n,t)},t.cancelAll=function(){a.each(u,(function(e,t){clearInterval(e.id),delete u[t]}))}}),(function(e,t){e.exports={DEFAULT_INTERVAL:20}}),(function(e,t,n){var i=n(65).Promise,r=n(122).observeSelector;t.waitForElement=function(e){return new i(function(t,n){r(e,t,{once:!0})})}}),(function(e,t,n){var i=n(65).Promise,r=n(123).poll;t.waitUntil=function(e){return new i(function(t,n){if(e())return void t();var i=r((function(){e()&&(i(),t())}))})}}),(function(e,t,n){n(16);e.exports=n(128)}),(function(e,t){/*!
	 * jQuery JavaScript Library v1.6.4
	 * http://jquery.com/
	 *
	 * Copyright 2011, John Resig
	 * Dual licensed under the MIT or GPL Version 2 licenses.
	 * http://jquery.org/license
	 *
	 * Includes Sizzle.js
	 * http://sizzlejs.com/
	 * Copyright 2011, The Dojo Foundation
	 * Released under the MIT, BSD, and GPL Licenses.
	 *
	 *
	 */
var n=(function(e,t){function n(e,n,i){if(i===t&&1===e.nodeType){var r="data-"+n.replace(w,"-$1").toLowerCase();if(i=e.getAttribute(r),"string"==typeof i){try{i="true"===i||"false"!==i&&("null"===i?null:T.isNaN(i)?b.test(i)?T.parseJSON(i):i:parseFloat(i))}catch(e){}T.data(e,n,i)}else i=t}return i}function i(e){for(var t in e)if("toJSON"!==t)return!1;return!0}function r(e,n,i){var r=n+"defer",a=n+"queue",o=n+"mark",s=T.data(e,r,t,!0);!s||"queue"!==i&&T.data(e,a,t,!0)||"mark"!==i&&T.data(e,o,t,!0)||setTimeout((function(){T.data(e,a,t,!0)||T.data(e,o,t,!0)||(T.removeData(e,r,!0),s.resolve())}),0)}function a(){return!1}function o(){return!0}function s(e,n,i){var r=T.extend({},i[0]);r.type=e,r.originalEvent={},r.liveFired=t,T.event.handle.call(n,r),r.isDefaultPrevented()&&i[0].preventDefault()}function u(e){var t,n,i,r,a,o,s,u,c,l,d,f,p=[],h=[],g=T._data(this,"events");if(e.liveFired!==this&&g&&g.live&&!e.target.disabled&&(!e.button||"click"!==e.type)){e.namespace&&(d=new RegExp("(^|\\.)"+e.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),e.liveFired=this;var v=g.live.slice(0);for(s=0;s<v.length;s++)a=v[s],a.origType.replace(F,"")===e.type?h.push(a.selector):v.splice(s--,1);for(r=T(e.target).closest(h,e.currentTarget),u=0,c=r.length;u<c;u++)for(l=r[u],s=0;s<v.length;s++)a=v[s],l.selector!==a.selector||d&&!d.test(a.namespace)||l.elem.disabled||(o=l.elem,i=null,"mouseenter"!==a.preType&&"mouseleave"!==a.preType||(e.type=a.preType,i=T(e.relatedTarget).closest(a.selector)[0],i&&T.contains(o,i)&&(i=o)),i&&i===o||p.push({elem:o,handleObj:a,level:l.level}));for(u=0,c=p.length;u<c&&(r=p[u],!(n&&r.level>n))&&(e.currentTarget=r.elem,e.data=r.handleObj.data,e.handleObj=r.handleObj,f=r.handleObj.origHandler.apply(r.elem,arguments),f!==!1&&!e.isPropagationStopped()||(n=r.level,f===!1&&(t=!1),!e.isImmediatePropagationStopped()));u++);return t}}function c(e,t){return(e&&"*"!==e?e+".":"")+t.replace(M,"`").replace(U,"&")}function l(e){return!e||!e.parentNode||11===e.parentNode.nodeType}function d(e,t,n){if(t=t||0,T.isFunction(t))return T.grep(e,(function(e,i){var r=!!t.call(e,i,e);return r===n}));if(t.nodeType)return T.grep(e,(function(e,i){return e===t===n}));if("string"==typeof t){var i=T.grep(e,(function(e){return 1===e.nodeType}));if(Q.test(t))return T.filter(t,i,!n);t=T.filter(t,i)}return T.grep(e,(function(e,i){return T.inArray(e,t)>=0===n}))}function f(e,t){return T.nodeName(e,"table")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e,t){if(1===t.nodeType&&T.hasData(e)){var n=T.expando,i=T.data(e),r=T.data(t,i);if(i=i[n]){var a=i.events;if(r=r[n]=T.extend({},i),a){delete r.handle,r.events={};for(var o in a)for(var s=0,u=a[o].length;s<u;s++)T.event.add(t,o+(a[o][s].namespace?".":"")+a[o][s].namespace,a[o][s],a[o][s].data)}}}}function h(e,t){var n;1===t.nodeType&&(t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),"object"===n?t.outerHTML=e.outerHTML:"input"!==n||"checkbox"!==e.type&&"radio"!==e.type?"option"===n?t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue):(e.checked&&(t.defaultChecked=t.checked=e.checked),t.value!==e.value&&(t.value=e.value)),t.removeAttribute(T.expando))}function g(e){return"getElementsByTagName"in e?e.getElementsByTagName("*"):"querySelectorAll"in e?e.querySelectorAll("*"):[]}function v(e){"checkbox"!==e.type&&"radio"!==e.type||(e.defaultChecked=e.checked)}function m(e){T.nodeName(e,"input")?v(e):"getElementsByTagName"in e&&T.grep(e.getElementsByTagName("input"),v)}function _(e,t){t.src?T.ajax({url:t.src,async:!1,dataType:"script"}):T.globalEval((t.text||t.textContent||t.innerHTML||"").replace(le,"/*$0*/")),t.parentNode&&t.parentNode.removeChild(t)}function E(e,t,n){var i="width"===t?e.offsetWidth:e.offsetHeight,r="width"===t?Te:Se;return i>0?("border"!==n&&T.each(r,(function(){n||(i-=parseFloat(T.css(e,"padding"+this))||0),"margin"===n?i+=parseFloat(T.css(e,n+this))||0:i-=parseFloat(T.css(e,"border"+this+"Width"))||0})),i+"px"):(i=fe(e,t,t),(i<0||null==i)&&(i=e.style[t]||0),i=parseFloat(i)||0,n&&T.each(r,(function(){i+=parseFloat(T.css(e,"padding"+this))||0,"padding"!==n&&(i+=parseFloat(T.css(e,"border"+this+"Width"))||0),"margin"===n&&(i+=parseFloat(T.css(e,n+this))||0)})),i+"px")}var y=e.document,I=e.navigator,T=(e.location,(function(){function n(){if(!s.isReady){try{y.documentElement.doScroll("left")}catch(e){return void setTimeout(n,1)}s.ready()}}var i,r,a,o,s=function(e,t){return new s.fn.init(e,t,i)},u=e.jQuery,c=e.$,l=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,d=/\S/,f=/^\s+/,p=/\s+$/,h=/\d/,g=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,v=/^[\],:{}\s]*$/,m=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,_=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,E=/(?:^|:|,)(?:\s*\[)+/g,T=/(webkit)[ \/]([\w.]+)/,S=/(opera)(?:.*version)?[ \/]([\w.]+)/,A=/(msie) ([\w.]+)/,b=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/gi,D=/^-ms-/,R=function(e,t){return(t+"").toUpperCase()},N=I.userAgent,O=Object.prototype.toString,C=Object.prototype.hasOwnProperty,x=Array.prototype.push,L=Array.prototype.slice,P=String.prototype.trim,k=Array.prototype.indexOf,F={};return s.fn=s.prototype={constructor:s,init:function(e,n,i){var r,a,o,u;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("body"===e&&!n&&y.body)return this.context=y,this[0]=y.body,this.selector=e,this.length=1,this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:l.exec(e),!r||!r[1]&&n)return!n||n.jquery?(n||i).find(e):this.constructor(n).find(e);if(r[1])return n=n instanceof s?n[0]:n,u=n?n.ownerDocument||n:y,o=g.exec(e),o?s.isPlainObject(n)?(e=[y.createElement(o[1])],s.fn.attr.call(e,n,!0)):e=[u.createElement(o[1])]:(o=s.buildFragment([r[1]],[u]),e=(o.cacheable?s.clone(o.fragment):o.fragment).childNodes),s.merge(this,e);if(a=y.getElementById(r[2]),a&&a.parentNode){if(a.id!==r[2])return i.find(e);this.length=1,this[0]=a}return this.context=y,this.selector=e,this}return s.isFunction(e)?i.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),s.makeArray(e,this))},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return L.call(this,0)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var i=this.constructor();return s.isArray(e)?x.apply(i,e):s.merge(i,e),i.prevObject=this,i.context=this.context,"find"===t?i.selector=this.selector+(this.selector?" ":"")+n:t&&(i.selector=this.selector+"."+t+"("+n+")"),i},each:function(e,t){return s.each(this,e,t)},ready:function(e){return s.bindReady(),a.done(e),this},eq:function(e){return e===-1?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(L.apply(this,arguments),"slice",L.call(arguments).join(","))},map:function(e){return this.pushStack(s.map(this,(function(t,n){return e.call(t,n,t)})))},end:function(){return this.prevObject||this.constructor(null)},push:x,sort:[].sort,splice:[].splice},s.fn.init.prototype=s.fn,s.extend=s.fn.extend=function(){var e,n,i,r,a,o,u=arguments[0]||{},c=1,l=arguments.length,d=!1;for("boolean"==typeof u&&(d=u,u=arguments[1]||{},c=2),"object"==typeof u||s.isFunction(u)||(u={}),l===c&&(u=this,--c);c<l;c++)if(null!=(e=arguments[c]))for(n in e)i=u[n],r=e[n],u!==r&&(d&&r&&(s.isPlainObject(r)||(a=s.isArray(r)))?(a?(a=!1,o=i&&s.isArray(i)?i:[]):o=i&&s.isPlainObject(i)?i:{},u[n]=s.extend(d,o,r)):r!==t&&(u[n]=r));return u},s.extend({noConflict:function(t){return e.$===s&&(e.$=c),t&&e.jQuery===s&&(e.jQuery=u),s},isReady:!1,readyWait:1,holdReady:function(e){e?s.readyWait++:s.ready(!0)},ready:function(e){if(e===!0&&!--s.readyWait||e!==!0&&!s.isReady){if(!y.body)return setTimeout(s.ready,1);if(s.isReady=!0,e!==!0&&--s.readyWait>0)return;a.resolveWith(y,[s]),s.fn.trigger&&s(y).trigger("ready").unbind("ready")}},bindReady:function(){if(!a){if(a=s._Deferred(),"complete"===y.readyState)return setTimeout(s.ready,1);if(y.addEventListener)y.addEventListener("DOMContentLoaded",o,!1),e.addEventListener("load",s.ready,!1);else if(y.attachEvent){y.attachEvent("onreadystatechange",o),e.attachEvent("onload",s.ready);var t=!1;try{t=null==e.frameElement}catch(e){}y.documentElement.doScroll&&t&&n()}}},isFunction:function(e){return"function"===s.type(e)},isArray:Array.isArray||function(e){return"array"===s.type(e)},isWindow:function(e){return e&&"object"==typeof e&&"setInterval"in e},isNaN:function(e){return null==e||!h.test(e)||isNaN(e)},type:function(e){return null==e?String(e):F[O.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==s.type(e)||e.nodeType||s.isWindow(e))return!1;try{if(e.constructor&&!C.call(e,"constructor")&&!C.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}var n;for(n in e);return n===t||C.call(e,n)},isEmptyObject:function(e){for(var t in e)return!1;return!0},error:function(e){throw e},parseJSON:function(t){return"string"==typeof t&&t?(t=s.trim(t),e.JSON&&e.JSON.parse?e.JSON.parse(t):v.test(t.replace(m,"@").replace(_,"]").replace(E,""))?new Function("return "+t)():void s.error("Invalid JSON: "+t)):null},parseXML:function(n){var i,r;try{e.DOMParser?(r=new DOMParser,i=r.parseFromString(n,"text/xml")):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(n))}catch(e){i=t}return i&&i.documentElement&&!i.getElementsByTagName("parsererror").length||s.error("Invalid XML: "+n),i},noop:function(){},globalEval:function(t){t&&d.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(w,R)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,i){var r,a=0,o=e.length,u=o===t||s.isFunction(e);if(i)if(u){for(r in e)if(n.apply(e[r],i)===!1)break}else for(;a<o&&n.apply(e[a++],i)!==!1;);else if(u){for(r in e)if(n.call(e[r],r,e[r])===!1)break}else for(;a<o&&n.call(e[a],a,e[a++])!==!1;);return e},trim:P?function(e){return null==e?"":P.call(e)}:function(e){return null==e?"":e.toString().replace(f,"").replace(p,"")},makeArray:function(e,t){var n=t||[];if(null!=e){var i=s.type(e);null==e.length||"string"===i||"function"===i||"regexp"===i||s.isWindow(e)?x.call(n,e):s.merge(n,e)}return n},inArray:function(e,t){if(!t)return-1;if(k)return k.call(t,e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},merge:function(e,n){var i=e.length,r=0;if("number"==typeof n.length)for(var a=n.length;r<a;r++)e[i++]=n[r];else for(;n[r]!==t;)e[i++]=n[r++];return e.length=i,e},grep:function(e,t,n){var i,r=[];n=!!n;for(var a=0,o=e.length;a<o;a++)i=!!t(e[a],a),n!==i&&r.push(e[a]);return r},map:function(e,n,i){var r,a,o=[],u=0,c=e.length,l=e instanceof s||c!==t&&"number"==typeof c&&(c>0&&e[0]&&e[c-1]||0===c||s.isArray(e));if(l)for(;u<c;u++)r=n(e[u],u,i),null!=r&&(o[o.length]=r);else for(a in e)r=n(e[a],a,i),null!=r&&(o[o.length]=r);return o.concat.apply([],o)},guid:1,proxy:function(e,n){if("string"==typeof n){var i=e[n];n=e,e=i}if(!s.isFunction(e))return t;var r=L.call(arguments,2),a=function(){return e.apply(n,r.concat(L.call(arguments)))};return a.guid=e.guid=e.guid||a.guid||s.guid++,a},access:function(e,n,i,r,a,o){var u=e.length;if("object"==typeof n){for(var c in n)s.access(e,c,n[c],r,a,i);return e}if(i!==t){r=!o&&r&&s.isFunction(i);for(var l=0;l<u;l++)a(e[l],n,r?i.call(e[l],l,a(e[l],n)):i,o);return e}return u?a(e[0],n):t},now:function(){return(new Date).getTime()},uaMatch:function(e){e=e.toLowerCase();var t=T.exec(e)||S.exec(e)||A.exec(e)||e.indexOf("compatible")<0&&b.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},sub:function(){function e(t,n){return new e.fn.init(t,n)}s.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(n,i){return i&&i instanceof s&&!(i instanceof e)&&(i=e(i)),s.fn.init.call(this,n,i,t)},e.fn.init.prototype=e.fn;var t=e(y);return e},browser:{}}),s.each("Boolean Number String Function Array Date RegExp Object".split(" "),(function(e,t){F["[object "+t+"]"]=t.toLowerCase()})),r=s.uaMatch(N),r.browser&&(s.browser[r.browser]=!0,s.browser.version=r.version),s.browser.webkit&&(s.browser.safari=!0),d.test(" ")&&(f=/^[\s\xA0]+/,p=/[\s\xA0]+$/),i=s(y),y.addEventListener?o=function(){y.removeEventListener("DOMContentLoaded",o,!1),s.ready()}:y.attachEvent&&(o=function(){"complete"===y.readyState&&(y.detachEvent("onreadystatechange",o),s.ready())}),s})()),S="done fail isResolved isRejected promise then always pipe".split(" "),A=[].slice;T.extend({_Deferred:function(){var e,t,n,i=[],r={done:function(){if(!n){var t,a,o,s,u,c=arguments;for(e&&(u=e,e=0),t=0,a=c.length;t<a;t++)o=c[t],s=T.type(o),"array"===s?r.done.apply(r,o):"function"===s&&i.push(o);u&&r.resolveWith(u[0],u[1])}return this},resolveWith:function(r,a){if(!n&&!e&&!t){a=a||[],t=1;try{for(;i[0];)i.shift().apply(r,a)}finally{e=[r,a],t=0}}return this},resolve:function(){return r.resolveWith(this,arguments),this},isResolved:function(){return!(!t&&!e)},cancel:function(){return n=1,i=[],this}};return r},Deferred:function(e){var t,n=T._Deferred(),i=T._Deferred();return T.extend(n,{then:function(e,t){return n.done(e).fail(t),this},always:function(){return n.done.apply(n,arguments).fail.apply(this,arguments)},fail:i.done,rejectWith:i.resolveWith,reject:i.resolve,isRejected:i.isResolved,pipe:function(e,t){return T.Deferred((function(i){T.each({done:[e,"resolve"],fail:[t,"reject"]},(function(e,t){var r,a=t[0],o=t[1];T.isFunction(a)?n[e]((function(){r=a.apply(this,arguments),r&&T.isFunction(r.promise)?r.promise().then(i.resolve,i.reject):i[o+"With"](this===n?i:this,[r])})):n[e](i[o])}))})).promise()},promise:function(e){if(null==e){if(t)return t;t=e={}}for(var i=S.length;i--;)e[S[i]]=n[S[i]];return e}}),n.done(i.cancel).fail(n.cancel),delete n.cancel,e&&e.call(n,n),n},when:function(e){function t(e){return function(t){n[e]=arguments.length>1?A.call(arguments,0):t,--a||o.resolveWith(o,A.call(n,0))}}var n=arguments,i=0,r=n.length,a=r,o=r<=1&&e&&T.isFunction(e.promise)?e:T.Deferred();if(r>1){for(;i<r;i++)n[i]&&T.isFunction(n[i].promise)?n[i].promise().then(t(i),o.reject):--a;a||o.resolveWith(o,n)}else o!==e&&o.resolveWith(o,r?[e]:[]);return o.promise()}}),T.support=(function(){var e,t,n,i,r,a,o,s,u,c,l,d,f,p,h,g,v=y.createElement("div"),m=y.documentElement;if(v.setAttribute("className","t"),v.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",e=v.getElementsByTagName("*"),t=v.getElementsByTagName("a")[0],!e||!e.length||!t)return{};n=y.createElement("select"),i=n.appendChild(y.createElement("option")),r=v.getElementsByTagName("input")[0],o={leadingWhitespace:3===v.firstChild.nodeType,tbody:!v.getElementsByTagName("tbody").length,htmlSerialize:!!v.getElementsByTagName("link").length,style:/top/.test(t.getAttribute("style")),hrefNormalized:"/a"===t.getAttribute("href"),opacity:/^0.55$/.test(t.style.opacity),cssFloat:!!t.style.cssFloat,checkOn:"on"===r.value,optSelected:i.selected,getSetAttribute:"t"!==v.className,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},r.checked=!0,o.noCloneChecked=r.cloneNode(!0).checked,n.disabled=!0,o.optDisabled=!i.disabled;try{delete v.test}catch(e){o.deleteExpando=!1}!v.addEventListener&&v.attachEvent&&v.fireEvent&&(v.attachEvent("onclick",(function(){o.noCloneEvent=!1})),v.cloneNode(!0).fireEvent("onclick")),r=y.createElement("input"),r.value="t",r.setAttribute("type","radio"),o.radioValue="t"===r.value,r.setAttribute("checked","checked"),v.appendChild(r),s=y.createDocumentFragment(),s.appendChild(v.firstChild),o.checkClone=s.cloneNode(!0).cloneNode(!0).lastChild.checked,v.innerHTML="",v.style.width=v.style.paddingLeft="1px",u=y.getElementsByTagName("body")[0],l=y.createElement(u?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},u&&T.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(h in d)l.style[h]=d[h];if(l.appendChild(v),c=u||m,c.insertBefore(l,c.firstChild),o.appendChecked=r.checked,o.boxModel=2===v.offsetWidth,"zoom"in v.style&&(v.style.display="inline",v.style.zoom=1,o.inlineBlockNeedsLayout=2===v.offsetWidth,v.style.display="",v.innerHTML="<div style='width:4px;'></div>",o.shrinkWrapBlocks=2!==v.offsetWidth),v.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",f=v.getElementsByTagName("td"),g=0===f[0].offsetHeight,f[0].style.display="",f[1].style.display="none",o.reliableHiddenOffsets=g&&0===f[0].offsetHeight,v.innerHTML="",y.defaultView&&y.defaultView.getComputedStyle&&(a=y.createElement("div"),a.style.width="0",a.style.marginRight="0",v.appendChild(a),o.reliableMarginRight=0===(parseInt((y.defaultView.getComputedStyle(a,null)||{marginRight:0}).marginRight,10)||0)),l.innerHTML="",c.removeChild(l),v.attachEvent)for(h in{submit:1,change:1,focusin:1})p="on"+h,g=p in v,g||(v.setAttribute(p,"return;"),g="function"==typeof v[p]),o[h+"Bubbles"]=g;return l=s=n=i=u=a=v=r=null,o})(),T.boxModel=T.support.boxModel;var b=/^(?:\{.*\}|\[.*\])$/,w=/([A-Z])/g;T.extend({cache:{},uuid:0,expando:"jQuery"+(T.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?T.cache[e[T.expando]]:e[T.expando],!!e&&!i(e)},data:function(e,n,i,r){if(T.acceptData(e)){var a,o,s=T.expando,u="string"==typeof n,c=e.nodeType,l=c?T.cache:e,d=c?e[T.expando]:e[T.expando]&&T.expando;if(!(!d||r&&d&&l[d]&&!l[d][s])||!u||i!==t)return d||(c?e[T.expando]=d=++T.uuid:d=T.expando),l[d]||(l[d]={},c||(l[d].toJSON=T.noop)),"object"!=typeof n&&"function"!=typeof n||(r?l[d][s]=T.extend(l[d][s],n):l[d]=T.extend(l[d],n)),a=l[d],r&&(a[s]||(a[s]={}),a=a[s]),i!==t&&(a[T.camelCase(n)]=i),"events"!==n||a[n]?(u?(o=a[n],null==o&&(o=a[T.camelCase(n)])):o=a,o):a[s]&&a[s].events}},removeData:function(e,t,n){if(T.acceptData(e)){var r,a=T.expando,o=e.nodeType,s=o?T.cache:e,u=o?e[T.expando]:T.expando;if(s[u]&&(!t||(r=n?s[u][a]:s[u],!r||(r[t]||(t=T.camelCase(t)),delete r[t],i(r))))&&(!n||(delete s[u][a],i(s[u])))){var c=s[u][a];T.support.deleteExpando||!s.setInterval?delete s[u]:s[u]=null,c?(s[u]={},o||(s[u].toJSON=T.noop),s[u][a]=c):o&&(T.support.deleteExpando?delete e[T.expando]:e.removeAttribute?e.removeAttribute(T.expando):e[T.expando]=null)}}},_data:function(e,t,n){return T.data(e,t,n,!0)},acceptData:function(e){if(e.nodeName){var t=T.noData[e.nodeName.toLowerCase()];if(t)return!(t===!0||e.getAttribute("classid")!==t)}return!0}}),T.fn.extend({data:function(e,i){var r=null;if("undefined"==typeof e){if(this.length&&(r=T.data(this[0]),1===this[0].nodeType))for(var a,o=this[0].attributes,s=0,u=o.length;s<u;s++)a=o[s].name,0===a.indexOf("data-")&&(a=T.camelCase(a.substring(5)),n(this[0],a,r[a]));return r}if("object"==typeof e)return this.each((function(){T.data(this,e)}));var c=e.split(".");return c[1]=c[1]?"."+c[1]:"",i===t?(r=this.triggerHandler("getData"+c[1]+"!",[c[0]]),r===t&&this.length&&(r=T.data(this[0],e),r=n(this[0],e,r)),r===t&&c[1]?this.data(c[0]):r):this.each((function(){var t=T(this),n=[c[0],i];t.triggerHandler("setData"+c[1]+"!",n),T.data(this,e,i),t.triggerHandler("changeData"+c[1]+"!",n)}))},removeData:function(e){return this.each((function(){T.removeData(this,e)}))}}),T.extend({_mark:function(e,n){e&&(n=(n||"fx")+"mark",T.data(e,n,(T.data(e,n,t,!0)||0)+1,!0))},_unmark:function(e,n,i){if(e!==!0&&(i=n,n=e,e=!1),n){i=i||"fx";var a=i+"mark",o=e?0:(T.data(n,a,t,!0)||1)-1;o?T.data(n,a,o,!0):(T.removeData(n,a,!0),r(n,i,"mark"))}},queue:function(e,n,i){if(e){n=(n||"fx")+"queue";var r=T.data(e,n,t,!0);return i&&(!r||T.isArray(i)?r=T.data(e,n,T.makeArray(i),!0):r.push(i)),r||[]}},dequeue:function(e,t){t=t||"fx";var n=T.queue(e,t),i=n.shift();"inprogress"===i&&(i=n.shift()),i&&("fx"===t&&n.unshift("inprogress"),i.call(e,(function(){T.dequeue(e,t)}))),n.length||(T.removeData(e,t+"queue",!0),r(e,t,"queue"))}}),T.fn.extend({queue:function(e,n){return"string"!=typeof e&&(n=e,e="fx"),n===t?T.queue(this[0],e):this.each((function(){var t=T.queue(this,e,n);"fx"===e&&"inprogress"!==t[0]&&T.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){T.dequeue(this,e)}))},delay:function(e,t){return e=T.fx?T.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,(function(){var n=this;setTimeout((function(){T.dequeue(n,t)}),e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){function i(){--u||a.resolveWith(o,[o])}"string"!=typeof e&&(n=e,e=t),e=e||"fx";for(var r,a=T.Deferred(),o=this,s=o.length,u=1,c=e+"defer",l=e+"queue",d=e+"mark";s--;)(r=T.data(o[s],c,t,!0)||(T.data(o[s],l,t,!0)||T.data(o[s],d,t,!0))&&T.data(o[s],c,T._Deferred(),!0))&&(u++,r.done(i));return i(),a.promise()}});var D,R,N=/[\n\t\r]/g,O=/\s+/,C=/\r/g,x=/^(?:button|input)$/i,L=/^(?:button|input|object|select|textarea)$/i,P=/^a(?:rea)?$/i,k=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i;T.fn.extend({attr:function(e,t){return T.access(this,e,t,!0,T.attr)},removeAttr:function(e){return this.each((function(){T.removeAttr(this,e)}))},prop:function(e,t){return T.access(this,e,t,!0,T.prop)},removeProp:function(e){return e=T.propFix[e]||e,this.each((function(){try{this[e]=t,delete this[e]}catch(e){}}))},addClass:function(e){var t,n,i,r,a,o,s;if(T.isFunction(e))return this.each((function(t){T(this).addClass(e.call(this,t,this.className))}));if(e&&"string"==typeof e)for(t=e.split(O),n=0,i=this.length;n<i;n++)if(r=this[n],1===r.nodeType)if(r.className||1!==t.length){for(a=" "+r.className+" ",o=0,s=t.length;o<s;o++)~a.indexOf(" "+t[o]+" ")||(a+=t[o]+" ");r.className=T.trim(a)}else r.className=e;return this},removeClass:function(e){var n,i,r,a,o,s,u;if(T.isFunction(e))return this.each((function(t){T(this).removeClass(e.call(this,t,this.className))}));if(e&&"string"==typeof e||e===t)for(n=(e||"").split(O),i=0,r=this.length;i<r;i++)if(a=this[i],1===a.nodeType&&a.className)if(e){for(o=(" "+a.className+" ").replace(N," "),s=0,u=n.length;s<u;s++)o=o.replace(" "+n[s]+" "," ");a.className=T.trim(o)}else a.className="";return this},toggleClass:function(e,t){var n=typeof e,i="boolean"==typeof t;return T.isFunction(e)?this.each((function(n){T(this).toggleClass(e.call(this,n,this.className,t),t)})):this.each((function(){if("string"===n)for(var r,a=0,o=T(this),s=t,u=e.split(O);r=u[a++];)s=i?s:!o.hasClass(r),o[s?"addClass":"removeClass"](r);else"undefined"!==n&&"boolean"!==n||(this.className&&T._data(this,"__className__",this.className),this.className=this.className||e===!1?"":T._data(this,"__className__")||"")}))},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;n<i;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(N," ").indexOf(t)>-1)return!0;return!1},val:function(e){var n,i,r=this[0];if(!arguments.length)return r?(n=T.valHooks[r.nodeName.toLowerCase()]||T.valHooks[r.type],n&&"get"in n&&(i=n.get(r,"value"))!==t?i:(i=r.value,"string"==typeof i?i.replace(C,""):null==i?"":i)):t;var a=T.isFunction(e);return this.each((function(i){var r,o=T(this);1===this.nodeType&&(r=a?e.call(this,i,o.val()):e,null==r?r="":"number"==typeof r?r+="":T.isArray(r)&&(r=T.map(r,(function(e){return null==e?"":e+""}))),n=T.valHooks[this.nodeName.toLowerCase()]||T.valHooks[this.type],n&&"set"in n&&n.set(this,r,"value")!==t||(this.value=r))}))}}),T.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n=e.selectedIndex,i=[],r=e.options,a="select-one"===e.type;if(n<0)return null;for(var o=a?n:0,s=a?n+1:r.length;o<s;o++){var u=r[o];if(u.selected&&(T.support.optDisabled?!u.disabled:null===u.getAttribute("disabled"))&&(!u.parentNode.disabled||!T.nodeName(u.parentNode,"optgroup"))){if(t=T(u).val(),a)return t;i.push(t)}}return a&&!i.length&&r.length?T(r[n]).val():i},set:function(e,t){var n=T.makeArray(t);return T(e).find("option").each((function(){this.selected=T.inArray(T(this).val(),n)>=0})),n.length||(e.selectedIndex=-1),n}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(e,n,i,r){var a=e.nodeType;if(!e||3===a||8===a||2===a)return t;if(r&&n in T.attrFn)return T(e)[n](i);if(!("getAttribute"in e))return T.prop(e,n,i);var o,s,u=1!==a||!T.isXMLDoc(e);return u&&(n=T.attrFix[n]||n,s=T.attrHooks[n],s||(k.test(n)?s=R:D&&(s=D))),i!==t?null===i?(T.removeAttr(e,n),t):s&&"set"in s&&u&&(o=s.set(e,i,n))!==t?o:(e.setAttribute(n,""+i),i):s&&"get"in s&&u&&null!==(o=s.get(e,n))?o:(o=e.getAttribute(n),null===o?t:o)},removeAttr:function(e,t){var n;1===e.nodeType&&(t=T.attrFix[t]||t,T.attr(e,t,""),e.removeAttribute(t),k.test(t)&&(n=T.propFix[t]||t)in e&&(e[n]=!1))},attrHooks:{type:{set:function(e,t){if(x.test(e.nodeName)&&e.parentNode)T.error("type property can't be changed");else if(!T.support.radioValue&&"radio"===t&&T.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return D&&T.nodeName(e,"button")?D.get(e,t):t in e?e.value:null},set:function(e,t,n){return D&&T.nodeName(e,"button")?D.set(e,t,n):void(e.value=t)}}},propFix:{tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,i){var r=e.nodeType;if(!e||3===r||8===r||2===r)return t;var a,o,s=1!==r||!T.isXMLDoc(e);return s&&(n=T.propFix[n]||n,o=T.propHooks[n]),i!==t?o&&"set"in o&&(a=o.set(e,i,n))!==t?a:e[n]=i:o&&"get"in o&&null!==(a=o.get(e,n))?a:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):L.test(e.nodeName)||P.test(e.nodeName)&&e.href?0:t}}}}),T.attrHooks.tabIndex=T.propHooks.tabIndex,R={get:function(e,n){var i;return T.prop(e,n)===!0||(i=e.getAttributeNode(n))&&i.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var i;return t===!1?T.removeAttr(e,n):(i=T.propFix[n]||n,i in e&&(e[i]=!0),e.setAttribute(n,n.toLowerCase())),n}},T.support.getSetAttribute||(D=T.valHooks.button={get:function(e,n){var i;return i=e.getAttributeNode(n),i&&""!==i.nodeValue?i.nodeValue:t},set:function(e,t,n){var i=e.getAttributeNode(n);return i||(i=y.createAttribute(n),e.setAttributeNode(i)),i.nodeValue=t+""}},T.each(["width","height"],(function(e,t){T.attrHooks[t]=T.extend(T.attrHooks[t],{set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}})}))),T.support.hrefNormalized||T.each(["href","src","width","height"],(function(e,n){T.attrHooks[n]=T.extend(T.attrHooks[n],{get:function(e){var i=e.getAttribute(n,2);return null===i?t:i}})})),T.support.style||(T.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=""+t}}),T.support.optSelected||(T.propHooks.selected=T.extend(T.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),T.support.checkOn||T.each(["radio","checkbox"],(function(){T.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}})),T.each(["radio","checkbox"],(function(){T.valHooks[this]=T.extend(T.valHooks[this],{set:function(e,t){if(T.isArray(t))return e.checked=T.inArray(T(e).val(),t)>=0}})}));var F=/\.(.*)$/,V=/^(?:textarea|input|select)$/i,M=/\./g,U=/ /g,G=/[^\w\s.|`]/g,B=function(e){return e.replace(G,"\\$&")};T.event={add:function(e,n,i,r){if(3!==e.nodeType&&8!==e.nodeType){if(i===!1)i=a;else if(!i)return;var o,s;i.handler&&(o=i,i=o.handler),i.guid||(i.guid=T.guid++);var u=T._data(e);if(u){var c=u.events,l=u.handle;c||(u.events=c={}),l||(u.handle=l=function(e){return"undefined"==typeof T||e&&T.event.triggered===e.type?t:T.event.handle.apply(l.elem,arguments)}),l.elem=e,n=n.split(" ");for(var d,f,p=0;d=n[p++];){s=o?T.extend({},o):{handler:i,data:r},d.indexOf(".")>-1?(f=d.split("."),d=f.shift(),s.namespace=f.slice(0).sort().join(".")):(f=[],s.namespace=""),s.type=d,s.guid||(s.guid=i.guid);var h=c[d],g=T.event.special[d]||{};h||(h=c[d]=[],g.setup&&g.setup.call(e,r,f,l)!==!1||(e.addEventListener?e.addEventListener(d,l,!1):e.attachEvent&&e.attachEvent("on"+d,l))),g.add&&(g.add.call(e,s),s.handler.guid||(s.handler.guid=i.guid)),h.push(s),T.event.global[d]=!0}e=null}}},global:{},remove:function(e,n,i,r){if(3!==e.nodeType&&8!==e.nodeType){i===!1&&(i=a);var o,s,u,c,l,d,f,p,h,g,v=0,m=T.hasData(e)&&T._data(e),_=m&&m.events;if(m&&_)if(n&&n.type&&(i=n.handler,n=n.type),!n||"string"==typeof n&&"."===n.charAt(0)){n=n||"";for(s in _)T.event.remove(e,s+n)}else{for(n=n.split(" ");s=n[v++];)if(g=s,h=null,c=s.indexOf(".")<0,l=[],c||(l=s.split("."),s=l.shift(),d=new RegExp("(^|\\.)"+T.map(l.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=_[s])if(i){for(f=T.event.special[s]||{},u=r||0;u<p.length&&(h=p[u],i.guid!==h.guid||((c||d.test(h.namespace))&&(null==r&&p.splice(u--,1),f.remove&&f.remove.call(e,h)),null==r));u++);(0===p.length||null!=r&&1===p.length)&&(f.teardown&&f.teardown.call(e,l)!==!1||T.removeEvent(e,s,m.handle),o=null,delete _[s])}else for(u=0;u<p.length;u++)h=p[u],(c||d.test(h.namespace))&&(T.event.remove(e,g,h.handler,u),p.splice(u--,1));if(T.isEmptyObject(_)){var E=m.handle;E&&(E.elem=null),delete m.events,delete m.handle,T.isEmptyObject(m)&&T.removeData(e,t,!0)}}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,i,r,a){var o,s=n.type||n,u=[];if(s.indexOf("!")>=0&&(s=s.slice(0,-1),o=!0),s.indexOf(".")>=0&&(u=s.split("."),s=u.shift(),u.sort()),r&&!T.event.customEvent[s]||T.event.global[s]){if(n="object"==typeof n?n[T.expando]?n:new T.Event(s,n):new T.Event(s),n.type=s,n.exclusive=o,n.namespace=u.join("."),n.namespace_re=new RegExp("(^|\\.)"+u.join("\\.(?:.*\\.)?")+"(\\.|$)"),!a&&r||(n.preventDefault(),n.stopPropagation()),!r)return void T.each(T.cache,(function(){var e=T.expando,t=this[e];t&&t.events&&t.events[s]&&T.event.trigger(n,i,t.handle.elem)}));if(3!==r.nodeType&&8!==r.nodeType){n.result=t,n.target=r,i=null!=i?T.makeArray(i):[],i.unshift(n);var c=r,l=s.indexOf(":")<0?"on"+s:"";do{var d=T._data(c,"handle");n.currentTarget=c,d&&d.apply(c,i),l&&T.acceptData(c)&&c[l]&&c[l].apply(c,i)===!1&&(n.result=!1,n.preventDefault()),c=c.parentNode||c.ownerDocument||c===n.target.ownerDocument&&e}while(c&&!n.isPropagationStopped());if(!n.isDefaultPrevented()){var f,p=T.event.special[s]||{};if((!p._default||p._default.call(r.ownerDocument,n)===!1)&&("click"!==s||!T.nodeName(r,"a"))&&T.acceptData(r)){try{l&&r[s]&&(f=r[l],f&&(r[l]=null),T.event.triggered=s,r[s]())}catch(e){}f&&(r[l]=f),T.event.triggered=t}}return n.result}}},handle:function(n){n=T.event.fix(n||e.event);var i=((T._data(this,"events")||{})[n.type]||[]).slice(0),r=!n.exclusive&&!n.namespace,a=Array.prototype.slice.call(arguments,0);a[0]=n,n.currentTarget=this;for(var o=0,s=i.length;o<s;o++){var u=i[o];if(r||n.namespace_re.test(u.namespace)){n.handler=u.handler,n.data=u.data,n.handleObj=u;var c=u.handler.apply(this,a);if(c!==t&&(n.result=c,c===!1&&(n.preventDefault(),n.stopPropagation())),n.isImmediatePropagationStopped())break}}return n.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(e){if(e[T.expando])return e;var n=e;e=T.Event(n);for(var i,r=this.props.length;r;)i=this.props[--r],e[i]=n[i];if(e.target||(e.target=e.srcElement||y),3===e.target.nodeType&&(e.target=e.target.parentNode),!e.relatedTarget&&e.fromElement&&(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),null==e.pageX&&null!=e.clientX){
var a=e.target.ownerDocument||y,o=a.documentElement,s=a.body;e.pageX=e.clientX+(o&&o.scrollLeft||s&&s.scrollLeft||0)-(o&&o.clientLeft||s&&s.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||s&&s.scrollTop||0)-(o&&o.clientTop||s&&s.clientTop||0)}return null!=e.which||null==e.charCode&&null==e.keyCode||(e.which=null!=e.charCode?e.charCode:e.keyCode),!e.metaKey&&e.ctrlKey&&(e.metaKey=e.ctrlKey),e.which||e.button===t||(e.which=1&e.button?1:2&e.button?3:4&e.button?2:0),e},guid:1e8,proxy:T.proxy,special:{ready:{setup:T.bindReady,teardown:T.noop},live:{add:function(e){T.event.add(this,c(e.origType,e.selector),T.extend({},e,{handler:u,guid:e.handler.guid}))},remove:function(e){T.event.remove(this,c(e.origType,e.selector),e)}},beforeunload:{setup:function(e,t,n){T.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}}},T.removeEvent=y.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent&&e.detachEvent("on"+t,n)},T.Event=function(e,t){return this.preventDefault?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?o:a):this.type=e,t&&T.extend(this,t),this.timeStamp=T.now(),void(this[T.expando]=!0)):new T.Event(e,t)},T.Event.prototype={preventDefault:function(){this.isDefaultPrevented=o;var e=this.originalEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=o;var e=this.originalEvent;e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=o,this.stopPropagation()},isDefaultPrevented:a,isPropagationStopped:a,isImmediatePropagationStopped:a};var j=function(e){var t=e.relatedTarget,n=!1,i=e.type;e.type=e.data,t!==this&&(t&&(n=T.contains(this,t)),n||(T.event.handle.apply(this,arguments),e.type=i))},z=function(e){e.type=e.data,T.event.handle.apply(this,arguments)};if(T.each({mouseenter:"mouseover",mouseleave:"mouseout"},(function(e,t){T.event.special[e]={setup:function(n){T.event.add(this,t,n&&n.selector?z:j,e)},teardown:function(e){T.event.remove(this,t,e&&e.selector?z:j)}}})),T.support.submitBubbles||(T.event.special.submit={setup:function(e,t){return!T.nodeName(this,"form")&&(T.event.add(this,"click.specialSubmit",(function(e){var t=e.target,n=T.nodeName(t,"input")||T.nodeName(t,"button")?t.type:"";"submit"!==n&&"image"!==n||!T(t).closest("form").length||s("submit",this,arguments)})),void T.event.add(this,"keypress.specialSubmit",(function(e){var t=e.target,n=T.nodeName(t,"input")||T.nodeName(t,"button")?t.type:"";"text"!==n&&"password"!==n||!T(t).closest("form").length||13!==e.keyCode||s("submit",this,arguments)})))},teardown:function(e){T.event.remove(this,".specialSubmit")}}),!T.support.changeBubbles){var H,Y=function(e){var t=T.nodeName(e,"input")?e.type:"",n=e.value;return"radio"===t||"checkbox"===t?n=e.checked:"select-multiple"===t?n=e.selectedIndex>-1?T.map(e.options,(function(e){return e.selected})).join("-"):"":T.nodeName(e,"select")&&(n=e.selectedIndex),n},q=function(e){var n,i,r=e.target;V.test(r.nodeName)&&!r.readOnly&&(n=T._data(r,"_change_data"),i=Y(r),"focusout"===e.type&&"radio"===r.type||T._data(r,"_change_data",i),n!==t&&i!==n&&(null!=n||i)&&(e.type="change",e.liveFired=t,T.event.trigger(e,arguments[1],r)))};T.event.special.change={filters:{focusout:q,beforedeactivate:q,click:function(e){var t=e.target,n=T.nodeName(t,"input")?t.type:"";("radio"===n||"checkbox"===n||T.nodeName(t,"select"))&&q.call(this,e)},keydown:function(e){var t=e.target,n=T.nodeName(t,"input")?t.type:"";(13===e.keyCode&&!T.nodeName(t,"textarea")||32===e.keyCode&&("checkbox"===n||"radio"===n)||"select-multiple"===n)&&q.call(this,e)},beforeactivate:function(e){var t=e.target;T._data(t,"_change_data",Y(t))}},setup:function(e,t){if("file"===this.type)return!1;for(var n in H)T.event.add(this,n+".specialChange",H[n]);return V.test(this.nodeName)},teardown:function(e){return T.event.remove(this,".specialChange"),V.test(this.nodeName)}},H=T.event.special.change.filters,H.focus=H.beforeactivate}T.support.focusinBubbles||T.each({focus:"focusin",blur:"focusout"},(function(e,t){function n(e){var n=T.event.fix(e);n.type=t,n.originalEvent={},T.event.trigger(n,null,n.target),n.isDefaultPrevented()&&e.preventDefault()}var i=0;T.event.special[t]={setup:function(){0===i++&&y.addEventListener(e,n,!0)},teardown:function(){0===--i&&y.removeEventListener(e,n,!0)}}})),T.each(["bind","one"],(function(e,n){T.fn[n]=function(e,i,r){var a;if("object"==typeof e){for(var o in e)this[n](o,i,e[o],r);return this}if(2!==arguments.length&&i!==!1||(r=i,i=t),"one"===n?(a=function(e){return T(this).unbind(e,a),r.apply(this,arguments)},a.guid=r.guid||T.guid++):a=r,"unload"===e&&"one"!==n)this.one(e,i,r);else for(var s=0,u=this.length;s<u;s++)T.event.add(this[s],e,a,i);return this}})),T.fn.extend({unbind:function(e,t){if("object"!=typeof e||e.preventDefault)for(var n=0,i=this.length;n<i;n++)T.event.remove(this[n],e,t);else for(var r in e)this.unbind(r,e[r]);return this},delegate:function(e,t,n,i){return this.live(t,n,i,e)},undelegate:function(e,t,n){return 0===arguments.length?this.unbind("live"):this.die(t,null,n,e)},trigger:function(e,t){return this.each((function(){T.event.trigger(e,t,this)}))},triggerHandler:function(e,t){if(this[0])return T.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||T.guid++,i=0,r=function(n){var r=(T.data(this,"lastToggle"+e.guid)||0)%i;return T.data(this,"lastToggle"+e.guid,r+1),n.preventDefault(),t[r].apply(this,arguments)||!1};for(r.guid=n;i<t.length;)t[i++].guid=n;return this.click(r)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var K={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};T.each(["live","die"],(function(e,n){T.fn[n]=function(e,i,r,o){var s,u,l,d,f=0,p=o||this.selector,h=o?this:T(this.context);if("object"==typeof e&&!e.preventDefault){for(var g in e)h[n](g,i,e[g],p);return this}if("die"===n&&!e&&o&&"."===o.charAt(0))return h.unbind(o),this;for((i===!1||T.isFunction(i))&&(r=i||a,i=t),e=(e||"").split(" ");null!=(s=e[f++]);)if(u=F.exec(s),l="",u&&(l=u[0],s=s.replace(F,"")),"hover"!==s)if(d=s,K[s]?(e.push(K[s]+l),s+=l):s=(K[s]||s)+l,"live"===n)for(var v=0,m=h.length;v<m;v++)T.event.add(h[v],"live."+c(s,p),{data:i,selector:p,handler:r,origType:s,origHandler:r,preType:d});else h.unbind("live."+c(s,p),r);else e.push("mouseenter"+l,"mouseleave"+l);return this}})),T.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),(function(e,t){T.fn[t]=function(e,n){return null==n&&(n=e,e=null),arguments.length>0?this.bind(t,e,n):this.trigger(t)},T.attrFn&&(T.attrFn[t]=!0)})),/*!
	 * Sizzle CSS Selector Engine
	 *  Copyright 2011, The Dojo Foundation
	 *  Released under the MIT, BSD, and GPL Licenses.
	 *  More information: http://sizzlejs.com/
	 */
(function(){function e(e,t,n,i,r,a){for(var o=0,s=i.length;o<s;o++){var u=i[o];if(u){var c=!1;for(u=u[e];u;){if(u.sizcache===n){c=i[u.sizset];break}if(1!==u.nodeType||a||(u.sizcache=n,u.sizset=o),u.nodeName.toLowerCase()===t){c=u;break}u=u[e]}i[o]=c}}}function n(e,t,n,i,r,a){for(var o=0,s=i.length;o<s;o++){var u=i[o];if(u){var c=!1;for(u=u[e];u;){if(u.sizcache===n){c=i[u.sizset];break}if(1===u.nodeType)if(a||(u.sizcache=n,u.sizset=o),"string"!=typeof t){if(u===t){c=!0;break}}else if(l.filter(t,[u]).length>0){c=u;break}u=u[e]}i[o]=c}}}var i=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,r=0,a=Object.prototype.toString,o=!1,s=!0,u=/\\/g,c=/\W/;[0,0].sort((function(){return s=!1,0}));var l=function(e,t,n,r){n=n||[],t=t||y;var o=t;if(1!==t.nodeType&&9!==t.nodeType)return[];if(!e||"string"!=typeof e)return n;var s,u,c,p,h,v,m,E,I=!0,T=l.isXML(t),S=[],A=e;do if(i.exec(""),s=i.exec(A),s&&(A=s[3],S.push(s[1]),s[2])){p=s[3];break}while(s);if(S.length>1&&f.exec(e))if(2===S.length&&d.relative[S[0]])u=_(S[0]+S[1],t);else for(u=d.relative[S[0]]?[t]:l(S.shift(),t);S.length;)e=S.shift(),d.relative[e]&&(e+=S.shift()),u=_(e,u);else if(!r&&S.length>1&&9===t.nodeType&&!T&&d.match.ID.test(S[0])&&!d.match.ID.test(S[S.length-1])&&(h=l.find(S.shift(),t,T),t=h.expr?l.filter(h.expr,h.set)[0]:h.set[0]),t)for(h=r?{expr:S.pop(),set:g(r)}:l.find(S.pop(),1!==S.length||"~"!==S[0]&&"+"!==S[0]||!t.parentNode?t:t.parentNode,T),u=h.expr?l.filter(h.expr,h.set):h.set,S.length>0?c=g(u):I=!1;S.length;)v=S.pop(),m=v,d.relative[v]?m=S.pop():v="",null==m&&(m=t),d.relative[v](c,m,T);else c=S=[];if(c||(c=u),c||l.error(v||e),"[object Array]"===a.call(c))if(I)if(t&&1===t.nodeType)for(E=0;null!=c[E];E++)c[E]&&(c[E]===!0||1===c[E].nodeType&&l.contains(t,c[E]))&&n.push(u[E]);else for(E=0;null!=c[E];E++)c[E]&&1===c[E].nodeType&&n.push(u[E]);else n.push.apply(n,c);else g(c,n);return p&&(l(p,o,n,r),l.uniqueSort(n)),n};l.uniqueSort=function(e){if(v&&(o=s,e.sort(v),o))for(var t=1;t<e.length;t++)e[t]===e[t-1]&&e.splice(t--,1);return e},l.matches=function(e,t){return l(e,null,null,t)},l.matchesSelector=function(e,t){return l(t,null,null,[e]).length>0},l.find=function(e,t,n){var i;if(!e)return[];for(var r=0,a=d.order.length;r<a;r++){var o,s=d.order[r];if(o=d.leftMatch[s].exec(e)){var c=o[1];if(o.splice(1,1),"\\"!==c.substr(c.length-1)&&(o[1]=(o[1]||"").replace(u,""),i=d.find[s](o,t,n),null!=i)){e=e.replace(d.match[s],"");break}}}return i||(i="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName("*"):[]),{set:i,expr:e}},l.filter=function(e,n,i,r){for(var a,o,s=e,u=[],c=n,f=n&&n[0]&&l.isXML(n[0]);e&&n.length;){for(var p in d.filter)if(null!=(a=d.leftMatch[p].exec(e))&&a[2]){var h,g,v=d.filter[p],m=a[1];if(o=!1,a.splice(1,1),"\\"===m.substr(m.length-1))continue;if(c===u&&(u=[]),d.preFilter[p])if(a=d.preFilter[p](a,c,i,u,r,f)){if(a===!0)continue}else o=h=!0;if(a)for(var _=0;null!=(g=c[_]);_++)if(g){h=v(g,a,_,c);var E=r^!!h;i&&null!=h?E?o=!0:c[_]=!1:E&&(u.push(g),o=!0)}if(h!==t){if(i||(c=u),e=e.replace(d.match[p],""),!o)return[];break}}if(e===s){if(null!=o)break;l.error(e)}s=e}return c},l.error=function(e){throw"Syntax error, unrecognized expression: "+e};var d=l.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{class:"className",for:"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(e,t){var n="string"==typeof t,i=n&&!c.test(t),r=n&&!i;i&&(t=t.toLowerCase());for(var a,o=0,s=e.length;o<s;o++)if(a=e[o]){for(;(a=a.previousSibling)&&1!==a.nodeType;);e[o]=r||a&&a.nodeName.toLowerCase()===t?a||!1:a===t}r&&l.filter(t,e,!0)},">":function(e,t){var n,i="string"==typeof t,r=0,a=e.length;if(i&&!c.test(t)){for(t=t.toLowerCase();r<a;r++)if(n=e[r]){var o=n.parentNode;e[r]=o.nodeName.toLowerCase()===t&&o}}else{for(;r<a;r++)n=e[r],n&&(e[r]=i?n.parentNode:n.parentNode===t);i&&l.filter(t,e,!0)}},"":function(t,i,a){var o,s=r++,u=n;"string"!=typeof i||c.test(i)||(i=i.toLowerCase(),o=i,u=e),u("parentNode",i,s,t,o,a)},"~":function(t,i,a){var o,s=r++,u=n;"string"!=typeof i||c.test(i)||(i=i.toLowerCase(),o=i,u=e),u("previousSibling",i,s,t,o,a)}},find:{ID:function(e,t,n){if("undefined"!=typeof t.getElementById&&!n){var i=t.getElementById(e[1]);return i&&i.parentNode?[i]:[]}},NAME:function(e,t){if("undefined"!=typeof t.getElementsByName){for(var n=[],i=t.getElementsByName(e[1]),r=0,a=i.length;r<a;r++)i[r].getAttribute("name")===e[1]&&n.push(i[r]);return 0===n.length?null:n}},TAG:function(e,t){if("undefined"!=typeof t.getElementsByTagName)return t.getElementsByTagName(e[1])}},preFilter:{CLASS:function(e,t,n,i,r,a){if(e=" "+e[1].replace(u,"")+" ",a)return e;for(var o,s=0;null!=(o=t[s]);s++)o&&(r^(o.className&&(" "+o.className+" ").replace(/[\t\n\r]/g," ").indexOf(e)>=0)?n||i.push(o):n&&(t[s]=!1));return!1},ID:function(e){return e[1].replace(u,"")},TAG:function(e,t){return e[1].replace(u,"").toLowerCase()},CHILD:function(e){if("nth"===e[1]){e[2]||l.error(e[0]),e[2]=e[2].replace(/^\+|\s*/g,"");var t=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===e[2]&&"2n"||"odd"===e[2]&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=t[1]+(t[2]||1)-0,e[3]=t[3]-0}else e[2]&&l.error(e[0]);return e[0]=r++,e},ATTR:function(e,t,n,i,r,a){var o=e[1]=e[1].replace(u,"");return!a&&d.attrMap[o]&&(e[1]=d.attrMap[o]),e[4]=(e[4]||e[5]||"").replace(u,""),"~="===e[2]&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(e,t,n,r,a){if("not"===e[1]){if(!((i.exec(e[3])||"").length>1||/^\w/.test(e[3]))){var o=l.filter(e[3],t,n,!0^a);return n||r.push.apply(r,o),!1}e[3]=l(e[3],null,null,t)}else if(d.match.POS.test(e[0])||d.match.CHILD.test(e[0]))return!0;return e},POS:function(e){return e.unshift(!0),e}},filters:{enabled:function(e){return e.disabled===!1&&"hidden"!==e.type},disabled:function(e){return e.disabled===!0},checked:function(e){return e.checked===!0},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,t,n){return!!l(n[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){return"text"===e.getAttribute("type")},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||"button"===e.nodeName.toLowerCase()},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(e,t){return 0===t},last:function(e,t,n,i){return t===i.length-1},even:function(e,t){return t%2===0},odd:function(e,t){return t%2===1},lt:function(e,t,n){return t<n[3]-0},gt:function(e,t,n){return t>n[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,n,i){var r=t[1],a=d.filters[r];if(a)return a(e,n,t,i);if("contains"===r)return(e.textContent||e.innerText||l.getText([e])||"").indexOf(t[3])>=0;if("not"===r){for(var o=t[3],s=0,u=o.length;s<u;s++)if(o[s]===e)return!1;return!0}l.error(r)},CHILD:function(e,t){var n=t[1],i=e;switch(n){case"only":case"first":for(;i=i.previousSibling;)if(1===i.nodeType)return!1;if("first"===n)return!0;i=e;case"last":for(;i=i.nextSibling;)if(1===i.nodeType)return!1;return!0;case"nth":var r=t[2],a=t[3];if(1===r&&0===a)return!0;var o=t[0],s=e.parentNode;if(s&&(s.sizcache!==o||!e.nodeIndex)){var u=0;for(i=s.firstChild;i;i=i.nextSibling)1===i.nodeType&&(i.nodeIndex=++u);s.sizcache=o}var c=e.nodeIndex-a;return 0===r?0===c:c%r===0&&c/r>=0}},ID:function(e,t){return 1===e.nodeType&&e.getAttribute("id")===t},TAG:function(e,t){return"*"===t&&1===e.nodeType||e.nodeName.toLowerCase()===t},CLASS:function(e,t){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(e,t){var n=t[1],i=d.attrHandle[n]?d.attrHandle[n](e):null!=e[n]?e[n]:e.getAttribute(n),r=i+"",a=t[2],o=t[4];return null==i?"!="===a:"="===a?r===o:"*="===a?r.indexOf(o)>=0:"~="===a?(" "+r+" ").indexOf(o)>=0:o?"!="===a?r!==o:"^="===a?0===r.indexOf(o):"$="===a?r.substr(r.length-o.length)===o:"|="===a&&(r===o||r.substr(0,o.length+1)===o+"-"):r&&i!==!1},POS:function(e,t,n,i){var r=t[2],a=d.setFilters[r];if(a)return a(e,n,t,i)}}},f=d.match.POS,p=function(e,t){return"\\"+(t-0+1)};for(var h in d.match)d.match[h]=new RegExp(d.match[h].source+/(?![^\[]*\])(?![^\(]*\))/.source),d.leftMatch[h]=new RegExp(/(^(?:.|\r|\n)*?)/.source+d.match[h].source.replace(/\\(\d+)/g,p));var g=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};try{Array.prototype.slice.call(y.documentElement.childNodes,0)[0].nodeType}catch(e){g=function(e,t){var n=0,i=t||[];if("[object Array]"===a.call(e))Array.prototype.push.apply(i,e);else if("number"==typeof e.length)for(var r=e.length;n<r;n++)i.push(e[n]);else for(;e[n];n++)i.push(e[n]);return i}}var v,m;y.documentElement.compareDocumentPosition?v=function(e,t){return e===t?(o=!0,0):e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t)?-1:1:e.compareDocumentPosition?-1:1}:(v=function(e,t){var n,i,r=[],a=[],s=e.parentNode,u=t.parentNode,c=s;if(e===t)return o=!0,0;if(s===u)return m(e,t);if(!s)return-1;if(!u)return 1;for(;c;)r.unshift(c),c=c.parentNode;for(c=u;c;)a.unshift(c),c=c.parentNode;n=r.length,i=a.length;for(var l=0;l<n&&l<i;l++)if(r[l]!==a[l])return m(r[l],a[l]);return l===n?m(e,a[l],-1):m(r[l],t,1)},m=function(e,t,n){if(e===t)return n;for(var i=e.nextSibling;i;){if(i===t)return-1;i=i.nextSibling}return 1}),l.getText=function(e){for(var t,n="",i=0;e[i];i++)t=e[i],3===t.nodeType||4===t.nodeType?n+=t.nodeValue:8!==t.nodeType&&(n+=l.getText(t.childNodes));return n},(function(){var e=y.createElement("div"),n="script"+(new Date).getTime(),i=y.documentElement;e.innerHTML="<a name='"+n+"'/>",i.insertBefore(e,i.firstChild),y.getElementById(n)&&(d.find.ID=function(e,n,i){if("undefined"!=typeof n.getElementById&&!i){var r=n.getElementById(e[1]);return r?r.id===e[1]||"undefined"!=typeof r.getAttributeNode&&r.getAttributeNode("id").nodeValue===e[1]?[r]:t:[]}},d.filter.ID=function(e,t){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&n&&n.nodeValue===t}),i.removeChild(e),i=e=null})(),(function(){var e=y.createElement("div");e.appendChild(y.createComment("")),e.getElementsByTagName("*").length>0&&(d.find.TAG=function(e,t){var n=t.getElementsByTagName(e[1]);if("*"===e[1]){for(var i=[],r=0;n[r];r++)1===n[r].nodeType&&i.push(n[r]);n=i}return n}),e.innerHTML="<a href='#'></a>",e.firstChild&&"undefined"!=typeof e.firstChild.getAttribute&&"#"!==e.firstChild.getAttribute("href")&&(d.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null})(),y.querySelectorAll&&!(function(){var e=l,t=y.createElement("div"),n="__sizzle__";if(t.innerHTML="<p class='TEST'></p>",!t.querySelectorAll||0!==t.querySelectorAll(".TEST").length){l=function(t,i,r,a){if(i=i||y,!a&&!l.isXML(i)){var o=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(o&&(1===i.nodeType||9===i.nodeType)){if(o[1])return g(i.getElementsByTagName(t),r);if(o[2]&&d.find.CLASS&&i.getElementsByClassName)return g(i.getElementsByClassName(o[2]),r)}if(9===i.nodeType){if("body"===t&&i.body)return g([i.body],r);if(o&&o[3]){var s=i.getElementById(o[3]);if(!s||!s.parentNode)return g([],r);if(s.id===o[3])return g([s],r)}try{return g(i.querySelectorAll(t),r)}catch(e){}}else if(1===i.nodeType&&"object"!==i.nodeName.toLowerCase()){var u=i,c=i.getAttribute("id"),f=c||n,p=i.parentNode,h=/^\s*[+~]/.test(t);c?f=f.replace(/'/g,"\\$&"):i.setAttribute("id",f),h&&p&&(i=i.parentNode);try{if(!h||p)return g(i.querySelectorAll("[id='"+f+"'] "+t),r)}catch(e){}finally{c||u.removeAttribute("id")}}}return e(t,i,r,a)};for(var i in e)l[i]=e[i];t=null}})(),(function(){var e=y.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector,n=!1;try{t.call(y.documentElement,"[test!='']:sizzle")}catch(e){n=!0}t&&(l.matchesSelector=function(e,i){if(i=i.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!l.isXML(e))try{if(n||!d.match.PSEUDO.test(i)&&!/!=/.test(i))return t.call(e,i)}catch(e){}return l(i,null,null,[e]).length>0})})(),(function(){var e=y.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>",e.getElementsByClassName&&0!==e.getElementsByClassName("e").length&&(e.lastChild.className="e",1!==e.getElementsByClassName("e").length&&(d.order.splice(1,0,"CLASS"),d.find.CLASS=function(e,t,n){if("undefined"!=typeof t.getElementsByClassName&&!n)return t.getElementsByClassName(e[1])},e=null))})(),y.documentElement.contains?l.contains=function(e,t){return e!==t&&(!e.contains||e.contains(t))}:y.documentElement.compareDocumentPosition?l.contains=function(e,t){return!!(16&e.compareDocumentPosition(t))}:l.contains=function(){return!1},l.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return!!t&&"HTML"!==t.nodeName};var _=function(e,t){for(var n,i=[],r="",a=t.nodeType?[t]:t;n=d.match.PSEUDO.exec(e);)r+=n[0],e=e.replace(d.match.PSEUDO,"");e=d.relative[e]?e+"*":e;for(var o=0,s=a.length;o<s;o++)l(e,a[o],i);return l.filter(r,i)};T.find=l,T.expr=l.selectors,T.expr[":"]=T.expr.filters,T.unique=l.uniqueSort,T.text=l.getText,T.isXMLDoc=l.isXML,T.contains=l.contains})();var W=/Until$/,X=/^(?:parents|prevUntil|prevAll)/,$=/,/,Q=/^.[^:#\[\.,]*$/,J=Array.prototype.slice,Z=T.expr.match.POS,ee={children:!0,contents:!0,next:!0,prev:!0};T.fn.extend({find:function(e){var t,n,i=this;if("string"!=typeof e)return T(e).filter((function(){for(t=0,n=i.length;t<n;t++)if(T.contains(i[t],this))return!0}));var r,a,o,s=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++)if(r=s.length,T.find(e,this[t],s),t>0)for(a=r;a<s.length;a++)for(o=0;o<r;o++)if(s[o]===s[a]){s.splice(a--,1);break}return s},has:function(e){var t=T(e);return this.filter((function(){for(var e=0,n=t.length;e<n;e++)if(T.contains(this,t[e]))return!0}))},not:function(e){return this.pushStack(d(this,e,!1),"not",e)},filter:function(e){return this.pushStack(d(this,e,!0),"filter",e)},is:function(e){return!!e&&("string"==typeof e?T.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,i,r=[],a=this[0];if(T.isArray(e)){var o,s,u={},c=1;if(a&&e.length){for(n=0,i=e.length;n<i;n++)s=e[n],u[s]||(u[s]=Z.test(s)?T(s,t||this.context):s);for(;a&&a.ownerDocument&&a!==t;){for(s in u)o=u[s],(o.jquery?o.index(a)>-1:T(a).is(o))&&r.push({selector:s,elem:a,level:c});a=a.parentNode,c++}}return r}var l=Z.test(e)||"string"!=typeof e?T(e,t||this.context):0;for(n=0,i=this.length;n<i;n++)for(a=this[n];a;){if(l?l.index(a)>-1:T.find.matchesSelector(a,e)){r.push(a);break}if(a=a.parentNode,!a||!a.ownerDocument||a===t||11===a.nodeType)break}return r=r.length>1?T.unique(r):r,this.pushStack(r,"closest",e)},index:function(e){return e?"string"==typeof e?T.inArray(this[0],T(e)):T.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n="string"==typeof e?T(e,t):T.makeArray(e&&e.nodeType?[e]:e),i=T.merge(this.get(),n);return this.pushStack(l(n[0])||l(i[0])?i:T.unique(i))},andSelf:function(){return this.add(this.prevObject)}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T.dir(e,"parentNode")},parentsUntil:function(e,t,n){return T.dir(e,"parentNode",n)},next:function(e){return T.nth(e,2,"nextSibling")},prev:function(e){return T.nth(e,2,"previousSibling")},nextAll:function(e){return T.dir(e,"nextSibling")},prevAll:function(e){return T.dir(e,"previousSibling")},nextUntil:function(e,t,n){return T.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return T.dir(e,"previousSibling",n)},siblings:function(e){return T.sibling(e.parentNode.firstChild,e)},children:function(e){return T.sibling(e.firstChild)},contents:function(e){return T.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:T.makeArray(e.childNodes)}},(function(e,t){T.fn[e]=function(n,i){var r=T.map(this,t,n),a=J.call(arguments);return W.test(e)||(i=n),i&&"string"==typeof i&&(r=T.filter(i,r)),r=this.length>1&&!ee[e]?T.unique(r):r,(this.length>1||$.test(i))&&X.test(e)&&(r=r.reverse()),this.pushStack(r,e,a.join(","))}})),T.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?T.find.matchesSelector(t[0],e)?[t[0]]:[]:T.find.matches(e,t)},dir:function(e,n,i){for(var r=[],a=e[n];a&&9!==a.nodeType&&(i===t||1!==a.nodeType||!T(a).is(i));)1===a.nodeType&&r.push(a),a=a[n];return r},nth:function(e,t,n,i){t=t||1;for(var r=0;e&&(1!==e.nodeType||++r!==t);e=e[n]);return e},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var te=/ jQuery\d+="(?:\d+|null)"/g,ne=/^\s+/,ie=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,re=/<([\w:]+)/,ae=/<tbody/i,oe=/<|&#?\w+;/,se=/<(?:script|object|embed|option|style)/i,ue=/checked\s*(?:[^=]|=\s*.checked.)/i,ce=/\/(java|ecma)script/i,le=/^\s*<!(?:\[CDATA\[|\-\-)/,de={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};de.optgroup=de.option,de.tbody=de.tfoot=de.colgroup=de.caption=de.thead,de.th=de.td,T.support.htmlSerialize||(de._default=[1,"div<div>","</div>"]),T.fn.extend({text:function(e){return T.isFunction(e)?this.each((function(t){var n=T(this);n.text(e.call(this,t,n.text()))})):"object"!=typeof e&&e!==t?this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(e)):T.text(this)},wrapAll:function(e){if(T.isFunction(e))return this.each((function(t){T(this).wrapAll(e.call(this,t))}));if(this[0]){var t=T(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e})).append(this)}return this},wrapInner:function(e){return T.isFunction(e)?this.each((function(t){T(this).wrapInner(e.call(this,t))})):this.each((function(){var t=T(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){return this.each((function(){T(this).wrapAll(e)}))},unwrap:function(){return this.parent().each((function(){T.nodeName(this,"body")||T(this).replaceWith(this.childNodes)})).end()},append:function(){return this.domManip(arguments,!0,(function(e){1===this.nodeType&&this.appendChild(e)}))},prepend:function(){return this.domManip(arguments,!0,(function(e){1===this.nodeType&&this.insertBefore(e,this.firstChild)}))},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,(function(e){this.parentNode.insertBefore(e,this)}));if(arguments.length){var e=T(arguments[0]);return e.push.apply(e,this.toArray()),this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,(function(e){this.parentNode.insertBefore(e,this.nextSibling)}));if(arguments.length){var e=this.pushStack(this,"after",arguments);return e.push.apply(e,T(arguments[0]).toArray()),e}},remove:function(e,t){for(var n,i=0;null!=(n=this[i]);i++)e&&!T.filter(e,[n]).length||(t||1!==n.nodeType||(T.cleanData(n.getElementsByTagName("*")),T.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&T.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return T.clone(this,e,t)}))},html:function(e){if(e===t)return this[0]&&1===this[0].nodeType?this[0].innerHTML.replace(te,""):null;if("string"!=typeof e||se.test(e)||!T.support.leadingWhitespace&&ne.test(e)||de[(re.exec(e)||["",""])[1].toLowerCase()])T.isFunction(e)?this.each((function(t){var n=T(this);n.html(e.call(this,t,n.html()))})):this.empty().append(e);else{e=e.replace(ie,"<$1></$2>");try{for(var n=0,i=this.length;n<i;n++)1===this[n].nodeType&&(T.cleanData(this[n].getElementsByTagName("*")),this[n].innerHTML=e)}catch(t){this.empty().append(e)}}return this},replaceWith:function(e){return this[0]&&this[0].parentNode?T.isFunction(e)?this.each((function(t){var n=T(this),i=n.html();n.replaceWith(e.call(this,t,i))})):("string"!=typeof e&&(e=T(e).detach()),this.each((function(){var t=this.nextSibling,n=this.parentNode;T(this).remove(),t?T(t).before(e):T(n).append(e)}))):this.length?this.pushStack(T(T.isFunction(e)?e():e),"replaceWith",e):this},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,i){var r,a,o,s,u=e[0],c=[];if(!T.support.checkClone&&3===arguments.length&&"string"==typeof u&&ue.test(u))return this.each((function(){T(this).domManip(e,n,i,!0)}));if(T.isFunction(u))return this.each((function(r){var a=T(this);e[0]=u.call(this,r,n?a.html():t),a.domManip(e,n,i)}));if(this[0]){if(s=u&&u.parentNode,r=T.support.parentNode&&s&&11===s.nodeType&&s.childNodes.length===this.length?{fragment:s}:T.buildFragment(e,this,c),o=r.fragment,a=1===o.childNodes.length?o=o.firstChild:o.firstChild){n=n&&T.nodeName(a,"tr");for(var l=0,d=this.length,p=d-1;l<d;l++)i.call(n?f(this[l],a):this[l],r.cacheable||d>1&&l<p?T.clone(o,!0,!0):o)}c.length&&T.each(c,_)}return this}}),T.buildFragment=function(e,t,n){var i,r,a,o;return t&&t[0]&&(o=t[0].ownerDocument||t[0]),o.createDocumentFragment||(o=y),1===e.length&&"string"==typeof e[0]&&e[0].length<512&&o===y&&"<"===e[0].charAt(0)&&!se.test(e[0])&&(T.support.checkClone||!ue.test(e[0]))&&(r=!0,a=T.fragments[e[0]],a&&1!==a&&(i=a)),i||(i=o.createDocumentFragment(),T.clean(e,o,i,n)),r&&(T.fragments[e[0]]=a?i:1),{fragment:i,cacheable:r}},T.fragments={},T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){T.fn[e]=function(n){var i=[],r=T(n),a=1===this.length&&this[0].parentNode;if(a&&11===a.nodeType&&1===a.childNodes.length&&1===r.length)return r[t](this[0]),this;for(var o=0,s=r.length;o<s;o++){var u=(o>0?this.clone(!0):this).get();T(r[o])[t](u),i=i.concat(u)}return this.pushStack(i,e,r.selector)}})),T.extend({clone:function(e,t,n){var i,r,a,o=e.cloneNode(!0);if(!(T.support.noCloneEvent&&T.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(h(e,o),i=g(e),r=g(o),a=0;i[a];++a)r[a]&&h(i[a],r[a]);if(t&&(p(e,o),n))for(i=g(e),r=g(o),a=0;i[a];++a)p(i[a],r[a]);return i=r=null,o},clean:function(e,t,n,i){var r;t=t||y,"undefined"==typeof t.createElement&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||y);for(var a,o,s=[],u=0;null!=(o=e[u]);u++)if("number"==typeof o&&(o+=""),o){if("string"==typeof o)if(oe.test(o)){o=o.replace(ie,"<$1></$2>");var c=(re.exec(o)||["",""])[1].toLowerCase(),l=de[c]||de._default,d=l[0],f=t.createElement("div");for(f.innerHTML=l[1]+o+l[2];d--;)f=f.lastChild;if(!T.support.tbody){var p=ae.test(o),h="table"!==c||p?"<table>"!==l[1]||p?[]:f.childNodes:f.firstChild&&f.firstChild.childNodes;for(a=h.length-1;a>=0;--a)T.nodeName(h[a],"tbody")&&!h[a].childNodes.length&&h[a].parentNode.removeChild(h[a])}!T.support.leadingWhitespace&&ne.test(o)&&f.insertBefore(t.createTextNode(ne.exec(o)[0]),f.firstChild),o=f.childNodes}else o=t.createTextNode(o);var g;if(!T.support.appendChecked)if(o[0]&&"number"==typeof(g=o.length))for(a=0;a<g;a++)m(o[a]);else m(o);o.nodeType?s.push(o):s=T.merge(s,o)}if(n)for(r=function(e){return!e.type||ce.test(e.type)},u=0;s[u];u++)if(!i||!T.nodeName(s[u],"script")||s[u].type&&"text/javascript"!==s[u].type.toLowerCase()){if(1===s[u].nodeType){var v=T.grep(s[u].getElementsByTagName("script"),r);s.splice.apply(s,[u+1,0].concat(v))}n.appendChild(s[u])}else i.push(s[u].parentNode?s[u].parentNode.removeChild(s[u]):s[u]);return s},cleanData:function(e){for(var t,n,i,r=T.cache,a=T.expando,o=T.event.special,s=T.support.deleteExpando,u=0;null!=(i=e[u]);u++)if((!i.nodeName||!T.noData[i.nodeName.toLowerCase()])&&(n=i[T.expando])){if(t=r[n]&&r[n][a],t&&t.events){for(var c in t.events)o[c]?T.event.remove(i,c):T.removeEvent(i,c,t.handle);t.handle&&(t.handle.elem=null)}s?delete i[T.expando]:i.removeAttribute&&i.removeAttribute(T.expando),delete r[n]}}});var fe,pe,he,ge=/alpha\([^)]*\)/i,ve=/opacity=([^)]*)/,me=/([A-Z]|^ms)/g,_e=/^-?\d+(?:px)?$/i,Ee=/^-?\d/,ye=/^([\-+])=([\-+.\de]+)/,Ie={position:"absolute",visibility:"hidden",display:"block"},Te=["Left","Right"],Se=["Top","Bottom"];return T.fn.css=function(e,n){return 2===arguments.length&&n===t?this:T.access(this,e,n,!0,(function(e,n,i){return i!==t?T.style(e,n,i):T.css(e,n)}))},T.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=fe(e,"opacity","opacity");return""===n?"1":n}return e.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:T.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,i,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var a,o,s=T.camelCase(n),u=e.style,c=T.cssHooks[s];if(n=T.cssProps[s]||s,i===t)return c&&"get"in c&&(a=c.get(e,!1,r))!==t?a:u[n];if(o=typeof i,"string"===o&&(a=ye.exec(i))&&(i=+(a[1]+1)*+a[2]+parseFloat(T.css(e,n)),o="number"),!(null==i||"number"===o&&isNaN(i)||("number"!==o||T.cssNumber[s]||(i+="px"),c&&"set"in c&&(i=c.set(e,i))===t)))try{u[n]=i}catch(e){}}},css:function(e,n,i){var r,a;return n=T.camelCase(n),a=T.cssHooks[n],n=T.cssProps[n]||n,"cssFloat"===n&&(n="float"),a&&"get"in a&&(r=a.get(e,!0,i))!==t?r:fe?fe(e,n):void 0},swap:function(e,t,n){var i={};for(var r in t)i[r]=e.style[r],e.style[r]=t[r];n.call(e);for(r in t)e.style[r]=i[r]}}),T.curCSS=T.css,T.each(["height","width"],(function(e,t){T.cssHooks[t]={get:function(e,n,i){var r;if(n)return 0!==e.offsetWidth?E(e,t,i):(T.swap(e,Ie,(function(){r=E(e,t,i)})),r)},set:function(e,t){return _e.test(t)?(t=parseFloat(t),t>=0?t+"px":void 0):t}}})),T.support.opacity||(T.cssHooks.opacity={get:function(e,t){return ve.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,r=T.isNaN(t)?"":"alpha(opacity="+100*t+")",a=i&&i.filter||n.filter||"";n.zoom=1,t>=1&&""===T.trim(a.replace(ge,""))&&(n.removeAttribute("filter"),i&&!i.filter)||(n.filter=ge.test(a)?a.replace(ge,r):a+" "+r)}}),T((function(){T.support.reliableMarginRight||(T.cssHooks.marginRight={get:function(e,t){var n;return T.swap(e,{display:"inline-block"},(function(){n=t?fe(e,"margin-right","marginRight"):e.style.marginRight})),n}})})),y.defaultView&&y.defaultView.getComputedStyle&&(pe=function(e,n){var i,r,a;return n=n.replace(me,"-$1").toLowerCase(),(r=e.ownerDocument.defaultView)?((a=r.getComputedStyle(e,null))&&(i=a.getPropertyValue(n),""!==i||T.contains(e.ownerDocument.documentElement,e)||(i=T.style(e,n))),i):t}),y.documentElement.currentStyle&&(he=function(e,t){var n,i=e.currentStyle&&e.currentStyle[t],r=e.runtimeStyle&&e.runtimeStyle[t],a=e.style;return!_e.test(i)&&Ee.test(i)&&(n=a.left,r&&(e.runtimeStyle.left=e.currentStyle.left),a.left="fontSize"===t?"1em":i||0,i=a.pixelLeft+"px",a.left=n,r&&(e.runtimeStyle.left=r)),""===i?"auto":i}),fe=pe||he,T.expr&&T.expr.filters&&(T.expr.filters.hidden=function(e){var t=e.offsetWidth,n=e.offsetHeight;return 0===t&&0===n||!T.support.reliableHiddenOffsets&&"none"===(e.style.display||T.css(e,"display"))},T.expr.filters.visible=function(e){return!T.expr.filters.hidden(e)}),T})(window);n.noConflict(!0),e.exports=n}),(function(e,t,n){var i=n(73);t.on=function(e){return e.publicOnly=!0,i.on(e)},t.off=i.off,t.emit=function(e){i.emit(e)}}),(function(e,t,n){function i(e){var t,n={};if(e)if(r(e))t=Number(e);else{if("object"!=typeof e)throw new Error("tracker","Revenue argument",e,"not a number.");if(n=a.extend({},e),"revenue"in n){if(!r(n.revenue))throw new Error("tracker","Revenue value",n.revenue,"not a number.");t=Number(n.revenue),delete n.revenue}}return a.isUndefined(t)||(n.revenue=t),n}function r(e){return a.isNumber(e)||a.isString(e)&&Number(e)==e}var a=n(8),o=n(131);t.activateGeoDelayedExperiments=function(e,t){t||(t=e.lists?"odds":"cdn3"),o.dataFromSource({data:e,source:t})},t.activateSiteCatalyst=function(e){e&&e.sVariable&&o.integrationSettings({id:"adobe_analytics",settings:{sVariableReference:e.sVariable}})},t.bucketUser=t.bucketVisitor=function(e,t){if(e&&t){var n={experimentId:String(e)};t>256?n.variationId=String(t):n.variationIndex=String(t),o.bucketVisitor(n)}},t.disable=function(e){o.disable({scope:e})},t.log=function(e){a.isUndefined(e)&&(e=!0),o.log({level:e?"INFO":"OFF"})},t.optOut=function(e){a.isUndefined(e)&&(e=!0),o.optOut({isOptOut:e})},t.setCookieDomain=function(e){o.cookieDomain({cookieDomain:e})},t.setCookieExpiration=function(e){o.cookieExpiration({cookieExpirationDays:e})},t.setDimensionValue=function(e,t){var n={};n[e]=t,o.user({attributes:n})},t.setUserId=function(e){o.user({userId:e})},t.storeThirdPartyData=function(e,t){o.dataFromSource({source:e,data:t})},t.trackEvent=function(e,t){o.event({eventName:e,tags:i(t)})}}),(function(e,t,n){var i=n(8),r=n(17),a=n(12),o=n(118),s=n(119),u=n(108),c=n(92),l=n(71),d=n(73),f=n(5),p=n(11),h=n(102),g=n(103),v=n(82),m=n(79),_=n(114),E=n(18),y=n(14),I=n(19),T=I.get("stores/dimension_data"),S=I.get("stores/view_data"),A=I.get("stores/visitor_id"),b=I.get("stores/layer_data"),w=I.get("stores/directive"),D=86400,R=90;t.event=function(e){g.updateAllViewTags();var t=function(){var t=u.trackCustomEvent(e.eventName,e.tags);t?p.log("API / Tracking custom event:",e.eventName,e.tags):p.log("API / Not tracking custom event:",e.eventName)};A.getBucketingId()?t():f.dispatch(r.ADD_CLEANUP_FN,{lifecycle:a.Lifecycle.postActivate,cleanupFn:t})},t.page=function(e){var t=S.getByApiName(e.pageName);if(!t)throw new Error('Unknown page "'+e.pageName+'"');var n=!e.hasOwnProperty("isActive")||e.isActive,i=function(){n?g.activate(t,e.tags):(g.deactivate(t),p.log("API / Deactivated Page",g.description(t)))};A.getBucketingId()?i():f.dispatch(r.ADD_CLEANUP_FN,{lifecycle:a.Lifecycle.postViewsActivated,cleanupFn:i})},t.tags=function(e){g.setGlobalTags(e.tags)},t.user=function(e){i.each(e,(function(e,t){"userId"===t?(p.log("API / Setting visitor UUID to",e),v.persistVisitorId({UUID:e})):"attributes"===t&&(p.log("API / Setting visitor attributes:",e),i.each(e,(function(e,t){var n,i=t,o="custom",s=T.getById(t)||T.getByApiName(t);s&&(i=s.id,n=s.segmentId||s.id);var u=function(){f.dispatch(r.SET_VISITOR_ATTRIBUTES,{attributes:[{key:i,value:{id:n,value:e},type:o,metadata:{lastModified:y.now()}}]})};A.getBucketingId()?u():f.dispatch(r.ADD_CLEANUP_FN,{lifecycle:a.Lifecycle.postVisitorProfileLoad,cleanupFn:u})})))}))},t.optOut=function(e){var t=!e.hasOwnProperty("isOptOut")||e.isOptOut;l.setOptOut(t)},t.cookieExpiration=function(e){var t=e.cookieExpirationDays;t<R&&(p.error('Argument "cookieExpirationDays"=',t,"less than minimum days:",R,", setting to minimum."),t=R),p.log("API / Setting cookie age to",t,"days."),f.dispatch(r.SET_COOKIE_AGE,t*D)},t.cookieDomain=function(e){p.log("API / Setting cookie domain to",e.cookieDomain),f.dispatch(r.SET_COOKIE_DOMAIN,e.cookieDomain)},t.disable=function(e){if(e.scope){if("tracking"!==e.scope)throw new Error('Unknown "scope" for disable: '+e.scope);p.log("API / Disabling tracking"),f.dispatch(r.LOAD_DIRECTIVE,{trackingDisabled:!0})}else p.log("API / Disabling everything"),
f.dispatch(r.LOAD_DIRECTIVE,{disabled:!0})},t.log=function(e){var t=e.level,n=e.match;i.isUndefined(t)&&(t="INFO"),i.isUndefined(n)&&(n=""),p.setLogMatcher(n),p.setLogLevel(t)},t.registerModule=function(e){var t="custom/"+e.moduleName;if(s[t]||o.get(t))throw new Error('Module name "'+t+'" is reserved. Will not be registered as plugin.');h.registerApiModule(t,e.module)},t.dataFromSource=function(e){var t=e.source;c.makeAsyncRequest(t),c.resolveRequest(t,e.data)},t.addListener=function(e){if(!i.isFunction(e.handler))throw new Error("A handler function must be supplied");e=i.omit(e,"type"),e.publicOnly=!0,e.emitErrors=!0,d.on(e)},t.removeListener=function(e){if(!e.token)throw new Error("Must supply a token to removeListener");d.off(e.token)},t.load=function(e){f.dispatch(r.DATA_LOADED,{data:e.data})},t.integrationSettings=function(e){if(!e.id)throw new Error("id is required");if(!e.settings)throw new Error("settings is required");f.dispatch(r.SET_INTEGRATION_SETTINGS,i.extend({},e.settings,{id:e.id}))},t.bucketVisitor=function(e){if(!e.variationId&&i.isUndefined(e.variationIndex)||e.variationId&&e.variationIndex)throw new Error("One of a variationId or a variationIndex is required.");if(!e.experimentId)throw new Error("An experimentId is required.");var t,n,r=e.campaignId;if(r){if(t=b.get(r),!t)throw new Error("Could not find layer "+r)}else if(t=b.getLayerByExperimentId(e.experimentId),r=t.id,!r)throw new Error("Could not find layer for experiment "+e.experimentId);if(n=i.find(t.experiments,{id:e.experimentId}),!n)throw new Error("Could not find experiment "+e.experimentId+" in layer "+r);var a=e.variationId;if(i.isUndefined(e.variationIndex)){if(!i.find(n.variations,{id:a}))throw new Error("Cound not find variation "+a+" in experiment "+e.experimentId)}else if(a=n.variations[e.variationIndex].id,!a)throw new Error("Could not find variation at index "+e.variationIndex+" in experiment "+e.experimentId);v.updateVariationIdMap(r,e.experimentId,a),A.getBucketingId()&&v.persistVariationId()},t.waitForOriginSync=function(e){if(!i.isArray(e.canonicalOrigins))throw new Error("canonicalOrigins must be an array. Got: "+E.stringify(e.canonicalOrigins));i.each(e.canonicalOrigins,(function(e){if(!i.isString(e))throw new Error("Each item in canonicalOrigins must be a string. Found type "+typeof e)})),_.loadCanonicalOrigins(e.canonicalOrigins)},t.activate=function(){w.shouldActivate()?m.emitActivateEvent():p.debug("Not activating.")}}),(function(e,t){}),(function(e,t,n){var i=n(8),r=n(109),a=n(14),o=n(64),s=n(11),u=n(19),c=u.get("stores/global"),l="https://errors.client.optimizely.com";t.handleError=function(e,t){var n=e.name||"Error",u=e.message,d=e.stack||null,f={timestamp:a.now(),clientEngine:r.ENGINE,clientVersion:r.VERSION,accountId:c.getAccountId(),projectId:c.getProjectId(),errorClass:n,message:u,stacktrace:d};t&&(f.metadata=i.reduce(t,(function(e,t,n){return i.isObject(t)||e.push({key:n,value:String(t)}),e}),[])),s.error("Logging error",f),o.request({url:l+"/log",method:"POST",data:f,contentType:"application/json"}).then((function(e){s.log("Error Monitor / Logged error with response: ",e)}),(function(e){s.error("Failed to log error, response was: ",e)}))}}),(function(e,t,n){function i(){var e=m.getCurrentScript();if(e)return e.src}function r(){var e={project:I.getSnippetId()||I.getProjectId(),revision:I.getRevision(),clientVersion:"0.55.0",hasSlave:!1,wxhr:!0},t=T.getBucketingId();t&&(e.user=t);try{e.numBehaviorEvents=p.getEvents().length}catch(e){g.debug("Unable to get behavior events for RUM:",e)}c.extend(e,o(),a()),h.dispatch(E.SET_RUM_DATA,{data:e})}function a(){var e=A.getMarks();return c.reduce(e,(function(e,t,n){return t.length>=1&&c.includes(_.RUMPerformanceTimingAttributes,n)&&(e[n]=Math.round(t[0].end-t[0].start)),e}),{})}function o(){var e=v.getGlobal("performance");if(e){var t,n=S.getScriptSrc();try{if(n){g.debug("Using derived script src: ",n);var i=e.getEntriesByName(n);i.length>0&&(t=i[0])}if(!t){var r=/\/\/[^.]+\.optimizely\.(com|test)\/(js|api\/client)\/[\d]+\.js/gi;g.debug("Scanning resource timing entries with regex");var a=e.getEntriesByType("resource");t=c.find(a,(function(e){return r.test(e.name)}))}if(t)return c.mapValues(_.ResourceTimingAttributes,(function(e,n){return Math.round(t[n]||0)}))}catch(e){return}}}function s(){try{return!m.querySelector("body")}catch(e){return null}}function u(){try{v.getGlobal("requestAnimationFrame")((function(){var e=S.getRumData().timebase;h.dispatch(E.SET_RUM_DATA,{data:{render:d.now()-(e||0)}})}))}catch(e){return}}var c=n(8),l=n(65).Promise,d=n(14),f=n(64),p=n(85),h=n(5),g=n(11),v=n(16),m=n(70),_=n(12),E=n(17),y=n(19),I=y.get("stores/global"),T=y.get("stores/visitor_id"),S=y.get("stores/rum"),A=y.get("stores/performance"),b="https://rum.optimizely.com/rum",w=.003;t.initialize=function(){if(h.dispatch(E.SET_RUM_DATA,{RumHost:b,inRumSample:Math.random()<w,src:i()}),S.getSampleRum()){var e={sync:s(),timebase:d.now(),sampleRate:w};h.dispatch(E.SET_RUM_DATA,{data:e}),u()}},t.send=function(){var e=S.getSampleRum();if(e){r();var t=S.getRumData();if(t=c.pickBy(t,(function(e){return 0!==e&&!c.isUndefined(e)})),!c.isEmpty(t)){var i=n(15).queryStringFromMap(t);return f.request({url:b+"?"+i}).catch((function(e){g.error("Failed to collect rum data :",e)}))}}return l.resolve()}}),(function(e,t,n){function i(e){var t=!1;if(a.isArray(window.optimizely)&&a.each(window.optimizely,(function(n){a.isArray(n)&&"verifyPreviewProject"===n[0]&&String(n[1])===e&&(t=!0)})),!t)throw new Error("Preview projectId: "+e+" does not match expected")}function r(){u.on({filter:{type:o.TYPES.ANALYTICS,name:"trackEvent"},handler:f}),u.on({filter:{type:o.TYPES.LIFECYCLE,name:"viewActivated"},handler:f}),u.on({filter:{type:o.TYPES.LIFECYCLE,name:"layerDecided"},handler:f}),u.on({filter:{type:"error"},publicOnly:!0,handler:f})}var a=n(8),o=n(80),s=n(16),u=n(73),c=n(19),l=c.get("stores/directive"),d="optimizelyPreview",f=function(e){var t=s.getGlobal(d);t.push(e)};t.initialize=function(e){l.isSlave()&&i(e),r()},t.setupPreviewGlobal=function(){s.getGlobal(d)||s.setGlobal(d,[])},t.pushToPreviewGlobal=function(e){f(e)}}),(function(e,t,n){e.exports=function(e){e.registerVisitorProfileProvider(n(137))}}),(function(e,t){e.exports={provides:"visitorId",getter:["stores/visitor_id",function(e){return e.getRandomId()}]}}),(function(e,t,n){e.exports=function(e){e.registerVisitorProfileProvider(n(139)),e.registerAudienceMatcher("behavior",n(141))}}),(function(e,t,n){var i=n(140);e.exports={provides:"events",isTransient:!0,getter:["stores/visitor_events",function(e){return i.getEvents(e)}]}}),(function(e,t,n){var i=n(8),r=n(86);t.getEvents=function(e){var t=r.getEvents(),n=[].concat.apply([],i.values(e.getForeignEvents())),a=[].concat.apply([],i.values(e.getForeignEventQueues()));return r.mergeAllEvents([t,n,a])}}),(function(e,t,n){var i=n(8),r=n(142),a=n(143),o=n(18);e.exports={fieldsNeeded:["events"],match:function(e,t){var n=[],s=o.parse(t.value);return n=i.isUndefined(s.version)?[s]:r.buildFromSpecV0_1(s),i.every(n,(function(t){return a.isSatisfied(t,e.events)}))}}}),(function(e,t,n){function i(e){return e=(e||"").toString().trim(),p[e]||e}function r(e,t,n){var i={where:t};if(e.count&&(i.limit=e.count),e.modifier===s.FREQUENCY_FILTERS.MOST_FREQUENT){var r=s.getFieldKeyPathForSource(e.name,n),a=s.aggregate("count"),o=s.aggregateField("count"),c=s.groupField(r);return d.extend(i,{select:[{field:c}],groupBy:s.groupBy([r]),aggregate:[a],orderBy:[{field:o,direction:"DESC"}]})}return d.extend(i,{orderBy:[{field:[u.FIELDS.TIME],direction:"DESC"}]})}function a(e){var t=[];if(d.isUndefined(e))throw new Error("rule is undefined");if(!d.isObject(e))throw new Error("rule is not an Object");"0.2"!==e.version&&t.push('version: not "0.2"'),e.filter&&(d.isArray(e.filter)?d.each(e.filter,(function(e,n){var i=s.validateFieldKeyPathV0_2(e.field,s.FieldPurpose.FILTER);i&&t.push("filter["+n+"]: "+i);var r=s.validateComparatorAndValue(e.comparator,e.value);r&&t.push("filter["+n+"]: "+r)})):t.push("filter: not an array"));var n=[],i=[];if(e.sort&&(e.reduce&&e.reduce.aggregator&&"nth"!==e.reduce.aggregator&&t.push("sort: superfluous because we can apply aggregator "+f.stringify(e.reduce.aggregator)+" to unsorted items"),d.isArray(e.sort)?d.each(e.sort,(function(e,r){var a=s.validateFieldKeyPathV0_2(e.field,s.FieldPurpose.SORT);a&&t.push("sort["+r+"]: "+a),e.field&&"frequency"===e.field[0]?n.push(e):i.push(e);var u=o(e.direction);u&&t.push("sort["+r+"]: "+u)})):t.push("sort: not an array"),n.length&&i.length&&t.push('sort: sorting by non-["frequency"] field is pointless because we are going to sort the picked values by ["frequency"]'),n.length&&!e.pick&&t.push('sort: sorting by ["frequency"] is impossible because no values have been picked')),e.pick){e.reduce&&"count"===e.reduce.aggregator&&t.push('pick: superfluous because we can apply aggregator "count" to raw events');var r=s.validateFieldKeyPathV0_2(e.pick.field);r&&t.push("pick: "+r)}if(e.reduce){var a=e.reduce.aggregator,u="aggregator "+(f.stringify(a)||String(a)),c=e.reduce.n,l="index "+(f.stringify(c)||String(c));d.includes(["sum","avg","max","min","count","nth"],a)||t.push("reduce: "+u+" is unknown"),d.includes(["sum","avg","max","min"],a)&&(e.pick||t.push("reduce: "+u+" is impossible to use because no values have been picked")),"nth"===a?((!d.isNumber(c)||isNaN(c)||parseInt(c,10)!==c||c<0)&&t.push("reduce: "+l+" is not a non-negative integer (mandated by "+u+")"),e.sort||t.push('reduce: aggregator "nth" is meaningless without a specific sort order')):d.isUndefined(c)||t.push("reduce: "+l+" is defined (not mandated by "+u+")")}if(t.length)throw new Error(t.join("\n"))}function o(e){var t="direction "+(f.stringify(e)||String(e));if(!d.includes(["ascending","descending"],e))return t+' is not "ascending" or "descending"'}var s=t,u={FIELDS:n(56).FIELDS,FIELDS_V0_2:n(56).FIELDS_V0_2},c=n(143),l=n(11),d=n(8),f=n(18);s.MILLIS_IN_A_DAY=864e5,s.aggregateField=function(e,t){return d.isString(t)&&(t=[t]),t=t||c.DEFAULT_FIELD,[c.generateAlias(e,t)]},s.groupField=function(e){return d.isString(e)&&(e=[e]),e=e||c.DEFAULT_FIELD,[e.join(".")]};var p={"<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","==":"eq"};s.fieldComparison=function(e,t,n){return e=i(e),d.isString(t)&&(t=[t]),"exists"===e?{op:e,args:[{field:t}]}:{op:e,args:[{field:t},{value:n}]}},s.relativeTimeComparison=function(e,t){return{op:i(e),args:[{op:"-",args:[{eval:"now"},{field:[u.FIELDS.TIME]}]},{value:t*s.MILLIS_IN_A_DAY}]}},s.rangeTimeComparison=function(e){return d.isArray(e)?{op:"between",args:[{field:[u.FIELDS.TIME]},{value:e[0]||+new Date(0)},{value:e[1]||+new Date}]}:(l.error("Rule builder","rangeTimeComparison passed invalid range",e),null)},s.groupBy=function(e){for(var t=[],n=0;n<e.length;n++)t[n]={field:e[n]};return t},s.aggregate=function(e,t){return d.isString(t)&&(t=[t]),t=t||c.DEFAULT_FIELD,{op:e,args:[{field:t}]}},s.SOURCE_TYPES={BEHAVIOR:"events",DEFAULT_BEHAVIOR:"default_behavior",CUSTOM_BEHAVIOR:"custom_behavior",DCP:"dcp"},s.FREQUENCY_FILTERS={MOST_FREQUENT:"most_frequent",LEAST_FREQUENT:"least_frequent"},s.RECENCY_FILTERS={MOST_RECENT:"most_recent",LEAST_RECENT:"least_recent"},s.getFieldKeyPathForSource=function(e,t){t=t||s.SOURCE_TYPES.BEHAVIOR;var n=[];return d.isString(e)?(n=[e],t!==s.SOURCE_TYPES.BEHAVIOR||d.includes(d.values(u.FIELDS),e)||(n=[u.FIELDS.OPTIONS,e])):n=e,n},s.buildFromSpecV0_1=function(e){if(!(e.action||e.filters&&0!==e.filters.length))throw new Error('Audience spec must have an "action" field or at least one "filter" '+f.stringify(e));var t=s.fieldComparison("gt",u.FIELDS.TIME,0),n=[],i=[];if(e.action&&(i.push(s.fieldComparison("eq",u.FIELDS.NAME,e.action.value)),e.action.type&&i.push(s.fieldComparison("eq",u.FIELDS.TYPE,e.action.type))),e.time)if("last_days"===e.time.type)i.push(s.relativeTimeComparison("lte",e.time.days));else if("range"===e.time.type){var a=s.rangeTimeComparison([e.time.start,e.time.stop]);a&&i.push(a)}else l.error("Rule builder",'Audience spec has bad "time" type',e.time.type);if(t={op:"and",args:i},e.count&&n.push({where:s.fieldComparison(e.count.comparator,"0",e.count.value),from:{select:[{field:s.aggregateField("count")}],where:t,aggregate:[s.aggregate("count")]}}),e.filters&&d.each(e.filters,(function(r){var a,o,c=s.getFieldKeyPathForSource(r.name,e.source);if(r.modifier===s.FREQUENCY_FILTERS.MOST_FREQUENT?(a=s.aggregate("count"),o=s.aggregateField("count")):r.modifier===s.RECENCY_FILTERS.MOST_RECENT&&(a=s.aggregate("max",u.FIELDS.TIME),o=s.aggregateField("max",u.FIELDS.TIME)),a){var l=c,d=s.groupField(l);n.push({where:s.fieldComparison(r.comparator,"0",r.value),from:{select:[{field:d}],where:t,groupBy:s.groupBy([l]),aggregate:[a],orderBy:[{field:o,direction:"DESC"}],limit:1}})}else i.push(s.fieldComparison(r.comparator,c,r.value))})),e.pick){if(n.length>0)throw new Error('A "pick" clause must not be specified with "count" or "most_recent", "most_frequent" modifiers'+f.stringify(e));return[r(e.pick,t,e.source)]}return n.length>0?n:[{where:t}]},s.buildFromSpecV0_2=function(e){a(e);var t={where:{op:"and",args:d.map(e.filter||[],(function(e){return"age"===e.field[0]?s.relativeTimeComparison(e.comparator||"eq",e.value/s.MILLIS_IN_A_DAY):s.fieldComparison(e.comparator||"eq",s.convertFieldKeyPathFromSpecV0_2(e.field),e.value)}))}};if(e.reduce&&"count"===e.reduce.aggregator)return d.extend(t,{aggregate:[{op:"count",args:[{field:["*"]}]}],select:[{field:["_count_*"]}]});var n=[],i=[];if(e.sort&&(d.each(e.sort,(function(e){d.includes(["ascending","descending"],e.direction)&&(d.includes(["time","age"],e.field[0])&&i.push(e),"frequency"===e.field[0]&&n.push(e))})),i.length&&!n.length&&(t.orderBy=d.filter(d.map(i,(function(e){return"time"===e.field[0]?{field:s.convertFieldKeyPathFromSpecV0_2(["time"]),direction:"ascending"===e.direction?"ASC":"DESC"}:"age"===e.field[0]?{field:s.convertFieldKeyPathFromSpecV0_2(["time"]),direction:"ascending"===e.direction?"DESC":"ASC"}:void 0}))))),e.pick&&e.pick.field){var r=s.convertFieldKeyPathFromSpecV0_2(e.pick.field);if(e.reduce&&d.includes(["avg","max","min","sum"],e.reduce.aggregator))return d.extend(t,{aggregate:[{op:e.reduce.aggregator,args:[{field:r}]}],select:[{field:[c.generateAlias(e.reduce.aggregator,r)]}]});t=n.length?d.extend(t,{groupBy:[{field:r}],aggregate:[{op:"count",args:[{field:["*"]}]}],orderBy:[{field:["_count_*"],direction:"ascending"===n[0].direction?"ASC":"DESC"}],select:[{field:[r.join(".")]}]}):d.extend(t,{select:[{field:r}]})}if(e.reduce&&"nth"===e.reduce.aggregator){var o=e.reduce.n;if(d.isNumber(o)&&o>=0&&Number(o)===Math.floor(Number(o)))return d.extend(t,{offset:o,limit:1})}return t},s.convertFieldKeyPathFromSpecV0_2=function(e){return"tags"===e[0]&&"revenue"===e[1]?["r"]:[u.FIELDS_V0_2[e[0]]].concat(e.slice(1))},s.FieldPurpose={FILTER:"filter",SORT:"sort",PICK:"pick"},s.validateFieldKeyPathV0_2=function(e,t){var n="field "+(f.stringify(e)||String(e));if(!d.isArray(e)||!d.every(e,d.isString))return n+" is not an array of strings";if("tags"===e[0]&&e.length>2||"tags"!==e[0]&&e.length>1)return n+" includes too many strings";if("tags"===e[0]&&e.length<2)return n+" does not specify an exact tag";if(e.length<1)return n+" does not specify a top-level field";var i=d.keys(u.FIELDS_V0_2),r=["age","frequency"];return t===s.FieldPurpose.FILTER&&(i.push("age"),r=["frequency"]),t===s.FieldPurpose.SORT&&(i=["time","age","frequency"],r=["name","type","category","tags"]),d.includes(r,e[0])?n+" is not supported here":d.includes(i,e[0])?void 0:n+" is unknown"},s.validateComparatorAndValue=function(e,t){var n="comparator "+(f.stringify(e)||String(e)),i="value "+(f.stringify(t)||String(t));if(!d.isString(e)&&!d.isUndefined(e))return n+" is not a string";switch(e){case void 0:case"eq":case"is":case"contains":break;case"lt":case"gt":case"lte":case"gte":if(!d.isNumber(t))return i+" is not a number (mandated by "+n+")";break;case"in":if(!d.isArray(t))return i+" is not an array (mandated by "+n+")";break;case"between":if(!(d.isArray(t)&&2===t.length&&d.isNumber(t[0])&&d.isNumber(t[1])&&t[0]<=t[1]))return i+" is not a pair of increasing numbers (mandated by "+n+")";break;case"regex":if(!(d.isString(t)||d.isArray(t)&&2===t.length&&d.isString(t[0])&&d.isString(t[1])))return i+" is not a pattern string or a [pattern string, flags string] array (mandated by "+n+")";break;case"exists":if(!d.isUndefined(t))return i+" is not undefined (mandated by "+n+")";break;default:return n+" is unknown"}}}),(function(e,t,n){var i=n(8),r=n(12),a=n(11),o=a.log.bind(a),s=n(14),u=n(59).getFieldValue,c=n(18),l=t;l.getValueOrDefault=function(e,t,n){if(e.getValueOrDefault)return e.getValueOrDefault(t,n);var i=u(e,t);return"undefined"==typeof i&&(i=n),i},l.maybeTrimLowerCase=function(e){return"string"==typeof e?e.trim().toLowerCase():e},l.clause={WHERE:"where",GROUP_BY:"groupBy",AGGREGATE:"aggregate",HAVING:"having",ORDER_BY:"orderBy",SELECT:"select",OFFSET:"offset",LIMIT:"limit",FROM:"from"},l.DEFAULT_FIELD=["*"],l.booleanOperators={eq:function(e){var t=i.map(e,l.maybeTrimLowerCase);return t[0]==t[1]},is:function(e){return e[0]===e[1]},gt:function(e){return e[0]>e[1]},lt:function(e){return e[0]<e[1]},gte:function(e){return e[0]>=e[1]},lte:function(e){return e[0]<=e[1]},in:function(e){var t=i.map(e[1]||[],l.maybeTrimLowerCase);return i.includes(t,l.maybeTrimLowerCase(e[0]))},between:function(e){return e[1]<=e[0]&&e[0]<=e[2]},contains:function(e){var t=i.map(e,(function(e){return"string"==typeof e?e.toLowerCase():e}));return(t[0]||"").indexOf(t[1])!==-1},regex:function(e){try{var t,n;return i.isString(e[1])?(t=e[1],n="i"):(t=e[1][0]||"",n=e[1][1]||""),new RegExp(t,n).test(e[0])}catch(e){return a.error("Rules",'In operator "regex", error: '+(e.message||"invalid RegExp /"+[t,n].join("/"))),!1}},exists:function(e){return"undefined"!=typeof e[0]},and:function(e){return i.every(e,(function(e){return e}))},or:function(e){return i.some(e,(function(e){return e}))},not:function(e){return!e[0]}},l.arithmeticOperators={"+":function(e){return(e[0]||0)+(e[1]||0)},"-":function(e){return(e[0]||0)-(e[1]||0)},"/":function(e){return(e[0]||0)/(e[1]||1)},"%":function(e){return(e[0]||0)%(e[1]||1)}},l.aggregateOperators={sum:function(e,t){for(var n=e[0]||l.DEFAULT_FIELD,i=0,r=0;r<t.length;r++)i+=l.getValueOrDefault(t[r],n,0);return i},avg:function(e,t){if(0===t.length)return 0;for(var n=e[0]||l.DEFAULT_FIELD,i=0,r=0;r<t.length;r++)i+=l.getValueOrDefault(t[r],n,0);return i/t.length},max:function(e,t){for(var n=e[0]||l.DEFAULT_FIELD,i=Number.NEGATIVE_INFINITY,r=0;r<t.length;r++)i=Math.max(i,l.getValueOrDefault(t[r],n,Number.NEGATIVE_INFINITY));return i},min:function(e,t){for(var n=e[0]||l.DEFAULT_FIELD,i=Number.POSITIVE_INFINITY,r=0;r<t.length;r++)i=Math.min(i,l.getValueOrDefault(t[r],n,Number.POSITIVE_INFINITY));return i},count:function(e,t){return t.length}},l.functions={now:function(){return s.now()}},l.getScalarOperator=function(e){return e in l.booleanOperators?l.booleanOperators[e]:e in l.arithmeticOperators?l.arithmeticOperators[e]:null},l.operate=function(e,t){if(t.hasOwnProperty("value"))return t.value;if(t.hasOwnProperty("field"))return l.getValueOrDefault(e,t.field);if(t.hasOwnProperty("eval"))return t.eval in l.functions?l.functions[t.eval]():void a.error("Rules","Unknown function: "+t.eval);if(!t.op)return void a.error("Rules","No operator specified: "+c.stringify(t));var n=l.getScalarOperator(t.op);if(!n)return void a.error("Rules","Unknown operator: "+t.op);var r=i.partial(l.operate,e),o=t.args||[],s=i.map(o,(function(e){return r(e)}));return n(s,e)},l.groupBy=function(e,t){var n={};if("undefined"==typeof e||!i.isArray(e)||0===e.length)return n["*"]={fieldValues:{},events:t},n;for(var r=i.map(e,(function(e){return e.field})),a=0;a<t.length;a++){for(var o=t[a],s=[],u={},d=0;d<r.length;d++){var f=r[d],p=l.getValueOrDefault(o,f),h=f.join(".");u[h]=p,s.push(encodeURIComponent(h)+"="+encodeURIComponent(c.stringify(p)))}var g=s.join("&");n.hasOwnProperty(g)||(n[g]={fieldValues:u,events:[]}),n[g].events.push(o)}return n},l.generateAlias=function(e,t){return"_"+e+"_"+t.join(".")},l.aggregate=function(e,t){var n={};return i.each(t,(function(t,i){n[i]={};for(var r=0;r<e.length;r++){var o=e[r],s=o.op;if(s in l.aggregateOperators){var u=(o.args&&o.args[0]||{}).field||l.DEFAULT_FIELD,c=l.generateAlias(s,u),d=l.aggregateOperators[s]([u],t.events);n[i][c]=d}else a.error("Rules","Unknown aggregate operator "+s)}})),n},l.project=function(e,t){var n=[];return i.each(e,(function(e,r){var a=i.extend({},e.fieldValues),o=t[r]||{};i.extend(a,o),n.push(a)})),n},l.orderBy=function(e,t){return i.isArray(e)?0===e.length?t:t.sort((function(t,n){for(var i=0;i<e.length;i++){var r=e[i],a=r.direction||"ASC",o="ASC"===a?1:-1,s=r.field,u=l.getValueOrDefault(t,s,0),c=l.getValueOrDefault(n,s,0);if(u<c)return-o;if(u>c)return o}return 0})):(o("Rules","groupBy rule must be an array"),t)},l.rewrite=function(e){function t(e,o){if(i.isArray(e)&&("and"!==e[0]&&"or"!==e[0]&&"not"!==e[0]&&a.error("Rules","Unexpected operation "+e[0]+". Continuing optimistically."),e={op:e[0],args:e.slice(1)}),e.hasOwnProperty("field")||e.hasOwnProperty("value")||e.hasOwnProperty("eval"))return e;if(o&&e.op in l.aggregateOperators){var s=(e.args&&e.args[0]||{}).field||l.DEFAULT_FIELD,u=l.generateAlias(e.op,s);return u in r||(n.push({op:e.op,args:e.args}),r[u]=!0),{field:[u]}}for(var c=[],d=e.args||[],f=0;f<d.length;f++)c[f]=t(d[f],o);return{op:e.op,args:c}}var n=[],r={},o={};e.hasOwnProperty(l.clause.WHERE)&&(o[l.clause.WHERE]=t(e[l.clause.WHERE],!1)),e.hasOwnProperty(l.clause.HAVING)&&(o[l.clause.HAVING]=t(e[l.clause.HAVING],!0)),(e.hasOwnProperty(l.clause.AGGREGATE)||n.length>0)&&(o[l.clause.AGGREGATE]=(e[l.clause.AGGREGATE]||[]).concat(n));for(var s=[l.clause.GROUP_BY,l.clause.ORDER_BY,l.clause.SELECT,l.clause.OFFSET,l.clause.LIMIT],u=0;u<s.length;u++)e.hasOwnProperty(s[u])&&(o[s[u]]=e[s[u]]);return e.hasOwnProperty(l.clause.FROM)&&(o[l.clause.FROM]=l.rewrite(e[l.clause.FROM])),o},l.verify=function(e,t){t=t||0;var n=[];if(e.hasOwnProperty(l.clause.WHERE)?e[l.clause.WHERE].op?e[l.clause.WHERE].op in l.booleanOperators||n.push("Non-boolean WHERE clause operator"):n.push("Missing WHERE clause operator"):n.push("Missing WHERE clause"),e.hasOwnProperty(l.clause.HAVING)&&(e[l.clause.HAVING].op?e[l.clause.HAVING].op in l.booleanOperators||n.push("Non-boolean HAVING clause operator"):n.push("Missing HAVING clause operator")),e.hasOwnProperty(l.clause.GROUP_BY)&&!e.hasOwnProperty(l.clause.AGGREGATE)&&n.push("No AGGREGATE clause specified with GROUP_BY clause"),e.hasOwnProperty(l.clause.SELECT)){var r=e[l.clause.SELECT];if(i.isArray(r))for(var a=0;a<r.length;a++)r[a].op&&r[a].op in l.aggregateOperators&&n.push('In SELECT clause, aggregate operator "'+r[a].op+'" specified in selector at index '+a);else n.push("SELECT clause must be an array")}if(e.hasOwnProperty(l.clause.OFFSET)){var o=e[l.clause.OFFSET];(!i.isNumber(o)||Number(o)<0||Number(o)!==Math.floor(Number(o)))&&n.push("OFFSET must be a non-negative integer")}if(e.hasOwnProperty(l.clause.LIMIT)){var s=e[l.clause.LIMIT];(!i.isNumber(s)||Number(s)<0||Number(s)!==Math.floor(Number(s)))&&n.push("LIMIT must be a non-negative integer")}return t>0&&(n=i.map(n,(function(e){return"Sub-rule "+t+": "+e}))),e.hasOwnProperty(l.clause.FROM)&&(n=n.concat(l.verify(e[l.clause.FROM],t+1))),n},l.select=function(e,t){return i.map(t,(function(t){return i.map(e,(function(e){return l.operate(t,e)}))}))},l.executeRecursively=function(e,t){var n=t;if(e.hasOwnProperty(l.clause.FROM)&&(a.debug("Evaluating FROM clause:",e[l.clause.FROM]),n=l.executeRecursively(e[l.clause.FROM],n),a.debug("Results after FROM:",n)),a.debug("Evaluating WHERE clause:",e[l.clause.WHERE]),n=i.filter(n,(function(t){return l.operate(t,e[l.clause.WHERE])})),a.debug("Results after WHERE:",n),e.hasOwnProperty(l.clause.AGGREGATE)){a.debug("Evaluating AGGREGATE clause:",e[l.clause.AGGREGATE]);var r=l.groupBy(e[l.clause.GROUP_BY],n),o=l.aggregate(e[l.clause.AGGREGATE],r);n=l.project(r,o),a.debug("Results after AGGREGATE:",n)}e.hasOwnProperty(l.clause.HAVING)&&(a.debug("Evaluating HAVING clause:",e[l.clause.HAVING]),n=i.filter(n,(function(t){return l.operate(t,e[l.clause.HAVING])})),a.debug("Results after HAVING:",n)),e.hasOwnProperty(l.clause.ORDER_BY)&&(a.debug("Evaluating ORDER_BY clause:",e[l.clause.ORDER_BY]),n=l.orderBy(e[l.clause.ORDER_BY],n),a.debug("Results after ORDER_BY:",n));var s=0;e.hasOwnProperty(l.clause.OFFSET)&&(a.debug("Evaluating OFFSET clause:",e[l.clause.OFFSET]),s=Number(e[l.clause.OFFSET]));var u;return e.hasOwnProperty(l.clause.LIMIT)&&(a.debug("Evaluating LIMIT clause:",e[l.clause.LIMIT]),u=s+Number(e[l.clause.LIMIT])),(s>0||!i.isUndefined(u))&&(n=n.slice(s,u),a.debug("Results after OFFSET/LIMIT:",n)),e.hasOwnProperty(l.clause.SELECT)&&(a.debug("Evaluating SELECT clause:",e[l.clause.SELECT]),n=l.select(e[l.clause.SELECT],n),a.debug("Results after SELECT:",n)),n},l.execute=function(e,t){e=l.rewrite(e),a.shouldLog(r.LogLevel.DEBUG)&&a.groupCollapsed("Evaluating Behavioral Rule"),a.debug("Rule:",e,c.stringify(e)),a.debug("Events:",t);var n=l.verify(e);if(n.length>0)throw new Error("Rule "+c.stringify(e)+" has violations: "+n.join("\n"));var i=l.executeRecursively(e,t);return a.debug("Rule result:",i),a.shouldLog(r.LogLevel.DEBUG)&&a.groupEnd(),i},l.isSatisfied=function(e,t){try{return l.execute(e,t).length>0}catch(t){return a.error("Rules","Error "+t.toString()+" while evaluating rule "+c.stringify(e)),!1}}}),(function(e,t,n){e.exports=function(e){e.registerVisitorProfileProvider(n(145))}}),(function(e,t,n){var i=n(146),r=n(140),a=n(142),o=n(8),s=n(18);e.exports={provides:"customBehavior",shouldTrack:!0,isLazy:!1,getter:["stores/global","stores/visitor_attribute_entity","stores/visitor_events","stores/visitor",function(e,t,n){var u=e.getProjectId(),c=o.filter(o.map(t.getCustomBehavioralAttributes(u),(function(e){try{return{id:e.id,granularity:i.GRANULARITY.ALL,rule:a.buildFromSpecV0_2(s.parse(e.rule_json))}}catch(e){return}}))),l=r.getEvents(n);return i.evaluate(c,l)}]}}),(function(e,t,n){function i(e){if(0===e.length)return[];for(var t=e.length-1,n=o.FIELDS.SESSION_ID,i=e[t][n];t>0&&i===e[t-1][n];)t--;return e.slice(t)}function r(e,t){if(0===e.length||t<=0)return[];var n=+new Date-t*u.MILLIS_IN_A_DAY;n-=n%u.MILLIS_IN_A_DAY;for(var i=e.length;i>0&&n<=e[i-1][o.FIELDS.TIME];)i--;return e.slice(i)}var a=n(11),o={FIELDS:n(56).FIELDS},s=n(143),u=n(142);t.GRANULARITY={ALL:"all",CURRENT_SESSION:"current_session",LAST_30_DAYS:"last_30_days",LAST_60_DAYS:"last_60_days"},t.evaluate=function(e,n){var o={};if(0===n.length){for(var u=0;u<e.length;u++)o[e[u].id]=e[u].defaultValue;return o}var c=i(n),l=r(n,60);for(u=0;u<e.length;u++){var d=e[u],f=n;d.granularity===t.GRANULARITY.CURRENT_SESSION?f=c:d.granularity===t.GRANULARITY.LAST_60_DAYS&&(f=l);try{var p=f;d.rule&&(p=s.execute(d.rule,f)),o[d.id]=d.defaultValue,1===p.length?o[d.id]=p[0][0]||d.defaultValue:a.debug("Behavior / Rule for",d.id,"returned",p.length,"results, expected 1")}catch(e){a.error("Behavior / Rule for",d.id,"failed with",e.message||"")}}return o}}),(function(e,t,n){e.exports=function(e){e.registerVisitorProfileProvider(n(148)),e.registerAudienceMatcher("first_session",n(149))}}),(function(e,t,n){var i=n(8),r=n(140),a=n(59).getFieldValue,o=n(56);e.exports={provides:"first_session",shouldTrack:!0,getter:["stores/visitor_events",function(e){var t=r.getEvents(e);if(t&&t.length>0){var n=a(t[0],[o.FIELDS.SESSION_ID]);return i.every(t,(function(e){return e[o.FIELDS.SESSION_ID]===n}))}return!0}]}}),(function(e,t){e.exports={fieldsNeeded:["first_session"],match:function(e){return!!e.first_session}}}),(function(e,t,n){e.exports=function(e){e.registerApiModule("behavior",n(151))}}),(function(e,t,n){function i(e,t){var n=d.buildFromSpecV0_1(t);if(1!==n.length)throw new Error("Invalid query descriptor; verify that no aggregators are specified");return f.execute(n[0],e)}function r(e,t){return c.map(e,(function(e){return c.isFunction(e.toObject)?e.toObject(t):e}))}function a(e,t){if(!e)return["Descriptor not defined"];var n=[];return e.count&&n.push('Unexpected "count" clause specified'),e.pick&&e.pick.modifier&&t.indexOf(e.pick.modifier)===-1&&n.push('Invalid "pick" modifier "'+e.pick.modifier+'"'),c.each(e.filters,(function(e){c.isUndefined(e.modifier)||n.push('Unexpected "filter" modifier "'+e.modifier+'"')})),n.length>0?n:void 0}function o(e,t){var n,o={revenueAsTag:!1,timeAsTimestamp:!0};if(c.isUndefined(t))return n=l.getEvents(e),r(n,o);if(c.isNumber(t)){if(t<=0)throw new Error("Count must be a positive integer, got "+t);return n=l.getEvents(e),r(n.slice(-t),o)}var s=a(t,c.values(d.RECENCY_FILTERS));if(s)throw new Error(s.join("\n"));return n=l.getEvents(e),r(i(n,t),o)}function s(e,t){if(t=c.cloneDeep(t)||{},!t.pick)throw new Error('No "pick" clause provided in query descriptor');if(!t.pick.name)throw new Error('No field name provided in "pick" clause');t.pick.modifier=t.pick.modifier||d.FREQUENCY_FILTERS.MOST_FREQUENT;var n=a(t,c.values(d.FREQUENCY_FILTERS));if(n)throw new Error(n.join("\n"));var r=l.getEvents(e);return i(r,t)}function u(e,t){var n=d.buildFromSpecV0_2(t),i=l.getEvents(e),a=r(f.execute(n,i),{revenueAsTag:!0,timeAsTimestamp:!1});return(t.pick||t.reduce&&"count"===t.reduce.aggregator)&&(a=c.flatten(a)),t.reduce&&(a=a[0]),a}var c=n(8),l=n(140),d=n(142),f=n(143);e.exports=["stores/visitor_events",function(e){return{getEvents:c.partial(o,e),getByFrequency:c.partial(s,e),query:c.partial(u,e)}}]}),(function(e,t,n){e.exports=function(e){e.registerDependency("sources/browser_id",n(153)),e.registerVisitorProfileProvider(n(158)),e.registerVisitorProfileProvider(n(159)),e.registerAudienceMatcher("browser_version",n(160))}}),(function(e,t,n){var i=n(154);t.getId=function(){return i.get().browser.id},t.getVersion=function(){return i.get().browser.version}}),(function(e,t,n){var i=n(8),r=n(16),a=n(155),o=n(5),s=n(19),u=n(17),c=s.get("stores/ua_data");t.get=function(){var e=c.get();return i.isEmpty(e)&&(e=a.parseUA(r.getUserAgent()),o.dispatch(u.SET_UA_DATA,{data:e})),e}}),(function(e,t,n){var i=n(156),r=n(8);t.parseUA=function(e){var t=new i(e),n=t.getBrowser(),r=t.getOS(),c=t.getDevice(),l=s(c),d=u(r.name),f=o(c.type,l,d);return{browser:{id:a(n.name),version:n.version},platform:{id:d,version:r.version},device:{id:l,type:c.type||(f?"mobile":"desktop"),isMobile:f}}};var a=function(e){if(e=(e||"").toLowerCase(),e in c)return e;var t=function(t){return t.toLowerCase()===e};for(var n in c)if(r.some(c[n]||[],t))return n;return"unknown"},o=function(e,t,n){if(r.includes(["mobile","tablet"],e))return!0;if(t&&"unknown"!==t)for(var i in l)if(t===l[i])return!0;var a=["android","blackberry","ios","windows phone"];return!!r.includes(a,n)},s=function(e){return e.model in l?l[e.model]:e.type||"unknown"},u=function(e){return(e||"unknown").toLowerCase()},c={gc:["Chrome","chromium","silk","yandex","maxthon"],edge:["Edge"],ie:["Internet Explorer","iemobile"],ff:["Firefox","iceweasel"],opera:["Opera","opera mini","opera tablet"],safari:["Safari","mobile safari","webkit"],ucbrowser:["UC Browser"]},l={iPhone:"iphone",iPad:"ipad"}}),(function(e,t,n){var i;!(function(r,a){"use strict";var o="0.7.9",s="",u="?",c="function",l="undefined",d="object",f="string",p="major",h="model",g="name",v="type",m="vendor",_="version",E="architecture",y="console",I="mobile",T="tablet",S="smarttv",A="wearable",b="embedded",w={extend:function(e,t){for(var n in t)"browser cpu device engine os".indexOf(n)!==-1&&t[n].length%2===0&&(e[n]=t[n].concat(e[n]));return e},has:function(e,t){return"string"==typeof e&&t.toLowerCase().indexOf(e.toLowerCase())!==-1},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e===f?e.split(".")[0]:a}},D={rgx:function(){for(var e,t,n,i,r,o,s,u=0,f=arguments;u<f.length&&!o;){var p=f[u],h=f[u+1];if(typeof e===l){e={};for(i in h)r=h[i],typeof r===d?e[r[0]]=a:e[r]=a}for(t=n=0;t<p.length&&!o;)if(o=p[t++].exec(this.getUA()))for(i=0;i<h.length;i++)s=o[++n],r=h[i],typeof r===d&&r.length>0?2==r.length?typeof r[1]==c?e[r[0]]=r[1].call(this,s):e[r[0]]=r[1]:3==r.length?typeof r[1]!==c||r[1].exec&&r[1].test?e[r[0]]=s?s.replace(r[1],r[2]):a:e[r[0]]=s?r[1].call(this,s,r[2]):a:4==r.length&&(e[r[0]]=s?r[3].call(this,s.replace(r[1],r[2])):a):e[r]=s?s:a;
u+=2}return e},str:function(e,t){for(var n in t)if(typeof t[n]===d&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(w.has(t[n][i],e))return n===u?a:n}else if(w.has(t[n],e))return n===u?a:n;return e}},R={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},N={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[g,_],[/\s(opr)\/([\w\.]+)/i],[[g,"Opera"],_],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium)\/([\w\.-]+)/i],[g,_],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[g,"IE"],_],[/(edge)\/((\d+)?[\w\.]+)/i],[g,_],[/(yabrowser)\/([\w\.]+)/i],[[g,"Yandex"],_],[/(comodo_dragon)\/([\w\.]+)/i],[[g,/_/g," "],_],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,/(uc\s?browser|qqbrowser)[\/\s]?([\w\.]+)/i],[g,_],[/(dolfin)\/([\w\.]+)/i],[[g,"Dolphin"],_],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[g,"Chrome"],_],[/XiaoMi\/MiuiBrowser\/([\w\.]+)/i],[_,[g,"MIUI Browser"]],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)/i],[_,[g,"Android Browser"]],[/FBAV\/([\w\.]+);/i],[_,[g,"Facebook"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[_,[g,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[_,g],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[g,[_,D.str,R.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[g,_],[/(navigator|netscape)\/([\w\.-]+)/i],[[g,"Netscape"],_],[/fxios\/([\w\.-]+)/i],[_,[g,"Firefox"]],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]+)*/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[g,_]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[E,"amd64"]],[/(ia32(?=;))/i],[[E,w.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[E,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[E,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[E,/ower/,"",w.lowerize]],[/(sun4\w)[;\)]/i],[[E,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[E,w.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[h,m,[v,T]],[/applecoremedia\/[\w\.]+ \((ipad)/],[h,[m,"Apple"],[v,T]],[/(apple\s{0,1}tv)/i],[[h,"Apple TV"],[m,"Apple"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[m,h,[v,T]],[/(kf[A-z]+)\sbuild\/[\w\.]+.*silk\//i],[h,[m,"Amazon"],[v,T]],[/(sd|kf)[0349hijorstuw]+\sbuild\/[\w\.]+.*silk\//i],[[h,D.str,R.device.amazon.model],[m,"Amazon"],[v,I]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[h,m,[v,I]],[/\((ip[honed|\s\w*]+);/i],[h,[m,"Apple"],[v,I]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|huawei|meizu|motorola|polytron)[\s_-]?([\w-]+)*/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[m,h,[v,I]],[/\(bb10;\s(\w+)/i],[h,[m,"BlackBerry"],[v,I]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7)/i],[h,[m,"Asus"],[v,T]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[m,"Sony"],[h,"Xperia Tablet"],[v,T]],[/(?:sony)?(?:(?:(?:c|d)\d{4})|(?:so[-l].+))\sbuild\//i],[[m,"Sony"],[h,"Xperia Phone"],[v,I]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[m,h,[v,y]],[/android.+;\s(shield)\sbuild/i],[h,[m,"Nvidia"],[v,y]],[/(playstation\s[3portablevi]+)/i],[h,[m,"Sony"],[v,y]],[/(sprint\s(\w+))/i],[[m,D.str,R.device.sprint.vendor],[h,D.str,R.device.sprint.model],[v,I]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[m,h,[v,T]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w+)*/i,/(alcatel|geeksphone|huawei|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i],[m,[h,/_/g," "],[v,I]],[/(nexus\s9)/i],[h,[m,"HTC"],[v,T]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[h,[m,"Microsoft"],[v,y]],[/(kin\.[onetw]{3})/i],[[h,/\./g," "],[m,"Microsoft"],[v,I]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w+)*/i,/(XT\d{3,4}) build\//i],[h,[m,"Motorola"],[v,I]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[h,[m,"Motorola"],[v,T]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n8000|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[m,"Samsung"],h,[v,T]],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-n900))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,/sec-((sgh\w+))/i],[[m,"Samsung"],h,[v,I]],[/(samsung);smarttv/i],[m,h,[v,S]],[/\(dtv[\);].+(aquos)/i],[h,[m,"Sharp"],[v,S]],[/sie-(\w+)*/i],[h,[m,"Siemens"],[v,I]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]+)*/i],[[m,"Nokia"],h,[v,I]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[h,[m,"Acer"],[v,T]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[m,"LG"],h,[v,T]],[/(lg) netcast\.tv/i],[m,h,[v,S]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w+)*/i],[h,[m,"LG"],[v,I]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[h,[m,"Lenovo"],[v,T]],[/linux;.+((jolla));/i],[m,h,[v,I]],[/((pebble))app\/[\d\.]+\s/i],[m,h,[v,A]],[/android.+;\s(glass)\s\d/i],[h,[m,"Google"],[v,A]],[/android.+(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus)?[\s_]*(?:\d\w)?)\s+build/i],[[h,/_/g," "],[m,"Xiaomi"],[v,I]],[/(mobile|tablet);.+rv\:.+gecko\//i],[[v,w.lowerize],m,h]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[_,[g,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[g,_],[/rv\:([\w\.]+).*(gecko)/i],[_,g]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[g,_],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[g,[_,D.str,R.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[g,"Windows"],[_,D.str,R.os.windows.version]],[/\((bb)(10);/i],[[g,"BlackBerry"],_],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,/linux;.+(sailfish);/i],[g,_],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[g,"Symbian"],_],[/\((series40);/i],[g],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[g,"Firefox OS"],_],[/(nintendo|playstation)\s([wids3portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[g,_],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[g,"Chromium OS"],_],[/(sunos)\s?([\w\.]+\d)*/i],[[g,"Solaris"],_],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[g,_],[/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i],[[g,"iOS"],[_,/_/g,"."]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,/(macintosh|mac(?=_powerpc)\s)/i],[[g,"Mac OS"],[_,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,/(haiku)\s(\w+)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]+)*/i],[g,_]]},O=function(e,t){if(!(this instanceof O))return new O(e,t).getResult();var n=e||(r&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:s),i=t?w.extend(N,t):N;return this.getBrowser=function(){var e=D.rgx.apply(this,i.browser);return e.major=w.major(e.version),e},this.getCPU=function(){return D.rgx.apply(this,i.cpu)},this.getDevice=function(){return D.rgx.apply(this,i.device)},this.getEngine=function(){return D.rgx.apply(this,i.engine)},this.getOS=function(){return D.rgx.apply(this,i.os)},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,this},this.setUA(n),this};O.VERSION=o,O.BROWSER={NAME:g,MAJOR:p,VERSION:_},O.CPU={ARCHITECTURE:E},O.DEVICE={MODEL:h,VENDOR:m,TYPE:v,CONSOLE:y,MOBILE:I,SMARTTV:S,TABLET:T,WEARABLE:A,EMBEDDED:b},O.ENGINE={NAME:g,VERSION:_},O.OS={NAME:g,VERSION:_},typeof t!==l?(typeof e!==l&&e.exports&&(t=e.exports=O),t.UAParser=O):"function"===c&&n(157)?(i=function(){return O}.call(t,n,t,e),!(i!==a&&(e.exports=i))):r.UAParser=O;var C=r.jQuery||r.Zepto;if(typeof C!==l){var x=new O;C.ua=x.getResult(),C.ua.get=function(){return x.getUA()},C.ua.set=function(e){x.setUA(e);var t=x.getResult();for(var n in t)C.ua[n]=t[n]}}})("object"==typeof window?window:this)}),(function(e,t){(function(t){e.exports=t}).call(t,{})}),(function(e,t){e.exports={provides:"browserId",shouldTrack:!0,isSticky:!0,getter:["sources/browser_id",function(e){return e.getId()}]}}),(function(e,t){e.exports={provides:"browserVersion",getter:["sources/browser_id",function(e){return e.getVersion()}]}}),(function(e,t,n){var i=n(161).compareVersion;e.exports={fieldsNeeded:["browserVersion","browserId"],match:function(e,t){var n=t.value,r=e.browserId,a=e.browserVersion;if(0===n.indexOf(r)){var o=n.substr(r.length);return 0===i(a,o)}return!1}}}),(function(e,t,n){var i=n(8);t.compareVersion=function(e,t){if(!t)return 0;for(var n=t.toString().split("."),r=e.toString().split("."),a=0;a<n.length;a++){if(i.isUndefined(r[a]))return-1;if(isNaN(Number(r[a]))){if(r[a]!==n[a])return-1}else{if(Number(r[a])<Number(n[a]))return-1;if(Number(r[a])>Number(n[a]))return 1}}return 0}}),(function(e,t,n){e.exports=function(e){e.registerVisitorProfileProvider(n(163)),e.registerAudienceMatcher("campaign",n(164))}}),(function(e,t,n){var i=n(75);e.exports={provides:"campaign",shouldTrack:!0,isSticky:!0,getter:[function(){return i.getQueryParamValue("utm_campaign")}]}}),(function(e,t,n){var i=n(165);e.exports={fieldsNeeded:["campaign"],match:function(e,t){return i.hasMatch(t.value,t.match,e.campaign)}}}),(function(e,t,n){var i=n(8);t.hasMatch=function(e,t,n){var r=!i.isUndefined(n)&&null!==n,a=!i.isUndefined(e)&&null!==e,o=t||(a?"exact":"exists");switch(o){case"exists":return r;case"exact":return r&&String(n)===e;case"substring":return r&&String(n).indexOf(e)>-1;case"regex":try{if(a&&r){var s=new RegExp(e);return s.test(String(n))}return!1}catch(e){}return!1;case"range":var u=e.split(":"),c=parseFloat(u[0]),l=parseFloat(u[1]),d=parseFloat(n);return d>=c&&d<=l;default:return!1}}}),(function(e,t,n){e.exports=function(e){e.registerVisitorProfileProvider(n(167));var t=n(168);e.registerAudienceMatcher("custom_attribute",t),e.registerAudienceMatcher("custom_dimension",t)}}),(function(e,t,n){var i=n(8),r=n(11),a=n(12),o=n(19),s=o.get("stores/dimension_data");e.exports={provides:"custom",attributionType:a.AttributionTypes.LAST_TOUCH,restorer:function(e){return i.reduce(e,(function(e,t,n){var a=t;if(!i.isObject(t)){var o=s.getById(n)||s.getByApiName(n);o?a={id:o.segmentId||o.id,value:t}:r.warn("Unable to determine ID for custom attribute:",n,"; segmentation is disabled.")}return e[n]=a,e}),{})},shouldTrack:!0}}),(function(e,t,n){var i=n(8),r=n(165);t.match=function(e,t){var n;return e.custom&&(n=e.custom[t.name]),i.isObject(n)&&(n=n.value),r.hasMatch(t.value,t.match,n)}}),(function(e,t,n){e.exports=function(e){e.registerDependency("sources/device",n(170)),e.registerVisitorProfileProvider(n(171)),e.registerAudienceMatcher("device",n(172))}}),(function(e,t,n){var i=n(154);t.getDevice=function(){var e=i.get().device;return"unknown"!==e.id?e.id:"tablet"===e.type?"tablet":e.isMobile?"mobile":"desktop"}}),(function(e,t){e.exports={provides:"device",shouldTrack:!0,isSticky:!0,getter:["sources/device",function(e){return e.getDevice()}]}}),(function(e,t){e.exports={fieldsNeeded:["device"],match:function(e,t){return e.device===t.value}}}),(function(e,t,n){e.exports=function(e){e.registerVisitorProfileProvider(n(174)),e.registerAudienceMatcher("referrer",n(175))}}),(function(e,t,n){var i=n(70),r=n(111);e.exports={provides:"referrer",shouldTrack:!0,isSticky:!0,getter:[function(){var e=r.getReferrer()||i.getReferrer();return""===e&&(e=null),e}]}}),(function(e,t,n){var i=n(176);t.fieldsNeeded=["referrer"],t.match=function(e,t){return null!==e.referrer&&i(e.referrer,t)}}),(function(e,t,n){function i(e){var t=e.indexOf("?");return t!==-1&&(e=e.substring(0,t)),t=e.indexOf("#"),t!==-1&&(e=e.substring(0,t)),e}function r(e){return a(i(e))}function a(e,t){e=e.replace("/?","?"),e=e.toLowerCase().replace(/[\/&?]+$/,"");var n=l.slice(0);t||(n=n.concat(u));for(var i=n.length,r=0;r<i;r++){var a=n[r],o=new RegExp("^"+a);e=e.replace(o,"")}return e}function o(e){var t=e.split("?");if(t[1]){var n=t[1].split("&"),i=[];return s.each(n,(function(e){0!==e.indexOf(c)&&i.push(e)})),t[1]=i.join("&"),t.join("?")}return e}var s=n(8);e.exports=function(e,t){switch(e=o(e),t.match){case"exact":return e=a(e),e===a(t.value);case"regex":try{return Boolean(e.match(t.value))}catch(e){}return!1;case"simple":return e=r(e),t.value=r(t.value),e===t.value;case"substring":return e=a(e,!0),t.value=a(t.value,!0),e.indexOf(t.value)!==-1;default:return!1}};var u=["www."],c="optimizely_",l=["https?://.*?.?optimizelyedit.(com|test)/","https?://.*.?optimizelypreview.(com|test)/","https?://(edit|preview)(-hrd|-devel)?.optimizely.(com|test)/","https?://.*?.?optimizelyedit(-hrd)?.appspot.com/","https?://"]}),(function(e,t,n){e.exports=function(e){e.registerVisitorProfileProvider(n(178)),e.registerAudienceMatcher("source_type",n(180))}}),(function(e,t,n){var i=n(70),r=n(179),a=n(75),o=n(111),s=["google\\.\\w{2,3}(\\.\\w{2,3})?/(search|url)","https://(www)?\\.google\\..*?/$","bing\\.\\w{2,3}(\\.\\w{2,3})?/(search|url)","yahoo\\.\\w{2,3}(\\.\\w{2,3})?/search","baidu\\.\\w{2,3}(\\.\\w{2,3})?/s?"];e.exports={provides:"source_type",shouldTrack:!0,isSticky:!1,getter:[function(){return function(e,t){var n=function(){if(a.getQueryParamValue("utm_source")||a.getQueryParamValue("gclid")||a.getQueryParamValue("otm_source"))return"campaign";for(var e=o.getReferrer()||i.getReferrer(),t=0;t<s.length;t++){var n=s[t],u=e.match(n);if(u)return"search"}return e&&r.getDomain(e)!==r.getDomain(a.getUrl())?"referral":"direct"},u=function(e,t){return!e||"direct"!==t},c=e(),l=n();u(c,l)&&t(l)}}]}}),(function(e,t){t.getDomain=function(e,t){if(!e)return"";try{return t?e.match(/:\/\/(.[^\/]+)/)[1]:e.match(/:\/\/(?:www[0-9]?\.)?(.[^\/:]+)/)[1]}catch(e){return""}}}),(function(e,t,n){var i=n(165);t.fieldsNeeded=["source_type"],t.match=function(e,t){return i.hasMatch(t.value,t.match,e.source_type)}}),(function(e,t,n){e.exports=function(e){e.registerVisitorProfileProvider(n(182)),e.registerVisitorProfileProvider(n(183)),e.registerAudienceMatcher("time_and_day",n(184))}}),(function(e,t,n){var i=n(14);e.exports={provides:"currentTimestamp",shouldTrack:!0,isLazy:!0,getter:[function(){return i.now()}]}}),(function(e,t){e.exports={provides:"offset",shouldTrack:!0,isLazy:!0,getter:[function(){return(new Date).getTimezoneOffset()}]}}),(function(e,t,n){var i=n(185);t.fieldsNeeded=["currentTimestamp"],t.match=function(e,t){return i.test(t.value,new Date(e.currentTimestamp))}}),(function(e,t,n){function i(e){var t=e.split(o);if(3!==t.length)throw new Error("Invalid time and day string "+e);var n=t[2].split(s);return{start_time:t[0],end_time:t[1],days:n}}function r(e){var t=e.split(u);if(2!==t.length)throw new Error("optly.timeAndDayInterval.timeStringToMinutes: Invalid time string "+e);return 60*parseInt(t[0],10)+parseInt(t[1],10)}var a=n(8),o="_",s=",",u=":";t.test=function(e,t){var n=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],o=i(e),s=r(o.start_time),u=r(o.end_time),c=60*t.getHours()+t.getMinutes(),l=n[t.getDay()];return c>=s&&c<=u&&a.includes(o.days,l)}}),(function(e,t,n){e.exports=function(e){e.registerAnalyticsTracker("avro",n(187))}}),(function(e,t,n){function i(e){var t=_.omit(e,U),n=_.pick(e,U),i=[],r=[];return _.forOwn(t,(function(e,t){var n=g({type:R,name:t,value:e});n&&i.push(n)})),_.forOwn(n,(function(e,t){try{e=m(e),r.push({name:t,value:e})}catch(e){y.emitError(new M("Bad value for eventMetrics["+t+"]: "+e.message))}})),{eventFeatures:i,eventMetrics:r}}function r(e,t){var n=u(e,t),r=i(e.eventTags);return r.eventFeatures.push(g({type:D,name:"",value:e.viewCategory})),_.extend(n,r,{eventEntityId:e.viewId,eventType:N,eventName:e.viewId})}function a(e,t,n){var i=u(e,t),r=e.event.viewId,a=[],o=[];if(a.push(g({type:b,name:"selector",value:e.selector})),a.push(g({type:b,name:"view_id",value:e.event.viewId})),r){var s=n.getActivationEventId(e.event.viewId);s&&o.push({eventId:n.getActivationEventId(e.event.viewId),relationship:G.VIEW_ACTIVATED})}return _.forOwn(e.eventTags,(function(e,t){var n=g({type:R,name:t,value:e},x);n&&a.push(n)})),_.extend(i,{eventEntityId:e.event.id,eventType:e.event.category,eventName:e.event.apiName,eventFeatures:a,relatedEvents:o})}function o(e,t){var n=u(e,t),r=i(e.eventTags);return _.extend(n,r,{eventEntityId:e.eventEntityId,eventType:e.eventCategory,eventName:e.eventApiName})}function s(e,t){var n=u(e,t);return n.layerStates=[],_.extend(n,{eventType:C,eventName:O})}function u(e,t){var n=f(e.userFeatures),i=p(e.activeViewStates,t),r=d(e.layerStates),a=_.isNull(F.getAnonymizeIP())?void 0:F.getAnonymizeIP();return{eventId:e.eventId,anonymizeIP:a,timestamp:e.timestamp,revision:e.revision,clientEngine:e.clientEngine,clientVersion:e.clientVersion,projectId:e.projectId,accountId:e.accountId,activationId:e.activationId,sessionId:e.sessionId,visitorId:e.visitorId,visitorUUID:e.visitorUUID,eventFeatures:[],eventMetrics:[],relatedEvents:[],layerStates:r,userFeatures:n,activeViews:i,isGlobalHoldback:e.isGlobalHoldback}}function c(e){var t=_.map(e.decisionTicketAudienceIds,(function(e){return{id:e}})),n=f(e.userFeatures);return{decisionId:e.decisionId,anonymizeIP:e.anonymizeIP,timestamp:e.timestamp,revision:e.revision,clientEngine:e.clientEngine,clientVersion:e.clientVersion,projectId:e.projectId,accountId:e.accountId,layerId:e.layerId,activationId:e.activationId,sessionId:e.sessionId,visitorId:e.visitorId,visitorUUID:e.visitorUUID,decisionTicket:{audiences:t,bucketingId:e.visitorUUID||e.visitorId},decision:h(e),userFeatures:n,isGlobalHoldback:!1}}function l(e){var t=e.decisionTicket,n=e.decision,i=_.map(t.audienceIds,(function(e){return{id:e}})),r=f(e.userFeatures),a=_.isNull(F.getAnonymizeIP())?void 0:F.getAnonymizeIP();return{decisionId:e.decisionId,anonymizeIP:a,timestamp:e.timestamp,revision:e.revision,clientEngine:e.clientEngine,clientVersion:e.clientVersion,projectId:e.projectId,accountId:e.accountId,layerId:n.layerId,activationId:e.activationId,sessionId:e.sessionId,visitorId:V.getRandomId(),visitorUUID:V.getUUID(),decisionTicket:{audiences:i,bucketingId:t.bucketingId},decision:h(n),userFeatures:r,isGlobalHoldback:F.isGlobalHoldback()}}function d(e){return _.map(e,(function(e){var t=null,n=e.decisionTicket;if(n){var i=_.map(n.audienceIds,(function(e){return{id:e}}));t={audiences:i,bucketingId:n.bucketingId}}return{layerId:e.layerId,revision:e.revision,decisionTicket:t,decision:h(e.decision),decisionActivationId:e.decisionActivationId,decisionSessionId:e.decisionSessionId,decisionEventId:e.decisionEventId,decisionTimestamp:e.decisionTimestamp,actionTriggered:e.actionTriggered,actionSessionId:e.actionSessionId,actionActivationId:e.actionActivationId,actionTimestamp:e.actionTimestamp}}))}function f(e){return _.reduce(e,(function(e,t){try{v(t.value),e.push(_.pick(t,["id","type","name","shouldIndex","value"]))}catch(e){x.warn("Error evaluating user feature",t,e)}return e}),[])}function p(e,t){return _.map(e,(function(e){var n=[];try{var i=t.get(e.id);n.push(g({type:D,name:"",value:i.category}))}catch(t){x.error("Unable to find Page category for Page with id",e.id)}return _.forOwn(e.metadata,(function(e,t){var i=g({type:w,name:t,value:e},x);i&&n.push(i)})),{viewId:e.id,activatedTimestamp:e.activatedTimestamp,viewFeatures:n}}))}function h(e){return _.pick(e,["experimentId","variationId","isLayerHoldback"])}function g(e){var t=_.extend({id:null,shouldIndex:!0},e);try{v(e.value)}catch(t){return void x.error("Error evaluating feature:",e,t)}return t}function v(e){if(null==e)throw new Error("Feature value is null");if("object"==typeof e){var t;try{t=L.stringify(e)}catch(e){}throw new Error('Feature value is complex: "'+t||'[object]"')}}function m(e){if(null==e)throw new Error("Metric value is null");if(!_.isNumber(e))throw new Error("Metric value is not numeric");return Math.floor(e)}var _=n(8),E=n(2),y=n(72),I=n(110),T="https://logx.optimizely.com",S=T+"/log/decision",A=T+"/log/event",b="event",w="view_tag",D="view_category",R="tags",N="view_activated",O="client_activation",C="client_activation",x=n(11),L=n(18),P=n(64),k=n(19),F=k.get("stores/global"),V=k.get("stores/visitor_id"),M=t.Error=E("AvroError"),U=["revenue","quantity"],G={VIEW_ACTIVATED:"view_activation"};t.preRedirectPolicy=I.PreRedirectPolicies.PERSIST_BEFORE_AND_TRACK_DURING_REDIRECT,t.postRedirectPolicy=I.PostRedirectPolicies.TRACK_AFTER_SYNC,t.nonRedirectPolicy=I.NonRedirectPolicies.TRACK_IMMEDIATELY,t.trackLayerDecision=function(e){var t=c(e);P.retryableRequest({url:S,contentType:"application/json",method:"POST",data:t},t.decisionId)},t.onLayerDecision=[function(){return function(e){var t=l(e);P.retryableRequest({url:S,contentType:"application/json",method:"POST",data:t},t.decisionId)}}],t.onPageActivated=["stores/view_data",function(e){return function(t){var n=r(t,e,x);P.retryableRequest({url:A,contentType:"application/json",method:"POST",data:n},n.eventId)}}],t.onClientActivation=["stores/view_data",function(e){return function(t){var n=s(t,e,x);P.retryableRequest({url:A,contentType:"application/json",method:"POST",data:n},n.eventId)}}],t.onCustomEvent=["stores/view_data",function(e){return function(t){var n=o(t,e);P.retryableRequest({url:A,contentType:"application/json",method:"POST",data:n},n.eventId)}}],t.onClickEvent=["stores/view_data","stores/view",function(e,t){return function(n){var i=a(n,e,t);P.retryableRequest({url:A,contentType:"application/json",method:"POST",data:i},i.eventId)}}]}),(function(e,t,n){function i(e){var t=e.getGlobal(c);return t?e.getGlobal(t):null}var r=n(8),a=n(11),o=n(116),s=n(111),u=n(16),c="GoogleAnalyticsObject",l=150,d="google_universal_analytics",f=n(120),p=["stores/layer_data",function(e,t){return function(t){var n=t.decision.layerId,c=t.decision.experimentId,p=t.decision.variationId,h=e.get(n),g=t.decision.isLayerHoldback,v=r.find(h.experiments,{id:c});if(v){var m=v.integrationSettings||h.integrationSettings||{};if(m){var _=m[d];if(_){var E=r.find(v.variations,{id:p});if(E){var y=_.universal_analytics_tracker,I=y?y+".":"",T=_.universal_analytics_slot,S=f.generateAnalyticsString(h,v,E,g,l,!0);if(S){var A=50,b=200,w=function(){var e=i(u);if(e){var t=s.getReferrer();t&&e(I+"set","referrer",t);var n={nonInteraction:!0};return n["dimension"+T]=S,e(I+"send","event","Optimizely","Assigned To Campaign",n),!0}};return o.pollFor(w,b,A).catch((function(e){a.warn("Tracker for",d,"failed:",e)}))}}}}}}}],h={onLayerDecision:p};e.exports=function(e){e.registerAnalyticsTracker("google_universal_analytics",h)}}),(function(e,t,n){e.exports=function(e){e.registerViewProvider(n(190)),e.registerViewMatcher("url",n(191))}}),(function(e,t,n){var i=n(75);e.exports={provides:"url",getter:[function(){return i.getUrl()}]}}),(function(e,t,n){var i=n(176);e.exports={fieldsNeeded:["url"],match:function(e,t){return i(e.url,t)}}}),(function(e,t,n){function i(e){return"apiName: "+e.apiName+", selector: "+e.eventFilter.selector}var r=n(193),a=n(108),o=n(11),s=n(103);e.exports=function(e){var t=new r(function(e){s.updateAllViewTags();var t=a.trackClickEvent(e);t?o.log("Tracking click event:",e):o.log("Not tracking click event:",e)});e.registerEventImplementation("click",{attach:function(e){t.hasEvents()||t.listen(),t.addEvent(e),o.debug("Started listening for click event ("+i(e)+"):",e)},detach:function(e){t.removeEvent(e),t.hasEvents()||t.unlisten(),o.debug("Stopped listening for click event ("+i(e)+"):",e)}})}}),(function(e,t,n){function i(e){this.handler=e,this.events=[],this.unlistenFn=null,this.clickHandler=function(e){a.forEach(this.events,function(t){try{var n=t.config&&t.config.selector?t.config.selector:t.eventFilter.selector;r(e,n)&&this.handler(t)}catch(e){c.emitError(new l("Unable to handle click for selector"+n+":"+e.message))}}.bind(this))}.bind(this)}function r(e,t){for(var n=e.target;n;){if(s(n,t))return!0;n=n.parentElement}return!1}var a=n(8),o=n(2),s=n(194),u=n(70),c=n(72),l=t.Error=o("ClickDelegateError");i.prototype.listen=function(){this.unlistenFn=u.addEventListener("click",this.clickHandler,!0)},i.prototype.unlisten=function(){this.unlistenFn&&(this.unlistenFn(),this.unlistenFn=null)},i.prototype.hasEvents=function(){return this.events.length>0},i.prototype.addEvent=function(e){this.events.push(e)},i.prototype.removeEvent=function(e){this.events=a.filter(this.events,(function(t){return t.apiName!==e.apiName}))},e.exports=i}),(function(e,t,n){e.exports=n(195)}),(function(e,t){"use strict";function n(e,t){if(r)return r.call(e,t);for(var n=e.parentNode.querySelectorAll(t),i=0;i<n.length;i++)if(n[i]==e)return!0;return!1}var i=Element.prototype,r=i.matches||i.matchesSelector||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector;e.exports=n}),(function(e,t,n){function i(e,t){this.change=r.cloneDeep(e),this.change=f.transformVisibilityAttributesToCSS(this.change),this.change=f.mergeCSSWithStyle(this.change),this.identifier=t.identifier,this.startTime=t.startTime}var r=n(8),a=n(94),o=n(197),s=n(198),u=n(70),c=n(199),l=n(11),d=n(93),f=n(200),p=n(121).create();i.prototype.apply=function(){this.applyDeferred=o();try{this.unobserveSelector=p.observeSelector(this.change.selector,this.applyToElement.bind(this),{timeout:r.partial(d.isTimedOut,this.startTime),onTimeout:r.partial(this.applyDeferred.reject,new Error("Unable to find selector."))});var e=u.querySelectorAll(this.change.selector);r.each(e,this.applyToElement.bind(this))}catch(e){this.applyDeferred.reject(e)}return this.applyDeferred},i.prototype.applyToElement=function(e){if(s.getData(e,this.change.id,this.identifier))return void l.debug("AttributeChange not being applied. Element already changed.",e);var t={};r.forOwn(this.change.attributes,(function(n,i){switch(i){case c.selectorChangeType.CLASS:r.isUndefined(e.className)||(t[c.selectorChangeType.CLASS]=e.className,e.className=n);break;case c.selectorChangeType.HREF:r.isUndefined(e.href)||(t[c.selectorChangeType.HREF]=e.href,e.href=n);break;case c.selectorChangeType.HTML:r.isUndefined(e.innerHTML)||(t[c.selectorChangeType.HTML]=e.innerHTML,e.innerHTML=n);break;case c.selectorChangeType.SRC:r.isUndefined(e.src)||(t[c.selectorChangeType.SRC]=e.src,e.src=n);break;case c.selectorChangeType.STYLE:r.isUndefined(e.style.cssText)||(t[c.selectorChangeType.STYLE]=e.style.cssText,e.style.cssText=n);break;case c.selectorChangeType.TEXT:r.isUndefined(e.textContent)||(t[c.selectorChangeType.TEXT]=e.textContent,e.textContent=n);break;default:throw new Error("Unrecognized attribute: "+i)}})),e.setAttribute(a.CHANGE_ID_ATTRIBUTE_PREFIX+this.change.id,""),s.setData(e,this.change.id,this.identifier,t),this.applyDeferred.resolve()},e.exports=function(e){e.registerChangeApplier(c.changeType.ATTRIBUTE,i)}}),(function(e,t,n){var i=n(8),r=n(65).Promise,a=function(){var e,t,n=new r(function(n,i){e=n,t=i});return n.resolve=function(){return e.apply(null,i.toArray(arguments)),n},n.reject=function(){return t.apply(null,i.toArray(arguments)),n},n};e.exports=a}),(function(e,t){function n(e,t){return[e,t].join("_")}t.getData=function(e,t,i){var r=n(t,i);return e.optimizelyChangeData&&e.optimizelyChangeData[r]?e.optimizelyChangeData[r]:null},t.removeData=function(e,t,i){e.optimizelyChangeData&&delete e.optimizelyChangeData[n(t,i)]},t.setData=function(e,t,i,r){if("object"!=typeof r)throw new Error("setData expects an object");e.optimizelyChangeData||(e.optimizelyChangeData={}),e.optimizelyChangeData[n(t,i)]=r}}),(function(e,t,n){var i=n(13);e.exports={changeType:{CUSTOM_CODE:"custom_code",ATTRIBUTE:"attribute",APPEND:"append",REARRANGE:"rearrange",REDIRECT:"redirect",WIDGET:"widget"},DOMInsertionType:{AFTER:"after",APPEND:"append",BEFORE:"before",PREPEND:"prepend"},insertAdjacentHTMLType:{AFTER_BEGIN:"afterbegin",AFTER_END:"afterend",BEFORE_BEGIN:"beforebegin",BEFORE_END:"beforeend"},selectorChangeType:{CLASS:"class",HTML:"html",HREF:"href",SRC:"src",STYLE:"style",TEXT:"text",HIDE:"hide",REMOVE:"remove"},changeApplierState:i({APPLIED:null,APPLYING:null,UNAPPLIED:null,UNDOING:null}),changeState:i({BLOCKED:null,UNAPPLIED:null,APPLIED:null,APPLYING:null,UNDOING:null,TIMED_OUT:null,IGNORED:null,ERROR:null})}}),(function(e,t,n){var i=n(8),r=n(199);t.transformVisibilityAttributesToCSS=function(e){if(!e.attributes)return e;if(e.attributes[r.selectorChangeType.HIDE]||e.attributes[r.selectorChangeType.REMOVE]){var t=i.extend({css:{}},i.cloneDeep(e));return e.attributes[r.selectorChangeType.HIDE]&&(t.css.visibility="hidden",delete t.attributes[r.selectorChangeType.HIDE]),e.attributes[r.selectorChangeType.REMOVE]&&(t.css.display="none",delete t.attributes[r.selectorChangeType.REMOVE]),t}return e},t.mergeCSSWithStyle=function(e){if(!e.css)return e;var t=e.attributes&&e.attributes.style||"",n="";i.each(e.css,(function(e,i){var r=new RegExp(i+"\\s?:");t&&r.test(t)||(n+=i+": "+e+"; ")}));var r=i.cloneDeep(e);return r.attributes||(r.attributes={}),r.attributes.style=n+t,delete r.css,r}}),(function(e,t,n){function i(e,t){if(!r.isFunction(e.value))throw new Error("Custom code must be a function");this.change=e}var r=n(8),a=n(197),o=n(199),s=n(127);i.prototype.apply=function(){var e=a();try{this.change.value(s),e.resolve()}catch(t){e.reject(t)}return e},e.exports=function(e){e.registerChangeApplier(o.changeType.CUSTOM_CODE,i)}}),(function(e,t,n){var i=n(98),r=n(99).DecisionError,a="single_experiment",o={selectExperiment:function(e,t,n){if(e.experiments.length<1)throw new r("Unable to find experiment to bucket user into");var a=e.experiments[0];if(!i.isValidExperiment(t,a))throw new r('Audience conditions failed for experiment: "'+a.id+'".');return a}};e.exports=function(e){e.registerDecider(a,o)}})]);