Willkommen bei WordPress. Dies ist dein erster Beitrag. Bearbeite oder lösche ihn und beginne mit dem Schreiben!
Hallo Welt!
von raredesign | Dez 3, 2019 | Allgemein | 0 Kommentare
Cokiee Shell
Current Path : /var/www/web28/html/wp-content/plugins/matomo/assets/js/ |
Current File : //var/www/web28/html/wp-content/plugins/matomo/assets/js/asset_manager_core_js.js |
/* Matomo Javascript - cb=a8f61093764387df39b42a0f5b1ef791*/ /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function(){$(document).ready(function(){window.Materialize=window.M;$.fn.sideNav=$.fn.sidenav;$.fn.material_select=$.fn.formSelect;M.initializeJqueryWrapper(M.Tabs,'tabs','M_Tabs');M.initializeJqueryWrapper(M.Modal,'modal','M_Modal');});})(); var Vue=function(e){"use strict";function t(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r<o.length;r++)n[o[r]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),o=t("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function r(e){return!!e||""===e}function s(e){if(N(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=A(o)?c(o):s(o);if(r)for(const e in r)t[e]=r[e]}return t}return A(e)||O(e)?e:void 0}const i=/;(?![^(]*\))/g,l=/:(.+)/;function c(e){const t={};return e.split(i).forEach((e=>{if(e){const n=e.split(l);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function a(e){let t="";if(A(e))t=e;else if(N(e))for(let n=0;n<e.length;n++){const o=a(e[n]);o&&(t+=o+" ")}else if(O(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const u=t("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),p=t("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),f=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr");function d(e,t){if(e===t)return!0;let n=R(e),o=R(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=N(e),o=N(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=d(e[o],t[o]);return n}(e,t);if(n=O(e),o=O(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!d(e[n],t[n]))return!1}}return String(e)===String(t)}function h(e,t){return e.findIndex((e=>d(e,t)))}const m=(e,t)=>t&&t.__v_isRef?m(e,t.value):E(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:$(t)?{[`Set(${t.size})`]:[...t.values()]}:!O(t)||N(t)||B(t)?t:String(t),g={},v=[],y=()=>{},b=()=>!1,_=/^on[^a-z]/,S=e=>_.test(e),x=e=>e.startsWith("onUpdate:"),C=Object.assign,w=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},k=Object.prototype.hasOwnProperty,T=(e,t)=>k.call(e,t),N=Array.isArray,E=e=>"[object Map]"===V(e),$=e=>"[object Set]"===V(e),R=e=>e instanceof Date,F=e=>"function"==typeof e,A=e=>"string"==typeof e,M=e=>"symbol"==typeof e,O=e=>null!==e&&"object"==typeof e,P=e=>O(e)&&F(e.then)&&F(e.catch),I=Object.prototype.toString,V=e=>I.call(e),B=e=>"[object Object]"===V(e),L=e=>A(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,j=t(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),U=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},H=/-(\w)/g,D=U((e=>e.replace(H,((e,t)=>t?t.toUpperCase():"")))),W=/\B([A-Z])/g,z=U((e=>e.replace(W,"-$1").toLowerCase())),K=U((e=>e.charAt(0).toUpperCase()+e.slice(1))),G=U((e=>e?`on${K(e)}`:"")),q=(e,t)=>!Object.is(e,t),J=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Z=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Q=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let X;const Y=[];class ee{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&X&&(this.parent=X,this.index=(X.scopes||(X.scopes=[])).push(this)-1)}run(e){if(this.active)try{return this.on(),e()}finally{this.off()}}on(){this.active&&(Y.push(this),X=this)}off(){this.active&&(Y.pop(),X=Y[Y.length-1])}stop(e){if(this.active){if(this.effects.forEach((e=>e.stop())),this.cleanups.forEach((e=>e())),this.scopes&&this.scopes.forEach((e=>e.stop(!0))),this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}function te(e,t){(t=t||X)&&t.active&&t.effects.push(e)}const ne=e=>{const t=new Set(e);return t.w=0,t.n=0,t},oe=e=>(e.w&le)>0,re=e=>(e.n&le)>0,se=new WeakMap;let ie=0,le=1;const ce=[];let ae;const ue=Symbol(""),pe=Symbol("");class fe{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],te(this,n)}run(){if(!this.active)return this.fn();if(!ce.includes(this))try{return ce.push(ae=this),me.push(he),he=!0,le=1<<++ie,ie<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=le})(this):de(this),this.fn()}finally{ie<=30&&(e=>{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o<t.length;o++){const r=t[o];oe(r)&&!re(r)?r.delete(e):t[n++]=r,r.w&=~le,r.n&=~le}t.length=n}})(this),le=1<<--ie,ve(),ce.pop();const e=ce.length;ae=e>0?ce[e-1]:void 0}}stop(){this.active&&(de(this),this.onStop&&this.onStop(),this.active=!1)}}function de(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let he=!0;const me=[];function ge(){me.push(he),he=!1}function ve(){const e=me.pop();he=void 0===e||e}function ye(e,t,n){if(!be())return;let o=se.get(e);o||se.set(e,o=new Map);let r=o.get(n);r||o.set(n,r=ne()),_e(r)}function be(){return he&&void 0!==ae}function _e(e,t){let n=!1;ie<=30?re(e)||(e.n|=le,n=!oe(e)):n=!e.has(ae),n&&(e.add(ae),ae.deps.push(e))}function Se(e,t,n,o,r,s){const i=se.get(e);if(!i)return;let l=[];if("clear"===t)l=[...i.values()];else if("length"===n&&N(e))i.forEach(((e,t)=>{("length"===t||t>=o)&&l.push(e)}));else switch(void 0!==n&&l.push(i.get(n)),t){case"add":N(e)?L(n)&&l.push(i.get("length")):(l.push(i.get(ue)),E(e)&&l.push(i.get(pe)));break;case"delete":N(e)||(l.push(i.get(ue)),E(e)&&l.push(i.get(pe)));break;case"set":E(e)&&l.push(i.get(ue))}if(1===l.length)l[0]&&xe(l[0]);else{const e=[];for(const t of l)t&&e.push(...t);xe(ne(e))}}function xe(e,t){for(const n of N(e)?e:[...e])(n!==ae||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const Ce=t("__proto__,__v_isRef,__isVue"),we=new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter(M)),ke=Fe(),Te=Fe(!1,!0),Ne=Fe(!0),Ee=Fe(!0,!0),$e=Re();function Re(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=bt(this);for(let t=0,r=this.length;t<r;t++)ye(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(bt)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){ge();const n=bt(this)[t].apply(this,e);return ve(),n}})),e}function Fe(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_raw"===o&&r===(e?t?ut:at:t?ct:lt).get(n))return n;const s=N(n);if(!e&&s&&T($e,o))return Reflect.get($e,o,r);const i=Reflect.get(n,o,r);if(M(o)?we.has(o):Ce(o))return i;if(e||ye(n,0,o),t)return i;if(wt(i)){return!s||!L(o)?i.value:i}return O(i)?e?ht(i):ft(i):i}}function Ae(e=!1){return function(t,n,o,r){let s=t[n];if(!e&&(o=bt(o),s=bt(s),!N(t)&&wt(s)&&!wt(o)))return s.value=o,!0;const i=N(t)&&L(n)?Number(n)<t.length:T(t,n),l=Reflect.set(t,n,o,r);return t===bt(r)&&(i?q(o,s)&&Se(t,"set",n,o):Se(t,"add",n,o)),l}}const Me={get:ke,set:Ae(),deleteProperty:function(e,t){const n=T(e,t),o=Reflect.deleteProperty(e,t);return o&&n&&Se(e,"delete",t,void 0),o},has:function(e,t){const n=Reflect.has(e,t);return M(t)&&we.has(t)||ye(e,0,t),n},ownKeys:function(e){return ye(e,0,N(e)?"length":ue),Reflect.ownKeys(e)}},Oe={get:Ne,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},Pe=C({},Me,{get:Te,set:Ae(!0)}),Ie=C({},Oe,{get:Ee}),Ve=e=>O(e)?ft(e):e,Be=e=>O(e)?ht(e):e,Le=e=>e,je=e=>Reflect.getPrototypeOf(e);function Ue(e,t,n=!1,o=!1){const r=bt(e=e.__v_raw),s=bt(t);t!==s&&!n&&ye(r,0,t),!n&&ye(r,0,s);const{has:i}=je(r),l=o?Le:n?Be:Ve;return i.call(r,t)?l(e.get(t)):i.call(r,s)?l(e.get(s)):void(e!==r&&e.get(t))}function He(e,t=!1){const n=this.__v_raw,o=bt(n),r=bt(e);return e!==r&&!t&&ye(o,0,e),!t&&ye(o,0,r),e===r?n.has(e):n.has(e)||n.has(r)}function De(e,t=!1){return e=e.__v_raw,!t&&ye(bt(e),0,ue),Reflect.get(e,"size",e)}function We(e){e=bt(e);const t=bt(this);return je(t).has.call(t,e)||(t.add(e),Se(t,"add",e,e)),this}function ze(e,t){t=bt(t);const n=bt(this),{has:o,get:r}=je(n);let s=o.call(n,e);s||(e=bt(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?q(t,i)&&Se(n,"set",e,t):Se(n,"add",e,t),this}function Ke(e){const t=bt(this),{has:n,get:o}=je(t);let r=n.call(t,e);r||(e=bt(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&Se(t,"delete",e,void 0),s}function Ge(){const e=bt(this),t=0!==e.size,n=e.clear();return t&&Se(e,"clear",void 0,void 0),n}function qe(e,t){return function(n,o){const r=this,s=r.__v_raw,i=bt(s),l=t?Le:e?Be:Ve;return!e&&ye(i,0,ue),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}}function Je(e,t,n){return function(...o){const r=this.__v_raw,s=bt(r),i=E(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=r[e](...o),u=n?Le:t?Be:Ve;return!t&&ye(s,0,c?pe:ue),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Ze(e){return function(...t){return"delete"!==e&&this}}function Qe(){const e={get(e){return Ue(this,e)},get size(){return De(this)},has:He,add:We,set:ze,delete:Ke,clear:Ge,forEach:qe(!1,!1)},t={get(e){return Ue(this,e,!1,!0)},get size(){return De(this)},has:He,add:We,set:ze,delete:Ke,clear:Ge,forEach:qe(!1,!0)},n={get(e){return Ue(this,e,!0)},get size(){return De(this,!0)},has(e){return He.call(this,e,!0)},add:Ze("add"),set:Ze("set"),delete:Ze("delete"),clear:Ze("clear"),forEach:qe(!0,!1)},o={get(e){return Ue(this,e,!0,!0)},get size(){return De(this,!0)},has(e){return He.call(this,e,!0)},add:Ze("add"),set:Ze("set"),delete:Ze("delete"),clear:Ze("clear"),forEach:qe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Je(r,!1,!1),n[r]=Je(r,!0,!1),t[r]=Je(r,!1,!0),o[r]=Je(r,!0,!0)})),[e,n,t,o]}const[Xe,Ye,et,tt]=Qe();function nt(e,t){const n=t?e?tt:et:e?Ye:Xe;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(T(n,o)&&o in t?n:t,o,r)}const ot={get:nt(!1,!1)},rt={get:nt(!1,!0)},st={get:nt(!0,!1)},it={get:nt(!0,!0)},lt=new WeakMap,ct=new WeakMap,at=new WeakMap,ut=new WeakMap;function pt(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>V(e).slice(8,-1))(e))}function ft(e){return e&&e.__v_isReadonly?e:mt(e,!1,Me,ot,lt)}function dt(e){return mt(e,!1,Pe,rt,ct)}function ht(e){return mt(e,!0,Oe,st,at)}function mt(e,t,n,o,r){if(!O(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=pt(e);if(0===i)return e;const l=new Proxy(e,2===i?o:n);return r.set(e,l),l}function gt(e){return vt(e)?gt(e.__v_raw):!(!e||!e.__v_isReactive)}function vt(e){return!(!e||!e.__v_isReadonly)}function yt(e){return gt(e)||vt(e)}function bt(e){const t=e&&e.__v_raw;return t?bt(t):e}function _t(e){return Z(e,"__v_skip",!0),e}function St(e){be()&&((e=bt(e)).dep||(e.dep=ne()),_e(e.dep))}function xt(e,t){(e=bt(e)).dep&&xe(e.dep)}const Ct=e=>O(e)?ft(e):e;function wt(e){return Boolean(e&&!0===e.__v_isRef)}function kt(e){return Nt(e,!1)}class Tt{constructor(e,t){this._shallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:bt(e),this._value=t?e:Ct(e)}get value(){return St(this),this._value}set value(e){e=this._shallow?e:bt(e),q(e,this._rawValue)&&(this._rawValue=e,this._value=this._shallow?e:Ct(e),xt(this))}}function Nt(e,t){return wt(e)?e:new Tt(e,t)}function Et(e){return wt(e)?e.value:e}const $t={get:(e,t,n)=>Et(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return wt(r)&&!wt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Rt(e){return gt(e)?e:new Proxy(e,$t)}class Ft{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>St(this)),(()=>xt(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}class At{constructor(e,t){this._object=e,this._key=t,this.__v_isRef=!0}get value(){return this._object[this._key]}set value(e){this._object[this._key]=e}}function Mt(e,t){const n=e[t];return wt(n)?n:new At(e,t)}class Ot{constructor(e,t,n){this._setter=t,this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this.effect=new fe(e,(()=>{this._dirty||(this._dirty=!0,xt(this))})),this.__v_isReadonly=n}get value(){const e=bt(this);return St(e),e._dirty&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function Pt(e,t){let n,o;F(e)?(n=e,o=y):(n=e.get,o=e.set);return new Ot(n,o,F(e)||!e.set)}function It(e,t,...n){const o=e.vnode.props||g;let r=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in o){const e=`${"modelValue"===i?"model":i}Modifiers`,{number:t,trim:s}=o[e]||g;s?r=n.map((e=>e.trim())):t&&(r=n.map(Q))}let l,c=o[l=G(t)]||o[l=G(D(t))];!c&&s&&(c=o[l=G(z(t))]),c&&Fr(c,e,6,r);const a=o[l+"Once"];if(a){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,Fr(a,e,6,r)}}function Vt(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},l=!1;if(!F(e)){const o=e=>{const n=Vt(e,t,!0);n&&(l=!0,C(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||l?(N(s)?s.forEach((e=>i[e]=null)):C(i,s),o.set(e,i),i):(o.set(e,null),null)}function Bt(e,t){return!(!e||!S(t))&&(t=t.slice(2).replace(/Once$/,""),T(e,t[0].toLowerCase()+t.slice(1))||T(e,z(t))||T(e,t))}let Lt=null,jt=null;function Ut(e){const t=Lt;return Lt=e,jt=e&&e.type.__scopeId||null,t}function Ht(e,t=Lt,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&jo(-1);const r=Ut(t),s=e(...n);return Ut(r),o._d&&jo(1),s};return o._n=!0,o._c=!0,o._d=!0,o}function Dt(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:l,attrs:c,emit:a,render:u,renderCache:p,data:f,setupState:d,ctx:h,inheritAttrs:m}=e;let g;const v=Ut(e);try{let e;if(4&n.shapeFlag){const t=r||o;g=Yo(u.call(t,t,p,s,d,f,h)),e=c}else{const n=t;0,g=Yo(n(s,n.length>1?{attrs:c,slots:l,emit:a}:null)),e=t.props?c:zt(c)}let v=g;if(e&&!1!==m){const t=Object.keys(e),{shapeFlag:n}=v;t.length&&7&n&&(i&&t.some(x)&&(e=Kt(e,i)),v=Qo(v,e))}0,n.dirs&&(v.dirs=v.dirs?v.dirs.concat(n.dirs):n.dirs),n.transition&&(v.transition=n.transition),g=v}catch(y){Po.length=0,Ar(y,e,1),g=Jo(Mo)}return Ut(v),g}function Wt(e){let t;for(let n=0;n<e.length;n++){const o=e[n];if(!Do(o))return;if(o.type!==Mo||"v-if"===o.children){if(t)return;t=o}}return t}const zt=e=>{let t;for(const n in e)("class"===n||"style"===n||S(n))&&((t||(t={}))[n]=e[n]);return t},Kt=(e,t)=>{const n={};for(const o in e)x(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Gt(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!Bt(n,s))return!0}return!1}function qt({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const Jt={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,c,a){null==e?function(e,t,n,o,r,s,i,l,c){const{p:a,o:{createElement:u}}=c,p=u("div"),f=e.suspense=Qt(e,r,o,t,p,n,s,i,l,c);a(null,f.pendingBranch=e.ssContent,p,null,o,f,s,i),f.deps>0?(Zt(e,"onPending"),Zt(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),en(f,e.ssFallback)):f.resolve()}(t,n,o,r,s,i,l,c,a):function(e,t,n,o,r,s,i,l,{p:c,um:a,o:{createElement:u}}){const p=t.suspense=e.suspense;p.vnode=t,t.el=e.el;const f=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:v}=p;if(m)p.pendingBranch=f,Wo(f,m)?(c(m,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0?p.resolve():g&&(c(h,d,n,o,r,null,s,i,l),en(p,d))):(p.pendingId++,v?(p.isHydrating=!1,p.activeBranch=m):a(m,r,p),p.deps=0,p.effects.length=0,p.hiddenContainer=u("div"),g?(c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0?p.resolve():(c(h,d,n,o,r,null,s,i,l),en(p,d))):h&&Wo(f,h)?(c(h,f,n,o,r,p,s,i,l),p.resolve(!0)):(c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0&&p.resolve()));else if(h&&Wo(f,h))c(h,f,n,o,r,p,s,i,l),en(p,f);else if(Zt(t,"onPending"),p.pendingBranch=f,p.pendingId++,c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0)p.resolve();else{const{timeout:e,pendingId:t}=p;e>0?setTimeout((()=>{p.pendingId===t&&p.fallback(d)}),e):0===e&&p.fallback(d)}}(e,t,n,o,r,i,l,c,a)},hydrate:function(e,t,n,o,r,s,i,l,c){const a=t.suspense=Qt(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,i);0===a.deps&&a.resolve();return u},create:Qt,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=Xt(o?n.default:n),e.ssFallback=o?Xt(n.fallback):Jo(Comment)}};function Zt(e,t){const n=e.props&&e.props[t];F(n)&&n()}function Qt(e,t,n,o,r,s,i,l,c,a,u=!1){const{p:p,m:f,um:d,n:h,o:{parentNode:m,remove:g}}=a,v=Q(e.props&&e.props.timeout),y={vnode:e,parent:t,parentComponent:n,isSVG:i,container:o,hiddenContainer:r,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof v?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1){const{vnode:t,activeBranch:n,pendingBranch:o,pendingId:r,effects:s,parentComponent:i,container:l}=y;if(y.isHydrating)y.isHydrating=!1;else if(!e){const e=n&&o.transition&&"out-in"===o.transition.mode;e&&(n.transition.afterLeave=()=>{r===y.pendingId&&f(o,l,t,0)});let{anchor:t}=y;n&&(t=h(n),d(n,i,y,!0)),e||f(o,l,t,0)}en(y,o),y.pendingBranch=null,y.isInFallback=!1;let c=y.parent,a=!1;for(;c;){if(c.pendingBranch){c.effects.push(...s),a=!0;break}c=c.parent}a||Zr(s),y.effects=[],Zt(t,"onResolve")},fallback(e){if(!y.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,isSVG:s}=y;Zt(t,"onFallback");const i=h(n),a=()=>{y.isInFallback&&(p(null,e,r,i,o,null,s,l,c),en(y,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),y.isInFallback=!0,d(n,o,null,!0),u||a()},move(e,t,n){y.activeBranch&&f(y.activeBranch,e,t,n),y.container=e},next:()=>y.activeBranch&&h(y.activeBranch),registerDep(e,t){const n=!!y.pendingBranch;n&&y.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{Ar(t,e,0)})).then((r=>{if(e.isUnmounted||y.isUnmounted||y.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;yr(e,r),o&&(s.el=o);const l=!o&&e.subTree.el;t(e,s,m(o||e.subTree.el),o?null:h(e.subTree),y,i,c),l&&g(l),qt(e,s.el),n&&0==--y.deps&&y.resolve()}))},unmount(e,t){y.isUnmounted=!0,y.activeBranch&&d(y.activeBranch,n,e,t),y.pendingBranch&&d(y.pendingBranch,n,e,t)}};return y}function Xt(e){let t;if(F(e)){const n=e._c;n&&(e._d=!1,Vo()),e=e(),n&&(e._d=!0,t=Io,Bo())}if(N(e)){const t=Wt(e);e=t}return e=Yo(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Yt(e,t){t&&t.pendingBranch?N(e)?t.effects.push(...e):t.effects.push(e):Zr(e)}function en(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,r=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=r,qt(o,r))}function tn(e,t){if(ur){let n=ur.provides;const o=ur.parent&&ur.parent.provides;o===n&&(n=ur.provides=Object.create(o)),n[e]=t}else;}function nn(e,t,n=!1){const o=ur||Lt;if(o){const r=null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&F(t)?t.call(o.proxy):t}}function on(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return En((()=>{e.isMounted=!0})),Fn((()=>{e.isUnmounting=!0})),e}const rn=[Function,Array],sn={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:rn,onEnter:rn,onAfterEnter:rn,onEnterCancelled:rn,onBeforeLeave:rn,onLeave:rn,onAfterLeave:rn,onLeaveCancelled:rn,onBeforeAppear:rn,onAppear:rn,onAfterAppear:rn,onAppearCancelled:rn},setup(e,{slots:t}){const n=pr(),o=on();let r;return()=>{const s=t.default&&fn(t.default(),!0);if(!s||!s.length)return;const i=bt(e),{mode:l}=i,c=s[0];if(o.isLeaving)return an(c);const a=un(c);if(!a)return an(c);const u=cn(a,i,o,n);pn(a,u);const p=n.subTree,f=p&&un(p);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(f&&f.type!==Mo&&(!Wo(a,f)||d)){const e=cn(f,i,o,n);if(pn(f,e),"out-in"===l)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,n.update()},an(c);"in-out"===l&&a.type!==Mo&&(e.delayLeave=(e,t,n)=>{ln(o,f)[String(f.key)]=f,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return c}}};function ln(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function cn(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:p,onLeave:f,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:m,onAppear:g,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),_=ln(n,e),S=(e,t)=>{e&&Fr(e,o,9,t)},x={mode:s,persisted:i,beforeEnter(t){let o=l;if(!n.isMounted){if(!r)return;o=m||l}t._leaveCb&&t._leaveCb(!0);const s=_[b];s&&Wo(e,s)&&s.el._leaveCb&&s.el._leaveCb(),S(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=g||c,o=v||a,s=y||u}let i=!1;const l=e._enterCb=t=>{i||(i=!0,S(t?s:o,[e]),x.delayedLeave&&x.delayedLeave(),e._enterCb=void 0)};t?(t(e,l),t.length<=1&&l()):l()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();S(p,[t]);let s=!1;const i=t._leaveCb=n=>{s||(s=!0,o(),S(n?h:d,[t]),t._leaveCb=void 0,_[r]===e&&delete _[r])};_[r]=e,f?(f(t,i),f.length<=1&&i()):i()},clone:e=>cn(e,t,n,o)};return x}function an(e){if(gn(e))return(e=Qo(e)).children=null,e}function un(e){return gn(e)?e.children?e.children[0]:void 0:e}function pn(e,t){6&e.shapeFlag&&e.component?pn(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function fn(e,t=!1){let n=[],o=0;for(let r=0;r<e.length;r++){const s=e[r];s.type===Fo?(128&s.patchFlag&&o++,n=n.concat(fn(s.children,t))):(t||s.type!==Mo)&&n.push(s)}if(o>1)for(let r=0;r<n.length;r++)n[r].patchFlag=-2;return n}function dn(e){return F(e)?{setup:e,name:e.name}:e}const hn=e=>!!e.type.__asyncLoader;function mn(e,{vnode:{ref:t,props:n,children:o}}){const r=Jo(e,n,o);return r.ref=t,r}const gn=e=>e.type.__isKeepAlive,vn={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=pr(),o=n.ctx;if(!o.renderer)return t.default;const r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:p}}}=o,f=p("div");function d(e){Cn(e),u(e,n,l)}function h(e){r.forEach(((t,n)=>{const o=wr(t.type);!o||e&&e(o)||m(n)}))}function m(e){const t=r.get(e);i&&t.type===i.type?i&&Cn(i):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,l),c(s.vnode,e,t,n,s,l,o,e.slotScopeIds,r),mo((()=>{s.isDeactivated=!1,s.a&&J(s.a);const t=e.props&&e.props.onVnodeMounted;t&&_o(t,s.parent,e)}),l)},o.deactivate=e=>{const t=e.component;a(e,f,null,1,l),mo((()=>{t.da&&J(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&_o(n,t.parent,e),t.isDeactivated=!0}),l)},os((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>yn(e,t))),t&&h((e=>!yn(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&r.set(g,wn(n.subTree))};return En(v),Rn(v),Fn((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=wn(t);if(e.type!==r.type)d(e);else{Cn(r);const e=r.component.da;e&&mo(e,o)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!(Do(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return i=null,o;let l=wn(o);const c=l.type,a=wr(hn(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:p,max:f}=e;if(u&&(!a||!yn(u,a))||p&&a&&yn(p,a))return i=l,o;const d=null==l.key?c:l.key,h=r.get(d);return l.el&&(l=Qo(l),128&o.shapeFlag&&(o.ssContent=l)),g=d,h?(l.el=h.el,l.component=h.component,l.transition&&pn(l,l.transition),l.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),f&&s.size>parseInt(f,10)&&m(s.values().next().value)),l.shapeFlag|=256,i=l,o}}};function yn(e,t){return N(e)?e.some((e=>yn(e,t))):A(e)?e.split(",").indexOf(t)>-1:!!e.test&&e.test(t)}function bn(e,t){Sn(e,"a",t)}function _n(e,t){Sn(e,"da",t)}function Sn(e,t,n=ur){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}e()});if(kn(t,o,n),n){let e=n.parent;for(;e&&e.parent;)gn(e.parent.vnode)&&xn(o,t,n,e),e=e.parent}}function xn(e,t,n,o){const r=kn(t,e,o,!0);An((()=>{w(o[t],r)}),n)}function Cn(e){let t=e.shapeFlag;256&t&&(t-=256),512&t&&(t-=512),e.shapeFlag=t}function wn(e){return 128&e.shapeFlag?e.ssContent:e}function kn(e,t,n=ur,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;ge(),fr(n);const r=Fr(t,n,e,o);return dr(),ve(),r});return o?r.unshift(s):r.push(s),s}}const Tn=e=>(t,n=ur)=>(!vr||"sp"===e)&&kn(e,t,n),Nn=Tn("bm"),En=Tn("m"),$n=Tn("bu"),Rn=Tn("u"),Fn=Tn("bum"),An=Tn("um"),Mn=Tn("sp"),On=Tn("rtg"),Pn=Tn("rtc");function In(e,t=ur){kn("ec",e,t)}let Vn=!0;function Bn(e){const t=Un(e),n=e.proxy,o=e.ctx;Vn=!1,t.beforeCreate&&Ln(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:i,watch:l,provide:c,inject:a,created:u,beforeMount:p,mounted:f,beforeUpdate:d,updated:h,activated:m,deactivated:g,beforeUnmount:v,unmounted:b,render:_,renderTracked:S,renderTriggered:x,errorCaptured:C,serverPrefetch:w,expose:k,inheritAttrs:T,components:E,directives:$}=t;if(a&&function(e,t,n=y,o=!1){N(e)&&(e=zn(e));for(const r in e){const n=e[r];let s;s=O(n)?"default"in n?nn(n.from||r,n.default,!0):nn(n.from||r):nn(n),wt(s)&&o?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[r]=s}}(a,o,null,e.appContext.config.unwrapInjectedRef),i)for(const y in i){const e=i[y];F(e)&&(o[y]=e.bind(n))}if(r){const t=r.call(n,n);O(t)&&(e.data=ft(t))}if(Vn=!0,s)for(const N in s){const e=s[N],t=Pt({get:F(e)?e.bind(n,n):F(e.get)?e.get.bind(n,n):y,set:!F(e)&&F(e.set)?e.set.bind(n):y});Object.defineProperty(o,N,{enumerable:!0,configurable:!0,get:()=>t.value,set:e=>t.value=e})}if(l)for(const y in l)jn(l[y],o,n,y);if(c){const e=F(c)?c.call(n):c;Reflect.ownKeys(e).forEach((t=>{tn(t,e[t])}))}function R(e,t){N(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&Ln(u,e,"c"),R(Nn,p),R(En,f),R($n,d),R(Rn,h),R(bn,m),R(_n,g),R(In,C),R(Pn,S),R(On,x),R(Fn,v),R(An,b),R(Mn,w),N(k))if(k.length){const t=e.exposed||(e.exposed={});k.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});_&&e.render===y&&(e.render=_),null!=T&&(e.inheritAttrs=T),E&&(e.components=E),$&&(e.directives=$)}function Ln(e,t,n){Fr(N(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function jn(e,t,n,o){const r=o.includes(".")?is(n,o):()=>n[o];if(A(e)){const n=t[e];F(n)&&os(r,n)}else if(F(e))os(r,e.bind(n));else if(O(e))if(N(e))e.forEach((e=>jn(e,t,n,o)));else{const o=F(e.handler)?e.handler.bind(n):t[e.handler];F(o)&&os(r,o,e)}}function Un(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||n||o?(c={},r.length&&r.forEach((e=>Hn(c,e,i,!0))),Hn(c,t,i)):c=t,s.set(t,c),c}function Hn(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&Hn(e,s,n,!0),r&&r.forEach((t=>Hn(e,t,n,!0)));for(const i in t)if(o&&"expose"===i);else{const o=Dn[i]||n&&n[i];e[i]=o?o(e[i],t[i]):t[i]}return e}const Dn={data:Wn,props:Gn,emits:Gn,methods:Gn,computed:Gn,beforeCreate:Kn,created:Kn,beforeMount:Kn,mounted:Kn,beforeUpdate:Kn,updated:Kn,beforeDestroy:Kn,destroyed:Kn,activated:Kn,deactivated:Kn,errorCaptured:Kn,serverPrefetch:Kn,components:Gn,directives:Gn,watch:function(e,t){if(!e)return t;if(!t)return e;const n=C(Object.create(null),e);for(const o in t)n[o]=Kn(e[o],t[o]);return n},provide:Wn,inject:function(e,t){return Gn(zn(e),zn(t))}};function Wn(e,t){return t?e?function(){return C(F(e)?e.call(this,this):e,F(t)?t.call(this,this):t)}:t:e}function zn(e){if(N(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Kn(e,t){return e?[...new Set([].concat(e,t))]:t}function Gn(e,t){return e?C(C(Object.create(null),e),t):t}function qn(e,t,n,o){const[r,s]=e.propsOptions;let i,l=!1;if(t)for(let c in t){if(j(c))continue;const a=t[c];let u;r&&T(r,u=D(c))?s&&s.includes(u)?(i||(i={}))[u]=a:n[u]=a:Bt(e.emitsOptions,c)||a!==o[c]&&(o[c]=a,l=!0)}if(s){const t=bt(n),o=i||g;for(let i=0;i<s.length;i++){const l=s[i];n[l]=Jn(r,t,l,o[l],e,!T(o,l))}}return l}function Jn(e,t,n,o,r,s){const i=e[n];if(null!=i){const e=T(i,"default");if(e&&void 0===o){const e=i.default;if(i.type!==Function&&F(e)){const{propsDefaults:s}=r;n in s?o=s[n]:(fr(r),o=s[n]=e.call(null,t),dr())}else o=e}i[0]&&(s&&!e?o=!1:!i[1]||""!==o&&o!==z(n)||(o=!0))}return o}function Zn(e,t,n=!1){const o=t.propsCache,r=o.get(e);if(r)return r;const s=e.props,i={},l=[];let c=!1;if(!F(e)){const o=e=>{c=!0;const[n,o]=Zn(e,t,!0);C(i,n),o&&l.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!c)return o.set(e,v),v;if(N(s))for(let u=0;u<s.length;u++){const e=D(s[u]);Qn(e)&&(i[e]=g)}else if(s)for(const u in s){const e=D(u);if(Qn(e)){const t=s[u],n=i[e]=N(t)||F(t)?{type:t}:t;if(n){const t=eo(Boolean,n.type),o=eo(String,n.type);n[0]=t>-1,n[1]=o<0||t<o,(t>-1||T(n,"default"))&&l.push(e)}}}const a=[i,l];return o.set(e,a),a}function Qn(e){return"$"!==e[0]}function Xn(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function Yn(e,t){return Xn(e)===Xn(t)}function eo(e,t){return N(t)?t.findIndex((t=>Yn(t,e))):F(t)&&Yn(t,e)?0:-1}const to=e=>"_"===e[0]||"$stable"===e,no=e=>N(e)?e.map(Yo):[Yo(e)],oo=(e,t,n)=>{const o=Ht(((...e)=>no(t(...e))),n);return o._c=!1,o},ro=(e,t,n)=>{const o=e._ctx;for(const r in e){if(to(r))continue;const n=e[r];if(F(n))t[r]=oo(0,n,o);else if(null!=n){const e=no(n);t[r]=()=>e}}},so=(e,t)=>{const n=no(t);e.slots.default=()=>n};function io(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];s&&(l.oldValue=s[i].value);let c=l.dir[o];c&&(ge(),Fr(c,n,8,[e.el,l,e,t]),ve())}}function lo(){return{app:null,config:{isNativeTag:b,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let co=0;function ao(e,t){return function(n,o=null){null==o||O(o)||(o=null);const r=lo(),s=new Set;let i=!1;const l=r.app={_uid:co++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:fs,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&F(e.install)?(s.add(e),e.install(l,...t)):F(e)&&(s.add(e),e(l,...t))),l),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),l),component:(e,t)=>t?(r.components[e]=t,l):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,l):r.directives[e],mount(s,c,a){if(!i){const u=Jo(n,o);return u.appContext=r,c&&t?t(u,s):e(u,s,a),i=!0,l._container=s,s.__vue_app__=l,u.component.proxy}},unmount(){i&&(e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,l)};return l}}let uo=!1;const po=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,fo=e=>8===e.nodeType;function ho(e){const{mt:t,p:n,o:{patchProp:o,nextSibling:r,parentNode:s,remove:i,insert:l,createComment:c}}=e,a=(n,o,i,l,c,m=!1)=>{const g=fo(n)&&"["===n.data,v=()=>d(n,o,i,l,c,g),{type:y,ref:b,shapeFlag:_}=o,S=n.nodeType;o.el=n;let x=null;switch(y){case Ao:3!==S?x=v():(n.data!==o.children&&(uo=!0,n.data=o.children),x=r(n));break;case Mo:x=8!==S||g?v():r(n);break;case Oo:if(1===S){x=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=x.outerHTML),t===o.staticCount-1&&(o.anchor=x),x=r(x);return x}x=v();break;case Fo:x=g?f(n,o,i,l,c,m):v();break;default:if(1&_)x=1!==S||o.type.toLowerCase()!==n.tagName.toLowerCase()?v():u(n,o,i,l,c,m);else if(6&_){o.slotScopeIds=c;const e=s(n);if(t(o,e,null,i,l,po(e),m),x=g?h(n):r(n),hn(o)){let t;g?(t=Jo(Fo),t.anchor=x?x.previousSibling:e.lastChild):t=3===n.nodeType?Xo(""):Jo("div"),t.el=n,o.component.subTree=t}}else 64&_?x=8!==S?v():o.type.hydrate(n,o,i,l,c,m,e,p):128&_&&(x=o.type.hydrate(n,o,i,l,po(s(n)),c,m,e,a))}return null!=b&&bo(b,null,l,o),x},u=(e,t,n,r,s,l)=>{l=l||!!t.dynamicChildren;const{type:c,props:a,patchFlag:u,shapeFlag:f,dirs:d}=t,h="input"===c&&d||"option"===c;if(h||-1!==u){if(d&&io(t,null,n,"created"),a)if(h||!l||48&u)for(const t in a)(h&&t.endsWith("value")||S(t)&&!j(t))&&o(e,t,null,a[t]);else a.onClick&&o(e,"onClick",null,a.onClick);let c;if((c=a&&a.onVnodeBeforeMount)&&_o(c,n,t),d&&io(t,null,n,"beforeMount"),((c=a&&a.onVnodeMounted)||d)&&Yt((()=>{c&&_o(c,n,t),d&&io(t,null,n,"mounted")}),r),16&f&&(!a||!a.innerHTML&&!a.textContent)){let o=p(e.firstChild,t,e,n,r,s,l);for(;o;){uo=!0;const e=o;o=o.nextSibling,i(e)}}else 8&f&&e.textContent!==t.children&&(uo=!0,e.textContent=t.children)}return e.nextSibling},p=(e,t,o,r,s,i,l)=>{l=l||!!t.dynamicChildren;const c=t.children,u=c.length;for(let p=0;p<u;p++){const t=l?c[p]:c[p]=Yo(c[p]);if(e)e=a(e,t,r,s,i,l);else{if(t.type===Ao&&!t.children)continue;uo=!0,n(null,t,o,null,r,s,po(o),i)}}return e},f=(e,t,n,o,i,a)=>{const{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);const f=s(e),d=p(r(e),t,f,n,o,i,a);return d&&fo(d)&&"]"===d.data?r(t.anchor=d):(uo=!0,l(t.anchor=c("]"),f,d),d)},d=(e,t,o,l,c,a)=>{if(uo=!0,t.el=null,a){const t=h(e);for(;;){const n=r(e);if(!n||n===t)break;i(n)}}const u=r(e),p=s(e);return i(e),n(null,t,p,u,o,l,po(p),c),u},h=e=>{let t=0;for(;e;)if((e=r(e))&&fo(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return r(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),void Xr();uo=!1,a(t.firstChild,e,null,null,null),Xr(),uo&&console.error("Hydration completed but contains mismatches.")},a]}const mo=Yt;function go(e){return yo(e)}function vo(e){return yo(e,ho)}function yo(e,t){const{insert:n,remove:o,patchProp:r,createElement:s,createText:i,createComment:l,setText:c,setElementText:a,parentNode:u,nextSibling:p,setScopeId:f=y,cloneNode:d,insertStaticContent:h}=e,m=(e,t,n,o=null,r=null,s=null,i=!1,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Wo(e,t)&&(o=X(e),W(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:p}=t;switch(a){case Ao:b(e,t,n,o);break;case Mo:_(e,t,n,o);break;case Oo:null==e&&S(t,n,o,i);break;case Fo:F(e,t,n,o,r,s,i,l,c);break;default:1&p?x(e,t,n,o,r,s,i,l,c):6&p?A(e,t,n,o,r,s,i,l,c):(64&p||128&p)&&a.process(e,t,n,o,r,s,i,l,c,te)}null!=u&&r&&bo(u,e&&e.ref,s,t||e,!t)},b=(e,t,o,r)=>{if(null==e)n(t.el=i(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},_=(e,t,o,r)=>{null==e?n(t.el=l(t.children||""),o,r):t.el=e.el},S=(e,t,n,o)=>{[e.el,e.anchor]=h(e.children,t,n,o)},x=(e,t,n,o,r,s,i,l,c)=>{i=i||"svg"===t.type,null==e?w(t,n,o,r,s,i,l,c):E(e,t,r,s,i,l,c)},w=(e,t,o,i,l,c,u,p)=>{let f,h;const{type:m,props:g,shapeFlag:v,transition:y,patchFlag:b,dirs:_}=e;if(e.el&&void 0!==d&&-1===b)f=e.el=d(e.el);else{if(f=e.el=s(e.type,c,g&&g.is,g),8&v?a(f,e.children):16&v&&N(e.children,f,null,i,l,c&&"foreignObject"!==m,u,p),_&&io(e,null,i,"created"),g){for(const t in g)"value"===t||j(t)||r(f,t,null,g[t],c,e.children,i,l,Q);"value"in g&&r(f,"value",null,g.value),(h=g.onVnodeBeforeMount)&&_o(h,i,e)}k(f,e,e.scopeId,u,i)}_&&io(e,null,i,"beforeMount");const S=(!l||l&&!l.pendingBranch)&&y&&!y.persisted;S&&y.beforeEnter(f),n(f,t,o),((h=g&&g.onVnodeMounted)||S||_)&&mo((()=>{h&&_o(h,i,e),S&&y.enter(f),_&&io(e,null,i,"mounted")}),l)},k=(e,t,n,o,r)=>{if(n&&f(e,n),o)for(let s=0;s<o.length;s++)f(e,o[s]);if(r){if(t===r.subTree){const t=r.vnode;k(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},N=(e,t,n,o,r,s,i,l,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=l?er(e[a]):Yo(e[a]);m(null,c,t,n,o,r,s,i,l)}},E=(e,t,n,o,s,i,l)=>{const c=t.el=e.el;let{patchFlag:u,dynamicChildren:p,dirs:f}=t;u|=16&e.patchFlag;const d=e.props||g,h=t.props||g;let m;(m=h.onVnodeBeforeUpdate)&&_o(m,n,t,e),f&&io(t,e,n,"beforeUpdate");const v=s&&"foreignObject"!==t.type;if(p?$(e.dynamicChildren,p,c,n,o,v,i):l||B(e,t,c,null,n,o,v,i,!1),u>0){if(16&u)R(c,t,d,h,n,o,s);else if(2&u&&d.class!==h.class&&r(c,"class",null,h.class,s),4&u&&r(c,"style",d.style,h.style,s),8&u){const i=t.dynamicProps;for(let t=0;t<i.length;t++){const l=i[t],a=d[l],u=h[l];u===a&&"value"!==l||r(c,l,a,u,s,e.children,n,o,Q)}}1&u&&e.children!==t.children&&a(c,t.children)}else l||null!=p||R(c,t,d,h,n,o,s);((m=h.onVnodeUpdated)||f)&&mo((()=>{m&&_o(m,n,t,e),f&&io(t,e,n,"updated")}),o)},$=(e,t,n,o,r,s,i)=>{for(let l=0;l<t.length;l++){const c=e[l],a=t[l],p=c.el&&(c.type===Fo||!Wo(c,a)||70&c.shapeFlag)?u(c.el):n;m(c,a,p,null,o,r,s,i,!0)}},R=(e,t,n,o,s,i,l)=>{if(n!==o){for(const c in o){if(j(c))continue;const a=o[c],u=n[c];a!==u&&"value"!==c&&r(e,c,u,a,l,t.children,s,i,Q)}if(n!==g)for(const c in n)j(c)||c in o||r(e,c,n[c],null,l,t.children,s,i,Q);"value"in o&&r(e,"value",n.value,o.value)}},F=(e,t,o,r,s,l,c,a,u)=>{const p=t.el=e?e.el:i(""),f=t.anchor=e?e.anchor:i("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(a=a?a.concat(m):m),null==e?(n(p,o,r),n(f,o,r),N(t.children,o,f,s,l,c,a,u)):d>0&&64&d&&h&&e.dynamicChildren?($(e.dynamicChildren,h,o,s,l,c,a),(null!=t.key||s&&t===s.subTree)&&So(e,t,!0)):B(e,t,o,f,s,l,c,a,u)},A=(e,t,n,o,r,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,c):M(t,n,o,r,s,i,c):O(e,t,c)},M=(e,t,n,o,r,s,i)=>{const l=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||cr,s={uid:ar++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,update:null,scope:new ee(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Zn(o,r),emitsOptions:Vt(o,r),emit:null,emitted:null,propsDefaults:g,inheritAttrs:o.inheritAttrs,ctx:g,data:g,props:g,attrs:g,slots:g,refs:g,setupState:g,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};s.ctx={_:s},s.root=t?t.root:s,s.emit=It.bind(null,s),e.ce&&e.ce(s);return s}(e,o,r);if(gn(e)&&(l.ctx.renderer=te),function(e,t=!1){vr=t;const{props:n,children:o}=e.vnode,r=hr(e);(function(e,t,n,o=!1){const r={},s={};Z(s,zo,1),e.propsDefaults=Object.create(null),qn(e,t,r,s);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);e.props=n?o?r:dt(r):e.type.props?r:s,e.attrs=s})(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=bt(t),Z(t,"_",n)):ro(t,e.slots={})}else e.slots={},t&&so(e,t);Z(e.slots,zo,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=_t(new Proxy(e.ctx,ir));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?Sr(e):null;fr(e),ge();const r=Rr(o,e,0,[e.props,n]);if(ve(),dr(),P(r)){if(r.then(dr,dr),t)return r.then((t=>{yr(e,t)})).catch((t=>{Ar(t,e,0)}));e.asyncDep=r}else yr(e,r)}else _r(e)}(e,t):void 0;vr=!1}(l),l.asyncDep){if(r&&r.registerDep(l,I),!e.el){const e=l.subTree=Jo(Mo);_(null,e,t,n)}}else I(l,e,t,n,r,s,i)},O=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||Gt(o,i,a):!!i);if(1024&c)return!0;if(16&c)return o?Gt(o,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(i[n]!==o[n]&&!Bt(a,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void V(o,t,n);o.next=t,function(e){const t=Pr.indexOf(e);t>Ir&&Pr.splice(t,1)}(o.update),o.update()}else t.component=e.component,t.el=e.el,o.vnode=t},I=(e,t,n,o,r,s,i)=>{const l=new fe((()=>{if(e.isMounted){let t,{next:n,bu:o,u:c,parent:a,vnode:p}=e,f=n;l.allowRecurse=!1,n?(n.el=p.el,V(e,n,i)):n=p,o&&J(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&_o(t,a,n,p),l.allowRecurse=!0;const d=Dt(e),h=e.subTree;e.subTree=d,m(h,d,u(h.el),X(h),e,r,s),n.el=d.el,null===f&&qt(e,d.el),c&&mo(c,r),(t=n.props&&n.props.onVnodeUpdated)&&mo((()=>_o(t,a,n,p)),r)}else{let i;const{el:c,props:a}=t,{bm:u,m:p,parent:f}=e,d=hn(t);if(l.allowRecurse=!1,u&&J(u),!d&&(i=a&&a.onVnodeBeforeMount)&&_o(i,f,t),l.allowRecurse=!0,c&&oe){const n=()=>{e.subTree=Dt(e),oe(c,e.subTree,e,r,null)};d?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const i=e.subTree=Dt(e);m(null,i,n,o,e,r,s),t.el=i.el}if(p&&mo(p,r),!d&&(i=a&&a.onVnodeMounted)){const e=t;mo((()=>_o(i,f,e)),r)}256&t.shapeFlag&&e.a&&mo(e.a,r),e.isMounted=!0,t=n=o=null}}),(()=>Gr(e.update)),e.scope),c=e.update=l.run.bind(l);c.id=e.uid,l.allowRecurse=c.allowRecurse=!0,c()},V=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=bt(r),[c]=e.propsOptions;let a=!1;if(!(o||i>0)||16&i){let o;qn(e,t,r,s)&&(a=!0);for(const s in l)t&&(T(t,s)||(o=z(s))!==s&&T(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=Jn(c,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&T(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let i=n[o];const u=t[i];if(c)if(T(s,i))u!==s[i]&&(s[i]=u,a=!0);else{const t=D(i);r[t]=Jn(c,l,t,u,e,!1)}else u!==s[i]&&(s[i]=u,a=!0)}}a&&Se(e,"set","$attrs")}(e,t.props,o,n),((e,t,n)=>{const{vnode:o,slots:r}=e;let s=!0,i=g;if(32&o.shapeFlag){const e=t._;e?n&&1===e?s=!1:(C(r,t),n||1!==e||delete r._):(s=!t.$stable,ro(t,r)),i=t}else t&&(so(e,t),i={default:1});if(s)for(const l in r)to(l)||l in i||delete r[l]})(e,t.children,n),ge(),Qr(void 0,e.update),ve()},B=(e,t,n,o,r,s,i,l,c=!1)=>{const u=e&&e.children,p=e?e.shapeFlag:0,f=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void U(u,f,n,o,r,s,i,l,c);if(256&d)return void L(u,f,n,o,r,s,i,l,c)}8&h?(16&p&&Q(u,r,s),f!==u&&a(n,f)):16&p?16&h?U(u,f,n,o,r,s,i,l,c):Q(u,r,s,!0):(8&p&&a(n,""),16&h&&N(f,n,o,r,s,i,l,c))},L=(e,t,n,o,r,s,i,l,c)=>{const a=(e=e||v).length,u=(t=t||v).length,p=Math.min(a,u);let f;for(f=0;f<p;f++){const o=t[f]=c?er(t[f]):Yo(t[f]);m(e[f],o,n,null,r,s,i,l,c)}a>u?Q(e,r,s,!0,!1,p):N(t,n,o,r,s,i,l,c,p)},U=(e,t,n,o,r,s,i,l,c)=>{let a=0;const u=t.length;let p=e.length-1,f=u-1;for(;a<=p&&a<=f;){const o=e[a],u=t[a]=c?er(t[a]):Yo(t[a]);if(!Wo(o,u))break;m(o,u,n,null,r,s,i,l,c),a++}for(;a<=p&&a<=f;){const o=e[p],a=t[f]=c?er(t[f]):Yo(t[f]);if(!Wo(o,a))break;m(o,a,n,null,r,s,i,l,c),p--,f--}if(a>p){if(a<=f){const e=f+1,p=e<u?t[e].el:o;for(;a<=f;)m(null,t[a]=c?er(t[a]):Yo(t[a]),n,p,r,s,i,l,c),a++}}else if(a>f)for(;a<=p;)W(e[a],r,s,!0),a++;else{const d=a,h=a,g=new Map;for(a=h;a<=f;a++){const e=t[a]=c?er(t[a]):Yo(t[a]);null!=e.key&&g.set(e.key,a)}let y,b=0;const _=f-h+1;let S=!1,x=0;const C=new Array(_);for(a=0;a<_;a++)C[a]=0;for(a=d;a<=p;a++){const o=e[a];if(b>=_){W(o,r,s,!0);continue}let u;if(null!=o.key)u=g.get(o.key);else for(y=h;y<=f;y++)if(0===C[y-h]&&Wo(o,t[y])){u=y;break}void 0===u?W(o,r,s,!0):(C[u-h]=a+1,u>=x?x=u:S=!0,m(o,t[u],n,null,r,s,i,l,c),b++)}const w=S?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(r=n[n.length-1],e[r]<c){t[o]=r,n.push(o);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<c?s=l+1:i=l;c<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(C):v;for(y=w.length-1,a=_-1;a>=0;a--){const e=h+a,p=t[e],f=e+1<u?t[e+1].el:o;0===C[a]?m(null,p,n,f,r,s,i,l,c):S&&(y<0||a!==w[y]?H(p,n,f,2):y--)}}},H=(e,t,o,r,s=null)=>{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void H(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void l.move(e,t,o,te);if(l===Fo){n(i,t,o);for(let e=0;e<a.length;e++)H(a[e],t,o,r);return void n(e.anchor,t,o)}if(l===Oo)return void(({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=p(e),n(e,o,r),e=s;n(t,o,r)})(e,t,o);if(2!==r&&1&u&&c)if(0===r)c.beforeEnter(i),n(i,t,o),mo((()=>c.enter(i)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,l=()=>n(i,t,o),a=()=>{e(i,(()=>{l(),s&&s()}))};r?r(i,l,a):a()}else n(i,t,o)},W=(e,t,n,o=!1,r=!1)=>{const{type:s,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:p,dirs:f}=e;if(null!=l&&bo(l,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&f,h=!hn(e);let m;if(h&&(m=i&&i.onVnodeBeforeUnmount)&&_o(m,t,e),6&u)q(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&io(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,te,o):a&&(s!==Fo||p>0&&64&p)?Q(a,t,n,!1,!0):(s===Fo&&384&p||!r&&16&u)&&Q(c,t,n),o&&K(e)}(h&&(m=i&&i.onVnodeUnmounted)||d)&&mo((()=>{m&&_o(m,t,e),d&&io(e,null,t,"unmounted")}),n)},K=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===Fo)return void G(n,r);if(t===Oo)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=p(e),o(e),e=n;o(t)})(e);const i=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,i);o?o(e.el,i,r):r()}else i()},G=(e,t)=>{let n;for(;e!==t;)n=p(e),o(e),e=n;o(t)},q=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:i,um:l}=e;o&&J(o),r.stop(),s&&(s.active=!1,W(i,e,t,n)),l&&mo(l,t),mo((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},Q=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i<e.length;i++)W(e[i],t,n,o,r)},X=e=>6&e.shapeFlag?X(e.component.subTree):128&e.shapeFlag?e.suspense.next():p(e.anchor||e.el),Y=(e,t,n)=>{null==e?t._vnode&&W(t._vnode,null,null,!0):m(t._vnode||null,e,t,null,null,null,n),Xr(),t._vnode=e},te={p:m,um:W,m:H,r:K,mt:M,mc:N,pc:B,pbc:$,n:X,o:e};let ne,oe;return t&&([ne,oe]=t(te)),{render:Y,hydrate:ne,createApp:ao(Y,ne)}}function bo(e,t,n,o,r=!1){if(N(e))return void e.forEach(((e,s)=>bo(e,t&&(N(t)?t[s]:t),n,o,r)));if(hn(o)&&!r)return;const s=4&o.shapeFlag?xr(o.component)||o.component.proxy:o.el,i=r?null:s,{i:l,r:c}=e,a=t&&t.r,u=l.refs===g?l.refs={}:l.refs,p=l.setupState;if(null!=a&&a!==c&&(A(a)?(u[a]=null,T(p,a)&&(p[a]=null)):wt(a)&&(a.value=null)),A(c)){const e=()=>{u[c]=i,T(p,c)&&(p[c]=i)};i?(e.id=-1,mo(e,n)):e()}else if(wt(c)){const e=()=>{c.value=i};i?(e.id=-1,mo(e,n)):e()}else F(c)&&Rr(c,l,12,[i,u])}function _o(e,t,n,o=null){Fr(e,t,7,[n,o])}function So(e,t,n=!1){const o=e.children,r=t.children;if(N(o)&&N(r))for(let s=0;s<o.length;s++){const e=o[s];let t=r[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=r[s]=er(r[s]),t.el=e.el),n||So(e,t))}}const xo=e=>e&&(e.disabled||""===e.disabled),Co=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,wo=(e,t)=>{const n=e&&e.to;if(A(n)){if(t){return t(n)}return null}return n};function ko(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,p=2===s;if(p&&o(i,t,n),(!p||xo(u))&&16&c)for(let f=0;f<a.length;f++)r(a[f],t,n,2);p&&o(l,t,n)}const To={__isTeleport:!0,process(e,t,n,o,r,s,i,l,c,a){const{mc:u,pc:p,pbc:f,o:{insert:d,querySelector:h,createText:m}}=a,g=xo(t.props);let{shapeFlag:v,children:y,dynamicChildren:b}=t;if(null==e){const e=t.el=m(""),a=t.anchor=m("");d(e,n,o),d(a,n,o);const p=t.target=wo(t.props,h),f=t.targetAnchor=m("");p&&(d(f,p),i=i||Co(p));const b=(e,t)=>{16&v&&u(y,e,t,r,s,i,l,c)};g?b(n,a):p&&b(p,f)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,m=xo(e.props),v=m?n:u,y=m?o:d;if(i=i||Co(u),b?(f(e.dynamicChildren,b,v,r,s,i,l),So(e,t,!0)):c||p(e,t,v,y,r,s,i,l,!1),g)m||ko(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=wo(t.props,h);e&&ko(t,e,null,a,0)}else m&&ko(t,u,d,a,1)}},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:l,children:c,anchor:a,targetAnchor:u,target:p,props:f}=e;if(p&&s(u),(i||!xo(f))&&(s(a),16&l))for(let d=0;d<c.length;d++){const e=c[d];r(e,t,n,!0,!!e.dynamicChildren)}},move:ko,hydrate:function(e,t,n,o,r,s,{o:{nextSibling:i,parentNode:l,querySelector:c}},a){const u=t.target=wo(t.props,c);if(u){const c=u._lpa||u.firstChild;16&t.shapeFlag&&(xo(t.props)?(t.anchor=a(i(e),t,l(e),n,o,r,s),t.targetAnchor=c):(t.anchor=i(e),t.targetAnchor=a(c,t,u,n,o,r,s)),u._lpa=t.targetAnchor&&i(t.targetAnchor))}return t.anchor&&i(t.anchor)}},No="components";const Eo=Symbol();function $o(e,t,n=!0,o=!1){const r=Lt||ur;if(r){const n=r.type;if(e===No){const e=wr(n);if(e&&(e===t||e===D(t)||e===K(D(t))))return n}const s=Ro(r[e]||n[e],t)||Ro(r.appContext[e],t);return!s&&o?n:s}}function Ro(e,t){return e&&(e[t]||e[D(t)]||e[K(D(t))])}const Fo=Symbol(void 0),Ao=Symbol(void 0),Mo=Symbol(void 0),Oo=Symbol(void 0),Po=[];let Io=null;function Vo(e=!1){Po.push(Io=e?null:[])}function Bo(){Po.pop(),Io=Po[Po.length-1]||null}let Lo=1;function jo(e){Lo+=e}function Uo(e){return e.dynamicChildren=Lo>0?Io||v:null,Bo(),Lo>0&&Io&&Io.push(e),e}function Ho(e,t,n,o,r){return Uo(Jo(e,t,n,o,r,!0))}function Do(e){return!!e&&!0===e.__v_isVNode}function Wo(e,t){return e.type===t.type&&e.key===t.key}const zo="__vInternal",Ko=({key:e})=>null!=e?e:null,Go=({ref:e})=>null!=e?A(e)||wt(e)||F(e)?{i:Lt,r:e}:e:null;function qo(e,t=null,n=null,o=0,r=null,s=(e===Fo?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ko(t),ref:t&&Go(t),scopeId:jt,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null};return l?(tr(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=A(n)?8:16),Lo>0&&!i&&Io&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&Io.push(c),c}const Jo=function(e,t=null,n=null,o=0,r=null,i=!1){e&&e!==Eo||(e=Mo);if(Do(e)){const o=Qo(e,t,!0);return n&&tr(o,n),o}l=e,F(l)&&"__vccOpts"in l&&(e=e.__vccOpts);var l;if(t){t=Zo(t);let{class:e,style:n}=t;e&&!A(e)&&(t.class=a(e)),O(n)&&(yt(n)&&!N(n)&&(n=C({},n)),t.style=s(n))}const c=A(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:O(e)?4:F(e)?2:0;return qo(e,t,n,o,r,c,i,!0)};function Zo(e){return e?yt(e)||zo in e?C({},e):e:null}function Qo(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,l=t?nr(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Ko(l),ref:t&&t.ref?n&&r?N(r)?r.concat(Go(t)):[r,Go(t)]:Go(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Fo?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Qo(e.ssContent),ssFallback:e.ssFallback&&Qo(e.ssFallback),el:e.el,anchor:e.anchor}}function Xo(e=" ",t=0){return Jo(Ao,null,e,t)}function Yo(e){return null==e||"boolean"==typeof e?Jo(Mo):N(e)?Jo(Fo,null,e.slice()):"object"==typeof e?er(e):Jo(Ao,null,String(e))}function er(e){return null===e.el||e.memo?e:Qo(e)}function tr(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(N(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),tr(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||zo in t?3===o&&Lt&&(1===Lt.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Lt}}else F(t)?(t={default:t,_ctx:Lt},n=32):(t=String(t),64&o?(n=16,t=[Xo(t)]):n=8);e.children=t,e.shapeFlag|=n}function nr(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=a([t.class,o.class]));else if("style"===e)t.style=s([t.style,o.style]);else if(S(e)){const n=t[e],r=o[e];n!==r&&(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}function or(e){return e.some((e=>!Do(e)||e.type!==Mo&&!(e.type===Fo&&!or(e.children))))?e:null}const rr=e=>e?hr(e)?xr(e)||e.proxy:rr(e.parent):null,sr=C(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>rr(e.parent),$root:e=>rr(e.root),$emit:e=>e.emit,$options:e=>Un(e),$forceUpdate:e=>()=>Gr(e.update),$nextTick:e=>Kr.bind(e.proxy),$watch:e=>ss.bind(e)}),ir={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:i,type:l,appContext:c}=e;let a;if("$"!==t[0]){const l=i[t];if(void 0!==l)switch(l){case 0:return o[t];case 1:return r[t];case 3:return n[t];case 2:return s[t]}else{if(o!==g&&T(o,t))return i[t]=0,o[t];if(r!==g&&T(r,t))return i[t]=1,r[t];if((a=e.propsOptions[0])&&T(a,t))return i[t]=2,s[t];if(n!==g&&T(n,t))return i[t]=3,n[t];Vn&&(i[t]=4)}}const u=sr[t];let p,f;return u?("$attrs"===t&&ye(e,0,t),u(e)):(p=l.__cssModules)&&(p=p[t])?p:n!==g&&T(n,t)?(i[t]=3,n[t]):(f=c.config.globalProperties,T(f,t)?f[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;if(r!==g&&T(r,t))r[t]=n;else if(o!==g&&T(o,t))o[t]=n;else if(T(e.props,t))return!1;return("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},i){let l;return void 0!==n[i]||e!==g&&T(e,i)||t!==g&&T(t,i)||(l=s[0])&&T(l,i)||T(o,i)||T(sr,i)||T(r.config.globalProperties,i)}},lr=C({},ir,{get(e,t){if(t!==Symbol.unscopables)return ir.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!n(t)}),cr=lo();let ar=0;let ur=null;const pr=()=>ur||Lt,fr=e=>{ur=e,e.scope.on()},dr=()=>{ur&&ur.scope.off(),ur=null};function hr(e){return 4&e.vnode.shapeFlag}let mr,gr,vr=!1;function yr(e,t,n){F(t)?e.render=t:O(t)&&(e.setupState=Rt(t)),_r(e)}function br(e){mr=e,gr=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,lr))}}function _r(e,t,n){const o=e.type;if(!e.render){if(mr&&!o.render){const t=o.template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:i}=o,l=C(C({isCustomElement:n,delimiters:s},r),i);o.render=mr(t,l)}}e.render=o.render||y,gr&&gr(e)}fr(e),ge(),Bn(e),ve(),dr()}function Sr(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get:(t,n)=>(ye(e,0,"$attrs"),t[n])})}(e))},slots:e.slots,emit:e.emit,expose:t}}function xr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Rt(_t(e.exposed)),{get:(t,n)=>n in t?t[n]:n in sr?sr[n](e):void 0}))}const Cr=/(?:^|[-_])(\w)/g;function wr(e){return F(e)&&e.displayName||e.name}function kr(e,t,n=!1){let o=wr(t);if(!o&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(o=e[1])}if(!o&&e&&e.parent){const n=e=>{for(const n in e)if(e[n]===t)return n};o=n(e.components||e.parent.type.components)||n(e.appContext.components)}return o?o.replace(Cr,(e=>e.toUpperCase())).replace(/[-_]/g,""):n?"App":"Anonymous"}const Tr=[];function Nr(e,...t){ge();const n=Tr.length?Tr[Tr.length-1].component:null,o=n&&n.appContext.config.warnHandler,r=function(){let e=Tr[Tr.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}();if(o)Rr(o,n,11,[e+t.join(""),n&&n.proxy,r.map((({vnode:e})=>`at <${kr(n,e.type)}>`)).join("\n"),r]);else{const n=[`[Vue warn]: ${e}`,...t];r.length&&n.push("\n",...function(e){const t=[];return e.forEach(((e,n)=>{t.push(...0===n?[]:["\n"],...function({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=` at <${kr(e.component,e.type,!!e.component&&null==e.component.parent)}`,r=">"+n;return e.props?[o,...Er(e.props),r]:[o+r]}(e))})),t}(r)),console.warn(...n)}ve()}function Er(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach((n=>{t.push(...$r(n,e[n]))})),n.length>3&&t.push(" ..."),t}function $r(e,t,n){return A(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?n?t:[`${e}=${t}`]:wt(t)?(t=$r(e,bt(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):F(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=bt(t),n?t:[`${e}=`,t])}function Rr(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){Ar(s,t,n)}return r}function Fr(e,t,n,o){if(F(e)){const r=Rr(e,t,n,o);return r&&P(r)&&r.catch((e=>{Ar(e,t,n)})),r}const r=[];for(let s=0;s<e.length;s++)r.push(Fr(e[s],t,n,o));return r}function Ar(e,t,n,o=!0){if(t){let o=t.parent;const r=t.proxy,s=n;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;o=o.parent}const i=t.appContext.config.errorHandler;if(i)return void Rr(i,null,10,[e,r,s])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let Mr=!1,Or=!1;const Pr=[];let Ir=0;const Vr=[];let Br=null,Lr=0;const jr=[];let Ur=null,Hr=0;const Dr=Promise.resolve();let Wr=null,zr=null;function Kr(e){const t=Wr||Dr;return e?t.then(this?e.bind(this):e):t}function Gr(e){Pr.length&&Pr.includes(e,Mr&&e.allowRecurse?Ir+1:Ir)||e===zr||(null==e.id?Pr.push(e):Pr.splice(function(e){let t=Ir+1,n=Pr.length;for(;t<n;){const o=t+n>>>1;Yr(Pr[o])<e?t=o+1:n=o}return t}(e.id),0,e),qr())}function qr(){Mr||Or||(Or=!0,Wr=Dr.then(es))}function Jr(e,t,n,o){N(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?o+1:o)||n.push(e),qr()}function Zr(e){Jr(e,Ur,jr,Hr)}function Qr(e,t=null){if(Vr.length){for(zr=t,Br=[...new Set(Vr)],Vr.length=0,Lr=0;Lr<Br.length;Lr++)Br[Lr]();Br=null,Lr=0,zr=null,Qr(e,t)}}function Xr(e){if(jr.length){const e=[...new Set(jr)];if(jr.length=0,Ur)return void Ur.push(...e);for(Ur=e,Ur.sort(((e,t)=>Yr(e)-Yr(t))),Hr=0;Hr<Ur.length;Hr++)Ur[Hr]();Ur=null,Hr=0}}const Yr=e=>null==e.id?1/0:e.id;function es(e){Or=!1,Mr=!0,Qr(e),Pr.sort(((e,t)=>Yr(e)-Yr(t)));try{for(Ir=0;Ir<Pr.length;Ir++){const e=Pr[Ir];e&&!1!==e.active&&Rr(e,null,14)}}finally{Ir=0,Pr.length=0,Xr(),Mr=!1,Wr=null,(Pr.length||Vr.length||jr.length)&&es(e)}}function ts(e,t){return rs(e,null,{flush:"post"})}const ns={};function os(e,t,n){return rs(e,t,n)}function rs(e,t,{immediate:n,deep:o,flush:r}=g){const s=ur;let i,l,c=!1,a=!1;if(wt(e)?(i=()=>e.value,c=!!e._shallow):gt(e)?(i=()=>e,o=!0):N(e)?(a=!0,c=e.some(gt),i=()=>e.map((e=>wt(e)?e.value:gt(e)?ls(e):F(e)?Rr(e,s,2):void 0))):i=F(e)?t?()=>Rr(e,s,2):()=>{if(!s||!s.isUnmounted)return l&&l(),Fr(e,s,3,[u])}:y,t&&o){const e=i;i=()=>ls(e())}let u=e=>{l=h.onStop=()=>{Rr(e,s,4)}},p=a?[]:ns;const f=()=>{if(h.active)if(t){const e=h.run();(o||c||(a?e.some(((e,t)=>q(e,p[t]))):q(e,p)))&&(l&&l(),Fr(t,s,3,[e,p===ns?void 0:p,u]),p=e)}else h.run()};let d;f.allowRecurse=!!t,d="sync"===r?f:"post"===r?()=>mo(f,s&&s.suspense):()=>{!s||s.isMounted?function(e){Jr(e,Br,Vr,Lr)}(f):f()};const h=new fe(i,d);return t?n?f():p=h.run():"post"===r?mo(h.run.bind(h),s&&s.suspense):h.run(),()=>{h.stop(),s&&s.scope&&w(s.scope.effects,h)}}function ss(e,t,n){const o=this.proxy,r=A(e)?e.includes(".")?is(o,e):()=>o[e]:e.bind(o,o);let s;F(t)?s=t:(s=t.handler,n=t);const i=ur;fr(this);const l=rs(r,s.bind(o),n);return i?fr(i):dr(),l}function is(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function ls(e,t=new Set){if(!O(e)||e.__v_skip)return e;if((t=t||new Set).has(e))return e;if(t.add(e),wt(e))ls(e.value,t);else if(N(e))for(let n=0;n<e.length;n++)ls(e[n],t);else if($(e)||E(e))e.forEach((e=>{ls(e,t)}));else if(B(e))for(const n in e)ls(e[n],t);return e}function cs(){const e=pr();return e.setupContext||(e.setupContext=Sr(e))}function as(e,t,n){const o=arguments.length;return 2===o?O(t)&&!N(t)?Do(t)?Jo(e,null,[t]):Jo(e,t):Jo(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&Do(n)&&(n=[n]),Jo(e,t,n))}const us=Symbol("");function ps(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(n[o]!==t[o])return!1;return Lo>0&&Io&&Io.push(e),!0}const fs="3.2.6",ds="undefined"!=typeof document?document:null,hs=new Map,ms={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?ds.createElementNS("http://www.w3.org/2000/svg",e):ds.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>ds.createTextNode(e),createComment:e=>ds.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ds.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,o){const r=n?n.previousSibling:t.lastChild;let s=hs.get(e);if(!s){const t=ds.createElement("template");if(t.innerHTML=o?`<svg>${e}</svg>`:e,s=t.content,o){const e=s.firstChild;for(;e.firstChild;)s.appendChild(e.firstChild);s.removeChild(e)}hs.set(e,s)}return t.insertBefore(s.cloneNode(!0),n),[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const gs=/\s*!important$/;function vs(e,t,n){if(N(n))n.forEach((n=>vs(e,t,n)));else if(t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=bs[t];if(n)return n;let o=D(t);if("filter"!==o&&o in e)return bs[t]=o;o=K(o);for(let r=0;r<ys.length;r++){const n=ys[r]+o;if(n in e)return bs[t]=n}return t}(e,t);gs.test(n)?e.setProperty(z(o),n.replace(gs,""),"important"):e[o]=n}}const ys=["Webkit","Moz","ms"],bs={};const _s="http://www.w3.org/1999/xlink";let Ss=Date.now,xs=!1;if("undefined"!=typeof window){Ss()>document.createEvent("Event").timeStamp&&(Ss=()=>performance.now());const e=navigator.userAgent.match(/firefox\/(\d+)/i);xs=!!(e&&Number(e[1])<=53)}let Cs=0;const ws=Promise.resolve(),ks=()=>{Cs=0};function Ts(e,t,n,o){e.addEventListener(t,n,o)}function Ns(e,t,n,o,r=null){const s=e._vei||(e._vei={}),i=s[t];if(o&&i)i.value=o;else{const[n,l]=function(e){let t;if(Es.test(e)){let n;for(t={};n=e.match(Es);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[z(e.slice(2)),t]}(t);if(o){Ts(e,n,s[t]=function(e,t){const n=e=>{const o=e.timeStamp||Ss();(xs||o>=n.attached-1)&&Fr(function(e,t){if(N(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>Cs||(ws.then(ks),Cs=Ss()))(),n}(o,r),l)}else i&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}const Es=/(?:Once|Passive|Capture)$/;const $s=/^on[a-z]/;function Rs(e,t){const n=dn(e);class o extends As{constructor(e){super(n,e,t)}}return o.def=n,o}const Fs="undefined"!=typeof HTMLElement?HTMLElement:class{};class As extends Fs{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"});for(let o=0;o<this.attributes.length;o++)this._setAttr(this.attributes[o].name);new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})).observe(this,{attributes:!0})}connectedCallback(){this._connected=!0,this._instance||(this._resolveDef(),Ei(this._createVNode(),this.shadowRoot))}disconnectedCallback(){this._connected=!1,Kr((()=>{this._connected||(Ei(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){if(this._resolved)return;const e=e=>{this._resolved=!0;for(const r of Object.keys(this))"_"!==r[0]&&this._setProp(r,this[r]);const{props:t,styles:n}=e,o=t?N(t)?t:Object.keys(t):[];for(const r of o.map(D))Object.defineProperty(this,r,{get(){return this._getProp(r)},set(e){this._setProp(r,e)}});this._applyStyles(n)},t=this._def.__asyncLoader;t?t().then(e):e(this._def)}_setAttr(e){this._setProp(D(e),Q(this.getAttribute(e)),!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0){t!==this._props[e]&&(this._props[e]=t,this._instance&&Ei(this._createVNode(),this.shadowRoot),n&&(!0===t?this.setAttribute(z(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(z(e),t+""):t||this.removeAttribute(z(e))))}_createVNode(){const e=Jo(this._def,C({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0,e.emit=(e,...t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof As){e.parent=t._instance;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function Ms(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Ms(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Os(e.el,t);else if(e.type===Fo)e.children.forEach((e=>Ms(e,t)));else if(e.type===Oo){let{el:n,anchor:o}=e;for(;n&&(Os(n,t),n!==o);)n=n.nextSibling}}function Os(e,t){if(1===e.nodeType){const n=e.style;for(const e in t)n.setProperty(`--${e}`,t[e])}}const Ps="transition",Is="animation",Vs=(e,{slots:t})=>as(sn,Hs(e),t);Vs.displayName="Transition";const Bs={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ls=Vs.props=C({},sn.props,Bs),js=(e,t=[])=>{N(e)?e.forEach((e=>e(...t))):e&&e(...t)},Us=e=>!!e&&(N(e)?e.some((e=>e.length>1)):e.length>1);function Hs(e){const t={};for(const C in e)C in Bs||(t[C]=e[C]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:a=i,appearToClass:u=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(O(e))return[Ds(e.enter),Ds(e.leave)];{const t=Ds(e);return[t,t]}}(r),m=h&&h[0],g=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:_,onLeaveCancelled:S,onBeforeAppear:x=v,onAppear:w=y,onAppearCancelled:k=b}=t,T=(e,t,n)=>{zs(e,t?u:l),zs(e,t?a:i),n&&n()},N=(e,t)=>{zs(e,d),zs(e,f),t&&t()},E=e=>(t,n)=>{const r=e?w:y,i=()=>T(t,e,n);js(r,[t,i]),Ks((()=>{zs(t,e?c:s),Ws(t,e?u:l),Us(r)||qs(t,o,m,i)}))};return C(t,{onBeforeEnter(e){js(v,[e]),Ws(e,s),Ws(e,i)},onBeforeAppear(e){js(x,[e]),Ws(e,c),Ws(e,a)},onEnter:E(!1),onAppear:E(!0),onLeave(e,t){const n=()=>N(e,t);Ws(e,p),Xs(),Ws(e,f),Ks((()=>{zs(e,p),Ws(e,d),Us(_)||qs(e,o,g,n)})),js(_,[e,n])},onEnterCancelled(e){T(e,!1),js(b,[e])},onAppearCancelled(e){T(e,!0),js(k,[e])},onLeaveCancelled(e){N(e),js(S,[e])}})}function Ds(e){return Q(e)}function Ws(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function zs(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Ks(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Gs=0;function qs(e,t,n,o){const r=e._endId=++Gs,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=Js(e,t);if(!i)return o();const a=i+"end";let u=0;const p=()=>{e.removeEventListener(a,f),s()},f=t=>{t.target===e&&++u>=c&&p()};setTimeout((()=>{u<c&&p()}),l+1),e.addEventListener(a,f)}function Js(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o("transitionDelay"),s=o("transitionDuration"),i=Zs(r,s),l=o("animationDelay"),c=o("animationDuration"),a=Zs(l,c);let u=null,p=0,f=0;t===Ps?i>0&&(u=Ps,p=i,f=s.length):t===Is?a>0&&(u=Is,p=a,f=c.length):(p=Math.max(i,a),u=p>0?i>a?Ps:Is:null,f=u?u===Ps?s.length:c.length:0);return{type:u,timeout:p,propCount:f,hasTransform:u===Ps&&/\b(transform|all)(,|$)/.test(n.transitionProperty)}}function Zs(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Qs(t)+Qs(e[n]))))}function Qs(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Xs(){return document.body.offsetHeight}const Ys=new WeakMap,ei=new WeakMap,ti={name:"TransitionGroup",props:C({},Ls,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=pr(),o=on();let r,s;return Rn((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(o);const{hasTransform:s}=Js(o);return r.removeChild(o),s}(r[0].el,n.vnode.el,t))return;r.forEach(ni),r.forEach(oi);const o=r.filter(ri);Xs(),o.forEach((e=>{const n=e.el,o=n.style;Ws(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n._moveCb=null,zs(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=bt(e),l=Hs(i);let c=i.tag||Fo;r=s,s=t.default?fn(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&pn(t,cn(t,l,o,n))}if(r)for(let e=0;e<r.length;e++){const t=r[e];pn(t,cn(t,l,o,n)),Ys.set(t,t.el.getBoundingClientRect())}return Jo(c,null,s)}}};function ni(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function oi(e){ei.set(e,e.el.getBoundingClientRect())}function ri(e){const t=Ys.get(e),n=ei.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${r}px)`,t.transitionDuration="0s",e}}const si=e=>{const t=e.props["onUpdate:modelValue"];return N(t)?e=>J(t,e):t};function ii(e){e.target.composing=!0}function li(e){const t=e.target;t.composing&&(t.composing=!1,function(e,t){const n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}(t,"input"))}const ci={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e._assign=si(r);const s=o||r.props&&"number"===r.props.type;Ts(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n?o=o.trim():s&&(o=Q(o)),e._assign(o)})),n&&Ts(e,"change",(()=>{e.value=e.value.trim()})),t||(Ts(e,"compositionstart",ii),Ts(e,"compositionend",li),Ts(e,"change",li))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e._assign=si(s),e.composing)return;if(document.activeElement===e){if(n)return;if(o&&e.value.trim()===t)return;if((r||"number"===e.type)&&Q(e.value)===t)return}const i=null==t?"":t;e.value!==i&&(e.value=i)}},ai={deep:!0,created(e,t,n){e._assign=si(n),Ts(e,"change",(()=>{const t=e._modelValue,n=hi(e),o=e.checked,r=e._assign;if(N(t)){const e=h(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if($(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(mi(e,o))}))},mounted:ui,beforeUpdate(e,t,n){e._assign=si(n),ui(e,t,n)}};function ui(e,{value:t,oldValue:n},o){e._modelValue=t,N(t)?e.checked=h(t,o.props.value)>-1:$(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=d(t,mi(e,!0)))}const pi={created(e,{value:t},n){e.checked=d(t,n.props.value),e._assign=si(n),Ts(e,"change",(()=>{e._assign(hi(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e._assign=si(o),t!==n&&(e.checked=d(t,o.props.value))}},fi={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=$(t);Ts(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?Q(hi(e)):hi(e)));e._assign(e.multiple?r?new Set(t):t:t[0])})),e._assign=si(o)},mounted(e,{value:t}){di(e,t)},beforeUpdate(e,t,n){e._assign=si(n)},updated(e,{value:t}){di(e,t)}};function di(e,t){const n=e.multiple;if(!n||N(t)||$(t)){for(let o=0,r=e.options.length;o<r;o++){const r=e.options[o],s=hi(r);if(n)r.selected=N(t)?h(t,s)>-1:t.has(s);else if(d(hi(r),t))return void(e.selectedIndex!==o&&(e.selectedIndex=o))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function hi(e){return"_value"in e?e._value:e.value}function mi(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const gi={created(e,t,n){vi(e,t,n,null,"created")},mounted(e,t,n){vi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){vi(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){vi(e,t,n,o,"updated")}};function vi(e,t,n,o,r){let s;switch(e.tagName){case"SELECT":s=fi;break;case"TEXTAREA":s=ci;break;default:switch(n.props&&n.props.type){case"checkbox":s=ai;break;case"radio":s=pi;break;default:s=ci}}const i=s[r];i&&i(e,t,n,o)}const yi=["ctrl","shift","alt","meta"],bi={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>yi.some((n=>e[`${n}Key`]&&!t.includes(n)))},_i={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Si={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):xi(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),xi(e,!0),o.enter(e)):o.leave(e,(()=>{xi(e,!1)})):xi(e,t))},beforeUnmount(e,{value:t}){xi(e,t)}};function xi(e,t){e.style.display=t?e._vod:"none"}const Ci=C({patchProp:(e,t,n,s,i=!1,l,c,a,u)=>{"class"===t?function(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,i):"style"===t?function(e,t,n){const o=e.style;if(n)if(A(n)){if(t!==n){const t=o.display;o.cssText=n,"_vod"in e&&(o.display=t)}}else{for(const e in n)vs(o,e,n[e]);if(t&&!A(t))for(const e in t)null==n[e]&&vs(o,e,"")}else e.removeAttribute("style")}(e,n,s):S(t)?x(t)||Ns(e,t,0,s,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&$s.test(t)&&F(n));if("spellcheck"===t||"draggable"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if($s.test(t)&&A(n))return!1;return t in e}(e,t,s,i))?function(e,t,n,o,s,i,l){if("innerHTML"===t||"textContent"===t)return o&&l(o,s,i),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName){e._value=n;const o=null==n?"":n;return e.value!==o&&(e.value=o),void(null==n&&e.removeAttribute(t))}if(""===n||null==n){const o=typeof e[t];if("boolean"===o)return void(e[t]=r(n));if(null==n&&"string"===o)return e[t]="",void e.removeAttribute(t);if("number"===o){try{e[t]=0}catch(c){}return void e.removeAttribute(t)}}try{e[t]=n}catch(a){}}(e,t,s,l,c,a,u):("true-value"===t?e._trueValue=s:"false-value"===t&&(e._falseValue=s),function(e,t,n,s,i){if(s&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(_s,t.slice(6,t.length)):e.setAttributeNS(_s,t,n);else{const s=o(t);null==n||s&&!r(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}(e,t,s,i))}},ms);let wi,ki=!1;function Ti(){return wi||(wi=go(Ci))}function Ni(){return wi=ki?wi:vo(Ci),ki=!0,wi}const Ei=(...e)=>{Ti().render(...e)},$i=(...e)=>{Ni().hydrate(...e)};function Ri(e){if(A(e)){return document.querySelector(e)}return e}function Fi(e){throw e}function Ai(e){}function Mi(e,t,n,o){const r=new SyntaxError(String(e));return r.code=e,r.loc=t,r}const Oi=Symbol(""),Pi=Symbol(""),Ii=Symbol(""),Vi=Symbol(""),Bi=Symbol(""),Li=Symbol(""),ji=Symbol(""),Ui=Symbol(""),Hi=Symbol(""),Di=Symbol(""),Wi=Symbol(""),zi=Symbol(""),Ki=Symbol(""),Gi=Symbol(""),qi=Symbol(""),Ji=Symbol(""),Zi=Symbol(""),Qi=Symbol(""),Xi=Symbol(""),Yi=Symbol(""),el=Symbol(""),tl=Symbol(""),nl=Symbol(""),ol=Symbol(""),rl=Symbol(""),sl=Symbol(""),il=Symbol(""),ll=Symbol(""),cl=Symbol(""),al=Symbol(""),ul=Symbol(""),pl=Symbol(""),fl=Symbol(""),dl=Symbol(""),hl=Symbol(""),ml=Symbol(""),gl=Symbol(""),vl=Symbol(""),yl=Symbol(""),bl=Symbol(""),_l={[Oi]:"Fragment",[Pi]:"Teleport",[Ii]:"Suspense",[Vi]:"KeepAlive",[Bi]:"BaseTransition",[Li]:"openBlock",[ji]:"createBlock",[Ui]:"createElementBlock",[Hi]:"createVNode",[Di]:"createElementVNode",[Wi]:"createCommentVNode",[zi]:"createTextVNode",[Ki]:"createStaticVNode",[Gi]:"resolveComponent",[qi]:"resolveDynamicComponent",[Ji]:"resolveDirective",[Zi]:"resolveFilter",[Qi]:"withDirectives",[Xi]:"renderList",[Yi]:"renderSlot",[el]:"createSlots",[tl]:"toDisplayString",[nl]:"mergeProps",[ol]:"normalizeClass",[rl]:"normalizeStyle",[sl]:"normalizeProps",[il]:"guardReactiveProps",[ll]:"toHandlers",[cl]:"camelize",[al]:"capitalize",[ul]:"toHandlerKey",[pl]:"setBlockTracking",[fl]:"pushScopeId",[dl]:"popScopeId",[hl]:"withScopeId",[ml]:"withCtx",[gl]:"unref",[vl]:"isRef",[yl]:"withMemo",[bl]:"isMemoSame"};const Sl={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function xl(e,t,n,o,r,s,i,l=!1,c=!1,a=!1,u=Sl){return e&&(l?(e.helper(Li),e.helper(Ql(e.inSSR,a))):e.helper(Zl(e.inSSR,a)),i&&e.helper(Qi)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:l,disableTracking:c,isComponent:a,loc:u}}function Cl(e,t=Sl){return{type:17,loc:t,elements:e}}function wl(e,t=Sl){return{type:15,loc:t,properties:e}}function kl(e,t){return{type:16,loc:Sl,key:A(e)?Tl(e,!0):e,value:t}}function Tl(e,t=!1,n=Sl,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function Nl(e,t=Sl){return{type:8,loc:t,children:e}}function El(e,t=[],n=Sl){return{type:14,loc:n,callee:e,arguments:t}}function $l(e,t,n=!1,o=!1,r=Sl){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function Rl(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:Sl}}const Fl=e=>4===e.type&&e.isStatic,Al=(e,t)=>e===t||e===z(t);function Ml(e){return Al(e,"Teleport")?Pi:Al(e,"Suspense")?Ii:Al(e,"KeepAlive")?Vi:Al(e,"BaseTransition")?Bi:void 0}const Ol=/^\d|[^\$\w]/,Pl=e=>!Ol.test(e),Il=/[A-Za-z_$\xA0-\uFFFF]/,Vl=/[\.\?\w$\xA0-\uFFFF]/,Bl=/\s+[.[]\s*|\s*[.[]\s+/g,Ll=e=>{e=e.trim().replace(Bl,(e=>e.trim()));let t=0,n=[],o=0,r=0,s=null;for(let i=0;i<e.length;i++){const l=e.charAt(i);switch(t){case 0:if("["===l)n.push(t),t=1,o++;else if("("===l)n.push(t),t=2,r++;else if(!(0===i?Il:Vl).test(l))return!1;break;case 1:"'"===l||'"'===l||"`"===l?(n.push(t),t=3,s=l):"["===l?o++:"]"===l&&(--o||(t=n.pop()));break;case 2:if("'"===l||'"'===l||"`"===l)n.push(t),t=3,s=l;else if("("===l)r++;else if(")"===l){if(i===e.length-1)return!1;--r||(t=n.pop())}break;case 3:l===s&&(t=n.pop(),s=null)}}return!o&&!r};function jl(e,t,n){const o={source:e.source.substr(t,n),start:Ul(e.start,e.source,t),end:e.end};return null!=n&&(o.end=Ul(e.start,e.source,t+n)),o}function Ul(e,t,n=t.length){return Hl(C({},e),t,n)}function Hl(e,t,n=t.length){let o=0,r=-1;for(let s=0;s<n;s++)10===t.charCodeAt(s)&&(o++,r=s);return e.offset+=n,e.line+=o,e.column=-1===r?e.column+n:n-r,e}function Dl(e,t,n=!1){for(let o=0;o<e.props.length;o++){const r=e.props[o];if(7===r.type&&(n||r.exp)&&(A(t)?r.name===t:t.test(r.name)))return r}}function Wl(e,t,n=!1,o=!1){for(let r=0;r<e.props.length;r++){const s=e.props[r];if(6===s.type){if(n)continue;if(s.name===t&&(s.value||o))return s}else if("bind"===s.name&&(s.exp||o)&&zl(s.arg,t))return s}}function zl(e,t){return!(!e||!Fl(e)||e.content!==t)}function Kl(e){return 5===e.type||2===e.type}function Gl(e){return 7===e.type&&"slot"===e.name}function ql(e){return 1===e.type&&3===e.tagType}function Jl(e){return 1===e.type&&2===e.tagType}function Zl(e,t){return e||t?Hi:Di}function Ql(e,t){return e||t?ji:Ui}const Xl=new Set([sl,il]);function Yl(e,t=[]){if(e&&!A(e)&&14===e.type){const n=e.callee;if(!A(n)&&Xl.has(n))return Yl(e.arguments[0],t.concat(e))}return[e,t]}function ec(e,t,n){let o;let r,s=13===e.type?e.props:e.arguments[2],i=[];if(s&&!A(s)&&14===s.type){const e=Yl(s);s=e[0],i=e[1],r=i[i.length-1]}if(null==s||A(s))o=wl([t]);else if(14===s.type){const e=s.arguments[0];A(e)||15!==e.type?s.callee===ll?o=El(n.helper(nl),[wl([t]),s]):s.arguments.unshift(wl([t])):e.properties.unshift(t),!o&&(o=s)}else if(15===s.type){let e=!1;if(4===t.key.type){const n=t.key.content;e=s.properties.some((e=>4===e.key.type&&e.key.content===n))}e||s.properties.unshift(t),o=s}else o=El(n.helper(nl),[wl([t]),s]),r&&r.callee===il&&(r=i[i.length-2]);13===e.type?r?r.arguments[0]=o:e.props=o:r?r.arguments[0]=o:e.arguments[2]=o}function tc(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function nc(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(Zl(o,e.isComponent)),t(Li),t(Ql(o,e.isComponent)))}const oc=/&(gt|lt|amp|apos|quot);/g,rc={gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},sc={delimiters:["{{","}}"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:b,isPreTag:b,isCustomElement:b,decodeEntities:e=>e.replace(oc,((e,t)=>rc[t])),onError:Fi,onWarn:Ai,comments:!1};function ic(e,t={}){const n=function(e,t){const n=C({},sc);let o;for(o in t)n[o]=void 0===t[o]?sc[o]:t[o];return{options:n,column:1,line:1,offset:0,originalSource:e,source:e,inPre:!1,inVPre:!1,onWarn:n.onWarn}}(e,t),o=_c(n);return function(e,t=Sl){return{type:0,children:e,helpers:[],components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}(lc(n,0,[]),Sc(n,o))}function lc(e,t,n){const o=xc(n),r=o?o.ns:0,s=[];for(;!Nc(e,t,n);){const i=e.source;let l;if(0===t||1===t)if(!e.inVPre&&Cc(i,e.options.delimiters[0]))l=vc(e,t);else if(0===t&&"<"===i[0])if(1===i.length);else if("!"===i[1])l=Cc(i,"\x3c!--")?uc(e):Cc(i,"<!DOCTYPE")?pc(e):Cc(i,"<![CDATA[")&&0!==r?ac(e,n):pc(e);else if("/"===i[1])if(2===i.length);else{if(">"===i[2]){wc(e,3);continue}if(/[a-z]/i.test(i[2])){hc(e,1,o);continue}l=pc(e)}else/[a-z]/i.test(i[1])?l=fc(e,n):"?"===i[1]&&(l=pc(e));if(l||(l=yc(e,t)),N(l))for(let e=0;e<l.length;e++)cc(s,l[e]);else cc(s,l)}let i=!1;if(2!==t&&1!==t){const t="preserve"!==e.options.whitespace;for(let n=0;n<s.length;n++){const o=s[n];if(e.inPre||2!==o.type)3!==o.type||e.options.comments||(i=!0,s[n]=null);else if(/[^\t\r\n\f ]/.test(o.content))t&&(o.content=o.content.replace(/[\t\r\n\f ]+/g," "));else{const e=s[n-1],r=s[n+1];!e||!r||t&&(3===e.type||3===r.type||1===e.type&&1===r.type&&/[\r\n]/.test(o.content))?(i=!0,s[n]=null):o.content=" "}}if(e.inPre&&o&&e.options.isPreTag(o.tag)){const e=s[0];e&&2===e.type&&(e.content=e.content.replace(/^\r?\n/,""))}}return i?s.filter(Boolean):s}function cc(e,t){if(2===t.type){const n=xc(e);if(n&&2===n.type&&n.loc.end.offset===t.loc.start.offset)return n.content+=t.content,n.loc.end=t.loc.end,void(n.loc.source+=t.loc.source)}e.push(t)}function ac(e,t){wc(e,9);const n=lc(e,3,t);return 0===e.source.length||wc(e,3),n}function uc(e){const t=_c(e);let n;const o=/--(\!)?>/.exec(e.source);if(o){n=e.source.slice(4,o.index);const t=e.source.slice(0,o.index);let r=1,s=0;for(;-1!==(s=t.indexOf("\x3c!--",r));)wc(e,s-r+1),r=s+1;wc(e,o.index+o[0].length-r+1)}else n=e.source.slice(4),wc(e,e.source.length);return{type:3,content:n,loc:Sc(e,t)}}function pc(e){const t=_c(e),n="?"===e.source[1]?1:2;let o;const r=e.source.indexOf(">");return-1===r?(o=e.source.slice(n),wc(e,e.source.length)):(o=e.source.slice(n,r),wc(e,r+1)),{type:3,content:o,loc:Sc(e,t)}}function fc(e,t){const n=e.inPre,o=e.inVPre,r=xc(t),s=hc(e,0,r),i=e.inPre&&!n,l=e.inVPre&&!o;if(s.isSelfClosing||e.options.isVoidTag(s.tag))return i&&(e.inPre=!1),l&&(e.inVPre=!1),s;t.push(s);const c=e.options.getTextMode(s,r),a=lc(e,c,t);if(t.pop(),s.children=a,Ec(e.source,s.tag))hc(e,1,r);else if(0===e.source.length&&"script"===s.tag.toLowerCase()){const e=a[0];e&&Cc(e.loc.source,"\x3c!--")}return s.loc=Sc(e,s.loc.start),i&&(e.inPre=!1),l&&(e.inVPre=!1),s}const dc=t("if,else,else-if,for,slot");function hc(e,t,n){const o=_c(e),r=/^<\/?([a-z][^\t\r\n\f />]*)/i.exec(e.source),s=r[1],i=e.options.getNamespace(s,n);wc(e,r[0].length),kc(e);const l=_c(e),c=e.source;e.options.isPreTag(s)&&(e.inPre=!0);let a=mc(e,t);0===t&&!e.inVPre&&a.some((e=>7===e.type&&"pre"===e.name))&&(e.inVPre=!0,C(e,l),e.source=c,a=mc(e,t).filter((e=>"v-pre"!==e.name)));let u=!1;if(0===e.source.length||(u=Cc(e.source,"/>"),wc(e,u?2:1)),1===t)return;let p=0;return e.inVPre||("slot"===s?p=2:"template"===s?a.some((e=>7===e.type&&dc(e.name)))&&(p=3):function(e,t,n){const o=n.options;if(o.isCustomElement(e))return!1;if("component"===e||/^[A-Z]/.test(e)||Ml(e)||o.isBuiltInComponent&&o.isBuiltInComponent(e)||o.isNativeTag&&!o.isNativeTag(e))return!0;for(let r=0;r<t.length;r++){const e=t[r];if(6===e.type){if("is"===e.name&&e.value&&e.value.content.startsWith("vue:"))return!0}else{if("is"===e.name)return!0;"bind"===e.name&&zl(e.arg,"is")}}}(s,a,e)&&(p=1)),{type:1,ns:i,tag:s,tagType:p,props:a,isSelfClosing:u,children:[],loc:Sc(e,o),codegenNode:void 0}}function mc(e,t){const n=[],o=new Set;for(;e.source.length>0&&!Cc(e.source,">")&&!Cc(e.source,"/>");){if(Cc(e.source,"/")){wc(e,1),kc(e);continue}const r=gc(e,o);0===t&&n.push(r),/^[^\t\r\n\f />]/.test(e.source),kc(e)}return n}function gc(e,t){const n=_c(e),o=/^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(e.source)[0];t.has(o),t.add(o);{const e=/["'<]/g;let t;for(;t=e.exec(o););}let r;wc(e,o.length),/^[\t\r\n\f ]*=/.test(e.source)&&(kc(e),wc(e,1),kc(e),r=function(e){const t=_c(e);let n;const o=e.source[0],r='"'===o||"'"===o;if(r){wc(e,1);const t=e.source.indexOf(o);-1===t?n=bc(e,e.source.length,4):(n=bc(e,t,4),wc(e,1))}else{const t=/^[^\t\r\n\f >]+/.exec(e.source);if(!t)return;const o=/["'<=`]/g;let r;for(;r=o.exec(t[0]););n=bc(e,t[0].length,4)}return{content:n,isQuoted:r,loc:Sc(e,t)}}(e));const s=Sc(e,n);if(!e.inVPre&&/^(v-|:|\.|@|#)/.test(o)){const t=/(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(o);let i,l=Cc(o,"."),c=t[1]||(l||Cc(o,":")?"bind":Cc(o,"@")?"on":"slot");if(t[2]){const r="slot"===c,s=o.lastIndexOf(t[2]),l=Sc(e,Tc(e,n,s),Tc(e,n,s+t[2].length+(r&&t[3]||"").length));let a=t[2],u=!0;a.startsWith("[")?(u=!1,a.endsWith("]"),a=a.substr(1,a.length-2)):r&&(a+=t[3]||""),i={type:4,content:a,isStatic:u,constType:u?3:0,loc:l}}if(r&&r.isQuoted){const e=r.loc;e.start.offset++,e.start.column++,e.end=Ul(e.start,r.content),e.source=e.source.slice(1,-1)}const a=t[3]?t[3].substr(1).split("."):[];return l&&a.push("prop"),{type:7,name:c,exp:r&&{type:4,content:r.content,isStatic:!1,constType:0,loc:r.loc},arg:i,modifiers:a,loc:s}}return{type:6,name:o,value:r&&{type:2,content:r.content,loc:r.loc},loc:s}}function vc(e,t){const[n,o]=e.options.delimiters,r=e.source.indexOf(o,n.length);if(-1===r)return;const s=_c(e);wc(e,n.length);const i=_c(e),l=_c(e),c=r-n.length,a=e.source.slice(0,c),u=bc(e,c,t),p=u.trim(),f=u.indexOf(p);f>0&&Hl(i,a,f);return Hl(l,a,c-(u.length-p.length-f)),wc(e,o.length),{type:5,content:{type:4,isStatic:!1,constType:0,content:p,loc:Sc(e,i,l)},loc:Sc(e,s)}}function yc(e,t){const n=["<",e.options.delimiters[0]];3===t&&n.push("]]>");let o=e.source.length;for(let s=0;s<n.length;s++){const t=e.source.indexOf(n[s],1);-1!==t&&o>t&&(o=t)}const r=_c(e);return{type:2,content:bc(e,o,t),loc:Sc(e,r)}}function bc(e,t,n){const o=e.source.slice(0,t);return wc(e,t),2===n||3===n||-1===o.indexOf("&")?o:e.options.decodeEntities(o,4===n)}function _c(e){const{column:t,line:n,offset:o}=e;return{column:t,line:n,offset:o}}function Sc(e,t,n){return{start:t,end:n=n||_c(e),source:e.originalSource.slice(t.offset,n.offset)}}function xc(e){return e[e.length-1]}function Cc(e,t){return e.startsWith(t)}function wc(e,t){const{source:n}=e;Hl(e,n,t),e.source=n.slice(t)}function kc(e){const t=/^[\t\r\n\f ]+/.exec(e.source);t&&wc(e,t[0].length)}function Tc(e,t,n){return Ul(t,e.originalSource.slice(t.offset,n),n)}function Nc(e,t,n){const o=e.source;switch(t){case 0:if(Cc(o,"</"))for(let e=n.length-1;e>=0;--e)if(Ec(o,n[e].tag))return!0;break;case 1:case 2:{const e=xc(n);if(e&&Ec(o,e.tag))return!0;break}case 3:if(Cc(o,"]]>"))return!0}return!o}function Ec(e,t){return Cc(e,"</")&&e.substr(2,t.length).toLowerCase()===t.toLowerCase()&&/[\t\r\n\f />]/.test(e[2+t.length]||">")}function $c(e,t){Fc(e,t,Rc(e,e.children[0]))}function Rc(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!Jl(t)}function Fc(e,t,n=!1){let o=!0;const{children:r}=e,s=r.length;let i=0;for(let l=0;l<r.length;l++){const e=r[l];if(1===e.type&&0===e.tagType){const r=n?0:Ac(e,t);if(r>0){if(r<3&&(o=!1),r>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),i++;continue}}else{const n=e.codegenNode;if(13===n.type){const o=Vc(n);if((!o||512===o||1===o)&&Pc(e,t)>=2){const o=Ic(e);o&&(n.props=t.hoist(o))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}else if(12===e.type){const n=Ac(e.content,t);n>0&&(n<3&&(o=!1),n>=2&&(e.codegenNode=t.hoist(e.codegenNode),i++))}if(1===e.type){const n=1===e.tagType;n&&t.scopes.vSlot++,Fc(e,t),n&&t.scopes.vSlot--}else if(11===e.type)Fc(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n<e.branches.length;n++)Fc(e.branches[n],t,1===e.branches[n].children.length)}o&&i&&t.transformHoist&&t.transformHoist(r,t,e),i&&i===s&&1===e.type&&0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&N(e.codegenNode.children)&&(e.codegenNode.children=t.hoist(Cl(e.codegenNode.children)))}function Ac(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const o=n.get(e);if(void 0!==o)return o;const r=e.codegenNode;if(13!==r.type)return 0;if(Vc(r))return n.set(e,0),0;{let o=3;const s=Pc(e,t);if(0===s)return n.set(e,0),0;s<o&&(o=s);for(let r=0;r<e.children.length;r++){const s=Ac(e.children[r],t);if(0===s)return n.set(e,0),0;s<o&&(o=s)}if(o>1)for(let r=0;r<e.props.length;r++){const s=e.props[r];if(7===s.type&&"bind"===s.name&&s.exp){const r=Ac(s.exp,t);if(0===r)return n.set(e,0),0;r<o&&(o=r)}}return r.isBlock&&(t.removeHelper(Li),t.removeHelper(Ql(t.inSSR,r.isComponent)),r.isBlock=!1,t.helper(Zl(t.inSSR,r.isComponent))),n.set(e,o),o}case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return Ac(e.content,t);case 4:return e.constType;case 8:let s=3;for(let n=0;n<e.children.length;n++){const o=e.children[n];if(A(o)||M(o))continue;const r=Ac(o,t);if(0===r)return 0;r<s&&(s=r)}return s;default:return 0}}const Mc=new Set([ol,rl,sl,il]);function Oc(e,t){if(14===e.type&&!A(e.callee)&&Mc.has(e.callee)){const n=e.arguments[0];if(4===n.type)return Ac(n,t);if(14===n.type)return Oc(n,t)}return 0}function Pc(e,t){let n=3;const o=Ic(e);if(o&&15===o.type){const{properties:e}=o;for(let o=0;o<e.length;o++){const{key:r,value:s}=e[o],i=Ac(r,t);if(0===i)return i;let l;if(i<n&&(n=i),l=4===s.type?Ac(s,t):14===s.type?Oc(s,t):0,0===l)return l;l<n&&(n=l)}}return n}function Ic(e){const t=e.codegenNode;if(13===t.type)return t.props}function Vc(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function Bc(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:o=!1,cacheHandlers:r=!1,nodeTransforms:s=[],directiveTransforms:i={},transformHoist:l=null,isBuiltInComponent:c=y,isCustomElement:a=y,expressionPlugins:u=[],scopeId:p=null,slotted:f=!0,ssr:d=!1,inSSR:h=!1,ssrCssVars:m="",bindingMetadata:v=g,inline:b=!1,isTS:_=!1,onError:S=Fi,onWarn:x=Ai,compatConfig:C}){const w=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),k={selfName:w&&K(D(w[1])),prefixIdentifiers:n,hoistStatic:o,cacheHandlers:r,nodeTransforms:s,directiveTransforms:i,transformHoist:l,isBuiltInComponent:c,isCustomElement:a,expressionPlugins:u,scopeId:p,slotted:f,ssr:d,inSSR:h,ssrCssVars:m,bindingMetadata:v,inline:b,isTS:_,onError:S,onWarn:x,compatConfig:C,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new Map,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){const t=k.helpers.get(e)||0;return k.helpers.set(e,t+1),e},removeHelper(e){const t=k.helpers.get(e);if(t){const n=t-1;n?k.helpers.set(e,n):k.helpers.delete(e)}},helperString:e=>`_${_l[k.helper(e)]}`,replaceNode(e){k.parent.children[k.childIndex]=k.currentNode=e},removeNode(e){const t=e?k.parent.children.indexOf(e):k.currentNode?k.childIndex:-1;e&&e!==k.currentNode?k.childIndex>t&&(k.childIndex--,k.onNodeRemoved()):(k.currentNode=null,k.onNodeRemoved()),k.parent.children.splice(t,1)},onNodeRemoved:()=>{},addIdentifiers(e){},removeIdentifiers(e){},hoist(e){A(e)&&(e=Tl(e)),k.hoists.push(e);const t=Tl(`_hoisted_${k.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>function(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:Sl}}(k.cached++,e,t)};return k}function Lc(e,t){const n=Bc(e,t);jc(e,n),t.hoistStatic&&$c(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:o}=e;if(1===o.length){const n=o[0];if(Rc(e,n)&&n.codegenNode){const o=n.codegenNode;13===o.type&&nc(o,t),e.codegenNode=o}else e.codegenNode=n}else if(o.length>1){let o=64;e.codegenNode=xl(t,n(Oi),void 0,e.children,o+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=[...n.helpers.keys()],e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached}function jc(e,t){t.currentNode=e;const{nodeTransforms:n}=t,o=[];for(let s=0;s<n.length;s++){const r=n[s](e,t);if(r&&(N(r)?o.push(...r):o.push(r)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(Wi);break;case 5:t.ssr||t.helper(tl);break;case 9:for(let n=0;n<e.branches.length;n++)jc(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const o=()=>{n--};for(;n<e.children.length;n++){const r=e.children[n];A(r)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=o,jc(r,t))}}(e,t)}t.currentNode=e;let r=o.length;for(;r--;)o[r]()}function Uc(e,t){const n=A(e)?t=>t===e:t=>e.test(t);return(e,o)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(Gl))return;const s=[];for(let i=0;i<r.length;i++){const l=r[i];if(7===l.type&&n(l.name)){r.splice(i,1),i--;const n=t(e,l,o);n&&s.push(n)}}return s}}}const Hc="/*#__PURE__*/";function Dc(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:c="vue",ssr:a=!1,isTS:u=!1,inSSR:p=!1}){const f={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:c,ssr:a,isTS:u,inSSR:p,source:e.loc.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${_l[e]}`,push(e,t){f.code+=e},indent(){d(++f.indentLevel)},deindent(e=!1){e?--f.indentLevel:d(--f.indentLevel)},newline(){d(f.indentLevel)}};function d(e){f.push("\n"+" ".repeat(e))}return f}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:l,newline:c,ssr:a}=n,u=e.helpers.length>0,p=!s&&"module"!==o;!function(e,t){const{push:n,newline:o,runtimeGlobalName:r}=t,s=r,i=e=>`${_l[e]}: _${_l[e]}`;if(e.helpers.length>0&&(n(`const _Vue = ${s}\n`),e.hoists.length)){n(`const { ${[Hi,Di,Wi,zi,Ki].filter((t=>e.helpers.includes(t))).map(i).join(", ")} } = _Vue\n`)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o}=t;o(),e.forEach(((e,r)=>{e&&(n(`const _hoisted_${r+1} = `),Gc(e,t),o())})),t.pure=!1})(e.hoists,t),o(),n("return ")}(e,n);if(r(`function ${a?"ssrRender":"render"}(${(a?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),i(),p&&(r("with (_ctx) {"),i(),u&&(r(`const { ${e.helpers.map((e=>`${_l[e]}: _${_l[e]}`)).join(", ")} } = _Vue`),r("\n"),c())),e.components.length&&(Wc(e.components,"component",n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(Wc(e.directives,"directive",n),e.temps>0&&c()),e.temps>0){r("let ");for(let t=0;t<e.temps;t++)r(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(r("\n"),c()),a||r("return "),e.codegenNode?Gc(e.codegenNode,n):r("null"),p&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function Wc(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n("component"===t?Gi:Ji);for(let l=0;l<e.length;l++){let n=e[l];const c=n.endsWith("__self");c&&(n=n.slice(0,-6)),o(`const ${tc(n,t)} = ${i}(${JSON.stringify(n)}${c?", true":""})${s?"!":""}`),l<e.length-1&&r()}}function zc(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Kc(e,t,n),n&&t.deindent(),t.push("]")}function Kc(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;i<e.length;i++){const l=e[i];A(l)?r(l):N(l)?zc(l,t):Gc(l,t),i<e.length-1&&(n?(o&&r(","),s()):o&&r(", "))}}function Gc(e,t){if(A(e))t.push(e);else if(M(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:Gc(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),e)}(e,t);break;case 4:qc(e,t);break;case 5:!function(e,t){const{push:n,helper:o,pure:r}=t;r&&n(Hc);n(`${o(tl)}(`),Gc(e.content,t),n(")")}(e,t);break;case 12:Gc(e.codegenNode,t);break;case 8:Jc(e,t);break;case 3:!function(e,t){const{push:n,helper:o,pure:r}=t;r&&n(Hc);n(`${o(Wi)}(${JSON.stringify(e.content)})`,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:o,pure:r}=t,{tag:s,props:i,children:l,patchFlag:c,dynamicProps:a,directives:u,isBlock:p,disableTracking:f,isComponent:d}=e;u&&n(o(Qi)+"(");p&&n(`(${o(Li)}(${f?"true":""}), `);r&&n(Hc);const h=p?Ql(t.inSSR,d):Zl(t.inSSR,d);n(o(h)+"(",e),Kc(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||"null"))}([s,i,l,c,a]),t),n(")"),p&&n(")");u&&(n(", "),Gc(u,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:o,pure:r}=t,s=A(e.callee)?e.callee:o(e.callee);r&&n(Hc);n(s+"(",e),Kc(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",e);const l=i.length>1||!1;n(l?"{":"{ "),l&&o();for(let c=0;c<i.length;c++){const{key:e,value:o}=i[c];Zc(e,t),n(": "),Gc(o,t),c<i.length-1&&(n(","),s())}l&&r(),n(l?"}":" }")}(e,t);break;case 17:!function(e,t){zc(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:o,deindent:r}=t,{params:s,returns:i,body:l,newline:c,isSlot:a}=e;a&&n(`_${_l[ml]}(`);n("(",e),N(s)?Kc(s,t):s&&Gc(s,t);n(") => "),(c||l)&&(n("{"),o());i?(c&&n("return "),N(i)?zc(i,t):Gc(i,t)):l&&Gc(l,t);(c||l)&&(r(),n("}"));a&&n(")")}(e,t);break;case 19:!function(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:l,deindent:c,newline:a}=t;if(4===n.type){const e=!Pl(n.content);e&&i("("),qc(n,t),e&&i(")")}else i("("),Gc(n,t),i(")");s&&l(),t.indentLevel++,s||i(" "),i("? "),Gc(o,t),t.indentLevel--,s&&a(),s||i(" "),i(": ");const u=19===r.type;u||t.indentLevel++;Gc(r,t),u||t.indentLevel--;s&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${o(pl)}(-1),`),i());n(`_cache[${e.index}] = `),Gc(e.value,t),e.isVNode&&(n(","),i(),n(`${o(pl)}(1),`),i(),n(`_cache[${e.index}]`),s());n(")")}(e,t);break;case 21:Kc(e.body,t,!0,!1)}}function qc(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,e)}function Jc(e,t){for(let n=0;n<e.children.length;n++){const o=e.children[n];A(o)?t.push(o):Gc(o,t)}}function Zc(e,t){const{push:n}=t;if(8===e.type)n("["),Jc(e,t),n("]");else if(e.isStatic){n(Pl(e.content)?e.content:JSON.stringify(e.content),e)}else n(`[${e.content}]`,e)}const Qc=Uc(/^(if|else|else-if)$/,((e,t,n)=>function(e,t,n,o){if(!("else"===t.name||t.exp&&t.exp.content.trim())){t.exp=Tl("true",!1,t.exp?t.exp.loc:e.loc)}if("if"===t.name){const r=Xc(e,t),s={type:9,loc:e.loc,branches:[r]};if(n.replaceNode(s),o)return o(s,r,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-- >=-1;){const i=r[s];if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){n.removeNode();const r=Xc(e,t);i.branches.push(r);const s=o&&o(i,r,!1);jc(r,n),s&&s(),n.currentNode=null}break}n.removeNode(i)}}}(e,t,n,((e,t,o)=>{const r=n.parent.children;let s=r.indexOf(e),i=0;for(;s-- >=0;){const e=r[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(o)e.codegenNode=Yc(t,i,n);else{(function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode)).alternate=Yc(t,i+e.branches.length-1,n)}}}))));function Xc(e,t){return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:3!==e.tagType||Dl(e,"for")?[e]:e.children,userKey:Wl(e,"key")}}function Yc(e,t,n){return e.condition?Rl(e.condition,ea(e,t,n),El(n.helper(Wi),['""',"true"])):ea(e,t,n)}function ea(e,t,n){const{helper:o}=n,r=kl("key",Tl(`${t}`,!1,Sl,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return ec(e,r,n),e}{let t=64;return xl(n,o(Oi),wl([r]),s,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(l=e).type&&l.callee===yl?l.arguments[1].returns:l;return 13===t.type&&nc(t,n),ec(t,r,n),e}var l}const ta=Uc("for",((e,t,n)=>{const{helper:o,removeHelper:r}=n;return function(e,t,n,o){if(!t.exp)return;const r=sa(t.exp);if(!r)return;const{scopes:s}=n,{source:i,value:l,key:c,index:a}=r,u={type:11,loc:t.loc,source:i,valueAlias:l,keyAlias:c,objectIndexAlias:a,parseResult:r,children:ql(e)?e.children:[e]};n.replaceNode(u),s.vFor++;const p=o&&o(u);return()=>{s.vFor--,p&&p()}}(e,t,n,(t=>{const s=El(o(Xi),[t.source]),i=Dl(e,"memo"),l=Wl(e,"key"),c=l&&(6===l.type?Tl(l.value.content,!0):l.exp),a=l?kl("key",c):null,u=4===t.source.type&&t.source.constType>0,p=u?64:l?128:256;return t.codegenNode=xl(n,o(Oi),void 0,s,p+"",void 0,void 0,!0,!u,!1,e.loc),()=>{let l;const p=ql(e),{children:f}=t,d=1!==f.length||1!==f[0].type,h=Jl(e)?e:p&&1===e.children.length&&Jl(e.children[0])?e.children[0]:null;if(h?(l=h.codegenNode,p&&a&&ec(l,a,n)):d?l=xl(n,o(Oi),a?wl([a]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(l=f[0].codegenNode,p&&a&&ec(l,a,n),l.isBlock!==!u&&(l.isBlock?(r(Li),r(Ql(n.inSSR,l.isComponent))):r(Zl(n.inSSR,l.isComponent))),l.isBlock=!u,l.isBlock?(o(Li),o(Ql(n.inSSR,l.isComponent))):o(Zl(n.inSSR,l.isComponent))),i){const e=$l(la(t.parseResult,[Tl("_cached")]));e.body={type:21,body:[Nl(["const _memo = (",i.exp,")"]),Nl(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(bl)}(_cached, _memo)) return _cached`]),Nl(["const _item = ",l]),Tl("_item.memo = _memo"),Tl("return _item")],loc:Sl},s.arguments.push(e,Tl("_cache"),Tl(String(n.cached++)))}else s.arguments.push($l(la(t.parseResult),l,!0))}}))}));const na=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,oa=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ra=/^\(|\)$/g;function sa(e,t){const n=e.loc,o=e.content,r=o.match(na);if(!r)return;const[,s,i]=r,l={source:ia(n,i.trim(),o.indexOf(i,s.length)),value:void 0,key:void 0,index:void 0};let c=s.trim().replace(ra,"").trim();const a=s.indexOf(c),u=c.match(oa);if(u){c=c.replace(oa,"").trim();const e=u[1].trim();let t;if(e&&(t=o.indexOf(e,a+c.length),l.key=ia(n,e,t)),u[2]){const r=u[2].trim();r&&(l.index=ia(n,r,o.indexOf(r,l.key?t+e.length:a+c.length)))}}return c&&(l.value=ia(n,c,a)),l}function ia(e,t,n){return Tl(t,!1,jl(e,n,t.length))}function la({value:e,key:t,index:n},o=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Tl("_".repeat(t+1),!1)))}([e,t,n,...o])}const ca=Tl("undefined",!1),aa=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=Dl(e,"slot");if(n)return t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},ua=(e,t,n)=>$l(e,t,!1,!0,t.length?t[0].loc:n);function pa(e,t,n=ua){t.helper(ml);const{children:o,loc:r}=e,s=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const c=Dl(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!Fl(e)&&(l=!0),s.push(kl(e||Tl("default",!0),n(t,o,r)))}let a=!1,u=!1;const p=[],f=new Set;for(let m=0;m<o.length;m++){const e=o[m];let r;if(!ql(e)||!(r=Dl(e,"slot",!0))){3!==e.type&&p.push(e);continue}if(c)break;a=!0;const{children:d,loc:h}=e,{arg:g=Tl("default",!0),exp:v}=r;let y;Fl(g)?y=g?g.content:"default":l=!0;const b=n(v,d,h);let _,S,x;if(_=Dl(e,"if"))l=!0,i.push(Rl(_.exp,fa(g,b),ca));else if(S=Dl(e,/^else(-if)?$/,!0)){let e,t=m;for(;t--&&(e=o[t],3===e.type););if(e&&ql(e)&&Dl(e,"if")){o.splice(m,1),m--;let e=i[i.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=S.exp?Rl(S.exp,fa(g,b),ca):fa(g,b)}}else if(x=Dl(e,"for")){l=!0;const e=x.parseResult||sa(x.exp);e&&i.push(El(t.helper(Xi),[e.source,$l(la(e),fa(g,b),!0)]))}else{if(y){if(f.has(y))continue;f.add(y),"default"===y&&(u=!0)}s.push(kl(g,b))}}if(!c){const e=(e,t)=>kl("default",n(e,t,r));a?p.length&&p.some((e=>ha(e)))&&(u||s.push(e(void 0,p))):s.push(e(void 0,o))}const d=l?2:da(e.children)?3:1;let h=wl(s.concat(kl("_",Tl(d+"",!1))),r);return i.length&&(h=El(t.helper(el),[h,Cl(i)])),{slots:h,hasDynamicSlots:l}}function fa(e,t){return wl([kl("name",e),kl("fn",t)])}function da(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(2===n.tagType||da(n.children))return!0;break;case 9:if(da(n.branches))return!0;break;case 10:case 11:if(da(n.children))return!0}}return!1}function ha(e){return 2!==e.type&&12!==e.type||(2===e.type?!!e.content.trim():ha(e.content))}const ma=new WeakMap,ga=(e,t)=>function(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:o}=e,r=1===e.tagType;let s=r?function(e,t,n=!1){let{tag:o}=e;const r=_a(o),s=Wl(e,"is");if(s)if(r){const e=6===s.type?s.value&&Tl(s.value.content,!0):s.exp;if(e)return El(t.helper(qi),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=!r&&Dl(e,"is");if(i&&i.exp)return El(t.helper(qi),[i.exp]);const l=Ml(o)||t.isBuiltInComponent(o);if(l)return n||t.helper(l),l;return t.helper(Gi),t.components.add(o),tc(o,"component")}(e,t):`"${n}"`;let i,l,c,a,u,p,f=0,d=O(s)&&s.callee===qi||s===Pi||s===Ii||!r&&("svg"===n||"foreignObject"===n||Wl(e,"key",!0));if(o.length>0){const n=va(e,t);i=n.props,f=n.patchFlag,u=n.dynamicPropNames;const o=n.directives;p=o&&o.length?Cl(o.map((e=>function(e,t){const n=[],o=ma.get(e);o?n.push(t.helperString(o)):(t.helper(Ji),t.directives.add(e.name),n.push(tc(e.name,"directive")));const{loc:r}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Tl("true",!1,r);n.push(wl(e.modifiers.map((e=>kl(e,t))),r))}return Cl(n,e.loc)}(e,t)))):void 0}if(e.children.length>0){s===Vi&&(d=!0,f|=1024);if(r&&s!==Pi&&s!==Vi){const{slots:n,hasDynamicSlots:o}=pa(e,t);l=n,o&&(f|=1024)}else if(1===e.children.length&&s!==Pi){const n=e.children[0],o=n.type,r=5===o||8===o;r&&0===Ac(n,t)&&(f|=1),l=r||2===o?n:e.children}else l=e.children}0!==f&&(c=String(f),u&&u.length&&(a=function(e){let t="[";for(let n=0,o=e.length;n<o;n++)t+=JSON.stringify(e[n]),n<o-1&&(t+=", ");return t+"]"}(u))),e.codegenNode=xl(t,s,i,l,c,a,p,!!d,!1,r,e.loc)};function va(e,t,n=e.props,o=!1){const{tag:r,loc:s}=e,i=1===e.tagType;let l=[];const c=[],a=[];let u=0,p=!1,f=!1,d=!1,h=!1,m=!1,g=!1;const v=[],y=({key:e,value:n})=>{if(Fl(e)){const o=e.content,r=S(o);if(i||!r||"onclick"===o.toLowerCase()||"onUpdate:modelValue"===o||j(o)||(h=!0),r&&j(o)&&(g=!0),20===n.type||(4===n.type||8===n.type)&&Ac(n,t)>0)return;"ref"===o?p=!0:"class"===o?f=!0:"style"===o?d=!0:"key"===o||v.includes(o)||v.push(o),!i||"class"!==o&&"style"!==o||v.includes(o)||v.push(o)}else m=!0};for(let _=0;_<n.length;_++){const i=n[_];if(6===i.type){const{loc:e,name:t,value:n}=i;let o=!0;if("ref"===t&&(p=!0),"is"===t&&(_a(r)||n&&n.content.startsWith("vue:")))continue;l.push(kl(Tl(t,!0,jl(e,0,t.length)),Tl(n?n.content:"",o,n?n.loc:e)))}else{const{name:n,arg:u,exp:p,loc:f}=i,d="bind"===n,h="on"===n;if("slot"===n)continue;if("once"===n||"memo"===n)continue;if("is"===n||d&&zl(u,"is")&&_a(r))continue;if(h&&o)continue;if(!u&&(d||h)){m=!0,p&&(l.length&&(c.push(wl(ya(l),s)),l=[]),c.push(d?p:{type:14,loc:f,callee:t.helper(ll),arguments:[p]}));continue}const g=t.directiveTransforms[n];if(g){const{props:n,needRuntime:r}=g(i,e,t);!o&&n.forEach(y),l.push(...n),r&&(a.push(i),M(r)&&ma.set(i,r))}else a.push(i)}}let b;if(c.length?(l.length&&c.push(wl(ya(l),s)),b=c.length>1?El(t.helper(nl),c,s):c[0]):l.length&&(b=wl(ya(l),s)),m?u|=16:(f&&!i&&(u|=2),d&&!i&&(u|=4),v.length&&(u|=8),h&&(u|=32)),0!==u&&32!==u||!(p||g||a.length>0)||(u|=512),!t.inSSR&&b)switch(b.type){case 15:let e=-1,n=-1,o=!1;for(let t=0;t<b.properties.length;t++){const r=b.properties[t].key;Fl(r)?"class"===r.content?e=t:"style"===r.content&&(n=t):r.isHandlerKey||(o=!0)}const r=b.properties[e],s=b.properties[n];o?b=El(t.helper(sl),[b]):(r&&!Fl(r.value)&&(r.value=El(t.helper(ol),[r.value])),!s||Fl(s.value)||!d&&17!==s.value.type||(s.value=El(t.helper(rl),[s.value])));break;case 14:break;default:b=El(t.helper(sl),[El(t.helper(il),[b])])}return{props:b,directives:a,patchFlag:u,dynamicPropNames:v}}function ya(e){const t=new Map,n=[];for(let o=0;o<e.length;o++){const r=e[o];if(8===r.key.type||!r.key.isStatic){n.push(r);continue}const s=r.key.content,i=t.get(s);i?("style"===s||"class"===s||s.startsWith("on"))&&ba(i,r):(t.set(s,r),n.push(r))}return n}function ba(e,t){17===e.value.type?e.value.elements.push(t.value):e.value=Cl([e.value,t.value],e.loc)}function _a(e){return e[0].toLowerCase()+e.slice(1)==="component"}const Sa=(e,t)=>{if(Jl(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=function(e,t){let n,o='"default"';const r=[];for(let s=0;s<e.props.length;s++){const t=e.props[s];6===t.type?t.value&&("name"===t.name?o=JSON.stringify(t.value.content):(t.name=D(t.name),r.push(t))):"bind"===t.name&&zl(t.arg,"name")?t.exp&&(o=t.exp):("bind"===t.name&&t.arg&&Fl(t.arg)&&(t.arg.content=D(t.arg.content)),r.push(t))}if(r.length>0){const{props:o,directives:s}=va(e,t,r);n=o}return{slotName:o,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r];s&&i.push(s),n.length&&(s||i.push("{}"),i.push($l([],n,!1,!1,o))),t.scopeId&&!t.slotted&&(s||i.push("{}"),n.length||i.push("undefined"),i.push("true")),e.codegenNode=El(t.helper(Yi),i,o)}};const xa=/^\s*([\w$_]+|\([^)]*?\))\s*=>|^\s*function(?:\s+[\w$]+)?\s*\(/,Ca=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;let l;if(4===i.type)if(i.isStatic){l=Tl(G(D(i.content)),!0,i.loc)}else l=Nl([`${n.helperString(ul)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(ul)}(`),l.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let a=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const e=Ll(c.content),t=!(e||xa.test(c.content)),n=c.content.includes(";");(t||a&&e)&&(c=Nl([`${t?"$event":"(...args)"} => ${n?"{":"("}`,c,n?"}":")"]))}let u={props:[kl(l,c||Tl("() => {}",!1,r))]};return o&&(u=o(u)),a&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach((e=>e.key.isHandlerKey=!0)),u},wa=(e,t,n)=>{const{exp:o,modifiers:r,loc:s}=e,i=e.arg;return 4!==i.type?(i.children.unshift("("),i.children.push(') || ""')):i.isStatic||(i.content=`${i.content} || ""`),r.includes("camel")&&(4===i.type?i.content=i.isStatic?D(i.content):`${n.helperString(cl)}(${i.content})`:(i.children.unshift(`${n.helperString(cl)}(`),i.children.push(")"))),n.inSSR||(r.includes("prop")&&ka(i,"."),r.includes("attr")&&ka(i,"^")),!o||4===o.type&&!o.content.trim()?{props:[kl(i,Tl("",!0,s))]}:{props:[kl(i,o)]}},ka=(e,t)=>{4===e.type?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},Ta=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let o,r=!1;for(let e=0;e<n.length;e++){const t=n[e];if(Kl(t)){r=!0;for(let r=e+1;r<n.length;r++){const s=n[r];if(!Kl(s)){o=void 0;break}o||(o=n[e]={type:8,loc:t.loc,children:[t]}),o.children.push(" + ",s),n.splice(r,1),r--}}}if(r&&(1!==n.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find((e=>7===e.type&&!t.directiveTransforms[e.name])))))for(let e=0;e<n.length;e++){const o=n[e];if(Kl(o)||8===o.type){const r=[];2===o.type&&" "===o.content||r.push(o),t.ssr||0!==Ac(o,t)||r.push("1"),n[e]={type:12,content:o,loc:o.loc,codegenNode:El(t.helper(zi),r)}}}}},Na=new WeakSet,Ea=(e,t)=>{if(1===e.type&&Dl(e,"once",!0)){if(Na.has(e)||t.inVOnce)return;return Na.add(e),t.inVOnce=!0,t.helper(pl),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},$a=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return Ra();const s=o.loc.source,i=4===o.type?o.content:s;if(!i.trim()||!Ll(i))return Ra();const l=r||Tl("modelValue",!0),c=r?Fl(r)?`onUpdate:${r.content}`:Nl(['"onUpdate:" + ',r]):"onUpdate:modelValue";let a;a=Nl([`${n.isTS?"($event: any)":"$event"} => (`,o," = $event)"]);const u=[kl(l,e.exp),kl(c,a)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(Pl(e)?e:JSON.stringify(e))+": true")).join(", "),n=r?Fl(r)?`${r.content}Modifiers`:Nl([r,' + "Modifiers"']):"modelModifiers";u.push(kl(n,Tl(`{ ${t} }`,!1,e.loc,2)))}return Ra(u)};function Ra(e=[]){return{props:e}}const Fa=new WeakSet,Aa=(e,t)=>{if(1===e.type){const n=Dl(e,"memo");if(!n||Fa.has(e))return;return Fa.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&13===o.type&&(1!==e.tagType&&nc(o,t),e.codegenNode=El(t.helper(yl),[n.exp,$l(void 0,o),"_cache",String(t.cached++)]))}}};function Ma(e,t={}){const n=t.onError||Fi,o="module"===t.mode;!0===t.prefixIdentifiers?n(Mi(45)):o&&n(Mi(46));t.cacheHandlers&&n(Mi(47)),t.scopeId&&!o&&n(Mi(48));const r=A(e)?ic(e,t):e,[s,i]=[[Ea,Qc,Aa,ta,Sa,ga,aa,Ta],{on:Ca,bind:wa,model:$a}];return Lc(r,C({},t,{prefixIdentifiers:false,nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:C({},i,t.directiveTransforms||{})})),Dc(r,C({},t,{prefixIdentifiers:false}))}const Oa=Symbol(""),Pa=Symbol(""),Ia=Symbol(""),Va=Symbol(""),Ba=Symbol(""),La=Symbol(""),ja=Symbol(""),Ua=Symbol(""),Ha=Symbol(""),Da=Symbol("");var Wa;let za;Wa={[Oa]:"vModelRadio",[Pa]:"vModelCheckbox",[Ia]:"vModelText",[Va]:"vModelSelect",[Ba]:"vModelDynamic",[La]:"withModifiers",[ja]:"withKeys",[Ua]:"vShow",[Ha]:"Transition",[Da]:"TransitionGroup"},Object.getOwnPropertySymbols(Wa).forEach((e=>{_l[e]=Wa[e]}));const Ka=t("style,iframe,script,noscript",!0),Ga={isVoidTag:f,isNativeTag:e=>u(e)||p(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return za||(za=document.createElement("div")),t?(za.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,za.children[0].getAttribute("foo")):(za.innerHTML=e,za.textContent)},isBuiltInComponent:e=>Al(e,"Transition")?Ha:Al(e,"TransitionGroup")?Da:void 0,getNamespace(e,t){let n=t?t.ns:0;if(t&&2===n)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(n=0);else t&&1===n&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(n=0));if(0===n){if("svg"===e)return 1;if("math"===e)return 2}return n},getTextMode({tag:e,ns:t}){if(0===t){if("textarea"===e||"title"===e)return 1;if(Ka(e))return 2}return 0}},qa=(e,t)=>{const n=c(e);return Tl(JSON.stringify(n),!1,t,3)};const Ja=t("passive,once,capture"),Za=t("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Qa=t("left,right"),Xa=t("onkeyup,onkeydown,onkeypress",!0),Ya=(e,t)=>Fl(e)&&"onclick"===e.content.toLowerCase()?Tl(t,!0):4!==e.type?Nl(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,eu=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},tu=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Tl("style",!0,t.loc),exp:qa(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],nu={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:o,loc:r}=e;return t.children.length&&(t.children.length=0),{props:[kl(Tl("innerHTML",!0,r),o||Tl("",!0))]}},text:(e,t,n)=>{const{exp:o,loc:r}=e;return t.children.length&&(t.children.length=0),{props:[kl(Tl("textContent",!0),o?El(n.helperString(tl),[o],r):Tl("",!0))]}},model:(e,t,n)=>{const o=$a(e,t,n);if(!o.props.length||1===t.tagType)return o;const{tag:r}=t,s=n.isCustomElement(r);if("input"===r||"textarea"===r||"select"===r||s){let e=Ia,i=!1;if("input"===r||s){const n=Wl(t,"type");if(n){if(7===n.type)e=Ba;else if(n.value)switch(n.value.content){case"radio":e=Oa;break;case"checkbox":e=Pa;break;case"file":i=!0}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(e=Ba)}else"select"===r&&(e=Va);i||(o.needRuntime=n.helper(e))}return o.props=o.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),o},on:(e,t,n)=>Ca(e,0,n,(t=>{const{modifiers:o}=e;if(!o.length)return t;let{key:r,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:c}=((e,t,n,o)=>{const r=[],s=[],i=[];for(let l=0;l<t.length;l++){const n=t[l];Ja(n)?i.push(n):Qa(n)?Fl(e)?Xa(e.content)?r.push(n):s.push(n):(r.push(n),s.push(n)):Za(n)?s.push(n):r.push(n)}return{keyModifiers:r,nonKeyModifiers:s,eventOptionModifiers:i}})(r,o);if(l.includes("right")&&(r=Ya(r,"onContextmenu")),l.includes("middle")&&(r=Ya(r,"onMouseup")),l.length&&(s=El(n.helper(La),[s,JSON.stringify(l)])),!i.length||Fl(r)&&!Xa(r.content)||(s=El(n.helper(ja),[s,JSON.stringify(i)])),c.length){const e=c.map(K).join("");r=Fl(r)?Tl(`${r.content}${e}`,!0):Nl(["(",r,`) + "${e}"`])}return{props:[kl(r,s)]}})),show:(e,t,n)=>({props:[],needRuntime:n.helper(Ua)})};const ou=Object.create(null);function ru(e,t){if(!A(e)){if(!e.nodeType)return y;e=e.innerHTML}const n=e,o=ou[n];if(o)return o;if("#"===e[0]){const t=document.querySelector(e);e=t?t.innerHTML:""}const{code:r}=function(e,t={}){return Ma(e,C({},Ga,t,{nodeTransforms:[eu,...tu,...t.nodeTransforms||[]],directiveTransforms:C({},nu,t.directiveTransforms||{}),transformHoist:null}))}(e,C({hoistStatic:!0,onError:void 0,onWarn:y},t)),s=new Function(r)();return s._rc=!0,ou[n]=s}return br(ru),e.BaseTransition=sn,e.Comment=Mo,e.EffectScope=ee,e.Fragment=Fo,e.KeepAlive=vn,e.ReactiveEffect=fe,e.Static=Oo,e.Suspense=Jt,e.Teleport=To,e.Text=Ao,e.Transition=Vs,e.TransitionGroup=ti,e.VueElement=As,e.callWithAsyncErrorHandling=Fr,e.callWithErrorHandling=Rr,e.camelize=D,e.capitalize=K,e.cloneVNode=Qo,e.compatUtils=null,e.compile=ru,e.computed=Pt,e.createApp=(...e)=>{const t=Ti().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=Ri(e);if(!o)return;const r=t._component;F(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},e.createBlock=Ho,e.createCommentVNode=function(e="",t=!1){return t?(Vo(),Ho(Mo,null,e)):Jo(Mo,null,e)},e.createElementBlock=function(e,t,n,o,r,s){return Uo(qo(e,t,n,o,r,s,!0))},e.createElementVNode=qo,e.createHydrationRenderer=vo,e.createRenderer=go,e.createSSRApp=(...e)=>{const t=Ni().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=Ri(e);if(t)return n(t,!0,t instanceof SVGElement)},t},e.createSlots=function(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(N(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.fn)}return e},e.createStaticVNode=function(e,t){const n=Jo(Oo,null,e);return n.staticCount=t,n},e.createTextVNode=Xo,e.createVNode=Jo,e.customRef=function(e){return new Ft(e)},e.defineAsyncComponent=function(e){F(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:l}=e;let c,a=null,u=0;const p=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise(((t,n)=>{l(e,(()=>t((u++,a=null,p()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return dn({name:"AsyncComponentWrapper",__asyncLoader:p,get __asyncResolved(){return c},setup(){const e=ur;if(c)return()=>mn(c,e);const t=t=>{a=null,Ar(t,e,13,!o)};if(i&&e.suspense)return p().then((t=>()=>mn(t,e))).catch((e=>(t(e),()=>o?Jo(o,{error:e}):null)));const l=kt(!1),u=kt(),f=kt(!!r);return r&&setTimeout((()=>{f.value=!1}),r),null!=s&&setTimeout((()=>{if(!l.value&&!u.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),u.value=e}}),s),p().then((()=>{l.value=!0,e.parent&&gn(e.parent.vnode)&&Gr(e.parent.update)})).catch((e=>{t(e),u.value=e})),()=>l.value&&c?mn(c,e):u.value&&o?Jo(o,{error:u.value}):n&&!f.value?Jo(n):void 0}})},e.defineComponent=dn,e.defineCustomElement=Rs,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=e=>Rs(e,$i),e.effect=function(e,t){e.effect&&(e=e.effect.fn);const n=new fe(e);t&&(C(n,t),t.scope&&te(n,t.scope)),t&&t.lazy||n.run();const o=n.run.bind(n);return o.effect=n,o},e.effectScope=function(e){return new ee(e)},e.getCurrentInstance=pr,e.getCurrentScope=function(){return X},e.getTransitionRawChildren=fn,e.guardReactiveProps=Zo,e.h=as,e.handleError=Ar,e.hydrate=$i,e.initCustomFormatter=function(){},e.inject=nn,e.isMemoSame=ps,e.isProxy=yt,e.isReactive=gt,e.isReadonly=vt,e.isRef=wt,e.isRuntimeOnly=()=>!mr,e.isVNode=Do,e.markRaw=_t,e.mergeDefaults=function(e,t){for(const n in t){const o=e[n];o?o.default=t[n]:null===o&&(e[n]={default:t[n]})}return e},e.mergeProps=nr,e.nextTick=Kr,e.normalizeClass=a,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!A(t)&&(e.class=a(t)),n&&(e.style=s(n)),e},e.normalizeStyle=s,e.onActivated=bn,e.onBeforeMount=Nn,e.onBeforeUnmount=Fn,e.onBeforeUpdate=$n,e.onDeactivated=_n,e.onErrorCaptured=In,e.onMounted=En,e.onRenderTracked=Pn,e.onRenderTriggered=On,e.onScopeDispose=function(e){X&&X.cleanups.push(e)},e.onServerPrefetch=Mn,e.onUnmounted=An,e.onUpdated=Rn,e.openBlock=Vo,e.popScopeId=function(){jt=null},e.provide=tn,e.proxyRefs=Rt,e.pushScopeId=function(e){jt=e},e.queuePostFlushCb=Zr,e.reactive=ft,e.readonly=ht,e.ref=kt,e.registerRuntimeCompiler=br,e.render=Ei,e.renderList=function(e,t,n,o){let r;const s=n&&n[o];if(N(e)||A(e)){r=new Array(e.length);for(let n=0,o=e.length;n<o;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(O(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o<i;o++){const i=n[o];r[o]=t(e[i],i,o,s&&s[o])}}else r=[];return n&&(n[o]=r),r},e.renderSlot=function(e,t,n={},o,r){if(Lt.isCE)return Jo("slot","default"===t?null:{name:t},o&&o());let s=e[t];s&&s._c&&(s._d=!1),Vo();const i=s&&or(s(n)),l=Ho(Fo,{key:n.key||`_${t}`},i||(o?o():[]),i&&1===e._?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l},e.resolveComponent=function(e,t){return $o(No,e,!0,t)||e},e.resolveDirective=function(e){return $o("directives",e)},e.resolveDynamicComponent=function(e){return A(e)?$o(No,e,!1)||e:e||Eo},e.resolveFilter=null,e.resolveTransitionHooks=cn,e.setBlockTracking=jo,e.setDevtoolsHook=function(t){e.devtools=t},e.setTransitionHooks=pn,e.shallowReactive=dt,e.shallowReadonly=function(e){return mt(e,!0,Ie,it,ut)},e.shallowRef=function(e){return Nt(e,!0)},e.ssrContextKey=us,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=e=>null==e?"":N(e)||O(e)&&(e.toString===I||!F(e.toString))?JSON.stringify(e,m,2):String(e),e.toHandlerKey=G,e.toHandlers=function(e){const t={};for(const n in e)t[G(n)]=e[n];return t},e.toRaw=bt,e.toRef=Mt,e.toRefs=function(e){const t=N(e)?new Array(e.length):{};for(const n in e)t[n]=Mt(e,n);return t},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){xt(e)},e.unref=Et,e.useAttrs=function(){return cs().attrs},e.useCssModule=function(e="$style"){return g},e.useCssVars=function(e){const t=pr();if(!t)return;const n=()=>Ms(t.subTree,e(t.proxy));ts(n),En((()=>{const e=new MutationObserver(n);e.observe(t.subTree.el.parentNode,{childList:!0}),An((()=>e.disconnect()))}))},e.useSSRContext=()=>{},e.useSlots=function(){return cs().slots},e.useTransitionState=on,e.vModelCheckbox=ai,e.vModelDynamic=gi,e.vModelRadio=pi,e.vModelSelect=fi,e.vModelText=ci,e.vShow=Si,e.version=fs,e.warn=Nr,e.watch=os,e.watchEffect=function(e,t){return rs(e,null,t)},e.watchPostEffect=ts,e.watchSyncEffect=function(e,t){return rs(e,null,{flush:"sync"})},e.withAsyncContext=function(e){const t=pr();let n=e();return dr(),P(n)&&(n=n.catch((e=>{throw fr(t),e}))),[n,()=>fr(t)]},e.withCtx=Ht,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){if(null===Lt)return e;const n=Lt.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[e,s,i,l=g]=t[r];F(e)&&(e={mounted:e,updated:e}),e.deep&&ls(s),o.push({dir:e,instance:n,value:s,oldValue:void 0,arg:i,modifiers:l})}return e},e.withKeys=(e,t)=>n=>{if(!("key"in n))return;const o=z(n.key);return t.some((e=>e===o||_i[e]===o))?e(n):void 0},e.withMemo=function(e,t,n,o){const r=n[o];if(r&&ps(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s},e.withModifiers=(e,t)=>(n,...o)=>{for(let e=0;e<t.length;e++){const o=bi[t[e]];if(o&&o(n,t))return}return e(n,...o)},e.withScopeId=e=>Ht,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); /*! sprintf-js v1.1.2 | Copyright (c) 2007-present, Alexandru Mărășteanu <hello@alexei.ro> | BSD-3-Clause */ !function(){"use strict";var g={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function y(e){return function(e,t){var r,n,i,s,a,o,p,c,l,u=1,f=e.length,d="";for(n=0;n<f;n++)if("string"==typeof e[n])d+=e[n];else if("object"==typeof e[n]){if((s=e[n]).keys)for(r=t[u],i=0;i<s.keys.length;i++){if(null==r)throw new Error(y('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[i],s.keys[i-1]));r=r[s.keys[i]]}else r=s.param_no?t[s.param_no]:t[u++];if(g.not_type.test(s.type)&&g.not_primitive.test(s.type)&&r instanceof Function&&(r=r()),g.numeric_arg.test(s.type)&&"number"!=typeof r&&isNaN(r))throw new TypeError(y("[sprintf] expecting number but found %T",r));switch(g.number.test(s.type)&&(c=0<=r),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}g.json.test(s.type)?d+=r:(!g.number.test(s.type)||c&&!s.sign?l="":(l=c?"+":"-",r=r.toString().replace(g.sign,"")),o=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",p=s.width-(l+r).length,a=s.width&&0<p?o.repeat(p):"",d+=s.align?l+r+a:"0"===o?l+a+r:a+l+r)}return d}(function(e){if(p[e])return p[e];var t,r=e,n=[],i=0;for(;r;){if(null!==(t=g.text.exec(r)))n.push(t[0]);else if(null!==(t=g.modulo.exec(r)))n.push("%");else{if(null===(t=g.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var s=[],a=t[2],o=[];if(null===(o=g.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(o[1]);""!==(a=a.substring(o[0].length));)if(null!==(o=g.key_access.exec(a)))s.push(o[1]);else{if(null===(o=g.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(o[1])}t[2]=s}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return p[e]=n}(e),arguments)}function e(e,t){return y.apply(null,[e].concat(t||[]))}var p=Object.create(null);"undefined"!=typeof exports&&(exports.sprintf=y,exports.vsprintf=e),"undefined"!=typeof window&&(window.sprintf=y,window.vsprintf=e,"function"==typeof define&&define.amd&&define(function(){return{sprintf:y,vsprintf:e}}))}(); //# /** * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler * Licensed under MIT * @author Ariel Flesler * @version 2.1.3 */ ;(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof module!=='undefined'&&module.exports){module.exports=factory(require('jquery'))}else{factory(jQuery)}})(function($){'use strict';var $scrollTo=$.scrollTo=function(target,duration,settings){return $(window).scrollTo(target,duration,settings)};$scrollTo.defaults={axis:'xy',duration:0,limit:true};function isWin(elem){return!elem.nodeName||$.inArray(elem.nodeName.toLowerCase(),['iframe','#document','html','body'])!==-1}function isFunction(obj){return typeof obj==='function'}$.fn.scrollTo=function(target,duration,settings){if(typeof duration==='object'){settings=duration;duration=0}if(typeof settings==='function'){settings={onAfter:settings}}if(target==='max'){target=9e9}settings=$.extend({},$scrollTo.defaults,settings);duration=duration||settings.duration;var queue=settings.queue&&settings.axis.length>1;if(queue){duration/=2}settings.offset=both(settings.offset);settings.over=both(settings.over);return this.each(function(){if(target===null){return}var win=isWin(this),elem=win?this.contentWindow||window:this,$elem=$(elem),targ=target,attr={},toff;switch(typeof targ){case 'number':case 'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=win?$(targ):$(targ,elem);case 'object':if(targ.length===0){return}if(targ.is||targ.style){toff=(targ=$(targ)).offset()}}var offset=isFunction(settings.offset)&&settings.offset(elem,targ)||settings.offset;$.each(settings.axis.split(''),function(i,axis){var Pos=axis==='x'?'Left':'Top',pos=Pos.toLowerCase(),key='scroll'+Pos,prev=$elem[key](),max=$scrollTo.max(elem,axis);if(toff){attr[key]=toff[pos]+(win?0:prev-$elem.offset()[pos]);if(settings.margin){attr[key]-=parseInt(targ.css('margin'+Pos),10)||0;attr[key]-=parseInt(targ.css('border'+Pos+'Width'),10)||0}attr[key]+=offset[pos]||0;if(settings.over[pos]){attr[key]+=targ[axis==='x'?'width':'height']()*settings.over[pos]}}else{var val=targ[pos];attr[key]=val.slice&&val.slice(-1)==='%'?parseFloat(val)/100*max:val}if(settings.limit&&/^\d+$/.test(attr[key])){attr[key]=attr[key]<=0?0:Math.min(attr[key],max)}if(!i&&settings.axis.length>1){if(prev===attr[key]){attr={}}else if(queue){animate(settings.onAfterFirst);attr={}}}});animate(settings.onAfter);function animate(callback){var opts=$.extend({},settings,{queue:true,duration:duration,complete:callback&&function(){callback.call(elem,targ,settings)}});$elem.animate(attr,opts)}})};$scrollTo.max=function(elem,axis){var Dim=axis==='x'?'Width':'Height',scroll='scroll'+Dim;if(!isWin(elem)){return elem[scroll]-$(elem)[Dim.toLowerCase()]()}var size='client'+Dim,doc=elem.ownerDocument||elem.document,html=doc.documentElement,body=doc.body;return Math.max(html[scroll],body[scroll])-Math.min(html[size],body[size])};function both(val){return isFunction(val)||$.isPlainObject(val)?val:{top:val,left:val}}$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(t){return $(t.elem)[t.prop]()},set:function(t){var curr=this.get(t);if(t.options.interrupt&&t._last&&t._last!==curr){return $(t.elem).stop()}var next=Math.round(t.now);if(curr!==next){$(t.elem)[t.prop](next);t._last=this.get(t)}}};return $scrollTo}); /* mousetrap v1.6.5 craig.is/killing/mice */ (function(q,u,c){function v(a,b,g){a.addEventListener?a.addEventListener(b,g,!1):a.attachEvent("on"+b,g)}function z(a){if("keypress"==a.type){var b=String.fromCharCode(a.which);a.shiftKey||(b=b.toLowerCase());return b}return n[a.which]?n[a.which]:r[a.which]?r[a.which]:String.fromCharCode(a.which).toLowerCase()}function F(a){var b=[];a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");return b}function w(a){return"shift"==a||"ctrl"==a||"alt"==a|| "meta"==a}function A(a,b){var g,d=[];var e=a;"+"===e?e=["+"]:(e=e.replace(/\+{2}/g,"+plus"),e=e.split("+"));for(g=0;g<e.length;++g){var m=e[g];B[m]&&(m=B[m]);b&&"keypress"!=b&&C[m]&&(m=C[m],d.push("shift"));w(m)&&d.push(m)}e=m;g=b;if(!g){if(!p){p={};for(var c in n)95<c&&112>c||n.hasOwnProperty(c)&&(p[n[c]]=c)}g=p[e]?"keydown":"keypress"}"keypress"==g&&d.length&&(g="keydown");return{key:m,modifiers:d,action:g}}function D(a,b){return null===a||a===u?!1:a===b?!0:D(a.parentNode,b)}function d(a){function b(a){a= a||{};var b=!1,l;for(l in p)a[l]?b=!0:p[l]=0;b||(x=!1)}function g(a,b,t,f,g,d){var l,E=[],h=t.type;if(!k._callbacks[a])return[];"keyup"==h&&w(a)&&(b=[a]);for(l=0;l<k._callbacks[a].length;++l){var c=k._callbacks[a][l];if((f||!c.seq||p[c.seq]==c.level)&&h==c.action){var e;(e="keypress"==h&&!t.metaKey&&!t.ctrlKey)||(e=c.modifiers,e=b.sort().join(",")===e.sort().join(","));e&&(e=f&&c.seq==f&&c.level==d,(!f&&c.combo==g||e)&&k._callbacks[a].splice(l,1),E.push(c))}}return E}function c(a,b,c,f){k.stopCallback(b, b.target||b.srcElement,c,f)||!1!==a(b,c)||(b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation?b.stopPropagation():b.cancelBubble=!0)}function e(a){"number"!==typeof a.which&&(a.which=a.keyCode);var b=z(a);b&&("keyup"==a.type&&y===b?y=!1:k.handleKey(b,F(a),a))}function m(a,g,t,f){function h(c){return function(){x=c;++p[a];clearTimeout(q);q=setTimeout(b,1E3)}}function l(g){c(t,g,a);"keyup"!==f&&(y=z(g));setTimeout(b,10)}for(var d=p[a]=0;d<g.length;++d){var e=d+1===g.length?l:h(f|| A(g[d+1]).action);n(g[d],e,f,a,d)}}function n(a,b,c,f,d){k._directMap[a+":"+c]=b;a=a.replace(/\s+/g," ");var e=a.split(" ");1<e.length?m(a,e,b,c):(c=A(a,c),k._callbacks[c.key]=k._callbacks[c.key]||[],g(c.key,c.modifiers,{type:c.action},f,a,d),k._callbacks[c.key][f?"unshift":"push"]({callback:b,modifiers:c.modifiers,action:c.action,seq:f,level:d,combo:a}))}var k=this;a=a||u;if(!(k instanceof d))return new d(a);k.target=a;k._callbacks={};k._directMap={};var p={},q,y=!1,r=!1,x=!1;k._handleKey=function(a, d,e){var f=g(a,d,e),h;d={};var k=0,l=!1;for(h=0;h<f.length;++h)f[h].seq&&(k=Math.max(k,f[h].level));for(h=0;h<f.length;++h)f[h].seq?f[h].level==k&&(l=!0,d[f[h].seq]=1,c(f[h].callback,e,f[h].combo,f[h].seq)):l||c(f[h].callback,e,f[h].combo);f="keypress"==e.type&&r;e.type!=x||w(a)||f||b(d);r=l&&"keydown"==e.type};k._bindMultiple=function(a,b,c){for(var d=0;d<a.length;++d)n(a[d],b,c)};v(a,"keypress",e);v(a,"keydown",e);v(a,"keyup",e)}if(q){var n={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl", 18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},r={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},C={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},B={option:"alt",command:"meta","return":"enter", escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p;for(c=1;20>c;++c)n[111+c]="f"+c;for(c=0;9>=c;++c)n[c+96]=c.toString();d.prototype.bind=function(a,b,c){a=a instanceof Array?a:[a];this._bindMultiple.call(this,a,b,c);return this};d.prototype.unbind=function(a,b){return this.bind.call(this,a,function(){},b)};d.prototype.trigger=function(a,b){if(this._directMap[a+":"+b])this._directMap[a+":"+b]({},a);return this};d.prototype.reset=function(){this._callbacks={}; this._directMap={};return this};d.prototype.stopCallback=function(a,b){if(-1<(" "+b.className+" ").indexOf(" mousetrap ")||D(b,this.target))return!1;if("composedPath"in a&&"function"===typeof a.composedPath){var c=a.composedPath()[0];c!==a.target&&(b=c)}return"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable};d.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)};d.addKeycodes=function(a){for(var b in a)a.hasOwnProperty(b)&&(n[b]=a[b]);p=null}; d.init=function(){var a=d(u),b;for(b in a)"_"!==b.charAt(0)&&(d[b]=function(b){return function(){return a[b].apply(a,arguments)}}(b))};d.init();q.Mousetrap=d;"undefined"!==typeof module&&module.exports&&(module.exports=d);"function"===typeof define&&define.amd&&define(function(){return d})}})("undefined"!==typeof window?window:null,"undefined"!==typeof window?document:null); /*! iFrame Resizer (iframeSizer.min.js ) - v4.2.11 - 2020-06-02 * Desc: Force cross domain iframes to size to content. * Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame. * Copyright: (c) 2020 David J. Bradshaw - dave@bradshaw.net * License: MIT */ !function(l){if("undefined"!=typeof window){var e,m=0,g=!1,o=!1,v="message".length,I="[iFrameSizer]",x=I.length,F=null,r=window.requestAnimationFrame,h={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},M={},i=null,w={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){E("onMessage function not defined")},onResized:function(){},onScroll:function(){return!0}},k={};window.jQuery&&((e=window.jQuery).fn?e.fn.iFrameResize||(e.fn.iFrameResize=function(i){return this.filter("iframe").each(function(e,n){d(n,i)}).end()}):T("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof define&&define.amd?define([],q):"object"==typeof module&&"object"==typeof module.exports&&(module.exports=q()),window.iFrameResize=window.iFrameResize||q()}function p(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function z(e,n,i){e.addEventListener(n,i,!1)}function O(e,n,i){e.removeEventListener(n,i,!1)}function a(e){return I+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}function t(e){return M[e]?M[e].log:g}function R(e,n){s("log",e,n,t(e))}function T(e,n){s("info",e,n,t(e))}function E(e,n){s("warn",e,n,!0)}function s(e,n,i,t){!0===t&&"object"==typeof window.console&&console[e](a(n),i)}function n(n){function e(){i("Height"),i("Width"),A(function(){P(b),S(y),d("onResized",b)},b,"init")}function i(e){var n=Number(M[y]["max"+e]),i=Number(M[y]["min"+e]),t=e.toLowerCase(),o=Number(b[t]);R(y,"Checking "+t+" is in range "+i+"-"+n),o<i&&(o=i,R(y,"Set "+t+" to min value")),n<o&&(o=n,R(y,"Set "+t+" to max value")),b[t]=""+o}function t(e){return p.substr(p.indexOf(":")+v+e)}function a(e,n){!function(e,n,i){k[i]||(k[i]=setTimeout(function(){k[i]=null,e()},n))}(function(){B("Send Page Info","pageInfo:"+function(){var e=document.body.getBoundingClientRect(),n=b.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:n.height,iframeWidth:n.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(n.top-e.top,10),offsetLeft:parseInt(n.left-e.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}(),e,n)},32,n)}function r(e){var n=e.getBoundingClientRect();return N(y),{x:Math.floor(Number(n.left)+Number(F.x)),y:Math.floor(Number(n.top)+Number(F.y))}}function o(e){var n=e?r(b.iframe):{x:0,y:0},i={x:Number(b.width)+n.x,y:Number(b.height)+n.y};R(y,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](i.x,i.y):E(y,"Unable to scroll to requested position, window.parentIFrame not found"):(F=i,s(),R(y,"--"))}function s(){!1!==d("onScroll",F)?S(y):H()}function d(e,n){return W(y,e,n)}var c,u,f,l,m,g,h,w,p=n.data,b={},y=null;"[iFrameResizerChild]Ready"===p?function(){for(var e in M)B("iFrame requested init",L(e),M[e].iframe,e)}():I===(""+p).substr(0,x)&&p.substr(x).split(":")[0]in M?(m=p.substr(x).split(":"),g=m[1]?parseInt(m[1],10):0,h=M[m[0]]&&M[m[0]].iframe,w=getComputedStyle(h),b={iframe:h,id:m[0],height:g+function(e){if("border-box"!==e.boxSizing)return 0;var n=e.paddingTop?parseInt(e.paddingTop,10):0,i=e.paddingBottom?parseInt(e.paddingBottom,10):0;return n+i}(w)+function(e){if("border-box"!==e.boxSizing)return 0;var n=e.borderTopWidth?parseInt(e.borderTopWidth,10):0,i=e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0;return n+i}(w),width:m[2],type:m[3]},y=b.id,M[y]&&(M[y].loaded=!0),(l=b.type in{true:1,false:1,undefined:1})&&R(y,"Ignoring init message from meta parent page"),!l&&(f=!0,M[u=y]||(f=!1,E(b.type+" No settings for "+u+". Message was: "+p)),f)&&(R(y,"Received: "+p),c=!0,null===b.iframe&&(E(y,"IFrame ("+b.id+") not found"),c=!1),c&&function(){var e,i=n.origin,t=M[y]&&M[y].checkOrigin;if(t&&""+i!="null"&&!(t.constructor===Array?function(){var e=0,n=!1;for(R(y,"Checking connection is from allowed list of origins: "+t);e<t.length;e++)if(t[e]===i){n=!0;break}return n}():(e=M[y]&&M[y].remoteHost,R(y,"Checking connection is from: "+e),i===e)))throw new Error("Unexpected message received from: "+i+" for "+b.iframe.id+". Message was: "+n.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(M[y]&&M[y].firstRun&&M[y]&&(M[y].firstRun=!1),b.type){case"close":C(b.iframe);break;case"message":!function(e){R(y,"onMessage passed: {iframe: "+b.iframe.id+", message: "+e+"}"),d("onMessage",{iframe:b.iframe,message:JSON.parse(e)}),R(y,"--")}(t(6));break;case"autoResize":M[y].autoResize=JSON.parse(t(9));break;case"scrollTo":o(!1);break;case"scrollToOffset":o(!0);break;case"pageInfo":a(M[y]&&M[y].iframe,y),function(){function e(n,i){function t(){M[r]?a(M[r].iframe,r):o()}["scroll","resize"].forEach(function(e){R(r,n+e+" listener for sendPageInfo"),i(window,e,t)})}function o(){e("Remove ",O)}var r=y;e("Add ",z),M[r]&&(M[r].stopPageInfo=o)}();break;case"pageInfoStop":M[y]&&M[y].stopPageInfo&&(M[y].stopPageInfo(),delete M[y].stopPageInfo);break;case"inPageLink":!function(e){var n,i=e.split("#")[1]||"",t=decodeURIComponent(i),o=document.getElementById(t)||document.getElementsByName(t)[0];o?(n=r(o),R(y,"Moving to in page link (#"+i+") at x: "+n.x+" y: "+n.y),F={x:n.x,y:n.y},s(),R(y,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(i):R(y,"In page link #"+i+" not found and window.parentIFrame not found"):R(y,"In page link #"+i+" not found")}(t(9));break;case"reset":j(b);break;case"init":e(),d("onInit",b.iframe);break;default:e()}}())):T(y,"Ignored: "+p)}function W(e,n,i){var t=null,o=null;if(M[e]){if("function"!=typeof(t=M[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=t(i)}return o}function b(e){var n=e.id;delete M[n]}function C(e){var n=e.id;if(!1!==W(n,"onClose",n)){R(n,"Removing iFrame: "+n);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){E(e)}W(n,"onClosed",n),R(n,"--"),b(e)}else R(n,"Close iframe cancelled by onClose event")}function N(e){null===F&&R(e,"Get page position: "+(F={x:window.pageXOffset!==l?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==l?window.pageYOffset:document.documentElement.scrollTop}).x+","+F.y)}function S(e){null!==F&&(window.scrollTo(F.x,F.y),R(e,"Set page position: "+F.x+","+F.y),H())}function H(){F=null}function j(e){R(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),N(e.id),A(function(){P(e),B("reset","reset",e.iframe,e.id)},e,"reset")}function P(n){function i(e){o||"0"!==n[e]||(o=!0,R(t,"Hidden iFrame detected, creating visibility listener"),function(){function n(){Object.keys(M).forEach(function(e){!function(n){function e(e){return"0px"===(M[n]&&M[n].iframe.style[e])}M[n]&&null!==M[n].iframe.offsetParent&&(e("height")||e("width"))&&B("Visibility change","resize",M[n].iframe,n)}(e)})}function i(e){R("window","Mutation observed: "+e[0].target+" "+e[0].type),c(n,16)}var t=p();t&&function(){var e=document.querySelector("body");new t(i).observe(e,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0})}()}())}function e(e){!function(e){n.id?(n.iframe.style[e]=n[e]+"px",R(n.id,"IFrame ("+t+") "+e+" set to "+n[e]+"px")):R("undefined","messageData id not set")}(e),i(e)}var t=n.iframe.id;M[t]&&(M[t].sizeHeight&&e("height"),M[t].sizeWidth&&e("width"))}function A(e,n,i){i!==n.type&&r&&!window.jasmine?(R(n.id,"Requesting animation frame"),r(e)):e()}function B(e,n,i,t,o){var r,a=!1;t=t||i.id,M[t]&&(i&&"contentWindow"in i&&null!==i.contentWindow?(r=M[t]&&M[t].targetOrigin,R(t,"["+e+"] Sending msg to iframe["+t+"] ("+n+") targetOrigin: "+r),i.contentWindow.postMessage(I+n,r)):E(t,"["+e+"] IFrame("+t+") not found"),o&&M[t]&&M[t].warningTimeout&&(M[t].msgTimeout=setTimeout(function(){!M[t]||M[t].loaded||a||(a=!0,E(t,"IFrame has not responded within "+M[t].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))},M[t].warningTimeout)))}function L(e){return e+":"+M[e].bodyMarginV1+":"+M[e].sizeWidth+":"+M[e].log+":"+M[e].interval+":"+M[e].enablePublicMethods+":"+M[e].autoResize+":"+M[e].bodyMargin+":"+M[e].heightCalculationMethod+":"+M[e].bodyBackground+":"+M[e].bodyPadding+":"+M[e].tolerance+":"+M[e].inPageLinks+":"+M[e].resizeFrom+":"+M[e].widthCalculationMethod}function d(i,e){function n(e){var n=e.split("Callback");if(2===n.length){var i="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[i]=this[e],delete this[e],E(c,"Deprecated: '"+e+"' has been renamed '"+i+"'. The old method will be removed in the next major version.")}}var t,o,r,a,s,d,c=(""===(o=i.id)&&(i.id=(t=e&&e.id||w.id+m++,null!==document.getElementById(t)&&(t+=m++),o=t),g=(e||{}).log,R(o,"Added missing iframe ID: "+o+" ("+i.src+")")),o);function u(e){1/0!==M[c][e]&&0!==M[c][e]&&(i.style[e]=M[c][e]+"px",R(c,"Set "+e+" = "+M[c][e]+"px"))}function f(e){if(M[c]["min"+e]>M[c]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}c in M&&"iFrameResizer"in i?E(c,"Ignored iFrame, already setup."):(d=(d=e)||{},M[c]={firstRun:!0,iframe:i,remoteHost:i.src&&i.src.split("/").slice(0,3).join("/")},function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(d),Object.keys(d).forEach(n,d),function(e){for(var n in w)Object.prototype.hasOwnProperty.call(w,n)&&(M[c][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:w[n])}(d),M[c]&&(M[c].targetOrigin=!0===M[c].checkOrigin?function(e){return""===e||null!==e.match(/^(about:blank|javascript:|file:\/\/)/)?"*":e}(M[c].remoteHost):"*"),function(){switch(R(c,"IFrame scrolling "+(M[c]&&M[c].scrolling?"enabled":"disabled")+" for "+c),i.style.overflow=!1===(M[c]&&M[c].scrolling)?"hidden":"auto",M[c]&&M[c].scrolling){case"omit":break;case!0:i.scrolling="yes";break;case!1:i.scrolling="no";break;default:i.scrolling=M[c]?M[c].scrolling:"no"}}(),f("Height"),f("Width"),u("maxHeight"),u("minHeight"),u("maxWidth"),u("minWidth"),"number"!=typeof(M[c]&&M[c].bodyMargin)&&"0"!==(M[c]&&M[c].bodyMargin)||(M[c].bodyMarginV1=M[c].bodyMargin,M[c].bodyMargin=M[c].bodyMargin+"px"),r=L(c),(s=p())&&(a=s,i.parentNode&&new a(function(e){e.forEach(function(e){Array.prototype.slice.call(e.removedNodes).forEach(function(e){e===i&&C(i)})})}).observe(i.parentNode,{childList:!0})),z(i,"load",function(){B("iFrame.onload",r,i,l,!0),function(){var e=M[c]&&M[c].firstRun,n=M[c]&&M[c].heightCalculationMethod in h;!e&&n&&j({iframe:i,height:0,width:0,type:"init"})}()}),B("init",r,i,l,!0),M[c]&&(M[c].iframe.iFrameResizer={close:C.bind(null,M[c].iframe),removeListeners:b.bind(null,M[c].iframe),resize:B.bind(null,"Window resize","resize",M[c].iframe),moveToAnchor:function(e){B("Move to anchor","moveToAnchor:"+e,M[c].iframe,c)},sendMessage:function(e){B("Send Message","message:"+(e=JSON.stringify(e)),M[c].iframe,c)}}))}function c(e,n){null===i&&(i=setTimeout(function(){i=null,e()},n))}function u(){"hidden"!==document.visibilityState&&(R("document","Trigger event: Visiblity change"),c(function(){f("Tab Visable","resize")},16))}function f(n,i){Object.keys(M).forEach(function(e){!function(e){return M[e]&&"parent"===M[e].resizeFrom&&M[e].autoResize&&!M[e].firstRun}(e)||B(n,i,M[e].iframe,e)})}function y(){z(window,"message",n),z(window,"resize",function(){!function(e){R("window","Trigger event: "+e),c(function(){f("Window "+e,"resize")},16)}("resize")}),z(document,"visibilitychange",u),z(document,"-webkit-visibilitychange",u)}function q(){function i(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),d(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!r;e+=1)r=window[n[e]+"RequestAnimationFrame"];r?r=r.bind(window):R("setup","RequestAnimationFrame not supported")}(),y(),function(e,n){switch(t=[],function(e){e&&e.enablePublicMethods&&E("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(e),typeof n){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(n||"iframe"),i.bind(l,e));break;case"object":i(e,n);break;default:throw new TypeError("Unexpected data type ("+typeof n+")")}return t}}}(); //# /*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v4.2.11 - 2020-06-02 * Desc: Include this file in any page being loaded into an iframe * to force the iframe to resize to the content size. * Requires: iframeResizer.min.js on host page. * Copyright: (c) 2020 David J. Bradshaw - dave@bradshaw.net * License: MIT */ !function(d){if("undefined"!=typeof window){var n=!0,o=10,i="",r=0,a="",t=null,u="",c=!1,s={resize:1,click:1},l=128,f=!0,m=1,h="bodyOffset",g=h,p=!0,v="",y={},b=32,w=null,T=!1,E="[iFrameSizer]",O=E.length,S="",M={max:1,min:1,bodyScroll:1,documentElementScroll:1},I="child",N=!0,A=window.parent,C="*",z=0,k=!1,e=null,R=16,x=1,L="scroll",F=L,P=window,D=function(){re("onMessage function not defined")},j=function(){},q=function(){},H={height:function(){return re("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return re("Custom width calculation function not defined"),document.body.scrollWidth}},W={},B=!1;try{var J=Object.create({},{passive:{get:function(){B=!0}}});window.addEventListener("test",ee,J),window.removeEventListener("test",ee,J)}catch(e){}var U,V,K,Q,X,Y,G=Date.now||function(){return(new Date).getTime()},Z={bodyOffset:function(){return document.body.offsetHeight+pe("marginTop")+pe("marginBottom")},offset:function(){return Z.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return H.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,ye(Z))},min:function(){return Math.min.apply(null,ye(Z))},grow:function(){return Z.max()},lowestElement:function(){return Math.max(Z.bodyOffset()||Z.documentElementOffset(),ve("bottom",we()))},taggedElement:function(){return be("bottom","data-iframe-height")}},$={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return H.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max($.bodyScroll(),$.documentElementScroll())},max:function(){return Math.max.apply(null,ye($))},min:function(){return Math.min.apply(null,ye($))},rightMostElement:function(){return ve("right",we())},taggedElement:function(){return be("right","data-iframe-width")}},_=(U=Te,X=null,Y=0,function(){var e=G(),t=R-(e-(Y=Y||e));return V=this,K=arguments,t<=0||R<t?(X&&(clearTimeout(X),X=null),Y=e,Q=U.apply(V,K),X||(V=K=null)):X=X||setTimeout(Ee,t),Q});te(window,"message",function(t){var n={init:function(){v=t.data,A=t.source,ae(),f=!1,setTimeout(function(){p=!1},l)},reset:function(){p?ie("Page reset ignored by init"):(ie("Page size reset by host page"),Me("resetPage"))},resize:function(){Oe("resizeParent","Parent window requested size check")},moveToAnchor:function(){y.findTarget(i())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=i();ie("PageInfoFromParent called from parent: "+e),q(JSON.parse(e)),ie(" --")},message:function(){var e=i();ie("onMessage called from parent: "+e),D(JSON.parse(e)),ie(" --")}};function o(){return t.data.split("]")[1].split(":")[0]}function i(){return t.data.substr(t.data.indexOf(":")+1)}function r(){return t.data.split(":")[2]in{true:1,false:1}}function e(){var e=o();e in n?n[e]():("undefined"==typeof module||!module.exports)&&"iFrameResize"in window||"jQuery"in window&&"iFrameResize"in window.jQuery.prototype||r()||re("Unexpected message ("+t.data+")")}E===(""+t.data).substr(0,O)&&(!1===f?e():r()?n.init():ie('Ignored message of type "'+o()+'". Received before initialization.'))}),te(window,"readystatechange",Ae),Ae()}function ee(){}function te(e,t,n,o){e.addEventListener(t,n,!!B&&(o||{}))}function ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}function oe(e){return E+"["+S+"] "+e}function ie(e){T&&"object"==typeof window.console&&console.log(oe(e))}function re(e){"object"==typeof window.console&&console.warn(oe(e))}function ae(){!function(){function e(e){return"true"===e}var t=v.substr(O).split(":");S=t[0],r=d!==t[1]?Number(t[1]):r,c=d!==t[2]?e(t[2]):c,T=d!==t[3]?e(t[3]):T,b=d!==t[4]?Number(t[4]):b,n=d!==t[6]?e(t[6]):n,a=t[7],g=d!==t[8]?t[8]:g,i=t[9],u=t[10],z=d!==t[11]?Number(t[11]):z,y.enable=d!==t[12]&&e(t[12]),I=d!==t[13]?t[13]:I,F=d!==t[14]?t[14]:F}(),ie("Initialising iFrame ("+location.href+")"),function(){function e(e,t){return"function"==typeof e&&(ie("Setup custom "+t+"CalcMethod"),H[t]=e,e="custom"),e}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(function(){var e=window.iFrameResizer;ie("Reading data from page: "+JSON.stringify(e)),Object.keys(e).forEach(ue,e),D="onMessage"in e?e.onMessage:D,j="onReady"in e?e.onReady:j,C="targetOrigin"in e?e.targetOrigin:C,g="heightCalculationMethod"in e?e.heightCalculationMethod:g,F="widthCalculationMethod"in e?e.widthCalculationMethod:F}(),g=e(g,"height"),F=e(F,"width"));ie("TargetOrigin for parent set to: "+C)}(),function(){d===a&&(a=r+"px");ce("margin",function(e,t){-1!==t.indexOf("-")&&(re("Negative CSS value ignored for "+e),t="");return t}("margin",a))}(),ce("background",i),ce("padding",u),function(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}(),fe(),me(),document.documentElement.style.height="",document.body.style.height="",ie('HTML & body height set to "auto"'),ie("Enable public methods"),P.parentIFrame={autoResize:function(e){return!0===e&&!1===n?(n=!0,he()):!1===e&&!0===n&&(n=!1,de("remove"),null!==t&&t.disconnect(),clearInterval(w)),Ne(0,0,"autoResize",JSON.stringify(n)),n},close:function(){Ne(0,0,"close")},getId:function(){return S},getPageInfo:function(e){"function"==typeof e?(q=e,Ne(0,0,"pageInfo")):(q=function(){},Ne(0,0,"pageInfoStop"))},moveToAnchor:function(e){y.findTarget(e)},reset:function(){Ie("parentIFrame.reset")},scrollTo:function(e,t){Ne(t,e,"scrollTo")},scrollToOffset:function(e,t){Ne(t,e,"scrollToOffset")},sendMessage:function(e,t){Ne(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){g=e,fe()},setWidthCalculationMethod:function(e){F=e,me()},setTargetOrigin:function(e){ie("Set targetOrigin: "+e),C=e},size:function(e,t){Oe("size","parentIFrame.size("+((e||"")+(t?","+t:""))+")",e,t)}},he(),y=function(){function r(e){var t=e.getBoundingClientRect(),n={x:window.pageXOffset!==d?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==d?window.pageYOffset:document.documentElement.scrollTop};return{x:parseInt(t.left,10)+parseInt(n.x,10),y:parseInt(t.top,10)+parseInt(n.y,10)}}function t(e){var t,n=e.split("#")[1]||e,o=decodeURIComponent(n),i=document.getElementById(o)||document.getElementsByName(o)[0];d!==i?(t=r(i),ie("Moving to in page link (#"+n+") at x: "+t.x+" y: "+t.y),Ne(t.y,t.x,"scrollToOffset")):(ie("In page link (#"+n+") not found in iFrame, so sending to parent"),Ne(0,0,"inPageLink","#"+n))}function e(){""!==location.hash&&"#"!==location.hash&&t(location.href)}function n(){Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),function(e){"#"!==e.getAttribute("href")&&te(e,"click",function(e){e.preventDefault(),t(this.getAttribute("href"))})})}y.enable?Array.prototype.forEach&&document.querySelectorAll?(ie("Setting up location.hash handlers"),n(),te(window,"hashchange",e),setTimeout(e,l)):re("In page linking not fully supported in this browser! (See README.md for IE8 workaround)"):ie("In page linking not enabled");return{findTarget:t}}(),Oe("init","Init message from host page"),j()}function ue(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],re("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function ce(e,t){d!==t&&""!==t&&"null"!==t&&ie("Body "+e+' set to "'+(document.body.style[e]=t)+'"')}function se(n){var e={add:function(e){function t(){Oe(n.eventName,n.eventType)}W[e]=t,te(window,e,t,{passive:!0})},remove:function(e){var t=W[e];delete W[e],function(e,t,n){e.removeEventListener(t,n,!1)}(window,e,t)}};n.eventNames&&Array.prototype.map?(n.eventName=n.eventNames[0],n.eventNames.map(e[n.method])):e[n.method](n.eventName),ie(ne(n.method)+" event listener: "+n.eventType)}function de(e){se({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),se({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),se({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),se({method:e,eventType:"Input",eventName:"input"}),se({method:e,eventType:"Mouse Up",eventName:"mouseup"}),se({method:e,eventType:"Mouse Down",eventName:"mousedown"}),se({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),se({method:e,eventType:"Print",eventName:["afterprint","beforeprint"]}),se({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),se({method:e,eventType:"Touch Start",eventName:"touchstart"}),se({method:e,eventType:"Touch End",eventName:"touchend"}),se({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),se({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),se({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),se({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===I&&se({method:e,eventType:"IFrame Resized",eventName:"resize"})}function le(e,t,n,o){return t!==e&&(e in n||(re(e+" is not a valid option for "+o+"CalculationMethod."),e=t),ie(o+' calculation method set to "'+e+'"')),e}function fe(){g=le(g,h,Z,"height")}function me(){F=le(F,L,$,"width")}function he(){!0===n?(de("add"),function(){var e=b<0;window.MutationObserver||window.WebKitMutationObserver?e?ge():t=function(){function t(e){function t(e){!1===e.complete&&(ie("Attach listeners to "+e.src),e.addEventListener("load",i,!1),e.addEventListener("error",r,!1),u.push(e))}"attributes"===e.type&&"src"===e.attributeName?t(e.target):"childList"===e.type&&Array.prototype.forEach.call(e.target.querySelectorAll("img"),t)}function o(e){ie("Remove listeners from "+e.src),e.removeEventListener("load",i,!1),e.removeEventListener("error",r,!1),function(e){u.splice(u.indexOf(e),1)}(e)}function n(e,t,n){o(e.target),Oe(t,n+": "+e.target.src,d,d)}function i(e){n(e,"imageLoad","Image loaded")}function r(e){n(e,"imageLoadFailed","Image load failed")}function a(e){Oe("mutationObserver","mutationObserver: "+e[0].target+" "+e[0].type),e.forEach(t)}var u=[],c=window.MutationObserver||window.WebKitMutationObserver,s=function(){var e=document.querySelector("body");return s=new c(a),ie("Create body MutationObserver"),s.observe(e,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),s}();return{disconnect:function(){"disconnect"in s&&(ie("Disconnect body MutationObserver"),s.disconnect(),u.forEach(o))}}}():(ie("MutationObserver not supported in this browser!"),ge())}()):ie("Auto Resize disabled")}function ge(){0!==b&&(ie("setInterval: "+b+"ms"),w=setInterval(function(){Oe("interval","setInterval: "+b)},Math.abs(b)))}function pe(e,t){var n=0;return t=t||document.body,n=null!==(n=document.defaultView.getComputedStyle(t,null))?n[e]:0,parseInt(n,o)}function ve(e,t){for(var n=t.length,o=0,i=0,r=ne(e),a=G(),u=0;u<n;u++)i<(o=t[u].getBoundingClientRect()[e]+pe("margin"+r,t[u]))&&(i=o);return a=G()-a,ie("Parsed "+n+" HTML elements"),ie("Element position calculated in "+a+"ms"),function(e){R/2<e&&ie("Event throttle increased to "+(R=2*e)+"ms")}(a),i}function ye(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function be(e,t){var n=document.querySelectorAll("["+t+"]");return 0===n.length&&(re("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")),ve(e,n)}function we(){return document.querySelectorAll("body *")}function Te(e,t,n,o){var i,r;function a(e,t){return!(Math.abs(e-t)<=z)}i=d!==n?n:Z[g](),r=d!==o?o:$[F](),a(m,i)||c&&a(x,r)||"init"===e?(Se(),Ne(m=i,x=r,e)):e in{init:1,interval:1,size:1}||!(g in M||c&&F in M)?e in{interval:1}||ie("No change in size detected"):Ie(t)}function Ee(){Y=G(),X=null,Q=U.apply(V,K),X||(V=K=null)}function Oe(e,t,n,o){k&&e in s?ie("Trigger event cancelled: "+e):(e in{reset:1,resetPage:1,init:1}||ie("Trigger event: "+t),"init"===e?Te(e,t,n,o):_(e,t,n,o))}function Se(){k||(k=!0,ie("Trigger event lock on")),clearTimeout(e),e=setTimeout(function(){k=!1,ie("Trigger event lock off"),ie("--")},l)}function Me(e){m=Z[g](),x=$[F](),Ne(m,x,e)}function Ie(e){var t=g;g=h,ie("Reset trigger event: "+e),Se(),Me("reset"),g=t}function Ne(e,t,n,o,i){var r;!0===N&&(d===i?i=C:ie("Message targetOrigin: "+i),ie("Sending message to host page ("+(r=S+":"+(e+":"+t)+":"+n+(d!==o?":"+o:""))+")"),A.postMessage(E+r,i))}function Ae(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}}(); //# ;(function(global){var lastId=-1;var self={onVisible:function(callback){var support=self.isSupported();if(!support||!self.hidden()){callback();return support;} var listener=self.change(function(e,state){if(!self.hidden()){self.unbind(listener);callback();}});return listener;},change:function(callback){if(!self.isSupported()){return false;} lastId+=1;var number=lastId;self._callbacks[number]=callback;self._listen();return number;},unbind:function(id){delete self._callbacks[id];},afterPrerendering:function(callback){var support=self.isSupported();var prerender='prerender';if(!support||prerender!=self.state()){callback();return support;} var listener=self.change(function(e,state){if(prerender!=state){self.unbind(listener);callback();}});return listener;},hidden:function(){return!!(self._doc.hidden||self._doc.webkitHidden);},state:function(){return self._doc.visibilityState||self._doc.webkitVisibilityState||'visible';},isSupported:function(){return self._doc.hidden!==undefined||self._doc.webkitHidden!==undefined;},_doc:document||{},_callbacks:{},_change:function(event){var state=self.state();for(var i in self._callbacks){self._callbacks[i].call(self._doc,event,state);}},_listen:function(){if(self._init){return;} var event='visibilitychange';if(self._doc.webkitVisibilityState){event='webkit'+event;} var listener=function(){self._change.apply(self,arguments);};if(self._doc.addEventListener){self._doc.addEventListener(event,listener);}else{self._doc.attachEvent(event,listener);} self._init=true;}};if(typeof(module)!='undefined'&&module.exports){module.exports=self;}else{global.Visibility=self;}})(this); /** echo * @license echo * while read i do echo * done echo */ !function(){var Color,K,PITHIRD,TWOPI,X,Y,Z,bezier,brewer,chroma,clip_rgb,colors,cos,css2rgb,hex2rgb,hsi2rgb,hsl2rgb,hsv2rgb,lab2lch,lab2rgb,lab_xyz,lch2lab,lch2rgb,limit,luminance,luminance_x,rgb2hex,rgb2hsi,rgb2hsl,rgb2hsv,rgb2lab,rgb2lch,rgb_xyz,root,type,unpack,xyz_lab,xyz_rgb,_ref;chroma=function(x,y,z,m){return new Color(x,y,z,m)};if(typeof module!=="undefined"&&module!==null&&module.exports!=null){module.exports=chroma}if(typeof define==="function"&&define.amd){define([],function(){return chroma})}else{root=typeof exports!=="undefined"&&exports!==null?exports:this;root.chroma=chroma}chroma.color=function(x,y,z,m){return new Color(x,y,z,m)};chroma.hsl=function(h,s,l,a){return new Color(h,s,l,a,"hsl")};chroma.hsv=function(h,s,v,a){return new Color(h,s,v,a,"hsv")};chroma.rgb=function(r,g,b,a){return new Color(r,g,b,a,"rgb")};chroma.hex=function(x){return new Color(x)};chroma.css=function(x){return new Color(x)};chroma.lab=function(l,a,b){return new Color(l,a,b,"lab")};chroma.lch=function(l,c,h){return new Color(l,c,h,"lch")};chroma.hsi=function(h,s,i){return new Color(h,s,i,"hsi")};chroma.gl=function(r,g,b,a){return new Color(r*255,g*255,b*255,a,"gl")};chroma.interpolate=function(a,b,f,m){if(a==null||b==null){return"#000"}if(type(a)==="string"){a=new Color(a)}if(type(b)==="string"){b=new Color(b)}return a.interpolate(f,b,m)};chroma.mix=chroma.interpolate;chroma.contrast=function(a,b){var l1,l2;if(type(a)==="string"){a=new Color(a)}if(type(b)==="string"){b=new Color(b)}l1=a.luminance();l2=b.luminance();if(l1>l2){return(l1+.05)/(l2+.05)}else{return(l2+.05)/(l1+.05)}};chroma.luminance=function(color){return chroma(color).luminance()};chroma._Color=Color;Color=function(){function Color(){var a,arg,args,m,me,me_rgb,x,y,z,_i,_len,_ref,_ref1,_ref2,_ref3,_ref4;me=this;args=[];for(_i=0,_len=arguments.length;_i<_len;_i++){arg=arguments[_i];if(arg!=null){args.push(arg)}}if(args.length===0){_ref=[255,0,255,1,"rgb"],x=_ref[0],y=_ref[1],z=_ref[2],a=_ref[3],m=_ref[4]}else if(type(args[0])==="array"){if(args[0].length===3){_ref1=args[0],x=_ref1[0],y=_ref1[1],z=_ref1[2];a=1}else if(args[0].length===4){_ref2=args[0],x=_ref2[0],y=_ref2[1],z=_ref2[2],a=_ref2[3]}else{throw"unknown input argument"}m=(_ref3=args[1])!=null?_ref3:"rgb"}else if(type(args[0])==="string"){x=args[0];m="hex"}else if(type(args[0])==="object"){_ref4=args[0]._rgb,x=_ref4[0],y=_ref4[1],z=_ref4[2],a=_ref4[3];m="rgb"}else if(args.length>=3){x=args[0];y=args[1];z=args[2]}if(args.length===3){m="rgb";a=1}else if(args.length===4){if(type(args[3])==="string"){m=args[3];a=1}else if(type(args[3])==="number"){m="rgb";a=args[3]}}else if(args.length===5){a=args[3];m=args[4]}if(a==null){a=1}if(m==="rgb"){me._rgb=[x,y,z,a]}else if(m==="gl"){me._rgb=[x*255,y*255,z*255,a]}else if(m==="hsl"){me._rgb=hsl2rgb(x,y,z);me._rgb[3]=a}else if(m==="hsv"){me._rgb=hsv2rgb(x,y,z);me._rgb[3]=a}else if(m==="hex"){me._rgb=hex2rgb(x)}else if(m==="lab"){me._rgb=lab2rgb(x,y,z);me._rgb[3]=a}else if(m==="lch"){me._rgb=lch2rgb(x,y,z);me._rgb[3]=a}else if(m==="hsi"){me._rgb=hsi2rgb(x,y,z);me._rgb[3]=a}me_rgb=clip_rgb(me._rgb)}Color.prototype.rgb=function(){return this._rgb.slice(0,3)};Color.prototype.rgba=function(){return this._rgb};Color.prototype.hex=function(){return rgb2hex(this._rgb)};Color.prototype.toString=function(){return this.name()};Color.prototype.hsl=function(){return rgb2hsl(this._rgb)};Color.prototype.hsv=function(){return rgb2hsv(this._rgb)};Color.prototype.lab=function(){return rgb2lab(this._rgb)};Color.prototype.lch=function(){return rgb2lch(this._rgb)};Color.prototype.hsi=function(){return rgb2hsi(this._rgb)};Color.prototype.gl=function(){return[this._rgb[0]/255,this._rgb[1]/255,this._rgb[2]/255,this._rgb[3]]};Color.prototype.luminance=function(lum,mode){var cur_lum,eps,max_iter,test;if(mode==null){mode="rgb"}if(!arguments.length){return luminance(this._rgb)}if(lum===0){this._rgb=[0,0,0,this._rgb[3]]}if(lum===1){this._rgb=[255,255,255,this._rgb[3]]}cur_lum=luminance(this._rgb);eps=1e-7;max_iter=20;test=function(l,h){var lm,m;m=l.interpolate(.5,h,mode);lm=m.luminance();if(Math.abs(lum-lm)<eps||!max_iter--){return m}if(lm>lum){return test(l,m)}return test(m,h)};this._rgb=(cur_lum>lum?test(new Color("black"),this):test(this,new Color("white"))).rgba();return this};Color.prototype.name=function(){var h,k;h=this.hex();for(k in chroma.colors){if(h===chroma.colors[k]){return k}}return h};Color.prototype.alpha=function(alpha){if(arguments.length){this._rgb[3]=alpha;return this}return this._rgb[3]};Color.prototype.css=function(mode){var hsl,me,rgb,rnd;if(mode==null){mode="rgb"}me=this;rgb=me._rgb;if(mode.length===3&&rgb[3]<1){mode+="a"}if(mode==="rgb"){return mode+"("+rgb.slice(0,3).map(Math.round).join(",")+")"}else if(mode==="rgba"){return mode+"("+rgb.slice(0,3).map(Math.round).join(",")+","+rgb[3]+")"}else if(mode==="hsl"||mode==="hsla"){hsl=me.hsl();rnd=function(a){return Math.round(a*100)/100};hsl[0]=rnd(hsl[0]);hsl[1]=rnd(hsl[1]*100)+"%";hsl[2]=rnd(hsl[2]*100)+"%";if(mode.length===4){hsl[3]=rgb[3]}return mode+"("+hsl.join(",")+")"}};Color.prototype.interpolate=function(f,col,m){var dh,hue,hue0,hue1,lbv,lbv0,lbv1,me,res,sat,sat0,sat1,xyz0,xyz1;me=this;if(m==null){m="rgb"}if(type(col)==="string"){col=new Color(col)}if(m==="hsl"||m==="hsv"||m==="lch"||m==="hsi"){if(m==="hsl"){xyz0=me.hsl();xyz1=col.hsl()}else if(m==="hsv"){xyz0=me.hsv();xyz1=col.hsv()}else if(m==="hsi"){xyz0=me.hsi();xyz1=col.hsi()}else if(m==="lch"){xyz0=me.lch();xyz1=col.lch()}if(m.substr(0,1)==="h"){hue0=xyz0[0],sat0=xyz0[1],lbv0=xyz0[2];hue1=xyz1[0],sat1=xyz1[1],lbv1=xyz1[2]}else{lbv0=xyz0[0],sat0=xyz0[1],hue0=xyz0[2];lbv1=xyz1[0],sat1=xyz1[1],hue1=xyz1[2]}if(!isNaN(hue0)&&!isNaN(hue1)){if(hue1>hue0&&hue1-hue0>180){dh=hue1-(hue0+360)}else if(hue1<hue0&&hue0-hue1>180){dh=hue1+360-hue0}else{dh=hue1-hue0}hue=hue0+f*dh}else if(!isNaN(hue0)){hue=hue0;if((lbv1===1||lbv1===0)&&m!=="hsv"){sat=sat0}}else if(!isNaN(hue1)){hue=hue1;if((lbv0===1||lbv0===0)&&m!=="hsv"){sat=sat1}}else{hue=Number.NaN}if(sat==null){sat=sat0+f*(sat1-sat0)}lbv=lbv0+f*(lbv1-lbv0);if(m.substr(0,1)==="h"){res=new Color(hue,sat,lbv,m)}else{res=new Color(lbv,sat,hue,m)}}else if(m==="rgb"){xyz0=me._rgb;xyz1=col._rgb;res=new Color(xyz0[0]+f*(xyz1[0]-xyz0[0]),xyz0[1]+f*(xyz1[1]-xyz0[1]),xyz0[2]+f*(xyz1[2]-xyz0[2]),m)}else if(m==="lab"){xyz0=me.lab();xyz1=col.lab();res=new Color(xyz0[0]+f*(xyz1[0]-xyz0[0]),xyz0[1]+f*(xyz1[1]-xyz0[1]),xyz0[2]+f*(xyz1[2]-xyz0[2]),m)}else{throw"color mode "+m+" is not supported"}res.alpha(me.alpha()+f*(col.alpha()-me.alpha()));return res};Color.prototype.premultiply=function(){var a,rgb;rgb=this.rgb();a=this.alpha();return chroma(rgb[0]*a,rgb[1]*a,rgb[2]*a,a)};Color.prototype.darken=function(amount){var lch,me;if(amount==null){amount=20}me=this;lch=me.lch();lch[0]-=amount;return chroma.lch(lch).alpha(me.alpha())};Color.prototype.darker=function(amount){return this.darken(amount)};Color.prototype.brighten=function(amount){if(amount==null){amount=20}return this.darken(-amount)};Color.prototype.brighter=function(amount){return this.brighten(amount)};Color.prototype.saturate=function(amount){var lch,me;if(amount==null){amount=20}me=this;lch=me.lch();lch[1]+=amount;return chroma.lch(lch).alpha(me.alpha())};Color.prototype.desaturate=function(amount){if(amount==null){amount=20}return this.saturate(-amount)};return Color}();clip_rgb=function(rgb){var i;for(i in rgb){if(i<3){if(rgb[i]<0){rgb[i]=0}if(rgb[i]>255){rgb[i]=255}}else if(i===3){if(rgb[i]<0){rgb[i]=0}if(rgb[i]>1){rgb[i]=1}}}return rgb};css2rgb=function(css){var hsl,i,m,rgb,_i,_j,_k,_l;css=css.toLowerCase();if(chroma.colors!=null&&chroma.colors[css]){return hex2rgb(chroma.colors[css])}if(m=css.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){rgb=m.slice(1,4);for(i=_i=0;_i<=2;i=++_i){rgb[i]=+rgb[i]}rgb[3]=1}else if(m=css.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/)){rgb=m.slice(1,5);for(i=_j=0;_j<=3;i=++_j){rgb[i]=+rgb[i]}}else if(m=css.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){rgb=m.slice(1,4);for(i=_k=0;_k<=2;i=++_k){rgb[i]=Math.round(rgb[i]*2.55)}rgb[3]=1}else if(m=css.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){rgb=m.slice(1,5);for(i=_l=0;_l<=2;i=++_l){rgb[i]=Math.round(rgb[i]*2.55)}rgb[3]=+rgb[3]}else if(m=css.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){hsl=m.slice(1,4);hsl[1]*=.01;hsl[2]*=.01;rgb=hsl2rgb(hsl);rgb[3]=1}else if(m=css.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){hsl=m.slice(1,4);hsl[1]*=.01;hsl[2]*=.01;rgb=hsl2rgb(hsl);rgb[3]=+m[4]}return rgb};hex2rgb=function(hex){var a,b,g,r,rgb,u;if(hex.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)){if(hex.length===4||hex.length===7){hex=hex.substr(1)}if(hex.length===3){hex=hex.split("");hex=hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]}u=parseInt(hex,16);r=u>>16;g=u>>8&255;b=u&255;return[r,g,b,1]}if(hex.match(/^#?([A-Fa-f0-9]{8})$/)){if(hex.length===9){hex=hex.substr(1)}u=parseInt(hex,16);r=u>>24&255;g=u>>16&255;b=u>>8&255;a=u&255;return[r,g,b,a]}if(rgb=css2rgb(hex)){return rgb}throw"unknown color: "+hex};hsi2rgb=function(h,s,i){var b,g,r,_ref;_ref=unpack(arguments),h=_ref[0],s=_ref[1],i=_ref[2];h/=360;if(h<1/3){b=(1-s)/3;r=(1+s*cos(TWOPI*h)/cos(PITHIRD-TWOPI*h))/3;g=1-(b+r)}else if(h<2/3){h-=1/3;r=(1-s)/3;g=(1+s*cos(TWOPI*h)/cos(PITHIRD-TWOPI*h))/3;b=1-(r+g)}else{h-=2/3;g=(1-s)/3;b=(1+s*cos(TWOPI*h)/cos(PITHIRD-TWOPI*h))/3;r=1-(g+b)}r=limit(i*r*3);g=limit(i*g*3);b=limit(i*b*3);return[r*255,g*255,b*255]};hsl2rgb=function(){var b,c,g,h,i,l,r,s,t1,t2,t3,_i,_ref,_ref1;_ref=unpack(arguments),h=_ref[0],s=_ref[1],l=_ref[2];if(s===0){r=g=b=l*255}else{t3=[0,0,0];c=[0,0,0];t2=l<.5?l*(1+s):l+s-l*s;t1=2*l-t2;h/=360;t3[0]=h+1/3;t3[1]=h;t3[2]=h-1/3;for(i=_i=0;_i<=2;i=++_i){if(t3[i]<0){t3[i]+=1}if(t3[i]>1){t3[i]-=1}if(6*t3[i]<1){c[i]=t1+(t2-t1)*6*t3[i]}else if(2*t3[i]<1){c[i]=t2}else if(3*t3[i]<2){c[i]=t1+(t2-t1)*(2/3-t3[i])*6}else{c[i]=t1}}_ref1=[Math.round(c[0]*255),Math.round(c[1]*255),Math.round(c[2]*255)],r=_ref1[0],g=_ref1[1],b=_ref1[2]}return[r,g,b]};hsv2rgb=function(){var b,f,g,h,i,p,q,r,s,t,v,_ref,_ref1,_ref2,_ref3,_ref4,_ref5,_ref6;_ref=unpack(arguments),h=_ref[0],s=_ref[1],v=_ref[2];v*=255;if(s===0){r=g=b=v}else{if(h===360){h=0}if(h>360){h-=360}if(h<0){h+=360}h/=60;i=Math.floor(h);f=h-i;p=v*(1-s);q=v*(1-s*f);t=v*(1-s*(1-f));switch(i){case 0:_ref1=[v,t,p],r=_ref1[0],g=_ref1[1],b=_ref1[2];break;case 1:_ref2=[q,v,p],r=_ref2[0],g=_ref2[1],b=_ref2[2];break;case 2:_ref3=[p,v,t],r=_ref3[0],g=_ref3[1],b=_ref3[2];break;case 3:_ref4=[p,q,v],r=_ref4[0],g=_ref4[1],b=_ref4[2];break;case 4:_ref5=[t,p,v],r=_ref5[0],g=_ref5[1],b=_ref5[2];break;case 5:_ref6=[v,p,q],r=_ref6[0],g=_ref6[1],b=_ref6[2]}}r=Math.round(r);g=Math.round(g);b=Math.round(b);return[r,g,b]};K=18;X=.95047;Y=1;Z=1.08883;lab2lch=function(){var a,b,c,h,l,_ref;_ref=unpack(arguments),l=_ref[0],a=_ref[1],b=_ref[2];c=Math.sqrt(a*a+b*b);h=Math.atan2(b,a)/Math.PI*180;return[l,c,h]};lab2rgb=function(l,a,b){var g,r,x,y,z,_ref,_ref1;if(l!==void 0&&l.length===3){_ref=l,l=_ref[0],a=_ref[1],b=_ref[2]}if(l!==void 0&&l.length===3){_ref1=l,l=_ref1[0],a=_ref1[1],b=_ref1[2]}y=(l+16)/116;x=y+a/500;z=y-b/200;x=lab_xyz(x)*X;y=lab_xyz(y)*Y;z=lab_xyz(z)*Z;r=xyz_rgb(3.2404542*x-1.5371385*y-.4985314*z);g=xyz_rgb(-.969266*x+1.8760108*y+.041556*z);b=xyz_rgb(.0556434*x-.2040259*y+1.0572252*z);return[limit(r,0,255),limit(g,0,255),limit(b,0,255),1]};lab_xyz=function(x){if(x>.206893034){return x*x*x}else{return(x-4/29)/7.787037}};xyz_rgb=function(r){return Math.round(255*(r<=.00304?12.92*r:1.055*Math.pow(r,1/2.4)-.055))};lch2lab=function(){var c,h,l,_ref;_ref=unpack(arguments),l=_ref[0],c=_ref[1],h=_ref[2];h=h*Math.PI/180;return[l,Math.cos(h)*c,Math.sin(h)*c]};lch2rgb=function(l,c,h){var L,a,b,g,r,_ref,_ref1;_ref=lch2lab(l,c,h),L=_ref[0],a=_ref[1],b=_ref[2];_ref1=lab2rgb(L,a,b),r=_ref1[0],g=_ref1[1],b=_ref1[2];return[limit(r,0,255),limit(g,0,255),limit(b,0,255)]};luminance=function(r,g,b){var _ref;_ref=unpack(arguments),r=_ref[0],g=_ref[1],b=_ref[2];r=luminance_x(r);g=luminance_x(g);b=luminance_x(b);return.2126*r+.7152*g+.0722*b};luminance_x=function(x){x/=255;if(x<=.03928){return x/12.92}else{return Math.pow((x+.055)/1.055,2.4)}};rgb2hex=function(){var b,g,r,str,u,_ref;_ref=unpack(arguments),r=_ref[0],g=_ref[1],b=_ref[2];u=r<<16|g<<8|b;str="000000"+u.toString(16);return"#"+str.substr(str.length-6)};rgb2hsi=function(){var TWOPI,b,g,h,i,min,r,s,_ref;_ref=unpack(arguments),r=_ref[0],g=_ref[1],b=_ref[2];TWOPI=Math.PI*2;r/=255;g/=255;b/=255;min=Math.min(r,g,b);i=(r+g+b)/3;s=1-min/i;if(s===0){h=0}else{h=(r-g+(r-b))/2;h/=Math.sqrt((r-g)*(r-g)+(r-b)*(g-b));h=Math.acos(h);if(b>g){h=TWOPI-h}h/=TWOPI}return[h*360,s,i]};rgb2hsl=function(r,g,b){var h,l,max,min,s,_ref;if(r!==void 0&&r.length>=3){_ref=r,r=_ref[0],g=_ref[1],b=_ref[2]}r/=255;g/=255;b/=255;min=Math.min(r,g,b);max=Math.max(r,g,b);l=(max+min)/2;if(max===min){s=0;h=Number.NaN}else{s=l<.5?(max-min)/(max+min):(max-min)/(2-max-min)}if(r===max){h=(g-b)/(max-min)}else if(g===max){h=2+(b-r)/(max-min)}else if(b===max){h=4+(r-g)/(max-min)}h*=60;if(h<0){h+=360}return[h,s,l]};rgb2hsv=function(){var b,delta,g,h,max,min,r,s,v,_ref;_ref=unpack(arguments),r=_ref[0],g=_ref[1],b=_ref[2];min=Math.min(r,g,b);max=Math.max(r,g,b);delta=max-min;v=max/255;if(max===0){h=Number.NaN;s=0}else{s=delta/max;if(r===max){h=(g-b)/delta}if(g===max){h=2+(b-r)/delta}if(b===max){h=4+(r-g)/delta}h*=60;if(h<0){h+=360}}return[h,s,v]};rgb2lab=function(){var b,g,r,x,y,z,_ref;_ref=unpack(arguments),r=_ref[0],g=_ref[1],b=_ref[2];r=rgb_xyz(r);g=rgb_xyz(g);b=rgb_xyz(b);x=xyz_lab((.4124564*r+.3575761*g+.1804375*b)/X);y=xyz_lab((.2126729*r+.7151522*g+.072175*b)/Y);z=xyz_lab((.0193339*r+.119192*g+.9503041*b)/Z);return[116*y-16,500*(x-y),200*(y-z)]};rgb_xyz=function(r){if((r/=255)<=.04045){return r/12.92}else{return Math.pow((r+.055)/1.055,2.4)}};xyz_lab=function(x){if(x>.008856){return Math.pow(x,1/3)}else{return 7.787037*x+4/29}};rgb2lch=function(){var a,b,g,l,r,_ref,_ref1;_ref=unpack(arguments),r=_ref[0],g=_ref[1],b=_ref[2];_ref1=rgb2lab(r,g,b),l=_ref1[0],a=_ref1[1],b=_ref1[2];return lab2lch(l,a,b)};chroma.scale=function(colors,positions){var classifyValue,f,getClass,getColor,resetCache,setColors,setDomain,tmap,_colorCache,_colors,_correctLightness,_domain,_fixed,_max,_min,_mode,_nacol,_numClasses,_out,_pos,_spread;_mode="rgb";_nacol=chroma("#ccc");_spread=0;_fixed=false;_domain=[0,1];_colors=[];_out=false;_pos=[];_min=0;_max=1;_correctLightness=false;_numClasses=0;_colorCache={};setColors=function(colors,positions){var c,col,_i,_j,_ref,_ref1,_ref2;if(colors==null){colors=["#ddd","#222"]}if(colors!=null&&type(colors)==="string"&&((_ref=chroma.brewer)!=null?_ref[colors]:void 0)!=null){colors=chroma.brewer[colors]}if(type(colors)==="array"){colors=colors.slice(0);for(c=_i=0,_ref1=colors.length-1;0<=_ref1?_i<=_ref1:_i>=_ref1;c=0<=_ref1?++_i:--_i){col=colors[c];if(type(col)==="string"){colors[c]=chroma(col)}}if(positions!=null){_pos=positions}else{_pos=[];for(c=_j=0,_ref2=colors.length-1;0<=_ref2?_j<=_ref2:_j>=_ref2;c=0<=_ref2?++_j:--_j){_pos.push(c/(colors.length-1))}}}resetCache();return _colors=colors};setDomain=function(domain){if(domain==null){domain=[]}_domain=domain;_min=domain[0];_max=domain[domain.length-1];resetCache();if(domain.length===2){return _numClasses=0}else{return _numClasses=domain.length-1}};getClass=function(value){var i,n;if(_domain!=null){n=_domain.length-1;i=0;while(i<n&&value>=_domain[i]){i++}return i-1}return 0};tmap=function(t){return t};classifyValue=function(value){var i,maxc,minc,n,val;val=value;if(_domain.length>2){n=_domain.length-1;i=getClass(value);minc=_domain[0]+(_domain[1]-_domain[0])*(0+_spread*.5);maxc=_domain[n-1]+(_domain[n]-_domain[n-1])*(1-_spread*.5);val=_min+(_domain[i]+(_domain[i+1]-_domain[i])*.5-minc)/(maxc-minc)*(_max-_min)}return val};getColor=function(val,bypassMap){var c,col,f0,i,k,p,t,_i,_ref;if(bypassMap==null){bypassMap=false}if(isNaN(val)){return _nacol}if(!bypassMap){if(_domain.length>2){c=getClass(val);t=c/(_numClasses-1)}else{t=f0=_min!==_max?(val-_min)/(_max-_min):0;t=f0=(val-_min)/(_max-_min);t=Math.min(1,Math.max(0,t))}}else{t=val}if(!bypassMap){t=tmap(t)}k=Math.floor(t*1e4);if(_colorCache[k]){col=_colorCache[k]}else{if(type(_colors)==="array"){for(i=_i=0,_ref=_pos.length-1;0<=_ref?_i<=_ref:_i>=_ref;i=0<=_ref?++_i:--_i){p=_pos[i];if(t<=p){col=_colors[i];break}if(t>=p&&i===_pos.length-1){col=_colors[i];break}if(t>p&&t<_pos[i+1]){t=(t-p)/(_pos[i+1]-p);col=chroma.interpolate(_colors[i],_colors[i+1],t,_mode);break}}}else if(type(_colors)==="function"){col=_colors(t)}_colorCache[k]=col}return col};resetCache=function(){return _colorCache={}};setColors(colors,positions);f=function(v){var c;c=getColor(v);if(_out&&c[_out]){return c[_out]()}else{return c}};f.domain=function(domain,classes,mode,key){var d;if(mode==null){mode="e"}if(!arguments.length){return _domain}if(classes!=null){d=chroma.analyze(domain,key);if(classes===0){domain=[d.min,d.max]}else{domain=chroma.limits(d,mode,classes)}}setDomain(domain);return f};f.mode=function(_m){if(!arguments.length){return _mode}_mode=_m;resetCache();return f};f.range=function(colors,_pos){setColors(colors,_pos);return f};f.out=function(_o){_out=_o;return f};f.spread=function(val){if(!arguments.length){return _spread}_spread=val;return f};f.correctLightness=function(v){if(!arguments.length){return _correctLightness}_correctLightness=v;resetCache();if(_correctLightness){tmap=function(t){var L0,L1,L_actual,L_diff,L_ideal,max_iter,pol,t0,t1;L0=getColor(0,true).lab()[0];L1=getColor(1,true).lab()[0];pol=L0>L1;L_actual=getColor(t,true).lab()[0];L_ideal=L0+(L1-L0)*t;L_diff=L_actual-L_ideal;t0=0;t1=1;max_iter=20;while(Math.abs(L_diff)>.01&&max_iter-->0){!function(){if(pol){L_diff*=-1}if(L_diff<0){t0=t;t+=(t1-t)*.5}else{t1=t;t+=(t0-t)*.5}L_actual=getColor(t,true).lab()[0];return L_diff=L_actual-L_ideal}()}return t}}else{tmap=function(t){return t}}return f};f.colors=function(out){var i,samples,_i,_j,_len,_ref;if(out==null){out="hex"}colors=[];samples=[];if(_domain.length>2){for(i=_i=1,_ref=_domain.length;1<=_ref?_i<_ref:_i>_ref;i=1<=_ref?++_i:--_i){samples.push((_domain[i-1]+_domain[i])*.5)}}else{samples=_domain}for(_j=0,_len=samples.length;_j<_len;_j++){i=samples[_j];colors.push(f(i)[out]())}return colors};return f};if((_ref=chroma.scales)==null){chroma.scales={}}chroma.scales.cool=function(){return chroma.scale([chroma.hsl(180,1,.9),chroma.hsl(250,.7,.4)])};chroma.scales.hot=function(){return chroma.scale(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")};chroma.analyze=function(data,key,filter){var add,k,r,val,visit,_i,_len;r={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};if(filter==null){filter=function(){return true}}add=function(val){if(val!=null&&!isNaN(val)){r.values.push(val);r.sum+=val;if(val<r.min){r.min=val}if(val>r.max){r.max=val}r.count+=1}};visit=function(val,k){if(filter(val,k)){if(key!=null&&type(key)==="function"){return add(key(val))}else if(key!=null&&type(key)==="string"||type(key)==="number"){return add(val[key])}else{return add(val)}}};if(type(data)==="array"){for(_i=0,_len=data.length;_i<_len;_i++){val=data[_i];visit(val)}}else{for(k in data){val=data[k];visit(val,k)}}r.domain=[r.min,r.max];r.limits=function(mode,num){return chroma.limits(r,mode,num)};return r};chroma.limits=function(data,mode,num){var assignments,best,centroids,cluster,clusterSizes,dist,i,j,kClusters,limits,max,max_log,min,min_log,mindist,n,nb_iters,newCentroids,p,pb,pr,repeat,sum,tmpKMeansBreaks,value,values,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_ref1,_ref10,_ref11,_ref12,_ref13,_ref14,_ref15,_ref2,_ref3,_ref4,_ref5,_ref6,_ref7,_ref8,_ref9,_s,_t,_u,_v,_w;if(mode==null){mode="equal"}if(num==null){num=7}if(type(data)==="array"){data=chroma.analyze(data)}min=data.min;max=data.max;sum=data.sum;values=data.values.sort(function(a,b){return a-b});limits=[];if(mode.substr(0,1)==="c"){limits.push(min);limits.push(max)}if(mode.substr(0,1)==="e"){limits.push(min);for(i=_i=1,_ref1=num-1;1<=_ref1?_i<=_ref1:_i>=_ref1;i=1<=_ref1?++_i:--_i){limits.push(min+i/num*(max-min))}limits.push(max)}else if(mode.substr(0,1)==="l"){if(min<=0){throw"Logarithmic scales are only possible for values > 0"}min_log=Math.LOG10E*Math.log(min);max_log=Math.LOG10E*Math.log(max);limits.push(min);for(i=_j=1,_ref2=num-1;1<=_ref2?_j<=_ref2:_j>=_ref2;i=1<=_ref2?++_j:--_j){limits.push(Math.pow(10,min_log+i/num*(max_log-min_log)))}limits.push(max)}else if(mode.substr(0,1)==="q"){limits.push(min);for(i=_k=1,_ref3=num-1;1<=_ref3?_k<=_ref3:_k>=_ref3;i=1<=_ref3?++_k:--_k){p=values.length*i/num;pb=Math.floor(p);if(pb===p){limits.push(values[pb])}else{pr=p-pb;limits.push(values[pb]*pr+values[pb+1]*(1-pr))}}limits.push(max)}else if(mode.substr(0,1)==="k"){n=values.length;assignments=new Array(n);clusterSizes=new Array(num);repeat=true;nb_iters=0;centroids=null;centroids=[];centroids.push(min);for(i=_l=1,_ref4=num-1;1<=_ref4?_l<=_ref4:_l>=_ref4;i=1<=_ref4?++_l:--_l){centroids.push(min+i/num*(max-min))}centroids.push(max);while(repeat){for(j=_m=0,_ref5=num-1;0<=_ref5?_m<=_ref5:_m>=_ref5;j=0<=_ref5?++_m:--_m){clusterSizes[j]=0}for(i=_n=0,_ref6=n-1;0<=_ref6?_n<=_ref6:_n>=_ref6;i=0<=_ref6?++_n:--_n){value=values[i];mindist=Number.MAX_VALUE;for(j=_o=0,_ref7=num-1;0<=_ref7?_o<=_ref7:_o>=_ref7;j=0<=_ref7?++_o:--_o){dist=Math.abs(centroids[j]-value);if(dist<mindist){mindist=dist;best=j}}clusterSizes[best]++;assignments[i]=best}newCentroids=new Array(num);for(j=_p=0,_ref8=num-1;0<=_ref8?_p<=_ref8:_p>=_ref8;j=0<=_ref8?++_p:--_p){newCentroids[j]=null}for(i=_q=0,_ref9=n-1;0<=_ref9?_q<=_ref9:_q>=_ref9;i=0<=_ref9?++_q:--_q){cluster=assignments[i];if(newCentroids[cluster]===null){newCentroids[cluster]=values[i]}else{newCentroids[cluster]+=values[i]}}for(j=_r=0,_ref10=num-1;0<=_ref10?_r<=_ref10:_r>=_ref10;j=0<=_ref10?++_r:--_r){newCentroids[j]*=1/clusterSizes[j]}repeat=false;for(j=_s=0,_ref11=num-1;0<=_ref11?_s<=_ref11:_s>=_ref11;j=0<=_ref11?++_s:--_s){if(newCentroids[j]!==centroids[i]){repeat=true;break}}centroids=newCentroids;nb_iters++;if(nb_iters>200){repeat=false}}kClusters={};for(j=_t=0,_ref12=num-1;0<=_ref12?_t<=_ref12:_t>=_ref12;j=0<=_ref12?++_t:--_t){kClusters[j]=[]}for(i=_u=0,_ref13=n-1;0<=_ref13?_u<=_ref13:_u>=_ref13;i=0<=_ref13?++_u:--_u){cluster=assignments[i];kClusters[cluster].push(values[i])}tmpKMeansBreaks=[];for(j=_v=0,_ref14=num-1;0<=_ref14?_v<=_ref14:_v>=_ref14;j=0<=_ref14?++_v:--_v){tmpKMeansBreaks.push(kClusters[j][0]);tmpKMeansBreaks.push(kClusters[j][kClusters[j].length-1])}tmpKMeansBreaks=tmpKMeansBreaks.sort(function(a,b){return a-b});limits.push(tmpKMeansBreaks[0]);for(i=_w=1,_ref15=tmpKMeansBreaks.length-1;_w<=_ref15;i=_w+=2){if(!isNaN(tmpKMeansBreaks[i])){limits.push(tmpKMeansBreaks[i])}}}return limits};/** ColorBrewer colors for chroma.js Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania State University. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. @preserve */ chroma.brewer=brewer={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]};chroma.colors=colors={indigo:"#4b0082",gold:"#ffd700",hotpink:"#ff69b4",firebrick:"#b22222",indianred:"#cd5c5c",yellow:"#ffff00",mistyrose:"#ffe4e1",darkolivegreen:"#556b2f",olive:"#808000",darkseagreen:"#8fbc8f",pink:"#ffc0cb",tomato:"#ff6347",lightcoral:"#f08080",orangered:"#ff4500",navajowhite:"#ffdead",lime:"#00ff00",palegreen:"#98fb98",darkslategrey:"#2f4f4f",greenyellow:"#adff2f",burlywood:"#deb887",seashell:"#fff5ee",mediumspringgreen:"#00fa9a",fuchsia:"#ff00ff",papayawhip:"#ffefd5",blanchedalmond:"#ffebcd",chartreuse:"#7fff00",dimgray:"#696969",black:"#000000",peachpuff:"#ffdab9",springgreen:"#00ff7f",aquamarine:"#7fffd4",white:"#ffffff",orange:"#ffa500",lightsalmon:"#ffa07a",darkslategray:"#2f4f4f",brown:"#a52a2a",ivory:"#fffff0",dodgerblue:"#1e90ff",peru:"#cd853f",lawngreen:"#7cfc00",chocolate:"#d2691e",crimson:"#dc143c",forestgreen:"#228b22",darkgrey:"#a9a9a9",lightseagreen:"#20b2aa",cyan:"#00ffff",mintcream:"#f5fffa",silver:"#c0c0c0",antiquewhite:"#faebd7",mediumorchid:"#ba55d3",skyblue:"#87ceeb",gray:"#808080",darkturquoise:"#00ced1",goldenrod:"#daa520",darkgreen:"#006400",floralwhite:"#fffaf0",darkviolet:"#9400d3",darkgray:"#a9a9a9",moccasin:"#ffe4b5",saddlebrown:"#8b4513",grey:"#808080",darkslateblue:"#483d8b",lightskyblue:"#87cefa",lightpink:"#ffb6c1",mediumvioletred:"#c71585",slategrey:"#708090",red:"#ff0000",deeppink:"#ff1493",limegreen:"#32cd32",darkmagenta:"#8b008b",palegoldenrod:"#eee8aa",plum:"#dda0dd",turquoise:"#40e0d0",lightgrey:"#d3d3d3",lightgoldenrodyellow:"#fafad2",darkgoldenrod:"#b8860b",lavender:"#e6e6fa",maroon:"#800000",yellowgreen:"#9acd32",sandybrown:"#f4a460",thistle:"#d8bfd8",violet:"#ee82ee",navy:"#000080",magenta:"#ff00ff",dimgrey:"#696969",tan:"#d2b48c",rosybrown:"#bc8f8f",olivedrab:"#6b8e23",blue:"#0000ff",lightblue:"#add8e6",ghostwhite:"#f8f8ff",honeydew:"#f0fff0",cornflowerblue:"#6495ed",slateblue:"#6a5acd",linen:"#faf0e6",darkblue:"#00008b",powderblue:"#b0e0e6",seagreen:"#2e8b57",darkkhaki:"#bdb76b",snow:"#fffafa",sienna:"#a0522d",mediumblue:"#0000cd",royalblue:"#4169e1",lightcyan:"#e0ffff",green:"#008000",mediumpurple:"#9370db",midnightblue:"#191970",cornsilk:"#fff8dc",paleturquoise:"#afeeee",bisque:"#ffe4c4",slategray:"#708090",darkcyan:"#008b8b",khaki:"#f0e68c",wheat:"#f5deb3",teal:"#008080",darkorchid:"#9932cc",deepskyblue:"#00bfff",salmon:"#fa8072",darkred:"#8b0000",steelblue:"#4682b4",palevioletred:"#db7093",lightslategray:"#778899",aliceblue:"#f0f8ff",lightslategrey:"#778899",lightgreen:"#90ee90",orchid:"#da70d6",gainsboro:"#dcdcdc",mediumseagreen:"#3cb371",lightgray:"#d3d3d3",mediumturquoise:"#48d1cc",lemonchiffon:"#fffacd",cadetblue:"#5f9ea0",lightyellow:"#ffffe0",lavenderblush:"#fff0f5",coral:"#ff7f50",purple:"#800080",aqua:"#00ffff",whitesmoke:"#f5f5f5",mediumslateblue:"#7b68ee",darkorange:"#ff8c00",mediumaquamarine:"#66cdaa",darksalmon:"#e9967a",beige:"#f5f5dc",blueviolet:"#8a2be2",azure:"#f0ffff",lightsteelblue:"#b0c4de",oldlace:"#fdf5e6"};type=function(){var classToType,name,_i,_len,_ref1;classToType={};_ref1="Boolean Number String Function Array Date RegExp Undefined Null".split(" ");for(_i=0,_len=_ref1.length;_i<_len;_i++){name=_ref1[_i];classToType["[object "+name+"]"]=name.toLowerCase()}return function(obj){var strType;strType=Object.prototype.toString.call(obj);return classToType[strType]||"object"}}();limit=function(x,min,max){if(min==null){min=0}if(max==null){max=1}if(x<min){x=min}if(x>max){x=max}return x};unpack=function(args){if(args.length>=3){return args}else{return args[0]}};TWOPI=Math.PI*2;PITHIRD=Math.PI/3;cos=Math.cos;bezier=function(colors){var I,I0,I1,c,lab0,lab1,lab2,lab3,_ref1,_ref2,_ref3;colors=function(){var _i,_len,_results;_results=[];for(_i=0,_len=colors.length;_i<_len;_i++){c=colors[_i];_results.push(chroma(c))}return _results}();if(colors.length===2){_ref1=function(){var _i,_len,_results;_results=[];for(_i=0,_len=colors.length;_i<_len;_i++){c=colors[_i];_results.push(c.lab())}return _results}(),lab0=_ref1[0],lab1=_ref1[1];I=function(t){var i,lab;lab=function(){var _i,_results;_results=[];for(i=_i=0;_i<=2;i=++_i){_results.push(lab0[i]+t*(lab1[i]-lab0[i]))}return _results}();return chroma.lab.apply(chroma,lab)}}else if(colors.length===3){_ref2=function(){var _i,_len,_results;_results=[];for(_i=0,_len=colors.length;_i<_len;_i++){c=colors[_i];_results.push(c.lab())}return _results}(),lab0=_ref2[0],lab1=_ref2[1],lab2=_ref2[2];I=function(t){var i,lab;lab=function(){var _i,_results;_results=[];for(i=_i=0;_i<=2;i=++_i){_results.push((1-t)*(1-t)*lab0[i]+2*(1-t)*t*lab1[i]+t*t*lab2[i])}return _results}();return chroma.lab.apply(chroma,lab)}}else if(colors.length===4){_ref3=function(){var _i,_len,_results;_results=[];for(_i=0,_len=colors.length;_i<_len;_i++){c=colors[_i];_results.push(c.lab())}return _results}(),lab0=_ref3[0],lab1=_ref3[1],lab2=_ref3[2],lab3=_ref3[3];I=function(t){var i,lab;lab=function(){var _i,_results;_results=[];for(i=_i=0;_i<=2;i=++_i){_results.push((1-t)*(1-t)*(1-t)*lab0[i]+3*(1-t)*(1-t)*t*lab1[i]+3*(1-t)*t*t*lab2[i]+t*t*t*lab3[i])}return _results}();return chroma.lab.apply(chroma,lab)}}else if(colors.length===5){I0=bezier(colors.slice(0,3));I1=bezier(colors.slice(2,5));I=function(t){if(t<.5){return I0(t*2)}else{return I1((t-.5)*2)}}}return I};chroma.interpolate.bezier=bezier}.call(this); (function(e){var b;e.fn.emptyForce=function(){for(var j=0,k;(k=e(this)[j])!=null;j++){if(k.nodeType===1){e.cleanData(k.getElementsByTagName("*"))}if(e.jqplot.use_excanvas){k.outerHTML=""}else{while(k.firstChild){k.removeChild(k.firstChild)}}k=null}return e(this)};e.fn.removeChildForce=function(j){while(j.firstChild){this.removeChildForce(j.firstChild);j.removeChild(j.firstChild)}};e.fn.jqplot=function(){var j=[];var m=[];for(var n=0,k=arguments.length;n<k;n++){if(e.isArray(arguments[n])){j.push(arguments[n])}else{if(e.isPlainObject(arguments[n])){m.push(arguments[n])}}}return this.each(function(p){var u,t,s=e(this),o=j.length,l=m.length,r,q;if(p<o){r=j[p]}else{r=o?j[o-1]:null}if(p<l){q=m[p]}else{q=l?m[l-1]:null}u=s.attr("id");if(u===b){u="jqplot_target_"+e.jqplot.targetCounter++;s.attr("id",u)}t=e.jqplot(u,r,q);s.data("jqplot",t)})};e.jqplot=function(p,m,k){var l=null,j=null;if(arguments.length===3){l=m;j=k}else{if(arguments.length===2){if(e.isArray(m)){l=m}else{if(e.isPlainObject(m)){j=m }}}}if(l===null&&j!==null&&j.data){l=j.data}var o=new h();e("#"+p).removeClass("jqplot-error");if(e.jqplot.config.catchErrors){try{o.init(p,l,j);o.draw();o.themeEngine.init.call(o);return o}catch(n){var q=e.jqplot.config.errorMessage||n.message;e("#"+p).append('<div class="jqplot-error-message">'+q+"</div>");e("#"+p).addClass("jqplot-error");document.getElementById(p).style.background=e.jqplot.config.errorBackground;document.getElementById(p).style.border=e.jqplot.config.errorBorder;document.getElementById(p).style.fontFamily=e.jqplot.config.errorFontFamily;document.getElementById(p).style.fontSize=e.jqplot.config.errorFontSize;document.getElementById(p).style.fontStyle=e.jqplot.config.errorFontStyle;document.getElementById(p).style.fontWeight=e.jqplot.config.errorFontWeight}}else{o.init(p,l,j);o.draw();o.themeEngine.init.call(o);return o}};e.jqplot.version="@VERSION";e.jqplot.revision="@REVISION";e.jqplot.targetCounter=1;e.jqplot.CanvasManager=function(){if(typeof e.jqplot.CanvasManager.canvases=="undefined"){e.jqplot.CanvasManager.canvases=[]; e.jqplot.CanvasManager.free=[]}var j=[];this.getCanvas=function(){var n;var m=true;if(!e.jqplot.use_excanvas){for(var o=0,k=e.jqplot.CanvasManager.canvases.length;o<k;o++){if(e.jqplot.CanvasManager.free[o]===true){m=false;n=e.jqplot.CanvasManager.canvases[o];e.jqplot.CanvasManager.free[o]=false;j.push(o);break}}}if(m){n=document.createElement("canvas");j.push(e.jqplot.CanvasManager.canvases.length);e.jqplot.CanvasManager.canvases.push(n);e.jqplot.CanvasManager.free.push(false)}return n};this.initCanvas=function(m){if(e.jqplot.use_excanvas){return window.G_vmlCanvasManager.initElement(m)}var l=m.getContext("2d");var n=1;if(window.devicePixelRatio>1&&(l.webkitBackingStorePixelRatio===b||l.webkitBackingStorePixelRatio<2)){n=window.devicePixelRatio}var k=m.width;var o=m.height;m.width=n*m.width;m.height=n*m.height;m.style.width=k+"px";m.style.height=o+"px";l.save();l.scale(n,n);return m};this.freeAllCanvases=function(){for(var m=0,k=j.length;m<k;m++){this.freeCanvas(j[m])}j=[]};this.freeCanvas=function(k){if(e.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==b){window.G_vmlCanvasManager.uninitElement(e.jqplot.CanvasManager.canvases[k]); e.jqplot.CanvasManager.canvases[k]=null}else{var l=e.jqplot.CanvasManager.canvases[k];l.getContext("2d").clearRect(0,0,l.width,l.height);e(l).unbind().removeAttr("class").removeAttr("style");e(l).css({left:"",top:"",position:""});l.width=0;l.height=0;e.jqplot.CanvasManager.free[k]=true}}};e.jqplot.log=function(){if(window.console){window.console.log.apply(window.console,arguments)}};e.jqplot.config={addDomReference:false,enablePlugins:false,defaultHeight:300,defaultWidth:400,UTCAdjust:false,timezoneOffset:new Date(new Date().getTimezoneOffset()*60000),errorMessage:"",errorBackground:"",errorBorder:"",errorFontFamily:"",errorFontSize:"",errorFontStyle:"",errorFontWeight:"",catchErrors:false,defaultTickFormatString:"%.1f",defaultColors:["#4bb2c5","#EAA228","#c5b47f","#579575","#839557","#958c12","#953579","#4b5de4","#d8b83f","#ff5800","#0085cc","#c747a3","#cddf54","#FBD178","#26B4E3","#bd70c7"],defaultNegativeColors:["#498991","#C08840","#9F9274","#546D61","#646C4A","#6F6621","#6E3F5F","#4F64B0","#A89050","#C45923","#187399","#945381","#959E5C","#C7AF7B","#478396","#907294"],dashLength:4,gapLength:4,dotGapLength:2.5,srcLocation:"jqplot/src/",pluginLocation:"jqplot/src/plugins/"}; e.jqplot.arrayMax=function(j){return Math.max.apply(Math,j)};e.jqplot.arrayMin=function(j){return Math.min.apply(Math,j)};e.jqplot.enablePlugins=e.jqplot.config.enablePlugins;e.jqplot.support_canvas=function(){if(typeof e.jqplot.support_canvas.result=="undefined"){e.jqplot.support_canvas.result=!!document.createElement("canvas").getContext}return e.jqplot.support_canvas.result};e.jqplot.support_canvas_text=function(){if(typeof e.jqplot.support_canvas_text.result=="undefined"){if(window.G_vmlCanvasManager!==b&&window.G_vmlCanvasManager._version>887){e.jqplot.support_canvas_text.result=true}else{e.jqplot.support_canvas_text.result=!!(document.createElement("canvas").getContext&&typeof document.createElement("canvas").getContext("2d").fillText=="function")}}return e.jqplot.support_canvas_text.result};e.jqplot.use_excanvas=((!e.support.boxModel||!e.support.objectAll||!$support.leadingWhitespace)&&!e.jqplot.support_canvas())?true:false;e.jqplot.preInitHooks=[];e.jqplot.postInitHooks=[];e.jqplot.preParseOptionsHooks=[]; e.jqplot.postParseOptionsHooks=[];e.jqplot.preDrawHooks=[];e.jqplot.postDrawHooks=[];e.jqplot.preDrawSeriesHooks=[];e.jqplot.postDrawSeriesHooks=[];e.jqplot.preDrawLegendHooks=[];e.jqplot.addLegendRowHooks=[];e.jqplot.preSeriesInitHooks=[];e.jqplot.postSeriesInitHooks=[];e.jqplot.preParseSeriesOptionsHooks=[];e.jqplot.postParseSeriesOptionsHooks=[];e.jqplot.eventListenerHooks=[];e.jqplot.preDrawSeriesShadowHooks=[];e.jqplot.postDrawSeriesShadowHooks=[];e.jqplot.ElemContainer=function(){this._elem;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null}};e.jqplot.ElemContainer.prototype.createElement=function(m,o,k,l,p){this._offsets=o;var j=k||"jqplot";var n=document.createElement(m);this._elem=e(n);this._elem.addClass(j);this._elem.css(l);this._elem.attr(p);n=null;return this._elem};e.jqplot.ElemContainer.prototype.getWidth=function(){if(this._elem){return this._elem.outerWidth(true)}else{return null}};e.jqplot.ElemContainer.prototype.getHeight=function(){if(this._elem){return this._elem.outerHeight(true) }else{return null}};e.jqplot.ElemContainer.prototype.getPosition=function(){if(this._elem){return this._elem.position()}else{return{top:null,left:null,bottom:null,right:null}}};e.jqplot.ElemContainer.prototype.getTop=function(){return this.getPosition().top};e.jqplot.ElemContainer.prototype.getLeft=function(){return this.getPosition().left};e.jqplot.ElemContainer.prototype.getBottom=function(){return this._elem.css("bottom")};e.jqplot.ElemContainer.prototype.getRight=function(){return this._elem.css("right")};function g(j){e.jqplot.ElemContainer.call(this);this.name=j;this._series=[];this.show=false;this.tickRenderer=e.jqplot.AxisTickRenderer;this.tickOptions={};this.labelRenderer=e.jqplot.AxisLabelRenderer;this.labelOptions={};this.label=null;this.showLabel=true;this.min=null;this.max=null;this.autoscale=false;this.pad=1.2;this.padMax=null;this.padMin=null;this.ticks=[];this.numberTicks;this.tickInterval;this.renderer=e.jqplot.LinearAxisRenderer;this.rendererOptions={};this.showTicks=true; this.showTickMarks=true;this.showMinorTicks=true;this.drawMajorGridlines=true;this.drawMinorGridlines=false;this.drawMajorTickMarks=true;this.drawMinorTickMarks=true;this.useSeriesColor=false;this.borderWidth=null;this.borderColor=null;this.scaleToHiddenSeries=false;this._dataBounds={min:null,max:null};this._intervalStats=[];this._offsets={min:null,max:null};this._ticks=[];this._label=null;this.syncTicks=null;this.tickSpacing=75;this._min=null;this._max=null;this._tickInterval=null;this._numberTicks=null;this.__ticks=null;this._options={}}g.prototype=new e.jqplot.ElemContainer();g.prototype.constructor=g;g.prototype.init=function(){if(e.isFunction(this.renderer)){this.renderer=new this.renderer()}this.tickOptions.axis=this.name;if(this.tickOptions.showMark==null){this.tickOptions.showMark=this.showTicks}if(this.tickOptions.showMark==null){this.tickOptions.showMark=this.showTickMarks}if(this.tickOptions.showLabel==null){this.tickOptions.showLabel=this.showTicks}if(this.label==null||this.label==""){this.showLabel=false }else{this.labelOptions.label=this.label}if(this.showLabel==false){this.labelOptions.show=false}if(this.pad==0){this.pad=1}if(this.padMax==0){this.padMax=1}if(this.padMin==0){this.padMin=1}if(this.padMax==null){this.padMax=(this.pad-1)/2+1}if(this.padMin==null){this.padMin=(this.pad-1)/2+1}this.pad=this.padMax+this.padMin-1;if(this.min!=null||this.max!=null){this.autoscale=false}if(this.syncTicks==null&&this.name.indexOf("y")>-1){this.syncTicks=true}else{if(this.syncTicks==null){this.syncTicks=false}}this.renderer.init.call(this,this.rendererOptions)};g.prototype.draw=function(j,k){if(this.__ticks){this.__ticks=null}return this.renderer.draw.call(this,j,k)};g.prototype.set=function(){this.renderer.set.call(this)};g.prototype.pack=function(k,j){if(this.show){this.renderer.pack.call(this,k,j)}if(this._min==null){this._min=this.min;this._max=this.max;this._tickInterval=this.tickInterval;this._numberTicks=this.numberTicks;this.__ticks=this._ticks}};g.prototype.reset=function(){this.renderer.reset.call(this) };g.prototype.resetScale=function(j){e.extend(true,this,{min:null,max:null,numberTicks:null,tickInterval:null,_ticks:[],ticks:[]},j);this.resetDataBounds()};g.prototype.resetDataBounds=function(){var t=this._dataBounds;t.min=null;t.max=null;var m,u,q;var n=(this.show)?true:false;for(var p=0;p<this._series.length;p++){u=this._series[p];if(u.show||this.scaleToHiddenSeries){q=u._plotData;if(u._type==="line"&&u.renderer.bands.show&&this.name.charAt(0)!=="x"){q=[[0,u.renderer.bands._min],[1,u.renderer.bands._max]]}var k=1,r=1;if(u._type!=null&&u._type=="ohlc"){k=3;r=2}for(var o=0,m=q.length;o<m;o++){if(this.name=="xaxis"||this.name=="x2axis"){if((q[o][0]!=null&&q[o][0]<t.min)||t.min==null){t.min=q[o][0]}if((q[o][0]!=null&&q[o][0]>t.max)||t.max==null){t.max=q[o][0]}}else{if((q[o][k]!=null&&q[o][k]<t.min)||t.min==null){t.min=q[o][k]}if((q[o][r]!=null&&q[o][r]>t.max)||t.max==null){t.max=q[o][r]}}}if(n&&u.renderer.constructor!==e.jqplot.BarRenderer){n=false}else{if(n&&this._options.hasOwnProperty("forceTickAt0")&&this._options.forceTickAt0==false){n=false }else{if(n&&u.renderer.constructor===e.jqplot.BarRenderer){if(u.barDirection=="vertical"&&this.name!="xaxis"&&this.name!="x2axis"){if(this._options.pad!=null||this._options.padMin!=null){n=false}}else{if(u.barDirection=="horizontal"&&(this.name=="xaxis"||this.name=="x2axis")){if(this._options.pad!=null||this._options.padMin!=null){n=false}}}}}}}}if(n&&this.renderer.constructor===e.jqplot.LinearAxisRenderer&&t.min>=0){this.padMin=1;this.forceTickAt0=true}};function a(j){e.jqplot.ElemContainer.call(this);this.show=false;this.location="ne";this.labels=[];this.showLabels=true;this.showSwatches=true;this.placement="insideGrid";this.xoffset=0;this.yoffset=0;this.border;this.background;this.textColor;this.fontFamily;this.fontSize;this.rowSpacing="0.5em";this.renderer=e.jqplot.TableLegendRenderer;this.rendererOptions={};this.preDraw=false;this.marginTop=null;this.marginRight=null;this.marginBottom=null;this.marginLeft=null;this.escapeHtml=false;this._series=[];e.extend(true,this,j)}a.prototype=new e.jqplot.ElemContainer(); a.prototype.constructor=a;a.prototype.setOptions=function(j){e.extend(true,this,j);if(this.placement=="inside"){this.placement="insideGrid"}if(this.xoffset>0){if(this.placement=="insideGrid"){switch(this.location){case"nw":case"w":case"sw":if(this.marginLeft==null){this.marginLeft=this.xoffset+"px"}this.marginRight="0px";break;case"ne":case"e":case"se":default:if(this.marginRight==null){this.marginRight=this.xoffset+"px"}this.marginLeft="0px";break}}else{if(this.placement=="outside"){switch(this.location){case"nw":case"w":case"sw":if(this.marginRight==null){this.marginRight=this.xoffset+"px"}this.marginLeft="0px";break;case"ne":case"e":case"se":default:if(this.marginLeft==null){this.marginLeft=this.xoffset+"px"}this.marginRight="0px";break}}}this.xoffset=0}if(this.yoffset>0){if(this.placement=="outside"){switch(this.location){case"sw":case"s":case"se":if(this.marginTop==null){this.marginTop=this.yoffset+"px"}this.marginBottom="0px";break;case"ne":case"n":case"nw":default:if(this.marginBottom==null){this.marginBottom=this.yoffset+"px" }this.marginTop="0px";break}}else{if(this.placement=="insideGrid"){switch(this.location){case"sw":case"s":case"se":if(this.marginBottom==null){this.marginBottom=this.yoffset+"px"}this.marginTop="0px";break;case"ne":case"n":case"nw":default:if(this.marginTop==null){this.marginTop=this.yoffset+"px"}this.marginBottom="0px";break}}}this.yoffset=0}};a.prototype.init=function(){if(e.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions)};a.prototype.draw=function(k,l){for(var j=0;j<e.jqplot.preDrawLegendHooks.length;j++){e.jqplot.preDrawLegendHooks[j].call(this,k)}return this.renderer.draw.call(this,k,l)};a.prototype.pack=function(j){this.renderer.pack.call(this,j)};function f(j){e.jqplot.ElemContainer.call(this);this.text=j;this.show=true;this.fontFamily;this.fontSize;this.textAlign;this.textColor;this.renderer=e.jqplot.DivTitleRenderer;this.rendererOptions={};this.escapeHtml=false}f.prototype=new e.jqplot.ElemContainer();f.prototype.constructor=f; f.prototype.init=function(){if(e.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions)};f.prototype.draw=function(j){return this.renderer.draw.call(this,j)};f.prototype.pack=function(){this.renderer.pack.call(this)};function i(j){j=j||{};e.jqplot.ElemContainer.call(this);this.show=true;this.xaxis="xaxis";this._xaxis;this.yaxis="yaxis";this._yaxis;this.gridBorderWidth=2;this.renderer=e.jqplot.LineRenderer;this.rendererOptions={};this.data=[];this.gridData=[];this.label="";this.showLabel=true;this.color;this.negativeColor;this.lineWidth=2.5;this.lineJoin="round";this.lineCap="round";this.linePattern="solid";this.shadow=true;this.shadowAngle=45;this.shadowOffset=1.25;this.shadowDepth=3;this.shadowAlpha="0.1";this.breakOnNull=false;this.markerRenderer=e.jqplot.MarkerRenderer;this.markerOptions={};this.showLine=true;this.showMarker=true;this.index;this.fill=false;this.fillColor;this.fillAlpha;this.fillAndStroke=false;this.disableStack=false; this._stack=false;this.neighborThreshold=4;this.fillToZero=false;this.fillToValue=0;this.fillAxis="y";this.useNegativeColors=true;this._stackData=[];this._plotData=[];this._plotValues={x:[],y:[]};this._intervals={x:{},y:{}};this._prevPlotData=[];this._prevGridData=[];this._stackAxis="y";this._primaryAxis="_xaxis";this.canvas=new e.jqplot.GenericCanvas();this.shadowCanvas=new e.jqplot.GenericCanvas();this.plugins={};this._sumy=0;this._sumx=0;this._type=""}i.prototype=new e.jqplot.ElemContainer();i.prototype.constructor=i;i.prototype.init=function(n,r,p){this.index=n;this.gridBorderWidth=r;var q=this.data;var m=[],o,j;for(o=0,j=q.length;o<j;o++){if(!this.breakOnNull){if(q[o]==null||q[o][0]==null||q[o][1]==null){continue}else{m.push(q[o])}}else{m.push(q[o])}}this.data=m;if(!this.color){this.color=p.colorGenerator.get(this.index)}if(!this.negativeColor){this.negativeColor=p.negativeColorGenerator.get(this.index)}if(!this.fillColor){this.fillColor=this.color}if(this.fillAlpha){var k=e.jqplot.normalize2rgb(this.fillColor); var k=e.jqplot.getColorComponents(k);this.fillColor="rgba("+k[0]+","+k[1]+","+k[2]+","+this.fillAlpha+")"}if(e.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions,p);this.markerRenderer=new this.markerRenderer();if(!this.markerOptions.color){this.markerOptions.color=this.color}if(this.markerOptions.show==null){this.markerOptions.show=this.showMarker}this.showMarker=this.markerOptions.show;this.markerRenderer.init(this.markerOptions)};i.prototype.draw=function(q,n,p){var l=(n==b)?{}:n;q=(q==b)?this.canvas._ctx:q;var k,o,m;for(k=0;k<e.jqplot.preDrawSeriesHooks.length;k++){e.jqplot.preDrawSeriesHooks[k].call(this,q,l)}if(this.show){this.renderer.setGridData.call(this,p);if(!l.preventJqPlotSeriesDrawTrigger){e(q.canvas).trigger("jqplotSeriesDraw",[this.data,this.gridData])}o=[];if(l.data){o=l.data}else{if(!this._stack){o=this.data}else{o=this._plotData}}m=l.gridData||this.renderer.makeGridData.call(this,o,p);if(this._type==="line"&&this.renderer.smooth&&this.renderer._smoothedData.length){m=this.renderer._smoothedData }this.renderer.draw.call(this,q,m,l,p)}for(k=0;k<e.jqplot.postDrawSeriesHooks.length;k++){e.jqplot.postDrawSeriesHooks[k].call(this,q,l,p)}q=n=p=k=o=m=null};i.prototype.drawShadow=function(q,n,p){var l=(n==b)?{}:n;q=(q==b)?this.shadowCanvas._ctx:q;var k,o,m;for(k=0;k<e.jqplot.preDrawSeriesShadowHooks.length;k++){e.jqplot.preDrawSeriesShadowHooks[k].call(this,q,l)}if(this.shadow){this.renderer.setGridData.call(this,p);o=[];if(l.data){o=l.data}else{if(!this._stack){o=this.data}else{o=this._plotData}}m=l.gridData||this.renderer.makeGridData.call(this,o,p);this.renderer.drawShadow.call(this,q,m,l,p)}for(k=0;k<e.jqplot.postDrawSeriesShadowHooks.length;k++){e.jqplot.postDrawSeriesShadowHooks[k].call(this,q,l)}q=n=p=k=o=m=null};i.prototype.toggleDisplay=function(k,m){var j,l;if(k.data.series){j=k.data.series}else{j=this}if(k.data.speed){l=k.data.speed}if(l){if(j.canvas._elem.is(":hidden")||!j.show){j.show=true;j.canvas._elem.removeClass("jqplot-series-hidden");if(j.shadowCanvas._elem){j.shadowCanvas._elem.fadeIn(l) }j.canvas._elem.fadeIn(l,m);j.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+j.index).fadeIn(l)}else{j.show=false;j.canvas._elem.addClass("jqplot-series-hidden");if(j.shadowCanvas._elem){j.shadowCanvas._elem.fadeOut(l)}j.canvas._elem.fadeOut(l,m);j.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+j.index).fadeOut(l)}}else{if(j.canvas._elem.is(":hidden")||!j.show){j.show=true;j.canvas._elem.removeClass("jqplot-series-hidden");if(j.shadowCanvas._elem){j.shadowCanvas._elem.show()}j.canvas._elem.show(0,m);j.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+j.index).show()}else{j.show=false;j.canvas._elem.addClass("jqplot-series-hidden");if(j.shadowCanvas._elem){j.shadowCanvas._elem.hide()}j.canvas._elem.hide(0,m);j.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+j.index).hide()}}};function d(){e.jqplot.ElemContainer.call(this);this.drawGridlines=true;this.gridLineColor="#cccccc";this.gridLineWidth=1;this.background="#fffdf6";this.borderColor="#999999";this.borderWidth=2; this.drawBorder=true;this.shadow=true;this.shadowAngle=45;this.shadowOffset=1.5;this.shadowWidth=3;this.shadowDepth=3;this.shadowColor=null;this.shadowAlpha="0.07";this._left;this._top;this._right;this._bottom;this._width;this._height;this._axes=[];this.renderer=e.jqplot.CanvasGridRenderer;this.rendererOptions={};this._offsets={top:null,bottom:null,left:null,right:null}}d.prototype=new e.jqplot.ElemContainer();d.prototype.constructor=d;d.prototype.init=function(){if(e.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions)};d.prototype.createElement=function(j,k){this._offsets=j;return this.renderer.createElement.call(this,k)};d.prototype.draw=function(){this.renderer.draw.call(this)};e.jqplot.GenericCanvas=function(){e.jqplot.ElemContainer.call(this);this._ctx};e.jqplot.GenericCanvas.prototype=new e.jqplot.ElemContainer();e.jqplot.GenericCanvas.prototype.constructor=e.jqplot.GenericCanvas;e.jqplot.GenericCanvas.prototype.createElement=function(n,l,k,o){this._offsets=n; var j="jqplot";if(l!=b){j=l}var m;m=o.canvasManager.getCanvas();if(k!=null){this._plotDimensions=k}m.width=this._plotDimensions.width-this._offsets.left-this._offsets.right;m.height=this._plotDimensions.height-this._offsets.top-this._offsets.bottom;this._elem=e(m);this._elem.css({position:"absolute",left:this._offsets.left,top:this._offsets.top});this._elem.addClass(j);m=o.canvasManager.initCanvas(m);m=null;return this._elem};e.jqplot.GenericCanvas.prototype.setContext=function(){this._ctx=this._elem.get(0).getContext("2d");return this._ctx};e.jqplot.GenericCanvas.prototype.resetCanvas=function(){if(this._elem){if(e.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==b){window.G_vmlCanvasManager.uninitElement(this._elem.get(0))}this._elem.emptyForce()}this._ctx=null};e.jqplot.HooksManager=function(){this.hooks=[];this.args=[]};e.jqplot.HooksManager.prototype.addOnce=function(n,k){k=k||[];var o=false;for(var m=0,j=this.hooks.length;m<j;m++){if(this.hooks[m]==n){o=true}}if(!o){this.hooks.push(n); this.args.push(k)}};e.jqplot.HooksManager.prototype.add=function(k,j){j=j||[];this.hooks.push(k);this.args.push(j)};e.jqplot.EventListenerManager=function(){this.hooks=[]};e.jqplot.EventListenerManager.prototype.addOnce=function(o,n){var p=false,m,k;for(var k=0,j=this.hooks.length;k<j;k++){m=this.hooks[k];if(m[0]==o&&m[1]==n){p=true}}if(!p){this.hooks.push([o,n])}};e.jqplot.EventListenerManager.prototype.add=function(k,j){this.hooks.push([k,j])};var c=["yMidAxis","xaxis","yaxis","x2axis","y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis"];function h(){this.animate=false;this.animateReplot=false;this.axes={xaxis:new g("xaxis"),yaxis:new g("yaxis"),x2axis:new g("x2axis"),y2axis:new g("y2axis"),y3axis:new g("y3axis"),y4axis:new g("y4axis"),y5axis:new g("y5axis"),y6axis:new g("y6axis"),y7axis:new g("y7axis"),y8axis:new g("y8axis"),y9axis:new g("y9axis"),yMidAxis:new g("yMidAxis")};this.baseCanvas=new e.jqplot.GenericCanvas();this.captureRightClick=false;this.data=[];this.dataRenderer; this.dataRendererOptions;this.defaults={axesDefaults:{},axes:{xaxis:{},yaxis:{},x2axis:{},y2axis:{},y3axis:{},y4axis:{},y5axis:{},y6axis:{},y7axis:{},y8axis:{},y9axis:{},yMidAxis:{}},seriesDefaults:{},series:[]};this.defaultAxisStart=1;this.drawIfHidden=false;this.eventCanvas=new e.jqplot.GenericCanvas();this.fillBetween={series1:null,series2:null,color:null,baseSeries:0,fill:true};this.fontFamily;this.fontSize;this.grid=new d();this.legend=new a();this.noDataIndicator={show:false,indicator:"Loading Data...",axes:{xaxis:{min:0,max:10,tickInterval:2,show:true},yaxis:{min:0,max:12,tickInterval:3,show:true}}};this.negativeSeriesColors=e.jqplot.config.defaultNegativeColors;this.options={};this.previousSeriesStack=[];this.plugins={};this.series=[];this.seriesStack=[];this.seriesColors=e.jqplot.config.defaultColors;this.sortData=true;this.stackSeries=false;this.syncXTicks=true;this.syncYTicks=true;this.target=null;this.targetId=null;this.textColor;this.title=new f();this._drawCount=0;this._sumy=0; this._sumx=0;this._stackData=[];this._plotData=[];this._width=null;this._height=null;this._plotDimensions={height:null,width:null};this._gridPadding={top:null,right:null,bottom:null,left:null};this._defaultGridPadding={top:10,right:10,bottom:23,left:10};this._addDomReference=e.jqplot.config.addDomReference;this.preInitHooks=new e.jqplot.HooksManager();this.postInitHooks=new e.jqplot.HooksManager();this.preParseOptionsHooks=new e.jqplot.HooksManager();this.postParseOptionsHooks=new e.jqplot.HooksManager();this.preDrawHooks=new e.jqplot.HooksManager();this.postDrawHooks=new e.jqplot.HooksManager();this.preDrawSeriesHooks=new e.jqplot.HooksManager();this.postDrawSeriesHooks=new e.jqplot.HooksManager();this.preDrawLegendHooks=new e.jqplot.HooksManager();this.addLegendRowHooks=new e.jqplot.HooksManager();this.preSeriesInitHooks=new e.jqplot.HooksManager();this.postSeriesInitHooks=new e.jqplot.HooksManager();this.preParseSeriesOptionsHooks=new e.jqplot.HooksManager();this.postParseSeriesOptionsHooks=new e.jqplot.HooksManager(); this.eventListenerHooks=new e.jqplot.EventListenerManager();this.preDrawSeriesShadowHooks=new e.jqplot.HooksManager();this.postDrawSeriesShadowHooks=new e.jqplot.HooksManager();this.colorGenerator=new e.jqplot.ColorGenerator();this.negativeColorGenerator=new e.jqplot.ColorGenerator();this.canvasManager=new e.jqplot.CanvasManager();this.themeEngine=new e.jqplot.ThemeEngine();var l=0;this.init=function(x,t,z){z=z||{};for(var u=0;u<e.jqplot.preInitHooks.length;u++){e.jqplot.preInitHooks[u].call(this,x,t,z)}for(var u=0;u<this.preInitHooks.hooks.length;u++){this.preInitHooks.hooks[u].call(this,x,t,z)}this.targetId="#"+x;this.target=e("#"+x);if(this._addDomReference){this.target.data("jqplot",this)}this.target.removeClass("jqplot-error");if(!this.target.get(0)){throw new Error("No plot target specified")}if(this.target.css("position")=="static"){this.target.css("position","relative")}if(!this.target.hasClass("jqplot-target")){this.target.addClass("jqplot-target")}if(!this.target.height()){var v; if(z&&z.height){v=parseInt(z.height,10)}else{if(this.target.attr("data-height")){v=parseInt(this.target.attr("data-height"),10)}else{v=parseInt(e.jqplot.config.defaultHeight,10)}}this._height=v;this.target.css("height",v+"px")}else{this._height=v=this.target.height()}if(!this.target.width()){var y;if(z&&z.width){y=parseInt(z.width,10)}else{if(this.target.attr("data-width")){y=parseInt(this.target.attr("data-width"),10)}else{y=parseInt(e.jqplot.config.defaultWidth,10)}}this._width=y;this.target.css("width",y+"px")}else{this._width=y=this.target.width()}for(var u=0,r=c.length;u<r;u++){this.axes[c[u]]=new g(c[u])}this._plotDimensions.height=this._height;this._plotDimensions.width=this._width;this.grid._plotDimensions=this._plotDimensions;this.title._plotDimensions=this._plotDimensions;this.baseCanvas._plotDimensions=this._plotDimensions;this.eventCanvas._plotDimensions=this._plotDimensions;this.legend._plotDimensions=this._plotDimensions;if(this._height<=0||this._width<=0||!this._height||!this._width){throw new Error("Canvas dimension not set") }if(z.dataRenderer&&e.isFunction(z.dataRenderer)){if(z.dataRendererOptions){this.dataRendererOptions=z.dataRendererOptions}this.dataRenderer=z.dataRenderer;t=this.dataRenderer(t,this,this.dataRendererOptions)}if(z.noDataIndicator&&e.isPlainObject(z.noDataIndicator)){e.extend(true,this.noDataIndicator,z.noDataIndicator)}if(t==null||e.isArray(t)==false||t.length==0||e.isArray(t[0])==false||t[0].length==0){if(this.noDataIndicator.show==false){throw new Error("No data specified")}else{for(var n in this.noDataIndicator.axes){for(var p in this.noDataIndicator.axes[n]){this.axes[n][p]=this.noDataIndicator.axes[n][p]}}this.postDrawHooks.add(function(){var E=this.eventCanvas.getHeight();var B=this.eventCanvas.getWidth();var A=e('<div class="jqplot-noData-container" style="position:absolute;"></div>');this.target.append(A);A.height(E);A.width(B);A.css("top",this.eventCanvas._offsets.top);A.css("left",this.eventCanvas._offsets.left);var D=e('<div class="jqplot-noData-contents" style="text-align:center; position:relative; margin-left:auto; margin-right:auto;"></div>'); A.append(D);D.html(this.noDataIndicator.indicator);var C=D.height();var w=D.width();D.height(C);D.width(w);D.css("top",(E-C)/2+"px")})}}this.data=e.extend(true,[],t);this.parseOptions(z);if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this.title.init();this.legend.init();this._sumy=0;this._sumx=0;this.computePlotData();for(var u=0;u<this.series.length;u++){this.seriesStack.push(u);this.previousSeriesStack.push(u);this.series[u].shadowCanvas._plotDimensions=this._plotDimensions;this.series[u].canvas._plotDimensions=this._plotDimensions;for(var s=0;s<e.jqplot.preSeriesInitHooks.length;s++){e.jqplot.preSeriesInitHooks[s].call(this.series[u],x,this.data,this.options.seriesDefaults,this.options.series[u],this)}for(var s=0;s<this.preSeriesInitHooks.hooks.length;s++){this.preSeriesInitHooks.hooks[s].call(this.series[u],x,this.data,this.options.seriesDefaults,this.options.series[u],this) }this.series[u]._plotDimensions=this._plotDimensions;this.series[u].init(u,this.grid.borderWidth,this);for(var s=0;s<e.jqplot.postSeriesInitHooks.length;s++){e.jqplot.postSeriesInitHooks[s].call(this.series[u],x,this.data,this.options.seriesDefaults,this.options.series[u],this)}for(var s=0;s<this.postSeriesInitHooks.hooks.length;s++){this.postSeriesInitHooks.hooks[s].call(this.series[u],x,this.data,this.options.seriesDefaults,this.options.series[u],this)}this._sumy+=this.series[u]._sumy;this._sumx+=this.series[u]._sumx}var o,q;for(var u=0,r=c.length;u<r;u++){o=c[u];q=this.axes[o];q._plotDimensions=this._plotDimensions;q.init();if(this.axes[o].borderColor==null){if(o.charAt(0)!=="x"&&q.useSeriesColor===true&&q.show){q.borderColor=q._series[0].color}else{q.borderColor=this.grid.borderColor}}}if(this.sortData){j(this.series)}this.grid.init();this.grid._axes=this.axes;this.legend._series=this.series;for(var u=0;u<e.jqplot.postInitHooks.length;u++){e.jqplot.postInitHooks[u].call(this,x,this.data,z) }for(var u=0;u<this.postInitHooks.hooks.length;u++){this.postInitHooks.hooks[u].call(this,x,this.data,z)}};this.resetAxesScale=function(s,o){var q=o||{};var r=s||this.axes;if(r===true){r=this.axes}if(e.isArray(r)){for(var p=0;p<r.length;p++){this.axes[r[p]].resetScale(q[r[p]])}}else{if(typeof(r)==="object"){for(var n in r){this.axes[n].resetScale(q[n])}}}};this.reInitialize=function(w,n){var A=e.extend(true,{},this.options,n);var y=this.targetId.substr(1);var u=(w==null)?this.data:w;for(var x=0;x<e.jqplot.preInitHooks.length;x++){e.jqplot.preInitHooks[x].call(this,y,u,A)}for(var x=0;x<this.preInitHooks.hooks.length;x++){this.preInitHooks.hooks[x].call(this,y,u,A)}this._height=this.target.height();this._width=this.target.width();if(this._height<=0||this._width<=0||!this._height||!this._width){throw new Error("Target dimension not set")}this._plotDimensions.height=this._height;this._plotDimensions.width=this._width;this.grid._plotDimensions=this._plotDimensions;this.title._plotDimensions=this._plotDimensions; this.baseCanvas._plotDimensions=this._plotDimensions;this.eventCanvas._plotDimensions=this._plotDimensions;this.legend._plotDimensions=this._plotDimensions;var o,z,v,q;for(var x=0,s=c.length;x<s;x++){o=c[x];q=this.axes[o];z=q._ticks;for(var v=0,r=z.length;v<r;v++){var p=z[v]._elem;if(p){if(e.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==b){window.G_vmlCanvasManager.uninitElement(p.get(0))}p.emptyForce();p=null;z._elem=null}}z=null;delete q.ticks;delete q._ticks;this.axes[o]=new g(o);this.axes[o]._plotWidth=this._width;this.axes[o]._plotHeight=this._height}if(w){if(A.dataRenderer&&e.isFunction(A.dataRenderer)){if(A.dataRendererOptions){this.dataRendererOptions=A.dataRendererOptions}this.dataRenderer=A.dataRenderer;w=this.dataRenderer(w,this,this.dataRendererOptions)}this.data=e.extend(true,[],w)}if(n){this.parseOptions(A)}this.title._plotWidth=this._width;if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily) }if(this.fontSize){this.target.css("font-size",this.fontSize)}this.title.init();this.legend.init();this._sumy=0;this._sumx=0;this.seriesStack=[];this.previousSeriesStack=[];this.computePlotData();for(var x=0,s=this.series.length;x<s;x++){this.seriesStack.push(x);this.previousSeriesStack.push(x);this.series[x].shadowCanvas._plotDimensions=this._plotDimensions;this.series[x].canvas._plotDimensions=this._plotDimensions;for(var v=0;v<e.jqplot.preSeriesInitHooks.length;v++){e.jqplot.preSeriesInitHooks[v].call(this.series[x],y,this.data,this.options.seriesDefaults,this.options.series[x],this)}for(var v=0;v<this.preSeriesInitHooks.hooks.length;v++){this.preSeriesInitHooks.hooks[v].call(this.series[x],y,this.data,this.options.seriesDefaults,this.options.series[x],this)}this.series[x]._plotDimensions=this._plotDimensions;this.series[x].init(x,this.grid.borderWidth,this);for(var v=0;v<e.jqplot.postSeriesInitHooks.length;v++){e.jqplot.postSeriesInitHooks[v].call(this.series[x],y,this.data,this.options.seriesDefaults,this.options.series[x],this) }for(var v=0;v<this.postSeriesInitHooks.hooks.length;v++){this.postSeriesInitHooks.hooks[v].call(this.series[x],y,this.data,this.options.seriesDefaults,this.options.series[x],this)}this._sumy+=this.series[x]._sumy;this._sumx+=this.series[x]._sumx}for(var x=0,s=c.length;x<s;x++){o=c[x];q=this.axes[o];q._plotDimensions=this._plotDimensions;q.init();if(q.borderColor==null){if(o.charAt(0)!=="x"&&q.useSeriesColor===true&&q.show){q.borderColor=q._series[0].color}else{q.borderColor=this.grid.borderColor}}}if(this.sortData){j(this.series)}this.grid.init();this.grid._axes=this.axes;this.legend._series=this.series;for(var x=0,s=e.jqplot.postInitHooks.length;x<s;x++){e.jqplot.postInitHooks[x].call(this,y,this.data,A)}for(var x=0,s=this.postInitHooks.hooks.length;x<s;x++){this.postInitHooks.hooks[x].call(this,y,this.data,A)}};this.quickInit=function(){this._height=this.target.height();this._width=this.target.width();if(this._height<=0||this._width<=0||!this._height||!this._width){throw new Error("Target dimension not set") }this._plotDimensions.height=this._height;this._plotDimensions.width=this._width;this.grid._plotDimensions=this._plotDimensions;this.title._plotDimensions=this._plotDimensions;this.baseCanvas._plotDimensions=this._plotDimensions;this.eventCanvas._plotDimensions=this._plotDimensions;this.legend._plotDimensions=this._plotDimensions;for(var u in this.axes){this.axes[u]._plotWidth=this._width;this.axes[u]._plotHeight=this._height}this.title._plotWidth=this._width;if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this._sumy=0;this._sumx=0;this.computePlotData();for(var r=0;r<this.series.length;r++){if(this.series[r]._type==="line"&&this.series[r].renderer.bands.show){this.series[r].renderer.initBands.call(this.series[r],this.series[r].renderer.options,this)}this.series[r]._plotDimensions=this._plotDimensions;this.series[r].canvas._plotDimensions=this._plotDimensions; this._sumy+=this.series[r]._sumy;this._sumx+=this.series[r]._sumx}var p;for(var o=0;o<12;o++){p=c[o];var q=this.axes[p]._ticks;for(var r=0;r<q.length;r++){var s=q[r]._elem;if(s){if(e.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==b){window.G_vmlCanvasManager.uninitElement(s.get(0))}s.emptyForce();s=null;q._elem=null}}q=null;this.axes[p]._plotDimensions=this._plotDimensions;this.axes[p]._ticks=[]}if(this.sortData){j(this.series)}this.grid._axes=this.axes;this.legend._series=this.series};function j(s){var w,x,y,o,v;for(var t=0;t<s.length;t++){var p;var u=[s[t].data,s[t]._stackData,s[t]._plotData,s[t]._prevPlotData];for(var q=0;q<4;q++){p=true;w=u[q];if(s[t]._stackAxis=="x"){for(var r=0;r<w.length;r++){if(typeof(w[r][1])!="number"){p=false;break}}if(p){w.sort(function(z,n){return z[1]-n[1]})}}else{for(var r=0;r<w.length;r++){if(typeof(w[r][0])!="number"){p=false;break}}if(p){w.sort(function(z,n){return z[0]-n[0]})}}}}}this.computePlotData=function(){this._plotData=[];this._stackData=[]; var u,v,q;for(v=0,q=this.series.length;v<q;v++){u=this.series[v];this._plotData.push([]);this._stackData.push([]);var o=u.data;this._plotData[v]=e.extend(true,[],o);this._stackData[v]=e.extend(true,[],o);u._plotData=this._plotData[v];u._stackData=this._stackData[v];var y={x:[],y:[]};if(this.stackSeries&&!u.disableStack){u._stack=true;var w=(u._stackAxis==="x")?0:1;for(var r=0,n=o.length;r<n;r++){var x=o[r][w];if(x==null){x=0}this._plotData[v][r][w]=x;this._stackData[v][r][w]=x;if(v>0){for(var s=v;s--;){var p=this._plotData[s][r][w];if(x*p>=0){this._plotData[v][r][w]+=p;this._stackData[v][r][w]+=p;break}}}}}else{for(var t=0;t<u.data.length;t++){y.x.push(u.data[t][0]);y.y.push(u.data[t][1])}this._stackData.push(u.data);this.series[v]._stackData=u.data;this._plotData.push(u.data);u._plotData=u.data;u._plotValues=y}if(v>0){u._prevPlotData=this.series[v-1]._plotData}u._sumy=0;u._sumx=0;for(t=u.data.length-1;t>-1;t--){u._sumy+=u.data[t][1];u._sumx+=u.data[t][0]}}};this.populatePlotData=function(v,w){this._plotData=[]; this._stackData=[];v._stackData=[];v._plotData=[];var z={x:[],y:[]};if(this.stackSeries&&!v.disableStack){v._stack=true;var y=(v._stackAxis==="x")?0:1;var A=e.extend(true,[],v.data);var B=e.extend(true,[],v.data);var p,o,q,x,n;for(var t=0;t<w;t++){var r=this.series[t].data;for(var s=0;s<r.length;s++){q=r[s];p=(q[0]!=null)?q[0]:0;o=(q[1]!=null)?q[1]:0;A[s][0]+=p;A[s][1]+=o;x=(y)?o:p;if(v.data[s][y]*x>=0){B[s][y]+=x}}}for(var u=0;u<B.length;u++){z.x.push(B[u][0]);z.y.push(B[u][1])}this._plotData.push(B);this._stackData.push(A);v._stackData=A;v._plotData=B;v._plotValues=z}else{for(var u=0;u<v.data.length;u++){z.x.push(v.data[u][0]);z.y.push(v.data[u][1])}this._stackData.push(v.data);this.series[w]._stackData=v.data;this._plotData.push(v.data);v._plotData=v.data;v._plotValues=z}if(w>0){v._prevPlotData=this.series[w-1]._plotData}v._sumy=0;v._sumx=0;for(u=v.data.length-1;u>-1;u--){v._sumy+=v.data[u][1];v._sumx+=v.data[u][0]}};this.getNextSeriesColor=(function(o){var n=0;var p=o.seriesColors;return function(){if(n<p.length){return p[n++] }else{n=0;return p[n++]}}})(this);this.parseOptions=function(A){for(var v=0;v<this.preParseOptionsHooks.hooks.length;v++){this.preParseOptionsHooks.hooks[v].call(this,A)}for(var v=0;v<e.jqplot.preParseOptionsHooks.length;v++){e.jqplot.preParseOptionsHooks[v].call(this,A)}this.options=e.extend(true,{},this.defaults,A);var p=this.options;this.animate=p.animate;this.animateReplot=p.animateReplot;this.stackSeries=p.stackSeries;if(e.isPlainObject(p.fillBetween)){var z=["series1","series2","color","baseSeries","fill"],w;for(var v=0,t=z.length;v<t;v++){w=z[v];if(p.fillBetween[w]!=null){this.fillBetween[w]=p.fillBetween[w]}}}if(p.seriesColors){this.seriesColors=p.seriesColors}if(p.negativeSeriesColors){this.negativeSeriesColors=p.negativeSeriesColors}if(p.captureRightClick){this.captureRightClick=p.captureRightClick}this.defaultAxisStart=(A&&A.defaultAxisStart!=null)?A.defaultAxisStart:this.defaultAxisStart;this.colorGenerator.setColors(this.seriesColors);this.negativeColorGenerator.setColors(this.negativeSeriesColors); e.extend(true,this._gridPadding,p.gridPadding);this.sortData=(p.sortData!=null)?p.sortData:this.sortData;for(var v=0;v<12;v++){var q=c[v];var s=this.axes[q];s._options=e.extend(true,{},p.axesDefaults,p.axes[q]);e.extend(true,s,p.axesDefaults,p.axes[q]);s._plotWidth=this._width;s._plotHeight=this._height}var y=function(E,C,F){var B=[];var D,n;C=C||"vertical";if(!e.isArray(E[0])){for(D=0,n=E.length;D<n;D++){if(C=="vertical"){B.push([F+D,E[D]])}else{B.push([E[D],F+D])}}}else{e.extend(true,B,E)}return B};var x=0;this.series=[];for(var v=0;v<this.data.length;v++){var o=e.extend(true,{index:v},{seriesColors:this.seriesColors,negativeSeriesColors:this.negativeSeriesColors},this.options.seriesDefaults,this.options.series[v],{rendererOptions:{animation:{show:this.animate}}});var z=new i(o);for(var u=0;u<e.jqplot.preParseSeriesOptionsHooks.length;u++){e.jqplot.preParseSeriesOptionsHooks[u].call(z,this.options.seriesDefaults,this.options.series[v])}for(var u=0;u<this.preParseSeriesOptionsHooks.hooks.length; u++){this.preParseSeriesOptionsHooks.hooks[u].call(z,this.options.seriesDefaults,this.options.series[v])}e.extend(true,z,o);var r="vertical";if(z.renderer===e.jqplot.BarRenderer&&z.rendererOptions&&z.rendererOptions.barDirection=="horizontal"){r="horizontal";z._stackAxis="x";z._primaryAxis="_yaxis"}z.data=y(this.data[v],r,this.defaultAxisStart);switch(z.xaxis){case"xaxis":z._xaxis=this.axes.xaxis;break;case"x2axis":z._xaxis=this.axes.x2axis;break;default:break}z._yaxis=this.axes[z.yaxis];z._xaxis._series.push(z);z._yaxis._series.push(z);if(z.show){z._xaxis.show=true;z._yaxis.show=true}else{if(z._xaxis.scaleToHiddenSeries){z._xaxis.show=true}if(z._yaxis.scaleToHiddenSeries){z._yaxis.show=true}}if(!z.label){z.label="Series "+(v+1).toString()}this.series.push(z);for(var u=0;u<e.jqplot.postParseSeriesOptionsHooks.length;u++){e.jqplot.postParseSeriesOptionsHooks[u].call(this.series[v],this.options.seriesDefaults,this.options.series[v])}for(var u=0;u<this.postParseSeriesOptionsHooks.hooks.length; u++){this.postParseSeriesOptionsHooks.hooks[u].call(this.series[v],this.options.seriesDefaults,this.options.series[v])}}e.extend(true,this.grid,this.options.grid);for(var v=0,t=c.length;v<t;v++){var q=c[v];var s=this.axes[q];if(s.borderWidth==null){s.borderWidth=this.grid.borderWidth}}if(typeof this.options.title=="string"){this.title.text=this.options.title}else{if(typeof this.options.title=="object"){e.extend(true,this.title,this.options.title)}}this.title._plotWidth=this._width;this.legend.setOptions(this.options.legend);for(var v=0;v<e.jqplot.postParseOptionsHooks.length;v++){e.jqplot.postParseOptionsHooks[v].call(this,A)}for(var v=0;v<this.postParseOptionsHooks.hooks.length;v++){this.postParseOptionsHooks.hooks[v].call(this,A)}};this.destroy=function(){this.canvasManager.freeAllCanvases();if(this.eventCanvas&&this.eventCanvas._elem){this.eventCanvas._elem.unbind()}this.target.empty();this.target[0].innerHTML=""};this.replot=function(o){var p=o||{};var r=p.data||null;var n=(p.clear===false)?false:true; var q=p.resetAxes||false;delete p.data;delete p.clear;delete p.resetAxes;this.target.trigger("jqplotPreReplot");if(n){this.destroy()}if(r||!e.isEmptyObject(p)){this.reInitialize(r,p)}else{this.quickInit()}if(q){this.resetAxesScale(q,p.axes)}this.draw();this.target.trigger("jqplotPostReplot")};this.redraw=function(n){n=(n!=null)?n:true;this.target.trigger("jqplotPreRedraw");if(n){this.canvasManager.freeAllCanvases();this.eventCanvas._elem.unbind();this.target.empty()}for(var p in this.axes){this.axes[p]._ticks=[]}this.computePlotData();this._sumy=0;this._sumx=0;for(var o=0,q=this.series.length;o<q;o++){this._sumy+=this.series[o]._sumy;this._sumx+=this.series[o]._sumx}this.draw();this.target.trigger("jqplotPostRedraw")};this.draw=function(){if(this.drawIfHidden||this.target.is(":visible")){this.target.trigger("jqplotPreDraw");var I,G,F,r;for(I=0,F=e.jqplot.preDrawHooks.length;I<F;I++){e.jqplot.preDrawHooks[I].call(this)}for(I=0,F=this.preDrawHooks.hooks.length;I<F;I++){this.preDrawHooks.hooks[I].apply(this,this.preDrawSeriesHooks.args[I]) }this.target.append(this.baseCanvas.createElement({left:0,right:0,top:0,bottom:0},"jqplot-base-canvas",null,this));this.baseCanvas.setContext();this.target.append(this.title.draw());this.title.pack({top:0,left:0});var M=this.legend.draw({},this);var o={top:0,left:0,bottom:0,right:0};if(this.legend.placement=="outsideGrid"){this.target.append(M);switch(this.legend.location){case"n":o.top+=this.legend.getHeight();break;case"s":o.bottom+=this.legend.getHeight();break;case"ne":case"e":case"se":o.right+=this.legend.getWidth();break;case"nw":case"w":case"sw":o.left+=this.legend.getWidth();break;default:o.right+=this.legend.getWidth();break}M=M.detach()}var u=this.axes;var N;for(I=0;I<12;I++){N=c[I];this.target.append(u[N].draw(this.baseCanvas._ctx,this));u[N].set()}if(u.yaxis.show){o.left+=u.yaxis.getWidth()}var H=["y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis"];var A=[0,0,0,0,0,0,0,0];var D=0;var C;for(C=0;C<8;C++){if(u[H[C]].show){D+=u[H[C]].getWidth();A[C]=D}}o.right+=D; if(u.x2axis.show){o.top+=u.x2axis.getHeight()}if(this.title.show){o.top+=this.title.getHeight()}if(u.xaxis.show){o.bottom+=u.xaxis.getHeight()}if(this.options.gridDimensions&&e.isPlainObject(this.options.gridDimensions)){var v=parseInt(this.options.gridDimensions.width,10)||0;var J=parseInt(this.options.gridDimensions.height,10)||0;var q=(this._width-o.left-o.right-v)/2;var L=(this._height-o.top-o.bottom-J)/2;if(L>=0&&q>=0){o.top+=L;o.bottom+=L;o.left+=q;o.right+=q}}var p=["top","bottom","left","right"];for(var C in p){if(this._gridPadding[p[C]]==null&&o[p[C]]>0){this._gridPadding[p[C]]=o[p[C]]}else{if(this._gridPadding[p[C]]==null){this._gridPadding[p[C]]=this._defaultGridPadding[p[C]]}}}var B=this._gridPadding;if(this.legend.placement==="outsideGrid"){B={top:this.title.getHeight(),left:0,right:0,bottom:0};if(this.legend.location==="s"){B.left=this._gridPadding.left;B.right=this._gridPadding.right}}u.xaxis.pack({position:"absolute",bottom:this._gridPadding.bottom-u.xaxis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right}); u.yaxis.pack({position:"absolute",top:0,left:this._gridPadding.left-u.yaxis.getWidth(),height:this._height},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});u.x2axis.pack({position:"absolute",top:this._gridPadding.top-u.x2axis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});for(I=8;I>0;I--){u[H[I-1]].pack({position:"absolute",top:0,right:this._gridPadding.right-A[I-1]},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top})}var w=(this._width-this._gridPadding.left-this._gridPadding.right)/2+this._gridPadding.left-u.yMidAxis.getWidth()/2;u.yMidAxis.pack({position:"absolute",top:0,left:w,zIndex:9,textAlign:"center"},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});this.target.append(this.grid.createElement(this._gridPadding,this));this.grid.draw();var t=this.series;var K=t.length;for(I=0,F=K;I<F;I++){G=this.seriesStack[I];this.target.append(t[G].shadowCanvas.createElement(this._gridPadding,"jqplot-series-shadowCanvas",null,this)); t[G].shadowCanvas.setContext();t[G].shadowCanvas._elem.data("seriesIndex",G)}for(I=0,F=K;I<F;I++){G=this.seriesStack[I];this.target.append(t[G].canvas.createElement(this._gridPadding,"jqplot-series-canvas",null,this));t[G].canvas.setContext();t[G].canvas._elem.data("seriesIndex",G)}this.target.append(this.eventCanvas.createElement(this._gridPadding,"jqplot-event-canvas",null,this));this.eventCanvas.setContext();this.eventCanvas._ctx.fillStyle="rgba(0,0,0,0)";this.eventCanvas._ctx.fillRect(0,0,this.eventCanvas._ctx.canvas.width,this.eventCanvas._ctx.canvas.height);this.bindCustomEvents();if(this.legend.preDraw){this.eventCanvas._elem.before(M);this.legend.pack(B);if(this.legend._elem){this.drawSeries({legendInfo:{location:this.legend.location,placement:this.legend.placement,width:this.legend.getWidth(),height:this.legend.getHeight(),xoffset:this.legend.xoffset,yoffset:this.legend.yoffset}})}else{this.drawSeries()}}else{this.drawSeries();if(K){e(t[K-1].canvas._elem).after(M)}this.legend.pack(B) }for(var I=0,F=e.jqplot.eventListenerHooks.length;I<F;I++){this.eventCanvas._elem.bind(e.jqplot.eventListenerHooks[I][0],{plot:this},e.jqplot.eventListenerHooks[I][1])}for(var I=0,F=this.eventListenerHooks.hooks.length;I<F;I++){this.eventCanvas._elem.bind(this.eventListenerHooks.hooks[I][0],{plot:this},this.eventListenerHooks.hooks[I][1])}var z=this.fillBetween;if(z.fill&&z.series1!==z.series2&&z.series1<K&&z.series2<K&&t[z.series1]._type==="line"&&t[z.series2]._type==="line"){this.doFillBetweenLines()}for(var I=0,F=e.jqplot.postDrawHooks.length;I<F;I++){e.jqplot.postDrawHooks[I].call(this)}for(var I=0,F=this.postDrawHooks.hooks.length;I<F;I++){this.postDrawHooks.hooks[I].apply(this,this.postDrawHooks.args[I])}if(this.target.is(":visible")){this._drawCount+=1}var x,y,E,s;for(I=0,F=K;I<F;I++){x=t[I];y=x.renderer;E=".jqplot-point-label.jqplot-series-"+I;if(y.animation&&y.animation._supported&&y.animation.show&&(this._drawCount<2||this.animateReplot)){s=this.target.find(E);s.stop(true,true).hide(); x.canvas._elem.stop(true,true).hide();x.shadowCanvas._elem.stop(true,true).hide();x.canvas._elem.jqplotEffect("blind",{mode:"show",direction:y.animation.direction},y.animation.speed);x.shadowCanvas._elem.jqplotEffect("blind",{mode:"show",direction:y.animation.direction},y.animation.speed);s.fadeIn(y.animation.speed*0.8)}}s=null;this.target.trigger("jqplotPostDraw",[this])}};h.prototype.doFillBetweenLines=function(){var p=this.fillBetween;var y=p.series1;var w=p.series2;var x=(y<w)?y:w;var v=(w>y)?w:y;var t=this.series[x];var s=this.series[v];if(s.renderer.smooth){var r=s.renderer._smoothedData.slice(0).reverse()}else{var r=s.gridData.slice(0).reverse()}if(t.renderer.smooth){var u=t.renderer._smoothedData.concat(r)}else{var u=t.gridData.concat(r)}var q=(p.color!==null)?p.color:this.series[y].fillColor;var z=(p.baseSeries!==null)?p.baseSeries:x;var o=this.series[z].renderer.shapeRenderer;var n={fillStyle:q,fill:true,closePath:true};o.draw(t.shadowCanvas._ctx,u,n)};this.bindCustomEvents=function(){this.eventCanvas._elem.bind("click",{plot:this},this.onClick); this.eventCanvas._elem.bind("dblclick",{plot:this},this.onDblClick);this.eventCanvas._elem.bind("mousedown",{plot:this},this.onMouseDown);this.eventCanvas._elem.bind("mousemove",{plot:this},this.onMouseMove);this.eventCanvas._elem.bind("mouseenter",{plot:this},this.onMouseEnter);this.eventCanvas._elem.bind("mouseleave",{plot:this},this.onMouseLeave);if(this.captureRightClick){this.eventCanvas._elem.bind("mouseup",{plot:this},this.onRightClick);this.eventCanvas._elem.get(0).oncontextmenu=function(){return false}}else{this.eventCanvas._elem.bind("mouseup",{plot:this},this.onMouseUp)}};function k(w){var v=w.data.plot;var r=v.eventCanvas._elem.offset();var u={x:w.pageX-r.left,y:w.pageY-r.top};var s={xaxis:null,yaxis:null,x2axis:null,y2axis:null,y3axis:null,y4axis:null,y5axis:null,y6axis:null,y7axis:null,y8axis:null,y9axis:null,yMidAxis:null};var t=["xaxis","yaxis","x2axis","y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];var o=v.axes;var p,q;for(p=11;p>0;p--){q=t[p-1]; if(o[q].show){s[q]=o[q].series_p2u(u[q.charAt(0)])}}return{offsets:r,gridPos:u,dataPos:s}}function m(n,o){var z=o.series;var ae,ac,ab,W,X,R,Q,E,C,H,I,S;var aa,af,Y,A,P,U,ad;var q,V;for(ab=o.seriesStack.length-1;ab>=0;ab--){ae=o.seriesStack[ab];W=z[ae];ad=W._highlightThreshold;switch(W.renderer.constructor){case e.jqplot.BarRenderer:R=n.x;Q=n.y;for(ac=0;ac<W._barPoints.length;ac++){P=W._barPoints[ac];Y=W.gridData[ac];if(R>P[0][0]&&R<P[2][0]&&Q>P[2][1]&&Q<P[0][1]){return{seriesIndex:W.index,pointIndex:ac,gridData:Y,data:W.data[ac],points:W._barPoints[ac]}}}break;case e.jqplot.PyramidRenderer:R=n.x;Q=n.y;for(ac=0;ac<W._barPoints.length;ac++){P=W._barPoints[ac];Y=W.gridData[ac];if(R>P[0][0]+ad[0][0]&&R<P[2][0]+ad[2][0]&&Q>P[2][1]&&Q<P[0][1]){return{seriesIndex:W.index,pointIndex:ac,gridData:Y,data:W.data[ac],points:W._barPoints[ac]}}}break;case e.jqplot.DonutRenderer:H=W.startAngle/180*Math.PI;R=n.x-W._center[0];Q=n.y-W._center[1];X=Math.sqrt(Math.pow(R,2)+Math.pow(Q,2));if(R>0&&-Q>=0){E=2*Math.PI-Math.atan(-Q/R) }else{if(R>0&&-Q<0){E=-Math.atan(-Q/R)}else{if(R<0){E=Math.PI-Math.atan(-Q/R)}else{if(R==0&&-Q>0){E=3*Math.PI/2}else{if(R==0&&-Q<0){E=Math.PI/2}else{if(R==0&&Q==0){E=0}}}}}}if(H){E-=H;if(E<0){E+=2*Math.PI}else{if(E>2*Math.PI){E-=2*Math.PI}}}C=W.sliceMargin/180*Math.PI;if(X<W._radius&&X>W._innerRadius){for(ac=0;ac<W.gridData.length;ac++){I=(ac>0)?W.gridData[ac-1][1]+C:C;S=W.gridData[ac][1];if(E>I&&E<S){return{seriesIndex:W.index,pointIndex:ac,gridData:[n.x,n.y],data:W.data[ac]}}}}break;case e.jqplot.PieRenderer:H=W.startAngle/180*Math.PI;R=n.x-W._center[0];Q=n.y-W._center[1];X=Math.sqrt(Math.pow(R,2)+Math.pow(Q,2));if(R>0&&-Q>=0){E=2*Math.PI-Math.atan(-Q/R)}else{if(R>0&&-Q<0){E=-Math.atan(-Q/R)}else{if(R<0){E=Math.PI-Math.atan(-Q/R)}else{if(R==0&&-Q>0){E=3*Math.PI/2}else{if(R==0&&-Q<0){E=Math.PI/2}else{if(R==0&&Q==0){E=0}}}}}}if(H){E-=H;if(E<0){E+=2*Math.PI}else{if(E>2*Math.PI){E-=2*Math.PI}}}C=W.sliceMargin/180*Math.PI;if(X<W._radius){for(ac=0;ac<W.gridData.length;ac++){I=(ac>0)?W.gridData[ac-1][1]+C:C; S=W.gridData[ac][1];if(E>I&&E<S){return{seriesIndex:W.index,pointIndex:ac,gridData:[n.x,n.y],data:W.data[ac]}}}}break;case e.jqplot.BubbleRenderer:R=n.x;Q=n.y;var N=null;if(W.show){for(var ac=0;ac<W.gridData.length;ac++){Y=W.gridData[ac];af=Math.sqrt((R-Y[0])*(R-Y[0])+(Q-Y[1])*(Q-Y[1]));if(af<=Y[2]&&(af<=aa||aa==null)){aa=af;N={seriesIndex:ae,pointIndex:ac,gridData:Y,data:W.data[ac]}}}if(N!=null){return N}}break;case e.jqplot.FunnelRenderer:R=n.x;Q=n.y;var T=W._vertices,w=T[0],u=T[T.length-1],B,M,G;function Z(s,v,t){var r=(v[1]-t[1])/(v[0]-t[0]);var p=v[1]-r*v[0];var x=s+v[1];return[(x-p)/r,x]}B=Z(Q,w[0],u[3]);M=Z(Q,w[1],u[2]);for(ac=0;ac<T.length;ac++){G=T[ac];if(Q>=G[0][1]&&Q<=G[3][1]&&R>=B[0]&&R<=M[0]){return{seriesIndex:W.index,pointIndex:ac,gridData:null,data:W.data[ac]}}}break;case e.jqplot.LineRenderer:R=n.x;Q=n.y;X=W.renderer;if(W.show){if((W.fill||(W.renderer.bands.show&&W.renderer.bands.fill))&&(!o.plugins.highlighter||!o.plugins.highlighter.show)){var F=false;if(R>W._boundingBox[0][0]&&R<W._boundingBox[1][0]&&Q>W._boundingBox[1][1]&&Q<W._boundingBox[0][1]){var L=W._areaPoints.length; var O;var ac=L-1;for(var O=0;O<L;O++){var K=[W._areaPoints[O][0],W._areaPoints[O][1]];var J=[W._areaPoints[ac][0],W._areaPoints[ac][1]];if(K[1]<Q&&J[1]>=Q||J[1]<Q&&K[1]>=Q){if(K[0]+(Q-K[1])/(J[1]-K[1])*(J[0]-K[0])<R){F=!F}}ac=O}}if(F){return{seriesIndex:ae,pointIndex:null,gridData:W.gridData,data:W.data,points:W._areaPoints}}break}else{V=W.markerRenderer.size/2+W.neighborThreshold;q=(V>0)?V:0;for(var ac=0;ac<W.gridData.length;ac++){Y=W.gridData[ac];if(X.constructor==e.jqplot.OHLCRenderer){if(X.candleStick){var D=W._yaxis.series_u2p;if(R>=Y[0]-X._bodyWidth/2&&R<=Y[0]+X._bodyWidth/2&&Q>=D(W.data[ac][2])&&Q<=D(W.data[ac][3])){return{seriesIndex:ae,pointIndex:ac,gridData:Y,data:W.data[ac]}}}else{if(!X.hlc){var D=W._yaxis.series_u2p;if(R>=Y[0]-X._tickLength&&R<=Y[0]+X._tickLength&&Q>=D(W.data[ac][2])&&Q<=D(W.data[ac][3])){return{seriesIndex:ae,pointIndex:ac,gridData:Y,data:W.data[ac]}}}else{var D=W._yaxis.series_u2p;if(R>=Y[0]-X._tickLength&&R<=Y[0]+X._tickLength&&Q>=D(W.data[ac][1])&&Q<=D(W.data[ac][2])){return{seriesIndex:ae,pointIndex:ac,gridData:Y,data:W.data[ac]} }}}}else{if(Y[0]!=null&&Y[1]!=null){af=Math.sqrt((R-Y[0])*(R-Y[0])+(Q-Y[1])*(Q-Y[1]));if(af<=q&&(af<=aa||aa==null)){aa=af;return{seriesIndex:ae,pointIndex:ac,gridData:Y,data:W.data[ac]}}}}}}}break;default:R=n.x;Q=n.y;X=W.renderer;if(W.show){V=W.markerRenderer.size/2+W.neighborThreshold;q=(V>0)?V:0;for(var ac=0;ac<W.gridData.length;ac++){Y=W.gridData[ac];if(X.constructor==e.jqplot.OHLCRenderer){if(X.candleStick){var D=W._yaxis.series_u2p;if(R>=Y[0]-X._bodyWidth/2&&R<=Y[0]+X._bodyWidth/2&&Q>=D(W.data[ac][2])&&Q<=D(W.data[ac][3])){return{seriesIndex:ae,pointIndex:ac,gridData:Y,data:W.data[ac]}}}else{if(!X.hlc){var D=W._yaxis.series_u2p;if(R>=Y[0]-X._tickLength&&R<=Y[0]+X._tickLength&&Q>=D(W.data[ac][2])&&Q<=D(W.data[ac][3])){return{seriesIndex:ae,pointIndex:ac,gridData:Y,data:W.data[ac]}}}else{var D=W._yaxis.series_u2p;if(R>=Y[0]-X._tickLength&&R<=Y[0]+X._tickLength&&Q>=D(W.data[ac][1])&&Q<=D(W.data[ac][2])){return{seriesIndex:ae,pointIndex:ac,gridData:Y,data:W.data[ac]}}}}}else{af=Math.sqrt((R-Y[0])*(R-Y[0])+(Q-Y[1])*(Q-Y[1])); if(af<=q&&(af<=aa||aa==null)){aa=af;return{seriesIndex:ae,pointIndex:ac,gridData:Y,data:W.data[ac]}}}}}break}}return null}this.onClick=function(q){var o=k(q);var s=q.data.plot;var r=m(o.gridPos,s);var n=e.Event("jqplotClick");n.pageX=q.pageX;n.pageY=q.pageY;e(this).trigger(n,[o.gridPos,o.dataPos,r,s])};this.onDblClick=function(q){var o=k(q);var s=q.data.plot;var r=m(o.gridPos,s);var n=e.Event("jqplotDblClick");n.pageX=q.pageX;n.pageY=q.pageY;e(this).trigger(n,[o.gridPos,o.dataPos,r,s])};this.onMouseDown=function(q){var o=k(q);var s=q.data.plot;var r=m(o.gridPos,s);var n=e.Event("jqplotMouseDown");n.pageX=q.pageX;n.pageY=q.pageY;e(this).trigger(n,[o.gridPos,o.dataPos,r,s])};this.onMouseUp=function(p){var o=k(p);var n=e.Event("jqplotMouseUp");n.pageX=p.pageX;n.pageY=p.pageY;e(this).trigger(n,[o.gridPos,o.dataPos,null,p.data.plot])};this.onRightClick=function(q){var o=k(q);var s=q.data.plot;var r=m(o.gridPos,s);if(s.captureRightClick){if(q.which==3){var n=e.Event("jqplotRightClick");n.pageX=q.pageX; n.pageY=q.pageY;e(this).trigger(n,[o.gridPos,o.dataPos,r,s])}else{var n=e.Event("jqplotMouseUp");n.pageX=q.pageX;n.pageY=q.pageY;e(this).trigger(n,[o.gridPos,o.dataPos,r,s])}}};this.onMouseMove=function(q){var o=k(q);var s=q.data.plot;var r=m(o.gridPos,s);var n=e.Event("jqplotMouseMove");n.pageX=q.pageX;n.pageY=q.pageY;e(this).trigger(n,[o.gridPos,o.dataPos,r,s])};this.onMouseEnter=function(q){var o=k(q);var r=q.data.plot;var n=e.Event("jqplotMouseEnter");n.pageX=q.pageX;n.pageY=q.pageY;n.relatedTarget=q.relatedTarget;e(this).trigger(n,[o.gridPos,o.dataPos,null,r])};this.onMouseLeave=function(q){var o=k(q);var r=q.data.plot;var n=e.Event("jqplotMouseLeave");n.pageX=q.pageX;n.pageY=q.pageY;n.relatedTarget=q.relatedTarget;e(this).trigger(n,[o.gridPos,o.dataPos,null,r])};this.drawSeries=function(p,n){var r,q,o;n=(typeof(p)==="number"&&n==null)?p:n;p=(typeof(p)==="object")?p:{};if(n!=b){q=this.series[n];o=q.shadowCanvas._ctx;o.clearRect(0,0,o.canvas.width,o.canvas.height);q.drawShadow(o,p,this); o=q.canvas._ctx;o.clearRect(0,0,o.canvas.width,o.canvas.height);q.draw(o,p,this);if(q.renderer.constructor==e.jqplot.BezierCurveRenderer){if(n<this.series.length-1){this.drawSeries(n+1)}}}else{for(r=0;r<this.series.length;r++){q=this.series[r];o=q.shadowCanvas._ctx;o.clearRect(0,0,o.canvas.width,o.canvas.height);q.drawShadow(o,p,this);o=q.canvas._ctx;o.clearRect(0,0,o.canvas.width,o.canvas.height);q.draw(o,p,this)}}p=n=r=q=o=null};this.moveSeriesToFront=function(o){o=parseInt(o,10);var r=e.inArray(o,this.seriesStack);if(r==-1){return}if(r==this.seriesStack.length-1){this.previousSeriesStack=this.seriesStack.slice(0);return}var n=this.seriesStack[this.seriesStack.length-1];var q=this.series[o].canvas._elem.detach();var p=this.series[o].shadowCanvas._elem.detach();this.series[n].shadowCanvas._elem.after(p);this.series[n].canvas._elem.after(q);this.previousSeriesStack=this.seriesStack.slice(0);this.seriesStack.splice(r,1);this.seriesStack.push(o)};this.moveSeriesToBack=function(o){o=parseInt(o,10); var r=e.inArray(o,this.seriesStack);if(r==0||r==-1){return}var n=this.seriesStack[0];var q=this.series[o].canvas._elem.detach();var p=this.series[o].shadowCanvas._elem.detach();this.series[n].shadowCanvas._elem.before(p);this.series[n].canvas._elem.before(q);this.previousSeriesStack=this.seriesStack.slice(0);this.seriesStack.splice(r,1);this.seriesStack.unshift(o)};this.restorePreviousSeriesOrder=function(){var t,s,r,q,p,n,o;if(this.seriesStack==this.previousSeriesStack){return}for(t=1;t<this.previousSeriesStack.length;t++){n=this.previousSeriesStack[t];o=this.previousSeriesStack[t-1];r=this.series[n].canvas._elem.detach();q=this.series[n].shadowCanvas._elem.detach();this.series[o].shadowCanvas._elem.after(q);this.series[o].canvas._elem.after(r)}p=this.seriesStack.slice(0);this.seriesStack=this.previousSeriesStack.slice(0);this.previousSeriesStack=p};this.restoreOriginalSeriesOrder=function(){var r,q,n=[],p,o;for(r=0;r<this.series.length;r++){n.push(r)}if(this.seriesStack==n){return}this.previousSeriesStack=this.seriesStack.slice(0); this.seriesStack=n;for(r=1;r<this.seriesStack.length;r++){p=this.series[r].canvas._elem.detach();o=this.series[r].shadowCanvas._elem.detach();this.series[r-1].shadowCanvas._elem.after(o);this.series[r-1].canvas._elem.after(p)}};this.activateTheme=function(n){this.themeEngine.activate(this,n)}}e.jqplot.computeHighlightColors=function(l){var n;if(e.isArray(l)){n=[];for(var p=0;p<l.length;p++){var o=e.jqplot.getColorComponents(l[p]);var k=[o[0],o[1],o[2]];var q=k[0]+k[1]+k[2];for(var m=0;m<3;m++){k[m]=(q>660)?k[m]*0.85:0.73*k[m]+90;k[m]=parseInt(k[m],10);(k[m]>255)?255:k[m]}k[3]=0.3+0.35*o[3];n.push("rgba("+k[0]+","+k[1]+","+k[2]+","+k[3]+")")}}else{var o=e.jqplot.getColorComponents(l);var k=[o[0],o[1],o[2]];var q=k[0]+k[1]+k[2];for(var m=0;m<3;m++){k[m]=(q>660)?k[m]*0.85:0.73*k[m]+90;k[m]=parseInt(k[m],10);(k[m]>255)?255:k[m]}k[3]=0.3+0.35*o[3];n="rgba("+k[0]+","+k[1]+","+k[2]+","+k[3]+")"}return n};e.jqplot.ColorGenerator=function(k){k=k||e.jqplot.config.defaultColors;var j=0;this.next=function(){if(j<k.length){return k[j++] }else{j=0;return k[j++]}};this.previous=function(){if(j>0){return k[j--]}else{j=k.length-1;return k[j]}};this.get=function(m){var l=m-k.length*Math.floor(m/k.length);return k[l]};this.setColors=function(l){k=l};this.reset=function(){j=0};this.getIndex=function(){return j};this.setIndex=function(l){j=l}};e.jqplot.hex2rgb=function(l,j){l=l.replace("#","");if(l.length==3){l=l.charAt(0)+l.charAt(0)+l.charAt(1)+l.charAt(1)+l.charAt(2)+l.charAt(2)}var k;k="rgba("+parseInt(l.slice(0,2),16)+", "+parseInt(l.slice(2,4),16)+", "+parseInt(l.slice(4,6),16);if(j){k+=", "+j}k+=")";return k};e.jqplot.rgb2hex=function(p){var l=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *(?:, *[0-9.]*)?\)/;var j=p.match(l);var o="#";for(var n=1;n<4;n++){var k;if(j[n].search(/%/)!=-1){k=parseInt(255*j[n]/100,10).toString(16);if(k.length==1){k="0"+k}}else{k=parseInt(j[n],10).toString(16);if(k.length==1){k="0"+k}}o+=k}return o};e.jqplot.normalize2rgb=function(k,j){if(k.search(/^ *rgba?\(/)!=-1){return k }else{if(k.search(/^ *#?[0-9a-fA-F]?[0-9a-fA-F]/)!=-1){return e.jqplot.hex2rgb(k,j)}else{throw new Error("Invalid color spec")}}};e.jqplot.getColorComponents=function(p){p=e.jqplot.colorKeywordMap[p]||p;var n=e.jqplot.normalize2rgb(p);var l=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *,? *([0-9.]* *)?\)/;var j=n.match(l);var k=[];for(var o=1;o<4;o++){if(j[o].search(/%/)!=-1){k[o-1]=parseInt(255*j[o]/100,10)}else{k[o-1]=parseInt(j[o],10)}}k[3]=parseFloat(j[4])?parseFloat(j[4]):1;return k};e.jqplot.colorKeywordMap={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb( 0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb( 0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb( 0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb( 95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(220, 20, 60)",cyan:"rgb( 0, 255, 255)",darkblue:"rgb( 0, 0, 139)",darkcyan:"rgb( 0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgreen:"rgb( 0, 100, 0)",darkgrey:"rgb(169, 169, 169)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb( 85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb( 72, 61, 139)",darkslategray:"rgb( 47, 79, 79)",darkslategrey:"rgb( 47, 79, 79)",darkturquoise:"rgb( 0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb( 0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb( 30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb( 34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb( 0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb( 75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgray:"rgb(211, 211, 211)",lightgreen:"rgb(144, 238, 144)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb( 32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb( 0, 255, 0)",limegreen:"rgb( 50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb( 0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb( 60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb( 0, 250, 154)",mediumturquoise:"rgb( 72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb( 25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb( 0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb( 65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb( 46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb( 0, 255, 127)",steelblue:"rgb( 70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb( 0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb( 64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)"} })(jQuery);(function(a){a.jqplot.LinearAxisRenderer=function(){};a.jqplot.LinearAxisRenderer.prototype.init=function(b){this.breakPoints=null;this.breakTickLabel="≈";this.drawBaseline=true;this.baselineWidth=null;this.baselineColor=null;this.forceTickAt0=false;this.forceTickAt100=false;this.tickInset=0;this.minorTicks=0;this.alignTicks=false;this._autoFormatString="";this._overrideFormatString=false;this._scalefact=1;a.extend(true,this,b);if(this.breakPoints){if(!a.isArray(this.breakPoints)){this.breakPoints=null}else{if(this.breakPoints.length<2||this.breakPoints[1]<=this.breakPoints[0]){this.breakPoints=null}}}if(this.numberTicks!=null&&this.numberTicks<2){this.numberTicks=2}this.resetDataBounds()};a.jqplot.LinearAxisRenderer.prototype.draw=function(b,j){if(this.show){this.renderer.createTicks.call(this,j);var h=0;var c;if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=a(document.createElement("div"));this._elem.addClass("jqplot-axis jqplot-"+this.name);this._elem.css("position","absolute"); if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){var g=this._label.draw(b,j);g.appendTo(this._elem);g=null}var f=this._ticks;var e;for(var d=0;d<f.length;d++){e=f[d];if(e.show&&e.showLabel&&(!e.isMinorTick||this.showMinorTicks)){this._elem.append(e.draw(b,j))}}e=null;f=null}return this._elem};a.jqplot.LinearAxisRenderer.prototype.reset=function(){this.min=this._options.min;this.max=this._options.max;this.tickInterval=this._options.tickInterval;this.numberTicks=this._options.numberTicks;this._autoFormatString="";if(this._overrideFormatString&&this.tickOptions&&this.tickOptions.formatString){this.tickOptions.formatString=""}};a.jqplot.LinearAxisRenderer.prototype.set=function(){var k=0;var d;var c=0;var j=0;var b=(this._label==null)?false:this._label.show;if(this.show){var g=this._ticks;var f; for(var e=0;e<g.length;e++){f=g[e];if(!f._breakTick&&f.show&&f.showLabel&&(!f.isMinorTick||this.showMinorTicks)){if(this.name=="xaxis"||this.name=="x2axis"){d=f._elem.outerHeight(true)}else{d=f._elem.outerWidth(true)}if(d>k){k=d}}}f=null;g=null;if(b){c=this._label._elem.outerWidth(true);j=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){k=k+j;this._elem.css({height:k+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){k=k+j;this._elem.css({height:k+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){k=k+c;this._elem.css({width:k+"px",left:"0px",top:"0px"});if(b&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",c+"px")}}else{k=k+c;this._elem.css({width:k+"px",right:"0px",top:"0px"});if(b&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",c+"px")}}}}}};a.jqplot.LinearAxisRenderer.prototype.createTicks=function(d){var S=this._ticks;var J=this.ticks;var y=this.name;var A=this._dataBounds;var b=(this.name.charAt(0)==="x")?this._plotDimensions.width:this._plotDimensions.height; var h;var af,H;var l,k;var ad,Z;var G=this.min;var ae=this.max;var V=this.numberTicks;var aj=this.tickInterval;var g=30;this._scalefact=(Math.max(b,g+1)-g)/300;if(J.length){for(Z=0;Z<J.length;Z++){var N=J[Z];var T=new this.tickRenderer(this.tickOptions);if(a.isArray(N)){T.value=N[0];if(this.breakPoints){if(N[0]==this.breakPoints[0]){T.label=this.breakTickLabel;T._breakTick=true;T.showGridline=false;T.showMark=false}else{if(N[0]>this.breakPoints[0]&&N[0]<=this.breakPoints[1]){T.show=false;T.showGridline=false;T.label=N[1]}else{T.label=N[1]}}}else{T.label=N[1]}T.setTick(N[0],this.name);this._ticks.push(T)}else{if(a.isPlainObject(N)){a.extend(true,T,N);T.axis=this.name;this._ticks.push(T)}else{T.value=N;if(this.breakPoints){if(N==this.breakPoints[0]){T.label=this.breakTickLabel;T._breakTick=true;T.showGridline=false;T.showMark=false}else{if(N>this.breakPoints[0]&&N<=this.breakPoints[1]){T.show=false;T.showGridline=false}}}T.setTick(N,this.name);this._ticks.push(T)}}}this.numberTicks=J.length; this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.tickInterval=(this.max-this.min)/(this.numberTicks-1)}else{if(y=="xaxis"||y=="x2axis"){b=this._plotDimensions.width}else{b=this._plotDimensions.height}var w=this.numberTicks;if(this.alignTicks){if(this.name==="x2axis"&&d.axes.xaxis.show){w=d.axes.xaxis.numberTicks}else{if(this.name.charAt(0)==="y"&&this.name!=="yaxis"&&this.name!=="yMidAxis"&&d.axes.yaxis.show){w=d.axes.yaxis.numberTicks}}}af=((this.min!=null)?this.min:A.min);H=((this.max!=null)?this.max:A.max);var u=H-af;var R,x;var q;if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}if(this.min==null||this.max==null&&this.tickInterval==null&&!this.autoscale){if(this.forceTickAt0){if(af>0){af=0}if(H<0){H=0}}if(this.forceTickAt100){if(af>100){af=100}if(H<100){H=100}}var D=false,aa=false;if(this.min!=null){D=true}else{if(this.max!=null){aa=true}}var O=a.jqplot.LinearTickGenerator(af,H,this._scalefact,w,D,aa);var v=(this.min!=null)?af:af+u*(this.padMin-1); var P=(this.max!=null)?H:H-u*(this.padMax-1);if(af<v||H>P){v=(this.min!=null)?af:af-u*(this.padMin-1);P=(this.max!=null)?H:H+u*(this.padMax-1);O=a.jqplot.LinearTickGenerator(v,P,this._scalefact,w,D,aa)}this.min=O[0];this.max=O[1];this.numberTicks=O[2];this._autoFormatString=O[3];this.tickInterval=O[4]}else{if(af==H){var c=0.05;if(af>0){c=Math.max(Math.log(af)/Math.LN10,0.05)}af-=c;H+=c}if(this.autoscale&&this.min==null&&this.max==null){var e,f,p;var B=false;var M=false;var z={min:null,max:null,average:null,stddev:null};for(var Z=0;Z<this._series.length;Z++){var U=this._series[Z];var C=(U.fillAxis=="x")?U._xaxis.name:U._yaxis.name;if(this.name==C){var Q=U._plotValues[U.fillAxis];var F=Q[0];var ab=Q[0];for(var Y=1;Y<Q.length;Y++){if(Q[Y]<F){F=Q[Y]}else{if(Q[Y]>ab){ab=Q[Y]}}}var r=(ab-F)/ab;if(U.renderer.constructor==a.jqplot.BarRenderer){if(F>=0&&(U.fillToZero||r>0.1)){B=true}else{B=false;if(U.fill&&U.fillToZero&&F<0&&ab>0){M=true}else{M=false}}}else{if(U.fill){if(F>=0&&(U.fillToZero||r>0.1)){B=true }else{if(F<0&&ab>0&&U.fillToZero){B=false;M=true}else{B=false;M=false}}}else{if(F<0){B=false}}}}}if(B){this.numberTicks=2+Math.ceil((b-(this.tickSpacing-1))/this.tickSpacing);this.min=0;G=0;f=H/(this.numberTicks-1);q=Math.pow(10,Math.abs(Math.floor(Math.log(f)/Math.LN10)));if(f/q==parseInt(f/q,10)){f+=q}this.tickInterval=Math.ceil(f/q)*q;this.max=this.tickInterval*(this.numberTicks-1)}else{if(M){this.numberTicks=2+Math.ceil((b-(this.tickSpacing-1))/this.tickSpacing);var I=Math.ceil(Math.abs(af)/u*(this.numberTicks-1));var ai=this.numberTicks-1-I;f=Math.max(Math.abs(af/I),Math.abs(H/ai));q=Math.pow(10,Math.abs(Math.floor(Math.log(f)/Math.LN10)));this.tickInterval=Math.ceil(f/q)*q;this.max=this.tickInterval*ai;this.min=-this.tickInterval*I}else{if(this.numberTicks==null){if(this.tickInterval){this.numberTicks=3+Math.ceil(u/this.tickInterval)}else{this.numberTicks=2+Math.ceil((b-(this.tickSpacing-1))/this.tickSpacing)}}if(this.tickInterval==null){f=u/(this.numberTicks-1);if(f<1){q=Math.pow(10,Math.abs(Math.floor(Math.log(f)/Math.LN10))) }else{q=1}this.tickInterval=Math.ceil(f*q*this.pad)/q}else{q=1/this.tickInterval}e=this.tickInterval*(this.numberTicks-1);p=(e-u)/2;if(this.min==null){this.min=Math.floor(q*(af-p))/q}if(this.max==null){this.max=this.min+e}}}var E=a.jqplot.getSignificantFigures(this.tickInterval);var L;if(E.digitsLeft>=E.significantDigits){L="%d"}else{var q=Math.max(0,5-E.digitsLeft);q=Math.min(q,E.digitsRight);L="%."+q+"f"}this._autoFormatString=L}else{R=(this.min!=null)?this.min:af-u*(this.padMin-1);x=(this.max!=null)?this.max:H+u*(this.padMax-1);u=x-R;if(this.numberTicks==null){if(this.tickInterval!=null){this.numberTicks=Math.ceil((x-R)/this.tickInterval)+1}else{if(b>100){this.numberTicks=parseInt(3+(b-100)/75,10)}else{this.numberTicks=2}}}if(this.tickInterval==null){this.tickInterval=u/(this.numberTicks-1)}if(this.max==null){x=R+this.tickInterval*(this.numberTicks-1)}if(this.min==null){R=x-this.tickInterval*(this.numberTicks-1)}var E=a.jqplot.getSignificantFigures(this.tickInterval);var L;if(E.digitsLeft>=E.significantDigits){L="%d" }else{var q=Math.max(0,5-E.digitsLeft);q=Math.min(q,E.digitsRight);L="%."+q+"f"}this._autoFormatString=L;this.min=R;this.max=x}if(this.renderer.constructor==a.jqplot.LinearAxisRenderer&&this._autoFormatString==""){u=this.max-this.min;var ag=new this.tickRenderer(this.tickOptions);var K=ag.formatString||a.jqplot.config.defaultTickFormatString;var K=K.match(a.jqplot.sprintf.regex)[0];var ac=0;if(K){if(K.search(/[fFeEgGpP]/)>-1){var X=K.match(/\%\.(\d{0,})?[eEfFgGpP]/);if(X){ac=parseInt(X[1],10)}else{ac=6}}else{if(K.search(/[di]/)>-1){ac=0}}var o=Math.pow(10,-ac);if(this.tickInterval<o){if(V==null&&aj==null){this.tickInterval=o;if(ae==null&&G==null){this.min=Math.floor(this._dataBounds.min/o)*o;if(this.min==this._dataBounds.min){this.min=this._dataBounds.min-this.tickInterval}this.max=Math.ceil(this._dataBounds.max/o)*o;if(this.max==this._dataBounds.max){this.max=this._dataBounds.max+this.tickInterval}var W=(this.max-this.min)/this.tickInterval;W=W.toFixed(11);W=Math.ceil(W);this.numberTicks=W+1 }else{if(ae==null){var W=(this._dataBounds.max-this.min)/this.tickInterval;W=W.toFixed(11);this.numberTicks=Math.ceil(W)+2;this.max=this.min+this.tickInterval*(this.numberTicks-1)}else{if(G==null){var W=(this.max-this._dataBounds.min)/this.tickInterval;W=W.toFixed(11);this.numberTicks=Math.ceil(W)+2;this.min=this.max-this.tickInterval*(this.numberTicks-1)}else{this.numberTicks=Math.ceil((ae-G)/this.tickInterval)+1;this.min=Math.floor(G*Math.pow(10,ac))/Math.pow(10,ac);this.max=Math.ceil(ae*Math.pow(10,ac))/Math.pow(10,ac);this.numberTicks=Math.ceil((this.max-this.min)/this.tickInterval)+1}}}}}}}}if(this._overrideFormatString&&this._autoFormatString!=""){this.tickOptions=this.tickOptions||{};this.tickOptions.formatString=this._autoFormatString}var T,ah;for(var Z=0;Z<this.numberTicks;Z++){ad=this.min+Z*this.tickInterval;T=new this.tickRenderer(this.tickOptions);T.setTick(ad,this.name);this._ticks.push(T);if(Z<this.numberTicks-1){for(var Y=0;Y<this.minorTicks;Y++){ad+=this.tickInterval/(this.minorTicks+1); ah=a.extend(true,{},this.tickOptions,{name:this.name,value:ad,label:"",isMinorTick:true});T=new this.tickRenderer(ah);this._ticks.push(T)}}T=null}}if(this.tickInset){this.min=this.min-this.tickInset*this.tickInterval;this.max=this.max+this.tickInset*this.tickInterval}S=null};a.jqplot.LinearAxisRenderer.prototype.resetTickValues=function(d){if(a.isArray(d)&&d.length==this._ticks.length){var c;for(var b=0;b<d.length;b++){c=this._ticks[b];c.value=d[b];c.label=c.formatter(c.formatString,d[b]);c.label=c.prefix+c.label;c._elem.html(c.label)}c=null;this.min=a.jqplot.arrayMin(d);this.max=a.jqplot.arrayMax(d);this.pack()}};a.jqplot.LinearAxisRenderer.prototype.pack=function(d,c){d=d||{};c=c||this._offsets;var v=this._ticks;var q=this.max;var o=this.min;var k=c.max;var g=c.min;var m=(this._label==null)?false:this._label.show;for(var n in d){this._elem.css(n,d[n])}this._offsets=c;var e=k-g;var f=q-o;if(this.breakPoints){f=f-this.breakPoints[1]+this.breakPoints[0];this.p2u=function(h){return(h-g)*f/e+o };this.u2p=function(h){if(h>this.breakPoints[0]&&h<this.breakPoints[1]){h=this.breakPoints[0]}if(h<=this.breakPoints[0]){return(h-o)*e/f+g}else{return(h-this.breakPoints[1]+this.breakPoints[0]-o)*e/f+g}};if(this.name.charAt(0)=="x"){this.series_u2p=function(h){if(h>this.breakPoints[0]&&h<this.breakPoints[1]){h=this.breakPoints[0]}if(h<=this.breakPoints[0]){return(h-o)*e/f}else{return(h-this.breakPoints[1]+this.breakPoints[0]-o)*e/f}};this.series_p2u=function(h){return h*f/e+o}}else{this.series_u2p=function(h){if(h>this.breakPoints[0]&&h<this.breakPoints[1]){h=this.breakPoints[0]}if(h>=this.breakPoints[1]){return(h-q)*e/f}else{return(h+this.breakPoints[1]-this.breakPoints[0]-q)*e/f}};this.series_p2u=function(h){return h*f/e+q}}}else{this.p2u=function(h){return(h-g)*f/e+o};this.u2p=function(h){return(h-o)*e/f+g};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(h){return(h-o)*e/f};this.series_p2u=function(h){return h*f/e+o}}else{this.series_u2p=function(h){return(h-q)*e/f };this.series_p2u=function(h){return h*f/e+q}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(var r=0;r<v.length;r++){var l=v[r];if(l.show&&l.showLabel){var b;if(l.constructor==a.jqplot.CanvasAxisTickRenderer&&l.angle){var u=(this.name=="xaxis")?1:-1;switch(l.labelPosition){case"auto":if(u*l.angle<0){b=-l.getWidth()+l._textRenderer.height*Math.sin(-l._textRenderer.angle)/2}else{b=-l._textRenderer.height*Math.sin(l._textRenderer.angle)/2}break;case"end":b=-l.getWidth()+l._textRenderer.height*Math.sin(-l._textRenderer.angle)/2;break;case"start":b=-l._textRenderer.height*Math.sin(l._textRenderer.angle)/2;break;case"middle":b=-l.getWidth()/2+l._textRenderer.height*Math.sin(-l._textRenderer.angle)/2;break;default:b=-l.getWidth()/2+l._textRenderer.height*Math.sin(-l._textRenderer.angle)/2;break}}else{b=-l.getWidth()/2}var x=this.u2p(l.value)+b+"px";l._elem.css("left",x);l.pack()}}if(m){var j=this._label._elem.outerWidth(true);this._label._elem.css("left",g+e/2-j/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px") }else{this._label._elem.css("top","0px")}this._label.pack()}}else{for(var r=0;r<v.length;r++){var l=v[r];if(l.show&&l.showLabel){var b;if(l.constructor==a.jqplot.CanvasAxisTickRenderer&&l.angle){var u=(this.name=="yaxis")?1:-1;switch(l.labelPosition){case"auto":case"end":if(u*l.angle<0){b=-l._textRenderer.height*Math.cos(-l._textRenderer.angle)/2}else{b=-l.getHeight()+l._textRenderer.height*Math.cos(l._textRenderer.angle)/2}break;case"start":if(l.angle>0){b=-l._textRenderer.height*Math.cos(-l._textRenderer.angle)/2}else{b=-l.getHeight()+l._textRenderer.height*Math.cos(l._textRenderer.angle)/2}break;case"middle":b=-l.getHeight()/2;break;default:b=-l.getHeight()/2;break}}else{b=-l.getHeight()/2}var x=this.u2p(l.value)+b+"px";l._elem.css("top",x);l.pack()}}if(m){var s=this._label._elem.outerHeight(true);this._label._elem.css("top",k-e/2-s/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}v=null}})(jQuery);(function(a){a.jqplot.AxisTickRenderer=function(b){a.jqplot.ElemContainer.call(this); this.mark="outside";this.axis;this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.size=4;this.markSize=6;this.show=true;this.showLabel=true;this.label=null;this.value=null;this._styles={};this.formatter=a.jqplot.DefaultTickFormatter;this.prefix="";this.suffix="";this.formatString="";this.fontFamily;this.fontSize;this.textColor;this.escapeHTML=false;this._elem;this._breakTick=false;a.extend(true,this,b)};a.jqplot.AxisTickRenderer.prototype.init=function(b){a.extend(true,this,b)};a.jqplot.AxisTickRenderer.prototype=new a.jqplot.ElemContainer();a.jqplot.AxisTickRenderer.prototype.constructor=a.jqplot.AxisTickRenderer;a.jqplot.AxisTickRenderer.prototype.setTick=function(b,d,c){this.value=b;this.axis=d;if(c){this.isMinorTick=true}return this};a.jqplot.AxisTickRenderer.prototype.draw=function(){if(this.label===null){this.label=this.prefix+this.formatter(this.formatString,this.value)+this.suffix}var c={position:"absolute"};if(Number(this.label)){c.whitSpace="nowrap"}if(this._elem){this._elem.emptyForce(); this._elem=null}this._elem=a(document.createElement("div"));this._elem.addClass("jqplot-"+this.axis+"-tick");if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}this._elem.css(c);for(var b in this._styles){this._elem.css(b,this._styles[b])}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}if(this._breakTick){this._elem.addClass("jqplot-breakTick")}return this._elem};a.jqplot.DefaultTickFormatter=function(b,c){if(typeof c=="number"){if(!b){b=a.jqplot.config.defaultTickFormatString}return a.jqplot.sprintf(b,c)}else{return String(c)}};a.jqplot.PercentTickFormatter=function(b,c){if(typeof c=="number"){c=100*c;if(!b){b=a.jqplot.config.defaultTickFormatString}return a.jqplot.sprintf(b,c)}else{return String(c)}};a.jqplot.AxisTickRenderer.prototype.pack=function(){}})(jQuery);(function(a){a.jqplot.AxisLabelRenderer=function(b){a.jqplot.ElemContainer.call(this); this.axis;this.show=true;this.label="";this.fontFamily=null;this.fontSize=null;this.textColor=null;this._elem;this.escapeHTML=false;a.extend(true,this,b)};a.jqplot.AxisLabelRenderer.prototype=new a.jqplot.ElemContainer();a.jqplot.AxisLabelRenderer.prototype.constructor=a.jqplot.AxisLabelRenderer;a.jqplot.AxisLabelRenderer.prototype.init=function(b){a.extend(true,this,b)};a.jqplot.AxisLabelRenderer.prototype.draw=function(b,c){if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=a('<div style="position:absolute;" class="jqplot-'+this.axis+'-label"></div>');if(Number(this.label)){this._elem.css("white-space","nowrap")}if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}return this._elem};a.jqplot.AxisLabelRenderer.prototype.pack=function(){}})(jQuery);(function(a){a.jqplot.TableLegendRenderer=function(){}; a.jqplot.TableLegendRenderer.prototype.init=function(b){a.extend(true,this,b)};a.jqplot.TableLegendRenderer.prototype.addrow=function(k,e,b,i){var f=(b)?this.rowSpacing+"px":"0px";var j;var d;var c;var h;var g;c=document.createElement("tr");j=a(c);j.addClass("jqplot-table-legend");c=null;if(i){j.prependTo(this._elem)}else{j.appendTo(this._elem)}if(this.showSwatches){d=a(document.createElement("td"));d.addClass("jqplot-table-legend jqplot-table-legend-swatch");d.css({textAlign:"center",paddingTop:f});h=a(document.createElement("div"));h.addClass("jqplot-table-legend-swatch-outline");g=a(document.createElement("div"));g.addClass("jqplot-table-legend-swatch");g.css({backgroundColor:e,borderColor:e});j.append(d.append(h.append(g)))}if(this.showLabels){d=a(document.createElement("td"));d.addClass("jqplot-table-legend jqplot-table-legend-label");d.css("paddingTop",f);j.append(d);if(this.escapeHtml){d.text(k)}else{d.html(k)}}d=null;h=null;g=null;j=null;c=null};a.jqplot.TableLegendRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce(); this._elem=null}if(this.show){var g=this._series;var c=document.createElement("table");this._elem=a(c);this._elem.addClass("jqplot-table-legend");var n={position:"absolute"};if(this.background){n.background=this.background}if(this.border){n.border=this.border}if(this.fontSize){n.fontSize=this.fontSize}if(this.fontFamily){n.fontFamily=this.fontFamily}if(this.textColor){n.textColor=this.textColor}if(this.marginTop!=null){n.marginTop=this.marginTop}if(this.marginBottom!=null){n.marginBottom=this.marginBottom}if(this.marginLeft!=null){n.marginLeft=this.marginLeft}if(this.marginRight!=null){n.marginRight=this.marginRight}var b=false,k=false,m;for(var h=0;h<g.length;h++){m=g[h];if(m._stack||m.renderer.constructor==a.jqplot.BezierCurveRenderer){k=true}if(m.show&&m.showLabel){var f=this.labels[h]||m.label.toString();if(f){var d=m.color;if(k&&h<g.length-1){b=true}else{if(k&&h==g.length-1){b=false}}this.renderer.addrow.call(this,f,d,b,k);b=true}for(var e=0;e<a.jqplot.addLegendRowHooks.length;e++){var l=a.jqplot.addLegendRowHooks[e].call(this,m); if(l){this.renderer.addrow.call(this,l.label,l.color,b);b=true}}f=null}}}return this._elem};a.jqplot.TableLegendRenderer.prototype.pack=function(e){if(this.show){if(this.placement=="insideGrid"){switch(this.location){case"nw":var d=e.left;var c=e.top;this._elem.css("left",d);this._elem.css("top",c);break;case"n":var d=(e.left+(this._plotDimensions.width-e.right))/2-this.getWidth()/2;var c=e.top;this._elem.css("left",d);this._elem.css("top",c);break;case"ne":var d=e.right;var c=e.top;this._elem.css({right:d,top:c});break;case"e":var d=e.right;var c=(e.top+(this._plotDimensions.height-e.bottom))/2-this.getHeight()/2;this._elem.css({right:d,top:c});break;case"se":var d=e.right;var c=e.bottom;this._elem.css({right:d,bottom:c});break;case"s":var d=(e.left+(this._plotDimensions.width-e.right))/2-this.getWidth()/2;var c=e.bottom;this._elem.css({left:d,bottom:c});break;case"sw":var d=e.left;var c=e.bottom;this._elem.css({left:d,bottom:c});break;case"w":var d=e.left;var c=(e.top+(this._plotDimensions.height-e.bottom))/2-this.getHeight()/2; this._elem.css({left:d,top:c});break;default:var d=e.right;var c=e.bottom;this._elem.css({right:d,bottom:c});break}}else{if(this.placement=="outside"){switch(this.location){case"nw":var d=this._plotDimensions.width-e.left;var c=e.top;this._elem.css("right",d);this._elem.css("top",c);break;case"n":var d=(e.left+(this._plotDimensions.width-e.right))/2-this.getWidth()/2;var c=this._plotDimensions.height-e.top;this._elem.css("left",d);this._elem.css("bottom",c);break;case"ne":var d=this._plotDimensions.width-e.right;var c=e.top;this._elem.css({left:d,top:c});break;case"e":var d=this._plotDimensions.width-e.right;var c=(e.top+(this._plotDimensions.height-e.bottom))/2-this.getHeight()/2;this._elem.css({left:d,top:c});break;case"se":var d=this._plotDimensions.width-e.right;var c=e.bottom;this._elem.css({left:d,bottom:c});break;case"s":var d=(e.left+(this._plotDimensions.width-e.right))/2-this.getWidth()/2;var c=this._plotDimensions.height-e.bottom;this._elem.css({left:d,top:c});break;case"sw":var d=this._plotDimensions.width-e.left; var c=e.bottom;this._elem.css({right:d,bottom:c});break;case"w":var d=this._plotDimensions.width-e.left;var c=(e.top+(this._plotDimensions.height-e.bottom))/2-this.getHeight()/2;this._elem.css({right:d,top:c});break;default:var d=e.right;var c=e.bottom;this._elem.css({right:d,bottom:c});break}}else{switch(this.location){case"nw":this._elem.css({left:0,top:e.top});break;case"n":var d=(e.left+(this._plotDimensions.width-e.right))/2-this.getWidth()/2;this._elem.css({left:d,top:e.top});break;case"ne":this._elem.css({right:0,top:e.top});break;case"e":var c=(e.top+(this._plotDimensions.height-e.bottom))/2-this.getHeight()/2;this._elem.css({right:e.right,top:c});break;case"se":this._elem.css({right:e.right,bottom:e.bottom});break;case"s":var d=(e.left+(this._plotDimensions.width-e.right))/2-this.getWidth()/2;this._elem.css({left:d,bottom:e.bottom});break;case"sw":this._elem.css({left:e.left,bottom:e.bottom});break;case"w":var c=(e.top+(this._plotDimensions.height-e.bottom))/2-this.getHeight()/2; this._elem.css({left:e.left,top:c});break;default:this._elem.css({right:e.right,bottom:e.bottom});break}}}}}})(jQuery);(function(h){h.jqplot.LineRenderer=function(){this.shapeRenderer=new h.jqplot.ShapeRenderer();this.shadowRenderer=new h.jqplot.ShadowRenderer()};h.jqplot.LineRenderer.prototype.init=function(q,v){q=q||{};this._type="line";this.renderer.animation={show:false,direction:"left",speed:2500,_supported:true};this.renderer.smooth=false;this.renderer.tension=null;this.renderer.constrainSmoothing=true;this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];this.renderer.bandData=[];this.renderer.bands={show:false,hiData:[],lowData:[],color:this.color,showLines:false,fill:true,fillColor:null,_min:null,_max:null,interval:"3%"};var t={highlightMouseOver:q.highlightMouseOver,highlightMouseDown:q.highlightMouseDown,highlightColor:q.highlightColor}; delete (q.highlightMouseOver);delete (q.highlightMouseDown);delete (q.highlightColor);h.extend(true,this.renderer,q);this.renderer.options=q;if(this.renderer.bandData.length>1&&(!q.bands||q.bands.show==null)){this.renderer.bands.show=true}else{if(q.bands&&q.bands.show==null&&q.bands.interval!=null){this.renderer.bands.show=true}}if(this.fill){this.renderer.bands.show=false}if(this.renderer.bands.show){this.renderer.initBands.call(this,this.renderer.options,v)}if(this._stack){this.renderer.smooth=false}var u={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,strokeStyle:this.color,fillStyle:this.fillColor,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shapeRenderer.init(u);var r=q.shadowOffset;if(r==null){if(this.lineWidth>2.5){r=1.25*(1+(Math.atan((this.lineWidth/2.5))/0.785398163-1)*0.6)}else{r=1.25*Math.atan((this.lineWidth/2.5))/0.785398163}}var p={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,angle:this.shadowAngle,offset:r,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill}; this.renderer.shadowRenderer.init(p);this._areaPoints=[];this._boundingBox=[[],[]];if(!this.isTrendline&&this.fill||this.renderer.bands.show){this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColor=null;if(t.highlightMouseDown&&t.highlightMouseOver==null){t.highlightMouseOver=false}h.extend(true,this,{highlightMouseOver:t.highlightMouseOver,highlightMouseDown:t.highlightMouseDown,highlightColor:t.highlightColor});if(!this.highlightColor){var s=(this.renderer.bands.show)?this.renderer.bands.fillColor:this.fillColor;this.highlightColor=h.jqplot.computeHighlightColors(s)}if(this.highlighter){this.highlighter.show=false}}if(!this.isTrendline&&v){v.plugins.lineRenderer={};v.postInitHooks.addOnce(j);v.postDrawHooks.addOnce(l);v.eventListenerHooks.addOnce("jqplotMouseMove",b);v.eventListenerHooks.addOnce("jqplotMouseDown",a);v.eventListenerHooks.addOnce("jqplotMouseUp",n);v.eventListenerHooks.addOnce("jqplotClick",i);v.eventListenerHooks.addOnce("jqplotRightClick",o)}};h.jqplot.LineRenderer.prototype.initBands=function(t,D){var u=t.bandData||[]; var w=this.renderer.bands;w.hiData=[];w.lowData=[];var J=this.data;w._max=null;w._min=null;if(u.length==2){if(h.isArray(u[0][0])){var x;var q=0,A=0;for(var E=0,B=u[0].length;E<B;E++){x=u[0][E];if((x[1]!=null&&x[1]>w._max)||w._max==null){w._max=x[1]}if((x[1]!=null&&x[1]<w._min)||w._min==null){w._min=x[1]}}for(var E=0,B=u[1].length;E<B;E++){x=u[1][E];if((x[1]!=null&&x[1]>w._max)||w._max==null){w._max=x[1];A=1}if((x[1]!=null&&x[1]<w._min)||w._min==null){w._min=x[1];q=1}}if(A===q){w.show=false}w.hiData=u[A];w.lowData=u[q]}else{if(u[0].length===J.length&&u[1].length===J.length){var s=(u[0][0]>u[1][0])?0:1;var K=(s)?0:1;for(var E=0,B=J.length;E<B;E++){w.hiData.push([J[E][0],u[s][E]]);w.lowData.push([J[E][0],u[K][E]])}}else{w.show=false}}}else{if(u.length>2&&!h.isArray(u[0][0])){var s=(u[0][0]>u[0][1])?0:1;var K=(s)?0:1;for(var E=0,B=u.length;E<B;E++){w.hiData.push([J[E][0],u[E][s]]);w.lowData.push([J[E][0],u[E][K]])}}else{var z=w.interval;var I=null;var H=null;var r=null;var C=null;if(h.isArray(z)){I=z[0]; H=z[1]}else{I=z}if(isNaN(I)){if(I.charAt(I.length-1)==="%"){r="multiply";I=parseFloat(I)/100+1}}else{I=parseFloat(I);r="add"}if(H!==null&&isNaN(H)){if(H.charAt(H.length-1)==="%"){C="multiply";H=parseFloat(H)/100+1}}else{if(H!==null){H=parseFloat(H);C="add"}}if(I!==null){if(H===null){H=-I;C=r;if(C==="multiply"){H+=2}}if(I<H){var F=I;I=H;H=F;F=r;r=C;C=F}for(var E=0,B=J.length;E<B;E++){switch(r){case"add":w.hiData.push([J[E][0],J[E][1]+I]);break;case"multiply":w.hiData.push([J[E][0],J[E][1]*I]);break}switch(C){case"add":w.lowData.push([J[E][0],J[E][1]+H]);break;case"multiply":w.lowData.push([J[E][0],J[E][1]*H]);break}}}else{w.show=false}}}var v=w.hiData;var y=w.lowData;for(var E=0,B=v.length;E<B;E++){if((v[E][1]!=null&&v[E][1]>w._max)||w._max==null){w._max=v[E][1]}}for(var E=0,B=y.length;E<B;E++){if((y[E][1]!=null&&y[E][1]<w._min)||w._min==null){w._min=y[E][1]}}if(w.fillColor===null){var G=h.jqplot.getColorComponents(w.color);G[3]=G[3]*0.5;w.fillColor="rgba("+G[0]+", "+G[1]+", "+G[2]+", "+G[3]+")" }};function f(q,p){return(3.4182054+p)*Math.pow(q,-0.3534992)}function g(r,q){var p=Math.sqrt(Math.pow((q[0]-r[0]),2)+Math.pow((q[1]-r[1]),2));return 5.7648*Math.log(p)+7.4456}function c(p){var q=(Math.exp(2*p)-1)/(Math.exp(2*p)+1);return q}function e(U){var E=this.renderer.smooth;var O=this.canvas.getWidth();var v=this._xaxis.series_p2u;var R=this._yaxis.series_p2u;var Q=null;var u=null;var K=U.length/O;var r=[];var J=[];if(!isNaN(parseFloat(E))){Q=parseFloat(E)}else{Q=f(K,0.5)}var H=[];var s=[];for(var P=0,L=U.length;P<L;P++){H.push(U[P][1]);s.push(U[P][0])}function G(A,B){if(A-B==0){return Math.pow(10,10)}else{return A-B}}var I,z,y,x;var p=U.length-1;for(var t=1,M=U.length;t<M;t++){var q=[];var F=[];for(var N=0;N<2;N++){var P=t-1+N;if(P==0||P==p){q[N]=Math.pow(10,10)}else{if(H[P+1]-H[P]==0||H[P]-H[P-1]==0){q[N]=0}else{if(((s[P+1]-s[P])/(H[P+1]-H[P])+(s[P]-s[P-1])/(H[P]-H[P-1]))==0){q[N]=0}else{if((H[P+1]-H[P])*(H[P]-H[P-1])<0){q[N]=0}else{q[N]=2/(G(s[P+1],s[P])/(H[P+1]-H[P])+G(s[P],s[P-1])/(H[P]-H[P-1])) }}}}}if(t==1){q[0]=3/2*(H[1]-H[0])/G(s[1],s[0])-q[1]/2}else{if(t==p){q[1]=3/2*(H[p]-H[p-1])/G(s[p],s[p-1])-q[0]/2}}F[0]=-2*(q[1]+2*q[0])/G(s[t],s[t-1])+6*(H[t]-H[t-1])/Math.pow(G(s[t],s[t-1]),2);F[1]=2*(2*q[1]+q[0])/G(s[t],s[t-1])-6*(H[t]-H[t-1])/Math.pow(G(s[t],s[t-1]),2);x=1/6*(F[1]-F[0])/G(s[t],s[t-1]);y=1/2*(s[t]*F[0]-s[t-1]*F[1])/G(s[t],s[t-1]);z=(H[t]-H[t-1]-y*(Math.pow(s[t],2)-Math.pow(s[t-1],2))-x*(Math.pow(s[t],3)-Math.pow(s[t-1],3)))/G(s[t],s[t-1]);I=H[t-1]-z*s[t-1]-y*Math.pow(s[t-1],2)-x*Math.pow(s[t-1],3);var T=(s[t]-s[t-1])/Q;var S,w;for(var N=0,L=Q;N<L;N++){S=[];w=s[t-1]+N*T;S.push(w);S.push(I+z*w+y*Math.pow(w,2)+x*Math.pow(w,3));r.push(S);J.push([v(S[0]),R(S[1])])}}r.push(U[P]);J.push([v(U[P][0]),R(U[P][1])]);return[r,J]}function k(A){var z=this.renderer.smooth;var ae=this.renderer.tension;var q=this.canvas.getWidth();var R=this._xaxis.series_p2u;var B=this._yaxis.series_p2u;var S=null;var T=null;var ad=null;var Y=null;var W=null;var D=null;var ab=null;var x=null;var U,V,N,M,K,I; var v,r,F,E;var L,J,X;var G=[];var u=[];var w=A.length/q;var ac,H,P,Q,O;var C=[];var y=[];if(!isNaN(parseFloat(z))){S=parseFloat(z)}else{S=f(w,0.5)}if(!isNaN(parseFloat(ae))){ae=parseFloat(ae)}for(var aa=0,Z=A.length-1;aa<Z;aa++){if(ae===null){D=Math.abs((A[aa+1][1]-A[aa][1])/(A[aa+1][0]-A[aa][0]));ac=0.3;H=0.6;P=(H-ac)/2;Q=2.5;O=-1.4;x=D/Q+O;Y=P*c(x)-P*c(O)+ac;if(aa>0){ab=Math.abs((A[aa][1]-A[aa-1][1])/(A[aa][0]-A[aa-1][0]))}x=ab/Q+O;W=P*c(x)-P*c(O)+ac;ad=(Y+W)/2}else{ad=ae}for(U=0;U<S;U++){V=U/S;N=(1+2*V)*Math.pow((1-V),2);M=V*Math.pow((1-V),2);K=Math.pow(V,2)*(3-2*V);I=Math.pow(V,2)*(V-1);if(A[aa-1]){v=ad*(A[aa+1][0]-A[aa-1][0]);r=ad*(A[aa+1][1]-A[aa-1][1])}else{v=ad*(A[aa+1][0]-A[aa][0]);r=ad*(A[aa+1][1]-A[aa][1])}if(A[aa+2]){F=ad*(A[aa+2][0]-A[aa][0]);E=ad*(A[aa+2][1]-A[aa][1])}else{F=ad*(A[aa+1][0]-A[aa][0]);E=ad*(A[aa+1][1]-A[aa][1])}L=N*A[aa][0]+K*A[aa+1][0]+M*v+I*F;J=N*A[aa][1]+K*A[aa+1][1]+M*r+I*E;X=[L,J];C.push(X);y.push([R(L),B(J)])}}C.push(A[Z]);y.push([R(A[Z][0]),B(A[Z][1])]); return[C,y]}h.jqplot.LineRenderer.prototype.setGridData=function(x){var t=this._xaxis.series_u2p;var p=this._yaxis.series_u2p;var u=this._plotData;var y=this._prevPlotData;this.gridData=[];this._prevGridData=[];this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];var s=this.renderer.bands;var q=false;for(var v=0,r=u.length;v<r;v++){if(u[v][0]!=null&&u[v][1]!=null){this.gridData.push([t.call(this._xaxis,u[v][0]),p.call(this._yaxis,u[v][1])])}else{if(u[v][0]==null){q=true;this.gridData.push([null,p.call(this._yaxis,u[v][1])])}else{if(u[v][1]==null){q=true;this.gridData.push([t.call(this._xaxis,u[v][0]),null])}}}if(y[v]!=null&&y[v][0]!=null&&y[v][1]!=null){this._prevGridData.push([t.call(this._xaxis,y[v][0]),p.call(this._yaxis,y[v][1])])}else{if(y[v]!=null&&y[v][0]==null){this._prevGridData.push([null,p.call(this._yaxis,y[v][1])])}else{if(y[v]!=null&&y[v][0]!=null&&y[v][1]==null){this._prevGridData.push([t.call(this._xaxis,y[v][0]),null]) }}}}if(q){this.renderer.smooth=false;if(this._type==="line"){s.show=false}}if(this._type==="line"&&s.show){for(var v=0,r=s.hiData.length;v<r;v++){this.renderer._hiBandGridData.push([t.call(this._xaxis,s.hiData[v][0]),p.call(this._yaxis,s.hiData[v][1])])}for(var v=0,r=s.lowData.length;v<r;v++){this.renderer._lowBandGridData.push([t.call(this._xaxis,s.lowData[v][0]),p.call(this._yaxis,s.lowData[v][1])])}}if(this._type==="line"&&this.renderer.smooth&&this.gridData.length>2){var w;if(this.renderer.constrainSmoothing){w=e.call(this,this.gridData);this.renderer._smoothedData=w[0];this.renderer._smoothedPlotData=w[1];if(s.show){w=e.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=w[0];w=e.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=w[0]}w=null}else{w=k.call(this,this.gridData);this.renderer._smoothedData=w[0];this.renderer._smoothedPlotData=w[1];if(s.show){w=k.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=w[0]; w=k.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=w[0]}w=null}}};h.jqplot.LineRenderer.prototype.makeGridData=function(w,y){var u=this._xaxis.series_u2p;var p=this._yaxis.series_u2p;var z=[];var r=[];this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];var t=this.renderer.bands;var q=false;for(var v=0;v<w.length;v++){if(w[v][0]!=null&&w[v][1]!=null){z.push([u.call(this._xaxis,w[v][0]),p.call(this._yaxis,w[v][1])])}else{if(w[v][0]==null){q=true;z.push([null,p.call(this._yaxis,w[v][1])])}else{if(w[v][1]==null){q=true;z.push([u.call(this._xaxis,w[v][0]),null])}}}}if(q){this.renderer.smooth=false;if(this._type==="line"){t.show=false}}if(this._type==="line"&&t.show){for(var v=0,s=t.hiData.length;v<s;v++){this.renderer._hiBandGridData.push([u.call(this._xaxis,t.hiData[v][0]),p.call(this._yaxis,t.hiData[v][1])]) }for(var v=0,s=t.lowData.length;v<s;v++){this.renderer._lowBandGridData.push([u.call(this._xaxis,t.lowData[v][0]),p.call(this._yaxis,t.lowData[v][1])])}}if(this._type==="line"&&this.renderer.smooth&&z.length>2){var x;if(this.renderer.constrainSmoothing){x=e.call(this,z);this.renderer._smoothedData=x[0];this.renderer._smoothedPlotData=x[1];if(t.show){x=e.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=x[0];x=e.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=x[0]}x=null}else{x=k.call(this,z);this.renderer._smoothedData=x[0];this.renderer._smoothedPlotData=x[1];if(t.show){x=k.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=x[0];x=k.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=x[0]}x=null}}return z};h.jqplot.LineRenderer.prototype.draw=function(F,Q,r,J){var K;var z=h.extend(true,{},r);var t=(z.shadow!=undefined)?z.shadow:this.shadow;var R=(z.showLine!=undefined)?z.showLine:this.showLine; var I=(z.fill!=undefined)?z.fill:this.fill;var q=(z.fillAndStroke!=undefined)?z.fillAndStroke:this.fillAndStroke;var A,G,D,M;F.save();if(Q.length){if(R){if(I){if(this.fillToZero){var N=this.negativeColor;if(!this.useNegativeColors){N=z.fillStyle}var x=false;var y=z.fillStyle;if(q){var P=Q.slice(0)}if(this.index==0||!this._stack){var E=[];var T=(this.renderer.smooth)?this.renderer._smoothedPlotData:this._plotData;this._areaPoints=[];var O=this._yaxis.series_u2p(this.fillToValue);var s=this._xaxis.series_u2p(this.fillToValue);z.closePath=true;if(this.fillAxis=="y"){E.push([Q[0][0],O]);this._areaPoints.push([Q[0][0],O]);for(var K=0;K<Q.length-1;K++){E.push(Q[K]);this._areaPoints.push(Q[K]);if(T[K][1]*T[K+1][1]<=0){if(T[K][1]<0){x=true;z.fillStyle=N}else{x=false;z.fillStyle=y}var w=Q[K][0]+(Q[K+1][0]-Q[K][0])*(O-Q[K][1])/(Q[K+1][1]-Q[K][1]);E.push([w,O]);this._areaPoints.push([w,O]);if(t){this.renderer.shadowRenderer.draw(F,E,z)}this.renderer.shapeRenderer.draw(F,E,z);E=[[w,O]]}}if(T[Q.length-1][1]<0){x=true; z.fillStyle=N}else{x=false;z.fillStyle=y}E.push(Q[Q.length-1]);this._areaPoints.push(Q[Q.length-1]);E.push([Q[Q.length-1][0],O]);this._areaPoints.push([Q[Q.length-1][0],O])}if(t){this.renderer.shadowRenderer.draw(F,E,z)}this.renderer.shapeRenderer.draw(F,E,z)}else{var C=this._prevGridData;for(var K=C.length;K>0;K--){Q.push(C[K-1])}if(t){this.renderer.shadowRenderer.draw(F,Q,z)}this._areaPoints=Q;this.renderer.shapeRenderer.draw(F,Q,z)}}else{if(q){var P=Q.slice(0)}if(this.index==0||!this._stack){var u=F.canvas.height;Q.unshift([Q[0][0],u]);var L=Q.length;Q.push([Q[L-1][0],u])}else{var C=this._prevGridData;for(var K=C.length;K>0;K--){Q.push(C[K-1])}}this._areaPoints=Q;if(t){this.renderer.shadowRenderer.draw(F,Q,z)}this.renderer.shapeRenderer.draw(F,Q,z)}if(q){var H=h.extend(true,{},z,{fill:false,closePath:false});this.renderer.shapeRenderer.draw(F,P,H);if(this.markerRenderer.show){if(this.renderer.smooth){P=this.gridData}for(K=0;K<P.length;K++){this.markerRenderer.draw(P[K][0],P[K][1],F,z.markerOptions) }}}}else{if(this.renderer.bands.show){var v;var S=h.extend(true,{},z);if(this.renderer.bands.showLines){v=(this.renderer.smooth)?this.renderer._hiBandSmoothedData:this.renderer._hiBandGridData;this.renderer.shapeRenderer.draw(F,v,z);v=(this.renderer.smooth)?this.renderer._lowBandSmoothedData:this.renderer._lowBandGridData;this.renderer.shapeRenderer.draw(F,v,S)}if(this.renderer.bands.fill){if(this.renderer.smooth){v=this.renderer._hiBandSmoothedData.concat(this.renderer._lowBandSmoothedData.reverse())}else{v=this.renderer._hiBandGridData.concat(this.renderer._lowBandGridData.reverse())}this._areaPoints=v;S.closePath=true;S.fill=true;S.fillStyle=this.renderer.bands.fillColor;this.renderer.shapeRenderer.draw(F,v,S)}}if(t){this.renderer.shadowRenderer.draw(F,Q,z)}this.renderer.shapeRenderer.draw(F,Q,z)}}var A=D=G=M=null;for(K=0;K<this._areaPoints.length;K++){var B=this._areaPoints[K];if(A>B[0]||A==null){A=B[0]}if(M<B[1]||M==null){M=B[1]}if(D<B[0]||D==null){D=B[0]}if(G>B[1]||G==null){G=B[1] }}if(this.type==="line"&&this.renderer.bands.show){M=this._yaxis.series_u2p(this.renderer.bands._min);G=this._yaxis.series_u2p(this.renderer.bands._max)}this._boundingBox=[[A,M],[D,G]];if(this.markerRenderer.show&&!I){if(this.renderer.smooth){Q=this.gridData}for(K=0;K<Q.length;K++){if(Q[K][0]!=null&&Q[K][1]!=null){this.markerRenderer.draw(Q[K][0],Q[K][1],F,z.markerOptions)}}}}F.restore()};h.jqplot.LineRenderer.prototype.drawShadow=function(p,r,q){};function j(s,r,p){for(var q=0;q<this.series.length;q++){if(this.series[q].renderer.constructor==h.jqplot.LineRenderer){if(this.series[q].highlightMouseOver){this.series[q].highlightMouseDown=false}}}}function l(){if(this.plugins.lineRenderer&&this.plugins.lineRenderer.highlightCanvas){this.plugins.lineRenderer.highlightCanvas.resetCanvas();this.plugins.lineRenderer.highlightCanvas=null}this.plugins.lineRenderer.highlightedSeriesIndex=null;this.plugins.lineRenderer.highlightCanvas=new h.jqplot.GenericCanvas();this.eventCanvas._elem.before(this.plugins.lineRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-lineRenderer-highlight-canvas",this._plotDimensions,this)); this.plugins.lineRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(p){m(p.data.plot)})}function d(w,v,t,r){var q=w.series[v];var p=w.plugins.lineRenderer.highlightCanvas;p._ctx.clearRect(0,0,p._ctx.canvas.width,p._ctx.canvas.height);q._highlightedPoint=t;w.plugins.lineRenderer.highlightedSeriesIndex=v;var u={fillStyle:q.highlightColor};if(q.type==="line"&&q.renderer.bands.show){u.fill=true;u.closePath=true}q.renderer.shapeRenderer.draw(p._ctx,r,u);p=null}function m(r){var p=r.plugins.lineRenderer.highlightCanvas;p._ctx.clearRect(0,0,p._ctx.canvas.width,p._ctx.canvas.height);for(var q=0;q<r.series.length;q++){r.series[q]._highlightedPoint=null}r.plugins.lineRenderer.highlightedSeriesIndex=null;r.target.trigger("jqplotDataUnhighlight");p=null}function b(t,s,w,v,u){if(v){var r=[v.seriesIndex,v.pointIndex,v.data];var q=jQuery.Event("jqplotDataMouseOver");q.pageX=t.pageX;q.pageY=t.pageY;u.target.trigger(q,r);if(u.series[r[0]].highlightMouseOver&&!(r[0]==u.plugins.lineRenderer.highlightedSeriesIndex)){var p=jQuery.Event("jqplotDataHighlight"); p.which=t.which;p.pageX=t.pageX;p.pageY=t.pageY;u.target.trigger(p,r);d(u,v.seriesIndex,v.pointIndex,v.points)}}else{if(v==null){m(u)}}}function a(s,r,v,u,t){if(u){var q=[u.seriesIndex,u.pointIndex,u.data];if(t.series[q[0]].highlightMouseDown&&!(q[0]==t.plugins.lineRenderer.highlightedSeriesIndex)){var p=jQuery.Event("jqplotDataHighlight");p.which=s.which;p.pageX=s.pageX;p.pageY=s.pageY;t.target.trigger(p,q);d(t,u.seriesIndex,u.pointIndex,u.points)}}else{if(u==null){m(t)}}}function n(r,q,u,t,s){var p=s.plugins.lineRenderer.highlightedSeriesIndex;if(p!=null&&s.series[p].highlightMouseDown){m(s)}}function i(s,r,v,u,t){if(u){var q=[u.seriesIndex,u.pointIndex,u.data];var p=jQuery.Event("jqplotDataClick");p.which=s.which;p.pageX=s.pageX;p.pageY=s.pageY;t.target.trigger(p,q)}}function o(t,s,w,v,u){if(v){var r=[v.seriesIndex,v.pointIndex,v.data];var p=u.plugins.lineRenderer.highlightedSeriesIndex;if(p!=null&&u.series[p].highlightMouseDown){m(u)}var q=jQuery.Event("jqplotDataRightClick");q.which=t.which; q.pageX=t.pageX;q.pageY=t.pageY;u.target.trigger(q,r)}}})(jQuery);(function(b){var a=0.1;b.jqplot.LinePattern=function(r,m){var l={dotted:[a,b.jqplot.config.dotGapLength],dashed:[b.jqplot.config.dashLength,b.jqplot.config.gapLength],solid:null};if(typeof m==="string"){if(m[0]==="."||m[0]==="-"){var t=m;m=[];for(var k=0,g=t.length;k<g;k++){if(t[k]==="."){m.push(a)}else{if(t[k]==="-"){m.push(b.jqplot.config.dashLength)}else{continue}}m.push(b.jqplot.config.gapLength)}}else{m=l[m]}}if(!(m&&m.length)){return r}var f=0;var n=m[0];var p=0;var o=0;var j=0;var c=0;var q=function(i,s){r.moveTo(i,s);p=i;o=s;j=i;c=s};var e=function(i,A){var w=r.lineWidth;var u=i-p;var s=A-o;var v=Math.sqrt(u*u+s*s);if((v>0)&&(w>0)){u/=v;s/=v;while(true){var z=w*n;if(z<v){p+=z*u;o+=z*s;if((f&1)==0){r.lineTo(p,o)}else{r.moveTo(p,o)}v-=z;f++;if(f>=m.length){f=0}n=m[f]}else{p=i;o=A;if((f&1)==0){r.lineTo(p,o)}else{r.moveTo(p,o)}n-=v/w;break}}}};var d=function(){r.beginPath()};var h=function(){e(j,c)};return{moveTo:q,lineTo:e,beginPath:d,closePath:h} }})(jQuery);(function(a){a.jqplot.MarkerRenderer=function(b){this.show=true;this.style="filledCircle";this.lineWidth=2;this.size=9;this.color="#666666";this.shadow=true;this.shadowAngle=45;this.shadowOffset=1;this.shadowDepth=3;this.shadowAlpha="0.07";this.shadowRenderer=new a.jqplot.ShadowRenderer();this.shapeRenderer=new a.jqplot.ShapeRenderer();a.extend(true,this,b)};a.jqplot.MarkerRenderer.prototype.init=function(b){a.extend(true,this,b);var d={angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,lineWidth:this.lineWidth,depth:this.shadowDepth,closePath:true};if(this.style.indexOf("filled")!=-1){d.fill=true}if(this.style.indexOf("ircle")!=-1){d.isarc=true;d.closePath=false}this.shadowRenderer.init(d);var c={fill:false,isarc:false,strokeStyle:this.color,fillStyle:this.color,lineWidth:this.lineWidth,closePath:true};if(this.style.indexOf("filled")!=-1){c.fill=true}if(this.style.indexOf("ircle")!=-1){c.isarc=true;c.closePath=false}this.shapeRenderer.init(c)};a.jqplot.MarkerRenderer.prototype.drawDiamond=function(d,c,g,f,i){var b=1.2; var j=this.size/2/b;var h=this.size/2*b;var e=[[d-j,c],[d,c+h],[d+j,c],[d,c-h]];if(this.shadow){this.shadowRenderer.draw(g,e)}this.shapeRenderer.draw(g,e,i)};a.jqplot.MarkerRenderer.prototype.drawPlus=function(e,d,h,g,k){var c=1;var l=this.size/2*c;var i=this.size/2*c;var j=[[e,d-i],[e,d+i]];var f=[[e+l,d],[e-l,d]];var b=a.extend(true,{},this.options,{closePath:false});if(this.shadow){this.shadowRenderer.draw(h,j,{closePath:false});this.shadowRenderer.draw(h,f,{closePath:false})}this.shapeRenderer.draw(h,j,b);this.shapeRenderer.draw(h,f,b)};a.jqplot.MarkerRenderer.prototype.drawX=function(e,d,h,g,k){var c=1;var l=this.size/2*c;var i=this.size/2*c;var b=a.extend(true,{},this.options,{closePath:false});var j=[[e-l,d-i],[e+l,d+i]];var f=[[e-l,d+i],[e+l,d-i]];if(this.shadow){this.shadowRenderer.draw(h,j,{closePath:false});this.shadowRenderer.draw(h,f,{closePath:false})}this.shapeRenderer.draw(h,j,b);this.shapeRenderer.draw(h,f,b)};a.jqplot.MarkerRenderer.prototype.drawDash=function(d,c,g,f,i){var b=1; var j=this.size/2*b;var h=this.size/2*b;var e=[[d-j,c],[d+j,c]];if(this.shadow){this.shadowRenderer.draw(g,e)}this.shapeRenderer.draw(g,e,i)};a.jqplot.MarkerRenderer.prototype.drawLine=function(g,f,b,e,c){var d=[g,f];if(this.shadow){this.shadowRenderer.draw(b,d)}this.shapeRenderer.draw(b,d,c)};a.jqplot.MarkerRenderer.prototype.drawSquare=function(d,c,g,f,i){var b=1;var j=this.size/2/b;var h=this.size/2*b;var e=[[d-j,c-h],[d-j,c+h],[d+j,c+h],[d+j,c-h]];if(this.shadow){this.shadowRenderer.draw(g,e)}this.shapeRenderer.draw(g,e,i)};a.jqplot.MarkerRenderer.prototype.drawCircle=function(c,i,e,h,f){var b=this.size/2;var d=2*Math.PI;var g=[c,i,b,0,d,true];if(this.shadow){this.shadowRenderer.draw(e,g)}this.shapeRenderer.draw(e,g,f)};a.jqplot.MarkerRenderer.prototype.draw=function(b,e,c,d){d=d||{};if(d.show==null||d.show!=false){if(d.color&&!d.fillStyle){d.fillStyle=d.color}if(d.color&&!d.strokeStyle){d.strokeStyle=d.color}switch(this.style){case"diamond":this.drawDiamond(b,e,c,false,d);break;case"filledDiamond":this.drawDiamond(b,e,c,true,d); break;case"circle":this.drawCircle(b,e,c,false,d);break;case"filledCircle":this.drawCircle(b,e,c,true,d);break;case"square":this.drawSquare(b,e,c,false,d);break;case"filledSquare":this.drawSquare(b,e,c,true,d);break;case"x":this.drawX(b,e,c,true,d);break;case"plus":this.drawPlus(b,e,c,true,d);break;case"dash":this.drawDash(b,e,c,true,d);break;case"line":this.drawLine(b,e,c,false,d);break;default:this.drawDiamond(b,e,c,false,d);break}}}})(jQuery);(function(a){a.jqplot.DivTitleRenderer=function(){};a.jqplot.DivTitleRenderer.prototype.init=function(b){a.extend(true,this,b)};a.jqplot.DivTitleRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}var e=this.renderer;var d=document.createElement("div");this._elem=a(d);this._elem.addClass("jqplot-title");if(!this.text){this.show=false;this._elem.height(0);this._elem.width(0)}else{if(this.text){var b;if(this.color){b=this.color}else{if(this.textColor){b=this.textColor}}var c={position:"absolute",top:"0px",left:"0px"}; if(this._plotWidth){c.width=this._plotWidth+"px"}if(this.fontSize){c.fontSize=this.fontSize}if(typeof this.textAlign==="string"){c.textAlign=this.textAlign}else{c.textAlign="center"}if(b){c.color=b}if(this.paddingBottom){c.paddingBottom=this.paddingBottom}if(this.fontFamily){c.fontFamily=this.fontFamily}this._elem.css(c);if(this.escapeHtml){this._elem.text(this.text)}else{this._elem.html(this.text)}}}d=null;return this._elem};a.jqplot.DivTitleRenderer.prototype.pack=function(){}})(jQuery);(function(a){a.jqplot.CanvasGridRenderer=function(){this.shadowRenderer=new a.jqplot.ShadowRenderer()};a.jqplot.CanvasGridRenderer.prototype.init=function(c){this._ctx;a.extend(true,this,c);var b={lineJoin:"miter",lineCap:"round",fill:false,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.shadowWidth,closePath:false,strokeStyle:this.shadowColor};this.renderer.shadowRenderer.init(b)};a.jqplot.CanvasGridRenderer.prototype.createElement=function(e){var d; if(this._elem){if(a.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==undefined){d=this._elem.get(0);window.G_vmlCanvasManager.uninitElement(d);d=null}this._elem.emptyForce();this._elem=null}d=e.canvasManager.getCanvas();var b=this._plotDimensions.width;var c=this._plotDimensions.height;d.width=b;d.height=c;this._elem=a(d);this._elem.addClass("jqplot-grid-canvas");this._elem.css({position:"absolute",left:0,top:0});d=e.canvasManager.initCanvas(d);this._top=this._offsets.top;this._bottom=c-this._offsets.bottom;this._left=this._offsets.left;this._right=b-this._offsets.right;this._width=this._right-this._left;this._height=this._bottom-this._top;d=null;return this._elem};a.jqplot.CanvasGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var r=this._ctx;var w=this._axes;r.save();r.clearRect(0,0,this._plotDimensions.width,this._plotDimensions.height);r.fillStyle=this.backgroundColor||this.background;r.fillRect(this._left,this._top,this._width,this._height); r.save();r.lineJoin="miter";r.lineCap="butt";r.lineWidth=this.gridLineWidth;r.strokeStyle=this.gridLineColor;var z,y,o,p;var k=["xaxis","yaxis","x2axis","y2axis"];for(var x=4;x>0;x--){var C=k[x-1];var c=w[C];var A=c._ticks;var q=A.length;if(c.show){if(c.drawBaseline){var B={};if(c.baselineWidth!==null){B.lineWidth=c.baselineWidth}if(c.baselineColor!==null){B.strokeStyle=c.baselineColor}switch(C){case"xaxis":n(this._left,this._bottom,this._right,this._bottom,B);break;case"yaxis":n(this._left,this._bottom,this._left,this._top,B);break;case"x2axis":n(this._left,this._bottom,this._right,this._bottom,B);break;case"y2axis":n(this._right,this._bottom,this._right,this._top,B);break}}for(var u=q;u>0;u--){var l=A[u-1];if(l.show){var g=Math.round(c.u2p(l.value))+0.5;switch(C){case"xaxis":if(l.showGridline&&this.drawGridlines&&((!l.isMinorTick&&c.drawMajorGridlines)||(l.isMinorTick&&c.drawMinorGridlines))){n(g,this._top,g,this._bottom)}if(l.showMark&&l.mark&&((!l.isMinorTick&&c.drawMajorTickMarks)||(l.isMinorTick&&c.drawMinorTickMarks))){o=l.markSize; p=l.mark;var g=Math.round(c.u2p(l.value))+0.5;switch(p){case"outside":z=this._bottom;y=this._bottom+o;break;case"inside":z=this._bottom-o;y=this._bottom;break;case"cross":z=this._bottom-o;y=this._bottom+o;break;default:z=this._bottom;y=this._bottom+o;break}if(this.shadow){this.renderer.shadowRenderer.draw(r,[[g,z],[g,y]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}n(g,z,g,y)}break;case"yaxis":if(l.showGridline&&this.drawGridlines&&((!l.isMinorTick&&c.drawMajorGridlines)||(l.isMinorTick&&c.drawMinorGridlines))){n(this._right,g,this._left,g)}if(l.showMark&&l.mark&&((!l.isMinorTick&&c.drawMajorTickMarks)||(l.isMinorTick&&c.drawMinorTickMarks))){o=l.markSize;p=l.mark;var g=Math.round(c.u2p(l.value))+0.5;switch(p){case"outside":z=this._left-o;y=this._left;break;case"inside":z=this._left;y=this._left+o;break;case"cross":z=this._left-o;y=this._left+o;break;default:z=this._left-o;y=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(r,[[z,g],[y,g]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false}) }n(z,g,y,g,{strokeStyle:c.borderColor})}break;case"x2axis":if(l.showGridline&&this.drawGridlines&&((!l.isMinorTick&&c.drawMajorGridlines)||(l.isMinorTick&&c.drawMinorGridlines))){n(g,this._bottom,g,this._top)}if(l.showMark&&l.mark&&((!l.isMinorTick&&c.drawMajorTickMarks)||(l.isMinorTick&&c.drawMinorTickMarks))){o=l.markSize;p=l.mark;var g=Math.round(c.u2p(l.value))+0.5;switch(p){case"outside":z=this._top-o;y=this._top;break;case"inside":z=this._top;y=this._top+o;break;case"cross":z=this._top-o;y=this._top+o;break;default:z=this._top-o;y=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(r,[[g,z],[g,y]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}n(g,z,g,y)}break;case"y2axis":if(l.showGridline&&this.drawGridlines&&((!l.isMinorTick&&c.drawMajorGridlines)||(l.isMinorTick&&c.drawMinorGridlines))){n(this._left,g,this._right,g)}if(l.showMark&&l.mark&&((!l.isMinorTick&&c.drawMajorTickMarks)||(l.isMinorTick&&c.drawMinorTickMarks))){o=l.markSize; p=l.mark;var g=Math.round(c.u2p(l.value))+0.5;switch(p){case"outside":z=this._right;y=this._right+o;break;case"inside":z=this._right-o;y=this._right;break;case"cross":z=this._right-o;y=this._right+o;break;default:z=this._right;y=this._right+o;break}if(this.shadow){this.renderer.shadowRenderer.draw(r,[[z,g],[y,g]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}n(z,g,y,g,{strokeStyle:c.borderColor})}break;default:break}}}l=null}c=null;A=null}k=["y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];for(var x=7;x>0;x--){var c=w[k[x-1]];var A=c._ticks;if(c.show){var d=A[c.numberTicks-1];var h=A[0];var f=c.getLeft();var v=[[f,d.getTop()+d.getHeight()/2],[f,h.getTop()+h.getHeight()/2+1]];if(this.shadow){this.renderer.shadowRenderer.draw(r,v,{lineCap:"butt",fill:false,closePath:false})}n(v[0][0],v[0][1],v[1][0],v[1][1],{lineCap:"butt",strokeStyle:c.borderColor,lineWidth:c.borderWidth});for(var u=A.length;u>0;u--){var l=A[u-1]; o=l.markSize;p=l.mark;var g=Math.round(c.u2p(l.value))+0.5;if(l.showMark&&l.mark){switch(p){case"outside":z=f;y=f+o;break;case"inside":z=f-o;y=f;break;case"cross":z=f-o;y=f+o;break;default:z=f;y=f+o;break}v=[[z,g],[y,g]];if(this.shadow){this.renderer.shadowRenderer.draw(r,v,{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}n(z,g,y,g,{strokeStyle:c.borderColor})}l=null}h=null}c=null;A=null}r.restore();function n(m,j,e,b,i){r.save();i=i||{};if(i.lineWidth==null||i.lineWidth!=0){a.extend(true,r,i);r.beginPath();r.moveTo(m,j);r.lineTo(e,b);r.stroke();r.restore()}}if(this.shadow){var v=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(r,v)}if(this.borderWidth!=0&&this.drawBorder){n(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:w.x2axis.borderColor,lineWidth:w.x2axis.borderWidth});n(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:w.y2axis.borderColor,lineWidth:w.y2axis.borderWidth}); n(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:w.xaxis.borderColor,lineWidth:w.xaxis.borderWidth});n(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:w.yaxis.borderColor,lineWidth:w.yaxis.borderWidth})}r.restore();r=null;w=null}})(jQuery);(function(a){a.jqplot.ShadowRenderer=function(b){this.angle=45;this.offset=1;this.alpha=0.07;this.lineWidth=1.5;this.lineJoin="miter";this.lineCap="round";this.closePath=false;this.fill=false;this.depth=3;this.strokeStyle="rgba(0,0,0,0.1)";this.isarc=false;a.extend(true,this,b)};a.jqplot.ShadowRenderer.prototype.init=function(b){a.extend(true,this,b)};a.jqplot.ShadowRenderer.prototype.draw=function(q,o,s){q.save();var b=(s!=null)?s:{};var p=(b.fill!=null)?b.fill:this.fill;var l=(b.fillRect!=null)?b.fillRect:this.fillRect;var k=(b.closePath!=null)?b.closePath:this.closePath;var f=(b.offset!=null)?b.offset:this.offset;var d=(b.alpha!=null)?b.alpha:this.alpha;var h=(b.depth!=null)?b.depth:this.depth; var r=(b.isarc!=null)?b.isarc:this.isarc;var m=(b.linePattern!=null)?b.linePattern:this.linePattern;q.lineWidth=(b.lineWidth!=null)?b.lineWidth:this.lineWidth;q.lineJoin=(b.lineJoin!=null)?b.lineJoin:this.lineJoin;q.lineCap=(b.lineCap!=null)?b.lineCap:this.lineCap;q.strokeStyle=b.strokeStyle||this.strokeStyle||"rgba(0,0,0,"+d+")";q.fillStyle=b.fillStyle||this.fillStyle||"rgba(0,0,0,"+d+")";for(var e=0;e<h;e++){var n=a.jqplot.LinePattern(q,m);q.translate(Math.cos(this.angle*Math.PI/180)*f,Math.sin(this.angle*Math.PI/180)*f);n.beginPath();if(r){q.arc(o[0],o[1],o[2],o[3],o[4],true)}else{if(l){if(l){q.fillRect(o[0],o[1],o[2],o[3])}}else{if(o&&o.length){var c=true;for(var g=0;g<o.length;g++){if(o[g][0]!=null&&o[g][1]!=null){if(c){n.moveTo(o[g][0],o[g][1]);c=false}else{n.lineTo(o[g][0],o[g][1])}}else{c=true}}}}}if(k){n.closePath()}if(p){q.fill()}else{q.stroke()}}q.restore()}})(jQuery);(function(a){a.jqplot.ShapeRenderer=function(b){this.lineWidth=1.5;this.linePattern="solid";this.lineJoin="miter"; this.lineCap="round";this.closePath=false;this.fill=false;this.isarc=false;this.fillRect=false;this.strokeRect=false;this.clearRect=false;this.strokeStyle="#999999";this.fillStyle="#999999";a.extend(true,this,b)};a.jqplot.ShapeRenderer.prototype.init=function(b){a.extend(true,this,b)};a.jqplot.ShapeRenderer.prototype.draw=function(n,l,p){n.save();var b=(p!=null)?p:{};var m=(b.fill!=null)?b.fill:this.fill;var g=(b.closePath!=null)?b.closePath:this.closePath;var h=(b.fillRect!=null)?b.fillRect:this.fillRect;var e=(b.strokeRect!=null)?b.strokeRect:this.strokeRect;var c=(b.clearRect!=null)?b.clearRect:this.clearRect;var o=(b.isarc!=null)?b.isarc:this.isarc;var j=(b.linePattern!=null)?b.linePattern:this.linePattern;var k=a.jqplot.LinePattern(n,j);n.lineWidth=b.lineWidth||this.lineWidth;n.lineJoin=b.lineJoin||this.lineJoin;n.lineCap=b.lineCap||this.lineCap;n.strokeStyle=(b.strokeStyle||b.color)||this.strokeStyle;n.fillStyle=b.fillStyle||this.fillStyle;n.beginPath();if(o){n.arc(l[0],l[1],l[2],l[3],l[4],true); if(g){n.closePath()}if(m){n.fill()}else{n.stroke()}n.restore();return}else{if(c){n.clearRect(l[0],l[1],l[2],l[3]);n.restore();return}else{if(h||e){if(h){n.fillRect(l[0],l[1],l[2],l[3])}if(e){n.strokeRect(l[0],l[1],l[2],l[3]);n.restore();return}}else{if(l&&l.length){var d=true;for(var f=0;f<l.length;f++){if(l[f][0]!=null&&l[f][1]!=null){if(d){k.moveTo(l[f][0],l[f][1]);d=false}else{k.lineTo(l[f][0],l[f][1])}}else{d=true}}if(g){k.closePath()}if(m){n.fill()}else{n.stroke()}}}}}n.restore()}})(jQuery);(function(a){a.jqplot.sprintf=function(){function h(n,i,k,m){var l=(n.length>=i)?"":Array(1+i-n.length>>>0).join(k);return m?n+l:l+n}function e(m){var l=new String(m);for(var k=10;k>0;k--){if(l==(l=l.replace(/^(\d+)(\d{3})/,"$1"+a.jqplot.sprintf.thousandsSeparator+"$2"))){break}}return l}function d(o,n,q,l,m,k){var p=l-o.length;if(p>0){var i=" ";if(k){i=" "}if(q||!m){o=h(o,l,i,q)}else{o=o.slice(0,n.length)+h("",p,"0",true)+o.slice(n.length)}}return o}function j(r,k,p,l,i,o,q,n){var m=r>>>0; p=p&&m&&{"2":"0b","8":"0","16":"0x"}[k]||"";r=p+h(m.toString(k),o||0,"0",false);return d(r,p,l,i,q,n)}function b(n,o,l,i,m,k){if(i!=null){n=n.slice(0,i)}return d(n,"",o,l,m,k)}var c=arguments,f=0,g=c[f++];return g.replace(a.jqplot.sprintf.regex,function(F,q,r,u,H,C,o){if(F=="%%"){return"%"}var w=false,s="",t=false,E=false,p=false,n=false;for(var B=0;r&&B<r.length;B++){switch(r.charAt(B)){case" ":s=" ";break;case"+":s="+";break;case"-":w=true;break;case"0":t=true;break;case"#":E=true;break;case"&":p=true;break;case"'":n=true;break}}if(!u){u=0}else{if(u=="*"){u=+c[f++]}else{if(u.charAt(0)=="*"){u=+c[u.slice(1,-1)]}else{u=+u}}}if(u<0){u=-u;w=true}if(!isFinite(u)){throw new Error("$.jqplot.sprintf: (minimum-)width must be finite")}if(!C){C="fFeE".indexOf(o)>-1?6:(o=="d")?0:void (0)}else{if(C=="*"){C=+c[f++]}else{if(C.charAt(0)=="*"){C=+c[C.slice(1,-1)]}else{C=+C}}}var y=q?c[q.slice(0,-1)]:c[f++];switch(o){case"s":if(y==null){return""}return b(String(y),w,u,C,t,p);case"c":return b(String.fromCharCode(+y),w,u,C,t,p); case"b":return j(y,2,E,w,u,C,t,p);case"o":return j(y,8,E,w,u,C,t,p);case"x":return j(y,16,E,w,u,C,t,p);case"X":return j(y,16,E,w,u,C,t,p).toUpperCase();case"u":return j(y,10,E,w,u,C,t,p);case"i":var l=parseInt(+y,10);if(isNaN(l)){return""}var A=l<0?"-":s;var D=n?e(String(Math.abs(l))):String(Math.abs(l));y=A+h(D,C,"0",false);return d(y,A,w,u,t,p);case"d":var l=Math.round(+y);if(isNaN(l)){return""}var A=l<0?"-":s;var D=n?e(String(Math.abs(l))):String(Math.abs(l));y=A+h(D,C,"0",false);return d(y,A,w,u,t,p);case"e":case"E":case"f":case"F":case"g":case"G":var l=+y;if(isNaN(l)){return""}var A=l<0?"-":s;var m=["toExponential","toFixed","toPrecision"]["efg".indexOf(o.toLowerCase())];var G=["toString","toUpperCase"]["eEfFgG".indexOf(o)%2];var D=Math.abs(l)[m](C);var x=D.toString().split(".");x[0]=n?e(x[0]):x[0];D=x.join(a.jqplot.sprintf.decimalMark);y=A+D;var v=d(y,A,w,u,t,p)[G]();return v;case"p":case"P":var l=+y;if(isNaN(l)){return""}var A=l<0?"-":s;var x=String(Number(Math.abs(l)).toExponential()).split(/e|E/); var k=(x[0].indexOf(".")!=-1)?x[0].length-1:String(l).length;var z=(x[1]<0)?-x[1]-1:0;if(Math.abs(l)<1){if(k+z<=C){y=A+Math.abs(l).toPrecision(k)}else{if(k<=C-1){y=A+Math.abs(l).toExponential(k-1)}else{y=A+Math.abs(l).toExponential(C-1)}}}else{var i=(k<=C)?k:C;y=A+Math.abs(l).toPrecision(i)}var G=["toString","toUpperCase"]["pP".indexOf(o)%2];return d(y,A,w,u,t,p)[G]();case"n":return"";default:return F}})};a.jqplot.sprintf.thousandsSeparator=",";a.jqplot.sprintf.decimalMark=".";a.jqplot.sprintf.regex=/%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g;a.jqplot.getSignificantFigures=function(f){var h=String(Number(Math.abs(f)).toExponential()).split(/e|E/);var g=(h[0].indexOf(".")!=-1)?h[0].length-1:h[0].length;var c=(h[1]<0)?-h[1]-1:0;var b=parseInt(h[1],10);var d=(b+1>0)?b+1:0;var e=(g<=d)?0:g-b-1;return{significantDigits:g,digitsLeft:d,digitsRight:e,zeros:c,exponent:b}};a.jqplot.getPrecision=function(b){return a.jqplot.getSignificantFigures(b).digitsRight }})(jQuery);(function(g){g.jqplot.ThemeEngine=function(){this.themes={};this.activeTheme=null};g.jqplot.ThemeEngine.prototype.init=function(){var r=new g.jqplot.Theme({_name:"Default"});var v,p,u;for(v in r.target){if(v=="textColor"){r.target[v]=this.target.css("color")}else{r.target[v]=this.target.css(v)}}if(this.title.show&&this.title._elem){for(v in r.title){if(v=="textColor"){r.title[v]=this.title._elem.css("color")}else{r.title[v]=this.title._elem.css(v)}}}for(v in r.grid){r.grid[v]=this.grid[v]}if(r.grid.backgroundColor==null&&this.grid.background!=null){r.grid.backgroundColor=this.grid.background}if(this.legend.show&&this.legend._elem){for(v in r.legend){if(v=="textColor"){r.legend[v]=this.legend._elem.css("color")}else{r.legend[v]=this.legend._elem.css(v)}}}var q;for(p=0;p<this.series.length;p++){q=this.series[p];if(q.renderer.constructor==g.jqplot.LineRenderer){r.series.push(new h())}else{if(q.renderer.constructor==g.jqplot.BarRenderer){r.series.push(new a())}else{if(q.renderer.constructor==g.jqplot.PieRenderer){r.series.push(new b()) }else{if(q.renderer.constructor==g.jqplot.DonutRenderer){r.series.push(new c())}else{if(q.renderer.constructor==g.jqplot.FunnelRenderer){r.series.push(new j())}else{if(q.renderer.constructor==g.jqplot.MeterGaugeRenderer){r.series.push(new m())}else{r.series.push({})}}}}}}for(v in r.series[p]){r.series[p][v]=q[v]}}var o,t;for(v in this.axes){t=this.axes[v];o=r.axes[v]=new d();o.borderColor=t.borderColor;o.borderWidth=t.borderWidth;if(t._ticks&&t._ticks[0]){for(u in o.ticks){if(t._ticks[0].hasOwnProperty(u)){o.ticks[u]=t._ticks[0][u]}else{if(t._ticks[0]._elem){o.ticks[u]=t._ticks[0]._elem.css(u)}}}}if(t._label&&t._label.show){for(u in o.label){if(t._label[u]){o.label[u]=t._label[u]}else{if(t._label._elem){if(u=="textColor"){o.label[u]=t._label._elem.css("color")}else{o.label[u]=t._label._elem.css(u)}}}}}}this.themeEngine._add(r);this.themeEngine.activeTheme=this.themeEngine.themes[r._name]};g.jqplot.ThemeEngine.prototype.get=function(o){if(!o){return this.activeTheme}else{return this.themes[o] }};function i(p,o){return p-o}g.jqplot.ThemeEngine.prototype.getThemeNames=function(){var o=[];for(var p in this.themes){o.push(p)}return o.sort(i)};g.jqplot.ThemeEngine.prototype.getThemes=function(){var p=[];var o=[];for(var r in this.themes){p.push(r)}p.sort(i);for(var q=0;q<p.length;q++){o.push(this.themes[p[q]])}return o};g.jqplot.ThemeEngine.prototype.activate=function(B,G){var o=false;if(!G&&this.activeTheme&&this.activeTheme._name){G=this.activeTheme._name}if(!this.themes.hasOwnProperty(G)){throw new Error("No theme of that name")}else{var t=this.themes[G];this.activeTheme=t;var F,z=false,y=false;var p=["xaxis","x2axis","yaxis","y2axis"];for(C=0;C<p.length;C++){var u=p[C];if(t.axesStyles.borderColor!=null){B.axes[u].borderColor=t.axesStyles.borderColor}if(t.axesStyles.borderWidth!=null){B.axes[u].borderWidth=t.axesStyles.borderWidth}}for(var E in B.axes){var r=B.axes[E];if(r.show){var x=t.axes[E]||{};var v=t.axesStyles;var s=g.jqplot.extend(true,{},x,v);F=(t.axesStyles.borderColor!=null)?t.axesStyles.borderColor:s.borderColor; if(s.borderColor!=null){r.borderColor=s.borderColor;o=true}F=(t.axesStyles.borderWidth!=null)?t.axesStyles.borderWidth:s.borderWidth;if(s.borderWidth!=null){r.borderWidth=s.borderWidth;o=true}if(r._ticks&&r._ticks[0]){for(var q in s.ticks){F=s.ticks[q];if(F!=null){r.tickOptions[q]=F;r._ticks=[];o=true}}}if(r._label&&r._label.show){for(var q in s.label){F=s.label[q];if(F!=null){r.labelOptions[q]=F;o=true}}}}}for(var A in t.grid){if(t.grid[A]!=null){B.grid[A]=t.grid[A]}}if(!o){B.grid.draw()}if(B.legend.show){for(A in t.legend){if(t.legend[A]!=null){B.legend[A]=t.legend[A]}}}if(B.title.show){for(A in t.title){if(t.title[A]!=null){B.title[A]=t.title[A]}}}var C;for(C=0;C<t.series.length;C++){var w={};var D=false;for(A in t.series[C]){F=(t.seriesStyles[A]!=null)?t.seriesStyles[A]:t.series[C][A];if(F!=null){w[A]=F;if(A=="color"){B.series[C].renderer.shapeRenderer.fillStyle=F;B.series[C].renderer.shapeRenderer.strokeStyle=F;B.series[C][A]=F}else{if((A=="lineWidth")||(A=="linePattern")){B.series[C].renderer.shapeRenderer[A]=F; B.series[C][A]=F}else{if(A=="markerOptions"){l(B.series[C].markerOptions,F);l(B.series[C].markerRenderer,F)}else{B.series[C][A]=F}}}o=true}}}if(o){B.target.empty();B.draw()}for(A in t.target){if(t.target[A]!=null){B.target.css(A,t.target[A])}}}};g.jqplot.ThemeEngine.prototype._add=function(p,o){if(o){p._name=o}if(!p._name){p._name=Date.parse(new Date())}if(!this.themes.hasOwnProperty(p._name)){this.themes[p._name]=p}else{throw new Error("jqplot.ThemeEngine Error: Theme already in use")}};g.jqplot.ThemeEngine.prototype.remove=function(o){if(o=="Default"){return false}return delete this.themes[o]};g.jqplot.ThemeEngine.prototype.newTheme=function(o,q){if(typeof(o)=="object"){q=q||o;o=null}if(q&&q._name){o=q._name}else{o=o||Date.parse(new Date())}var p=this.copy(this.themes.Default._name,o);g.jqplot.extend(p,q);return p};function k(q){if(q==null||typeof(q)!="object"){return q}var o=new q.constructor();for(var p in q){o[p]=k(q[p])}return o}g.jqplot.clone=k;function l(q,p){if(p==null||typeof(p)!="object"){return }for(var o in p){if(o=="highlightColors"){q[o]=k(p[o])}if(p[o]!=null&&typeof(p[o])=="object"){if(!q.hasOwnProperty(o)){q[o]={}}l(q[o],p[o])}else{q[o]=p[o]}}}g.jqplot.merge=l;g.jqplot.extend=function(){var t=arguments[0]||{},r=1,s=arguments.length,o=false,q;if(typeof t==="boolean"){o=t;t=arguments[1]||{};r=2}if(typeof t!=="object"&&!toString.call(t)==="[object Function]"){t={}}for(;r<s;r++){if((q=arguments[r])!=null){for(var p in q){var u=t[p],v=q[p];if(t===v){continue}if(o&&v&&typeof v==="object"&&!v.nodeType){t[p]=g.jqplot.extend(o,u||(v.length!=null?[]:{}),v)}else{if(v!==undefined){t[p]=v}}}}}return t};g.jqplot.ThemeEngine.prototype.rename=function(p,o){if(p=="Default"||o=="Default"){throw new Error("jqplot.ThemeEngine Error: Cannot rename from/to Default")}if(this.themes.hasOwnProperty(o)){throw new Error("jqplot.ThemeEngine Error: New name already in use.")}else{if(this.themes.hasOwnProperty(p)){var q=this.copy(p,o);this.remove(p);return q}}throw new Error("jqplot.ThemeEngine Error: Old name or new name invalid") };g.jqplot.ThemeEngine.prototype.copy=function(o,q,t){if(q=="Default"){throw new Error("jqplot.ThemeEngine Error: Cannot copy over Default theme")}if(!this.themes.hasOwnProperty(o)){var p="jqplot.ThemeEngine Error: Source name invalid";throw new Error(p)}if(this.themes.hasOwnProperty(q)){var p="jqplot.ThemeEngine Error: Target name invalid";throw new Error(p)}else{var r=k(this.themes[o]);r._name=q;g.jqplot.extend(true,r,t);this._add(r);return r}};g.jqplot.Theme=function(o,p){if(typeof(o)=="object"){p=p||o;o=null}o=o||Date.parse(new Date());this._name=o;this.target={backgroundColor:null};this.legend={textColor:null,fontFamily:null,fontSize:null,border:null,background:null};this.title={textColor:null,fontFamily:null,fontSize:null,textAlign:null};this.seriesStyles={};this.series=[];this.grid={drawGridlines:null,gridLineColor:null,gridLineWidth:null,backgroundColor:null,borderColor:null,borderWidth:null,shadow:null};this.axesStyles={label:{},ticks:{}};this.axes={};if(typeof(p)=="string"){this._name=p }else{if(typeof(p)=="object"){g.jqplot.extend(true,this,p)}}};var d=function(){this.borderColor=null;this.borderWidth=null;this.ticks=new f();this.label=new e()};var f=function(){this.show=null;this.showGridline=null;this.showLabel=null;this.showMark=null;this.size=null;this.textColor=null;this.whiteSpace=null;this.fontSize=null;this.fontFamily=null};var e=function(){this.textColor=null;this.whiteSpace=null;this.fontSize=null;this.fontFamily=null;this.fontWeight=null};var h=function(){this.color=null;this.lineWidth=null;this.linePattern=null;this.shadow=null;this.fillColor=null;this.showMarker=null;this.markerOptions=new n()};var n=function(){this.show=null;this.style=null;this.lineWidth=null;this.size=null;this.color=null;this.shadow=null};var a=function(){this.color=null;this.seriesColors=null;this.lineWidth=null;this.shadow=null;this.barPadding=null;this.barMargin=null;this.barWidth=null;this.highlightColors=null};var b=function(){this.seriesColors=null;this.padding=null;this.sliceMargin=null; this.fill=null;this.shadow=null;this.startAngle=null;this.lineWidth=null;this.highlightColors=null};var c=function(){this.seriesColors=null;this.padding=null;this.sliceMargin=null;this.fill=null;this.shadow=null;this.startAngle=null;this.lineWidth=null;this.innerDiameter=null;this.thickness=null;this.ringMargin=null;this.highlightColors=null};var j=function(){this.color=null;this.lineWidth=null;this.shadow=null;this.padding=null;this.sectionMargin=null;this.seriesColors=null;this.highlightColors=null};var m=function(){this.padding=null;this.backgroundColor=null;this.ringColor=null;this.tickColor=null;this.ringWidth=null;this.intervalColors=null;this.intervalInnerRadius=null;this.intervalOuterRadius=null;this.hubRadius=null;this.needleThickness=null;this.needlePad=null}})(jQuery);(function(e){e.jqplot.PieRenderer=function(){e.jqplot.LineRenderer.call(this)};e.jqplot.PieRenderer.prototype=new e.jqplot.LineRenderer();e.jqplot.PieRenderer.prototype.constructor=e.jqplot.PieRenderer;e.jqplot.PieRenderer.prototype.init=function(q,u){this.diameter=null; this.padding=20;this.sliceMargin=0;this.fill=true;this.shadowOffset=2;this.shadowAlpha=0.07;this.shadowDepth=5;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.dataLabels="percent";this.showDataLabels=false;this.dataLabelFormatString=null;this.dataLabelThreshold=3;this.dataLabelPositionFactor=0.52;this.dataLabelNudge=2;this.dataLabelCenterOn=true;this.startAngle=0;this.tickRenderer=e.jqplot.PieTickRenderer;this._drawData=true;this._type="pie";if(q.highlightMouseDown&&q.highlightMouseOver==null){q.highlightMouseOver=false}e.extend(true,this,q);if(this.sliceMargin<0){this.sliceMargin=0}this._diameter=null;this._radius=null;this._sliceAngles=[];this._highlightedPoint=null;if(this.highlightColors.length==0){for(var s=0;s<this.seriesColors.length;s++){var r=e.jqplot.getColorComponents(this.seriesColors[s]);var o=[r[0],r[1],r[2]];var t=o[0]+o[1]+o[2];for(var p=0;p<3;p++){o[p]=(t>570)?o[p]*0.8:o[p]+0.3*(255-o[p]);o[p]=parseInt(o[p],10)}this.highlightColors.push("rgb("+o[0]+","+o[1]+","+o[2]+")") }}this.highlightColorGenerator=new e.jqplot.ColorGenerator(this.highlightColors);u.postParseOptionsHooks.addOnce(m);u.postInitHooks.addOnce(g);u.eventListenerHooks.addOnce("jqplotMouseMove",b);u.eventListenerHooks.addOnce("jqplotMouseDown",a);u.eventListenerHooks.addOnce("jqplotMouseUp",l);u.eventListenerHooks.addOnce("jqplotClick",f);u.eventListenerHooks.addOnce("jqplotRightClick",n);u.postDrawHooks.addOnce(i)};e.jqplot.PieRenderer.prototype.setGridData=function(t){var p=[];var u=[];var o=this.startAngle/180*Math.PI;var s=0;this._drawData=false;for(var r=0;r<this.data.length;r++){if(this.data[r][1]!=0){this._drawData=true}p.push(this.data[r][1]);u.push([this.data[r][0]]);if(r>0){p[r]+=p[r-1]}s+=this.data[r][1]}var q=Math.PI*2/p[p.length-1];for(var r=0;r<p.length;r++){u[r][1]=p[r]*q;u[r][2]=this.data[r][1]/s}this.gridData=u};e.jqplot.PieRenderer.prototype.makeGridData=function(t,u){var p=[];var v=[];var s=0;var o=this.startAngle/180*Math.PI;this._drawData=false;for(var r=0;r<t.length;r++){if(this.data[r][1]!=0){this._drawData=true }p.push(t[r][1]);v.push([t[r][0]]);if(r>0){p[r]+=p[r-1]}s+=t[r][1]}var q=Math.PI*2/p[p.length-1];for(var r=0;r<p.length;r++){v[r][1]=p[r]*q;v[r][2]=t[r][1]/s}return v};function h(o){return Math.sin((o-(o-Math.PI)/8/Math.PI)/2)}function j(u,t,o,v,r){var w=0;var q=t-u;var s=Math.abs(q);var p=o;if(v==false){p+=r}if(p>0&&s>0.01&&s<6.282){w=parseFloat(p)/2/h(q)}return w}e.jqplot.PieRenderer.prototype.drawSlice=function(B,z,y,u,w){if(this._drawData){var p=this._radius;var A=this.fill;var x=this.lineWidth;var s=this.sliceMargin;if(this.fill==false){s+=this.lineWidth}B.save();B.translate(this._center[0],this._center[1]);var D=j(z,y,this.sliceMargin,this.fill,this.lineWidth);var o=D*Math.cos((z+y)/2);var C=D*Math.sin((z+y)/2);if((y-z)<=Math.PI){p-=D}else{p+=D}B.translate(o,C);if(w){for(var v=0,t=this.shadowDepth;v<t;v++){B.save();B.translate(this.shadowOffset*Math.cos(this.shadowAngle/180*Math.PI),this.shadowOffset*Math.sin(this.shadowAngle/180*Math.PI));q(p)}for(var v=0,t=this.shadowDepth;v<t;v++){B.restore() }}else{q(p)}B.restore()}function q(r){if(y>6.282+this.startAngle){y=6.282+this.startAngle;if(z>y){z=6.281+this.startAngle}}if(z>=y){return}B.beginPath();B.fillStyle=u;B.strokeStyle=u;B.lineWidth=x;B.arc(0,0,r,z,y,false);B.lineTo(0,0);B.closePath();if(A){B.fill()}else{B.stroke()}}};e.jqplot.PieRenderer.prototype.draw=function(B,z,E,o){var W;var H=(E!=undefined)?E:{};var t=0;var s=0;var N=1;var L=new e.jqplot.ColorGenerator(this.seriesColors);if(E.legendInfo&&E.legendInfo.placement=="insideGrid"){var J=E.legendInfo;switch(J.location){case"nw":t=J.width+J.xoffset;break;case"w":t=J.width+J.xoffset;break;case"sw":t=J.width+J.xoffset;break;case"ne":t=J.width+J.xoffset;N=-1;break;case"e":t=J.width+J.xoffset;N=-1;break;case"se":t=J.width+J.xoffset;N=-1;break;case"n":s=J.height+J.yoffset;break;case"s":s=J.height+J.yoffset;N=-1;break;default:break}}var K=(H.shadow!=undefined)?H.shadow:this.shadow;var A=(H.fill!=undefined)?H.fill:this.fill;var C=parseInt(B.canvas.style.width);var I=parseInt(B.canvas.style.height); var Q=C-t-2*this.padding;var X=I-s-2*this.padding;var M=Math.min(Q,X);var Y=M;this._sliceAngles=[];var v=this.sliceMargin;if(this.fill==false){v+=this.lineWidth}var q;var G=0;var R,aa,Z,ab;var D=this.startAngle/180*Math.PI;for(var W=0,V=z.length;W<V;W++){aa=(W==0)?D:z[W-1][1]+D;Z=z[W][1]+D;this._sliceAngles.push([aa,Z]);q=j(aa,Z,this.sliceMargin,this.fill,this.lineWidth);if(Math.abs(Z-aa)>Math.PI){G=Math.max(q,G)}}if(this.diameter!=null&&this.diameter>0){this._diameter=this.diameter-2*G}else{this._diameter=Y-2*G}if(this._diameter<6){e.jqplot.log("Diameter of pie too small, not rendering.");return}var S=this._radius=this._diameter/2;this._center=[(C-N*t)/2+N*t+G*Math.cos(D),(I-N*s)/2+N*s+G*Math.sin(D)];if(this.shadow){for(var W=0,V=z.length;W<V;W++){ab="rgba(0,0,0,"+this.shadowAlpha+")";this.renderer.drawSlice.call(this,B,this._sliceAngles[W][0],this._sliceAngles[W][1],ab,true)}}for(var W=0;W<z.length;W++){this.renderer.drawSlice.call(this,B,this._sliceAngles[W][0],this._sliceAngles[W][1],L.next(),false); if(this.showDataLabels&&z[W][2]*100>=this.dataLabelThreshold){var F,U=(this._sliceAngles[W][0]+this._sliceAngles[W][1])/2,T;if(this.dataLabels=="label"){F=this.dataLabelFormatString||"%s";T=e.jqplot.sprintf(F,z[W][0])}else{if(this.dataLabels=="value"){F=this.dataLabelFormatString||"%d";T=e.jqplot.sprintf(F,this.data[W][1])}else{if(this.dataLabels=="percent"){F=this.dataLabelFormatString||"%d%%";T=e.jqplot.sprintf(F,z[W][2]*100)}else{if(this.dataLabels.constructor==Array){F=this.dataLabelFormatString||"%s";T=e.jqplot.sprintf(F,this.dataLabels[W])}}}}var p=(this._radius)*this.dataLabelPositionFactor+this.sliceMargin+this.dataLabelNudge;var P=this._center[0]+Math.cos(U)*p+this.canvas._offsets.left;var O=this._center[1]+Math.sin(U)*p+this.canvas._offsets.top;var u=e('<div class="jqplot-pie-series jqplot-data-label" style="position:absolute;">'+T+"</div>").insertBefore(o.eventCanvas._elem);if(this.dataLabelCenterOn){P-=u.width()/2;O-=u.height()/2}else{P-=u.width()*Math.sin(U/2);O-=u.height()/2 }P=Math.round(P);O=Math.round(O);u.css({left:P,top:O})}}};e.jqplot.PieAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.PieAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.PieAxisRenderer.prototype.constructor=e.jqplot.PieAxisRenderer;e.jqplot.PieAxisRenderer.prototype.init=function(o){this.tickRenderer=e.jqplot.PieTickRenderer;e.extend(true,this,o);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};e.jqplot.PieLegendRenderer=function(){e.jqplot.TableLegendRenderer.call(this)};e.jqplot.PieLegendRenderer.prototype=new e.jqplot.TableLegendRenderer();e.jqplot.PieLegendRenderer.prototype.constructor=e.jqplot.PieLegendRenderer;e.jqplot.PieLegendRenderer.prototype.init=function(o){this.numberRows=null;this.numberColumns=null;e.extend(true,this,o)};e.jqplot.PieLegendRenderer.prototype.draw=function(){var r=this;if(this.show){var B=this._series;this._elem=e(document.createElement("table")); this._elem.addClass("jqplot-table-legend");var E={position:"absolute"};if(this.background){E.background=this.background}if(this.border){E.border=this.border}if(this.fontSize){E.fontSize=this.fontSize}if(this.fontFamily){E.fontFamily=this.fontFamily}if(this.textColor){E.textColor=this.textColor}if(this.marginTop!=null){E.marginTop=this.marginTop}if(this.marginBottom!=null){E.marginBottom=this.marginBottom}if(this.marginLeft!=null){E.marginLeft=this.marginLeft}if(this.marginRight!=null){E.marginRight=this.marginRight}this._elem.css(E);var I=false,A=false,o,y;var C=B[0];var p=new e.jqplot.ColorGenerator(C.seriesColors);if(C.show){var J=C.data;if(this.numberRows){o=this.numberRows;if(!this.numberColumns){y=Math.ceil(J.length/o)}else{y=this.numberColumns}}else{if(this.numberColumns){y=this.numberColumns;o=Math.ceil(J.length/this.numberColumns)}else{o=J.length;y=1}}var H,G;var q,w,v;var x,z,F;var D=0;var u,t;for(H=0;H<o;H++){q=e(document.createElement("tr"));q.addClass("jqplot-table-legend"); if(A){q.prependTo(this._elem)}else{q.appendTo(this._elem)}for(G=0;G<y;G++){if(D<J.length){x=this.labels[D]||J[D][0].toString();F=p.next();if(!A){if(H>0){I=true}else{I=false}}else{if(H==o-1){I=false}else{I=true}}z=(I)?this.rowSpacing:"0";w=e(document.createElement("td"));w.addClass("jqplot-table-legend jqplot-table-legend-swatch");w.css({textAlign:"center",paddingTop:z});u=e(document.createElement("div"));u.addClass("jqplot-table-legend-swatch-outline");t=e(document.createElement("div"));t.addClass("jqplot-table-legend-swatch");t.css({backgroundColor:F,borderColor:F});w.append(u.append(t));v=e(document.createElement("td"));v.addClass("jqplot-table-legend jqplot-table-legend-label");v.css("paddingTop",z);if(this.escapeHtml){v.text(x)}else{v.html(x)}if(A){v.prependTo(q);w.prependTo(q)}else{w.appendTo(q);v.appendTo(q)}I=true}D++}}}}return this._elem};e.jqplot.PieRenderer.prototype.handleMove=function(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];r.target.trigger("jqplotDataMouseOver",o); if(r.series[o[0]].highlightMouseOver&&!(o[0]==r.plugins.pieRenderer.highlightedSeriesIndex&&o[1]==r.series[o[0]]._highlightedPoint)){r.target.trigger("jqplotDataHighlight",o);d(r,o[0],o[1])}}else{if(s==null){k(r)}}};function c(s,r,p){p=p||{};p.axesDefaults=p.axesDefaults||{};p.legend=p.legend||{};p.seriesDefaults=p.seriesDefaults||{};var o=false;if(p.seriesDefaults.renderer==e.jqplot.PieRenderer){o=true}else{if(p.series){for(var q=0;q<p.series.length;q++){if(p.series[q].renderer==e.jqplot.PieRenderer){o=true}}}}if(o){p.axesDefaults.renderer=e.jqplot.PieAxisRenderer;p.legend.renderer=e.jqplot.PieLegendRenderer;p.legend.preDraw=true;p.seriesDefaults.pointLabels={show:false}}}function g(r,q,o){for(var p=0;p<this.series.length;p++){if(this.series[p].renderer.constructor==e.jqplot.PieRenderer){if(this.series[p].highlightMouseOver){this.series[p].highlightMouseDown=false}}}}function m(o){for(var p=0;p<this.series.length;p++){this.series[p].seriesColors=this.seriesColors;this.series[p].colorGenerator=e.jqplot.colorGenerator }}function d(t,r,q){var p=t.series[r];var o=t.plugins.pieRenderer.highlightCanvas;o._ctx.clearRect(0,0,o._ctx.canvas.width,o._ctx.canvas.height);p._highlightedPoint=q;t.plugins.pieRenderer.highlightedSeriesIndex=r;p.renderer.drawSlice.call(p,o._ctx,p._sliceAngles[q][0],p._sliceAngles[q][1],p.highlightColorGenerator.get(q),false)}function k(q){var o=q.plugins.pieRenderer.highlightCanvas;o._ctx.clearRect(0,0,o._ctx.canvas.width,o._ctx.canvas.height);for(var p=0;p<q.series.length;p++){q.series[p]._highlightedPoint=null}q.plugins.pieRenderer.highlightedSeriesIndex=null;q.target.trigger("jqplotDataUnhighlight")}function b(s,r,v,u,t){if(u){var q=[u.seriesIndex,u.pointIndex,u.data];var p=jQuery.Event("jqplotDataMouseOver");p.pageX=s.pageX;p.pageY=s.pageY;t.target.trigger(p,q);if(t.series[q[0]].highlightMouseOver&&!(q[0]==t.plugins.pieRenderer.highlightedSeriesIndex&&q[1]==t.series[q[0]]._highlightedPoint)){var o=jQuery.Event("jqplotDataHighlight");o.which=s.which;o.pageX=s.pageX;o.pageY=s.pageY; t.target.trigger(o,q);d(t,q[0],q[1])}}else{if(u==null){k(t)}}}function a(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];if(s.series[p[0]].highlightMouseDown&&!(p[0]==s.plugins.pieRenderer.highlightedSeriesIndex&&p[1]==s.series[p[0]]._highlightedPoint)){var o=jQuery.Event("jqplotDataHighlight");o.which=r.which;o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p);d(s,p[0],p[1])}}else{if(t==null){k(s)}}}function l(q,p,t,s,r){var o=r.plugins.pieRenderer.highlightedSeriesIndex;if(o!=null&&r.series[o].highlightMouseDown){k(r)}}function f(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var o=jQuery.Event("jqplotDataClick");o.which=r.which;o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p)}}function n(s,r,v,u,t){if(u){var q=[u.seriesIndex,u.pointIndex,u.data];var o=t.plugins.pieRenderer.highlightedSeriesIndex;if(o!=null&&t.series[o].highlightMouseDown){k(t)}var p=jQuery.Event("jqplotDataRightClick");p.which=s.which;p.pageX=s.pageX;p.pageY=s.pageY;t.target.trigger(p,q) }}function i(){if(this.plugins.pieRenderer&&this.plugins.pieRenderer.highlightCanvas){this.plugins.pieRenderer.highlightCanvas.resetCanvas();this.plugins.pieRenderer.highlightCanvas=null}this.plugins.pieRenderer={highlightedSeriesIndex:null};this.plugins.pieRenderer.highlightCanvas=new e.jqplot.GenericCanvas();var p=e(this.targetId+" .jqplot-data-label");if(p.length){e(p[0]).before(this.plugins.pieRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-pieRenderer-highlight-canvas",this._plotDimensions,this))}else{this.eventCanvas._elem.before(this.plugins.pieRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-pieRenderer-highlight-canvas",this._plotDimensions,this))}var o=this.plugins.pieRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(q){k(q.data.plot)})}e.jqplot.preInitHooks.push(c);e.jqplot.PieTickRenderer=function(){e.jqplot.AxisTickRenderer.call(this)};e.jqplot.PieTickRenderer.prototype=new e.jqplot.AxisTickRenderer(); e.jqplot.PieTickRenderer.prototype.constructor=e.jqplot.PieTickRenderer})(jQuery);(function(d){d.jqplot.BarRenderer=function(){d.jqplot.LineRenderer.call(this)};d.jqplot.BarRenderer.prototype=new d.jqplot.LineRenderer();d.jqplot.BarRenderer.prototype.constructor=d.jqplot.BarRenderer;d.jqplot.BarRenderer.prototype.init=function(o,q){this.barPadding=8;this.barMargin=10;this.barDirection="vertical";this.barWidth=null;this.shadowOffset=2;this.shadowDepth=5;this.shadowAlpha=0.08;this.waterfall=false;this.groups=1;this.varyBarColor=false;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.transposedData=true;this.renderer.animation={show:false,direction:"down",speed:3000,_supported:true};this._type="bar";if(o.highlightMouseDown&&o.highlightMouseOver==null){o.highlightMouseOver=false}d.extend(true,this,o);d.extend(true,this.renderer,o);this.fill=true;if(this.barDirection==="horizontal"&&this.rendererOptions.animation&&this.rendererOptions.animation.direction==null){this.renderer.animation.direction="left" }if(this.waterfall){this.fillToZero=false;this.disableStack=true}if(this.barDirection=="vertical"){this._primaryAxis="_xaxis";this._stackAxis="y";this.fillAxis="y"}else{this._primaryAxis="_yaxis";this._stackAxis="x";this.fillAxis="x"}this._highlightedPoint=null;this._plotSeriesInfo=null;this._dataColors=[];this._barPoints=[];var p={lineJoin:"miter",lineCap:"round",fill:true,isarc:false,strokeStyle:this.color,fillStyle:this.color,closePath:this.fill};this.renderer.shapeRenderer.init(p);var n={lineJoin:"miter",lineCap:"round",fill:true,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,closePath:this.fill};this.renderer.shadowRenderer.init(n);q.postInitHooks.addOnce(h);q.postDrawHooks.addOnce(j);q.eventListenerHooks.addOnce("jqplotMouseMove",b);q.eventListenerHooks.addOnce("jqplotMouseDown",a);q.eventListenerHooks.addOnce("jqplotMouseUp",l);q.eventListenerHooks.addOnce("jqplotClick",e);q.eventListenerHooks.addOnce("jqplotRightClick",m) };function g(t,p,o,w){if(this.rendererOptions.barDirection=="horizontal"){this._stackAxis="x";this._primaryAxis="_yaxis"}if(this.rendererOptions.waterfall==true){this._data=d.extend(true,[],this.data);var s=0;var u=(!this.rendererOptions.barDirection||this.rendererOptions.barDirection==="vertical"||this.transposedData===false)?1:0;for(var q=0;q<this.data.length;q++){s+=this.data[q][u];if(q>0){this.data[q][u]+=this.data[q-1][u]}}this.data[this.data.length]=(u==1)?[this.data.length+1,s]:[s,this.data.length+1];this._data[this._data.length]=(u==1)?[this._data.length+1,s]:[s,this._data.length+1]}if(this.rendererOptions.groups>1){this.breakOnNull=true;var n=this.data.length;var v=parseInt(n/this.rendererOptions.groups,10);var r=0;for(var q=v;q<n;q+=v){this.data.splice(q+r,0,[null,null]);this._plotData.splice(q+r,0,[null,null]);this._stackData.splice(q+r,0,[null,null]);r++}for(q=0;q<this.data.length;q++){if(this._primaryAxis=="_xaxis"){this.data[q][0]=q+1;this._plotData[q][0]=q+1;this._stackData[q][0]=q+1 }else{this.data[q][1]=q+1;this._plotData[q][1]=q+1;this._stackData[q][1]=q+1}}}}d.jqplot.preSeriesInitHooks.push(g);d.jqplot.BarRenderer.prototype.calcSeriesNumbers=function(){var r=0;var t=0;var q=this[this._primaryAxis];var p,o,u;for(var n=0;n<q._series.length;n++){o=q._series[n];if(o===this){u=n}if(o.renderer.constructor==d.jqplot.BarRenderer){r+=o.data.length;t+=1}}return[r,t,u]};d.jqplot.BarRenderer.prototype.setBarWidth=function(){var q;var n=0;var o=0;var t=this[this._primaryAxis];var x,r,v;var w=this._plotSeriesInfo=this.renderer.calcSeriesNumbers.call(this);n=w[0];o=w[1];var u=t.numberTicks;var p=(u-1)/2;if(t.name=="xaxis"||t.name=="x2axis"){if(this._stack){this.barWidth=(t._offsets.max-t._offsets.min)/n*o-this.barMargin}else{this.barWidth=((t._offsets.max-t._offsets.min)/p-this.barPadding*(o-1)-this.barMargin*2)/o}}else{if(this._stack){this.barWidth=(t._offsets.min-t._offsets.max)/n*o-this.barMargin}else{this.barWidth=((t._offsets.min-t._offsets.max)/p-this.barPadding*(o-1)-this.barMargin*2)/o }}return[n,o]};function f(o){var q=[];for(var s=0;s<o.length;s++){var r=d.jqplot.getColorComponents(o[s]);var n=[r[0],r[1],r[2]];var t=n[0]+n[1]+n[2];for(var p=0;p<3;p++){n[p]=(t>570)?n[p]*0.8:n[p]+0.3*(255-n[p]);n[p]=parseInt(n[p],10)}q.push("rgb("+n[0]+","+n[1]+","+n[2]+")")}return q}function i(v,u,s,t,o){var q=v,w=v-1,n,p,r=(o==="x")?0:1;if(q>0){p=t.series[w]._plotData[u][r];if((s*p)<0){n=i(w,u,s,t,o)}else{n=t.series[w].gridData[u][r]}}else{n=(r===0)?t.series[q]._xaxis.series_u2p(0):t.series[q]._yaxis.series_u2p(0)}return n}d.jqplot.BarRenderer.prototype.draw=function(E,L,q,G){var I;var A=d.extend({},q);var w=(A.shadow!=undefined)?A.shadow:this.shadow;var O=(A.showLine!=undefined)?A.showLine:this.showLine;var F=(A.fill!=undefined)?A.fill:this.fill;var p=this.xaxis;var J=this.yaxis;var y=this._xaxis.series_u2p;var K=this._yaxis.series_u2p;var D,C;this._dataColors=[];this._barPoints=[];if(this.barWidth==null){this.renderer.setBarWidth.call(this)}var N=this._plotSeriesInfo=this.renderer.calcSeriesNumbers.call(this); var x=N[0];var v=N[1];var s=N[2];var H=[];if(this._stack){this._barNudge=0}else{this._barNudge=(-Math.abs(v/2-0.5)+s)*(this.barWidth+this.barPadding)}if(O){var u=new d.jqplot.ColorGenerator(this.negativeSeriesColors);var B=new d.jqplot.ColorGenerator(this.seriesColors);var M=u.get(this.index);if(!this.useNegativeColors){M=A.fillStyle}var t=A.fillStyle;var r;var P;var o;if(this.barDirection=="vertical"){for(var I=0;I<L.length;I++){if(!this._stack&&this.data[I][1]==null){continue}H=[];r=L[I][0]+this._barNudge;if(this._stack&&this._prevGridData.length){o=i(this.index,I,this._plotData[I][1],G,"y")}else{if(this.fillToZero){o=this._yaxis.series_u2p(0)}else{if(this.waterfall&&I>0&&I<this.gridData.length-1){o=this.gridData[I-1][1]}else{if(this.waterfall&&I==0&&I<this.gridData.length-1){if(this._yaxis.min<=0&&this._yaxis.max>=0){o=this._yaxis.series_u2p(0)}else{if(this._yaxis.min>0){o=E.canvas.height}else{o=0}}}else{if(this.waterfall&&I==this.gridData.length-1){if(this._yaxis.min<=0&&this._yaxis.max>=0){o=this._yaxis.series_u2p(0) }else{if(this._yaxis.min>0){o=E.canvas.height}else{o=0}}}else{o=E.canvas.height}}}}}if((this.fillToZero&&this._plotData[I][1]<0)||(this.waterfall&&this._data[I][1]<0)){if(this.varyBarColor&&!this._stack){if(this.useNegativeColors){A.fillStyle=u.next()}else{A.fillStyle=B.next()}}else{A.fillStyle=M}}else{if(this.varyBarColor&&!this._stack){A.fillStyle=B.next()}else{A.fillStyle=t}}if(!this.fillToZero||this._plotData[I][1]>=0){H.push([r-this.barWidth/2,o]);H.push([r-this.barWidth/2,L[I][1]]);H.push([r+this.barWidth/2,L[I][1]]);H.push([r+this.barWidth/2,o])}else{H.push([r-this.barWidth/2,L[I][1]]);H.push([r-this.barWidth/2,o]);H.push([r+this.barWidth/2,o]);H.push([r+this.barWidth/2,L[I][1]])}this._barPoints.push(H);if(w&&!this._stack){var z=d.extend(true,{},A);delete z.fillStyle;this.renderer.shadowRenderer.draw(E,H,z)}var n=A.fillStyle||this.color;this._dataColors.push(n);this.renderer.shapeRenderer.draw(E,H,A)}}else{if(this.barDirection=="horizontal"){for(var I=0;I<L.length;I++){if(!this._stack&&this.data[I][0]==null){continue }H=[];r=L[I][1]-this._barNudge;P;if(this._stack&&this._prevGridData.length){P=i(this.index,I,this._plotData[I][0],G,"x")}else{if(this.fillToZero){P=this._xaxis.series_u2p(0)}else{if(this.waterfall&&I>0&&I<this.gridData.length-1){P=this.gridData[I-1][0]}else{if(this.waterfall&&I==0&&I<this.gridData.length-1){if(this._xaxis.min<=0&&this._xaxis.max>=0){P=this._xaxis.series_u2p(0)}else{if(this._xaxis.min>0){P=0}else{P=0}}}else{if(this.waterfall&&I==this.gridData.length-1){if(this._xaxis.min<=0&&this._xaxis.max>=0){P=this._xaxis.series_u2p(0)}else{if(this._xaxis.min>0){P=0}else{P=E.canvas.width}}}else{P=0}}}}}if((this.fillToZero&&this._plotData[I][0]<0)||(this.waterfall&&this._data[I][0]<0)){if(this.varyBarColor&&!this._stack){if(this.useNegativeColors){A.fillStyle=u.next()}else{A.fillStyle=B.next()}}else{A.fillStyle=M}}else{if(this.varyBarColor&&!this._stack){A.fillStyle=B.next()}else{A.fillStyle=t}}if(!this.fillToZero||this._plotData[I][0]>=0){H.push([P,r+this.barWidth/2]);H.push([P,r-this.barWidth/2]); H.push([L[I][0],r-this.barWidth/2]);H.push([L[I][0],r+this.barWidth/2])}else{H.push([L[I][0],r+this.barWidth/2]);H.push([L[I][0],r-this.barWidth/2]);H.push([P,r-this.barWidth/2]);H.push([P,r+this.barWidth/2])}this._barPoints.push(H);if(w&&!this._stack){var z=d.extend(true,{},A);delete z.fillStyle;this.renderer.shadowRenderer.draw(E,H,z)}var n=A.fillStyle||this.color;this._dataColors.push(n);this.renderer.shapeRenderer.draw(E,H,A)}}}}if(this.highlightColors.length==0){this.highlightColors=d.jqplot.computeHighlightColors(this._dataColors)}else{if(typeof(this.highlightColors)=="string"){var N=this.highlightColors;this.highlightColors=[];for(var I=0;I<this._dataColors.length;I++){this.highlightColors.push(N)}}}};d.jqplot.BarRenderer.prototype.drawShadow=function(z,G,p,B){var D;var w=(p!=undefined)?p:{};var t=(w.shadow!=undefined)?w.shadow:this.shadow;var I=(w.showLine!=undefined)?w.showLine:this.showLine;var A=(w.fill!=undefined)?w.fill:this.fill;var o=this.xaxis;var E=this.yaxis;var v=this._xaxis.series_u2p; var F=this._yaxis.series_u2p;var y,C,x,u,s,r;if(this._stack&&this.shadow){if(this.barWidth==null){this.renderer.setBarWidth.call(this)}var H=this._plotSeriesInfo=this.renderer.calcSeriesNumbers.call(this);u=H[0];s=H[1];r=H[2];if(this._stack){this._barNudge=0}else{this._barNudge=(-Math.abs(s/2-0.5)+r)*(this.barWidth+this.barPadding)}if(I){if(this.barDirection=="vertical"){for(var D=0;D<G.length;D++){if(this.data[D][1]==null){continue}C=[];var q=G[D][0]+this._barNudge;var n;if(this._stack&&this._prevGridData.length){n=i(this.index,D,this._plotData[D][1],B,"y")}else{if(this.fillToZero){n=this._yaxis.series_u2p(0)}else{n=z.canvas.height}}C.push([q-this.barWidth/2,n]);C.push([q-this.barWidth/2,G[D][1]]);C.push([q+this.barWidth/2,G[D][1]]);C.push([q+this.barWidth/2,n]);this.renderer.shadowRenderer.draw(z,C,w)}}else{if(this.barDirection=="horizontal"){for(var D=0;D<G.length;D++){if(this.data[D][0]==null){continue}C=[];var q=G[D][1]-this._barNudge;var J;if(this._stack&&this._prevGridData.length){J=i(this.index,D,this._plotData[D][0],B,"x") }else{if(this.fillToZero){J=this._xaxis.series_u2p(0)}else{J=0}}C.push([J,q+this.barWidth/2]);C.push([G[D][0],q+this.barWidth/2]);C.push([G[D][0],q-this.barWidth/2]);C.push([J,q-this.barWidth/2]);this.renderer.shadowRenderer.draw(z,C,w)}}}}}};function h(q,p,n){for(var o=0;o<this.series.length;o++){if(this.series[o].renderer.constructor==d.jqplot.BarRenderer){if(this.series[o].highlightMouseOver){this.series[o].highlightMouseDown=false}}}}function j(){if(this.plugins.barRenderer&&this.plugins.barRenderer.highlightCanvas){this.plugins.barRenderer.highlightCanvas.resetCanvas();this.plugins.barRenderer.highlightCanvas=null}this.plugins.barRenderer={highlightedSeriesIndex:null};this.plugins.barRenderer.highlightCanvas=new d.jqplot.GenericCanvas();this.eventCanvas._elem.before(this.plugins.barRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-barRenderer-highlight-canvas",this._plotDimensions,this));this.plugins.barRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(n){k(n.data.plot) })}function c(u,t,q,p){var o=u.series[t];var n=u.plugins.barRenderer.highlightCanvas;n._ctx.clearRect(0,0,n._ctx.canvas.width,n._ctx.canvas.height);o._highlightedPoint=q;u.plugins.barRenderer.highlightedSeriesIndex=t;var r={fillStyle:o.highlightColors[q]};o.renderer.shapeRenderer.draw(n._ctx,p,r);n=null}function k(p){var n=p.plugins.barRenderer.highlightCanvas;n._ctx.clearRect(0,0,n._ctx.canvas.width,n._ctx.canvas.height);for(var o=0;o<p.series.length;o++){p.series[o]._highlightedPoint=null}p.plugins.barRenderer.highlightedSeriesIndex=null;p.target.trigger("jqplotDataUnhighlight");n=null}function b(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var o=jQuery.Event("jqplotDataMouseOver");o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p);if(s.series[p[0]].show&&s.series[p[0]].highlightMouseOver&&!(p[0]==s.plugins.barRenderer.highlightedSeriesIndex&&p[1]==s.series[p[0]]._highlightedPoint)){var n=jQuery.Event("jqplotDataHighlight");n.which=r.which;n.pageX=r.pageX;n.pageY=r.pageY; s.target.trigger(n,p);c(s,t.seriesIndex,t.pointIndex,t.points)}}else{if(t==null){k(s)}}}function a(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];if(r.series[o[0]].highlightMouseDown&&!(o[0]==r.plugins.barRenderer.highlightedSeriesIndex&&o[1]==r.series[o[0]]._highlightedPoint)){var n=jQuery.Event("jqplotDataHighlight");n.which=q.which;n.pageX=q.pageX;n.pageY=q.pageY;r.target.trigger(n,o);c(r,s.seriesIndex,s.pointIndex,s.points)}}else{if(s==null){k(r)}}}function l(p,o,s,r,q){var n=q.plugins.barRenderer.highlightedSeriesIndex;if(n!=null&&q.series[n].highlightMouseDown){k(q)}}function e(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];var n=jQuery.Event("jqplotDataClick");n.which=q.which;n.pageX=q.pageX;n.pageY=q.pageY;r.target.trigger(n,o)}}function m(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var n=s.plugins.barRenderer.highlightedSeriesIndex;if(n!=null&&s.series[n].highlightMouseDown){k(s)}var o=jQuery.Event("jqplotDataRightClick");o.which=r.which;o.pageX=r.pageX; o.pageY=r.pageY;s.target.trigger(o,p)}}})(jQuery);(function(a){a.jqplot.CategoryAxisRenderer=function(b){a.jqplot.LinearAxisRenderer.call(this);this.sortMergedLabels=false};a.jqplot.CategoryAxisRenderer.prototype=new a.jqplot.LinearAxisRenderer();a.jqplot.CategoryAxisRenderer.prototype.constructor=a.jqplot.CategoryAxisRenderer;a.jqplot.CategoryAxisRenderer.prototype.init=function(e){this.groups=1;this.groupLabels=[];this._groupLabels=[];this._grouped=false;this._barsPerGroup=null;this.reverse=false;a.extend(true,this,{tickOptions:{formatString:"%d"}},e);var b=this._dataBounds;for(var f=0;f<this._series.length;f++){var g=this._series[f];if(g.groups){this.groups=g.groups}var h=g.data;for(var c=0;c<h.length;c++){if(this.name=="xaxis"||this.name=="x2axis"){if(h[c][0]<b.min||b.min==null){b.min=h[c][0]}if(h[c][0]>b.max||b.max==null){b.max=h[c][0]}}else{if(h[c][1]<b.min||b.min==null){b.min=h[c][1]}if(h[c][1]>b.max||b.max==null){b.max=h[c][1]}}}}if(this.groupLabels.length){this.groups=this.groupLabels.length }};a.jqplot.CategoryAxisRenderer.prototype.createTicks=function(){var D=this._ticks;var z=this.ticks;var F=this.name;var C=this._dataBounds;var v,A;var q,w;var d,c;var b,x;if(z.length){if(this.groups>1&&!this._grouped){var r=z.length;var p=parseInt(r/this.groups,10);var e=0;for(var x=p;x<r;x+=p){z.splice(x+e,0," ");e++}this._grouped=true}this.min=0.5;this.max=z.length+0.5;var m=this.max-this.min;this.numberTicks=2*z.length+1;for(x=0;x<z.length;x++){b=this.min+2*x*m/(this.numberTicks-1);var h=new this.tickRenderer(this.tickOptions);h.showLabel=false;h.setTick(b,this.name);this._ticks.push(h);var h=new this.tickRenderer(this.tickOptions);h.label=z[x];h.showMark=false;h.showGridline=false;h.setTick(b+0.5,this.name);this._ticks.push(h)}var h=new this.tickRenderer(this.tickOptions);h.showLabel=false;h.setTick(b+1,this.name);this._ticks.push(h)}else{if(F=="xaxis"||F=="x2axis"){v=this._plotDimensions.width}else{v=this._plotDimensions.height}if(this.min!=null&&this.max!=null&&this.numberTicks!=null){this.tickInterval=null }if(this.min!=null&&this.max!=null&&this.tickInterval!=null){if(parseInt((this.max-this.min)/this.tickInterval,10)!=(this.max-this.min)/this.tickInterval){this.tickInterval=null}}var y=[];var B=0;var q=0.5;var w,E;var f=false;for(var x=0;x<this._series.length;x++){var k=this._series[x];for(var u=0;u<k.data.length;u++){if(this.name=="xaxis"||this.name=="x2axis"){E=k.data[u][0]}else{E=k.data[u][1]}if(a.inArray(E,y)==-1){f=true;B+=1;y.push(E)}}}if(f&&this.sortMergedLabels){if(typeof y[0]=="string"){y.sort()}else{y.sort(function(j,i){return j-i})}}this.ticks=y;for(var x=0;x<this._series.length;x++){var k=this._series[x];for(var u=0;u<k.data.length;u++){if(this.name=="xaxis"||this.name=="x2axis"){E=k.data[u][0]}else{E=k.data[u][1]}var n=a.inArray(E,y)+1;if(this.name=="xaxis"||this.name=="x2axis"){k.data[u][0]=n}else{k.data[u][1]=n}}}if(this.groups>1&&!this._grouped){var r=y.length;var p=parseInt(r/this.groups,10);var e=0;for(var x=p;x<r;x+=p+1){y[x]=" "}this._grouped=true}w=B+0.5;if(this.numberTicks==null){this.numberTicks=2*B+1 }var m=w-q;this.min=q;this.max=w;var o=0;var g=parseInt(3+v/10,10);var p=parseInt(B/g,10);if(this.tickInterval==null){this.tickInterval=m/(this.numberTicks-1)}for(var x=0;x<this.numberTicks;x++){b=this.min+x*this.tickInterval;var h=new this.tickRenderer(this.tickOptions);if(x/2==parseInt(x/2,10)){h.showLabel=false;h.showMark=true}else{if(p>0&&o<p){h.showLabel=false;o+=1}else{h.showLabel=true;o=0}h.label=h.formatter(h.formatString,y[(x-1)/2]);h.showMark=false;h.showGridline=false}h.setTick(b,this.name);this._ticks.push(h)}}};a.jqplot.CategoryAxisRenderer.prototype.draw=function(b,j){if(this.show){this.renderer.createTicks.call(this);var h=0;var c;if(this._elem){this._elem.emptyForce()}this._elem=this._elem||a('<div class="jqplot-axis jqplot-'+this.name+'" style="position:absolute;"></div>');if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions); if(this._label.show){var g=this._label.draw(b,j);g.appendTo(this._elem)}var f=this._ticks;for(var e=0;e<f.length;e++){var d=f[e];if(d.showLabel&&(!d.isMinorTick||this.showMinorTicks)){var g=d.draw(b,j);g.appendTo(this._elem)}}this._groupLabels=[];for(var e=0;e<this.groupLabels.length;e++){var g=a('<div style="position:absolute;" class="jqplot-'+this.name+'-groupLabel"></div>');g.html(this.groupLabels[e]);this._groupLabels.push(g);g.appendTo(this._elem)}}return this._elem};a.jqplot.CategoryAxisRenderer.prototype.set=function(){var e=0;var m;var k=0;var f=0;var d=(this._label==null)?false:this._label.show;if(this.show){var n=this._ticks;for(var c=0;c<n.length;c++){var g=n[c];if(g.showLabel&&(!g.isMinorTick||this.showMinorTicks)){if(this.name=="xaxis"||this.name=="x2axis"){m=g._elem.outerHeight(true)}else{m=g._elem.outerWidth(true)}if(m>e){e=m}}}var j=0;for(var c=0;c<this._groupLabels.length;c++){var b=this._groupLabels[c];if(this.name=="xaxis"||this.name=="x2axis"){m=b.outerHeight(true)}else{m=b.outerWidth(true) }if(m>j){j=m}}if(d){k=this._label._elem.outerWidth(true);f=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){e+=j+f;this._elem.css({height:e+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){e+=j+f;this._elem.css({height:e+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){e+=j+k;this._elem.css({width:e+"px",left:"0px",top:"0px"});if(d&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",k+"px")}}else{e+=j+k;this._elem.css({width:e+"px",right:"0px",top:"0px"});if(d&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",k+"px")}}}}}};a.jqplot.CategoryAxisRenderer.prototype.pack=function(e,c){var C=this._ticks;var v=this.max;var s=this.min;var n=c.max;var l=c.min;var q=(this._label==null)?false:this._label.show;var x;for(var r in e){this._elem.css(r,e[r])}this._offsets=c;var g=n-l;var k=v-s;if(!this.reverse){this.u2p=function(h){return(h-s)*g/k+l};this.p2u=function(h){return(h-l)*k/g+s};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(h){return(h-s)*g/k };this.series_p2u=function(h){return h*k/g+s}}else{this.series_u2p=function(h){return(h-v)*g/k};this.series_p2u=function(h){return h*k/g+v}}}else{this.u2p=function(h){return l+(v-h)*g/k};this.p2u=function(h){return s+(h-l)*k/g};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(h){return(v-h)*g/k};this.series_p2u=function(h){return h*k/g+v}}else{this.series_u2p=function(h){return(s-h)*g/k};this.series_p2u=function(h){return h*k/g+s}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(x=0;x<C.length;x++){var o=C[x];if(o.show&&o.showLabel){var b;if(o.constructor==a.jqplot.CanvasAxisTickRenderer&&o.angle){var A=(this.name=="xaxis")?1:-1;switch(o.labelPosition){case"auto":if(A*o.angle<0){b=-o.getWidth()+o._textRenderer.height*Math.sin(-o._textRenderer.angle)/2}else{b=-o._textRenderer.height*Math.sin(o._textRenderer.angle)/2}break;case"end":b=-o.getWidth()+o._textRenderer.height*Math.sin(-o._textRenderer.angle)/2;break;case"start":b=-o._textRenderer.height*Math.sin(o._textRenderer.angle)/2; break;case"middle":b=-o.getWidth()/2+o._textRenderer.height*Math.sin(-o._textRenderer.angle)/2;break;default:b=-o.getWidth()/2+o._textRenderer.height*Math.sin(-o._textRenderer.angle)/2;break}}else{b=-o.getWidth()/2}var D=this.u2p(o.value)+b+"px";o._elem.css("left",D);o.pack()}}var z=["bottom",0];if(q){var m=this._label._elem.outerWidth(true);this._label._elem.css("left",l+g/2-m/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px");z=["bottom",this._label._elem.outerHeight(true)]}else{this._label._elem.css("top","0px");z=["top",this._label._elem.outerHeight(true)]}this._label.pack()}var d=parseInt(this._ticks.length/this.groups,10)+1;for(x=0;x<this._groupLabels.length;x++){var B=0;var f=0;for(var u=x*d;u<(x+1)*d;u++){if(u>=this._ticks.length-1){continue}if(this._ticks[u]._elem&&this._ticks[u].label!=" "){var o=this._ticks[u]._elem;var r=o.position();B+=r.left+o.outerWidth(true)/2;f++}}B=B/f;this._groupLabels[x].css({left:(B-this._groupLabels[x].outerWidth(true)/2)});this._groupLabels[x].css(z[0],z[1]) }}else{for(x=0;x<C.length;x++){var o=C[x];if(o.show&&o.showLabel){var b;if(o.constructor==a.jqplot.CanvasAxisTickRenderer&&o.angle){var A=(this.name=="yaxis")?1:-1;switch(o.labelPosition){case"auto":case"end":if(A*o.angle<0){b=-o._textRenderer.height*Math.cos(-o._textRenderer.angle)/2}else{b=-o.getHeight()+o._textRenderer.height*Math.cos(o._textRenderer.angle)/2}break;case"start":if(o.angle>0){b=-o._textRenderer.height*Math.cos(-o._textRenderer.angle)/2}else{b=-o.getHeight()+o._textRenderer.height*Math.cos(o._textRenderer.angle)/2}break;case"middle":b=-o.getHeight()/2;break;default:b=-o.getHeight()/2;break}}else{b=-o.getHeight()/2}var D=this.u2p(o.value)+b+"px";o._elem.css("top",D);o.pack()}}var z=["left",0];if(q){var y=this._label._elem.outerHeight(true);this._label._elem.css("top",n-g/2-y/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px");z=["left",this._label._elem.outerWidth(true)]}else{this._label._elem.css("right","0px");z=["right",this._label._elem.outerWidth(true)] }this._label.pack()}var d=parseInt(this._ticks.length/this.groups,10)+1;for(x=0;x<this._groupLabels.length;x++){var B=0;var f=0;for(var u=x*d;u<(x+1)*d;u++){if(u>=this._ticks.length-1){continue}if(this._ticks[u]._elem&&this._ticks[u].label!=" "){var o=this._ticks[u]._elem;var r=o.position();B+=r.top+o.outerHeight()/2;f++}}B=B/f;this._groupLabels[x].css({top:B-this._groupLabels[x].outerHeight()/2});this._groupLabels[x].css(z[0],z[1])}}}}})(jQuery);(function(a){a.jqplot.CanvasTextRenderer=function(b){this.fontStyle="normal";this.fontVariant="normal";this.fontWeight="normal";this.fontSize="10px";this.fontFamily="sans-serif";this.fontStretch=1;this.fillStyle="#666666";this.angle=0;this.textAlign="start";this.textBaseline="alphabetic";this.text;this.width;this.height;this.pt2px=1.28;a.extend(true,this,b);this.normalizedFontSize=this.normalizeFontSize(this.fontSize);this.setHeight()};a.jqplot.CanvasTextRenderer.prototype.init=function(b){a.extend(true,this,b);this.normalizedFontSize=this.normalizeFontSize(this.fontSize); this.setHeight()};a.jqplot.CanvasTextRenderer.prototype.normalizeFontSize=function(b){b=String(b);var c=parseFloat(b);if(b.indexOf("px")>-1){return c/this.pt2px}else{if(b.indexOf("pt")>-1){return c}else{if(b.indexOf("em")>-1){return c*12}else{if(b.indexOf("%")>-1){return c*12/100}else{return c/this.pt2px}}}}};a.jqplot.CanvasTextRenderer.prototype.fontWeight2Float=function(b){if(Number(b)){return b/400}else{switch(b){case"normal":return 1;break;case"bold":return 1.75;break;case"bolder":return 2.25;break;case"lighter":return 0.75;break;default:return 1;break}}};a.jqplot.CanvasTextRenderer.prototype.getText=function(){return this.text};a.jqplot.CanvasTextRenderer.prototype.setText=function(c,b){this.text=c;this.setWidth(b);return this};a.jqplot.CanvasTextRenderer.prototype.getWidth=function(b){return this.width};a.jqplot.CanvasTextRenderer.prototype.setWidth=function(c,b){if(!b){this.width=this.measure(c,this.text)}else{this.width=b}return this};a.jqplot.CanvasTextRenderer.prototype.getHeight=function(b){return this.height };a.jqplot.CanvasTextRenderer.prototype.setHeight=function(b){if(!b){this.height=this.normalizedFontSize*this.pt2px}else{this.height=b}return this};a.jqplot.CanvasTextRenderer.prototype.letter=function(b){return this.letters[b]};a.jqplot.CanvasTextRenderer.prototype.ascent=function(){return this.normalizedFontSize};a.jqplot.CanvasTextRenderer.prototype.descent=function(){return 7*this.normalizedFontSize/25};a.jqplot.CanvasTextRenderer.prototype.measure=function(d,g){var f=0;var b=g.length;for(var e=0;e<b;e++){var h=this.letter(g.charAt(e));if(h){f+=h.width*this.normalizedFontSize/25*this.fontStretch}}return f};a.jqplot.CanvasTextRenderer.prototype.draw=function(s,n){var r=0;var o=this.height*0.72;var p=0;var l=n.length;var k=this.normalizedFontSize/25;s.save();var h,f;if((-Math.PI/2<=this.angle&&this.angle<=0)||(Math.PI*3/2<=this.angle&&this.angle<=Math.PI*2)){h=0;f=-Math.sin(this.angle)*this.width}else{if((0<this.angle&&this.angle<=Math.PI/2)||(-Math.PI*2<=this.angle&&this.angle<=-Math.PI*3/2)){h=Math.sin(this.angle)*this.height; f=0}else{if((-Math.PI<this.angle&&this.angle<-Math.PI/2)||(Math.PI<=this.angle&&this.angle<=Math.PI*3/2)){h=-Math.cos(this.angle)*this.width;f=-Math.sin(this.angle)*this.width-Math.cos(this.angle)*this.height}else{if((-Math.PI*3/2<this.angle&&this.angle<Math.PI)||(Math.PI/2<this.angle&&this.angle<Math.PI)){h=Math.sin(this.angle)*this.height-Math.cos(this.angle)*this.width;f=-Math.cos(this.angle)*this.height}}}}s.strokeStyle=this.fillStyle;s.fillStyle=this.fillStyle;s.translate(h,f);s.rotate(this.angle);s.lineCap="round";var t=(this.normalizedFontSize>30)?2:2+(30-this.normalizedFontSize)/20;s.lineWidth=t*k*this.fontWeight2Float(this.fontWeight);for(var g=0;g<l;g++){var m=this.letter(n.charAt(g));if(!m){continue}s.beginPath();var e=1;var b=0;for(var d=0;d<m.points.length;d++){var q=m.points[d];if(q[0]==-1&&q[1]==-1){e=1;continue}if(e){s.moveTo(r+q[0]*k*this.fontStretch,o-q[1]*k);e=false}else{s.lineTo(r+q[0]*k*this.fontStretch,o-q[1]*k)}}s.stroke();r+=m.width*k*this.fontStretch}s.restore(); return p};a.jqplot.CanvasTextRenderer.prototype.letters={" ":{width:16,points:[]},"!":{width:10,points:[[5,21],[5,7],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]]},'"':{width:16,points:[[4,21],[4,14],[-1,-1],[12,21],[12,14]]},"#":{width:21,points:[[11,25],[4,-7],[-1,-1],[17,25],[10,-7],[-1,-1],[4,12],[18,12],[-1,-1],[3,6],[17,6]]},"$":{width:20,points:[[8,25],[8,-4],[-1,-1],[12,25],[12,-4],[-1,-1],[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},"%":{width:24,points:[[21,21],[3,0],[-1,-1],[8,21],[10,19],[10,17],[9,15],[7,14],[5,14],[3,16],[3,18],[4,20],[6,21],[8,21],[10,20],[13,19],[16,19],[19,20],[21,21],[-1,-1],[17,7],[15,6],[14,4],[14,2],[16,0],[18,0],[20,1],[21,3],[21,5],[19,7],[17,7]]},"&":{width:26,points:[[23,12],[23,13],[22,14],[21,14],[20,13],[19,11],[17,6],[15,3],[13,1],[11,0],[7,0],[5,1],[4,2],[3,4],[3,6],[4,8],[5,9],[12,13],[13,14],[14,16],[14,18],[13,20],[11,21],[9,20],[8,18],[8,16],[9,13],[11,10],[16,3],[18,1],[20,0],[22,0],[23,1],[23,2]]},"'":{width:10,points:[[5,19],[4,20],[5,21],[6,20],[6,18],[5,16],[4,15]]},"(":{width:14,points:[[11,25],[9,23],[7,20],[5,16],[4,11],[4,7],[5,2],[7,-2],[9,-5],[11,-7]]},")":{width:14,points:[[3,25],[5,23],[7,20],[9,16],[10,11],[10,7],[9,2],[7,-2],[5,-5],[3,-7]]},"*":{width:16,points:[[8,21],[8,9],[-1,-1],[3,18],[13,12],[-1,-1],[13,18],[3,12]]},"+":{width:26,points:[[13,18],[13,0],[-1,-1],[4,9],[22,9]]},",":{width:10,points:[[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]]},"-":{width:18,points:[[6,9],[12,9]]},".":{width:10,points:[[5,2],[4,1],[5,0],[6,1],[5,2]]},"/":{width:22,points:[[20,25],[2,-7]]},"0":{width:20,points:[[9,21],[6,20],[4,17],[3,12],[3,9],[4,4],[6,1],[9,0],[11,0],[14,1],[16,4],[17,9],[17,12],[16,17],[14,20],[11,21],[9,21]]},"1":{width:20,points:[[6,17],[8,18],[11,21],[11,0]]},"2":{width:20,points:[[4,16],[4,17],[5,19],[6,20],[8,21],[12,21],[14,20],[15,19],[16,17],[16,15],[15,13],[13,10],[3,0],[17,0]]},"3":{width:20,points:[[5,21],[16,21],[10,13],[13,13],[15,12],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]]},"4":{width:20,points:[[13,21],[3,7],[18,7],[-1,-1],[13,21],[13,0]]},"5":{width:20,points:[[15,21],[5,21],[4,12],[5,13],[8,14],[11,14],[14,13],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]]},"6":{width:20,points:[[16,18],[15,20],[12,21],[10,21],[7,20],[5,17],[4,12],[4,7],[5,3],[7,1],[10,0],[11,0],[14,1],[16,3],[17,6],[17,7],[16,10],[14,12],[11,13],[10,13],[7,12],[5,10],[4,7]]},"7":{width:20,points:[[17,21],[7,0],[-1,-1],[3,21],[17,21]]},"8":{width:20,points:[[8,21],[5,20],[4,18],[4,16],[5,14],[7,13],[11,12],[14,11],[16,9],[17,7],[17,4],[16,2],[15,1],[12,0],[8,0],[5,1],[4,2],[3,4],[3,7],[4,9],[6,11],[9,12],[13,13],[15,14],[16,16],[16,18],[15,20],[12,21],[8,21]]},"9":{width:20,points:[[16,14],[15,11],[13,9],[10,8],[9,8],[6,9],[4,11],[3,14],[3,15],[4,18],[6,20],[9,21],[10,21],[13,20],[15,18],[16,14],[16,9],[15,4],[13,1],[10,0],[8,0],[5,1],[4,3]]},":":{width:10,points:[[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]]},";":{width:10,points:[[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]]},"<":{width:24,points:[[20,18],[4,9],[20,0]]},"=":{width:26,points:[[4,12],[22,12],[-1,-1],[4,6],[22,6]]},">":{width:24,points:[[4,18],[20,9],[4,0]]},"?":{width:18,points:[[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]]},"@":{width:27,points:[[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]]},A:{width:18,points:[[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]]},B:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]]},C:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]]},D:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]]},E:{width:19,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]]},F:{width:18,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]]},G:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]]},H:{width:22,points:[[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]]},I:{width:8,points:[[4,21],[4,0]]},J:{width:16,points:[[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]]},K:{width:21,points:[[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]]},L:{width:17,points:[[4,21],[4,0],[-1,-1],[4,0],[16,0]]},M:{width:24,points:[[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]]},N:{width:22,points:[[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]]},O:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]]},P:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]]},Q:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]]},R:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]]},S:{width:20,points:[[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},T:{width:16,points:[[8,21],[8,0],[-1,-1],[1,21],[15,21]]},U:{width:22,points:[[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]]},V:{width:18,points:[[1,21],[9,0],[-1,-1],[17,21],[9,0]]},W:{width:24,points:[[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]]},X:{width:20,points:[[3,21],[17,0],[-1,-1],[17,21],[3,0]]},Y:{width:18,points:[[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]]},Z:{width:20,points:[[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]]},"[":{width:14,points:[[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]]},"\\":{width:14,points:[[0,21],[14,-3]]},"]":{width:14,points:[[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]]},"^":{width:16,points:[[6,15],[8,18],[10,15],[-1,-1],[3,12],[8,17],[13,12],[-1,-1],[8,17],[8,0]]},_:{width:16,points:[[0,-2],[16,-2]]},"`":{width:10,points:[[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]]},a:{width:19,points:[[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},b:{width:19,points:[[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},c:{width:18,points:[[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},d:{width:19,points:[[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},e:{width:18,points:[[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},f:{width:12,points:[[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]]},g:{width:19,points:[[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},h:{width:19,points:[[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},i:{width:8,points:[[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]]},j:{width:10,points:[[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]]},k:{width:17,points:[[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]]},l:{width:8,points:[[4,21],[4,0]]},m:{width:30,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]]},n:{width:19,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},o:{width:19,points:[[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]]},p:{width:19,points:[[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},q:{width:19,points:[[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},r:{width:13,points:[[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]]},s:{width:17,points:[[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]]},t:{width:12,points:[[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]]},u:{width:19,points:[[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]]},v:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0]]},w:{width:22,points:[[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]]},x:{width:17,points:[[3,14],[14,0],[-1,-1],[14,14],[3,0]]},y:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]]},z:{width:17,points:[[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]]},"{":{width:14,points:[[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]]},"|":{width:8,points:[[4,25],[4,-7]]},"}":{width:14,points:[[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]]},"~":{width:24,points:[[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]]}}; a.jqplot.CanvasFontRenderer=function(b){b=b||{};if(!b.pt2px){b.pt2px=1.5}a.jqplot.CanvasTextRenderer.call(this,b)};a.jqplot.CanvasFontRenderer.prototype=new a.jqplot.CanvasTextRenderer({});a.jqplot.CanvasFontRenderer.prototype.constructor=a.jqplot.CanvasFontRenderer;a.jqplot.CanvasFontRenderer.prototype.measure=function(c,e){var d=this.fontSize+" "+this.fontFamily;c.save();c.font=d;var b=c.measureText(e).width;c.restore();return b};a.jqplot.CanvasFontRenderer.prototype.draw=function(e,g){var c=0;var h=this.height*0.72;e.save();var d,b;if((-Math.PI/2<=this.angle&&this.angle<=0)||(Math.PI*3/2<=this.angle&&this.angle<=Math.PI*2)){d=0;b=-Math.sin(this.angle)*this.width}else{if((0<this.angle&&this.angle<=Math.PI/2)||(-Math.PI*2<=this.angle&&this.angle<=-Math.PI*3/2)){d=Math.sin(this.angle)*this.height;b=0}else{if((-Math.PI<this.angle&&this.angle<-Math.PI/2)||(Math.PI<=this.angle&&this.angle<=Math.PI*3/2)){d=-Math.cos(this.angle)*this.width;b=-Math.sin(this.angle)*this.width-Math.cos(this.angle)*this.height }else{if((-Math.PI*3/2<this.angle&&this.angle<Math.PI)||(Math.PI/2<this.angle&&this.angle<Math.PI)){d=Math.sin(this.angle)*this.height-Math.cos(this.angle)*this.width;b=-Math.cos(this.angle)*this.height}}}}e.strokeStyle=this.fillStyle;e.fillStyle=this.fillStyle;var f=this.fontSize+" "+this.fontFamily;e.font=f;e.translate(d,b);e.rotate(this.angle);e.fillText(g,c,h);e.restore()}})(jQuery);(function(a){a.jqplot.CanvasAxisTickRenderer=function(b){this.mark="outside";this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.angle=0;this.markSize=4;this.show=true;this.showLabel=true;this.labelPosition="auto";this.label="";this.value=null;this._styles={};this.formatter=a.jqplot.DefaultTickFormatter;this.formatString="";this.prefix="";this.fontFamily='"Trebuchet MS", Arial, Helvetica, sans-serif';this.fontSize="10pt";this.fontWeight="normal";this.fontStretch=1;this.textColor="#666666";this.enableFontSupport=true;this.pt2px=null;this._elem;this._ctx;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null}; a.extend(true,this,b);var c={fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily};if(this.pt2px){c.pt2px=this.pt2px}if(this.enableFontSupport){if(a.jqplot.support_canvas_text()){this._textRenderer=new a.jqplot.CanvasFontRenderer(c)}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}};a.jqplot.CanvasAxisTickRenderer.prototype.init=function(b){a.extend(true,this,b);this._textRenderer.init({fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily})};a.jqplot.CanvasAxisTickRenderer.prototype.getWidth=function(d){if(this._elem){return this._elem.outerWidth(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.sin(f.angle)*e)+Math.abs(Math.cos(f.angle)*c);return b}};a.jqplot.CanvasAxisTickRenderer.prototype.getHeight=function(d){if(this._elem){return this._elem.outerHeight(true) }else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.cos(f.angle)*e)+Math.abs(Math.sin(f.angle)*c);return b}};a.jqplot.CanvasAxisTickRenderer.prototype.getTop=function(b){if(this._elem){return this._elem.position().top}else{return null}};a.jqplot.CanvasAxisTickRenderer.prototype.getAngleRad=function(){var b=this.angle*Math.PI/180;return b};a.jqplot.CanvasAxisTickRenderer.prototype.setTick=function(b,d,c){this.value=b;if(c){this.isMinorTick=true}return this};a.jqplot.CanvasAxisTickRenderer.prototype.draw=function(c,f){if(!this.label){this.label=this.prefix+this.formatter(this.formatString,this.value)}if(this._elem){if(a.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==undefined){window.G_vmlCanvasManager.uninitElement(this._elem.get(0))}this._elem.emptyForce();this._elem=null}var e=f.canvasManager.getCanvas();this._textRenderer.setText(this.label,c);var b=this.getWidth(c);var d=this.getHeight(c);e.width=b;e.height=d;e.style.width=b;e.style.height=d; e.style.textAlign="left";e.style.position="absolute";e=f.canvasManager.initCanvas(e);this._elem=a(e);this._elem.css(this._styles);this._elem.addClass("jqplot-"+this.axis+"-tick");e=null;return this._elem};a.jqplot.CanvasAxisTickRenderer.prototype.pack=function(){this._textRenderer.draw(this._elem.get(0).getContext("2d"),this.label)}})(jQuery); (function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="452c")})({"00ee":function(t,e,n){var r=n("b622"),o=r("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},"0366":function(t,e,n){var r=n("1c0b");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"057f":function(t,e,n){var r=n("fc6a"),o=n("241c").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return o(t)}catch(e){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?c(t):o(r(t))}},"06cf":function(t,e,n){var r=n("83ab"),o=n("d1e7"),i=n("5c6c"),a=n("fc6a"),c=n("a04b"),u=n("5135"),f=n("0cfb"),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=c(e),f)try{return l(t,e)}catch(n){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},"07ac":function(t,e,n){var r=n("23e7"),o=n("6f53").values;r({target:"Object",stat:!0},{values:function(t){return o(t)}})},"0b42":function(t,e,n){var r=n("861d"),o=n("e8b5"),i=n("b622"),a=i("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)?r(e)&&(e=e[a],null===e&&(e=void 0)):e=void 0),void 0===e?Array:e}},"0cb2":function(t,e,n){var r=n("7b0b"),o=Math.floor,i="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,u,f,l){var s=n+t.length,p=u.length,d=c;return void 0!==f&&(f=r(f),d=a),i.call(l,d,(function(r,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(s);case"<":a=f[i.slice(1,-1)];break;default:var c=+i;if(0===c)return r;if(c>p){var l=o(c/10);return 0===l?r:l<=p?void 0===u[l-1]?i.charAt(1):u[l-1]+i.charAt(1):r}a=u[c-1]}return void 0===a?"":a}))}},"0cfb":function(t,e,n){var r=n("83ab"),o=n("d039"),i=n("cc12");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"107c":function(t,e,n){var r=n("d039"),o=n("da84"),i=o.RegExp;t.exports=r((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},1276:function(t,e,n){"use strict";var r=n("d784"),o=n("44e7"),i=n("825a"),a=n("1d80"),c=n("4840"),u=n("8aa5"),f=n("50c4"),l=n("577e"),s=n("14c3"),p=n("9263"),d=n("9f7f"),v=n("d039"),h=d.UNSUPPORTED_Y,y=[].push,m=Math.min,b=4294967295,g=!v((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));r("split",(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=l(a(this)),i=void 0===n?b:n>>>0;if(0===i)return[];if(void 0===t)return[r];if(!o(t))return e.call(r,t,i);var c,u,f,s=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,h=new RegExp(t.source,d+"g");while(c=p.call(h,r)){if(u=h.lastIndex,u>v&&(s.push(r.slice(v,c.index)),c.length>1&&c.index<r.length&&y.apply(s,c.slice(1)),f=c[0].length,v=u,s.length>=i))break;h.lastIndex===c.index&&h.lastIndex++}return v===r.length?!f&&h.test("")||s.push(""):s.push(r.slice(v)),s.length>i?s.slice(0,i):s}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var o=a(this),i=void 0==e?void 0:e[t];return void 0!==i?i.call(e,o,n):r.call(l(o),e,n)},function(t,o){var a=i(this),p=l(t),d=n(r,a,p,o,r!==e);if(d.done)return d.value;var v=c(a,RegExp),y=a.unicode,g=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(h?"g":"y"),w=new v(h?"^(?:"+a.source+")":a,g),x=void 0===o?b:o>>>0;if(0===x)return[];if(0===p.length)return null===s(w,p)?[p]:[];var S=0,O=0,E=[];while(O<p.length){w.lastIndex=h?0:O;var T,_=s(w,h?p.slice(O):p);if(null===_||(T=m(f(w.lastIndex+(h?O:0)),p.length))===S)O=u(p,O,y);else{if(E.push(p.slice(S,O)),E.length===x)return E;for(var A=1;A<=_.length-1;A++)if(E.push(_[A]),E.length===x)return E;O=S=T}}return E.push(p.slice(S)),E}]}),!g,h)},"13d5":function(t,e,n){"use strict";var r=n("23e7"),o=n("d58f").left,i=n("a640"),a=n("2d00"),c=n("605d"),u=i("reduce"),f=!c&&a>79&&a<83;r({target:"Array",proto:!0,forced:!u||f},{reduce:function(t){return o(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(t,e,n){var r=n("c6b6"),o=n("9263");t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},"19aa":function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(t,e,n){var r=n("b622"),o=r("iterator"),i=!1;try{var a=0,c={next:function(){return{done:!!a++}},return:function(){i=!0}};c[o]=function(){return this},Array.from(c,(function(){throw 2}))}catch(u){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var r={};r[o]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(u){}return n}},"1cdc":function(t,e,n){var r=n("342f");t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,n){var r=n("d039"),o=n("b622"),i=n("2d00"),a=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[],n=e.constructor={};return n[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},2266:function(t,e,n){var r=n("825a"),o=n("e95a"),i=n("50c4"),a=n("0366"),c=n("35a1"),u=n("2a62"),f=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var l,s,p,d,v,h,y,m=n&&n.that,b=!(!n||!n.AS_ENTRIES),g=!(!n||!n.IS_ITERATOR),w=!(!n||!n.INTERRUPTED),x=a(e,m,1+b+w),S=function(t){return l&&u(l),new f(!0,t)},O=function(t){return b?(r(t),w?x(t[0],t[1],S):x(t[0],t[1])):w?x(t,S):x(t)};if(g)l=t;else{if(s=c(t),"function"!=typeof s)throw TypeError("Target is not iterable");if(o(s)){for(p=0,d=i(t.length);d>p;p++)if(v=O(t[p]),v&&v instanceof f)return v;return new f(!1)}l=s.call(t)}h=l.next;while(!(y=h.call(l)).done){try{v=O(y.value)}catch(E){throw u(l),E}if("object"==typeof v&&v&&v instanceof f)return v}return new f(!1)}},"23cb":function(t,e,n){var r=n("a691"),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},"23e7":function(t,e,n){var r=n("da84"),o=n("06cf").f,i=n("9112"),a=n("6eeb"),c=n("ce4e"),u=n("e893"),f=n("94ca");t.exports=function(t,e){var n,l,s,p,d,v,h=t.target,y=t.global,m=t.stat;if(l=y?r:m?r[h]||c(h,{}):(r[h]||{}).prototype,l)for(s in e){if(d=e[s],t.noTargetGet?(v=o(l,s),p=v&&v.value):p=l[s],n=f(y?s:h+(m?".":"#")+s,t.forced),!n&&void 0!==p){if(typeof d===typeof p)continue;u(d,p)}(t.sham||p&&p.sham)&&i(d,"sham",!0),a(l,s,d,t)}}},"241c":function(t,e,n){var r=n("ca84"),o=n("7839"),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},"24aa":function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},2532:function(t,e,n){"use strict";var r=n("23e7"),o=n("5a34"),i=n("1d80"),a=n("577e"),c=n("ab13");r({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~a(i(this)).indexOf(a(o(t)),arguments.length>1?arguments[1]:void 0)}})},2626:function(t,e,n){"use strict";var r=n("d066"),o=n("9bf2"),i=n("b622"),a=n("83ab"),c=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[c]&&n(e,c,{configurable:!0,get:function(){return this}})}},"2a62":function(t,e,n){var r=n("825a");t.exports=function(t){var e=t["return"];if(void 0!==e)return r(e.call(t)).value}},"2cf4":function(t,e,n){var r,o,i,a,c=n("da84"),u=n("d039"),f=n("0366"),l=n("1be4"),s=n("cc12"),p=n("1cdc"),d=n("605d"),v=c.setImmediate,h=c.clearImmediate,y=c.process,m=c.MessageChannel,b=c.Dispatch,g=0,w={},x="onreadystatechange";try{r=c.location}catch(_){}var S=function(t){if(w.hasOwnProperty(t)){var e=w[t];delete w[t],e()}},O=function(t){return function(){S(t)}},E=function(t){S(t.data)},T=function(t){c.postMessage(String(t),r.protocol+"//"+r.host)};v&&h||(v=function(t){var e=[],n=arguments.length,r=1;while(n>r)e.push(arguments[r++]);return w[++g]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},o(g),g},h=function(t){delete w[t]},d?o=function(t){y.nextTick(O(t))}:b&&b.now?o=function(t){b.now(O(t))}:m&&!p?(i=new m,a=i.port2,i.port1.onmessage=E,o=f(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts&&r&&"file:"!==r.protocol&&!u(T)?(o=T,c.addEventListener("message",E,!1)):o=x in s("script")?function(t){l.appendChild(s("script"))[x]=function(){l.removeChild(this),S(t)}}:function(t){setTimeout(O(t),0)}),t.exports={set:v,clear:h}},"2d00":function(t,e,n){var r,o,i=n("da84"),a=n("342f"),c=i.process,u=i.Deno,f=c&&c.versions||u&&u.version,l=f&&f.v8;l?(r=l.split("."),o=r[0]<4?1:r[0]+r[1]):a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(o=r[1]))),t.exports=o&&+o},"342f":function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},"35a1":function(t,e,n){var r=n("f5df"),o=n("3f8c"),i=n("b622"),a=i("iterator");t.exports=function(t){if(void 0!=t)return t[a]||t["@@iterator"]||o[r(t)]}},"37e8":function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("825a"),a=n("df75");t.exports=r?Object.defineProperties:function(t,e){i(t);var n,r=a(e),c=r.length,u=0;while(c>u)o.f(t,n=r[u++],e[n]);return t}},"3bbe":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3ca3":function(t,e,n){"use strict";var r=n("6547").charAt,o=n("577e"),i=n("69f3"),a=n("7dd0"),c="String Iterator",u=i.set,f=i.getterFor(c);a(String,"String",(function(t){u(this,{type:c,string:o(t),index:0})}),(function(){var t,e=f(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},"3f8c":function(t,e){t.exports={}},"428f":function(t,e,n){var r=n("da84");t.exports=r},"44ad":function(t,e,n){var r=n("d039"),o=n("c6b6"),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var r=n("b622"),o=n("7c73"),i=n("9bf2"),a=r("unscopables"),c=Array.prototype;void 0==c[a]&&i.f(c,a,{configurable:!0,value:o(null)}),t.exports=function(t){c[a][t]=!0}},"44de":function(t,e,n){var r=n("da84");t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},"44e7":function(t,e,n){var r=n("861d"),o=n("c6b6"),i=n("b622"),a=i("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==o(t))}},"452c":function(t,e,n){"use strict";n.r(e);var r={};function o(t){if(Array.isArray(t))return t}n.r(r),n.d(r,"__extends",(function(){return m})),n.d(r,"__assign",(function(){return b})),n.d(r,"__rest",(function(){return g})),n.d(r,"__decorate",(function(){return w})),n.d(r,"__param",(function(){return x})),n.d(r,"__metadata",(function(){return S})),n.d(r,"__awaiter",(function(){return O})),n.d(r,"__generator",(function(){return E})),n.d(r,"__createBinding",(function(){return T})),n.d(r,"__exportStar",(function(){return _})),n.d(r,"__values",(function(){return A})),n.d(r,"__read",(function(){return j})),n.d(r,"__spread",(function(){return N})),n.d(r,"__spreadArrays",(function(){return R})),n.d(r,"__await",(function(){return k})),n.d(r,"__asyncGenerator",(function(){return L})),n.d(r,"__asyncDelegator",(function(){return I})),n.d(r,"__asyncValues",(function(){return P})),n.d(r,"__makeTemplateObject",(function(){return C})),n.d(r,"__importStar",(function(){return M})),n.d(r,"__importDefault",(function(){return D})),n.d(r,"__classPrivateFieldGet",(function(){return F})),n.d(r,"__classPrivateFieldSet",(function(){return U}));n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0");function i(t,e){var n=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),e&&i.length===e)break}catch(u){c=!0,o=u}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw o}}return i}}n("fb6a"),n("a630");function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){if(t){if("string"===typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(t,e){return o(t)||i(t,e)||c(t,e)||u()}function l(t){if(Array.isArray(t))return a(t)}function s(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(t){return l(t)||s(t)||c(t)||p()}n("e260"),n("e6cf"),n("cca6"),n("a79d"),n("4fad"),n("07ac"),n("498a"),n("5b81"),n("c1f9"),n("13d5"),n("ac1f"),n("1276"),n("caad"),n("2532");var v=n("c0c4"),h=n.n(v),y=function(t,e){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},y(t,e)};function m(t,e){function n(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var b=function(){return b=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},b.apply(this,arguments)};function g(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function w(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function x(t,e){return function(n,r){e(n,r,t)}}function S(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function O(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function a(t){try{u(r.next(t))}catch(e){i(e)}}function c(t){try{u(r["throw"](t))}catch(e){i(e)}}function u(t){t.done?n(t.value):o(t.value).then(a,c)}u((r=r.apply(t,e||[])).next())}))}function E(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return u([t,e])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(c){i=[6,c],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}}function T(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}function _(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])}function A(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{while((void 0===e||e-- >0)&&!(r=i.next()).done)a.push(r.value)}catch(c){o={error:c}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(o)throw o.error}}return a}function N(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(j(arguments[e]));return t}function R(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,c=i.length;a<c;a++,o++)r[o]=i[a];return r}function k(t){return this instanceof k?(this.v=t,this):new k(t)}function L(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(t,e||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){o[t]&&(r[t]=function(e){return new Promise((function(n,r){i.push([t,e,n,r])>1||c(t,e)}))})}function c(t,e){try{u(o[t](e))}catch(n){s(i[0][3],n)}}function u(t){t.value instanceof k?Promise.resolve(t.value.v).then(f,l):s(i[0][2],t)}function f(t){c("next",t)}function l(t){c("throw",t)}function s(t,e){t(e),i.shift(),i.length&&c(i[0][0],i[0][1])}}function I(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:k(t[r](e)),done:"return"===r}:o?o(e):e}:o}}function P(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"===typeof A?A(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){e=t[n](e),o(r,i,e.done,e.value)}))}}function o(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)}}function C(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function M(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function D(t){return t&&t.__esModule?t:{default:t}}function F(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function U(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}n("772f"),n("a572");function H(t){var e=t.split(/\s+/);return e.includes("noopener")&&e.includes("noreferrer")} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ window.tslib=r,Object.fromEntries=function(t){return d(t).reduce((function(t,e){var n=f(e,2),r=n[0],o=n[1];return t[r]=o,t}),{})},h.a.addHook("afterSanitizeAttributes",(function(t){!t.hasAttribute("target")||"_blank"!==t.getAttribute("target")||t.hasAttribute("rel")&&H(t.getAttribute("rel"))||t.removeAttribute("target")})),window.vueSanitize=function(t){return h.a.sanitize(t,{ADD_ATTR:["target"]})}},4840:function(t,e,n){var r=n("825a"),o=n("1c0b"),i=n("b622"),a=i("species");t.exports=function(t,e){var n,i=r(t).constructor;return void 0===i||void 0==(n=r(i)[a])?e:o(n)}},"485a":function(t,e,n){var r=n("861d");t.exports=function(t,e){var n,o;if("string"===e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if("string"!==e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},4930:function(t,e,n){var r=n("2d00"),o=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"498a":function(t,e,n){"use strict";var r=n("23e7"),o=n("58a8").trim,i=n("c8d2");r({target:"String",proto:!0,forced:i("trim")},{trim:function(){return o(this)}})},"4d64":function(t,e,n){var r=n("fc6a"),o=n("50c4"),i=n("23cb"),a=function(t){return function(e,n,a){var c,u=r(e),f=o(u.length),l=i(a,f);if(t&&n!=n){while(f>l)if(c=u[l++],c!=c)return!0}else for(;f>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"4df4":function(t,e,n){"use strict";var r=n("0366"),o=n("7b0b"),i=n("9bdd"),a=n("e95a"),c=n("50c4"),u=n("8418"),f=n("35a1");t.exports=function(t){var e,n,l,s,p,d,v=o(t),h="function"==typeof this?this:Array,y=arguments.length,m=y>1?arguments[1]:void 0,b=void 0!==m,g=f(v),w=0;if(b&&(m=r(m,y>2?arguments[2]:void 0,2)),void 0==g||h==Array&&a(g))for(e=c(v.length),n=new h(e);e>w;w++)d=b?m(v[w],w):v[w],u(n,w,d);else for(s=g.call(v),p=s.next,n=new h;!(l=p.call(s)).done;w++)d=b?i(s,m,[l.value,w],!0):l.value,u(n,w,d);return n.length=w,n}},"4fad":function(t,e,n){var r=n("23e7"),o=n("6f53").entries;r({target:"Object",stat:!0},{entries:function(t){return o(t)}})},"50c4":function(t,e,n){var r=n("a691"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},5135:function(t,e,n){var r=n("7b0b"),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(r(t),e)}},5692:function(t,e,n){var r=n("c430"),o=n("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.16.3",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var r=n("d066"),o=n("241c"),i=n("7418"),a=n("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},"577e":function(t,e,n){var r=n("d9b5");t.exports=function(t){if(r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},5899:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},"58a8":function(t,e,n){var r=n("1d80"),o=n("577e"),i=n("5899"),a="["+i+"]",c=RegExp("^"+a+a+"*"),u=RegExp(a+a+"*$"),f=function(t){return function(e){var n=o(r(e));return 1&t&&(n=n.replace(c,"")),2&t&&(n=n.replace(u,"")),n}};t.exports={start:f(1),end:f(2),trim:f(3)}},"5a34":function(t,e,n){var r=n("44e7");t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},"5b81":function(t,e,n){"use strict";var r=n("23e7"),o=n("1d80"),i=n("44e7"),a=n("577e"),c=n("ad6d"),u=n("0cb2"),f=n("b622"),l=n("c430"),s=f("replace"),p=RegExp.prototype,d=Math.max,v=function(t,e,n){return n>t.length?-1:""===e?n:t.indexOf(e,n)};r({target:"String",proto:!0},{replaceAll:function(t,e){var n,r,f,h,y,m,b,g,w,x=o(this),S=0,O=0,E="";if(null!=t){if(n=i(t),n&&(r=a(o("flags"in p?t.flags:c.call(t))),!~r.indexOf("g")))throw TypeError("`.replaceAll` does not allow non-global regexes");if(f=t[s],void 0!==f)return f.call(t,x,e);if(l&&n)return a(x).replace(t,e)}h=a(x),y=a(t),m="function"===typeof e,m||(e=a(e)),b=y.length,g=d(1,b),S=v(h,y,0);while(-1!==S)w=m?a(e(y,S,h)):u(y,h,S,[],void 0,e),E+=h.slice(O,S)+w,O=S+b,S=v(h,y,S+g);return O<h.length&&(E+=h.slice(O)),E}})},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"605d":function(t,e,n){var r=n("c6b6"),o=n("da84");t.exports="process"==r(o.process)},6069:function(t,e){t.exports="object"==typeof window},"60da":function(t,e,n){"use strict";var r=n("83ab"),o=n("d039"),i=n("df75"),a=n("7418"),c=n("d1e7"),u=n("7b0b"),f=n("44ad"),l=Object.assign,s=Object.defineProperty;t.exports=!l||o((function(){if(r&&1!==l({b:1},l(s({},"a",{enumerable:!0,get:function(){s(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=l({},t)[n]||i(l({},e)).join("")!=o}))?function(t,e){var n=u(t),o=arguments.length,l=1,s=a.f,p=c.f;while(o>l){var d,v=f(arguments[l++]),h=s?i(v).concat(s(v)):i(v),y=h.length,m=0;while(y>m)d=h[m++],r&&!p.call(v,d)||(n[d]=v[d])}return n}:l},6547:function(t,e,n){var r=n("a691"),o=n("577e"),i=n("1d80"),a=function(t){return function(e,n){var a,c,u=o(i(e)),f=r(n),l=u.length;return f<0||f>=l?t?"":void 0:(a=u.charCodeAt(f),a<55296||a>56319||f+1===l||(c=u.charCodeAt(f+1))<56320||c>57343?t?u.charAt(f):a:t?u.slice(f,f+2):c-56320+(a-55296<<10)+65536)}};t.exports={codeAt:a(!1),charAt:a(!0)}},"65f0":function(t,e,n){var r=n("0b42");t.exports=function(t,e){return new(r(t))(0===e?0:e)}},"69f3":function(t,e,n){var r,o,i,a=n("7f9a"),c=n("da84"),u=n("861d"),f=n("9112"),l=n("5135"),s=n("c6cd"),p=n("f772"),d=n("d012"),v="Object already initialized",h=c.WeakMap,y=function(t){return i(t)?o(t):r(t,{})},m=function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(a||s.state){var b=s.state||(s.state=new h),g=b.get,w=b.has,x=b.set;r=function(t,e){if(w.call(b,t))throw new TypeError(v);return e.facade=t,x.call(b,t,e),e},o=function(t){return g.call(b,t)||{}},i=function(t){return w.call(b,t)}}else{var S=p("state");d[S]=!0,r=function(t,e){if(l(t,S))throw new TypeError(v);return e.facade=t,f(t,S,e),e},o=function(t){return l(t,S)?t[S]:{}},i=function(t){return l(t,S)}}t.exports={set:r,get:o,has:i,enforce:y,getterFor:m}},"6eeb":function(t,e,n){var r=n("da84"),o=n("9112"),i=n("5135"),a=n("ce4e"),c=n("8925"),u=n("69f3"),f=u.get,l=u.enforce,s=String(String).split("String");(t.exports=function(t,e,n,c){var u,f=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),u=l(n),u.source||(u.source=s.join("string"==typeof e?e:""))),t!==r?(f?!d&&t[e]&&(p=!0):delete t[e],p?t[e]=n:o(t,e,n)):p?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&f(this).source||c(this)}))},"6f53":function(t,e,n){var r=n("83ab"),o=n("df75"),i=n("fc6a"),a=n("d1e7").f,c=function(t){return function(e){var n,c=i(e),u=o(c),f=u.length,l=0,s=[];while(f>l)n=u[l++],r&&!a.call(c,n)||s.push(t?[n,c[n]]:c[n]);return s}};t.exports={entries:c(!0),values:c(!1)}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,n){var r=n("428f"),o=n("5135"),i=n("e538"),a=n("9bf2").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},"772f":function(t,e,n){(function(r){var o,i;(function(r){o=r,i="function"===typeof o?o.call(e,n,e,t):o,void 0===i||(t.exports=i)})((function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function c(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){return!e||"object"!==typeof e&&"function"!==typeof e?u(t):e}function l(t){var e=c();return function(){var n,r=i(t);if(e){var o=i(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function s(t,e){while(!Object.prototype.hasOwnProperty.call(t,e))if(t=i(t),null===t)break;return t}function p(t,e,n){return p="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=s(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}},p(t,e,n||t)}var d=function(){function e(){t(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return n(e,[{key:"addEventListener",value:function(t,e,n){t in this.listeners||(this.listeners[t]=[]),this.listeners[t].push({callback:e,options:n})}},{key:"removeEventListener",value:function(t,e){if(t in this.listeners)for(var n=this.listeners[t],r=0,o=n.length;r<o;r++)if(n[r].callback===e)return void n.splice(r,1)}},{key:"dispatchEvent",value:function(t){if(t.type in this.listeners){for(var e=this.listeners[t.type],n=e.slice(),r=0,o=n.length;r<o;r++){var i=n[r];try{i.callback.call(this,t)}catch(a){Promise.resolve().then((function(){throw a}))}i.options&&i.options.once&&this.removeEventListener(t.type,i.callback)}return!t.defaultPrevented}}}]),e}(),v=function(e){o(a,e);var r=l(a);function a(){var e;return t(this,a),e=r.call(this),e.listeners||d.call(u(e)),Object.defineProperty(u(e),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(u(e),"onabort",{value:null,writable:!0,configurable:!0}),e}return n(a,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(t){"abort"===t.type&&(this.aborted=!0,"function"===typeof this.onabort&&this.onabort.call(this,t)),p(i(a.prototype),"dispatchEvent",this).call(this,t)}}]),a}(d),h=function(){function e(){t(this,e),Object.defineProperty(this,"signal",{value:new v,writable:!0,configurable:!0})}return n(e,[{key:"abort",value:function(){var t;try{t=new Event("abort")}catch(e){"undefined"!==typeof document?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(t)}},{key:"toString",value:function(){return"[object AbortController]"}}]),e}();function y(t){return t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"===typeof t.Request&&!t.Request.prototype.hasOwnProperty("signal")||!t.AbortController}"undefined"!==typeof Symbol&&Symbol.toStringTag&&(h.prototype[Symbol.toStringTag]="AbortController",v.prototype[Symbol.toStringTag]="AbortSignal"),function(t){y(t)&&(t.AbortController=h,t.AbortSignal=v)}("undefined"!==typeof self?self:r)}))}).call(this,n("24aa"))},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var r=n("1d80");t.exports=function(t){return Object(r(t))}},"7c73":function(t,e,n){var r,o=n("825a"),i=n("37e8"),a=n("7839"),c=n("d012"),u=n("1be4"),f=n("cc12"),l=n("f772"),s=">",p="<",d="prototype",v="script",h=l("IE_PROTO"),y=function(){},m=function(t){return p+v+s+t+p+"/"+v+s},b=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){var t,e=f("iframe"),n="java"+v+":";return e.style.display="none",u.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(m("document.F=Object")),t.close(),t.F},w=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}w="undefined"!=typeof document?document.domain&&r?b(r):g():b(r);var t=a.length;while(t--)delete w[d][a[t]];return w()};c[h]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(y[d]=o(t),n=new y,y[d]=null,n[h]=t):n=w(),void 0===e?n:i(n,e)}},"7dd0":function(t,e,n){"use strict";var r=n("23e7"),o=n("9ed3"),i=n("e163"),a=n("d2bb"),c=n("d44e"),u=n("9112"),f=n("6eeb"),l=n("b622"),s=n("c430"),p=n("3f8c"),d=n("ae93"),v=d.IteratorPrototype,h=d.BUGGY_SAFARI_ITERATORS,y=l("iterator"),m="keys",b="values",g="entries",w=function(){return this};t.exports=function(t,e,n,l,d,x,S){o(n,e,l);var O,E,T,_=function(t){if(t===d&&k)return k;if(!h&&t in N)return N[t];switch(t){case m:return function(){return new n(this,t)};case b:return function(){return new n(this,t)};case g:return function(){return new n(this,t)}}return function(){return new n(this)}},A=e+" Iterator",j=!1,N=t.prototype,R=N[y]||N["@@iterator"]||d&&N[d],k=!h&&R||_(d),L="Array"==e&&N.entries||R;if(L&&(O=i(L.call(new t)),v!==Object.prototype&&O.next&&(s||i(O)===v||(a?a(O,v):"function"!=typeof O[y]&&u(O,y,w)),c(O,A,!0,!0),s&&(p[A]=w))),d==b&&R&&R.name!==b&&(j=!0,k=function(){return R.call(this)}),s&&!S||N[y]===k||u(N,y,k),p[e]=k,d)if(E={values:_(b),keys:x?k:_(m),entries:_(g)},S)for(T in E)(h||j||!(T in N))&&f(N,T,E[T]);else r({target:e,proto:!0,forced:h||j},E);return E}},"7f9a":function(t,e,n){var r=n("da84"),o=n("8925"),i=r.WeakMap;t.exports="function"===typeof i&&/native code/.test(o(i))},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,n){"use strict";var r=n("a04b"),o=n("9bf2"),i=n("5c6c");t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8925:function(t,e,n){var r=n("c6cd"),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return o.call(t)}),t.exports=r.inspectSource},"8aa5":function(t,e,n){"use strict";var r=n("6547").charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"90e3":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},9112:function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("5c6c");t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9263:function(t,e,n){"use strict";var r=n("577e"),o=n("ad6d"),i=n("9f7f"),a=n("5692"),c=n("7c73"),u=n("69f3").get,f=n("fce3"),l=n("107c"),s=RegExp.prototype.exec,p=a("native-string-replace",String.prototype.replace),d=s,v=function(){var t=/a/,e=/b*/g;return s.call(t,"a"),s.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),h=i.UNSUPPORTED_Y||i.BROKEN_CARET,y=void 0!==/()??/.exec("")[1],m=v||y||h||f||l;m&&(d=function(t){var e,n,i,a,f,l,m,b=this,g=u(b),w=r(t),x=g.raw;if(x)return x.lastIndex=b.lastIndex,e=d.call(x,w),b.lastIndex=x.lastIndex,e;var S=g.groups,O=h&&b.sticky,E=o.call(b),T=b.source,_=0,A=w;if(O&&(E=E.replace("y",""),-1===E.indexOf("g")&&(E+="g"),A=w.slice(b.lastIndex),b.lastIndex>0&&(!b.multiline||b.multiline&&"\n"!==w.charAt(b.lastIndex-1))&&(T="(?: "+T+")",A=" "+A,_++),n=new RegExp("^(?:"+T+")",E)),y&&(n=new RegExp("^"+T+"$(?!\\s)",E)),v&&(i=b.lastIndex),a=s.call(O?n:b,A),O?a?(a.input=a.input.slice(_),a[0]=a[0].slice(_),a.index=b.lastIndex,b.lastIndex+=a[0].length):b.lastIndex=0:v&&a&&(b.lastIndex=b.global?a.index+a[0].length:i),y&&a&&a.length>1&&p.call(a[0],n,(function(){for(f=1;f<arguments.length-2;f++)void 0===arguments[f]&&(a[f]=void 0)})),a&&S)for(a.groups=l=c(null),f=0;f<S.length;f++)m=S[f],l[m[0]]=a[m[1]];return a}),t.exports=d},"94ca":function(t,e,n){var r=n("d039"),o=/#|\.prototype\./,i=function(t,e){var n=c[a(t)];return n==f||n!=u&&("function"==typeof e?r(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=i.data={},u=i.NATIVE="N",f=i.POLYFILL="P";t.exports=i},"9bdd":function(t,e,n){var r=n("825a"),o=n("2a62");t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(a){throw o(t),a}}},"9bf2":function(t,e,n){var r=n("83ab"),o=n("0cfb"),i=n("825a"),a=n("a04b"),c=Object.defineProperty;e.f=r?c:function(t,e,n){if(i(t),e=a(e),i(n),o)try{return c(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"9ed3":function(t,e,n){"use strict";var r=n("ae93").IteratorPrototype,o=n("7c73"),i=n("5c6c"),a=n("d44e"),c=n("3f8c"),u=function(){return this};t.exports=function(t,e,n){var f=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),a(t,f,!1,!0),c[f]=u,t}},"9f7f":function(t,e,n){var r=n("d039"),o=n("da84"),i=o.RegExp;e.UNSUPPORTED_Y=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},a04b:function(t,e,n){var r=n("c04e"),o=n("d9b5");t.exports=function(t){var e=r(t,"string");return o(e)?e:String(e)}},a4b4:function(t,e,n){var r=n("342f");t.exports=/web0s(?!.*chrome)/i.test(r)},a4d3:function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("d066"),a=n("c430"),c=n("83ab"),u=n("4930"),f=n("d039"),l=n("5135"),s=n("e8b5"),p=n("861d"),d=n("d9b5"),v=n("825a"),h=n("7b0b"),y=n("fc6a"),m=n("a04b"),b=n("577e"),g=n("5c6c"),w=n("7c73"),x=n("df75"),S=n("241c"),O=n("057f"),E=n("7418"),T=n("06cf"),_=n("9bf2"),A=n("d1e7"),j=n("9112"),N=n("6eeb"),R=n("5692"),k=n("f772"),L=n("d012"),I=n("90e3"),P=n("b622"),C=n("e538"),M=n("746f"),D=n("d44e"),F=n("69f3"),U=n("b727").forEach,H=k("hidden"),z="Symbol",B="prototype",G=P("toPrimitive"),W=F.set,$=F.getterFor(z),q=Object[B],Y=o.Symbol,V=i("JSON","stringify"),K=T.f,X=_.f,J=O.f,Z=A.f,Q=R("symbols"),tt=R("op-symbols"),et=R("string-to-symbol-registry"),nt=R("symbol-to-string-registry"),rt=R("wks"),ot=o.QObject,it=!ot||!ot[B]||!ot[B].findChild,at=c&&f((function(){return 7!=w(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=K(q,e);r&&delete q[e],X(t,e,n),r&&t!==q&&X(q,e,r)}:X,ct=function(t,e){var n=Q[t]=w(Y[B]);return W(n,{type:z,tag:t,description:e}),c||(n.description=e),n},ut=function(t,e,n){t===q&&ut(tt,e,n),v(t);var r=m(e);return v(n),l(Q,r)?(n.enumerable?(l(t,H)&&t[H][r]&&(t[H][r]=!1),n=w(n,{enumerable:g(0,!1)})):(l(t,H)||X(t,H,g(1,{})),t[H][r]=!0),at(t,r,n)):X(t,r,n)},ft=function(t,e){v(t);var n=y(e),r=x(n).concat(vt(n));return U(r,(function(e){c&&!st.call(n,e)||ut(t,e,n[e])})),t},lt=function(t,e){return void 0===e?w(t):ft(w(t),e)},st=function(t){var e=m(t),n=Z.call(this,e);return!(this===q&&l(Q,e)&&!l(tt,e))&&(!(n||!l(this,e)||!l(Q,e)||l(this,H)&&this[H][e])||n)},pt=function(t,e){var n=y(t),r=m(e);if(n!==q||!l(Q,r)||l(tt,r)){var o=K(n,r);return!o||!l(Q,r)||l(n,H)&&n[H][r]||(o.enumerable=!0),o}},dt=function(t){var e=J(y(t)),n=[];return U(e,(function(t){l(Q,t)||l(L,t)||n.push(t)})),n},vt=function(t){var e=t===q,n=J(e?tt:y(t)),r=[];return U(n,(function(t){!l(Q,t)||e&&!l(q,t)||r.push(Q[t])})),r};if(u||(Y=function(){if(this instanceof Y)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?b(arguments[0]):void 0,e=I(t),n=function(t){this===q&&n.call(tt,t),l(this,H)&&l(this[H],e)&&(this[H][e]=!1),at(this,e,g(1,t))};return c&&it&&at(q,e,{configurable:!0,set:n}),ct(e,t)},N(Y[B],"toString",(function(){return $(this).tag})),N(Y,"withoutSetter",(function(t){return ct(I(t),t)})),A.f=st,_.f=ut,T.f=pt,S.f=O.f=dt,E.f=vt,C.f=function(t){return ct(P(t),t)},c&&(X(Y[B],"description",{configurable:!0,get:function(){return $(this).description}}),a||N(q,"propertyIsEnumerable",st,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:Y}),U(x(rt),(function(t){M(t)})),r({target:z,stat:!0,forced:!u},{for:function(t){var e=b(t);if(l(et,e))return et[e];var n=Y(e);return et[e]=n,nt[n]=e,n},keyFor:function(t){if(!d(t))throw TypeError(t+" is not a symbol");if(l(nt,t))return nt[t]},useSetter:function(){it=!0},useSimple:function(){it=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:lt,defineProperty:ut,defineProperties:ft,getOwnPropertyDescriptor:pt}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:dt,getOwnPropertySymbols:vt}),r({target:"Object",stat:!0,forced:f((function(){E.f(1)}))},{getOwnPropertySymbols:function(t){return E.f(h(t))}}),V){var ht=!u||f((function(){var t=Y();return"[null]"!=V([t])||"{}"!=V({a:t})||"{}"!=V(Object(t))}));r({target:"JSON",stat:!0,forced:ht},{stringify:function(t,e,n){var r,o=[t],i=1;while(arguments.length>i)o.push(arguments[i++]);if(r=e,(p(e)||void 0!==t)&&!d(t))return s(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!d(e))return e}),o[1]=e,V.apply(null,o)}})}Y[B][G]||j(Y[B],G,Y[B].valueOf),D(Y,z),L[H]=!0},a572:function(t,e,n){"use strict"; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */var r=window.$.fn.trigger;function o(t,e){var n=!0,o=t.type||t,i="on".concat(o);function a(t){if(!(n&&(n=!1,t[i]||t[o]instanceof Function&&("click"!==o||"A"!==t.tagName.toUpperCase())))&&(!(window.$._data(t,"events")||{})[o]||!window.$._data(t,"handle"))&&t.dispatchEvent){var e=new Event(o,{bubbles:!1,cancelable:!0});t.dispatchEvent(e)}}function c(t){a(t);var e=t.parentElement;e&&c(e)}var u=r.call(this,t,e);return"focus"===o||"blur"===o||this.each((function(){c(this)})),u}window.$.fn.trigger=o},a630:function(t,e,n){var r=n("23e7"),o=n("4df4"),i=n("1c7e"),a=!i((function(t){Array.from(t)}));r({target:"Array",stat:!0,forced:a},{from:o})},a640:function(t,e,n){"use strict";var r=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},a691:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},a79d:function(t,e,n){"use strict";var r=n("23e7"),o=n("c430"),i=n("fea9"),a=n("d039"),c=n("d066"),u=n("4840"),f=n("cdf9"),l=n("6eeb"),s=!!i&&a((function(){i.prototype["finally"].call({then:function(){}},(function(){}))}));if(r({target:"Promise",proto:!0,real:!0,forced:s},{finally:function(t){var e=u(this,c("Promise")),n="function"==typeof t;return this.then(n?function(n){return f(e,t()).then((function(){return n}))}:t,n?function(n){return f(e,t()).then((function(){throw n}))}:t)}}),!o&&"function"==typeof i){var p=c("Promise").prototype["finally"];i.prototype["finally"]!==p&&l(i.prototype,"finally",p,{unsafe:!0})}},ab13:function(t,e,n){var r=n("b622"),o=r("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[o]=!1,"/./"[t](e)}catch(r){}}return!1}},ac1f:function(t,e,n){"use strict";var r=n("23e7"),o=n("9263");r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},ad6d:function(t,e,n){"use strict";var r=n("825a");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},ae93:function(t,e,n){"use strict";var r,o,i,a=n("d039"),c=n("e163"),u=n("9112"),f=n("5135"),l=n("b622"),s=n("c430"),p=l("iterator"),d=!1,v=function(){return this};[].keys&&(i=[].keys(),"next"in i?(o=c(c(i)),o!==Object.prototype&&(r=o)):d=!0);var h=void 0==r||a((function(){var t={};return r[p].call(t)!==t}));h&&(r={}),s&&!h||f(r,p)||u(r,p,v),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},b041:function(t,e,n){"use strict";var r=n("00ee"),o=n("f5df");t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},b575:function(t,e,n){var r,o,i,a,c,u,f,l,s=n("da84"),p=n("06cf").f,d=n("2cf4").set,v=n("1cdc"),h=n("d4c3"),y=n("a4b4"),m=n("605d"),b=s.MutationObserver||s.WebKitMutationObserver,g=s.document,w=s.process,x=s.Promise,S=p(s,"queueMicrotask"),O=S&&S.value;O||(r=function(){var t,e;m&&(t=w.domain)&&t.exit();while(o){e=o.fn,o=o.next;try{e()}catch(n){throw o?a():i=void 0,n}}i=void 0,t&&t.enter()},v||m||y||!b||!g?!h&&x&&x.resolve?(f=x.resolve(void 0),f.constructor=x,l=f.then,a=function(){l.call(f,r)}):a=m?function(){w.nextTick(r)}:function(){d.call(s,r)}:(c=!0,u=g.createTextNode(""),new b(r).observe(u,{characterData:!0}),a=function(){u.data=c=!c})),t.exports=O||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},b622:function(t,e,n){var r=n("da84"),o=n("5692"),i=n("5135"),a=n("90e3"),c=n("4930"),u=n("fdbf"),f=o("wks"),l=r.Symbol,s=u?l:l&&l.withoutSetter||a;t.exports=function(t){return i(f,t)&&(c||"string"==typeof f[t])||(c&&i(l,t)?f[t]=l[t]:f[t]=s("Symbol."+t)),f[t]}},b727:function(t,e,n){var r=n("0366"),o=n("44ad"),i=n("7b0b"),a=n("50c4"),c=n("65f0"),u=[].push,f=function(t){var e=1==t,n=2==t,f=3==t,l=4==t,s=6==t,p=7==t,d=5==t||s;return function(v,h,y,m){for(var b,g,w=i(v),x=o(w),S=r(h,y,3),O=a(x.length),E=0,T=m||c,_=e?T(v,O):n||p?T(v,0):void 0;O>E;E++)if((d||E in x)&&(b=x[E],g=S(b,E,w),t))if(e)_[E]=g;else if(g)switch(t){case 3:return!0;case 5:return b;case 6:return E;case 2:u.call(_,b)}else switch(t){case 4:return!1;case 7:u.call(_,b)}return s?-1:f||l?l:_}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},c04e:function(t,e,n){var r=n("861d"),o=n("d9b5"),i=n("485a"),a=n("b622"),c=a("toPrimitive");t.exports=function(t,e){if(!r(t)||o(t))return t;var n,a=t[c];if(void 0!==a){if(void 0===e&&(e="default"),n=a.call(t,e),!r(n)||o(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),i(t,e)}},c0c4:function(t,e,n){ /*! @license DOMPurify 2.5.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.6/LICENSE */ (function(e,n){t.exports=n()})(0,(function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,n){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,n)}function n(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function r(t,o,i){return r=n()?Reflect.construct:function(t,n,r){var o=[null];o.push.apply(o,n);var i=Function.bind.apply(t,o),a=new i;return r&&e(a,r.prototype),a},r.apply(null,arguments)}function o(t){return i(t)||a(t)||c(t)||f()}function i(t){if(Array.isArray(t))return u(t)}function a(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function c(t,e){if(t){if("string"===typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l=Object.hasOwnProperty,s=Object.setPrototypeOf,p=Object.isFrozen,d=Object.getPrototypeOf,v=Object.getOwnPropertyDescriptor,h=Object.freeze,y=Object.seal,m=Object.create,b="undefined"!==typeof Reflect&&Reflect,g=b.apply,w=b.construct;g||(g=function(t,e,n){return t.apply(e,n)}),h||(h=function(t){return t}),y||(y=function(t){return t}),w||(w=function(t,e){return r(t,o(e))});var x=L(Array.prototype.forEach),S=L(Array.prototype.pop),O=L(Array.prototype.push),E=L(String.prototype.toLowerCase),T=L(String.prototype.toString),_=L(String.prototype.match),A=L(String.prototype.replace),j=L(String.prototype.indexOf),N=L(String.prototype.trim),R=L(RegExp.prototype.test),k=I(TypeError);function L(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return g(t,e,r)}}function I(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return w(t,n)}}function P(t,e,n){var r;n=null!==(r=n)&&void 0!==r?r:E,s&&s(t,null);var o=e.length;while(o--){var i=e[o];if("string"===typeof i){var a=n(i);a!==i&&(p(e)||(e[o]=a),i=a)}t[i]=!0}return t}function C(t){var e,n=m(null);for(e in t)!0===g(l,t,[e])&&(n[e]=t[e]);return n}function M(t,e){while(null!==t){var n=v(t,e);if(n){if(n.get)return L(n.get);if("function"===typeof n.value)return L(n.value)}t=d(t)}function r(t){return console.warn("fallback value for",t),null}return r}var D=h(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F=h(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),U=h(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),H=h(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),z=h(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),B=h(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),G=h(["#text"]),W=h(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),$=h(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),q=h(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Y=h(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=y(/\{\{[\w\W]*|[\w\W]*\}\}/gm),K=y(/<%[\w\W]*|[\w\W]*%>/gm),X=y(/\${[\w\W]*}/gm),J=y(/^data-[\-\w.\u00B7-\uFFFF]/),Z=y(/^aria-[\-\w]+$/),Q=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tt=y(/^(?:\w+script|data):/i),et=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nt=y(/^html$/i),rt=y(/^[a-z][.\w]*(-[.\w]+)+$/i),ot=function(){return"undefined"===typeof window?null:window},it=function(e,n){if("object"!==t(e)||"function"!==typeof e.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(a){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function at(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ot(),n=function(t){return at(t)};if(n.version="2.5.6",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,i=e.document,a=e.DocumentFragment,c=e.HTMLTemplateElement,u=e.Node,f=e.Element,l=e.NodeFilter,s=e.NamedNodeMap,p=void 0===s?e.NamedNodeMap||e.MozNamedAttrMap:s,d=e.HTMLFormElement,v=e.DOMParser,y=e.trustedTypes,m=f.prototype,b=M(m,"cloneNode"),g=M(m,"nextSibling"),w=M(m,"childNodes"),L=M(m,"parentNode");if("function"===typeof c){var I=i.createElement("template");I.content&&I.content.ownerDocument&&(i=I.content.ownerDocument)}var ct=it(y,r),ut=ct?ct.createHTML(""):"",ft=i,lt=ft.implementation,st=ft.createNodeIterator,pt=ft.createDocumentFragment,dt=ft.getElementsByTagName,vt=r.importNode,ht={};try{ht=C(i).documentMode?i.documentMode:{}}catch(Me){}var yt={};n.isSupported="function"===typeof L&<&&void 0!==lt.createHTMLDocument&&9!==ht;var mt,bt,gt=V,wt=K,xt=X,St=J,Ot=Z,Et=tt,Tt=et,_t=rt,At=Q,jt=null,Nt=P({},[].concat(o(D),o(F),o(U),o(z),o(G))),Rt=null,kt=P({},[].concat(o(W),o($),o(q),o(Y))),Lt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),It=null,Pt=null,Ct=!0,Mt=!0,Dt=!1,Ft=!0,Ut=!1,Ht=!0,zt=!1,Bt=!1,Gt=!1,Wt=!1,$t=!1,qt=!1,Yt=!0,Vt=!1,Kt="user-content-",Xt=!0,Jt=!1,Zt={},Qt=null,te=P({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ee=null,ne=P({},["audio","video","img","source","image","track"]),re=null,oe=P({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ie="http://www.w3.org/1998/Math/MathML",ae="http://www.w3.org/2000/svg",ce="http://www.w3.org/1999/xhtml",ue=ce,fe=!1,le=null,se=P({},[ie,ae,ce],T),pe=["application/xhtml+xml","text/html"],de="text/html",ve=null,he=i.createElement("form"),ye=function(t){return t instanceof RegExp||t instanceof Function},me=function(e){ve&&ve===e||(e&&"object"===t(e)||(e={}),e=C(e),mt=mt=-1===pe.indexOf(e.PARSER_MEDIA_TYPE)?de:e.PARSER_MEDIA_TYPE,bt="application/xhtml+xml"===mt?T:E,jt="ALLOWED_TAGS"in e?P({},e.ALLOWED_TAGS,bt):Nt,Rt="ALLOWED_ATTR"in e?P({},e.ALLOWED_ATTR,bt):kt,le="ALLOWED_NAMESPACES"in e?P({},e.ALLOWED_NAMESPACES,T):se,re="ADD_URI_SAFE_ATTR"in e?P(C(oe),e.ADD_URI_SAFE_ATTR,bt):oe,ee="ADD_DATA_URI_TAGS"in e?P(C(ne),e.ADD_DATA_URI_TAGS,bt):ne,Qt="FORBID_CONTENTS"in e?P({},e.FORBID_CONTENTS,bt):te,It="FORBID_TAGS"in e?P({},e.FORBID_TAGS,bt):{},Pt="FORBID_ATTR"in e?P({},e.FORBID_ATTR,bt):{},Zt="USE_PROFILES"in e&&e.USE_PROFILES,Ct=!1!==e.ALLOW_ARIA_ATTR,Mt=!1!==e.ALLOW_DATA_ATTR,Dt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ft=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ut=e.SAFE_FOR_TEMPLATES||!1,Ht=!1!==e.SAFE_FOR_XML,zt=e.WHOLE_DOCUMENT||!1,Wt=e.RETURN_DOM||!1,$t=e.RETURN_DOM_FRAGMENT||!1,qt=e.RETURN_TRUSTED_TYPE||!1,Gt=e.FORCE_BODY||!1,Yt=!1!==e.SANITIZE_DOM,Vt=e.SANITIZE_NAMED_PROPS||!1,Xt=!1!==e.KEEP_CONTENT,Jt=e.IN_PLACE||!1,At=e.ALLOWED_URI_REGEXP||At,ue=e.NAMESPACE||ce,Lt=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ye(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Lt.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ye(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Lt.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Lt.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ut&&(Mt=!1),$t&&(Wt=!0),Zt&&(jt=P({},o(G)),Rt=[],!0===Zt.html&&(P(jt,D),P(Rt,W)),!0===Zt.svg&&(P(jt,F),P(Rt,$),P(Rt,Y)),!0===Zt.svgFilters&&(P(jt,U),P(Rt,$),P(Rt,Y)),!0===Zt.mathMl&&(P(jt,z),P(Rt,q),P(Rt,Y))),e.ADD_TAGS&&(jt===Nt&&(jt=C(jt)),P(jt,e.ADD_TAGS,bt)),e.ADD_ATTR&&(Rt===kt&&(Rt=C(Rt)),P(Rt,e.ADD_ATTR,bt)),e.ADD_URI_SAFE_ATTR&&P(re,e.ADD_URI_SAFE_ATTR,bt),e.FORBID_CONTENTS&&(Qt===te&&(Qt=C(Qt)),P(Qt,e.FORBID_CONTENTS,bt)),Xt&&(jt["#text"]=!0),zt&&P(jt,["html","head","body"]),jt.table&&(P(jt,["tbody"]),delete It.tbody),h&&h(e),ve=e)},be=P({},["mi","mo","mn","ms","mtext"]),ge=P({},["foreignobject","annotation-xml"]),we=P({},["title","style","font","a","script"]),xe=P({},F);P(xe,U),P(xe,H);var Se=P({},z);P(Se,B);var Oe=function(t){var e=L(t);e&&e.tagName||(e={namespaceURI:ue,tagName:"template"});var n=E(t.tagName),r=E(e.tagName);return!!le[t.namespaceURI]&&(t.namespaceURI===ae?e.namespaceURI===ce?"svg"===n:e.namespaceURI===ie?"svg"===n&&("annotation-xml"===r||be[r]):Boolean(xe[n]):t.namespaceURI===ie?e.namespaceURI===ce?"math"===n:e.namespaceURI===ae?"math"===n&&ge[r]:Boolean(Se[n]):t.namespaceURI===ce?!(e.namespaceURI===ae&&!ge[r])&&(!(e.namespaceURI===ie&&!be[r])&&(!Se[n]&&(we[n]||!xe[n]))):!("application/xhtml+xml"!==mt||!le[t.namespaceURI]))},Ee=function(t){O(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(Me){try{t.outerHTML=ut}catch(Me){t.remove()}}},Te=function(t,e){try{O(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(Me){O(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!Rt[t])if(Wt||$t)try{Ee(e)}catch(Me){}else try{e.setAttribute(t,"")}catch(Me){}},_e=function(t){var e,n;if(Gt)t="<remove></remove>"+t;else{var r=_(t,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===mt&&ue===ce&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var o=ct?ct.createHTML(t):t;if(ue===ce)try{e=(new v).parseFromString(o,mt)}catch(Me){}if(!e||!e.documentElement){e=lt.createDocument(ue,"template",null);try{e.documentElement.innerHTML=fe?ut:o}catch(Me){}}var a=e.body||e.documentElement;return t&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),ue===ce?dt.call(e,zt?"html":"body")[0]:zt?e.documentElement:a},Ae=function(t){return st.call(t.ownerDocument||t,t,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null,!1)},je=function(t){return t instanceof d&&("string"!==typeof t.nodeName||"string"!==typeof t.textContent||"function"!==typeof t.removeChild||!(t.attributes instanceof p)||"function"!==typeof t.removeAttribute||"function"!==typeof t.setAttribute||"string"!==typeof t.namespaceURI||"function"!==typeof t.insertBefore||"function"!==typeof t.hasChildNodes)},Ne=function(e){return"object"===t(u)?e instanceof u:e&&"object"===t(e)&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName},Re=function(t,e,r){yt[t]&&x(yt[t],(function(t){t.call(n,e,r,ve)}))},ke=function(t){var e;if(Re("beforeSanitizeElements",t,null),je(t))return Ee(t),!0;if(R(/[\u0080-\uFFFF]/,t.nodeName))return Ee(t),!0;var r=bt(t.nodeName);if(Re("uponSanitizeElement",t,{tagName:r,allowedTags:jt}),t.hasChildNodes()&&!Ne(t.firstElementChild)&&(!Ne(t.content)||!Ne(t.content.firstElementChild))&&R(/<[/\w]/g,t.innerHTML)&&R(/<[/\w]/g,t.textContent))return Ee(t),!0;if("select"===r&&R(/<template/i,t.innerHTML))return Ee(t),!0;if(7===t.nodeType)return Ee(t),!0;if(Ht&&8===t.nodeType&&R(/<[/\w]/g,t.data))return Ee(t),!0;if(!jt[r]||It[r]){if(!It[r]&&Ie(r)){if(Lt.tagNameCheck instanceof RegExp&&R(Lt.tagNameCheck,r))return!1;if(Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(r))return!1}if(Xt&&!Qt[r]){var o=L(t)||t.parentNode,i=w(t)||t.childNodes;if(i&&o)for(var a=i.length,c=a-1;c>=0;--c){var u=b(i[c],!0);u.__removalCount=(t.__removalCount||0)+1,o.insertBefore(u,g(t))}}return Ee(t),!0}return t instanceof f&&!Oe(t)?(Ee(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!R(/<\/no(script|embed|frames)/i,t.innerHTML)?(Ut&&3===t.nodeType&&(e=t.textContent,e=A(e,gt," "),e=A(e,wt," "),e=A(e,xt," "),t.textContent!==e&&(O(n.removed,{element:t.cloneNode()}),t.textContent=e)),Re("afterSanitizeElements",t,null),!1):(Ee(t),!0)},Le=function(t,e,n){if(Yt&&("id"===e||"name"===e)&&(n in i||n in he))return!1;if(Mt&&!Pt[e]&&R(St,e));else if(Ct&&R(Ot,e));else if(!Rt[e]||Pt[e]){if(!(Ie(t)&&(Lt.tagNameCheck instanceof RegExp&&R(Lt.tagNameCheck,t)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(t))&&(Lt.attributeNameCheck instanceof RegExp&&R(Lt.attributeNameCheck,e)||Lt.attributeNameCheck instanceof Function&&Lt.attributeNameCheck(e))||"is"===e&&Lt.allowCustomizedBuiltInElements&&(Lt.tagNameCheck instanceof RegExp&&R(Lt.tagNameCheck,n)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(n))))return!1}else if(re[e]);else if(R(At,A(n,Tt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==j(n,"data:")||!ee[t]){if(Dt&&!R(Et,A(n,Tt,"")));else if(n)return!1}else;return!0},Ie=function(t){return"annotation-xml"!==t&&_(t,_t)},Pe=function(e){var r,o,i,a;Re("beforeSanitizeAttributes",e,null);var c=e.attributes;if(c){var u={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Rt};a=c.length;while(a--){r=c[a];var f=r,l=f.name,s=f.namespaceURI;if(o="value"===l?r.value:N(r.value),i=bt(l),u.attrName=i,u.attrValue=o,u.keepAttr=!0,u.forceKeepAttr=void 0,Re("uponSanitizeAttribute",e,u),o=u.attrValue,Ht&&R(/((--!?|])>)|<\/(style|title)/i,o))Te(l,e);else if(!u.forceKeepAttr&&(Te(l,e),u.keepAttr))if(Ft||!R(/\/>/i,o)){Ut&&(o=A(o,gt," "),o=A(o,wt," "),o=A(o,xt," "));var p=bt(e.nodeName);if(Le(p,i,o)){if(!Vt||"id"!==i&&"name"!==i||(Te(l,e),o=Kt+o),ct&&"object"===t(y)&&"function"===typeof y.getAttributeType)if(s);else switch(y.getAttributeType(p,i)){case"TrustedHTML":o=ct.createHTML(o);break;case"TrustedScriptURL":o=ct.createScriptURL(o);break}try{s?e.setAttributeNS(s,l,o):e.setAttribute(l,o),je(e)?Ee(e):S(n.removed)}catch(Me){}}}else Te(l,e)}Re("afterSanitizeAttributes",e,null)}},Ce=function t(e){var n,r=Ae(e);Re("beforeSanitizeShadowDOM",e,null);while(n=r.nextNode())Re("uponSanitizeShadowNode",n,null),ke(n)||(n.content instanceof a&&t(n.content),Pe(n));Re("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(o){var i,c,f,l,s,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(fe=!o,fe&&(o="\x3c!--\x3e"),"string"!==typeof o&&!Ne(o)){if("function"!==typeof o.toString)throw k("toString is not a function");if(o=o.toString(),"string"!==typeof o)throw k("dirty is not a string, aborting")}if(!n.isSupported){if("object"===t(e.toStaticHTML)||"function"===typeof e.toStaticHTML){if("string"===typeof o)return e.toStaticHTML(o);if(Ne(o))return e.toStaticHTML(o.outerHTML)}return o}if(Bt||me(p),n.removed=[],"string"===typeof o&&(Jt=!1),Jt){if(o.nodeName){var d=bt(o.nodeName);if(!jt[d]||It[d])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(o instanceof u)i=_e("\x3c!----\x3e"),c=i.ownerDocument.importNode(o,!0),1===c.nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?i=c:i.appendChild(c);else{if(!Wt&&!Ut&&!zt&&-1===o.indexOf("<"))return ct&&qt?ct.createHTML(o):o;if(i=_e(o),!i)return Wt?null:qt?ut:""}i&&Gt&&Ee(i.firstChild);var v=Ae(Jt?o:i);while(f=v.nextNode())3===f.nodeType&&f===l||ke(f)||(f.content instanceof a&&Ce(f.content),Pe(f),l=f);if(l=null,Jt)return o;if(Wt){if($t){s=pt.call(i.ownerDocument);while(i.firstChild)s.appendChild(i.firstChild)}else s=i;return(Rt.shadowroot||Rt.shadowrootmod)&&(s=vt.call(r,s,!0)),s}var h=zt?i.outerHTML:i.innerHTML;return zt&&jt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&R(nt,i.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+h),Ut&&(h=A(h,gt," "),h=A(h,wt," "),h=A(h,xt," ")),ct&&qt?ct.createHTML(h):h},n.setConfig=function(t){me(t),Bt=!0},n.clearConfig=function(){ve=null,Bt=!1},n.isValidAttribute=function(t,e,n){ve||me({});var r=bt(t),o=bt(e);return Le(r,o,n)},n.addHook=function(t,e){"function"===typeof e&&(yt[t]=yt[t]||[],O(yt[t],e))},n.removeHook=function(t){if(yt[t])return S(yt[t])},n.removeHooks=function(t){yt[t]&&(yt[t]=[])},n.removeAllHooks=function(){yt={}},n}var ct=at();return ct}))},c1f9:function(t,e,n){var r=n("23e7"),o=n("2266"),i=n("8418");r({target:"Object",stat:!0},{fromEntries:function(t){var e={};return o(t,(function(t,n){i(e,t,n)}),{AS_ENTRIES:!0}),e}})},c430:function(t,e){t.exports=!1},c6b6:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},c6cd:function(t,e,n){var r=n("da84"),o=n("ce4e"),i="__core-js_shared__",a=r[i]||o(i,{});t.exports=a},c8d2:function(t,e,n){var r=n("d039"),o=n("5899"),i=" ";t.exports=function(t){return r((function(){return!!o[t]()||i[t]()!=i||o[t].name!==t}))}},ca84:function(t,e,n){var r=n("5135"),o=n("fc6a"),i=n("4d64").indexOf,a=n("d012");t.exports=function(t,e){var n,c=o(t),u=0,f=[];for(n in c)!r(a,n)&&r(c,n)&&f.push(n);while(e.length>u)r(c,n=e[u++])&&(~i(f,n)||f.push(n));return f}},caad:function(t,e,n){"use strict";var r=n("23e7"),o=n("4d64").includes,i=n("44d2");r({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},cc12:function(t,e,n){var r=n("da84"),o=n("861d"),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},cca6:function(t,e,n){var r=n("23e7"),o=n("60da");r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},cdf9:function(t,e,n){var r=n("825a"),o=n("861d"),i=n("f069");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),a=n.resolve;return a(e),n.promise}},ce4e:function(t,e,n){var r=n("da84");t.exports=function(t,e){try{Object.defineProperty(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,n){var r=n("da84"),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},d1e7:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},d28b:function(t,e,n){var r=n("746f");r("iterator")},d2bb:function(t,e,n){var r=n("825a"),o=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(n,[]),e=n instanceof Array}catch(i){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},d3b7:function(t,e,n){var r=n("00ee"),o=n("6eeb"),i=n("b041");r||o(Object.prototype,"toString",i,{unsafe:!0})},d44e:function(t,e,n){var r=n("9bf2").f,o=n("5135"),i=n("b622"),a=i("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,a)&&r(t,a,{configurable:!0,value:e})}},d4c3:function(t,e,n){var r=n("342f"),o=n("da84");t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},d58f:function(t,e,n){var r=n("1c0b"),o=n("7b0b"),i=n("44ad"),a=n("50c4"),c=function(t){return function(e,n,c,u){r(n);var f=o(e),l=i(f),s=a(f.length),p=t?s-1:0,d=t?-1:1;if(c<2)while(1){if(p in l){u=l[p],p+=d;break}if(p+=d,t?p<0:s<=p)throw TypeError("Reduce of empty array with no initial value")}for(;t?p>=0:s>p;p+=d)p in l&&(u=n(u,l[p],p,f));return u}};t.exports={left:c(!1),right:c(!0)}},d784:function(t,e,n){"use strict";n("ac1f");var r=n("6eeb"),o=n("9263"),i=n("d039"),a=n("b622"),c=n("9112"),u=a("species"),f=RegExp.prototype;t.exports=function(t,e,n,l){var s=a(t),p=!i((function(){var e={};return e[s]=function(){return 7},7!=""[t](e)})),d=p&&!i((function(){var e=!1,n=/a/;return"split"===t&&(n={},n.constructor={},n.constructor[u]=function(){return n},n.flags="",n[s]=/./[s]),n.exec=function(){return e=!0,null},n[s](""),!e}));if(!p||!d||n){var v=/./[s],h=e(s,""[t],(function(t,e,n,r,i){var a=e.exec;return a===o||a===f.exec?p&&!i?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}));r(String.prototype,t,h[0]),r(f,s,h[1])}l&&c(f[s],"sham",!0)}},d9b5:function(t,e,n){var r=n("d066"),o=n("fdbf");t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return"function"==typeof e&&Object(t)instanceof e}},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n("24aa"))},ddb0:function(t,e,n){var r=n("da84"),o=n("fdbc"),i=n("e260"),a=n("9112"),c=n("b622"),u=c("iterator"),f=c("toStringTag"),l=i.values;for(var s in o){var p=r[s],d=p&&p.prototype;if(d){if(d[u]!==l)try{a(d,u,l)}catch(h){d[u]=l}if(d[f]||a(d,f,s),o[s])for(var v in i)if(d[v]!==i[v])try{a(d,v,i[v])}catch(h){d[v]=i[v]}}}},df75:function(t,e,n){var r=n("ca84"),o=n("7839");t.exports=Object.keys||function(t){return r(t,o)}},e01a:function(t,e,n){"use strict";var r=n("23e7"),o=n("83ab"),i=n("da84"),a=n("5135"),c=n("861d"),u=n("9bf2").f,f=n("e893"),l=i.Symbol;if(o&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var s={},p=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof p?new l(t):void 0===t?l():l(t);return""===t&&(s[e]=!0),e};f(p,l);var d=p.prototype=l.prototype;d.constructor=p;var v=d.toString,h="Symbol(test)"==String(l("test")),y=/^Symbol\((.*)\)[^)]+$/;u(d,"description",{configurable:!0,get:function(){var t=c(this)?this.valueOf():this,e=v.call(t);if(a(s,t))return"";var n=h?e.slice(7,-1):e.replace(y,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},e163:function(t,e,n){var r=n("5135"),o=n("7b0b"),i=n("f772"),a=n("e177"),c=i("IE_PROTO"),u=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=o(t),r(t,c)?t[c]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},e177:function(t,e,n){var r=n("d039");t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e260:function(t,e,n){"use strict";var r=n("fc6a"),o=n("44d2"),i=n("3f8c"),a=n("69f3"),c=n("7dd0"),u="Array Iterator",f=a.set,l=a.getterFor(u);t.exports=c(Array,"Array",(function(t,e){f(this,{type:u,target:r(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},e2cc:function(t,e,n){var r=n("6eeb");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},e538:function(t,e,n){var r=n("b622");e.f=r},e667:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},e6cf:function(t,e,n){"use strict";var r,o,i,a,c=n("23e7"),u=n("c430"),f=n("da84"),l=n("d066"),s=n("fea9"),p=n("6eeb"),d=n("e2cc"),v=n("d2bb"),h=n("d44e"),y=n("2626"),m=n("861d"),b=n("1c0b"),g=n("19aa"),w=n("8925"),x=n("2266"),S=n("1c7e"),O=n("4840"),E=n("2cf4").set,T=n("b575"),_=n("cdf9"),A=n("44de"),j=n("f069"),N=n("e667"),R=n("69f3"),k=n("94ca"),L=n("b622"),I=n("6069"),P=n("605d"),C=n("2d00"),M=L("species"),D="Promise",F=R.get,U=R.set,H=R.getterFor(D),z=s&&s.prototype,B=s,G=z,W=f.TypeError,$=f.document,q=f.process,Y=j.f,V=Y,K=!!($&&$.createEvent&&f.dispatchEvent),X="function"==typeof PromiseRejectionEvent,J="unhandledrejection",Z="rejectionhandled",Q=0,tt=1,et=2,nt=1,rt=2,ot=!1,it=k(D,(function(){var t=w(B),e=t!==String(B);if(!e&&66===C)return!0;if(u&&!G["finally"])return!0;if(C>=51&&/native code/.test(t))return!1;var n=new B((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))},o=n.constructor={};return o[M]=r,ot=n.then((function(){}))instanceof r,!ot||!e&&I&&!X})),at=it||!S((function(t){B.all(t)["catch"]((function(){}))})),ct=function(t){var e;return!(!m(t)||"function"!=typeof(e=t.then))&&e},ut=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;T((function(){var r=t.value,o=t.state==tt,i=0;while(n.length>i){var a,c,u,f=n[i++],l=o?f.ok:f.fail,s=f.resolve,p=f.reject,d=f.domain;try{l?(o||(t.rejection===rt&&pt(t),t.rejection=nt),!0===l?a=r:(d&&d.enter(),a=l(r),d&&(d.exit(),u=!0)),a===f.promise?p(W("Promise-chain cycle")):(c=ct(a))?c.call(a,s,p):s(a)):p(r)}catch(v){d&&!u&&d.exit(),p(v)}}t.reactions=[],t.notified=!1,e&&!t.rejection&<(t)}))}},ft=function(t,e,n){var r,o;K?(r=$.createEvent("Event"),r.promise=e,r.reason=n,r.initEvent(t,!1,!0),f.dispatchEvent(r)):r={promise:e,reason:n},!X&&(o=f["on"+t])?o(r):t===J&&A("Unhandled promise rejection",n)},lt=function(t){E.call(f,(function(){var e,n=t.facade,r=t.value,o=st(t);if(o&&(e=N((function(){P?q.emit("unhandledRejection",r,n):ft(J,n,r)})),t.rejection=P||st(t)?rt:nt,e.error))throw e.value}))},st=function(t){return t.rejection!==nt&&!t.parent},pt=function(t){E.call(f,(function(){var e=t.facade;P?q.emit("rejectionHandled",e):ft(Z,e,t.value)}))},dt=function(t,e,n){return function(r){t(e,r,n)}},vt=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=et,ut(t,!0))},ht=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw W("Promise can't be resolved itself");var r=ct(e);r?T((function(){var n={done:!1};try{r.call(e,dt(ht,n,t),dt(vt,n,t))}catch(o){vt(n,o,t)}})):(t.value=e,t.state=tt,ut(t,!1))}catch(o){vt({done:!1},o,t)}}};if(it&&(B=function(t){g(this,B,D),b(t),r.call(this);var e=F(this);try{t(dt(ht,e),dt(vt,e))}catch(n){vt(e,n)}},G=B.prototype,r=function(t){U(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:Q,value:void 0})},r.prototype=d(G,{then:function(t,e){var n=H(this),r=Y(O(this,B));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=P?q.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=Q&&ut(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=F(t);this.promise=t,this.resolve=dt(ht,e),this.reject=dt(vt,e)},j.f=Y=function(t){return t===B||t===i?new o(t):V(t)},!u&&"function"==typeof s&&z!==Object.prototype)){a=z.then,ot||(p(z,"then",(function(t,e){var n=this;return new B((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),p(z,"catch",G["catch"],{unsafe:!0}));try{delete z.constructor}catch(yt){}v&&v(z,G)}c({global:!0,wrap:!0,forced:it},{Promise:B}),h(B,D,!1,!0),y(D),i=l(D),c({target:D,stat:!0,forced:it},{reject:function(t){var e=Y(this);return e.reject.call(void 0,t),e.promise}}),c({target:D,stat:!0,forced:u||it},{resolve:function(t){return _(u&&this===i?B:this,t)}}),c({target:D,stat:!0,forced:at},{all:function(t){var e=this,n=Y(e),r=n.resolve,o=n.reject,i=N((function(){var n=b(e.resolve),i=[],a=0,c=1;x(t,(function(t){var u=a++,f=!1;i.push(void 0),c++,n.call(e,t).then((function(t){f||(f=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=Y(e),r=n.reject,o=N((function(){var o=b(e.resolve);x(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},e893:function(t,e,n){var r=n("5135"),o=n("56ef"),i=n("06cf"),a=n("9bf2");t.exports=function(t,e){for(var n=o(e),c=a.f,u=i.f,f=0;f<n.length;f++){var l=n[f];r(t,l)||c(t,l,u(e,l))}}},e8b5:function(t,e,n){var r=n("c6b6");t.exports=Array.isArray||function(t){return"Array"==r(t)}},e95a:function(t,e,n){var r=n("b622"),o=n("3f8c"),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},f069:function(t,e,n){"use strict";var r=n("1c0b"),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},f5df:function(t,e,n){var r=n("00ee"),o=n("c6b6"),i=n("b622"),a=i("toStringTag"),c="Arguments"==o(function(){return arguments}()),u=function(t,e){try{return t[e]}catch(n){}};t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=u(e=Object(t),a))?n:c?o(e):"Object"==(r=o(e))&&"function"==typeof e.callee?"Arguments":r}},f772:function(t,e,n){var r=n("5692"),o=n("90e3"),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},fb6a:function(t,e,n){"use strict";var r=n("23e7"),o=n("861d"),i=n("e8b5"),a=n("23cb"),c=n("50c4"),u=n("fc6a"),f=n("8418"),l=n("b622"),s=n("1dde"),p=s("slice"),d=l("species"),v=[].slice,h=Math.max;r({target:"Array",proto:!0,forced:!p},{slice:function(t,e){var n,r,l,s=u(this),p=c(s.length),y=a(t,p),m=a(void 0===e?p:e,p);if(i(s)&&(n=s.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?o(n)&&(n=n[d],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return v.call(s,y,m);for(r=new(void 0===n?Array:n)(h(m-y,0)),l=0;y<m;y++,l++)y in s&&f(r,l,s[y]);return r.length=l,r}})},fc6a:function(t,e,n){var r=n("44ad"),o=n("1d80");t.exports=function(t){return r(o(t))}},fce3:function(t,e,n){var r=n("d039"),o=n("da84"),i=o.RegExp;t.exports=r((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fea9:function(t,e,n){var r=n("da84");t.exports=r.Promise}}); //# (function(window){var MODULE_SPLIT_REGEX=/[\/.\\]/;window.require=function(moduleId){var parts=moduleId.split(MODULE_SPLIT_REGEX);var currentModule=window;for(var i=0;i!=parts.length;++i){var part=parts[i];currentModule[part]=currentModule[part]||{};currentModule=currentModule[part];} return currentModule;};})(window); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function _pk_translate(translationStringId,values){if(typeof(piwik_translations)!=='undefined'&&typeof(piwik_translations[translationStringId])!='undefined'){var translation=piwik_translations[translationStringId];if(typeof values!='undefined'&&values&&values.length){values.unshift(translation);return sprintf.apply(null,values);}else{translation=translation.replaceAll('%%','%');} return translation;} return"The string "+translationStringId+" was not loaded in javascript. Make sure it is added in the Translate.getClientSideTranslationKeys hook.";} function _pk_externalRawLink(url,values){if(!url){return'';} const campaignOverride=(typeof values!='undefined'&&values.length>0&&values[0]?values[0]:null);const sourceOverride=(typeof values!='undefined'&&values.length>1&&values[1]?values[1]:null);const mediumOverride=(typeof values!='undefined'&&values.length>2&&values[2]?values[2]:null);let returnURL=null;try{returnURL=new URL(url);}catch(error){console.log('Error parsing URL: '+url);} if(!returnURL){return'';} const validDomain=returnURL.host==='matomo.org'||returnURL.host.endsWith('.matomo.org');const urlParams=new URLSearchParams(window.location.search);const module=urlParams.get('module');const action=urlParams.get('action');if(validDomain&&!window.piwik.disableTrackingMatomoAppLinks&&((module&&action)||mediumOverride)){const campaign=(campaignOverride===null?'Matomo_App':campaignOverride);let source=(window.Cloud===undefined?'Matomo_App_OnPremise':'Matomo_App_Cloud');if(sourceOverride!==null){source=sourceOverride;} const medium=(mediumOverride===null?'App.'+module+'.'+action:mediumOverride);returnURL.searchParams.set('mtm_campaign',campaign);returnURL.searchParams.set('mtm_source',source);returnURL.searchParams.set('mtm_medium',medium);} return returnURL.toString();} window.piwikHelper={htmlDecode:function(value){var textArea=document.createElement('textarea');textArea.innerHTML=value;return textArea.value;},sendContentAsDownload:function(filename,content,mimeType){if(!mimeType){mimeType='text/plain';} function downloadFile(content){var node=document.createElement('a');node.style.display='none';if('string'===typeof content){node.setAttribute('href','data:'+mimeType+';charset=utf-8,'+encodeURIComponent(content));}else{node.href=window.URL.createObjectURL(blob);} node.setAttribute('download',filename);document.body.appendChild(node);node.click();document.body.removeChild(node);} var node;if('function'===typeof Blob){try{var blob=new Blob([content],{type:mimeType});if(window.navigator.msSaveOrOpenBlob){window.navigator.msSaveBlob(blob,filename);return;}else{downloadFile(blob);return;}}catch(e){downloadFile(content);}} downloadFile(content);},log:function(){try{console.log.apply(console,arguments);}catch(e){try{opera.postError.apply(opera,arguments);}catch(f){}}},error:function(){try{console.error.apply(console,arguments);}catch(e){try{opera.postError.apply(opera,arguments);}catch(f){alert(Array.prototype.join.call(arguments,' '));}}},htmlEntities:function(value){if(!value){return value;} var findReplace=[[/&/g,"&"],[/</g,"<"],[/>/g,">"],[/"/g,"""],[/{{/g,'{⁣{']];for(var item in findReplace){value=value.replace(findReplace[item][0],findReplace[item][1]);} return value;},escape:function(value){return window.vueSanitize(value);},addBreakpoints:function(text,breakpointMarkup){return text.replace(/([\/&=?\.%#:_-])/g,'$1'+ (typeof breakpointMarkup=='undefined'?'<wbr>​':breakpointMarkup));},addBreakpointsToUrl:function(url){try{url=decodeURIComponent(url);}catch(e){} url=piwikHelper.addBreakpoints(url,'|||');url=$(document.createElement('p')).text(url).html();url=url.replace(/\|\|\|/g,'<wbr />​');return url;},compileVueEntryComponents:function(selector,extraProps){function toCamelCase(arg){return arg[0]+arg.substring(1).replace(/-[a-z]/g,function(s){return s[1].toUpperCase();});} function toKebabCase(arg){return arg[0].toLowerCase()+arg.substring(1).replace(/[A-Z]/g,function(s){return'-'+s[0].toLowerCase();});} $('[vue-entry]',selector).add($(selector).filter('[vue-entry]')).each(function(){if($(this).closest('[vue-entry-ignore]').length){return;} var entry=$(this).attr('vue-entry');var componentsToRegister=($(this).attr('vue-components')||'').split(/\s+/).filter(function(s){return!!s.length;});var parts=entry.split('.');if(parts.length!==2){throw new Error('Expects vue-entry to have format Plugin.Component, where Component is exported Vue component. Got: '+entry);} var useExternalPluginComponent=CoreHome.useExternalPluginComponent;var createVueApp=CoreHome.createVueApp;var component;var shouldLoadOnDemand=(piwik.pluginsToLoadOnDemand||[]).indexOf(parts[0])!==-1;if(!shouldLoadOnDemand){var plugin=window[parts[0]];if(!plugin){return;} component=plugin[parts[1]];if(!component){throw new Error('Unknown component in vue-entry: '+entry);}}else{component=useExternalPluginComponent(parts[0],parts[1]);} var paramsStr='';var componentParams={};function handleProperty(name,value){if(name==='vue-entry'||name==='class'||name==='style'||name==='id'){return;} var camelName=toCamelCase(name)+'_';paramsStr+=':'+name+'='+JSON.stringify(camelName)+' ';try{value=JSON.parse(value);}catch(e){} componentParams[camelName]=value;} $.each(this.attributes,function(){handleProperty(this.name,this.value);});Object.entries(extraProps||{}).forEach(([name,value])=>{handleProperty(name,value);});var element=this;var app=createVueApp({template:'<root '+paramsStr+'>'+this.innerHTML+'</root>',data:function(){return componentParams;},});app.component('root',component);componentsToRegister.forEach(function(componentRef){var parts=componentRef.split('.');var pluginName=parts[0];var componentName=parts[1];var component=useExternalPluginComponent(pluginName,componentName);app.component(toKebabCase(componentName),component);});var appInstance=app.mount(this);$(this).data('vueAppInstance',appInstance);var self=this;this.addEventListener('matomoVueDestroy',function(){$(self).data('vueAppInstance',null);app.unmount();});});piwikHelper.compileVueDirectives(selector);if(window.Vue){window.Vue.nextTick(function(){piwikHelper.processDynamicHtml($(selector).parent());});}},compileVueDirectives:function(selector){$('[vue-directive]',selector).add($(selector).filter('[vue-directive]')).each(function(){var vueDirectiveName=$(this).attr('vue-directive');if(!vueDirectiveName){return;} var parts=vueDirectiveName.split('.');if(parts.length!==2){throw new Error('Expects vue-entry to have format Plugin.Component, where Component is exported Vue component. Got: '+vueDirectiveName);} var plugin=window[parts[0]];if(!plugin){throw new Error('Unknown plugin in vue-entry: '+vueDirectiveName);} var directive=plugin[parts[1]];if(!directive){throw new Error('Unknown component in vue-entry: '+vueDirectiveName);} var directiveArgument=$(this).attr('vue-directive-value');var value;try{value=JSON.parse(directiveArgument||'{}');}catch(e){console.log('failed to parse directive value '+value+': '+directiveArgument);return;} var binding={value:value};if(directive.mounted){directive.mounted(this,binding);} this.addEventListener('matomoVueDestroy',function(){if(directive.unmounted){directive.unmounted(this,binding);}});});},destroyVueComponent:function(selector){$('[vue-entry]',selector).each(function(){this.dispatchEvent(new CustomEvent('matomoVueDestroy'));});},processDynamicHtml:function($element){piwik.postEvent('Matomo.processDynamicHtml',$element);},isReportingPage:function(){return $('.reporting-page').length;},setMarginLeftToBeInViewport:function(elementToPosition){var availableWidth=$(window).width();$(elementToPosition).css('marginLeft','0px');var offset=$(elementToPosition).offset();if(!offset){return;} var leftPos=offset.left;if(leftPos<0){leftPos=0;} var widthSegmentForm=$(elementToPosition).outerWidth();if(leftPos+widthSegmentForm>availableWidth){var extraSpaceForMoreBeauty=16;var newLeft=availableWidth-widthSegmentForm-extraSpaceForMoreBeauty;if(newLeft<extraSpaceForMoreBeauty){newLeft=extraSpaceForMoreBeauty;} var marginLeft=Math.abs(leftPos-newLeft);if(marginLeft>extraSpaceForMoreBeauty){$(elementToPosition).css('marginLeft',(parseInt(marginLeft,10)*-1)+'px');}}},modalConfirm:function(domSelector,handles,options){if(!options){options={};} var domElem=$(domSelector);var buttons=[];var content='<div class="modal"><div class="modal-content"></div>';content+='<div class="modal-footer"></div></div>';var $content=$(content).hide();var $footer=$content.find('.modal-footer');$('[role]',domElem).not('li').each(function(){var $button=$(this);var uiConfirm=$button.parents('.ui-confirm,[ui-confirm]').filter(function(){return domElem[0]===this||$.contains(domElem[0],this);});if(uiConfirm.length>1){return;} var role=$button.attr('role');var title=$button.attr('title');var text=$button.val();$button.hide();var button=$('<a href="javascript:;" class="modal-action modal-close waves-effect waves-light btn-flat "></a>');if(role==='validation'){button=$('<a href="javascript:;" class="modal-action waves-effect waves-light btn"></a>');} button.text(text);if(title){button.attr('title',title);} if(typeof handles!=='undefined'&&typeof handles[role]=='function'){button.on('click',function(){handles[role].apply()});} if(typeof $button.data('href')!=='undefined'){button.on('click',function(){window.location.href=$button.data('href');})} $footer.append(button);});$('body').append($content);$content.find('.modal-content').append(domElem);if(options&&options.fixedFooter){$content.addClass('modal-fixed-footer');delete options.fixedFooter;} if(options&&options.extraWide){$content.addClass('modal-extra-wide');delete options.extraWide;} if(options&&!options.onOpenEnd){options.onOpenEnd=function(){$(".modal.open a").focus();var modalContent=$(".modal.open");if(modalContent&&modalContent[0]){modalContent[0].scrollTop=0;}};} domElem.show();$content.modal(options).modal('open');},getQueryStringWithParametersModified:function(queryString,newParameters){if(queryString!=''){var r,i,keyvalue,keysvalues=newParameters.split('&');var appendUrl='';for(i=0;i<keysvalues.length;i++){keyvalue=keysvalues[i].split('=');r=new RegExp('(^|[?&])'+keyvalue[0]+'=[^&]*');queryString=queryString.replace(r,'');if(keyvalue[1].length==0){continue;} appendUrl+='&'+keyvalue[0]+'='+keyvalue[1];} queryString+=appendUrl;if(queryString[0]=='&'){queryString='?'+queryString.substring(1);}}else{queryString='?'+newParameters;} return queryString;},getCurrentQueryStringWithParametersModified:function(newparams){var queryString=String(window.location.search);if(newparams){queryString=this.getQueryStringWithParametersModified(queryString,newparams);} return String(window.location.pathname)+queryString;},getArrayFromQueryString:function(query){var params={};var vars=query.split("&");for(var i=0;i<vars.length;i++){var keyValue=vars[i].split("=");params[keyValue[0]]=decodeURIComponent(keyValue[1]);} return params;},getQueryStringFromParameters:function(parameters){var queryString='';if(!parameters||parameters.length==0){return queryString;} for(var name in parameters){var value=parameters[name];if(typeof value=='object'){for(var i in value){queryString+=name+'[]='+value[i]+'&';}}else{queryString+=name+'='+value+'&';}} return queryString.substring(0,queryString.length-1);},showAjaxError:function(message,errorDivID){errorDivID=errorDivID||'ajaxError';$('#'+errorDivID).html(message).show();},hideAjaxError:function(errorDivID){errorDivID=errorDivID||'ajaxError';$('#'+errorDivID).hide();},showAjaxLoading:function(loadingDivID){loadingDivID=loadingDivID||'ajaxLoadingDiv';$('#'+loadingDivID).show();},hideAjaxLoading:function(loadingDivID){loadingDivID=loadingDivID||'ajaxLoadingDiv';$('#'+loadingDivID).hide();},refreshAfter:function(timeoutPeriod){if(timeoutPeriod==0){location.reload();}else{setTimeout("location.reload();",timeoutPeriod);}},redirect:function(params){if(typeof params=='object'){params=this.getQueryStringFromParameters(params);} var urlToRedirect=this.getCurrentQueryStringWithParametersModified(params);var updatedUrl=new RegExp('&updated=([0-9]+)');var updatedCounter=updatedUrl.exec(urlToRedirect);if(!updatedCounter){urlToRedirect+='&updated=1';}else{updatedCounter=1+parseInt(updatedCounter[1]);urlToRedirect=urlToRedirect.replace(new RegExp('(&updated=[0-9]+)'),'&updated='+updatedCounter);} var currentHashStr=window.location.hash;if(currentHashStr.length>0){urlToRedirect+=currentHashStr;} this.redirectToUrl(urlToRedirect);},redirectToUrl:function(url){window.location=url;},lazyScrollToContent:function(){this.lazyScrollTo('#content',250);},lazyScrollTo:function(elem,time,forceScroll){var $elem=$(elem);if(!$elem.length){return;} var elemTop=$elem.offset().top;if(elemTop<$(window).scrollTop()||elemTop>$(window).scrollTop()+$(window).height()||forceScroll){$.scrollTo(elem,time);}},getApiFormatTextarea:function(textareaContent){if(typeof textareaContent=='undefined'){return'';} return textareaContent.trim().split("\n").join(',');},shortcuts:{},registerShortcut:function(key,description,callback){piwikHelper.shortcuts[key]=description;Mousetrap.bind(key,callback);},calculateEvolution:function(currentValue,pastValue){var dividend=currentValue-pastValue;var divisor=pastValue;if(dividend==0){return 0;}else if(divisor==0){return 1;}else{return Math.round((dividend / divisor)*1000)/ 1000;}},showVisitorProfilePopup:function(visitorId,idSite){require('piwik/UI').VisitorProfileControl.showPopover(visitorId,idSite);},};if(typeof String.prototype.trim!=='function'){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};} function isEnterKey(e){return(window.event?window.event.keyCode:e.which)==13;} function isEscapeKey(e){return(window.event?window.event.keyCode:e.which)==27;} document.addEventListener('DOMContentLoaded',function(){(function($){try{var oldArc=CanvasRenderingContext2D.prototype.arc;CanvasRenderingContext2D.prototype.arc=function(x,y,r,sAngle,eAngle,clockwise){if(Math.abs(eAngle-sAngle-Math.PI*2)<0.000001&&!clockwise) eAngle-=0.000001;oldArc.call(this,x,y,r,sAngle,eAngle,clockwise);};jQuery.ui.dialog.prototype._focusTabbable=$.noop;jQuery(document).keyup(function(e){if(e.keyCode==27){$('.ui-tooltip').hide();}});}catch(e){} piwikHelper.compileVueEntryComponents('body');}(jQuery));},false); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ $(function(){function adjustSize(content){var width=$('body').width()-content.offset().left-16;content.css('width',width+'px');} var contentAdmin=$('#content.admin');if(contentAdmin.length){adjustSize(contentAdmin);$(window).resize(function(){adjustSize(contentAdmin);});}}); (function($,require){var exports=require('piwik/UI');var ARRAY_PARAM_NAMES=['compareDates','comparePeriods','compareSegments'];var UIControl=function(element){if(!element){throw new Error("no element passed to UIControl constructor");} this._controlId=UIControl._nextControlId++;UIControl._controls.push(this);var $element=this.$element=$(element);$element.data('uiControlObject',this);var params=JSON.parse($element.attr('data-params')||'{}');for(var key in params){if(params[key]instanceof Array&&ARRAY_PARAM_NAMES.indexOf(key)===-1){params[key]=params[key].join(',');}} this.param=params;this.props=JSON.parse($element.attr('data-props')||'{}');};UIControl._controls=[];UIControl._nextControlId=0;UIControl.cleanupUnusedControls=function(){var controls=UIControl._controls;var activeControls=UIControl._controls=[];for(var i=0;i!=controls.length;++i){var control=controls[i];if(control&&control.$element&&!$.contains(document.documentElement,control.$element[0])){controls[i]=null;control._destroy();if(!control._baseDestroyCalled){throw new Error("Error: "+control.constructor.name+"'s destroy method does not call "+"UIControl.destroy. You may have a memory leak.");}}else{activeControls.push(control);}}};UIControl.initElements=function(klass,selector){$(selector).each(function(){if(!$(this).attr('data-inited')){var control=new klass(this);$(this).attr('data-inited',1);}});};UIControl.prototype={_destroy:function(){this.$element.removeData('uiControlObject');delete this.$element;this._baseDestroyCalled=true;},onWidgetResize:function(handler){var $widget=this.$element.closest('.widgetContent');$widget.on('widget:maximise',handler).on('widget:minimise',handler).on('widget:resize',handler);}};exports.UIControl=UIControl;})(jQuery,require); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ var broadcast={currentHashUrl:false,currentPopoverParameter:false,popoverHandlers:[],popoverParamStack:[],forceReload:false,updateHashOnly:false,isWidgetizedDashboard:function(){return broadcast.getValueFromUrl('module')=='Widgetize'&&broadcast.getValueFromUrl('moduleToWidgetize')=='Dashboard';},isWidgetizeRequestWithoutSession:function(){return broadcast.getValueFromUrl('token_auth')!=''&&broadcast.getValueFromUrl('force_api_session')!='1';},isLoginPage:function(){return!!$('body#loginPage').length;},isNoDataPage:function(){return!!$('body#site-without-data').length;},buildReportingUrl:function(ajaxUrl){var currentHashStr=broadcast.getHash();ajaxUrl=ajaxUrl.replace(/^\?|&#/,'');var params_vals=ajaxUrl.split("&");for(var i=0;i<params_vals.length;i++){currentHashStr=broadcast.updateParamValue(params_vals[i],currentHashStr);} var action=broadcast.getParamValue('action',currentHashStr);if(action!='goalReport'&&action!='ecommerceReport'&&action!='products'&&action!='sales'){currentHashStr=broadcast.updateParamValue('idGoal=',currentHashStr);} var module=broadcast.getParamValue('module',currentHashStr);if(module!='Dashboard'){currentHashStr=broadcast.updateParamValue('idDashboard=',currentHashStr);} return'#'+currentHashStr;},propagateNewPage:function(str,showAjaxLoading,strHash,paramsToRemove,wholeNewUrl){globalAjaxQueue.abort();paramsToRemove=paramsToRemove||[];if(typeof showAjaxLoading==='undefined'||showAjaxLoading){piwikHelper.showAjaxLoading();} var params_vals=str.split("&");var currentSearchStr=window.location.search;var currentHashStr=broadcast.getHashFromUrl();if(!currentSearchStr){currentSearchStr='?';} var oldUrl=currentSearchStr+currentHashStr;var newUrl;if(!wholeNewUrl){params_vals.forEach(function(param){if(/\[]=/.test(decodeURIComponent(param))){var paramName=decodeURIComponent(param).split('[]=')[0];removeParam(paramName);}});paramsToRemove.forEach(function(paramName){removeParam(paramName);});params_vals.forEach(function(param){if(!param.length){return;} if(/\[]=/.test(decodeURIComponent(param))){currentSearchStr=broadcast.addArrayParamValue(param,currentSearchStr);if(currentHashStr.length!==0){currentHashStr=broadcast.addArrayParamValue(param,currentHashStr);}}else{currentSearchStr=broadcast.updateParamValue(param,currentSearchStr);if(currentHashStr.length!==0){currentHashStr=broadcast.updateParamValue(param,currentHashStr);}}});var updatedUrl=new RegExp('&updated=([0-9]+)');var updatedCounter=updatedUrl.exec(currentSearchStr);if(!updatedCounter){currentSearchStr+='&updated=1';}else{updatedCounter=1+parseInt(updatedCounter[1]);currentSearchStr=currentSearchStr.replace(new RegExp('(&updated=[0-9]+)'),'&updated='+updatedCounter);} if(strHash&¤tHashStr.length!=0){var params_hash_vals=strHash.split("&");for(var i=0;i<params_hash_vals.length;i++){currentHashStr=broadcast.updateParamValue(params_hash_vals[i],currentHashStr);}} newUrl=currentSearchStr+currentHashStr;}else{newUrl=wholeNewUrl;} if(oldUrl==newUrl){window.location.reload();}else{this.forceReload=true;window.location.href=newUrl;} return false;function removeParam(paramName){var paramRegex=new RegExp(paramName+'(\\[]|%5B%5D)?=[^&?#]*&?','gi');currentSearchStr=currentSearchStr.replace(paramRegex,'');currentHashStr=currentHashStr.replace(paramRegex,'');}},updateParamValue:function(newParamValue,urlStr){var p_v=newParamValue.split("=");var paramName=p_v[0];var valFromUrl=broadcast.getParamValue(paramName,urlStr)||broadcast.getParamValue(encodeURIComponent(paramName),urlStr);var paramValue=p_v[1];if(paramValue==''){newParamValue='';} var getQuotedRegex=function(str){return(str+'').replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");};if(valFromUrl!=''||urlStr.indexOf(paramName+'=')!==-1){valFromUrl=getQuotedRegex(valFromUrl);var regToBeReplace=new RegExp(paramName+'='+valFromUrl,'ig');if(newParamValue==''){regToBeReplace=new RegExp('[\&]?('+paramName+'|'+encodeURIComponent(paramName)+')='+valFromUrl,'ig');} urlStr=urlStr.replace(regToBeReplace,newParamValue);}else if(newParamValue!=''){urlStr+=(urlStr=='')?newParamValue:'&'+newParamValue;} return urlStr;},addArrayParamValue:function(newParamValue,urlStr){if(urlStr.indexOf('?')===-1){urlStr+='?';}else{urlStr+='&';} return urlStr+newParamValue;},propagateNewPopoverParameter:function(handlerName,value){var popover='';if(handlerName&&''!=value&&'undefined'!=typeof value){popover=handlerName+':'+value;popover=encodeURIComponent(popover);popover=popover.replace(/%/g,'\$');broadcast.popoverParamStack.push(popover);}else{broadcast.popoverParamStack.pop();if(broadcast.popoverParamStack.length){popover=broadcast.popoverParamStack[broadcast.popoverParamStack.length-1];}} var MatomoUrl=window.CoreHome.MatomoUrl;MatomoUrl.updateHash(Object.assign({},MatomoUrl.hashParsed.value,{popover}),);},resetPopoverStack:function(){broadcast.popoverParamStack=[];},addPopoverHandler:function(handlerName,callback){broadcast.popoverHandlers[handlerName]=callback;},loadAjaxContent:function(urlAjax){if(broadcast.getParamValue('module',urlAjax)=='API'){broadcast.lastUrlRequested=null;$('#content').html("Loading content from the API and displaying it within Piwik is not allowed.");piwikHelper.hideAjaxLoading();return false;} piwikHelper.hideAjaxError('loadingError');piwikHelper.showAjaxLoading();$('#content').empty();$("object").remove();urlAjax=urlAjax.match(/^\?/)?urlAjax:"?"+urlAjax;broadcast.lastUrlRequested=urlAjax;function sectionLoaded(content,status,request){if(request){var responseHeader=request.getResponseHeader('Content-Type');if(responseHeader&&0<=responseHeader.toLowerCase().indexOf('json')){var message='JSON cannot be displayed for';if(this.getParams&&this.getParams['module']){message+=' module='+this.getParams['module'];} if(this.getParams&&this.getParams['action']){message+=' action='+this.getParams['action'];} $('#content').text(message);piwikHelper.hideAjaxLoading();return;}} var htmlDocType='<!DOCTYPE';if(content.substring(0,htmlDocType.length)==htmlDocType){if($(content).filter('title').text()=='Piwik › Error'){content=$(content).filter('#contentsimple');}else{return;}} if(urlAjax==broadcast.lastUrlRequested){$('#content').html(content).show();$(broadcast).trigger('locationChangeSuccess',{element:$('#content'),content:content});piwikHelper.hideAjaxLoading();broadcast.lastUrlRequested=null;piwikHelper.compileVueDirectives('#content');} initTopControls();} var ajax=new ajaxHelper();ajax.setUrl(urlAjax);ajax._getDefaultPostParams=function(){return{};};ajax.setErrorCallback(broadcast.customAjaxHandleError);ajax.setCallback(sectionLoaded);ajax.setFormat('html');ajax.send();return false;},customAjaxHandleError:function(deferred,status){broadcast.lastUrlRequested=null;piwikHelper.hideAjaxLoading();if(status=='abort'){return;} $('#loadingError').show();},isHashExists:function(){var hashStr=broadcast.getHashFromUrl();if(hashStr!=""){return hashStr;}else{return false;}},getHashFromUrl:function(url){var hashStr="";if(url&&url.match('#')){hashStr=url.substring(url.indexOf("#"),url.length);} else{locationSplit=location.href.split('#');if(typeof locationSplit[1]!='undefined'){hashStr='#'+locationSplit[1];}} return hashStr;},getSearchFromUrl:function(url){var searchStr="";if(url&&url.match(/\?/)){searchStr=url.substring(url.indexOf("?"),url.length);}else{searchStr=location.search;} return searchStr;},extractKeyValuePairsFromQueryString:function(queryString,decode){var pairs=queryString.replace(/%5B%5D/g,'[]').split('&');var result={};for(var i=0;i!=pairs.length;++i){if(pairs[i]===''){continue;} var pair=pairs[i].split('=');var key=pair.shift();var value=pair.join('=');if(decode){value=decodeURIComponent(value);} if(/\[.*?]$/.test(key)){key=key.replace(/\[.*?]$/,'');result[key]=result[key]||[];result[key].push(value);}else{result[key]=value;}} return result;},getValuesFromUrl:function(url,decode){var searchString=this._removeHashFromUrl(url).split('?')[1]||'';return this.extractKeyValuePairsFromQueryString(searchString,decode);},getValueFromUrl:function(param,url){var searchString=this._removeHashFromUrl(url);return broadcast.getParamValue(param,searchString);},getValueFromHash:function(param,url){var hashStr=broadcast.getHashFromUrl(url);if(hashStr.slice(0,1)=='#'){hashStr=hashStr.slice(1);} hashStr=hashStr.split('#')[0];return broadcast.getParamValue(param,hashStr);},getParamValue:function(param,url){var lookFor=param+'=';if(url.indexOf('?')>=0){url=url.slice(url.indexOf('?')+1);} var urlPieces=url.split('&');for(var i=urlPieces.length-1;i>=0;i--){if(urlPieces[i].indexOf(lookFor)===0){return getSingleValue(urlPieces[i]);}} lookFor=param+'[]=';var result=[];for(var j=0;j<urlPieces.length;j++){if(urlPieces[j].indexOf(lookFor)===0){result.push(getSingleValue(urlPieces[j]));}else if(decodeURIComponent(urlPieces[j]).indexOf(lookFor)===0){result.push(getSingleValue(decodeURIComponent(urlPieces[j])));}} return result.length?result:'';function getSingleValue(urlPart){var startPos=urlPart.indexOf("=");if(startPos===-1){return'';} var value=urlPart.substring(startPos+1);if(param!='segment'&¶m!='popover'&¶m!='compareSegments'){value=value.replace(/[^_%~\*\+\-\<\>!@\$\.()=,;0-9a-zA-Z]/gi,'');} return value;}},getHash:function(){return broadcast.getHashFromUrl().replace(/^#/,'').split('#')[0];},_removeHashFromUrl:function(url){var searchString='';if(url){var urlParts=url.split('#');searchString=urlParts[0];}else{searchString=window.location.search;} return searchString;}};window.broadcast=broadcast; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ var Piwik_Popover=(function(){var container=false;var isOpen=false;var closeCallback=false;var isProgrammaticClose=false;var scrollTopPosition=0;var ajaxLoadingRequest=null;var createContainer=function(){if(container===false){container=$(document.createElement('div')).attr('id','Piwik_Popover');}};var openPopover=function(title,dialogClass){createContainer();var options={title:title,modal:true,width:'1050px',resizable:false,autoOpen:true,open:function(event,ui){if(dialogClass){$(this).parent().addClass(dialogClass).attr('style','');} $('.ui-widget-overlay').on('click.popover',function(){broadcast.resetPopoverStack();container.dialog('close');});var self=this;scrollTopPosition=$(window).scrollTop();$('#root').css({position:'fixed',height:$(window).height+scrollTopPosition,width:'100%',top:-scrollTopPosition});window.scrollTo(0,0);centerPopover();},close:function(event,ui){container.find('div.jqplot-target').trigger('piwikDestroyPlot');container[0].innerHTML='';container.dialog('destroy').remove();if(ajaxLoadingRequest){ajaxLoadingRequest.abort();} $('.ui-widget-overlay').off('click.popover');isOpen=false;require('piwik/UI').UIControl.cleanupUnusedControls();if(typeof closeCallback=='function'){closeCallback();closeCallback=false;} $('body > .ui-tooltip').remove();if(!isProgrammaticClose||isEscapeKey(event)){broadcast.propagateNewPopoverParameter(false);} $('#root').css({position:'',height:'',width:'',top:''});window.scrollTo(0,scrollTopPosition);}};container.dialog(options);container.data("uiDialog")._title=function(title){title.html(this.options.title);};isOpen=true;};var centerPopover=function(){if(container!==false){$('.ui-dialog').css({margin:'0 0'});container.dialog("option","position",{my:'center',at:'center',of:'.ui-widget-overlay',collision:'fit'});if($('.ui-dialog').position().top<0){$('.ui-dialog').css('top','0');} $('.ui-dialog').css({margin:'15px 0'});}};return{showLoading:function(popoverName,popoverSubject,height,dialogClass){var loading=$(document.createElement('div')).addClass('Piwik_Popover_Loading');var loadingMessage=popoverSubject?translations.General_LoadingPopoverFor:translations.General_LoadingPopover;loadingMessage=sprintf(loadingMessage,popoverName);var p1=$(document.createElement('p')).addClass('Piwik_Popover_Loading_Name');loading.append(p1.text(loadingMessage));var p2;if(popoverSubject){popoverSubject=piwikHelper.addBreakpointsToUrl(popoverSubject);p1.addClass('Piwik_Popover_Loading_NameWithSubject');p2=$(document.createElement('p')).addClass('Piwik_Popover_Loading_Subject');loading.append(p2.html(popoverSubject));} if(height){loading.height(height);} if(!isOpen){openPopover(null,dialogClass);} this.setContent(loading);this.setTitle('');if(height){var offset=loading.height()-p1.outerHeight();if(popoverSubject){offset-=p2.outerHeight();} var spacingEl=$(document.createElement('div'));spacingEl.height(Math.round(offset / 2));loading.prepend(spacingEl);} return container;},addHelpButton:function(helpUrl){if(!isOpen){return;} var titlebar=container.parent().find('.ui-dialog-titlebar');var button=$(document.createElement('a')).addClass('ui-dialog-titlebar-help');button.attr({href:helpUrl,target:'_blank'});titlebar.append(button);},setTitle:function(titleHtml){var titleText=piwikHelper.htmlDecode(titleHtml);if(titleText.length>60){titleHtml=$('<span>').attr('class','tooltip').attr('title',titleText).html(titleHtml);} container.dialog('option','title',titleHtml);try{$('.tooltip',container.parentNode).tooltip('destroy');}catch(e){} if(titleText.length>60){$('.tooltip',container.parentNode).tooltip({track:true,items:'.tooltip'});}},setContent:function(html){if(typeof closeCallback=='function'){closeCallback();closeCallback=false;} container.html(html);container.children().each(function(i,childNode){piwikHelper.compileVueEntryComponents(childNode);});centerPopover();},showError:function(title,message,backLabel){var error=$(document.createElement('div')).addClass('Piwik_Popover_Error');var p=$(document.createElement('p')).addClass('Piwik_Popover_Error_Title');error.append(p.html(title));if(message){p=$(document.createElement('p')).addClass('Piwik_Popover_Error_Message');error.append(p.html(message));} if(backLabel){var back=$(document.createElement('a')).addClass('Piwik_Popover_Error_Back');back.attr('href','#').click(function(){history.back();return false;});error.append(back.html(backLabel));} if(!isOpen){openPopover();} this.setContent(error);},onClose:function(callback){closeCallback=callback;},close:function(){if(isOpen){isProgrammaticClose=true;container.dialog('close');isProgrammaticClose=false;}},createPopupAndLoadUrl:function(url,loadingName,dialogClass,ajaxRequest){var box=Piwik_Popover.showLoading(loadingName,null,null,dialogClass);var callback=function(html){function setPopoverTitleIfOneFoundInContainer(){var title=$('h1,h2',container);if(title.length==1){Piwik_Popover.setTitle(title.text());$(title).hide();}} Piwik_Popover.setContent(html);setPopoverTitleIfOneFoundInContainer();};if('undefined'===typeof ajaxRequest){ajaxRequest=new ajaxHelper();} ajaxRequest.addParams(piwikHelper.getArrayFromQueryString(url),'get');ajaxRequest.setCallback(callback);ajaxRequest.setFormat('html');ajaxRequest.send();ajaxLoadingRequest=ajaxRequest;},isOpen:function(){return isOpen;}};})(); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($,require){var exports=require('piwik/UI'),UIControl=exports.UIControl;function DataTable(element){UIControl.call(this,element);this.init();} DataTable._footerIconHandlers={};DataTable.initNewDataTables=function(reportId){var selector=typeof reportId==='string'?'[data-report='+JSON.stringify(reportId)+']':'div.dataTable';$(selector).each(function(){if(!$(this).attr('id')){var tableType=$(this).attr('data-table-type')||'DataTable',klass=require('piwik/UI')[tableType]||require(tableType);if(klass&&$.isFunction(klass)){var table=new klass(this);}}});};DataTable.registerFooterIconHandler=function(id,handler){var handlers=DataTable._footerIconHandlers;if(handlers[id]){setTimeout(function(){throw new Exception("DataTable footer icon handler '"+id+"' is already being used.")},1);return;} handlers[id]=handler;};DataTable.getDataTableByReport=function(report){var result=undefined;$('div.dataTable').each(function(){if($(this).attr('data-report')==report){result=this;return false;}});return result;};$.extend(DataTable.prototype,UIControl.prototype,{_init:function(domElem){},_destroy:function(){UIControl.prototype._destroy.call(this);if(this.windowResizeTableAttached){$(window).off('resize',this._resizeDataTable);} if(this._bodyMouseUp){$('body').off('mouseup',this._bodyMouseUp);}},init:function(){var domElem=this.$element;this.workingDivId=this._createDivId();domElem.attr('id',this.workingDivId);this.loadedSubDataTable={};this.isEmpty=$('.pk-emptyDataTable',domElem).length>0;window.Vue.nextTick().then(()=>{this.bindEventsAndApplyStyle(domElem);this._init(domElem);this.enableStickHead(domElem);this.initialized=true;});},enableStickHead:function(domElem){$(window).on('resize',function(){var tableScrollerWidth=$(domElem).find('.dataTableScroller').width();var tableWidth=$(domElem).find('table').width();if(tableScrollerWidth<tableWidth){$('.dataTableScroller').css('overflow-x','scroll');}}).resize();},onClickSort:function(domElem){var self=this;var newColumnToSort=$(domElem).attr('id');if(self.param.filter_sort_column==newColumnToSort){if(this.param.filter_sort_order=='asc'){self.param.filter_sort_order='desc';} else{self.param.filter_sort_order='asc';}} self.param.filter_offset=0;self.param.filter_sort_column=newColumnToSort;if(!self.isDashboard()){self.notifyWidgetParametersChange(domElem,{filter_sort_column:newColumnToSort,filter_sort_order:self.param.filter_sort_order});} self.reloadAjaxDataTable();},setGraphedColumn:function(columnName){this.param.columns=columnName;},isWithinDialog:function(domElem){return!!$(domElem).parents('.ui-dialog').length;},isDashboard:function(){return!!$('#dashboardWidgetsArea').length;},getReportMetadata:function(){return JSON.parse(this.$element.attr('data-report-metadata')||'{}');},resetAllFilters:function(){var self=this;var FiltersToRestore={};var filters=['filter_column','filter_pattern','filter_column_recursive','filter_pattern_recursive','enable_filter_excludelowpop','filter_offset','filter_limit','filter_sort_column','filter_sort_order','disable_generic_filters','columns','flat','totals','include_aggregate_rows','totalRows','pivotBy','pivotByColumn'];for(var key=0;key<filters.length;key++){var value=filters[key];FiltersToRestore[value]=self.param[value];delete self.param[value];} return FiltersToRestore;},restoreAllFilters:function(FiltersToRestore){var self=this;for(var key in FiltersToRestore){self.param[key]=FiltersToRestore[key];}},cleanParams:function(){var self=this;for(var key in self.param){if(self.param[key]=='true')self.param[key]=true;if(self.param[key]=='false')self.param[key]=false;}},reloadAjaxDataTable:function(displayLoading,callbackSuccess,extraParams){var self=this;if(typeof displayLoading=="undefined"){displayLoading=true;} if(typeof callbackSuccess=="undefined"){callbackSuccess=function(response){self.dataTableLoaded(response,self.workingDivId);};} if(displayLoading){$('#'+self.workingDivId+' .loadingPiwik').last().css('display','block');} $('#loadingError').hide();if(self&&self.param&&self.param.viewDataTable&&String(self.param.viewDataTable).indexOf('graph')===0){delete self.param.filter_offset;delete self.param.filter_limit;} delete self.param.showtitle;var container=$('#'+self.workingDivId+' .piwik-graph');var ajaxRequest=new ajaxHelper();if(self.param.totalRows){ajaxRequest.addParams({'totalRows':self.param.totalRows},'post');delete self.param.totalRows;} var params={};for(var key in self.param){if(typeof self.param[key]!="undefined"&&self.param[key]!==null&&self.param[key]!==''){if(key=='filter_column'||key=='filter_column_recursive'){if(self.param.flat=="1"&&self.param.show_dimensions=="1"){params[key]='combinedLabel';}else{params[key]='label';} continue;} params[key]=self.param[key];}} ajaxRequest.addParams(params,'get');if(extraParams){ajaxRequest.addParams(extraParams,'post');} ajaxRequest.withTokenInUrl();ajaxRequest.setCallback(function(response){container.trigger('piwikDestroyPlot');container.off('piwikDestroyPlot');callbackSuccess(response);});ajaxRequest.setErrorCallback(function(deferred,status){if(status=='abort'||!deferred||deferred.status<400||deferred.status>=600){return;} $('#'+self.workingDivId+' .loadingPiwik').last().css('display','none');$('#loadingError').show();});ajaxRequest.setFormat('html');ajaxRequest.send();},dataTableLoaded:function(response,workingDivId,doScroll){var content=$(response);if($.trim($('.dataTableControls',content).html())===''){$('.dataTableControls',content).append(' ');} var idToReplace=workingDivId||$(content).attr('id');var dataTableSel=$('#'+idToReplace);table=$(content).parents('table.dataTable');if(dataTableSel.parents('.dataTable').is('table')){$(content).find('table.dataTable').addClass('subDataTable');$(content).find('.dataTableFeatures').addClass('subDataTable');dataTableSel.replaceWith(content);} else{dataTableSel.find('object').remove();dataTableSel.replaceWith(content);} content.trigger('piwik:dataTableLoaded');if(doScroll||'undefined'===typeof doScroll){piwikHelper.lazyScrollTo(content[0],400);} piwikHelper.compileVueEntryComponents(content);return content;},bindEventsAndApplyStyle:function(domElem){var self=this;self.cleanParams();self.preBindEventsAndApplyStyleHook(domElem);self.handleSort(domElem);self.handleLimit(domElem);self.handlePeriod(domElem);self.handleOffsetInformation(domElem);self.handleAnnotationsButton(domElem);self.handleEvolutionAnnotations(domElem);self.handleExportBox(domElem);self.applyCosmetics(domElem);self.handleSubDataTable(domElem);self.handleConfigurationBox(domElem);self.handleSearchBox(domElem);self.handleColumnDocumentation(domElem);self.handleRowActions(domElem);self.handleCellTooltips(domElem);self.handleRelatedReports(domElem);self.handleTriggeredEvents(domElem);self.handleColumnHighlighting(domElem);self.setFixWidthToMakeEllipsisWork(domElem);self.handleSummaryRow(domElem);self.postBindEventsAndApplyStyleHook(domElem);},preBindEventsAndApplyStyleHook:function(domElem){},postBindEventsAndApplyStyleHook:function(domElem){},isWidgetized:function(){return-1!==location.search.indexOf('module=Widgetize');},setFixWidthToMakeEllipsisWork:function(domElem){var self=this;function getTableWidth(domElem){var totalWidth=$(domElem).width();var totalWidthTable=$('table.dataTable',domElem).width();if(totalWidthTable<totalWidth){totalWidth=totalWidthTable;} if(!totalWidth){totalWidth=0;} return parseInt(totalWidth,10);} function getLabelWidth(domElem,tableWidth,minLabelWidth,maxLabelWidth){var labelWidth=minLabelWidth;var columnsInFirstRow=$('tbody tr:not(.parentComparisonRow):not(.comparePeriod):eq(0) td:not(.label)',domElem);var widthOfAllColumns=0;columnsInFirstRow.each(function(index,column){widthOfAllColumns+=$(column).outerWidth();});if(tableWidth-widthOfAllColumns>=minLabelWidth){labelWidth=tableWidth-widthOfAllColumns;}else if(widthOfAllColumns>=tableWidth){labelWidth=tableWidth*0.5;} var innerWidth=0;var innerWrapper=domElem.find('.dataTableWrapper');if(innerWrapper&&innerWrapper.length){innerWidth=innerWrapper.width();} if(labelWidth>maxLabelWidth&&!self.isWidgetized()&&innerWidth!==domElem.width()&&!self.isDashboard()){labelWidth=maxLabelWidth;} var allColumns=$('tr:nth-child(1) td.label',domElem).length;var firstTableColumn=$('table:first tbody>tr:first td.label',domElem).length;var amount=allColumns;if(allColumns>2*firstTableColumn){amount=2*firstTableColumn;} var newWidth=parseInt(labelWidth / amount,10) if(newWidth==0){newWidth=maxLabelWidth;} return newWidth;} function getLabelColumnMinWidth(domElem){var minWidth=0;var minWidthHead=$('thead .first.label',domElem).css('minWidth');if(minWidthHead){minWidth=parseInt(minWidthHead,10);} var minWidthBody=$('tbody tr:nth-child(1) td.label',domElem).css('minWidth');if(minWidthBody){minWidthBody=parseInt(minWidthBody,10);if(minWidthBody&&minWidthBody>minWidth){minWidth=minWidthBody;}} return parseInt(minWidth,10);} function getLabelColumnMaxWidth(domElem){var maxWidth=0;var maxWidthHead=$('thead .first.label',domElem).css('maxWidth');if(maxWidthHead){maxWidthHead=parseInt(maxWidthHead,10);if(maxWidthHead>0){maxWidth=parseInt(maxWidthHead,10);}} var maxWidthBody=$('tbody tr:nth-child(1) td.label',domElem).css('maxWidth');if(maxWidthBody){maxWidthBody=parseInt(maxWidthBody,10);if(maxWidthBody&&maxWidthBody>0&&(maxWidth===0||maxWidthBody<maxWidth)){maxWidth=maxWidthBody;}} return parseInt(maxWidth,10);} function removePaddingFromWidth(elem,labelWidth){var paddingLeft=elem.css('paddingLeft');paddingLeft=paddingLeft?Math.round(parseFloat(paddingLeft)):0;var paddingRight=elem.css('paddingRight');paddingRight=paddingRight?Math.round(parseFloat(paddingRight)):0;if(elem.find('.prefix-numeral').length){labelWidth-=Math.round(parseFloat(elem.find('.prefix-numeral').outerWidth()));} return labelWidth-paddingLeft-paddingRight;} var isTableVisualization=this.param.viewDataTable&&typeof this.param.viewDataTable==='string'&&typeof this.param.viewDataTable.indexOf==='function'&&this.param.viewDataTable.indexOf('table')!==-1;if(isTableVisualization){var tableWidth=getTableWidth(domElem);var labelColumnMinWidth=getLabelColumnMinWidth(domElem);var labelColumnMaxWidth=getLabelColumnMaxWidth(domElem);var labelColumnWidth=getLabelWidth(domElem,tableWidth,self.props.min_label_width||125,self.props.max_label_width||440);if(labelColumnMinWidth>labelColumnWidth){labelColumnWidth=labelColumnMinWidth;} if(labelColumnMaxWidth&&labelColumnMaxWidth<labelColumnWidth){labelColumnWidth=labelColumnMaxWidth;} if($(domElem).closest('.subDataTableContainer').length){var parentTable=$(domElem).closest('table.dataTable');var tableColumns=$('table:eq(0)>thead th',domElem).length;var parentTableColumns=$('>thead th',parentTable).length;var labelColumn=$('>tbody td.label:eq(0)',parentTable);var labelWidthParentTable=labelColumn.outerWidth();if(parentTableColumns===tableColumns){labelColumnWidth=Math.min(labelColumnWidth,labelWidthParentTable);$('>tbody>tr:not(.subDataTableContainer)>td.label',parentTable).each(function(){$(this).css({width:removePaddingFromWidth($(this),labelColumnWidth)+'px'});});$('>tbody>tr.subDataTableContainer',parentTable).each(function(){if($('table:eq(0)>thead th',this).length===parentTableColumns){$(this).css({width:removePaddingFromWidth($(this),labelColumnWidth)+'px'});}});}} if(labelColumnWidth){$('td.label',domElem).each(function(){$(this).css({width:removePaddingFromWidth($(this),labelColumnWidth)+'px'});});} $('td span.label',domElem).each(function(){self.tooltip($(this));});} if(!self.windowResizeTableAttached){self.windowResizeTableAttached=true;var timeout=null;var windowWidth=0;var resizeDataTable=function(){if(windowWidth===$(window).width()){return;} if(timeout){clearTimeout(timeout);} timeout=setTimeout(function(){var isInDom=domElem&&domElem[0]&&document&&document.body&&document.body.contains(domElem[0]);if(isInDom){if(isTableVisualization){$('td.label',domElem).width('');} self.setFixWidthToMakeEllipsisWork(domElem);windowWidth=$(window).width();}else{$(window).off('resize',resizeDataTable);} timeout=null;},Math.floor((Math.random()*80)+220));} $(window).on('resize',resizeDataTable);self._resizeDataTable=resizeDataTable;}},handleLimit:function(domElem){var tableRowLimits=this.props.datatable_row_limits||piwik.config.datatable_row_limits,evolutionLimits={day:[8,30,60,90,180],week:[4,12,26,52,104],month:[3,6,12,24,36,120],year:[3,5,10]};if(!parseInt(this.param.flat)){evolutionLimits.day.push(365,500);evolutionLimits.week.push(500);} var self=this;if(typeof self.parentId!="undefined"&&self.parentId!=''){return;} if(self.props.disable_all_rows_filter_limit){var tempTableRowLimits=[];tableRowLimits.forEach(function(limit){if(limit!=-1){tempTableRowLimits.push(limit);}});tableRowLimits=tempTableRowLimits;} var setLimitValue,numbers,limitParamName;if(self.param.viewDataTable=='graphEvolution'){limitParamName='evolution_'+self.param.period+'_last_n';numbers=evolutionLimits[self.param.period]||tableRowLimits;setLimitValue=function(params,limit){params[limitParamName]=limit;};} else{numbers=tableRowLimits;limitParamName='filter_limit';setLimitValue=function(params,value){params.filter_limit=value;params.filter_offset=0;};} function getFilterLimitAsString(limit){if(limit=='-1'){return _pk_translate('General_All').toLowerCase();} return limit;} var selectionMarkup='<div class="input-field"><select value="'+self.param[limitParamName]+'">';var selectedValue=getFilterLimitAsString(self.param[limitParamName]);if(self.props.show_limit_control){for(var i=0;i<numbers.length;i++){var currentValue=getFilterLimitAsString(numbers[i]);var optionSelected='';if(selectedValue==currentValue){optionSelected='selected';} selectionMarkup+='<option value="'+numbers[i]+'"'+optionSelected+'>'+currentValue+'</option>';} selectionMarkup+='</select></div>';$('.limitSelection',domElem).append(selectionMarkup);var $limitSelect=$('.limitSelection select',domElem);if(!self.isEmpty){$limitSelect.on('change',function(event){var limit=$(this).val();if(limit!=self.param[limitParamName]){setLimitValue(self.param,limit);self.reloadAjaxDataTable();var data={};data[limitParamName]=self.param[limitParamName];self.notifyWidgetParametersChange(domElem,data);}});} else{$limitSelect.toggleClass('disabled');} $limitSelect.material_select();$('.limitSelection input',domElem).attr('title',_pk_translate('General_RowsToDisplay'));} else{$('.limitSelection',domElem).hide();}},handlePeriod:function(domElem){var $periodSelect=$('.dataTablePeriods .tableIcon',domElem);var self=this;$periodSelect.click(function(){var period=$(this).attr('data-period');if(!period||period==self.param['period']){return;} var piwikPeriods=window.CoreHome.Periods;var formatDate=window.CoreHome.format;if(self.param['dateUsedInGraph']){var currentPeriod=piwikPeriods.parse('range',self.param['dateUsedInGraph']);}else{var currentPeriod=piwikPeriods.parse(self.param['period'],self.param['date']);} var endDateOfPeriod=currentPeriod.getDateRange()[1];endDateOfPeriod=formatDate(endDateOfPeriod);var newPeriod=piwikPeriods.get(period);$('.periodName',domElem).html(newPeriod.getDisplayText());self.param['period']=period;self.param['date']=endDateOfPeriod;self.reloadAjaxDataTable();});},handleSort:function(domElem){var self=this;if(self.props.enable_sort){$('.sortable',domElem).off('click.dataTableSort').on('click.dataTableSort',function(){$(this).off('click.dataTableSort');self.onClickSort(this);});} if(self.param.filter_sort_column){var currentIsSubDataTable=$(domElem).parent().hasClass('cellSubDataTable');var imageSortClassType=currentIsSubDataTable?'sortSubtable':'' var imageSortWidth=16;var imageSortHeight=16;var sortOrder=self.param.filter_sort_order||'desc';var head=$('th',domElem).filter(function(){return $(this).attr('id')==self.param.filter_sort_column;}).addClass('columnSorted');var sortIconHtml='<span class="sortIcon '+sortOrder+' '+imageSortClassType+'" width="'+imageSortWidth+'" height="'+imageSortHeight+'" />';var div=head.find('.thDIV');if(head.hasClass('first')||head.attr('id')=='label'){div.append(sortIconHtml);}else{div.prepend(sortIconHtml);}}},handleSearchBox:function(domElem,callbackSuccess){var self=this;var currentPattern=self.param.filter_pattern;if(typeof self.param.filter_pattern!="undefined"&&self.param.filter_pattern.length>0){currentPattern=self.param.filter_pattern;} else if(typeof self.param.filter_pattern_recursive!="undefined"&&self.param.filter_pattern_recursive.length>0){currentPattern=self.param.filter_pattern_recursive;} else{currentPattern='';} currentPattern=piwikHelper.htmlDecode(currentPattern);var patternsToReplace=[{from:'?',to:'\\?'},{from:'+',to:'\\+'},{from:'*',to:'\\*'}] $.each(patternsToReplace,function(index,pattern){if(0===currentPattern.indexOf(pattern.to)){currentPattern=pattern.from+currentPattern.slice(2);}});var $searchAction=$('.dataTableAction.searchAction',domElem);if(!$searchAction.length){return;} $searchAction.on('click',showSearch);$searchAction.find('.icon-close').on('click',hideSearch);var $searchInput=$('.dataTableSearchInput',domElem);function getOptimalWidthForSearchField(){var controlBarWidth=$('.dataTableControls',domElem).width();var spaceLeft=controlBarWidth-$searchAction.position().left;var idealWidthForSearchBar=250;var minimalWidthForSearchBar=150;var width=idealWidthForSearchBar;if(spaceLeft>minimalWidthForSearchBar&&spaceLeft<idealWidthForSearchBar){width=spaceLeft;} if(width>controlBarWidth){width=controlBarWidth;} return width;} function hideSearch(event){event.preventDefault();event.stopPropagation();var $searchAction=$(this).parents('.searchAction').first();$searchAction.removeClass('searchActive active forceActionVisible');$searchAction.css('width','');$searchAction.on('click',showSearch);$searchAction.find('.icon-search').off('click',searchForPattern);$searchInput.val('');if(currentPattern){searchForPattern();}} function showSearch(event){event.preventDefault();event.stopPropagation();var $searchAction=$(this);$searchAction.addClass('searchActive forceActionVisible');var width=getOptimalWidthForSearchField();$searchAction.css('width',width+'px');$searchAction.find('.dataTableSearchInput').focus();$searchAction.find('.icon-search').on('click',searchForPattern);$searchAction.off('click',showSearch);} function searchForPattern(){var keyword=$searchInput.val();if(!keyword&&!currentPattern){return;} self.param.filter_offset=0;$.each(patternsToReplace,function(index,pattern){if(0===keyword.indexOf(pattern.from)){keyword=pattern.to+keyword.slice(1);}});if(self.param.search_recursive){self.param.filter_column_recursive='label';self.param.filter_pattern_recursive=keyword;} else{self.param.filter_column='label';self.param.filter_pattern=keyword;} delete self.param.totalRows;self.reloadAjaxDataTable(true,callbackSuccess);} $searchInput.on("keyup",function(e){if(isEnterKey(e)){searchForPattern();}else if(isEscapeKey(e)){$searchAction.find('.icon-close').click();}});if(currentPattern){$searchInput.val(currentPattern);$searchAction.click();} if(this.isEmpty&&!currentPattern){$searchAction.css({display:'none'});}},handleOffsetInformation:function(domElem){var self=this;$('.dataTablePages',domElem).each(function(){var offset=1+Number(self.param.filter_offset);var offsetEnd=Number(self.param.filter_offset)+Number(self.param.filter_limit);var totalRows=Number(self.param.totalRows);var offsetEndDisp=offsetEnd;if(self.param.keep_summary_row==1)--totalRows;if(offsetEnd>totalRows||Number(self.param.filter_limit)==-1)offsetEndDisp=totalRows;if(totalRows!=0){var str=sprintf(_pk_translate('General_Pagination'),offset,offsetEndDisp,totalRows);$(this).text(str);}else{$(this).hide();}});var $next=$('.dataTableNext',domElem);$next.each(function(){var offsetEnd=Number(self.param.filter_offset) +Number(self.param.filter_limit);var totalRows=Number(self.param.totalRows);if(self.param.keep_summary_row==1)--totalRows;if(offsetEnd<totalRows){$(this).css('visibility','visible');}});$next.off('click');$next.click(function(){$(this).off('click');self.param.filter_offset=Number(self.param.filter_offset)+Number(self.param.filter_limit);self.reloadAjaxDataTable();});var $prev=$('.dataTablePrevious',domElem);$prev.each(function(){var offset=1+Number(self.param.filter_offset);if(offset!=1){$(this).css('visibility','visible');}});$prev.off('click');$prev.click(function(){$(this).off('click');var offset=Number(self.param.filter_offset)-Number(self.param.filter_limit);if(offset<0){offset=0;} self.param.filter_offset=offset;self.param.previous=1;self.reloadAjaxDataTable();});},handleEvolutionAnnotations:function(domElem){var self=this;if((self.param.viewDataTable==='graphEvolution'||self.param.viewDataTable==='graphStackedBarEvolution')&&$('.annotationView',domElem).length>0){$('.dataTableFeatures',domElem).addClass('hasEvolution');piwik.annotations.api.getEvolutionIcons(self.param.idSite,self.param.date,self.param.period,self.param['evolution_'+self.param.period+'_last_n'],function(response){var annotations=$(response),datatableFeatures=$('.dataTableFeatures',domElem),noteSize=16,annotationAxisHeight=30;var annotationsCss={left:6};annotations.css(annotationsCss);piwik.annotations.placeEvolutionIcons(annotations,domElem);annotations.insertBefore($('.dataTableFooterNavigation',domElem));$('.piwik-graph',domElem).on('resizeGraph',function(){piwik.annotations.placeEvolutionIcons(annotations,domElem);});datatableFeatures.on('mouseenter','.evolution-annotations>span',function(){$(this).css('opacity',1);});datatableFeatures.on('mouseleave','.evolution-annotations>span',function(){if($(this).attr('data-count')==0){$(this).css('opacity',0);}});datatableFeatures.on('click','.evolution-annotations>span',function(){var spanSelf=$(this),date=spanSelf.attr('data-date'),oldDate=$('.annotation-manager',domElem).attr('data-date');if(date){var period=self.param.period;if(period=='range'){period='day';} piwik.annotations.showAnnotationViewer(domElem,self.param.idSite,date,period,undefined,function(manager){manager.attr('data-is-range',0);$('.annotationView',domElem).attr('title',_pk_translate('Annotations_IconDesc'));var viewAndAdd=_pk_translate('Annotations_ViewAndAddAnnotations'),hideNotes=_pk_translate('Annotations_HideAnnotationsFor');if(oldDate){$('span',annotations).each(function(){if($(this).attr('data-date')==oldDate){$(this).attr('title',sprintf(viewAndAdd,oldDate));return false;}});} if(manager.is(':hidden')){spanSelf.attr('title',sprintf(viewAndAdd,date));} else{spanSelf.attr('title',sprintf(hideNotes,date));}});}});var runningAnimation=null;domElem.on('mouseenter','.annotation',function(e){var date=$(this).attr('data-date');var icon=$();$('span',annotations).each(function(){if($(this).attr('data-date')==date){icon=$('img',this);return false;}});if(icon[0]==runningAnimation){return;} $('span',annotations).each(function(){$('img',this).removeAttr('style');});icon.effect("bounce",{times:1,distance:10},1000);runningAnimation=icon[0];});domElem.on('mouseleave','.annotations',function(e){runningAnimation=null;});self.$element.trigger('piwik:annotationsLoaded');});}},handleAnnotationsButton:function(domElem){var self=this;if(self.param.idSubtable){return;} $('.annotationView',domElem).click(function(){var annotationManager=$('.annotation-manager',domElem);if(annotationManager.length>0&&annotationManager.attr('data-is-range')==1){if(annotationManager.is(':hidden')){annotationManager.slideDown('slow');$(this).attr('title',_pk_translate('Annotations_IconDescHideNotes'));} else{annotationManager.slideUp('slow');$(this).attr('title',_pk_translate('Annotations_IconDesc'));}} else{var lastN=self.param['evolution_'+self.param.period+'_last_n'];piwik.annotations.showAnnotationViewer(domElem,self.param.idSite,self.param.date,self.param.period,lastN,function(manager){manager.attr('data-is-range',1);});$(this).attr('title',_pk_translate('Annotations_IconDescHideNotes'));}});},handleExportBox:function(domElem){var self=this;if(self.param.idSubtable){return;} self.jsViewDataTable=self.param.viewDataTable;$('.tableAllColumnsSwitch a',domElem).show();$('.dataTableFooterIcons .tableIcon',domElem).click(function(){var id=$(this).attr('data-footer-icon-id');if(!id){return;} var handler=DataTable._footerIconHandlers[id];if(!handler){handler=DataTable._footerIconHandlers['table'];} handler(self,id);});self.currentGraphViewIcon=0;self.graphViewEnabled=0;self.graphViewStartingThreads=0;self.graphViewStartingKeep=false;},handleConfigurationBox:function(domElem,callbackSuccess){var self=this;if(typeof self.parentId!="undefined"&&self.parentId!=''){return;} if((typeof self.numberOfSubtables=='undefined'||self.numberOfSubtables==0)&&(typeof self.param.flat=='undefined'||self.param.flat!=1)){const dataTableActionsVueApp=$('[vue-entry="CoreHome.DataTableActions"]',domElem).data('vueAppInstance');if(dataTableActionsVueApp){dataTableActionsVueApp.showFlattenTable_=false;}} var ul=$('ul.tableConfiguration',domElem);if(!ul.find('li').length){return;} var generateClickCallback=function(paramName,callbackAfterToggle,setParamCallback){return function(){if(setParamCallback){var data=setParamCallback();}else{self.param[paramName]=(1-(self.param[paramName]||0))+'';var data={};} self.param.filter_offset=0;delete self.param.totalRows;if(callbackAfterToggle)callbackAfterToggle();self.reloadAjaxDataTable(true,callbackSuccess);data[paramName]=self.param[paramName];self.notifyWidgetParametersChange(domElem,data);};};$('.dataTableExcludeLowPopulation',domElem).click(generateClickCallback('enable_filter_excludelowpop'));$('.dataTableFlatten',domElem).click(generateClickCallback('flat'));$('.dataTableShowTotalsRow',domElem).click(generateClickCallback('keep_totals_row'));$('.dataTableIncludeAggregateRows',domElem).click(generateClickCallback('include_aggregate_rows',function(){if(self.param.include_aggregate_rows==1){self.param.filter_sort_column='';self.notifyWidgetParametersChange(domElem,{filter_sort_column:''});}}));$('.dataTableShowDimensions',domElem).click(generateClickCallback('show_dimensions'));$('.dataTablePivotBySubtable',domElem).click(generateClickCallback('pivotBy',null,function(){if(self.param.pivotBy&&self.param.pivotBy!='0'){self.param.pivotBy='0';self.param.pivotByColumn='0';}else{self.param.pivotBy=self.props.pivot_by_dimension;if(self.props.pivot_by_column){self.param.pivotByColumn=self.props.pivot_by_column;}} self.param.filter_sort_column='';return{filter_sort_column:''};}));},notifyWidgetParametersChange:function(domWidget,parameters){var widget=$(domWidget).closest('[widgetId],[containerid]');if(widget&&widget.length&&widget[0].hasAttribute('widgetId')){widget.trigger('setParameters',parameters);}else{var containerId=widget&&widget.length?widget.attr('containerid'):undefined;var reportId=$(domWidget).closest('[data-report]').attr('data-report');var ajaxRequest=new ajaxHelper();ajaxRequest.addParams({module:'CoreHome',action:'saveViewDataTableParameters',report_id:reportId,containerId:containerId},'get');ajaxRequest.withTokenInUrl();ajaxRequest.addParams({parameters:JSON.stringify(parameters)},'post');ajaxRequest.setCallback(function(){});ajaxRequest.setFormat('html');ajaxRequest.send();}},tooltip:function(domElement){function isTextEllipsized($element){return!($element&&$element[0]&&$element.outerWidth()>=$element[0].scrollWidth);} var $domElement=$(domElement);if($domElement.data('tooltip')=='enabled'){return;} $domElement.data('tooltip','enabled');if(!isTextEllipsized($domElement)){return;} var customToolTipText=$domElement.attr('title')||$domElement.text();if(customToolTipText){$domElement.attr('title',customToolTipText);} $domElement.tooltip({track:true,show:false,hide:false});},applyCosmetics:function(domElem){},handleColumnHighlighting:function(domElem){var currentNthChild=null;var self=this;$(domElem).on('mouseenter','td:not(.cellSubDataTable)',function(e){e.stopPropagation();var $this=$(e.target);if($this.hasClass('label')){return;} var table=$this.closest('table');var nthChild=$this.parent('tr').children().index($(e.target))+1;var rows=$('> tbody > tr',table);if(currentNthChild===nthChild){return;} currentNthChild=nthChild;rows.children("td:nth-child("+(nthChild)+")").addClass('highlight');self.repositionRowActions($this.parent('tr'));});$(domElem).on('mouseleave','td',function(event){var $this=$(event.target);var table=$this.closest('table');var $parentTr=$this.parent('tr');var tr=$parentTr.children();var nthChild=$parentTr.children().index($this);var targetTd=$(event.relatedTarget).closest('td');var nthChildTarget=targetTd.parent('tr').children().index(targetTd);if(nthChild==nthChildTarget){return;} currentNthChild=null;var rows=$('tr',table);rows.find("td:nth-child("+(nthChild+1)+")").removeClass('highlight');});},getComparisonIdSubtables:function($row){if($row.is('.parentComparisonRow')){var comparisonRows=$row.nextUntil('.parentComparisonRow').filter('.comparisonRow');var comparisonIdSubtables={};comparisonRows.each(function(){var comparisonSeriesIndex=+$(this).data('comparison-series');comparisonIdSubtables[comparisonSeriesIndex]=$(this).data('idsubtable');});return JSON.stringify(comparisonIdSubtables);} return undefined;},handleSubDataTable:function(domElem){var self=this;self.numberOfSubtables=$('tr.subDataTable',domElem).click(function(){var idSubTable=$(this).attr('id');var divIdToReplaceWithSubTable='subDataTable_'+idSubTable;if(typeof self.loadedSubDataTable[divIdToReplaceWithSubTable]=="undefined"){var numberOfColumns=$(this).closest('table').find('thead tr').first().children().length;var $insertAfter=$(this).nextUntil(':not(.comparePeriod):not(.comparisonRow)').last();if(!$insertAfter.length){$insertAfter=$(this);} var newRow=$insertAfter.after('<tr class="subDataTableContainer">'+'<td colspan="'+numberOfColumns+'" class="cellSubDataTable">'+'<div id="'+divIdToReplaceWithSubTable+'">'+'<span class="loadingPiwik" style="display:inline"><img src="plugins/Morpheus/images/loading-blue.gif" />'+_pk_translate('General_Loading')+'</span>'+'</div>'+'</td>'+'</tr>');piwikHelper.lazyScrollTo(newRow);var savedActionVariable=self.param.action;var filtersToRestore=self.resetAllFilters();self.param.enable_filter_excludelowpop=filtersToRestore.enable_filter_excludelowpop;self.param.idSubtable=idSubTable;self.param.action=self.props.subtable_controller_action;delete self.param.totalRows;var extraParams={};extraParams.comparisonIdSubtables=self.getComparisonIdSubtables($(this));self.reloadAjaxDataTable(false,function(response){self.dataTableLoaded(response,divIdToReplaceWithSubTable);},extraParams);self.param.action=savedActionVariable;delete self.param.idSubtable;self.restoreAllFilters(filtersToRestore);self.loadedSubDataTable[divIdToReplaceWithSubTable]=true;$(this).find('div.dataTableRowActions').hide();}else{var $toToggle=$(this).nextUntil('.subDataTableContainer').last();$toToggle=$toToggle.length?$toToggle:$(this);$toToggle.next().toggle();} $(this).toggleClass('expanded');self.repositionRowActions($(this));}).length;},handleColumnDocumentation:function(domElem){if(this.isDashboard()){return;} $('th:has(.columnDocumentation)',domElem).each(function(){var th=$(this);var tooltip=th.find('.columnDocumentation');tooltip.next().hover(function(){var left=(-1*tooltip.outerWidth()/ 2)+th.width()/ 2;var top=-1*tooltip.outerHeight();var thPos=th.position();var distance=tooltip.parent().offset().top;var scroller=tooltip.closest('.dataTableScroller');var thPosTop=0;if(thPos&&thPos.top){thPosTop=thPos.top;} top=top+thPosTop;if($(window).scrollTop()>=distance-100||scroller.css('overflow-x')==='scroll'){top=tooltip.parent().outerHeight()} if(!th.next().length){left=(-1*tooltip.outerWidth())+th.width()+ parseInt(th.css('padding-right'),10);} if(th.offset().top+top<0){top=thPosTop+th.outerHeight();} tooltip.css({marginLeft:left,marginTop:top,top:0});$(".dataTable thead").addClass('with-z-index');tooltip.stop(true,true).fadeIn(250);},function(){$(this).prev().stop(true,true).fadeOut(250);$(".dataTable thead").removeClass('with-z-index');});});},handleRowActions:function(domElem){this.doHandleRowActions(domElem.find('table > tbody > tr'));},handleCellTooltips:function(domElem){domElem.find('span.cell-tooltip').tooltip({track:true,items:'span',content:function(){return $(this).parent().data('tooltip');},show:false,hide:false,tooltipClass:'small'});domElem.find('span.ratio').tooltip({track:true,content:function(){var title=$(this).attr('title');return piwikHelper.escape(title.replace(/\n/g,'<br />'));},show:{delay:700,duration:200},hide:false})},handleRelatedReports:function(domElem){var self=this,hideShowRelatedReports=function(thisReport){$('span',$(thisReport).parent().parent()).each(function(){if(thisReport==this) $(this).hide();else $(this).show();});},thisReport=$('.datatableRelatedReports span:hidden',domElem)[0];function replaceReportTitleAndHelp(domElem,relatedReportName){if(!domElem||!domElem.length){return;} var $title='';var $headline=domElem.prev('h2');if($headline.length){$title=$headline.find('.title:not(.ng-hide)');}else{var $widget=domElem.parents('.widget');if($widget.length){$title=$widget.find('.widgetName > span');}} if($title.length){$title.text(relatedReportName);var scope=$title.scope();if(scope){var $doc=domElem.find('.reportDocumentation');if($doc.length){var helpParagraph=$doc.attr('data-content');if(helpParagraph.length){helpParagraph.html(window.vueSanitize(helpParagraph));} scope.inlineHelp=$.trim($doc.html());} scope.featureName=$.trim(relatedReportName);setTimeout(function(){scope.$apply();},1);}}} hideShowRelatedReports(thisReport);var relatedReports=$('.datatableRelatedReports span',domElem);if(!relatedReports.length){$('.datatableRelatedReports',domElem).hide();} relatedReports.each(function(){var clicked=this;$(this).unbind('click').click(function(e){var $this=$(this);var url=$this.attr('href');self.resetAllFilters();var newParams=broadcast.getValuesFromUrl(url);for(var key in newParams){self.param[key]=decodeURIComponent(newParams[key]);} delete self.param.pivotBy;delete self.param.pivotByColumn;var relatedReportName=$this.text();self.reloadAjaxDataTable(true,(function(relatedReportName){return function(newReport){var newDomElem=self.dataTableLoaded(newReport,self.workingDivId);hideShowRelatedReports(clicked);replaceReportTitleAndHelp(newDomElem,relatedReportName);}})(relatedReportName));});});},handleTriggeredEvents:function(domElem){var self=this;$(domElem).bind('reload',function(e,paramOverride){paramOverride=paramOverride||{};for(var name in paramOverride){self.param[name]=paramOverride[name];} self.reloadAjaxDataTable(true);});},handleSummaryRow:function(domElem){var details=_pk_translate('General_LearnMore',[' (<a href="' +_pk_externalRawLink('https://matomo.org/faq/how-to/faq_54/')+'" rel="noreferrer noopener" target="_blank">','</a>)']);domElem.find('tr.summaryRow').each(function(){var labelSpan=$(this).find('.label .value').filter(function(index,elem){return $(elem).text()!='-';}).last();var defaultLabel=labelSpan.text();$(this).hover(function(){labelSpan.html(defaultLabel+details);},function(){labelSpan.text(defaultLabel);});});},doHandleRowActions:function(trs){if(!trs||!trs.length||!trs[0]){return;} var parent=$(trs[0]).closest('table');var self=this;var merged=$.extend({},self.param,self.props);var availableActionsForReport=DataTable_RowActions_Registry.getAvailableActionsForReport(merged);if(availableActionsForReport.length==0){return;} var actionInstances={};for(var i=0;i<availableActionsForReport.length;i++){var action=availableActionsForReport[i];actionInstances[action.name]=action.createInstance(self);} var useTouchEvent=false;var listenEvent='mouseenter';var userAgent=String(navigator.userAgent).toLowerCase();if(userAgent.match(/(iPod|iPhone|iPad|Android|IEMobile|Windows Phone)/i)){useTouchEvent=true;listenEvent='click';} parent.on(listenEvent,'tr:not(.subDataTableContainer)',function(){var tr=this;var $tr=$(tr);var td=$tr.find('td.label:last');for(var i=0;i<availableActionsForReport.length;i++){var action=availableActionsForReport[i];actionInstances[action.name].initTr($tr);} td.css('minWidth',$tr.is('.comparisonRow')?'117px':'145px');if($(this).is('.parentComparisonRow,.comparePeriod').length){return;} if(useTouchEvent&&tr.actionsDom&&tr.actionsDom.prop('rowActionsVisible')){tr.actionsDom.prop('rowActionsVisible',false);tr.actionsDom.hide();return;} if(!tr.actionsDom){tr.actionsDom=self.createRowActions(availableActionsForReport,$tr,actionInstances);td.prepend(tr.actionsDom);} self.repositionRowActions($tr);if($(window).width()>=600||useTouchEvent){tr.actionsDom.show();} if(useTouchEvent){tr.actionsDom.prop('rowActionsVisible',true);}});if(!useTouchEvent){parent.on('mouseleave','tr',function(){var tr=this;if(tr.actionsDom){tr.actionsDom.hide();}});}},createRowActions:function(availableActionsForReport,tr,actionInstances){var container=$(document.createElement('div')).addClass('dataTableRowActions');for(var i=availableActionsForReport.length-1;i>=0;i--){var action=availableActionsForReport[i];if(!action.isAvailableOnRow(this.param,tr)){continue;} var actionEl=$(document.createElement('a')).attr({href:'#'}).addClass('action'+action.name);if(action.dataTableIcon.indexOf('icon-')===0){actionEl.append($(document.createElement('span')).addClass(action.dataTableIcon+' rowActionIcon'));}else{actionEl.append($(document.createElement('img')).attr({src:action.dataTableIcon}));} container.append(actionEl);if(i==availableActionsForReport.length-1){actionEl.addClass('leftmost');} if(i==0){actionEl.addClass('rightmost');} actionEl.click((function(action,el){return function(e){$(this).blur().tooltip('close');container.hide();if(typeof actionInstances[action.name].onClick=='function'){return actionInstances[action.name].onClick(el,tr,e);} actionInstances[action.name].trigger(tr,e);return false;}})(action,actionEl));if(typeof action.dataTableIconHover!='undefined'){actionEl.append($(document.createElement('img')).attr({src:action.dataTableIconHover}).hide());actionEl.hover(function(){var img=$(this).find('img');img.eq(0).hide();img.eq(1).show();},function(){var img=$(this).find('img');img.eq(1).hide();img.eq(0).show();});} if(typeof action.dataTableIconTooltip!='undefined'){actionEl.tooltip({track:true,items:'a',content:'<h3>'+action.dataTableIconTooltip[0]+'</h3>'+action.dataTableIconTooltip[1],tooltipClass:'rowActionTooltip',open:function(){var tooltip=$(this).parents('.matomo-widget').tooltip('instance');if(tooltip){tooltip.disable();}},close:function(){var tooltip=$(this).parents('.matomo-widget').tooltip('instance');if(tooltip){tooltip.enable();}},show:false,hide:false});}} return container;},repositionRowActions:function(tr){if(!tr){return;} var td=tr.find('td.label:last');var actions=tr.find('div.dataTableRowActions');if(!actions){return;} actions.height(tr.innerHeight()-6);actions.css('marginLeft',(td.width()-3-actions.outerWidth())+'px');},_findReportHeader:function(domElem){var h2=false;if(domElem.prev().is('h2')){h2=domElem.prev();} else if(this.param.viewDataTable=='tableGoals'){h2=$('#titleGoalsByDimension');} else if($('h2',domElem)){h2=$('h2',domElem);} return h2;},_createDivId:function(){return'dataTable_'+this._controlId;}});var switchToHtmlTable=function(dataTable,viewDataTable){dataTable.param.viewDataTable=viewDataTable;delete dataTable.param.enable_filter_excludelowpop;delete dataTable.param.filter_sort_column;delete dataTable.param.filter_sort_order;delete dataTable.param.columns;delete dataTable.param.totals;dataTable.reloadAjaxDataTable();dataTable.notifyWidgetParametersChange(dataTable.$element,{viewDataTable:viewDataTable});};var switchToEcommerceView=function(dataTable,viewDataTable){if(viewDataTable=='ecommerceOrder'){dataTable.param.abandonedCarts='0';}else{dataTable.param.abandonedCarts='1';} var viewDataTable=dataTable.param.viewDataTable;if(viewDataTable=='ecommerceOrder'||viewDataTable=='ecommerceAbandonedCart'){viewDataTable='table';} switchToHtmlTable(dataTable,viewDataTable);};DataTable.registerFooterIconHandler('table',switchToHtmlTable);DataTable.registerFooterIconHandler('tableAllColumns',switchToHtmlTable);DataTable.registerFooterIconHandler('tableGoals',switchToHtmlTable);DataTable.registerFooterIconHandler('ecommerceOrder',switchToEcommerceView);DataTable.registerFooterIconHandler('ecommerceAbandonedCart',switchToEcommerceView);DataTable.switchToGraph=function(dataTable,viewDataTable){var filters=dataTable.resetAllFilters();dataTable.param.flat=filters.flat;dataTable.param.keep_totals_row=filters.keep_totals_row;dataTable.param.columns=filters.columns;dataTable.param.viewDataTable=viewDataTable;dataTable.reloadAjaxDataTable();dataTable.notifyWidgetParametersChange(dataTable.$element,{viewDataTable:viewDataTable});};DataTable.registerFooterIconHandler('cloud',DataTable.switchToGraph);exports.DataTable=DataTable;})(jQuery,require); var DataTable_RowActions_Registry={registry:[],register:function(action){var createInstance=action.createInstance;action.createInstance=function(dataTable,param){var instance=createInstance(dataTable,param);instance.actionName=action.name;return instance;};this.registry.push(action);},getAvailableActionsForReport:function(dataTableParams,tr){if(dataTableParams.disable_row_actions=='1'){return[];} var available=[];for(var i=0;i<this.registry.length;i++){if(this.registry[i].isAvailableOnReport(dataTableParams,tr)){available.push(this.registry[i]);}} available.sort(function(a,b){return b.order-a.order;});return available;},getActionByName:function(name){for(var i=0;i<this.registry.length;i++){if(this.registry[i].name==name){return this.registry[i];}} return false;}};DataTable_RowActions_Registry.register({name:'RowEvolution',dataTableIcon:'icon-evolution',order:50,dataTableIconTooltip:[_pk_translate('General_RowEvolutionRowActionTooltipTitle'),_pk_translate('General_RowEvolutionRowActionTooltip')],createInstance:function(dataTable,param){if(dataTable!==null&&typeof dataTable.rowEvolutionActionInstance!='undefined'){return dataTable.rowEvolutionActionInstance;} if(dataTable===null&¶m){var report=param.split(':')[0];var div=$(require('piwik/UI').DataTable.getDataTableByReport(report));if(div.length&&div.data('uiControlObject')){dataTable=div.data('uiControlObject');if(typeof dataTable.rowEvolutionActionInstance!='undefined'){return dataTable.rowEvolutionActionInstance;}}} var instance=new DataTable_RowActions_RowEvolution(dataTable);if(dataTable!==null){dataTable.rowEvolutionActionInstance=instance;} return instance;},isAvailableOnReport:function(dataTableParams){return(typeof dataTableParams.disable_row_evolution=='undefined'||dataTableParams.disable_row_evolution=="0");},isAvailableOnRow:function(dataTableParams,tr){return!tr.hasClass('totalsRow');}});function DataTable_RowAction(dataTable){this.dataTable=dataTable;this.trEventName='piwikTriggerRowAction';this.actionName='RowAction';} DataTable_RowAction.prototype.initTr=function(tr){var self=this;tr.unbind(self.trEventName).bind(self.trEventName,function(e,params){self.trigger($(this),params.originalEvent,params.label,params.originalRow);});};DataTable_RowAction.prototype.trigger=function(tr,e,subTableLabel,originalRow){var label=this.getLabelFromTr(tr);if(subTableLabel){var separator=' > ';label+=separator+subTableLabel;} var subtable=tr.closest('table');if(subtable.is('.subDataTable')){subtable.closest('tr').prev().trigger(this.trEventName,{label:label,originalEvent:e,originalRow:tr});return;} var $dataTable=subtable.closest('div.dataTable');if($dataTable.hasClass('dataTableActions')||$dataTable.data('table-type')==='ActionsDataTable'){var allClasses=tr.attr('class');var matches=allClasses.match(/level[0-9]+/);var level=parseInt(matches[0].substring(5,matches[0].length),10);if(level>0){var findLevel='level'+(level-1);var ptr=tr;while((ptr=ptr.prev()).length){if(!ptr.hasClass(findLevel)||ptr.hasClass('nodata')){continue;} ptr.trigger(this.trEventName,{label:label,originalEvent:e,originalRow:tr});return;}}} this.performAction(label,tr,e,originalRow);};DataTable_RowAction.prototype.getLabelFromTr=function(tr){if(tr.data('label')){return tr.data('label');} var rowMetadata=this.getRowMetadata(tr);if(rowMetadata.combinedLabel){return'@'+rowMetadata.combinedLabel;} var label=tr.find('span.label');var value=label.data('originalText');if(!value){value=label.text();} value=value.trim();value=encodeURIComponent(value);if(!tr.hasClass('subDataTable')){value='@'+value;} return value;};DataTable_RowAction.prototype.getRowMetadata=function(tr){return tr.data('row-metadata')||{};};DataTable_RowAction.prototype.openPopover=function(parameter){broadcast.propagateNewPopoverParameter('RowAction',this.actionName+':'+parameter);};broadcast.addPopoverHandler('RowAction',function(param){var paramParts=param.split(':');var rowActionName=paramParts[0];paramParts.shift();param=paramParts.join(':');var rowAction=DataTable_RowActions_Registry.getActionByName(rowActionName);if(rowAction){rowAction.createInstance(null,param).doOpenPopover(param);}});DataTable_RowAction.prototype.performAction=function(label,tr,e){};DataTable_RowAction.prototype.doOpenPopover=function(parameter){};function DataTable_RowActions_RowEvolution(dataTable){this.dataTable=dataTable;this.trEventName='piwikTriggerRowEvolution';this.multiEvolutionRows=[];this.multiEvolutionRowsPretty=[];this.multiEvolutionRowsSeries=[];} DataTable_RowActions_RowEvolution.launch=function(apiMethod,label){var param='RowEvolution:'+apiMethod+':0:'+label;broadcast.propagateNewPopoverParameter('RowAction',param);};DataTable_RowActions_RowEvolution.prototype=new DataTable_RowAction;DataTable_RowActions_RowEvolution.prototype.performAction=function(label,tr,e,originalRow){if(e.shiftKey){this.addMultiEvolutionRow(label,$(originalRow||tr).data('comparison-series'),originalRow||tr);return;} this.addMultiEvolutionRow(label,$(originalRow||tr).data('comparison-series'),originalRow||tr);var extraParams=$.extend({},$(originalRow||tr).data('param-override'));if(typeof extraParams!=='object'){extraParams={};} if(this.multiEvolutionRows.length>1){extraParams.action='getMultiRowEvolutionPopover';label=this.multiEvolutionRows.join(',');labelPretty=this.multiEvolutionRowsPretty.join(',');if(label!=labelPretty){extraParams.labelPretty=labelPretty;} if(this.multiEvolutionRowsSeries.length>1){var MatomoUrl=window.CoreHome.MatomoUrl;extraParams.compareDates=MatomoUrl.parsed.value.compareDates;extraParams.comparePeriods=MatomoUrl.parsed.value.comparePeriods;extraParams.compareSegments=MatomoUrl.parsed.value.compareSegments;extraParams.labelSeries=this.multiEvolutionRowsSeries.join(',');delete extraParams.period;delete extraParams.date;delete extraParams.segment;}}else{var labelPretty=this.getPrettyLabel(originalRow||tr);if(labelPretty&&labelPretty!=label){extraParams['labelPretty']=labelPretty;}} $.each(this.dataTable.param,function(index,value){if(index!=='idSite'&&index.indexOf('id')===0&&($.isNumeric(value)||value.indexOf('ecommerce')===0)){extraParams[index]=value;}});if(this.dataTable&&this.dataTable.jsViewDataTable==='tableGoals'){if(extraParams['idGoal']){extraParams['showGoalMetricsForGoal']=extraParams['idGoal'];delete(extraParams['idGoal']);} else{extraParams['showGoalMetricsForGoal']=-1;}} if(this.dataTable.param.abandonedCarts!==undefined){extraParams['abandonedCarts']=this.dataTable.param.abandonedCarts;} if(this.dataTable.param.secondaryDimension!==undefined){extraParams['secondaryDimension']=this.dataTable.param.secondaryDimension;} if(this.dataTable.param.flat!==undefined){extraParams['flat']=this.dataTable.param.flat;} var apiMethod=this.dataTable.param.module+'.'+this.dataTable.param.action;this.openPopover(apiMethod,extraParams,label);};DataTable_RowActions_RowEvolution.prototype.getPrettyLabel=function getPrettyLabel(tr){if(!this.dataTable.props.row_identifier||this.dataTable.props.row_identifier==='label'){return null;} var prettyLabel=[];var row=$(tr);while(row.length){var label=row.data('label-pretty')||this.getLabelFromTr(row);prettyLabel.unshift(label);var subtable=row.closest('table');if(subtable.is('.subDataTable')){row=subtable.closest('tr').prev();}else{break;}} return prettyLabel.join(' > ');};DataTable_RowActions_RowEvolution.prototype.addMultiEvolutionRow=function(label,seriesIndex,tr){if(typeof seriesIndex!=='undefined'){var self=this;var found=false;this.multiEvolutionRows.forEach(function(rowLabel,index){var rowSeriesIndex=self.multiEvolutionRowsSeries[index];if(label===rowLabel&&seriesIndex===rowSeriesIndex){found=true;return false;}});if(!found){this.multiEvolutionRows.push(label);this.multiEvolutionRowsPretty.push(this.getPrettyLabel(tr));this.multiEvolutionRowsSeries.push(seriesIndex);}}else if($.inArray(label,this.multiEvolutionRows)===-1){this.multiEvolutionRows.push(label);this.multiEvolutionRowsPretty.push(this.getPrettyLabel(tr)) this.multiEvolutionRowsSeries=[];}};DataTable_RowActions_RowEvolution.prototype.openPopover=function(apiMethod,extraParams,label){var urlParam=apiMethod+':'+encodeURIComponent(JSON.stringify(extraParams))+':'+label;DataTable_RowAction.prototype.openPopover.apply(this,[urlParam]);};DataTable_RowActions_RowEvolution.prototype.doOpenPopover=function(urlParam){var urlParamParts=urlParam.split(':');var apiMethod=urlParamParts.shift();var extraParamsString=urlParamParts.shift(),extraParams={};try{extraParams=JSON.parse(decodeURIComponent(extraParamsString));}catch(e){if(extraParamsString=='1'){extraParams.action='getMultiRowEvolutionPopover';}else if(extraParamsString!='0'){extraParams.action='getMultiRowEvolutionPopover';extraParams.column=extraParamsString;}} var label=urlParamParts.join(':');this.showRowEvolution(apiMethod,label,extraParams);};DataTable_RowActions_RowEvolution.prototype.showRowEvolution=function(apiMethod,label,extraParams){var self=this;var box=Piwik_Popover.showLoading('Row Evolution');box.addClass('rowEvolutionPopover');var requestParams={apiMethod:apiMethod,label:label,disableLink:1};var callback=function(html){Piwik_Popover.setContent(html);var title=box.find('div.popover-title');if(title.length){Piwik_Popover.setTitle(title.html());title.remove();} Piwik_Popover.onClose(function(){self.multiEvolutionRows=[];self.multiEvolutionRowsPretty=[];self.multiEvolutionRowsSeries=[];});if(self.dataTable!==null){box.find('.rowevolution-startmulti').click(function(){Piwik_Popover.onClose(false);broadcast.propagateNewPopoverParameter(false);return false;});}else{box.find('.compare-container, .rowevolution-startmulti').remove();} box.find('select.multirowevoltion-metric').change(function(){var metric=$(this).val();Piwik_Popover.onClose(false);extraParams.column=metric;self.openPopover(apiMethod,extraParams,label);return true;});};requestParams.module='CoreHome';requestParams.action='getRowEvolutionPopover';requestParams.colors=JSON.stringify(piwik.getSparklineColors());var idDimension;if(broadcast.getValueFromUrl('module')==='Widgetize'){idDimension=broadcast.getValueFromUrl('subcategory');}else{idDimension=broadcast.getValueFromHash('subcategory');} if(idDimension&&(''+idDimension).indexOf('customdimension')===0){idDimension=(''+idDimension).replace('customdimension','');idDimension=parseInt(idDimension,10);if(idDimension>0){requestParams.idDimension=idDimension;}} $.extend(requestParams,extraParams);var ajaxRequest=new ajaxHelper();ajaxRequest.addParams(requestParams,'get');ajaxRequest.withTokenInUrl();ajaxRequest.setCallback(callback);ajaxRequest.setFormat('html');ajaxRequest.send();}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($){var piwikMinDate=new Date(piwik.minDateYear,piwik.minDateMonth-1,piwik.minDateDay),piwikMaxDate=new Date(piwik.maxDateYear,piwik.maxDateMonth-1,piwik.maxDateDay);piwik.getBaseDatePickerOptions=function(defaultDate){return{showOtherMonths:false,dateFormat:'yy-mm-dd',firstDay:1,minDate:piwikMinDate,maxDate:piwikMaxDate,prevText:"",nextText:"",currentText:"",defaultDate:defaultDate,changeMonth:true,changeYear:true,stepMonths:1,dayNamesMin:[_pk_translate('Intl_Day_Min_StandAlone_7'),_pk_translate('Intl_Day_Min_StandAlone_1'),_pk_translate('Intl_Day_Min_StandAlone_2'),_pk_translate('Intl_Day_Min_StandAlone_3'),_pk_translate('Intl_Day_Min_StandAlone_4'),_pk_translate('Intl_Day_Min_StandAlone_5'),_pk_translate('Intl_Day_Min_StandAlone_6')],dayNamesShort:[_pk_translate('Intl_Day_Short_StandAlone_7'),_pk_translate('Intl_Day_Short_StandAlone_1'),_pk_translate('Intl_Day_Short_StandAlone_2'),_pk_translate('Intl_Day_Short_StandAlone_3'),_pk_translate('Intl_Day_Short_StandAlone_4'),_pk_translate('Intl_Day_Short_StandAlone_5'),_pk_translate('Intl_Day_Short_StandAlone_6')],dayNames:[_pk_translate('Intl_Day_Long_StandAlone_7'),_pk_translate('Intl_Day_Long_StandAlone_1'),_pk_translate('Intl_Day_Long_StandAlone_2'),_pk_translate('Intl_Day_Long_StandAlone_3'),_pk_translate('Intl_Day_Long_StandAlone_4'),_pk_translate('Intl_Day_Long_StandAlone_5'),_pk_translate('Intl_Day_Long_StandAlone_6')],monthNamesShort:[_pk_translate('Intl_Month_Short_StandAlone_1'),_pk_translate('Intl_Month_Short_StandAlone_2'),_pk_translate('Intl_Month_Short_StandAlone_3'),_pk_translate('Intl_Month_Short_StandAlone_4'),_pk_translate('Intl_Month_Short_StandAlone_5'),_pk_translate('Intl_Month_Short_StandAlone_6'),_pk_translate('Intl_Month_Short_StandAlone_7'),_pk_translate('Intl_Month_Short_StandAlone_8'),_pk_translate('Intl_Month_Short_StandAlone_9'),_pk_translate('Intl_Month_Short_StandAlone_10'),_pk_translate('Intl_Month_Short_StandAlone_11'),_pk_translate('Intl_Month_Short_StandAlone_12')],monthNames:[_pk_translate('Intl_Month_Long_StandAlone_1'),_pk_translate('Intl_Month_Long_StandAlone_2'),_pk_translate('Intl_Month_Long_StandAlone_3'),_pk_translate('Intl_Month_Long_StandAlone_4'),_pk_translate('Intl_Month_Long_StandAlone_5'),_pk_translate('Intl_Month_Long_StandAlone_6'),_pk_translate('Intl_Month_Long_StandAlone_7'),_pk_translate('Intl_Month_Long_StandAlone_8'),_pk_translate('Intl_Month_Long_StandAlone_9'),_pk_translate('Intl_Month_Long_StandAlone_10'),_pk_translate('Intl_Month_Long_StandAlone_11'),_pk_translate('Intl_Month_Long_StandAlone_12')]};};piwikHelper.registerShortcut('d',_pk_translate('CoreHome_ShortcutCalendar'),function(event){if(event.altKey){return;} if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;} $('#periodString .title').trigger('click').focus();});}(jQuery)); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($){var sparklineColorNames=['backgroundColor','lineColor','minPointColor','maxPointColor','lastPointColor','fillColor'];var sparklineDisplayHeight=25;var sparklineDisplayWidth=100;piwik.getSparklineColors=function(){var colors=piwik.ColorManager.getColors('sparkline-colors',sparklineColorNames);var comparisonService=window.CoreHome.ComparisonsStoreInstance;if(comparisonService.isComparing()){var comparisons=comparisonService.getAllComparisonSeries();colors.lineColor=comparisons.map(function(comp){return comp.color;});} return colors;};piwik.initSparklines=function(){$(function(){$('.sparkline img').each(function(){var $self=$(this);if($self.attr('src')){return;} var seriesIndices=$self.closest('.sparkline').data('series-indices');var sparklineColors=piwik.getSparklineColors();if(seriesIndices&&sparklineColors.lineColor instanceof Array){sparklineColors.lineColor=sparklineColors.lineColor.filter(function(c,index){return seriesIndices.indexOf(index)!==-1;});} var colors=JSON.stringify(sparklineColors);var appendToSparklineUrl='&colors='+encodeURIComponent(colors);var token_auth=broadcast.getValueFromUrl('token_auth');if(token_auth.length&&piwik.shouldPropagateTokenAuth){appendToSparklineUrl+='&token_auth='+token_auth;} $self.attr('width',sparklineDisplayWidth);$self.attr('height',sparklineDisplayHeight);$self.attr('src',$self.attr('data-src')+appendToSparklineUrl);});});};window.initializeSparklines=function(){$('.dataTableVizEvolution[data-report]').each(function(){var graph=$(this);var selectorsToFindParent=['.widget','.widget-container','.reporting-page','body'];var index=0,selector,parent;for(index;index<selectorsToFindParent.length;index++){selector=selectorsToFindParent[index];parent=graph.parents(selector).first();if(parent&&parent.length){break;}} if(!parent||!parent.length){return;} var sparklines=parent.find('div.sparkline:not(.notLinkable)');sparklines.each(function(){var sparklineUrl=$('img',this).attr('data-src');var $this=$(this);if(sparklineUrl!=""){$this.addClass('linked');var params=$this.data('graph-params')||{};if(!Object.keys(params).length){var urlParams=broadcast.getValuesFromUrl(sparklineUrl);if(urlParams.columns){params.columns=decodeURIComponent(urlParams.columns);} if(urlParams.rows){params.rows=decodeURIComponent(urlParams.rows);}} $this.off('click.sparkline');$this.on('click.sparkline',function(){var reportId=graph.attr('data-report'),dataTable=graph;if(dataTable.length==0){if($(this).closest('.widget').length){dataTable=$(this).closest('.widget').find('div.dataTableVizEvolution');}else{dataTable=$('div.dataTableVizEvolution');}} dataTable.trigger('reload',params);});}});});};}(jQuery)); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($){$(function(){var initUpdateCheck=function(){var COMPONENT_SELECTOR='div[vue-entry="CoreHome.VersionInfoHeaderMessage"]';var headerComponentParent=$(COMPONENT_SELECTOR).parent();headerComponentParent.one('click','#updateCheckLinkContainer',function(e){var headerComponent=$(this).closest(COMPONENT_SELECTOR);var headerMessage=headerComponent.find('#header_message');var $titleElement=headerMessage.find('.title');if($titleElement.attr('target')){return;} e.preventDefault();var ajaxRequest=new ajaxHelper();ajaxRequest.setLoadingElement('#header_message .loadingPiwik');ajaxRequest.addParams({module:'CoreHome',action:'checkForUpdates'},'get');ajaxRequest.withTokenInUrl();$titleElement.addClass('activityIndicator');ajaxRequest.setCallback(function(response){headerMessage.fadeOut('slow',function(){response=$(COMPONENT_SELECTOR,$('<div>'+response+'</div>'));$titleElement.removeClass('activityIndicator');if(response.length){headerComponent.replaceWith(response);piwikHelper.compileVueDirectives(response);piwikHelper.compileVueEntryComponents(response);initUpdateCheck();}else{headerMessage.find('.title').html(_pk_translate('CoreHome_YouAreUsingTheLatestVersion'));headerMessage.show();setTimeout(function(){headerMessage.fadeOut('slow',function(){headerComponent.remove();});},4000);}});});ajaxRequest.setFormat('html');ajaxRequest.send();return false;});};initTopControls();initUpdateCheck();});}(jQuery));$(document).ready(function(){$('.accessibility-skip-to-content').click(function(e){$('a[name="main"]').attr('tabindex',-1).focus();$(window).scrollTo($('a[name="main"]'));});$("#mobile-top-menu").sideNav({closeOnClick:true,edge:'right'});$('.navbar.collapsible').collapsible();$('select').not('.ui-datepicker select').material_select();piwikHelper.registerShortcut('?',_pk_translate('CoreHome_ShortcutHelp'),function(event){if(event.altKey||$('.modal.open').length){return;} if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;} var list=$('#shortcuthelp dl');list.empty();var keys=Object.keys(piwikHelper.shortcuts).sort();jQuery.each(keys,function(i,key){if(piwikHelper.shortcuts.hasOwnProperty(key)){list.append($('<dt />').append($('<kbd />').text(key)));list.append($('<dd />').text(piwikHelper.shortcuts[key]));}});var isMac=navigator.userAgent.indexOf('Mac OS X')!=-1;list.append($('<dt />').append($('<kbd />').text(_pk_translate(isMac?"CoreHome_MacPageUp":"CoreHome_HomeShortcut"))));list.append($('<dd />').text(_pk_translate('CoreHome_PageUpShortcutDescription')));list.append($('<dt />').append($('<kbd />').text(_pk_translate(isMac?"CoreHome_MacPageDown":"CoreHome_EndShortcut"))));list.append($('<dd />').text(_pk_translate('CoreHome_PageDownShortcutDescription')));piwikHelper.modalConfirm('#shortcuthelp');});}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function initTopControls(){function getOverlap(element1,element2){if(!element1||!element1.getBoundingClientRect||!element2||!element2.getBoundingClientRect){return 0;} var rect1=element1.getBoundingClientRect();var rect2=element2.getBoundingClientRect();var doOverlap=!(rect1.right<rect2.left||rect1.left>rect2.right);if(doOverlap){return rect1.left-rect2.right;} return 0;} var $topControlsContainer=$('.top_controls');var allRendered=true;if($topControlsContainer.length){$topControlsContainer.find('.piwikTopControl').each(function(){var $control=$(this);if($control.css('display')=='none'){return;} var width=$control.outerWidth(true);var isControlFullyRendered=width>=30;if(!isControlFullyRendered){allRendered=false;}});if(allRendered){var alreadyRendered=$('.top_controls').css('visibility')==='visible';$('.top_controls').css('visibility','visible');$('.top_controls').css('opacity','1');if(!alreadyRendered){window.CoreHome.Matomo.postEvent('Matomo.topControlsRendered');}}}} $(document).ready(function(){$('.periodSelector').keydown(function(e){toggleCalendar(e);}) blockPropegation();$('.periodSelector .form-radio').keydown(function(e){e.stopPropagation();if(e.which==13){selectPeriodRadioButton($(this));}})});$(document).ready(function(){$('.periodSelector').keydown(function(e){toggleCalendar(e);}) blockPropegation();$('.periodSelector .form-radio').keydown(function(e){e.stopPropagation();if(e.which==13){selectPeriodRadioButton($(this));}})});function toggleCalendar(e){var calendarOpen=$('.periodSelector').hasClass('expanded');if(e.which==13){if(calendarOpen){$('.periodSelector').removeClass('expanded');}else{$('.periodSelector').addClass('expanded');}}} function selectPeriodRadioButton(button){$('.periodSelector .form-radio').removeClass('checked');button.addClass('checked');button.find('input').click();blockPropegation();} function blockPropegation(){$('.ui-datepicker-month, .ui-datepicker-year, .periodSelector td a').keydown(function(e){e.stopPropagation();})} $(function(){piwikHelper.registerShortcut('r',_pk_translate('CoreHome_ShortcutRefresh'),function(event){if(event.altKey){return;} if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;} var Matomo=window.CoreHome.Matomo;var hashParsed=window.CoreHome.MatomoUrl.hashParsed.value;Matomo.postEvent('loadPage',hashParsed.category,hashParsed.subcategory);});}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($){var colorNames={"aliceblue":"#f0f8ff","antiquewhite":"#faebd7","aqua":"#00ffff","aquamarine":"#7fffd4","azure":"#f0ffff","beige":"#f5f5dc","bisque":"#ffe4c4","black":"#000000","blanchedalmond":"#ffebcd","blue":"#0000ff","blueviolet":"#8a2be2","brown":"#a52a2a","burlywood":"#deb887","cadetblue":"#5f9ea0","chartreuse":"#7fff00","chocolate":"#d2691e","coral":"#ff7f50","cornflowerblue":"#6495ed","cornsilk":"#fff8dc","crimson":"#dc143c","cyan":"#00ffff","darkblue":"#00008b","darkcyan":"#008b8b","darkgoldenrod":"#b8860b","darkgray":"#a9a9a9","darkgreen":"#006400","darkkhaki":"#bdb76b","darkmagenta":"#8b008b","darkolivegreen":"#556b2f","darkorange":"#ff8c00","darkorchid":"#9932cc","darkred":"#8b0000","darksalmon":"#e9967a","darkseagreen":"#8fbc8f","darkslateblue":"#483d8b","darkslategray":"#2f4f4f","darkturquoise":"#00ced1","darkviolet":"#9400d3","deeppink":"#ff1493","deepskyblue":"#00bfff","dimgray":"#696969","dodgerblue":"#1e90ff","firebrick":"#b22222","floralwhite":"#fffaf0","forestgreen":"#228b22","fuchsia":"#ff00ff","gainsboro":"#dcdcdc","ghostwhite":"#f8f8ff","gold":"#ffd700","goldenrod":"#daa520","gray":"#808080","green":"#43a047","greenyellow":"#adff2f","honeydew":"#f0fff0","hotpink":"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082","ivory":"#fffff0","khaki":"#f0e68c","lavender":"#e6e6fa","lavenderblush":"#fff0f5","lawngreen":"#7cfc00","lemonchiffon":"#fffacd","lightblue":"#add8e6","lightcoral":"#f08080","lightcyan":"#e0ffff","lightgoldenrodyellow":"#fafad2","lightgrey":"#d3d3d3","lightgreen":"#90ee90","lightpink":"#ffb6c1","lightsalmon":"#ffa07a","lightseagreen":"#20b2aa","lightskyblue":"#87cefa","lightslategray":"#778899","lightsteelblue":"#b0c4de","lightyellow":"#ffffe0","lime":"#00ff00","limegreen":"#32cd32","linen":"#faf0e6","magenta":"#ff00ff","maroon":"#800000","mediumaquamarine":"#66cdaa","mediumblue":"#0000cd","mediumorchid":"#ba55d3","mediumpurple":"#9370d8","mediumseagreen":"#3cb371","mediumslateblue":"#7b68ee","mediumspringgreen":"#00fa9a","mediumturquoise":"#48d1cc","mediumvioletred":"#c71585","midnightblue":"#191970","mintcream":"#f5fffa","mistyrose":"#ffe4e1","moccasin":"#ffe4b5","navajowhite":"#ffdead","navy":"#000080","oldlace":"#fdf5e6","olive":"#808000","olivedrab":"#6b8e23","orange":"#ffa500","orangered":"#ff4500","orchid":"#da70d6","palegoldenrod":"#eee8aa","palegreen":"#98fb98","paleturquoise":"#afeeee","palevioletred":"#d87093","papayawhip":"#ffefd5","peachpuff":"#ffdab9","peru":"#cd853f","pink":"#ffc0cb","plum":"#dda0dd","powderblue":"#b0e0e6","purple":"#800080","red":"#ff0000","rosybrown":"#bc8f8f","royalblue":"#4169e1","saddlebrown":"#8b4513","salmon":"#fa8072","sandybrown":"#f4a460","seagreen":"#2e8b57","seashell":"#fff5ee","sienna":"#a0522d","silver":"#c0c0c0","skyblue":"#87ceeb","slateblue":"#6a5acd","slategray":"#708090","snow":"#fffafa","springgreen":"#00ff7f","steelblue":"#4682b4","tan":"#d2b48c","teal":"#008080","thistle":"#d8bfd8","tomato":"#ff6347","turquoise":"#40e0d0","violet":"#ee82ee","wheat":"#f5deb3","white":"#ffffff","whitesmoke":"#f5f5f5","yellow":"#ffff00","yellowgreen":"#9acd32"};var ColorManager=function(){};ColorManager.prototype={getColor:function(namespace,name){var element=this._getElement();element.attr('class','color-manager '+namespace).attr('data-name',name);return this._normalizeColor(element.css('color'));},getColors:function(namespace,names,asArray){var colors=asArray?[]:{};for(var i=0;i!=names.length;++i){var name=names[i],color=this.getColor(namespace,name);if(color){if(asArray){colors.push(color);}else{colors[name]=color;}}} return colors;},getSingleColorFromGradient:function(spectrumStart,spectrumEnd,percentFromStart){if(!(spectrumStart instanceof Array)){spectrumStart=this.getRgb(spectrumStart);} if(!(spectrumEnd instanceof Array)){spectrumEnd=this.getRgb(spectrumEnd);} var result=[];for(var channel=0;channel!=spectrumStart.length;++channel){var delta=(spectrumEnd[channel]-spectrumStart[channel])*percentFromStart;result[channel]=Math.floor(spectrumStart[channel]+delta);} return this.getHexColor(result);},getRgb:function(hexColor){if(hexColor[0]=='#'){hexColor=hexColor.substring(1);} if(hexColor.length==3){return[parseInt(hexColor[0],16),parseInt(hexColor[1],16),parseInt(hexColor[2],16)];}else{return[parseInt(hexColor.substring(0,2),16),parseInt(hexColor.substring(2,4),16),parseInt(hexColor.substring(4,6),16)];}},getHexColor:function(rgbColor){for(var i=0;i!=rgbColor.length;++i){rgbColor[i]=("00"+rgbColor[i].toString(16)).slice(-2);} return'#'+rgbColor.join('');},_normalizeColor:function(color){if(color==this._getTransparentColor()){return null;} if(color&&colorNames[color]){return colorNames[color];} if(color&&color[0]!='#'){var parts=color.split(/[()rgb,\s]+/);parts=[+parts[1],+parts[2],+parts[3]];color=this.getHexColor(parts);} return color;},_getElement:function(){if(!this.$element){$('body').append('<div id="color-manager"></div>');this.$element=$('#color-manager');} return this.$element;},_getTransparentColor:function(){if(!this.transparentColor){this.transparentColor=$('<div style="color:transparent;display:none;"></div>').appendTo($('body')).css('color');} return this.transparentColor;}};piwik.ColorManager=new ColorManager();}(jQuery)); (function($,require){var exports=require('piwik/UI');var Notification=function(){this.notificationId=null;};Notification.prototype.show=function(message,options){options=checkOptions(options);options.noclear=!!options.noclear;this.notificationId=window.CoreHome.NotificationsStore.show($.extend({message:message},options));};Notification.prototype.remove=function(notificationId){window.CoreHome.NotificationsStore.remove(notificationId);};Notification.prototype.scrollToNotification=function(){if(this.notificationId){window.CoreHome.NotificationsStore.scrollToNotification(this.notificationId);}};Notification.prototype.toast=function(message,options){options=checkOptions(options);options.noclear=!!options.noclear;window.CoreHome.NotificationsStore.toast($.extend({message:message},options));};exports.Notification=Notification;function checkOptions(options){if(options&&!$.isPlainObject(options)){throw new Error('Options has the wrong format, cannot display notification');}else if(!options){options={};} return options;}})(jQuery,require); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ var NumberFormatter=(function(){var minimumFractionDigits=0;var maximumFractionDigits=2;function format(value,pattern){if(!$.isNumeric(value)){return value;} pattern=pattern||piwik.numbers.patternNumber;var patterns=pattern.split(';');if(patterns.length==1){patterns.push('-'+patterns[0])} var negative=value<0;pattern=negative?patterns[1]:patterns[0];var usesGrouping=(pattern.indexOf(',')!=-1);if(usesGrouping){var primaryGroupMatches=pattern.match(/#+0/);var primaryGroupSize=primaryGroupMatches[0].length;var secondaryGroupSize=primaryGroupMatches[0].length;var numberGroups=pattern.split(',');if(numberGroups.length>2){secondaryGroupSize=numberGroups[1].length;}} var signMultiplier=negative?'-1':'1';value=value*signMultiplier;var valueParts=value.toString().split('.');var majorDigits=valueParts[0];minorDigits=valueParts[1]||'';if(usesGrouping){majorDigits=majorDigits.split('').reverse();var groups=[];groups.push(majorDigits.splice(0,primaryGroupSize).reverse().join(''));while(majorDigits.length){groups.push(majorDigits.splice(0,secondaryGroupSize).reverse().join(''));} groups=groups.reverse();majorDigits=groups.join(',');} if(minimumFractionDigits<maximumFractionDigits){var minorDigits=minorDigits.replace(/0+$/,'');if(minorDigits.length<minimumFractionDigits){var neededZeroes=minimumFractionDigits-minorDigits.length;minorDigits+=(new Array(neededZeroes+1)).join('0');}} value=minorDigits?majorDigits+'.'+minorDigits:majorDigits;value=pattern.replace(/#(?:[\.,]#+)*0(?:[,\.][0#]+)*/,value);return replaceSymbols(value);} function replaceSymbols(value){var replacements={'.':piwik.numbers.symbolDecimal,',':piwik.numbers.symbolGroup,'+':piwik.numbers.symbolPlus,'-':piwik.numbers.symbolMinus,'%':piwik.numbers.symbolPercent};var newValue='';var valueParts=value.split('');$.each(valueParts,function(index,value){$.each(replacements,function(char,replacement){if(value.indexOf(char)!=-1){value=value.replace(char,replacement);return false;}});newValue+=value;});return newValue;} return{formatNumber:function(value){return format(value,piwik.numbers.patternNumber);},formatPercent:function(value){return format(value,piwik.numbers.patternPercent);},formatCurrency:function(value,currency){var formatted=format(value,piwik.numbers.patternCurrency);return formatted.replace('¤',currency);}}})(); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ var ListingFormatter=(function(){function format(type,items){switch(items.length){case 0:return'';case 1:return items[0];case 2:var pattern=_pk_translate('Intl_ListPattern'+type+'2');return pattern.replace('{0}',items[0]).replace('{1}',items[1]);default:var patternStart=_pk_translate('Intl_ListPattern'+type+'Start');var patternMiddle=_pk_translate('Intl_ListPattern'+type+'Middle');var patternEnd=_pk_translate('Intl_ListPattern'+type+'End');var result=patternStart;while(items.length>2){var pattern=items.length>3?patternMiddle:patternEnd;result=result.replace('{0}',items.shift()).replace('{1}',pattern);} return result.replace('{0}',items[0]).replace('{1}',items[1]);}} return{formatAnd:function(values){return format('And',values);},formatOr:function(values){return format('Or',values);},}})(); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ $(document).ready(function(){if(!piwik||!location.protocol){return;} if(!piwik.hasSuperUserAccess){return;} if(piwik.hasServerDetectedHttps){return;} var isHttpsUsed=0===location.protocol.indexOf('https');if(!isHttpsUsed){return;} var params=['"config/config.ini.php"','"assume_secure_protocol=1"','"[General]"','<a target="_blank" href="'+_pk_externalRawLink('https://matomo.org/faq/how-to-install/faq_98/')+'">','</a>'];var message=_pk_translate('CoreAdminHome_ProtocolNotDetectedCorrectly')+" "+_pk_translate('CoreAdminHome_ProtocolNotDetectedCorrectlySolution',params);var UI=require('piwik/UI');var notification=new UI.Notification();notification.show(message,{context:'warning'});}); (function($,require){var SeriesPicker=function(dataTable){this.domElem=null;this.dataTableId=dataTable.workingDivId;this.selectableColumns=dataTable.props.selectable_columns;this.selectableRows=dataTable.props.selectable_rows;this.show=!!dataTable.props.show_series_picker&&(this.selectableColumns||this.selectableRows);this.multiSelect=!!dataTable.props.allow_multi_select_series_picker;};SeriesPicker.prototype={init:function(){if(!this.show){return;} var self=this;var selectedColumns=this.selectableColumns.filter(isItemDisplayed).map(function(columnConfig){return columnConfig.column;});var selectedRows=this.selectableRows.filter(isItemDisplayed).map(function(rowConfig){return rowConfig.matcher;});this.domElem=$('<div style="display:inline-block"><div></div></div>');$(this).trigger('placeSeriesPicker');var createVNode=Vue.createVNode;var createVueApp=CoreHome.createVueApp;var SeriesPicker=CoreVisualizations.SeriesPicker;var app=createVueApp({render:function(){return createVNode(SeriesPicker,{multiselect:self.multiSelect,selectableColumns:self.selectableColumns,selectableRows:self.selectableRows,selectedColumns:selectedColumns,selectedRows:selectedRows,onSelect:function selectionChanged(event){var columns=event.columns,rows=event.rows;if(columns.length===0&&rows.length===0){return;} rows=rows.map(encodeURIComponent);$(self).trigger('seriesPicked',[columns,rows]);var UI=require('piwik/UI');var params={columns:columns,columns_to_display:columns,rows:rows,rows_to_display:rows};var tableNode=$('#'+self.dataTableId);UI.DataTable.prototype.notifyWidgetParametersChange(tableNode,params);}});}});app.mount(this.domElem.children()[0]);function isItemDisplayed(columnOrRowConfig){return columnOrRowConfig.displayed;}},getMetricTranslation:function(metric){for(var i=0;i!==this.selectableColumns.length;++i){if(this.selectableColumns[i].column===metric){return this.selectableColumns[i].translation;}} return metric;}};var exports=require('piwik/DataTableVisualizations/Widgets');exports.SeriesPicker=SeriesPicker;})(jQuery,require); function rowEvolutionGetMetricNameFromRow(tr){return $(tr).find('td [data-name]').text().trim();} (function($,require){var exports=require('piwik/UI'),DataTable=exports.DataTable,dataTablePrototype=DataTable.prototype,getLabelFontFamily=function(){if(!window.piwik.jqplotLabelFont){window.piwik.jqplotLabelFont=$('<p/>').hide().appendTo('body').css('font-family');} return window.piwik.jqplotLabelFont||'Arial';};exports.getLabelFontFamily=getLabelFontFamily;exports.JqplotGraphDataTable=function(element){DataTable.call(this,element);};$.extend(exports.JqplotGraphDataTable.prototype,dataTablePrototype,{init:function(){dataTablePrototype.init.call(this);var graphElement=$('.piwik-graph',this.$element);if(!graphElement.length){return;} this._lang={noData:_pk_translate('General_NoDataForGraph'),exportTitle:_pk_translate('General_ExportAsImage'),exportText:_pk_translate('General_SaveImageOnYourComputer'),metricsToPlot:_pk_translate('General_MetricsToPlot'),metricToPlot:_pk_translate('General_MetricToPlot'),recordsToPlot:_pk_translate('General_RecordsToPlot'),incompletePeriod:_pk_translate('General_IncompletePeriod'),invalidatedPeriod:_pk_translate('General_InvalidatedPeriod')};this.targetDivId=this.workingDivId+'Chart';graphElement.attr('id',this.targetDivId);try{var graphData=JSON.parse(graphElement.attr('data-data'));}catch(e){console.error('JSON.parse Error: "'+e+"\" in:\n"+graphElement.attr('data-data'));return;} this.data=graphData.data;this._setJqplotParameters(graphData.params);this._setDataStates(graphData.dataStates);if(this.props.display_percentage_in_tooltip){this._setTooltipPercentages();} this._bindEvents();if(this.props.external_series_toggle){this.addExternalSeriesToggle(window[this.props.external_series_toggle],this.props.external_series_toggle_show_all==1);} var self=this;setTimeout(function(){self.render();},1);},_setDataStates:function(dataStates){this.jqplotParams.dataStates=[];if(Array.isArray(dataStates)){this.jqplotParams.dataStates=dataStates;}},_setJqplotParameters:function(params){defaultParams={grid:{drawGridLines:false,borderWidth:0,shadow:false},title:{show:false},axesDefaults:{pad:1.0,tickRenderer:$.jqplot.CanvasAxisTickRenderer,tickOptions:{showMark:false,fontSize:'11px',fontFamily:getLabelFontFamily()},rendererOptions:{drawBaseline:false}},axes:{yaxis:{tickOptions:{formatString:'%s',formatter:$.jqplot.NumberFormatter}},}};this.jqplotParams=$.extend(true,{},defaultParams,params);for(var i=2;typeof this.jqplotParams.axes['y'+i+'axis']!='undefined';i++){this.jqplotParams.axes['y'+i+'axis'].tickOptions=$.extend(true,{},{formatString:'%s',formatter:$.jqplot.NumberFormatter},this.jqplotParams.axes['y'+i+'axis'].tickOptions);} this._setColors();},_setTooltipPercentages:function(){this.tooltip={percentages:[]};for(var seriesIdx=0;seriesIdx!=this.data.length;++seriesIdx){var series=this.data[seriesIdx];var sum=0;$.each(series,function(index,value){if($.isArray(value)&&value[1]){sum=sum+value[1];}else if(!$.isArray(value)){sum=sum+value;}});var percentages=this.tooltip.percentages[seriesIdx]=[];for(var valueIdx=0;valueIdx!=series.length;++valueIdx){var value=series[valueIdx];if($.isArray(value)&&value[1]){value=value[1];} percentages[valueIdx]=sum>0?Math.round(100*value / sum):0;}}},_bindEvents:function(){var self=this;var target=$('#'+this.targetDivId);target.on('jqplotDataHighlight',function(e,seriesIndex,valueIndex){self._showDataPointTooltip(this,seriesIndex,valueIndex);}).on('jqplotDataUnhighlight',function(){self._destroyDataPointTooltip($(this));});this._plotWidth=target.innerWidth();target.on('resizeGraph',function(){self._resizeGraph();});target.on('piwikExportAsImage',function(){self.exportAsImage(target,self._lang);});target.on('piwikDestroyPlot',function(){if(self._resizeListener){$(window).off('resize',self._resizeListener);} self._plot.destroy();for(var i=0;i<$.jqplot.visiblePlots.length;i++){if($.jqplot.visiblePlots[i]===self){$.jqplot.visiblePlots[i]=null;}}});this.$element.closest('.widgetContent').on('widget:resize',function(){self._resizeGraph();});},_resizeGraph:function(){var width=$('#'+this.targetDivId).innerWidth();if(width>0&&Math.abs(this._plotWidth-width)>=5){this._plotWidth=width;this.render();}},_setWindowResizeListener:function(){var self=this;var timeout=false;this._resizeListener=function(){if(timeout){window.clearTimeout(timeout);} timeout=window.setTimeout(function(){$('#'+self.targetDivId).trigger('resizeGraph');},300);};$(window).on('resize',this._resizeListener);},_destroyDataPointTooltip:function($element){if($element.is(":data('ui-tooltip')")){$element.tooltip('destroy');}},_showDataPointTooltip:function(element,seriesIndex,valueIndex){},changeSeries:function(columns,rows){this.showLoading();columns=columns||[];if(typeof columns=='string'){columns=columns.split(',');} rows=rows||[];if(typeof rows=='string'){rows=rows.split(',');} var dataTable=$('#'+this.workingDivId).data('uiControlObject');dataTable.param.columns=columns.join(',');dataTable.param.rows=rows.join(',');delete dataTable.param.filter_limit;delete dataTable.param.totalRows;if(dataTable.param.filter_sort_column!='label'){dataTable.param.filter_sort_column=columns[0];} dataTable.param.disable_generic_filters='0';dataTable.reloadAjaxDataTable(false);},destroyPlot:function(){var target=$('#'+this.targetDivId);target.trigger('piwikDestroyPlot');if(target.data('oldHeight')>0){target.height(target.data('oldHeight'));target.data('oldHeight',0);target.innerHTML='';}},showLoading:function(){var target=$('#'+this.targetDivId);var loading=$(document.createElement('div')).addClass('jqplot-loading');loading.css({width:target.innerWidth()+'px',height:target.innerHeight()+'px',opacity:0});target.prepend(loading);loading.css({opacity:.7});},_checkTicksWidth:function($targetDiv){if(typeof this.jqplotParams.axes.xaxis.ticksOriginal==='undefined'||this.jqplotParams.axes.xaxis.ticksOriginal==={}){this.jqplotParams.axes.xaxis.ticksOriginal=this.jqplotParams.axes.xaxis.ticks.slice();} var ticks=this.jqplotParams.axes.xaxis.ticks=this.jqplotParams.axes.xaxis.ticksOriginal.slice();var divWidth=$targetDiv.width();var tickOptions=$.extend(true,{},this.jqplotParams.axesDefaults.tickOptions,this.jqplotParams.axes.xaxis.tickOptions);var gutter=tickOptions.gutter||5;var sumWidthOfTicks=Number.MAX_VALUE;var $labelTestChamber={};var tick="";var $body=$("body");var maxRunsFailsafe=20;var ticksCount=0;var key=0;while(sumWidthOfTicks>divWidth&&maxRunsFailsafe>0){sumWidthOfTicks=0;for(key=0;key<ticks.length;key++){tick=ticks[key];if(tick!==" "&&tick!==""){$labelTestChamber=$("<span/>",{style:'font-size: '+(tickOptions.fontSize||'11px')+'; font-family: '+(tickOptions.fontFamily||'Arial, Helvetica, sans-serif')+';'+(tickOptions.fontWeight||'normal')+';'+'clear: both; float: none;',text:tick}).appendTo($body);sumWidthOfTicks+=($labelTestChamber.width()+gutter*2);$labelTestChamber.remove();}} ticksCount=0;if(sumWidthOfTicks>divWidth){for(key=0;key<ticks.length;key++){tick=ticks[key];if(tick!==" "&&tick!==""){if(ticksCount%2==1){ticks[key]=" ";} ticksCount++;}}} maxRunsFailsafe--;}},render:function(){if(this.data.length==0){return;} var targetDivId=this.workingDivId+'Chart';var lang=this._lang;var dataTableDiv=$('#'+this.workingDivId);var target=$('#'+targetDivId);if(target.find('canvas').length>0){this.destroyPlot();} var self=this;if(this.param.viewDataTable==="graphBar"||this.param.viewDataTable==="graphVerticalBar"||this.param.viewDataTable==="graphEvolution"){self._checkTicksWidth(target);} try{var plot=self._plot=$.jqplot(targetDivId,this.data,this.jqplotParams);}catch(e){if(e!="No plot target specified"){throw e;}} self._setWindowResizeListener();var self=this;if(typeof $.jqplot.visiblePlots=='undefined'){$.jqplot.visiblePlots=[];window.CoreHome.Matomo.on('matomoPageChange',function(){for(var i=0;i<$.jqplot.visiblePlots.length;i++){if($.jqplot.visiblePlots[i]==null){continue;} $.jqplot.visiblePlots[i].destroyPlot();} $.jqplot.visiblePlots=[];});} if(typeof plot!='undefined'){$.jqplot.visiblePlots.push(self);}},exportAsImage:function(container,lang){var pixelRatio=window.devicePixelRatio||1;var exportCanvas=document.createElement('canvas');exportCanvas.width=Math.round(container.width()*pixelRatio);exportCanvas.height=Math.round(container.height()*pixelRatio);if(!exportCanvas.getContext){alert("Sorry, not supported in your browser. Please upgrade your browser :)");return;} var exportCtx=exportCanvas.getContext('2d');var canvases=container.find('canvas');for(var i=0;i<canvases.length;i++){var canvas=canvases.eq(i);var position=canvas.position();var parent=canvas.parent();if(parent.hasClass('jqplot-axis')){var addPosition=parent.position();position.left+=addPosition.left;position.top+=addPosition.top+parseInt(parent.css('marginTop'),10);} exportCtx.drawImage(canvas[0],Math.round(position.left*pixelRatio),Math.round(position.top*pixelRatio));} var exported=exportCanvas.toDataURL("image/png");var img=document.createElement('img');img.src=exported;img=$(img).css({width:Math.round(exportCanvas.width / pixelRatio)+'px',height:Math.round(exportCanvas.height / pixelRatio)+'px'});var popover=$(document.createElement('div'));popover.append('<div style="font-size: 13px; margin-bottom: 10px;">' +lang.exportText+'</div>').append($(img));popover.dialog({title:lang.exportTitle,modal:true,width:'auto',resizable:false,autoOpen:true,open:function(event,ui){$('.ui-widget-overlay').on('click.popover',function(){popover.dialog('close');});},close:function(event,ui){$(this).dialog("destroy").remove();}});},setYTicks:function(){var $tempAxisElement=$('<div>').attr('class','jqplot-axis jqplot-y2axis').css({'visibility':'hidden','display':'inline-block'});$('<span>').css('font-size',this.jqplotParams.axesDefaults.fontSize).css('font-family',this.jqplotParams.axesDefaults.fontFamily).appendTo($tempAxisElement);$('body').append($tempAxisElement);this.setYTicksForAxis('yaxis',this.jqplotParams.axes.yaxis);var axisLength=10;for(var i=2;typeof this.jqplotParams.axes['y'+i+'axis']!='undefined';i++){this.setYTicksForAxis('y'+i+'axis',this.jqplotParams.axes['y'+i+'axis']);axisLength+=getAxisWidth(this.jqplotParams.axes['y'+i+'axis']);} var axesShown={};this.jqplotParams.series.forEach(function(series){axesShown[series.yaxis]=true;});var hasMultipleAxes=Object.keys(axesShown).length>1;if(hasMultipleAxes){$('.piwik-graph',this.$element).css('width','calc(100% - '+axisLength+'px)');}else{$('.piwik-graph',this.$element).css('width','');} $tempAxisElement.remove();function getAxisWidth(axis){var maxWidth=0;axis.ticks.forEach(function(tick){var tickFormatted=$.jqplot.NumberFormatter(axis.tickOptions.formatString||'%s',tick);$tempAxisElement.find('span').text(tickFormatted);maxWidth=Math.max(maxWidth,$tempAxisElement.width());});return maxWidth;}},setYTicksForAxis:function(axisName,axis){var maxCrossDataSets=0;for(var i=0;i<this.data.length;i++){if(this.jqplotParams.series[i].yaxis==axisName){var maxValue=Math.max.apply(Math,this.data[i]);if(maxValue>maxCrossDataSets){maxCrossDataSets=maxValue;} maxCrossDataSets=parseFloat(maxCrossDataSets);}} maxCrossDataSets+=Math.max(1,Math.round(maxCrossDataSets*.03));if(maxCrossDataSets>15){maxCrossDataSets=maxCrossDataSets+10-maxCrossDataSets%10;} if(maxCrossDataSets==0){maxCrossDataSets=1;} if(axis.tickOptions&&axis.tickOptions.formatString&&axis.tickOptions.formatString.endsWith('%')&&maxCrossDataSets>100){maxCrossDataSets=100;} var ticks=[];var numberOfTicks=2;var tickDistance=Math.ceil(maxCrossDataSets / numberOfTicks);for(var i=0;i<=numberOfTicks;i++){ticks.push(i*tickDistance);} axis.ticks=ticks;},formatY:function(value,seriesIndex){var floatVal=parseFloat(value);var intVal=parseInt(value,10);if(Math.abs(floatVal-intVal)>=0.005){value=Math.round(floatVal*100)/ 100;}else if(parseFloat(intVal)==floatVal){value=intVal;}else{value=floatVal;} var axisId=this.jqplotParams.series[seriesIndex].yaxis;var formatString=this.jqplotParams.axes[axisId].tickOptions.formatString;return $.jqplot.NumberFormatter(formatString,value);},addExternalSeriesToggle:function(seriesPickerClass,initiallyShowAll){new seriesPickerClass(this.targetDivId,this,initiallyShowAll);if(!initiallyShowAll){var initialMetrics=0;var $rowEvolution=$('#'+this.targetDivId).closest('.rowevolution');var newData=[];var newSeries=[];if($rowEvolution.data('initialMetrics')){initialMetrics=$rowEvolution.data('initialMetrics');if(Array.isArray(initialMetrics)){for(var j=0;j<initialMetrics.length;j++){for(var k=0;k<this.jqplotParams.series.length;k++){if(this.jqplotParams.series[k]&&this.jqplotParams.series[k].label&&this.jqplotParams.series[k].label===initialMetrics[j]){newData.push(this.data[k]);newSeries.push(this.jqplotParams.series[k]);break;}}}}} if(newData.length){this.data=newData;this.jqplotParams.series=newSeries;}else{this.data=[this.data[0]];this.jqplotParams.series=[this.jqplotParams.series[0]];} this.setYTicks();}},_setColors:function(){var colorManager=piwik.ColorManager;var viewDataTable=$('#'+this.workingDivId).data('uiControlObject').param['viewDataTable'];var graphType='';if(viewDataTable=='graphEvolution'||viewDataTable=='graphStackedBarEvolution'){graphType='evolution';}else if(viewDataTable=='graphPie'){graphType='pie';}else if(viewDataTable=='graphVerticalBar'){graphType='bar';} var namespace=graphType+'-graph-colors';this._setSeriesColors(namespace);this.jqplotParams.grid.background=colorManager.getColor(namespace,'grid-background');this.jqplotParams.grid.borderColor=colorManager.getColor(namespace,'grid-border');this.tickColor=colorManager.getColor(namespace,'ticks');this.singleMetricColor=colorManager.getColor(namespace,'single-metric-label')},_setSeriesColors:function(namespace){var colorManager=piwik.ColorManager,seriesColorNames=['series0','series1','series2','series3','series4','series5','series6','series7','series8','series9','series10'];var comparisonService=window.CoreHome.ComparisonsStoreInstance;if(comparisonService.isComparing()&&typeof this.jqplotParams.series[0].seriesIndex!=='undefined'){namespace='comparison-series-color';seriesColorNames=[];this.jqplotParams.series.forEach(function(s){var seriesColorName=comparisonService.getSeriesColorName(s.seriesIndex,s.metricIndex);seriesColorNames.push(seriesColorName);});} this.jqplotParams.seriesColors=colorManager.getColors(namespace,seriesColorNames,true);}});DataTable.registerFooterIconHandler('graphPie',DataTable.switchToGraph);DataTable.registerFooterIconHandler('graphVerticalBar',DataTable.switchToGraph);DataTable.registerFooterIconHandler('graphEvolution',DataTable.switchToGraph);})(jQuery,require);function JQPlotExternalSeriesToggle(targetDivId,jqplotObject,initiallyShowAll){this.init(targetDivId,originalConfig,initiallyShowAll);} JQPlotExternalSeriesToggle.prototype={init:function(targetDivId,jqplotObject,initiallyShowAll){this.targetDivId=targetDivId;this.jqplotObject=jqplotObject;this.originalData=jqplotObject.data;this.originalSeries=jqplotObject.jqplotParams.series;this.originalAxes=jqplotObject.jqplotParams.axes;this.originalParams=jqplotObject.jqplotParams;this.originalSeriesColors=jqplotObject.jqplotParams.seriesColors;this.initiallyShowAll=initiallyShowAll;this.activated=[];this.target=$('#'+targetDivId);this.attachEvents();},attachEvents:function(){},showSeries:function(i){this.activated=[i];this.replot();},toggleSeries:function(i){if(this.activated.indexOf(i)>-1){if(this.activated.length>1){this.activated.splice(this.activated.indexOf(i),1);}}else{this.activated.push(i);} this.replot();},replot:function(){this.beforeReplot();var usedAxes=[];var config={data:this.originalData,params:this.originalParams};config.data=[];config.params.series=[];config.params.axes={xaxis:this.originalAxes.xaxis};config.params.seriesColors=[];for(var j=0;j<this.activated.length;j++){for(var k=0;k<this.originalSeries.length;k++){if(this.originalSeries[k]&&this.originalSeries[k].label&&(this.originalSeries[k].label===this.activated[j]||piwikHelper.htmlDecode(this.originalSeries[k].label)===this.activated[j])){config.data.push(this.originalData[k]);config.params.seriesColors.push(this.originalSeriesColors[k]);config.params.series.push($.extend(true,{},this.originalSeries[k]));var axis=this.originalSeries[k].yaxis;if($.inArray(axis,usedAxes)==-1){usedAxes.push(axis);} break;}}} var replaceAxes={};for(j=0;j<usedAxes.length;j++){var originalAxisName=usedAxes[j];var newAxisName=(j==0?'yaxis':'y'+(j+1)+'axis');replaceAxes[originalAxisName]=newAxisName;config.params.axes[newAxisName]=this.originalAxes[originalAxisName];} for(j=0;j<config.params.series.length;j++){var series=config.params.series[j];series.yaxis=replaceAxes[series.yaxis];} this.jqplotObject.data=config.data;this.jqplotObject.jqplotParams=config.params;this.jqplotObject.setYTicks();this.jqplotObject.render();},beforeReplot:function(){}};function RowEvolutionSeriesToggle(targetDivId,jqplotData,initiallyShowAll){this.init(targetDivId,jqplotData,initiallyShowAll);} RowEvolutionSeriesToggle.prototype=JQPlotExternalSeriesToggle.prototype;RowEvolutionSeriesToggle.prototype.attachEvents=function(){var self=this;var $rowEvolution=this.target.closest('.rowevolution');this.seriesPickers=$rowEvolution.find('table.metrics tr');var initialMetrics=[];if($rowEvolution.data('initialMetrics')){initialMetrics=[];var savedMetrics=$rowEvolution.data('initialMetrics');var existingMetricsInSeries=[];var m=0;for(m=0;m<this.originalSeries.length;m++){existingMetricsInSeries.push(this.originalSeries[m].label);} for(m=0;m<savedMetrics.length;m++){if(existingMetricsInSeries.indexOf(savedMetrics[m])>-1){initialMetrics.push(savedMetrics[m]);}}} this.seriesPickers.each(function(i){var el=$(this);el.off('click').on('click',function(e){var metricName=rowEvolutionGetMetricNameFromRow(this);if(e.shiftKey){self.toggleSeries(metricName);document.getSelection().removeAllRanges();}else{self.showSeries(metricName);} $rowEvolution.data('initialMetrics',self.activated);return false;});var label=rowEvolutionGetMetricNameFromRow(el);var metricExists=false;for(var k=0;k<self.originalSeries.length;k++){if(self.originalSeries[k]&&labelMatches(self.originalSeries[k].label,label)){metricExists=true;}} if(!metricExists){el.hide();}else if((initialMetrics.length===0&&i==0)||(initialMetrics.length>0&&initialMetrics.indexOf(label)>-1)||self.initiallyShowAll){if(!el.hasClass('hiddenByDefault')){el.show();} el.find('td').css('opacity','');self.activated.push(rowEvolutionGetMetricNameFromRow(el));}else{if(!el.hasClass('hiddenByDefault')){el.show();} el.find('td').css('opacity',.5);} function labelMatches(lhs,rhs){return lhs===rhs||piwikHelper.htmlDecode(lhs)===rhs||lhs===piwikHelper.htmlDecode(rhs);}});};RowEvolutionSeriesToggle.prototype.beforeReplot=function(){var self=this;this.seriesPickers.find('td').css('opacity',.5);this.seriesPickers.each(function(i){var name=rowEvolutionGetMetricNameFromRow(this);if(self.activated.indexOf(name)>-1){$(this).find('td').css('opacity',1);}});};(function($){$.jqplot.NumberFormatter=function(format,value){if(!$.isNumeric(value)){return format.replace(/%s/,value);} return format.replace(/%s/,NumberFormatter.formatNumber(value));}})(jQuery);(function($){$.jqplot.PiwikTicks=function(options){this.piwikTicksCanvas=null;this.piwikHighlightCanvas=null;this.markerRenderer=new $.jqplot.MarkerRenderer({shadow:false});this.currentXTick=false;this.showHighlight=false;this.showGrid=false;this.showTicks=false;$.extend(true,this,options);};$.jqplot.PiwikTicks.init=function(target,data,opts){var options=opts||{};this.plugins.piwikTicks=new $.jqplot.PiwikTicks(options.piwikTicks);if(typeof $.jqplot.PiwikTicks.init.eventsBound=='undefined'){$.jqplot.PiwikTicks.init.eventsBound=true;$.jqplot.eventListenerHooks.push(['jqplotMouseMove',handleMouseMove]);$.jqplot.eventListenerHooks.push(['jqplotMouseLeave',handleMouseLeave]);}};$.jqplot.PiwikTicks.postDraw=function(){var c=this.plugins.piwikTicks;if(c.showHighlight){c.piwikHighlightCanvas=new $.jqplot.GenericCanvas();this.eventCanvas._elem.before(c.piwikHighlightCanvas.createElement(this._gridPadding,'jqplot-piwik-highlight-canvas',this._plotDimensions,this));c.piwikHighlightCanvas.setContext();} if(c.showTicks){var dimensions=this._plotDimensions;dimensions.height+=6;c.piwikTicksCanvas=new $.jqplot.GenericCanvas();this.series[0].shadowCanvas._elem.before(c.piwikTicksCanvas.createElement(this._gridPadding,'jqplot-piwik-ticks-canvas',dimensions,this));c.piwikTicksCanvas.setContext();var ctx=c.piwikTicksCanvas._ctx;var ticks=this.data[0];var totalWidth=ctx.canvas.width;var tickWidth=totalWidth / ticks.length;var xaxisLabels=this.axes.xaxis.ticks;for(var i=0;i<ticks.length;i++){var pos=Math.round(i*tickWidth+tickWidth / 2);var full=xaxisLabels[i]&&xaxisLabels[i]!=' ';drawLine(ctx,pos,full,c.showGrid,c.tickColor);}}};$.jqplot.preInitHooks.push($.jqplot.PiwikTicks.init);$.jqplot.postDrawHooks.push($.jqplot.PiwikTicks.postDraw);function drawLine(ctx,x,full,showGrid,color){ctx.save();ctx.strokeStyle=color;ctx.beginPath();ctx.lineWidth=2;var top=0;if((full&&!showGrid)||!full){top=ctx.canvas.height-5;} ctx.moveTo(x,top);ctx.lineTo(x,full?ctx.canvas.height:ctx.canvas.height-2);ctx.stroke();ctx.clearRect(x,0,x+1,ctx.canvas.height);ctx.restore();} function handleMouseMove(ev,gridpos,datapos,neighbor,plot){var c=plot.plugins.piwikTicks;var tick=Math.floor(datapos.xaxis+0.5)-1;if(tick!==c.currentXTick){c.currentXTick=tick;plot.target.trigger('jqplotPiwikTickOver',[tick]);highlight(plot,tick);}} function handleMouseLeave(ev,gridpos,datapos,neighbor,plot){unHighlight(plot);plot.plugins.piwikTicks.currentXTick=false;} function highlight(plot,tick){var c=plot.plugins.piwikTicks;if(!c.showHighlight){return;} unHighlight(plot);for(var i=0;i<plot.series.length;i++){var series=plot.series[i];var seriesMarkerRenderer=series.markerRenderer;c.markerRenderer.style=seriesMarkerRenderer.style;c.markerRenderer.size=seriesMarkerRenderer.size+5;var rgba=$.jqplot.getColorComponents(seriesMarkerRenderer.color);var newrgb=[rgba[0],rgba[1],rgba[2]];var alpha=rgba[3]*.4;c.markerRenderer.color='rgba('+newrgb[0]+','+newrgb[1]+','+newrgb[2]+','+alpha+')';c.markerRenderer.init();var position=series.gridData[tick];if(typeof position!=='undefined'){c.markerRenderer.draw(position[0],position[1],c.piwikHighlightCanvas._ctx);}}} function unHighlight(plot){var canvas=plot.plugins.piwikTicks.piwikHighlightCanvas;if(canvas!==null){var ctx=canvas._ctx;ctx.clearRect(0,0,ctx.canvas.width,ctx.canvas.height);}}})(jQuery);(function($){$.jqplot.CanvasLegendRenderer=function(options){this.legendCanvas=null;this.singleMetric=false;this.show=false;$.extend(true,this,options);};$.jqplot.CanvasLegendRenderer.init=function(target,data,opts){var options=opts||{};this.plugins.canvasLegend=new $.jqplot.CanvasLegendRenderer(options.canvasLegend);if(this.plugins.canvasLegend.show){options.gridPadding={top:21,right:0};}};$.jqplot.CanvasLegendRenderer.postDraw=function(){var plot=this;var legend=plot.plugins.canvasLegend;if(!legend.show){return;} var padding={top:0,right:this._gridPadding.right,bottom:0,left:this._gridPadding.left};var dimensions={width:this._plotDimensions.width,height:this._gridPadding.top};var width=this._plotDimensions.width-this._gridPadding.left-this._gridPadding.right;legend.legendCanvas=new $.jqplot.GenericCanvas();this.eventCanvas._elem.before(legend.legendCanvas.createElement(padding,'jqplot-legend-canvas',dimensions,plot));legend.legendCanvas.setContext();var ctx=legend.legendCanvas._ctx;ctx.save();ctx.font='11px '+require('piwik/UI').getLabelFontFamily() var x=0;var series=plot.legend._series;for(var i=0;i<series.length;i++){var s=series[i];var label;if(legend.labels&&legend.labels[i]){label=legend.labels[i];}else{label=s.label.toString();} ctx.fillStyle=s.color;if(legend.singleMetric){ctx.fillStyle=legend.singleMetricColor;} ctx.fillRect(x,10,10,2);x+=15;var nextX=x+ctx.measureText(label).width+20;if(nextX+70>width){ctx.fillText("[...]",x,15);x+=ctx.measureText("[...]").width+20;break;} ctx.fillText(label,x,15);x=nextX;} legend.width=x;ctx.restore();};$.jqplot.preInitHooks.push($.jqplot.CanvasLegendRenderer.init);$.jqplot.postDrawHooks.push($.jqplot.CanvasLegendRenderer.postDraw);})(jQuery);(function($,require){$.jqplot.preInitHooks.push(function(target,data,options){var dataTable=$('#'+target).closest('.dataTable').data('uiControlObject');if(!dataTable){return;} var SeriesPicker=require('piwik/DataTableVisualizations/Widgets').SeriesPicker;var seriesPicker=new SeriesPicker(dataTable);var plot=this;$(seriesPicker).bind('placeSeriesPicker',function(){this.domElem.css('margin-left',plot._gridPadding.left+'px');$('.jqplot-legend-canvas',$('#'+target)).css({paddingLeft:'34px'});plot.baseCanvas._elem.before(this.domElem);});$(seriesPicker).bind('seriesPicked',function(e,columns,rows){dataTable.changeSeries(columns,rows);});this.plugins.seriesPicker=seriesPicker;});$.jqplot.postDrawHooks.push(function(){this.plugins.seriesPicker.init();});})(jQuery,require);(function($){$.jqplot.PieLegend=function(options){this.pieLegendCanvas=null;this.show=false;$.extend(true,this,options);};$.jqplot.PieLegend.init=function(target,data,opts){var options=opts||{};this.plugins.pieLegend=new $.jqplot.PieLegend(options.pieLegend);};$.jqplot.PieLegend.postDraw=function(){var plot=this;var legend=plot.plugins.pieLegend;if(!legend.show){return;} var series=plot.series[0];var angles=series._sliceAngles;var radius=series._diameter / 2;var center=series._center;var colors=this.seriesColors;var lineAngles=[];for(var i=0;i<angles.length;i++){lineAngles.push((angles[i][0]+angles[i][1])/ 2+Math.PI / 2);} var labels=[];var data=series._plotData;for(i=0;i<data.length;i++){labels.push(data[i][0]);} legend.pieLegendCanvas=new $.jqplot.GenericCanvas();plot.series[0].canvas._elem.before(legend.pieLegendCanvas.createElement(plot._gridPadding,'jqplot-pie-legend-canvas',plot._plotDimensions,plot));legend.pieLegendCanvas.setContext();var ctx=legend.pieLegendCanvas._ctx;ctx.save();ctx.font='11px '+require('piwik/UI').getLabelFontFamily() var height=legend.pieLegendCanvas._elem.height();var x1,x2,y1,y2,lastY2=false,right,lastRight=false;for(i=0;i<labels.length;i++){var label=labels[i];ctx.strokeStyle=colors[i%colors.length];ctx.lineCap='round';ctx.lineWidth=1;x1=center[0]+Math.sin(lineAngles[i])*(radius);y1=center[1]-Math.cos(lineAngles[i])*(radius);x2=center[0]+Math.sin(lineAngles[i])*(radius+7);y2=center[1]-Math.cos(lineAngles[i])*(radius+7);right=x2>center[0];if(lastY2!==false&&lastRight==right&&((right&&y2-lastY2<13)||(!right&&lastY2-y2<13))){if(x1>center[0]){y2=lastY2+13;}else{y2=lastY2-13;}} if(y2<4||y2+4>height){continue;} ctx.beginPath();ctx.moveTo(x1,y1);ctx.lineTo(x2,y2);ctx.closePath();ctx.stroke();ctx.beginPath();ctx.moveTo(x2,y2);if(right){ctx.lineTo(x2+5,y2);}else{ctx.lineTo(x2-5,y2);} ctx.closePath();ctx.stroke();lastY2=y2;lastRight=right;if(right){var x=x2+9;}else{var x=x2-9-ctx.measureText(label).width;} ctx.fillStyle=legend.labelColor;ctx.fillText(label,x,y2+3);} ctx.restore();};$.jqplot.preInitHooks.push($.jqplot.PieLegend.init);$.jqplot.postDrawHooks.push($.jqplot.PieLegend.postDraw);})(jQuery,require);(function($){$.jqplot.LineRenderer.prototype.draw=function(ctx,gd,options,plot){var i;var opts=$.extend(true,{},options);var shadow=(opts.shadow!=undefined)?opts.shadow:this.shadow;var showLine=(opts.showLine!=undefined)?opts.showLine:this.showLine;var fill=(opts.fill!=undefined)?opts.fill:this.fill;var fillAndStroke=(opts.fillAndStroke!=undefined)?opts.fillAndStroke:this.fillAndStroke;var xmin,ymin,xmax,ymax;if(plot.options.hasOwnProperty('dataStates')){opts.dataStates=plot.options.dataStates;} if(!Array.isArray(opts.dataStates)){opts.dataStates=[];} ctx.save();if(gd.length){if(showLine){if(fill){if(this.fillToZero){var negativeColor=this.negativeColor;if(!this.useNegativeColors){negativeColor=opts.fillStyle;} var isnegative=false;var posfs=opts.fillStyle;if(fillAndStroke){var fasgd=gd.slice(0);} if(this.index==0||!this._stack){var tempgd=[];var pd=(this.renderer.smooth)?this.renderer._smoothedPlotData:this._plotData;this._areaPoints=[];var pyzero=this._yaxis.series_u2p(this.fillToValue);var pxzero=this._xaxis.series_u2p(this.fillToValue);opts.closePath=true;if(this.fillAxis=='y'){tempgd.push([gd[0][0],pyzero]);this._areaPoints.push([gd[0][0],pyzero]);for(var i=0;i<gd.length-1;i++){tempgd.push(gd[i]);this._areaPoints.push(gd[i]);if(pd[i][1]*pd[i+1][1]<=0){if(pd[i][1]<0){isnegative=true;opts.fillStyle=negativeColor;} else{isnegative=false;opts.fillStyle=posfs;} var xintercept=gd[i][0]+(gd[i+1][0]-gd[i][0])*(pyzero-gd[i][1])/(gd[i+1][1]-gd[i][1]);tempgd.push([xintercept,pyzero]);this._areaPoints.push([xintercept,pyzero]);if(shadow){this.renderer.shadowRenderer.draw(ctx,tempgd,opts);} this.renderer.shapeRenderer.draw(ctx,tempgd,opts);tempgd=[[xintercept,pyzero]];}} if(pd[gd.length-1][1]<0){isnegative=true;opts.fillStyle=negativeColor;} else{isnegative=false;opts.fillStyle=posfs;} tempgd.push(gd[gd.length-1]);this._areaPoints.push(gd[gd.length-1]);tempgd.push([gd[gd.length-1][0],pyzero]);this._areaPoints.push([gd[gd.length-1][0],pyzero]);} if(shadow){this.renderer.shadowRenderer.draw(ctx,tempgd,opts);} this.renderer.shapeRenderer.draw(ctx,tempgd,opts);} else{var prev=this._prevGridData;for(var i=prev.length;i>0;i--){gd.push(prev[i-1]);} if(shadow){this.renderer.shadowRenderer.draw(ctx,gd,opts);} this._areaPoints=gd;this.renderer.shapeRenderer.draw(ctx,gd,opts);}} else{if(fillAndStroke){var fasgd=gd.slice(0);} if(this.index==0||!this._stack){var gridymin=ctx.canvas.height;gd.unshift([gd[0][0],gridymin]);var len=gd.length;gd.push([gd[len-1][0],gridymin]);} else{var prev=this._prevGridData;for(var i=prev.length;i>0;i--){gd.push(prev[i-1]);}} this._areaPoints=gd;if(shadow){this.renderer.shadowRenderer.draw(ctx,gd,opts);} this.renderer.shapeRenderer.draw(ctx,gd,opts);} if(fillAndStroke){var fasopts=$.extend(true,{},opts,{fill:false,closePath:false});this.renderer.shapeRenderer.draw(ctx,fasgd,fasopts);if(this.markerRenderer.show){if(this.renderer.smooth){fasgd=this.gridData;} for(i=0;i<fasgd.length;i++){this.markerRenderer.draw(fasgd[i][0],fasgd[i][1],ctx,opts.markerOptions);}}}} else{if(this.renderer.bands.show){var bdat;var bopts=$.extend(true,{},opts);if(this.renderer.bands.showLines){bdat=(this.renderer.smooth)?this.renderer._hiBandSmoothedData:this.renderer._hiBandGridData;this.renderer.shapeRenderer.draw(ctx,bdat,opts);bdat=(this.renderer.smooth)?this.renderer._lowBandSmoothedData:this.renderer._lowBandGridData;this.renderer.shapeRenderer.draw(ctx,bdat,bopts);} if(this.renderer.bands.fill){if(this.renderer.smooth){bdat=this.renderer._hiBandSmoothedData.concat(this.renderer._lowBandSmoothedData.reverse());} else{bdat=this.renderer._hiBandGridData.concat(this.renderer._lowBandGridData.reverse());} this._areaPoints=bdat;bopts.closePath=true;bopts.fill=true;bopts.fillStyle=this.renderer.bands.fillColor;this.renderer.shapeRenderer.draw(ctx,bdat,bopts);}} if(shadow){this.renderer.shadowRenderer.draw(ctx,gd,opts);} this.renderer.shapeRenderer.draw(ctx,gd,opts);}} var xmin=xmax=ymin=ymax=null;for(i=0;i<this._areaPoints.length;i++){var p=this._areaPoints[i];if(xmin>p[0]||xmin==null){xmin=p[0];} if(ymax<p[1]||ymax==null){ymax=p[1];} if(xmax<p[0]||xmax==null){xmax=p[0];} if(ymin>p[1]||ymin==null){ymin=p[1];}} if(this.type==='line'&&this.renderer.bands.show){ymax=this._yaxis.series_u2p(this.renderer.bands._min);ymin=this._yaxis.series_u2p(this.renderer.bands._max);} this._boundingBox=[[xmin,ymax],[xmax,ymin]];if(this.markerRenderer.show&&!fill){if(this.renderer.smooth){gd=this.gridData;} for(i=0;i<gd.length;i++){if(gd[i][0]===null||gd[i][1]===null){continue;} const markerOptions=opts.markerOptions||{};markerOptions.isIncomplete=opts.dataStates[i]&&opts.dataStates[i]!=='complete';markerOptions.incompleteFillColor=plot.grid.background;this.markerRenderer.draw(gd[i][0],gd[i][1],ctx,markerOptions);}}} ctx.restore();};$.jqplot.ShapeRenderer.prototype.draw=function(ctx,points,options){ctx.save();var opts=(options!=null)?options:{};var fill=(opts.fill!=null)?opts.fill:this.fill;var closePath=(opts.closePath!=null)?opts.closePath:this.closePath;var fillRect=(opts.fillRect!=null)?opts.fillRect:this.fillRect;var strokeRect=(opts.strokeRect!=null)?opts.strokeRect:this.strokeRect;var clearRect=(opts.clearRect!=null)?opts.clearRect:this.clearRect;var isarc=(opts.isarc!=null)?opts.isarc:this.isarc;var linePattern=(opts.linePattern!=null)?opts.linePattern:this.linePattern;var ctxPattern=$.jqplot.LinePattern(ctx,linePattern);ctx.lineWidth=opts.lineWidth||this.lineWidth;ctx.lineJoin=opts.lineJoin||this.lineJoin;ctx.lineCap=opts.lineCap||this.lineCap;ctx.strokeStyle=(opts.strokeStyle||opts.color)||this.strokeStyle;ctx.fillStyle=opts.fillStyle||this.fillStyle;ctx.beginPath();let dataStates=[];if(!closePath&&!fill&&Array.isArray(opts.dataStates)){dataStates=opts.dataStates;} if(isarc){ctx.arc(points[0],points[1],points[2],points[3],points[4],true);if(closePath){ctx.closePath();} if(fill){ctx.fill();} else{ctx.stroke();} if(opts.isIncomplete&&opts.incompleteFillColor){ctx.beginPath();ctx.arc(points[0],points[1],points[2]/ 8,points[3],points[4],true);ctx.strokeStyle=opts.incompleteFillColor;ctx.stroke();ctx.closePath();} ctx.restore();return;} else if(clearRect){ctx.clearRect(points[0],points[1],points[2],points[3]);ctx.restore();return;} else if(fillRect||strokeRect){if(fillRect){ctx.fillRect(points[0],points[1],points[2],points[3]);} if(strokeRect){ctx.strokeRect(points[0],points[1],points[2],points[3]);ctx.restore();return;}} if(!points||!points.length){return;} let move=true;for(let i=0;i<points.length;i++){if(null===points[i][0]&&null===points[i][1]){continue;} if(move){move=false;ctxPattern.moveTo(points[i][0],points[i][1]);continue;} if(dataStates[i]&&'complete'!==dataStates[i]){ctxPattern.moveTo(points[i][0],points[i][1]);}else{ctxPattern.lineTo(points[i][0],points[i][1]);}} if(closePath){ctxPattern.closePath();} if(fill){ctx.fill();}else{ctx.stroke();} ctx.beginPath();ctx.setLineDash([3,3]);move=true;for(let i=0;i<points.length;i++){if(points[i][0]===null&&points[i][1]===null){continue;} if(move){move=false;ctxPattern.moveTo(points[i][0],points[i][1]);continue;} if(!dataStates[i]||'complete'===dataStates[i]){ctxPattern.moveTo(points[i][0],points[i][1]);}else{ctxPattern.lineTo(points[i][0],points[i][1]);}} ctx.stroke();ctx.closePath();ctx.restore();};$.jqplot.ShadowRenderer.prototype.draw=function(ctx,points,options){ctx.save();var opts=(options!=null)?options:{};var fill=(opts.fill!=null)?opts.fill:this.fill;var fillRect=(opts.fillRect!=null)?opts.fillRect:this.fillRect;var closePath=(opts.closePath!=null)?opts.closePath:this.closePath;var offset=(opts.offset!=null)?opts.offset:this.offset;var alpha=(opts.alpha!=null)?opts.alpha:this.alpha;var depth=(opts.depth!=null)?opts.depth:this.depth;var isarc=(opts.isarc!=null)?opts.isarc:this.isarc;var linePattern=(opts.linePattern!=null)?opts.linePattern:this.linePattern;ctx.lineWidth=(opts.lineWidth!=null)?opts.lineWidth:this.lineWidth;ctx.lineJoin=(opts.lineJoin!=null)?opts.lineJoin:this.lineJoin;ctx.lineCap=(opts.lineCap!=null)?opts.lineCap:this.lineCap;ctx.strokeStyle=opts.strokeStyle||this.strokeStyle||'rgba(0,0,0,'+alpha+')';ctx.fillStyle=opts.fillStyle||this.fillStyle||'rgba(0,0,0,'+alpha+')';let dataStates=[];if(!closePath&&!fill&&Array.isArray(opts.dataStates)){dataStates=opts.dataStates;} for(let j=0;j<depth;j++){const ctxPattern=$.jqplot.LinePattern(ctx,linePattern);ctx.translate(Math.cos(this.angle*Math.PI/180)*offset,Math.sin(this.angle*Math.PI/180)*offset);ctxPattern.beginPath();if(isarc){ctx.arc(points[0],points[1],points[2],points[3],points[4],true);} else if(fillRect){ctx.fillRect(points[0],points[1],points[2],points[3]);} else if(points&&points.length){let move=true;for(let i=0;i<points.length;i++){if(points[i][0]===null&&points[i][1]===null){continue;} if(move){move=false;ctxPattern.moveTo(points[i][0],points[i][1]);continue;} if(dataStates[i]&&'complete'!==dataStates[i]){ctxPattern.moveTo(points[i][0],points[i][1]);}else{ctxPattern.lineTo(points[i][0],points[i][1]);}}} if(closePath){ctxPattern.closePath();} if(fill){ctx.fill();} else{ctx.stroke();}} ctx.restore();};})(jQuery); (function($,require){var exports=require('piwik/UI'),JqplotGraphDataTable=exports.JqplotGraphDataTable;exports.JqplotBarGraphDataTable=function(element){JqplotGraphDataTable.call(this,element);};$.extend(exports.JqplotBarGraphDataTable.prototype,JqplotGraphDataTable.prototype,{_setJqplotParameters:function(params){JqplotGraphDataTable.prototype._setJqplotParameters.call(this,params);var barMargin=this.data[0].length>10?2:10;var minBarWidth=10;this.jqplotParams.seriesDefaults={renderer:$.jqplot.BarRenderer,rendererOptions:{shadowOffset:1,shadowDepth:2,shadowAlpha:.2,fillToZero:true,barMargin:barMargin}};this.jqplotParams.piwikTicks={showTicks:true,showGrid:false,showHighlight:false,tickColor:this.tickColor};this.jqplotParams.axes.xaxis.renderer=$.jqplot.CategoryAxisRenderer;this.jqplotParams.axes.xaxis.tickOptions={showGridline:false};this.jqplotParams.canvasLegend={show:true};var comparisonService=window.CoreHome.ComparisonsStoreInstance;if(comparisonService.isComparing()){var seriesCount=this.jqplotParams.series.length;var dataCount=this.data[0].length;var totalBars=seriesCount*dataCount;var totalMinWidth=(minBarWidth+barMargin)*totalBars+50;this.$element.find('.piwik-graph').css('min-width',totalMinWidth+'px');this.$element.css('overflow-x','scroll');}},_bindEvents:function(){this.setYTicks();JqplotGraphDataTable.prototype._bindEvents.call(this);},_showDataPointTooltip:function(element,seriesIndex,valueIndex){var value=this.formatY(this.data[seriesIndex][valueIndex],seriesIndex);var series=this.jqplotParams.series[seriesIndex].label;var percentage='';if(typeof this.tooltip.percentages!='undefined'){percentage=this.tooltip.percentages[seriesIndex][valueIndex];percentage=' ('+NumberFormatter.formatPercent(percentage)+')';} var label=this.jqplotParams.axes.xaxis.labels[valueIndex];var text='<strong>'+value+'</strong> '+series+percentage;$(element).tooltip({track:true,items:'*',content:'<h3>'+label+'</h3>'+text,show:false,hide:false}).trigger('mouseover');}});})(jQuery,require); (function($,require){var exports=require('piwik/UI'),JqplotGraphDataTable=exports.JqplotGraphDataTable;exports.JqplotPieGraphDataTable=function(element){JqplotGraphDataTable.call(this,element);};$.extend(exports.JqplotPieGraphDataTable.prototype,JqplotGraphDataTable.prototype,{_setJqplotParameters:function(params){JqplotGraphDataTable.prototype._setJqplotParameters.call(this,params);this.jqplotParams.seriesDefaults={renderer:$.jqplot.PieRenderer,rendererOptions:{shadow:false,showDataLabels:false,sliceMargin:1,startAngle:35}};this.jqplotParams.piwikTicks={showTicks:false,showGrid:false,showHighlight:false,tickColor:this.tickColor};this.jqplotParams.legend={show:false};this.jqplotParams.pieLegend={show:true,labelColor:this.singleMetricColor};this.jqplotParams.canvasLegend={show:true,singleMetric:true,singleMetricColor:this.singleMetricColor};if(!(this.data[0][0]instanceof Array)){for(var i=0;i<this.data[0].length;i++){this.data[0][i]=[this.jqplotParams.axes.xaxis.ticks[i],this.data[0][i]];}}},_showDataPointTooltip:function(element,seriesIndex,valueIndex){var value=this.formatY(this.data[0][valueIndex][1],0);var series=this.jqplotParams.series[0].label;var percentage=this.tooltip.percentages[0][valueIndex];var label=this.data[0][valueIndex][0];var text='<strong>'+NumberFormatter.formatPercent(percentage)+'</strong> ('+value+' '+series+')';$(element).tooltip({track:true,items:'*',content:'<h3>'+label+'</h3>'+text,show:false,hide:false}).trigger('mouseover');}});})(jQuery,require); (function($,require){const exports=require('piwik/UI');const JqplotGraphDataTable=exports.JqplotGraphDataTable;const JqplotGraphDataTablePrototype=JqplotGraphDataTable.prototype;exports.JqplotEvolutionGraphDataTable=function(element){JqplotGraphDataTable.call(this,element);};$.extend(exports.JqplotEvolutionGraphDataTable.prototype,JqplotGraphDataTablePrototype,{_setJqplotParameters:function(params){JqplotGraphDataTablePrototype._setJqplotParameters.call(this,params);const defaultParams={axes:{xaxis:{pad:1.0,renderer:$.jqplot.CategoryAxisRenderer,tickOptions:{showGridline:false}}},piwikTicks:{showTicks:true,showGrid:true,showHighlight:true,tickColor:this.tickColor}};if(this.props.show_line_graph){defaultParams.seriesDefaults={lineWidth:1,markerOptions:{style:"filledCircle",size:6,shadow:false}};}else{defaultParams.seriesDefaults={renderer:$.jqplot.BarRenderer,rendererOptions:{shadowOffset:1,shadowDepth:2,shadowAlpha:.2,fillToZero:true,barMargin:this.data[0].length>10?2:10}};} const overrideParams={legend:{show:false},canvasLegend:{show:true}};this.jqplotParams=$.extend(true,{},defaultParams,this.jqplotParams,overrideParams);},_bindEvents:function(){JqplotGraphDataTablePrototype._bindEvents.call(this);const self=this;$('#'+this.targetDivId).on('jqplotMouseLeave',function(e,s,i,d){$(this).css('cursor','default');JqplotGraphDataTablePrototype._destroyDataPointTooltip.call(this,$(this));}).on('jqplotClick',function(e,s,i,d){if(!self.jqplotParams.axes.xaxis.onclick||!self._plot.plugins.piwikTicks||typeof self._plot.plugins.piwikTicks.currentXTick!=='number'){return;} const tick=self._plot.plugins.piwikTicks.currentXTick;if(typeof self.jqplotParams.axes.xaxis.onclick[tick]!=='string'){return;} const url=self.jqplotParams.axes.xaxis.onclick[tick];broadcast.propagateNewPage(url);}).on('jqplotPiwikTickOver',function(e,tick){const dataByAxis={};for(let d=0;d<self.data.length;++d){const valueUnformatted=self.data[d][tick];if(typeof valueUnformatted==='undefined'||valueUnformatted===null){continue;} const axis=self.jqplotParams.series[d]._xaxis||'xaxis';if(!dataByAxis[axis]){dataByAxis[axis]=[];} const value=self.formatY(valueUnformatted,d);const series=self.jqplotParams.series[d].label;const seriesColor=self.jqplotParams.seriesColors[d];dataByAxis[axis].push(`<span class="tooltip-series-color" style="background-color: ${seriesColor}"></span>`+`<strong>${value}</strong> ${piwikHelper.htmlEntities(series)}`);} let xAxisCount=0;Object.keys(self.jqplotParams.axes).forEach(function(axis){if(!axis.startsWith('x')){return;} ++xAxisCount;});let content='';for(let i=0;i<xAxisCount;++i){const axisName=i===0?'xaxis':`x${i + 1}axis`;if(!dataByAxis[axisName]||!dataByAxis[axisName].length){continue;} let label;if(typeof self.jqplotParams.axes[axisName].labels!=='undefined'){label=self.jqplotParams.axes[axisName].labels[tick];}else{label=self.jqplotParams.axes[axisName].ticks[tick];} if(typeof label==='undefined'){continue;} content+=` <h3 class="evolution-tooltip-header">${piwikHelper.htmlEntities(label)}</h3> ${dataByAxis[axisName].join('<br />')} `;} switch(self.jqplotParams.dataStates[tick]){case'incomplete':content+=`<br />(${self._lang.incompletePeriod})`;break;case'invalidated':content+=`<br />(${self._lang.invalidatedPeriod})`;break;} $(this).tooltip({track:true,items:'div',content:content,show:false,hide:false}).trigger('mouseover');if(typeof self.jqplotParams.axes.xaxis.onclick!=='undefined'&&typeof self.jqplotParams.axes.xaxis.onclick[tick]==='string'){$(this).css('cursor','pointer');}});this.setYTicks();},_destroyDataPointTooltip:function(){},render:function(){JqplotGraphDataTablePrototype.render.call(this);if(!initializeSparklines){return;} initializeSparklines();}});})(jQuery,require); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function DataTable_RowActions_Transitions(dataTable){this.dataTable=dataTable;this.transitions=null;} DataTable_RowActions_Transitions.prototype=new DataTable_RowAction;DataTable_RowActions_Transitions.launchForUrl=function(url,segment){var value='Transitions:url:'+url;if(segment){value+=':segment:'+segment;} broadcast.propagateNewPopoverParameter('RowAction',value);};DataTable_RowActions_Transitions.isPageUrlReport=function(module,action){return module=='Actions'&&(action=='getPageUrls'||action=='getEntryPageUrls'||action=='getExitPageUrls'||action=='getPageUrlsFollowingSiteSearch');};DataTable_RowActions_Transitions.isPageTitleReport=function(module,action){return module=='Actions'&&(action=='getPageTitles'||action=='getPageTitlesFollowingSiteSearch');};DataTable_RowActions_Transitions.registeredReports=[];DataTable_RowActions_Transitions.registerReport=function(handler){DataTable_RowActions_Transitions.registeredReports.push(handler);} DataTable_RowActions_Transitions.prototype.trigger=function(tr,e,subTableLabel){var i=0;for(i;i<DataTable_RowActions_Transitions.registeredReports.length;i++){var report=DataTable_RowActions_Transitions.registeredReports[i];if(report&&report.trigger&&report.isAvailableOnReport&&report.isAvailableOnReport(this.dataTable.param)){report.trigger.apply(this,arguments);return;}} alert('Transitions can\'t be used on this report.');};DataTable_RowActions_Transitions.prototype.performAction=function(label,tr,e){var separator=' > ';var labelParts=label.split(separator);for(var i=0;i<labelParts.length;i++){var labelPart=labelParts[i].replace('@','');labelParts[i]=$.trim(decodeURIComponent(labelPart));} var delimiter=piwik.config.action_url_category_delimiter;if(this.dataTable.param.action.indexOf('PageTitles')!==false){delimiter=piwik.config.action_title_category_delimiter;} label=labelParts.join(delimiter);this.openPopover('title:'+label);};DataTable_RowActions_Transitions.prototype.doOpenPopover=function(link){var ALLOWED_OVERRIDE_PARAMS=['segment','date','period','idSite'];var parts=link.split(':');var overrideParams={};var i=0;while(i<parts.length){var paramName='';try{paramName=decodeURIComponent(parts[i]);}catch(e){} if(ALLOWED_OVERRIDE_PARAMS.indexOf(paramName)===-1){i+=1;continue;} overrideParams[paramName]=decodeURIComponent(parts[i+1]);parts.splice(i,2);} if(parts.length<2){return;} var actionType=parts[0];parts.shift();var actionName=parts.join(':');if(this.transitions===null){this.transitions=new Piwik_Transitions(actionType,actionName,this,overrideParams);}else{this.transitions.reset(actionType,actionName,segment);} this.transitions.showPopover();};DataTable_RowActions_Registry.register({name:'Transitions',dataTableIcon:'icon-transition',order:20,dataTableIconTooltip:[_pk_translate('General_TransitionsRowActionTooltipTitle'),_pk_translate('General_TransitionsRowActionTooltip')],createInstance:function(dataTable){return new DataTable_RowActions_Transitions(dataTable);},isAvailableOnReport:function(dataTableParams){if(piwik.transitionsMaxPeriodAllowed&&dataTableParams['period']){if(dataTableParams['period']==='range'){var piwikPeriods=window.CoreHome.Periods;if(piwikPeriods){var range=piwikPeriods.parse(dataTableParams['period'],dataTableParams['date']);if(range){var rangeDays=range.getDayCount();if((piwik.transitionsMaxPeriodAllowed==='day'&&rangeDays>1)||(piwik.transitionsMaxPeriodAllowed==='week'&&rangeDays>7)||(piwik.transitionsMaxPeriodAllowed==='month'&&rangeDays>31)||(piwik.transitionsMaxPeriodAllowed==='year'&&rangeDays>365)){return false;}}}}else{if(piwik.transitionsMaxPeriodAllowed==='day'&&dataTableParams['period']!=='day'){return false;} if(piwik.transitionsMaxPeriodAllowed==='week'&&dataTableParams['period']!=='day'&&dataTableParams['period']!=='week'){return false;} if(piwik.transitionsMaxPeriodAllowed==='month'&&dataTableParams['period']!=='day'&&dataTableParams['period']!=='week'&&dataTableParams['period']!=='month'){return false;} if(piwik.transitionsMaxPeriodAllowed==='year'&&dataTableParams['period']!=='day'&&dataTableParams['period']!=='week'&&dataTableParams['period']!=='month'&&dataTableParams['period']!=='year'){return false;}}} var i=0;for(i;i<DataTable_RowActions_Transitions.registeredReports.length;i++){var report=DataTable_RowActions_Transitions.registeredReports[i];if(report&&report.isAvailableOnReport&&report.isAvailableOnReport(dataTableParams)){return true;}} return false;},isAvailableOnRow:function(dataTableParams,tr){if(tr.hasClass('subDataTable')||tr.hasClass('totalsRow')){return false;} var i=0;for(i;i<DataTable_RowActions_Transitions.registeredReports.length;i++){var report=DataTable_RowActions_Transitions.registeredReports[i];if(report&&report.isAvailableOnRow&&report.isAvailableOnReport&&report.isAvailableOnReport(dataTableParams)){return report.isAvailableOnRow(dataTableParams,tr);}} return true;}});function Piwik_Transitions(actionType,actionName,rowAction,overrideParams){this.reset(actionType,actionName,overrideParams);this.rowAction=rowAction;this.ajax=new Piwik_Transitions_Ajax();this.model=new Piwik_Transitions_Model(this.ajax);this.leftGroups=['previousPages','previousSiteSearches','searchEngines','socialNetworks','websites','campaigns'];this.rightGroups=['followingPages','followingSiteSearches','downloads','outlinks'];} Piwik_Transitions.prototype.reset=function(actionType,actionName,overrideParams){this.actionType=actionType;this.actionName=actionName;this.overrideParams=overrideParams;this.popover=null;this.canvas=null;this.centerBox=null;this.leftOpenGroup='previousPages';this.rightOpenGroup='followingPages';this.highlightedGroup=false;this.highlightedGroupSide=false;this.highlightedGroupCenterEl=false;};Piwik_Transitions.prototype.showPopover=function(showEmbeddedInReport){var self=this;this.showEmbeddedInReport=showEmbeddedInReport;$('#transitions_report .popoverContainer').hide();if(showEmbeddedInReport){this.popover=$('#transitions_report');$('#Transitions_Error_Container').hide();$('#transitions_inline_loading').show();}else{this.popover=Piwik_Popover.showLoading('Transitions',self.actionName,550);Piwik_Popover.addHelpButton(_pk_externalRawLink('https://matomo.org/docs/transitions'));} var bothLoaded=function(){if(!showEmbeddedInReport){Piwik_Popover.setContent(Piwik_Transitions.popoverHtml);}else{$('#transitions_inline_loading').hide();$('#transitions_report .popoverContainer').html(Piwik_Transitions.popoverHtml);$('#transitions_report .popoverContainer').show();} self.preparePopover();self.model.htmlLoaded();if(self.model.searchEnginesNbTransitions>0&&self.model.websitesNbTransitions>0&&self.model.socialNetworksNbTransitions>0&&self.model.campaignsNbTransitions>0){self.canvas.narrowMode();} self.canvas.truncateVisibleBoxTexts();self.render();self.canvas.truncateVisibleBoxTexts();};var callbackForHtml=false;if(typeof Piwik_Transitions.popoverHtml=='undefined'){this.ajax.callTransitionsController('renderPopover',function(html){Piwik_Transitions.popoverHtml=html;if(callbackForHtml!==false){callbackForHtml();}});} self.model.loadData(self.actionType,self.actionName,self.overrideParams,function(){if(typeof Piwik_Transitions.popoverHtml=='undefined'){callbackForHtml=bothLoaded;}else{bothLoaded();}});};Piwik_Transitions.prototype.preparePopover=function(){var self=this;var width=900;var height=550;var canvasBgLeft=self.prepareCanvas('Background_Left',width,height);var canvasBgRight=self.prepareCanvas('Background_Right',width,height);var canvasLeft=self.prepareCanvas('Left',width,height);var canvasRight=self.prepareCanvas('Right',width,height);var canvasLoops=self.prepareCanvas('Loops',width,height);self.canvas=new Piwik_Transitions_Canvas(canvasBgLeft,canvasBgRight,canvasLeft,canvasRight,canvasLoops,width,height);self.centerBox=self.popover.find('#Transitions_CenterBox');var title=self.actionName;if(self.actionType=='url'){title=Piwik_Transitions_Util.shortenUrl(title,true);} var h2=self.centerBox.find('h2');var textContainer=h2;if(self.actionType=='url'){var a=$(document.createElement('a'));a.attr('href',self.actionName);a.attr('rel','noreferrer noopener');a.attr('target','_blank');h2.append(a);textContainer=a;} textContainer.addClass('Transitions_ApplyTextAndTruncate').data('text',title).data('maxLines',3);var element=textContainer.add(self.popover.find('p.Transitions_Pageviews'));element.tooltip({track:true,content:function(){var totalNbPageviews=self.model.getTotalNbPageviews();if(totalNbPageviews>0){var share=NumberFormatter.formatPercent(Math.round(self.model.pageviews / totalNbPageviews*1000)/ 10);var text=Piwik_Transitions_Translations.ShareOfAllPageviews;text=sprintf(text,NumberFormatter.formatNumber(self.model.pageviews),share);text+='<br /><em>'+Piwik_Transitions_Translations.DateRange+' '+self.model.date+'</em>';var title='<h3>'+piwikHelper.addBreakpointsToUrl(self.actionName)+'</h3>';return title+text;} return false;},items:'*',tooltipClass:'Transitions_Tooltip_Small',show:false,hide:false});};Piwik_Transitions.prototype.prepareCanvas=function(canvasId,width,height){canvasId='Transitions_Canvas_'+canvasId;var div=$('#'+canvasId).width(width).height(height);var canvas;if(typeof Piwik_Transitions.canvasCache=='undefined'||typeof window.G_vmlCanvasManager!="undefined"){Piwik_Transitions.canvasCache={};} if(typeof Piwik_Transitions.canvasCache[canvasId]=='undefined'){Piwik_Transitions.canvasCache[canvasId]=document.createElement('canvas');canvas=Piwik_Transitions.canvasCache[canvasId];canvas.width=width;canvas.height=height;}else{canvas=Piwik_Transitions.canvasCache[canvasId];canvas.getContext('2d').clearRect(0,0,width,height);} div.append(canvas);return canvas;};Piwik_Transitions.prototype.render=function(){this.renderCenterBox();this.renderLeftSide();this.renderRightSide();this.renderLoops();window.CoreHome.Matomo.postEvent('Transitions.dataChanged',{'actionType':this.actionType,'actionName':this.actionName});};Piwik_Transitions.prototype.renderLeftSide=function(onlyBg){this.renderGroups(this.leftGroups,this.leftOpenGroup,'left',onlyBg);this.renderEntries(onlyBg);this.reRenderIfNeededToCenter('left',onlyBg);};Piwik_Transitions.prototype.renderRightSide=function(onlyBg){this.renderGroups(this.rightGroups,this.rightOpenGroup,'right',onlyBg);this.renderExits(onlyBg);this.reRenderIfNeededToCenter('right',onlyBg);};Piwik_Transitions.prototype.renderGroups=function(groups,openGroup,side,onlyBg){for(var i=0;i<groups.length;i++){var groupName=groups[i];if(groupName==openGroup){if(i!=0){var spacing=this.canvas.isNarrowMode()?7:13;this.canvas.addBoxSpacing(spacing,side);} this.renderOpenGroup(groupName,side,onlyBg);}else{this.renderClosedGroup(groupName,side,onlyBg);}} this.canvas.addBoxSpacing(13,side);};Piwik_Transitions.prototype.reRenderIfNeededToCenter=function(side,onlyBg){var height=(side=='left'?this.canvas.leftBoxPositionY:this.canvas.rightBoxPositionY)-20;if(height<460&&!this.reRendering){var yOffset=(460-height)/ 2;this.canvas.clearSide(side,onlyBg);this.canvas.addBoxSpacing(yOffset,side);this.reRendering=true;side=='left'?this.renderLeftSide(onlyBg):this.renderRightSide(onlyBg);this.reRendering=false;}};Piwik_Transitions.prototype.renderCenterBox=function(){var box=this.centerBox;Piwik_Transitions_Util.replacePlaceholderInHtml(box.find('.Transitions_Pageviews'),NumberFormatter.formatNumber(this.model.pageviews));var self=this;var showMetric=function(cssClass,modelProperty,highlightCurveOnSide,groupCanBeExpanded){var el=box.find('.Transitions_'+cssClass);Piwik_Transitions_Util.replacePlaceholderInHtml(el,NumberFormatter.formatNumber(self.model[modelProperty]));if(self.model[modelProperty]==0){el.addClass('Transitions_Value0');}else{self.addTooltipShowingPercentageOfAllPageviews(el,modelProperty);var groupName=cssClass.charAt(0).toLowerCase()+cssClass.slice(1);el.hover(function(){self.highlightGroup(groupName,highlightCurveOnSide);},function(){self.unHighlightGroup(groupName,highlightCurveOnSide);});if(groupCanBeExpanded){el.click(function(){self.openGroup(highlightCurveOnSide,groupName);}).css('cursor','pointer');}}};showMetric('DirectEntries','directEntries','left',false);showMetric('PreviousSiteSearches','previousSiteSearchesNbTransitions','left',true);showMetric('PreviousPages','previousPagesNbTransitions','left',true);showMetric('SearchEngines','searchEnginesNbTransitions','left',true);showMetric('SocialNetworks','socialNetworksNbTransitions','left',true);showMetric('Websites','websitesNbTransitions','left',true);showMetric('Campaigns','campaignsNbTransitions','left',true);showMetric('FollowingPages','followingPagesNbTransitions','right',true);showMetric('FollowingSiteSearches','followingSiteSearchesNbTransitions','right',true);showMetric('Outlinks','outlinksNbTransitions','right',true);showMetric('Downloads','downloadsNbTransitions','right',true);showMetric('Exits','exits','right',false);box.find('.Transitions_CenterBoxMetrics').show();};Piwik_Transitions.prototype.addTooltipShowingPercentageOfAllPageviews=function(element,metric){var tip=Piwik_Transitions_Translations.XOfAllPageviews;var percentage=this.model.getPercentage(metric,true);tip=sprintf(tip,'<strong>'+percentage+'</strong>');element.tooltip({track:true,content:tip,items:'*',tooltipClass:'Transitions_Tooltip_Small',show:false,hide:false});};Piwik_Transitions.prototype.renderLoops=function(){if(this.model.loops==0){return;} var loops=this.popover.find('#Transitions_Loops').show();Piwik_Transitions_Util.replacePlaceholderInHtml(loops,NumberFormatter.formatNumber(this.model.loops));this.addTooltipShowingPercentageOfAllPageviews(loops,'loops');this.canvas.renderLoops(this.model.getPercentage('loops'));loops.css({marginTop:$('#Transitions_CenterBox').outerHeight()+45});};Piwik_Transitions.prototype.renderEntries=function(onlyBg){if(this.model.directEntries>0){var self=this;var isHighlighted=this.highlightedGroup=='directEntries';var gradient=this.canvas.createHorizontalGradient('entries','left',isHighlighted);this.canvas.renderBox({side:'left',onlyBg:onlyBg,share:this.model.getPercentage('directEntries'),gradient:gradient,boxText:Piwik_Transitions_Translations.directEntries,boxTextNumLines:1,boxTextCssClass:'SingleLine',smallBox:true,onMouseOver:function(){self.highlightGroup('directEntries','left');},onMouseOut:function(){self.unHighlightGroup('directEntries','left');}});this.canvas.addBoxSpacing(20,'left');}};Piwik_Transitions.prototype.renderExits=function(onlyBg){if(this.model.exits>0){var self=this;var isHighlighted=this.highlightedGroup=='exits';var gradient=this.canvas.createHorizontalGradient('exits','right',isHighlighted);this.canvas.renderBox({side:'right',onlyBg:onlyBg,share:this.model.getPercentage('exits'),gradient:gradient,boxText:Piwik_Transitions_Translations.exits,boxTextNumLines:1,boxTextCssClass:'SingleLine',smallBox:true,onMouseOver:function(){self.highlightGroup('exits','right');},onMouseOut:function(){self.unHighlightGroup('exits','right');}});this.canvas.addBoxSpacing(20,'right');}};Piwik_Transitions.prototype.renderOpenGroup=function(groupName,side,onlyBg){var self=this;var nbTransitionsVarName=groupName+'NbTransitions';var nbTransitions=self.model[nbTransitionsVarName];if(nbTransitions==0){return;} var totalShare=this.model.getPercentage(nbTransitionsVarName);var details=self.model.getDetailsForGroup(groupName);var gradientItems=this.canvas.createHorizontalGradient('items',side);var gradientOthers=this.canvas.createHorizontalGradient('others',side);var gradientBackground=this.canvas.createHorizontalGradient('background',side,groupName==this.highlightedGroup);var boxPositionBefore,curvePositionBefore;if(side=='left'){boxPositionBefore=this.canvas.leftBoxPositionY;curvePositionBefore=this.canvas.leftCurvePositionY;}else{boxPositionBefore=this.canvas.rightBoxPositionY;curvePositionBefore=this.canvas.rightCurvePositionY;} var titleX,titleClass;if(side=='left'){titleX=this.canvas.leftBoxBeginX+10;titleClass='BoxTextLeft';}else{titleX=this.canvas.rightBoxBeginX-1;titleClass='BoxTextRight';} if(!onlyBg){var groupTitle=self.model.getGroupTitle(groupName);var titleEl=this.canvas.renderText(groupTitle,titleX,boxPositionBefore+11,[titleClass,'TitleOfOpenGroup']);titleEl.hover(function(){self.highlightGroup(groupName,side);},function(){self.unHighlightGroup(groupName,side);});} this.canvas.addBoxSpacing(34,side);for(var i=0;i<details.length;i++){var data=details[i];var label=(typeof data.url!='undefined'?data.url:data.label);label=(typeof label!='undefined'&&label!==null?label:'');var isOthers=(label=='Others');var onClick=false;if(!isOthers&&(groupName=='previousPages'||groupName=='followingPages')){if(this.showEmbeddedInReport){onClick=(function(url){return function(){window.CoreHome.Matomo.postEvent('Transitions.switchTransitionsUrl',{url:url,});};})(label);}else{onClick=(function(url){return function(){if(self.actionType=='url'){url=url.replace(/^(?!http)/,'http://');} self.reloadPopover(url);};})(label);}}else if(!isOthers&&(groupName=='outlinks'||groupName=='websites'||groupName=='downloads')){onClick=label} var tooltip=Piwik_Transitions_Translations.XOfY;tooltip='<strong>'+sprintf(tooltip,data.referrals,nbTransitions)+'</strong>';tooltip=this.model.getShareInGroupTooltip(tooltip,groupName);var fullLabel=label;var shortened=false;if((this.actionType=='url'&&(groupName=='previousPages'||groupName=='followingPages'))||groupName=='downloads'){label=Piwik_Transitions_Util.shortenUrl(label,true);shortened=true;}else if(groupName=='outlinks'||groupName=='websites'){label=Piwik_Transitions_Util.shortenUrl(label);shortened=true;} this.canvas.renderBox({side:side,onlyBg:onlyBg,share:data.percentage / 100*totalShare,gradient:isOthers?gradientOthers:gradientItems,boxText:label,boxTextTooltip:isOthers||!shortened?false:fullLabel,boxTextNumLines:3,curveText:NumberFormatter.formatPercent(data.percentage),curveTextTooltip:tooltip,onClick:onClick});} var boxPositionAfter,curvePositionAfter;if(side=='left'){boxPositionAfter=this.canvas.leftBoxPositionY;curvePositionAfter=this.canvas.leftCurvePositionY;this.canvas.leftBoxPositionY=boxPositionBefore;this.canvas.leftCurvePositionY=curvePositionBefore;}else{boxPositionAfter=this.canvas.rightBoxPositionY;curvePositionAfter=this.canvas.rightCurvePositionY;this.canvas.rightBoxPositionY=boxPositionBefore;this.canvas.rightCurvePositionY=curvePositionBefore;} this.canvas.renderBox({side:side,boxHeight:boxPositionAfter-boxPositionBefore-this.canvas.boxSpacing-2,curveHeight:curvePositionAfter-curvePositionBefore-this.canvas.curveSpacing,gradient:gradientBackground,bgCanvas:true});var spacing=this.canvas.isNarrowMode()?8:15;this.canvas.addBoxSpacing(spacing,side);};Piwik_Transitions.prototype.renderClosedGroup=function(groupName,side,onlyBg){var self=this;var isHighlighted=groupName==this.highlightedGroup;var gradient=this.canvas.createHorizontalGradient('closed-group',side,isHighlighted);var nbTransitionsVarName=groupName+'NbTransitions';if(self.model[nbTransitionsVarName]==0){return;} self.canvas.renderBox({side:side,onlyBg:onlyBg,share:self.model.getPercentage(nbTransitionsVarName),gradient:gradient,boxText:self.model.getGroupTitle(groupName),boxTextNumLines:1,boxTextCssClass:'SingleLine',boxIcon:'plugins/Morpheus/images/plus_blue.png',smallBox:true,onClick:function(){self.unHighlightGroup(groupName,side);self.openGroup(side,groupName);},onMouseOver:function(){self.highlightGroup(groupName,side);},onMouseOut:function(){self.unHighlightGroup(groupName,side);}});};Piwik_Transitions.prototype.reloadPopover=function(url){if(this.rowAction){this.rowAction.openPopover(this.actionType+':'+url);}else{this.reset(this.actionType,url);this.showPopover();}};Piwik_Transitions.prototype.openGroup=function(side,groupName){this.canvas.clearSide(side);if(side=='left'){this.leftOpenGroup=groupName;this.renderLeftSide();}else{this.rightOpenGroup=groupName;this.renderRightSide();} this.renderLoops();this.canvas.truncateVisibleBoxTexts();};Piwik_Transitions.prototype.highlightGroup=function(groupName,side){if(this.highlightedGroup==groupName){return;} if(this.highlightedGroup!==false){this.unHighlightGroup(this.highlightedGroup,this.highlightedGroupSide);} this.highlightedGroup=groupName;this.highlightedGroupSide=side;var cssClass='Transitions_'+groupName.charAt(0).toUpperCase()+groupName.slice(1);this.highlightedGroupCenterEl=this.canvas.container.find('.'+cssClass);this.highlightedGroupCenterEl.addClass('Transitions_Highlighted');this.canvas.clearSide(side,true);if(side=='left'){this.renderLeftSide(true);}else{this.renderRightSide(true);} this.renderLoops();};Piwik_Transitions.prototype.unHighlightGroup=function(groupName,side){if(this.highlightedGroup===false){return;} this.highlightedGroupCenterEl.removeClass('Transitions_Highlighted');this.highlightedGroup=false;this.highlightedGroupSide=false;this.highlightedGroupCenterEl=false;this.canvas.clearSide(side,true);if(side=='left'){this.renderLeftSide(true);}else{this.renderRightSide(true);} this.renderLoops();};function Piwik_Transitions_Canvas(canvasBgLeft,canvasBgRight,canvasLeft,canvasRight,canvasLoops,width,height){if(typeof window.G_vmlCanvasManager!="undefined"){window.G_vmlCanvasManager.initElement(canvasBgLeft);window.G_vmlCanvasManager.initElement(canvasBgRight);window.G_vmlCanvasManager.initElement(canvasLeft);window.G_vmlCanvasManager.initElement(canvasRight);window.G_vmlCanvasManager.initElement(canvasLoops);} if(!canvasBgLeft.getContext){alert('Your browser is not supported.');return;} this.container=$(canvasBgLeft).parent().parent();this.contextBgLeft=canvasBgLeft.getContext('2d');this.contextBgRight=canvasBgRight.getContext('2d');this.contextLeft=canvasLeft.getContext('2d');this.contextRight=canvasRight.getContext('2d');this.contextLoops=canvasLoops.getContext('2d');this.width=width;this.height=height;this.leftBoxPositionY=this.originalBoxPositionY=0;this.leftCurvePositionY=this.originalCurvePositionY=110;this.rightBoxPositionY=this.originalBoxPositionY;this.rightCurvePositionY=this.originalCurvePositionY;this.boxWidth=175;this.boxHeight=53;this.smallBoxHeight=30;this.curveWidth=170;this.lineHeight=14;this.boxSpacing=7;this.curveSpacing=1.5;this.totalHeightOfConnections=205;this.leftBoxBeginX=0;this.leftCurveBeginX=this.leftBoxBeginX+this.boxWidth;this.leftCurveEndX=this.leftCurveBeginX+this.curveWidth;this.rightBoxEndX=this.width;this.rightBoxBeginX=this.rightCurveEndX=this.rightBoxEndX-this.boxWidth;this.rightCurveBeginX=this.rightCurveEndX-this.curveWidth;this.colors={};var transitionsColorNamespaces=['entries','exits','background','closed-group','items','others','loops'];var gradientColorNames=['light','dark','light-highlighted','dark-highlighted'];for(var i=0;i!=transitionsColorNamespaces.length;++i){var namespace='transition-'+transitionsColorNamespaces[i];this.colors[namespace]=piwik.ColorManager.getColors(namespace,gradientColorNames);}} Piwik_Transitions_Canvas.prototype.narrowMode=function(){this.smallBoxHeight=26;this.boxSpacing=4;this.narrowMode=true;};Piwik_Transitions_Canvas.prototype.isNarrowMode=function(){return typeof this.narrowMode!='undefined';};Piwik_Transitions_Canvas.prototype.createHorizontalGradient=function(colorGroup,position,isHighlighted){var fromX,toX,fromColor,toColor,lightColor,darkColor;colorGroup='transition-'+colorGroup;if(isHighlighted){lightColor=this.colors[colorGroup]['light-highlighted'];darkColor=this.colors[colorGroup]['dark-highlighted'];}else{lightColor=this.colors[colorGroup]['light'];darkColor=this.colors[colorGroup]['dark'];} if(position=='left'){fromX=this.leftBoxBeginX+50;toX=this.leftCurveEndX-20;fromColor=lightColor;toColor=darkColor;}else{fromX=this.rightCurveBeginX+20;toX=this.rightBoxEndX-50;fromColor=darkColor;toColor=lightColor;} var gradient=this.contextBgLeft.createLinearGradient(fromX,0,toX,0);gradient.addColorStop(0,fromColor);gradient.addColorStop(1,toColor);return gradient;};Piwik_Transitions_Canvas.prototype.renderText=function(text,x,y,cssClass,onClick,icon,maxLines){var div=this.addDomElement('div','Text');div.css({left:x+'px',top:y+'px'});if(icon){div.addClass('Transitions_HasBackground');div.css({backgroundImage:'url('+icon+')'});} if(cssClass){if(typeof cssClass=='object'){for(var i=0;i<cssClass.length;i++){div.addClass('Transitions_'+cssClass[i]);}}else{div.addClass('Transitions_'+cssClass);}} var textContainer=div;if(onClick){if(typeof onClick=='function'){div.css('cursor','pointer').hover(function(){$(this).addClass('Transitions_Hover');},function(){$(this).removeClass('Transitions_Hover');}).click(onClick);}else{var a=$(document.createElement('a'));a.attr('href',onClick);a.attr('rel','noreferrer noopener');a.attr('target','_blank');div.append(a);textContainer=a;}} if(maxLines){textContainer.addClass('Transitions_ApplyTextAndTruncate').data('text',text);}else{textContainer.html(text);} return div;};Piwik_Transitions_Canvas.prototype.addDomElement=function(tagName,cssClass){var el=$(document.createElement('div')).addClass('Transitions_'+cssClass);this.container.append(el);return el;};Piwik_Transitions_Canvas.prototype.truncateVisibleBoxTexts=function(){this.container.find('.Transitions_ApplyTextAndTruncate').each(function(){var container=$(this).html('<span>');var span=container.find('span');var text=container.data('text');span.html(piwikHelper.addBreakpointsToUrl(text));var divHeight=container.innerHeight();if(container.data('maxLines')){divHeight=container.data('maxLines')*(parseInt(container.css('lineHeight'),10)+.2);} var leftPart=false;var rightPart=false;while(divHeight<span.outerHeight()){if(leftPart===false){var middle=Math.round(text.length / 2);leftPart=text.substring(0,middle);rightPart=text.substring(middle,text.length);} leftPart=leftPart.substring(0,leftPart.length-2);rightPart=rightPart.substring(2,rightPart.length);text=leftPart+'...'+rightPart;span.html(piwikHelper.addBreakpointsToUrl(text));}});};Piwik_Transitions_Canvas.prototype.renderBox=function(params){var curveHeight=params.curveHeight?params.curveHeight:Math.round(this.totalHeightOfConnections*params.share);curveHeight=Math.max(curveHeight,1);var boxHeight=this.boxHeight;if(params.smallBox){boxHeight=this.smallBoxHeight;} if(params.boxHeight){boxHeight=params.boxHeight;} var context;if(params.bgCanvas){context=params.side=='left'?this.contextBgLeft:this.contextBgRight;}else{context=params.side=='left'?this.contextLeft:this.contextRight;} context.fillStyle=params.gradient;context.beginPath();if(params.side=='left'){this.renderLeftBoxBg(context,boxHeight,curveHeight);}else{this.renderRightBoxBg(context,boxHeight,curveHeight);} if(typeof context.endPath=='function'){context.endPath();} if(params.boxText&&!params.onlyBg){var onClick=params.onClick;var boxTextLeft,boxTextTop,el;if(params.side=='left'){boxTextLeft=this.leftBoxBeginX+10;boxTextTop=this.leftBoxPositionY+boxHeight / 2-params.boxTextNumLines*this.lineHeight / 2;el=this.renderText(params.boxText,boxTextLeft,boxTextTop,'BoxTextLeft',onClick,params.boxIcon,params.boxTextNumLines);}else{boxTextLeft=this.rightBoxBeginX;boxTextTop=this.rightBoxPositionY+boxHeight / 2-params.boxTextNumLines*this.lineHeight / 2;el=this.renderText(params.boxText,boxTextLeft,boxTextTop,'BoxTextRight',onClick,params.boxIcon,params.boxTextNumLines);} if(params.boxTextCssClass){el.addClass('Transitions_'+params.boxTextCssClass);} if(params.boxTextTooltip){var tip=piwikHelper.addBreakpointsToUrl(params.boxTextTooltip);el.tooltip({track:true,content:tip,items:'*',tooltipClass:'Transitions_Tooltip_Small',show:false,hide:false});} if(typeof params.onMouseOver=='function'){el.mouseenter(params.onMouseOver);} if(typeof params.onMouseOut=='function'){el.mouseleave(params.onMouseOut);}} if(params.curveText&&!params.onlyBg){var curveTextLeft,curveTextTop;if(params.side=='left'){curveTextLeft=this.leftBoxBeginX+this.boxWidth+3;curveTextTop=this.leftBoxPositionY+boxHeight / 2-this.lineHeight / 2;}else{curveTextLeft=this.rightBoxBeginX-37;curveTextTop=this.rightBoxPositionY+boxHeight / 2-this.lineHeight / 2;} var textDiv=this.renderText(params.curveText,curveTextLeft,curveTextTop,params.side=='left'?'CurveTextLeft':'CurveTextRight');if(params.curveTextTooltip){textDiv.tooltip({track:true,content:params.curveTextTooltip,items:'*',tooltipClass:'Transitions_Tooltip_Small',show:false,hide:false});}} if(params.side=='left'){this.leftBoxPositionY+=boxHeight+this.boxSpacing;this.leftCurvePositionY+=curveHeight+this.curveSpacing;}else{this.rightBoxPositionY+=boxHeight+this.boxSpacing;this.rightCurvePositionY+=curveHeight+this.curveSpacing;}};Piwik_Transitions_Canvas.prototype.renderLeftBoxBg=function(context,boxHeight,curveHeight){var leftUpper={x:this.leftCurveBeginX,y:this.leftBoxPositionY};var leftLower={x:this.leftCurveBeginX,y:this.leftBoxPositionY+boxHeight};var rightUpper={x:this.leftCurveEndX,y:this.leftCurvePositionY};var rightLower={x:this.leftCurveEndX,y:this.leftCurvePositionY+curveHeight};var center=(this.leftCurveBeginX+this.leftCurveEndX)/ 2;var cp1Upper={x:center,y:leftUpper.y};var cp2Upper={x:center,y:rightUpper.y};var cp1Lower={x:center,y:rightLower.y};var cp2Lower={x:center,y:leftLower.y};context.moveTo(leftUpper.x,leftUpper.y);context.bezierCurveTo(cp1Upper.x,cp1Upper.y,cp2Upper.x,cp2Upper.y,rightUpper.x,rightUpper.y);context.lineTo(rightLower.x,rightLower.y);context.bezierCurveTo(cp1Lower.x,cp1Lower.y,cp2Lower.x,cp2Lower.y,leftLower.x,leftLower.y);context.lineTo(leftLower.x-this.boxWidth+2,leftLower.y);context.lineTo(leftLower.x-this.boxWidth,leftUpper.y);context.lineTo(leftUpper.x,leftUpper.y);context.fill();};Piwik_Transitions_Canvas.prototype.renderRightBoxBg=function(context,boxHeight,curveHeight){var leftUpper={x:this.rightCurveBeginX,y:this.rightCurvePositionY};var leftLower={x:this.rightCurveBeginX,y:this.rightCurvePositionY+curveHeight};var rightUpper={x:this.rightCurveEndX,y:this.rightBoxPositionY};var rightLower={x:this.rightCurveEndX,y:this.rightBoxPositionY+boxHeight};var center=(this.rightCurveBeginX+this.rightCurveEndX)/ 2;var cp1Upper={x:center,y:leftUpper.y};var cp2Upper={x:center,y:rightUpper.y};var cp1Lower={x:center,y:rightLower.y};var cp2Lower={x:center,y:leftLower.y};context.moveTo(leftUpper.x,leftUpper.y);context.bezierCurveTo(cp1Upper.x,cp1Upper.y,cp2Upper.x,cp2Upper.y,rightUpper.x,rightUpper.y);context.lineTo(rightUpper.x+this.boxWidth,rightUpper.y);context.lineTo(rightLower.x+this.boxWidth-2,rightLower.y);context.lineTo(rightLower.x,rightLower.y);context.bezierCurveTo(cp1Lower.x,cp1Lower.y,cp2Lower.x,cp2Lower.y,leftLower.x,leftLower.y);context.lineTo(leftUpper.x,leftUpper.y);context.fill();};Piwik_Transitions_Canvas.prototype.addBoxSpacing=function(spacing,side){if(side=='left'){this.leftBoxPositionY+=spacing;}else{this.rightBoxPositionY+=spacing;}};Piwik_Transitions_Canvas.prototype.renderLoops=function(share){var curveHeight=Math.round(this.totalHeightOfConnections*share);curveHeight=Math.max(curveHeight,1);var gradient=this.contextLoops.createLinearGradient(this.leftCurveEndX-50,0,this.rightCurveBeginX+50,0);var light=this.colors['transition-loops']['light'];var dark=this.colors['transition-loops']['dark'];gradient.addColorStop(0,dark);gradient.addColorStop(.5,light);gradient.addColorStop(1,dark);this.contextLoops.fillStyle=gradient;this.contextLoops.beginPath();var point1={x:this.leftCurveEndX,y:this.leftCurvePositionY};var point2={x:this.leftCurveEndX,y:$('#Transitions_CenterBox').outerHeight()+70};var cpLeftX=(this.leftCurveBeginX+this.leftCurveEndX)/ 2+30;var cp1={x:cpLeftX,y:point1.y};var cp2={x:cpLeftX,y:point2.y};this.contextLoops.moveTo(point1.x,point1.y);this.contextLoops.bezierCurveTo(cp1.x,cp1.y,cp2.x,cp2.y,point2.x,point2.y);var point3={x:this.rightCurveBeginX,y:point2.y};this.contextLoops.lineTo(point3.x,point3.y);var point4={x:this.rightCurveBeginX,y:this.rightCurvePositionY};var cpRightX=(this.rightCurveBeginX+this.rightCurveEndX)/ 2-30;var cp3={x:cpRightX,y:point3.y};var cp4={x:cpRightX,y:point4.y};this.contextLoops.bezierCurveTo(cp3.x,cp3.y,cp4.x,cp4.y,point4.x,point4.y);var point5={x:point4.x,y:point4.y+curveHeight};this.contextLoops.lineTo(point5.x,point5.y);var point6={x:point5.x,y:point2.y-25};cpRightX-=30;var cp5={x:cpRightX,y:point5.y};var cp6={x:cpRightX,y:point6.y};this.contextLoops.bezierCurveTo(cp5.x,cp5.y,cp6.x,cp6.y,point6.x,point6.y);var point7={x:point1.x,y:point6.y};this.contextLoops.lineTo(point7.x,point7.y);var point8={x:point1.x,y:point1.y+curveHeight};cpLeftX+=30;var cp7={x:cpLeftX,y:point7.y};var cp8={x:cpLeftX,y:point8.y};this.contextLoops.bezierCurveTo(cp7.x,cp7.y,cp8.x,cp8.y,point8.x,point8.y);this.contextLoops.fill();if(typeof this.contextLoops.endPath=='function'){this.contextLoops.endPath();}};Piwik_Transitions_Canvas.prototype.clearSide=function(side,onlyBg){if(side=='left'){this.contextBgLeft.clearRect(0,0,this.width,this.height);this.contextLeft.clearRect(0,0,this.width,this.height);}else{this.contextBgRight.clearRect(0,0,this.width,this.height);this.contextRight.clearRect(0,0,this.width,this.height);} this.contextLoops.clearRect(0,0,this.width,this.height);if(side=='left'){if(!onlyBg){this.container.find('.Transitions_BoxTextLeft').remove();this.container.find('.Transitions_CurveTextLeft').remove();} this.leftBoxPositionY=this.originalBoxPositionY;this.leftCurvePositionY=this.originalCurvePositionY;}else{if(!onlyBg){this.container.find('.Transitions_BoxTextRight').remove();this.container.find('.Transitions_CurveTextRight').remove();} this.rightBoxPositionY=this.originalBoxPositionY;this.rightCurvePositionY=this.originalCurvePositionY;}};function Piwik_Transitions_Model(ajax){this.ajax=ajax;this.groupTitles={};} Piwik_Transitions_Model.prototype.htmlLoaded=function(){this.groupTitles.previousPages=Piwik_Transitions_Translations.fromPreviousPages;this.groupTitles.previousSiteSearches=Piwik_Transitions_Translations.fromPreviousSiteSearches;this.groupTitles.followingPages=Piwik_Transitions_Translations.toFollowingPages;this.groupTitles.followingSiteSearches=Piwik_Transitions_Translations.toFollowingSiteSearches;this.groupTitles.outlinks=Piwik_Transitions_Translations.outlinks;this.groupTitles.downloads=Piwik_Transitions_Translations.downloads;this.shareInGroupTexts={previousPages:Piwik_Transitions_Translations.fromPreviousPagesInline,previousSiteSearches:Piwik_Transitions_Translations.fromPreviousSiteSearchesInline,followingPages:Piwik_Transitions_Translations.toFollowingPagesInline,followingSiteSearches:Piwik_Transitions_Translations.toFollowingSiteSearchesInline,searchEngines:Piwik_Transitions_Translations.fromSearchEnginesInline,socialNetworks:Piwik_Transitions_Translations.fromSocialNetworksInline,websites:Piwik_Transitions_Translations.fromWebsitesInline,campaigns:Piwik_Transitions_Translations.fromCampaignsInline,outlinks:Piwik_Transitions_Translations.outlinksInline,downloads:Piwik_Transitions_Translations.downloadsInline};};Piwik_Transitions_Model.prototype.loadData=function(actionType,actionName,overrideParams,callback){var self=this;this.pageviews=0;this.exits=0;this.loops=0;this.directEntries=0;this.searchEnginesNbTransitions=0;this.searchEngines=[];this.socialNetworksNbTransitions=0;this.socialNetworks=[];this.websitesNbTransitions=0;this.websites=[];this.campaignsNbTransitions=0;this.campaigns=[];this.previousPagesNbTransitions=0;this.previousPages=[];this.followingPagesNbTransitions=0;this.followingPages=[];this.downloadsNbTransitions=0;this.downloads=[];this.outlinksNbTransitions=0;this.outlinks=[];this.previousSiteSearchesNbTransitions=0;this.previousSiteSearches=[];this.followingSiteSearchesNbTransitions=0;this.followingSiteSearches=[];this.date='';var params={actionType:actionType,actionName:actionName,expanded:1};if(overrideParams){$.extend(params,overrideParams);} this.ajax.callApi('Transitions.getTransitionsForAction',params,function(report){self.date=report.date;self.pageviews=report.pageMetrics.pageviews;self.loops=report.pageMetrics.loops;self.exits=report.pageMetrics.exits;for(var i=0;i<report.referrers.length;i++){var referrer=report.referrers[i];if(referrer.shortName=='direct'){self.directEntries=referrer.visits;}else if(referrer.shortName=='search'){self.searchEnginesNbTransitions=referrer.visits;self.searchEngines=referrer.details;self.groupTitles.searchEngines=referrer.label;}else if(referrer.shortName=='social'){self.socialNetworksNbTransitions=referrer.visits;self.socialNetworks=referrer.details;self.groupTitles.socialNetworks=referrer.label;}else if(referrer.shortName=='website'){self.websitesNbTransitions=referrer.visits;self.websites=referrer.details;self.groupTitles.websites=referrer.label;}else if(referrer.shortName=='campaign'){self.campaignsNbTransitions=referrer.visits;self.campaigns=referrer.details;self.groupTitles.campaigns=referrer.label;}} self.loadAndSumReport(report,'previousPages');self.loadAndSumReport(report,'previousSiteSearches');self.loadAndSumReport(report,'followingPages');self.loadAndSumReport(report,'followingSiteSearches');self.loadAndSumReport(report,'downloads');self.loadAndSumReport(report,'outlinks');if(typeof Piwik_Transitions_Model.totalNbPageviews=='undefined'){Piwik_Transitions_Model.totalNbPageviews=false;self.ajax.loadTotalNbPageviews(function(nbPageviews){Piwik_Transitions_Model.totalNbPageviews=nbPageviews;});} callback();});};Piwik_Transitions_Model.prototype.loadAndSumReport=function(apiData,reportName){var data=this[reportName]=apiData[reportName];var sumVarName=reportName+'NbTransitions';this[sumVarName]=0;for(var i=0;i<data.length;i++){this[sumVarName]+=data[i].referrals;}};Piwik_Transitions_Model.prototype.getTotalNbPageviews=function(){if(typeof Piwik_Transitions_Model.totalNbPageviews=='undefined'){return false;} return Piwik_Transitions_Model.totalNbPageviews;};Piwik_Transitions_Model.prototype.getGroupTitle=function(groupName){if(typeof this.groupTitles[groupName]!='undefined'){return this.groupTitles[groupName];} return groupName;};Piwik_Transitions_Model.prototype.getShareInGroupTooltip=function(share,groupName){var tip=this.shareInGroupTexts[groupName];return sprintf(tip,share);};Piwik_Transitions_Model.prototype.getDetailsForGroup=function(groupName){return this.addPercentagesToData(this[groupName]);};Piwik_Transitions_Model.prototype.getPercentage=function(metric,formatted){var percentage=(this.pageviews==0?0:this[metric]/ this.pageviews);if(formatted){percentage=this.roundPercentage(percentage);return NumberFormatter.formatPercent(percentage);} return percentage;};Piwik_Transitions_Model.prototype.addPercentagesToData=function(data){var total=0;for(var i=0;i<data.length;i++){total+=parseInt(data[i].referrals,10);} for(i=0;i<data.length;i++){data[i].percentage=this.roundPercentage(data[i].referrals / total);} return data;};Piwik_Transitions_Model.prototype.roundPercentage=function(value){if(value<.1){return Math.round(value*1000)/ 10.0;}else{return Math.round(value*100);}};function Piwik_Transitions_Ajax(){} Piwik_Transitions_Ajax.prototype.loadTotalNbPageviews=function(callback){this.callApi('Actions.get',{columns:'nb_pageviews'},function(response){var value=typeof response.value!='undefined'?response.value:false;callback(value);});};Piwik_Transitions_Ajax.prototype.callTransitionsController=function(action,callback){var ajaxRequest=new ajaxHelper();ajaxRequest.addParams({module:'Transitions',action:action},'get');ajaxRequest.setCallback(callback);ajaxRequest.setFormat('html');ajaxRequest.send();};Piwik_Transitions_Ajax.prototype.callApi=function(method,params,callback){var self=this;params.format='JSON';params.module='API';params.method=method;params.filter_limit='-1';var ajaxRequest=new ajaxHelper();ajaxRequest.addParams(params,'get');ajaxRequest.useCallbackInCaseOfError();ajaxRequest.setCallback(function(result){if(typeof result.result!='undefined'&&result.result=='error'){var errorName=result.message;var showError=function(){var errorTitle,errorMessage,errorBack;if(typeof Piwik_Transitions_Translations[errorName]=='undefined'){errorTitle='Exception';errorMessage=errorName;errorBack='<<<';}else{errorTitle=Piwik_Transitions_Translations[errorName];errorMessage=Piwik_Transitions_Translations[errorName+'Details'];errorBack=Piwik_Transitions_Translations[errorName+'Back'];} if(typeof params.actionName!='undefined'){var url=params.actionName;url=piwikHelper.addBreakpointsToUrl(url);errorTitle=sprintf(errorTitle,'<span>'+url+'</span>');} errorMessage=sprintf(errorMessage,'<br />');var inlineErrorNode=$('#Transitions_Error_Container');if(inlineErrorNode.length){inlineErrorNode.html('');var theContentNode=$(document.createElement('div')).addClass('Piwik_Popover_Error');var p=$(document.createElement('p')).addClass('Piwik_Popover_Error_Title');theContentNode.append(p.html(errorTitle));if(errorMessage){p=$(document.createElement('p')).addClass('Piwik_Popover_Error_Message');theContentNode.append(p.html(errorMessage));} inlineErrorNode.append(theContentNode);inlineErrorNode.show();$('#transitions_report .popoverContainer').hide();}else{Piwik_Popover.showError(errorTitle,errorMessage,errorBack);} $('#transitions_inline_loading').hide();};if(typeof Piwik_Transitions_Translations=='undefined'){self.callApi('Transitions.getTranslations',{},function(response){if(typeof response=='object'){Piwik_Transitions_Translations=response;}else{Piwik_Transitions_Translations={};} showError();});}else{showError();}} else{callback(result);}});ajaxRequest.send();};Piwik_Transitions_Util={shortenUrl:function(url,removeDomain){if(url=='Others'){return url;} var urlBackup=url;url=url.replace(/http(s)?:\/\/(www\.)?/,'');if(urlBackup==url){return url;} if(removeDomain){url=url.replace(/[^\/]*/,'');if(url=='/'){url=urlBackup;}} url=url.replace(/\/$/,'');return url;},replacePlaceholderInHtml:function(container,value,spanClass){var span=container.find('span');if(!span.length){var html=container.html().replace(/%s/,'<span></span>');span=container.html(html).find('span');if(!spanClass){spanClass='Transitions_Metric';} span.addClass(spanClass);} span.html(value);}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($,require){var exports=require('piwik/UI'),DataTable=exports.DataTable,dataTablePrototype=DataTable.prototype;function getLevelFromClass(style){if(!style||typeof style=="undefined")return 0;var currentLevel=0;var currentLevelIndex=style.indexOf('level');if(currentLevelIndex>=0){currentLevel=Number(style.slice(currentLevelIndex+5,currentLevelIndex+6));} return currentLevel;} exports.ActionsDataTable=function(element){this.parentAttributeParent='';this.parentId='';this.disabledRowDom={};DataTable.call(this,element);};$.extend(exports.ActionsDataTable.prototype,dataTablePrototype,{bindEventsAndApplyStyle:function(domElem,rows){var self=this;self.cleanParams();self.preBindEventsAndApplyStyleHook(domElem,rows);if(!rows){rows=$('tr',domElem);} if(!self.param.filter_pattern_recursive){self.numberOfSubtables=rows.filter('.subDataTable').click(function(){self.onClickActionSubDataTable(this)}).length;} self.applyCosmetics(domElem,rows);self.handleColumnHighlighting(domElem);self.handleRowActions(domElem,rows);self.handleLimit(domElem);self.handlePeriod(domElem);self.handleAnnotationsButton(domElem);self.handleExportBox(domElem);self.handleSort(domElem);self.handleOffsetInformation(domElem);if(self.workingDivId!=undefined){var dataTableLoadedProxy=function(response){self.dataTableLoaded(response,self.workingDivId);};self.handleConfigurationBox(domElem,dataTableLoadedProxy);self.handleSearchBox(domElem,dataTableLoadedProxy);} self.handleColumnDocumentation(domElem);self.handleRelatedReports(domElem);self.handleTriggeredEvents(domElem);self.handleCellTooltips(domElem);self.setFixWidthToMakeEllipsisWork(domElem);self.handleSummaryRow(domElem);self.openSubtableFromLevel0IfOnlyOneSubtableGiven(domElem);self.postBindEventsAndApplyStyleHook(domElem,rows);},openSubtableFromLevel0IfOnlyOneSubtableGiven:function(domElem){var $subtables=domElem.find('.subDataTable');var hasOnlyOneSubtable=$subtables.length===1;if(hasOnlyOneSubtable){var hasOnlyOneRow=domElem.find('tbody tr.level0').length===1;if(hasOnlyOneRow){var $labels=$subtables.find('.label');if($labels.length){$labels.first().click();}}}},openSubtableFromSubtableIfOnlyOneSubtableGiven:function(domElem){var hasOnlyOneRow=domElem.length===1;var hasOnlyOneSubtable=domElem.hasClass('subDataTable');if(hasOnlyOneRow&&hasOnlyOneSubtable){var $labels=domElem.find('.label');if($labels.length){$labels.first().click();}}},applyCosmetics:function(domElem,rows){var self=this;var rowsWithSubtables=rows.filter('.subDataTable');rowsWithSubtables.css('font-weight','bold');$("th:first-child",domElem).addClass('label');$(rowsWithSubtables).each(function(){if(self.param.filter_pattern_recursive){$(this).addClass('expanded');$(this).attr('title','');}});var rootRow=rows.first().prev();var level=rootRow.length?getLevelFromClass(rootRow.attr('class'))+1:0;rows.each(function(){var currentStyle=$(this).attr('class')||'';if(currentStyle.indexOf('level')==-1){$(this).addClass('level'+level);} $(this).prop('parent',function(){return self.parentAttributeParent+' '+self.parentId;});});self.addOddAndEvenClasses(domElem);},addOddAndEvenClasses:function(domElem){},handleRowActions:function(domElem,rows){this.doHandleRowActions(rows);},onClickActionSubDataTable:function(domElem){var self=this;var idSubTable=$(domElem).attr('id');var divIdToReplaceWithSubTable='subDataTable_'+idSubTable;var $insertAfter=$(domElem).nextUntil(':not(.comparePeriod):not(.comparisonRow)').last();if(!$insertAfter.length){$insertAfter=$(domElem);} var NextStyle=$insertAfter.next().attr('class');var CurrentStyle=$(domElem).attr('class');var currentRowLevel=getLevelFromClass(CurrentStyle);var nextRowLevel=getLevelFromClass(NextStyle);if(currentRowLevel>=nextRowLevel){$(domElem).off('click');self.disabledRowDom=$(domElem);var numberOfColumns=$(domElem).children().length;$insertAfter.after(' <tr id="'+divIdToReplaceWithSubTable+'" class="cellSubDataTable"> <td colspan="'+numberOfColumns+'"> <span class="loadingPiwik" style="display:inline"><img src="plugins/Morpheus/images/loading-blue.gif" /> Loading...</span> </td> </tr> ');var savedActionVariable=self.param.action;var filtersToRestore=self.resetAllFilters();this.param['filter_sort_column']=filtersToRestore['filter_sort_column'];this.param['filter_sort_order']=filtersToRestore['filter_sort_order'];this.param['enable_filter_excludelowpop']=filtersToRestore['enable_filter_excludelowpop'];self.param.idSubtable=idSubTable;self.param.action=self.props.subtable_controller_action;var extraParams={};extraParams.comparisonIdSubtables=self.getComparisonIdSubtables($(domElem));self.reloadAjaxDataTable(false,function(resp){self.actionsSubDataTableLoaded(resp,idSubTable);self.repositionRowActions($(domElem));},extraParams);self.param.action=savedActionVariable;self.restoreAllFilters(filtersToRestore);delete self.param.idSubtable;} else{var isExpanded=$(domElem).hasClass('subDataTable')&&$(domElem).hasClass('expanded');$(domElem).siblings().each(function(){var parents=$(this).prop('parent').split(' ');if(parents){if(parents.indexOf(idSubTable)>=0||parents.indexOf('subDataTable_'+idSubTable)>=0){if(!isExpanded){$(this).css('display','').removeClass('hidden');var NextStyle=$(this).next().attr('class');var CurrentStyle=$(this).attr('class');var currentRowLevel=getLevelFromClass(CurrentStyle);var nextRowLevel=getLevelFromClass(NextStyle);if(currentRowLevel<nextRowLevel){$(this).addClass('expanded');}} else{$(this).css('display','none').addClass('hidden');} self.repositionRowActions($(domElem));}}});self.$element.trigger('piwik:actionsSubTableToggled');} $(domElem).toggleClass('expanded');},dataTableLoaded:function(response,workingDivId){var content=$(response);var idToReplace=workingDivId||$(content).attr('id');self.parentAttributeParent='';self.parentId='';var dataTableSel=$('#'+idToReplace);var oldReportsElem=$('.datatableRelatedReports',dataTableSel);$('.datatableRelatedReports',content).replaceWith(oldReportsElem);dataTableSel.replaceWith(content);content.trigger('piwik:dataTableLoaded');piwikHelper.compileVueEntryComponents(content);piwikHelper.lazyScrollTo(content[0],400);return content;},actionsSubDataTableLoaded:function(response,idSubTable){var self=this;var idToReplace='subDataTable_'+idSubTable;var root=$('#'+self.workingDivId);var response=$(response);self.parentAttributeParent=$('tr#'+idToReplace).prev().prop('parent');self.parentId=idToReplace;$('tr#'+idToReplace,root).after(response).remove();var requiredColumnCount=0,availableColumnCount=0;response.prev().find('td').each(function(){requiredColumnCount+=$(this).attr('colspan')||1;});response.find('td').each(function(){availableColumnCount+=$(this).attr('colspan')||1;});var missingColumns=requiredColumnCount-availableColumnCount;for(var i=0;i<missingColumns;i++){response.append('<td>-</td>');} var re=/subDataTable_(\d+)/;var ok=re.exec(self.parentId);if(ok){self.parentId=ok[1];} self.bindEventsAndApplyStyle($('#'+self.workingDivId),response);self.$element.trigger('piwik:actionsSubDataTableLoaded');self.disabledRowDom.click(function(){self.onClickActionSubDataTable(this)});self.openSubtableFromSubtableIfOnlyOneSubtableGiven(response);}});})(jQuery,require); $(function(){function isActionsModule(params){return params.module=='Actions';} function isPageUrlReport(params){var action=params.action;return isActionsModule(params)&&(action=='getPageUrls'||action=='getEntryPageUrls'||action=='getExitPageUrls'||action=='getPageUrlsFollowingSiteSearch');};function isPageTitleReport(params){var action=params.action;return isActionsModule(params)&&(action=='getPageTitles'||action=='getPageTitlesFollowingSiteSearch');};function getLinkForTransitionAndOverlayPopover(tr){tr=getRealRowIfComparisonRow(tr);var link=tr.find('> td:first > a').attr('href');link=link.replace(/&([a-z]+[^a-z;])/,'&$1');link=$('<textarea>').html(link).val();return link;} if(window.DataTable_RowActions_Transitions){DataTable_RowActions_Transitions.registerReport({isAvailableOnReport:function(dataTableParams){return isPageUrlReport(dataTableParams);},isAvailableOnRow:function(dataTableParams,tr){tr=getRealRowIfComparisonRow(tr);return isPageUrlReport(dataTableParams)&&tr.find('> td:first span.label').parent().is('a')},trigger:function(tr,e,subTableLabel,originalRow){var overrideParams=$.extend({},$(originalRow||tr).data('param-override'));if(typeof overrideParams!=='object'){overrideParams={};} tr=getRealRowIfComparisonRow(tr);var link=getLinkForTransitionAndOverlayPopover(tr);var popoverUrl='url:'+link;Object.keys(overrideParams).forEach(function(paramName){if(!overrideParams[paramName]){return;} popoverUrl+=':'+encodeURIComponent(paramName)+':'+encodeURIComponent(overrideParams[paramName]);});this.openPopover(popoverUrl);}});DataTable_RowActions_Transitions.registerReport({isAvailableOnReport:function(dataTableParams){return isPageTitleReport(dataTableParams);},isAvailableOnRow:function(dataTableParams,tr){return isPageTitleReport(dataTableParams);},trigger:function(tr,e,subTableLabel){DataTable_RowAction.prototype.trigger.apply(this,[tr,e,subTableLabel]);}});} if(window.DataTable_RowActions_Overlay){DataTable_RowActions_Overlay.registerReport({isAvailableOnReport:function(dataTableParams){return isPageUrlReport(dataTableParams);},onClick:function(actionA,tr,e){return{link:getLinkForTransitionAndOverlayPopover(tr),segment:null}}});} function getRealRowIfComparisonRow(tr){if(tr.is('.comparisonRow')){var prevUntil=tr.prevUntil('.parentComparisonRow').prev();return prevUntil.length?prevUntil:tr.prev();} return tr;}}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function widgetsHelper(){} widgetsHelper.firstGetAvailableWidgetsCall=null;widgetsHelper.getAvailableWidgets=function(callback){function mergeCategoriesAndSubCategories(availableWidgets){var categorized={};$.each(availableWidgets,function(index,widget){var category=widget.category.name;if(!categorized[category]){categorized[category]={'-':[]};} var subcategory='-';if(widget.subcategory&&widget.subcategory.name){subcategory=widget.subcategory.name;} if(!categorized[category][subcategory]){categorized[category][subcategory]=[];} categorized[category][subcategory].push(widget);});var moved={};$.each(categorized,function(category,widgets){$.each(widgets,function(subcategory,subwidgets){if(!subwidgets.length){return;} var categoryToUse=category;if(subwidgets.length>=3&&subcategory!=='-'){categoryToUse=category+' - '+subcategory;} if(!moved[categoryToUse]){moved[categoryToUse]=[];} $.each(subwidgets,function(index,widget){moved[categoryToUse].push(widget);});});});return moved;} var promise=new Promise(function(resolve,reject){if(!widgetsHelper.availableWidgets){var ajaxRequest=new ajaxHelper();ajaxRequest._mixinDefaultGetParams=function(params){return params;};ajaxRequest.addParams({module:'API',method:'API.getWidgetMetadata',filter_limit:'-1',format:'JSON',deep:'1',idSite:piwik.idSite||broadcast.getValueFromUrl('idSite')},'get');ajaxRequest.setCallback(function(data){widgetsHelper.availableWidgets=mergeCategoriesAndSubCategories(data);resolve();});ajaxRequest.setErrorCallback(function(deferred,status){if(status=='abort'||!deferred||deferred.status<400||deferred.status>=600){return;} $('#loadingError').show();reject();});ajaxRequest.send();return;} resolve();});if(!widgetsHelper.firstGetAvailableWidgetsCall){widgetsHelper.firstGetAvailableWidgetsCall=promise;} promise.then(function(){if(callback){callback(widgetsHelper.availableWidgets);}});};widgetsHelper.getWidgetObjectFromUniqueId=function(uniqueId,callback){widgetsHelper.getAvailableWidgets(function(widgets){for(var widgetCategory in widgets){var widgetInCategory=widgets[widgetCategory];for(var i in widgetInCategory){if(widgetInCategory[i]["uniqueId"]==uniqueId){callback(widgetInCategory[i]);return;}}} callback(false);});};widgetsHelper.getWidgetNameFromUniqueId=function(uniqueId,callback){this.getWidgetObjectFromUniqueId(uniqueId,function(widget){if(widget==false){callback(false);} callback(widget["name"]);});};widgetsHelper.loadWidgetAjax=function(widgetUniqueId,widgetParameters,onWidgetLoadedCallback,onWidgetErrorCallback){var disableLink=broadcast.getValueFromUrl('disableLink');widgetParameters['disableLink']=disableLink.length||$('body#standalone').length;widgetParameters['widget']=1;var ajaxRequest=new ajaxHelper();ajaxRequest.addParams(widgetParameters,'get');ajaxRequest.setCallback(onWidgetLoadedCallback);if(onWidgetErrorCallback){ajaxRequest.setErrorCallback(onWidgetErrorCallback);} ajaxRequest.setFormat('html');ajaxRequest.send();return ajaxRequest;};(function($,require){var exports=require('piwik/UI/Dashboard');var WidgetFactory=function(){};WidgetFactory.prototype.make=function(uniqueId,widgetName){var $result=this.getWidgetTemplate().clone();$result.attr('id',uniqueId).find('.widgetName').append(widgetName);return $result;};WidgetFactory.prototype.getWidgetTemplate=function(){if(!this.widgetTemplate){this.widgetTemplate=$('#widgetTemplate').find('>.widget').detach();} return this.widgetTemplate;};exports.WidgetFactory=new WidgetFactory();})(jQuery,require);(function($){$.extend({widgetPreview:new function(){var defaultSettings={onPreviewLoaded:function(){},onSelect:function(){},isWidgetAvailable:function(widgetUniqueId){return true;},resetOnSelect:false,baseClass:'widgetpreview-base',categorylistClass:'widgetpreview-categorylist',widgetlistClass:'widgetpreview-widgetlist',widgetpreviewClass:'widgetpreview-preview',choosenClass:'widgetpreview-choosen',unavailableClass:'widgetpreview-unavailable'};function createWidgetCategoryList(widgetPreview,availableWidgets){var settings=widgetPreview.settings;if(!$('.'+settings.categorylistClass,widgetPreview).length){$(widgetPreview).append('<ul class="'+settings.categorylistClass+'"></ul>');}else{$('.'+settings.categorylistClass,widgetPreview).empty();} for(var widgetCategory in availableWidgets){$('.'+settings.categorylistClass,widgetPreview).append($('<li>').text(widgetCategory));} return $('.'+settings.categorylistClass,widgetPreview);} function createWidgetList(widgetPreview){var settings=widgetPreview.settings;if(!$('.'+settings.widgetlistClass,widgetPreview).length){$(widgetPreview).append('<ul class="'+settings.widgetlistClass+'"></ul>');}else{$('.'+settings.widgetlistClass+' li',widgetPreview).off('mouseover');$('.'+settings.widgetlistClass+' li',widgetPreview).off('click');$('.'+settings.widgetlistClass,widgetPreview).empty();} if($('.'+settings.categorylistClass+' .'+settings.choosenClass,widgetPreview).length){var position=$('.'+settings.categorylistClass+' .'+settings.choosenClass,widgetPreview).position().top- $('.'+settings.categorylistClass,widgetPreview).position().top+ ($('.dashboard-manager .addWidget').outerHeight()||0);if(!$('#content.admin').length){position+=5;} $('.'+settings.widgetlistClass,widgetPreview).css({top:position,marginBottom:position});} return $('.'+settings.widgetlistClass,widgetPreview);} function showWidgetList(widgets,widgetPreview){var settings=widgetPreview.settings;var widgetList=createWidgetList(widgetPreview),widgetPreviewTimer;for(var j=0;j<widgets.length;j++){var widgetName=widgets[j]["name"];var widgetUniqueId=widgets[j]["uniqueId"];var widgetCategoryId=widgets[j].category?widgets[j].category.id:null;var widgetClass='';if(!settings.isWidgetAvailable(widgetUniqueId)&&widgetCategoryId!=='General_KpiMetric'){widgetClass+=' '+settings.unavailableClass;} widgetName=piwikHelper.escape(piwikHelper.htmlEntities(widgetName));widgetList.append('<li class="'+widgetClass+'" uniqueid="'+widgetUniqueId+'">'+widgetName+'</li>');} $('li',widgetList).on('mouseenter',function(){var that=this,widgetUniqueId=$(this).attr('uniqueid');clearTimeout(widgetPreview);widgetPreviewTimer=setTimeout(function(){$('li',widgetList).removeClass(settings.choosenClass);$(that).addClass(settings.choosenClass);showPreview(widgetUniqueId,widgetPreview);},400);});$('li:not(.'+settings.unavailableClass+')',widgetList).on('mouseleave',function(){clearTimeout(widgetPreview);});$('li',widgetList).on('click',function(){if(!$('.widgetLoading',widgetPreview).length){settings.onSelect($(this).attr('uniqueid'));$(widgetPreview).closest('.dashboard-manager').removeClass('expanded');if(settings.resetOnSelect){resetWidgetPreview(widgetPreview);}} return false;});} function createPreviewElement(widgetPreview){var settings=widgetPreview.settings;if(!$('.'+settings.widgetpreviewClass,widgetPreview).length){$(widgetPreview).append('<div class="'+settings.widgetpreviewClass+'"></div>');}else{$('.'+settings.widgetpreviewClass+' .widgetTop',widgetPreview).off('click');$('.'+settings.widgetpreviewClass,widgetPreview).empty();} return $('.'+settings.widgetpreviewClass,widgetPreview);} function showPreview(widgetUniqueId,widgetPreview){if($('[id="'+widgetUniqueId+'"]',widgetPreview).length)return;var settings=widgetPreview.settings;var previewElement=createPreviewElement(widgetPreview);widgetsHelper.getWidgetObjectFromUniqueId(widgetUniqueId,function(widget){var widgetParameters=widget['parameters'];var emptyWidgetHtml=require('piwik/UI/Dashboard').WidgetFactory.make(widgetUniqueId,$('<span/>').attr('title',_pk_translate("Dashboard_AddPreviewedWidget")).text(_pk_translate('Dashboard_WidgetPreview')));previewElement.html(emptyWidgetHtml);var onWidgetLoadedCallback=function(response){var widgetElement=$(document.getElementById(widgetUniqueId));$('.widgetContent',widgetElement).html($(response));piwikHelper.compileVueEntryComponents($('.widgetContent',widgetElement));$('.widgetContent',widgetElement).trigger('widget:create');settings.onPreviewLoaded(widgetUniqueId,widgetElement);$('.'+settings.widgetpreviewClass+' .widgetTop',widgetPreview).on('click',function(){settings.onSelect(widgetUniqueId);$(widgetPreview).closest('.dashboard-manager').removeClass('expanded');if(settings.resetOnSelect){resetWidgetPreview(widgetPreview);} return false;});};if(widgetPreview.widgetAjaxRequest){widgetPreview.widgetAjaxRequest.abort();} widgetPreview.widgetAjaxRequest=widgetsHelper.loadWidgetAjax(widgetUniqueId,widgetParameters,onWidgetLoadedCallback);});} function resetWidgetPreview(widgetPreview){var settings=widgetPreview.settings;$('.'+settings.categorylistClass+' li',widgetPreview).removeClass(settings.choosenClass);createWidgetList(widgetPreview);createPreviewElement(widgetPreview);} this.construct=function(userSettings){if(userSettings=='reset'){resetWidgetPreview(this);return;} this.widgetAjaxRequest=null;$(this).addClass('widgetpreview-base');this.settings=jQuery.extend({},defaultSettings,userSettings);if(typeof this.settings.onSelect=='function'){this.onSelect=this.settings.onSelect;} if(typeof this.settings.onPreviewLoaded=='function'){this.onPreviewLoaded=this.settings.onPreviewLoaded;} var self=this;widgetsHelper.getAvailableWidgets(function(availableWidgets){var categoryList=createWidgetCategoryList(self,availableWidgets);$('li',categoryList).on('mouseover',function(){var category=$(this).text();var widgets=availableWidgets[category];$('li',categoryList).removeClass(self.settings.choosenClass);$(this).addClass(self.settings.choosenClass);showWidgetList(widgets,self);createPreviewElement(self);});});};}});$.fn.extend({widgetPreview:$.widgetPreview.construct})})(jQuery); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($){var layoutColumnSelector='#dashboardWidgetsArea > .col';var dashboardLayout={};var dashboardId=1;var dashboardName='';var dashboardElement=null;var dashboardChanged=false;var methods={init:function(options){dashboardElement=this;if(options.idDashboard){dashboardId=options.idDashboard;} if(options.name){dashboardName=options.name;} if(options.layout){generateLayout(options.layout);} window.CoreHome.Matomo.postEvent('Dashboard.Dashboard.mounted',{element:this});return this;},destroy:function(){if(dashboardElement&&dashboardElement.length){window.CoreHome.Matomo.postEvent('Dashboard.Dashboard.unmounted',{element:dashboardElement[0]});} $(dashboardElement).remove();dashboardElement=null;destroyWidgets();},destroyWidgets:destroyWidgets,loadDashboard:function(dashboardIdToLoad,forceReload){$(dashboardElement).empty();dashboardName='';dashboardLayout=null;dashboardId=dashboardIdToLoad;if(!forceReload&&piwikHelper.isReportingPage()){var MatomoUrl=window.CoreHome.MatomoUrl;MatomoUrl.updateHash(Object.assign({},MatomoUrl.hashParsed.value,{subcategory:dashboardIdToLoad,}));}else{piwik.postEvent('Dashboard.loadDashboard',dashboardIdToLoad);} return this;},setColumnLayout:function(newLayout){adjustDashboardColumns(newLayout);},getColumnLayout:function(){return dashboardLayout.config.layout;},getDashboardName:function(){return dashboardName;},getDashboardId:function(){return dashboardId;},setDashboardName:function(newName){dashboardName=newName;dashboardChanged=true;saveLayout();},addWidget:function(uniqueId,columnNumber,widgetParameters,addWidgetOnTop,isHidden){addWidgetTemplate(uniqueId,columnNumber,widgetParameters,addWidgetOnTop,isHidden);saveLayout();},resetLayout:function(){var ajaxRequest=new ajaxHelper();ajaxRequest.addParams({module:'Dashboard',action:'resetLayout',idDashboard:dashboardId},'get');ajaxRequest.withTokenInUrl();ajaxRequest.setCallback(function(){methods.loadDashboard.apply(this,[dashboardId,true])});ajaxRequest.setLoadingElement();ajaxRequest.setFormat('html');ajaxRequest.send();},rebuildMenu:rebuildMenu,removeDashboard:function(){if(dashboardId==1){return;} var ajaxRequest=new ajaxHelper();ajaxRequest.setLoadingElement();ajaxRequest.addParams({module:'API',method:'Dashboard.removeDashboard',idDashboard:dashboardId,login:piwik.userLogin,format:'json'},'get');ajaxRequest.setCallback(function(){Promise.resolve(rebuildMenu()).then(function(){methods.loadDashboard.apply(this,[1]);});});ajaxRequest.withTokenInUrl();ajaxRequest.setFormat('html');ajaxRequest.send();},saveLayoutAsDefaultWidgetLayout:function(){saveLayout('saveLayoutAsDefault');},isDefaultDashboard:function(){return(dashboardId==1);}};function destroyWidgets(){var widgets=$('[widgetId]');for(var i=0;i<widgets.length;i++){$(widgets[i]).dashboardWidget('destroy');}} function removeNonExistingWidgets(availableWidgets,layout){var existingModuleAction={};$.each(availableWidgets,function(category,widgets){$.each(widgets,function(index,widget){existingModuleAction[widget.module+'.'+widget.action]=true;});});var columns=[];$.each(layout.columns,function(i,column){var widgets=[];$.each(column,function(j,widget){if(!widget.parameters||!widget.parameters.module){return;} var method=widget.parameters.module+'.'+widget.parameters.action if(existingModuleAction[method]){widgets.push(widget);}});columns[i]=widgets;});layout.columns=columns;return layout;} function generateLayout(layout){dashboardLayout=parseLayout(layout);widgetsHelper.getAvailableWidgets(function(availableWidgets){dashboardLayout=removeNonExistingWidgets(availableWidgets,dashboardLayout);piwikHelper.hideAjaxLoading();adjustDashboardColumns(dashboardLayout.config.layout);var dashboardContainsWidgets=false;for(var column=0;column<dashboardLayout.columns.length;column++){for(var i in dashboardLayout.columns[column]){if(typeof dashboardLayout.columns[column][i]!='object'){continue;} var widget=dashboardLayout.columns[column][i];dashboardContainsWidgets=true;addWidgetTemplate(widget.uniqueId,column+1,widget.parameters,false,widget.isHidden)}} if(!dashboardContainsWidgets){$(dashboardElement).trigger('dashboardempty');} makeWidgetsSortable();});} function adjustDashboardColumns(layout){var columnWidth=layout.split('-');var columnCount=columnWidth.length;var currentCount=$('> .col',dashboardElement).length;if(currentCount<columnCount){$('.menuClear',dashboardElement).remove();for(var i=currentCount;i<columnCount;i++){if(dashboardLayout.columns.length<i){dashboardLayout.columns.push({});} $(dashboardElement).append('<div class="col"> </div>');} $(dashboardElement).append('<div class="menuClear"> </div>');}else if(currentCount>columnCount){for(var i=columnCount;i<currentCount;i++){if(dashboardLayout.columns.length>=i){dashboardLayout.columns.pop();} $('[widgetId]',$(layoutColumnSelector+':last')).each(function(id,elem){var cols=$(layoutColumnSelector).slice(0,columnCount);var smallestColumn=$(cols[0]);var smallestColumnHeight=null;cols.each(function(colId,col){if(smallestColumnHeight==null||smallestColumnHeight>$(col).height()){smallestColumnHeight=$(col).height();smallestColumn=$(col);}});$(elem).appendTo(smallestColumn);});$(layoutColumnSelector+':last').remove();}} var $dashboardElement=$(' > .col',dashboardElement);if(!$dashboardElement.length){return;} switch(layout){case'100':$dashboardElement.removeClass().addClass('col s12');break;case'50-50':$dashboardElement.removeClass().addClass('col s12 m6');break;case'67-33':$dashboardElement[0].className='col s12 m8';$dashboardElement[1].className='col s12 m4';break;case'33-67':$dashboardElement[0].className='col s12 m4';$dashboardElement[1].className='col s12 m8';break;case'33-33-33':$dashboardElement[0].className='col s12 m4';$dashboardElement[1].className='col s12 m4';$dashboardElement[2].className='col s12 m4';break;case'40-30-30':$dashboardElement[0].className='col s12 m6';$dashboardElement[1].className='col s12 m3';$dashboardElement[2].className='col s12 m3';break;case'30-40-30':$dashboardElement[0].className='col s12 m3';$dashboardElement[1].className='col s12 m6';$dashboardElement[2].className='col s12 m3';break;case'30-30-40':$dashboardElement[0].className='col s12 m3';$dashboardElement[1].className='col s12 m3';$dashboardElement[2].className='col s12 m6';break;case'25-25-25-25':$dashboardElement[0].className='col s12 m3';$dashboardElement[1].className='col s12 m3';$dashboardElement[2].className='col s12 m3';$dashboardElement[3].className='col s12 m3';break;} makeWidgetsSortable();if(currentCount>0&&dashboardLayout.config.layout!=layout){dashboardChanged=true;dashboardLayout.config.layout=layout;saveLayout();} $('.widgetContent').each(function(){$(this).trigger('widget:resize');});} function parseLayout(layout){if($.isArray(layout)){layout={config:{layout:'33-33-33'},columns:layout};} if(!layout.config.layout){layout.config.layout='33-33-33';} return layout;} function reloadWidget($widget){if(typeof $widget==='string'){$widget=$('[widgetid="'+$widget+'"]',dashboardElement);} $widget.dashboardWidget('reload',false,true);} function addWidgetTemplate(uniqueId,columnNumber,widgetParameters,addWidgetOnTop,isHidden){if(!columnNumber){columnNumber=1;} if(columnNumber>$('> .col',dashboardElement).length){return;} var $widgetContent=$('<div class="sortable"></div>').attr('widgetId',uniqueId);if(addWidgetOnTop){$('> .col:nth-child('+columnNumber+')',dashboardElement).prepend($widgetContent);}else{$('> .col:nth-child('+columnNumber+')',dashboardElement).append($widgetContent);} return $widgetContent.dashboardWidget({uniqueId:uniqueId,widgetParameters:widgetParameters,onChange:function(){saveLayout();},isHidden:isHidden});} function makeWidgetsSortable(){function onStart(event,ui){if(!jQuery.support.noCloneEvent){$('object',this).hide();}} function onStop(event,ui){$('object',this).show();$('.widgetHover',this).removeClass('widgetHover');$('.widgetTopHover',this).removeClass('widgetTopHover');if($('.widget:has(".piwik-graph")',ui.item).length){reloadWidget($('.widget',ui.item).attr('id'));} saveLayout();} $(layoutColumnSelector+":data('ui-sortable')",dashboardElement).sortable('destroy');$('> .col',dashboardElement).sortable({items:'div.sortable',opacity:0.6,forceHelperSize:true,forcePlaceholderSize:true,placeholder:'hover',handle:'.widgetTop',helper:'clone',start:onStart,stop:onStop,connectWith:layoutColumnSelector});} function rebuildMenu(){if(piwikHelper.isReportingPage()){return window.CoreHome.ReportingMenuStore.reloadMenuItems();} var _self=this;var success=function(dashboards){var dashboardMenuList=$('#Dashboard_embeddedIndex_1').closest('ul');var dashboardMenuListItems=dashboardMenuList.find('>li');dashboardMenuListItems.filter(function(){return $(this).attr('id').indexOf('Dashboard_embeddedIndex')==0;}).remove();if(dashboards.length===0){dashboards=[{iddashboard:1,name:_pk_translate('Dashboard_Dashboard')}];} if(dashboards.length>1||dashboardMenuListItems.length>=1){var items=[];for(var i=0;i<dashboards.length;i++){var $link=$('<a/>').attr('data-iddashboard',dashboards[i].iddashboard).text(dashboards[i].name).addClass('item');var $li=$('<li/>').attr('id','Dashboard_embeddedIndex_'+dashboards[i].iddashboard).addClass('dashboardMenuItem').attr('role','menuitem').append($link);items.push($li);if(dashboards[i].iddashboard==dashboardId){dashboardName=dashboards[i].name;$li.addClass('active');}} dashboardMenuList.prepend(items);} dashboardMenuList.find('a[data-iddashboard]').click(function(e){e.preventDefault();var idDashboard=$(this).attr('data-iddashboard');$('#Dashboard ul li').removeClass('active');methods.loadDashboard.apply(_self,[idDashboard]);$(this).closest('li').addClass('active');});};var ajaxRequest=new ajaxHelper();ajaxRequest.addParams({module:'Dashboard',action:'getAllDashboards',filter_limit:'-1'},'get');ajaxRequest.withTokenInUrl();ajaxRequest.setCallback(success);return ajaxRequest.send();} function saveLayout(action){var columns=[];var columnNumber=0;$(layoutColumnSelector).each(function(){columns[columnNumber]=[];var items=$('[widgetId]',this);for(var j=0;j<items.length;j++){columns[columnNumber][j]=$(items[j]).dashboardWidget('getWidgetObject');delete columns[columnNumber][j].parameters.segment;} columnNumber++;});if(JSON.stringify(dashboardLayout.columns)!=JSON.stringify(columns)||dashboardChanged||action){dashboardLayout.columns=JSON.parse(JSON.stringify(columns));columns=null;if(!action){action='saveLayout';} var ajaxRequest=new ajaxHelper();ajaxRequest.addParams({module:'Dashboard',action:action,idDashboard:dashboardId},'get');ajaxRequest.addParams({layout:JSON.stringify(dashboardLayout),name:dashboardName},'post');ajaxRequest.setCallback(function(){if(dashboardChanged){dashboardChanged=false;rebuildMenu();}});ajaxRequest.withTokenInUrl();ajaxRequest.setFormat('html');ajaxRequest.send();}} $.fn.dashboard=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments);}else{$.error('Method '+method+' does not exist on jQuery.dashboard');}}})(jQuery); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($){$.widget('piwik.dashboardWidget',{isMaximised:false,uniqueId:null,widgetParameters:{},options:{uniqueId:null,isHidden:false,onChange:null,widgetParameters:{},title:null,onRemove:null,onRefresh:null,onMaximise:null,onMinimise:null,autoMaximiseVisualizations:['tableAllColumns','tableGoals']},_create:function(){if(!this.options.uniqueId){piwikHelper.error('widgets can\'t be created without an uniqueId');return;}else{this.uniqueId=this.options.uniqueId;} if(this.options.widgetParameters){this.widgetParameters=this.options.widgetParameters;} this._createDashboardWidget(this.uniqueId);var self=this;this.element.on('setParameters.dashboardWidget',function(e,params){self.setParameters(params);});this.reload(true,true);},destroy:function(){if(this.isMaximised){$('[widgetId="'+this.uniqueId+'"]').dialog('destroy');} $('*',this.element).off('.dashboardWidget');$('.widgetContent',this.element).trigger('widget:destroy');require('piwik/UI').UIControl.cleanupUnusedControls();return this;},getWidgetObject:function(){return{uniqueId:this.uniqueId,parameters:this.widgetParameters,isHidden:this.options.isHidden};},maximise:function(){this.isMaximised=true;if(this.options.onMaximise){this.options.onMaximise(this.element);}else{this._maximiseImpl();} $('.widgetContent',this.element).trigger('widget:maximise');return this;},reload:function(hideLoading,notJQueryUI,overrideParams){if(!notJQueryUI){piwikHelper.log('widget.reload() was called by jquery.ui, ignoring',arguments.callee.caller);return;} var self=this,currentWidget=this.element;$('.widgetContent',currentWidget).trigger('widget:reload');function onWidgetLoadedReplaceElementWithContent(loadedContent){var $widgetContent=$('.widgetContent',currentWidget);$widgetContent.html(loadedContent);if(currentWidget.parents('body').length){piwikHelper.compileVueEntryComponents($widgetContent);} $widgetContent.removeClass('loading');$widgetContent.trigger('widget:create',[self]);window.CoreHome.NotificationsStore.parseNotificationDivs();} ['segment'].forEach(function(paramName){var value=broadcast.getValueFromHash(paramName)||broadcast.getValueFromUrl(paramName);if(value.length){self.widgetParameters[paramName]=value;}});['compareSegments','comparePeriods','compareDates'].forEach(function(paramName){var value=broadcast.getValueFromHash(paramName)||broadcast.getValueFromUrl(paramName);if(value.length){self.widgetParameters[paramName]=value;}else{delete self.widgetParameters[paramName];}});if(!hideLoading){$('.widgetContent',currentWidget).addClass('loading');} var params=$.extend(this.widgetParameters,overrideParams||{});widgetsHelper.loadWidgetAjax(this.uniqueId,params,onWidgetLoadedReplaceElementWithContent,function(deferred,status){if(status=='abort'||!deferred||deferred.status<400||deferred.status>=600){return;} var errorMessage;$('.widgetContent',currentWidget).removeClass('loading');if(deferred.status===429){errorMessage=`<div class="alert alert-danger">${_pk_translate('General_ErrorRateLimit')}>', '</a>'])}</div>`;if($('#loadingRateLimitError').html()){errorMessage=$('#loadingRateLimitError').html();}}else{var errorMessage=_pk_translate('General_ErrorRequest',['','']);if($('#loadingError').html()){errorMessage=$('#loadingError').html();}} $('.widgetContent',currentWidget).html('<div class="widgetLoadingError">'+errorMessage+'</div>');});return this;},setParameters:function(parameters){if(!this.isMaximised&&this.options.autoMaximiseVisualizations.indexOf(parameters.viewDataTable)!==-1){this.maximise();} for(var name in parameters){this.widgetParameters[name]=parameters[name];} if(!this.isMaximised){this.options.onChange();} return this;},getParameters:function(){return $.extend({},this.widgetParameters);},_createDashboardWidget:function(uniqueId){var self=this;widgetsHelper.getWidgetNameFromUniqueId(uniqueId,function(widgetName){if(!widgetName){$('[widgetId="'+uniqueId+'"]').hide();widgetName=_pk_translate('Dashboard_WidgetNotFound');} var title=self.options.title===null?$('<span/>').text(widgetName):self.options.title;var emptyWidgetContent=require('piwik/UI/Dashboard').WidgetFactory.make(uniqueId,title);self.element.html(emptyWidgetContent);var widgetElement=$('[id="'+uniqueId+'"]',self.element);widgetElement.on('mouseenter.dashboardWidget',function(){if(!self.isMaximised){$(this).addClass('widgetHover');$('.widgetTop',this).addClass('widgetTopHover');}}).on('mouseleave.dashboardWidget',function(){if(!self.isMaximised){$(this).removeClass('widgetHover');$('.widgetTop',this).removeClass('widgetTopHover');}});if(self.options.isHidden){$('.widgetContent',widgetElement).toggleClass('hidden').closest('.widget').toggleClass('hiddenContent');} $('.button#close',widgetElement).on('click.dashboardWidget',function(ev){piwikHelper.modalConfirm('#confirm',{yes:function(){if(self.options.onRemove){self.options.onRemove(self.element);}else{self.element.remove();self.options.onChange();}}});});$('.button#maximise',widgetElement).on('click.dashboardWidget',function(ev){if(self.options.onMaximise){self.options.onMaximise(self.element);}else{if($('.widgetContent',$(this).parents('.widget')).hasClass('hidden')){self.showContent();}else{self.maximise();}}});$('.button#minimise',widgetElement).on('click.dashboardWidget',function(ev){if(self.options.onMinimise){self.options.onMinimise(self.element);}else{if(!self.isMaximised){self.hideContent();}else{self.element.dialog("close");}}});$('.button#refresh',widgetElement).on('click.dashboardWidget',function(ev){if(self.options.onRefresh){self.options.onRefresh(self.element);}else{self.reload(false,true);}});});},hideContent:function(){$('.widgetContent',this.element.find('.widget').addClass('hiddenContent')).addClass('hidden');this.options.isHidden=true;this.options.onChange();},showContent:function(){this.isMaximised=false;this.options.isHidden=false;this.element.find('.widget').removeClass('hiddenContent').find('.widgetContent').removeClass('hidden');this.element.find('.widget').find('div.piwik-graph').trigger('resizeGraph');this.options.onChange();$('.widgetContent',this.element).trigger('widget:minimise');},_maximiseImpl:function(){this.detachWidget();var width=Math.floor($('body').width()*0.7);var self=this;this.element.dialog({title:'',dialogClass:'widgetoverlay',modal:true,width:width,resizable:true,autoOpen:true,close:function(event,ui){self.isMaximised=false;$('body').off('.dashboardWidget');$(this).dialog("destroy");$('[id="'+self.uniqueId+'-placeholder"]').replaceWith(this);$(this).removeAttr('style');self.options.onChange();$(this).find('div.piwik-graph').trigger('resizeGraph');$('.widgetContent',self.element).trigger('widget:minimise');}});this.element.find('div.piwik-graph').trigger('resizeGraph');$('.ui-tooltip').remove();var currentWidget=this.element;$('body').on('click.dashboardWidget',function(ev){if(/ui-widget-overlay/.test(ev.target.className)){$(currentWidget).dialog("close");}});},detachWidget:function(){this.element.before('<div id="'+this.uniqueId+'-placeholder" class="widgetPlaceholder widget"> </div>');var placeholder=$('[id="'+self.uniqueId+'-placeholder"]');$('#'+this.uniqueId+'-placeholder').height(this.element.height());$('#'+this.uniqueId+'-placeholder').width(this.element.width()-16);return this.element.detach();}});})(jQuery); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function createDashboard(){$(makeSelectorLastId('createDashboardName')).val('');piwikHelper.modalConfirm(makeSelectorLastId('createDashboardConfirm'),{yes:function(){var dashboardName=$(makeSelectorLastId('createDashboardName')).val();var addDefaultWidgets=($('[id=dashboard_type_empty]:last:checked').length>0)?0:1;var ajaxRequest=new ajaxHelper();ajaxRequest.setLoadingElement();ajaxRequest.withTokenInUrl();ajaxRequest.addParams({module:'API',method:'Dashboard.createNewDashboardForUser',format:'json'},'get');ajaxRequest.addParams({dashboardName:dashboardName,addDefaultWidgets:addDefaultWidgets,login:piwik.userLogin},'post');ajaxRequest.setCallback(function(response){var id=response.value;Promise.all([window.Dashboard.DashboardStore.reloadAllDashboards(),window.CoreHome.ReportingMenuStore.reloadMenuItems(),$('#dashboardWidgetsArea').dashboard('rebuildMenu'),]).then(function(){$('#dashboardWidgetsArea').dashboard('loadDashboard',id);});});ajaxRequest.send();}});} function makeSelectorLastId(domElementId){return'[id='+domElementId+']:last';} function resetDashboard(){piwikHelper.modalConfirm(makeSelectorLastId('resetDashboardConfirm'),{yes:function(){$('#dashboardWidgetsArea').dashboard('resetLayout');}});} function renameDashboard(){$(makeSelectorLastId('newDashboardName')).val($('#dashboardWidgetsArea').dashboard('getDashboardName'));piwikHelper.modalConfirm(makeSelectorLastId('renameDashboardConfirm'),{yes:function(){var newDashboardName=$(makeSelectorLastId('newDashboardName')).val();$('#dashboardWidgetsArea').dashboard('setDashboardName',newDashboardName);}});} function removeDashboard(){$(makeSelectorLastId('removeDashboardConfirm')).find('h2 span').text($('#dashboardWidgetsArea').dashboard('getDashboardName'));piwikHelper.modalConfirm(makeSelectorLastId('removeDashboardConfirm'),{yes:function(){$('#dashboardWidgetsArea').dashboard('removeDashboard');}});} function showChangeDashboardLayoutDialog(){$('#columnPreview').find('>div').removeClass('choosen');$('#columnPreview').find('>div[layout='+$('#dashboardWidgetsArea').dashboard('getColumnLayout')+']').addClass('choosen');var id=makeSelectorLastId('changeDashboardLayout');piwikHelper.modalConfirm(id,{yes:function(){var layout=$(id).find('.choosen').attr('layout');$('#dashboardWidgetsArea').dashboard('setColumnLayout',layout);}},{fixedFooter:true});} function showEmptyDashboardNotification(){piwikHelper.modalConfirm(makeSelectorLastId('dashboardEmptyNotification'),{resetDashboard:function(){$('#dashboardWidgetsArea').dashboard('resetLayout');},addWidget:function(){$('.dashboardSettings > a').trigger('click');}});} function setAsDefaultWidgets(){piwikHelper.modalConfirm(makeSelectorLastId('setAsDefaultWidgetsConfirm'),{yes:function(){$('#dashboardWidgetsArea').dashboard('saveLayoutAsDefaultWidgetLayout');}});} function copyDashboardToUser(){$(makeSelectorLastId('copyDashboardName')).val($('#dashboardWidgetsArea').dashboard('getDashboardName'));var ajaxRequest=new ajaxHelper();ajaxRequest.addParams({module:'API',method:'UsersManager.getUsers',format:'json',filter_limit:'-1'},'get');ajaxRequest.setCallback(function(availableUsers){$(makeSelectorLastId('copyDashboardUser')).empty();$(makeSelectorLastId('copyDashboardUser')).append($('<option></option>').val(piwik.userLogin).text(piwik.userLogin));$.each(availableUsers,function(index,user){if(user.login!='anonymous'&&user.login!=piwik.userLogin){$(makeSelectorLastId('copyDashboardUser')).append($('<option></option>').val(user.login).text(user.login));}});});ajaxRequest.send();piwikHelper.modalConfirm(makeSelectorLastId('copyDashboardToUserConfirm'),{yes:function(){var copyDashboardName=$(makeSelectorLastId('copyDashboardName')).val();var copyDashboardUser=$(makeSelectorLastId('copyDashboardUser')).val();var ajaxRequest=new ajaxHelper();ajaxRequest.addParams({module:'API',method:'Dashboard.copyDashboardToUser',format:'json'},'get');ajaxRequest.addParams({dashboardName:copyDashboardName,idDashboard:$('#dashboardWidgetsArea').dashboard('getDashboardId'),copyToUser:copyDashboardUser},'post');ajaxRequest.setCallback(function(response){$('#alert').find('h2').text(_pk_translate('Dashboard_DashboardCopied'));piwikHelper.modalConfirm('#alert',{});});ajaxRequest.withTokenInUrl();ajaxRequest.send();}});} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ window.SEOWidget={getRank:function(){var ajaxRequest=new ajaxHelper();ajaxRequest.setLoadingElement('#ajaxLoadingSEO');ajaxRequest.addParams({module:'SEO',action:'getRank',url:encodeURIComponent($('#seoUrl').val())},'get');ajaxRequest.setCallback(function(response){$('#SeoRanks').html(response);});ajaxRequest.setFormat('html');ajaxRequest.send();}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($){$(function(){var switchForm=function(fromFormId,toFormId){var fromFormSelector='#'+fromFormId;var toFormSelector='#'+toFormId;var fromLoginInputId=fromFormSelector+'_login',toLoginInputId=toFormSelector+'_login',toPasswordInputId=toFormSelector+'_password';if($(toLoginInputId).val()===''){$(toLoginInputId).val($(fromLoginInputId).val());} var contentFrom=$(fromFormSelector).parents('.contentForm').first();var contentTo=$(toFormSelector).parents('.contentForm').first();$(contentFrom).fadeOut(500,function(){Materialize.updateTextFields();$(contentTo).fadeIn(500,function(){if($(toLoginInputId).val()===''){$(toLoginInputId).focus();}else{$(toPasswordInputId).focus();}});});};$('#login_form_redirect').val(window.location.href);$('#login_form_nav').click(function(e){e.preventDefault();switchForm('login_form','reset_form');return false;});$('#reset_form_nav,#alternate_reset_nav').click(function(e){e.preventDefault();switchForm('reset_form','login_form');return false;});$('#reset_form_submit').click(function(e){e.preventDefault();var ajaxDone=function(response){$('.loadingPiwik').hide();var isSuccess=response.indexOf('form-errors="null"')!==-1,fadeOutIds='.resetForm .message_container';if(isSuccess){fadeOutIds+=',#reset_form,#reset_form_nav';} $(fadeOutIds).fadeOut(300,function(){if(isSuccess){$('#alternate_reset_nav').show();} $('.resetForm .message_container').html(response).fadeIn(300);piwikHelper.compileVueEntryComponents($('.resetForm .message_container'));});};$('.loadingPiwik').show();$.ajax({type:'POST',url:'index.php',dataType:'html',async:true,error:function(){ajaxDone('<div id="login_error"><strong>HTTP Error</strong></div>');},success:ajaxDone,data:$('#reset_form').serialize()});return false;});$('#login_form_login').focus();Materialize.updateTextFields();});}(jQuery)); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($){window.bruteForceLog={unblockAllIps:function(){piwikHelper.modalConfirm('#confirmUnblockAllIps',{yes:function(){var ajaxRequest=new ajaxHelper();ajaxRequest.addParams({module:'API',method:'Login.unblockBruteForceIPs',format:'json'},'get');ajaxRequest.setCallback(function(response){piwikHelper.refreshAfter(0);});ajaxRequest.send();}});}};}(jQuery)); // ┌───────────────────────────────────────────────────────────────────────────────────────────────────────┐ \\ // │ Raphaël 2.2.7 - JavaScript Vector Library │ \\ // ├───────────────────────────────────────────────────────────────────────────────────────────────────────┤ \\ // │ Copyright © 2008-2016 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ // │ Copyright © 2008-2016 Sencha Labs (http://sencha.com) │ \\ // ├───────────────────────────────────────────────────────────────────────────────────────────────────────┤ \\ // │ Licensed under the MIT (https://github.com/DmitryBaranovskiy/raphael/blob/master/license.txt) license.│ \\ // └───────────────────────────────────────────────────────────────────────────────────────────────────────┘ \\ !function t(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.Raphael=r():e.Raphael=r()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){var i,n;i=[r(1),r(3),r(4)],n=function(t){return t}.apply(e,i),!(void 0!==n&&(t.exports=n))},function(t,e,r){var i,n;i=[r(2)],n=function(t){function e(r){if(e.is(r,"function"))return w?r():t.on("raphael.DOMload",r);if(e.is(r,Q))return e._engine.create[z](e,r.splice(0,3+e.is(r[0],$))).add(r);var i=Array.prototype.slice.call(arguments,0);if(e.is(i[i.length-1],"function")){var n=i.pop();return w?n.call(e._engine.create[z](e,i)):t.on("raphael.DOMload",function(){n.call(e._engine.create[z](e,i))})}return e._engine.create[z](e,arguments)}function r(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var i in t)t[A](i)&&(e[i]=r(t[i]));return e}function i(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return t.push(t.splice(r,1)[0])}function n(t,e,r){function n(){var a=Array.prototype.slice.call(arguments,0),s=a.join("␀"),o=n.cache=n.cache||{},l=n.count=n.count||[];return o[A](s)?(i(l,s),r?r(o[s]):o[s]):(l.length>=1e3&&delete o[l.shift()],l.push(s),o[s]=t[z](e,a),r?r(o[s]):o[s])}return n}function a(){return this.hex}function s(t,e){for(var r=[],i=0,n=t.length;n-2*!e>i;i+=2){var a=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?n-4==i?a[3]={x:+t[0],y:+t[1]}:n-2==i&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[n-2],y:+t[n-1]}:n-4==i?a[3]=a[2]:i||(a[0]={x:+t[i],y:+t[i+1]}),r.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return r}function o(t,e,r,i,n){var a=-3*e+9*r-9*i+3*n,s=t*a+6*e-12*r+6*i;return t*s-3*e+3*r}function l(t,e,r,i,n,a,s,l,h){null==h&&(h=1),h=h>1?1:h<0?0:h;for(var u=h/2,c=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,g=0;g<c;g++){var v=u*f[g]+u,x=o(v,t,r,n,s),y=o(v,e,i,a,l),m=x*x+y*y;d+=p[g]*Y.sqrt(m)}return u*d}function h(t,e,r,i,n,a,s,o,h){if(!(h<0||l(t,e,r,i,n,a,s,o)<h)){var u=1,c=u/2,f=u-c,p,d=.01;for(p=l(t,e,r,i,n,a,s,o,f);H(p-h)>d;)c/=2,f+=(p<h?1:-1)*c,p=l(t,e,r,i,n,a,s,o,f);return f}}function u(t,e,r,i,n,a,s,o){if(!(W(t,r)<G(n,s)||G(t,r)>W(n,s)||W(e,i)<G(a,o)||G(e,i)>W(a,o))){var l=(t*i-e*r)*(n-s)-(t-r)*(n*o-a*s),h=(t*i-e*r)*(a-o)-(e-i)*(n*o-a*s),u=(t-r)*(a-o)-(e-i)*(n-s);if(u){var c=l/u,f=h/u,p=+c.toFixed(2),d=+f.toFixed(2);if(!(p<+G(t,r).toFixed(2)||p>+W(t,r).toFixed(2)||p<+G(n,s).toFixed(2)||p>+W(n,s).toFixed(2)||d<+G(e,i).toFixed(2)||d>+W(e,i).toFixed(2)||d<+G(a,o).toFixed(2)||d>+W(a,o).toFixed(2)))return{x:c,y:f}}}}function c(t,e){return p(t,e)}function f(t,e){return p(t,e,1)}function p(t,r,i){var n=e.bezierBBox(t),a=e.bezierBBox(r);if(!e.isBBoxIntersect(n,a))return i?0:[];for(var s=l.apply(0,t),o=l.apply(0,r),h=W(~~(s/5),1),c=W(~~(o/5),1),f=[],p=[],d={},g=i?0:[],v=0;v<h+1;v++){var x=e.findDotsAtSegment.apply(e,t.concat(v/h));f.push({x:x.x,y:x.y,t:v/h})}for(v=0;v<c+1;v++)x=e.findDotsAtSegment.apply(e,r.concat(v/c)),p.push({x:x.x,y:x.y,t:v/c});for(v=0;v<h;v++)for(var y=0;y<c;y++){var m=f[v],b=f[v+1],_=p[y],w=p[y+1],k=H(b.x-m.x)<.001?"y":"x",B=H(w.x-_.x)<.001?"y":"x",C=u(m.x,m.y,b.x,b.y,_.x,_.y,w.x,w.y);if(C){if(d[C.x.toFixed(4)]==C.y.toFixed(4))continue;d[C.x.toFixed(4)]=C.y.toFixed(4);var S=m.t+H((C[k]-m[k])/(b[k]-m[k]))*(b.t-m.t),A=_.t+H((C[B]-_[B])/(w[B]-_[B]))*(w.t-_.t);S>=0&&S<=1.001&&A>=0&&A<=1.001&&(i?g++:g.push({x:C.x,y:C.y,t1:G(S,1),t2:G(A,1)}))}}return g}function d(t,r,i){t=e._path2curve(t),r=e._path2curve(r);for(var n,a,s,o,l,h,u,c,f,d,g=i?0:[],v=0,x=t.length;v<x;v++){var y=t[v];if("M"==y[0])n=l=y[1],a=h=y[2];else{"C"==y[0]?(f=[n,a].concat(y.slice(1)),n=f[6],a=f[7]):(f=[n,a,n,a,l,h,l,h],n=l,a=h);for(var m=0,b=r.length;m<b;m++){var _=r[m];if("M"==_[0])s=u=_[1],o=c=_[2];else{"C"==_[0]?(d=[s,o].concat(_.slice(1)),s=d[6],o=d[7]):(d=[s,o,s,o,u,c,u,c],s=u,o=c);var w=p(f,d,i);if(i)g+=w;else{for(var k=0,B=w.length;k<B;k++)w[k].segment1=v,w[k].segment2=m,w[k].bez1=f,w[k].bez2=d;g=g.concat(w)}}}}}return g}function g(t,e,r,i,n,a){null!=t?(this.a=+t,this.b=+e,this.c=+r,this.d=+i,this.e=+n,this.f=+a):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function v(){return this.x+j+this.y}function x(){return this.x+j+this.y+j+this.width+" × "+this.height}function y(t,e,r,i,n,a){function s(t){return((c*t+u)*t+h)*t}function o(t,e){var r=l(t,e);return((d*r+p)*r+f)*r}function l(t,e){var r,i,n,a,o,l;for(n=t,l=0;l<8;l++){if(a=s(n)-t,H(a)<e)return n;if(o=(3*c*n+2*u)*n+h,H(o)<1e-6)break;n-=a/o}if(r=0,i=1,n=t,n<r)return r;if(n>i)return i;for(;r<i;){if(a=s(n),H(a-t)<e)return n;t>a?r=n:i=n,n=(i-r)/2+r}return n}var h=3*e,u=3*(i-e)-h,c=1-h-u,f=3*r,p=3*(n-r)-f,d=1-f-p;return o(t,1/(200*a))}function m(t,e){var r=[],i={};if(this.ms=e,this.times=1,t){for(var n in t)t[A](n)&&(i[ht(n)]=t[n],r.push(ht(n)));r.sort(Bt)}this.anim=i,this.top=r[r.length-1],this.percents=r}function b(r,i,n,a,s,o){n=ht(n);var l,h,u,c=[],f,p,d,v=r.ms,x={},m={},b={};if(a)for(w=0,B=Ee.length;w<B;w++){var _=Ee[w];if(_.el.id==i.id&&_.anim==r){_.percent!=n?(Ee.splice(w,1),u=1):h=_,i.attr(_.totalOrigin);break}}else a=+m;for(var w=0,B=r.percents.length;w<B;w++){if(r.percents[w]==n||r.percents[w]>a*r.top){n=r.percents[w],p=r.percents[w-1]||0,v=v/r.top*(n-p),f=r.percents[w+1],l=r.anim[n];break}a&&i.attr(r.anim[r.percents[w]])}if(l){if(h)h.initstatus=a,h.start=new Date-h.ms*a;else{for(var C in l)if(l[A](C)&&(pt[A](C)||i.paper.customAttributes[A](C)))switch(x[C]=i.attr(C),null==x[C]&&(x[C]=ft[C]),m[C]=l[C],pt[C]){case $:b[C]=(m[C]-x[C])/v;break;case"colour":x[C]=e.getRGB(x[C]);var S=e.getRGB(m[C]);b[C]={r:(S.r-x[C].r)/v,g:(S.g-x[C].g)/v,b:(S.b-x[C].b)/v};break;case"path":var T=Qt(x[C],m[C]),E=T[1];for(x[C]=T[0],b[C]=[],w=0,B=x[C].length;w<B;w++){b[C][w]=[0];for(var M=1,N=x[C][w].length;M<N;M++)b[C][w][M]=(E[w][M]-x[C][w][M])/v}break;case"transform":var L=i._,z=le(L[C],m[C]);if(z)for(x[C]=z.from,m[C]=z.to,b[C]=[],b[C].real=!0,w=0,B=x[C].length;w<B;w++)for(b[C][w]=[x[C][w][0]],M=1,N=x[C][w].length;M<N;M++)b[C][w][M]=(m[C][w][M]-x[C][w][M])/v;else{var F=i.matrix||new g,R={_:{transform:L.transform},getBBox:function(){return i.getBBox(1)}};x[C]=[F.a,F.b,F.c,F.d,F.e,F.f],se(R,m[C]),m[C]=R._.transform,b[C]=[(R.matrix.a-F.a)/v,(R.matrix.b-F.b)/v,(R.matrix.c-F.c)/v,(R.matrix.d-F.d)/v,(R.matrix.e-F.e)/v,(R.matrix.f-F.f)/v]}break;case"csv":var j=I(l[C])[q](k),D=I(x[C])[q](k);if("clip-rect"==C)for(x[C]=D,b[C]=[],w=D.length;w--;)b[C][w]=(j[w]-x[C][w])/v;m[C]=j;break;default:for(j=[][P](l[C]),D=[][P](x[C]),b[C]=[],w=i.paper.customAttributes[C].length;w--;)b[C][w]=((j[w]||0)-(D[w]||0))/v}var V=l.easing,O=e.easing_formulas[V];if(!O)if(O=I(V).match(st),O&&5==O.length){var Y=O;O=function(t){return y(t,+Y[1],+Y[2],+Y[3],+Y[4],v)}}else O=St;if(d=l.start||r.start||+new Date,_={anim:r,percent:n,timestamp:d,start:d+(r.del||0),status:0,initstatus:a||0,stop:!1,ms:v,easing:O,from:x,diff:b,to:m,el:i,callback:l.callback,prev:p,next:f,repeat:o||r.times,origin:i.attr(),totalOrigin:s},Ee.push(_),a&&!h&&!u&&(_.stop=!0,_.start=new Date-v*a,1==Ee.length))return Ne();u&&(_.start=new Date-_.ms*a),1==Ee.length&&Me(Ne)}t("raphael.anim.start."+i.id,i,r)}}function _(t){for(var e=0;e<Ee.length;e++)Ee[e].el.paper==t&&Ee.splice(e--,1)}e.version="2.2.0",e.eve=t;var w,k=/[, ]+/,B={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},C=/\{(\d+)\}/g,S="prototype",A="hasOwnProperty",T={doc:document,win:window},E={was:Object.prototype[A].call(T.win,"Raphael"),is:T.win.Raphael},M=function(){this.ca=this.customAttributes={}},N,L="appendChild",z="apply",P="concat",F="ontouchstart"in T.win||T.win.DocumentTouch&&T.doc instanceof DocumentTouch,R="",j=" ",I=String,q="split",D="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[q](j),V={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},O=I.prototype.toLowerCase,Y=Math,W=Y.max,G=Y.min,H=Y.abs,X=Y.pow,U=Y.PI,$="number",Z="string",Q="array",J="toString",K="fill",tt=Object.prototype.toString,et={},rt="push",it=e._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,nt=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,at={NaN:1,Infinity:1,"-Infinity":1},st=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,ot=Y.round,lt="setAttribute",ht=parseFloat,ut=parseInt,ct=I.prototype.toUpperCase,ft=e._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,"class":""},pt=e._availableAnimAttrs={blur:$,"clip-rect":"csv",cx:$,cy:$,fill:"colour","fill-opacity":$,"font-size":$,height:$,opacity:$,path:"path",r:$,rx:$,ry:$,stroke:"colour","stroke-opacity":$,"stroke-width":$,transform:"transform",width:$,x:$,y:$},dt=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g,gt=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,vt={hs:1,rg:1},xt=/,?([achlmqrstvxz]),?/gi,yt=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,mt=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,bt=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,_t=e._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,wt={},kt=function(t,e){return t.key-e.key},Bt=function(t,e){return ht(t)-ht(e)},Ct=function(){},St=function(t){return t},At=e._rectPath=function(t,e,r,i,n){return n?[["M",t+n,e],["l",r-2*n,0],["a",n,n,0,0,1,n,n],["l",0,i-2*n],["a",n,n,0,0,1,-n,n],["l",2*n-r,0],["a",n,n,0,0,1,-n,-n],["l",0,2*n-i],["a",n,n,0,0,1,n,-n],["z"]]:[["M",t,e],["l",r,0],["l",0,i],["l",-r,0],["z"]]},Tt=function(t,e,r,i){return null==i&&(i=r),[["M",t,e],["m",0,-i],["a",r,i,0,1,1,0,2*i],["a",r,i,0,1,1,0,-2*i],["z"]]},Et=e._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return Tt(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return Tt(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return At(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return At(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return At(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return At(e.x,e.y,e.width,e.height)}},Mt=e.mapPath=function(t,e){if(!e)return t;var r,i,n,a,s,o,l;for(t=Qt(t),n=0,s=t.length;n<s;n++)for(l=t[n],a=1,o=l.length;a<o;a+=2)r=e.x(l[a],l[a+1]),i=e.y(l[a],l[a+1]),l[a]=r,l[a+1]=i;return t};if(e._g=T,e.type=T.win.SVGAngle||T.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==e.type){var Nt=T.doc.createElement("div"),Lt;if(Nt.innerHTML='<v:shape adj="1"/>',Lt=Nt.firstChild,Lt.style.behavior="url(#default#VML)",!Lt||"object"!=typeof Lt.adj)return e.type=R;Nt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=M,e.fn=N=M.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=O.call(e),"finite"==e?!at[A](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||tt.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,r,i,n,a,s){if(null==a){var o=t-i,l=r-n;return o||l?(180+180*Y.atan2(-l,-o)/U+360)%360:0}return e.angle(t,r,a,s)-e.angle(i,n,a,s)},e.rad=function(t){return t%360*U/180},e.deg=function(t){return Math.round(180*t/U%360*1e3)/1e3},e.snapTo=function(t,r,i){if(i=e.is(i,"finite")?i:10,e.is(t,Q)){for(var n=t.length;n--;)if(H(t[n]-r)<=i)return t[n]}else{t=+t;var a=r%t;if(a<i)return r-a;if(a>t-i)return r-a+t}return r};var zt=e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*Y.random()|0,r="x"==t?e:3&e|8;return r.toString(16)});e.setWindow=function(r){t("raphael.setWindow",e,T.win,r),T.win=r,T.doc=T.win.document,e._engine.initWin&&e._engine.initWin(T.win)};var Pt=function(t){if(e.vml){var r=/^\s+|\s+$/g,i;try{var a=new ActiveXObject("htmlfile");a.write("<body>"),a.close(),i=a.body}catch(s){i=createPopup().document.body}var o=i.createTextRange();Pt=n(function(t){try{i.style.color=I(t).replace(r,R);var e=o.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(n){return"none"}})}else{var l=T.doc.createElement("i");l.title="Raphaël Colour Picker",l.style.display="none",T.doc.body.appendChild(l),Pt=n(function(t){return l.style.color=t,T.doc.defaultView.getComputedStyle(l,R).getPropertyValue("color")})}return Pt(t)},Ft=function(){return"hsb("+[this.h,this.s,this.b]+")"},Rt=function(){return"hsl("+[this.h,this.s,this.l]+")"},jt=function(){return this.hex},It=function(t,r,i){if(null==r&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,r=t.g,t=t.r),null==r&&e.is(t,Z)){var n=e.getRGB(t);t=n.r,r=n.g,i=n.b}return(t>1||r>1||i>1)&&(t/=255,r/=255,i/=255),[t,r,i]},qt=function(t,r,i,n){t*=255,r*=255,i*=255;var a={r:t,g:r,b:i,hex:e.rgb(t,r,i),toString:jt};return e.is(n,"finite")&&(a.opacity=n),a};e.color=function(t){var r;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(r=e.hsb2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(r=e.hsl2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(r=e.rgb2hsl(t),t.h=r.h,t.s=r.s,t.l=r.l,r=e.rgb2hsb(t),t.v=r.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=jt,t},e.hsb2rgb=function(t,e,r,i){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(r=t.b,e=t.s,i=t.o,t=t.h),t*=360;var n,a,s,o,l;return t=t%360/60,l=r*e,o=l*(1-H(t%2-1)),n=a=s=r-l,t=~~t,n+=[l,o,0,0,o,l][t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],qt(n,a,s,i)},e.hsl2rgb=function(t,e,r,i){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(r=t.l,e=t.s,t=t.h),(t>1||e>1||r>1)&&(t/=360,e/=100,r/=100),t*=360;var n,a,s,o,l;return t=t%360/60,l=2*e*(r<.5?r:1-r),o=l*(1-H(t%2-1)),n=a=s=r-l/2,t=~~t,n+=[l,o,0,0,o,l][t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],qt(n,a,s,i)},e.rgb2hsb=function(t,e,r){r=It(t,e,r),t=r[0],e=r[1],r=r[2];var i,n,a,s;return a=W(t,e,r),s=a-G(t,e,r),i=0==s?null:a==t?(e-r)/s:a==e?(r-t)/s+2:(t-e)/s+4,i=(i+360)%6*60/360,n=0==s?0:s/a,{h:i,s:n,b:a,toString:Ft}},e.rgb2hsl=function(t,e,r){r=It(t,e,r),t=r[0],e=r[1],r=r[2];var i,n,a,s,o,l;return s=W(t,e,r),o=G(t,e,r),l=s-o,i=0==l?null:s==t?(e-r)/l:s==e?(r-t)/l+2:(t-e)/l+4,i=(i+360)%6*60/360,a=(s+o)/2,n=0==l?0:a<.5?l/(2*a):l/(2-2*a),{h:i,s:n,l:a,toString:Rt}},e._path2string=function(){return this.join(",").replace(xt,"$1")};var Dt=e._preload=function(t,e){var r=T.doc.createElement("img");r.style.cssText="position:absolute;left:-9999em;top:-9999em",r.onload=function(){e.call(this),this.onload=null,T.doc.body.removeChild(this)},r.onerror=function(){T.doc.body.removeChild(this)},T.doc.body.appendChild(r),r.src=t};e.getRGB=n(function(t){if(!t||(t=I(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:a};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:a};!(vt[A](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=Pt(t));var r,i,n,s,o,l,h,u=t.match(nt);return u?(u[2]&&(s=ut(u[2].substring(5),16),n=ut(u[2].substring(3,5),16),i=ut(u[2].substring(1,3),16)),u[3]&&(s=ut((l=u[3].charAt(3))+l,16),n=ut((l=u[3].charAt(2))+l,16),i=ut((l=u[3].charAt(1))+l,16)),u[4]&&(h=u[4][q](gt),i=ht(h[0]),"%"==h[0].slice(-1)&&(i*=2.55),n=ht(h[1]),"%"==h[1].slice(-1)&&(n*=2.55),s=ht(h[2]),"%"==h[2].slice(-1)&&(s*=2.55),"rgba"==u[1].toLowerCase().slice(0,4)&&(o=ht(h[3])),h[3]&&"%"==h[3].slice(-1)&&(o/=100)),u[5]?(h=u[5][q](gt),i=ht(h[0]),"%"==h[0].slice(-1)&&(i*=2.55),n=ht(h[1]),"%"==h[1].slice(-1)&&(n*=2.55),s=ht(h[2]),"%"==h[2].slice(-1)&&(s*=2.55),("deg"==h[0].slice(-3)||"°"==h[0].slice(-1))&&(i/=360),"hsba"==u[1].toLowerCase().slice(0,4)&&(o=ht(h[3])),h[3]&&"%"==h[3].slice(-1)&&(o/=100),e.hsb2rgb(i,n,s,o)):u[6]?(h=u[6][q](gt),i=ht(h[0]),"%"==h[0].slice(-1)&&(i*=2.55),n=ht(h[1]),"%"==h[1].slice(-1)&&(n*=2.55),s=ht(h[2]),"%"==h[2].slice(-1)&&(s*=2.55),("deg"==h[0].slice(-3)||"°"==h[0].slice(-1))&&(i/=360),"hsla"==u[1].toLowerCase().slice(0,4)&&(o=ht(h[3])),h[3]&&"%"==h[3].slice(-1)&&(o/=100),e.hsl2rgb(i,n,s,o)):(u={r:i,g:n,b:s,toString:a},u.hex="#"+(16777216|s|n<<8|i<<16).toString(16).slice(1),e.is(o,"finite")&&(u.opacity=o),u)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:a}},e),e.hsb=n(function(t,r,i){return e.hsb2rgb(t,r,i).hex}),e.hsl=n(function(t,r,i){return e.hsl2rgb(t,r,i).hex}),e.rgb=n(function(t,e,r){function i(t){return t+.5|0}return"#"+(16777216|i(r)|i(e)<<8|i(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},r=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),r.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var r=Vt(t);if(r.arr)return Yt(r.arr);var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},n=[];return e.is(t,Q)&&e.is(t[0],Q)&&(n=Yt(t)),n.length||I(t).replace(yt,function(t,e,r){var a=[],s=e.toLowerCase();if(r.replace(bt,function(t,e){e&&a.push(+e)}),"m"==s&&a.length>2&&(n.push([e][P](a.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)n.push([e][P](a));else for(;a.length>=i[s]&&(n.push([e][P](a.splice(0,i[s]))),i[s]););}),n.toString=e._path2string,r.arr=Yt(n),n},e.parseTransformString=n(function(t){if(!t)return null;var r={r:3,s:4,t:2,m:6},i=[];return e.is(t,Q)&&e.is(t[0],Q)&&(i=Yt(t)),i.length||I(t).replace(mt,function(t,e,r){var n=[],a=O.call(e);r.replace(bt,function(t,e){e&&n.push(+e)}),i.push([e][P](n))}),i.toString=e._path2string,i});var Vt=function(t){var e=Vt.ps=Vt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var r in e)e[A](r)&&r!=t&&(e[r].sleep--,!e[r].sleep&&delete e[r])}),e[t]};e.findDotsAtSegment=function(t,e,r,i,n,a,s,o,l){var h=1-l,u=X(h,3),c=X(h,2),f=l*l,p=f*l,d=u*t+3*c*l*r+3*h*l*l*n+p*s,g=u*e+3*c*l*i+3*h*l*l*a+p*o,v=t+2*l*(r-t)+f*(n-2*r+t),x=e+2*l*(i-e)+f*(a-2*i+e),y=r+2*l*(n-r)+f*(s-2*n+r),m=i+2*l*(a-i)+f*(o-2*a+i),b=h*t+l*r,_=h*e+l*i,w=h*n+l*s,k=h*a+l*o,B=90-180*Y.atan2(v-y,x-m)/U;return(v>y||x<m)&&(B+=180),{x:d,y:g,m:{x:v,y:x},n:{x:y,y:m},start:{x:b,y:_},end:{x:w,y:k},alpha:B}},e.bezierBBox=function(t,r,i,n,a,s,o,l){e.is(t,"array")||(t=[t,r,i,n,a,s,o,l]);var h=Zt.apply(null,t);return{x:h.min.x,y:h.min.y,x2:h.max.x,y2:h.max.y,width:h.max.x-h.min.x,height:h.max.y-h.min.y}},e.isPointInsideBBox=function(t,e,r){return e>=t.x&&e<=t.x2&&r>=t.y&&r<=t.y2},e.isBBoxIntersect=function(t,r){var i=e.isPointInsideBBox;return i(r,t.x,t.y)||i(r,t.x2,t.y)||i(r,t.x,t.y2)||i(r,t.x2,t.y2)||i(t,r.x,r.y)||i(t,r.x2,r.y)||i(t,r.x,r.y2)||i(t,r.x2,r.y2)||(t.x<r.x2&&t.x>r.x||r.x<t.x2&&r.x>t.x)&&(t.y<r.y2&&t.y>r.y||r.y<t.y2&&r.y>t.y)},e.pathIntersection=function(t,e){return d(t,e)},e.pathIntersectionNumber=function(t,e){return d(t,e,1)},e.isPointInsidePath=function(t,r,i){var n=e.pathBBox(t);return e.isPointInsideBBox(n,r,i)&&d(t,[["M",r,i],["H",n.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Ot=e.pathBBox=function(t){var e=Vt(t);if(e.bbox)return r(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Qt(t);for(var i=0,n=0,a=[],s=[],o,l=0,h=t.length;l<h;l++)if(o=t[l],"M"==o[0])i=o[1],n=o[2],a.push(i),s.push(n);else{var u=Zt(i,n,o[1],o[2],o[3],o[4],o[5],o[6]);a=a[P](u.min.x,u.max.x),s=s[P](u.min.y,u.max.y),i=o[5],n=o[6]}var c=G[z](0,a),f=G[z](0,s),p=W[z](0,a),d=W[z](0,s),g=p-c,v=d-f,x={x:c,y:f,x2:p,y2:d,width:g,height:v,cx:c+g/2,cy:f+v/2};return e.bbox=r(x),x},Yt=function(t){var i=r(t);return i.toString=e._path2string,i},Wt=e._pathToRelative=function(t){var r=Vt(t);if(r.rel)return Yt(r.rel);e.is(t,Q)&&e.is(t&&t[0],Q)||(t=e.parsePathString(t));var i=[],n=0,a=0,s=0,o=0,l=0;"M"==t[0][0]&&(n=t[0][1],a=t[0][2],s=n,o=a,l++,i.push(["M",n,a]));for(var h=l,u=t.length;h<u;h++){var c=i[h]=[],f=t[h];if(f[0]!=O.call(f[0]))switch(c[0]=O.call(f[0]),c[0]){case"a":c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=+(f[6]-n).toFixed(3),c[7]=+(f[7]-a).toFixed(3);break;case"v":c[1]=+(f[1]-a).toFixed(3);break;case"m":s=f[1],o=f[2];default:for(var p=1,d=f.length;p<d;p++)c[p]=+(f[p]-(p%2?n:a)).toFixed(3)}else{c=i[h]=[],"m"==f[0]&&(s=f[1]+n,o=f[2]+a);for(var g=0,v=f.length;g<v;g++)i[h][g]=f[g]}var x=i[h].length;switch(i[h][0]){case"z":n=s,a=o;break;case"h":n+=+i[h][x-1];break;case"v":a+=+i[h][x-1];break;default:n+=+i[h][x-2],a+=+i[h][x-1]}}return i.toString=e._path2string,r.rel=Yt(i),i},Gt=e._pathToAbsolute=function(t){var r=Vt(t);if(r.abs)return Yt(r.abs);if(e.is(t,Q)&&e.is(t&&t[0],Q)||(t=e.parsePathString(t)),!t||!t.length)return[["M",0,0]];var i=[],n=0,a=0,o=0,l=0,h=0;"M"==t[0][0]&&(n=+t[0][1],a=+t[0][2],o=n,l=a,h++,i[0]=["M",n,a]);for(var u=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),c,f,p=h,d=t.length;p<d;p++){if(i.push(c=[]),f=t[p],f[0]!=ct.call(f[0]))switch(c[0]=ct.call(f[0]),c[0]){case"A":c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=+(f[6]+n),c[7]=+(f[7]+a);break;case"V":c[1]=+f[1]+a;break;case"H":c[1]=+f[1]+n;break;case"R":for(var g=[n,a][P](f.slice(1)),v=2,x=g.length;v<x;v++)g[v]=+g[v]+n,g[++v]=+g[v]+a;i.pop(),i=i[P](s(g,u));break;case"M":o=+f[1]+n,l=+f[2]+a;default:for(v=1,x=f.length;v<x;v++)c[v]=+f[v]+(v%2?n:a)}else if("R"==f[0])g=[n,a][P](f.slice(1)),i.pop(),i=i[P](s(g,u)),c=["R"][P](f.slice(-2));else for(var y=0,m=f.length;y<m;y++)c[y]=f[y];switch(c[0]){case"Z":n=o,a=l;break;case"H":n=c[1];break;case"V":a=c[1];break;case"M":o=c[c.length-2],l=c[c.length-1];default:n=c[c.length-2],a=c[c.length-1]}}return i.toString=e._path2string,r.abs=Yt(i),i},Ht=function(t,e,r,i){return[t,e,r,i,r,i]},Xt=function(t,e,r,i,n,a){var s=1/3,o=2/3;return[s*t+o*r,s*e+o*i,s*n+o*r,s*a+o*i,n,a]},Ut=function(t,e,r,i,a,s,o,l,h,u){var c=120*U/180,f=U/180*(+a||0),p=[],d,g=n(function(t,e,r){var i=t*Y.cos(r)-e*Y.sin(r),n=t*Y.sin(r)+e*Y.cos(r);return{x:i,y:n}});if(u)S=u[0],A=u[1],B=u[2],C=u[3];else{d=g(t,e,-f),t=d.x,e=d.y,d=g(l,h,-f),l=d.x,h=d.y;var v=Y.cos(U/180*a),x=Y.sin(U/180*a),y=(t-l)/2,m=(e-h)/2,b=y*y/(r*r)+m*m/(i*i);b>1&&(b=Y.sqrt(b),r=b*r,i=b*i);var _=r*r,w=i*i,k=(s==o?-1:1)*Y.sqrt(H((_*w-_*m*m-w*y*y)/(_*m*m+w*y*y))),B=k*r*m/i+(t+l)/2,C=k*-i*y/r+(e+h)/2,S=Y.asin(((e-C)/i).toFixed(9)),A=Y.asin(((h-C)/i).toFixed(9));S=t<B?U-S:S,A=l<B?U-A:A,S<0&&(S=2*U+S),A<0&&(A=2*U+A),o&&S>A&&(S-=2*U),!o&&A>S&&(A-=2*U)}var T=A-S;if(H(T)>c){var E=A,M=l,N=h;A=S+c*(o&&A>S?1:-1),l=B+r*Y.cos(A),h=C+i*Y.sin(A),p=Ut(l,h,r,i,a,0,o,M,N,[A,E,B,C])}T=A-S;var L=Y.cos(S),z=Y.sin(S),F=Y.cos(A),R=Y.sin(A),j=Y.tan(T/4),I=4/3*r*j,D=4/3*i*j,V=[t,e],O=[t+I*z,e-D*L],W=[l+I*R,h-D*F],G=[l,h];if(O[0]=2*V[0]-O[0],O[1]=2*V[1]-O[1],u)return[O,W,G][P](p);p=[O,W,G][P](p).join()[q](",");for(var X=[],$=0,Z=p.length;$<Z;$++)X[$]=$%2?g(p[$-1],p[$],f).y:g(p[$],p[$+1],f).x;return X},$t=function(t,e,r,i,n,a,s,o,l){var h=1-l;return{x:X(h,3)*t+3*X(h,2)*l*r+3*h*l*l*n+X(l,3)*s,y:X(h,3)*e+3*X(h,2)*l*i+3*h*l*l*a+X(l,3)*o}},Zt=n(function(t,e,r,i,n,a,s,o){var l=n-2*r+t-(s-2*n+r),h=2*(r-t)-2*(n-r),u=t-r,c=(-h+Y.sqrt(h*h-4*l*u))/2/l,f=(-h-Y.sqrt(h*h-4*l*u))/2/l,p=[e,o],d=[t,s],g;return H(c)>"1e12"&&(c=.5),H(f)>"1e12"&&(f=.5),c>0&&c<1&&(g=$t(t,e,r,i,n,a,s,o,c),d.push(g.x),p.push(g.y)),f>0&&f<1&&(g=$t(t,e,r,i,n,a,s,o,f),d.push(g.x),p.push(g.y)),l=a-2*i+e-(o-2*a+i),h=2*(i-e)-2*(a-i),u=e-i,c=(-h+Y.sqrt(h*h-4*l*u))/2/l,f=(-h-Y.sqrt(h*h-4*l*u))/2/l,H(c)>"1e12"&&(c=.5),H(f)>"1e12"&&(f=.5),c>0&&c<1&&(g=$t(t,e,r,i,n,a,s,o,c),d.push(g.x),p.push(g.y)),f>0&&f<1&&(g=$t(t,e,r,i,n,a,s,o,f),d.push(g.x),p.push(g.y)),{min:{x:G[z](0,d),y:G[z](0,p)},max:{x:W[z](0,d),y:W[z](0,p)}}}),Qt=e._path2curve=n(function(t,e){var r=!e&&Vt(t);if(!e&&r.curve)return Yt(r.curve);for(var i=Gt(t),n=e&&Gt(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=(function(t,e,r){var i,n,a={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in a)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][P](Ut[z](0,[e.x,e.y][P](t.slice(1))));break;case"S":"C"==r||"S"==r?(i=2*e.x-e.bx,n=2*e.y-e.by):(i=e.x,n=e.y),t=["C",i,n][P](t.slice(1));break;case"T":"Q"==r||"T"==r?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][P](Xt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][P](Xt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][P](Ht(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][P](Ht(e.x,e.y,t[1],e.y));break;case"V":t=["C"][P](Ht(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][P](Ht(e.x,e.y,e.X,e.Y))}return t}),l=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)u[e]="A",n&&(c[e]="A"),t.splice(e++,0,["C"][P](r.splice(0,6)));t.splice(e,1),g=W(i.length,n&&n.length||0)}},h=function(t,e,r,a,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),r.bx=0,r.by=0,r.x=t[s][1],r.y=t[s][2],g=W(i.length,n&&n.length||0))},u=[],c=[],f="",p="",d=0,g=W(i.length,n&&n.length||0);d<g;d++){i[d]&&(f=i[d][0]),"C"!=f&&(u[d]=f,d&&(p=u[d-1])),i[d]=o(i[d],a,p),"A"!=u[d]&&"C"==f&&(u[d]="C"),l(i,d),n&&(n[d]&&(f=n[d][0]),"C"!=f&&(c[d]=f,d&&(p=c[d-1])),n[d]=o(n[d],s,p),"A"!=c[d]&&"C"==f&&(c[d]="C"),l(n,d)),h(i,n,a,s,d),h(n,i,s,a,d);var v=i[d],x=n&&n[d],y=v.length,m=n&&x.length;a.x=v[y-2],a.y=v[y-1],a.bx=ht(v[y-4])||a.x,a.by=ht(v[y-3])||a.y,s.bx=n&&(ht(x[m-4])||s.x),s.by=n&&(ht(x[m-3])||s.y),s.x=n&&x[m-2],s.y=n&&x[m-1]}return n||(r.curve=Yt(i)),n?[i,n]:i},null,Yt),Jt=e._parseDots=n(function(t){for(var r=[],i=0,n=t.length;i<n;i++){var a={},s=t[i].match(/^([^:]*):?([\d\.]*)/);if(a.color=e.getRGB(s[1]),a.color.error)return null;a.opacity=a.color.opacity,a.color=a.color.hex,s[2]&&(a.offset=s[2]+"%"),r.push(a)}for(i=1,n=r.length-1;i<n;i++)if(!r[i].offset){for(var o=ht(r[i-1].offset||0),l=0,h=i+1;h<n;h++)if(r[h].offset){l=r[h].offset;break}l||(l=100,h=n),l=ht(l);for(var u=(l-o)/(h-i+1);i<h;i++)o+=u,r[i].offset=o+"%"}return r}),Kt=e._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)},te=e._tofront=function(t,e){e.top!==t&&(Kt(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},ee=e._toback=function(t,e){e.bottom!==t&&(Kt(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},re=e._insertafter=function(t,e,r){Kt(t,r),e==r.top&&(r.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},ie=e._insertbefore=function(t,e,r){Kt(t,r),e==r.bottom&&(r.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},ne=e.toMatrix=function(t,e){var r=Ot(t),i={_:{transform:R},getBBox:function(){return r}};return se(i,e),i.matrix},ae=e.transformPath=function(t,e){return Mt(t,ne(t,e))},se=e._extractTransform=function(t,r){if(null==r)return t._.transform;r=I(r).replace(/\.{3}|\u2026/g,t._.transform||R);var i=e.parseTransformString(r),n=0,a=0,s=0,o=1,l=1,h=t._,u=new g;if(h.transform=i||[],i)for(var c=0,f=i.length;c<f;c++){var p=i[c],d=p.length,v=I(p[0]).toLowerCase(),x=p[0]!=v,y=x?u.invert():0,m,b,_,w,k;"t"==v&&3==d?x?(m=y.x(0,0),b=y.y(0,0),_=y.x(p[1],p[2]),w=y.y(p[1],p[2]),u.translate(_-m,w-b)):u.translate(p[1],p[2]):"r"==v?2==d?(k=k||t.getBBox(1),u.rotate(p[1],k.x+k.width/2,k.y+k.height/2),n+=p[1]):4==d&&(x?(_=y.x(p[2],p[3]),w=y.y(p[2],p[3]),u.rotate(p[1],_,w)):u.rotate(p[1],p[2],p[3]),n+=p[1]):"s"==v?2==d||3==d?(k=k||t.getBBox(1),u.scale(p[1],p[d-1],k.x+k.width/2,k.y+k.height/2),o*=p[1],l*=p[d-1]):5==d&&(x?(_=y.x(p[3],p[4]),w=y.y(p[3],p[4]),u.scale(p[1],p[2],_,w)):u.scale(p[1],p[2],p[3],p[4]),o*=p[1],l*=p[2]):"m"==v&&7==d&&u.add(p[1],p[2],p[3],p[4],p[5],p[6]),h.dirtyT=1,t.matrix=u}t.matrix=u,h.sx=o,h.sy=l,h.deg=n,h.dx=a=u.e,h.dy=s=u.f,1==o&&1==l&&!n&&h.bbox?(h.bbox.x+=+a,h.bbox.y+=+s):h.dirtyT=1},oe=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},le=e._equaliseTransform=function(t,r){r=I(r).replace(/\.{3}|\u2026/g,t),t=e.parseTransformString(t)||[],r=e.parseTransformString(r)||[];for(var i=W(t.length,r.length),n=[],a=[],s=0,o,l,h,u;s<i;s++){if(h=t[s]||oe(r[s]),u=r[s]||oe(h),h[0]!=u[0]||"r"==h[0].toLowerCase()&&(h[2]!=u[2]||h[3]!=u[3])||"s"==h[0].toLowerCase()&&(h[3]!=u[3]||h[4]!=u[4]))return;for(n[s]=[],a[s]=[],o=0,l=W(h.length,u.length);o<l;o++)o in h&&(n[s][o]=h[o]),o in u&&(a[s][o]=u[o])}return{from:n,to:a}};e._getContainer=function(t,r,i,n){var a;if(a=null!=n||e.is(t,"object")?t:T.doc.getElementById(t),null!=a)return a.tagName?null==r?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:{container:a,width:r,height:i}:{container:1,x:t,y:r,width:i,height:n}},e.pathToRelative=Wt,e._engine={},e.path2curve=Qt,e.matrix=function(t,e,r,i,n,a){return new g(t,e,r,i,n,a)},function(t){function r(t){return t[0]*t[0]+t[1]*t[1]}function i(t){var e=Y.sqrt(r(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}t.add=function(t,e,r,i,n,a){var s=[[],[],[]],o=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],l=[[t,r,n],[e,i,a],[0,0,1]],h,u,c,f;for(t&&t instanceof g&&(l=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),h=0;h<3;h++)for(u=0;u<3;u++){for(f=0,c=0;c<3;c++)f+=o[h][c]*l[c][u];s[h][u]=f}this.a=s[0][0],this.b=s[1][0],this.c=s[0][1],this.d=s[1][1],this.e=s[0][2],this.f=s[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new g(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new g(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){ this.add(1,0,0,1,t,e)},t.scale=function(t,e,r,i){null==e&&(e=t),(r||i)&&this.add(1,0,0,1,r,i),this.add(t,0,0,e,0,0),(r||i)&&this.add(1,0,0,1,-r,-i)},t.rotate=function(t,r,i){t=e.rad(t),r=r||0,i=i||0;var n=+Y.cos(t).toFixed(9),a=+Y.sin(t).toFixed(9);this.add(n,a,-a,n,r,i),this.add(1,0,0,1,-r,-i)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[I.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return e.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var n=[[this.a,this.c],[this.b,this.d]];t.scalex=Y.sqrt(r(n[0])),i(n[0]),t.shear=n[0][0]*n[1][0]+n[0][1]*n[1][1],n[1]=[n[1][0]-n[0][0]*t.shear,n[1][1]-n[0][1]*t.shear],t.scaley=Y.sqrt(r(n[1])),i(n[1]),t.shear/=t.scaley;var a=-n[0][1],s=n[1][1];return s<0?(t.rotate=e.deg(Y.acos(s)),a<0&&(t.rotate=360-t.rotate)):t.rotate=e.deg(Y.asin(a)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[q]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:R)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:R)+(e.rotate?"r"+[e.rotate,0,0]:R)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(g.prototype);for(var he=function(){this.returnValue=!1},ue=function(){return this.originalEvent.preventDefault()},ce=function(){this.cancelBubble=!0},fe=function(){return this.originalEvent.stopPropagation()},pe=function(t){var e=T.doc.documentElement.scrollTop||T.doc.body.scrollTop,r=T.doc.documentElement.scrollLeft||T.doc.body.scrollLeft;return{x:t.clientX+r,y:t.clientY+e}},de=function(){return T.doc.addEventListener?function(t,e,r,i){var n=function(t){var e=pe(t);return r.call(i,t,e.x,e.y)};if(t.addEventListener(e,n,!1),F&&V[e]){var a=function(e){for(var n=pe(e),a=e,s=0,o=e.targetTouches&&e.targetTouches.length;s<o;s++)if(e.targetTouches[s].target==t){e=e.targetTouches[s],e.originalEvent=a,e.preventDefault=ue,e.stopPropagation=fe;break}return r.call(i,e,n.x,n.y)};t.addEventListener(V[e],a,!1)}return function(){return t.removeEventListener(e,n,!1),F&&V[e]&&t.removeEventListener(V[e],a,!1),!0}}:T.doc.attachEvent?function(t,e,r,i){var n=function(t){t=t||T.win.event;var e=T.doc.documentElement.scrollTop||T.doc.body.scrollTop,n=T.doc.documentElement.scrollLeft||T.doc.body.scrollLeft,a=t.clientX+n,s=t.clientY+e;return t.preventDefault=t.preventDefault||he,t.stopPropagation=t.stopPropagation||ce,r.call(i,t,a,s)};t.attachEvent("on"+e,n);var a=function(){return t.detachEvent("on"+e,n),!0};return a}:void 0}(),ge=[],ve=function(e){for(var r=e.clientX,i=e.clientY,n=T.doc.documentElement.scrollTop||T.doc.body.scrollTop,a=T.doc.documentElement.scrollLeft||T.doc.body.scrollLeft,s,o=ge.length;o--;){if(s=ge[o],F&&e.touches){for(var l=e.touches.length,h;l--;)if(h=e.touches[l],h.identifier==s.el._drag.id){r=h.clientX,i=h.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}else e.preventDefault();var u=s.el.node,c,f=u.nextSibling,p=u.parentNode,d=u.style.display;T.win.opera&&p.removeChild(u),u.style.display="none",c=s.el.paper.getElementByPoint(r,i),u.style.display=d,T.win.opera&&(f?p.insertBefore(u,f):p.appendChild(u)),c&&t("raphael.drag.over."+s.el.id,s.el,c),r+=a,i+=n,t("raphael.drag.move."+s.el.id,s.move_scope||s.el,r-s.el._drag.x,i-s.el._drag.y,r,i,e)}},xe=function(r){e.unmousemove(ve).unmouseup(xe);for(var i=ge.length,n;i--;)n=ge[i],n.el._drag={},t("raphael.drag.end."+n.el.id,n.end_scope||n.start_scope||n.move_scope||n.el,r);ge=[]},ye=e.el={},me=D.length;me--;)!function(t){e[t]=ye[t]=function(r,i){return e.is(r,"function")&&(this.events=this.events||[],this.events.push({name:t,f:r,unbind:de(this.shape||this.node||T.doc,t,r,i||this)})),this},e["un"+t]=ye["un"+t]=function(r){for(var i=this.events||[],n=i.length;n--;)i[n].name!=t||!e.is(r,"undefined")&&i[n].f!=r||(i[n].unbind(),i.splice(n,1),!i.length&&delete this.events);return this}}(D[me]);ye.data=function(r,i){var n=wt[this.id]=wt[this.id]||{};if(0==arguments.length)return n;if(1==arguments.length){if(e.is(r,"object")){for(var a in r)r[A](a)&&this.data(a,r[a]);return this}return t("raphael.data.get."+this.id,this,n[r],r),n[r]}return n[r]=i,t("raphael.data.set."+this.id,this,i,r),this},ye.removeData=function(t){return null==t?wt[this.id]={}:wt[this.id]&&delete wt[this.id][t],this},ye.getData=function(){return r(wt[this.id]||{})},ye.hover=function(t,e,r,i){return this.mouseover(t,r).mouseout(e,i||r)},ye.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var be=[];ye.drag=function(r,i,n,a,s,o){function l(l){(l.originalEvent||l).preventDefault();var h=l.clientX,u=l.clientY,c=T.doc.documentElement.scrollTop||T.doc.body.scrollTop,f=T.doc.documentElement.scrollLeft||T.doc.body.scrollLeft;if(this._drag.id=l.identifier,F&&l.touches)for(var p=l.touches.length,d;p--;)if(d=l.touches[p],this._drag.id=d.identifier,d.identifier==this._drag.id){h=d.clientX,u=d.clientY;break}this._drag.x=h+f,this._drag.y=u+c,!ge.length&&e.mousemove(ve).mouseup(xe),ge.push({el:this,move_scope:a,start_scope:s,end_scope:o}),i&&t.on("raphael.drag.start."+this.id,i),r&&t.on("raphael.drag.move."+this.id,r),n&&t.on("raphael.drag.end."+this.id,n),t("raphael.drag.start."+this.id,s||a||this,l.clientX+f,l.clientY+c,l)}return this._drag={},be.push({el:this,start:l}),this.mousedown(l),this},ye.onDragOver=function(e){e?t.on("raphael.drag.over."+this.id,e):t.unbind("raphael.drag.over."+this.id)},ye.undrag=function(){for(var r=be.length;r--;)be[r].el==this&&(this.unmousedown(be[r].start),be.splice(r,1),t.unbind("raphael.drag.*."+this.id));!be.length&&e.unmousemove(ve).unmouseup(xe),ge=[]},N.circle=function(t,r,i){var n=e._engine.circle(this,t||0,r||0,i||0);return this.__set__&&this.__set__.push(n),n},N.rect=function(t,r,i,n,a){var s=e._engine.rect(this,t||0,r||0,i||0,n||0,a||0);return this.__set__&&this.__set__.push(s),s},N.ellipse=function(t,r,i,n){var a=e._engine.ellipse(this,t||0,r||0,i||0,n||0);return this.__set__&&this.__set__.push(a),a},N.path=function(t){t&&!e.is(t,Z)&&!e.is(t[0],Q)&&(t+=R);var r=e._engine.path(e.format[z](e,arguments),this);return this.__set__&&this.__set__.push(r),r},N.image=function(t,r,i,n,a){var s=e._engine.image(this,t||"about:blank",r||0,i||0,n||0,a||0);return this.__set__&&this.__set__.push(s),s},N.text=function(t,r,i){var n=e._engine.text(this,t||0,r||0,I(i));return this.__set__&&this.__set__.push(n),n},N.set=function(t){!e.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var r=new ze(t);return this.__set__&&this.__set__.push(r),r.paper=this,r.type="set",r},N.setStart=function(t){this.__set__=t||this.set()},N.setFinish=function(t){var e=this.__set__;return delete this.__set__,e},N.getSize=function(){var t=this.canvas.parentNode;return{width:t.offsetWidth,height:t.offsetHeight}},N.setSize=function(t,r){return e._engine.setSize.call(this,t,r)},N.setViewBox=function(t,r,i,n,a){return e._engine.setViewBox.call(this,t,r,i,n,a)},N.top=N.bottom=null,N.raphael=e;var _e=function(t){var e=t.getBoundingClientRect(),r=t.ownerDocument,i=r.body,n=r.documentElement,a=n.clientTop||i.clientTop||0,s=n.clientLeft||i.clientLeft||0,o=e.top+(T.win.pageYOffset||n.scrollTop||i.scrollTop)-a,l=e.left+(T.win.pageXOffset||n.scrollLeft||i.scrollLeft)-s;return{y:o,x:l}};N.getElementByPoint=function(t,e){var r=this,i=r.canvas,n=T.doc.elementFromPoint(t,e);if(T.win.opera&&"svg"==n.tagName){var a=_e(i),s=i.createSVGRect();s.x=t-a.x,s.y=e-a.y,s.width=s.height=1;var o=i.getIntersectionList(s,null);o.length&&(n=o[o.length-1])}if(!n)return null;for(;n.parentNode&&n!=i.parentNode&&!n.raphael;)n=n.parentNode;return n==r.canvas.parentNode&&(n=i),n=n&&n.raphael?r.getById(n.raphaelid):null},N.getElementsByBBox=function(t){var r=this.set();return this.forEach(function(i){e.isBBoxIntersect(i.getBBox(),t)&&r.push(i)}),r},N.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},N.forEach=function(t,e){for(var r=this.bottom;r;){if(t.call(e,r)===!1)return this;r=r.next}return this},N.getElementsByPoint=function(t,e){var r=this.set();return this.forEach(function(i){i.isPointInside(t,e)&&r.push(i)}),r},ye.isPointInside=function(t,r){var i=this.realPath=Et[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(i=e.transformPath(i,this.attr("transform"))),e.isPointInsidePath(i,t,r)},ye.getBBox=function(t){if(this.removed)return{};var e=this._;return t?(!e.dirty&&e.bboxwt||(this.realPath=Et[this.type](this),e.bboxwt=Ot(this.realPath),e.bboxwt.toString=x,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&(!e.dirty&&this.realPath||(e.bboxwt=0,this.realPath=Et[this.type](this)),e.bbox=Ot(Mt(this.realPath,this.matrix)),e.bbox.toString=x,e.dirty=e.dirtyT=0),e.bbox)},ye.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},ye.glow=function(t){if("text"==this.type)return null;t=t||{};var e={width:(t.width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:null==t.opacity?.5:t.opacity,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},r=e.width/2,i=this.paper,n=i.set(),a=this.realPath||Et[this.type](this);a=this.matrix?Mt(a,this.matrix):a;for(var s=1;s<r+1;s++)n.push(i.path(a).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/r*s).toFixed(3),opacity:+(e.opacity/r).toFixed(3)}));return n.insertBefore(this).translate(e.offsetx,e.offsety)};var we={},ke=function(t,r,i,n,a,s,o,u,c){return null==c?l(t,r,i,n,a,s,o,u):e.findDotsAtSegment(t,r,i,n,a,s,o,u,h(t,r,i,n,a,s,o,u,c))},Be=function(t,r){return function(i,n,a){i=Qt(i);for(var s,o,l,h,u="",c={},f,p=0,d=0,g=i.length;d<g;d++){if(l=i[d],"M"==l[0])s=+l[1],o=+l[2];else{if(h=ke(s,o,l[1],l[2],l[3],l[4],l[5],l[6]),p+h>n){if(r&&!c.start){if(f=ke(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p),u+=["C"+f.start.x,f.start.y,f.m.x,f.m.y,f.x,f.y],a)return u;c.start=u,u=["M"+f.x,f.y+"C"+f.n.x,f.n.y,f.end.x,f.end.y,l[5],l[6]].join(),p+=h,s=+l[5],o=+l[6];continue}if(!t&&!r)return f=ke(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p),{x:f.x,y:f.y,alpha:f.alpha}}p+=h,s=+l[5],o=+l[6]}u+=l.shift()+l}return c.end=u,f=t?p:r?c:e.findDotsAtSegment(s,o,l[0],l[1],l[2],l[3],l[4],l[5],1),f.alpha&&(f={x:f.x,y:f.y,alpha:f.alpha}),f}},Ce=Be(1),Se=Be(),Ae=Be(0,1);e.getTotalLength=Ce,e.getPointAtLength=Se,e.getSubpath=function(t,e,r){if(this.getTotalLength(t)-r<1e-6)return Ae(t,e).end;var i=Ae(t,r,1);return e?Ae(i,e).end:i},ye.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():Ce(t)},ye.getPointAtLength=function(t){var e=this.getPath();if(e)return Se(e,t)},ye.getPath=function(){var t,r=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return r&&(t=r(this)),t},ye.getSubpath=function(t,r){var i=this.getPath();if(i)return e.getSubpath(i,t,r)};var Te=e.easing_formulas={linear:function(t){return t},"<":function(t){return X(t,1.7)},">":function(t){return X(t,.48)},"<>":function(t){var e=.48-t/1.04,r=Y.sqrt(.1734+e*e),i=r-e,n=X(H(i),1/3)*(i<0?-1:1),a=-r-e,s=X(H(a),1/3)*(a<0?-1:1),o=n+s+.5;return 3*(1-o)*o*o+o*o*o},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:X(2,-10*t)*Y.sin((t-.075)*(2*U)/.3)+1},bounce:function(t){var e=7.5625,r=2.75,i;return t<1/r?i=e*t*t:t<2/r?(t-=1.5/r,i=e*t*t+.75):t<2.5/r?(t-=2.25/r,i=e*t*t+.9375):(t-=2.625/r,i=e*t*t+.984375),i}};Te.easeIn=Te["ease-in"]=Te["<"],Te.easeOut=Te["ease-out"]=Te[">"],Te.easeInOut=Te["ease-in-out"]=Te["<>"],Te["back-in"]=Te.backIn,Te["back-out"]=Te.backOut;var Ee=[],Me=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},Ne=function(){for(var r=+new Date,i=0;i<Ee.length;i++){var n=Ee[i];if(!n.el.removed&&!n.paused){var a=r-n.start,s=n.ms,o=n.easing,l=n.from,h=n.diff,u=n.to,c=n.t,f=n.el,p={},d,g={},v;if(n.initstatus?(a=(n.initstatus*n.anim.top-n.prev)/(n.percent-n.prev)*s,n.status=n.initstatus,delete n.initstatus,n.stop&&Ee.splice(i--,1)):n.status=(n.prev+(n.percent-n.prev)*(a/s))/n.anim.top,!(a<0))if(a<s){var x=o(a/s);for(var y in l)if(l[A](y)){switch(pt[y]){case $:d=+l[y]+x*s*h[y];break;case"colour":d="rgb("+[Le(ot(l[y].r+x*s*h[y].r)),Le(ot(l[y].g+x*s*h[y].g)),Le(ot(l[y].b+x*s*h[y].b))].join(",")+")";break;case"path":d=[];for(var m=0,_=l[y].length;m<_;m++){d[m]=[l[y][m][0]];for(var w=1,k=l[y][m].length;w<k;w++)d[m][w]=+l[y][m][w]+x*s*h[y][m][w];d[m]=d[m].join(j)}d=d.join(j);break;case"transform":if(h[y].real)for(d=[],m=0,_=l[y].length;m<_;m++)for(d[m]=[l[y][m][0]],w=1,k=l[y][m].length;w<k;w++)d[m][w]=l[y][m][w]+x*s*h[y][m][w];else{var B=function(t){return+l[y][t]+x*s*h[y][t]};d=[["m",B(0),B(1),B(2),B(3),B(4),B(5)]]}break;case"csv":if("clip-rect"==y)for(d=[],m=4;m--;)d[m]=+l[y][m]+x*s*h[y][m];break;default:var C=[][P](l[y]);for(d=[],m=f.paper.customAttributes[y].length;m--;)d[m]=+C[m]+x*s*h[y][m]}p[y]=d}f.attr(p),function(e,r,i){setTimeout(function(){t("raphael.anim.frame."+e,r,i)})}(f.id,f,n.anim)}else{if(function(r,i,n){setTimeout(function(){t("raphael.anim.frame."+i.id,i,n),t("raphael.anim.finish."+i.id,i,n),e.is(r,"function")&&r.call(i)})}(n.callback,f,n.anim),f.attr(u),Ee.splice(i--,1),n.repeat>1&&!n.next){for(v in u)u[A](v)&&(g[v]=n.totalOrigin[v]);n.el.attr(g),b(n.anim,n.el,n.anim.percents[0],null,n.totalOrigin,n.repeat-1)}n.next&&!n.stop&&b(n.anim,n.el,n.next,null,n.totalOrigin,n.repeat)}}}Ee.length&&Me(Ne)},Le=function(t){return t>255?255:t<0?0:t};ye.animateWith=function(t,r,i,n,a,s){var o=this;if(o.removed)return s&&s.call(o),o;var l=i instanceof m?i:e.animation(i,n,a,s),h,u;b(l,o,l.percents[0],null,o.attr());for(var c=0,f=Ee.length;c<f;c++)if(Ee[c].anim==r&&Ee[c].el==t){Ee[f-1].start=Ee[c].start;break}return o},ye.onAnimation=function(e){return e?t.on("raphael.anim.frame."+this.id,e):t.unbind("raphael.anim.frame."+this.id),this},m.prototype.delay=function(t){var e=new m(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},m.prototype.repeat=function(t){var e=new m(this.anim,this.ms);return e.del=this.del,e.times=Y.floor(W(t,0))||1,e},e.animation=function(t,r,i,n){if(t instanceof m)return t;!e.is(i,"function")&&i||(n=n||i||null,i=null),t=Object(t),r=+r||0;var a={},s,o;for(o in t)t[A](o)&&ht(o)!=o&&ht(o)+"%"!=o&&(s=!0,a[o]=t[o]);if(s)return i&&(a.easing=i),n&&(a.callback=n),new m({100:a},r);if(n){var l=0;for(var h in t){var u=ut(h);t[A](h)&&u>l&&(l=u)}l+="%",!t[l].callback&&(t[l].callback=n)}return new m(t,r)},ye.animate=function(t,r,i,n){var a=this;if(a.removed)return n&&n.call(a),a;var s=t instanceof m?t:e.animation(t,r,i,n);return b(s,a,s.percents[0],null,a.attr()),a},ye.setTime=function(t,e){return t&&null!=e&&this.status(t,G(e,t.ms)/t.ms),this},ye.status=function(t,e){var r=[],i=0,n,a;if(null!=e)return b(t,this,-1,G(e,1)),this;for(n=Ee.length;i<n;i++)if(a=Ee[i],a.el.id==this.id&&(!t||a.anim==t)){if(t)return a.status;r.push({anim:a.anim,status:a.status})}return t?0:r},ye.pause=function(e){for(var r=0;r<Ee.length;r++)Ee[r].el.id!=this.id||e&&Ee[r].anim!=e||t("raphael.anim.pause."+this.id,this,Ee[r].anim)!==!1&&(Ee[r].paused=!0);return this},ye.resume=function(e){for(var r=0;r<Ee.length;r++)if(Ee[r].el.id==this.id&&(!e||Ee[r].anim==e)){var i=Ee[r];t("raphael.anim.resume."+this.id,this,i.anim)!==!1&&(delete i.paused,this.status(i.anim,i.status))}return this},ye.stop=function(e){for(var r=0;r<Ee.length;r++)Ee[r].el.id!=this.id||e&&Ee[r].anim!=e||t("raphael.anim.stop."+this.id,this,Ee[r].anim)!==!1&&Ee.splice(r--,1);return this},t.on("raphael.remove",_),t.on("raphael.clear",_),ye.toString=function(){return"Raphaël’s object"};var ze=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,r=t.length;e<r;e++)!t[e]||t[e].constructor!=ye.constructor&&t[e].constructor!=ze||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},Pe=ze.prototype;Pe.push=function(){for(var t,e,r=0,i=arguments.length;r<i;r++)t=arguments[r],!t||t.constructor!=ye.constructor&&t.constructor!=ze||(e=this.items.length,this[e]=this.items[e]=t,this.length++);return this},Pe.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Pe.forEach=function(t,e){for(var r=0,i=this.items.length;r<i;r++)if(t.call(e,this.items[r],r)===!1)return this;return this};for(var Fe in ye)ye[A](Fe)&&(Pe[Fe]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t][z](r,e)})}}(Fe));return Pe.attr=function(t,r){if(t&&e.is(t,Q)&&e.is(t[0],"object"))for(var i=0,n=t.length;i<n;i++)this.items[i].attr(t[i]);else for(var a=0,s=this.items.length;a<s;a++)this.items[a].attr(t,r);return this},Pe.clear=function(){for(;this.length;)this.pop()},Pe.splice=function(t,e,r){t=t<0?W(this.length+t,0):t,e=W(0,G(this.length-t,e));var i=[],n=[],a=[],s;for(s=2;s<arguments.length;s++)a.push(arguments[s]);for(s=0;s<e;s++)n.push(this[t+s]);for(;s<this.length-t;s++)i.push(this[t+s]);var o=a.length;for(s=0;s<o+i.length;s++)this.items[t+s]=this[t+s]=s<o?a[s]:i[s-o];for(s=this.items.length=this.length-=e-o;this[s];)delete this[s++];return new ze(n)},Pe.exclude=function(t){for(var e=0,r=this.length;e<r;e++)if(this[e]==t)return this.splice(e,1),!0},Pe.animate=function(t,r,i,n){(e.is(i,"function")||!i)&&(n=i||null);var a=this.items.length,s=a,o,l=this,h;if(!a)return this;n&&(h=function(){!--a&&n.call(l)}),i=e.is(i,Z)?i:h;var u=e.animation(t,r,i,h);for(o=this.items[--s].animate(u);s--;)this.items[s]&&!this.items[s].removed&&this.items[s].animateWith(o,u,u),this.items[s]&&!this.items[s].removed||a--;return this},Pe.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},Pe.getBBox=function(){for(var t=[],e=[],r=[],i=[],n=this.items.length;n--;)if(!this.items[n].removed){var a=this.items[n].getBBox();t.push(a.x),e.push(a.y),r.push(a.x+a.width),i.push(a.y+a.height)}return t=G[z](0,t),e=G[z](0,e),r=W[z](0,r),i=W[z](0,i),{x:t,y:e,x2:r,y2:i,width:r-t,height:i-e}},Pe.clone=function(t){t=this.paper.set();for(var e=0,r=this.items.length;e<r;e++)t.push(this.items[e].clone());return t},Pe.toString=function(){return"Raphaël‘s set"},Pe.glow=function(t){var e=this.paper.set();return this.forEach(function(r,i){var n=r.glow(t);null!=n&&n.forEach(function(t,r){e.push(t)})}),e},Pe.isPointInside=function(t,e){var r=!1;return this.forEach(function(i){if(i.isPointInside(t,e))return r=!0,!1}),r},e.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},r=t.face["font-family"];for(var i in t.face)t.face[A](i)&&(e.face[i]=t.face[i]);if(this.fonts[r]?this.fonts[r].push(e):this.fonts[r]=[e],!t.svg){e.face["units-per-em"]=ut(t.face["units-per-em"],10);for(var n in t.glyphs)if(t.glyphs[A](n)){var a=t.glyphs[n];if(e.glyphs[n]={w:a.w,k:{},d:a.d&&"M"+a.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},a.k)for(var s in a.k)a[A](s)&&(e.glyphs[n].k[s]=a.k[s])}}return t},N.getFont=function(t,r,i,n){if(n=n||"normal",i=i||"normal",r=+r||{normal:400,bold:700,lighter:300,bolder:800}[r]||400,e.fonts){var a=e.fonts[t];if(!a){var s=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,R)+"(\\s|$)","i");for(var o in e.fonts)if(e.fonts[A](o)&&s.test(o)){a=e.fonts[o];break}}var l;if(a)for(var h=0,u=a.length;h<u&&(l=a[h],l.face["font-weight"]!=r||l.face["font-style"]!=i&&l.face["font-style"]||l.face["font-stretch"]!=n);h++);return l}},N.print=function(t,r,i,n,a,s,o,l){s=s||"middle",o=W(G(o||0,1),-1),l=W(G(l||1,3),1);var h=I(i)[q](R),u=0,c=0,f=R,p;if(e.is(n,"string")&&(n=this.getFont(n)),n){p=(a||16)/n.face["units-per-em"];for(var d=n.face.bbox[q](k),g=+d[0],v=d[3]-d[1],x=0,y=+d[1]+("baseline"==s?v+ +n.face.descent:v/2),m=0,b=h.length;m<b;m++){if("\n"==h[m])u=0,w=0,c=0,x+=v*l;else{var _=c&&n.glyphs[h[m-1]]||{},w=n.glyphs[h[m]];u+=c?(_.w||n.w)+(_.k&&_.k[h[m]]||0)+n.w*o:0,c=1}w&&w.d&&(f+=e.transformPath(w.d,["t",u*p,x*p,"s",p,p,g,y,"t",(t-g)/p,(r-y)/p]))}}return this.path(f).attr({fill:"#000",stroke:"none"})},N.add=function(t){if(e.is(t,"array"))for(var r=this.set(),i=0,n=t.length,a;i<n;i++)a=t[i]||{},B[A](a.type)&&r.push(this[a.type]().attr(a));return r},e.format=function(t,r){var i=e.is(r,Q)?[0][P](r):arguments;return t&&e.is(t,Z)&&i.length-1&&(t=t.replace(C,function(t,e){return null==i[++e]?R:i[e]})),t||R},e.fullfill=function(){var t=/\{([^\}]+)\}/g,e=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,r=function(t,r,i){var n=i;return r.replace(e,function(t,e,r,i,a){e=e||i,n&&(e in n&&(n=n[e]),"function"==typeof n&&a&&(n=n()))}),n=(null==n||n==i?t:n)+""};return function(e,i){return String(e).replace(t,function(t,e){return r(t,e,i)})}}(),e.ninja=function(){if(E.was)T.win.Raphael=E.is;else{window.Raphael=void 0;try{delete window.Raphael}catch(t){}}return e},e.st=Pe,t.on("raphael.DOMload",function(){w=!0}),function(t,r,i){function n(){/in/.test(t.readyState)?setTimeout(n,9):e.eve("raphael.DOMload")}null==t.readyState&&t.addEventListener&&(t.addEventListener(r,i=function(){t.removeEventListener(r,i,!1),t.readyState="complete"},!1),t.readyState="loading"),n()}(document,"DOMContentLoaded"),e}.apply(e,i),!(void 0!==n&&(t.exports=n))},function(t,e,r){var i,n;!function(r){var a="0.5.0",s="hasOwnProperty",o=/[\.\/]/,l=/\s*,\s*/,h="*",u=function(){},c=function(t,e){return t-e},f,p,d={n:{}},g=function(){for(var t=0,e=this.length;t<e;t++)if("undefined"!=typeof this[t])return this[t]},v=function(){for(var t=this.length;--t;)if("undefined"!=typeof this[t])return this[t]},x=Object.prototype.toString,y=String,m=Array.isArray||function(t){return t instanceof Array||"[object Array]"==x.call(t)};eve=function(t,e){var r=d,i=p,n=Array.prototype.slice.call(arguments,2),a=eve.listeners(t),s=0,o=!1,l,h=[],u={},x=[],y=f,m=[];x.firstDefined=g,x.lastDefined=v,f=t,p=0;for(var b=0,_=a.length;b<_;b++)"zIndex"in a[b]&&(h.push(a[b].zIndex),a[b].zIndex<0&&(u[a[b].zIndex]=a[b]));for(h.sort(c);h[s]<0;)if(l=u[h[s++]],x.push(l.apply(e,n)),p)return p=i,x;for(b=0;b<_;b++)if(l=a[b],"zIndex"in l)if(l.zIndex==h[s]){if(x.push(l.apply(e,n)),p)break;do if(s++,l=u[h[s]],l&&x.push(l.apply(e,n)),p)break;while(l)}else u[l.zIndex]=l;else if(x.push(l.apply(e,n)),p)break;return p=i,f=y,x},eve._events=d,eve.listeners=function(t){var e=m(t)?t:t.split(o),r=d,i,n,a,s,l,u,c,f,p=[r],g=[];for(s=0,l=e.length;s<l;s++){for(f=[],u=0,c=p.length;u<c;u++)for(r=p[u].n,n=[r[e[s]],r[h]],a=2;a--;)i=n[a],i&&(f.push(i),g=g.concat(i.f||[]));p=f}return g},eve.separator=function(t){t?(t=y(t).replace(/(?=[\.\^\]\[\-])/g,"\\"),t="["+t+"]",o=new RegExp(t)):o=/[\.\/]/},eve.on=function(t,e){if("function"!=typeof e)return function(){};for(var r=m(t)?m(t[0])?t:[t]:y(t).split(l),i=0,n=r.length;i<n;i++)!function(t){for(var r=m(t)?t:y(t).split(o),i=d,n,a=0,s=r.length;a<s;a++)i=i.n,i=i.hasOwnProperty(r[a])&&i[r[a]]||(i[r[a]]={n:{}});for(i.f=i.f||[],a=0,s=i.f.length;a<s;a++)if(i.f[a]==e){n=!0;break}!n&&i.f.push(e)}(r[i]);return function(t){+t==+t&&(e.zIndex=+t)}},eve.f=function(t){var e=[].slice.call(arguments,1);return function(){eve.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},eve.stop=function(){p=1},eve.nt=function(t){var e=m(f)?f.join("."):f;return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(e):e},eve.nts=function(){return m(f)?f:f.split(o)},eve.off=eve.unbind=function(t,e){if(!t)return void(eve._events=d={n:{}});var r=m(t)?m(t[0])?t:[t]:y(t).split(l);if(r.length>1)for(var i=0,n=r.length;i<n;i++)eve.off(r[i],e);else{r=m(t)?t:y(t).split(o);var a,u,c,i,n,f,p,g=[d];for(i=0,n=r.length;i<n;i++)for(f=0;f<g.length;f+=c.length-2){if(c=[f,1],a=g[f].n,r[i]!=h)a[r[i]]&&c.push(a[r[i]]);else for(u in a)a[s](u)&&c.push(a[u]);g.splice.apply(g,c)}for(i=0,n=g.length;i<n;i++)for(a=g[i];a.n;){if(e){if(a.f){for(f=0,p=a.f.length;f<p;f++)if(a.f[f]==e){a.f.splice(f,1);break}!a.f.length&&delete a.f}for(u in a.n)if(a.n[s](u)&&a.n[u].f){var v=a.n[u].f;for(f=0,p=v.length;f<p;f++)if(v[f]==e){v.splice(f,1);break}!v.length&&delete a.n[u].f}}else{delete a.f;for(u in a.n)a.n[s](u)&&a.n[u].f&&delete a.n[u].f}a=a.n}}},eve.once=function(t,e){var r=function(){return eve.off(t,r),e.apply(this,arguments)};return eve.on(t,r)},eve.version=a,eve.toString=function(){return"You are running Eve "+a},"undefined"!=typeof t&&t.exports?t.exports=eve:(i=[],n=function(){return eve}.apply(e,i),!(void 0!==n&&(t.exports=n)))}(this)},function(t,e,r){var i,n;i=[r(1)],n=function(t){if(!t||t.svg){var e="hasOwnProperty",r=String,i=parseFloat,n=parseInt,a=Math,s=a.max,o=a.abs,l=a.pow,h=/[, ]+/,u=t.eve,c="",f=" ",p="http://www.w3.org/1999/xlink",d={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},g={};t.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var v=function(i,n){if(n){"string"==typeof i&&(i=v(i));for(var a in n)n[e](a)&&("xlink:"==a.substring(0,6)?i.setAttributeNS(p,a.substring(6),r(n[a])):i.setAttribute(a,r(n[a])))}else i=t._g.doc.createElementNS("http://www.w3.org/2000/svg",i),i.style&&(i.style.webkitTapHighlightColor="rgba(0,0,0,0)");return i},x=function(e,n){var h="linear",u=e.id+n,f=.5,p=.5,d=e.node,g=e.paper,x=d.style,y=t._g.doc.getElementById(u);if(!y){if(n=r(n).replace(t._radial_gradient,function(t,e,r){if(h="radial",e&&r){f=i(e),p=i(r);var n=2*(p>.5)-1;l(f-.5,2)+l(p-.5,2)>.25&&(p=a.sqrt(.25-l(f-.5,2))*n+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*n)}return c}),n=n.split(/\s*\-\s*/),"linear"==h){var b=n.shift();if(b=-i(b),isNaN(b))return null;var _=[0,0,a.cos(t.rad(b)),a.sin(t.rad(b))],w=1/(s(o(_[2]),o(_[3]))||1);_[2]*=w,_[3]*=w,_[2]<0&&(_[0]=-_[2],_[2]=0),_[3]<0&&(_[1]=-_[3],_[3]=0)}var k=t._parseDots(n);if(!k)return null;if(u=u.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&u!=e.gradient.id&&(g.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){y=v(h+"Gradient",{id:u}),e.gradient=y,v(y,"radial"==h?{fx:f,fy:p}:{x1:_[0],y1:_[1],x2:_[2],y2:_[3],gradientTransform:e.matrix.invert()}),g.defs.appendChild(y);for(var B=0,C=k.length;B<C;B++)y.appendChild(v("stop",{offset:k[B].offset?k[B].offset:B?"100%":"0%","stop-color":k[B].color||"#fff","stop-opacity":isFinite(k[B].opacity)?k[B].opacity:1}))}}return v(d,{fill:m(u),opacity:1,"fill-opacity":1}),x.fill=c,x.opacity=1,x.fillOpacity=1,1},y=function(){var t=document.documentMode;return t&&(9===t||10===t)},m=function(t){if(y())return"url('#"+t+"')";var e=document.location,r=e.protocol+"//"+e.host+e.pathname+e.search;return"url('"+r+"#"+t+"')"},b=function(t){var e=t.getBBox(1);v(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},_=function(i,n,a){if("path"==i.type){for(var s=r(n).toLowerCase().split("-"),o=i.paper,l=a?"end":"start",h=i.node,u=i.attrs,f=u["stroke-width"],p=s.length,x="classic",y,m,b,_,w,k=3,B=3,C=5;p--;)switch(s[p]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":x=s[p];break;case"wide":B=5;break;case"narrow":B=2;break;case"long":k=5;break;case"short":k=2}if("open"==x?(k+=2,B+=2,C+=2,b=1,_=a?4:1,w={fill:"none",stroke:u.stroke}):(_=b=k/2,w={fill:u.stroke,stroke:"none"}),i._.arrows?a?(i._.arrows.endPath&&g[i._.arrows.endPath]--,i._.arrows.endMarker&&g[i._.arrows.endMarker]--):(i._.arrows.startPath&&g[i._.arrows.startPath]--,i._.arrows.startMarker&&g[i._.arrows.startMarker]--):i._.arrows={},"none"!=x){var S="raphael-marker-"+x,A="raphael-marker-"+l+x+k+B+"-obj"+i.id;t._g.doc.getElementById(S)?g[S]++:(o.defs.appendChild(v(v("path"),{"stroke-linecap":"round",d:d[x],id:S})),g[S]=1);var T=t._g.doc.getElementById(A),E;T?(g[A]++,E=T.getElementsByTagName("use")[0]):(T=v(v("marker"),{id:A,markerHeight:B,markerWidth:k,orient:"auto",refX:_,refY:B/2}),E=v(v("use"),{"xlink:href":"#"+S,transform:(a?"rotate(180 "+k/2+" "+B/2+") ":c)+"scale("+k/C+","+B/C+")","stroke-width":(1/((k/C+B/C)/2)).toFixed(4)}),T.appendChild(E),o.defs.appendChild(T),g[A]=1),v(E,w);var M=b*("diamond"!=x&&"oval"!=x);a?(y=i._.arrows.startdx*f||0,m=t.getTotalLength(u.path)-M*f):(y=M*f,m=t.getTotalLength(u.path)-(i._.arrows.enddx*f||0)),w={},w["marker-"+l]="url(#"+A+")",(m||y)&&(w.d=t.getSubpath(u.path,y,m)),v(h,w),i._.arrows[l+"Path"]=S,i._.arrows[l+"Marker"]=A,i._.arrows[l+"dx"]=M,i._.arrows[l+"Type"]=x,i._.arrows[l+"String"]=n}else a?(y=i._.arrows.startdx*f||0,m=t.getTotalLength(u.path)-y):(y=0,m=t.getTotalLength(u.path)-(i._.arrows.enddx*f||0)),i._.arrows[l+"Path"]&&v(h,{d:t.getSubpath(u.path,y,m)}),delete i._.arrows[l+"Path"],delete i._.arrows[l+"Marker"],delete i._.arrows[l+"dx"],delete i._.arrows[l+"Type"],delete i._.arrows[l+"String"];for(w in g)if(g[e](w)&&!g[w]){var N=t._g.doc.getElementById(w);N&&N.parentNode.removeChild(N)}}},w={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},k=function(t,e,i){if(e=w[r(e).toLowerCase()]){for(var n=t.attrs["stroke-width"]||"1",a={round:n,square:n,butt:0}[t.attrs["stroke-linecap"]||i["stroke-linecap"]]||0,s=[],o=e.length;o--;)s[o]=e[o]*n+(o%2?1:-1)*a;v(t.node,{"stroke-dasharray":s.join(",")})}else v(t.node,{"stroke-dasharray":"none"})},B=function(i,a){var l=i.node,u=i.attrs,f=l.style.visibility;l.style.visibility="hidden";for(var d in a)if(a[e](d)){if(!t._availableAttrs[e](d))continue;var g=a[d];switch(u[d]=g,d){case"blur":i.blur(g);break;case"title":var y=l.getElementsByTagName("title");if(y.length&&(y=y[0]))y.firstChild.nodeValue=g;else{y=v("title");var m=t._g.doc.createTextNode(g);y.appendChild(m),l.appendChild(y)}break;case"href":case"target":var w=l.parentNode;if("a"!=w.tagName.toLowerCase()){var B=v("a");w.insertBefore(B,l),B.appendChild(l),w=B}"target"==d?w.setAttributeNS(p,"show","blank"==g?"new":g):w.setAttributeNS(p,d,g);break;case"cursor":l.style.cursor=g;break;case"transform":i.transform(g);break;case"arrow-start":_(i,g);break;case"arrow-end":_(i,g,1);break;case"clip-rect":var C=r(g).split(h);if(4==C.length){i.clip&&i.clip.parentNode.parentNode.removeChild(i.clip.parentNode);var A=v("clipPath"),T=v("rect");A.id=t.createUUID(),v(T,{x:C[0],y:C[1],width:C[2],height:C[3]}),A.appendChild(T),i.paper.defs.appendChild(A),v(l,{"clip-path":"url(#"+A.id+")"}),i.clip=T}if(!g){var E=l.getAttribute("clip-path");if(E){var M=t._g.doc.getElementById(E.replace(/(^url\(#|\)$)/g,c));M&&M.parentNode.removeChild(M),v(l,{"clip-path":c}),delete i.clip}}break;case"path":"path"==i.type&&(v(l,{d:g?u.path=t._pathToAbsolute(g):"M0,0"}),i._.dirty=1,i._.arrows&&("startString"in i._.arrows&&_(i,i._.arrows.startString),"endString"in i._.arrows&&_(i,i._.arrows.endString,1)));break;case"width":if(l.setAttribute(d,g),i._.dirty=1,!u.fx)break;d="x",g=u.x;case"x":u.fx&&(g=-u.x-(u.width||0));case"rx":if("rx"==d&&"rect"==i.type)break;case"cx":l.setAttribute(d,g),i.pattern&&b(i),i._.dirty=1;break;case"height":if(l.setAttribute(d,g),i._.dirty=1,!u.fy)break;d="y",g=u.y;case"y":u.fy&&(g=-u.y-(u.height||0));case"ry":if("ry"==d&&"rect"==i.type)break;case"cy":l.setAttribute(d,g),i.pattern&&b(i),i._.dirty=1;break;case"r":"rect"==i.type?v(l,{rx:g,ry:g}):l.setAttribute(d,g),i._.dirty=1;break;case"src":"image"==i.type&&l.setAttributeNS(p,"href",g);break;case"stroke-width":1==i._.sx&&1==i._.sy||(g/=s(o(i._.sx),o(i._.sy))||1),l.setAttribute(d,g),u["stroke-dasharray"]&&k(i,u["stroke-dasharray"],a), i._.arrows&&("startString"in i._.arrows&&_(i,i._.arrows.startString),"endString"in i._.arrows&&_(i,i._.arrows.endString,1));break;case"stroke-dasharray":k(i,g,a);break;case"fill":var N=r(g).match(t._ISURL);if(N){A=v("pattern");var L=v("image");A.id=t.createUUID(),v(A,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),v(L,{x:0,y:0,"xlink:href":N[1]}),A.appendChild(L),function(e){t._preload(N[1],function(){var t=this.offsetWidth,r=this.offsetHeight;v(e,{width:t,height:r}),v(L,{width:t,height:r})})}(A),i.paper.defs.appendChild(A),v(l,{fill:"url(#"+A.id+")"}),i.pattern=A,i.pattern&&b(i);break}var z=t.getRGB(g);if(z.error){if(("circle"==i.type||"ellipse"==i.type||"r"!=r(g).charAt())&&x(i,g)){if("opacity"in u||"fill-opacity"in u){var P=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,c));if(P){var F=P.getElementsByTagName("stop");v(F[F.length-1],{"stop-opacity":("opacity"in u?u.opacity:1)*("fill-opacity"in u?u["fill-opacity"]:1)})}}u.gradient=g,u.fill="none";break}}else delete a.gradient,delete u.gradient,!t.is(u.opacity,"undefined")&&t.is(a.opacity,"undefined")&&v(l,{opacity:u.opacity}),!t.is(u["fill-opacity"],"undefined")&&t.is(a["fill-opacity"],"undefined")&&v(l,{"fill-opacity":u["fill-opacity"]});z[e]("opacity")&&v(l,{"fill-opacity":z.opacity>1?z.opacity/100:z.opacity});case"stroke":z=t.getRGB(g),l.setAttribute(d,z.hex),"stroke"==d&&z[e]("opacity")&&v(l,{"stroke-opacity":z.opacity>1?z.opacity/100:z.opacity}),"stroke"==d&&i._.arrows&&("startString"in i._.arrows&&_(i,i._.arrows.startString),"endString"in i._.arrows&&_(i,i._.arrows.endString,1));break;case"gradient":("circle"==i.type||"ellipse"==i.type||"r"!=r(g).charAt())&&x(i,g);break;case"opacity":u.gradient&&!u[e]("stroke-opacity")&&v(l,{"stroke-opacity":g>1?g/100:g});case"fill-opacity":if(u.gradient){P=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,c)),P&&(F=P.getElementsByTagName("stop"),v(F[F.length-1],{"stop-opacity":g}));break}default:"font-size"==d&&(g=n(g,10)+"px");var R=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[R]=g,i._.dirty=1,l.setAttribute(d,g)}}S(i,a),l.style.visibility=f},C=1.2,S=function(i,a){if("text"==i.type&&(a[e]("text")||a[e]("font")||a[e]("font-size")||a[e]("x")||a[e]("y"))){var s=i.attrs,o=i.node,l=o.firstChild?n(t._g.doc.defaultView.getComputedStyle(o.firstChild,c).getPropertyValue("font-size"),10):10;if(a[e]("text")){for(s.text=a.text;o.firstChild;)o.removeChild(o.firstChild);for(var h=r(a.text).split("\n"),u=[],f,p=0,d=h.length;p<d;p++)f=v("tspan"),p&&v(f,{dy:l*C,x:s.x}),f.appendChild(t._g.doc.createTextNode(h[p])),o.appendChild(f),u[p]=f}else for(u=o.getElementsByTagName("tspan"),p=0,d=u.length;p<d;p++)p?v(u[p],{dy:l*C,x:s.x}):v(u[0],{dy:0});v(o,{x:s.x,y:s.y}),i._.dirty=1;var g=i._getBBox(),x=s.y-(g.y+g.height/2);x&&t.is(x,"finite")&&v(u[0],{dy:x})}},A=function(t){return t.parentNode&&"a"===t.parentNode.tagName.toLowerCase()?t.parentNode:t},T=function(e,r){function i(){return("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5)}var n=0,a=0;this[0]=this.node=e,e.raphael=!0,this.id=i(),e.raphaelid=this.id,this.matrix=t.matrix(),this.realPath=null,this.paper=r,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!r.bottom&&(r.bottom=this),this.prev=r.top,r.top&&(r.top.next=this),r.top=this,this.next=null},E=t.el;T.prototype=E,E.constructor=T,t._engine.path=function(t,e){var r=v("path");e.canvas&&e.canvas.appendChild(r);var i=new T(r,e);return i.type="path",B(i,{fill:"none",stroke:"#000",path:t}),i},E.rotate=function(t,e,n){if(this.removed)return this;if(t=r(t).split(h),t.length-1&&(e=i(t[1]),n=i(t[2])),t=i(t[0]),null==n&&(e=n),null==e||null==n){var a=this.getBBox(1);e=a.x+a.width/2,n=a.y+a.height/2}return this.transform(this._.transform.concat([["r",t,e,n]])),this},E.scale=function(t,e,n,a){if(this.removed)return this;if(t=r(t).split(h),t.length-1&&(e=i(t[1]),n=i(t[2]),a=i(t[3])),t=i(t[0]),null==e&&(e=t),null==a&&(n=a),null==n||null==a)var s=this.getBBox(1);return n=null==n?s.x+s.width/2:n,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,e,n,a]])),this},E.translate=function(t,e){return this.removed?this:(t=r(t).split(h),t.length-1&&(e=i(t[1])),t=i(t[0])||0,e=+e||0,this.transform(this._.transform.concat([["t",t,e]])),this)},E.transform=function(r){var i=this._;if(null==r)return i.transform;if(t._extractTransform(this,r),this.clip&&v(this.clip,{transform:this.matrix.invert()}),this.pattern&&b(this),this.node&&v(this.node,{transform:this.matrix}),1!=i.sx||1!=i.sy){var n=this.attrs[e]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":n})}return this},E.hide=function(){return this.removed||(this.node.style.display="none"),this},E.show=function(){return this.removed||(this.node.style.display=""),this},E.remove=function(){var e=A(this.node);if(!this.removed&&e.parentNode){var r=this.paper;r.__set__&&r.__set__.exclude(this),u.unbind("raphael.*.*."+this.id),this.gradient&&r.defs.removeChild(this.gradient),t._tear(this,r),e.parentNode.removeChild(e),this.removeData();for(var i in this)this[i]="function"==typeof this[i]?t._removedFactory(i):null;this.removed=!0}},E._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e=!1,r;this.paper.canvas.parentElement?r=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(r=this.paper.canvas.parentNode.style),r&&"none"==r.display&&(e=!0,r.display="");var i={};try{i=this.node.getBBox()}catch(n){i={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{i=i||{},e&&(r.display="none")}return t&&this.hide(),i},E.attr=function(r,i){if(this.removed)return this;if(null==r){var n={};for(var a in this.attrs)this.attrs[e](a)&&(n[a]=this.attrs[a]);return n.gradient&&"none"==n.fill&&(n.fill=n.gradient)&&delete n.gradient,n.transform=this._.transform,n}if(null==i&&t.is(r,"string")){if("fill"==r&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==r)return this._.transform;for(var s=r.split(h),o={},l=0,c=s.length;l<c;l++)r=s[l],r in this.attrs?o[r]=this.attrs[r]:t.is(this.paper.customAttributes[r],"function")?o[r]=this.paper.customAttributes[r].def:o[r]=t._availableAttrs[r];return c-1?o:o[s[0]]}if(null==i&&t.is(r,"array")){for(o={},l=0,c=r.length;l<c;l++)o[r[l]]=this.attr(r[l]);return o}if(null!=i){var f={};f[r]=i}else null!=r&&t.is(r,"object")&&(f=r);for(var p in f)u("raphael.attr."+p+"."+this.id,this,f[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[e](p)&&f[e](p)&&t.is(this.paper.customAttributes[p],"function")){var d=this.paper.customAttributes[p].apply(this,[].concat(f[p]));this.attrs[p]=f[p];for(var g in d)d[e](g)&&(f[g]=d[g])}return B(this,f),this},E.toFront=function(){if(this.removed)return this;var e=A(this.node);e.parentNode.appendChild(e);var r=this.paper;return r.top!=this&&t._tofront(this,r),this},E.toBack=function(){if(this.removed)return this;var e=A(this.node),r=e.parentNode;r.insertBefore(e,r.firstChild),t._toback(this,this.paper);var i=this.paper;return this},E.insertAfter=function(e){if(this.removed||!e)return this;var r=A(this.node),i=A(e.node||e[e.length-1].node);return i.nextSibling?i.parentNode.insertBefore(r,i.nextSibling):i.parentNode.appendChild(r),t._insertafter(this,e,this.paper),this},E.insertBefore=function(e){if(this.removed||!e)return this;var r=A(this.node),i=A(e.node||e[0].node);return i.parentNode.insertBefore(r,i),t._insertbefore(this,e,this.paper),this},E.blur=function(e){var r=this;if(0!==+e){var i=v("filter"),n=v("feGaussianBlur");r.attrs.blur=e,i.id=t.createUUID(),v(n,{stdDeviation:+e||1.5}),i.appendChild(n),r.paper.defs.appendChild(i),r._blur=i,v(r.node,{filter:"url(#"+i.id+")"})}else r._blur&&(r._blur.parentNode.removeChild(r._blur),delete r._blur,delete r.attrs.blur),r.node.removeAttribute("filter");return r},t._engine.circle=function(t,e,r,i){var n=v("circle");t.canvas&&t.canvas.appendChild(n);var a=new T(n,t);return a.attrs={cx:e,cy:r,r:i,fill:"none",stroke:"#000"},a.type="circle",v(n,a.attrs),a},t._engine.rect=function(t,e,r,i,n,a){var s=v("rect");t.canvas&&t.canvas.appendChild(s);var o=new T(s,t);return o.attrs={x:e,y:r,width:i,height:n,rx:a||0,ry:a||0,fill:"none",stroke:"#000"},o.type="rect",v(s,o.attrs),o},t._engine.ellipse=function(t,e,r,i,n){var a=v("ellipse");t.canvas&&t.canvas.appendChild(a);var s=new T(a,t);return s.attrs={cx:e,cy:r,rx:i,ry:n,fill:"none",stroke:"#000"},s.type="ellipse",v(a,s.attrs),s},t._engine.image=function(t,e,r,i,n,a){var s=v("image");v(s,{x:r,y:i,width:n,height:a,preserveAspectRatio:"none"}),s.setAttributeNS(p,"href",e),t.canvas&&t.canvas.appendChild(s);var o=new T(s,t);return o.attrs={x:r,y:i,width:n,height:a,src:e},o.type="image",o},t._engine.text=function(e,r,i,n){var a=v("text");e.canvas&&e.canvas.appendChild(a);var s=new T(a,e);return s.attrs={x:r,y:i,"text-anchor":"middle",text:n,"font-family":t._availableAttrs["font-family"],"font-size":t._availableAttrs["font-size"],stroke:"none",fill:"#000"},s.type="text",B(s,s.attrs),s},t._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},t._engine.create=function(){var e=t._getContainer.apply(0,arguments),r=e&&e.container,i=e.x,n=e.y,a=e.width,s=e.height;if(!r)throw new Error("SVG container not found.");var o=v("svg"),l="overflow:hidden;",h;return i=i||0,n=n||0,a=a||512,s=s||342,v(o,{height:s,version:1.1,width:a,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),1==r?(o.style.cssText=l+"position:absolute;left:"+i+"px;top:"+n+"px",t._g.doc.body.appendChild(o),h=1):(o.style.cssText=l+"position:relative",r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)),r=new t._Paper,r.width=a,r.height=s,r.canvas=o,r.clear(),r._left=r._top=0,h&&(r.renderfix=function(){}),r.renderfix(),r},t._engine.setViewBox=function(t,e,r,i,n){u("raphael.setViewBox",this,this._viewBox,[t,e,r,i,n]);var a=this.getSize(),o=s(r/a.width,i/a.height),l=this.top,h=n?"xMidYMid meet":"xMinYMin",c,p;for(null==t?(this._vbSize&&(o=1),delete this._vbSize,c="0 0 "+this.width+f+this.height):(this._vbSize=o,c=t+f+e+f+r+f+i),v(this.canvas,{viewBox:c,preserveAspectRatio:h});o&&l;)p="stroke-width"in l.attrs?l.attrs["stroke-width"]:1,l.attr({"stroke-width":p}),l._.dirty=1,l._.dirtyT=1,l=l.prev;return this._viewBox=[t,e,r,i,!!n],this},t.prototype.renderfix=function(){var t=this.canvas,e=t.style,r;try{r=t.getScreenCTM()||t.createSVGMatrix()}catch(i){r=t.createSVGMatrix()}var n=-r.e%1,a=-r.f%1;(n||a)&&(n&&(this._left=(this._left+n)%1,e.left=this._left+"px"),a&&(this._top=(this._top+a)%1,e.top=this._top+"px"))},t.prototype.clear=function(){t.eve("raphael.clear",this);for(var e=this.canvas;e.firstChild;)e.removeChild(e.firstChild);this.bottom=this.top=null,(this.desc=v("desc")).appendChild(t._g.doc.createTextNode("Created with Raphaël "+t.version)),e.appendChild(this.desc),e.appendChild(this.defs=v("defs"))},t.prototype.remove=function(){u("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null};var M=t.st;for(var N in E)E[e](N)&&!M[e](N)&&(M[N]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(N))}}.apply(e,i),!(void 0!==n&&(t.exports=n))},function(t,e,r){var i,n;i=[r(1)],n=function(t){if(!t||t.vml){var e="hasOwnProperty",r=String,i=parseFloat,n=Math,a=n.round,s=n.max,o=n.min,l=n.abs,h="fill",u=/[, ]+/,c=t.eve,f=" progid:DXImageTransform.Microsoft",p=" ",d="",g={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},v=/([clmz]),?([^clmz]*)/gi,x=/ progid:\S+Blur\([^\)]+\)/g,y=/-?[^,\s-]+/g,m="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",b=21600,_={path:1,rect:1,image:1},w={circle:1,ellipse:1},k=function(e){var i=/[ahqstv]/gi,n=t._pathToAbsolute;if(r(e).match(i)&&(n=t._path2curve),i=/[clmz]/g,n==t._pathToAbsolute&&!r(e).match(i)){var s=r(e).replace(v,function(t,e,r){var i=[],n="m"==e.toLowerCase(),s=g[e];return r.replace(y,function(t){n&&2==i.length&&(s+=i+g["m"==e?"l":"L"],i=[]),i.push(a(t*b))}),s+i});return s}var o=n(e),l,h;s=[];for(var u=0,c=o.length;u<c;u++){l=o[u],h=o[u][0].toLowerCase(),"z"==h&&(h="x");for(var f=1,x=l.length;f<x;f++)h+=a(l[f]*b)+(f!=x-1?",":d);s.push(h)}return s.join(p)},B=function(e,r,i){var n=t.matrix();return n.rotate(-e,.5,.5),{dx:n.x(r,i),dy:n.y(r,i)}},C=function(t,e,r,i,n,a){var s=t._,o=t.matrix,u=s.fillpos,c=t.node,f=c.style,d=1,g="",v,x=b/e,y=b/r;if(f.visibility="hidden",e&&r){if(c.coordsize=l(x)+p+l(y),f.rotation=a*(e*r<0?-1:1),a){var m=B(a,i,n);i=m.dx,n=m.dy}if(e<0&&(g+="x"),r<0&&(g+=" y")&&(d=-1),f.flip=g,c.coordorigin=i*-x+p+n*-y,u||s.fillsize){var _=c.getElementsByTagName(h);_=_&&_[0],c.removeChild(_),u&&(m=B(a,o.x(u[0],u[1]),o.y(u[0],u[1])),_.position=m.dx*d+p+m.dy*d),s.fillsize&&(_.size=s.fillsize[0]*l(e)+p+s.fillsize[1]*l(r)),c.appendChild(_)}f.visibility="visible"}};t.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var S=function(t,e,i){for(var n=r(e).toLowerCase().split("-"),a=i?"end":"start",s=n.length,o="classic",l="medium",h="medium";s--;)switch(n[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":o=n[s];break;case"wide":case"narrow":h=n[s];break;case"long":case"short":l=n[s]}var u=t.node.getElementsByTagName("stroke")[0];u[a+"arrow"]=o,u[a+"arrowlength"]=l,u[a+"arrowwidth"]=h},A=function(n,l){n.attrs=n.attrs||{};var c=n.node,f=n.attrs,g=c.style,v,x=_[n.type]&&(l.x!=f.x||l.y!=f.y||l.width!=f.width||l.height!=f.height||l.cx!=f.cx||l.cy!=f.cy||l.rx!=f.rx||l.ry!=f.ry||l.r!=f.r),y=w[n.type]&&(f.cx!=l.cx||f.cy!=l.cy||f.r!=l.r||f.rx!=l.rx||f.ry!=l.ry),m=n;for(var B in l)l[e](B)&&(f[B]=l[B]);if(x&&(f.path=t._getPath[n.type](n),n._.dirty=1),l.href&&(c.href=l.href),l.title&&(c.title=l.title),l.target&&(c.target=l.target),l.cursor&&(g.cursor=l.cursor),"blur"in l&&n.blur(l.blur),(l.path&&"path"==n.type||x)&&(c.path=k(~r(f.path).toLowerCase().indexOf("r")?t._pathToAbsolute(f.path):f.path),n._.dirty=1,"image"==n.type&&(n._.fillpos=[f.x,f.y],n._.fillsize=[f.width,f.height],C(n,1,1,0,0,0))),"transform"in l&&n.transform(l.transform),y){var A=+f.cx,E=+f.cy,M=+f.rx||+f.r||0,L=+f.ry||+f.r||0;c.path=t.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",a((A-M)*b),a((E-L)*b),a((A+M)*b),a((E+L)*b),a(A*b)),n._.dirty=1}if("clip-rect"in l){var z=r(l["clip-rect"]).split(u);if(4==z.length){z[2]=+z[2]+ +z[0],z[3]=+z[3]+ +z[1];var P=c.clipRect||t._g.doc.createElement("div"),F=P.style;F.clip=t.format("rect({1}px {2}px {3}px {0}px)",z),c.clipRect||(F.position="absolute",F.top=0,F.left=0,F.width=n.paper.width+"px",F.height=n.paper.height+"px",c.parentNode.insertBefore(P,c),P.appendChild(c),c.clipRect=P)}l["clip-rect"]||c.clipRect&&(c.clipRect.style.clip="auto")}if(n.textpath){var R=n.textpath.style;l.font&&(R.font=l.font),l["font-family"]&&(R.fontFamily='"'+l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,d)+'"'),l["font-size"]&&(R.fontSize=l["font-size"]),l["font-weight"]&&(R.fontWeight=l["font-weight"]),l["font-style"]&&(R.fontStyle=l["font-style"])}if("arrow-start"in l&&S(m,l["arrow-start"]),"arrow-end"in l&&S(m,l["arrow-end"],1),null!=l.opacity||null!=l.fill||null!=l.src||null!=l.stroke||null!=l["stroke-width"]||null!=l["stroke-opacity"]||null!=l["fill-opacity"]||null!=l["stroke-dasharray"]||null!=l["stroke-miterlimit"]||null!=l["stroke-linejoin"]||null!=l["stroke-linecap"]){var j=c.getElementsByTagName(h),I=!1;if(j=j&&j[0],!j&&(I=j=N(h)),"image"==n.type&&l.src&&(j.src=l.src),l.fill&&(j.on=!0),null!=j.on&&"none"!=l.fill&&null!==l.fill||(j.on=!1),j.on&&l.fill){var q=r(l.fill).match(t._ISURL);if(q){j.parentNode==c&&c.removeChild(j),j.rotate=!0,j.src=q[1],j.type="tile";var D=n.getBBox(1);j.position=D.x+p+D.y,n._.fillpos=[D.x,D.y],t._preload(q[1],function(){n._.fillsize=[this.offsetWidth,this.offsetHeight]})}else j.color=t.getRGB(l.fill).hex,j.src=d,j.type="solid",t.getRGB(l.fill).error&&(m.type in{circle:1,ellipse:1}||"r"!=r(l.fill).charAt())&&T(m,l.fill,j)&&(f.fill="none",f.gradient=l.fill,j.rotate=!1)}if("fill-opacity"in l||"opacity"in l){var V=((+f["fill-opacity"]+1||2)-1)*((+f.opacity+1||2)-1)*((+t.getRGB(l.fill).o+1||2)-1);V=o(s(V,0),1),j.opacity=V,j.src&&(j.color="none")}c.appendChild(j);var O=c.getElementsByTagName("stroke")&&c.getElementsByTagName("stroke")[0],Y=!1;!O&&(Y=O=N("stroke")),(l.stroke&&"none"!=l.stroke||l["stroke-width"]||null!=l["stroke-opacity"]||l["stroke-dasharray"]||l["stroke-miterlimit"]||l["stroke-linejoin"]||l["stroke-linecap"])&&(O.on=!0),("none"==l.stroke||null===l.stroke||null==O.on||0==l.stroke||0==l["stroke-width"])&&(O.on=!1);var W=t.getRGB(l.stroke);O.on&&l.stroke&&(O.color=W.hex),V=((+f["stroke-opacity"]+1||2)-1)*((+f.opacity+1||2)-1)*((+W.o+1||2)-1);var G=.75*(i(l["stroke-width"])||1);if(V=o(s(V,0),1),null==l["stroke-width"]&&(G=f["stroke-width"]),l["stroke-width"]&&(O.weight=G),G&&G<1&&(V*=G)&&(O.weight=1),O.opacity=V,l["stroke-linejoin"]&&(O.joinstyle=l["stroke-linejoin"]||"miter"),O.miterlimit=l["stroke-miterlimit"]||8,l["stroke-linecap"]&&(O.endcap="butt"==l["stroke-linecap"]?"flat":"square"==l["stroke-linecap"]?"square":"round"),"stroke-dasharray"in l){var H={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};O.dashstyle=H[e](l["stroke-dasharray"])?H[l["stroke-dasharray"]]:d}Y&&c.appendChild(O)}if("text"==m.type){m.paper.canvas.style.display=d;var X=m.paper.span,U=100,$=f.font&&f.font.match(/\d+(?:\.\d*)?(?=px)/);g=X.style,f.font&&(g.font=f.font),f["font-family"]&&(g.fontFamily=f["font-family"]),f["font-weight"]&&(g.fontWeight=f["font-weight"]),f["font-style"]&&(g.fontStyle=f["font-style"]),$=i(f["font-size"]||$&&$[0])||10,g.fontSize=$*U+"px",m.textpath.string&&(X.innerHTML=r(m.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>"));var Z=X.getBoundingClientRect();m.W=f.w=(Z.right-Z.left)/U,m.H=f.h=(Z.bottom-Z.top)/U,m.X=f.x,m.Y=f.y+m.H/2,("x"in l||"y"in l)&&(m.path.v=t.format("m{0},{1}l{2},{1}",a(f.x*b),a(f.y*b),a(f.x*b)+1));for(var Q=["x","y","text","font","font-family","font-weight","font-style","font-size"],J=0,K=Q.length;J<K;J++)if(Q[J]in l){m._.dirty=1;break}switch(f["text-anchor"]){case"start":m.textpath.style["v-text-align"]="left",m.bbx=m.W/2;break;case"end":m.textpath.style["v-text-align"]="right",m.bbx=-m.W/2;break;default:m.textpath.style["v-text-align"]="center",m.bbx=0}m.textpath.style["v-text-kern"]=!0}},T=function(e,a,s){e.attrs=e.attrs||{};var o=e.attrs,l=Math.pow,h,u,c="linear",f=".5 .5";if(e.attrs.gradient=a,a=r(a).replace(t._radial_gradient,function(t,e,r){return c="radial",e&&r&&(e=i(e),r=i(r),l(e-.5,2)+l(r-.5,2)>.25&&(r=n.sqrt(.25-l(e-.5,2))*(2*(r>.5)-1)+.5),f=e+p+r),d}),a=a.split(/\s*\-\s*/),"linear"==c){var g=a.shift();if(g=-i(g),isNaN(g))return null}var v=t._parseDots(a);if(!v)return null;if(e=e.shape||e.node,v.length){e.removeChild(s),s.on=!0,s.method="none",s.color=v[0].color,s.color2=v[v.length-1].color;for(var x=[],y=0,m=v.length;y<m;y++)v[y].offset&&x.push(v[y].offset+p+v[y].color);s.colors=x.length?x.join():"0% "+s.color,"radial"==c?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=f,s.angle=0):(s.type="gradient",s.angle=(270-g)%360),e.appendChild(s)}return 1},E=function(e,r){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=r,this.matrix=t.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!r.bottom&&(r.bottom=this),this.prev=r.top,r.top&&(r.top.next=this),r.top=this,this.next=null},M=t.el;E.prototype=M,M.constructor=E,M.transform=function(e){if(null==e)return this._.transform;var i=this.paper._viewBoxShift,n=i?"s"+[i.scale,i.scale]+"-1-1t"+[i.dx,i.dy]:d,a;i&&(a=e=r(e).replace(/\.{3}|\u2026/g,this._.transform||d)),t._extractTransform(this,n+e);var s=this.matrix.clone(),o=this.skew,l=this.node,h,u=~r(this.attrs.fill).indexOf("-"),c=!r(this.attrs.fill).indexOf("url(");if(s.translate(1,1),c||u||"image"==this.type)if(o.matrix="1 0 0 1",o.offset="0 0",h=s.split(),u&&h.noRotation||!h.isSimple){l.style.filter=s.toFilter();var f=this.getBBox(),g=this.getBBox(1),v=f.x-g.x,x=f.y-g.y;l.coordorigin=v*-b+p+x*-b,C(this,1,1,v,x,0)}else l.style.filter=d,C(this,h.scalex,h.scaley,h.dx,h.dy,h.rotate);else l.style.filter=d,o.matrix=r(s),o.offset=s.offset();return null!==a&&(this._.transform=a,t._extractTransform(this,a)),this},M.rotate=function(t,e,n){if(this.removed)return this;if(null!=t){if(t=r(t).split(u),t.length-1&&(e=i(t[1]),n=i(t[2])),t=i(t[0]),null==n&&(e=n),null==e||null==n){var a=this.getBBox(1);e=a.x+a.width/2,n=a.y+a.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,e,n]])),this}},M.translate=function(t,e){return this.removed?this:(t=r(t).split(u),t.length-1&&(e=i(t[1])),t=i(t[0])||0,e=+e||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=e),this.transform(this._.transform.concat([["t",t,e]])),this)},M.scale=function(t,e,n,a){if(this.removed)return this;if(t=r(t).split(u),t.length-1&&(e=i(t[1]),n=i(t[2]),a=i(t[3]),isNaN(n)&&(n=null),isNaN(a)&&(a=null)),t=i(t[0]),null==e&&(e=t),null==a&&(n=a),null==n||null==a)var s=this.getBBox(1);return n=null==n?s.x+s.width/2:n,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,e,n,a]])),this._.dirtyT=1,this},M.hide=function(){return!this.removed&&(this.node.style.display="none"),this},M.show=function(){return!this.removed&&(this.node.style.display=d),this},M.auxGetBBox=t.el.getBBox,M.getBBox=function(){var t=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var e={},r=1/this.paper._viewBoxShift.scale;return e.x=t.x-this.paper._viewBoxShift.dx,e.x*=r,e.y=t.y-this.paper._viewBoxShift.dy,e.y*=r,e.width=t.width*r,e.height=t.height*r,e.x2=e.x+e.width,e.y2=e.y+e.height,e}return t},M._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},M.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),t.eve.unbind("raphael.*.*."+this.id),t._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;this.removed=!0}},M.attr=function(r,i){if(this.removed)return this;if(null==r){var n={};for(var a in this.attrs)this.attrs[e](a)&&(n[a]=this.attrs[a]);return n.gradient&&"none"==n.fill&&(n.fill=n.gradient)&&delete n.gradient,n.transform=this._.transform,n}if(null==i&&t.is(r,"string")){if(r==h&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=r.split(u),o={},l=0,f=s.length;l<f;l++)r=s[l],r in this.attrs?o[r]=this.attrs[r]:t.is(this.paper.customAttributes[r],"function")?o[r]=this.paper.customAttributes[r].def:o[r]=t._availableAttrs[r];return f-1?o:o[s[0]]}if(this.attrs&&null==i&&t.is(r,"array")){for(o={},l=0,f=r.length;l<f;l++)o[r[l]]=this.attr(r[l]);return o}var p;null!=i&&(p={},p[r]=i),null==i&&t.is(r,"object")&&(p=r);for(var d in p)c("raphael.attr."+d+"."+this.id,this,p[d]);if(p){for(d in this.paper.customAttributes)if(this.paper.customAttributes[e](d)&&p[e](d)&&t.is(this.paper.customAttributes[d],"function")){var g=this.paper.customAttributes[d].apply(this,[].concat(p[d]));this.attrs[d]=p[d];for(var v in g)g[e](v)&&(p[v]=g[v])}p.text&&"text"==this.type&&(this.textpath.string=p.text),A(this,p)}return this},M.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&t._tofront(this,this.paper),this},M.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),t._toback(this,this.paper)),this)},M.insertAfter=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[e.length-1]),e.node.nextSibling?e.node.parentNode.insertBefore(this.node,e.node.nextSibling):e.node.parentNode.appendChild(this.node),t._insertafter(this,e,this.paper),this)},M.insertBefore=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[0]),e.node.parentNode.insertBefore(this.node,e.node),t._insertbefore(this,e,this.paper),this)},M.blur=function(e){var r=this.node.runtimeStyle,i=r.filter;return i=i.replace(x,d),0!==+e?(this.attrs.blur=e,r.filter=i+p+f+".Blur(pixelradius="+(+e||1.5)+")",r.margin=t.format("-{0}px 0 0 -{0}px",a(+e||1.5))):(r.filter=i,r.margin=0,delete this.attrs.blur),this},t._engine.path=function(t,e){var r=N("shape");r.style.cssText=m,r.coordsize=b+p+b,r.coordorigin=e.coordorigin;var i=new E(r,e),n={fill:"none",stroke:"#000"};t&&(n.path=t),i.type="path",i.path=[],i.Path=d,A(i,n),e.canvas&&e.canvas.appendChild(r);var a=N("skew");return a.on=!0,r.appendChild(a),i.skew=a,i.transform(d),i},t._engine.rect=function(e,r,i,n,a,s){var o=t._rectPath(r,i,n,a,s),l=e.path(o),h=l.attrs;return l.X=h.x=r,l.Y=h.y=i,l.W=h.width=n,l.H=h.height=a,h.r=s,h.path=o,l.type="rect",l},t._engine.ellipse=function(t,e,r,i,n){var a=t.path(),s=a.attrs;return a.X=e-i,a.Y=r-n,a.W=2*i,a.H=2*n,a.type="ellipse",A(a,{cx:e,cy:r,rx:i,ry:n}),a},t._engine.circle=function(t,e,r,i){var n=t.path(),a=n.attrs;return n.X=e-i,n.Y=r-i,n.W=n.H=2*i,n.type="circle",A(n,{cx:e,cy:r,r:i}),n},t._engine.image=function(e,r,i,n,a,s){var o=t._rectPath(i,n,a,s),l=e.path(o).attr({stroke:"none"}),u=l.attrs,c=l.node,f=c.getElementsByTagName(h)[0];return u.src=r,l.X=u.x=i,l.Y=u.y=n,l.W=u.width=a,l.H=u.height=s,u.path=o,l.type="image",f.parentNode==c&&c.removeChild(f),f.rotate=!0,f.src=r,f.type="tile",l._.fillpos=[i,n],l._.fillsize=[a,s],c.appendChild(f),C(l,1,1,0,0,0),l},t._engine.text=function(e,i,n,s){var o=N("shape"),l=N("path"),h=N("textpath");i=i||0,n=n||0,s=s||"",l.v=t.format("m{0},{1}l{2},{1}",a(i*b),a(n*b),a(i*b)+1),l.textpathok=!0,h.string=r(s),h.on=!0,o.style.cssText=m,o.coordsize=b+p+b,o.coordorigin="0 0";var u=new E(o,e),c={fill:"#000",stroke:"none",font:t._availableAttrs.font,text:s};u.shape=o,u.path=l,u.textpath=h,u.type="text",u.attrs.text=r(s),u.attrs.x=i,u.attrs.y=n,u.attrs.w=1,u.attrs.h=1,A(u,c),o.appendChild(h),o.appendChild(l),e.canvas.appendChild(o);var f=N("skew");return f.on=!0,o.appendChild(f),u.skew=f,u.transform(d),u},t._engine.setSize=function(e,r){var i=this.canvas.style;return this.width=e,this.height=r,e==+e&&(e+="px"),r==+r&&(r+="px"),i.width=e,i.height=r,i.clip="rect(0 "+e+" "+r+" 0)",this._viewBox&&t._engine.setViewBox.apply(this,this._viewBox),this},t._engine.setViewBox=function(e,r,i,n,a){t.eve("raphael.setViewBox",this,this._viewBox,[e,r,i,n,a]);var s=this.getSize(),o=s.width,l=s.height,h,u;return a&&(h=l/n,u=o/i,i*h<o&&(e-=(o-i*h)/2/h),n*u<l&&(r-=(l-n*u)/2/u)),this._viewBox=[e,r,i,n,!!a],this._viewBoxShift={dx:-e,dy:-r,scale:s},this.forEach(function(t){t.transform("...")}),this};var N;t._engine.initWin=function(t){var e=t.document;e.styleSheets.length<31?e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):e.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),N=function(t){return e.createElement("<rvml:"+t+' class="rvml">')}}catch(r){N=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),r=e.container,i=e.height,n,a=e.width,s=e.x,o=e.y;if(!r)throw new Error("VML container not found.");var l=new t._Paper,h=l.canvas=t._g.doc.createElement("div"),u=h.style;return s=s||0,o=o||0,a=a||512,i=i||342,l.width=a,l.height=i,a==+a&&(a+="px"),i==+i&&(i+="px"),l.coordsize=1e3*b+p+1e3*b,l.coordorigin="0 0",l.span=t._g.doc.createElement("span"),l.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",h.appendChild(l.span),u.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",a,i),1==r?(t._g.doc.body.appendChild(h),u.left=s+"px",u.top=o+"px",u.position="absolute"):r.firstChild?r.insertBefore(h,r.firstChild):r.appendChild(h),l.renderfix=function(){},l},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var L=t.st;for(var z in M)M[e](z)&&!L[e](z)&&(L[z]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(z))}}.apply(e,i),!(void 0!==n&&(t.exports=n))}])}); /* * qTip2 - Pretty powerful tooltips * http://craigsworks.com/projects/qtip2/ * * Version: nightly * Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com * * Dual licensed under MIT or GPLv2 licenses * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * * Date: Mon Nov 21 13:18:18.0000000000 2011 * * This file has been modified to be compatible with jQuery 3. The following patch has been applied: * https://github.com/qTip2/qTip2/pull/818 * In addition references to jquery browser plugins and IE fallbacks have been removed. * *//*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true *//*global window: false, jQuery: false, console: false */ (function(a,b,c){function z(b,c){var i,j,k,l,m,n=a(this),o=a(document.body),p=this===document?o:n,q=n.metadata?n.metadata(c.metadata):f,r=c.metadata.type==="html5"&&q?q[c.metadata.name]:f,s=n.data(c.metadata.name||"qtipopts");try{s=typeof s==="string"?(new Function("return "+s))():s}catch(t){w("Unable to parse HTML5 attribute data: "+s)}l=a.extend(d,{},g.defaults,c,typeof s==="object"?x(s):f,x(r||q)),j=l.position,l.id=b;if("boolean"===typeof l.content.text){k=n.attr(l.content.attr);if(l.content.attr!==e&&k)l.content.text=k;else{w("Unable to locate content for tooltip! Aborting render of tooltip on element: ",n);return e}}j.container===e&&(j.container=o),j.target===e&&(j.target=p),l.show.target===e&&(l.show.target=p),l.show.solo===d&&(l.show.solo=o),l.hide.target===e&&(l.hide.target=p),l.position.viewport===d&&(l.position.viewport=j.container),j.at=new h.Corner(j.at),j.my=new h.Corner(j.my);if(a.data(this,"qtip"))if(l.overwrite)n.qtip("destroy");else if(l.overwrite===e)return e;l.suppress&&(m=a.attr(this,"title"))&&a(this).removeAttr("title").attr(u,m),i=new y(n,l,b,!!k),a.data(this,"qtip",i),n.bind("remove.qtip-"+b,function(){i.destroy()});return i}function y(s,t,w,y){function R(){var c=[t.show.target[0],t.hide.target[0],z.rendered&&G.tooltip[0],t.position.container[0],t.position.viewport[0],b,document];z.rendered?a([]).pushStack(a.grep(c,function(a){return typeof a==="object"})).unbind(F):t.show.target.unbind(F+"-create")}function Q(){function p(a){E.is(":visible")&&z.reposition(a)}function o(a){if(E.hasClass(m))return e;clearTimeout(z.timers.inactive),z.timers.inactive=setTimeout(function(){z.hide(a)},t.hide.inactive)}function l(b){if(E.hasClass(m)||C||D)return e;var d=a(b.relatedTarget||b.target),g=d.closest(n)[0]===E[0],h=d[0]===f.show[0];clearTimeout(z.timers.show),clearTimeout(z.timers.hide);if(c.target==="mouse"&&g||t.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(g||h)))try{b.preventDefault(),b.stopImmediatePropagation()}catch(i){}else t.hide.delay>0?z.timers.hide=setTimeout(function(){z.hide(b)},t.hide.delay):z.hide(b)}function k(a){if(E.hasClass(m))return e;clearTimeout(z.timers.show),clearTimeout(z.timers.hide);var b=function(){z.toggle(d,a)};t.show.delay>0?z.timers.show=setTimeout(b,t.show.delay):b()}var c=t.position,f={show:t.show.target,hide:t.hide.target,viewport:a(c.viewport),document:a(document),body:a(document.body),window:a(b)},h={show:a.trim(""+t.show.event).split(" "),hide:a.trim(""+t.hide.event).split(" ")},j=!!0;E.bind("mouseenter"+F+" mouseleave"+F,function(a){var b=a.type==="mouseenter";b&&z.focus(a),E.toggleClass(q,b)}),t.hide.fixed&&(f.hide=f.hide.add(E),E.bind("mouseover"+F,function(){E.hasClass(m)||clearTimeout(z.timers.hide)})),/mouse(out|leave)/i.test(t.hide.event)?t.hide.leave==="window"&&f.window.bind("mouseout"+F+" blur"+F,function(a){/select|option/.test(a.target)&&!a.relatedTarget&&z.hide(a)}):/mouse(over|enter)/i.test(t.show.event)&&f.hide.bind("mouseleave"+F,function(a){clearTimeout(z.timers.show)}),(""+t.hide.event).indexOf("unfocus")>-1&&f.body.bind("mousedown"+F,function(b){var c=a(b.target),d=!E.hasClass(m)&&E.is(":visible");c[0]!==E[0]&&c.parents(n).length===0&&c.add(s).length>1&&!c.attr("disabled")&&z.hide(b)}),"number"===typeof t.hide.inactive&&(f.show.bind("qtip-"+w+"-inactive",o),a.each(g.inactiveEvents,function(a,b){f.hide.add(G.tooltip).bind(b+F+"-inactive",o)})),a.each(h.hide,function(b,c){var d=a.inArray(c,h.show),e=a(f.hide);d>-1&&e.add(f.show).length===e.length||c==="unfocus"?(f.show.bind(c+F,function(a){E.is(":visible")?l(a):k(a)}),delete h.show[d]):f.hide.bind(c+F,l)}),a.each(h.show,function(a,b){f.show.bind(b+F,k)}),"number"===typeof t.hide.distance&&f.show.add(E).bind("mousemove"+F,function(a){var b=H.origin||{},c=t.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&z.hide(a)}),c.target==="mouse"&&(f.show.bind("mousemove"+F,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),c.adjust.mouse&&(t.hide.event&&E.bind("mouseleave"+F,function(a){(a.relatedTarget||a.target)!==f.show[0]&&z.hide(a)}),f.document.bind("mousemove"+F,function(a){!E.hasClass(m)&&E.is(":visible")&&z.reposition(a||i)}))),(c.adjust.resize||f.viewport.length)&&(a.event.special.resize?f.viewport:f.window).bind("resize"+F,p),(f.viewport.length||j&&E.css("position")==="fixed")&&f.viewport.bind("scroll"+F,p)}function P(b,d){function g(b){function i(c){c&&(delete h[c.src],clearTimeout(z.timers.img[c.src]),a(c).unbind(F)),a.isEmptyObject(h)&&(z.redraw(),d!==e&&z.reposition(H.event),b())}var g,h={};if((g=f.find("img:not([height]):not([width])")).length===0)return i();g.each(function(b,d){if(h[d.src]===c){var e=0,f=3;(function g(){if(d.height||d.width||e>f)return i(d);e+=1,z.timers.img[d.src]=setTimeout(g,700)})(),a(d).bind("error"+F+" load"+F,function(){i(this)}),h[d.src]=d}})}var f=G.content;if(!z.rendered||!b)return e;a.isFunction(b)&&(b=b.call(s,H.event,z)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),z.rendered<0?E.queue("fx",g):(D=0,g(a.noop));return z}function O(b,c){var d=G.title;if(!z.rendered||!b)return e;a.isFunction(b)&&(b=b.call(s,H.event,z));if(b===e)return K(e);b.jquery&&b.length>0?d.empty().append(b.css({display:"block"})):d.html(b),z.redraw(),c!==e&&z.rendered&&E.is(":visible")&&z.reposition(H.event)}function N(a){var b=G.button,c=G.title;if(!z.rendered)return e;a?(c||M(),L()):b.remove()}function M(){var b=B+"-title";G.titlebar&&K(),G.titlebar=a("<div />",{"class":k+"-titlebar "+(t.style.widget?"ui-widget-header":"")}).append(G.title=a("<div />",{id:b,"class":k+"-title","aria-atomic":d})).insertBefore(G.content).delegate(".ui-tooltip-close","mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}).delegate(".ui-tooltip-close","mouseover mouseout",function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseover")}),t.content.title.button?L():z.rendered&&z.redraw()}function L(){var b=t.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";G.button&&G.button.remove(),b.jquery?G.button=b:G.button=a("<a />",{"class":"ui-state-default ui-tooltip-close "+(t.style.widget?"":k+"-icon"),title:d,"aria-label":d}).prepend(a("<span />",{"class":"ui-icon ui-icon-close",html:"×"})),G.button.appendTo(G.titlebar).attr("role","button").click(function(a){E.hasClass(m)||z.hide(a);return e}),z.redraw()}function K(a){G.title&&(G.titlebar.remove(),G.titlebar=G.title=G.button=f,a!==e&&z.reposition())}function J(){var a=t.style.widget;E.toggleClass(l,a).toggleClass(o,!a),G.content.toggleClass(l+"-content",a),G.titlebar&&G.titlebar.toggleClass(l+"-header",a),G.button&&G.button.toggleClass(k+"-icon",!a)}function I(a){var b=0,c,d=t,e=a.split(".");while(d=d[e[b++]])b<e.length&&(c=d);return[c||t,e.pop()]}var z=this,A=document.body,B=k+"-"+w,C=0,D=0,E=a(),F=".qtip-"+w,G,H;z.id=w,z.rendered=e,z.elements=G={target:s},z.timers={img:{}},z.options=t,z.checks={},z.plugins={},z.cache=H={event:{},target:a(),disabled:e,attr:y},z.checks.builtin={"^id$":function(b,c,f){var h=f===d?g.nextid:f,i=k+"-"+h;h!==e&&h.length>0&&!a("#"+i).length&&(E[0].id=i,G.content[0].id=i+"-content",G.title[0].id=i+"-title")},"^content.text$":function(a,b,c){P(c)},"^content.title.text$":function(a,b,c){if(!c)return K();!G.title&&c&&M(),O(c)},"^content.title.button$":function(a,b,c){N(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new h.Corner(c))},"^position.container$":function(a,b,c){z.rendered&&E.appendTo(c)},"^show.ready$":function(){z.rendered?z.toggle(d):z.render(1)},"^style.classes$":function(a,b,c){E.attr("class",k+" qtip ui-helper-reset "+c)},"^style.widget|content.title":J,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){E[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var a=t.position;E.attr("tracking",a.target==="mouse"&&a.adjust.mouse),R(),Q()}},a.extend(z,{render:function(b){if(z.rendered)return z;var c=t.content.text,f=t.content.title.text,g=t.position,i=a.Event("tooltiprender");a.attr(s[0],"aria-describedby",B),E=G.tooltip=a("<div/>",{id:B,"class":k+" qtip ui-helper-reset "+o+" "+t.style.classes+" "+k+"-pos-"+t.position.my.abbrev(),width:t.style.width||"",height:t.style.height||"",tracking:g.target==="mouse"&&g.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":B+"-content","aria-hidden":d}).toggleClass(m,H.disabled).data("qtip",z).appendTo(t.position.container).append(G.content=a("<div />",{"class":k+"-content",id:B+"-content","aria-atomic":d})),z.rendered=-1,C=D=1,f&&(M(),a.isFunction(f)||O(f,e)),a.isFunction(c)||P(c,e),z.rendered=d,J(),a.each(t.events,function(b,c){a.isFunction(c)&&E.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(h,function(){this.initialize==="render"&&this(z)}),Q(),E.queue("fx",function(a){i.originalEvent=H.event,E.trigger(i,[z]),C=D=0,z.redraw(),(t.show.ready||b)&&z.toggle(d,H.event),a()});return z},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:E.outerHeight(),width:E.outerWidth()};break;case"offset":b=h.offset(E,t.position.container);break;default:c=I(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(b,c){function m(a,b){var c,d,e;for(c in k)for(d in k[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),k[c][d].apply(z,b)}var g=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,h=/^content\.(title|attr)|style/i,i=e,j=e,k=z.checks,l;"string"===typeof b?(l=b,b={},b[l]=c):b=a.extend(d,{},b),a.each(b,function(c,d){var e=I(c.toLowerCase()),f;f=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,f],i=g.test(c)||i,j=h.test(c)||j}),x(t),C=D=1,a.each(b,m),C=D=0,E.is(":visible")&&z.rendered&&(i&&z.reposition(t.position.target==="mouse"?f:H.event),j&&z.redraw());return z},toggle:function(b,c){function q(){b?(E.css("overflow",""),"string"===typeof h.autofocus&&a(h.autofocus,E).focus(),p=a.Event("tooltipvisible"),p.originalEvent=c?H.event:f,E.trigger(p,[z]),h.target.trigger("qtip-"+w+"-inactive")):E.css({display:"",visibility:"",opacity:"",left:"",top:""})}if(!z.rendered)return b?z.render(1):z;var g=b?"show":"hide",h=t[g],j=E.is(":visible"),k=!c||t[g].target.length<2||H.target[0]===c.target,l=t.position,m=t.content,o,p;(typeof b).search("boolean|number")&&(b=!j);if(!E.is(":animated")&&j===b&&k)return z;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(H.event.type)&&c.target===t.show.target[0]&&E.has(c.relatedTarget).length)return z;H.event=a.extend({},c)}p=a.Event("tooltip"+g),p.originalEvent=c?H.event:f,E.trigger(p,[z,90]);if(p.isDefaultPrevented())return z;a.attr(E[0],"aria-hidden",!b),b?(H.origin=a.extend({},i),z.focus(c),a.isFunction(m.text)&&P(m.text,e),a.isFunction(m.title.text)&&O(m.title.text,e),!v&&l.target==="mouse"&&l.adjust.mouse&&(a(document).bind("mousemove.qtip",function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),v=d),z.reposition(c),(p.solo=!!h.solo)&&a(n,h.solo).not(E).qtip("hide",p)):(clearTimeout(z.timers.show),delete H.origin,v&&!a(n+'[tracking="true"]:visible',h.solo).not(E).length&&(a(document).unbind("mousemove.qtip"),v=e),z.blur(c)),k&&E.stop(0,1),h.effect===e?(E[g](),q.call(E)):a.isFunction(h.effect)?(h.effect.call(E,z),E.queue("fx",function(a){q(),a()})):E.fadeTo(90,b?1:0,q),b&&h.target.trigger("qtip-"+w+"-inactive");return z},show:function(a){return z.toggle(d,a)},hide:function(a){return z.toggle(e,a)},focus:function(b){if(!z.rendered)return z;var c=a(n),d=parseInt(E[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;E.hasClass(p)||(i=a.Event("tooltipfocus"),i.originalEvent=f,E.trigger(i,[z,e]),i.isDefaultPrevented()||(d!==e&&(c.each(function(){this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)}),c.filter("."+p).qtip("blur",f)),E.addClass(p)[0].style.zIndex=e));return z},blur:function(b){var c=a.extend({},b),d;E.removeClass(p),d=a.Event("tooltipblur"),d.originalEvent=c,E.trigger(d,[z]);return z},reposition:function(c,d){if(!z.rendered||C)return z;C=1;var f=t.position.target,g=t.position,j=g.my,l=g.at,m=g.adjust,n=m.method.split(" "),o=E.outerWidth(),p=E.outerHeight(),q=0,r=0,s=a.Event("tooltipmove"),u=E.css("position")==="fixed",v=g.viewport,w={left:0,top:0},x=g.container,y=e,B=z.plugins.tip,D={horizontal:n[0],vertical:n[1]=n[1]||n[0],enabled:v.jquery&&f[0]!==b&&f[0]!==A&&m.method!=="none",left:function(a){var b=D.horizontal==="shift",c=-x.offset.left+v.offset.left+v.scrollLeft,d=j.x==="left"?o:j.x==="right"?-o:-o/2,e=l.x==="left"?q:l.x==="right"?-q:-q/2,f=B&&B.size?B.size.width||0:0,g=B&&B.corner&&B.corner.precedance==="x"&&!b?f:0,h=c-a+g,i=a+o-v.width-c+g,k=d-(j.precedance==="x"||j.x===j.y?e:0),n=j.x==="center";b?(g=B&&B.corner&&B.corner.precedance==="y"?f:0,k=(j.x==="left"?1:-1)*d-g,w.left+=h>0?h:i>0?-i:0,w.left=Math.max(-x.offset.left+v.offset.left+(g&&B.corner.x==="center"?B.offset:0),a-k,Math.min(Math.max(-x.offset.left+v.offset.left+v.width,a+k),w.left))):(h>0&&(j.x!=="left"||i>0)?w.left-=k:i>0&&(j.x!=="right"||h>0)&&(w.left-=n?-k:k),w.left!==a&&n&&(w.left-=m.x),w.left<c&&-w.left>i&&(w.left=a));return w.left-a},top:function(a){var b=D.vertical==="shift",c=-x.offset.top+v.offset.top+v.scrollTop,d=j.y==="top"?p:j.y==="bottom"?-p:-p/2,e=l.y==="top"?r:l.y==="bottom"?-r:-r/2,f=B&&B.size?B.size.height||0:0,g=B&&B.corner&&B.corner.precedance==="y"&&!b?f:0,h=c-a+g,i=a+p-v.height-c+g,k=d-(j.precedance==="y"||j.x===j.y?e:0),n=j.y==="center";b?(g=B&&B.corner&&B.corner.precedance==="x"?f:0,k=(j.y==="top"?1:-1)*d-g,w.top+=h>0?h:i>0?-i:0,w.top=Math.max(-x.offset.top+v.offset.top+(g&&B.corner.x==="center"?B.offset:0),a-k,Math.min(Math.max(-x.offset.top+v.offset.top+v.height,a+k),w.top))):(h>0&&(j.y!=="top"||i>0)?w.top-=k:i>0&&(j.y!=="bottom"||h>0)&&(w.top-=n?-k:k),w.top!==a&&n&&(w.top-=m.y),w.top<0&&-w.top>i&&(w.top=a));return w.top-a}},F;if(a.isArray(f)&&f.length===2)l={x:"left",y:"top"},w={left:f[0],top:f[1]};else if(f==="mouse"&&(c&&c.pageX||H.event.pageX))l={x:"left",y:"top"},c=(c&&(c.type==="resize"||c.type==="scroll")?H.event:c&&c.pageX&&c.type==="mousemove"?c:i&&i.pageX&&(m.mouse||!c||!c.pageX)?{pageX:i.pageX,pageY:i.pageY}:!m.mouse&&H.origin&&H.origin.pageX?H.origin:c)||c||H.event||i||{},w={top:c.pageY,left:c.pageX};else{f==="event"?c&&c.target&&c.type!=="scroll"&&c.type!=="resize"?f=H.target=a(c.target):f=H.target:H.target=a(f),f=a(f).eq(0);if(f.length===0)return z;f[0]===document||f[0]===b?(q=h.iOS?b.innerWidth:f.width(),r=h.iOS?b.innerHeight:f.height(),f[0]===b&&(w={top:u||h.iOS?(v||f).scrollTop():0,left:u||h.iOS?(v||f).scrollLeft():0})):f.is("area")&&h.imagemap?w=h.imagemap(f,l,D.enabled?n:e):f[0].namespaceURI==="http://www.w3.org/2000/svg"&&h.svg?w=h.svg(f,l):(q=f.outerWidth(),r=f.outerHeight(),w=h.offset(f,x)),w.offset&&(q=w.width,r=w.height,y=w.flipoffset,w=w.offset);if(h.iOS<4.1&&h.iOS>3.1||h.iOS==4.3||!h.iOS&&u)F=a(b),w.left-=F.scrollLeft(),w.top-=F.scrollTop();w.left+=l.x==="right"?q:l.x==="center"?q/2:0,w.top+=l.y==="bottom"?r:l.y==="center"?r/2:0}w.left+=m.x+(j.x==="right"?-o:j.x==="center"?-o/2:0),w.top+=m.y+(j.y==="bottom"?-p:j.y==="center"?-p/2:0),D.enabled?(v={elem:v,height:v[(v[0]===b?"h":"outerH")+"eight"](),width:v[(v[0]===b?"w":"outerW")+"idth"](),scrollLeft:u?0:v.scrollLeft(),scrollTop:u?0:v.scrollTop(),offset:v[0]!==window&&v.offset()||{left:0,top:0}},x={elem:x,scrollLeft:x.scrollLeft(),scrollTop:x.scrollTop(),offset:x.offset()||{left:0,top:0}},w.adjusted={left:D.horizontal!=="none"?D.left(w.left):0,top:D.vertical!=="none"?D.top(w.top):0},w.adjusted.left+w.adjusted.top&&E.attr("class",E[0].className.replace(/ui-tooltip-pos-\w+/i,k+"-pos-"+j.abbrev())),y&&w.adjusted.left&&(w.left+=y.left),y&&w.adjusted.top&&(w.top+=y.top)):w.adjusted={left:0,top:0},s.originalEvent=a.extend({},c),E.trigger(s,[z,w,v.elem||v]);if(s.isDefaultPrevented())return z;delete w.adjusted,d===e||isNaN(w.left)||isNaN(w.top)||f==="mouse"||!a.isFunction(g.effect)?E.css(w):a.isFunction(g.effect)&&(g.effect.call(E,z,a.extend({},w)),E.queue(function(b){a(this).css({opacity:"",height:""}),b()})),C=0;return z},redraw:function(){if(z.rendered<1||D)return z;var a=t.position.container,b,c,d,e;D=1,t.style.height&&E.css("height",t.style.height),t.style.width?E.css("width",t.style.width):(E.css("width","").addClass(r),c=E.width()+1,d=E.css("max-width")||"",e=E.css("min-width")||"",b=(d+e).indexOf("%")>-1?a.width()/100:0,d=(d.indexOf("%")>-1?b:1)*parseInt(d,10)||c,e=(e.indexOf("%")>-1?b:1)*parseInt(e,10)||0,c=d+e?Math.min(Math.max(c,e),d):c,E.css("width",Math.round(c)).removeClass(r)),D=0;return z},disable:function(b){"boolean"!==typeof b&&(b=!E.hasClass(m)&&!H.disabled),z.rendered?(E.toggleClass(m,b),a.attr(E[0],"aria-disabled",b)):H.disabled=!!b;return z},enable:function(){return z.disable(e)},destroy:function(){var b=s[0],c=a.attr(b,u),d=s.data("qtip");z.rendered&&(E.remove(),a.each(z.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(z.timers.show),clearTimeout(z.timers.hide),R();if(!d||z===d)a.removeData(b,"qtip"),t.suppress&&c&&(a.attr(b,"title",c),s.removeAttr(u)),s.removeAttr("aria-describedby");s.unbind(".qtip-"+w),delete j[z.id];return s}})}function x(b){var c;if(!b||"object"!==typeof b)return e;if(b.metadata===f||"object"!==typeof b.metadata)b.metadata={type:b.metadata};if("content"in b){if(b.content===f||"object"!==typeof b.content||b.content.jquery)b.content={text:b.content};c=b.content.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.text=e);if("title"in b.content){if(b.content.title===f||"object"!==typeof b.content.title)b.content.title={text:b.content.title};c=b.content.title.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.title.text=e)}}if("position"in b)if(b.position===f||"object"!==typeof b.position)b.position={my:b.position,at:b.position};if("show"in b)if(b.show===f||"object"!==typeof b.show)b.show.jquery?b.show={target:b.show}:b.show={event:b.show};if("hide"in b)if(b.hide===f||"object"!==typeof b.hide)b.hide.jquery?b.hide={target:b.hide}:b.hide={event:b.hide};if("style"in b)if(b.style===f||"object"!==typeof b.style)b.style={classes:b.style};a.each(h,function(){this.sanitize&&this.sanitize(b)});return b}function w(){w.history=w.history||[],w.history.push(arguments);if("object"===typeof console){var a=console[console.warn?"warn":"log"],b=Array.prototype.slice.call(arguments),c;typeof arguments[0]==="string"&&(b[0]="qTip2: "+b[0]),c=a.apply?a.apply(console,b):a(b)}}"use strict";var d=!0,e=!1,f=null,g,h,i,j={},k="ui-tooltip",l="ui-widget",m="ui-state-disabled",n="div.qtip."+k,o=k+"-default",p=k+"-focus",q=k+"-hover",r=k+"-fluid",s="-31000px",t="_replacedByqTip",u="oldtitle",v;g=a.fn.qtip=function(b,h,i){var j=(""+b).toLowerCase(),k=f,l=a.makeArray(arguments).slice(1),m=l[l.length-1],n=this[0]?a.data(this[0],"qtip"):f;if(!arguments.length&&n||j==="api")return n;if("string"===typeof b){this.each(function(){var b=a.data(this,"qtip");if(!b)return d;m&&m.timeStamp&&(b.cache.event=m);if(j!=="option"&&j!=="options"||!h)b[j]&&b[j].apply(b[j],l);else if(a.isPlainObject(h)||i!==c)b.set(h,i);else{k=b.get(h);return e}});return k!==f?k:this}if("object"===typeof b||!arguments.length){n=x(a.extend(d,{},b));return g.bind.call(this,n,m)}},g.bind=function(b,f){return this.each(function(k){function r(b){function d(){p.render(typeof b==="object"||l.show.ready),m.show.add(m.hide).unbind(o)}if(p.cache.disabled)return e;p.cache.event=a.extend({},b),p.cache.target=b?a(b.target):[c],l.show.delay>0?(clearTimeout(p.timers.show),p.timers.show=setTimeout(d,l.show.delay),n.show!==n.hide&&m.hide.bind(n.hide,function(){clearTimeout(p.timers.show)})):d()}var l,m,n,o,p,q;q=a.isArray(b.id)?b.id[k]:b.id,q=!q||q===e||q.length<1||j[q]?g.nextid++:j[q]=q,o=".qtip-"+q+"-create",p=z.call(this,q,b);if(p===e)return d;l=p.options,a.each(h,function(){this.initialize==="initialize"&&this(p)}),m={show:l.show.target,hide:l.hide.target},n={show:a.trim(""+l.show.event).replace(/ /g,o+" ")+o,hide:a.trim(""+l.hide.event).replace(/ /g,o+" ")+o},/mouse(over|enter)/i.test(n.show)&&!/mouse(out|leave)/i.test(n.hide)&&(n.hide+=" mouseleave"+o),m.show.bind("mousemove"+o,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),m.show.bind(n.show,r),(l.show.ready||l.prerender)&&r(f)})},h=g.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();var b=a.charAt(0);this.precedance=b==="t"||b==="b"?"y":"x",this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y},this.abbrev=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b},this.clone=function(){return{x:this.x,y:this.y,precedance:this.precedance,string:this.string,abbrev:this.abbrev,clone:this.clone}}},offset:function(a,b){function i(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}var c=a.offset(),d=b,e=0,f=document.body,g,h;if(d){do{d.css("position")!=="static"&&(g=d[0]===f?{left:parseInt(d.css("left"),10)||0,top:parseInt(d.css("top"),10)||0}:d.position(),c.left-=g.left+(parseInt(d.css("borderLeftWidth"),10)||0)+(parseInt(d.css("marginLeft"),10)||0),c.top-=g.top+(parseInt(d.css("borderTopWidth"),10)||0),h=d.css("overflow"),(h==="scroll"||h==="auto")&&++e);if(d[0]===f)break}while(d=d.offsetParent());b[0]!==f&&e&&i(b,1)}return c},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||e,fn:{attr:function(b,c){if(this.length){var d=this[0],e="title",f=a.data(d,"qtip");if(b===e&&f&&"object"===typeof f&&f.options.suppress){if(arguments.length<2)return a.attr(d,u);f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c);return this.attr(u,c)}}return a.fn["attr"+t].apply(this,arguments)},clone:function(b){var c=a([]),d="title",e=a.fn["clone"+t].apply(this,arguments);b||e.filter("["+u+"]").attr("title",function(){return a.attr(this,u)}).removeAttr(u);return e},remove:a.ui?f:function(b,c){a.ui||a(this).each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}},a.each(h.fn,function(b,c){if(!c||a.fn[b+t])return d;var e=a.fn[b+t]=a.fn[b];a.fn[b]=function(){return c.apply(this,arguments)||e.apply(this,arguments)}}),g.version="nightly",g.nextid=0,g.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),g.zindex=15e3,g.defaults={prerender:e,id:e,overwrite:d,suppress:d,content:{text:d,attr:"title",title:{text:e,button:e}},position:{my:"top left",at:"bottom right",target:e,container:e,viewport:e,adjust:{x:0,y:0,mouse:d,resize:d,method:"flip flip"},effect:function(b,c,d){a(this).animate(c,{duration:200,queue:e})}},show:{target:e,event:"mouseenter",effect:d,delay:90,solo:e,ready:e,autofocus:e},hide:{target:e,event:"mouseleave",effect:d,delay:0,fixed:e,inactive:e,leave:"window",distance:e},style:{classes:"",widget:e,width:e,height:e},events:{render:f,move:f,show:f,hide:f,toggle:f,visible:f,focus:f,blur:f}},h.svg=function(b,c){var d=a(document),e=b[0],f={width:0,height:0,offset:{top:1e10,left:1e10}},g,h,i,j,k;if(e.getBBox&&e.parentNode){g=e.getBBox(),h=e.getScreenCTM(),i=e.farthestViewportElement||e;if(!i.createSVGPoint)return f;j=i.createSVGPoint(),j.x=g.x,j.y=g.y,k=j.matrixTransform(h),f.offset.left=k.x,f.offset.top=k.y,j.x+=g.width,j.y+=g.height,k=j.matrixTransform(h),f.width=k.x-f.offset.left,f.height=k.y-f.offset.top,f.offset.left+=d.scrollLeft(),f.offset.top+=d.scrollTop()}return f}})(jQuery,window); /* * Kartograph 0.8.2 - a svg mapping library * Copyright (C) 2011-2013 Gregor Aisch * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * * NOTE, manual modification made: * - removed Function.bind implementation, does not work properly w/ angular 1.6 */ !function(){function t(){var t={},e=[],n=1,o=1;return t.size=function(r){return arguments.length?(o=r,t):o},t.iterations=function(r){return arguments.length?(n=r,t):n},t.add=function(r){return e.push(r),t},t.means=function(){for(var t=[],i={},a=Math.min(o,e.length),s=0,l=2*a;l>s;s++){var u=e[~~(Math.random()*e.length)],p=u.x+"/"+u.y;if(!(p in i)&&(i[p]=1,t.push({x:u.x,y:u.y})>=a))break}a=t.length;for(var h=0;n>h;h++){for(var c=r().points(t),s=0;a>s;s++){var f=t[s];f.sumX=0,f.sumY=0,f.size=0,f.points=[],f.indices=[]}for(var s=0;s<e.length;s++){var d=e[s],f=c.find(d);f.sumX+=d.x,f.sumY+=d.y,f.size++,f.points.push(d),f.indices.push(s)}for(var s=0;a>s;s++){var f=t[s];f.size&&(f.x=f.sumX/f.size,f.y=f.sumY/f.size)}}return t},t}function r(){function t(r,n){if(r.length){var o=a[n%a.length],i=r.length>>1;return r.sort(e(o)),{axis:o,point:r[i],left:t(r.slice(0,i),n+1),right:t(r.slice(i+1),n+1)}}}function r(t,r){for(var e=0,n=0;n<a.length;n++){var o=a[n],i=t[o]-r[o];e+=i*i}return e}function e(t){return function(r,e){return r=r[t],e=e[t],e>r?-1:r>e?1:0}}function n(t,e,o){if(r(t.point,e)<r(o.point,e)&&(o=t),t.left&&(o=n(t.left,e,o)),t.right){var i=t.point[t.axis]-e[t.axis];i*i<r(o.point,e)&&(o=n(t.right,e,o))}return o}var o,i={},a=["x","y"],s=[];return i.axes=function(t){return arguments.length?(a=t,i):a},i.points=function(t){return arguments.length?(s=t,o=null,i):s},i.find=function(t){return n(i.root(),t,o).point},i.root=function(){return o||(o=t(s,0))},i}var e,n,o,i,a,l,u,p,h,c,f,d,y,v,g,_,b,x,w,M,P,C,j,A,B,L,S,k,I,N,G,z,E,T,R,F,V,O,H,X,q,D,U,Q,Y,W,Z,$,K,J,tr,rr,er,nr,or,ir,ar,sr,lr,ur,pr,hr,cr,fr,dr,yr,mr,vr,gr,_r,br,xr,wr,Mr,Pr,Cr,jr,Ar,Br,Lr,Sr,kr,Ir,Nr,Gr,zr,Er,Tr,Rr,Fr,Vr,Or,Hr,Xr,qr,Dr,Ur,Qr,Yr,Wr,Zr,$r,Kr,Jr,te,re,ee,ne,oe,ie={}.hasOwnProperty,ae=function(t,r){function e(){this.constructor=t}for(var n in r)ie.call(r,n)&&(t[n]=r[n]);return e.prototype=r.prototype,t.prototype=new e,t.__super__=r.prototype,t},se=function(t,r){return function(){return t.apply(r,arguments)}},le=[].indexOf||function(t){for(var r=0,e=this.length;e>r;r++)if(r in this&&this[r]===t)return r;return-1};Br="undefined"!=typeof exports&&null!==exports?exports:this,br=Br.$K=null!=(Rr=Br.kartograph)?Rr:Br.kartograph={},br.version="0.8.1",e=Br.jQuery,br.__verbose=!1,Sr=function(){var t;try{return console.warn.apply(console,arguments)}catch(r){t=r;try{return opera.postError.apply(opera,arguments)}catch(r){return t=r,alert(Array.prototype.join.call(arguments," "))}}},xr=function(){var t;if(br.__verbose)try{return console.debug.apply(console,arguments)}catch(r){t=r;try{return opera.postError.apply(opera,arguments)}catch(r){return t=r,alert(Array.prototype.join.call(arguments," "))}}},null==(Fr=(Er=String.prototype).trim)&&(Er.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){"use strict";if(null==this)throw new TypeError;var r=Object(this),e=r.length>>>0;if(0===e)return-1;var n=0;if(arguments.length>0&&(n=Number(arguments[1]),n!=n?n=0:0!=n&&1/0!=n&&n!=-1/0&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=e)return-1;for(var o=n>=0?n:Math.max(e-Math.abs(n),0);e>o;o++)if(o in r&&r[o]===t)return o;return-1}),zr=function(){var t,r,e,n,o;for(t={},o="Boolean Number String Function Array Date RegExp Undefined Null".split(" "),e=0,n=o.length;n>e;e++)r=o[e],t["[object "+r+"]"]=r.toLowerCase();return function(r){var e;return e=Object.prototype.toString.call(r),t[e]||"object"}}(),i=function(){function t(t,r,e,n){var o;null==t&&(t=0),null==r&&(r=0),null==e&&(e=null),null==n&&(n=null),o=this,null===e?(o.xmin=Number.MAX_VALUE,o.xmax=-1*Number.MAX_VALUE):(o.xmin=o.left=t,o.xmax=o.right=t+e,o.width=e),null===n?(o.ymin=Number.MAX_VALUE,o.ymax=-1*Number.MAX_VALUE):(o.ymin=o.top=r,o.ymax=o.bottom=n+r,o.height=n)}return t.prototype.update=function(t,r){var e;return null==r&&(r=t[1],t=t[0]),e=this,e.xmin=Math.min(e.xmin,t),e.ymin=Math.min(e.ymin,r),e.xmax=Math.max(e.xmax,t),e.ymax=Math.max(e.ymax,r),e.left=e.xmin,e.top=e.ymin,e.right=e.xmax,e.bottom=e.ymax,e.width=e.xmax-e.xmin,e.height=e.ymax-e.ymin,this},t.prototype.intersects=function(t){return t.left<s.right&&t.right>s.left&&t.top<s.bottom&&t.bottom>s.top},t.prototype.inside=function(t,r){var e;return e=this,t>=e.left&&t<=e.right&&r>=e.top&&r<=e.bottom},t.prototype.join=function(t){var r;return r=this,r.update(t.left,t.top),r.update(t.right,t.bottom),this},t}(),i.fromXML=function(t){var r,e,n,o;return n=Number(t.getAttribute("x")),o=Number(t.getAttribute("y")),e=Number(t.getAttribute("w")),r=Number(t.getAttribute("h")),new br.BBox(n,o,e,r)},br.BBox=i,null==(Zr=br.geom)&&(br.geom={}),null==(Kr=(Tr=br.geom).clipping)&&(Tr.clipping={}),d=function(){function t(){}var r,e,n,o,i;return e=0,n=1,o=2,r=4,i=8,t.prototype.compute_out_code=function(t,r,e){var n,o;return o=this,n=o.INSIDE,r<t.left?n|=o.LEFT:r>t.right&&(n|=o.RIGHT),e<t.top?n|=o.TOP:e>t.bottom&&(n|=o.BOTTOM),n},t.prototype.clip=function(t,r,e,n,o){var i,a,s,l,u,p,h;for(u=this,a=u.compute_out_code(t,r,e),s=u.compute_out_code(t,n,o),i=False;True;){if(!(a|s)){i=True;break}if(a&s)break;l=0===code?s:a,l&u.TOP?(p=r+(n-r)*(t.top-e)/(o-e),h=t.top):l&u.BOTTOM?(p=r+(n-r)*(t.bottom-e)/(o-e),h=t.bottom):l&u.RIGHT?(h=e+(o-e)*(t.right-r)/(n-r),p=t.right):l&u.LEFT&&(h=e+(o-e)*(t.left-r)/(n-r),p=t.left),l===a?(r=p,e=h,a=u.compute_out_code(t,r,e)):(n=p,o=h,s=u.compute_out_code(t,n,o))}return i?[r,e,n,o]:null},t}(),br.geom.clipping.CohenSutherland=d,S=function(){function t(t,r,n){var o,i;i=this,i.container=o=e(t),null==r&&(r=o.width()),null==n&&(n=o.height()),0===n&&(n="auto"),i.size={h:n,w:r},i.markers=[],i.pathById={},i.container.addClass("kartograph")}return t.prototype.createSVGLayer=function(t){var r,n,o,i,a,s,l,u;return i=this,null==(u=i._layerCnt)&&(i._layerCnt=0),o=i._layerCnt++,l=i.viewport,n=i.container,a=Raphael(n[0],l.width,l.height),s=e(a.canvas),s.css({position:"absolute",top:"0px",left:"0px","z-index":o+5}),"static"===n.css("position")&&n.css({position:"relative",height:l.height+"px"}),s.addClass(t),r=e("desc",a.canvas).text(),e("desc",a.canvas).text(r.replace("with ","with kartograph "+br.version+" and ")),a},t.prototype.createHTMLLayer=function(t){var r,n,o,i,a,s;return i=this,a=i.viewport,r=i.container,null==(s=i._layerCnt)&&(i._layerCnt=0),o=i._layerCnt++,n=e('<div class="layer '+t+'" />'),n.css({position:"absolute",top:"0px",left:"0px",width:a.width+"px",height:a.height+"px","z-index":o+5}),r.append(n),n},t.prototype.load=function(t,r,n){var o,i,a,s;return i=this,o=e.Deferred(),i.clear(),i.opts=null!=n?n:{},null==(s=(a=i.opts).zoom)&&(a.zoom=1),i.mapLoadCallback=r,i._loadMapDeferred=o,i._lastMapUrl=t,i.cacheMaps&&null!=br.__mapCache[t]?i._mapLoaded(br.__mapCache[t]):e.ajax({url:t,dataType:"text",success:i._mapLoaded,context:i,error:function(t,r,e){return Sr(t,r,e)}}),o.promise()},t.prototype.loadMap=function(){return this.load.apply(this,arguments)},t.prototype.setMap=function(t,r){var e,n,o;e=this,e.opts=null!=r?r:{},null==(o=(n=e.opts).zoom)&&(n.zoom=1),e._lastMapUrl="string",e._mapLoaded(t)},t.prototype._mapLoaded=function(t){var r,n,o,a,s,l,u,p,h,c,f,d,y,m,v,g,_;l=this,l.cacheMaps&&(null==(y=br.__mapCache)&&(br.__mapCache={}),br.__mapCache[l._lastMapUrl]=t);try{t=e(t)}catch(b){return o=b,Sr("something went horribly wrong while parsing svg"),l._loadMapDeferred.reject("could not parse svg"),void 0}l.svgSrc=t,r=e("view",t),null==l.paper&&(f=l.size.w,a=l.size.h,"auto"===a&&(p=r.attr("w")/r.attr("h"),a=f/p),l.viewport=new i(0,0,f,a)),c=l.viewport,l.viewAB=n=br.View.fromXML(r[0]),u=null!=(m=l.opts.padding)?m:0,s=null!=(v=l.opts.halign)?v:"center",h=null!=(g=l.opts.valign)?g:"center",d=null!=(_=l.opts.zoom)?_:1,l.viewBC=new br.View(l.viewAB.asBBox(),c.width*d,c.height*d,u,s,h),l.proj=br.Proj.fromXML(e("proj",r)[0]),null!=l.mapLoadCallback&&l.mapLoadCallback(l),null!=l._loadMapDeferred&&l._loadMapDeferred.resolve(l)},t.prototype.addLayer=function(t,r){var n,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_;return null==r&&(r={}),u=this,null==(v=u.layerIds)&&(u.layerIds=[]),null==(g=u.layers)&&(u.layers={}),null==u.paper&&(u.paper=u.createSVGLayer()),d=t,"object"===zr(r)?(s=r.name,c=r.key,m=r.title):r={},l=u.paper,r.add_svg_layer&&(l=u.createSVGLayer()),null==s&&(s=d),y=e("#"+d,u.svgSrc),0!==y.length?(a=new V(s,c,u,r.filter,l),n=e("*",y[0]),f=n.length,o=null!=(_=r.chunks)?_:f,i=0,h=function(){var t,e,s,l,u,c;for(t=o*i,e=u=0;o>=0?o>u:u>o;e=o>=0?++u:--u)f>t+e&&a.addPath(n.get(t+e),m);if(null!=r.styles){c=r.styles;for(s in c)l=c[s],a.style(s,l)}return i++,f>i*o?setTimeout(h,0):p()},p=function(){var t,e,n,o;for(a.paths.length>0&&(u.layers[s]=a,u.layerIds.push(s)),t=["click","mouseenter","mouseleave","dblclick","mousedown","mouseup","mouseover","mouseout"],n=0,o=t.length;o>n;n++)e=t[n],"function"===zr(r[e])&&a.on(e,r[e]);return null!=r.tooltips&&a.tooltips(r.tooltips),null!=r.done?r.done():void 0},null!=r.chunks?setTimeout(h,0):h(),u):void 0},t.prototype.getLayer=function(t){var r;return r=this,null==r.layers[t]?(Sr("could not find layer "+t),null):r.layers[t]},t.prototype.getLayerPath=function(t,r){var e,n;return n=this,e=n.getLayer(t),null!=e?"object"===zr(r)?e.getPaths(r)[0]:e.getPath(r):null},t.prototype.onLayerEvent=function(t,r,e){var n;return n=this,n.getLayer(e).on(t,r),n},t.prototype.addMarker=function(t){var r,e;return r=this,r.markers.push(t),e=r.viewBC.project(r.viewAB.project(r.proj.project(t.lonlat.lon,t.lonlat.lat))),t.render(e[0],e[1],r.container,r.paper)},t.prototype.clearMarkers=function(){var t,r,e,n,o;for(r=this,o=r.markers,e=0,n=o.length;n>e;e++)t=o[e],t.clear();return r.markers=[]},t.prototype.fadeIn=function(t){var r,e,n,o,i,a,s,l,u,p,h;null==t&&(t={}),i=this,o=null!=(l=t.layer)?l:i.layerIds[i.layerIds.length-1],e=null!=(u=t.duration)?u:500,p=i.layers[o].pathsById,h=[];for(n in p)s=p[n],h.push(function(){var t,n,o;for(o=[],t=0,n=s.length;n>t;t++)a=s[t],r="function"===zr(e)?e(a.data):e,a.svgPath.attr("opacity",0),o.push(a.svgPath.animate({opacity:1},r));return o}());return h},t.prototype.loadCoastline=function(){var t;return t=this,e.ajax({url:"coastline.json",success:t.renderCoastline,context:t})},t.prototype.resize=function(t,r){var e,n,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g;a=this,e=a.container,null==t&&(t=e.width()),null==r&&(r=e.height()),a.viewport=p=new br.BBox(0,0,t,r),null!=a.paper&&a.paper.setSize(p.width,p.height),p=a.viewport,s=null!=(d=a.opts.padding)?d:0,n=null!=(y=a.opts.halign)?y:"center",u=null!=(m=a.opts.valign)?m:"center",h=a.opts.zoom,a.viewBC=new br.View(a.viewAB.asBBox(),p.width*h,p.height*h,s,n,u),v=a.layers;for(o in v)i=v[o],i.setView(a.viewBC);if(null!=a.symbolGroups)for(g=a.symbolGroups,c=0,f=g.length;f>c;c++)l=g[c],l.onResize()},t.prototype.lonlat2xy=function(t){var r,e;return e=this,2===t.length&&(t=new br.LonLat(t[0],t[1])),3===t.length&&(t=new br.LonLat(t[0],t[1],t[2])),r=e.proj.project(t.lon,t.lat,t.alt),e.viewBC.project(e.viewAB.project(r))},t.prototype.addSymbolGroup=function(t){var r,e;return r=this,null==(e=r.symbolGroups)&&(r.symbolGroups=[]),r.symbolGroups.push(t)},t.prototype.removeSymbols=function(t){var r,e,n,o,i,a;if(r=this,null!=t)return r.symbolGroups[t].remove();for(i=r.symbolGroups,a=[],n=0,o=i.length;o>n;n++)e=i[n],a.push(e.remove());return a},t.prototype.clear=function(){var t,r,n,o,i,a;if(r=this,null!=r.layers){for(t in r.layers)r.layers[t].remove();r.layers={},r.layerIds=[]}if(null!=r.symbolGroups){for(a=r.symbolGroups,o=0,i=a.length;i>o;o++)n=a[o],n.remove();r.symbolGroups=[]}return null!=r.paper?(e(r.paper.canvas).remove(),r.paper=void 0):void 0},t.prototype.loadCSS=function(t,r){var n;return n=this,Raphael.svg?(e("body").append('<link rel="stylesheet" href="'+t+'" />'),r()):e.ajax({url:t,dataType:"text",success:function(t){return n.styles=br.parsecss(t),r()},error:function(r,e,n){return Sr("error while loading "+t,r,e,n)}})},t.prototype.applyCSS=function(t,r){var e,n,o,i,a,s,l,u,p,h,c,f,d,y,m;if(o=this,null==o.styles)return t;null==(f=o._pathTypes)&&(o._pathTypes=["path","circle","rectangle","ellipse"]),null==(d=o._regardStyles)&&(o._regardStyles=["fill","stroke","fill-opacity","stroke-width","stroke-opacity"]);for(s in o.styles)for(i=s,y=i.split(","),u=0,h=y.length;h>u;u++)if(l=y[u],i=l.split(" "),i=i[i.length-1],i=i.split(":"),!(i.length>1||(i=i[0].split("."),e=i.slice(1),e.length>0&&e.indexOf(r)<0||(i=i[0],o._pathTypes.indexOf(i)>=0&&i!==t.type))))for(a=o.styles[s],m=o._regardStyles,p=0,c=m.length;c>p;p++)n=m[p],null!=a[n]&&t.attr(n,a[n]);return t},t.prototype.style=function(t,r,e,n,o){var i;return i=this,t=i.getLayer(t),null!=t?t.style(r,e,n,o):void 0},t}(),L=br,Br.kartograph=function(t,r,e){return new S(t,r,e)},br.map=function(t,r,e){return new S(t,r,e)},br.__mapCache={},e.extend(Br.kartograph,L),R=function(){function t(t,r,e){null==e&&(e=0),this.lon=Number(t),this.lat=Number(r),this.alt=Number(e)}return t.prototype.distance=function(t){var r,e,n,o,i,a,s,l,u;return u=this,r=6371,a=Math.PI/180,o=(t.lat-u.lat)*a,i=(t.lon-u.lon)*a,s=u.lat*a,l=t.lat*a,e=Math.sin(o/2)*Math.sin(o/2)+Math.sin(i/2)*Math.sin(i/2)*Math.cos(s)*Math.cos(l),n=2*Math.atan2(Math.sqrt(e),Math.sqrt(1-e)),r*n},t}(),G=function(t){function r(t,e,n){null==n&&(n=0),r.__super__.constructor.call(this,e,t,n)}return ae(r,t),r}(R),br.LonLat=R,br.LatLon=G,V=function(){function t(t,r,e,n,o){var i;i=this,i.id=t,i.path_id=r,i.paper=null!=o?o:e.paper,i.view=e.viewBC,i.map=e,i.filter=n}return t.prototype.addPath=function(t,r){var e,n,o,i,a,s,l;return n=this,null==(a=n.paths)&&(n.paths=[]),e=new O(t,n.id,n,r),"function"===zr(n.filter)&&n.filter(e.data)===!1?(e.remove(),void 0):(n.paths.push(e),null!=n.path_id?(null==(s=n.pathsById)&&(n.pathsById={}),null==(l=(o=n.pathsById)[i=e.data[n.path_id]])&&(o[i]=[]),n.pathsById[e.data[n.path_id]].push(e)):void 0)},t.prototype.hasPath=function(t){var r;return r=this,null!=r.pathsById&&null!=r.pathsById[t]},t.prototype.getPathsData=function(){var t,r,e,n,o,i;for(t=this,e=[],i=t.paths,n=0,o=i.length;o>n;n++)r=i[n],e.push(r.data);return e},t.prototype.getPath=function(t){var r;return r=this,r.hasPath(t)?r.pathsById[t][0]:null},t.prototype.getPaths=function(t){var r,e,n,o,i,a,s,l;if(o=this,n=[],"object"===zr(t))for(l=o.paths,a=0,s=l.length;s>a;a++){i=l[a],e=!0;for(r in t)e=e&&i.data[r]===t[r];e&&n.push(i)}return n},t.prototype.setView=function(t){var r,e,n,o,i;for(r=this,i=r.paths,n=0,o=i.length;o>n;n++)e=i[n],e.setView(t);return r},t.prototype.remove=function(){var t,r,e,n,o,i;for(t=this,o=t.paths,i=[],e=0,n=o.length;n>e;e++)r=o[e],i.push(r.remove());return i},t.prototype.style=function(t,r,e,n){var o,i,a,s,l,u,p,h,c,f,d;if(u=this,"object"===zr(t)){for(l in t)h=t[l],u.style(l,h);return u}for(null==e&&(e=0),null==n&&(n=0),d=u.paths,c=0,f=d.length;f>c;c++)p=d[c],h=jr(r,p.data),s=jr(e,p.data),a=jr(n,p.data),s>0?(i={},i[t]=h,o=Raphael.animation(i,1e3*s),p.svgPath.animate(o.delay(1e3*a))):p.svgPath.attr(t,h);return u},t.prototype.on=function(t,r){var n,o,i,a,s,l,u;for(i=this,n=function(){function t(t,r,e){this.type=t,this.cb=r,this.layer=e,this.handle=se(this.handle,this)}return t.prototype.handle=function(t){var r;return i=this,r=i.layer.map.pathById[t.target.getAttribute("id")],i.cb(r.data,r.svgPath,t)},t}(),o=new n(t,r,i),u=i.paths,s=0,l=u.length;l>s;s++)a=u[s],e(a.svgPath.node).bind(t,o.handle);return i},t.prototype.tooltips=function(t,r){var n,o,i,a,s,l,u;for(n=this,i=function(t,n){var o;return o={position:{target:"mouse",viewport:e(window),adjust:{x:7,y:7}},show:{delay:null!=r?r:20},events:{show:function(t,r){return e(".qtip").filter(function(){return this!==r.elements.tooltip.get(0)}).hide()}},content:{}},null!=n?"string"==typeof n?o.content.text=n:e.isArray(n)&&(o.content.title=n[0],o.content.text=n[1]):o.content.text="n/a",e(t.svgPath.node).qtip(o)},u=n.paths,s=0,l=u.length;l>s;s++)o=u[s],a=jr(t,o.data),i(o,a);return n},t.prototype.sort=function(t){var r,e,n,o,i,a;for(e=this,e.paths.sort(function(r,e){var n,o,i;return n=t(r.data),o=t(e.data),n===o?0:null!=(i=n>o)?i:{1:-1}}),r=!1,a=e.paths,o=0,i=a.length;i>o;o++)n=a[o],r&&n.svgPath.insertAfter(r.svgPath),r=n;return e},t}(),jr=function(t,r){return"function"===zr(t)?t(r):t},wr=0,O=function(){function t(t,r,e,n){var o,i,a,s,l,u,p,h,c,f,d,y,m,v;for(l=this,u=e.paper,s=e.map,d=s.viewBC,l.path=p=br.geom.Path.fromSVG(t),l.vpath=d.projectPath(p),l.svgPath=l.vpath.toSVG(u),l.svgPath.data("path",l),null==s.styles?Raphael.svg&&l.svgPath.node.setAttribute("class",r):s.applyCSS(l.svgPath,r),c="path_"+wr++,l.svgPath.node.setAttribute("id",c),s.pathById[c]=l,i={},a=m=0,v=t.attributes.length-1;v>=0?v>=m:m>=v;a=v>=0?++m:--m)o=t.attributes[a],"data-"===o.name.substr(0,5)&&(f=o.value,y=Number(f),""===f.trim()||y!==f||isNaN(y)||(f=y),i[o.name.substr(5)]=f);l.data=i,"string"===zr(n)?h=n:"function"===zr(n)&&(h=n(i)),null!=h&&l.svgPath.attr("title",h)}return t.prototype.setView=function(t){var r,e,n;return r=this,e=t.projectPath(r.path),r.vpath=e,"path"===r.path.type?(n=e.svgString(),r.svgPath.attr({path:n})):"circle"===r.path.type?r.svgPath.attr({cx:e.x,cy:e.y,r:e.r}):void 0},t.prototype.remove=function(){var t;return t=this,t.svgPath.remove()},t}(),br.parsecss=function(t,r){var e,n,o,i,a,s,l,u;for(i={},t=Mr(t),u=t.split("`b%"),s=0,l=u.length;l>s;s++)if(e=u[s],e=e.split("%b`"),!(e.length<2))if(e[0]=Ar(e[0]),o=Cr(e[1]),null!=i[e[0]])for(n in o)a=o[n],i[e[0]][n]=a;else i[e[0]]=o;return"function"!==zr(r)?i:(r(i),void 0)},Pr={},Cr=function(t){var r,e,n,o,i,a;for(n=Pr[t].replace(/^{|}$/g,""),n=Mr(n),e={},a=n.split(";"),o=0,i=a.length;i>o;o++)r=a[o],r=r.split(":"),r.length<2||(e[Ar(r[0])]=Ar(r.slice(1).join(":")));return e},J=/{[^{}]*}/,rr=/\[[^\[\]]*\]|{[^{}]*}|\([^()]*\)|function(\s+\w+)?(\s*%b`\d+`b%){2}/,tr=/(?:\/\*(?:[^\*]|\*[^\/])*\*\/)|(\\.|"(?:[^\\\"]|\\.|\\\n)*"|'(?:[^\\\']|\\.|\\\n)*')/g,er=/%\w`(\d+)`\w%/,Lr=0,Mr=function(t,r){var e,n,o;for(t=t.replace(tr,function(t,r){var e;return r?(e="%s`"+ ++Lr+"`s%",Pr[Lr]=r.replace(/^\\/,""),e):""}),e=r?rr:J;n=e.exec(t);)o="%b`"+ ++Lr+"`b%",Pr[Lr]=n[0],t=t.replace(e,o);return t},Ar=function(t){var r;if(null==t)return t;for(;r=er.exec(t);)t=t.replace(er,Pr[r[1]]);return t.trim()},null==(Jr=br.geom)&&(br.geom={}),Q=function(){function t(t,r,e){var n,o,i,a;for(null==e&&(e=!0),o=this,o.type=t,o.contours=[],i=0,a=r.length;a>i;i++)n=r[i],Ir(n)||n.reverse(),o.contours.push(n);o.closed=e}return t.prototype.clipToBBox=function(){throw"path clipping is not implemented yet"},t.prototype.toSVG=function(t){var r;return r=this.svgString(),t.path(r)},t.prototype.svgString=function(){var t,r,e,n,o,i,a,s,l,u,p,h,c;for(n=this,o="",e=n.closed?"Z M":"M",h=n.contours,s=0,u=h.length;u>s;s++)for(t=h[s],r=!0,o+=""===o?"M":e,l=0,p=t.length;p>l;l++)c=t[l],i=c[0],a=c[1],r||(o+="L"),o+=i+","+a,r=!1;return n.closed&&(o+="Z"),o},t.prototype.area=function(){var t,r,e,n,o,i;if(e=this,null!=e.areas)return e._area;for(e.areas=[],e._area=0,i=e.contours,n=0,o=i.length;o>n;n++)r=i[n],t=kr(r),e.areas.push(t),e._area+=t;return e._area},t.prototype.centroid=function(){var t,r,e,n,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x,w,M,P,C,j,A,B,L,S,k,I,N,G,z,E;if(y=this,null!=y._centroid)return y._centroid;for(e=y.area(),i=a=0,p=j=0,I=y.contours.length-1;I>=0?I>=j:j>=I;p=I>=0?++j:--j)if(o=y.contours[p],n=[],f=o.length,r=y.areas[p],c=r/e,0!==c){for(h=A=0,N=f-1;N>=0?N>=A:A>=N;h=N>=0?++A:--A)if(m=o[h],v=o[(h+1)%f],s=0,n.push(m),m[0]===v[0]&&(s=Math.abs(m[1]-v[1])),m[1]===v[1]&&(s=Math.abs(m[0]-v[0])),s>10)for(t=Math.floor(2*s),g=B=1,G=t-1;G>=1?G>=B:B>=G;g=G>=1?++B:--B)_=[m[0]+g/t*(v[0]-m[0]),m[1]+g/t*(v[1]-m[1])],n.push(_);for(w=P=M=C=0,f=n.length,S=[],b=0,h=L=0,z=f-1;z>=0?z>=L:L>=z;h=z>=0?++L:--L)m=n[h],v=n[(h+1)%f],l=v[0]-m[0],u=v[1]-m[1],d=Math.sqrt(l*l+u*u),S.push(d),b+=d;for(h=k=0,E=f-1;E>=0?E>=k:k>=E;h=E>=0?++k:--k)m=n[h],x=S[h]/b,w+=x*m[0],P+=x*m[1];i+=w*c,a+=P*c}return y._centroid=[i,a],y._centroid},t.prototype.isInside=function(t,r){var e,n,o,i,a,s;if(i=this,e=i._bbox,t<e[0]||t>e[2]||r<e[1]||r>e[3])return!1;for(o=a=0,s=i.contours.length-1;s>=0?s>=a:a>=s;o=s>=0?++a:--a)if(n=i.contours[o],Nr(n,[t,r]))return!0;return!1},t}(),br.geom.Path=Q,f=function(t){function r(t,e,n){this.x=t,this.y=e,this.r=n,r.__super__.constructor.call(this,"circle",null,!0)}return ae(r,t),r.prototype.toSVG=function(t){var r;return r=this,t.circle(r.x,r.y,r.r)},r.prototype.centroid=function(){var t;return t=this,[t.x,t.y]},r.prototype.area=function(){var t;return t=this,Math.PI*t.r*m.r},r}(Q),br.geom.Circle=f,Q.fromSVG=function(t){var r,e,n,o,i,a,s,l,u,p,h,c,f,d;if(o=[],c=t.nodeName,p=null,"path"===c){for(l=t.getAttribute("d").trim(),s=Raphael.parsePathString(l),r="Z"===s[s.length-1],h=r?"Z M":"M",n=[],f=0,d=s.length;d>f;f++)e=s[f],0!==e.length&&("M"===e[0]?(n.length>2&&(o.push(n),n=[]),n.push([e[1],e[2]])):"L"===e[0]?n.push([e[1],e[2]]):"Z"===e[0]&&n.length>2&&(o.push(n),n=[]));n.length>=2&&(o.push(n),n=[]),p=new br.geom.Path(c,o,r)}else"circle"===c&&(i=t.getAttribute("cx"),a=t.getAttribute("cy"),u=t.getAttribute("r"),p=new br.geom.Circle(i,a,u));return p},z=function(){function t(t){this.points=t}return t.prototype.clipToBBox=function(r){var e,n,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x;for(c=this,e=(new br.geom.clipping.CohenSutherland).clip,h=[],a=[],i=!1,o=v=0,g=c.points.length-2;g>=0?g>=v:v>=g;o=g>=0?++v:--v){_=c.points[o],s=_[0],l=_[1],b=c.points[o+1],u=b[0],p=b[1];try{x=e(r,s,l,u,p),f=x[0],y=x[1],d=x[2],m=x[3],i=!0,h.push([f,y]),(u!==d||p!==y||o===len(c.points)-2)&&h.push([d,m])}catch(w){n=w,i&&h.length>1&&(a.push(new t(h)),h=[]),i=!1}}return h.length>1&&a.push(new t(h)),a},t.prototype.toSVG=function(){var t,r,e,n,o,i,a,s;for(r=this,t=[],a=r.points,o=0,i=a.length;i>o;o++)s=a[o],e=s[0],n=s[1],t.push(e+","+n);return"M"+t.join("L")},t}(),br.geom.Line=z,Nr=function(t,r){var e,n,o,i,a,s,l,u,p,h,c,f,d,y,m;for(s=Math.PI,n=Math.atan2,p=2*s,a=t.length,e=0,i=y=0,m=a-1;m>=0?m>=y:y>=m;i=m>=0?++y:--y){for(h=t[i][0]-r[0],f=t[i][1]-r[1],c=t[(i+1)%a][0]-r[0],d=t[(i+1)%a][1]-r[1],l=n(f,h),u=n(d,c),o=u-l;o>s;)o-=p;for(;-s>o;)o+=p;e+=o}return Math.abs(e)>=s},Ir=function(t){return kr(t)>0},kr=function(t){var r,e,n,o,i,a,s,l;for(n=0,e=t.length,r=l=0;e>=0?e>l:l>e;r=e>=0?++l:--l)o=t[r][0],a=t[r][1],i=t[(r+1)%e][0],s=t[(r+1)%e][1],n+=o*s-i*a;return n*=.5},Gr=br.proj={},W=function(){function t(t){var r,e,n;r=this,r.lon0=null!=(e=t.lon0)?e:0,r.lat0=null!=(n=t.lat0)?n:0,r.PI=Math.PI,r.HALFPI=.5*r.PI,r.QUARTERPI=.25*r.PI,r.RAD=r.PI/180,r.DEG=180/r.PI,r.lam0=r.rad(this.lon0),r.phi0=r.rad(this.lat0),r.minLat=-90,r.maxLat=90}return t.parameters=[],t.title="Projection",t.prototype.rad=function(t){return t*this.RAD},t.prototype.deg=function(t){return t*this.DEG},t.prototype.plot=function(t,r){var e,n,o,i,a,s,l,u,p,h,c;for(null==r&&(r=!0),i=[],e=!0,u=0,p=t.length;p>u;u++)h=t[u],o=h[0],n=h[1],a=this._visible(o,n),a&&(e=!1),c=this.project(o,n),s=c[0],l=c[1],!a&&r?i.push(this._truncate(s,l)):i.push([s,l]);return e?null:[i]},t.prototype.sea=function(){var t,r,e,n,o,i,a,s,l,u,p,h,c,f;for(i=this,o=i.project.bind(this),n=[],t=i.lon0,i.lon0=0,e=a=-180;180>=a;e=++a)n.push(o(e,i.maxLat));for(r=s=p=i.maxLat,h=i.minLat;h>=p?h>=s:s>=h;r=h>=p?++s:--s)n.push(o(180,r));for(e=l=180;l>=-180;e=--l)n.push(o(e,i.minLat));for(r=u=c=i.minLat,f=i.maxLat;f>=c?f>=u:u>=f;r=f>=c?++u:--u)n.push(o(-180,r));return i.lon0=t,n},t.prototype.world_bbox=function(){var t,r,e,n,o,i;for(r=this.project.bind(this),n=this.sea(),t=new br.BBox,o=0,i=n.length;i>o;o++)e=n[o],t.update(e[0],e[1]);return t},t.prototype.toString=function(){var t;return t=this,"[Proj: "+t.name+"]"},t}(),W.fromXML=function(t){var r,e,n,o,i,a,s;for(n=t.getAttribute("id"),o={},e=a=0,s=t.attributes.length-1;s>=0?s>=a:a>=s;e=s>=0?++a:--a)r=t.attributes[e],"id"!==r.name&&(o[r.name]=r.value);return i=new br.proj[n](o),i.name=n,i},br.Proj=W,v=function(t){function r(t){var e,n,o;null==t&&(t={}),e=this,e.flip=Number(null!=(n=t.flip)?n:0),1===e.flip&&(t.lon0=null!=(o=-t.lon0)?o:0),r.__super__.constructor.call(this,t)}return ae(r,t),r.parameters=["lon0","flip"],r.title="Cylindrical Projection",r.prototype._visible=function(){return!0},r.prototype.clon=function(t){return t-=this.lon0,-180>t?t+=360:t>180&&(t-=360),t},r.prototype.ll=function(t,r){return 1===this.flip?[-t,-r]:[t,r]},r}(W),b=function(t){function r(){return te=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.title="Equirectangular Projection",r.prototype.project=function(t,r){var e;return e=this.ll(t,r),t=e[0],r=e[1],t=this.clon(t),[1e3*t*Math.cos(this.phi0),1e3*-1*r]},r}(v),Gr.lonlat=b,h=function(t){function r(t){var e;r.__super__.constructor.call(this,t),this.lat1=null!=(e=t.lat1)?e:0,this.phi1=this.rad(this.lat1)}return ae(r,t),r.parameters=["lon0","lat1","flip"],r.title="Cylindrical Equal Area",r.prototype.project=function(t,r){var e,n,o,i,a;return a=this.ll(t,r),t=a[0],r=a[1],e=this.rad(this.clon(t)),n=this.rad(-1*r),o=e*Math.cos(this.phi1),i=Math.sin(n)/Math.cos(this.phi1),[1e3*o,1e3*i]},r}(v),Gr.cea=h,w=function(t){function r(t){t.lat1=45,r.__super__.constructor.call(this,t)}return ae(r,t),r.title="Gall-Peters Projection",r.parameters=["lon0","flip"],r}(h),Gr.gallpeters=w,j=function(t){function r(t){t.lat1=37.7,r.__super__.constructor.call(this,t)}return ae(r,t),r.title="Hobo-Dyer Projection",r.parameters=["lon0","flip"],r}(h),Gr.hobodyer=j,l=function(t){function r(t){t.lat1=30,r.__super__.constructor.call(this,t)}return ae(r,t),r.title="Behrmann Projection",r.parameters=["lon0","flip"],r}(h),Gr.behrmann=l,a=function(t){function r(t){t.lat1=50,r.__super__.constructor.call(this,t)}return ae(r,t),r.title="Balthasart Projection",r.parameters=["lon0","flip"],r}(h),Gr.balthasart=a,H=function(t){function r(t){r.__super__.constructor.call(this,t),this.minLat=-85,this.maxLat=85}return ae(r,t),r.title="Mercator Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l;return i=this,l=i.ll(t,r),t=l[0],r=l[1],n=Math,e=i.rad(i.clon(t)),o=i.rad(-1*r),a=1e3*e,s=1e3*n.log((1+n.sin(o))/n.cos(o)),[a,s]},r}(v),Gr.mercator=H,$=function(t){function r(){return re=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.title="Pseudo-Cylindrical Projection",r}(v),q=function(t){function r(t){var e;r.__super__.constructor.call(this,t),e=this,e.A0=.8707,e.A1=-.131979,e.A2=-.013791,e.A3=.003971,e.A4=-.001529,e.B0=1.007226,e.B1=.015085,e.B2=-.044475,e.B3=.028874,e.B4=-.005916,e.C0=e.B0,e.C1=3*e.B1,e.C2=7*e.B2,e.C3=9*e.B3,e.C4=11*e.B4,e.EPS=1e-11,e.MAX_Y=.8707*.52*Math.PI}return ae(r,t),r.title="Natural Earth Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u;return a=this,u=a.ll(t,r),t=u[0],r=u[1],e=a.rad(a.clon(t)),n=a.rad(-1*r),o=n*n,i=o*o,s=180*e*(a.A0+o*(a.A1+o*(a.A2+i*o*(a.A3+o*a.A4))))+500,l=180*n*(a.B0+o*(a.B1+i*(a.B2+a.B3*o+a.B4*i)))+270,[s,l]},r}($),Gr.naturalearth=q,nr=function(t){function r(t){var e;r.__super__.constructor.call(this,t),e=this,e.X=[1,-5.67239e-12,-715511e-10,311028e-11,.9986,-482241e-9,-24897e-9,-133094e-11,.9954,-831031e-9,-44861e-9,-9.86588e-7,.99,-.00135363,-596598e-10,367749e-11,.9822,-.00167442,-44975e-10,-572394e-11,.973,-.00214869,-903565e-10,1.88767e-8,.96,-.00305084,-900732e-10,164869e-11,.9427,-.00382792,-653428e-10,-261493e-11,.9216,-.00467747,-104566e-9,48122e-10,.8962,-.00536222,-323834e-10,-543445e-11,.8679,-.00609364,-1139e-7,332521e-11,.835,-.00698325,-640219e-10,9.34582e-7,.7986,-.00755337,-500038e-10,9.35532e-7,.7597,-.00798325,-359716e-10,-227604e-11,.7186,-.00851366,-70112e-9,-863072e-11,.6732,-.00986209,-199572e-9,191978e-10,.6213,-.010418,883948e-10,624031e-11,.5722,-.00906601,181999e-9,624033e-11,.5322,0,0,0],e.Y=[0,.0124,3.72529e-10,1.15484e-9,.062,.0124001,1.76951e-8,-5.92321e-9,.124,.0123998,-7.09668e-8,2.25753e-8,.186,.0124008,2.66917e-7,-8.44523e-8,.248,.0123971,-9.99682e-7,3.15569e-7,.31,.0124108,373349e-11,-11779e-10,.372,.0123598,-13935e-9,439588e-11,.434,.0125501,520034e-10,-100051e-10,.4968,.0123198,-980735e-10,922397e-11,.5571,.0120308,402857e-10,-52901e-10,.6176,.0120369,-390662e-10,7.36117e-7,.6769,.0117015,-280246e-10,-8.54283e-7,.7346,.0113572,-408389e-10,-5.18524e-7,.7903,.0109099,-486169e-10,-10718e-10,.8435,.0103433,-646934e-10,5.36384e-9,.8936,.00969679,-646129e-10,-854894e-11,.9394,.00840949,-192847e-9,-421023e-11,.9761,.00616525,-256001e-9,-421021e-11,1,0,0,0],e.NODES=18,e.FXC=.8487,e.FYC=1.3523,e.C1=11.459155902616464,e.RC1=.08726646259971647,e.ONEEPS=1.000001,e.EPS=1e-8}return ae(r,t),r.title="Robinson Projection",r.prototype._poly=function(t,r,e){return t[r]+e*(t[r+1]+e*(t[r+2]+e*t[r+3]))},r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u;return a=this,u=a.ll(t,r),t=u[0],r=u[1],t=a.clon(t),n=a.rad(t),o=a.rad(-1*r),i=Math.abs(o),e=Math.floor(i*a.C1),e>=a.NODES&&(e=a.NODES-1),i=a.deg(i-a.RC1*e),e*=4,s=1e3*a._poly(a.X,e,i)*a.FXC*n,l=1e3*a._poly(a.Y,e,i)*a.FYC,0>o&&(l=-l),[s,l]},r}($),Gr.robinson=nr,g=function(t){function r(t){var e;r.__super__.constructor.call(this,t),e=this,e.C_x=.4222382003157712,e.C_y=1.3265004281770023,e.RC_y=.7538633073600218,e.C_p=3.5707963267948966,e.RC_p=.2800495767557787,e.EPS=1e-7,e.NITER=6}return ae(r,t),r.title="Eckert IV Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u,p,h,c;for(s=this,c=s.ll(t,r),t=c[0],r=c[1],i=s.rad(s.clon(t)),a=s.rad(-1*r),l=s.C_p*Math.sin(a),e=a*a,a*=.895168+e*(.0218849+.00826809*e),o=s.NITER;o>0&&(n=Math.cos(a),u=Math.sin(a),e=(a+u*(n+2)-l)/(1+n*(n+2)-u*u),a-=e,!(Math.abs(e)<s.EPS));)o-=1;return 0===o?(p=s.C_x*i,h=0>a?-s.C_y:s.C_y):(p=s.C_x*i*(1+Math.cos(a)),h=s.C_y*Math.sin(a)),[p,h]},r}($),Gr.eckert4=g,ar=function(t){function r(){return ee=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.title="Sinusoidal Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s;return n=this,s=n.ll(t,r),t=s[0],r=s[1],e=n.rad(n.clon(t)),o=n.rad(-1*r),i=1032*e*Math.cos(o),a=1032*o,[i,a]},r}($),Gr.sinusoidal=ar,X=function(t){function r(t,e,n,o,i){var a,s,l,u;null==e&&(e=1.5707963267948966),null==n&&(n=null),null==o&&(o=null),null==i&&(i=null),r.__super__.constructor.call(this,t),a=this,a.MAX_ITER=10,a.TOLERANCE=1e-7,null!=e?(s=e+e,u=Math.sin(e),l=Math.sqrt(2*Math.PI*u/(s+Math.sin(s))),a.cx=2*l/Math.PI,a.cy=l/u,a.cp=s+Math.sin(s)):null!=n&&null!=o&&"undefined"!=typeof cz&&null!==cz?(a.cx=n,a.cy=o,a.cp=i):Sr("kartograph.proj.Mollweide: either p or cx,cy,cp must be defined")}return ae(r,t),r.title="Mollweide Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u,p,h,c;for(s=this,c=s.ll(t,r),t=c[0],r=c[1],a=Math,e=a.abs,i=s.rad(s.clon(t)),l=s.rad(r),o=s.cp*a.sin(l),n=s.MAX_ITER;0!==n&&(u=(l+a.sin(l)-o)/(1+a.cos(l)),l-=u,!(e(u)<s.TOLERANCE));)n-=1;return 0===n?l=l>=0?s.HALFPI:-s.HALFPI:l*=.5,p=1e3*s.cx*i*a.cos(l),h=1e3*s.cy*a.sin(l),[p,-1*h]},r}($),Gr.mollweide=X,dr=function(t){function r(t){r.__super__.constructor.call(this,t,1.0471975511965976)}return ae(r,t),r.title="Wagner IV Projection",r}(X),Gr.wagner4=dr,yr=function(t){function r(t){r.__super__.constructor.call(this,t,null,.90977,1.65014,3.00896)}return ae(r,t),r.title="Wagner V Projection",r}(X),Gr.wagner5=yr,F=function(t){function r(){return ne=r.__super__.constructor.apply(this,arguments)}var e,n;return ae(r,t),n=-89,e=89,r.parameters=["lon0","lat0","flip"],r.title="Loximuthal Projection (equidistant)",r.prototype.project=function(t,r){var e,n,o,i,a,s,l;return o=this,l=o.ll(t,r),t=l[0],r=l[1],n=Math,e=o.rad(o.clon(t)),i=o.rad(r),a=i===o.phi0?e*n.cos(o.phi0):e*(i-o.phi0)/(n.log(n.tan(o.QUARTERPI+.5*i))-n.log(n.tan(o.QUARTERPI+.5*o.phi0))),a*=1e3,s=1e3*(i-o.phi0),[a,-1*s]},r}($),Gr.loximuthal=F,c=function(t){function r(){return oe=r.__super__.constructor.apply(this,arguments)}var e,n,o,i,a;return ae(r,t),r.title="Canters Modified Sinusoidal I",r.parameters=["lon0"],e=1.1966,n=-.129,o=3*n,i=-.0076,a=5*i,r.prototype.project=function(t,r){var s,l,u,p,h,c;return s=this,c=s.ll(t,r),t=c[0],r=c[1],t=s.rad(s.clon(t)),r=s.rad(r),p=r*r,h=p*p,l=1e3*t*Math.cos(r)/(e+o*p+a*h),u=1e3*r*(e+n*p+i*h),[l,-1*u]},r}($),Gr.canters1=c,C=function(t){function r(t){r.__super__.constructor.call(this,t)}var e,n,o,i,a,s,l,u,p,h,c,f,d;return ae(r,t),r.title="Hatano Projection",l=20,o=1e-7,u=1.000001,e=2.67595,n=2.43763,p=.3736990601468637,h=.4102345310814193,a=1.75859,s=1.93052,f=.5686373742600607,d=.5179951515653813,i=.85,c=1.1764705882352942,r.prototype.project=function(t,r){var u,p,h,c,f,d,y,m,v,g; for(c=this,g=c.ll(t,r),t=g[0],r=g[1],h=c.rad(c.clon(t)),f=c.rad(r),u=Math.sin(f)*(0>f?n:e),p=v=l;v>=1&&(d=(f+Math.sin(f)-u)/(1+Math.cos(f)),f-=d,!(Math.abs(d)<o));p=v+=-1);return y=1e3*i*h*Math.cos(f*=.5),m=1e3*Math.sin(f)*(0>f?s:a),[y,-1*m]},r}($),Gr.hatano=C,P=function(t){function r(t){var e;r.__super__.constructor.call(this,t),e=this,e.lat1=41.737,e.p1=new X,e.p0=new ar}return ae(r,t),r.title="Goode Homolosine Projection",r.parameters=["lon0"],r.prototype.project=function(t,r){var e,n;return e=this,n=e.ll(t,r),t=n[0],r=n[1],t=e.clon(t),Math.abs(r)>e.lat1?e.p1.project(t,r):e.p0.project(t,r)},r}($),Gr.goodehomolosine=P,D=function(t){function r(t){r.__super__.constructor.call(this,t),this.r=100*this.HALFPI}var e;return ae(r,t),r.title="Nicolosi Globular Projection",r.parameters=["lon0"],e=1e-10,r.prototype._visible=function(t){var r;return r=this,t=r.clon(t),t>-90&&90>t},r.prototype.project=function(t,r){var n,o,i,a,s,l,u,p,h,c,f,d,y;return s=this,y=s.ll(t,r),t=y[0],r=y[1],i=s.rad(s.clon(t)),u=s.rad(r),Math.abs(i)<e?(f=0,d=u):Math.abs(u)<e?(f=i,d=0):Math.abs(Math.abs(i)-s.HALFPI)<e?(f=i*Math.cos(u),d=s.HALFPI*Math.sin(u)):Math.abs(Math.abs(u)-s.HALFPI)<e?(f=0,d=u):(c=s.HALFPI/i-i/s.HALFPI,n=u/s.HALFPI,h=Math.sin(u),o=(1-n*n)/(h-n),p=c/o,p*=p,a=(c*h/o-.5*c)/(1+p),l=(h/p+.5*o)/(1+1/p),f=Math.cos(u),f=Math.sqrt(a*a+f*f/(1+p)),f=s.HALFPI*(a+(0>i?-f:f)),d=Math.sqrt(l*l-(h*h/p+o*h-1)/(1+1/p)),d=s.HALFPI*(l+(0>u?d:-d))),[100*f,-100*d]},r.prototype.sea=function(){var t,r,e,n,o;for(r=[],n=this.r,t=Math,e=o=0;360>=o;e=++o)r.push([t.cos(this.rad(e))*n,t.sin(this.rad(e))*n]);return r},r.prototype.world_bbox=function(){var t;return t=this.r,new br.BBox(-t,-t,2*t,2*t)},r}($),Gr.nicolosi=D,o=function(t){function r(t,e){var n;null==e&&(e=1e3),r.__super__.constructor.call(this,t),n=this,n.r=e,n.elevation0=n.to_elevation(n.lat0),n.azimuth0=n.to_azimuth(n.lon0)}return ae(r,t),r.parameters=["lon0","lat0"],r.title="Azimuthal Projection",r.prototype.to_elevation=function(t){var r;return r=this,(t+90)/180*r.PI-r.HALFPI},r.prototype.to_azimuth=function(t){var r;return r=this,2*(t+180)/360*r.PI-r.PI},r.prototype._visible=function(t,r){var e,n,o,i,a;return a=this,i=Math,o=a.to_elevation(r),e=a.to_azimuth(t),n=i.sin(o)*i.sin(a.elevation0)+i.cos(a.elevation0)*i.cos(o)*i.cos(e-a.azimuth0),n>=0},r.prototype._truncate=function(t,r){var e,n,o,i,a;return e=Math,n=this.r,o=e.atan2(r-n,t-n),i=n+n*e.cos(o),a=n+n*e.sin(o),[i,a]},r.prototype.sea=function(){var t,r,e,n,o;for(r=[],n=this.r,t=Math,e=o=0;360>=o;e=++o)r.push([n+t.cos(this.rad(e))*n,n+t.sin(this.rad(e))*n]);return r},r.prototype.world_bbox=function(){var t;return t=this.r,new br.BBox(0,0,2*t,2*t)},r}(W),U=function(t){function r(){return Vr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.title="Orthographic Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u;return i=this,o=Math,n=i.to_elevation(r),e=i.to_azimuth(t),s=i.r*o.cos(n)*o.sin(e-i.azimuth0),u=-i.r*(o.cos(i.elevation0)*o.sin(n)-o.sin(i.elevation0)*o.cos(n)*o.cos(e-i.azimuth0)),a=i.r+s,l=i.r+u,[a,l]},r}(o),Gr.ortho=U,k=function(t){function r(t){r.__super__.constructor.call(this,t),this.scale=.5*Math.sqrt(2)}return ae(r,t),r.title="Lambert Azimuthal Equal-Area Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u,p,h;return a=this.rad(r),o=this.rad(t),i=Math,s=i.sin,e=i.cos,n=i.pow(2/(1+s(this.phi0)*s(a)+e(this.phi0)*e(a)*e(o-this.lam0)),.5),n*=this.scale,u=this.r*n*e(a)*s(o-this.lam0),h=-this.r*n*(e(this.phi0)*s(a)-s(this.phi0)*e(a)*e(o-this.lam0)),l=this.r+u,p=this.r+h,[l,p]},r}(o),Gr.laea=k,ur=function(t){function r(){return Or=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.title="Stereographic Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u,p,h,c;return s=this.rad(r),i=this.rad(t),a=Math,l=a.sin,e=a.cos,o=.5,n=2*o/(1+l(this.phi0)*l(s)+e(this.phi0)*e(s)*e(i-this.lam0)),p=this.r*n*e(s)*l(i-this.lam0),c=-this.r*n*(e(this.phi0)*l(s)-l(this.phi0)*e(s)*e(i-this.lam0)),u=this.r+p,h=this.r+c,[u,h]},r}(o),Gr.stereo=ur,or=function(t){function r(t){var e,n,o,i,a,s,l,u,p,h;for(r.__super__.constructor.call(this,{lon0:0,lat0:0}),this.dist=null!=(u=t.dist)?u:3,this.up=this.rad(null!=(p=t.up)?p:0),this.tilt=this.rad(null!=(h=t.tilt)?h:0),this.scale=1,i=Number.MAX_VALUE,o=-1*Number.MAX_VALUE,e=s=0;179>=s;e=++s)for(n=l=0;360>=l;n=++l)a=this.project(n-180,e-90),i=Math.min(a[0],i),o=Math.max(a[0],o);this.scale=2*this.r/(o-i),r.__super__.constructor.call(this,t)}return ae(r,t),r.parameters=["lon0","lat0","tilt","dist","up"],r.title="Satellite Projection",r.prototype.project=function(t,r,e){var n,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x,w,M;return null==e&&(e=0),c=this.rad(r),p=this.rad(t),h=Math,y=h.sin,i=h.cos,f=this.r,d=f*(e+6371)/3671,a=y(this.phi0)*y(c)+i(this.phi0)*i(c)*i(p-this.lam0),u=(this.dist-1)/(this.dist-a),u=(this.dist-1)/(this.dist-a),u*=this.scale,_=d*u*i(c)*y(p-this.lam0),w=-d*u*(i(this.phi0)*y(c)-y(this.phi0)*i(c)*i(p-this.lam0)),l=i(this.up),v=y(this.up),s=i(this.tilt),m=y(this.tilt),o=d*(this.dist-1),n=(w*l+_*v)*y(this.tilt)/o+s,b=(_*l-w*v)*i(this.tilt)/n,M=(w*l+_*v)/n,g=f+b,x=f+M,[g,x]},r.prototype._visible=function(t,r){var e,n,o,i;return o=this.to_elevation(r),e=this.to_azimuth(t),i=Math,n=i.sin(o)*i.sin(this.elevation0)+i.cos(this.elevation0)*i.cos(o)*i.cos(e-this.azimuth0),n>=1/this.dist},r.prototype.sea=function(){var t,r,e,n,o;for(r=[],n=this.r,t=Math,e=o=0;360>=o;e=++o)r.push([n+t.cos(this.rad(e))*n,n+t.sin(this.rad(e))*n]);return r},r}(o),Gr.satellite=or,_=function(t){function r(){return Hr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.title="Equidistant Azimuthal Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u,p,h,c,f,d;return l=this,u=l.rad(r),a=l.rad(t),s=Math,p=s.sin,n=s.cos,o=p(this.phi0)*p(u)+n(this.phi0)*n(u)*n(a-this.lam0),e=s.acos(o),i=.325*e/p(e),c=this.r*i*n(u)*p(a-this.lam0),d=-this.r*i*(n(this.phi0)*p(u)-p(this.phi0)*n(u)*n(a-this.lam0)),h=this.r+c,f=this.r+d,[h,f]},r.prototype._visible=function(){return!0},r}(o),Gr.equi=_,n=function(t){function r(t){var e;e=this,t.lat0=0,r.__super__.constructor.call(this,t),e.lam0=0}var e;return ae(r,t),r.title="Aitoff Projection",r.parameters=["lon0"],e=.6366197723675814,r.prototype.project=function(t,r){var n,o,i,a,s,l,u,p;return a=this,p=a.ll(t,r),t=p[0],r=p[1],t=a.clon(t),i=a.rad(t),s=a.rad(r),n=.5*i,o=Math.acos(Math.cos(s)*Math.cos(n)),0!==o?(u=1/Math.sin(o),l=2*o*Math.cos(s)*Math.sin(n)*u,u*=o*Math.sin(s)):l=u=0,a.winkel&&(l=.5*(l+i*e),u=.5*(u+s)),[1e3*l,-1e3*u]},r.prototype._visible=function(){return!0},r}($),Gr.aitoff=n,mr=function(t){function r(t){r.__super__.constructor.call(this,t),this.winkel=!0}return ae(r,t),r.title="Winkel Tripel Projection",r}(n),Gr.winkel3=mr,y=function(t){function r(t){var e,n,o;e=this,r.__super__.constructor.call(this,t),e.lat1=null!=(n=t.lat1)?n:30,e.phi1=e.rad(e.lat1),e.lat2=null!=(o=t.lat2)?o:50,e.phi2=e.rad(e.lat2)}return ae(r,t),r.title="Conic Projection",r.parameters=["lon0","lat0","lat1","lat2"],r.prototype._visible=function(t,r){var e;return e=this,r>e.minLat&&r<e.maxLat},r.prototype._truncate=function(t,r){return[t,r]},r.prototype.clon=function(t){return t-=this.lon0,-180>t?t+=360:t>180&&(t-=360),t},r}(W),I=function(t){function r(t){var e,n,o,i,a,s,l,u,p,h,c,f,d;p=this,r.__super__.constructor.call(this,t),a=Math,d=[a.sin,a.cos,a.abs,a.log,a.tan,a.pow],h=d[0],o=d[1],e=d[2],xr=d[3],f=d[4],l=d[5],p.n=s=c=h(p.phi1),i=o(p.phi1),u=e(p.phi1-p.phi2)>=1e-10,u&&(s=xr(i/o(p.phi2))/xr(f(p.QUARTERPI+.5*p.phi2)/f(p.QUARTERPI+.5*p.phi1))),p.c=n=i*l(f(p.QUARTERPI+.5*p.phi1),s)/s,p.rho0=e(e(p.phi0)-p.HALFPI)<1e-10?0:n*l(f(p.QUARTERPI+.5*p.phi0),-s),p.minLat=-60,p.maxLat=85}return ae(r,t),r.title="Lambert Conformal Conic Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u,p,h,c,f,d,y,m;return h=this,l=h.rad(r),o=h.rad(h.clon(t)),a=Math,m=[a.sin,a.cos,a.abs,a.log,a.tan,a.pow],c=m[0],n=m[1],e=m[2],xr=m[3],f=m[4],u=m[5],s=h.n,p=e(e(l)-h.HALFPI)<1e-10?0:h.c*u(f(h.QUARTERPI+.5*l),-s),i=o*s,d=1e3*p*c(i),y=1e3*(h.rho0-p*n(i)),[d,-1*y]},r}(y),Gr.lcc=I,Z=function(t){function r(){return Xr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r}(y),fr=function(){function t(t,r,e,n,o,i){var a;a=this,a.bbox=t,a.width=r,a.padding=null!=n?n:0,a.halign=null!=o?o:"center",a.valign=null!=i?i:"center",a.height=e,a.scale=Math.min((r-2*n)/t.width,(e-2*n)/t.height)}return t.prototype.project=function(t,r){var e,n,o,i,a,s,l;return null==r&&(r=t[1],t=t[0]),o=this,i=o.scale,e=o.bbox,n=o.height,a=o.width,s="center"===o.halign?.5*(a-e.width*i):"left"===o.halign?o.padding*i:a-(e.width-o.padding)*i,l="center"===o.valign?.5*(n-e.height*i):"top"===o.valign?o.padding*i:0,t=(t-e.left)*i+s,r=(r-e.top)*i+l,[t,r]},t.prototype.projectPath=function(t){var r,e,n,o,i,a,s,l,u,p,h,c,f,d,y,m,v;if(o=this,"path"===t.type){for(n=[],r=[99999,99999,-99999,-99999],d=t.contours,p=0,c=d.length;c>p;p++){for(a=d[p],e=[],h=0,f=a.length;f>h;h++)y=a[h],l=y[0],u=y[1],m=o.project(l,u),l=m[0],u=m[1],e.push([l,u]),r[0]=Math.min(r[0],l),r[1]=Math.min(r[1],u),r[2]=Math.max(r[2],l),r[3]=Math.max(r[3],u);n.push(e)}return i=new br.geom.Path(t.type,n,t.closed),i._bbox=r,i}return"circle"===t.type?(v=o.project(t.x,t.y),l=v[0],u=v[1],s=t.r*o.scale,new br.geom.Circle(l,u,s)):void 0},t.prototype.asBBox=function(){var t;return t=this,new br.BBox(0,0,t.width,t.height)},t}(),fr.fromXML=function(t){var r,e,n,o,a;return a=Number(t.getAttribute("w")),n=Number(t.getAttribute("h")),o=Number(t.getAttribute("padding")),e=t.getElementsByTagName("bbox")[0],r=i.fromXML(e),new br.View(r,a,n,o)},br.View=fr,S.prototype.dotgrid=function(t){var r,e,n,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x,w,M,P,C,j,A,B,L,S,k,I,N,G,z,E,T,R,F,V,O,H,X,q,D,U,Q,Y,W;if(v=this,m=null!=(T=t.layer)?T:v.layerIds[v.layerIds.length-1],!v.layers.hasOwnProperty(m))return Sr('dotgrid error: layer "'+m+'" not found'),void 0;if(y=v.layers[m],e=t.data,n=t.value,o=t.key,_={},null!=o&&"array"===zr(e))for(A=0,k=e.length;k>A;A++)w=e[A],d=w[o],_[String(d)]=w;else for(d in e)w=e[d],_[String(d)]=w;if(l=null!=(R=t.style)?R:{fill:"black",stroke:"none"},P=t.size,f=null!=(F=t.gridsize)?F:15,s=null!=(V=y.dotgrid)?V:y.dotgrid={gridsize:f,grid:[]},s.gridsize!==f)for(O=s.grid,B=0,I=O.length;I>B;B++)c=O[B],null!=c.shape&&(c.shape.remove(),c.shape=null);if(f>0){if(0===s.grid.length)for(C=L=0,H=v.viewport.width;f>0?H>=L:L>=H;C=L+=f)for(j=S=0,X=v.viewport.height;f>0?X>=S:S>=X;j=S+=f){c={x:C+.2*(Math.random()-.5)*f,y:j+.2*(Math.random()-.5)*f,pathid:!1},h=!1,q=y.pathsById;for(d in q){for(b=q[d],z=0,N=b.length;N>z;z++)if(g=b[z],g.vpath.isInside(c.x,c.y)){h=!0,x=null!=(D=_[d])?D:null,M=P(x),c.pathid=d,c.shape=y.paper.circle(c.x,c.y,1);break}if(h)break}s.grid.push(c)}for(U=s.grid,E=0,G=U.length;G>E;E++)c=U[E],c.pathid&&(x=null!=(Q=_[c.pathid])?Q:null,M=P(x),p=null!=(Y=t.duration)?Y:0,i=null!=(W=t.delay)?W:0,a="function"===zr(i)?i(x):i,p>0&&Raphael.svg?(r=Raphael.animation({r:.5*M},p),c.shape.animate(r.delay(a))):c.shape.attr({r:.5*M}),u="function"===zr(l)?l(x):l,c.shape.attr(u))}},gr=null!=(qr=br.filter)?qr:br.filter={},gr.__knownFilter={},gr.__patternFills=0,V.prototype.SVG=function(t,r){var e,n;if("string"==typeof t&&(t=window.document.createElementNS("http://www.w3.org/2000/svg",t)),r)for(e in r)n=r[e],t.setAttribute(e,n);return t},S.prototype.addFilter=function(t,r,e){var n,o,i;if(null==e&&(e={}),i=this,n=window.document,null==br.filter[r])throw"unknown filter type "+r;return o=new br.filter[r](e).getFilter(t),i.paper.defs.appendChild(o)},V.prototype.applyFilter=function(t){var r;return r=this,e("."+r.id,r.paper.canvas).attr({filter:"url(#"+t+")"})},V.prototype.applyTexture=function(t,r,e){var n,o,i,a,s,l;for(null==r&&(r=!1),null==e&&(e="#000"),o=this,gr.__patternFills+=1,s=o.paths,l=[],i=0,a=s.length;a>i;i++)n=s[i],!r||r(n.data)?l.push(n.svgPath.attr({fill:"url("+t+")"})):l.push(n.svgPath.attr("fill",e));return l},x=function(){function t(t){this.params=null!=t?t:{}}return t.prototype.getFilter=function(t){var r,e;return e=this,r=e.SVG("filter",{id:t}),e.buildFilter(r),r},t.prototype._getFilter=function(){throw"not implemented"},t.prototype.SVG=function(t,r){var e,n;if("string"==typeof t&&(t=window.document.createElementNS("http://www.w3.org/2000/svg",t)),r)for(e in r)n=r[e],t.setAttribute(e,n);return t},t}(),u=function(t){function r(){return Dr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.prototype.buildFilter=function(t){var r,e,n;return n=this,r=n.SVG,e=r("feGaussianBlur",{stdDeviation:n.params.size||4,result:"blur"}),t.appendChild(e)},r}(x),gr.blur=u,_r=function(t){var r,e,n,o;if(t.trim().match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return(4===t.length||7===t.length)&&(t=t.substr(1)),3===t.length&&(t=t.split(""),t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),o=parseInt(t,16),n=o>>16,e=255&o>>8,r=255&o,[n,e,r];throw'unknown color format: "'+t+'"'},M=function(t){function r(){return Ur=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.prototype.buildFilter=function(t){var r,e,n,o,i,a,s,l,u,p,h,c,f;i=this,e=null!=(l=i.params.blur)?l:4,s=null!=(u=i.params.strength)?u:1,a=null!=(p=i.params.color)?p:"#D1BEB0","string"===zr(a)&&(a=_r(a)),n=null!=(h=i.params.inner)?h:!1,o=null!=(c=i.params.knockout)?c:!1,r=null!=(f=i.params.alpha)?f:1,n?i.innerGlow(t,e,s,a,r,o):i.outerGlow(t,e,s,a,r,o)},r.prototype.outerGlow=function(t,r,e,n,o,i){var a,s,l,u,p,h,c;return p=this,a=p.SVG,u=a("feColorMatrix",{"in":"SourceGraphic",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0",result:"mask"}),t.appendChild(u),e>0&&(c=a("feMorphology",{"in":"mask",radius:e,operator:"dilate",result:"mask"}),t.appendChild(c)),u=a("feColorMatrix",{"in":"mask",type:"matrix",values:"0 0 0 0 "+n[0]/255+" 0 0 0 0 "+n[1]/255+" 0 0 0 0 "+n[2]/255+" 0 0 0 1 0",result:"r0"}),t.appendChild(u),s=a("feGaussianBlur",{"in":"r0",stdDeviation:r,result:"r1"}),t.appendChild(s),l=a("feComposite",{operator:"out","in":"r1",in2:"mask",result:"comp"}),t.appendChild(l),h=a("feMerge"),i||h.appendChild(a("feMergeNode",{"in":"SourceGraphic"})),h.appendChild(a("feMergeNode",{"in":"r1"})),t.appendChild(h)},r.prototype.innerGlow=function(t,r,e,n,o,i){var a,s,l,u,p,h,c;return p=this,a=p.SVG,xr("innerglow"),u=a("feColorMatrix",{"in":"SourceGraphic",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500 0",result:"mask"}),t.appendChild(u),c=a("feMorphology",{"in":"mask",radius:e,operator:"erode",result:"r1"}),t.appendChild(c),s=a("feGaussianBlur",{"in":"r1",stdDeviation:r,result:"r2"}),t.appendChild(s),u=a("feColorMatrix",{type:"matrix","in":"r2",values:"1 0 0 0 "+n[0]/255+" 0 1 0 0 "+n[1]/255+" 0 0 1 0 "+n[2]/255+" 0 0 0 -1 1",result:"r3"}),t.appendChild(u),l=a("feComposite",{operator:"in","in":"r3",in2:"mask",result:"comp"}),t.appendChild(l),h=a("feMerge"),i||h.appendChild(a("feMergeNode",{"in":"SourceGraphic"})),h.appendChild(a("feMergeNode",{"in":"comp"})),t.appendChild(h)},r}(x),gr.glow=M,S.prototype.addGeoPath=function(t,r,e){var n,o,i;return null==r&&(r=[]),null==e&&(e=""),n=this,i=n.getGeoPathStr(t,r),o=n.paper.path(i),""!==e&&o.node.setAttribute("class",e),o},S.prototype.getGeoPathStr=function(t,r){var e,n,o,i,a,s,l;null==r&&(r=[]),o=this,"string"===zr(r)&&(r=r.split("")),0===r.length&&r.push("M"),i="";for(n in t)a=t[n],e=null!=(l=r[n])?l:"L",s=o.lonlat2xy(a),isNaN(s[0])||isNaN(s[1])||(i+=e+s[0]+","+s[1]);return i},S.prototype.addGeoPolygon=function(t,r){var e,n,o;o=this,e=["M"];for(n in t)e.push("L");return e.push("Z"),o.addGeoPath(t,e,r)},ir=function(){function t(t,r,e){var n,o,i,a;null==t&&(t=[0,1]),null==r&&(r=null),null==e&&(e=null),this.rangedScale=se(this.rangedScale,this),this.scale=se(this.scale,this),o=this,a=[];for(n in t)("function"!==zr(e)||e(t[n])!==!1)&&(i=null!=r?"function"===zr(r)?r(t[n]):t[n][r]:t[n],isNaN(i)||a.push(i));a=a.sort(function(t,r){return t-r}),o.values=a,o._range=[0,1],o.rangedScale.range=function(t){return o._range=t,o.rangedScale}}return t.prototype.scale=function(t){return t},t.prototype.rangedScale=function(t){var r,e;return r=this,t=r.scale(t),e=r._range,t*(e[1]-e[0])+e[0]},t}(),E=function(t){function r(){return this.scale=se(this.scale,this),Qr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.prototype.scale=function(t){var r,e;return r=this,e=r.values,(t-e[0])/(e[e.length-1]-e[0])},r}(ir),T=function(t){function r(){return this.scale=se(this.scale,this),Yr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.prototype.scale=function(t){var r,e;return r=this,e=r.values,xr=Math.log,(xr(t)-xr(e[0]))/(xr(e[e.length-1])-xr(e[0]))},r}(ir),sr=function(t){function r(){return this.scale=se(this.scale,this),Wr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.prototype.scale=function(t){var r,e;return r=this,e=r.values,Math.sqrt((t-e[0])/(e[e.length-1]-e[0]))},r}(ir),K=function(t){function r(){return this.scale=se(this.scale,this),$r=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.prototype.scale=function(t){var r,e,n,o,i,a;n=this,a=n.values,e=a.length-1;for(r in a){if(i=a[Number(r)],o=a[Number(r)+1],t===i)return r/e;if(e>r&&t>i&&o>t)return r/e+(t-i)/(o-i)}},r}(ir),br.scale={},br.scale.identity=function(){return new ir(domain,prop,gr).rangedScale},br.scale.linear=function(t,r,e){return new E(t,r,e).rangedScale},br.scale.log=function(t,r,e){return new T(t,r,e).rangedScale},br.scale.sqrt=function(t,r,e){return new sr(t,r,e).rangedScale},br.scale.quantile=function(t,r,e){return new K(t,r,e).rangedScale},hr=function(){function t(t){r=this,r.location=t.location,r.data=t.data,r.map=t.map,r.layers=t.layers,r.key=t.key,r.x=t.x,r.y=t.y}var r;return r=null,t.prototype.init=function(){return r},t.prototype.overlaps=function(){return!1},t.prototype.update=function(){return r},t.prototype.nodes=function(){return[]},t.prototype.clear=function(){return r},t}(),br.Symbol=hr,cr=function(){function r(t){this._initTooltips=se(this._initTooltips,this),this._noverlap=se(this._noverlap,this),this._kMeans=se(this._kMeans,this);var e,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x,w;for(n=this,c=["data","location","type","map"],p=["filter","tooltip","click","delay","sortBy","clustering","aggregate","clusteringOpts","mouseenter","mouseleave"],f=0,v=c.length;v>f;f++){if(h=c[f],null==t[h])throw"SymbolGroup: missing argument '"+h+"'";n[h]=t[h]}for(d=0,g=p.length;g>d;d++)h=p[d],null!=t[h]&&(n[h]=t[h]);if(e=n.type,null==e)return Sr("could not resolve symbol type",n.type),void 0;for(x=e.props,y=0,_=x.length;_>y;y++)h=x[y],null!=t[h]&&(n[h]=t[h]);for(n.layers={mapcanvas:n.map.paper},w=e.layers,m=0,b=w.length;b>m;m++)s=w[m],u=r._layerid++,a="sl_"+u,"svg"===s.type?l=n.map.createSVGLayer(a):"html"===s.type&&(l=n.map.createHTMLLayer(a)),n.layers[s.id]=l;n.symbols=[];for(i in n.data)o=n.data[i],"function"===zr(n.filter)?n.filter(o,i)&&n.add(o,i):n.add(o,i);n.layout(),n.render(),n.map.addSymbolGroup(n)}var n;return n=null,r.prototype.add=function(t,r){var e,o,i,a,s,l,u,p;for(n=this,e=n.type,o=n._evaluate(n.location,t,r),"array"===zr(o)&&(o=new br.LonLat(o[0],o[1])),a={layers:n.layers,location:o,data:t,key:null!=r?r:n.symbols.length,map:n.map},p=e.props,l=0,u=p.length;u>l;l++)i=p[l],null!=n[i]&&(a[i]=n._evaluate(n[i],t,r));return s=new e(a),n.symbols.push(s),s},r.prototype.layout=function(){var t,r,e,o,i,a,s,l,u,p;for(u=n.symbols,s=0,l=u.length;l>s;s++){if(i=u[s],r=i.location,"string"===zr(r)){if(p=r.split("."),t=p[0],o=p[1],e=n.map.getLayerPath(t,o),null==e){Sr("could not find layer path "+t+"."+o);continue}a=n.map.viewBC.project(e.path.centroid())}else a=n.map.lonlat2xy(r);i.x=a[0],i.y=a[1]}return"k-means"===n.clustering?n._kMeans():"noverlap"===n.clustering&&n._noverlap(),n},r.prototype.render=function(){var t,r,o,i,a,s,l,u,p,h,c;for(n=this,n.sortBy&&(i="asc","string"===zr(n.sortBy)&&(n.sortBy=n.sortBy.split(" ",2),o=n.sortBy[0],i=null!=(p=n.sortBy[1])?p:"asc"),n.symbols=n.symbols.sort(function(t,r){var e,a,s;return"function"===zr(n.sortBy)?(a=n.sortBy(t.data,t),s=n.sortBy(r.data,r)):(a=t[o],s=r[o]),a===s?0:(e="asc"===i?1:-1,a>s?1*e:-1*e)})),h=n.symbols,a=0,l=h.length;l>a;a++)for(r=h[a],r.render(),c=r.nodes(),s=0,u=c.length;u>s;s++)t=c[s],t.symbol=r;return"function"===zr(n.tooltip)&&n._initTooltips(),e.each(["click","mouseenter","mouseleave"],function(o,i){var a,s,l,u;if("function"===zr(n[i])){for(l=n.symbols,u=[],a=0,s=l.length;s>a;a++)r=l[a],u.push(function(){var o,a,s,l;for(s=r.nodes(),l=[],o=0,a=s.length;a>o;o++)t=s[o],l.push(e(t)[i](function(t){var r;for(r=t.target;!r.symbol;)r=e(r).parent().get(0);return t.stopPropagation(),n[i](r.symbol.data,r.symbol,t)}));return l}.call(this));return u}}),n},r.prototype.tooltips=function(t){return n=this,n.tooltips=t,n._initTooltips(),n},r.prototype.remove=function(t){var r,e,o,i,a,s,l,u,p,h;for(n=this,o=[],u=n.symbols,s=0,l=u.length;l>s;s++)if(a=u[s],null==t||t(a.data))try{a.clear()}catch(c){r=c,Sr("error: symbolgroup.remove")}else o.push(a);if(null==t){p=n.layers,h=[];for(e in p)i=p[e],"mapcanvas"!==e?h.push(i.remove()):h.push(void 0);return h}return n.symbols=o},r.prototype._evaluate=function(t,r,e){var n;return n="function"===zr(t)?t(r,e):t},r.prototype._kMeans=function(){var r,e,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x,w,M,P;for(n=this,null==(x=n.osymbols)&&(n.osymbols=n.symbols),r=n.type,null!=n.clusteringOpts&&(h=n.clusteringOpts.size),null==h&&(h=64),e=t().iterations(16).size(h),w=n.osymbols,f=0,v=w.length;v>f;f++)p=w[f],e.add({x:p.x,y:p.y});for(s=e.means(),l=[],d=0,g=s.length;g>d;d++)if(a=s[d],0!==a.size){for(o=[],M=a.indices,y=0,_=M.length;_>y;y++)i=M[y],o.push(n.osymbols[i].data);for(o=n.aggregate(o),c={layers:n.layers,location:!1,data:o,map:n.map},P=r.props,m=0,b=P.length;b>m;m++)u=P[m],null!=n[u]&&(c[u]=n._evaluate(n[u],o));p=new r(c),p.x=a.x,p.y=a.y,l.push(p)}return n.symbols=l},r.prototype._noverlap=function(){var t,r,e,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x,w,M,P,C,j,A,B,L,S,k,I,N,G,z,E,T,R,F,V,O,H,X,q,D,U,Q;if(n=this,null==(H=n.osymbols)&&(n.osymbols=n.symbols),u=3,t=n.type,le.call(t.props,"radius")<0)return Sr('noverlap layout only available for symbols with property "radius"'),void 0;for(j=n.osymbols.slice(),null!=n.clusteringOpts&&(L=n.clusteringOpts.tolerance,f=n.clusteringOpts.maxRatio),null==L&&(L=.05),null==f&&(f=.8),s=N=0,X=u-1;X>=0?X>=N:N>=X;s=X>=0?++N:--N){for(j.sort(function(t,r){return r.radius-t.radius}),p=j.length,d=[],y=G=0,q=p-3;q>=0?q>=G:G>=q;y=q>=0?++G:--G)if(M=j[y]){for(b=M.radius*(1-L),h=M.x-b,g=M.x+b,A=M.y-b,r=M.y+b,l=[],m=z=D=y+1,U=p-2;U>=D?U>=z:z>=U;m=U>=D?++z:--z)P=j[m],P&&(x=P.radius,c=P.x-x,_=P.x+x,B=P.y-x,e=P.y+x,x/M.radius<f&&(c>g||h>_||B>r||A>e||(i=P.x-M.x,a=P.y-M.y,(b+x)*(b+x)>i*i+a*a&&l.push(m))));if(l.length>0){for(o=[M.data],v=M.radius*M.radius,E=0,T=l.length;T>E;E++)s=l[E],o.push(j[s].data),v+=j[s].radius*j[s].radius;for(o=n.aggregate(o),C={layers:n.layers,location:!1,data:o,map:n.map},Q=t.props,V=0,R=Q.length;R>V;V++)y=Q[V],null!=n[y]&&(C[y]=n._evaluate(n[y],o));for(w=new t(C),S=M.radius*M.radius/v,k=M.x*S,I=M.y*S,O=0,F=l.length;F>O;O++)s=l[O],P=j[s],S=P.radius*P.radius/v,k+=P.x*S,I+=P.y*S,j[s]=void 0;w.x=k,w.y=I,j[y]=void 0,d.push(w)}else d.push(M)}j=d}return n.symbols=j},r.prototype._initTooltips=function(){var t,r,o,i,a,s,l,u,p,h,c;for(n=this,i=n.tooltip,h=n.symbols,s=0,u=h.length;u>s;s++)for(o=h[s],t={position:{target:"mouse",viewport:e(window),adjust:{x:7,y:7}},show:{delay:20},content:{},events:{show:function(t,r){return e(".qtip").filter(function(){return this!==r.elements.tooltip.get(0)}).hide()}}},a=i(o.data,o.key),"string"===zr(a)?t.content.text=a:"array"===zr(a)&&(t.content.title=a[0],t.content.text=a[1]),c=o.nodes(),l=0,p=c.length;p>l;l++)r=c[l],e(r).qtip(t)},r.prototype.onResize=function(){var t,r,e,o;for(n=this,n.layout(),o=n.symbols,r=0,e=o.length;e>r;r++)t=o[r],t.update()},r.prototype.update=function(t,r,e){var o,i,a,s,l,u,p,h;for(n=this,null==t&&(t={}),p=n.symbols,a=0,l=p.length;l>a;a++){for(i=p[a],h=n.type.props,s=0,u=h.length;u>s;s++)o=h[s],null!=t[o]?i[o]=n._evaluate(t[o],i.data):null!=n[o]&&(i[o]=n._evaluate(n[o],i.data));i.update(r,e)}return n},r}(),cr._layerid=0,br.SymbolGroup=cr,S.prototype.addSymbols=function(t){return t.map=this,new cr(t)},br.dorlingLayout=function(t,r){var n,o,i,a,s,l,u,p,h,c,f,d,y,m,v;for(null==r&&(r=40),f=[],e.each(t.symbols,function(t,r){return f.push({i:t,x:r.path.attrs.cx,y:r.path.attrs.cy,r:r.path.attrs.r})}),f.sort(function(t,r){return r.r-t.r}),i=function(){var r,e,n;for(e=0,n=f.length;n>e;e++)r=f[e],t.symbols[r.i].path.attr({cx:r.x,cy:r.y})},d=v=1;r>=1?r>=v:v>=r;d=r>=1?++v:--v)for(h in f)for(c in f)if(c>h){if(n=f[h],o=f[c],n.x+n.r<o.x-o.r||n.x-n.r>o.x+o.r)continue;if(n.y+n.r<o.y-o.r||n.y-n.r>o.y+o.r)continue;l=n.x-o.x,u=n.y-o.y,s=l*l+u*u,y=n.r+o.r,m=y*y,m>s&&(a=Math.sqrt(s),p=10/a,n.x+=l*p*(1-n.r/y),n.y+=u*p*(1-n.r/y),o.x-=l*p*(1-o.r/y),o.y-=u*p*(1-o.r/y))}return i()},p=function(t){function r(t){this.nodes=se(this.nodes,this),this.clear=se(this.clear,this),this.update=se(this.update,this),this.render=se(this.render,this),this.overlaps=se(this.overlaps,this);var e,n,o;e=this,r.__super__.constructor.call(this,t),e.radius=null!=(n=t.radius)?n:4,e.style=t.style,e.attrs=t.attrs,e.title=t.title,e["class"]=null!=(o=t["class"])?o:"bubble"}return ae(r,t),r.prototype.overlaps=function(t){var r,e,n,o,i,a,s,l,u,p,h;return n=this,p=[n.x,n.y,n.radius],a=p[0],l=p[1],o=p[2],h=[t.x,t.y,t.radius],s=h[0],u=h[1],i=h[2],a-o>s+i||s-i>a+o||l-o>u+i||u-i>l+o?!1:(r=a-s,e=l-u,r*r+e*e>(o+i)*(o+i)?!1:!0)},r.prototype.render=function(){var t;return t=this,null==t.path&&(t.path=t.layers.mapcanvas.circle(t.x,t.y,t.radius)),t.update(),t.map.applyCSS(t.path),t},r.prototype.update=function(t,r){var n,o,i;return null==t&&(t=!1),null==r&&(r="expo-out"),o=this,i=o.path,n={cx:o.x,cy:o.y,r:o.radius},null!=o.attrs&&(n=e.extend(n,o.attrs)),t?i.animate(n,t,r):i.attr(n),null!=i.node&&(null!=o.style&&i.node.setAttribute("style",o.style),null!=o["class"]&&i.node.setAttribute("class",o["class"])),null!=o.title&&i.attr("title",o.title),o},r.prototype.clear=function(){var t;return t=this,t.path.remove(),t},r.prototype.nodes=function(){var t;return t=this,[t.path.node]},r}(hr),p.props=["radius","style","class","title","attrs"],p.layers=[],br.Bubble=p,B=function(t){function r(t){var e,n,o,i,a,s;e=this,r.__super__.constructor.call(this,t),e.icon=null!=(n=t.icon)?n:"",e.offset=null!=(o=t.offset)?o:[0,0],e.iconsize=null!=(i=t.iconsize)?i:[10,10],e["class"]=null!=(a=t["class"])?a:"",e.title=null!=(s=t.title)?s:""}return ae(r,t),r.prototype.render=function(){var t,r;return r=this,t=r.map.container,r.img=e("<img />"),r.img.attr({src:r.icon,title:r.title,alt:r.title,width:r.iconsize[0],height:r.iconsize[1]}),r.img.addClass(r["class"]),r.img.css({position:"absolute","z-index":1e3,cursor:"pointer"}),r.img[0].symbol=r,t.append(r.img),r.update()},r.prototype.update=function(){var t;return t=this,t.img.css({left:t.x+t.offset[0]+"px",top:t.y+t.offset[1]+"px"})},r.prototype.clear=function(){var t;return t=this,t.img.remove(),t},r.prototype.nodes=function(){var t;return t=this,[t.img]},r}(br.Symbol),B.props=["icon","offset","class","title","iconsize"],B.layers=[],br.Icon=B,pr=function(t){function r(t){var e,n,o,i,a;e=this,r.__super__.constructor.call(this,t),e.text=null!=(n=t.text)?n:"",e.style=null!=(o=t.style)?o:"",e["class"]=null!=(i=t["class"])?i:"",e.offset=null!=(a=t.offset)?a:[0,0]}return ae(r,t),r.prototype.render=function(){var t,r;return r=this,r.lbl=t=r.layers.mapcanvas.text(r.x,r.y,r.text),r.update(),r},r.prototype.update=function(){var t;return t=this,t.lbl.attr({x:t.x+t.offset[0],y:t.y+t.offset[1]}),t.lbl.node.setAttribute("style",t.style),t.lbl.node.setAttribute("class",t["class"])},r.prototype.clear=function(){var t;return t=this,t.lbl.remove(),t},r.prototype.nodes=function(){var t;return t=this,[t.lbl.node]},r}(br.Symbol),pr.props=["text","style","class","offset"],pr.layers=[],br.Label=pr,A=function(t){function r(t){var e,n,o,i;e=this,r.__super__.constructor.call(this,t),e.text=null!=(n=t.text)?n:"",e.css=null!=(o=t.css)?o:"",e["class"]=null!=(i=t["class"])?i:""}return ae(r,t),r.prototype.render=function(){var t,r,n;return n=this,t=e("<div>"+n.text+"</div>"),t.css({width:"80px",position:"absolute",left:"-40px","text-align":"center"}),n.lbl=r=e('<div class="label" />'),r.append(t),n.layers.lbl.append(r),t.css({height:t.height()+"px",top:t.height()*-.4+"px"}),n.update(),n},r.prototype.update=function(){var t;return t=this,t.lbl.css({position:"absolute",left:t.x+"px",top:t.y+"px"}),t.lbl.css(t.css)},r.prototype.clear=function(){var t;return t=this,t.lbl.remove(),t},r.prototype.nodes=function(){var t;return t=this,[t.lbl[0]]},r}(br.Symbol),A.props=["text","css","class"],A.layers=[{id:"lbl",type:"html"}],br.HtmlLabel=A,N=function(t){function r(t){this.nodes=se(this.nodes,this),this.clear=se(this.clear,this),this.update=se(this.update,this),this.render=se(this.render,this);var e,n,o;e=this,r.__super__.constructor.call(this,t),e.labelattrs=null!=(n=t.labelattrs)?n:{},e.buffer=t.buffer,e.center=null!=(o=t.center)?o:!0}return ae(r,t),r.prototype.render=function(t){var e;return e=this,null!=e.title&&""!==String(e.title).trim()&&(e.buffer&&(e.bufferlabel=e.layers.mapcanvas.text(e.x,e.y,e.title)),e.label=e.layers.mapcanvas.text(e.x,e.y,e.title)),r.__super__.render.call(this,t),e},r.prototype.update=function(t,n){var o,i,a,s,l;return null==t&&(t=!1),null==n&&(n="expo-out"),i=this,r.__super__.update.call(this,t,n),null!=i.label&&(a=i.map.viewport,o=e.extend({},i.labelattrs),s=i.x,l=i.y,i.center?l-=0:s>.5*a.width?(o["text-anchor"]="end",s-=i.radius+5):s<.5*a.width&&(o["text-anchor"]="start",s+=i.radius+5),o.x=s,o.y=l,i.buffer&&(i.bufferlabel.attr(o),i.bufferlabel.attr({stroke:"#fff",fill:"#fff","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":6})),i.label.attr(o),i.label.toFront()),i},r.prototype.clear=function(){var t;return t=this,r.__super__.clear.apply(this,arguments)},r.prototype.nodes=function(){var t,e;return t=this,e=r.__super__.nodes.apply(this,arguments),t.label&&e.push(t.label.node),t.bufferlabel&&e.push(t.bufferlabel.node),e},r}(p),N.props=["radius","style","class","title","labelattrs","buffer","center","attrs"],N.layers=[],br.LabeledBubble=N,Y=function(t){function r(t){var n,o,i,a,s,l,u,p,h,c;e=this,r.__super__.constructor.call(this,t),e.radius=null!=(o=t.radius)?o:4,e.styles=null!=(i=t.styles)?i:"",e.colors=null!=(a=t.colors)?a:["#3cc","#c3c","#33c","#cc3"],e.titles=null!=(s=t.titles)?s:["","","","",""],e.values=null!=(l=t.values)?l:[],e.border=null!=(u=t.border)?u:!1,e.borderWidth=null!=(p=t.borderWidth)?p:2,e["class"]=null!=(h=t["class"])?h:"piechart",null==(c=(n=Raphael.fn).pieChart)&&(n.pieChart=vr)}var e;return ae(r,t),e=null,r.prototype.overlaps=function(t){var r,n,o,i,a,s,l,u,p,h;return p=[e.x,e.y,e.radius],a=p[0],l=p[1],o=p[2],h=[t.x,t.y,t.radius],s=h[0],u=h[1],i=h[2],a-o>s+i||s-i>a+o||l-o>u+i||u-i>l+o?!1:(r=a-s,n=l-u,r*r+n*n>(o+i)*(o+i)?!1:!0)},r.prototype.render=function(){var t;return e=this,null!=e.border&&(t=e.layers.mapcanvas.circle(e.x,e.y,e.radius+e.borderWidth).attr({stroke:"none",fill:e.border})),e.chart=e.layers.mapcanvas.pieChart(e.x,e.y,e.radius,e.values,e.titles,e.colors,"none"),e.chart.push(t),e},r.prototype.update=function(){},r.prototype.clear=function(){var t,r,n,o;for(e=this,o=e.chart,r=0,n=o.length;n>r;r++)t=o[r],t.remove();return e},r.prototype.nodes=function(){var t,r,n,o,i;for(o=e.chart,i=[],r=0,n=o.length;n>r;r++)t=o[r],i.push(t.node);return i},r}(hr),Y.props=["radius","values","styles","class","titles","colors","border","borderWidth"],Y.layers=[],br.PieChart=Y,vr=function(t,r,e,n,o,i,a){var s,l,u,p,h,c,f,d,y,m,v;if(isNaN(t)||isNaN(r)||isNaN(e))return[];for(p=this,c=Math.PI/180,l=p.set(),f=function(t,r,e,n,o,i){var a,s,l,u;return a=t+e*Math.cos(-n*c),s=t+e*Math.cos(-o*c),l=r+e*Math.sin(-n*c),u=r+e*Math.sin(-o*c),p.path(["M",t,r,"L",a,l,"A",e,e,0,+(o-n>180),0,s,u,"z"]).attr(i)},s=-270,d=0,h=function(o){var u,p,h,c,y,m,v;v=n[o],u=360*v/d,m=s+.5*u,p=i[o],c=500,h=30,y=f(t,r,e,s,s+u,{fill:p,stroke:a,"stroke-width":1}),y.mouseover(function(){y.stop().animate({transform:"s1.1 1.1 "+t+" "+r},c,"elastic") }),y.mouseout(function(){y.stop().animate({transform:""},c,"elastic")}),s+=u,l.push(y)},m=0,v=n.length;v>m;m++)y=n[m],d+=y;for(u in n)h(u);return l},drawStackedBars=function(t,r,e,n,o,i,a,s){function l(t,r,e,n,o){return u.rect(t,r,e,n).attr(o)}for(var u=this,p=this.set(),h=0,c=0,f=function(i){var u=o[i],f=n*u/c,d=t-.5*e,y=r+.5*n-h,m=e,v=a[i],g=500,_=l(d,y-f,m,f,{fill:v,stroke:s,"stroke-width":1});h+=f,_.mouseover(function(){_.stop().animate({transform:"s1.1 1.1 "+t+" "+r},g,"elastic")}).mouseout(function(){_.stop().animate({transform:""},g,"elastic")}),p.push(_)},d=0,y=o.length;y>d;d++)c+=o[d];for(d=0;y>d;d++)f(d);return p},lr=function(t){function r(t){var e,n,o,i,a,s,l,u,p,h;e=this,r.__super__.constructor.call(this,t),e.styles=null!=(o=t.styles)?o:"",e.colors=null!=(i=t.colors)?i:[],e.titles=null!=(a=t.titles)?a:["","","","",""],e.values=null!=(s=t.values)?s:[],e.width=null!=(l=t.width)?l:17,e.height=null!=(u=t.height)?u:30,e["class"]=null!=(p=t["class"])?p:"barchart",null==(h=(n=Raphael.fn).drawStackedBarChart)&&(n.drawStackedBarChart=drawStackedBars)}return ae(r,t),r.prototype.overlaps=function(t){var r,e,n,o,i,a,s,l,u,p,h;return n=this,p=[n.x,n.y,n.radius],a=p[0],l=p[1],o=p[2],h=[t.x,t.y,t.radius],s=h[0],u=h[1],i=h[2],a-o>s+i||s-i>a+o||l-o>u+i||u-i>l+o?!1:(r=a-s,e=l-u,r*r+e*e>(o+i)*(o+i)?!1:!0)},r.prototype.render=function(){var t,r,e,n,o,i;return e=this,n=e.width,r=e.height,o=e.x,i=e.y,t=e.layers.mapcanvas.rect(o-.5*n-2,i-.5*r-2,n+4,r+4).attr({stroke:"none",fill:"#fff"}),e.chart=e.layers.mapcanvas.drawStackedBarChart(e.x,e.y,e.width,e.height,e.values,e.titles,e.colors,"none"),e.chart.push(t),e},r.prototype.update=function(){var t;t=this},r.prototype.clear=function(){var t,r,e,n,o;for(t=this,o=t.chart,e=0,n=o.length;n>e;e++)r=o[e],r.remove();return t.chart=[],t},r.prototype.nodes=function(){var t,r,e,n,o,i;for(r=this,o=r.chart,i=[],e=0,n=o.length;n>e;e++)t=o[e],i.push(t.node);return i},r}(br.Symbol),lr.props=["values","styles","class","titles","colors","width","height"],lr.layers=[],br.StackedBarChart=lr}.call(this); /*! * Matomo - free/libre analytics platform * * Visitors Map with zoom in continents / countries. Cities + Region view. * Using Kartograph.js http://kartograph.org/ * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function(){window.UserCountryMap=window.UserCountryMap||{};var VisitorMap=window.UserCountryMap.VisitorMap=function(config,theWidget){this.config=config;this.theWidget=theWidget||false;this.run();};$.extend(VisitorMap.prototype,{run:function(){var self=this,config=self.config,colorManager=piwik.ColorManager,colorNames=['no-data-color','one-country-color','color-range-start-choropleth','color-range-start-normal','color-range-end-choropleth','color-range-end-normal','country-highlight-color','unknown-region-fill-color','unknown-region-stroke-color','region-stroke-color','invisible-region-background','city-label-color','city-stroke-color','city-highlight-stroke-color','city-highlight-fill-color','city-highlight-label-color','city-label-fill-color','city-selected-color','city-selected-label-color','region-layer-stroke-color','country-selected-color','region-selected-color','region-highlight-color'],colors=colorManager.getColors('visitor-map',colorNames),noDataColor=colors['no-data-color'],oneCountryColor=colors['one-country-color'],colorRangeStartChoropleth=colors['color-range-start-choropleth'],colorRangeStartNormal=colors['color-range-start-normal'],colorRangeEndChoropleth=colors['color-range-end-choropleth'],colorRangeEndNormal=colors['color-range-end-normal'],specialMetricsColorScale=colorManager.getColors('visitor-map',['special-metrics-color-scale-1','special-metrics-color-scale-2','special-metrics-color-scale-3','special-metrics-color-scale-4'],true),countryHighlightColor=colors['country-highlight-color'],countrySelectedColor=colors['country-selected-color'],unknownRegionFillColor=colors['unknown-region-fill-color'],unknownRegionStrokeColor=colors['unknown-region-stroke-color'],regionStrokeColor=colors['region-stroke-color'],regionSelectedColor=colors['region-selected-color'],regionHighlightColor=colors['region-highlight-color'],invisibleRegionBackgroundColor=colors['invisible-region-background'],cityLabelColor=colors['city-label-color'],cityLabelFillColor=colors['city-label-fill-color'],cityStrokeColor=colors['city-stroke-color'],cityHighlightStrokeColor=colors['city-highlight-stroke-color'],cityHighlightFillColor=colors['city-highlight-fill-color'],cityHighlightLabelColor=colors['city-highlight-label-color'],citySelectedColor=colors['city-selected-color'],citySelectedLabelColor=colors['city-selected-label-color'],regionLayerStrokeColor=colors['region-layer-stroke-color'],hasUserZoomed=false;function $$(selector){return $(selector,self.theWidget?self.theWidget.element:undefined);} var mapContainer=$$('.UserCountryMap_map').get(0),map=self.map=$K.map(mapContainer),main=$$('.UserCountryMap_container'),width=main.width(),_=config._;config.noDataColor=noDataColor;self.widget=$$('.widgetUserCountryMapvisitorMap').parent();function _reportParams(module,action,countryFilter){var params=$.extend(config.reqParams,{module:'API',method:'API.getProcessedReport',apiModule:module,apiAction:action,filter_limit:-1,limit:-1,format_metrics:0,showRawMetrics:1});if(countryFilter){$.extend(params,{filter_column:'country',filter_sort_column:'nb_visits',filter_pattern:countryFilter});} return params;} function ajax(params,dataType){dataType=dataType||'json';params=$.extend({},params);var token_auth=''+params.token_auth;delete params['token_auth'];return $.ajax({url:'index.php?'+$.param(params),dataType:dataType,data:{token_auth:token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1},type:'POST'});} function minmax(values){values=values.sort(function(a,b){return Number(a)-Number(b);});return{min:values[0],max:values[values.length-1],median:values[Math.floor(values.length*0.5)],p33:values[Math.floor(values.length*0.33)],p66:values[Math.floor(values.length*0.66)],p90:values[Math.floor(values.length*0.9)]};} function formatNumber(v,metric,first){v=Number(v);if(v>1000000){return(v / 1000000).toFixed(1)+'m';} if(v>1000){return(v / 1000).toFixed(1)+'k';} if(!metric){return v;} if(metric=='avg_time_on_site'){v+=first?' sec':'s';}else if(metric=='bounce_rate'){v+='%';}else if(metric==='nb_actions_per_visit'){if(parseInt(v,10)===v){return v;} return v.toFixed(1);} return v;} function formatValueForTooltips(data,metric,id){var val=data[metric]%1===0||Number(data[metric])!=data[metric]?data[metric]:data[metric].toFixed(1);if(metric=='bounce_rate'){val=NumberFormatter.formatPercent(val);}else if(metric=='avg_time_on_site'){val=new Date(0,0,0,val / 3600,val%3600 / 60,val%60).toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1");}else{val=NumberFormatter.formatNumber(val);} var v=_[metric].replace('%s','<strong>'+val+'</strong>');if(val==1&&metric=='nb_visits')v=_.one_visit;if(metric.slice(0,3)=='nb_'&&metric!='nb_actions_per_visit'){var total;if(id.length==3)total=UserCountryMap.countriesByIso[id][metric];else if(id=='world')total=self.config.visitsSummary[metric];else{total=0;$.each(UserCountryMap.countriesByIso,function(iso,country){if(UserCountryMap.ISO3toCONT[iso]==id){total+=country[metric];}});} if(total){v+=' ('+formatPercentage(data[metric]/ total)+')';}}else if(metric=='avg_time_on_site'){v+='<br/> ('+_.nb_visits.replace('%s',data.nb_visits)+')';} return v;} function getColorScale(rows,metric,filter,choropleth){var colscale;function addLegendItem(val,first){var d=$('<div>'),r=$('<div>'),l=$('<div>'),metric=$$('.userCountryMapSelectMetrics').val(),v=formatNumber(Math.round(val),metric,first);d.css({width:17,height:17,float:'left',background:colscale(val)});l.css({'margin-left':20,'line-height':'20px','text-align':'right'}).html(v);r.css({clear:'both',height:19});r.append(d).append(l);$('.UserCountryMap-legend .content').append(r);} var stats,values=[],id=self.lastSelected,c,showLegend;$.each(rows,function(i,r){if(!$.isFunction(filter)||filter(r)){var v=quantify(r,metric);if(!isNaN(v))values.push(v);}});stats=minmax(values);showLegend=values.length>0;if(stats.min==stats.max){colscale=function(){return chroma.hex(oneCountryColor);};if(choropleth){$('.UserCountryMap-legend .content').html('').show();if(showLegend){addLegendItem(stats.min,true);}} return colscale;} colscale=chroma.scale().range([choropleth?colorRangeStartChoropleth:colorRangeStartNormal,choropleth?colorRangeEndChoropleth:colorRangeEndNormal]).domain(values,4,'c').mode('lch');if(metric=='avg_time_on_site'||metric=='nb_actions_per_visit'||metric=='bounce_rate'){if(id.length==3){c=(stats.p90-stats.min)/(stats.max-stats.min);colscale=chroma.scale(specialMetricsColorScale,[0,c,c+0.001,1]).domain(chroma.limits(rows,'c',5,'curMetric',filter),4,'c').mode('hsl');}} if(choropleth&&showLegend){$('.UserCountryMap-legend .content').html('').show();var itemExists={};$.each(chroma.limits(values,'k',3),function(i,v){if(itemExists[v])return;addLegendItem(v,i===0);itemExists[v]=true;});}else{$('.UserCountryMap-legend .content').hide();} return colscale;} function formatPercentage(val){if(val<0.001){return'< '+NumberFormatter.formatPercent(0.1);} return NumberFormatter.formatPercent(Math.round(1000*val)/ 10);} function onResizeLazy(){clearTimeout(self._resizeTimer);self._resizeTimer=setTimeout(self.resize.bind(self),300);} self._onResizeLazy=onResizeLazy;function activateButton(btn){$$('.UserCountryMap-view-mode-buttons a').removeClass('activeIcon');btn.addClass('activeIcon');$$('.UserCountryMap-activeItem').offset({left:btn.offset().left});} function initUserInterface(){$$('.userCountryMapSelectCountry').off('change').change(function(){hasUserZoomed=true;updateState($$('.userCountryMapSelectCountry').val());});function zoomOut(){hasUserZoomed=true;var t=self.lastSelected,tgt='world';if(t.length==3&&UserCountryMap.ISO3toCONT[t]!==undefined){tgt=UserCountryMap.ISO3toCONT[t];} updateState(tgt);} $$('.UserCountryMap-btn-zoom').off('click').click(zoomOut);$$('.UserCountryMap_map').off('click').click(zoomOut);$(window).resize(onResizeLazy);$$('.userCountryMapSelectMetrics').off('change').change(function(){updateState(self.lastSelected);});(function(btn){btn.off('click').click(function(){if(self.lastSelected.length==3){if(self.mode!="city"){self.mode="city";hasUserZoomed=true;updateState(self.lastSelected);}}});})($$('.UserCountryMap-btn-city'));(function(btn){btn.off('click').click(function(){if(self.mode!="region"){$$('.UserCountryMap-view-mode-buttons a').removeClass('activeIcon');self.mode="region";hasUserZoomed=true;updateState(self.lastSelected);}});})($$('.UserCountryMap-btn-region'));var bl=$('<div id="UserCountryMap-black"></div>');bl.hide();$$('.UserCountryMap_map').append(bl);var infobtn=$('.UserCountryMap-info-btn');infobtn.off('mouseenter').on('mouseenter',function(e){$(infobtn.data('tooltip-target')).show();}).off('mouseleave').on('mouseleave',function(e){$(infobtn.data('tooltip-target')).hide();});$('.UserCountryMap-tooltip').hide();} function updateState(id){if(self.mode=="city"&&id.length!=3){self.mode="region";} var metric=$$('.userCountryMapSelectMetrics').val();self.widget.dashboardWidget('setParameters',{lastMap:id,viewMode:self.mode,lastMetric:metric});$('.UserCountryMap-info-btn').hide();try{if(id.length==3){renderCountryMap(id,metric);}else{renderWorldMap(id,metric);}}catch(e){$('.UserCountryMap-info .content').html(e);$('.UserCountryMap-info').show();} _updateUI(id,metric);self.lastSelected=id;} function _updateUI(id,metric){if(self.mode=="city"){activateButton($$('.UserCountryMap-btn-city'));}else{activateButton($$('.UserCountryMap-btn-region'));} var countrySelect=$$('.userCountryMapSelectCountry');countrySelect.val(id);var zoom=$$('.UserCountryMap-btn-zoom');if(id=='world')zoom.addClass('inactiveIcon');else zoom.removeClass('inactiveIcon');var flag=$$('.userCountryMapFlag'),regionBtn=$$('.UserCountryMap-btn-region');if(id.length==3){if(UserCountryMap.countriesByIso[id]){flag.css({'background-image':'url('+UserCountryMap.countriesByIso[id].flag+')','background-repeat':'no-repeat','background-position':'5px 5px'});$$('.UserCountryMap-btn-city').removeClass('inactiveIcon').show();$('span',regionBtn).html(regionBtn.data('region'));}else{$$('.UserCountryMap-btn-city').addClass('inactiveIcon');$('.map-stats').html(_.no_data);$('.map-title').html('');return;}}else{flag.css({'background':'none'});$$('.UserCountryMap-btn-city').addClass('inactiveIcon').hide();$('span',regionBtn).html(regionBtn.data('country'));} var mapTitle=id.length==3?UserCountryMap.countriesByIso[id].name:$$('.userCountryMapSelectCountry option[value='+id+']').html(),totalVisits=0,totalMetricValue=0;$('.map-title').html(mapTitle);$$('.widgetUserCountryMapvisitorMap .widgetName .map-title').html(' – '+mapTitle);if(id.length==3){totalVisits=UserCountryMap.countriesByIso[id]['nb_visits'];totalMetricValue=UserCountryMap.countriesByIso[id][metric];}else if(id.length==2){$.each(UserCountryMap.countriesByIso,function(iso,country){if(UserCountryMap.ISO3toCONT[iso]==id){totalVisits+=country['nb_visits'];totalMetricValue+=country[metric];}});}else{totalVisits=self.config.visitsSummary['nb_visits'];totalMetricValue=self.config.visitsSummary[metric];} var data={};data[metric]=totalMetricValue;$('.map-stats').html('<strong>'+formatValueForTooltips(data,metric,false)+'</strong>'+ (id!='world'?(' ('+formatPercentage(totalMetricValue / self.config.visitsSummary[metric])+')'):''));} function renderWorldMap(target,metric){function updateColorsAndTooltips(metric){colscale=getColorScale(UserCountryMap.countryData,metric,function(r){if(target.length==2){return UserCountryMap.ISO3toCONT[r.iso]==target;}else{return true;}},true);function countryFill(data){var d=UserCountryMap.countriesByIso[data.iso];if(d===null){return self.config.noDataColor;}else{return colscale(d[metric]);}} var countryLayer=map.getLayer('countries');if(countryLayer){countryLayer.style('fill',countryFill).on('mouseenter',function(d,path,evt){if(evt.shiftKey){path.attr('fill',countryHighlightColor);}}).on('mouseleave',function(d,path,evt){if($.inArray(UserCountryMap.countriesByIso[d.iso].name,_rowEvolution.labels)==-1){path.attr('fill',countryFill(d));}});countryLayer.tooltips(function(data){var metric=$$('.userCountryMapSelectMetrics').val(),country=UserCountryMap.countriesByIso[data.iso];return'<h3>'+country.name+'</h3>'+ formatValueForTooltips(country,metric,target);});}} if(target==self.lastSelected){updateColorsAndTooltips(metric);return;} _updateMap(target+'.svg',function(){map.addLayer('countries',{name:'context',filter:function(pd){return UserCountryMap.countriesByIso[pd.iso]===undefined;},tooltips:function(pd){var countryName=pd.name;for(var iso in self.config.countryNames){if(UserCountryMap.ISO2toISO3[iso.toUpperCase()]==pd.iso){countryName=self.config.countryNames[iso];break;}} return'<h3>'+countryName+'</h3>'+_.no_visit;}});map.addLayer('countries',{name:'countryBG',filter:function(pd){return UserCountryMap.countriesByIso[pd.iso]!==undefined;}});map.addLayer('countries',{key:'iso',filter:function(pd){return UserCountryMap.countriesByIso[pd.iso]!==undefined;},click:function(data,path,evt){evt.stopPropagation();if(evt.shiftKey||_rowEvolution.labels.length){if(evt.altKey){path.attr('fill',countrySelectedColor);addMultipleRowEvolution('getCountry',UserCountryMap.countriesByIso[data.iso].name);}else{showRowEvolution('getCountry',UserCountryMap.countriesByIso[data.iso].name);updateColorsAndTooltips(metric);} return;} var tgt;if(self.lastSelected!='world'||UserCountryMap.countriesByIso[data.iso]===undefined){tgt=data.iso;}else{tgt=UserCountryMap.ISO3toCONT[data.iso];} hasUserZoomed=true;updateState(tgt);}});updateColorsAndTooltips(metric);});} function _updateMap(svgUrl,callback){map.loadMap(config.svgBasePath+svgUrl,function(){map.clear();self.resize();callback();$('.ui-tooltip').remove();},{padding:-3});} function indicateLoading(){$$('.UserCountryMap-black').show();$$('.UserCountryMap-black').css('opacity',0);$$('.UserCountryMap-black').animate({opacity:0.5},400);$$('.UserCountryMap .loadingPiwik').show();} function loadingComplete(){$$('.UserCountryMap-black').hide();$$('.UserCountryMap .loadingPiwik').hide();} function quantify(d,metric){if(!metric)metric=$$('.userCountryMapSelectMetrics').val();switch(metric){default:return d[metric];}} function aggregate(rows,groupBy){var groups={};$.each(rows,function(i,row){var g_id=groupBy?groupBy(row):'X';g_id=g_id===true?$.isNumeric(i)&&i===Number(i)?false:i:g_id;if(g_id){if(!groups[g_id]){groups[g_id]={nb_visits:0,nb_actions:0,sum_visit_length:0,bounce_count:0};} $.each(groups[g_id],function(metric){groups[g_id][metric]+=row[metric];});}});$.each(groups,function(g_id,group){var apv=group.nb_actions / group.nb_visits,ats=group.sum_visit_length / group.nb_visits,br=group.bounce_count / group.nb_visits;group['nb_actions_per_visit']=apv;group['avg_time_on_site']=new Date(0,0,0,ats / 3600,ats%3600 / 60,ats%60).toLocaleTimeString();group['bounce_rate']=(br%1!==0?br.toFixed(1):br)+"%";});return groupBy?groups:groups.X;} function displayUnlocatableCount(unlocated,total,regionOrCity){if(0==unlocated){return;} $('.unlocated-stats').html(_pk_translate('UserCountryMap_Unlocated',[unlocated,'('+formatPercentage(unlocated / total)+')',UserCountryMap.countriesByIso[self.lastSelected].name]));$('.UserCountryMap-info-btn').show();var zoomTitle='';if(regionOrCity=='region'){zoomTitle=' '+_pk_translate('UserCountryMap_WithUnknownRegion',[unlocated]);}else if(regionOrCity=='city'){zoomTitle=' '+_pk_translate('UserCountryMap_WithUnknownCity',[unlocated]);} if(unlocated&&zoomTitle){if($('.map-stats .unlocatableCount').length){$('.map-stats .unlocatableCount').html(zoomTitle);}else{$('.map-stats').append('<small class="unlocatableCount">'+zoomTitle+'</small>');}}} function renderCountryMap(iso){var countryMap={zoomed:false,lastRequest:false,lastResponse:false};function updateRegionColors(){indicateLoading();ajax(_reportParams('UserCountry','getRegion',UserCountryMap.countriesByIso[iso].iso2)).done(function(data){convertBounceRatesToPercents(data);loadingComplete();var regionDict={},totalCountryVisits=UserCountryMap.countriesByIso[iso].nb_visits,unlocated=totalCountryVisits;function regionCode(region){var key=UserCountryMap.keys[iso]||'fips';return key.slice(0,4)=="fips"?(region[key]||"").slice(2):region[key];} function regionExistsInMap(code){var key=UserCountryMap.keys[iso]||'fips',q={};q[key]=key.slice(0,4)=='fips'?UserCountryMap.countriesByIso[iso].fips+code:code;if(map.getLayer('regions').getPaths(q).length===0){return false;} return true;} $.each(data.reportData,function(i,row){var region=data.reportMetadata[i].region;if(!regionExistsInMap(region)){var q={'p':region};if(map.getLayer('regions').getPaths(q).length){region=map.getLayer('regions').getPaths(q)[0].data.fips.slice(2);}} regionDict[region]=$.extend(row,data.reportMetadata[i],{curMetric:quantify(row,metric)});});var metric=$$('.userCountryMapSelectMetrics').val();if(UserCountryMap.aggregate[iso]){var aggregated=aggregate(regionDict,function(row){var id=row.region,res=false;$.each(UserCountryMap.aggregate[iso].groups,function(group,codes){if($.inArray(id,codes)>-1){res=group;}});return res;});$.each(aggregated,function(id,group){group.curMetric=quantify(group,metric);regionDict[id]=group;});} $.each(regionDict,function(key,region){if(regionExistsInMap(key))unlocated-=region.nb_visits;});displayUnlocatableCount(unlocated,totalCountryVisits,'region');colscale=getColorScale(regionDict,'curMetric',null,true);function regionFill(data){var code=regionCode(data);return regionDict[code]===undefined?unknownRegionFillColor:colscale(regionDict[code].curMetric);} map.getLayer('regions').style('fill',regionFill).style('stroke',function(data){return regionDict[regionCode(data)]===undefined?unknownRegionStrokeColor:regionStrokeColor;}).sort(function(data){var code=regionCode(data);return regionDict[code]===undefined?-1:regionDict[code].curMetric;}).tooltips(function(data){var metric=$$('.userCountryMapSelectMetrics').val(),region=regionDict[regionCode(data)];if(region===undefined){return'<h3>'+data.name+'</h3><p>'+_.nb_visits.replace('%s','<strong>0</strong>')+'</p>';} return'<h3>'+data.name+'</h3>'+ formatValueForTooltips(region,metric,iso);}).on('click',function(d,path,evt){var region=regionDict[regionCode(d)];if(region&®ion.label){if(evt.shiftKey){path.attr('fill',regionSelectedColor);addMultipleRowEvolution('getRegion',region.label);}else{map.getLayer('regions').style('fill',regionFill);showRowEvolution('getRegion',region.label);}}}).on('mouseenter',function(d,path,evt){var region=regionDict[regionCode(d)];if(region&®ion.label){if(evt.shiftKey){path.attr('fill',regionHighlightColor);}}}).on('mouseleave',function(d,path,evt){var region=regionDict[regionCode(d)];if(region&®ion.label){if($.inArray(region.label,_rowEvolution.labels)==-1){path.attr('fill',regionFill(d));}}}).style('cursor',function(d){return regionDict[regionCode(d)]&®ionDict[regionCode(d)].label?'pointer':'default';});$.each(regionDict,function(code,region){if(!regionExistsInMap(code)){console.warn('possible region mismatch!',code,region.nb_visits);}});});} function updateCitySymbols(){var layerName=self.mode!="region"?"regions2":"regions";if(map.getLayer(layerName))map.getLayer(layerName).style('fill',invisibleRegionBackgroundColor);indicateLoading();ajax(_reportParams('UserCountry','getCity',UserCountryMap.countriesByIso[iso].iso2)).done(function(data){convertBounceRatesToPercents(data);loadingComplete();var metric=$$('.userCountryMapSelectMetrics').val(),colscale,totalCountryVisits=UserCountryMap.countriesByIso[iso].nb_visits,unlocated=totalCountryVisits,cities=[];$.each(data.reportData,function(i,row){unlocated-=row.nb_visits;cities.push($.extend(row,data.reportMetadata[i],{curMetric:quantify(row,metric)}));});displayUnlocatableCount(unlocated,totalCountryVisits,'city');cities.sort(function(a,b){return b.curMetric-a.curMetric;});colscale=getColorScale(cities,metric);var radscale=$K.scale.linear(cities.concat({curMetric:0}),'curMetric');var area=map.container.width()*map.container.height(),sumArea=0,f={nb_visits:0.002,nb_uniq_visitors:0.002,nb_actions:0.002,avg_time_on_site:0.02,nb_actions_per_visit:0.02,bounce_rate:0.02},maxRad;$.each(cities,function(i,city){sumArea+=isNaN(city.curMetric)?0:Math.pow(radscale(city.curMetric),2);});maxRad=Math.sqrt(area*f[metric]/ sumArea);radscale=$K.scale.sqrt(cities.concat({curMetric:0}),'curMetric').range([2,maxRad+2]);var citySymbols=map.addSymbols({type:$K.LabeledBubble,data:cities,clustering:'noverlap',clusteringOpts:{size:128,tolerance:0},title:function(d){var v=d.curMetric;if(isNaN(v)){return'';} if(metric==='bounce_rate'){v=Number((''+v).replace('%',''));}else if(metric==='avg_time_on_site'){v=Number(v);} if(isNaN(v)){return'';} if(radscale(v)>10){return formatNumber(d.curMetric,metric);} return'';},labelattrs:{fill:cityLabelColor,'font-size':11,stroke:false,cursor:'pointer'},filter:function(d){if(isNaN(d.lat)||isNaN(d.long))return false;return!!d.curMetric&&d.curMetric!=='0';},aggregate:function(rows){var row=aggregate(rows);row.city_names=[];row.label=rows[0].label;$.each(rows,function(i,r){row.city_names=row.city_names.concat(r.city_names?r.city_names:[r.city_name]);});row.city_name=row.city_names[0]+(row.city_names.length>1?' '+_.and_n_others.replace('%s',(row.city_names.length-1)):'');row.curMetric=quantify(row,metric);return row;},sortBy:'radius desc',location:function(city){return[city.long,city.lat];},radius:function(city){var scale=radscale(city.curMetric);if(isNaN(scale)){return 0.01;} return scale;},tooltip:function(city){return'<h3>'+city.city_name+'</h3>'+ formatValueForTooltips(city,metric,iso);},attrs:function(city){var color=colscale(city.curMetric);if(color&&color.hex){color=color.hex();} return{fill:color,'fill-opacity':0.7,stroke:cityStrokeColor,cursor:'pointer'};},mouseenter:function(city,symbol,evt){symbol.path.attr({'fill-opacity':1,'stroke':cityHighlightStrokeColor,'stroke-opacity':1,'stroke-width':2});if(evt.shiftKey){symbol.path.attr({fill:cityHighlightFillColor});if(symbol.label)symbol.label.attr({fill:cityHighlightLabelColor});}},mouseleave:function(city,symbol){symbol.path.attr({'fill-opacity':0.7,'stroke-opacity':1,'stroke-width':1,'stroke':cityLabelColor});if($.inArray(city.label,_rowEvolution.labels)==-1){symbol.path.attr({fill:colscale(city.curMetric)});if(symbol.label)symbol.label.attr({fill:cityLabelFillColor});}},click:function(city,symbol,evt){if(evt.shiftKey){addMultipleRowEvolution('getCity',city.label);symbol.path.attr('fill',citySelectedColor);if(symbol.label)symbol.label.attr('fill',citySelectedLabelColor);}else{showRowEvolution('getCity',city.label);citySymbols.update({attrs:function(city){return{fill:colscale(city.curMetric)};}});}}});});} _updateMap(iso+'.svg',function(){map.addLayer('context',{key:'iso',filter:function(pd){return UserCountryMap.countriesByIso[pd.iso]===undefined;}});map.addLayer('context',{key:'iso',name:'context-clickable',filter:function(pd){return UserCountryMap.countriesByIso[pd.iso]!==undefined;},click:function(path,p,evt){evt.stopPropagation();hasUserZoomed=true;updateState(path.iso);},tooltips:function(data){if(UserCountryMap.countriesByIso[data.iso]===undefined){return'no data';} var metric=$$('.userCountryMapSelectMetrics').val(),country=UserCountryMap.countriesByIso[data.iso];return'<h3>'+country.name+'</h3>'+ formatValueForTooltips(country,metric,'world');}});function isThisCountry(d){return d.iso==iso;} map.addLayer("context",{name:"regionBG",filter:isThisCountry});map.addLayer("context",{name:"regionBG-fill",filter:isThisCountry});map.addLayer('regions',{key:'fips',name:self.mode!="region"?"regions2":"regions",styles:{stroke:regionLayerStrokeColor},click:function(d,p,evt){evt.stopPropagation();}});function filtCountryLabels(data){return data.iso!=iso&&map.getLayer('context-clickable')&&map.getLayer('context-clickable').getPath(data.iso)&&Math.abs(map.getLayer('context-clickable').getPath(data.iso).path.area())>700;} function countryLabelPos(data){var CLP=UserCountryMap.customLabelPositions;if(CLP[iso]&&CLP[iso][data.iso])return CLP[iso][data.iso];return'context-clickable.'+data.iso;} map.addSymbols({data:map.getLayer('context-clickable').getPathsData(),type:$K.Label,filter:filtCountryLabels,location:countryLabelPos,text:function(data){return UserCountryMap.countriesByIso[data.iso].iso2;},'class':'countryLabelBg'});map.addSymbols({data:map.getLayer('context-clickable').getPathsData(),type:$K.Label,filter:filtCountryLabels,location:countryLabelPos,text:function(data){return UserCountryMap.countriesByIso[data.iso].iso2;},'class':'countryLabel'});if(!UserCountryMap.countriesByIso[iso])return;if(self.mode=="region"){updateRegionColors();}else{updateCitySymbols();}});} var _rowEvolution={labels:[],method:false};function addMultipleRowEvolution(method,label){if(method!=_rowEvolution.method){_rowEvolution={method:method,labels:[]};} _rowEvolution.labels.push(label);} function showRowEvolution(method,label,column){var box=Piwik_Popover.showLoading('Row Evolution'),multiple,oldLabels=_rowEvolution.labels.slice();multiple=method==_rowEvolution.method&&_rowEvolution.labels.length>0;if(multiple){_rowEvolution.labels.push(label);$.each(_rowEvolution.labels,function(i,l){_rowEvolution.labels[i]=l.replace(/, /g,'%2C%20');});} var requestParams=$.extend({},{apiMethod:'UserCountry.'+method,label:multiple?_rowEvolution.labels.join(','):label.replace(/, /g,'%2C%20'),disableLink:1,module:'CoreHome',idSite:config.reqParams.idSite,period:config.reqParams.period,date:config.reqParams.date,action:multiple?'getMultiRowEvolutionPopover':'getRowEvolutionPopover',token_auth:config.reqParams.token_auth});if(column){requestParams.column=column;} ajax(requestParams,'html').done(function(html){Piwik_Popover.setContent(html);var title=box.find('div.popover-title');if(title.length){Piwik_Popover.setTitle(title.html());title.remove();} box.find('.compare-container').hide();box.find('.rowevolution-startmulti').hide();box.find('.multirowevoltion-metric').off('change').change(function(e){_rowEvolution.labels=oldLabels;showRowEvolution(method,label,box.find('.multirowevoltion-metric').val());});});_rowEvolution.labels=[];} ajax(_reportParams('UserCountry','getCountry')).done(function(report){convertBounceRatesToPercents(report);var metrics=$$('.userCountryMapSelectMetrics option');var countryData=[],countrySelect=$$('.userCountryMapSelectCountry'),countriesByIso={};UserCountryMap.lastReportMetricStats={};$.each(report.reportData,function(i,data){var meta=report.reportMetadata[i],country={name:data.label,iso2:meta.code.toUpperCase(),fips:meta.code.toUpperCase(),iso:UserCountryMap.ISO2toISO3[meta.code.toUpperCase()],flag:meta.logo};if(UserCountryMap.differentFIPS[country.iso2]){country.fips=UserCountryMap.differentFIPS[country.iso2];} $.each(metrics,function(i,metric){metric=$(metric).val();country[metric]=data[metric];});countryData.push(country);countriesByIso[country.iso]=country;});countryData.sort(function(a,b){return a.name>b.name?1:-1;});UserCountryMap.countryData=countryData;UserCountryMap.countriesByIso=countriesByIso;function postCSSLoad(){$$('.UserCountryMap .loadingPiwik').hide();var params=self.widget.dashboardWidget('getWidgetObject').parameters;self.mode=params&¶ms.viewMode?params.viewMode:'region';if(params&¶ms.lastMetric)$$('.userCountryMapSelectMetrics').val(params.lastMetric);var isoCodes=[];$.each(countryData,function(i,country){if(!!country.iso){isoCodes.push(country.iso);countrySelect.append('<option value="'+country.iso+'">'+country.name+'</option>');}});if(!hasUserZoomed&&isoCodes.length===1&&isoCodes[0]&&isoCodes[0]!=='UNK'){updateState(isoCodes[0]);}else{updateState(params&¶ms.lastMap?params.lastMap:'world');} initUserInterface();} if(!$("link[href='"+config.mapCssPath+"']").length){map.loadCSS(config.mapCssPath,postCSSLoad);}else{postCSSLoad();}});function hideOverlay(e){var overlay=$('.content',$(e.target).parents('.UserCountryMap-overlay'));if(overlay.data('locked'))return;overlay.data('locked',true);overlay.fadeOut(200);$$('.UserCountryMap').mouseleave(function(){overlay.fadeIn(200);$$('.UserCountryMap').parent().off('mouseleave');setTimeout(function(){overlay.data('locked',false);},1000);});var offset=$$('.UserCountryMap').offset(),dim={x:overlay.offset().left-offset.left,y:overlay.offset().top-offset.top,w:overlay.width(),h:overlay.height()};$$('.UserCountryMap').mousemove(function(e){var mx=e.pageX-offset.left,my=e.pageY-offset.top,pad=20,outside=mx<dim.x-pad||mx>dim.x+dim.w+pad||my<dim.y-pad||my>dim.y+dim.h+pad;if(outside){$$('.UserCountryMap').parent().off('mouseleave');setTimeout(function(){overlay.fadeIn(200);setTimeout(function(){overlay.data('locked',false);},1000);},100);}});} $('.UserCountryMap-overlay').off('mouseenter').on('mouseenter',hideOverlay);$$('.widgetUserCountryMapvisitorMap .widgetName span').remove();$$('.widgetUserCountryMapvisitorMap .widgetName').append('<span class="map-title"></span>');function convertBounceRatesToPercents(report){$.each(report.reportData,function(i,row){if(row['bounce_rate']){row['bounce_rate']=parseFloat(row['bounce_rate'])*100;}});}},resize:function(){var ratio,w,h,map=this.map;ratio=map.viewAB.width / map.viewAB.height;w=map.container.width();h=w / ratio;if(!this.theWidget&&map.container.parents('.widget').length){var maxHeight=$(window).height()-($('html').height()-map.container.height());h=Math.min(maxHeight,h);} map.container.height(h-2);map.resize(w,h);if(w<355)$('.UserCountryMap .tableIcon span').hide();else $('.UserCountryMap .tableIcon span').show();},destroy:function(){this.map.clear();$(this.map.container).html('');$(window).off('resize',this._onResizeLazy)}});}());$.extend(UserCountryMap,{ISO2toISO3:{"BD":"BGD","BE":"BEL","BF":"BFA","BG":"BGR","BA":"BIH","BB":"BRB","WF":"WLF","BL":"BLM","BM":"BMU","BN":"BRN","BO":"BOL","BH":"BHR","BI":"BDI","BJ":"BEN","BT":"BTN","JM":"JAM","BV":"BVT","BW":"BWA","WS":"WSM","BQ":"BES","BR":"BRA","BS":"BHS","JE":"JEY","BY":"BLR","BZ":"BLZ","RU":"RUS","RW":"RWA","RS":"SRB","TL":"TLS","RE":"REU","TM":"TKM","TJ":"TJK","RO":"ROU","TK":"TKL","GW":"GNB","GU":"GUM","GT":"GTM","GS":"SGS","GR":"GRC","GQ":"GNQ","GP":"GLP","JP":"JPN","GY":"GUY","GG":"GGY","GF":"GUF","GE":"GEO","GD":"GRD","GB":"GBR","GA":"GAB","SV":"SLV","GN":"GIN","GM":"GMB","GL":"GRL","GI":"GIB","GH":"GHA","OM":"OMN","TN":"TUN","JO":"JOR","HR":"HRV","HT":"HTI","HU":"HUN","HK":"HKG","HN":"HND","HM":"HMD","VE":"VEN","PR":"PRI","PS":"PSE","PW":"PLW","PT":"PRT","SJ":"SJM","PY":"PRY","IQ":"IRQ","PA":"PAN","PF":"PYF","PG":"PNG","PE":"PER","PK":"PAK","PH":"PHL","PN":"PCN","PL":"POL","PM":"SPM","ZM":"ZMB","EH":"ESH","EE":"EST","EG":"EGY","ZA":"ZAF","EC":"ECU","IT":"ITA","VN":"VNM","SB":"SLB","ET":"ETH","SO":"SOM","ZW":"ZWE","SA":"SAU","ES":"ESP","ER":"ERI","ME":"MNE","MD":"MDA","MG":"MDG","MF":"MAF","MA":"MAR","MC":"MCO","UZ":"UZB","MM":"MMR","ML":"MLI","MO":"MAC","MN":"MNG","MH":"MHL","MK":"MKD","MU":"MUS","MT":"MLT","MW":"MWI","MV":"MDV","MQ":"MTQ","MP":"MNP","MS":"MSR","MR":"MRT","IM":"IMN","UG":"UGA","TZ":"TZA","MY":"MYS","MX":"MEX","IL":"ISR","FR":"FRA","IO":"IOT","SH":"SHN","FI":"FIN","FJ":"FJI","FK":"FLK","FM":"FSM","FO":"FRO","NI":"NIC","NL":"NLD","NO":"NOR","NA":"NAM","VU":"VUT","NC":"NCL","NE":"NER","NF":"NFK","NG":"NGA","NZ":"NZL","NP":"NPL","NR":"NRU","NU":"NIU","CK":"COK","XK":"XKX","CI":"CIV","CH":"CHE","CO":"COL","CN":"CHN","CM":"CMR","CL":"CHL","CC":"CCK","CA":"CAN","CG":"COG","CF":"CAF","CD":"COD","CZ":"CZE","CY":"CYP","CX":"CXR","CS":"SCG","CR":"CRI","CW":"CUW","CV":"CPV","CU":"CUB","SZ":"SWZ","SY":"SYR","SX":"SXM","KG":"KGZ","KE":"KEN","SS":"SSD","SR":"SUR","KI":"KIR","KH":"KHM","KN":"KNA","KM":"COM","ST":"STP","SK":"SVK","KR":"KOR","SI":"SVN","KP":"PRK","KW":"KWT","SN":"SEN","SM":"SMR","SL":"SLE","SC":"SYC","KZ":"KAZ","KY":"CYM","SG":"SGP","SE":"SWE","SD":"SDN","DO":"DOM","DM":"DMA","DJ":"DJI","DK":"DNK","VG":"VGB","DE":"DEU","YE":"YEM","DZ":"DZA","US":"USA","UY":"URY","YT":"MYT","UM":"UMI","LB":"LBN","LC":"LCA","LA":"LAO","TV":"TUV","TW":"TWN","TT":"TTO","TR":"TUR","LK":"LKA","LI":"LIE","LV":"LVA","TO":"TON","LT":"LTU","LU":"LUX","LR":"LBR","LS":"LSO","TH":"THA","TF":"ATF","TG":"TGO","TD":"TCD","TC":"TCA","LY":"LBY","VA":"VAT","VC":"VCT","AE":"ARE","AD":"AND","AG":"ATG","AF":"AFG","AI":"AIA","VI":"VIR","IS":"ISL","IR":"IRN","AM":"ARM","AL":"ALB","AO":"AGO","AN":"ANT","AQ":"ATA","AS":"ASM","AR":"ARG","AU":"AUS","AT":"AUT","AW":"ABW","IN":"IND","AX":"ALA","AZ":"AZE","IE":"IRL","ID":"IDN","UA":"UKR","QA":"QAT","MZ":"MOZ"},ISO3toCONT:{"AGO":"AF","DZA":"AF","EGY":"AF","BGD":"AS","NER":"AF","LIE":"EU","NAM":"AF","BGR":"EU","BOL":"SA","GHA":"AF","CCK":"AS","PAK":"AS","CPV":"AF","JOR":"AS","LBR":"AF","LBY":"AF","MYS":"OC","DOM":"NA","PRI":"NA","SXM":"NA","PRK":"AS","PSE":"AS","TZA":"AF","BWA":"AF","KHM":"AS","UMI":"OC","NIC":"NA","TTO":"NA","ETH":"AF","PRY":"SA","HKG":"AS","SAU":"AS","LBN":"AS","SVN":"EU","BFA":"AF","CHE":"EU","MRT":"AF","HRV":"EU","CHL":"SA","CHN":"AS","KNA":"NA","SLE":"AF","JAM":"NA","SMR":"EU","GIB":"EU","DJI":"AF","GIN":"AF","FIN":"EU","URY":"SA","THA":"AS","STP":"AF","SYC":"AF","NPL":"AS","CXR":"AS","LAO":"AS","YEM":"AS","BVT":"AN","ZAF":"AF","KIR":"OC","PHL":"AS","ROU":"EU","VIR":"NA","SYR":"AS","MAC":"AS","MAF":"NA","MLT":"EU","KAZ":"AS","TCA":"NA","PYF":"OC","NIU":"OC","DMA":"NA","BEN":"AF","GUF":"SA","BEL":"EU","MSR":"NA","TGO":"AF","DEU":"EU","GUM":"OC","LKA":"AS","SSD":"AF","FLK":"SA","GBR":"EU","BES":"NA","GUY":"SA","CRI":"NA","CMR":"AF","MAR":"AF","MNP":"OC","LSO":"AF","HUN":"EU","TKM":"AS","SUR":"SA","NLD":"EU","BMU":"NA","HMD":"AN","TCD":"AF","GEO":"AS","MNE":"EU","MNG":"AS","MHL":"OC","MTQ":"NA","BLZ":"NA","NFK":"OC","MMR":"AS","AFG":"AS","BDI":"AF","VGB":"NA","BLR":"EU","BLM":"NA","GRD":"NA","TKL":"OC","GRC":"EU","RUS":"EU","GRL":"NA","SHN":"AF","AND":"EU","MOZ":"AF","TJK":"AS","XKX":"EU","HTI":"NA","MEX":"NA","ANT":"NA","ZWE":"AF","LCA":"NA","IND":"AS","LVA":"EU","BTN":"AS","VCT":"NA","VNM":"AS","NOR":"EU","CZE":"EU","ATF":"AN","ATG":"NA","FJI":"OC","IOT":"AS","HND":"NA","MUS":"AF","ATA":"AN","LUX":"EU","ISR":"AS","FSM":"OC","PER":"SA","REU":"AF","IDN":"OC","VUT":"OC","MKD":"EU","COD":"AF","COG":"AF","ISL":"EU","GLP":"NA","COK":"OC","COM":"AF","COL":"SA","NGA":"AF","TLS":"OC","TWN":"AS","PRT":"EU","MDA":"EU","GGY":"EU","MDG":"AF","ECU":"SA","SEN":"AF","NZL":"OC","MDV":"AS","ASM":"OC","SPM":"NA","CUW":"NA","FRA":"EU","LTU":"EU","RWA":"AF","ZMB":"AF","GMB":"AF","WLF":"OC","JEY":"EU","FRO":"EU","GTM":"NA","DNK":"EU","IMN":"EU","AUS":"OC","AUT":"EU","SJM":"EU","VEN":"SA","PLW":"OC","KEN":"AF","MYT":"AF","WSM":"OC","TUR":"AS","ALB":"EU","OMN":"AS","TUV":"OC","ALA":"EU","BRN":"AS","TUN":"AF","PCN":"OC","BRB":"NA","BRA":"SA","CIV":"AF","SRB":"EU","GNQ":"AF","USA":"NA","QAT":"AS","SWE":"EU","AZE":"AS","GNB":"AF","SWZ":"AF","TON":"OC","CAN":"NA","UKR":"EU","KOR":"AS","AIA":"NA","CAF":"AF","SVK":"EU","CYP":"EU","BIH":"EU","SGP":"AS","SGS":"AN","SOM":"AF","UZB":"AS","ERI":"AF","POL":"EU","KWT":"AS","SCG":"EU","GAB":"AF","CYM":"NA","VAT":"EU","EST":"EU","MWI":"AF","ESP":"EU","IRQ":"AS","SLV":"NA","MLI":"AF","IRL":"EU","IRN":"AS","ABW":"NA","PNG":"OC","PAN":"NA","SDN":"AF","SLB":"OC","ESH":"AF","MCO":"EU","ITA":"EU","JPN":"AS","KGZ":"AS","UGA":"AF","NCL":"OC","ARE":"AS","ARG":"SA","BHS":"NA","BHR":"AS","ARM":"AS","NRU":"OC","CUB":"NA"},aggregate:{GBR:{groups:{"East Midlands":["H5","D2","D3","H7","J1","H4","L4","J8","J9"],"West Midlands":["","O2","P3","F7","Q4","N1","N4","L6"],"South West":["E6","A4","B7","J4","M6","M3","D4","B2","D6","K5","C6","K4","O4","N9","P8"],"North East":["","D1","D8","F5","I5","K9","N3","J6"],"Scotland":["U4","U5","U7","V2","V4","U5","V8","W2","W4","W5","W7","T5","T6","U9","V9","W6","U1","W1","T7","U3","V1","U6","U8","V5","W9","T9","U2","U9","V3","T8","W8"],"South East":["F2","M4","I6","B9","","B6","E2","I3","P6","K2","N7","G2","K6","G5"],"North West":["","E9","C5","A8","H2","C9","P2","I2"],"Yorkshire and the Humber":["G6","J2","J3","Q5","E1","J7","",""],"Northern Ireland":["R3","S6","T3","Q8","S9","R2","R8","S1","S5","R7","Q6","S7","Q9","S3","R4","T1","T2","R9","R6","R1","S4","R5","T4","S2","Q7","S8"],"London":["H9","A1","A6","B5","B8","C4","C8","D9","E3","E7","F1","G1","G3","G4","I4","K8","L1","N8","O5","O9","P1","P5","F6","F9","G7","E8","F3","F4","H1","H6","I8","M8"],"East":["M5","A5","F8","C3","E4","N5","I9","O3","I1","K3"],"Wales":["X7","X6","Y7","Y8","X3","X4","Y3","Y9","X5","Z3","Y5","Z1","X9","Y1","Z4","X1","X8","Y2","X2","Y4","Y6","Z2"]}},SVN:{groups:{"PS":["08","54","B6"],"NO":["I7","00","13","38","91","94"],"KO":["E6","93","A4","00","A5","16","25","74","76","81","A2","C2"],"SP":["14","36","D2","01","06","07","44","46","J5","E1","84","00"],"LJ":["D4","E3","E5","G4","G7","H6","00","00","00","00","05","09","22","32","37","39","I5","61","64","68","71","72","77","C1"],"JP":["19","35","40","49","50","J9","B7"],"JS":["00","J7","L1","00","00","00","00","00","00","17","66","73","B1","B4","B8","D4"],"PD":["42","28","42","87","E9","00","00","00","18","I3","J1","K7","L3","L8","N2","00","00","00","00","00","00","00","00","00","70","00","00","26","45","55","89","98","B3","C8"],"GO":["03","04","32","52","53","62","A3","B9","D5","F1","F2","K5","00","H4","00","12","B2"],"SA":["D7","E2","F3","I9","92","L7","N3","N5","00","00","00","00","00","00","00","00","00","","11","30","08","57","62","79","83","99","A7","A8","C4","C5","C6","C7","C9"],"ZS":["E7","34","C9","C9"],"PM":["02","47","78","80","86","D1","D6","33","I2","00","00","15","59","I6","00","00","00","00","00","10","29","97","97","A1","A6"]}},FRA:{partial:true,groups:{"A5":["A5","B5"]}},POL:{partial:true,groups:{"82":["82","60"],"85":["85","47","H9"]}},CZE:{partial:true,groups:{"82":["82","70","23","20"],"88":["88","41"]}},BEL:{partial:true,groups:{"12":["12","02"]}},DNK:{partial:true,groups:{"19":["19","07"],"18":["18","15"],"20":["20","12"],"21":["21","11","04"]}}},keys:{"SVN":"region","GBR":"region","ESP":"fips-","ITA":"p","USA":"p","CAN":"p"},customLabelPositions:{CZE:{DEU:[12.3,49]},DEU:{AUT:[13.9,48.1]},ESP:{PRT:[-8.5,39.6]},NLD:{BEL:[4.6,51,1],DEU:[6.9,51.5]},CHE:{FRA:[6.2,47.2],AUT:[9.95,47.2],ITA:[9.7,46.0],DEU:[8.14,47.83]},USA:{MEX:[-102,24],CAN:[-97,52]},BIH:{HRV:[15.3,45]}},differentFIPS:{AD:'AN',AG:'AC',AI:'AV',AQ:'AY',AS:'AQ',AT:'AU',AU:'AS',AW:'AA',AZ:'AJ',BA:'BK',BD:'BG',BF:'UV',BG:'BU',BH:'BA',BI:'BY',BJ:'BN',BL:'TB',BM:'BD',BN:'BX',BO:'BL',BS:'BF',BW:'BC',BY:'BO',BZ:'BH',CC:'CK',CD:'CG',CF:'CT',CG:'CF',CH:'SZ',CI:'IV',CK:'CW',CL:'CI',CN:'CH',CR:'CS',CW:'UC',CX:'KT',CZ:'EZ',DE:'GM',DK:'DA',DM:'DO',DO:'DR',DZ:'AG',EE:'EN',EH:'WI',ES:'SP',GA:'GB',GB:'UK',GD:'GJ',GE:'GG',GF:'FG',GG:'GK',GM:'GA',GN:'GV',GQ:'EK',GS:'SX',GU:'GQ',GW:'PU',HN:'HO',HT:'HA',IE:'EI',IL:'IS',IQ:'IZ',IS:'IC',JP:'JA',KH:'CB',KI:'KR',KM:'CN',KN:'SC',KP:'KN',KR:'KS',XK:'KV',KW:'KU',KY:'CJ',LB:'LE',LC:'ST',LI:'LS',LK:'CE',LR:'LI',LS:'LT',LT:'LH',LV:'LG',MA:'MO',MC:'MN',ME:'MJ',MF:'RN',MG:'MA',MH:'RM',MM:'BM',MN:'MG',MO:'MC',MP:'CQ',MQ:'MB',MS:'MH',MU:'MP',MW:'MI',NA:'WA',NE:'NG',NG:'NI',NI:'NU',NU:'NE',OM:'MU',PA:'PM',PF:'FP',PG:'PP',PH:'RP',PM:'SB',PN:'PC',PR:'RQ',PS:'WE',PT:'PO',PW:'PS',PY:'PA',RS:'RI',RU:'RS',SB:'BP',SC:'SE',SD:'SU',SS:'OD',SE:'SW',SG:'SN',SJ:'SV',SK:'LO',SN:'SG',SR:'NS',ST:'TP',SV:'ES',SX:'NN',SZ:'WZ',TC:'TK',TD:'CD',TF:'FS',TG:'TO',TJ:'TI',TK:'TL',TL:'TT',TM:'TX',TN:'TS',TO:'TN',TR:'TU',TT:'TD',UA:'UP',VA:'VT',VG:'VI',VI:'VQ',VN:'VM',VU:'NH',YE:'YM',YT:'MF',ZA:'SF',ZM:'ZA',ZW:'ZI',CS:'YI',AN:'NT'},cont2cont:{afr:'AF',eur:'EU',amn:'NA',ams:'SA',asi:'AS',oce:'OC',amc:'SA'}}); /*! * Matomo - free/libre analytics platform * * Real time visitors map * Using Kartograph.js http://kartograph.org/ * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function(){var UIControl=require('piwik/UI').UIControl;var RealtimeMap=window.UserCountryMap.RealtimeMap=function(element){UIControl.call(this,element);this._init();this.run();};RealtimeMap.initElements=function(){UIControl.initElements(this,'.RealTimeMap');};$.extend(RealtimeMap.prototype,UIControl.prototype,{_init:function(){var $element=this.$element;this.config=JSON.parse($element.attr('data-config'));if($element.attr('data-standalone')==1){this._initStandaloneMap();} if($('#dashboardWidgetsArea').length){var $widgetContent=$element.closest('.widgetContent');var self=this;$widgetContent.on('widget:maximise',function(){self.resize();}).on('widget:minimise',function(){self.resize();});} this.uniqueId='RealTimeMap_map-'+this._controlId;$('.RealTimeMap_map',$element).attr('id',this.uniqueId);this.map=$K.map('#'+this.uniqueId);$element.focus();},_initStandaloneMap:function(){window.CoreHome.Matomo.postEvent('hidePeriodSelector');$('.realTimeMap_overlay').css('top','0px');$('.realTimeMap_datetime').css('top','20px');},run:function(){var self=this,config=self.config,_=config._,map=self.map,maxVisits=config.maxVisits||100,changeVisitAlpha=typeof config.changeVisitAlpha==='undefined'?true:config.changeVisitAlpha,removeOldVisits=typeof config.removeOldVisits==='undefined'?true:config.removeOldVisits,doNotRefreshVisits=typeof config.doNotRefreshVisits==='undefined'?false:config.doNotRefreshVisits,enableAnimation=typeof config.enableAnimation==='undefined'?true:config.enableAnimation,forceNowValue=typeof config.forceNowValue==='undefined'?false:+config.forceNowValue,lastTimestamp=-1,lastVisits=[],visitSymbols,tokenAuth=''+config.reqParams.token_auth,oldest,isFullscreenWidget=$('.widget').parent().get(0)==document.body,now,nextReqTimer,symbolFadeInTimer=[],colorMode='default',currentMap='world',yesterday=false,userHasZoomed=false,colorManager=piwik.ColorManager,colors=colorManager.getColors('realtime-map',['white-bg','white-fill','black-bg','black-fill','visit-stroke','website-referrer-color','direct-referrer-color','search-referrer-color','live-widget-highlight','live-widget-unhighlight','symbol-animate-fill','region-stroke-color']),currentTheme='white',colorTheme={white:{bg:colors['white-bg'],fill:colors['white-fill']},black:{bg:colors['black-bg'],fill:colors['black-fill']}},visitStrokeColor=colors['visit-stroke'],referrerColorWebsite=colors['referrer-color-website'],referrerColorDirect=colors['referrer-color-direct'],referrerColorSearch=colors['referrer-color-search'],liveWidgetHighlightColor=colors['live-widget-highlight'],liveWidgetUnhighlightColor=colors['live-widget-unhighlight'],symbolAnimateFill=colors['symbol-animate-fill'];self.widget=$('#widgetRealTimeMaprealtimeMap').parent();var preset=self.widget.dashboardWidget('getWidgetObject').parameters;if(preset){currentTheme=preset.colorTheme;colorMode=preset.colorMode;currentMap=preset.lastMap;} function _reportParams(firstRun){return $.extend(config.reqParams,{module:'API',method:'Live.getLastVisitsDetails',filter_limit:maxVisits,showColumns:['latitude','longitude','actions','lastActionTimestamp','visitLocalTime','city','country','countryCode','referrerType','referrerName','referrerTypeName','browserIcon','operatingSystemIcon','deviceType','deviceModel','countryFlag','idVisit','actionDetails','continentCode','actions','searches','goalConversions','visitorId','userId'].join(','),minTimestamp:firstRun?0:lastTimestamp});} function ajax(params){delete params['token_auth'];return $.ajax({url:'index.php?'+$.param(params),dataType:'json',data:{token_auth:tokenAuth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1},type:'POST'});} function _updateMap(svgUrl,callback){if(svgUrl===undefined)return;map.loadMap(config.svgBasePath+svgUrl,function(){map.clear();self.resize();callback();$('.ui-tooltip').remove();},{padding:-3});} function onResizeLazy(){clearTimeout(self._resizeTimer);self._resizeTimer=setTimeout(self.resize.bind(self),300);} function age(r){var nowSecs=Math.floor(now);var o=(r.lastActionTimestamp-oldest)/(nowSecs-oldest);return Math.min(1,Math.max(0,o));} function relativeTime(ds){var val=function(val){return'<strong>'+Math.round(val)+'</strong>';};return(ds<90?_.seconds_ago.replace('%s',val(ds)):ds<5400?_.minutes_ago.replace('%s',val(ds / 60)):ds<129600?_.hours_ago.replace('%s',val(ds / 3600)):_.days_ago.replace('%s',val(ds / 86400)));} function visitTooltip(r){var ds=new Date().getTime()/ 1000-r.lastActionTimestamp,ad=r.actionDetails,ico=function(src){return'<img height="16px" src="'+src+'" alt="" class="icon" /> ';};return'<h3>'+(r.city?$('<span>').text(r.city).html()+' / ':'')+$('<span>').text(r.country).html()+'</h3>'+ ico(r.countryFlag)+ico(r.browserIcon)+ico(r.operatingSystemIcon)+'<br/>'+ r.deviceType+' ('+r.deviceModel+')<br/>'+ (r.userId?_pk_translate('General_UserId')+': '+$('<span>').text(r.userId).html()+'<br/>':'')+ (ad&&ad.length&&ad[ad.length-1].pageTitle?''+$('<span>').text(ad[ad.length-1].pageTitle).html()+'<br/>':'')+'<div class="rel-time" data-actiontime="'+r.lastActionTimestamp+'">'+relativeTime(ds)+'</div>'+ (r.referrerType=="direct"?r.referrerTypeName:_.from+': '+$('<span>').text(r.referrerName).html())+'<br />'+'<small>'+_.local_time+': '+r.visitLocalTime+'</small><br />'+ (self.config.siteHasGoals&&r.goalConversions?'<small>'+_.goal_conversions.replace('%s','<strong>'+r.goalConversions+'</strong>')+ (r.searches>0?', '+_.searches.replace('%s',r.searches):'')+'</small><br />':'')+'<small>'+_.actions.replace('%s','<strong>'+r.actions+'</strong>')+ (r.searches>0?', '+_.searches.replace('%s','<strong>'+r.searches+'</strong>'):'')+'</small>';} function visitRadius(r){return Math.pow(age(r),4)*(self.maxRad-self.minRad)+self.minRad;} function visitColor(r){var col,engaged=self.config.siteHasGoals?r.goalConversions>0:r.actions>4;if(colorMode=='referrerType'){col=({website:referrerColorWebsite,direct:referrerColorDirect,search:referrerColorSearch})[r.referrerType];} else col=chroma.hsl(42*age(r),Math.sqrt(age(r)),(engaged?0.65:0.5)-(1-age(r))*0.45);return col;} function visitSymbolAttrs(r){var result={fill:visitColor(r).hex(),stroke:visitStrokeColor,'stroke-width':1*age(r),r:visitRadius(r),cursor:'pointer'};if(changeVisitAlpha){result['fill-opacity']=Math.pow(age(r),2)*0.8+0.2;result['stroke-opacity']=Math.pow(age(r),1.7)*0.8+0.2;} return result;} function highlightVisit(r){$('#visitsLive').find('li#'+r.idVisit+' .datetime').css('background',liveWidgetHighlightColor);} function unhighlightVisit(r){$('#visitsLive').find('li#'+r.idVisit+' .datetime').css({background:liveWidgetUnhighlightColor});} function animateSymbol(s){var c=map.paper.circle().attr(s.path.attrs);c.insertBefore(s.path);c.attr({fill:false});c.animate({r:c.attrs.r*3,'stroke-width':7,opacity:0},2500,'linear',function(){c.remove();});var col=s.path.attrs.fill,rad=s.path.attrs.r;s.path.show();s.path.attr({fill:symbolAnimateFill,r:0.1,opacity:1});s.path.animate({fill:col,r:rad},700,'bounce');} this.$element.on('mapClick',function(e,visit,mapPath){var VisitorProfileControl=require('piwik/UI').VisitorProfileControl;if(visit&&piwik.visitorProfileEnabled&&VisitorProfileControl&&!self.$element.closest('.visitor-profile').length){VisitorProfileControl.showPopover(visit.visitorId);}else{var cont=UserCountryMap.cont2cont[mapPath.data.continentCode];if(cont&&cont!=currentMap){updateMap(cont);}}});function refreshVisits(firstRun){if(lastTimestamp!=-1&&doNotRefreshVisits&&!firstRun){return;} function gotNewReport(report){if(!self.map||!self.$element.length||!$.contains(document,self.$element[0])){return;} nextReqTimer=setTimeout(refreshVisits,config.liveRefreshAfterMs);$('.realTimeMap_overlay img').hide();$('.realTimeMap_overlay .loading_data').hide();now=forceNowValue||(new Date().getTime()/ 1000);if(firstRun){visitSymbols=map.addSymbols({data:[],type:$K.Bubble,sortBy:function(r){return r.lastActionTimestamp;},radius:visitRadius,location:function(r){return[r.longitude,r.latitude];},attrs:visitSymbolAttrs,tooltip:visitTooltip,mouseenter:highlightVisit,mouseleave:unhighlightVisit,click:function(visit,mapPath,evt){evt.stopPropagation();self.$element.trigger('mapClick',[visit,mapPath]);}});lastVisits=[];} if(report.length){report=$.grep(report,function(r){return r.latitude!==null;});if(firstRun){$('#realTimeMapNoVisitsInfo').toggle(!report.length);}} if(!report.length){if(firstRun){$('.realTimeMap_overlay .showing_visits_of').hide();$('.realTimeMap_overlay .no_data').show();} return;}else{$('.realTimeMap_overlay .showing_visits_of').show();$('.realTimeMap_overlay .no_data').hide();if(yesterday===false){yesterday=report[0].lastActionTimestamp-24*60*60;} lastVisits=[].concat(report).concat(lastVisits).slice(0,maxVisits);oldest=Math.max(lastVisits[lastVisits.length-1].lastActionTimestamp,yesterday);var _removed=0;if(removeOldVisits){visitSymbols.remove(function(r){if(r.lastActionTimestamp<oldest)_removed++;return r.lastActionTimestamp<oldest;});} visitSymbols.update({radius:function(d){return visitSymbolAttrs(d).r;},attrs:visitSymbolAttrs},true);var newSymbols=[];$.each(report,function(i,r){newSymbols.push(visitSymbols.add(r));});visitSymbols.layout().render();if(enableAnimation){$.each(newSymbols,function(i,s){if(i>10)return false;s.path.hide();var t=setTimeout(function(){animateSymbol(s);},1000*(s.data.lastActionTimestamp-now)+config.liveRefreshAfterMs);symbolFadeInTimer.push(t);});} lastTimestamp=report[0].lastActionTimestamp;var dur=lastTimestamp-oldest,d;if(dur<60)d=dur+' '+_.seconds;else if(dur<3600)d=Math.ceil(dur / 60)+' '+_.minutes;else d=Math.ceil(dur / 3600)+' '+_.hours;$('.realTimeMap_timeSpan').html(d);if(!userHasZoomed){var usedContinents=[];var usedCountries=[];var aSymbol;for(var z=0;z<visitSymbols.symbols.length;z++){aSymbol=visitSymbols.symbols[z];if(aSymbol&&aSymbol.data){if(aSymbol.data.continentCode&&-1===usedContinents.indexOf(aSymbol.data.continentCode)){usedContinents.push(aSymbol.data.continentCode);} if(aSymbol.data.countryCode&&-1===usedCountries.indexOf(aSymbol.data.countryCode)){usedCountries.push(aSymbol.data.countryCode);}}} if(usedCountries.length===1&&usedCountries[0]&&usedCountries[0]!=='unk'){updateMap(UserCountryMap.ISO2toISO3[usedCountries[0].toUpperCase()],false);}else if(usedContinents.length===1&&usedContinents[0]&&usedContinents[0]!=='unk'){updateMap(UserCountryMap.cont2cont[usedContinents[0]],false);}}} firstRun=false;} if(firstRun&&lastVisits.length){gotNewReport(lastVisits.slice());}else if(Visibility.hidden()){nextReqTimer=setTimeout(refreshVisits,config.liveRefreshAfterMs);}else{$('.realTimeMap_overlay img').show();ajax(_reportParams(firstRun)).done(gotNewReport);}} function initMap(){$('#widgetRealTimeMapliveMap .loadingPiwik, .RealTimeMap .loadingPiwik').hide();map.addLayer(currentMap.length==3?'context':'countries',{styles:{fill:colorTheme[currentTheme].fill,stroke:colorTheme[currentTheme].bg,'stroke-width':0.2},click:function(d,p,evt){evt.stopPropagation();userHasZoomed=true;if(currentMap.length==2){updateMap(d.iso);}else if(currentMap!='world'){updateMap('world');}else{updateMap(UserCountryMap.ISO3toCONT[d.iso]);}},title:function(d){return d.name;}});if(currentMap.length==3){map.addLayer('regions',{styles:{stroke:colors['region-stroke-color']}});} refreshVisits(true);} function storeSettings(){self.widget.dashboardWidget('setParameters',{lastMap:currentMap,theme:colorTheme,colorMode:colorMode});} function updateMap(_map,_storeSettings){if('undefined'===typeof _storeSettings){_storeSettings=true;} if(_map&¤tMap===_map&&_map!=='world'){return;} clearTimeout(nextReqTimer);$.each(symbolFadeInTimer,function(i,t){clearTimeout(t);});symbolFadeInTimer=[];try{map.removeSymbols();}catch(e){} currentMap=_map;_updateMap(currentMap+'.svg',initMap);if(_storeSettings){storeSettings();}} updateMap(location.hash&&(location.hash=='#world'||location.hash.match(/^#[A-Z]{2,3}$/))?location.hash.slice(1):'world');$('.RealTimeMap_map',this.$element).off('click').click(function(){if(currentMap!='world'){userHasZoomed=true;updateMap('world');}});this.$element.on('keydown',function(evt){if(evt.shiftKey&&evt.altKey&&evt.keyCode==67){colorMode=({'default':'referrerType',referrerType:'default'})[colorMode];storeSettings();} function switchTheme(){self.$element.css({background:colorTheme[currentTheme].bg});if(isFullscreenWidget){$('body').css({background:colorTheme[currentTheme].bg});$('.widget').css({'border-width':1});} map.getLayer('countries').style('fill',colorTheme[currentTheme].fill).style('stroke',colorTheme[currentTheme].bg);storeSettings();} if(evt.shiftKey&&evt.altKey&&evt.keyCode==66){currentTheme='black';switchTheme();} if(evt.shiftKey&&evt.altKey&&evt.keyCode==87){currentTheme='white';switchTheme();}});$(window).on('resize.'+this.uniqueId,onResizeLazy);this._tooltipUpdateInterval=setInterval(function(){$('.qtip .rel-time').each(function(i,el){el=$(el);var ds=new Date().getTime()/ 1000-el.data('actiontime');el.html(relativeTime(ds));});var d=new Date(),datetime=d.toTimeString().slice(0,8);$('.realTimeMap_datetime').html(datetime);},1000);},resize:function(){var ratio,w,h,map=this.map;ratio=map.viewAB.width / map.viewAB.height;w=map.container.width();h=Math.min(w / ratio,$(window).height()-30);var radScale=Math.pow((h*ratio*h)/ 130000,0.3);this.maxRad=10*radScale;this.minRad=4*radScale;map.container.height(h-2);map.resize(w,h);if(map.symbolGroups&&map.symbolGroups.length>0){map.symbolGroups[0].update();} if(w<355)$('.UserCountryMap .tableIcon span').hide();else $('.UserCountryMap .tableIcon span').show();},_destroy:function(){UIControl.prototype._destroy.call(this);if(this._tooltipUpdateInterval){clearInterval(this._tooltipUpdateInterval);} $(window).off('resize.'+this.uniqueId);this.map.clear();$(this.map.container).html('');delete this.map;}});}()); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($){$.widget('piwik.liveWidget',{options:{maxRows:10,interval:3000,maxInterval:300000,dataUrlParams:null,onUpdate:null,fadeInSpeed:'slow'},currentInterval:null,updated:false,updateInterval:null,isStarted:true,_update:function(){this.updated=false;var that=this;var ajaxRequest=new ajaxHelper();ajaxRequest.addParams(this.options.dataUrlParams,'GET');ajaxRequest.setFormat('html');ajaxRequest.setCallback(function(r){if(that.options.replaceContent){$(that.element).html(r);piwikHelper.compileVueEntryComponents(that.element);if(that.options.fadeInSpeed){$(that.element).effect("highlight",{},that.options.fadeInSpeed);}}else{that._parseResponse(r);} that.options.interval=parseInt(that.options.interval,10);if(!that.updated){that.currentInterval+=that.options.interval;}else{that.currentInterval=that.options.interval;if(that.options.onUpdate)that.options.onUpdate();} if(that.options.maxInterval<that.currentInterval){that.currentInterval=that.options.maxInterval;} if(that.isStarted){window.clearTimeout(that.updateInterval);if(that.element.length&&$.contains(document,that.element[0])){that.updateInterval=window.setTimeout(function(){that._update()},that.currentInterval);}}});ajaxRequest.send();},_parseResponse:function(data){if(!data||!data.length){this.updated=false;return;} var items=$('li.visit',$(data));for(var i=items.length;i--;){this._parseItem(items[i]);} this._initTooltips();},_initTooltips:function(){$('li.visit').tooltip({items:'.visitorLogIconWithDetails',track:true,show:false,hide:false,content:function(){return $('<ul>').html($('ul',$(this)).html());},tooltipClass:'small'});},_parseItem:function(item){var visitId=$(item).attr('id');if($('#'+visitId,this.element).length){if($('#'+visitId,this.element).html()!=$(item).html()){this.updated=true;} $('#'+visitId,this.element).remove();$(this.element).prepend(item);}else{this.updated=true;$(item).hide();$(this.element).prepend(item);$(item).fadeIn(this.options.fadeInSpeed);} $('li.visit:gt('+(this.options.maxRows-1)+')',this.element).remove();},_create:function(){if(!this.options.dataUrlParams){console&&console.error('liveWidget error: dataUrlParams needs to be defined in settings.');return;} this.currentInterval=parseInt(this.options.interval,10);if(0===$(this.element).parents('.widget').length){window.CoreHome.Matomo.postEvent('hidePeriodSelector');} var self=this;window.setTimeout(function(){self._initTooltips();},250);this.updateInterval=window.setTimeout(function(){self._update();},this.currentInterval);},_destroy:function(){this.stop();},update:function(){this._update();},start:function(){this.isStarted=true;this.currentInterval=0;this._update();},stop:function(){this.isStarted=false;window.clearTimeout(this.updateInterval);},started:function(){return this.isStarted;},setInterval:function(interval){this.currentInterval=interval;}});})(jQuery);$(function(){var refreshWidget=function(element,refreshAfterXSecs){if(!element.length||!$.contains(document,element[0])){return;} function scheduleAnotherRequest(){setTimeout(function(){refreshWidget(element,refreshAfterXSecs);},refreshAfterXSecs*1000);} if(Visibility.hidden()){scheduleAnotherRequest();return;} var lastMinutes=$(element).attr('data-last-minutes')||3,translations=JSON.parse($(element).attr('data-translations'));var ajaxRequest=new ajaxHelper();ajaxRequest.addParams({module:'API',method:'Live.getCounters',format:'json',lastMinutes:lastMinutes},'get');ajaxRequest.setFormat('json');ajaxRequest.setCallback(function(data){data=data[0];var visitors=data['visitors'];if(visitors==1){var visitorsCountMessage=translations['one_visitor'];} else{var visitorsCountMessage=sprintf(translations['visitors'],visitors);} $('.simple-realtime-visitor-counter',element).attr('title',visitorsCountMessage).find('div').text(visitors);var metrics=$('.simple-realtime-metric',element);var visitsText=data['visits']==1?translations['one_visit']:sprintf(translations['visits'],data['visits']);$(metrics[0]).text(visitsText);var actionsText=data['actions']==1?translations['one_action']:sprintf(translations['actions'],data['actions']);$(metrics[1]).text(actionsText);var lastMinutesText=lastMinutes==1?translations['one_minute']:sprintf(translations['minutes'],lastMinutes);$(metrics[2]).text(lastMinutesText);scheduleAnotherRequest();});ajaxRequest.send();};var exports=require("piwik/Live");exports.initSimpleRealtimeVisitorWidget=function(){$('.simple-realtime-visitor-widget').each(function(){var $this=$(this),refreshAfterXSecs=$this.attr('data-refreshAfterXSecs');if($this.attr('data-inited')){return;} $this.attr('data-inited',1);setTimeout(function(){refreshWidget($this,refreshAfterXSecs);},refreshAfterXSecs*1000);});};});function onClickPause(){$('#pauseImage').hide();$('#playImage').show();return $('#visitsLive').liveWidget('stop');} function onClickPlay(){$('#playImage').hide();$('#pauseImage').show();return $('#visitsLive').liveWidget('start');} (function(){if(!Visibility.isSupported()){return;} var isStoppedByBlur=false;function isStarted(){return $('#visitsLive').liveWidget('started');} function onTabBlur(){if(isStarted()){isStoppedByBlur=true;onClickPause();}} function onTabFocus(){if(isStoppedByBlur&&!isStarted()){isStoppedByBlur=false;onClickPlay();}} Visibility.change(function(event,state){if(Visibility.hidden()){onTabBlur();}else{onTabFocus();}});})(); var SegmentedVisitorLog=function(){function getDataTableFromApiMethod(apiMethod){var div=$(require('piwik/UI').DataTable.getDataTableByReport(apiMethod));if(div.length&&div.data('uiControlObject')){return div.data('uiControlObject');}} function getLabelFromTr($tr,apiMethod){var label;if(apiMethod&&0===apiMethod.indexOf('Actions.')){label=$tr.attr('data-url-label');} if(!label){label=$tr.find('.label .value').text();} if(label){label=$.trim(label);} return label;} function getDimensionFromApiMethod(apiMethod){if(!apiMethod){return;} var dataTable=getDataTableFromApiMethod(apiMethod);var metadata=getMetadataFromDataTable(dataTable);if(metadata&&metadata.dimension){return metadata.dimension;}} function getMetadataFromDataTable(dataTable){if(dataTable){return dataTable.getReportMetadata();}} function findTitleOfRowHavingRawSegmentValue(apiMethod,rawSegmentValue){var $tr=$('[data-report="'+apiMethod+'"] tr[data-segment-filter="'+rawSegmentValue+'"]').first();return getLabelFromTr($tr,apiMethod);} function setPopoverTitle(apiMethod,segment,index){var dataTable=getDataTableFromApiMethod(apiMethod);if(!dataTable){if(index<15){setTimeout(function(){setPopoverTitle(apiMethod,segment,index+1);},150);} return;} var segmentName=getDimensionFromApiMethod(apiMethod);var segmentValue=findTitleOfRowHavingRawSegmentValue(apiMethod,segment);if(!segmentName||(segment&&segment.indexOf(';')>0)){segmentName=_pk_translate('General_Segment');var segmentParts=segment.split(';');segmentValue=segmentParts.join(' '+_pk_translate('General_And')+' ');} segmentName=piwikHelper.escape(segmentName);segmentName=piwikHelper.htmlEntities(segmentName);segmentValue=piwikHelper.escape(segmentValue);segmentValue=piwikHelper.htmlEntities(segmentValue);segmentName=segmentName.replace(/(&)(#[0-9]{2,5};)/g,'&$2');segmentValue=segmentValue.replace(/(&)(#[0-9]{2,5};)/g,'&$2');var title=_pk_translate('Live_SegmentedVisitorLogTitle',[segmentName,segmentValue]);Piwik_Popover.setTitle(title);} function show(apiMethod,segment,extraParams){if(!piwik.visitorLogEnabled){console.error('Visitor Log was disabled in website settings');return;} var box=Piwik_Popover.showLoading('Segmented Visits Log');box.addClass('segmentedVisitorLogPopover');var callback=function(html){Piwik_Popover.setContent(html);var title=box.find('.enrichedHeadline').closest('h2');if(title.find('.title')){var defaultTitle=title.find('.title').text();}else{var defaultTitle=title.text();} if(title.length){title.remove();} Piwik_Popover.setTitle(defaultTitle);setPopoverTitle(apiMethod,segment,0);};var requestParams={module:'Live',action:'indexVisitorLog',segment:encodeURIComponent(segment),disableLink:1,small:1,enableAddNewSegment:1,};$.extend(requestParams,extraParams);var ajaxRequest=new ajaxHelper();ajaxRequest.addParams(requestParams,'get');ajaxRequest.withTokenInUrl();ajaxRequest.setCallback(callback);ajaxRequest.setFormat('html');ajaxRequest.send();} return{show:show}}(); function initializeVisitorActions(elem){var tooltipIsOpened=false;$('a',elem).on('focus',function(){if(tooltipIsOpened){elem.tooltip('close');}});elem.tooltip({items:'[title],.visitorLogIconWithDetails',track:true,show:false,hide:false,content:function(){if($(this).hasClass('visitorLogIconWithDetails')){return $('<ul>').html($('ul',$(this)).html());} var title=$(this).attr('title');return $('<a>').text(title).html().replace(/\n/g,'<br />');},tooltipClass:'small',open:function(){tooltipIsOpened=true;},close:function(){tooltipIsOpened=false;}});$("ol.visitorLog",elem).each(function(){var $actions=$(this).find("li");$actions.each(function(index){var $li=$(this);if(!$li.is('.content')){return;} if(!$actions[index-1]||!$($actions[index-1]).is('.content')||!$actions[index-2]||!$($actions[index-2]).is('.content')){return;} var $collapsedContents=$li;while($collapsedContents.prev().is('.content')){$collapsedContents=$collapsedContents.prev();} if(!$collapsedContents.is('.collapsed-contents')){$collapsedContents=makeCollapsedContents();$collapsedContents.insertBefore($($actions[index-2]));addContentItem($collapsedContents,$($actions[index-2]));addContentItem($collapsedContents,$($actions[index-1]));} addContentItem($collapsedContents,$li);function makeCollapsedContents(){var $li=$('<li/>').attr('class','content collapsed-contents').attr('title',_pk_translate('Live_ClickToSeeAllContents'));$('<div>').html('<img src="plugins/Morpheus/images/contentimpression.svg" class="action-list-action-icon"/>'+' <span class="content-impressions">0</span> content impressions <span class="content-interactions">0</span> interactions').appendTo($li);return $li;} function addContentItem($collapsedContents,$otherLi){if($otherLi.find('.content-interaction').length){var $interactions=$collapsedContents.find('.content-interactions');$interactions.text(parseInt($interactions.text())+1);}else{var $impressions=$collapsedContents.find('.content-impressions');$impressions.text(parseInt($impressions.text())+1);} $otherLi.addClass('duplicate').addClass('collapsed-content-item').val('').attr('style','');}});});$("li.pageviewActions",elem).each(function(){var $divider=$(this).find('.refresh-divider');$divider.prevUntil().addClass('duplicate');$divider.remove();var viewCount=+$(this).attr('data-view-count');if(viewCount<=1||isNaN(viewCount)){return;} var $pageviewAction=$(this).prev();$pageviewAction.find('>div').prepend($("<span>"+viewCount+"</span>").attr({'class':'repeat icon-refresh','title':_pk_translate('Live_PageRefreshed')}));var actionsCount=+$(this).attr('data-actions-on-page');if(actionsCount===0){$pageviewAction.addClass('noPageviewActions');} $('a',$(this)).on('focus',function(){if(tooltipIsOpened){$(this).tooltip('close');}});var $this=$(this);$pageviewAction.attr('origtitle',$pageviewAction.attr('title'));$pageviewAction.attr('title',_pk_translate('Live_ClickToViewAllActions'));$pageviewAction.click(function(e){e.preventDefault();e.stopPropagation();$pageviewAction.addClass('refreshesExpanded');$this.children('.actionList').children().first().removeClass('duplicate').nextUntil('li:not(.duplicate)').removeClass('duplicate');window.setTimeout(function(){$pageviewAction.attr('title',$pageviewAction.attr('origtitle'));$pageviewAction.attr('origtitle',null);},150);$pageviewAction.off('click').find('.icon-refresh').hide();$pageviewAction.triggerHandler('mouseleave');});});window.CoreHome.Matomo.postEvent('Live.initializeVisitorActions',elem);$("ol.actionList",elem).each(function(){var actionsToDisplayCollapsed=+piwik.visitorLogActionsToDisplayCollapsed;var $items=$(this).find("li:not(.pageviewActions):not(.actionsForPageExpander):not(.duplicate)");var hasMoreItemsThanLimit=$items.length>actionsToDisplayCollapsed;$(this).children('.actionsForPageExpander').toggle(hasMoreItemsThanLimit).find('.show-actions-count').text($items.length-actionsToDisplayCollapsed);setLastActionClass($(this));});elem.on('click','.collapsed-contents',function(){$(this).nextUntil(':not(.content)').toggleClass('duplicate');setLastActionClass($(this).closest('ol.actionList'));});elem.on('click','.show-less-actions,.show-more-actions',function(e){e.preventDefault();var actionsToDisplayCollapsed=+piwik.visitorLogActionsToDisplayCollapsed;var $actions=$(e.target).closest('.actionList').find('li:not(.duplicate):not(.actionsForPageExpander)');$actions.each(function(){if($actions.index(this)>=actionsToDisplayCollapsed){$(this).toggle({duration:250});}});$(e.target).parent().find('.show-less-actions,.show-more-actions').toggle();$(e.target).closest('li').toggleClass('expanded collapsed');});elem.find('.show-less-actions:visible').click();function setLastActionClass($list){$list.children(':not(.actionsForPageExpander):not(.duplicate)').removeClass('last-action').last().addClass('last-action');}} (function($,require){var piwik=require('piwik'),exports=require('piwik/UI'),UIControl=exports.UIControl;var VisitorProfileControl=function(element){UIControl.call(this,element);this._setupControl();this._bindEventCallbacks();};VisitorProfileControl.initElements=function(){UIControl.initElements(this,'.visitor-profile');};VisitorProfileControl.showPopover=function(visitorId,idSite){if(!piwik.visitorProfileEnabled){console.error('Visitor Profile was disabled in website settings');return;} var url='module=Live&action=getVisitorProfilePopup&visitorId='+encodeURIComponent(visitorId);if(idSite){url+='&idSite='+idSite;} if($('.RealTimeMap').length>0){url+='&showMap=0';} var ajaxRequest=new ajaxHelper();ajaxRequest.removeDefaultParameter('segment');Piwik_Popover.createPopupAndLoadUrl(url,_pk_translate('Live_VisitorProfile'),'visitor-profile-popup',ajaxRequest);};$.extend(VisitorProfileControl.prototype,UIControl.prototype,{_setupControl:function(){this.$element.focus();},_bindEventCallbacks:function(){var self=this,$element=this.$element;if(!broadcast.popoverParamStack.length){$element.on('click','.visitor-profile-close',function(e){e.preventDefault();try{$element.tooltip('destroy');}catch(e){} Piwik_Popover.close();});}else{$element.on('click','.visitor-profile-close',function(e){e.preventDefault();try{$element.tooltip('destroy');}catch(e){} broadcast.propagateNewPopoverParameter(false);return false;});} $element.on('click','.visitor-profile-toggle-actions',function(e){e.preventDefault();$(this).toggleClass('minimized');if($(this).hasClass('minimized')){$('.visitor-profile-actions',$element).slideUp();}else{$('.visitor-profile-actions',$element).slideDown();} return false;});$element.on('click','.visitor-profile-more-info>a',function(e){e.preventDefault();self._loadMoreVisits();return false;});$element.on('click','.visitor-profile-visit-title',function(){$('.visitor-profile-visit-details-extended',$(this).parents('li')).slideToggle();});$element.on('click','.visitor-profile-show-actions',function(){$('.visitor-profile-actions',$(this).parents('li')).slideToggle();return false;});$element.on('click','.visitor-profile-prev-visitor',function(e){e.preventDefault();self._loadPreviousVisitor();return false;});$element.on('click','.visitor-profile-next-visitor',function(e){e.preventDefault();self._loadNextVisitor();return false;});$element.on('keydown',function(e){if(e.which==37&&!e.altKey){self._loadPreviousVisitor();}else if(e.which==39&&!e.altKey){self._loadNextVisitor();}});$element.on('click','.visitor-profile-show-map',function(e){e.preventDefault();self.toggleMap();return false;});$element.on('mousedown','.visitor-profile-export',function(e){var url=$(this).attr('href');if(url.indexOf('&token_auth=')==-1){if(!piwik.broadcast.isWidgetizeRequestWithoutSession()){url+='&force_api_session=1';} $(this).attr('href',url+'&token_auth='+piwik.token_auth);}});initializeVisitorActions($element);},toggleMap:function(){var $element=this.$element,$map=$('.visitor-profile-map',$element);if(!$map.children().length){this._loadMap($map);return;} if($map.is(':hidden')){if($map.height()<1){$map.resize();} $map.slideDown('slow');var newLabel='Live_HideMap';piwikHelper.lazyScrollTo($('.visitor-profile-location',$element)[0],400);}else{$map.slideUp('slow');var newLabel='Live_ShowMap';} newLabel=_pk_translate(newLabel).replace(' ','\xA0');$('.visitor-profile-show-map',$element).text('('+newLabel+')');},_loadMap:function($map){var self=this;var ajax=new ajaxHelper();ajax.setUrl($map.attr('data-href'));ajax.setCallback(function(response){$map.html(response);self.toggleMap();});ajax.setFormat('html');ajax.setLoadingElement($('.visitor-profile-location > p > .loadingPiwik',self.$element));ajax.send();},_loadMoreVisits:function(){var self=this,$element=this.$element;var loading=$('.visitor-profile-more-info > .loadingPiwik',$element);loading.show();var ajax=new ajaxHelper();ajax.removeDefaultParameter('segment');ajax.addParams({module:'Live',action:'getVisitList',period:'',date:'',visitorId:$element.attr('data-visitor-id'),filter_offset:$('.visitor-profile-visits>li',$element).length,start_number:$('.visitor-profile-visits>li:last',$element).data('number')-1},'GET');ajax.setCallback(function(response){if(response==""){self._showNoMoreVisitsSpan();}else{response=$(response);loading.hide();$('.visitor-profile-visits',$element).append(response);if(response.filter('li').length<10){self._showNoMoreVisitsSpan();} var numbers=$('[data-number]',$element);var max=$(numbers[0]).attr('data-number');if(numbers.length>max){var counter=numbers.length;numbers.each(function(){$(this).attr('data-number',counter);$('.counter',$(this)).text(counter);counter--;});} piwikHelper.lazyScrollTo($(response)[0],400,true);}});ajax.setFormat('html');ajax.send();},_showNoMoreVisitsSpan:function(){var noMoreSpan=$('<span/>').text(_pk_translate('Live_NoMoreVisits')).addClass('visitor-profile-no-visits');$('.visitor-profile-more-info',this.$element).html(noMoreSpan);},_loadPreviousVisitor:function(){this._gotoAdjacentVisitor(this.$element.attr('data-prev-visitor'));},_loadNextVisitor:function(){this._gotoAdjacentVisitor(this.$element.attr('data-next-visitor'));},_gotoAdjacentVisitor:function(idVisitor){if(!idVisitor){return;} if(this._inPopover()){broadcast.propagateNewPopoverParameter('visitorProfile',idVisitor);}else if(this._inWidget()){this.$element.closest('[widgetid]').dashboardWidget('reload',false,true,{visitorId:idVisitor});}},_getFirstVisitId:function(){return $('.visitor-profile-visits>li:first-child>h2',this.$element).attr('data-idvisit');},_inPopover:function(){return!!this.$element.closest('#Piwik_Popover').length;},_inWidget:function(){return!!this.$element.closest('.widget').length;}});exports.VisitorProfileControl=VisitorProfileControl;broadcast.addPopoverHandler('visitorProfile',VisitorProfileControl.showPopover);})(jQuery,require); (function($,require){var exports=require('piwik/UI'),DataTable=exports.DataTable,dataTablePrototype=DataTable.prototype;exports.VisitorLog=function(element){DataTable.call(this,element);};$.extend(exports.VisitorLog.prototype,dataTablePrototype,{handleColumnHighlighting:function(){},setFixWidthToMakeEllipsisWork:function(){},init:function(){dataTablePrototype.init.call(this);var self=this;initializeVisitorActions(this.$element);this.$element.on('click','.visitor-log-visitor-profile-link',function(e){e.preventDefault();broadcast.propagateNewPopoverParameter('visitorProfile',$(this).attr('data-visitor-id'));return false;});this.$element.on('click','.addSegmentToMatomo.dataTableAction',function(e){e.preventDefault();e.stopPropagation();var url=window.location.href;url=broadcast.updateParamValue('addSegmentAsNew='+decodeURIComponent(self.param.segment),url);url=broadcast.updateParamValue('popover=',url);url=broadcast.updateParamValue('category=General_Visitors',url);url=broadcast.updateParamValue('subcategory=Live_VisitorLog',url);url=broadcast.updateParamValue('segment='+self.param.segment,url);window.open(url,"_blank");});},_destroy:function(){try{this.$element.tooltip('destroy');}catch(e){} dataTablePrototype._destroy.call(this);}});})(jQuery,require); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function(){var actionName='SegmentVisitorLog';function getRawSegmentValueFromRow(tr){return $(tr).attr('data-segment-filter');} function getDataTableFromApiMethod(apiMethod){var div=$(require('piwik/UI').DataTable.getDataTableByReport(apiMethod));if(div.length&&div.data('uiControlObject')){return div.data('uiControlObject');}} function getMetadataFromDataTable(dataTable){if(dataTable){return dataTable.getReportMetadata();}} function getDimensionFromApiMethod(apiMethod){if(!apiMethod){return;} var dataTable=getDataTableFromApiMethod(apiMethod);var metadata=getMetadataFromDataTable(dataTable);if(metadata&&metadata.dimension){return metadata.dimension;}} function DataTable_RowActions_SegmentVisitorLog(dataTable){this.dataTable=dataTable;this.actionName=actionName;this.trEventName='piwikTriggerSegmentVisitorLogAction';} DataTable_RowActions_SegmentVisitorLog.prototype=new DataTable_RowAction();DataTable_RowActions_SegmentVisitorLog.prototype.openPopover=function(apiMethod,segment,extraParams){var urlParam=apiMethod+':'+encodeURIComponent(segment)+':'+encodeURIComponent(JSON.stringify(extraParams));broadcast.propagateNewPopoverParameter('RowAction',actionName+':'+urlParam);};DataTable_RowActions_SegmentVisitorLog.prototype.trigger=function(tr,e,subTableLabel){var segment=getRawSegmentValueFromRow(tr);if(this.dataTable.param.segment){segment=decodeURIComponent(this.dataTable.param.segment)+';'+segment;} if(this.dataTable.props.segmented_visitor_log_segment_suffix){segment=segment+';'+this.dataTable.props.segmented_visitor_log_segment_suffix;} this.performAction(segment,tr,e);};DataTable_RowActions_SegmentVisitorLog.prototype.performAction=function(segment,tr,e,originalRow){var apiMethod=this.dataTable.param.module+'.'+this.dataTable.param.action;var extraParams={};if(this.dataTable.param.date&&this.dataTable.param.period){extraParams={date:this.dataTable.param.date,period:this.dataTable.param.period};} var paramOverride=$(originalRow||tr).data('param-override');if(typeof paramOverride!=='object'){paramOverride={};} $.extend(extraParams,paramOverride);$.each(this.dataTable.param,function(index,value){if(index!=='idSite'&&index.indexOf('id')===0&&$.isNumeric(value)){extraParams[index]=value;}});this.openPopover(apiMethod,segment,extraParams);};DataTable_RowActions_SegmentVisitorLog.prototype.doOpenPopover=function(urlParam){var urlParamParts=urlParam.split(':');var apiMethod=urlParamParts.shift();var segment=decodeURIComponent(urlParamParts.shift());var extraParamsString=urlParamParts.shift(),extraParams={};try{extraParams=JSON.parse(decodeURIComponent(extraParamsString));}catch(e){} SegmentedVisitorLog.show(apiMethod,segment,extraParams);};DataTable_RowActions_Registry.register({name:actionName,dataTableIcon:'icon-segmented-visits-log',order:30,dataTableIconTooltip:[_pk_translate('Live_RowActionTooltipTitle'),_pk_translate('Live_RowActionTooltipDefault')],isAvailableOnReport:function(dataTableParams,undefined){return!!piwik.visitorLogEnabled;},isAvailableOnRow:function(dataTableParams,tr){var value=getRawSegmentValueFromRow(tr);if('undefined'===(typeof value)){return false;} var reportTitle=null;var apiMethod=$(tr).parents('div.dataTable').last().attr('data-report');var dimension=getDimensionFromApiMethod(apiMethod);if(dimension){reportTitle=_pk_translate('Live_RowActionTooltipWithDimension',[dimension])}else{reportTitle=_pk_translate('Live_RowActionTooltipDefault');} this.dataTableIconTooltip[1]=reportTitle;return true;},createInstance:function(dataTable,param){if(dataTable!==null&&typeof dataTable.segmentVisitorLogInstance!='undefined'){return dataTable.segmentVisitorLogInstance;} if(dataTable===null&¶m){var report=param.split(':')[0];var tempTable=getDataTableFromApiMethod(report);if(tempTable){dataTable=tempTable;if(typeof dataTable.segmentVisitorLogInstance!='undefined'){return dataTable.segmentVisitorLogInstance;}}} var instance=new DataTable_RowActions_SegmentVisitorLog(dataTable);if(dataTable!==null){dataTable.segmentVisitorLogInstance=instance;} return instance;}});})(); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($,piwik){var annotationsApi={getAnnotationManager:function(idSite,date,period,lastN,callback){var ajaxParams={module:'Annotations',action:'getAnnotationManager',idSite:idSite,date:date,period:period,filter_limit:'-1'};if(lastN){ajaxParams.lastN=lastN;} var ajaxRequest=new ajaxHelper();ajaxRequest.addParams(ajaxParams,'get');ajaxRequest.setCallback(callback);ajaxRequest.setFormat('html');ajaxRequest.send();},addAnnotation:function(idSite,managerDate,managerPeriod,date,note,callback){var ajaxParams={module:'Annotations',action:'addAnnotation',idSite:idSite,date:date,managerDate:managerDate,managerPeriod:managerPeriod,note:note};var ajaxRequest=new ajaxHelper();ajaxRequest.addParams(ajaxParams,'get');ajaxRequest.withTokenInUrl();ajaxRequest.setCallback(callback);ajaxRequest.setFormat('html');ajaxRequest.send();},saveAnnotation:function(idSite,idNote,date,noteData,callback){var ajaxParams={module:'Annotations',action:'saveAnnotation',idSite:idSite,idNote:idNote,date:date};for(var key in noteData){ajaxParams[key]=noteData[key];} var ajaxRequest=new ajaxHelper();ajaxRequest.addParams(ajaxParams,'get');ajaxRequest.withTokenInUrl();ajaxRequest.setCallback(callback);ajaxRequest.setFormat('html');ajaxRequest.send();},deleteAnnotation:function(idSite,idNote,managerDate,managerPeriod,callback){var ajaxParams={module:'Annotations',action:'deleteAnnotation',idSite:idSite,idNote:idNote,date:managerDate,period:managerPeriod};var ajaxRequest=new ajaxHelper();ajaxRequest.addParams(ajaxParams,'get');ajaxRequest.withTokenInUrl();ajaxRequest.setCallback(callback);ajaxRequest.setFormat('html');ajaxRequest.send();},getEvolutionIcons:function(idSite,date,period,lastN,callback){var ajaxParams={module:'Annotations',action:'getEvolutionIcons',idSite:idSite,date:date,period:period,filter_limit:'-1'};if(lastN){ajaxParams.lastN=lastN;} var ajaxRequest=new ajaxHelper();ajaxRequest.addParams(ajaxParams,'get');ajaxRequest.withTokenInUrl();ajaxRequest.setFormat('html');ajaxRequest.setCallback(callback);ajaxRequest.send();}};var today=new Date();var getDatePickerOptions=function(annotation){var annotationDateStr=annotation.attr('data-date'),parts=annotationDateStr.split('-'),annotationDate=new Date(parts[0],parts[1]-1,parts[2]);var result=piwik.getBaseDatePickerOptions(annotationDate);result.showButtonPanel=true;result.currentText=_pk_translate('Intl_Today');var piwikMinDate=result.minDate;result.beforeShowDay=function(date){var valid=true;if(date>today||date<piwikMinDate){valid=false;} return[valid,''];};result.onSelect=function(dateText){$('.annotation-period-edit>a',annotation).text(dateText);$('.datepicker',annotation).hide();};return result;};var toggleAnnotationMode=function(inAnnotationElement){var annotation=$(inAnnotationElement).closest('.annotation');annotation.toggleClass('edit') $('.annotation-period,.annotation-period-edit,.delete-annotation,'+'.annotation-edit-mode,.annotation-view-mode',annotation).toggle();return $(inAnnotationElement).find('.annotation-value');};var createDatePicker=function(annotation){$('.datepicker',annotation).datepicker(getDatePickerOptions(annotation)).hide();};var createDatePickers=function(manager){$('.annotation-period-edit',manager).each(function(){createDatePicker($(this).parent().parent());});};var replaceAnnotationManager=function(manager,html){var newManager=$(html);manager.html(newManager.html()).attr('data-date',newManager.attr('data-date')).attr('data-period',newManager.attr('data-period'));createDatePickers(manager);};var isAnnotationStarred=function(annotation){return!!(+$('.annotation-star',annotation).attr('data-starred')==1);};var replaceAnnotationHtml=function(annotation,html){var newHtml=$(html);annotation.html(newHtml.html()).attr('data-date',newHtml.attr('data-date'));createDatePicker(annotation);};var bindAnnotationManagerEvents=function(manager,idSite,onAnnotationCountChange){if(!onAnnotationCountChange){onAnnotationCountChange=function(){};} manager.on('click','.add-annotation',function(e){e.preventDefault();var $newRow=$('.new-annotation-row',manager);$newRow.show();$(this).hide();return false;});manager.on('click','.new-annotation-cancel',function(){var newAnnotationRow=$(this).parent().parent();newAnnotationRow.hide();$('.add-annotation',newAnnotationRow.closest('.annotation-manager')).show();});manager.on('click','.new-annotation-save',function(){var addRow=$(this).parent().parent(),addNoteInput=addRow.find('.new-annotation-edit'),noteDate=addRow.find('.annotation-period-edit>a').text();if(!addNoteInput.val()){return;} addNoteInput.attr('disabled','disabled');$(this).attr('disabled','disabled');annotationsApi.addAnnotation(idSite,manager.attr('data-date'),manager.attr('data-period'),noteDate,addNoteInput.val(),function(response){replaceAnnotationManager(manager,response);onAnnotationCountChange(noteDate,1,0);});});manager.on('keypress','.new-annotation-edit',function(e){if(e.which==13){$(this).parent().find('.new-annotation-save').click();}});manager.on('click','.annotation-enter-edit-mode',function(e){e.preventDefault();var annotationContent=toggleAnnotationMode(this);annotationContent.find('.annotation-edit').focus();return false;});manager.on('click','.annotation-cancel',function(){toggleAnnotationMode(this);});manager.on('click','.annotation-edit-mode .annotation-save',function(){var annotation=$(this).parent().parent().parent(),input=$('.annotation-edit',annotation),dateEditText=$('.annotation-period-edit>a',annotation).text();if(input[0].defaultValue==input.val()&&dateEditText==annotation.attr('data-date')){toggleAnnotationMode(this);return;} input.attr('disabled','disabled');$(this).attr('disabled','disabled');annotationsApi.saveAnnotation(idSite,annotation.attr('data-id'),dateEditText,{note:input.val()},function(response){response=$(response);var newDate=response.attr('data-date'),isStarred=isAnnotationStarred(response),originalDate=annotation.attr('data-date');replaceAnnotationHtml(annotation,response);if(originalDate!=newDate){onAnnotationCountChange(originalDate,-1,isStarred?-1:0);onAnnotationCountChange(newDate,1,isStarred?1:0);}});});manager.on('keypress','.annotation-value input',function(e){if(e.which==13){$(this).parent().find('.annotation-save').click();}});manager.on('click','.delete-annotation',function(e){e.preventDefault();var annotation=$(this).parent().parent();$(this).attr('disabled','disabled');annotationsApi.deleteAnnotation(idSite,annotation.attr('data-id'),manager.attr('data-date'),manager.attr('data-period'),function(response){replaceAnnotationManager(manager,response);var isStarred=isAnnotationStarred(annotation);onAnnotationCountChange(annotation.attr('data-date'),-1,isStarred?-1:0);});return false;});manager.on('click','.annotation-star-changeable',function(e){var annotation=$(this).parent().parent(),newStarredVal=$(this).attr('data-starred')==0?1:0;annotationsApi.saveAnnotation(idSite,annotation.attr('data-id'),annotation.attr('data-date'),{starred:newStarredVal},function(response){replaceAnnotationHtml(annotation,response);onAnnotationCountChange(annotation.attr('data-date'),0,newStarredVal==0?-1:1);});});manager.on('click','.annotation-period-edit>a',function(e){e.preventDefault();$('.datepicker',$(this).parent()).toggle();return false;});$('body').on('mouseup',function(e){var container=$('.annotation-period-edit>.datepicker:visible').parent();if(!container.has(e.target).length){container.find('.datepicker').hide();}});};var loadingAnnotationManager=false;var showAnnotationViewer=function(domElem,idSite,date,period,lastN,callback){var addToAnnotationCount=function(date,amt,starAmt){if(date.indexOf(',')!=-1){date=date.split(',')[0];} $('.evolution-annotations>span[data-date]',domElem).each(function(){if($(this).attr('data-date')==date){var starredCount=+$(this).attr('data-starred'),annotationCount=+$(this).attr('data-count');var newStarCount=starredCount+starAmt;var newAnno='icon-annotation';if(newStarCount>0){newAnno+=' starred';} $(this).attr('data-starred',newStarCount).find('span').attr('class',newAnno);var newCount=annotationCount+amt;$(this).attr('data-count',newCount).css('opacity',newCount>0?1:0);return false;}});};var manager=$('.annotation-manager',domElem);if(manager.length){if(manager.attr('data-date')==date&&manager.attr('data-period')==period){if(manager.is(':hidden')){manager.slideDown('slow',function(){if(callback)callback(manager)});} else{manager.slideUp('slow',function(){if(callback)callback(manager)});}} else{$('.annotations',manager).html('');$('.loadingPiwik',manager).show();annotationsApi.getAnnotationManager(idSite,date,period,lastN,function(response){replaceAnnotationManager(manager,response);createDatePickers(manager);if(manager.is(':hidden')){manager.slideDown('slow',function(){if(callback)callback(manager)});} else{if(callback){callback(manager);}}});}} else{if(loadingAnnotationManager){return;} loadingAnnotationManager=true;$('.loadingPiwikBelow',domElem).insertAfter($('.evolution-annotations',domElem));var loading=$('.loadingPiwikBelow',domElem).css({display:'block'});annotationsApi.getAnnotationManager(idSite,date,period,lastN,function(response){var manager=$(response).hide();if(!manager.hasClass('annotation-manager')){return;} createDatePickers(manager);bindAnnotationManagerEvents(manager,idSite,addToAnnotationCount);loading.css('visibility','hidden');manager.insertAfter($('.evolution-annotations',domElem));manager.slideDown('slow',function(){loading.hide().css('visibility','visible');loadingAnnotationManager=false;if(callback)callback(manager)});});}};var placeEvolutionIcons=function(annotations,graphElem){var canvases=$('.piwik-graph .jqplot-xaxis canvas',graphElem),noteSize=16;if(!canvases||canvases.length==0){$('span[data-date]',annotations).hide();return true;} $('span[data-date]',annotations).each(function(i){var canvas=$(canvases[i]),canvasCenterX=canvas.position().left+(canvas.width()/ 2);$(this).css({left:canvasCenterX-noteSize / 2,opacity:+$(this).attr('data-count')>0?1:0});});};piwik.annotations={showAnnotationViewer:showAnnotationViewer,placeEvolutionIcons:placeEvolutionIcons,api:annotationsApi};}(jQuery,piwik)); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function DataTable_RowActions_Overlay(dataTable){this.dataTable=dataTable;} DataTable_RowActions_Overlay.prototype=new DataTable_RowAction;DataTable_RowActions_Overlay.registeredReports=[];DataTable_RowActions_Overlay.registerReport=function(handler){DataTable_RowActions_Overlay.registeredReports.push(handler);};DataTable_RowActions_Overlay.prototype.onClick=function(actionA,tr,e,originalRow){if(!actionA.data('overlay-manipulated')){actionA.data('overlay-manipulated',1);var segment,link;var i=0;for(i;i<DataTable_RowActions_Overlay.registeredReports.length;i++){var report=DataTable_RowActions_Overlay.registeredReports[i];if(report&&report.onClick&&report.isAvailableOnReport&&report.isAvailableOnReport(this.dataTable.param)){var result=report.onClick.apply(this,arguments);if(!result||!result.link){return;} link=result.link;if(result.segment){segment=result.segment;} break;}} var paramOverride=$(originalRow||tr).data('param-override');if(typeof paramOverride==='object'&¶mOverride.segment){if(segment){segment+=';'+paramOverride.segment;}else{segment=paramOverride.segment;}} if(link){var href=Overlay_Helper.getOverlayLink(this.dataTable.param.idSite,'month','today',segment,link);actionA.attr({target:'_blank',href:href});}} return true;};DataTable_RowActions_Registry.register({name:'Overlay',dataTableIcon:'icon-overlay',order:30,dataTableIconTooltip:[_pk_translate('General_OverlayRowActionTooltipTitle'),_pk_translate('General_OverlayRowActionTooltip')],createInstance:function(dataTable){return new DataTable_RowActions_Overlay(dataTable);},isAvailableOnReport:function(dataTableParams){if(!window.DataTable_RowActions_Transitions){return false;} var i=0;for(i;i<DataTable_RowActions_Overlay.registeredReports.length;i++){var report=DataTable_RowActions_Overlay.registeredReports[i];if(report&&report.isAvailableOnReport&&report.isAvailableOnReport(dataTableParams)){return true;}} return false;},isAvailableOnRow:function(dataTableParams,tr){var transitions=DataTable_RowActions_Registry.getActionByName('Transitions');return transitions.isAvailableOnRow(dataTableParams,tr);}}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ var Overlay_Helper={encodeFrameUrl:function(url){return encodeURIComponent(url).replace(/%/g,'$')},decodeFrameUrl:function(url){return decodeURIComponent(url.replace(/\$/g,'%'));},getOverlayLink:function(idSite,period,date,segment,link){var url='index.php?module=Overlay&period='+encodeURIComponent(period)+'&date='+encodeURIComponent(date)+'&idSite='+encodeURIComponent(idSite);if(segment){url+='&segment='+encodeURIComponent(segment);} var token_auth=piwik.broadcast.getValueFromUrl("token_auth");if(token_auth.length&&piwik.shouldPropagateTokenAuth){if(!piwik.broadcast.isWidgetizeRequestWithoutSession()){url+='&force_api_session=1';} url+='&token_auth='+encodeURIComponent(token_auth);} if(link){url+='#?l='+Overlay_Helper.encodeFrameUrl(link);} return url;}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ Segmentation=(function($){piwikHelper.registerShortcut('s',_pk_translate('CoreHome_ShortcutSegmentSelector'),function(event){if(event.altKey){return;} if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;} $('.segmentListContainer .segmentationContainer .title').trigger('click').focus();});var segmentation=function segmentation(config){if(!config.target){throw new Error("target property must be set in config to segment editor control element");} var self=this;self.currentSegmentStr="";self.segmentAccess="read";self.availableSegments=[];for(var item in config){self[item]=config[item];} self.editorTemplate=self.editorTemplate.detach();self.timer="";self.searchAllowed=true;self.filterTimer="";self.filterAllowed=true;self.availableMatches=[];self.availableMatches["metric"]=[];self.availableMatches["metric"]["=="]=self.translations['General_OperationEquals'];self.availableMatches["metric"]["!="]=self.translations['General_OperationNotEquals'];self.availableMatches["metric"]["<="]=self.translations['General_OperationAtMost'];self.availableMatches["metric"][">="]=self.translations['General_OperationAtLeast'];self.availableMatches["metric"]["<"]=self.translations['General_OperationLessThan'];self.availableMatches["metric"][">"]=self.translations['General_OperationGreaterThan'];self.availableMatches["dimension"]=[];self.availableMatches["dimension"]["=="]=self.translations['General_OperationIs'];self.availableMatches["dimension"]["!="]=self.translations['General_OperationIsNot'];self.availableMatches["dimension"]["=@"]=self.translations['General_OperationContains'];self.availableMatches["dimension"]["!@"]=self.translations['General_OperationDoesNotContain'];self.availableMatches["dimension"]["=^"]=self.translations['General_OperationStartsWith'];self.availableMatches["dimension"]["=$"]=self.translations['General_OperationEndsWith'];segmentation.prototype.setAvailableSegments=function(segments){this.availableSegments=segments;};segmentation.prototype.getSegment=function(){var self=this;return self.currentSegmentStr;};segmentation.prototype.setSegment=function(segmentStr){this.currentSegmentStr=segmentStr;};segmentation.prototype.setTooltip=function(segmentDescription){var title=_pk_translate('SegmentEditor_ChooseASegment')+'.';title+=' '+_pk_translate('SegmentEditor_CurrentlySelectedSegment',[segmentDescription]);$(this.content).attr('title',title);};segmentation.prototype.markComparedSegments=function(){var comparisonService=window.CoreHome.ComparisonsStoreInstance;var comparedSegments=comparisonService.getSegmentComparisons().map(function(comparison){return comparison.params.segment;});$('div.segmentList ul li[data-definition]',this.target).removeClass('comparedSegment').filter(function(){var definition=$(this).attr('data-definition');return comparedSegments.indexOf(definition)!==-1||comparedSegments.indexOf(decodeURIComponent(definition))!==-1;}).each(function(){$(this).addClass('comparedSegment');});};segmentation.prototype.markCurrentSegment=function(){var current=this.getSegment();var segmentationTitle=$(this.content).find(".segmentationTitle");var title;if(current!=""){var selector='div.segmentList ul li[data-definition="'+current+'"]';var foundItems=$(selector,this.target);if(foundItems.length===0){try{currentDecoded=piwikHelper.htmlDecode(current);selector='div.segmentList ul li[data-definition="'+currentDecoded+'"]';foundItems=$(selector,this.target);}catch(e){}} if(foundItems.length===0){try{currentDecoded=piwikHelper.htmlDecode(decodeURIComponent(current));selector='div.segmentList ul li[data-definition="'+currentDecoded+'"]';foundItems=$(selector,this.target);}catch(e){}} if(foundItems.length>0){var idSegment=$(foundItems).first().attr('data-idsegment');title=getSegmentName(getSegmentFromId(idSegment));}else{title=_pk_translate('SegmentEditor_CustomSegment');} segmentationTitle.addClass('segment-clicked').html(title);this.setTooltip(title);} else{title=this.translations['SegmentEditor_DefaultAllVisits'];segmentationTitle.text(title);this.setTooltip(title);}};function handleAddNewSegment(){var segmentToAdd=broadcast.getValueFromHash('addSegmentAsNew')||broadcast.getValueFromUrl('addSegmentAsNew');if(segmentToAdd){showAddNewSegmentForm({definition:decodeURIComponent(segmentToAdd)});}} var getSegmentFromId=function(id){if(self.availableSegments.length>0){for(var i=0;i<self.availableSegments.length;i++){var segment=self.availableSegments[i];if(segment.idsegment==id){return segment;}}} return false;};var getListHtml=function(){var html=self.editorTemplate.find("> .listHtml").clone();var segment,injClass;var listHtml='<li data-idsegment="" '+ (self.currentSegmentStr==""?" class='segmentSelected'":"") +' data-definition=""><span class="segname" tabindex="4">'+self.translations['SegmentEditor_DefaultAllVisits'] +' '+self.translations['General_DefaultAppended'] +'</span>';var comparisonService=window.CoreHome.ComparisonsStoreInstance;if(comparisonService.isComparisonEnabled()||comparisonService.isComparisonEnabled()===null){listHtml+='<span class="compareSegment allVisitsCompareSegment" title="'+_pk_translate('SegmentEditor_CompareThisSegment')+'"></span>';} listHtml+='</li>';var isVisibleToSuperUserNoticeAlreadyDisplayedOnce=false;var isVisibleToSuperUserNoticeShouldBeClosed=false;var isSharedWithMeBySuperUserNoticeAlreadyDisplayedOnce=false;var isSharedWithMeBySuperUserNoticeShouldBeClosed=false;if(self.availableSegments.length>0){for(var i=0;i<self.availableSegments.length;i++){segment=self.availableSegments[i];if(isSegmentSharedWithMeBySuperUser(segment)&&!isSharedWithMeBySuperUserNoticeAlreadyDisplayedOnce){isSharedWithMeBySuperUserNoticeAlreadyDisplayedOnce=true;isSharedWithMeBySuperUserNoticeShouldBeClosed=true;listHtml+='<span class="segmentsSharedWithMeBySuperUser"><hr> '+_pk_translate('SegmentEditor_SharedWithYou')+':<br/><br/>';} if(isSegmentVisibleToSuperUserOnly(segment)&&!isVisibleToSuperUserNoticeAlreadyDisplayedOnce){if(isSharedWithMeBySuperUserNoticeShouldBeClosed){isSharedWithMeBySuperUserNoticeShouldBeClosed=false;listHtml+='</span>';} isVisibleToSuperUserNoticeAlreadyDisplayedOnce=true;isVisibleToSuperUserNoticeShouldBeClosed=true;listHtml+='<span class="segmentsVisibleToSuperUser"><hr> '+_pk_translate('SegmentEditor_VisibleToSuperUser')+':<br/><br/>';} injClass="";var checkSelected=segment.definition;if(checkSelected==self.currentSegmentStr||checkSelected==decodeURIComponent(self.currentSegmentStr)){injClass='class="segmentSelected"';} listHtml+='<li data-idsegment="'+segment.idsegment+'" data-definition="'+(segment.definition).replace(/"/g,'"')+'" ' +injClass+' title="'+getSegmentTooltipEnrichedWithUsername(segment)+'"><span class="segname" tabindex="4">'+getSegmentName(segment)+'</span>';if(self.segmentAccess=="write"){listHtml+='<span class="editSegment" title="'+self.translations['General_Edit'].toLocaleLowerCase()+'"></span>';} if(comparisonService.isComparisonEnabled()||comparisonService.isComparisonEnabled()===null){listHtml+='<span class="compareSegment" title="'+_pk_translate('SegmentEditor_CompareThisSegment')+'"></span>';} listHtml+='</li>';} if(isVisibleToSuperUserNoticeShouldBeClosed){listHtml+='</span>';} if(isSharedWithMeBySuperUserNoticeShouldBeClosed){listHtml+='</span>';} $(html).find(".segmentList > ul").append(listHtml);if(self.segmentAccess==="write"){$(html).find(".add_new_segment").html(self.translations['SegmentEditor_AddNewSegment']);} else{$(html).find(".add_new_segment").hide();}} else{$(html).find(".segmentList > ul").append(listHtml);} return html;};var isSegmentVisibleToSuperUserOnly=function(segment){return hasSuperUserAccessAndSegmentCreatedByAnotherUser(segment)&&segment.enable_all_users==0;};var isSegmentSharedWithMeBySuperUser=function(segment){return segment.login!=piwik.userLogin&&segment.enable_all_users==1;};var hasSuperUserAccessAndSegmentCreatedByAnotherUser=function(segment){return piwik.hasSuperUserAccess&&segment.login!=piwik.userLogin;};var getSegmentTooltipEnrichedWithUsername=function(segment){var segmentName=segment.name;if(hasSuperUserAccessAndSegmentCreatedByAnotherUser(segment)){segmentName+=' (';segmentName+=_pk_translate('General_CreatedByUser',[segment.login]);if(segment.enable_all_users==0){segmentName+=', '+_pk_translate('SegmentEditor_VisibleToSuperUser');} segmentName+=')';} return sanitiseSegmentName(segmentName);};var getSegmentName=function(segment){return sanitiseSegmentName(segment.name);};var sanitiseSegmentName=function(segment){segment=piwikHelper.escape(segment);return segment;};var getFormHtml=function(){var html=self.editorTemplate.find("> .segment-element").clone();$(html).find(".segment-content > h3").after('<div class="segment-generator-container"></div>').show();return html;};var closeAllOpenLists=function(){$(".segmentationContainer",self.target).each(function(){if($(this).closest('.segmentEditorPanel').hasClass("expanded")) $(this).trigger("click");});};var openEditForm=function(segment){addForm("edit",segment);$(self.form).find(".segment-content > h3 > span").html(getSegmentName(segment)).prop('title',getSegmentTooltipEnrichedWithUsername(segment));$(self.form).find('.available_segments_select').val(segment.idsegment);$(self.form).find('.available_segments a.dropList').html(getSegmentName(segment)).prop('title',getSegmentTooltipEnrichedWithUsername(segment));$(self.form).find(".metricList").each(function(){$(this).trigger("change",true);});};var displayFormAddNewSegment=function(segment){closeAllOpenLists();addForm("new",segment);};function showAddNewSegmentForm(segment){var parameters={isAllowed:true};window.CoreHome.Matomo.postEvent('Segmentation.initAddSegment',parameters);if(parameters&&!parameters.isAllowed){return;} displayFormAddNewSegment(segment);} var filterSegmentList=function(keyword){var curTitle;clearFilterSegmentList();$(self.target).find(" .filterNoResults").remove();$(self.target).find(".segmentList li").each(function(){curTitle=$(this).prop('title');$(this).hide();if(curTitle.toLowerCase().indexOf(keyword.toLowerCase())!==-1){$(this).show();}});if($(self.target).find(".segmentList li:visible").length==0){$(self.target).find(".segmentList li:first").before("<li class=\"filterNoResults grayed\">"+self.translations['General_SearchNoResults']+"</li>");} if($(self.target).find(".segmentList .segmentsVisibleToSuperUser li:visible").length==0){$(self.target).find(".segmentList .segmentsVisibleToSuperUser").hide();} if($(self.target).find(".segmentList .segmentsSharedWithMeBySuperUser li:visible").length==0){$(self.target).find(".segmentList .segmentsSharedWithMeBySuperUser").hide();}};var clearFilterSegmentList=function(){$(self.target).find(" .filterNoResults").remove();$(self.target).find(".segmentList li").each(function(){$(this).show();});$(self.target).find(".segmentList .segmentsVisibleToSuperUser").show();$(self.target).find(".segmentList .segmentsSharedWithMeBySuperUser").show();};var bindEvents=function(){self.target.on('click','.segmentationContainer',function(e){if(self.content.closest('.segmentEditorPanel').hasClass("expanded")){if($(e.target).hasClass("jspDrag")===true||$(e.target).hasClass("segmentFilterContainer")===true||$(e.target).parents().hasClass("segmentFilterContainer")===true||$(e.target).hasClass("filterNoResults")){e.stopPropagation();}else{self.target.closest('.segmentEditorPanel').removeClass('expanded');}}else{closeAllOpenLists();self.target.closest('.segmentEditorPanel').addClass('expanded');self.target.find('.segmentFilter').val(self.translations['General_Search']).trigger('keyup');}});self.target.on('click','.editSegment',function(e){$(this).closest(".segmentationContainer").trigger("click");var target=$(this).parent("li");openEditFormGivenSegment(target);e.stopPropagation();e.preventDefault();});self.target.on('click','.compareSegment',function(e){e.stopPropagation();e.preventDefault();var comparisonService=window.CoreHome.ComparisonsStoreInstance;comparisonService.addSegmentComparison({segment:$(e.target).closest('li').data('definition'),});self.markComparedSegments();closeAllOpenLists();});self.target.on("click",".segmentList li",function(e){if($(e.currentTarget).hasClass("grayed")!==true){var segmentDefinition=$(this).data("definition");if(!piwikHelper.isReportingPage()){self.setSegment(segmentDefinition);} self.markCurrentSegment();self.segmentSelectMethod(segmentDefinition);toggleLoadingMessage(segmentDefinition.length);}});self.target.on('click','.add_new_segment',function(e){e.stopPropagation();showAddNewSegmentForm();});self.target.on("keyup",".segmentList li, .add_new_segment",function(event){var keycode=(event.keyCode?event.keyCode:(event.which?event.which:event.key));if(keycode=='13'){$(this).trigger('click');}});self.target.on('click',".segmentFilterContainer span",function(e){$(e.target).parent().find(".segmentFilter").val(self.translations['General_Search']).trigger('keyup');});self.target.on('blur',".segmentFilter",function(e){if($(e.target).parent().find(".segmentFilter").val()==""){$(e.target).parent().find(".segmentFilter").val(self.translations['General_Search'])}});self.target.on('click',".segmentFilter",function(e){if($(e.target).val()==self.translations['General_Search']){$(e.target).val("");}});self.target.on('keyup',".segmentFilter",function(e){var search=$(e.currentTarget).val();if(search==self.translations['General_Search']){search="";} if(search.length>=2){clearTimeout(self.filterTimer);self.filterAllowed=true;self.filterTimer=setTimeout(function(){filterSegmentList(search);},500);} else{self.filterTimer=false;clearFilterSegmentList();}});self.target.on('click',"a.editSegmentName",function(e){var $h3=$(e.currentTarget).parents("h3");$h3.css({'margin':'0 0 0 6px'});var oldName=$h3.find("span").text();$h3.find("span").hide();$(e.currentTarget).hide();$(e.currentTarget).before('<input class="edit_segment_name" type="text"/>');$(e.currentTarget).siblings(".edit_segment_name").focus().val(oldName);});self.target.on("click",".segmentName",function(e){$(self.form).find("a.editSegmentName").trigger('click');});self.target.on('blur',"input.edit_segment_name",function(e){var newName=$(this).val();var segmentNameNode=$(e.currentTarget).parents("h3").find("span");if(newName.trim()){segmentNameNode.text(newName);}else{$(this).val(segmentNameNode.text());}});self.target.on('click','.segment-element',function(e){e.stopPropagation();e.preventDefault();});self.target.on('click',".delete",function(){var segmentName=$(self.form).find(".segment-content > h3 > span").text();var segmentId=$(self.form).find(".available_segments_select").val();var params={"idsegment":segmentId};$('#segment-delete-confirm').find('#name').text(segmentName);if(segmentId!=""){piwikHelper.modalConfirm($('#segment-delete-confirm'),{yes:function(){self.deleteMethod(params);}});}});self.target.on("click","a.close",function(e){$(".segmentListContainer",self.target).show();closeForm();});$("body").on("keyup",function(e){if(e.keyCode=="27"||e.which===27){if(self.target.find('[uicontrol="expandable-select"] .expandableList:visible').length){return;} if(Piwik_Popover.isOpen()){Piwik_Popover.close();return;} $(".segmentListContainer",self.target).show();closeForm();}});};var getAddOrBlockButtonHtml=function(){if(typeof addOrBlockButton==="undefined"){var addOrBlockButton=self.editorTemplate.find("div.segment-add-or").clone();} return addOrBlockButton.clone();};function openEditFormGivenSegment(option){var idsegment=option.attr("data-idsegment");if(idsegment.length==0){displayFormAddNewSegment();}else{var segment=getSegmentFromId(idsegment);segment.definition=option.data("definition");openEditForm(segment);}} var normalizeSearchString=function(search){search=search.replace(/^\s+|\s+$/g,'');search=search.toLowerCase();var from="àáäâèéëêìíïîòóöôùúüûñç·/_,:;";var to="aaaaeeeeiiiioooouuuunc------";for(var i=0,l=from.length;i<l;i++){search=search.replace(new RegExp(from.charAt(i),'g'),to.charAt(i));} search=search.replace(/[^a-z0-9 -]/g,'').replace(/\s+/g,'_').replace(/-+/g,'-');return search;};var addForm=function(mode,segment){self.target.find(".segment-element:visible").unbind().remove();closeForm();self.form=getFormHtml();self.target.prepend(self.form);piwikHelper.setMarginLeftToBeInViewport(self.form);if(self.form.width()+self.target.offset().left>$(window).width()&&self.form.width()<self.target.offset().left+self.target.width()){self.form.addClass('anchorRight');} if(mode=="edit"){$(self.form).find('.enable_all_users_select > option[value="'+segment.enable_all_users+'"]').prop("selected",true);if(hasSuperUserAccessAndSegmentCreatedByAnotherUser(segment)){$(self.form).find('.enable_all_users_select > option[value="'+0+'"]').text(segment.login);} $(self.form).find('.visible_to_website_select > option[value="'+segment.enable_only_idsite+'"]').prop("selected",true);$(self.form).find('.auto_archive_select > option[value="'+segment.auto_archive+'"]').prop("selected",true);} if(segment!==undefined&&segment.definition!=""){self.currentSegmentStr=segment.definition;self.form.find('.segment-generator-container').attr('model-value',JSON.stringify(segment.definition));} makeDropList(".enable_all_users",".enable_all_users_select");makeDropList(".visible_to_website",".visible_to_website_select");makeDropList(".auto_archive",".auto_archive_select");$(self.form).find(".saveAndApply").bind("click",function(e){e.preventDefault();parseFormAndSave();});$(self.form).find(".testSegment").bind("click",function(e){e.preventDefault();testSegment();});if(typeof mode!=="undefined"&&mode=="new"){$(self.form).find(".editSegmentName").trigger('click');} $(".segmentListContainer",self.target).hide();self.target.closest('.segmentEditorPanel').addClass('editing');var segmentGeneratorContainer=$('.segment-generator-container',self.form)[0];var createVueApp=window.CoreHome.createVueApp;var SegmentGenerator=window.SegmentEditor.SegmentGenerator;var app=createVueApp({template:'<root :add-initial-condition="true" v-model="value" />',components:{root:SegmentGenerator,},watch:{value:function(){self.currentSegmentStr=this.value;},},data(){return{value:self.currentSegmentStr,};},});app.mount(segmentGeneratorContainer);segmentGeneratorContainer.addEventListener('matomoVueDestroy',function(){app.unmount();});};var closeForm=function(){self.currentSegmentStr='';if(typeof self.form!=="undefined"){$(self.form).find('.segment-generator-container')[0].dispatchEvent(new CustomEvent('matomoVueDestroy'),);$(self.form).unbind().remove();} self.target.closest('.segmentEditorPanel').removeClass('editing');};var parseFormAndSave=function(){var segmentName=$(self.form).find(".segment-content > h3 >span").text();var segmentStr=self.currentSegmentStr;var segmentId=$(self.form).find(".available_segments_select").val()||"";var user=$(self.form).find(".enable_all_users_select option:selected").val();if($(self.form).find(".auto_archive_select").length){var autoArchive=$(self.form).find(".auto_archive_select option:selected").val()||0;}else{var autoArchive=1;} var params={"name":segmentName,"definition":segmentStr,"enabledAllUsers":user,"autoArchive":autoArchive,"idSite":$(self.form).find(".visible_to_website_select option:selected").val()};if(segmentId===""){self.addMethod(params);} else{jQuery.extend(params,{"idSegment":segmentId});if(segmentStr!=getSegmentFromId(segmentId).definition&&$('.segment-definition-change-confirm').data('hideMessage')!=1){var isBrowserArchivingAvailableForSegments=$('.segment-definition-change-confirm').data('segmentProcessedOnRequest');var isRealTimeSegment=(autoArchive==0);var segmentNotProcessedOnRequest=!isBrowserArchivingAvailableForSegments||!isRealTimeSegment;$('.process-on-request, .no-process-on-request').hide();if(segmentNotProcessedOnRequest){$('.no-process-on-request').show();}else{$('.process-on-request').show();} piwikHelper.modalConfirm('.segment-definition-change-confirm',{yes:function(){if($('#hideSegmentMessage:checked').length){var ajaxHandler=new ajaxHelper();ajaxHandler.setLoadingElement();ajaxHandler.addParams({"module":'API',"format":'json',"method":'UsersManager.setUserPreference',"userLogin":piwik.userLogin,"preferenceName":"hideSegmentDefinitionChangeMessage","preferenceValue":"1"},'GET');ajaxHandler.useCallbackInCaseOfError();ajaxHandler.setCallback(function(response){self.updateMethod(params);});ajaxHandler.send();}else{self.updateMethod(params);}}});}else{self.updateMethod(params);}}};var testSegment=function(){var segmentStr=self.currentSegmentStr;var encSegment=jQuery(jQuery('.segmentEditorPanel').get(0)).data('uiControlObject').uriEncodeSegmentDefinition(segmentStr);var url=$.param({date:piwik.currentDateString,period:piwik.period,idSite:piwik.idSite,module:'Live',action:'getLastVisitsDetails',segment:encSegment,inPopover:1,});Piwik_Popover.createPopupAndLoadUrl(url,_pk_translate('Live_VisitsLog'));};var makeDropList=function(spanId,selectId){var select=$(self.form).find(selectId);select.hide().closest('.select-wrapper').children().hide();var dropList=$('<a class="dropList dropdown">').insertAfter(select.closest('.hide-select')).text(select.children(':selected').text()).autocomplete({delay:0,minLength:0,appendTo:"body",source:function(request,response){response(select.children("option").map(function(){var text=$(this).text();return{label:text,value:this.value,option:this};}));},select:function(event,ui){event.preventDefault();ui.item.option.selected=true;$(spanId+' option[value="'+ui.item.value+'"]',self.editorTemplate).prop('selected',true);dropList.text(ui.item.label);$(self.form).find(selectId).trigger("change");}}).click(function(){$("a.dropList").autocomplete("close");if($(this).autocomplete("widget").is(":visible")){$(this).autocomplete("close");return;} $(this).autocomplete("search","");});$('body').on('mouseup',function(e){if(!$(e.target).parents(spanId).length&&!$(e.target).is(spanId)&&!$(e.target).parents(spanId).length&&!$(e.target).parents(".ui-autocomplete").length&&!$(e.target).is(".ui-autocomplete")&&!$(e.target).parents(".ui-autocomplete").length){dropList.autocomplete().autocomplete("close");}});};function toggleLoadingMessage(segmentIsSet){if(segmentIsSet){$('#ajaxLoadingDiv').find('.loadingSegment').show();}else{$('#ajaxLoadingDiv').find('.loadingSegment').hide();}} this.initHtml=function(){var self=this;var html=getListHtml();if(typeof self.content!=="undefined"){this.content.html($(html).html());}else{this.target.append(html);this.content=this.target.find(".segmentationContainer");} this.markCurrentSegment();setTimeout(function(){self.markComparedSegments();});var segmentIsSet=this.getSegment().length;toggleLoadingMessage(segmentIsSet);};if(piwikHelper.isReportingPage()){var watch=window.Vue.watch;var MatomoUrl=window.CoreHome.MatomoUrl;watch(()=>MatomoUrl.hashParsed.value.segment,function(value){var segment=value||'';if(self.getSegment()!=segment){self.setSegment(segment);self.initHtml();}else{setTimeout(function(){self.markComparedSegments();});}});} this.initHtml();bindEvents();handleAddNewSegment();};return segmentation;})(jQuery);$(document).ready(function(){var exports=require('piwik/UI');var UIControl=exports.UIControl;var SegmentSelectorControl=function(element){UIControl.call(this,element);if((typeof this.props.isSegmentNotAppliedBecauseBrowserArchivingIsDisabled!="undefined")&&this.props.isSegmentNotAppliedBecauseBrowserArchivingIsDisabled){piwikHelper.modalConfirm($('.pleaseChangeBrowserAchivingDisabledSetting',this.$element),{yes:function(){}});} var self=this;this.uriEncodeSegmentDefinition=function(segmentDefinition){segmentDefinition=cleanupSegmentDefinition(segmentDefinition);segmentDefinition=encodeURIComponent(segmentDefinition);return segmentDefinition;};this.changeSegment=function(segmentDefinition){if(piwikHelper.isReportingPage()){var MatomoUrl=window.CoreHome.MatomoUrl;var segment=MatomoUrl.hashParsed.value.segment;if(segmentDefinition!==segment){MatomoUrl.updateHash(Object.assign({},MatomoUrl.hashParsed.value,{segment:segmentDefinition.replace(/%$/,'%25').replace(/%([^\d].)/g,"%25$1"),}));} return false;}else{return this.forceSegmentReload(segmentDefinition);}};this.forceSegmentReload=function(segmentDefinition){segmentDefinition=this.uriEncodeSegmentDefinition(segmentDefinition);if(piwikHelper.isReportingPage()){return broadcast.propagateNewPage('',true,'addSegmentAsNew=&segment='+segmentDefinition,['compareSegments','comparePeriods','compareDates']);}else{return broadcast.propagateNewPage('segment='+segmentDefinition,true,'addSegmentAsNew=&segment='+segmentDefinition,['compareSegments','comparePeriods','compareDates']);}};this.changeSegmentList=function(){};var cleanupSegmentDefinition=function(definition){definition=definition.replace(/'/g,"%27");definition=definition.replace(/&/g,"%26");return definition;};var addSegment=function(params){var ajaxHandler=new ajaxHelper();ajaxHandler.setLoadingElement();params.definition=cleanupSegmentDefinition(params.definition);ajaxHandler.addParams($.extend({},params,{"module":'API',"format":'json',"method":'SegmentEditor.add'}),'GET');ajaxHandler.useCallbackInCaseOfError();ajaxHandler.setCallback(function(response){if(response&&response.result=='error'){alert(response.message);}else{params.idsegment=response.value;self.props.availableSegments.push(params);self.rebuild();self.impl.markCurrentSegment();self.$element.find('a.close').click();self.forceSegmentReload(params.definition);self.changeSegmentList(self.props.availableSegments);}});ajaxHandler.send();};var updateSegment=function(params){var ajaxHandler=new ajaxHelper();ajaxHandler.setLoadingElement();params.definition=cleanupSegmentDefinition(params.definition);ajaxHandler.addParams($.extend({},params,{"module":'API',"format":'json',"method":'SegmentEditor.update'}),'GET');ajaxHandler.useCallbackInCaseOfError();ajaxHandler.setCallback(function(response){if(response&&response.result=='error'){alert(response.message);}else{params.idsegment=params.idSegment;var idx=null;for(idx in self.props.availableSegments){if(self.props.availableSegments[idx].idsegment==params.idSegment){break;}} params.name=piwikHelper.htmlEntities(params.name);$.extend(self.props.availableSegments[idx],params);self.rebuild();self.impl.markCurrentSegment();self.$element.find('a.close').click();self.forceSegmentReload(params.definition);self.changeSegmentList(self.props.availableSegments);}});ajaxHandler.send();};var deleteSegment=function(params){var ajaxHandler=new ajaxHelper();ajaxHandler.addParams({module:'API',format:'json',method:'SegmentEditor.delete'},'GET');ajaxHandler.addParams({idSegment:params.idsegment},'POST');ajaxHandler.setLoadingElement();ajaxHandler.useCallbackInCaseOfError();ajaxHandler.setCallback(function(response){if(response&&response.result=='error'){alert(response.message);}else{self.impl.setSegment('');self.impl.markCurrentSegment();var idx=null;for(idx in self.props.availableSegments){if(self.props.availableSegments[idx].idsegment==params.idsegment){break;}} self.props.availableSegments.splice(idx,1);self.rebuild();self.$element.find('a.close').click();self.forceSegmentReload('');$('.ui-dialog-content').dialog('close');self.changeSegmentList(self.props.availableSegments);}});ajaxHandler.send();};function getSegmentFromRequest(){var hashStr=broadcast.getHashFromUrl();var segmentFromRequest;if(hashStr&&hashStr.indexOf('segment=')!==-1){segmentFromRequest=broadcast.getValueFromHash('segment');}else{segmentFromRequest=broadcast.getValueFromHash('segment')||encodeURIComponent(self.props.selectedSegment)||broadcast.getValueFromUrl('segment');} segmentFromRequest=decodeURIComponent(segmentFromRequest);return segmentFromRequest;} var segmentFromRequest=getSegmentFromRequest();var userSegmentAccess=(this.props.authorizedToCreateSegments)?"write":"read";this.impl=new Segmentation({"target":this.$element.find(".segmentListContainer"),"editorTemplate":$('.SegmentEditor',self.$element),"segmentAccess":userSegmentAccess,"availableSegments":this.props.availableSegments,"addMethod":addSegment,"updateMethod":updateSegment,"deleteMethod":deleteSegment,"segmentSelectMethod":function(){self.changeSegment.apply(self,arguments);},"currentSegmentStr":segmentFromRequest,"translations":this.props.segmentTranslations});this.onMouseUp=function(e){if($(e.target).closest('.segment-element').length===0&&!$(e.target).is('.ui-menu-item-wrapper')&&!$(e.target).is('.segment-element')&&$(e.target).hasClass("ui-corner-all")==false&&$(e.target).hasClass("ui-icon-closethick")==false&&$(e.target).hasClass("ui-button-text")==false&&$(".segment-element:visible",self.$element).length==1){if(Piwik_Popover.isOpen()){Piwik_Popover.close();}else{$(".segment-element:visible a.close",self.$element).click();}} if($(e.target).closest('.segmentListContainer').length===0&&self.$element.hasClass("expanded")){$(".segmentationContainer",self.$element).trigger("click");}};$('body').on('mouseup',this.onMouseUp);initTopControls();window.CoreHome.Matomo.postEvent('piwikSegmentationInited');};SegmentSelectorControl.initElements=function(){UIControl.initElements(this,'.segmentEditorPanel');};$.extend(SegmentSelectorControl.prototype,UIControl.prototype,{getSegment:function(){return this.impl.getSegment();},setSegment:function(segment){return this.impl.setSegment(segment);},rebuild:function(){this.impl.setAvailableSegments(this.props.availableSegments);this.impl.initHtml();},_destroy:function(){UIControl.prototype._destroy.call(this);$('body').off('mouseup',null,this.onMouseUp);}});exports.SegmentSelectorControl=SegmentSelectorControl;}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($,require){var exports=require('piwik/UI'),DataTable=exports.DataTable,dataTablePrototype=DataTable.prototype;var UIControl=exports.UIControl;function getValueFromEvent(event){return event.target.value?event.target.value:$(event.target).attr('value');} exports.InsightsDataTable=function(element){this.parentAttributeParent='';this.parentId='';this.disabledRowDom={};if($(element).attr('data-table-onlyinsightsinit')){UIControl.call(this,element);this._init($(element));this.workingDivId=this._createDivId();$(element).attr('id',this.workingDivId);}else{DataTable.call(this,element);}};$.extend(exports.InsightsDataTable.prototype,dataTablePrototype,{handleRowActions:function(){},_init:function(domElem){this.initShowIncreaseOrDecrease(domElem);this.initOrderBy(domElem);this.initComparedToXPeriodsAgo(domElem);this.initFilterBy(domElem);this.setFixWidthToMakeEllipsisWork(domElem);$(domElem).find('select').material_select();},setFixWidthToMakeEllipsisWork:function(domElem){var width=domElem.width();if(width){$('td.label',domElem).width(parseInt(width*0.50,10));} var self=this;if(!this.windowResizeTableAttached){this.windowResizeTableAttached=true;var timeout=null;var resizeDataTable=function(){if(timeout){clearTimeout(timeout);} timeout=setTimeout(function(){var isInDom=domElem&&domElem[0]&&document&&document.body&&document.body.contains(domElem[0]);if(isInDom){$('td.label',domElem).width('');self.setFixWidthToMakeEllipsisWork(domElem);}else{$(window).off('resize',resizeDataTable);} timeout=null;},Math.floor((Math.random()*80)+220));} $(window).on('resize',resizeDataTable);}},_changeParameter:function(params){var widgetParams={};for(var index in params){if(params.hasOwnProperty(index)){this.param[index]=params[index];widgetParams[index]=params[index];}} this.notifyWidgetParametersChange(this.$element,widgetParams);},_changeParameterAndReload:function(params){this._changeParameter(params);this.reloadAjaxDataTable(true);},initShowIncreaseOrDecrease:function(domElem){var self=this;$('[name=showIncreaseOrDecrease]',domElem).bind('change',function(event){var value=getValueFromEvent(event);self._changeParameterAndReload({limit_increaser:(value=='both'||value=='increase')?'5':'0',limit_decreaser:(value=='both'||value=='decrease')?'5':'0'});});},initOrderBy:function(domElem){var self=this;$('[name=orderBy]',domElem).bind('change',function(event){self._changeParameterAndReload({order_by:getValueFromEvent(event)});});$('th[name=orderBy]',domElem).bind('click',function(event){self._changeParameterAndReload({order_by:getValueFromEvent(event)});});},initComparedToXPeriodsAgo:function(domElem){var self=this;$('[name=comparedToXPeriodsAgo]',domElem).bind('change',function(event){self._changeParameterAndReload({compared_to_x_periods_ago:getValueFromEvent(event)});});},initFilterBy:function(domElem){var self=this;$('[name=filterBy]',domElem).bind('change',function(event){self._changeParameterAndReload({filter_by:getValueFromEvent(event)});});}});})(jQuery,require); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function($,require){var exports=require('piwik/UI'),DataTable=exports.DataTable,dataTablePrototype=DataTable.prototype;exports.ContentsDataTable=function(element){DataTable.call(this,element);};$.extend(exports.ContentsDataTable.prototype,dataTablePrototype,{_init:function(domElem){domElem.find('table > tbody > tr').each(function(index,tr){var $tr=$(tr);var $td=$tr.find('.label .value');var text=$td.text().trim();if(text.search('^https?:\/\/[^\/]+')!==-1){if(text.match(/(.jpg|.gif|.png|.svg)$/)){if(window.encodeURI){text=window.encodeURI(text);} $td.tooltip({track:true,items:'span',content:'<p><img style="max-width: 150px;max-height:150px;" src="'+text+'"/><br />'+text+'</p>',tooltipClass:'rowActionTooltip',show:false,hide:false});}}});}});})(jQuery,require); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function(){var actionName='visitorDetails';function DataTable_RowActions_VisitorDetails(dataTable){this.dataTable=dataTable;this.actionName=actionName;this.trEventName='piwikTriggerVisitorDetailsAction';} DataTable_RowActions_VisitorDetails.prototype=new DataTable_RowAction();DataTable_RowActions_VisitorDetails.prototype.performAction=function(label,tr,e){var visitorId=this.getRowMetadata($(tr)).idvisitor||'';visitorId=encodeURIComponent(visitorId);if(visitorId.length>0){DataTable_RowAction.prototype.openPopover.apply(this,['module=Live&action=getVisitorProfilePopup&visitorId='+visitorId]);}};DataTable_RowActions_VisitorDetails.prototype.doOpenPopover=function(urlParam){Piwik_Popover.createPopupAndLoadUrl(urlParam,_pk_translate('Live_VisitorProfile'),'visitor-profile-popup');};DataTable_RowActions_Registry.register({name:actionName,instance:null,dataTableIcon:'icon-visitor-profile',order:30,dataTableIconTooltip:[_pk_translate('Live_ViewVisitorProfile'),''],isAvailableOnReport:function(dataTableParams,undefined){return dataTableParams.module=='UserId'&&piwik.visitorProfileEnabled;},isAvailableOnRow:function(dataTableParams,tr){return DataTable_RowAction.prototype.getRowMetadata(tr).hasOwnProperty('idvisitor');},createInstance:function(dataTable,param){if(dataTable!==null&&typeof dataTable.visitorDetailsInstance!='undefined'){return dataTable.segmentVisitorLogInstance;} var instance=new DataTable_RowActions_VisitorDetails(dataTable);if(dataTable!==null){dataTable.visitorDetailsInstance=instance;} this.instance=instance;return instance;}});})(); var tourEngagement={skipChallenge:function(key){var $challenge=$('.tourEngagement .'+key+' ');$challenge.find('.icon-hide').removeClass('icon-hide').addClass('icon-ok');var ajaxRequest=new ajaxHelper();ajaxRequest.addParams({module:'API',method:'Tour.skipChallenge',id:key,format:'json'},'get');ajaxRequest.withTokenInUrl();ajaxRequest.setFormat('json');ajaxRequest.send();},goToPage:function(page){var ajaxRequest=new ajaxHelper();ajaxRequest.addParams({module:'Tour',action:'getEngagement',page:page},'get');ajaxRequest.withTokenInUrl();ajaxRequest.setFormat('html');ajaxRequest.setCallback(function(callback){$('.widgetBody.tourEngagement').parent().html(callback);}) ajaxRequest.send();}}; var PagePerformance=function(){function getDataTableFromApiMethod(apiMethod){var div=$(require('piwik/UI').DataTable.getDataTableByReport(apiMethod));if(div.length&&div.data('uiControlObject')){return div.data('uiControlObject');}} function getLabelFromTr($tr,apiMethod){var label;if(apiMethod&&0===apiMethod.indexOf('Actions.')){label=$tr.attr('data-url-label');} if(!label){label=$tr.find('.label .value').text();} if(label){label=$.trim(label);} return label;} function getDimensionFromApiMethod(apiMethod){if(!apiMethod){return;} var dataTable=getDataTableFromApiMethod(apiMethod);var metadata=getMetadataFromDataTable(dataTable);if(metadata&&metadata.dimension){return metadata.dimension;}} function getMetadataFromDataTable(dataTable){if(dataTable){return dataTable.getReportMetadata();}} function findTitleOfRowHavingRawSegmentValue(apiMethod,rawSegmentValue){var $tr=$('[data-report="'+apiMethod+'"] tr[data-segment-filter="'+rawSegmentValue+'"]').first();return getLabelFromTr($tr,apiMethod);} function setPopoverTitle(apiMethod,label,index){var dataTable=getDataTableFromApiMethod(apiMethod);if(!dataTable){if(index<15){setTimeout(function(){setPopoverTitle(apiMethod,label,index+1);},150);} return;} var type=getDimensionFromApiMethod(apiMethod);var separator=' > ';var labelParts=label.split(separator);for(var i=0;i<labelParts.length;i++){var labelPart=labelParts[i].replace('@','');labelParts[i]=$.trim(decodeURIComponent(labelPart));} var delimiter=piwik.config.action_url_category_delimiter;if(apiMethod.indexOf('PageTitles')>=0){delimiter=piwik.config.action_title_category_delimiter;} label=labelParts.join(delimiter);label=piwikHelper.htmlEntities(label);label=piwikHelper.escape(label);label=label.replace(/(&)(#[0-9]{2,5};)/g,'&$2');var title=_pk_translate('PagePerformance_PagePerformanceTitle',[type,label]);Piwik_Popover.setTitle(title);} function show(apiMethod,label,isReportFlat){var box=Piwik_Popover.showLoading('Page performance report');box.addClass('pagePerformancePopover');var callback=function(html){Piwik_Popover.setContent(html);var title=box.find('.enrichedHeadline').closest('h2');var defaultTitle=title.text();if(title.length){title.remove();} Piwik_Popover.setTitle(defaultTitle);setPopoverTitle(apiMethod,label,0);};var requestParams={module:'PagePerformance',action:'indexPagePerformance',apiMethod:apiMethod,label:encodeURIComponent(label),flat:isReportFlat,};var ajaxRequest=new ajaxHelper();ajaxRequest.addParams(requestParams,'get');ajaxRequest.setCallback(callback);ajaxRequest.setFormat('html');ajaxRequest.send();} return{show:show}}(); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function(){var actionName='PagePerformance';function getDataTableFromApiMethod(apiMethod){var div=$(require('piwik/UI').DataTable.getDataTableByReport(apiMethod));if(div.length&&div.data('uiControlObject')){return div.data('uiControlObject');}} function DataTable_RowActions_PagePerformance(dataTable){this.dataTable=dataTable;this.actionName=actionName;this.trEventName='matomoTriggerPagePerformanceAction';} DataTable_RowActions_PagePerformance.prototype=new DataTable_RowAction();DataTable_RowActions_PagePerformance.prototype.performAction=function(label,tr,e,originalRow){var apiMethod=this.dataTable.param.module+'.'+this.dataTable.param.action;var isReportFlat=this.dataTable.param.flat||0;this.openPopover(apiMethod,label,isReportFlat);};DataTable_RowActions_PagePerformance.prototype.openPopover=function(apiMethod,label,isReportFlat){var urlParam=apiMethod+':'+label+':'+isReportFlat;DataTable_RowAction.prototype.openPopover.apply(this,[urlParam]);};DataTable_RowActions_PagePerformance.prototype.doOpenPopover=function(urlParam){var urlParamParts=urlParam.split(':');var apiMethod=urlParamParts.shift();var label=decodeURIComponent(urlParamParts.shift());var isReportFlat=urlParamParts.shift();PagePerformance.show(apiMethod,label,isReportFlat);};DataTable_RowActions_Registry.register({name:actionName,dataTableIcon:'icon-page-performance',order:50,dataTableIconTooltip:[_pk_translate('PagePerformance_RowActionTitle'),_pk_translate('PagePerformance_RowActionDescription')],isAvailableOnReport:function(dataTableParams){return dataTableParams.module=='Actions'&&(dataTableParams.action=='getPageUrls'||dataTableParams.action=='getEntryPageUrls'||dataTableParams.action=='getExitPageUrls'||dataTableParams.action=='getPageUrlsFollowingSiteSearch'||dataTableParams.action=='getPageTitles'||dataTableParams.action=='getPageTitlesFollowingSiteSearch');},isAvailableOnRow:function(dataTableParams,tr){return!tr.is('.totalsRow');},createInstance:function(dataTable,param){if(dataTable!==null&&typeof dataTable.pagePerformanceInstance!='undefined'){return dataTable.pagePerformanceInstance;} if(dataTable===null&¶m){var report=param.split(':')[0];var div=$(require('piwik/UI').DataTable.getDataTableByReport(report));if(div.length&&div.data('uiControlObject')){dataTable=div.data('uiControlObject');if(typeof dataTable.pagePerformanceInstance!='undefined'){return dataTable.pagePerformanceInstance;}}} var instance=new DataTable_RowActions_PagePerformance(dataTable);if(dataTable!==null){dataTable.pagePerformanceInstance=instance;} return instance;},});})(); (function($,require){var exports=require('piwik/UI'),JqplotGraphDataTable=exports.JqplotGraphDataTable,JqplotGraphDataTablePrototype=JqplotGraphDataTable.prototype;exports.JqplotStackedBarEvolutionGraphDataTable=function(element){JqplotGraphDataTable.call(this,element);};$.extend(exports.JqplotStackedBarEvolutionGraphDataTable.prototype,JqplotGraphDataTablePrototype,{_setJqplotParameters:function(params){JqplotGraphDataTablePrototype._setJqplotParameters.call(this,params);var defaultParams={axes:{xaxis:{pad:1.0,renderer:$.jqplot.CategoryAxisRenderer,tickOptions:{showGridline:false}}},piwikTicks:{showTicks:true,showGrid:true,showHighlight:false,tickColor:this.tickColor}};defaultParams.seriesDefaults={renderer:$.jqplot.BarRenderer,rendererOptions:{shadowOffset:1,shadowDepth:2,shadowAlpha:.2,fillToZero:true,barMargin:this.data[0].length>10?2:10}};defaultParams.stackSeries=true;var overrideParams={legend:{show:false},canvasLegend:{show:true}};this.jqplotParams=$.extend(true,{},defaultParams,this.jqplotParams,overrideParams);},_bindEvents:function(){JqplotGraphDataTablePrototype._bindEvents.call(this);var self=this;var lastTick=false;$('#'+this.targetDivId).on('jqplotMouseLeave',function(e,s,i,d){$(this).css('cursor','default');JqplotGraphDataTablePrototype._destroyDataPointTooltip.call(this,$(this));}).on('jqplotClick',function(e,s,i,d){if(lastTick!==false&&typeof self.jqplotParams.axes.xaxis.onclick!='undefined'&&typeof self.jqplotParams.axes.xaxis.onclick[lastTick]=='string'){var url=self.jqplotParams.axes.xaxis.onclick[lastTick];broadcast.propagateNewPage(url);}}).on('jqplotPiwikTickOver',function(e,tick){lastTick=tick;var label;var dataByAxis={};var totalValue=0;for(var d=0;d<self.data.length;++d){var valueUnformatted=self.data[d][tick];if(typeof valueUnformatted==='undefined'||valueUnformatted===null){continue;} totalValue+=valueUnformatted;var axis=self.jqplotParams.series[d]._xaxis||'xaxis';if(!dataByAxis[axis]){dataByAxis[axis]=[];} var value=self.formatY(valueUnformatted,d);var series=self.jqplotParams.series[d].label;var seriesColor=self.jqplotParams.seriesColors[d];dataByAxis[axis].push('<span class="tooltip-series-color" style="background-color: '+seriesColor+';"></span>'+'<strong>'+value+'</strong> '+piwikHelper.htmlEntities(series));} dataByAxis[axis].push('<span class="tooltip-series-color" style="background-color: #000;"></span>'+'<strong>'+self.formatY(totalValue,0)+'</strong> '+_pk_translate('General_Total'));var xAxisCount=0;Object.keys(self.jqplotParams.axes).forEach(function(axis){if(axis.substring(0,1)==='x'){++xAxisCount;}});var content='';for(var i=0;i<xAxisCount;++i){var axisName=i===0?'xaxis':'x'+(i+1)+'axis';if(!dataByAxis[axisName]||!dataByAxis[axisName].length){continue;} if(typeof self.jqplotParams.axes[axisName].labels!='undefined'){label=self.jqplotParams.axes[axisName].labels[tick];}else{label=self.jqplotParams.axes[axisName].ticks[tick];} if(typeof label==='undefined'){continue;} content+='<h3 class="evolution-tooltip-header">'+piwikHelper.htmlEntities(label)+'</h3>'+dataByAxis[axisName].join('<br />');} $(this).tooltip({track:true,items:'div',content:content,show:false,hide:false}).trigger('mouseover');if(typeof self.jqplotParams.axes.xaxis.onclick!='undefined'&&typeof self.jqplotParams.axes.xaxis.onclick[lastTick]=='string'){$(this).css('cursor','pointer');}});this.setYTicks();},_destroyDataPointTooltip:function(){},render:function(){JqplotGraphDataTablePrototype.render.call(this);if(initializeSparklines){initializeSparklines();}},setYTicksForAxis:function(axisName,axis){var maxCrossDataSets=0;for(var j=0;j<this.data[0].length;j++){var sum=0;for(var i=0;i<this.data.length;i++){if(this.jqplotParams.series[i].yaxis==axisName){sum+=this.data[i][j];}} sum=parseFloat(sum);if(sum>maxCrossDataSets){maxCrossDataSets=sum;}} maxCrossDataSets+=Math.round(maxCrossDataSets*.03);if(maxCrossDataSets>15){maxCrossDataSets=maxCrossDataSets+10-maxCrossDataSets%10;} if(maxCrossDataSets==0){maxCrossDataSets=1;} if(axis.tickOptions&&axis.tickOptions.formatString&&axis.tickOptions.formatString.substring(2,3)=='%'&&maxCrossDataSets>100){maxCrossDataSets=100;} var ticks=[];var numberOfTicks=2;var tickDistance=Math.ceil(maxCrossDataSets / numberOfTicks);for(var i=0;i<=numberOfTicks;i++){ticks.push(i*tickDistance);} axis.ticks=ticks;},});})(jQuery,require); $(function(){function isActionCustomDimensionReport(params){return params.module=='CustomDimensions'&¶ms.action=='getCustomDimension'&¶ms.scopeOfDimension&¶ms.scopeOfDimension==='action';} if(window.DataTable_RowActions_Transitions){DataTable_RowActions_Transitions.registerReport({isAvailableOnReport:function(dataTableParams){return isActionCustomDimensionReport(dataTableParams);},isAvailableOnRow:function(dataTableParams,tr){return isActionCustomDimensionReport(dataTableParams)&&tr.parents('table').first().hasClass('subDataTable');},trigger:function(tr,e,subTableLabel){var label=this.getLabelFromTr(tr);if(label&&label.slice(0,1)==='@'){label=label.slice(1);} var subtable=tr.closest('table');if(subtable.is('.subDataTable')){var prev=subtable.closest('tr').prev();var segment=prev.attr('data-segment-filter');if(segment){label=unescape(label);DataTable_RowActions_Transitions.launchForUrl(label,segment);}}}});} if(window.DataTable_RowActions_Overlay){DataTable_RowActions_Overlay.registerReport({isAvailableOnReport:function(dataTableParams){return isActionCustomDimensionReport(dataTableParams);},onClick:function(actionA,tr,e){var segment;var link=this.getLabelFromTr(tr);if(link&&link.slice(0,1)==='@'){link=link.slice(1);} link='http://'+unescape(link);var subtable=tr.closest('table');if(subtable.is('.subDataTable')){var prev=subtable.closest('tr').prev();segment=prev.attr('data-segment-filter');} return{link:link,segment:segment}}});}}); /*! * jquery-timepicker v1.11.1 - A jQuery timepicker plugin inspired by Google Calendar. It supports both mouse and keyboard navigation. * Copyright (c) 2016 Jon Thornton - http://jonthornton.github.com/jquery-timepicker/ * License: MIT */ !function(a){"object"==typeof exports&&exports&&"object"==typeof module&&module&&module.exports===exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){var b=a[0];return b.offsetWidth>0&&b.offsetHeight>0}function c(b){if(b.minTime&&(b.minTime=t(b.minTime)),b.maxTime&&(b.maxTime=t(b.maxTime)),b.durationTime&&"function"!=typeof b.durationTime&&(b.durationTime=t(b.durationTime)),"now"==b.scrollDefault)b.scrollDefault=function(){return b.roundingFunction(t(new Date),b)};else if(b.scrollDefault&&"function"!=typeof b.scrollDefault){var c=b.scrollDefault;b.scrollDefault=function(){return b.roundingFunction(t(c),b)}}else b.minTime&&(b.scrollDefault=function(){return b.roundingFunction(b.minTime,b)});if("string"===a.type(b.timeFormat)&&b.timeFormat.match(/[gh]/)&&(b._twelveHourTime=!0),b.showOnFocus===!1&&-1!=b.showOn.indexOf("focus")&&b.showOn.splice(b.showOn.indexOf("focus"),1),b.disableTimeRanges.length>0){for(var d in b.disableTimeRanges)b.disableTimeRanges[d]=[t(b.disableTimeRanges[d][0]),t(b.disableTimeRanges[d][1])];b.disableTimeRanges=b.disableTimeRanges.sort(function(a,b){return a[0]-b[0]});for(var d=b.disableTimeRanges.length-1;d>0;d--)b.disableTimeRanges[d][0]<=b.disableTimeRanges[d-1][1]&&(b.disableTimeRanges[d-1]=[Math.min(b.disableTimeRanges[d][0],b.disableTimeRanges[d-1][0]),Math.max(b.disableTimeRanges[d][1],b.disableTimeRanges[d-1][1])],b.disableTimeRanges.splice(d,1))}return b}function d(b){var c=b.data("timepicker-settings"),d=b.data("timepicker-list");if(d&&d.length&&(d.remove(),b.data("timepicker-list",!1)),c.useSelect){d=a("<select />",{"class":"ui-timepicker-select"});var g=d}else{d=a("<ul />",{"class":"ui-timepicker-list"});var g=a("<div />",{"class":"ui-timepicker-wrapper",tabindex:-1});g.css({display:"none",position:"absolute"}).append(d)}if(c.noneOption)if(c.noneOption===!0&&(c.noneOption=c.useSelect?"Time...":"None"),a.isArray(c.noneOption)){for(var i in c.noneOption)if(parseInt(i,10)==i){var k=e(c.noneOption[i],c.useSelect);d.append(k)}}else{var k=e(c.noneOption,c.useSelect);d.append(k)}if(c.className&&g.addClass(c.className),(null!==c.minTime||null!==c.durationTime)&&c.showDuration){"function"==typeof c.step?"function":c.step;g.addClass("ui-timepicker-with-duration"),g.addClass("ui-timepicker-step-"+c.step)}var l=c.minTime;"function"==typeof c.durationTime?l=t(c.durationTime()):null!==c.durationTime&&(l=c.durationTime);var n=null!==c.minTime?c.minTime:0,o=null!==c.maxTime?c.maxTime:n+u-1;n>o&&(o+=u),o===u-1&&"string"===a.type(c.timeFormat)&&c.show2400&&(o=u);var p=c.disableTimeRanges,v=0,x=p.length,y=c.step;"function"!=typeof y&&(y=function(){return c.step});for(var i=n,z=0;o>=i;z++,i+=60*y(z)){var A=i,B=s(A,c);if(c.useSelect){var C=a("<option />",{value:B});C.text(B)}else{var C=a("<li />");C.addClass(43200>A%86400?"ui-timepicker-am":"ui-timepicker-pm"),C.data("time",86400>=A?A:A%86400),C.text(B)}if((null!==c.minTime||null!==c.durationTime)&&c.showDuration){var D=r(i-l,c.step);if(c.useSelect)C.text(C.text()+" ("+D+")");else{var E=a("<span />",{"class":"ui-timepicker-duration"});E.text(" ("+D+")"),C.append(E)}}x>v&&(A>=p[v][1]&&(v+=1),p[v]&&A>=p[v][0]&&A<p[v][1]&&(c.useSelect?C.prop("disabled",!0):C.addClass("ui-timepicker-disabled"))),d.append(C)}if(g.data("timepicker-input",b),b.data("timepicker-list",g),c.useSelect)b.val()&&d.val(f(t(b.val()),c)),d.on("focus",function(){a(this).data("timepicker-input").trigger("showTimepicker")}),d.on("blur",function(){a(this).data("timepicker-input").trigger("hideTimepicker")}),d.on("change",function(){m(b,a(this).val(),"select")}),m(b,d.val(),"initial"),b.hide().after(d);else{var F=c.appendTo;"string"==typeof F?F=a(F):"function"==typeof F&&(F=F(b)),F.append(g),j(b,d),d.on("mousedown click","li",function(c){b.off("focus.timepicker"),b.on("focus.timepicker-ie-hack",function(){b.off("focus.timepicker-ie-hack"),b.on("focus.timepicker",w.show)}),h(b)||b[0].focus(),d.find("li").removeClass("ui-timepicker-selected"),a(this).addClass("ui-timepicker-selected"),q(b)&&(b.trigger("hideTimepicker"),d.on("mouseup.timepicker click.timepicker","li",function(a){d.off("mouseup.timepicker click.timepicker"),g.hide()}))})}}function e(b,c){var d,e,f;return"object"==typeof b?(d=b.label,e=b.className,f=b.value):"string"==typeof b?d=b:a.error("Invalid noneOption value"),c?a("<option />",{value:f,"class":e,text:d}):a("<li />",{"class":e,text:d}).data("time",String(f))}function f(a,b){return a=b.roundingFunction(a,b),null!==a?s(a,b):void 0}function g(b){if(b.target!=window){var c=a(b.target);c.closest(".ui-timepicker-input").length||c.closest(".ui-timepicker-wrapper").length||(w.hide(),a(document).unbind(".ui-timepicker"),a(window).unbind(".ui-timepicker"))}}function h(a){var b=a.data("timepicker-settings");return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&b.disableTouchKeyboard}function i(b,c,d){if(!d&&0!==d)return!1;var e=b.data("timepicker-settings"),f=!1,d=e.roundingFunction(d,e);return c.find("li").each(function(b,c){var e=a(c);if("number"==typeof e.data("time"))return e.data("time")==d?(f=e,!1):void 0}),f}function j(a,b){b.find("li").removeClass("ui-timepicker-selected");var c=t(l(a),a.data("timepicker-settings"));if(null!==c){var d=i(a,b,c);if(d){var e=d.offset().top-b.offset().top;(e+d.outerHeight()>b.outerHeight()||0>e)&&b.scrollTop(b.scrollTop()+d.position().top-d.outerHeight()),d.addClass("ui-timepicker-selected")}}}function k(b,c){if(""!==this.value&&"timepicker"!=c){var d=a(this);if(!d.is(":focus")||b&&"change"==b.type){var e=d.data("timepicker-settings"),f=t(this.value,e);if(null===f)return void d.trigger("timeFormatError");var g=!1;null!==e.minTime&&f<e.minTime&&null!==e.maxTime&&f>e.maxTime&&(g=!0),a.each(e.disableTimeRanges,function(){return f>=this[0]&&f<this[1]?(g=!0,!1):void 0}),e.forceRoundTime&&(f=e.roundingFunction(f,e));var h=s(f,e);g?m(d,h,"error")&&d.trigger("timeRangeError"):m(d,h)}}}function l(a){return a.is("input")?a.val():a.data("ui-timepicker-value")}function m(a,b,c){if(a.is("input")){a.val(b);var d=a.data("timepicker-settings");d.useSelect&&"select"!=c&&"initial"!=c&&a.data("timepicker-list").val(f(t(b),d))}return a.data("ui-timepicker-value")!=b?(a.data("ui-timepicker-value",b),"select"==c?a.trigger("selectTime").trigger("changeTime").trigger("change","timepicker"):"error"!=c&&a.trigger("changeTime"),!0):(a.trigger("selectTime"),!1)}function n(a){switch(a.keyCode){case 13:case 9:return;default:a.preventDefault()}}function o(c){var d=a(this),e=d.data("timepicker-list");if(!e||!b(e)){if(40!=c.keyCode)return!0;w.show.call(d.get(0)),e=d.data("timepicker-list"),h(d)||d.focus()}switch(c.keyCode){case 13:return q(d)&&w.hide.apply(this),c.preventDefault(),!1;case 38:var f=e.find(".ui-timepicker-selected");return f.length?f.is(":first-child")||(f.removeClass("ui-timepicker-selected"),f.prev().addClass("ui-timepicker-selected"),f.prev().position().top<f.outerHeight()&&e.scrollTop(e.scrollTop()-f.outerHeight())):(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")),!1;case 40:return f=e.find(".ui-timepicker-selected"),0===f.length?(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")):f.is(":last-child")||(f.removeClass("ui-timepicker-selected"),f.next().addClass("ui-timepicker-selected"),f.next().position().top+2*f.outerHeight()>e.outerHeight()&&e.scrollTop(e.scrollTop()+f.outerHeight())),!1;case 27:e.find("li").removeClass("ui-timepicker-selected"),w.hide();break;case 9:w.hide();break;default:return!0}}function p(c){var d=a(this),e=d.data("timepicker-list"),f=d.data("timepicker-settings");if(!e||!b(e)||f.disableTextInput)return!0;switch(c.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:f.typeaheadHighlight?j(d,e):e.hide()}}function q(a){var b=a.data("timepicker-settings"),c=a.data("timepicker-list"),d=null,e=c.find(".ui-timepicker-selected");return e.hasClass("ui-timepicker-disabled")?!1:(e.length&&(d=e.data("time")),null!==d&&("string"!=typeof d&&(d=s(d,b)),m(a,d,"select")),!0)}function r(a,b){a=Math.abs(a);var c,d,e=Math.round(a/60),f=[];return 60>e?f=[e,v.mins]:(c=Math.floor(e/60),d=e%60,30==b&&30==d&&(c+=v.decimal+5),f.push(c),f.push(1==c?v.hr:v.hrs),30!=b&&d&&(f.push(d),f.push(v.mins))),f.join(" ")}function s(b,c){if("number"!=typeof b)return null;var d=parseInt(b%60),e=parseInt(b/60%60),f=parseInt(b/3600%24),g=new Date(1970,0,2,f,e,d,0);if(isNaN(g.getTime()))return null;if("function"===a.type(c.timeFormat))return c.timeFormat(g);for(var h,i,j="",k=0;k<c.timeFormat.length;k++)switch(i=c.timeFormat.charAt(k)){case"a":j+=g.getHours()>11?v.pm:v.am;break;case"A":j+=g.getHours()>11?v.PM:v.AM;break;case"g":h=g.getHours()%12,j+=0===h?"12":h;break;case"G":h=g.getHours(),b===u&&(h=c.show2400?24:0),j+=h;break;case"h":h=g.getHours()%12,0!==h&&10>h&&(h="0"+h),j+=0===h?"12":h;break;case"H":h=g.getHours(),b===u&&(h=c.show2400?24:0),j+=h>9?h:"0"+h;break;case"i":var e=g.getMinutes();j+=e>9?e:"0"+e;break;case"s":d=g.getSeconds(),j+=d>9?d:"0"+d;break;case"\\":k++,j+=c.timeFormat.charAt(k);break;default:j+=i}return j}function t(a,b){if(""===a||null===a)return null;if("object"==typeof a)return 3600*a.getHours()+60*a.getMinutes()+a.getSeconds();if("string"!=typeof a)return a;a=a.toLowerCase().replace(/[\s\.]/g,""),("a"==a.slice(-1)||"p"==a.slice(-1))&&(a+="m");var c="("+v.am.replace(".","")+"|"+v.pm.replace(".","")+"|"+v.AM.replace(".","")+"|"+v.PM.replace(".","")+")?",d=new RegExp("^"+c+"([0-9]?[0-9])\\W?([0-5][0-9])?\\W?([0-5][0-9])?"+c+"$"),e=a.match(d);if(!e)return null;var f=parseInt(1*e[2],10);if(f>24){if(b&&b.wrapHours===!1)return null;f%=24}var g=e[1]||e[5],h=f;if(12>=f&&g){var i=g==v.pm||g==v.PM;h=12==f?i?12:0:f+(i?12:0)}var j=1*e[3]||0,k=1*e[4]||0,l=3600*h+60*j+k;if(12>f&&!g&&b&&b._twelveHourTime&&b.scrollDefault){var m=l-b.scrollDefault();0>m&&m>=u/-2&&(l=(l+u/2)%u)}return l}var u=86400,v={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},w={init:function(b){return this.each(function(){var e=a(this),f=[];for(var g in a.fn.timepicker.defaults)e.data(g)&&(f[g]=e.data(g));var h=a.extend({},a.fn.timepicker.defaults,f,b);if(h.lang&&(v=a.extend(v,h.lang)),h=c(h),e.data("timepicker-settings",h),e.addClass("ui-timepicker-input"),h.useSelect)d(e);else{if(e.prop("autocomplete","off"),h.showOn)for(var i in h.showOn)e.on(h.showOn[i]+".timepicker",w.show);e.on("change.timepicker",k),e.on("keydown.timepicker",o),e.on("keyup.timepicker",p),h.disableTextInput&&e.on("keydown.timepicker",n),k.call(e.get(0))}})},show:function(c){var e=a(this),f=e.data("timepicker-settings");if(c&&c.preventDefault(),f.useSelect)return void e.data("timepicker-list").focus();h(e)&&e.blur();var k=e.data("timepicker-list");if(!e.prop("readonly")&&(k&&0!==k.length&&"function"!=typeof f.durationTime||(d(e),k=e.data("timepicker-list")),!b(k))){e.data("ui-timepicker-value",e.val()),j(e,k),w.hide(),k.show();var m={};f.orientation.match(/r/)?m.left=e.offset().left+e.outerWidth()-k.outerWidth()+parseInt(k.css("marginLeft").replace("px",""),10):m.left=e.offset().left+parseInt(k.css("marginLeft").replace("px",""),10);var n;n=f.orientation.match(/t/)?"t":f.orientation.match(/b/)?"b":e.offset().top+e.outerHeight(!0)+k.outerHeight()>a(window).height()+a(window).scrollTop()?"t":"b","t"==n?(k.addClass("ui-timepicker-positioned-top"),m.top=e.offset().top-k.outerHeight()+parseInt(k.css("marginTop").replace("px",""),10)):(k.removeClass("ui-timepicker-positioned-top"),m.top=e.offset().top+e.outerHeight()+parseInt(k.css("marginTop").replace("px",""),10)),k.offset(m);var o=k.find(".ui-timepicker-selected");if(!o.length){var p=t(l(e));null!==p?o=i(e,k,p):f.scrollDefault&&(o=i(e,k,f.scrollDefault()))}if(o&&o.length){var q=k.scrollTop()+o.position().top-o.outerHeight();k.scrollTop(q)}else k.scrollTop(0);return f.stopScrollPropagation&&a(document).on("wheel.ui-timepicker",".ui-timepicker-wrapper",function(b){b.preventDefault();var c=a(this).scrollTop();a(this).scrollTop(c+b.originalEvent.deltaY)}),a(document).on("touchstart.ui-timepicker mousedown.ui-timepicker",g),a(window).on("resize.ui-timepicker",g),f.closeOnWindowScroll&&a(document).on("scroll.ui-timepicker",g),e.trigger("showTimepicker"),this}},hide:function(c){var d=a(this),e=d.data("timepicker-settings");return e&&e.useSelect&&d.blur(),a(".ui-timepicker-wrapper").each(function(){var c=a(this);if(b(c)){var d=c.data("timepicker-input"),e=d.data("timepicker-settings");e&&e.selectOnBlur&&q(d),c.hide(),d.trigger("hideTimepicker")}}),this},option:function(b,e){return"string"==typeof b&&"undefined"==typeof e?a(this).data("timepicker-settings")[b]:this.each(function(){var f=a(this),g=f.data("timepicker-settings"),h=f.data("timepicker-list");"object"==typeof b?g=a.extend(g,b):"string"==typeof b&&(g[b]=e),g=c(g),f.data("timepicker-settings",g),h&&(h.remove(),f.data("timepicker-list",!1)),g.useSelect&&d(f)})},getSecondsFromMidnight:function(){return t(l(this))},getTime:function(a){var b=this,c=l(b);if(!c)return null;var d=t(c);if(null===d)return null;a||(a=new Date);var e=new Date(a);return e.setHours(d/3600),e.setMinutes(d%3600/60),e.setSeconds(d%60),e.setMilliseconds(0),e},isVisible:function(){var a=this,c=a.data("timepicker-list");return!(!c||!b(c))},setTime:function(a){var b=this,c=b.data("timepicker-settings");if(c.forceRoundTime)var d=f(t(a),c);else var d=s(t(a),c);return a&&null===d&&c.noneOption&&(d=a),m(b,d),b.data("timepicker-list")&&j(b,b.data("timepicker-list")),this},remove:function(){var a=this;if(a.hasClass("ui-timepicker-input")){var b=a.data("timepicker-settings");return a.removeAttr("autocomplete","off"),a.removeClass("ui-timepicker-input"),a.removeData("timepicker-settings"),a.off(".timepicker"),a.data("timepicker-list")&&a.data("timepicker-list").remove(),b.useSelect&&a.show(),a.removeData("timepicker-list"),this}}};a.fn.timepicker=function(b){return this.length?w[b]?this.hasClass("ui-timepicker-input")?w[b].apply(this,Array.prototype.slice.call(arguments,1)):this:"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.timepicker"):w.init.apply(this,arguments):this},a.fn.timepicker.defaults={appendTo:"body",className:null,closeOnWindowScroll:!1,disableTextInput:!1,disableTimeRanges:[],disableTouchKeyboard:!1,durationTime:null,forceRoundTime:!1,maxTime:null,minTime:null,noneOption:!1,orientation:"l",roundingFunction:function(a,b){if(null===a)return null;if("number"!=typeof b.step)return a;var c=a%(60*b.step);return c>=30*b.step?a+=60*b.step-c:a-=c,a==u&&b.show2400?a:a%u},scrollDefault:null,selectOnBlur:!1,show2400:!1,showDuration:!1,showOn:["click","focus"],showOnFocus:!0,step:30,stopScrollPropagation:!1,timeFormat:"g:ia",typeaheadHighlight:!0,useSelect:!1,wrapHours:!0}}); (function($){var tagManagerHelper={};tagManagerHelper.editTrigger=function(idContainer,idContainerVersion,idTag,callback){var createVNode=Vue.createVNode;var createVueApp=CoreHome.createVueApp;var TriggerEdit=TagManager.TriggerEdit;var template=$('<div class="tag-ui-confirm"><div></div><input role="no" type="button" value="' +_pk_translate('General_Cancel')+'"/></div>') var app=createVueApp({render:function(){return createVNode(TriggerEdit,{idContainer:idContainer,idContainerVersion:parseInt(idContainerVersion,10),idTrigger:parseInt(idTag,10),isEmbedded:true,onChangeTrigger:function(event){if('function'===typeof callback){callback(event.trigger);} var modal=M.Modal.getInstance(template.parents('.modal.open'));if(modal){modal.close();}},});},});app.mount(template.children()[0]);piwikHelper.modalConfirm(template,{},{extraWide:true,onCloseEnd:function(){app.unmount();template.empty();},});};tagManagerHelper.createNewVersion=function(){var containerId=CoreHome.MatomoUrl.parsed.value.idContainer;this.editVersion(containerId,0,function(){window.location.reload();});};tagManagerHelper.editVersion=function(idContainer,idContainerVersion,callback){var createVNode=Vue.createVNode;var createVueApp=CoreHome.createVueApp;var VersionEdit=TagManager.VersionEdit;var template=$('<div class="tag-ui-confirm ui-confirm"><div></div><input role="no" type="button" value="' +_pk_translate('General_Cancel')+'"/></div>') var app=createVueApp({render:function(){return createVNode(VersionEdit,{idContainer:idContainer,idContainerVersion:parseInt(idContainerVersion,10),isEmbedded:true,onChangeVersion:function(event){if('function'===typeof callback){callback(event.version);} var modal=M.Modal.getInstance(template.parents('.modal.open'));if(modal){modal.close();}},});},});app.mount(template.children()[0]);piwikHelper.modalConfirm(template,{},{extraWide:true,onCloseEnd:function(){app.unmount();template.empty();},});};tagManagerHelper.editVariable=function(idContainer,idContainerVersion,idVariable,callback,variableType){var createVNode=Vue.createVNode;var createVueApp=CoreHome.createVueApp;var VariableEdit=TagManager.VariableEdit;var template=$('<div class="tag-ui-confirm"><div></div><input role="no" type="button" value="' +_pk_translate('General_Cancel')+'"/></div>') var app=createVueApp({render:function(){return createVNode(VariableEdit,{idContainer:idContainer,idContainerVersion:parseInt(idContainerVersion,10),idVariable:idVariable,variableType:variableType,isEmbedded:true,onChangeVariable:function(event){if('function'===typeof callback){callback(event.variable);} var modal=M.Modal.getInstance(template.parents('.modal.open'));if(modal){modal.close();}},});},});app.mount(template.children()[0]);piwikHelper.modalConfirm(template,{},{extraWide:true,onCloseEnd:function(){app.unmount();template.empty();},});};tagManagerHelper.selectVariable=function(callback){var template=$('<div class="ui-confirm"><h2>'+_pk_translate('TagManager_SelectAVariable')+'</h2><div></div><input role="no" type="button" value="'+_pk_translate('General_Cancel')+'"/></div>') var createVNode=Vue.createVNode;var createVueApp=CoreHome.createVueApp;var VariableSelect=TagManager.VariableSelect;var MatomoUrl=CoreHome.MatomoUrl;var containerId=MatomoUrl.parsed.value.idContainer;var app=createVueApp({render:function(){return createVNode(VariableSelect,{idContainer:containerId,onSelectVariable:function(event){if('function'===typeof callback){callback(event.variable);} var modal=M.Modal.getInstance(template.parents('.modal.open'));if(modal){modal.close();}},});},});app.mount(template.children()[0]);piwikHelper.modalConfirm(template,{},{onCloseEnd:function(){app.unmount();template.empty();},});};tagManagerHelper.insertTextSnippetAtElement=function(inputField,textToAdd){if(!inputField||!textToAdd){return;} var scrollPos=inputField.scrollTop;var startPos=inputField.selectionStart;var endPos=inputField.selectionEnd;var value=String(inputField.value);var valueBefore=value.substring(0,startPos);var valueAfter=value.substring(endPos,value.length);inputField.value=valueBefore+textToAdd+valueAfter;inputField.selectionStart=startPos+textToAdd.length;inputField.selectionEnd=startPos+textToAdd.length;inputField.focus();inputField.scrollTop=scrollPos;$(inputField).change();};tagManagerHelper.showInstallCode=function(idContainer){var createVNode=Vue.createVNode;var createVueApp=CoreHome.createVueApp;var ManageInstallTagCode=TagManager.ManageInstallTagCode;var template=$('<div class="tag-ui-confirm" ui-confirm><div></div><input role="no" ' +'type="button" value="'+_pk_translate('General_Cancel')+'"/>') var app=createVueApp({render:function(){return createVNode(ManageInstallTagCode,{idContainer:idContainer,});},});app.mount(template.children()[0]);piwikHelper.modalConfirm(template,{},{extraWide:true,onCloseEnd:function(){app.unmount();template.empty();},});};tagManagerHelper.enablePreviewMode=function(idContainer,idContainerVersion){if(!idContainerVersion){idContainerVersion=0;} var params={method:'TagManager.enablePreviewMode',idContainer:idContainer,idContainerVersion:idContainerVersion};piwikHelper.modalConfirm('<h2>'+_pk_translate('TagManager_EnablingPreviewPleaseWait')+'</h2>',{});CoreHome.AjaxHelper.fetch(params).then(function(){window.location.reload();});};tagManagerHelper.disablePreviewMode=function(idContainer){var params={method:'TagManager.disablePreviewMode',idContainer:idContainer};piwikHelper.modalConfirm('<h2>'+_pk_translate('TagManager_DisablingPreviewPleaseWait')+'</h2>',{});CoreHome.AjaxHelper.fetch(params).then(function(){tagManagerHelper.updateDebugSiteFlag(document.getElementById('previewDebugUrl').value,idContainer,-1);window.location.reload();});};tagManagerHelper.changeDebugUrl=function(idContainer,oldUrl){$('#debug-notification-alert').hide();var newUrl=document.getElementById('previewDebugUrl').value;var id='TagManager_changeDebugSiteUrl';var context='warning';var UI=require('piwik/UI');var notification=new UI.Notification();if(!newUrl){return notification.show(_pk_translate('TagManager_DebugUrlNoUrlErrorMessage'),{context:context,id:id,title:''});}else if(newUrl===oldUrl){return tagManagerHelper.updateDebugSiteFlag(newUrl,idContainer,1);;} var ajaxRequest=new ajaxHelper();var template=$('<h2>'+_pk_translate('TagManager_UpdatingDebugSiteUrlPleaseWait')+'</h2>');ajaxRequest.addParams({module:'API',format:'json',method:'TagManager.changeDebugUrl',url:newUrl},'get');ajaxRequest.withTokenInUrl();ajaxRequest.setCallback(function(response){var result=JSON.parse(response);if(result.result&&result.result==='success'){tagManagerHelper.updateDebugSiteFlag(oldUrl,idContainer,-1);tagManagerHelper.updateDebugSiteFlag(newUrl,idContainer,1);window.location.reload();}else{var modal=M.Modal.getInstance(template.parents('.modal.open'));if(modal){modal.close();} $('#debug-notification-alert-message').html(result.message);$('#debug-notification-alert').show();}});ajaxRequest.setFormat('html');piwikHelper.modalConfirm(template,{});ajaxRequest.send();};tagManagerHelper.updateDebugSiteFlag=function(url,idContainer,debugFlag){if(!url||!idContainer||!debugFlag||!(/^https?:\/\//.test(url))){return;} window.open(url+(url.indexOf('?')==-1?'?':'&')+'mtmPreviewMode='+encodeURIComponent(idContainer)+'&mtmSetDebugFlag='+encodeURIComponent(debugFlag),'_blank','noreferrer');};tagManagerHelper.importVersion=function(idContainer){var createVNode=Vue.createVNode;var createVueApp=CoreHome.createVueApp;var ImportVersion=TagManager.ImportVersion;var template=$('<div class="ui-confirm"><div></div><input role="no" type="button" value="' +_pk_translate('General_Cancel')+'"/></div>') var app=createVueApp({render:function(){return createVNode(ImportVersion,{idContainer:idContainer,});},});app.mount(template.children()[0]);piwikHelper.modalConfirm(template,{},{extraWide:true,onCloseEnd(){app.unmount();template.empty();},});};tagManagerHelper.truncateText=function(text,maxLength){text=text||'';if(text.length>maxLength){return`${text.substr(0, maxLength - 3)}...`;} return text;};window.tagManagerHelper=tagManagerHelper;$(function(){$('body').on('click','a.disablePreviewDebug',function(event){event.preventDefault();var idContainer=$(event.target).data('idcontainer');tagManagerHelper.disablePreviewMode(idContainer);}).on('click','.preview-debug-url-div button',function(event){var idContainer=$(event.target).data('idcontainer');var debugSiteUrl=$(event.target).data('debug-site-url');tagManagerHelper.changeDebugUrl(idContainer,debugSiteUrl);});$('body').on('click','a.createNewVersionLink',function(e){e.preventDefault();tagManagerHelper.createNewVersion();});});})(jQuery);
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare