1/* Minification failed. Returning unminified contents. 2(7731,66-67): run-time error JS1013: Syntax error in regular expression: ; 3(241,501-508): run-time error JS1019: Can't have 'break' outside of loop: break a 4 */ 5if (!String.prototype.includes) { 6 String.prototype.includes = function (search, start) { 7 'use strict'; 8 9 if (search instanceof RegExp) { 10 throw TypeError('first argument must not be a RegExp'); 11 } 12 if (start === undefined) { start = 0; } 13 return this.indexOf(search, start) !== -1; 14 }; 15} 16if (typeof Object.assign !== 'function') { 17 // Must be writable: true, enumerable: false, configurable: true 18 Object.defineProperty(Object, "assign", { 19 value: function assign(target, varArgs) { // .length of function is 2 20 'use strict'; 21 if (target === null || target === undefined) { 22 throw new TypeError('Cannot convert undefined or null to object'); 23 } 24 25 var to = Object(target); 26 27 for (var index = 1; index < arguments.length; index++) { 28 var nextSource = arguments[index]; 29 30 if (nextSource !== null && nextSource !== undefined) { 31 for (var nextKey in nextSource) { 32 // Avoid bugs when hasOwnProperty is shadowed 33 if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { 34 to[nextKey] = nextSource[nextKey]; 35 } 36 } 37 } 38 } 39 return to; 40 }, 41 writable: true, 42 configurable: true 43 }); 44} 45if (!Node.prototype.contains) { 46 Node.prototype.contains = function contains(node) { 47 if (!(0 in arguments)) { 48 throw new TypeError('1 argument is required'); 49 } 50 51 do { 52 if (this === node) { 53 return true; 54 } 55 } while (node = node && node.parentNode); 56 57 return false; 58 }; 59}; 60/* 61 AngularJS v1.8.2 62 (c) 2010-2020 Google LLC. http://angularjs.org 63 License: MIT 64*/ 65(function(z){'use strict';function ve(a){if(D(a))w(a.objectMaxDepth)&&(Xb.objectMaxDepth=Yb(a.objectMaxDepth)?a.objectMaxDepth:NaN),w(a.urlErrorParamsEnabled)&&Ga(a.urlErrorParamsEnabled)&&(Xb.urlErrorParamsEnabled=a.urlErrorParamsEnabled);else return Xb}function Yb(a){return X(a)&&0<a}function F(a,b){b=b||Error;return function(){var d=arguments[0],c;c="["+(a?a+":":"")+d+"] http://errors.angularjs.org/1.8.2
vendor: 13,480 bytes, lines 65-91
65/"+(a?a+"/":"")+d;for(d=1;d<arguments.length;d++){c=c+(1==d?"?":"&")+"p"+(d-1)+"=";var e=encodeURIComponent, 66f;f=arguments[d];f="function"==typeof f?f.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof f?"undefined":"string"!=typeof f?JSON.stringify(f):f;c+=e(f)}return new b(c)}}function za(a){if(null==a||$a(a))return!1;if(H(a)||C(a)||x&&a instanceof x)return!0;var b="length"in Object(a)&&a.length;return X(b)&&(0<=b&&b-1 in a||"function"===typeof a.item)}function r(a,b,d){var c,e;if(a)if(B(a))for(c in a)"prototype"!==c&&"length"!==c&&"name"!==c&&a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else if(H(a)|| 67za(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==r)a.forEach(b,d,a);else if(Pc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else for(c in a)ta.call(a,c)&&b.call(d,a[c],c,a);return a}function Qc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function Zb(a){return function(b,d){a(d,b)}}function we(){return++qb} 68function $b(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(D(g)||B(g))for(var k=Object.keys(g),h=0,l=k.length;h<l;h++){var m=k[h],p=g[m];d&&D(p)?ha(p)?a[m]=new Date(p.valueOf()):ab(p)?a[m]=new RegExp(p):p.nodeName?a[m]=p.cloneNode(!0):ac(p)?a[m]=p.clone():"__proto__"!==m&&(D(a[m])||(a[m]=H(p)?[]:{}),$b(a[m],[p],!0)):a[m]=p}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function S(a){return $b(a,Ha.call(arguments,1),!1)}function xe(a){return $b(a,Ha.call(arguments,1),!0)}function fa(a){return parseInt(a, 6910)}function bc(a,b){return S(Object.create(a),b)}function E(){}function Ta(a){return a}function ia(a){return function(){return a}}function cc(a){return B(a.toString)&&a.toString!==la}function A(a){return"undefined"===typeof a}function w(a){return"undefined"!==typeof a}function D(a){return null!==a&&"object"===typeof a}function Pc(a){return null!==a&&"object"===typeof a&&!Rc(a)}function C(a){return"string"===typeof a}function X(a){return"number"===typeof a}function ha(a){return"[object Date]"===la.call(a)} 70function H(a){return Array.isArray(a)||a instanceof Array}function dc(a){switch(la.call(a)){case "[object Error]":return!0;case "[object Exception]":return!0;case "[object DOMException]":return!0;default:return a instanceof Error}}function B(a){return"function"===typeof a}function ab(a){return"[object RegExp]"===la.call(a)}function $a(a){return a&&a.window===a}function bb(a){return a&&a.$evalAsync&&a.$watch}function Ga(a){return"boolean"===typeof a}function ye(a){return a&&X(a.length)&&ze.test(la.call(a))} 71function ac(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function Ae(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function ua(a){return K(a.nodeName||a[0]&&a[0].nodeName)}function cb(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function Ia(a,b,d){function c(a,b,c){c--;if(0>c)return"...";var d=b.$$hashKey,f;if(H(a)){f=0;for(var g=a.length;f<g;f++)b.push(e(a[f],c))}else if(Pc(a))for(f in a)b[f]=e(a[f],c);else if(a&&"function"===typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&& 72(b[f]=e(a[f],c));else for(f in a)ta.call(a,f)&&(b[f]=e(a[f],c));d?b.$$hashKey=d:delete b.$$hashKey;return b}function e(a,b){if(!D(a))return a;var d=g.indexOf(a);if(-1!==d)return k[d];if($a(a)||bb(a))throw oa("cpws");var d=!1,e=f(a);void 0===e&&(e=H(a)?[]:Object.create(Rc(a)),d=!0);g.push(a);k.push(e);return d?c(a,e,b):e}function f(a){switch(la.call(a)){case "[object Int8Array]":case "[object Int16Array]":case "[object Int32Array]":case "[object Float32Array]":case "[object Float64Array]":case "[object Uint8Array]":case "[object Uint8ClampedArray]":case "[object Uint16Array]":case "[object Uint32Array]":return new a.constructor(e(a.buffer), 73a.byteOffset,a.length);case "[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);(new Uint8Array(b)).set(new Uint8Array(a));return b}return a.slice(0);case "[object Boolean]":case "[object Number]":case "[object String]":case "[object Date]":return new a.constructor(a.valueOf());case "[object RegExp]":return b=new RegExp(a.source,a.toString().match(/[^/]*$/)[0]),b.lastIndex=a.lastIndex,b;case "[object Blob]":return new a.constructor([a],{type:a.type})}if(B(a.cloneNode))return a.cloneNode(!0)} 74var g=[],k=[];d=Yb(d)?d:NaN;if(b){if(ye(b)||"[object ArrayBuffer]"===la.call(b))throw oa("cpta");if(a===b)throw oa("cpi");H(b)?b.length=0:r(b,function(a,c){"$$hashKey"!==c&&delete b[c]});g.push(a);k.push(b);return c(a,b,d)}return e(a,d)}function ec(a,b){return a===b||a!==a&&b!==b}function va(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d===typeof b&&"object"===d)if(H(a)){if(!H(b))return!1;if((d=a.length)===b.length){for(c=0;c<d;c++)if(!va(a[c], 75b[c]))return!1;return!0}}else{if(ha(a))return ha(b)?ec(a.getTime(),b.getTime()):!1;if(ab(a))return ab(b)?a.toString()===b.toString():!1;if(bb(a)||bb(b)||$a(a)||$a(b)||H(b)||ha(b)||ab(b))return!1;d=T();for(c in a)if("$"!==c.charAt(0)&&!B(a[c])){if(!va(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&w(b[c])&&!B(b[c]))return!1;return!0}return!1}function db(a,b,d){return a.concat(Ha.call(b,d))}function Va(a,b){var d=2<arguments.length?Ha.call(arguments,2):[];return!B(b)||b instanceof 76RegExp?b:d.length?function(){return arguments.length?b.apply(a,db(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function Sc(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:$a(b)?d="$WINDOW":b&&z.document===b?d="$DOCUMENT":bb(b)&&(d="$SCOPE");return d}function eb(a,b){if(!A(a))return X(b)||(b=b?2:null),JSON.stringify(a,Sc,b)}function Tc(a){return C(a)?JSON.parse(a):a}function fc(a,b){a=a.replace(Be,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+ 77a)/6E4;return Y(d)?b:d}function Uc(a,b){a=new Date(a.getTime());a.setMinutes(a.getMinutes()+b);return a}function gc(a,b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=fc(b,c);return Uc(a,d*(b-c))}function Aa(a){a=x(a).clone().empty();var b=x("<div></div>").append(a).html();try{return a[0].nodeType===Pa?K(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+K(b)})}catch(d){return K(b)}}function Vc(a){try{return decodeURIComponent(a)}catch(b){}}function hc(a){var b={};r((a||"").split("&"), 78function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Vc(e),w(e)&&(f=w(f)?Vc(f):!0,ta.call(b,e)?H(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Ce(a){var b=[];r(a,function(a,c){H(a)?r(a,function(a){b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))});return b.length?b.join("&"):""}function ic(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a, 79b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function De(a,b){var d,c,e=Qa.length;for(c=0;c<e;++c)if(d=Qa[c]+b,C(d=a.getAttribute(d)))return d;return null}function Ee(a,b){var d,c,e={};r(Qa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});r(Qa,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":","\\:")+"]"))&&(d=e,c=e.getAttribute(b))}); 80d&&(Fe?(e.strictDi=null!==De(d,"strict-di"),b(d,c?[c]:[],e)):z.console.error("AngularJS: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function Wc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=x(a);if(a.injector()){var c=a[0]===z.document?"document":Aa(a);throw oa("btstrpd",c.replace(/</,"<").replace(/>/,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider", 81function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=fb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;z&&e.test(z.name)&&(d.debugInfoEnabled=!0,z.name=z.name.replace(e,""));if(z&&!f.test(z.name))return c();z.name=z.name.replace(f,"");ca.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};B(ca.resumeDeferredBootstrap)&& 82ca.resumeDeferredBootstrap()}function Ge(){z.name="NG_ENABLE_DEBUG_INFO!"+z.name;z.location.reload()}function He(a){a=ca.element(a).injector();if(!a)throw oa("test");return a.get("$$testability")}function Xc(a,b){b=b||"_";return a.replace(Ie,function(a,c){return(c?b:"")+a.toLowerCase()})}function Je(){var a;if(!Yc){var b=rb();(sb=A(b)?z.jQuery:b?z[b]:void 0)&&sb.fn.on?(x=sb,S(sb.fn,{scope:Wa.scope,isolateScope:Wa.isolateScope,controller:Wa.controller,injector:Wa.injector,inheritedData:Wa.inheritedData})): 83x=U;a=x.cleanData;x.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=(x._data(f)||{}).events)&&c.$destroy&&x(f).triggerHandler("$destroy");a(b)};ca.element=x;Yc=!0}}function Ke(){U.legacyXHTMLReplacement=!0}function gb(a,b,d){if(!a)throw oa("areq",b||"?",d||"required");return a}function tb(a,b,d){d&&H(a)&&(a=a[a.length-1]);gb(B(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ja(a,b){if("hasOwnProperty"===a)throw oa("badname", 84b);}function Le(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&B(a)?Va(e,a):a}function ub(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=x(Ha.call(a,0,e))),c.push(b);return c||a}function T(){return Object.create(null)}function jc(a){if(null==a)return"";switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=!cc(a)||H(a)||ha(a)?eb(a):a.toString()}return a}function Me(a){function b(a, 85b,c){return a[b]||(a[b]=c())}var d=F("$injector"),c=F("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||F;return b(a,"module",function(){var a={};return function(f,g,k){var h={};if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,c,d,f){f||(f=e);return function(){f[d||"push"]([b,c,arguments]);return t}}function b(a,c,d){d||(d=e);return function(b,e){e&&B(e)&&(e.$$moduleName=f);d.push([a,c,arguments]);return t}}if(!g)throw d("nomod", 86f);var e=[],n=[],s=[],G=a("$injector","invoke","push",n),t={_invokeQueue:e,_configBlocks:n,_runBlocks:s,info:function(a){if(w(a)){if(!D(a))throw c("aobj","value");h=a;return this}return h},requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator",n),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider", 87"register"),directive:b("$compileProvider","directive"),component:b("$compileProvider","component"),config:G,run:function(a){s.push(a);return this}};k&&G(k);return t})}})}function ja(a,b){if(H(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(D(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function Ne(a,b){var d=[];Yb(b)&&(a=ca.copy(a,null,b));return JSON.stringify(a,function(a,b){b=Sc(a,b);if(D(b)){if(0<=d.indexOf(b))return"...";d.push(b)}return b})} 88function Oe(a){S(a,{errorHandlingConfig:ve,bootstrap:Wc,copy:Ia,extend:S,merge:xe,equals:va,element:x,forEach:r,injector:fb,noop:E,bind:Va,toJson:eb,fromJson:Tc,identity:Ta,isUndefined:A,isDefined:w,isString:C,isFunction:B,isObject:D,isNumber:X,isElement:ac,isArray:H,version:Pe,isDate:ha,callbacks:{$$counter:0},getTestability:He,reloadWithDebugInfo:Ge,UNSAFE_restoreLegacyJqLiteXHTMLReplacement:Ke,$$minErr:F,$$csp:Ba,$$encodeUriSegment:ic,$$encodeUriQuery:ba,$$lowercase:K,$$stringify:jc,$$uppercase:vb}); 89lc=Me(z);lc("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Qe});a.provider("$compile",Zc).directive({a:Re,input:$c,textarea:$c,form:Se,script:Te,select:Ue,option:Ve,ngBind:We,ngBindHtml:Xe,ngBindTemplate:Ye,ngClass:Ze,ngClassEven:$e,ngClassOdd:af,ngCloak:bf,ngController:cf,ngForm:df,ngHide:ef,ngIf:ff,ngInclude:gf,ngInit:hf,ngNonBindable:jf,ngPluralize:kf,ngRef:lf,ngRepeat:mf,ngShow:nf,ngStyle:of,ngSwitch:pf,ngSwitchWhen:qf,ngSwitchDefault:rf,ngOptions:sf,ngTransclude:tf,ngModel:uf, 90ngList:vf,ngChange:wf,pattern:ad,ngPattern:ad,required:bd,ngRequired:bd,minlength:cd,ngMinlength:cd,maxlength:dd,ngMaxlength:dd,ngValue:xf,ngModelOptions:yf}).directive({ngInclude:zf,input:Af}).directive(wb).directive(ed);a.provider({$anchorScroll:Bf,$animate:Cf,$animateCss:Df,$$animateJs:Ef,$$animateQueue:Ff,$$AnimateRunner:Gf,$$animateAsyncRun:Hf,$browser:If,$cacheFactory:Jf,$controller:Kf,$document:Lf,$$isDocumentHidden:Mf,$exceptionHandler:Nf,$filter:fd,$$forceReflow:Of,$interpolate:Pf,$interval:Qf, 91$$intervalFactory:Rf,$http:Sf,$httpParamSerializer:Tf,$httpParamSerializerJQLike:Uf,$httpBackend:Vf,$xhrFactory:Wf,$jsonpCallbacks:Xf,$location:Yf,$log:Zf,$parse:$f,$rootScope:ag,$q:bg,$$q:cg,$sce:dg,$sceDelegate:eg,$sniffer:fg,$$taskTrackerFactory:gg,$templateCache:hg,$templateRequest:ig,$$testability:jg,$timeout:kg,$window:lg,$$rAF:mg,$$jqLite:ng,$$Map:og,$$cookieReader:pg})}]).info({angularVersion:"1.8.
912
vendor: 89,049 bytes, lines 91-266
91"})}function xb(a,b){return b.toUpperCase()}function yb(a){return a.replace(qg,xb)}function mc(a){a= 92a.nodeType;return 1===a||!a||9===a}function gd(a,b){var d,c,e,f=b.createDocumentFragment(),g=[],k;if(nc.test(a)){d=f.appendChild(b.createElement("div"));c=(rg.exec(a)||["",""])[1].toLowerCase();e=U.legacyXHTMLReplacement?a.replace(sg,"<$1></$2>"):a;if(10>wa)for(c=hb[c]||hb._default,d.innerHTML=c[1]+e+c[2],k=c[0];k--;)d=d.firstChild;else{c=qa[c]||[];for(k=c.length;-1<--k;)d.appendChild(z.document.createElement(c[k])),d=d.firstChild;d.innerHTML=e}g=db(g,d.childNodes);d=f.firstChild;d.textContent=""}else g.push(b.createTextNode(a)); 93f.textContent="";f.innerHTML="";r(g,function(a){f.appendChild(a)});return f}function U(a){if(a instanceof U)return a;var b;C(a)&&(a=V(a),b=!0);if(!(this instanceof U)){if(b&&"<"!==a.charAt(0))throw oc("nosel");return new U(a)}if(b){b=z.document;var d;a=(d=tg.exec(a))?[b.createElement(d[1])]:(d=gd(a,b))?d.childNodes:[];pc(this,a)}else B(a)?hd(a):pc(this,a)}function qc(a){return a.cloneNode(!0)}function zb(a,b){!b&&mc(a)&&x.cleanData([a]);a.querySelectorAll&&x.cleanData(a.querySelectorAll("*"))}function id(a){for(var b in a)return!1; 94return!0}function jd(a){var b=a.ng339,d=b&&Ka[b],c=d&&d.events,d=d&&d.data;d&&!id(d)||c&&!id(c)||(delete Ka[b],a.ng339=void 0)}function kd(a,b,d,c){if(w(c))throw oc("offargs");var e=(c=Ab(a))&&c.events,f=c&&c.handle;if(f){if(b){var g=function(b){var c=e[b];w(d)&&cb(c||[],d);w(d)&&c&&0<c.length||(a.removeEventListener(b,f),delete e[b])};r(b.split(" "),function(a){g(a);Bb[a]&&g(Bb[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f),delete e[b];jd(a)}}function rc(a,b){var d=a.ng339;if(d= 95d&&Ka[d])b?delete d.data[b]:d.data={},jd(a)}function Ab(a,b){var d=a.ng339,d=d&&Ka[d];b&&!d&&(a.ng339=d=++ug,d=Ka[d]={events:{},data:{},handle:void 0});return d}function sc(a,b,d){if(mc(a)){var c,e=w(d),f=!e&&b&&!D(b),g=!b;a=(a=Ab(a,!f))&&a.data;if(e)a[yb(b)]=d;else{if(g)return a;if(f)return a&&a[yb(b)];for(c in b)a[yb(c)]=b[c]}}}function Cb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function Db(a,b){if(b&&a.setAttribute){var d= 96(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=V(a);c=c.replace(" "+a+" "," ")});c!==d&&a.setAttribute("class",V(c))}}function Eb(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=V(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});c!==d&&a.setAttribute("class",V(c))}}function pc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c= 970;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function ld(a,b){return Fb(a,"$"+(b||"ngController")+"Controller")}function Fb(a,b,d){9===a.nodeType&&(a=a.documentElement);for(b=H(b)?b:[b];a;){for(var c=0,e=b.length;c<e;c++)if(w(d=x.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&a.host}}function md(a){for(zb(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Gb(a,b){b||zb(a);var d=a.parentNode;d&&d.removeChild(a)}function vg(a,b){b=b||z;if("complete"===b.document.readyState)b.setTimeout(a); 98else x(b).on("load",a)}function hd(a){function b(){z.document.removeEventListener("DOMContentLoaded",b);z.removeEventListener("load",b);a()}"complete"===z.document.readyState?z.setTimeout(a):(z.document.addEventListener("DOMContentLoaded",b),z.addEventListener("load",b))}function nd(a,b){var d=Hb[b.toLowerCase()];return d&&od[ua(a)]&&d}function wg(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(A(c.immediatePropagationStopped)){var k= 99c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();k&&k.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var h=f.specialHandlerWrapper||xg;1<g&&(f=ja(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||h(a,c,f[l])}};d.elem=a;return d}function xg(a,b,d){d.call(a,b)}function yg(a,b,d){var c=b.relatedTarget;c&&(c===a||zg.call(a,c))||d.call(a,b)}function ng(){this.$get= 100function(){return S(U,{hasClass:function(a,b){a.attr&&(a=a[0]);return Cb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Eb(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return Db(a,b)}})}}function La(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"===d||"object"===d&&null!==a?a.$$hashKey=d+":"+(b||we)():d+":"+a}function pd(){this._keys=[];this._values=[];this._lastKey=NaN;this._lastIndex=-1}function qd(a){a=Function.prototype.toString.call(a).replace(Ag, 101"");return a.match(Bg)||a.match(Cg)}function Dg(a){return(a=qd(a))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function fb(a,b){function d(a){return function(b,c){if(D(b))r(b,Zb(a));else return a(b,c)}}function c(a,b){Ja(a,"service");if(B(b)||H(b))b=n.instantiate(b);if(!b.$get)throw Ca("pget",a);return p[a+"Provider"]=b}function e(a,b){return function(){var c=t.invoke(b,this);if(A(c))throw Ca("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){gb(A(a)|| 102H(a),"modulesToLoad","not an array");var b=[],c;r(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=n.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.set(a,!0);try{C(a)?(c=lc(a),t.modules[a]=c,b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):B(a)?b.push(n.invoke(a)):H(a)?b.push(n.invoke(a)):tb(a,"module")}catch(e){throw H(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ca("modulerr", 103a,e.stack||e.message||e);}}});return b}function k(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===h)throw Ca("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=h,a[b]=c(b,e),a[b]}catch(f){throw a[b]===h&&delete a[b],f;}finally{l.shift()}}function e(a,c,f){var g=[];a=fb.$$annotate(a,b,f);for(var h=0,k=a.length;h<k;h++){var l=a[h];if("string"!==typeof l)throw Ca("itkn",l);g.push(c&&c.hasOwnProperty(l)?c[l]:d(l,f))}return g}return{invoke:function(a,b,c,d){"string"===typeof c&& 104(d=c,c=null);c=e(a,c,d);H(a)&&(a=a[a.length-1]);d=a;if(wa||"function"!==typeof d)d=!1;else{var f=d.$$ngIsClass;Ga(f)||(f=d.$$ngIsClass=/^class\b/.test(Function.prototype.toString.call(d)));d=f}return d?(c.unshift(null),new (Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=H(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new (Function.prototype.bind.apply(d,a))},get:d,annotate:fb.$$annotate,has:function(b){return p.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}} 105b=!0===b;var h={},l=[],m=new Ib,p={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,ia(b),!1)}),constant:d(function(a,b){Ja(a,"constant");p[a]=b;s[a]=b}),decorator:function(a,b){var c=n.get(a+"Provider"),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},n=p.$injector=k(p,function(a,b){ca.isString(b)&&l.push(b);throw Ca("unpr",l.join(" <- "));}),s={}, 106G=k(s,function(a,b){var c=n.get(a+"Provider",b);return t.invoke(c.$get,c,void 0,a)}),t=G;p.$injectorProvider={$get:ia(G)};t.modules=n.modules=T();var N=g(a),t=G.get("$injector");t.strictDi=b;r(N,function(a){a&&t.invoke(a)});t.loadNewModules=function(a){r(g(a),function(a){a&&t.invoke(a)})};return t}function Bf(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"=== 107ua(a))return b=a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;B(c)?c=c():ac(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):X(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=C(a)?a:X(a)?a.toString():d.hash();var b;a?(b=k.getElementById(a))?f(b):(b=e(k.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var k=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a=== 108b&&""===a||vg(function(){c.$evalAsync(g)})});return g}]}function ib(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;H(a)&&(a=a.join(" "));H(b)&&(b=b.join(" "));return a+" "+b}function Eg(a){C(a)&&(a=a.split(" "));var b=T();r(a,function(a){a.length&&(b[a]=!0)});return b}function ra(a){return D(a)?a:{}}function Fg(a,b,d,c,e){function f(){pa=null;k()}function g(){t=y();t=A(t)?null:t;va(t,P)&&(t=P);N=P=t}function k(){var a=N;g();if(v!==h.url()||a!==t)v=h.url(),N=t,r(J,function(a){a(h.url(),t)})} 109var h=this,l=a.location,m=a.history,p=a.setTimeout,n=a.clearTimeout,s={},G=e(d);h.isMock=!1;h.$$completeOutstandingRequest=G.completeTask;h.$$incOutstandingRequestCount=G.incTaskCount;h.notifyWhenNoOutstandingRequests=G.notifyWhenNoPendingTasks;var t,N,v=l.href,kc=b.find("base"),pa=null,y=c.history?function(){try{return m.state}catch(a){}}:E;g();h.url=function(b,d,e){A(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=N===e;b=ga(b).href;if(v===b&&(!c.history||f))return h; 110var k=v&&Da(v)===Da(b);v=b;N=e;!c.history||k&&f?(k||(pa=b),d?l.replace(b):k?(d=l,e=b,f=e.indexOf("#"),e=-1===f?"":e.substr(f),d.hash=e):l.href=b,l.href!==b&&(pa=b)):(m[d?"replaceState":"pushState"](e,"",b),g());pa&&(pa=b);return h}return(pa||l.href).replace(/#$/,"")};h.state=function(){return t};var J=[],I=!1,P=null;h.onUrlChange=function(b){if(!I){if(c.history)x(a).on("popstate",f);x(a).on("hashchange",f);I=!0}J.push(b);return b};h.$$applicationDestroyed=function(){x(a).off("hashchange popstate", 111f)};h.$$checkUrlChange=k;h.baseHref=function(){var a=kc.attr("href");return a?a.replace(/^(https?:)?\/\/[^/]*/,""):""};h.defer=function(a,b,c){var d;b=b||0;c=c||G.DEFAULT_TASK_TYPE;G.incTaskCount(c);d=p(function(){delete s[d];G.completeTask(a,c)},b);s[d]=c;return d};h.defer.cancel=function(a){if(s.hasOwnProperty(a)){var b=s[a];delete s[a];n(a);G.completeTask(E,b);return!0}return!1}}function If(){this.$get=["$window","$log","$sniffer","$document","$$taskTrackerFactory",function(a,b,d,c,e){return new Fg(a, 112c,b,d,e)}]}function Jf(){this.$get=function(){function a(a,c){function e(a){a!==p&&(n?n===a&&(n=a.n):n=a,f(a.n,a.p),f(a,p),p=a,p.n=null)}function f(a,b){a!==b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw F("$cacheFactory")("iid",a);var g=0,k=S({},c,{id:a}),h=T(),l=c&&c.capacity||Number.MAX_VALUE,m=T(),p=null,n=null;return b[a]={put:function(a,b){if(!A(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in h||g++;h[a]=b;g>l&&this.remove(n.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b= 113m[a];if(!b)return;e(b)}return h[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b===p&&(p=b.p);b===n&&(n=b.n);f(b.n,b.p);delete m[a]}a in h&&(delete h[a],g--)},removeAll:function(){h=T();g=0;m=T();p=n=null},destroy:function(){m=k=h=null;delete b[a]},info:function(){return S({},k,{size:g})}}}var b={};a.info=function(){var a={};r(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function hg(){this.$get=["$cacheFactory",function(a){return a("templates")}]} 114function Zc(a,b){function d(a,b,c){var d=/^([@&]|[=<](\*?))(\??)\s*([\w$]*)$/,e=T();r(a,function(a,f){a=a.trim();if(a in p)e[f]=p[a];else{var g=a.match(d);if(!g)throw $("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f};g[4]&&(p[a]=e[f])}});return e}function c(a){var b=a.charAt(0);if(!b||b!==K(b))throw $("baddir",a);if(a!==a.trim())throw $("baddir",a);}function e(a){var b=a.require||a.controller&& 115a.name;!H(b)&&D(b)&&r(b,function(a,c){var d=a.match(l);a.substring(d[0].length)||(b[c]=d[0]+c)});return b}var f={},g=/^\s*directive:\s*([\w-]+)\s+(.*)$/,k=/(([\w-]+)(?::([^;]+))?;?)/,h=Ae("ngSrc,ngSrcset,src,srcset"),l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,m=/^(on[a-z]+|formaction)$/,p=T();this.directive=function pa(b,d){gb(b,"name");Ja(b,"directive");C(b)?(c(b),gb(d,"directiveFactory"),f.hasOwnProperty(b)||(f[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var d=[];r(f[b],function(f, 116g){try{var h=a.invoke(f);B(h)?h={compile:ia(h)}:!h.compile&&h.link&&(h.compile=ia(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=e(h);var k=h,l=h.restrict;if(l&&(!C(l)||!/[EACM]/.test(l)))throw $("badrestrict",l,b);k.restrict=l||"EA";h.$$moduleName=f.$$moduleName;d.push(h)}catch(m){c(m)}});return d}])),f[b].push(d)):r(b,Zb(pa));return this};this.component=function y(a,b){function c(a){function e(b){return B(b)||H(b)?function(c,d){return a.invoke(b,this,{$element:c,$attrs:d})}: 117b}var f=b.template||b.templateUrl?b.template:"",g={controller:d,controllerAs:Gg(b.controller)||b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E",require:b.require};r(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}if(!C(a))return r(a,Zb(Va(this,y))),this;var d=b.controller||function(){};r(b,function(a,b){"$"===b.charAt(0)&&(c[b]=a,B(d)&&(d[b]=a))});c.$inject=["$injector"];return this.directive(a, 118c)};this.aHrefSanitizationTrustedUrlList=function(a){return w(a)?(b.aHrefSanitizationTrustedUrlList(a),this):b.aHrefSanitizationTrustedUrlList()};Object.defineProperty(this,"aHrefSanitizationWhitelist",{get:function(){return this.aHrefSanitizationTrustedUrlList},set:function(a){this.aHrefSanitizationTrustedUrlList=a}});this.imgSrcSanitizationTrustedUrlList=function(a){return w(a)?(b.imgSrcSanitizationTrustedUrlList(a),this):b.imgSrcSanitizationTrustedUrlList()};Object.defineProperty(this,"imgSrcSanitizationWhitelist", 119{get:function(){return this.imgSrcSanitizationTrustedUrlList},set:function(a){this.imgSrcSanitizationTrustedUrlList=a}});var n=!0;this.debugInfoEnabled=function(a){return w(a)?(n=a,this):n};var s=!1;this.strictComponentBindingsEnabled=function(a){return w(a)?(s=a,this):s};var G=10;this.onChangesTtl=function(a){return arguments.length?(G=a,this):G};var t=!0;this.commentDirectivesEnabled=function(a){return arguments.length?(t=a,this):t};var N=!0;this.cssClassDirectivesEnabled=function(a){return arguments.length? 120(N=a,this):N};var v=T();this.addPropertySecurityContext=function(a,b,c){var d=a.toLowerCase()+"|"+b.toLowerCase();if(d in v&&v[d]!==c)throw $("ctxoverride",a,b,v[d],c);v[d]=c;return this};(function(){function a(b,c){r(c,function(a){v[a.toLowerCase()]=b})}a(W.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]);a(W.CSS,["*|style"]);a(W.URL,"area|href area|ping a|href a|ping blockquote|cite body|background del|cite input|src ins|cite q|cite".split(" "));a(W.MEDIA_URL,"audio|src img|src img|srcset source|src source|srcset track|src video|src video|poster".split(" ")); 121a(W.RESOURCE_URL,"*|formAction applet|code applet|codebase base|href embed|src frame|src form|action head|profile html|manifest iframe|src link|href media|src object|codebase object|data script|src".split(" "))})();this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate",function(a,b,c,e,p,M,L,u,R){function q(){try{if(!--Ja)throw Ua=void 0,$("infchng",G);L.$apply(function(){for(var a=0,b=Ua.length;a<b;++a)try{Ua[a]()}catch(d){c(d)}Ua= 122void 0})}finally{Ja++}}function ma(a,b){if(!a)return a;if(!C(a))throw $("srcset",b,a.toString());for(var c="",d=V(a),e=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,e=/\s/.test(d)?e:/(,)/,d=d.split(e),e=Math.floor(d.length/2),f=0;f<e;f++)var g=2*f,c=c+u.getTrustedMediaUrl(V(d[g])),c=c+(" "+V(d[g+1]));d=V(d[2*f]).split(/\s/);c+=u.getTrustedMediaUrl(V(d[0]));2===d.length&&(c+=" "+V(d[1]));return c}function w(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr= 123{};this.$$element=a}function O(a,b,c){Fa.innerHTML="<span "+b+">";b=Fa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function sa(a,b){try{a.addClass(b)}catch(c){}}function da(a,b,c,d,e){a instanceof x||(a=x(a));var f=Xa(a,b,a,c,d,e);da.$$addScopeClass(a);var g=null;return function(b,c,d){if(!a)throw $("multilink");gb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement; 124h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&la.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==g?x(ja(g,x("<div></div>").append(a).html())):c?Wa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);da.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);c||(a=f=null);return d}}function Xa(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,I,t;if(n)for(t=Array(c.length),m=0;m<h.length;m+=3)f=h[m],t[f]=c[f];else t=c;m=0;for(p=h.length;m< 125p;)k=t[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),da.$$addScopeInfo(x(k),l)):l=a,I=c.transcludeOnThisElement?ka(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?ka(a,b):null,c(f,l,k,d,I)):f&&f(a,k.childNodes,void 0,e)}for(var h=[],k=H(a)||a instanceof x,l,m,p,I,n,t=0;t<a.length;t++){l=new w;11===wa&&jb(a,t,k);m=tc(a[t],[],l,0===t?d:void 0,e);(f=m.length?aa(m,a[t],l,b,c,null,[],[],f):null)&&f.scope&&da.$$addScopeClass(l.$$element);l=f&&f.terminal||!(p=a[t].childNodes)||!p.length?null:Xa(p, 126f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||l)h.push(t,f,l),I=!0,n=n||f;f=null}return I?g:null}function jb(a,b,c){var d=a[b],e=d.parentNode,f;if(d.nodeType===Pa)for(;;){f=e?d.nextSibling:a[b+1];if(!f||f.nodeType!==Pa)break;d.nodeValue+=f.nodeValue;f.parentNode&&f.parentNode.removeChild(f);c&&f===a[b+1]&&a.splice(b+1,1)}}function ka(a,b,c){function d(e,f,g,h,k){e||(e=a.$new(!1,k),e.$$transcluded=!0);return b(e,f,{parentBoundTranscludeFn:c,transcludeControllers:g, 127futureParentElement:h})}var e=d.$$slots=T(),f;for(f in b.$$slots)e[f]=b.$$slots[f]?ka(a,b.$$slots[f],c):null;return d}function tc(a,b,d,e,f){var g=d.$attr,h;switch(a.nodeType){case 1:h=ua(a);Y(b,xa(h),"E",e,f);for(var l,m,n,t,J,s=a.attributes,v=0,G=s&&s.length;v<G;v++){var P=!1,N=!1,r=!1,y=!1,u=!1,M;l=s[v];m=l.name;t=l.value;n=xa(m.toLowerCase());(J=n.match(Ra))?(r="Attr"===J[1],y="Prop"===J[1],u="On"===J[1],m=m.replace(rd,"").toLowerCase().substr(4+J[1].length).replace(/_(.)/g,function(a,b){return b.toUpperCase()})): 128(M=n.match(Sa))&&ca(M[1])&&(P=m,N=m.substr(0,m.length-5)+"end",m=m.substr(0,m.length-6));if(y||u)d[n]=t,g[n]=l.name,y?Ea(a,b,n,m):b.push(sd(p,L,c,n,m,!1));else{n=xa(m.toLowerCase());g[n]=m;if(r||!d.hasOwnProperty(n))d[n]=t,nd(a,n)&&(d[n]=!0);Ia(a,b,t,n,r);Y(b,n,"A",e,f,P,N)}}"input"===h&&"hidden"===a.getAttribute("type")&&a.setAttribute("autocomplete","off");if(!Qa)break;g=a.className;D(g)&&(g=g.animVal);if(C(g)&&""!==g)for(;a=k.exec(g);)n=xa(a[2]),Y(b,n,"C",e,f)&&(d[n]=V(a[3])),g=g.substr(a.index+ 129a[0].length);break;case Pa:na(b,a.nodeValue);break;case 8:if(!Oa)break;F(a,b,d,e,f)}b.sort(ia);return b}function F(a,b,c,d,e){try{var f=g.exec(a.nodeValue);if(f){var h=xa(f[1]);Y(b,h,"M",d,e)&&(c[h]=V(f[2]))}}catch(k){}}function U(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw $("uterdir",b,c);1===a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return x(d)}function W(a,b,c){return function(d,e,f,g,h){e=U(e[0], 130b,c);return a(d,e,f,g,h)}}function Z(a,b,c,d,e,f){var g;return a?da(b,c,d,e,f):function(){g||(g=da(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function aa(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&(a=W(a,c,d));a.require=u.require;a.directiveName=Q;if(s===u||u.$$isolateScope)a=Ba(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=W(b,c,d));b.require=u.require;b.directiveName=Q;if(s===u||u.$$isolateScope)b=Ba(b,{isolateScope:!0});k.push(b)}}function p(a,e,f,g,l){function m(a,b,c,d){var e;bb(a)|| 131(d=c,c=b,b=a,a=void 0);N&&(e=P);c||(c=N?Q.parent():Q);if(d){var f=l.$$slots[d];if(f)return f(a,b,e,c,R);if(A(f))throw $("noslot",d,Aa(Q));}else return l(a,b,e,c,R)}var n,u,L,y,G,P,M,Q;b===f?(g=d,Q=d.$$element):(Q=x(f),g=new w(Q,d));G=e;s?y=e.$new(!0):t&&(G=e.$parent);l&&(M=m,M.$$boundTransclude=l,M.isSlotFilled=function(a){return!!l.$$slots[a]});J&&(P=ea(Q,g,M,J,y,e,s));s&&(da.$$addScopeInfo(Q,y,!0,!(v&&(v===s||v===s.$$originalDirective))),da.$$addScopeClass(Q,!0),y.$$isolateBindings=s.$$isolateBindings, 132u=Da(e,g,y,y.$$isolateBindings,s),u.removeWatches&&y.$on("$destroy",u.removeWatches));for(n in P){u=J[n];L=P[n];var Hg=u.$$bindings.bindToController;L.instance=L();Q.data("$"+u.name+"Controller",L.instance);L.bindingInfo=Da(G,g,L.instance,Hg,u)}r(J,function(a,b){var c=a.require;a.bindToController&&!H(c)&&D(c)&&S(P[b].instance,X(b,c,Q,P))});r(P,function(a){var b=a.instance;if(B(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(d){c(d)}if(B(b.$onInit))try{b.$onInit()}catch(e){c(e)}B(b.$doCheck)&& 133(G.$watch(function(){b.$doCheck()}),b.$doCheck());B(b.$onDestroy)&&G.$on("$destroy",function(){b.$onDestroy()})});n=0;for(u=h.length;n<u;n++)L=h[n],Ca(L,L.isolateScope?y:e,Q,g,L.require&&X(L.directiveName,L.require,Q,P),M);var R=e;s&&(s.template||null===s.templateUrl)&&(R=y);a&&a(R,f.childNodes,void 0,l);for(n=k.length-1;0<=n;n--)L=k[n],Ca(L,L.isolateScope?y:e,Q,g,L.require&&X(L.directiveName,L.require,Q,P),M);r(P,function(a){a=a.instance;B(a.$postLink)&&a.$postLink()})}l=l||{};for(var n=-Number.MAX_VALUE, 134t=l.newScopeDirective,J=l.controllerDirectives,s=l.newIsolateScopeDirective,v=l.templateDirective,L=l.nonTlbTranscludeDirective,G=!1,P=!1,N=l.hasElementTranscludeDirective,y=d.$$element=x(b),u,Q,M,R=e,q,ma=!1,Jb=!1,O,sa=0,C=a.length;sa<C;sa++){u=a[sa];var E=u.$$start,jb=u.$$end;E&&(y=U(b,E,jb));M=void 0;if(n>u.priority)break;if(O=u.scope)u.templateUrl||(D(O)?(ba("new/isolated scope",s||t,u,y),s=u):ba("new/isolated scope",s,u,y)),t=t||u;Q=u.name;if(!ma&&(u.replace&&(u.templateUrl||u.template)||u.transclude&& 135!u.$$tlb)){for(O=sa+1;ma=a[O++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){Jb=!0;break}ma=!0}!u.templateUrl&&u.controller&&(J=J||T(),ba("'"+Q+"' controller",J[Q],u,y),J[Q]=u);if(O=u.transclude)if(G=!0,u.$$tlb||(ba("transclusion",L,u,y),L=u),"element"===O)N=!0,n=u.priority,M=y,y=d.$$element=x(da.$$createComment(Q,d[Q])),b=y[0],oa(f,Ha.call(M,0),b),R=Z(Jb,M,e,n,g&&g.name,{nonTlbTranscludeDirective:L});else{var ka=T();if(D(O)){M=z.document.createDocumentFragment();var Xa= 136T(),F=T();r(O,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Xa[a]=b;ka[b]=null;F[b]=c});r(y.contents(),function(a){var b=Xa[xa(ua(a))];b?(F[b]=!0,ka[b]=ka[b]||z.document.createDocumentFragment(),ka[b].appendChild(a)):M.appendChild(a)});r(F,function(a,b){if(!a)throw $("reqslot",b);});for(var K in ka)ka[K]&&(R=x(ka[K].childNodes),ka[K]=Z(Jb,R,e));M=x(M.childNodes)}else M=x(qc(b)).contents();y.empty();R=Z(Jb,M,e,void 0,void 0,{needsNewScope:u.$$isolateScope||u.$$newScope});R.$$slots=ka}if(u.template)if(P= 137!0,ba("template",v,u,y),v=u,O=B(u.template)?u.template(y,d):u.template,O=Na(O),u.replace){g=u;M=nc.test(O)?td(ja(u.templateNamespace,V(O))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw $("tplrt",Q,"");oa(f,y,b);C={$attr:{}};O=tc(b,[],C);var Ig=a.splice(sa+1,a.length-(sa+1));(s||t)&&fa(O,s,t);a=a.concat(O).concat(Ig);ga(d,C);C=a.length}else y.html(O);if(u.templateUrl)P=!0,ba("template",v,u,y),v=u,u.replace&&(g=u),p=ha(a.splice(sa,a.length-sa),y,d,f,G&&R,h,k,{controllerDirectives:J,newScopeDirective:t!== 138u&&t,newIsolateScopeDirective:s,templateDirective:v,nonTlbTranscludeDirective:L}),C=a.length;else if(u.compile)try{q=u.compile(y,d,R);var Y=u.$$originalDirective||u;B(q)?m(null,Va(Y,q),E,jb):q&&m(Va(Y,q.pre),Va(Y,q.post),E,jb)}catch(ca){c(ca,Aa(y))}u.terminal&&(p.terminal=!0,n=Math.max(n,u.priority))}p.scope=t&&!0===t.scope;p.transcludeOnThisElement=G;p.templateOnThisElement=P;p.transclude=R;l.hasElementTranscludeDirective=N;return p}function X(a,b,c,d){var e;if(C(b)){var f=b.match(l);b=b.substring(f[0].length); 139var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e="^^"===g&&c[0]&&9===c[0].nodeType?null:g?c.inheritedData(h):c.data(h)}if(!e&&!f)throw $("ctreq",b,a);}else if(H(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=X(a,b[g],c,d);else D(b)&&(e={},r(b,function(b,f){e[f]=X(a,b,c,d)}));return e||null}function ea(a,b,c,d,e,f,g){var h=T(),k;for(k in d){var l=d[k],m={$scope:l===g||l.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},p=l.controller;"@"=== 140p&&(p=b[l.name]);m=M(p,m,!0,l.controllerAs);h[l.name]=m;a.data("$"+l.name+"Controller",m.instance)}return h}function fa(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=bc(a[d],{$$isolateScope:b,$$newScope:c})}function Y(b,c,e,g,h,k,l){if(c===h)return null;var m=null;if(f.hasOwnProperty(c)){h=a.get(c+"Directive");for(var p=0,n=h.length;p<n;p++)if(c=h[p],(A(g)||g>c.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=bc(c,{$$start:k,$$end:l}));if(!c.$$bindings){var I=m=c,t=c.name,u={isolateScope:null,bindToController:null}; 141D(I.scope)&&(!0===I.bindToController?(u.bindToController=d(I.scope,t,!0),u.isolateScope={}):u.isolateScope=d(I.scope,t,!1));D(I.bindToController)&&(u.bindToController=d(I.bindToController,t,!0));if(u.bindToController&&!I.controller)throw $("noctrl",t);m=m.$$bindings=u;D(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function ca(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d<e;d++)if(b=c[d],b.multiElement)return!0;return!1}function ga(a,b){var c= 142b.$attr,d=a.$attr;r(a,function(d,e){"$"!==e.charAt(0)&&(b[e]&&b[e]!==d&&(d=d.length?d+(("style"===e?";":" ")+b[e]):b[e]),a.$set(e,d,!0,c[e]))});r(b,function(b,e){a.hasOwnProperty(e)||"$"===e.charAt(0)||(a[e]=b,"class"!==e&&"style"!==e&&(d[e]=c[e]))})}function ha(a,b,d,f,g,h,k,l){var m=[],p,n,t=b[0],u=a.shift(),J=bc(u,{templateUrl:null,transclude:null,replace:null,$$originalDirective:u}),s=B(u.templateUrl)?u.templateUrl(b,d):u.templateUrl,L=u.templateNamespace;b.empty();e(s).then(function(c){var e, 143I;c=Na(c);if(u.replace){c=nc.test(c)?td(ja(L,V(c))):[];e=c[0];if(1!==c.length||1!==e.nodeType)throw $("tplrt",u.name,s);c={$attr:{}};oa(f,b,e);var v=tc(e,[],c);D(u.scope)&&fa(v,!0);a=v.concat(a);ga(d,c)}else e=t,b.html(c);a.unshift(J);p=aa(a,e,d,g,b,u,h,k,l);r(f,function(a,c){a===e&&(f[c]=b[0])});for(n=Xa(b[0].childNodes,g);m.length;){c=m.shift();I=m.shift();var y=m.shift(),P=m.shift(),v=b[0];if(!c.$$destroyed){if(I!==t){var G=I.className;l.hasElementTranscludeDirective&&u.replace||(v=qc(e));oa(y, 144x(I),v);sa(x(v),G)}I=p.transcludeOnThisElement?ka(c,p.transclude,P):P;p(n,c,v,f,I)}}m=null}).catch(function(a){dc(a)&&c(a)});return function(a,b,c,d,e){a=e;b.$$destroyed||(m?m.push(b,c,d,a):(p.transcludeOnThisElement&&(a=ka(b,p.transclude,e)),p(n,b,c,d,a)))}}function ia(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function ba(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw $("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName), 145a,Aa(d));}function na(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&da.$$addBindingClass(a);return function(a,c){var e=c.parent();b||da.$$addBindingClass(e);da.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function ja(a,b){a=K(a||"html");switch(a){case "svg":case "math":var c=z.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function qa(a,b){if("srcdoc"=== 146b)return u.HTML;if("src"===b||"ngSrc"===b)return-1===["img","video","audio","source","track"].indexOf(a)?u.RESOURCE_URL:u.MEDIA_URL;if("xlinkHref"===b)return"image"===a?u.MEDIA_URL:"a"===a?u.URL:u.RESOURCE_URL;if("form"===a&&"action"===b||"base"===a&&"href"===b||"link"===a&&"href"===b)return u.RESOURCE_URL;if("a"===a&&("href"===b||"ngHref"===b))return u.URL}function ya(a,b){var c=b.toLowerCase();return v[a+"|"+c]||v["*|"+c]}function za(a){return ma(u.valueOf(a),"ng-prop-srcset")}function Ea(a,b,c, 147d){if(m.test(d))throw $("nodomevents");a=ua(a);var e=ya(a,d),f=Ta;"srcset"!==d||"img"!==a&&"source"!==a?e&&(f=u.getTrusted.bind(u,e)):f=za;b.push({priority:100,compile:function(a,b){var e=p(b[c]),g=p(b[c],function(a){return u.valueOf(a)});return{pre:function(a,b){function c(){var g=e(a);b[0][d]=f(g)}c();a.$watch(g,c)}}}})}function Ia(a,c,d,e,f){var g=ua(a),k=qa(g,e),l=h[e]||f,p=b(d,!f,k,l);if(p){if("multiple"===e&&"select"===g)throw $("selmulti",Aa(a));if(m.test(e))throw $("nodomevents");c.push({priority:100, 148compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=T());var g=f[e];g!==d&&(p=g&&b(g,!0,k,l),d=g);p&&(f[e]=p(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&&f.$$observers[e].$$scope||a).$watch(p,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function oa(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]===d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&& 149(a.context=c);break}f&&f.replaceChild(c,d);a=z.document.createDocumentFragment();for(g=0;g<e;g++)a.appendChild(b[g]);x.hasData(d)&&(x.data(c,x.data(d)),x(d).off("$destroy"));x.cleanData(a.querySelectorAll("*"));for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function Ba(a,b){return S(function(){return a.apply(null,arguments)},a,b)}function Ca(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,Aa(d))}}function ra(a,b){if(s)throw $("missingattr",a,b);}function Da(a,c,d,e,f){function g(b,c,e){B(d.$onChanges)&& 150!ec(c,e)&&(Ua||(a.$$postDigest(q),Ua=[]),m||(m={},Ua.push(h)),m[b]&&(e=m[b].previousValue),m[b]=new Kb(e,c))}function h(){d.$onChanges(m);m=void 0}var k=[],l={},m;r(e,function(e,h){var m=e.attrName,n=e.optional,I,t,u,s;switch(e.mode){case "@":n||ta.call(c,m)||(ra(m,f.name),d[h]=c[m]=void 0);n=c.$observe(m,function(a){if(C(a)||Ga(a))g(h,a,d[h]),d[h]=a});c.$$observers[m].$$scope=a;I=c[m];C(I)?d[h]=b(I)(a):Ga(I)&&(d[h]=I);l[h]=new Kb(uc,d[h]);k.push(n);break;case "=":if(!ta.call(c,m)){if(n)break;ra(m, 151f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);s=t.literal?va:ec;u=t.assign||function(){I=d[h]=t(a);throw $("nonassign",c[m],m,f.name);};I=d[h]=t(a);n=function(b){s(b,d[h])||(s(b,I)?u(a,b=d[h]):d[h]=b);return I=b};n.$stateful=!0;n=e.collection?a.$watchCollection(c[m],n):a.$watch(p(c[m],n),null,t.literal);k.push(n);break;case "<":if(!ta.call(c,m)){if(n)break;ra(m,f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);var v=t.literal,L=d[h]=t(a);l[h]=new Kb(uc,d[h]);n=a[e.collection?"$watchCollection":"$watch"](t, 152function(a,b){if(b===a){if(b===L||v&&va(b,L))return;b=L}g(h,a,b);d[h]=a});k.push(n);break;case "&":n||ta.call(c,m)||ra(m,f.name);t=c.hasOwnProperty(m)?p(c[m]):E;if(t===E&&n)break;d[h]=function(b){return t(a,b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var Ma=/^\w/,Fa=z.document.createElement("div"),Oa=t,Qa=N,Ja=G,Ua;w.prototype={$normalize:xa,$addClass:function(a){a&&0<a.length&&R.addClass(this.$$element,a)},$removeClass:function(a){a&& 1530<a.length&&R.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=ud(a,b);c&&c.length&&R.addClass(this.$$element,c);(c=ud(b,a))&&c.length&&R.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=nd(this.$$element[0],a),g=vd[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=Xc(a,"-"));"img"===ua(this.$$element)&&"srcset"===a&&(this[a]=b=ma(b,"$set('srcset', value)"));!1!==d&&(null===b||A(b)?this.$$element.removeAttr(e): 154Ma.test(e)?f&&!1===b?this.$$element.removeAttr(e):this.$$element.attr(e,b):O(this.$$element[0],e,b));(a=this.$$observers)&&r(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=T()),e=d[a]||(d[a]=[]);e.push(b);L.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||A(c[a])||b(c[a])});return function(){cb(e,b)}}};var Ka=b.startSymbol(),La=b.endSymbol(),Na="{{"===Ka&&"}}"===La?Ta:function(a){return a.replace(/\{\{/g,Ka).replace(/}}/g,La)},Ra= 155/^ng(Attr|Prop|On)([A-Z].*)$/,Sa=/^(.+)Start$/;da.$$addBindingInfo=n?function(a,b){var c=a.data("$binding")||[];H(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:E;da.$$addBindingClass=n?function(a){sa(a,"ng-binding")}:E;da.$$addScopeInfo=n?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:E;da.$$addScopeClass=n?function(a,b){sa(a,b?"ng-isolate-scope":"ng-scope")}:E;da.$$createComment=function(a,b){var c="";n&&(c=" "+(a||"")+": ",b&&(c+=b+" "));return z.document.createComment(c)}; 156return da}]}function Kb(a,b){this.previousValue=a;this.currentValue=b}function xa(a){return a.replace(rd,"").replace(Jg,function(a,d,c){return c?d.toUpperCase():d})}function ud(a,b){var d="",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],k=0;k<e.length;k++)if(g===e[k])continue a;d+=(0<d.length?" ":"")+g}return d}function td(a){a=x(a);var b=a.length;if(1>=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Pa&&""===d.nodeValue.trim())&&Kg.call(a,b,1)}return a} 157function Gg(a,b){if(b&&C(b))return b;if(C(a)){var d=wd.exec(a);if(d)return d[3]}}function Kf(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Ja(b,"controller");D(b)?S(a,b):a[b]=d};this.$get=["$injector",function(b){function d(a,b,d,g){if(!a||!D(a.$scope))throw F("$controller")("noscp",g,b);a.$scope[b]=d}return function(c,e,f,g){var k,h,l;f=!0===f;g&&C(g)&&(l=g);if(C(c)){g=c.match(wd);if(!g)throw xd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Le(e.$scope, 158h,!0);if(!c)throw xd("ctrlreg",h);tb(c,h,!0)}if(f)return f=(H(c)?c[c.length-1]:c).prototype,k=Object.create(f||null),l&&d(e,l,k,h||c.name),S(function(){var a=b.invoke(c,k,e,h);a!==k&&(D(a)||B(a))&&(k=a,l&&d(e,l,k,h||c.name));return k},{instance:k,identifier:l});k=b.instantiate(c,e,h);l&&d(e,l,k,h||c.name);return k}}]}function Lf(){this.$get=["$window",function(a){return x(a.document)}]}function Mf(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden; 159a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]}function Nf(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function vc(a){return D(a)?ha(a)?a.toISOString():eb(a):a}function Tf(){this.$get=function(){return function(a){if(!a)return"";var b=[];Qc(a,function(a,c){null===a||A(a)||B(a)||(H(a)?r(a,function(a){b.push(ba(c)+"="+ba(vc(a)))}):b.push(ba(c)+"="+ba(vc(a))))});return b.join("&")}}}function Uf(){this.$get= 160function(){return function(a){function b(a,e,f){H(a)?r(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!ha(a)?Qc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):(B(a)&&(a=a()),d.push(ba(e)+"="+(null==a?"":ba(vc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function wc(a,b){if(C(a)){var d=a.replace(Lg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(yd),e;(e=c)||(e=(e=d.match(Mg))&&Ng[e[0]].test(d));if(e)try{a=Tc(d)}catch(f){if(!c)return a;throw Lb("baddata",a,f);}}}return a} 161function zd(a){var b=T(),d;C(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=K(V(a.substr(0,d)));a=V(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&&r(a,function(a,d){var f=K(d),g=V(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function Ad(a){var b;return function(d){b||(b=zd(a));return d?(d=b[K(d)],void 0===d&&(d=null),d):b}}function Bd(a,b,d,c){if(B(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Sf(){var a=this.defaults={transformResponse:[wc],transformRequest:[function(a){return D(a)&& 162"[object File]"!==la.call(a)&&"[object Blob]"!==la.call(a)&&"[object FormData]"!==la.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ja(xc),put:ja(xc),patch:ja(xc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=this.interceptors=[],c=this.xsrfTrustedOrigins=[];Object.defineProperty(this,"xsrfWhitelistedOrigins", 163{get:function(){return this.xsrfTrustedOrigins},set:function(a){this.xsrfTrustedOrigins=a}});this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(e,f,g,k,h,l,m,p){function n(b){function c(a,b){for(var d=0,e=b.length;d<e;){var f=b[d++],g=b[d++];a=a.then(f,g)}b.length=0;return a}function d(a,b){var c,e={};r(a,function(a,d){B(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a});return e}function f(a){var b=S({},a);b.data=Bd(a.data,a.headers,a.status,g.transformResponse); 164a=a.status;return 200<=a&&300>a?b:l.reject(b)}if(!D(b))throw F("$http")("badreq",b);if(!C(p.valueOf(b.url)))throw F("$http")("badreq",b.url);var g=S({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer,jsonpCallbackParam:a.jsonpCallbackParam},b);g.headers=function(b){var c=a.headers,e=S({},b.headers),f,g,h,c=S({},c.common,c[K(b.method)]);a:for(f in c){g=K(f);for(h in e)if(K(h)===g)continue a;e[f]=c[f]}return d(e,ja(b))}(b);g.method= 165vb(g.method);g.paramSerializer=C(g.paramSerializer)?m.get(g.paramSerializer):g.paramSerializer;e.$$incOutstandingRequestCount("$http");var h=[],k=[];b=l.resolve(g);r(v,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&k.push(a.response,a.responseError)});b=c(b,h);b=b.then(function(b){var c=b.headers,d=Bd(b.data,Ad(c),void 0,b.transformRequest);A(d)&&r(c,function(a,b){"content-type"===K(b)&&delete c[b]});A(b.withCredentials)&&!A(a.withCredentials)&& 166(b.withCredentials=a.withCredentials);return s(b,d).then(f,f)});b=c(b,k);return b=b.finally(function(){e.$$completeOutstandingRequest(E,"$http")})}function s(c,d){function e(a){if(a){var c={};r(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function k(a,c,d,e,f){function g(){m(c,a,d,e,f)}R&&(200<=a&&300>a?R.put(O,[a,c,zd(d),e,f]):R.remove(O));b?h.$applyAsync(g):(g(),h.$$phase||h.$apply())}function m(a,b,d,e,f){b=-1<=b?b:0;(200<=b&&300> 167b?L.resolve:L.reject)({data:a,status:b,headers:Ad(d),config:c,statusText:e,xhrStatus:f})}function s(a){m(a.data,a.status,ja(a.headers()),a.statusText,a.xhrStatus)}function v(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var L=l.defer(),u=L.promise,R,q,ma=c.headers,x="jsonp"===K(c.method),O=c.url;x?O=p.getTrustedResourceUrl(O):C(O)||(O=p.valueOf(O));O=G(O,c.paramSerializer(c.params));x&&(O=t(O,c.jsonpCallbackParam));n.pendingRequests.push(c);u.then(v,v);!c.cache&&!a.cache|| 168!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(R=D(c.cache)?c.cache:D(a.cache)?a.cache:N);R&&(q=R.get(O),w(q)?q&&B(q.then)?q.then(s,s):H(q)?m(q[1],q[0],ja(q[2]),q[3],q[4]):m(q,200,{},"OK","complete"):R.put(O,u));A(q)&&((q=kc(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(ma[c.xsrfHeaderName||a.xsrfHeaderName]=q),f(c.method,O,d,k,ma,c.timeout,c.withCredentials,c.responseType,e(c.eventHandlers),e(c.uploadEventHandlers)));return u}function G(a,b){0<b.length&&(a+=(-1===a.indexOf("?")? 169"?":"&")+b);return a}function t(a,b){var c=a.split("?");if(2<c.length)throw Lb("badjsonp",a);c=hc(c[1]);r(c,function(c,d){if("JSON_CALLBACK"===c)throw Lb("badjsonp",a);if(d===b)throw Lb("badjsonp",b,a);});return a+=(-1===a.indexOf("?")?"?":"&")+b+"=JSON_CALLBACK"}var N=k("$http");a.paramSerializer=C(a.paramSerializer)?m.get(a.paramSerializer):a.paramSerializer;var v=[];r(d,function(a){v.unshift(C(a)?m.get(a):m.invoke(a))});var kc=Og(c);n.pendingRequests=[];(function(a){r(arguments,function(a){n[a]= 170function(b,c){return n(S({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){r(arguments,function(a){n[a]=function(b,c,d){return n(S({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");n.defaults=a;return n}]}function Wf(){this.$get=function(){return function(){return new z.XMLHttpRequest}}}function Vf(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(a,b,d,c){return Pg(a,c,a.defer,b,d[0])}]}function Pg(a,b,d,c,e){function f(a,b,d){a=a.replace("JSON_CALLBACK", 171b);var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m);f.removeEventListener("error",m);e.body.removeChild(f);f=null;var g=-1,s="unknown";a&&("load"!==a.type||c.wasCalled(b)||(a={type:"error"}),s=a.type,g="error"===a.type?404:200);d&&d(g,s)};f.addEventListener("load",m);f.addEventListener("error",m);e.body.appendChild(f);return m}return function(e,k,h,l,m,p,n,s,G,t){function N(a){J="timeout"===a;pa&&pa();y&&y.abort()}function v(a, 172b,c,e,f,g){w(P)&&d.cancel(P);pa=y=null;a(b,c,e,f,g)}k=k||a.url();if("jsonp"===K(e))var q=c.createCallback(k),pa=f(k,q,function(a,b){var d=200===a&&c.getResponse(q);v(l,a,d,"",b,"complete");c.removeCallback(q)});else{var y=b(e,k),J=!1;y.open(e,k,!0);r(m,function(a,b){w(a)&&y.setRequestHeader(b,a)});y.onload=function(){var a=y.statusText||"",b="response"in y?y.response:y.responseText,c=1223===y.status?204:y.status;0===c&&(c=b?200:"file"===ga(k).protocol?404:0);v(l,c,b,y.getAllResponseHeaders(),a,"complete")}; 173y.onerror=function(){v(l,-1,null,null,"","error")};y.ontimeout=function(){v(l,-1,null,null,"","timeout")};y.onabort=function(){v(l,-1,null,null,"",J?"timeout":"abort")};r(G,function(a,b){y.addEventListener(b,a)});r(t,function(a,b){y.upload.addEventListener(b,a)});n&&(y.withCredentials=!0);if(s)try{y.responseType=s}catch(I){if("json"!==s)throw I;}y.send(A(h)?null:h)}if(0<p)var P=d(function(){N("timeout")},p);else p&&B(p.then)&&p.then(function(){N(w(p.$$timeoutId)?"timeout":"abort")})}}function Pf(){var a= 174"{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler","$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(p,a).replace(n,b)}function k(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function h(f,h,n,p){function v(a){try{return a=n&&!r?e.getTrusted(n,a):e.valueOf(a),p&&!w(a)?a:jc(a)}catch(b){c(Ma.interr(f,b))}}var r=n===e.URL||n===e.MEDIA_URL;if(!f.length|| 175-1===f.indexOf(a)){if(h)return;h=g(f);r&&(h=e.getTrusted(n,h));h=ia(h);h.exp=f;h.expressions=[];h.$$watchDelegate=k;return h}p=!!p;for(var q,y,J=0,I=[],P,Q=f.length,M=[],L=[],u;J<Q;)if(-1!==(q=f.indexOf(a,J))&&-1!==(y=f.indexOf(b,q+l)))J!==q&&M.push(g(f.substring(J,q))),J=f.substring(q+l,y),I.push(J),J=y+m,L.push(M.length),M.push("");else{J!==Q&&M.push(g(f.substring(J)));break}u=1===M.length&&1===L.length;var R=r&&u?void 0:v;P=I.map(function(a){return d(a,R)});if(!h||I.length){var x=function(a){for(var b= 1760,c=I.length;b<c;b++){if(p&&A(a[b]))return;M[L[b]]=a[b]}if(r)return e.getTrusted(n,u?M[0]:M.join(""));n&&1<M.length&&Ma.throwNoconcat(f);return M.join("")};return S(function(a){var b=0,d=I.length,e=Array(d);try{for(;b<d;b++)e[b]=P[b](a);return x(e)}catch(g){c(Ma.interr(f,g))}},{exp:f,expressions:I,$$watchDelegate:function(a,b){var c;return a.$watchGroup(P,function(d,e){var f=x(d);b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=a.length,m=b.length,p=new RegExp(a.replace(/./g,f),"g"),n=new RegExp(b.replace(/./g, 177f),"g");h.startSymbol=function(){return a};h.endSymbol=function(){return b};return h}]}function Qf(){this.$get=["$$intervalFactory","$window",function(a,b){var d={},c=function(a){b.clearInterval(a);delete d[a]},e=a(function(a,c,e){a=b.setInterval(a,c);d[a]=e;return a},c);e.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$intervalId"))throw Qg("badprom");if(!d.hasOwnProperty(a.$$intervalId))return!1;a=a.$$intervalId;var b=d[a],e=b.promise;e.$$state&&(e.$$state.pur=!0);b.reject("canceled"); 178c(a);return!0};return e}]}function Rf(){this.$get=["$browser","$q","$$q","$rootScope",function(a,b,d,c){return function(e,f){return function(g,k,h,l){function m(){p?g.apply(null,n):g(s)}var p=4<arguments.length,n=p?Ha.call(arguments,4):[],s=0,G=w(l)&&!l,t=(G?d:b).defer(),r=t.promise;h=w(h)?h:0;r.$$intervalId=e(function(){G?a.defer(m):c.$evalAsync(m);t.notify(s++);0<h&&s>=h&&(t.resolve(s),f(r.$$intervalId));G||c.$apply()},k,t,G);return r}}}]}function Cd(a,b){var d=ga(a);b.$$protocol=d.protocol;b.$$host= 179d.hostname;b.$$port=fa(d.port)||Rg[d.protocol]||null}function Dd(a,b,d){if(Sg.test(a))throw kb("badpath",a);var c="/"!==a.charAt(0);c&&(a="/"+a);a=ga(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F"));d=c.join("/");b.$$path=d;b.$$search=hc(a.search);b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function yc(a,b){return a.slice(0, 180b.length)===b}function ya(a,b){if(yc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:a.substr(0,b)}function zc(a,b,d){this.$$html5=!0;d=d||"";Cd(a,this);this.$$parse=function(a){var d=ya(b,a);if(!C(d))throw kb("ipthprfx",a,b);Dd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$normalizeUrl=function(a){return b+a.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=ya(a,c))?(g=f,g=d&&w(f=ya(d,f))? 181b+(ya("/",f)||f):a+g):w(f=ya(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function Ac(a,b,d){Cd(a,this);this.$$parse=function(c){var e=ya(a,c)||ya(b,c),f;A(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",A(e)&&(a=c,this.replace())):(f=ya(d,e),A(f)&&(f=e));Dd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;yc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$normalizeUrl=function(b){return a+(b?d+b:"")};this.$$parseLinkUrl=function(b, 182d){return Da(a)===Da(b)?(this.$$parse(b),!0):!1}}function Ed(a,b,d){this.$$html5=!0;Ac.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===Da(c)?f=c:(g=ya(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$normalizeUrl=function(b){return a+d+b}}function Mb(a){return function(){return this[a]}}function Fd(a,b){return function(d){if(A(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Yf(){var a="!", 183b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):a};this.html5Mode=function(a){if(Ga(a))return b.enabled=a,this;if(D(a)){Ga(a.enabled)&&(b.enabled=a.enabled);Ga(a.requireBase)&&(b.requireBase=a.requireBase);if(Ga(a.rewriteLinks)||C(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d,c,e,f,g){function k(a,b){return a===b||ga(a).href===ga(b).href}function h(a, 184b,d){var e=m.url(),f=m.$$state;try{c.url(a,b,d),m.$$state=c.state()}catch(g){throw m.url(e),m.$$state=f,g;}}function l(a,b){d.$broadcast("$locationChangeSuccess",m.absUrl(),a,m.$$state,b)}var m,p;p=c.baseHref();var n=c.url(),s;if(b.enabled){if(!p&&b.requireBase)throw kb("nobase");s=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(p||"/");p=e.history?zc:Ed}else s=Da(n),p=Ac;var r=s.substr(0,Da(s).lastIndexOf("/")+1);m=new p(s,r,"#"+a);m.$$parseLinkUrl(n,n);m.$$state=c.state();var t=/^\s*(javascript|mailto):/i; 185f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var g=x(a.target);"a"!==ua(g[0]);)if(g[0]===f[0]||!(g=g.parent())[0])return;if(!C(e)||!A(g.attr(e))){var e=g.prop("href"),h=g.attr("href")||g.attr("xlink:href");D(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ga(e.animVal).href);t.test(e)||!e||g.attr("target")||a.isDefaultPrevented()||!m.$$parseLinkUrl(e,h)||(a.preventDefault(),m.absUrl()!==c.url()&&d.$apply())}}});m.absUrl()!== 186n&&c.url(m.absUrl(),!0);var N=!0;c.onUrlChange(function(a,b){yc(a,r)?(d.$evalAsync(function(){var c=m.absUrl(),e=m.$$state,f;m.$$parse(a);m.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;m.absUrl()===a&&(f?(m.$$parse(c),m.$$state=e,h(c,!1,e)):(N=!1,l(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(N||m.$$urlUpdatedByLocation){m.$$urlUpdatedByLocation=!1;var a=c.url(),b=m.absUrl(),f=c.state(),g=m.$$replace,n=!k(a,b)||m.$$html5&&e.history&&f!== 187m.$$state;if(N||n)N=!1,d.$evalAsync(function(){var b=m.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,m.$$state,f).defaultPrevented;m.absUrl()===b&&(c?(m.$$parse(a),m.$$state=f):(n&&h(b,g,f===m.$$state?null:m.$$state),l(a,f)))})}m.$$replace=!1});return m}]}function Zf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){dc(a)&&(a.stack&&f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&& 188(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||E;return function(){var a=[];r(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e,b,a)}}var f=wa||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Tg(a){return a+""}function Ug(a,b){return"undefined"!==typeof a?a: 189b}function Gd(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Vg(a,b){switch(a.type){case q.MemberExpression:if(a.computed)return!1;break;case q.UnaryExpression:return 1;case q.BinaryExpression:return"+"!==a.operator?1:!1;case q.CallExpression:return!1}return void 0===b?Hd:b}function Z(a,b,d){var c,e,f=a.isPure=Vg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){Z(a.expression,b,f);c=c&&a.expression.constant});a.constant=c;break;case q.Literal:a.constant=!0;a.toWatch= 190[];break;case q.UnaryExpression:Z(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:Z(a.test,b,f);Z(a.alternate,b,f);Z(a.consequent,b,f);a.constant=a.test.constant&& 191a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1;a.toWatch=[a];break;case q.MemberExpression:Z(a.object,b,f);a.computed&&Z(a.property,b,f);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case q.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];r(a.arguments,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case q.AssignmentExpression:Z(a.left, 192b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case q.ArrayExpression:c=!0;e=[];r(a.elements,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=e;break;case q.ObjectExpression:c=!0;e=[];r(a.properties,function(a){Z(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(Z(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e,a.key.toWatch))});a.constant=c;a.toWatch=e;break;case q.ThisExpression:a.constant= 193!1;a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Id(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Jd(a){return a.type===q.Identifier||a.type===q.MemberExpression}function Kd(a){if(1===a.body.length&&Jd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}}function Ld(a){this.$filter=a}function Md(a){this.$filter=a}function Nb(a,b,d){this.ast= 194new q(a,d);this.astCompiler=d.csp?new Md(b):new Ld(b)}function Bc(a){return B(a.valueOf)?a.valueOf():Wg.call(a)}function $f(){var a=T(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral=function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,f;switch(typeof b){case "string":return f=b=b.trim(),d=a[f],d||(d=new Ob(G),d=(new Nb(d,e,G)).parse(b),a[f]=p(d)),s(d,c);case "function":return s(b,c);default:return s(E, 195c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Bc(a),"object"!==typeof a||c)?a===b||a!==a&&b!==b:!1}function k(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Bc(b));return h},b,c,e)}for(var l=[],m=[],n=0,p=f.length;n<p;n++)l[n]=g,m[n]=null;return a.$watch(function(a){for(var b=!1,c=0,e=f.length;c<e;c++){var k=f[c](a);if(b||(b=!g(k,l[c],f[c].isPure)))m[c]=k,l[c]=k&&Bc(k)}b&& 196(h=d(a,void 0,void 0,m));return h},b,c,e)}function h(a,b,c,d,e){function f(){h(m)&&k()}function g(a,b,c,d){m=u&&d?d[0]:n(a,b,c,d);h(m)&&a.$$postDigest(f);return s(m)}var h=d.literal?l:w,k,m,n=d.$$intercepted||d,s=d.$$interceptor||Ta,u=d.inputs&&!n.inputs;g.literal=d.literal;g.constant=d.constant;g.inputs=d.inputs;p(g);return k=a.$watch(g,b,c,e)}function l(a){var b=!0;r(a,function(a){w(a)||(b=!1)});return b}function m(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function p(a){a.constant? 197a.$$watchDelegate=m:a.oneTime?a.$$watchDelegate=h:a.inputs&&(a.$$watchDelegate=k);return a}function n(a,b){function c(d){return b(a(d))}c.$stateful=a.$stateful||b.$stateful;c.$$pure=a.$$pure&&b.$$pure;return c}function s(a,b){if(!b)return a;a.$$interceptor&&(b=n(a.$$interceptor,b),a=a.$$intercepted);var c=!1,d=function(d,e,f,g){d=c&&g?g[0]:a(d,e,f,g);return b(d)};d.$$intercepted=a;d.$$interceptor=b;d.literal=a.literal;d.oneTime=a.oneTime;d.constant=a.constant;b.$stateful||(c=!a.inputs,d.inputs=a.inputs? 198a.inputs:[a],b.$$pure||(d.inputs=d.inputs.map(function(a){return a.isPure===Hd?function(b){return a(b)}:a})));return p(d)}var G={csp:Ba().noUnsafeEval,literals:Ia(b),isIdentifierStart:B(d)&&d,isIdentifierContinue:B(c)&&c};f.$$getAst=function(a){var b=new Ob(G);return(new Nb(b,e,G)).getAst(a).ast};return f}]}function bg(){var a=!0;this.$get=["$rootScope","$exceptionHandler",function(b,d){return Nd(function(a){b.$evalAsync(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this): 199a}}function cg(){var a=!0;this.$get=["$browser","$exceptionHandler",function(b,d){return Nd(function(a){b.defer(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Nd(a,b,d){function c(){return new e}function e(){var a=this.promise=new f;this.resolve=function(b){h(a,b)};this.reject=function(b){m(a,b)};this.notify=function(b){n(a,b)}}function f(){this.$$state={status:0}}function g(){for(;!w&&x.length;){var a=x.shift();if(!a.pur){a.pur=!0;var c=a.value,c="Possibly unhandled rejection: "+ 200("function"===typeof c?c.toString().replace(/ \{[\s\S]*$/,""):A(c)?"undefined":"string"!==typeof c?Ne(c,void 0):c);dc(a.value)?b(a.value,c):b(c)}}}function k(c){!d||c.pending||2!==c.status||c.pur||(0===w&&0===x.length&&a(g),x.push(c));!c.processScheduled&&c.pending&&(c.processScheduled=!0,++w,a(function(){var e,f,k;k=c.pending;c.processScheduled=!1;c.pending=void 0;try{for(var l=0,n=k.length;l<n;++l){c.pur=!0;f=k[l][0];e=k[l][c.status];try{B(e)?h(f,e(c.value)):1===c.status?h(f,c.value):m(f,c.value)}catch(p){m(f, 201p),p&&!0===p.$$passToExceptionHandler&&b(p)}}}finally{--w,d&&0===w&&a(g)}}))}function h(a,b){a.$$state.status||(b===a?p(a,v("qcycle",b)):l(a,b))}function l(a,b){function c(b){g||(g=!0,l(a,b))}function d(b){g||(g=!0,p(a,b))}function e(b){n(a,b)}var f,g=!1;try{if(D(b)||B(b))f=b.then;B(f)?(a.$$state.status=-1,f.call(b,c,d,e)):(a.$$state.value=b,a.$$state.status=1,k(a.$$state))}catch(h){d(h)}}function m(a,b){a.$$state.status||p(a,b)}function p(a,b){a.$$state.value=b;a.$$state.status=2;k(a.$$state)}function n(c, 202d){var e=c.$$state.pending;0>=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,f=0,g=e.length;f<g;f++){c=e[f][0];a=e[f][3];try{n(c,B(a)?a(d):d)}catch(h){b(h)}}})}function s(a){var b=new f;m(b,a);return b}function G(a,b,c){var d=null;try{B(c)&&(d=c())}catch(e){return s(e)}return d&&B(d.then)?d.then(function(){return b(a)},s):b(a)}function t(a,b,c,d){var e=new f;h(e,a);return e.then(b,c,d)}function q(a){if(!B(a))throw v("norslvr",a);var b=new f;a(function(a){h(b,a)},function(a){m(b,a)});return b} 203var v=F("$q",TypeError),w=0,x=[];S(f.prototype,{then:function(a,b,c){if(A(a)&&A(b)&&A(c))return this;var d=new f;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&k(this.$$state);return d},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return G(b,y,a)},function(b){return G(b,s,a)},b)}});var y=t;q.prototype=f.prototype;q.defer=c;q.reject=s;q.when=t;q.resolve=y;q.all=function(a){var b=new f,c= 2040,d=H(a)?[]:{};r(a,function(a,e){c++;t(a).then(function(a){d[e]=a;--c||h(b,d)},function(a){m(b,a)})});0===c&&h(b,d);return b};q.race=function(a){var b=c();r(a,function(a){t(a).then(b.resolve,b.reject)});return b.promise};return q}function mg(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}: 205function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function ag(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++qb;this.$$ChildScope=null;this.$$suspended=!1}b.prototype=a;return b}var b=10,d=F("$rootScope"),c=null,e=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$exceptionHandler","$parse","$browser", 206function(f,g,k){function h(a){a.currentScope.$$destroyed=!0}function l(a){9===wa&&(a.$$childHead&&l(a.$$childHead),a.$$nextSibling&&l(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function m(){this.$id=++qb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$suspended=this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount= 2070;this.$$isolateBindings=null}function p(a){if(v.$$phase)throw d("inprog",v.$$phase);v.$$phase=a}function n(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function s(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function G(){}function t(){for(;y.length;)try{y.shift()()}catch(a){f(a)}e=null}function q(){null===e&&(e=k.defer(function(){v.$apply(t)},null,"$applyAsync"))}m.prototype={constructor:m,$new:function(b,c){var d;c=c||this;b?(d=new m, 208d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!==this)&&d.$on("$destroy",h);return d},$watch:function(a,b,d,e){var f=g(a);b=B(b)?b:E;if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var h=this,k=h.$$watchers,l={fn:b,last:G,get:f,exp:e||a,eq:!!d};c=null;k||(k=h.$$watchers=[],k.$$digestWatchIndex=-1);k.unshift(l); 209k.$$digestWatchIndex++;n(this,1);return function(){var a=cb(k,l);0<=a&&(n(h,-1),a<k.$$digestWatchIndex&&k.$$digestWatchIndex--);c=null}},$watchGroup:function(a,b){function c(){h=!1;try{k?(k=!1,b(e,e,g)):b(e,d,g)}finally{for(var f=0;f<a.length;f++)d[f]=e[f]}}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});r(a,function(a, 210b){var d=g.$watch(a,function(a){e[b]=a;h||(h=!0,g.$evalAsync(c))});f.push(d)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!A(e)){if(D(e))if(za(e))for(f!==n&&(f=n,t=f.length=0,l++),a=e.length,t!==a&&(l++,f.length=t=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==p&&(f=p={},t=0,l++);a=0;for(b in e)ta.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(t++,f[b]=g,l++));if(t>a)for(b in l++, 211f)ta.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$$pure=g(a).literal;c.$stateful=!c.$$pure;var d=this,e,f,h,k=1<b.length,l=0,m=g(a,c),n=[],p={},s=!0,t=0;return this.$watch(m,function(){s?(s=!1,b(e,e,d)):b(e,h,d);if(k)if(D(e))if(za(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)ta.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var a,g,h,l,m,n,s,r=b,q,y=w.length?v:this,N=[],A,z;p("$digest");k.$$checkUrlChange();this===v&&null!==e&&(k.defer.cancel(e), 212t());c=null;do{s=!1;q=y;for(n=0;n<w.length;n++){try{z=w[n],l=z.fn,l(z.scope,z.locals)}catch(C){f(C)}c=null}w.length=0;a:do{if(n=!q.$$suspended&&q.$$watchers)for(n.$$digestWatchIndex=n.length;n.$$digestWatchIndex--;)try{if(a=n[n.$$digestWatchIndex])if(m=a.get,(g=m(q))!==(h=a.last)&&!(a.eq?va(g,h):Y(g)&&Y(h)))s=!0,c=a,a.last=a.eq?Ia(g,null):g,l=a.fn,l(g,h===G?g:h,q),5>r&&(A=4-r,N[A]||(N[A]=[]),N[A].push({msg:B(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:h}));else if(a===c){s= 213!1;break a}}catch(E){f(E)}if(!(n=!q.$$suspended&&q.$$watchersCount&&q.$$childHead||q!==y&&q.$$nextSibling))for(;q!==y&&!(n=q.$$nextSibling);)q=q.$parent}while(q=n);if((s||w.length)&&!r--)throw v.$$phase=null,d("infdig",b,N);}while(s||w.length);for(v.$$phase=null;J<x.length;)try{x[J++]()}catch(D){f(D)}x.length=J=0;k.$$checkUrlChange()},$suspend:function(){this.$$suspended=!0},$isSuspended:function(){return this.$$suspended},$resume:function(){this.$$suspended=!1},$destroy:function(){if(!this.$$destroyed){var a= 214this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===v&&k.$$applicationDestroyed();n(this,-this.$$watchersCount);for(var b in this.$$listenerCount)s(this,this.$$listenerCount[b],b);a&&a.$$childHead===this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail===this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply= 215this.$evalAsync=this.$applyAsync=E;this.$on=this.$watch=this.$watchGroup=function(){return E};this.$$listeners={};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){v.$$phase||w.length||k.defer(function(){w.length&&v.$digest()},null,"$evalAsync");w.push({scope:this,fn:g(a),locals:b})},$$postDigest:function(a){x.push(a)},$apply:function(a){try{p("$apply");try{return this.$eval(a)}finally{v.$$phase=null}}catch(b){f(b)}finally{try{v.$digest()}catch(c){throw f(c), 216c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&y.push(b);a=g(a);q()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(delete c[d],s(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented= 217!0},defaultPrevented:!1},k=db([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(n){f(n)}else d.splice(l,1),l--,m--;if(g)break;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var g=db([e],arguments,1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]|| 218[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){f(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var v=new m,w=v.$$asyncQueue=[],x=v.$$postDigestQueue=[],y=v.$$applyAsyncQueue=[],J=0;return v}]}function Qe(){var a=/^\s*(https?|s?ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationTrustedUrlList=function(b){return w(b)? 219(a=b,this):a};this.imgSrcSanitizationTrustedUrlList=function(a){return w(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f=ga(d&&d.trim()).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function Xg(a){if("self"===a)return a;if(C(a)){if(-1<a.indexOf("***"))throw Ea("iwcard",a);a=Od(a).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*");return new RegExp("^"+a+"$")}if(ab(a))return new RegExp("^"+a.source+"$");throw Ea("imatcher");}function Pd(a){var b=[];w(a)&&r(a,function(a){b.push(Xg(a))}); 220return b}function eg(){this.SCE_CONTEXTS=W;var a=["self"],b=[];this.trustedResourceUrlList=function(b){arguments.length&&(a=Pd(b));return a};Object.defineProperty(this,"resourceUrlWhitelist",{get:function(){return this.trustedResourceUrlList},set:function(a){this.trustedResourceUrlList=a}});this.bannedResourceUrlList=function(a){arguments.length&&(b=Pd(a));return b};Object.defineProperty(this,"resourceUrlBlacklist",{get:function(){return this.bannedResourceUrlList},set:function(a){this.bannedResourceUrlList= 221a}});this.$get=["$injector","$$sanitizeUri",function(d,c){function e(a,b){var c;"self"===a?(c=Cc(b,Qd))||(z.document.baseURI?c=z.document.baseURI:(Na||(Na=z.document.createElement("a"),Na.href=".",Na=Na.cloneNode(!1)),c=Na.href),c=Cc(b,c)):c=!!a.exec(b.href);return c}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()}; 222return b}var g=function(a){throw Ea("unsafe");};d.has("$sanitize")&&(g=d.get("$sanitize"));var k=f(),h={};h[W.HTML]=f(k);h[W.CSS]=f(k);h[W.MEDIA_URL]=f(k);h[W.URL]=f(h[W.MEDIA_URL]);h[W.JS]=f(k);h[W.RESOURCE_URL]=f(h[W.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw Ea("icontext",a,b);if(null===b||A(b)||""===b)return b;if("string"!==typeof b)throw Ea("itype",a);return new c(b)},getTrusted:function(d,f){if(null===f||A(f)||""===f)return f;var k=h.hasOwnProperty(d)? 223h[d]:null;if(k&&f instanceof k)return f.$$unwrapTrustedValue();B(f.$$unwrapTrustedValue)&&(f=f.$$unwrapTrustedValue());if(d===W.MEDIA_URL||d===W.URL)return c(f.toString(),d===W.MEDIA_URL);if(d===W.RESOURCE_URL){var k=ga(f.toString()),n,s,r=!1;n=0;for(s=a.length;n<s;n++)if(e(a[n],k)){r=!0;break}if(r)for(n=0,s=b.length;n<s;n++)if(e(b[n],k)){r=!1;break}if(r)return f;throw Ea("insecurl",f.toString());}if(d===W.HTML)return g(f);throw Ea("unsafe");},valueOf:function(a){return a instanceof k?a.$$unwrapTrustedValue(): 224a}}}]}function dg(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>wa)throw Ea("iequirks");var c=ja(W);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ta);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;r(W, 225function(a,b){var d=K(b);c[("parse_as_"+d).replace(Dc,xb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Dc,xb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Dc,xb)]=function(b){return g(a,b)}});return c}]}function fg(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=fa((/android (\d+)/.exec(K((a.navigator||{}).userAgent))|| 226[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},k=g.body&&g.body.style,h=!1,l=!1;k&&(h=!!("transition"in k||"webkitTransition"in k),l=!!("animation"in k||"webkitAnimation"in k));return{history:!(!c||4>e||f),hasEvent:function(a){if("input"===a&&wa)return!1;if(A(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),transitions:h,animations:l,android:e}}]}function gg(){this.$get=ia(function(a){return new Yg(a)})}function Yg(a){function b(){var a=e.pop();return a&& 227a.cb}function d(a){for(var b=e.length-1;0<=b;--b){var c=e[b];if(c.type===a)return e.splice(b,1),c.cb}}var c={},e=[],f=this.ALL_TASKS_TYPE="$$all$$",g=this.DEFAULT_TASK_TYPE="$$default$$";this.completeTask=function(e,h){h=h||g;try{e()}finally{var l;l=h||g;c[l]&&(c[l]--,c[f]--);l=c[h];var m=c[f];if(!m||!l)for(l=m?d:b;m=l(h);)try{m()}catch(p){a.error(p)}}};this.incTaskCount=function(a){a=a||g;c[a]=(c[a]||0)+1;c[f]=(c[f]||0)+1};this.notifyWhenNoPendingTasks=function(a,b){b=b||f;c[b]?e.push({type:b,cb:a}): 228a()}}function ig(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(k,h){g.totalPendingRequests++;if(!C(k)||A(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;H(l)?l=l.filter(function(a){return a!==wc}):l===wc&&(l=null);return c.get(k,S({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){return d.put(k,a.data)}, 229function(a){h||(a=Zg("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function jg(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];r(a,function(a){var c=ca.element(a).data("$binding");c&&r(c,function(c){d?(new RegExp("(^|\\s)"+Od(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-", 230"data-ng-","ng\\:"],k=0;k<g.length;++k){var h=a.querySelectorAll("["+g[k]+"model"+(d?"=":"*=")+'"'+b+'"]');if(h.length)return h}},getLocation:function(){return d.url()},setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function kg(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,h,l){B(f)||(l=h,h=f,f=E);var m=Ha.call(arguments,3),p=w(l)&&!l,n=(p?c:d).defer(),s=n.promise,r; 231r=b.defer(function(){try{n.resolve(f.apply(null,m))}catch(b){n.reject(b),e(b)}finally{delete g[s.$$timeoutId]}p||a.$apply()},h,"$timeout");s.$$timeoutId=r;g[r]=n;return s}var g={};f.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$timeoutId"))throw $g("badprom");if(!g.hasOwnProperty(a.$$timeoutId))return!1;a=a.$$timeoutId;var c=g[a],d=c.promise;d.$$state&&(d.$$state.pur=!0);c.reject("canceled");delete g[a];return b.defer.cancel(a)};return f}]}function ga(a){if(!C(a))return a;wa&&(aa.setAttribute("href", 232a),a=aa.href);aa.setAttribute("href",a);a=aa.hostname;!ah&&-1<a.indexOf(":")&&(a="["+a+"]");return{href:aa.href,protocol:aa.protocol?aa.protocol.replace(/:$/,""):"",host:aa.host,search:aa.search?aa.search.replace(/^\?/,""):"",hash:aa.hash?aa.hash.replace(/^#/,""):"",hostname:a,port:aa.port,pathname:"/"===aa.pathname.charAt(0)?aa.pathname:"/"+aa.pathname}}function Og(a){var b=[Qd].concat(a.map(ga));return function(a){a=ga(a);return b.some(Cc.bind(null,a))}}function Cc(a,b){a=ga(a);b=ga(b);return a.protocol=== 233b.protocol&&a.host===b.host}function lg(){this.$get=ia(z)}function Rd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,k,h,l;try{a=d.cookie||""}catch(m){a=""}if(a!==e)for(e=a,a=e.split("; "),c={},k=0;k<a.length;k++)g=a[k],h=g.indexOf("="),0<h&&(l=b(g.substring(0,h)),A(c[l])&&(c[l]=b(g.substring(h+1))));return c}}function pg(){this.$get=Rd}function fd(a){function b(d,c){if(D(d)){var e={};r(d,function(a,c){e[c]=b(c,a)});return e}return a.factory(d+ 234"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",Sd);b("date",Td);b("filter",bh);b("json",ch);b("limitTo",dh);b("lowercase",eh);b("number",Ud);b("orderBy",Vd);b("uppercase",fh)}function bh(){return function(a,b,d,c){if(!za(a)){if(null==a)return a;throw F("filter")("notarray",a);}c=c||"$";var e;switch(Ec(b)){case "function":break;case "boolean":case "null":case "number":case "string":e=!0;case "object":b=gh(b,d,c,e);break;default:return a}return Array.prototype.filter.call(a, 235b)}}function gh(a,b,d,c){var e=D(a)&&d in a;!0===b?b=va:B(b)||(b=function(a,b){if(A(a))return!1;if(null===a||null===b)return a===b;if(D(b)||D(a)&&!cc(a))return!1;a=K(""+a);b=K(""+b);return-1!==a.indexOf(b)});return function(f){return e&&!D(f)?Fa(f,a[d],b,d,!1):Fa(f,a,b,d,c)}}function Fa(a,b,d,c,e,f){var g=Ec(a),k=Ec(b);if("string"===k&&"!"===b.charAt(0))return!Fa(a,b.substring(1),d,c,e);if(H(a))return a.some(function(a){return Fa(a,b,d,c,e)});switch(g){case "object":var h;if(e){for(h in a)if(h.charAt&& 236"$"!==h.charAt(0)&&Fa(a[h],b,d,c,!0))return!0;return f?!1:Fa(a,b,d,c,!1)}if("object"===k){for(h in b)if(f=b[h],!B(f)&&!A(f)&&(g=h===c,!Fa(g?a:a[h],f,d,c,g,g)))return!1;return!0}return d(a,b);case "function":return!1;default:return d(a,b)}}function Ec(a){return null===a?"null":typeof a}function Sd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){A(c)&&(c=b.CURRENCY_SYM);A(e)&&(e=b.PATTERNS[1].maxFrac);var f=c?/\u00A4/g:/\s*\u00A4\s*/g;return null==a?a:Wd(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,e).replace(f, 237c)}}function Ud(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Wd(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function hh(a){var b=0,d,c,e,f,g;-1<(c=a.indexOf(Xd))&&(a=a.replace(Xd,""));0<(e=a.search(/e/i))?(0>c&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Fc;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Fc;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Yd&&(d=d.splice(0,Yd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function ih(a, 238b,d,c){var e=a.d,f=e.length-a.i;b=A(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0<d){e.splice(Math.max(a.i,d));for(var g=d;g<e.length;g++)e[g]=0}else for(f=Math.max(0,f),a.i=1,e.length=Math.max(1,d=b+1),e[0]=0,g=1;g<d;g++)e[g]=0;if(5<=c)if(0>d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;f<Math.max(0,b);f++)e.push(0);if(b=e.reduceRight(function(a,b,c,d){b+=a;d[c]=b%10;return Math.floor(b/10)},0))e.unshift(b),a.i++}function Wd(a,b,d,c,e){if(!C(a)&&!X(a)||isNaN(a))return""; 239var f=!isFinite(a),g=!1,k=Math.abs(a)+"",h="";if(f)h="\u221e";else{g=hh(k);ih(g,e,b.minFrac,b.maxFrac);h=g.d;k=g.i;e=g.e;f=[];for(g=h.reduce(function(a,b){return a&&!b},!0);0>k;)h.unshift(0),k++;0<k?f=h.splice(k,h.length):(f=h,h=[0]);k=[];for(h.length>=b.lgSize&&k.unshift(h.splice(-b.lgSize,h.length).join(""));h.length>b.gSize;)k.unshift(h.splice(-b.gSize,h.length).join(""));h.length&&k.unshift(h.join(""));h=k.join(d);f.length&&(h+=c+f.join(""));e&&(h+="e+"+e)}return 0>a&&!g?b.negPre+h+b.negSuf:b.posPre+ 240h+b.posSuf}function Pb(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length<b;)a=Fc+a;d&&(a=a.substr(a.length-b));return e+a}function ea(a,b,d,c,e){d=d||0;return function(f){f=f["get"+a]();if(0<d||f>-d)f+=d;0===f&&-12===d&&(f=12);return Pb(f,b,c,e)}}function lb(a,b,d){return function(c,e){var f=c["get"+a](),g=vb((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Zd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function $d(a){return function(b){var d= 241Zd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Pb(b,a)}}function Gc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Td(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:a.setFullYear,h=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=fa(b[9]+b[10]),g=fa(b[9]+b[11]));k.call(a,fa(b[1]),fa(b[2])-1,fa(b[3]));f=fa(b[4]||0)-f;g=fa(b[5]||0)-g;k=fa(b[6]||0);b=Math.round(1E3*parseFloat("0."+ 242(b[7]||0)));h.call(a,f,g,k,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;C(c)&&(c=jh.test(c)?fa(c):b(c));X(c)&&(c=new Date(c));if(!ha(c)||!isFinite(c.getTime()))return c;for(;d;)(l=kh.exec(d))?(k=db(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=fc(f,m),c=gc(c,f,!0));r(k,function(b){h=lh[b];g+=h?h(c,a.DATETIME_FORMATS, 243m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function ch(){return function(a,b){A(b)&&(b=2);return eb(a,b)}}function dh(){return function(a,b,d){b=Infinity===Math.abs(Number(b))?Number(b):fa(b);if(Y(b))return a;X(a)&&(a=a.toString());if(!za(a))return a;d=!d||isNaN(d)?0:fa(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Hc(a,d,d+b):0===d?Hc(a,b,a.length):Hc(a,Math.max(0,d+b),d)}}function Hc(a,b,d){return C(a)?a.slice(b,d):Ha.call(a,b,d)}function Vd(a){function b(b){return b.map(function(b){var c= 2441,d=Ta;if(B(b))d=b;else if(C(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e=d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,h=b.type;if(d===h){var h=a.value,l=b.value;"string"===d?(h=h.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(h)&&(h=a.index),D(l)&&(l=b.index));h!==l&&(c= 245h<l?-1:1)}else c="undefined"===d?1:"undefined"===h?-1:"null"===d?1:"null"===h?-1:d<h?-1:1;return c}return function(a,f,g,k){if(null==a)return a;if(!za(a))throw F("orderBy")("notarray",a);H(f)||(f=[f]);0===f.length&&(f=["+"]);var h=b(f),l=g?-1:1,m=B(k)?k:c;a=Array.prototype.map.call(a,function(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:h.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="null";else if("object"===c)a:{if(B(e.valueOf)&&(e=e.valueOf(),d(e)))break a; 246cc(e)&&(e=e.toString(),d(e))}return{value:e,type:c,index:b}})}});a.sort(function(a,b){for(var d=0,e=h.length;d<e;d++){var f=m(a.predicateValues[d],b.predicateValues[d]);if(f)return f*h[d].descending*l}return(m(a.tieBreaker,b.tieBreaker)||c(a.tieBreaker,b.tieBreaker))*l});return a=a.map(function(a){return a.value})}}function Ra(a){B(a)&&(a={link:a});a.restrict=a.restrict||"AC";return ia(a)}function Qb(a,b,d,c,e){this.$$controls=[];this.$error={};this.$$success={};this.$pending=void 0;this.$name=e(b.name|| 247b.ngForm||"")(d);this.$dirty=!1;this.$valid=this.$pristine=!0;this.$submitted=this.$invalid=!1;this.$$parentForm=mb;this.$$element=a;this.$$animate=c;ae(this)}function ae(a){a.$$classCache={};a.$$classCache[be]=!(a.$$classCache[nb]=a.$$element.hasClass(nb))}function ce(a){function b(a,b,c){c&&!a.$$classCache[b]?(a.$$animate.addClass(a.$$element,b),a.$$classCache[b]=!0):!c&&a.$$classCache[b]&&(a.$$animate.removeClass(a.$$element,b),a.$$classCache[b]=!1)}function d(a,c,d){c=c?"-"+Xc(c,"-"):"";b(a,nb+ 248c,!0===d);b(a,be+c,!1===d)}var c=a.set,e=a.unset;a.clazz.prototype.$setValidity=function(a,g,k){A(g)?(this.$pending||(this.$pending={}),c(this.$pending,a,k)):(this.$pending&&e(this.$pending,a,k),de(this.$pending)&&(this.$pending=void 0));Ga(g)?g?(e(this.$error,a,k),c(this.$$success,a,k)):(c(this.$error,a,k),e(this.$$success,a,k)):(e(this.$error,a,k),e(this.$$success,a,k));this.$pending?(b(this,"ng-pending",!0),this.$valid=this.$invalid=void 0,d(this,"",null)):(b(this,"ng-pending",!1),this.$valid= 249de(this.$error),this.$invalid=!this.$valid,d(this,"",this.$valid));g=this.$pending&&this.$pending[a]?void 0:this.$error[a]?!1:this.$$success[a]?!0:null;d(this,a,g);this.$$parentForm.$setValidity(a,g,this)}}function de(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Ic(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function Sa(a,b,d,c,e,f){var g=K(b[0].type);if(!e.android){var k=!1;b.on("compositionstart",function(){k=!0});b.on("compositionupdate", 250function(a){if(A(a.data)||""===a.data)k=!1});b.on("compositionend",function(){k=!1;l()})}var h,l=function(a){h&&(f.defer.cancel(h),h=null);if(!k){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&"false"===d.ngTrim||(e=V(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",l);else{var m=function(a,b,c){h||(h=f.defer(function(){h=null;b&&b.value===c||l(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b|| 251m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(ee[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity,c=b.badInput,d=b.typeMismatch;h=f.defer(function(){h=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Rb(a,b){return function(d,c){var e,f;if(ha(d))return d;if(C(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length- 2521)&&(d=d.substring(1,d.length-1));if(mh.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),e=new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0),100>f.yyyy&&e.setFullYear(f.yyyy),e}return NaN}}function ob(a,b,d,c){return function(e,f,g,k,h,l,m, 253p){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function s(a){return w(a)&&!ha(a)?r(a)||void 0:a}function r(a,b){var c=k.$options.getOption("timezone");v&&v!==c&&(b=Uc(b,fc(v)));var e=d(a,b);!isNaN(e)&&c&&(e=gc(e,c));return e}Jc(e,f,g,k,a);Sa(e,f,g,k,h,l);var t="time"===a||"datetimelocal"===a,q,v;k.$parsers.push(function(c){if(k.$isEmpty(c))return null;if(b.test(c))return r(c,q);k.$$parserName=a});k.$formatters.push(function(a){if(a&&!ha(a))throw pb("datefmt",a);if(n(a)){q=a;var b= 254k.$options.getOption("timezone");b&&(v=b,q=gc(q,b,!0));var d=c;t&&C(k.$options.getOption("timeSecondsFormat"))&&(d=c.replace("ss.sss",k.$options.getOption("timeSecondsFormat")).replace(/:$/,""));a=m("date")(a,d,b);t&&k.$options.getOption("timeStripZeroSeconds")&&(a=a.replace(/(?::00)?(?:\.000)?$/,""));return a}v=q=null;return""});if(w(g.min)||g.ngMin){var x=g.min||p(g.ngMin)(e),z=s(x);k.$validators.min=function(a){return!n(a)||A(z)||d(a)>=z};g.$observe("min",function(a){a!==x&&(z=s(a),x=a,k.$validate())})}if(w(g.max)|| 255g.ngMax){var y=g.max||p(g.ngMax)(e),J=s(y);k.$validators.max=function(a){return!n(a)||A(J)||d(a)<=J};g.$observe("max",function(a){a!==y&&(J=s(a),y=a,k.$validate())})}}}function Jc(a,b,d,c,e){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var d=b.prop("validity")||{};if(d.badInput||d.typeMismatch)c.$$parserName=e;else return a})}function fe(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(nh.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!X(b))throw pb("numfmt", 256b);b=b.toString()}return b})}function na(a){w(a)&&!X(a)&&(a=parseFloat(a));return Y(a)?void 0:a}function Kc(a){var b=a.toString(),d=b.indexOf(".");return-1===d?-1<a&&1>a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ge(a,b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Kc(a):0,k=e?Kc(b):0,h=f?Kc(d):0,g=Math.max(g,k,h),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function he(a,b,d,c,e){if(w(c)){a= 257a(c);if(!a.constant)throw pb("constexpr",d,c);return a(b)}return e}function Lc(a,b){function d(a,b){if(!a||!a.length)return[];if(!b||!b.length)return a;var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e===b[m])continue a;c.push(e)}return c}function c(a){if(!a)return a;var b=a;H(a)?b=a.map(c).join(" "):D(a)?b=Object.keys(a).filter(function(b){return a[b]}).join(" "):C(a)||(b=a+"");return b}a="ngClass"+a;var e;return["$parse",function(f){return{restrict:"AC",link:function(g, 258k,h){function l(a,b){var c=[];r(a,function(a){if(0<b||p[a])p[a]=(p[a]||0)+b,p[a]===+(0<b)&&c.push(a)});return c.join(" ")}function m(a){if(a===b){var c=s,c=l(c&&c.split(" "),1);h.$addClass(c)}else c=s,c=l(c&&c.split(" "),-1),h.$removeClass(c);n=a}var p=k.data("$classCounts"),n=!0,s;p||(p=T(),k.data("$classCounts",p));"ngClass"!==a&&(e||(e=f("$index",function(a){return a&1})),g.$watch(e,m));g.$watch(f(h[a],c),function(a){if(n===b){var c=s&&s.split(" "),e=a&&a.split(" "),f=d(c,e),c=d(e,c),f=l(f,-1), 259c=l(c,1);h.$addClass(c);h.$removeClass(f)}s=a})}}}]}function sd(a,b,d,c,e,f){return{restrict:"A",compile:function(g,k){var h=a(k[c]);return function(a,c){c.on(e,function(c){var e=function(){h(a,{$event:c})};if(b.$$phase)if(f)a.$evalAsync(e);else try{e()}catch(g){d(g)}else a.$apply(e)})}}}}function Sb(a,b,d,c,e,f,g,k,h){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners= 260[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=void 0;this.$name=h(d.name||"",!1)(a);this.$$parentForm=mb;this.$options=Tb;this.$$updateEvents="";this.$$updateEventHandler=this.$$updateEventHandler.bind(this);this.$$parsedNgModel=e(d.ngModel);this.$$parsedNgModelAssign=this.$$parsedNgModel.assign;this.$$ngModelGet=this.$$parsedNgModel;this.$$ngModelSet=this.$$parsedNgModelAssign;this.$$pendingDebounce= 261null;this.$$parserValid=void 0;this.$$parserName="parse";this.$$currentValidationRunId=0;this.$$scope=a;this.$$rootScope=a.$root;this.$$attr=d;this.$$element=c;this.$$animate=f;this.$$timeout=g;this.$$parse=e;this.$$q=k;this.$$exceptionHandler=b;ae(this);oh(this)}function oh(a){a.$$scope.$watch(function(b){b=a.$$ngModelGet(b);b===a.$modelValue||a.$modelValue!==a.$modelValue&&b!==b||a.$$setModelValue(b);return b})}function Mc(a){this.$$options=a}function ie(a,b){r(b,function(b,c){w(a[c])||(a[c]=b)})} 262function Oa(a,b){a.prop("selected",b);a.attr("selected",b)}function je(a,b,d){if(a){C(a)&&(a=new RegExp("^"+a+"$"));if(!a.test)throw F("ngPattern")("noregexp",b,a,Aa(d));return a}}function Ub(a){a=fa(a);return Y(a)?-1:a}var Xb={objectMaxDepth:5,urlErrorParamsEnabled:!0},ke=/^\/(.+)\/([a-z]*)$/,ta=Object.prototype.hasOwnProperty,K=function(a){return C(a)?a.toLowerCase():a},vb=function(a){return C(a)?a.toUpperCase():a},wa,x,sb,Ha=[].slice,Kg=[].splice,ph=[].push,la=Object.prototype.toString,Rc=Object.getPrototypeOf, 263oa=F("ng"),ca=z.angular||(z.angular={}),lc,qb=0;wa=z.document.documentMode;var Y=Number.isNaN||function(a){return a!==a};E.$inject=[];Ta.$inject=[];var ze=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,V=function(a){return C(a)?a.trim():a},Od=function(a){return a.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Ba=function(){if(!w(Ba.rules)){var a=z.document.querySelector("[ng-csp]")||z.document.querySelector("[data-ng-csp]");if(a){var b= 264a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Ba.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=Ba;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Ba.rules},rb=function(){if(w(rb.name_))return rb.name_;var a,b,d=Qa.length,c,e;for(b=0;b<d;++b)if(c=Qa[b],a=z.document.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return rb.name_=e},Be=/:/g,Qa=["ng-", 265"data-ng-","ng:","x-ng-"],Fe=function(a){var b=a.currentScript;if(!b)return!0;if(!(b instanceof z.HTMLScriptElement||b instanceof z.SVGScriptElement))return!1;b=b.attributes;return[b.getNamedItem("src"),b.getNamedItem("href"),b.getNamedItem("xlink:href")].every(function(b){if(!b)return!0;if(!b.value)return!1;var c=a.createElement("a");c.href=b.value;if(a.location.origin===c.origin)return!0;switch(c.protocol){case "http:":case "https:":case "ftp:":case "blob:":case "file:":case "data:":return!0;default:return!1}})}(z.document), 266Ie=/[A-Z]/g,Yc=!1,Pa=3,Pe={full:"1.8.
2662",major:1,minor:8,dot:2,codeName:"meteoric-mining
vendor: 74,290 bytes, lines 266-411
266"};U.expando="ng339";var Ka=U.cache={},ug=1;U._data=function(a){return this.cache[a[this.expando]]||{}};var qg=/-([a-z])/g,qh=/^-ms-/,Bb={mouseleave:"mouseout",mouseenter:"mouseover"},oc=F("jqLite"),tg=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,nc=/<|&#?\w+;/,rg=/<([\w:-]+)/,sg=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,qa={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr", 267"tbody","table"]};qa.tbody=qa.tfoot=qa.colgroup=qa.caption=qa.thead;qa.th=qa.td;var hb={option:[1,'<select multiple="multiple">',"</select>"],_default:[0,"",""]},Nc;for(Nc in qa){var le=qa[Nc],me=le.slice().reverse();hb[Nc]=[me.length,"<"+me.join("><")+">","</"+le.join("></")+">"]}hb.optgroup=hb.option;var zg=z.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Wa=U.prototype={ready:hd,toString:function(){var a=[];r(this,function(b){a.push(""+b)});return"["+a.join(", ")+ 268"]"},eq:function(a){return 0<=a?x(this[a]):x(this[this.length+a])},length:0,push:ph,sort:[].sort,splice:[].splice},Hb={};r("multiple selected checked disabled readOnly required open".split(" "),function(a){Hb[K(a)]=a});var od={};r("input select option textarea button form details".split(" "),function(a){od[a]=!0});var vd={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:sc,removeData:rc,hasData:function(a){for(var b in Ka[a.ng339])return!0; 269return!1},cleanData:function(a){for(var b=0,d=a.length;b<d;b++)rc(a[b]),kd(a[b])}},function(a,b){U[b]=a});r({data:sc,inheritedData:Fb,scope:function(a){return x.data(a,"$scope")||Fb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return x.data(a,"$isolateScope")||x.data(a,"$isolateScopeNoTemplate")},controller:ld,injector:function(a){return Fb(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Cb,css:function(a,b,d){b=yb(b.replace(qh,"ms-"));if(w(d))a.style[b]= 270d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Pa&&2!==c&&8!==c&&a.getAttribute){var c=K(b),e=Hb[c];if(w(d))null===d||!1===d&&e?a.removeAttribute(b):a.setAttribute(b,e?c:d);else return a=a.getAttribute(b),e&&null!==a&&(a=c),null===a?void 0:a}},prop:function(a,b,d){if(w(d))a[b]=d;else return a[b]},text:function(){function a(a,d){if(A(d)){var c=a.nodeType;return 1===c||c===Pa?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(A(b)){if(a.multiple&&"select"=== 271ua(a)){var d=[];r(a.options,function(a){a.selected&&d.push(a.value||a.text)});return d}return a.value}a.value=b},html:function(a,b){if(A(b))return a.innerHTML;zb(a,!0);a.innerHTML=b},empty:md},function(a,b){U.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==md&&A(2===a.length&&a!==Cb&&a!==ld?b:c)){if(D(b)){for(e=0;e<g;e++)if(a===sc)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=A(e)?Math.min(g,1):g;for(f=0;f<g;f++){var k=a(this[f],b,c);e=e?e+k:k}return e}for(e=0;e<g;e++)a(this[e], 272b,c);return this}});r({removeData:rc,on:function(a,b,d,c){if(w(c))throw oc("onargs");if(mc(a)){c=Ab(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=wg(a,e));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,k=function(b,c,g){var k=e[b];k||(k=e[b]=[],k.specialHandlerWrapper=c,"$destroy"===b||g||a.addEventListener(b,f));k.push(d)};g--;)b=c[g],Bb[b]?(k(Bb[b],yg),k(b,void 0,!0)):k(b)}},off:kd,one:function(a,b,d){a=x(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a, 273b){var d,c=a.parentNode;zb(a);r(new U(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];r(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=a.nodeType;if(1===d||11===d){b=new U(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;r(new U(b),function(b){a.insertBefore(b,d)})}}, 274wrap:function(a,b){var d=x(b).eq(0).clone()[0],c=a.parentNode;c&&c.replaceChild(d,a);d.appendChild(a)},remove:Gb,detach:function(a){Gb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;if(c){b=new U(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}}},addClass:Eb,removeClass:Db,toggleClass:function(a,b,d){b&&r(b.split(" "),function(b){var e=d;A(e)&&(e=!Cb(a,b));(e?Eb:Db)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling}, 275find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:qc,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=Ab(a);if(g=(g=g&&g.events)&&g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:E,type:f,target:a},b.type&&(c=S(c, 276b)),b=ja(g),e=d?[c].concat(d):[c],r(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){U.prototype[b]=function(b,c,e){for(var f,g=0,k=this.length;g<k;g++)A(f)?(f=a(this[g],b,c,e),w(f)&&(f=x(f))):pc(f,a(this[g],b,c,e));return w(f)?f:this}});U.prototype.bind=U.prototype.on;U.prototype.unbind=U.prototype.off;var rh=Object.create(null);pd.prototype={_idx:function(a){a!==this._lastKey&&(this._lastKey=a,this._lastIndex=this._keys.indexOf(a));return this._lastIndex},_transformKey:function(a){return Y(a)? 277rh:a},get:function(a){a=this._transformKey(a);a=this._idx(a);if(-1!==a)return this._values[a]},has:function(a){a=this._transformKey(a);return-1!==this._idx(a)},set:function(a,b){a=this._transformKey(a);var d=this._idx(a);-1===d&&(d=this._lastIndex=this._keys.length);this._keys[d]=a;this._values[d]=b},delete:function(a){a=this._transformKey(a);a=this._idx(a);if(-1===a)return!1;this._keys.splice(a,1);this._values.splice(a,1);this._lastKey=NaN;this._lastIndex=-1;return!0}};var Ib=pd,og=[function(){this.$get= 278[function(){return Ib}]}],Bg=/^([^(]+?)=>/,Cg=/^[^(]*\(\s*([^)]*)\)/m,sh=/,/,th=/^\s*(_?)(\S+?)\1\s*$/,Ag=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ca=F("$injector");fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw C(d)&&d||(d=a.name||Dg(a)),Ca("strictdi",d);b=qd(a);r(b[1].split(sh),function(a){a.replace(th,function(a,b,d){c.push(d)})})}a.$inject=c}}else H(a)?(b=a.length-1,tb(a[b],"fn"),c=a.slice(0,b)):tb(a,"fn",!0);return c};var ne=F("$animate"), 279Ef=function(){this.$get=E},Ff=function(){var a=new Ib,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=C(b)?b.split(" "):H(b)?b:[],r(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){r(b,function(b){var c=a.get(b);if(c){var d=Eg(b.attr("class")),e="",f="";r(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});r(b,function(a){e&&Eb(a,e);f&&Db(a,f)});a.delete(b)}});b.length=0}return{enabled:E,on:E,off:E,pin:E,push:function(g, 280k,h,l){l&&l();h=h||{};h.from&&g.css(h.from);h.to&&g.css(h.to);if(h.addClass||h.removeClass)if(k=h.addClass,l=h.removeClass,h=a.get(g)||{},k=e(h,k,!0),l=e(h,l,!1),k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},Cf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw ne("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]=g;a.factory(g, 281d)};this.customFilter=function(a){1===arguments.length&&(c=B(a)?a:null);return c};this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp?a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,ne("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){e=f;break a}}e=void 0}!e||e.parentNode||e.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on, 282off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.cancel&&a.cancel()},enter:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"enter",ra(l))},move:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"move",ra(l))},leave:function(b,c){return a.push(b,"leave",ra(c),function(){b.remove()})},addClass:function(b,c,d){d=ra(d);d.addClass=ib(d.addclass,c);return a.push(b,"addClass",d)},removeClass:function(b,c,d){d=ra(d);d.removeClass=ib(d.removeClass, 283c);return a.push(b,"removeClass",d)},setClass:function(b,c,d,f){f=ra(f);f.addClass=ib(f.addClass,c);f.removeClass=ib(f.removeClass,d);return a.push(b,"setClass",f)},animate:function(b,c,d,f,m){m=ra(m);m.from=m.from?S(m.from,c):c;m.to=m.to?S(m.to,d):d;m.tempClasses=ib(m.tempClasses,f||"ng-inline-animate");return a.push(b,"animate",m)}}}]}],Hf=function(){this.$get=["$$rAF",function(a){function b(b){d.push(b);1<d.length||a(function(){for(var a=0;a<d.length;a++)d[a]();d=[]})}var d=[];return function(){var a= 284!1;b(function(){a=!0});return function(d){a?d():b(d)}}}]},Gf=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$timeout",function(a,b,d,c,e){function f(a){this.setHost(a);var b=d();this._doneCallbacks=[];this._tick=function(a){c()?e(a,0,!1):b(a)};this._state=0}f.chain=function(a,b){function c(){if(d===a.length)b(!0);else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};f.all=function(a,b){function c(f){e=e&&f;++d===a.length&&b(e)}var d=0,e=!0;r(a,function(a){a.done(c)})}; 285f.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:E,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&& 286this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(r(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return f}]},Df=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,d){return function(b,e){function f(){a(function(){g.addClass&& 287(b.addClass(g.addClass),g.addClass=null);g.removeClass&&(b.removeClass(g.removeClass),g.removeClass=null);g.to&&(b.css(g.to),g.to=null);k||h.complete();k=!0});return h}var g=e||{};g.$$prepared||(g=Ia(g));g.cleanupStyles&&(g.from=g.to=null);g.from&&(b.css(g.from),g.from=null);var k,h=new d;return{start:f,end:f}}}]},$=F("$compile"),uc=new function(){};Zc.$inject=["$provide","$$sanitizeUriProvider"];Kb.prototype.isFirstChange=function(){return this.previousValue===uc};var rd=/^((?:x|data)[:\-_])/i,Jg= 288/[:\-_]+(.)/g,xd=F("$controller"),wd=/^(\S+)(\s+as\s+([\w$]+))?$/,Of=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof x&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},yd="application/json",xc={"Content-Type":yd+";charset=utf-8"},Mg=/^\[|^\{(?!\{)/,Ng={"[":/]$/,"{":/}$/},Lg=/^\)]\}',?\n/,Lb=F("$http"),Ma=ca.$interpolateMinErr=F("$interpolate");Ma.throwNoconcat=function(a){throw Ma("noconcat",a);};Ma.interr=function(a,b){return Ma("interr",a,b.toString())}; 289var Qg=F("$interval"),Xf=function(){this.$get=function(){function a(a){var b=function(a){b.data=a;b.called=!0};b.id=a;return b}var b=ca.callbacks,d={};return{createCallback:function(c){c="_"+(b.$$counter++).toString(36);var e="angular.callbacks."+c,f=a(c);d[e]=b[c]=f;return e},wasCalled:function(a){return d[a].called},getResponse:function(a){return d[a].data},removeCallback:function(a){delete b[d[a].id];delete d[a]}}}},uh=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,Rg={http:80,https:443,ftp:21},kb=F("$location"), 290Sg=/^\s*[\\/]{2,}/,vh={$$absUrl:"",$$html5:!1,$$replace:!1,$$compose:function(){for(var a=this.$$path,b=this.$$hash,d=Ce(this.$$search),b=b?"#"+ic(b):"",a=a.split("/"),c=a.length;c--;)a[c]=ic(a[c].replace(/%2F/g,"/"));this.$$url=a.join("/")+(d?"?"+d:"")+b;this.$$absUrl=this.$$normalizeUrl(this.$$url);this.$$urlUpdatedByLocation=!0},absUrl:Mb("$$absUrl"),url:function(a){if(A(a))return this.$$url;var b=uh.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]|| 291"");this.hash(b[5]||"");return this},protocol:Mb("$$protocol"),host:Mb("$$host"),port:Mb("$$port"),path:Fd("$$path",function(a){a=null!==a?a.toString():"";return"/"===a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(C(a)||X(a))a=a.toString(),this.$$search=hc(a);else if(D(a))a=Ia(a,{}),r(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw kb("isrcharg");break;default:A(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose(); 292return this},hash:Fd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};r([Ed,Ac,zc],function(a){a.prototype=Object.create(vh);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==zc||!this.$$html5)throw kb("nostate");this.$$state=A(b)?null:b;this.$$urlUpdatedByLocation=!0;return this}});var Ya=F("$parse"),Wg={}.constructor.prototype.valueOf,Vb=T();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Vb[a]= 293!0});var wh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Ob=function(a){this.options=a};Ob.prototype={constructor:Ob,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index, 294text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var b=a+this.peek(),d=b+this.peek(2),c=Vb[b],e=Vb[d];Vb[a]||c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"=== 295typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)}, 296isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b= 297w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Ya("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var d=K(this.text.charAt(this.index));if("."===d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"===d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"===a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!==a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b, 298text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+ 2991,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,16))):d+=wh[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var q=function(a,b){this.lexer=a;this.options=b};q.Program="Program";q.ExpressionStatement="ExpressionStatement";q.AssignmentExpression="AssignmentExpression";q.ConditionalExpression= 300"ConditionalExpression";q.LogicalExpression="LogicalExpression";q.BinaryExpression="BinaryExpression";q.UnaryExpression="UnaryExpression";q.CallExpression="CallExpression";q.MemberExpression="MemberExpression";q.Identifier="Identifier";q.Literal="Literal";q.ArrayExpression="ArrayExpression";q.Property="Property";q.ObjectExpression="ObjectExpression";q.ThisExpression="ThisExpression";q.LocalsExpression="LocalsExpression";q.NGValueParameter="NGValueParameter";q.prototype={ast:function(a){this.text= 301a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:q.Program,body:a}},expressionStatement:function(){return{type:q.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a}, 302expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();if(this.expect("=")){if(!Jd(a))throw Ya("lval");a={type:q.AssignmentExpression,left:a,right:this.assignment(),operator:"="}}return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?(d=this.expression(),{type:q.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:q.LogicalExpression, 303operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:q.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:q.BinaryExpression,operator:b.text, 304left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()}, 305primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=Ia(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:q.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression", 306this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression()); 307return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]"); 308return{type:q.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:q.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"), 309b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");return{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw Ya("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Ya("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Ya("ueoe", 310this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:q.ThisExpression},$locals:{type:q.LocalsExpression}}};var Hd=2;Ld.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[], 311body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};Z(a,b.$filter);var d="",c;this.stage="assign";if(c=Kd(a))this.state.computing="assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Id(a.body);b.stage="inputs";r(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d;var k=b.nextId();b.recurse(a,k);b.return_(k);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage= 312"main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Tg,Ug,Gd);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;r(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+ 313";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;r(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")}, 314recurse:function(a,b,d,c,e,f){var g,k,h=this,l,m,p;c=c||E;if(!f&&w(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:r(a.body,function(b,c){h.recurse(b.expression,void 0,void 0,function(a){k=a});c!==a.body.length-1?h.current().body.push(k,";"):h.return_(k)});break;case q.Literal:m=this.escape(a.value);this.assign(b,m);c(b||m);break;case q.UnaryExpression:this.recurse(a.argument,void 0, 315void 0,function(a){k=a});m=a.operator+"("+this.ifDefined(k,0)+")";this.assign(b,m);c(m);break;case q.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){k=a});m="+"===a.operator?this.plus(g,k):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(k,0):"("+g+")"+a.operator+"("+k+")";this.assign(b,m);c(m);break;case q.LogicalExpression:b=b||this.nextId();h.recurse(a.left,b);h.if_("&&"===a.operator?b:h.not(b),h.lazyRecurse(a.right, 316b));c(b);break;case q.ConditionalExpression:b=b||this.nextId();h.recurse(a.test,b);h.if_(b,h.lazyRecurse(a.alternate,b),h.lazyRecurse(a.consequent,b));c(b);break;case q.Identifier:b=b||this.nextId();d&&(d.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",a.name)),function(){h.if_("inputs"===h.stage||"s",function(){e&&1!==e&&h.if_(h.isNull(h.nonComputedMember("s",a.name)), 317h.lazyAssign(h.nonComputedMember("s",a.name),"{}"));h.assign(b,h.nonComputedMember("s",a.name))})},b&&h.lazyAssign(b,h.nonComputedMember("l",a.name)));c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();h.recurse(a.object,g,void 0,function(){h.if_(h.notNull(g),function(){a.computed?(k=h.nextId(),h.recurse(a.property,k),h.getStringValue(k),e&&1!==e&&h.if_(h.not(h.computedMember(g,k)),h.lazyAssign(h.computedMember(g,k),"{}")),m=h.computedMember(g,k),h.assign(b, 318m),d&&(d.computed=!0,d.name=k)):(e&&1!==e&&h.if_(h.isNull(h.nonComputedMember(g,a.property.name)),h.lazyAssign(h.nonComputedMember(g,a.property.name),"{}")),m=h.nonComputedMember(g,a.property.name),h.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){h.assign(b,"undefined")});c(b)},!!e);break;case q.CallExpression:b=b||this.nextId();a.filter?(k=h.filter(a.callee.name),l=[],r(a.arguments,function(a){var b=h.nextId();h.recurse(a,b);l.push(b)}),m=k+"("+l.join(",")+")",h.assign(b,m),c(b)): 319(k=h.nextId(),g={},l=[],h.recurse(a.callee,k,g,function(){h.if_(h.notNull(k),function(){r(a.arguments,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m=g.name?h.member(g.context,g.name,g.computed)+"("+l.join(",")+")":k+"("+l.join(",")+")";h.assign(b,m)},function(){h.assign(b,"undefined")});c(b)}));break;case q.AssignmentExpression:k=this.nextId();g={};this.recurse(a.left,void 0,g,function(){h.if_(h.notNull(g.context),function(){h.recurse(a.right,k);m=h.member(g.context, 320g.name,g.computed)+a.operator+k;h.assign(b,m);c(b||m)})},1);break;case q.ArrayExpression:l=[];r(a.elements,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case q.ObjectExpression:l=[];p=!1;r(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),r(a.properties,function(a){a.computed?(g=h.nextId(),h.recurse(a.key,g)):g=a.key.type===q.Identifier?a.key.name:""+a.key.value;k=h.nextId(); 321h.recurse(a.value,k);h.assign(h.member(b,g,a.computed),k)})):(r(a.properties,function(b){h.recurse(b.value,a.constant?void 0:h.nextId(),void 0,function(a){l.push(h.escape(b.key.type===q.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case q.ThisExpression:this.assign(b,"s");c(b||"s");break;case q.LocalsExpression:this.assign(b,"l");c(b||"l");break;case q.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+ 322b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a, 323b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a, 324b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(C(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(X(a))return a.toString();if(!0===a)return"true";if(!1=== 325a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Ya("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Md.prototype={compile:function(a){var b=this;Z(a,b.$filter);var d,c;if(d=Kd(a))c=this.recurse(d);d=Id(a.body);var e;d&&(e=[],r(d,function(a,c){var d=b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];r(a.body, 326function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?E:1===a.body.length?f[0]:function(a,b){var c;r(f,function(d){c=d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case q.BinaryExpression:return c=this.recurse(a.left), 327e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return f.identifier(a.name,b,d);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c, 328e,b,d):this.nonComputedMember(c,e,b,d);case q.CallExpression:return g=[],r(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n<g.length;++n)p.push(g[n](a,c,d,f));a=e.apply(void 0,p,f);return b?{context:void 0,name:void 0,value:a}:a}:function(a,c,d,f){var p=e(a,c,d,f),n;if(null!=p.value){n=[];for(var s=0;s<g.length;++s)n.push(g[s](a,c,d,f));n=p.value.apply(p.context,n)}return b? 329{value:n}:n};case q.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,f,g){var p=c(a,d,f,g);a=e(a,d,f,g);p.context[p.name]=a;return b?{value:a}:a};case q.ArrayExpression:return g=[],r(a.elements,function(a){g.push(f.recurse(a))}),function(a,c,d,e){for(var f=[],n=0;n<g.length;++n)f.push(g[n](a,c,d,e));return b?{value:f}:f};case q.ObjectExpression:return g=[],r(a.properties,function(a){a.computed?g.push({key:f.recurse(a.key),computed:!0,value:f.recurse(a.value)}): 330g.push({key:a.key.type===q.Identifier?a.key.name:""+a.key.value,computed:!1,value:f.recurse(a.value)})}),function(a,c,d,e){for(var f={},n=0;n<g.length;++n)g[n].computed?f[g[n].key(a,c,d,e)]=g[n].value(a,c,d,e):f[g[n].key]=g[n].value(a,c,d,e);return b?{value:f}:f};case q.ThisExpression:return function(a){return b?{value:a}:a};case q.LocalsExpression:return function(a,c){return b?{value:c}:c};case q.NGValueParameter:return function(a,c,d){return b?{value:d}:d}}},"unary+":function(a,b){return function(d, 331c,e,f){d=a(d,c,e,f);d=w(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=w(d)?-d:-0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=Gd(k,c);return d?{value:k}:k}},"binary-":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=(w(k)?k:0)-(w(c)?c:0);return d?{value:k}:k}},"binary*":function(a,b, 332d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,d){return function(c, 333e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c= 334a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k)?b(e,f,g,k):d(e,f,g,k);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c= 335e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}:e}},computedMember:function(a,b,d,c){return function(e,f,g,k){var h=a(e,f,g,k),l,m;null!=h&&(l=b(e,f,g,k),l+="",c&&1!==c&&h&&!h[l]&&(h[l]={}),m=h[l]);return d?{context:h,name:l,value:m}:m}},nonComputedMember:function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0;return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d, 336c,e,f){return f?f[b]:a(d,c,e)}}};Nb.prototype={constructor:Nb,parse:function(a){a=this.getAst(a);var b=this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===q.Literal||d.body[0].expression.type===q.ArrayExpression||d.body[0].expression.type===q.ObjectExpression);b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"===a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a), 337oneTime:b}}};var Ea=F("$sce"),W={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Dc=/_([a-z])/g,Zg=F("$templateRequest"),$g=F("$timeout"),aa=z.document.createElement("a"),Qd=ga(z.location.href),Na;aa.href="http://[::1]";var ah="[::1]"===aa.hostname;Rd.$inject=["$document"];fd.$inject=["$provide"];var Yd=22,Xd=".",Fc="0";Sd.$inject=["$locale"];Ud.$inject=["$locale"];var lh={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0), 338MMMM:lb("Month"),MMM:lb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:lb("Month",!1,!0),dd:ea("Date",2),d:ea("Date",1),HH:ea("Hours",2),H:ea("Hours",1),hh:ea("Hours",2,-12),h:ea("Hours",1,-12),mm:ea("Minutes",2),m:ea("Minutes",1),ss:ea("Seconds",2),s:ea("Seconds",1),sss:ea("Milliseconds",3),EEEE:lb("Day"),EEE:lb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Pb(Math[0<a?"floor":"ceil"](a/60),2)+Pb(Math.abs(a%60),2))}, 339ww:$d(2),w:$d(1),G:Gc,GG:Gc,GGG:Gc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},kh=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,jh=/^-?\d+$/;Td.$inject=["$locale"];var eh=ia(K),fh=ia(vb);Vd.$inject=["$parse"];var Re=ia({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===la.call(b.prop("href"))?"xlink:href":"href"; 340b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),wb={};r(Hb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=xa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});wb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(vd,function(a,b){wb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(ke))){e.$set("ngPattern",new RegExp(c[1], 341c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});r(["src","srcset","href"],function(a){var b=xa("ng-"+a);wb[b]=["$sce",function(d){return{priority:99,link:function(c,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===la.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$set(b,d.getTrustedMediaUrl(f[b]));f.$observe(b,function(b){b?(f.$set(k,b),wa&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}]});var mb={$addControl:E,$getControls:ia([]),$$renameControl:function(a, 342b){a.$name=b},$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E,$setSubmitted:E,$$setSubmitted:E};Qb.$inject=["$element","$attrs","$scope","$animate","$interpolate"];Qb.prototype={$rollbackViewValue:function(){r(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Ja(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$getControls:function(){return ja(this.$$controls)}, 343$$renameControl:function(a,b){var d=a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&&this[a.$name]===a&&delete this[a.$name];r(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);r(this.$error,function(b,d){this.$setValidity(d,null,a)},this);r(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);cb(this.$$controls,a);a.$$parentForm=mb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element, 344Wb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,Za,Wb+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;r(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){for(var a=this;a.$$parentForm&&a.$$parentForm!==mb;)a=a.$$parentForm;a.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element, 345"ng-submitted");this.$submitted=!0;r(this.$$controls,function(a){a.$$setSubmitted&&a.$$setSubmitted()})}};ce({clazz:Qb,set:function(a,b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(cb(c,d),0===c.length&&delete a[b])}});var oe=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||E}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Qb,compile:function(d,f){d.addClass(Za).addClass(nb); 346var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue();p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var s=g?c(p.$name):E;g&&(s(a,p),e.$observe(g,function(b){p.$name!==b&&(s(a,void 0),p.$$parentForm.$$renameControl(p,b),s=c(p.$name),s(a,p))})); 347d.on("$destroy",function(){p.$$parentForm.$removeControl(p);s(a,void 0);S(p,mb)})}}}}}]},Se=oe(),df=oe(!0),mh=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,xh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,yh=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/, 348nh=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,pe=/^(\d{4,})-(\d{2})-(\d{2})$/,qe=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Oc=/^(\d{4,})-W(\d\d)$/,re=/^(\d{4,})-(\d\d)$/,se=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ee=T();r(["date","datetime-local","month","time","week"],function(a){ee[a]=!0});var te={text:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c)},date:ob("date",pe,Rb(pe,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":ob("datetimelocal",qe,Rb(qe,"yyyy MM dd HH mm ss sss".split(" ")), 349"yyyy-MM-ddTHH:mm:ss.sss"),time:ob("time",se,Rb(se,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:ob("week",Oc,function(a,b){if(ha(a))return a;if(C(a)){Oc.lastIndex=0;var d=Oc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Zd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),k=b.getMilliseconds());return new Date(c,0,h.getDate()+e,d,f,g,k)}}return NaN},"yyyy-Www"),month:ob("month",re,Rb(re,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f,g,k){Jc(a,b,d,c,"number");fe(c);Sa(a, 350b,d,c,e,f);var h;if(w(d.min)||d.ngMin){var l=d.min||k(d.ngMin)(a);h=na(l);c.$validators.min=function(a,b){return c.$isEmpty(b)||A(h)||b>=h};d.$observe("min",function(a){a!==l&&(h=na(a),l=a,c.$validate())})}if(w(d.max)||d.ngMax){var m=d.max||k(d.ngMax)(a),p=na(m);c.$validators.max=function(a,b){return c.$isEmpty(b)||A(p)||b<=p};d.$observe("max",function(a){a!==m&&(p=na(a),m=a,c.$validate())})}if(w(d.step)||d.ngStep){var n=d.step||k(d.ngStep)(a),s=na(n);c.$validators.step=function(a,b){return c.$isEmpty(b)|| 351A(s)||ge(b,h||0,s)};d.$observe("step",function(a){a!==n&&(s=na(a),n=a,c.$validate())})}},url:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c);c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||xh.test(d)}},email:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||yh.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==V(d.ngTrim);A(d.name)&&b.attr("name",++qb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g= 352V(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=V(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a,c){b.attr(a,d[a]);var e=d[a];d.$observe(a,function(a){a!==e&&(e=a,c(a))})}function k(a){p=na(a);Y(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=na(a);Y(c.$modelValue)||(m?(a=b.val(),n<a&&(b.val(n),a=n<p?p:n),c.$setViewValue(a)):c.$validate())}function l(a){s= 353na(a);Y(c.$modelValue)||(m?c.$viewValue!==b.val()&&c.$setViewValue(b.val()):c.$validate())}Jc(a,b,d,c,"range");fe(c);Sa(a,b,d,c,e,f);var m=c.$$hasNativeValidators&&"range"===b[0].type,p=m?0:void 0,n=m?100:void 0,s=m?1:void 0,r=b[0].validity;a=w(d.min);e=w(d.max);f=w(d.step);var q=c.$render;c.$render=m&&w(r.rangeUnderflow)&&w(r.rangeOverflow)?function(){q();c.$setViewValue(b.val())}:q;a&&(p=na(d.min),c.$validators.min=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||A(p)||b>=p},g("min",k)); 354e&&(n=na(d.max),c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||A(n)||b<=n},g("max",h));f&&(s=na(d.step),c.$validators.step=m?function(){return!r.stepMismatch}:function(a,b){return c.$isEmpty(b)||A(s)||ge(b,p||0,s)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,k){var h=he(k,a,"ngTrueValue",d.ngTrueValue,!0),l=he(k,a,"ngFalseValue",d.ngFalseValue,!1);b.on("change",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty= 355function(a){return!1===a};c.$formatters.push(function(a){return va(a,h)});c.$parsers.push(function(a){return a?h:l})},hidden:E,button:E,submit:E,reset:E,file:E},$c=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,k){k[0]&&(te[K(g.type)]||te.text)(e,f,g,k[0],b,a,d,c)}}}}],Af=function(){var a={configurable:!0,enumerable:!1,get:function(){return this.getAttribute("value")||""},set:function(a){this.setAttribute("value",a)}}; 356return{restrict:"E",priority:200,compile:function(b,d){if("hidden"===K(d.type))return{pre:function(b,d,f,g){b=d[0];b.parentNode&&b.parentNode.insertBefore(b,b.nextSibling);Object.defineProperty&&Object.defineProperty(b,"value",a)}}}}},zh=/^(true|false|\d+)$/,xf=function(){function a(a,d,c){var e=w(c)?c:9===wa?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return zh.test(d.ngValue)?function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue, 357function(b){a(d,f,b)})}}}},We=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=jc(a)})}}}}],Ye=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=A(a)?"":a})}}}}], 358Xe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],wf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ze=Lc("",!0),af=Lc("Odd",0),$e=Lc("Even",1),bf=Ra({compile:function(a, 359b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),cf=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ed={},Ah={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=xa("ng-"+a);ed[b]=["$parse","$rootScope","$exceptionHandler",function(d,c,e){return sd(d,c,e,b,a,Ah[a])}]});var ff=["$animate","$compile",function(a,b){return{multiElement:!0, 360transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var k,h,l;d.$watch(e.ngIf,function(d){d?h||g(function(d,f){h=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);k={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),h&&(h.$destroy(),h=null),k&&(l=ub(k.clone),a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],gf=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element", 361controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",k=e.autoscroll;return function(c,e,m,p,n){var r=0,q,t,x,v=function(){t&&(t.remove(),t=null);q&&(q.$destroy(),q=null);x&&(d.leave(x).done(function(a){!1!==a&&(t=null)}),t=x,x=null)};c.$watch(f,function(f){var m=function(a){!1===a||!w(k)||k&&!c.$eval(k)||b()},t=++r;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===r){var b=c.$new();p.template=a;a=n(b,function(a){v();d.enter(a,null,e).done(m)});q=b;x=a;q.$emit("$includeContentLoaded", 362f);c.$eval(g)}},function(){c.$$destroyed||t!==r||(v(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(v(),p.template=null)})}}}}],zf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){la.call(d[0]).match(/SVG/)?(d.empty(),a(gd(e.template,z.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],hf=Ra({priority:450,compile:function(){return{pre:function(a, 363b,d){a.$eval(d.ngInit)}}}}),vf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?V(e):e;c.$parsers.push(function(a){if(!A(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?V(a):a)});return b}});c.$formatters.push(function(a){if(H(a))return a.join(e)});c.$isEmpty=function(a){return!a||!a.length}}}},nb="ng-valid",be="ng-invalid",Za="ng-pristine",Wb="ng-dirty",pb=F("ngModel");Sb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" "); 364Sb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);B(c)&&(c=a(b));return c};this.$$ngModelSet=function(a,c){B(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw pb("nonassign",this.$$attr.ngModel,Aa(this.$$element));},$render:E,$isEmpty:function(a){return A(a)|| 365""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element,"ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Wb);this.$$animate.addClass(this.$$element,Za)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element, 366Za);this.$$animate.addClass(this.$$element,Wb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=!0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!Y(this.$modelValue)){var a= 367this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!==c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;r(h.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(r(h.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;r(h.$asyncValidators,function(e, 368g){var h=e(a,b);if(!h||!B(h.then))throw pb("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?h.$$q.all(c).then(function(){g(d)},E):g(!0)}function f(a,b){k===h.$$currentValidationRunId&&h.$setValidity(a,b)}function g(a){k===h.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var k=this.$$currentValidationRunId,h=this;(function(){var a=h.$$parserName;if(A(h.$$parserValid))f(a,null);else return h.$$parserValid||(r(h.$validators,function(a, 369b){f(b,null)}),r(h.$asyncValidators,function(a,b){f(b,null)})),f(a,h.$$parserValid),h.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);if(this.$$lastCommittedViewValue!==a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;this.$$parserValid= 370A(a)?void 0:!0;this.$setValidity(this.$$parserName,null);this.$$parserName="parse";if(this.$$parserValid)for(var d=0;d<this.$parsers.length;d++)if(a=this.$parsers[d](a),A(a)){this.$$parserValid=!1;break}Y(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));var c=this.$modelValue,e=this.$options.getOption("allowInvalid");this.$$rawModelValue=a;e&&(this.$modelValue=a,b.$modelValue!==c&&b.$$writeModelToScope());this.$$runValidators(a,this.$$lastCommittedViewValue,function(d){e||(b.$modelValue= 371d?a:void 0,b.$modelValue!==c&&b.$$writeModelToScope())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue);r(this.$viewChangeListeners,function(a){try{a()}catch(b){this.$$exceptionHandler(b)}},this)},$setViewValue:function(a,b){this.$viewValue=a;this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(b)},$$debounceViewValueCommit:function(a){var b=this.$options.getOption("debounce");X(b[a])?b=b[a]:X(b["default"])&&-1===this.$options.getOption("updateOn").indexOf(a)? 372b=b["default"]:X(b["*"])&&(b=b["*"]);this.$$timeout.cancel(this.$$pendingDebounce);var d=this;0<b?this.$$pendingDebounce=this.$$timeout(function(){d.$commitViewValue()},b):this.$$rootScope.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){d.$commitViewValue()})},$overrideModelOptions:function(a){this.$options=this.$options.createChild(a);this.$$setUpdateOnEvents()},$processModelValue:function(){var a=this.$$format();this.$viewValue!==a&&(this.$$updateEmptyClasses(a),this.$viewValue=this.$$lastCommittedViewValue= 373a,this.$render(),this.$$runValidators(this.$modelValue,this.$viewValue,E))},$$format:function(){for(var a=this.$formatters,b=a.length,d=this.$modelValue;b--;)d=a[b](d);return d},$$setModelValue:function(a){this.$modelValue=this.$$rawModelValue=a;this.$$parserValid=void 0;this.$processModelValue()},$$setUpdateOnEvents:function(){this.$$updateEvents&&this.$$element.off(this.$$updateEvents,this.$$updateEventHandler);if(this.$$updateEvents=this.$options.getOption("updateOn"))this.$$element.on(this.$$updateEvents, 374this.$$updateEventHandler)},$$updateEventHandler:function(a){this.$$debounceViewValueCommit(a&&a.type)}};ce({clazz:Sb,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]}});var uf=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Sb,priority:1,compile:function(b){b.addClass(Za).addClass("ng-untouched").addClass(nb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;if(f=f[2])g.$options=f.$options;g.$$initGetterSetters();b.$addControl(g); 375e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){function g(){k.$setTouched()}var k=f[0];k.$$setUpdateOnEvents();c.on("blur",function(){k.$touched||(a.$$phase?b.$evalAsync(g):b.$apply(g))})}}}}}],Tb,Bh=/(\s+|^)default(\s+|$)/;Mc.prototype={getOption:function(a){return this.$$options[a]},createChild:function(a){var b=!1;a=S({},a);r(a,function(d,c){"$inherit"===d?"*"===c?b=!0:(a[c]= 376this.$$options[c],"updateOn"===c&&(a.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===c&&(a.updateOnDefault=!1,a[c]=V(d.replace(Bh,function(){a.updateOnDefault=!0;return" "})))},this);b&&(delete a["*"],ie(a,this.$$options));ie(a,Tb.$$options);return new Mc(a)}};Tb=new Mc({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var yf=function(){function a(a,d){this.$$attrs=a;this.$$scope=d}a.$inject=["$attrs","$scope"];a.prototype={$onInit:function(){var a= 377this.parentCtrl?this.parentCtrl.$options:Tb,d=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=a.createChild(d)}};return{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:a}},jf=Ra({terminal:!0,priority:1E3}),Ch=F("ngOptions"),Dh=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/, 378sf=["$compile","$document","$parse",function(a,b,d){function c(a,b,c){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function f(a){var b;if(!r&&za(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var p=a.match(Dh);if(!p)throw Ch("iexp",a,Aa(b));var n=p[5]||p[7],r=p[6];a=/ as /.test(p[0])&&p[1];var q=p[9];b=d(p[2]?p[1]:n);var t=a&&d(a)||b,w=q&&d(q),v=q?function(a,b){return w(c,b)}:function(a){return La(a)}, 379x=function(a,b){return v(a,B(a,b))},A=d(p[2]||p[1]),y=d(p[3]||""),J=d(p[4]||""),I=d(p[8]),z={},B=r?function(a,b){z[r]=b;z[n]=a;return z}:function(a){z[n]=a;return z};return{trackBy:q,getTrackByValue:x,getWatchables:d(I,function(a){var b=[];a=a||[];for(var d=f(a),e=d.length,g=0;g<e;g++){var k=a===d?g:d[g],l=a[k],k=B(l,k),l=v(l,k);b.push(l);if(p[2]||p[1])l=A(c,k),b.push(l);p[4]&&(k=J(c,k),b.push(k))}return b}),getOptions:function(){for(var a=[],b={},d=I(c)||[],g=f(d),k=g.length,n=0;n<k;n++){var p=d=== 380g?n:g[n],r=B(d[p],p),s=t(c,r),p=v(s,r),w=A(c,r),z=y(c,r),r=J(c,r),s=new e(p,s,w,z,r);a.push(s);b[p]=s}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[x(a)]},getViewValueFromOption:function(a){return q?Ia(a.viewValue):a.viewValue}}}}}var e=z.document.createElement("option"),f=z.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=E},post:function(d,k,h,l){function m(a){var b=(a=v.getOptionFromViewValue(a))&& 381a.element;b&&!b.selected&&(b.selected=!0);return a}function p(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,b.textContent=a.label);b.value=a.selectValue}var n=l[0],q=l[1],A=h.multiple;l=0;for(var t=k.children(),z=t.length;l<z;l++)if(""===t[l].value){n.hasEmptyOption=!0;n.emptyOption=t.eq(l);break}k.empty();l=!!n.emptyOption;x(e.cloneNode(!1)).val("?");var v,B=c(h.ngOptions,k,d),C=b[0].createDocumentFragment();n.generateUnknownOptionValue=function(a){return"?"};A?(n.writeValue= 382function(a){if(v){var b=a&&a.map(m)||[];v.items.forEach(function(a){a.element.selected&&-1===Array.prototype.indexOf.call(b,a)&&(a.element.selected=!1)})}},n.readValue=function(){var a=k.val()||[],b=[];r(a,function(a){(a=v.selectValueMap[a])&&!a.disabled&&b.push(v.getViewValueFromOption(a))});return b},B.trackBy&&d.$watchCollection(function(){if(H(q.$viewValue))return q.$viewValue.map(function(a){return B.getTrackByValue(a)})},function(){q.$render()})):(n.writeValue=function(a){if(v){var b=k[0].options[k[0].selectedIndex], 383c=v.getOptionFromViewValue(a);b&&b.removeAttribute("selected");c?(k[0].value!==c.selectValue&&(n.removeUnknownOption(),k[0].value=c.selectValue,c.element.selected=!0),c.element.setAttribute("selected","selected")):n.selectUnknownOrEmptyOption(a)}},n.readValue=function(){var a=v.selectValueMap[k.val()];return a&&!a.disabled?(n.unselectEmptyOption(),n.removeUnknownOption(),v.getViewValueFromOption(a)):null},B.trackBy&&d.$watch(function(){return B.getTrackByValue(q.$viewValue)},function(){q.$render()})); 384l&&(a(n.emptyOption)(d),k.prepend(n.emptyOption),8===n.emptyOption[0].nodeType?(n.hasEmptyOption=!1,n.registerOption=function(a,b){""===b.val()&&(n.hasEmptyOption=!0,n.emptyOption=b,n.emptyOption.removeClass("ng-scope"),q.$render(),b.on("$destroy",function(){var a=n.$isEmptyOptionSelected();n.hasEmptyOption=!1;n.emptyOption=void 0;a&&q.$render()}))}):n.emptyOption.removeClass("ng-scope"));d.$watchCollection(B.getWatchables,function(){var a=v&&n.readValue();if(v)for(var b=v.items.length-1;0<=b;b--){var c= 385v.items[b];w(c.group)?Gb(c.element.parentNode):Gb(c.element)}v=B.getOptions();var d={};v.items.forEach(function(a){var b;if(w(a.group)){b=d[a.group];b||(b=f.cloneNode(!1),C.appendChild(b),b.label=null===a.group?"null":a.group,d[a.group]=b);var c=e.cloneNode(!1);b.appendChild(c);p(a,c)}else b=e.cloneNode(!1),C.appendChild(b),p(a,b)});k[0].appendChild(C);q.$render();q.$isEmpty(a)||(b=n.readValue(),(B.trackBy||A?va(a,b):a===b)||(q.$setViewValue(b),q.$render()))})}}}}],kf=["$locale","$interpolate","$log", 386function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,g,k){function h(a){g.text(a||"")}var l=k.count,m=k.$attr.when&&g.attr(k.$attr.when),p=k.offset||0,n=f.$eval(m)||{},q={},w=b.startSymbol(),t=b.endSymbol(),x=w+l+"-"+p+t,v=ca.noop,z;r(k,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+K(c[2]),n[c]=g.attr(k.$attr[b]))});r(n,function(a,d){q[d]=b(a.replace(c,x))});f.$watch(l,function(b){var c=parseFloat(b),e=Y(c);e||c in n||(c=a.pluralCat(c-p));c===z||e&&Y(z)||(v(),e=q[c],A(e)? 387(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+m),v=E,h()):v=f.$watch(e,h),z=c)})}}}],ue=F("ngRef"),lf=["$parse",function(a){return{priority:-1,restrict:"A",compile:function(b,d){var c=xa(ua(b)),e=a(d.ngRef),f=e.assign||function(){throw ue("nonassign",d.ngRef);};return function(a,b,h){var l;if(h.hasOwnProperty("ngRefRead"))if("$element"===h.ngRefRead)l=b;else{if(l=b.data("$"+h.ngRefRead+"Controller"),!l)throw ue("noctrl",h.ngRefRead,d.ngRef);}else l=b.data("$"+c+"Controller");l= 388l||b;f(a,l);b.on("$destroy",function(){e(a)===l&&f(a,null)})}}}}],mf=["$parse","$animate","$compile",function(a,b,d){var c=F("ngRepeat"),e=function(a,b,c,d,e,f,g){a[c]=d;e&&(a[e]=f);a.$index=b;a.$first=0===b;a.$last=b===g-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))},f=function(a,b,c){return La(c)},g=function(a,b){return b};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(k,h){var l=h.ngRepeat,m=d.$$createComment("end ngRepeat", 389l),p=l.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw c("iexp",l);var n=p[1],q=p[2],w=p[3],t=p[4],p=n.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/);if(!p)throw c("iidexp",n);var x=p[3]||p[1],v=p[2];if(w&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(w)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(w)))throw c("badident",w);var A;if(t){var z={$id:La},y=a(t);A=function(a,b,c,d){v&& 390(z[v]=b);z[x]=c;z.$index=d;return y(a,z)}}return function(a,d,h,k,n){var p=T();a.$watchCollection(q,function(h){var k,q,t=d[0],s,y=T(),B,C,E,D,H,F,K;w&&(a[w]=h);if(za(h))H=h,q=A||f;else for(K in q=A||g,H=[],h)ta.call(h,K)&&"$"!==K.charAt(0)&&H.push(K);B=H.length;K=Array(B);for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],D=q(a,C,E,k),p[D])F=p[D],delete p[D],y[D]=F,K[k]=F;else{if(y[D])throw r(K,function(a){a&&a.scope&&(p[a.id]=a)}),c("dupes",l,D,E);K[k]={id:D,scope:void 0,clone:void 0};y[D]=!0}z&&(z[x]=void 0); 391for(s in p){F=p[s];D=ub(F.clone);b.leave(D);if(D[0].parentNode)for(k=0,q=D.length;k<q;k++)D[k].$$NG_REMOVED=!0;F.scope.$destroy()}for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],F=K[k],F.scope){s=t;do s=s.nextSibling;while(s&&s.$$NG_REMOVED);F.clone[0]!==s&&b.move(ub(F.clone),null,t);t=F.clone[F.clone.length-1];e(F.scope,k,x,E,v,C,B)}else n(function(a,c){F.scope=c;var d=m.cloneNode(!1);a[a.length++]=d;b.enter(a,null,t);t=d;F.clone=a;y[F.id]=F;e(F.scope,k,x,E,v,C,B)});p=y})}}}}],nf=["$animate",function(a){return{restrict:"A", 392multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],ef=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],of=Ra(function(a,b,d){a.$watchCollection(d.ngStyle,function(a,d){d&&a!==d&&r(d,function(a,c){b.css(c,"")});a&&b.css(a)})}),pf=["$animate","$compile",function(a, 393b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(d,c,e,f){var g=[],k=[],h=[],l=[],m=function(a,b){return function(c){!1!==c&&a.splice(b,1)}};d.$watch(e.ngSwitch||e.on,function(c){for(var d,e;h.length;)a.cancel(h.pop());d=0;for(e=l.length;d<e;++d){var q=ub(k[d].clone);l[d].$destroy();(h[d]=a.leave(q)).done(m(h,d))}k.length=0;l.length=0;(g=f.cases["!"+c]||f.cases["?"])&&r(g,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen"); 394k.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],qf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){a=d.ngSwitchWhen.split(d.ngSwitchWhenSeparator).sort().filter(function(a,b,c){return c[b-1]!==a});r(a,function(a){c.cases["!"+a]=c.cases["!"+a]||[];c.cases["!"+a].push({transclude:e,element:b})})}}),rf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e, 395element:b})}}),Eh=F("ngTransclude"),tf=["$compile",function(a){return{restrict:"EAC",compile:function(b){var d=a(b.contents());b.empty();return function(a,b,f,g,k){function h(){d(a,function(a){b.append(a)})}if(!k)throw Eh("orphan",Aa(b));f.ngTransclude===f.$attr.ngTransclude&&(f.ngTransclude="");f=f.ngTransclude||f.ngTranscludeSlot;k(function(a,c){var d;if(d=a.length)a:{d=0;for(var f=a.length;d<f;d++){var g=a[d];if(g.nodeType!==Pa||g.nodeValue.trim()){d=!0;break a}}d=void 0}d?b.append(a):(h(),c.$destroy())}, 396null,f);f&&!k.isSlotFilled(f)&&h()}}}}],Te=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"===d.type&&a.put(d.id,b[0].text)}}}],Fh={$setViewValue:E,$render:E},Gh=["$element","$scope",function(a,b){function d(){g||(g=!0,b.$$postDigest(function(){g=!1;e.ngModelCtrl.$render()}))}function c(a){k||(k=!0,b.$$postDigest(function(){b.$$destroyed||(k=!1,e.ngModelCtrl.$setViewValue(e.readValue()),a&&e.ngModelCtrl.$render())}))}var e=this,f=new Ib;e.selectValueMap= 397{};e.ngModelCtrl=Fh;e.multiple=!1;e.unknownOption=x(z.document.createElement("option"));e.hasEmptyOption=!1;e.emptyOption=void 0;e.renderUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);a.prepend(e.unknownOption);Oa(e.unknownOption,!0);a.val(b)};e.updateUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);Oa(e.unknownOption,!0);a.val(b)};e.generateUnknownOptionValue=function(a){return"? "+La(a)+" ?"};e.removeUnknownOption=function(){e.unknownOption.parent()&& 398e.unknownOption.remove()};e.selectEmptyOption=function(){e.emptyOption&&(a.val(""),Oa(e.emptyOption,!0))};e.unselectEmptyOption=function(){e.hasEmptyOption&&Oa(e.emptyOption,!1)};b.$on("$destroy",function(){e.renderUnknownOption=E});e.readValue=function(){var b=a.val(),b=b in e.selectValueMap?e.selectValueMap[b]:b;return e.hasOption(b)?b:null};e.writeValue=function(b){var c=a[0].options[a[0].selectedIndex];c&&Oa(x(c),!1);e.hasOption(b)?(e.removeUnknownOption(),c=La(b),a.val(c in e.selectValueMap? 399c:b),Oa(x(a[0].options[a[0].selectedIndex]),!0)):e.selectUnknownOrEmptyOption(b)};e.addOption=function(a,b){if(8!==b[0].nodeType){Ja(a,'"option value"');""===a&&(e.hasEmptyOption=!0,e.emptyOption=b);var c=f.get(a)||0;f.set(a,c+1);d()}};e.removeOption=function(a){var b=f.get(a);b&&(1===b?(f.delete(a),""===a&&(e.hasEmptyOption=!1,e.emptyOption=void 0)):f.set(a,b-1))};e.hasOption=function(a){return!!f.get(a)};e.$hasEmptyOption=function(){return e.hasEmptyOption};e.$isUnknownOptionSelected=function(){return a[0].options[0]=== 400e.unknownOption[0]};e.$isEmptyOptionSelected=function(){return e.hasEmptyOption&&a[0].options[a[0].selectedIndex]===e.emptyOption[0]};e.selectUnknownOrEmptyOption=function(a){null==a&&e.emptyOption?(e.removeUnknownOption(),e.selectEmptyOption()):e.unknownOption.parent().length?e.updateUnknownOption(a):e.renderUnknownOption(a)};var g=!1,k=!1;e.registerOption=function(a,b,f,g,k){if(f.$attr.ngValue){var q,r;f.$observe("value",function(a){var d,f=b.prop("selected");w(r)&&(e.removeOption(q),delete e.selectValueMap[r], 401d=!0);r=La(a);q=a;e.selectValueMap[r]=a;e.addOption(a,b);b.attr("value",r);d&&f&&c()})}else g?f.$observe("value",function(a){e.readValue();var d,f=b.prop("selected");w(q)&&(e.removeOption(q),d=!0);q=a;e.addOption(a,b);d&&f&&c()}):k?a.$watch(k,function(a,d){f.$set("value",a);var g=b.prop("selected");d!==a&&e.removeOption(d);e.addOption(a,b);d&&g&&c()}):e.addOption(f.value,b);f.$observe("disabled",function(a){if("true"===a||a&&b.prop("selected"))e.multiple?c(!0):(e.ngModelCtrl.$setViewValue(null),e.ngModelCtrl.$render())}); 402b.on("$destroy",function(){var a=e.readValue(),b=f.value;e.removeOption(b);d();(e.multiple&&a&&-1!==a.indexOf(b)||a===b)&&c(!0)})}}],Ue=function(){return{restrict:"E",require:["select","?ngModel"],controller:Gh,priority:1,link:{pre:function(a,b,d,c){var e=c[0],f=c[1];if(f){if(e.ngModelCtrl=f,b.on("change",function(){e.removeUnknownOption();a.$apply(function(){f.$setViewValue(e.readValue())})}),d.multiple){e.multiple=!0;e.readValue=function(){var a=[];r(b.find("option"),function(b){b.selected&&!b.disabled&& 403(b=b.value,a.push(b in e.selectValueMap?e.selectValueMap[b]:b))});return a};e.writeValue=function(a){r(b.find("option"),function(b){var c=!!a&&(-1!==Array.prototype.indexOf.call(a,b.value)||-1!==Array.prototype.indexOf.call(a,e.selectValueMap[b.value]));c!==b.selected&&Oa(x(b),c)})};var g,k=NaN;a.$watch(function(){k!==f.$viewValue||va(g,f.$viewValue)||(g=ja(f.$viewValue),f.$render());k=f.$viewValue});f.$isEmpty=function(a){return!a||0===a.length}}}else e.registerOption=E},post:function(a,b,d,c){var e= 404c[1];if(e){var f=c[0];e.$render=function(){f.writeValue(e.$viewValue)}}}}}},Ve=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){var c,e;w(d.ngValue)||(w(d.value)?c=a(d.value,!0):(e=a(b.text(),!0))||d.$set("value",b.text()));return function(a,b,d){var h=b.parent();(h=h.data("$selectController")||h.parent().data("$selectController"))&&h.registerOption(a,b,d,c,e)}}}}],bd=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f= 405c.hasOwnProperty("required")||a(c.ngRequired)(b);c.ngRequired||(c.required=!0);e.$validators.required=function(a,b){return!f||!e.$isEmpty(b)};c.$observe("required",function(a){f!==a&&(f=a,e.$validate())})}}}}],ad=["$parse",function(a){return{restrict:"A",require:"?ngModel",compile:function(b,d){var c,e;d.ngPattern&&(c=d.ngPattern,e="/"===d.ngPattern.charAt(0)&&ke.test(d.ngPattern)?function(){return d.ngPattern}:a(d.ngPattern));return function(a,b,d,h){if(h){var l=d.pattern;d.ngPattern?l=e(a):c=d.pattern; 406var m=je(l,c,b);d.$observe("pattern",function(a){var d=m;m=je(a,c,b);(d&&d.toString())!==(m&&m.toString())&&h.$validate()});h.$validators.pattern=function(a,b){return h.$isEmpty(b)||A(m)||m.test(b)}}}}}}],dd=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.maxlength||a(c.ngMaxlength)(b),g=Ub(f);c.$observe("maxlength",function(a){f!==a&&(g=Ub(a),f=a,e.$validate())});e.$validators.maxlength=function(a,b){return 0>g||e.$isEmpty(b)||b.length<=g}}}}}],cd= 407["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.minlength||a(c.ngMinlength)(b),g=Ub(f)||-1;c.$observe("minlength",function(a){f!==a&&(g=Ub(a)||-1,f=a,e.$validate())});e.$validators.minlength=function(a,b){return e.$isEmpty(b)||b.length>=g}}}}}];z.angular.bootstrap?z.console&&console.log("WARNING: Tried to load AngularJS more than once."):(Je(),Oe(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1== 408b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "), 409WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a, 410c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),x(function(){Ee(z.document,Wc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(window.angular.element("<style>").text('@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}')); 411//# sourceMappingURL=angular.min.js.map
412; 413/** 414 * State-based routing for AngularJS 415 * @version v0.4.2 416 * @link http://angular-ui.github.com/ 417 * @license MIT License, http://www.opensource.org/licenses/MIT 418 */ 419"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return T(new(T(function(){},{prototype:a})),b)}function e(a){return S(arguments,function(b){b!==a&&S(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var b=[];return S(a,function(a,c){b.push(c)}),b}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=d<0?Math.ceil(d):Math.floor(d),d<0&&(d+=c);d<c;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l]&&i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return T({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e<c.length;e++){var f=c[e];if(a[f]!=b[f])return!1}return!0}function k(a,b){var c={};return S(a,function(a){c[a]=b[a]}),c}function l(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return S(c,function(c){c in a&&(b[c]=a[c])}),b}function m(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var d in a)h(c,d)==-1&&(b[d]=a[d]);return b}function n(a,b){var c=R(a),d=c?[]:{};return S(a,function(a,e){b(a,e)&&(d[c?d.length:e]=a)}),d}function o(a,b){var c=R(a)?[]:{};return S(a,function(a,d){c[d]=b(a,d)}),c}function p(a){return a.then(c,function(){})&&a}function q(a,b){var d=1,f=2,i={},j=[],k=i,l=T(a.when(i),{$$promises:i,$$values:i});this.study=function(i){function n(a,c){if(t[c]!==f){if(s.push(c),t[c]===d)throw s.splice(0,h(s,c)),new Error("Cyclic dependency: "+s.join(" -> "));if(t[c]=d,P(a))r.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);S(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),r.push(c,a,e)}s.pop(),t[c]=f}}function o(a){return Q(a)&&a.then&&a.$$promises}if(!Q(i))throw new Error("'invocables' must be an object");var q=g(i||{}),r=[],s=[],t={};return S(i,n),i=s=t=null,function(d,f,g){function h(){--v||(w||e(u,f.$$values),s.$$values=u,s.$$promises=s.$$promises||!0,delete s.$$inheritedValues,n.resolve(u))}function i(a){s.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!N(s.$$failure))try{l.resolve(b.invoke(e,g,u)),l.promise.then(function(a){u[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;S(f,function(a){t.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,t[a].then(function(b){u[a]=b,--m||k()},j))}),m||k(),t[c]=p(l.promise)}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!Q(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=l;var n=a.defer(),s=p(n.promise),t=s.$$promises={},u=T({},d),v=1+r.length/3,w=!1;if(p(s),N(f.$$failure))return i(f.$$failure),s;f.$$inheritedValues&&e(u,m(f.$$inheritedValues,q)),T(t,f.$$promises),f.$$values?(w=e(u,m(f.$$values,q)),s.$$inheritedValues=m(f.$$values,q),h()):(f.$$inheritedValues&&(s.$$inheritedValues=m(f.$$inheritedValues,q)),f.then(h,i));for(var x=0,y=r.length;x<y;x+=3)d.hasOwnProperty(r[x])?h():j(r[x],r[x+1],r[x+2]);return s}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function r(){var a=b.version.minor<3;this.shouldUnsafelyUseHttp=function(b){a=!!b},this.$get=["$http","$templateCache","$injector",function(b,c,d){return new s(b,c,d,a)}]}function s(a,b,c,d){this.fromConfig=function(a,b,c){return N(a.template)?this.fromString(a.template,b):N(a.templateUrl)?this.fromUrl(a.templateUrl,b):N(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return O(a)?a(b):a},this.fromUrl=function(e,f){return O(e)&&(e=e(f)),null==e?null:d?a.get(e,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data}):c.get("$templateRequest")(e)},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function t(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new W.Param(b,c,d,e),p[b]}function g(a,b,c,d){var e=["",""],f=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return f;switch(c){case!1:e=["(",")"+(d?"?":"")];break;case!0:f=f.replace(/\/$/,""),e=["(?:/(",")|/)?"];break;default:e=["("+c+"|",")?"]}return f+e[0]+b+e[1]}function h(e,f){var g,h,i,j,k;return g=e[2]||e[3],k=b.params[g],i=a.substring(m,e.index),h=f?e[4]:e[4]||("*"==e[1]?".*":null),h&&(j=W.type(h)||d(W.type("string"),{pattern:new RegExp(h,b.caseInsensitive?"i":c)})),{id:g,regexp:h,segment:i,type:j,cfg:k}}b=T({params:{}},Q(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new W.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash,s.isOptional),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function u(a){T(this,a)}function v(){function a(a){return null!=a?a.toString().replace(/(~|\/)/g,function(a){return{"~":"~~","/":"~2F"}[a]}):a}function e(a){return null!=a?a.toString().replace(/(~~|~2F)/g,function(a){return{"~~":"~","~2F":"/"}[a]}):a}function f(){return{strict:p,caseInsensitive:m}}function i(a){return O(a)||R(a)&&O(a[a.length-1])}function j(){for(;w.length;){var a=w.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(r[a.name],l.invoke(a.def))}}function k(a){T(this,a||{})}W=this;var l,m=!1,p=!0,q=!1,r={},s=!0,w=[],x={string:{encode:a,decode:e,is:function(a){return null==a||!N(a)||"string"==typeof a},pattern:/[^\/]*/},int:{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return a!==c&&null!==a&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c}
419,decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^\/]*/},any:{encode:b.identity,decode:b.identity,equals:b.equals,pattern:/.*/}};v.$$getDefaultValue=function(a){if(!i(a.value))return a.value;if(!l)throw new Error("Injectable functions cannot be called at configuration time");return l.invoke(a.value)},this.caseInsensitive=function(a){return N(a)&&(m=a),m},this.strictMode=function(a){return N(a)&&(p=a),p},this.defaultSquashPolicy=function(a){if(!N(a))return q;if(a!==!0&&a!==!1&&!P(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return q=a,a},this.compile=function(a,b){return new t(a,T(f(),b))},this.isMatcher=function(a){if(!Q(a))return!1;var b=!0;return S(t.prototype,function(c,d){O(c)&&(b=b&&N(a[d])&&O(a[d]))}),b},this.type=function(a,b,c){if(!N(b))return r[a];if(r.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return r[a]=new u(T({name:a},b)),c&&(w.push({name:a,def:c}),s||j()),this},S(x,function(a,b){r[b]=new u(T({name:b},a))}),r=d(r,{}),this.$get=["$injector",function(a){return l=a,s=!1,j(),S(x,function(a,b){r[b]||(r[b]=new u(a))}),this}],this.Param=function(a,d,e,f){function j(a){var b=Q(a)?g(a):[],c=h(b,"value")===-1&&h(b,"type")===-1&&h(b,"squash")===-1&&h(b,"array")===-1;return c&&(a={value:a}),a.$$fn=i(a.value)?a.value:function(){return a.value},a}function k(c,d,e){if(c.type&&d)throw new Error("Param '"+a+"' has two type configurations.");return d?d:c.type?b.isString(c.type)?r[c.type]:c.type instanceof u?c.type:new u(c.type):"config"===e?r.any:r.string}function m(){var b={array:"search"===f&&"auto"},c=a.match(/\[\]$/)?{array:!0}:{};return T(b,c,e).array}function p(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!N(c)||null==c)return q;if(c===!0||P(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function s(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=R(a.replace)?a.replace:[],P(e)&&f.push({from:e,to:c}),g=o(f,function(a){return a.from}),n(i,function(a){return h(g,a.from)===-1}).concat(f)}function t(){if(!l)throw new Error("Injectable functions cannot be called at configuration time");var a=l.invoke(e.$$fn);if(null!==a&&a!==c&&!x.type.is(a))throw new Error("Default value ("+a+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return a}function v(a){function b(a){return function(b){return b.from===a}}function c(a){var c=o(n(x.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),N(a)?x.type.$normalize(a):t()}function w(){return"{Param:"+a+" "+d+" squash: '"+A+"' optional: "+z+"}"}var x=this;e=j(e),d=k(e,d,f);var y=m();d=y?d.$asArray(y,"search"===f):d,"string"!==d.name||y||"path"!==f||e.value!==c||(e.value="");var z=e.value!==c,A=p(e,z),B=s(e,y,z,A);T(this,{id:a,type:d,location:f,array:y,squash:A,replace:B,isOptional:z,value:v,dynamic:c,config:e,toString:w})},k.prototype={$$new:function(){return d(this,T(new k,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(k.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),S(b,function(b){S(g(b),function(b){h(a,b)===-1&&h(d,b)===-1&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return S(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return S(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var d,e,f,g,h,i=this.$$keys();for(d=0;d<i.length&&(e=this[i[d]],f=a[i[d]],f!==c&&null!==f||!e.isOptional);d++){if(g=e.type.$normalize(f),!e.type.is(g))return!1;if(h=e.type.encode(g),b.isString(h)&&!e.type.pattern.exec(h))return!1}return!0},$$parent:c},this.ParamSet=k}function w(a,d){function e(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function f(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function g(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return!N(d)||d}function h(d,e,f,g,h){function m(a,b,c){return"/"===q?a:b?q.slice(0,-1)+a:c?q.slice(1)+a:a}function n(a){function b(a){var b=a(f,d);return!!b&&(P(b)&&d.replace().url(b),!0)}if(!a||!a.defaultPrevented){p&&d.url()===p;p=c;var e,g=j.length;for(e=0;e<g;e++)if(b(j[e]))return;k&&b(k)}}function o(){return i=i||e.$on("$locationChangeSuccess",n)}
419var p,q=g.baseHref(),r=d.url();return l||o(),{sync:function(){n()},listen:function(){return o()},update:function(a){return a?void(r=d.url()):void(d.url()!==r&&(d.url(r),d.replace()))},push:function(a,b,e){var f=a.format(b||{});null!==f&&b&&b["#"]&&(f+="#"+b["#"]),d.url(f),p=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled),g=g&&h.history;var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),null!==i&&e&&e["#"]&&(i+="#"+e["#"]),i=m(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!O(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(P(a)){var b=a;a=function(){return b}}else if(!O(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=P(b);if(P(a)&&(a=d.compile(a)),!h&&!O(b)&&!R(b))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),T(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:P(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),T(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function x(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function m(a,b){if(!a)return c;var d=P(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=m(b);for(var h=e.split("."),i=0,j=h.length,k=b;i<j;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=A[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function n(a,b){B[a]||(B[a]=[]),B[a].push(b)}function q(a){for(var b=B[a]||[];b.length;)r(b.shift())}function r(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!P(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(A.hasOwnProperty(c))throw new Error("State '"+c+"' is already defined");var e=c.indexOf(".")!==-1?c.substring(0,c.lastIndexOf(".")):P(b.parent)?b.parent:Q(b.parent)&&P(b.parent.name)?b.parent.name:"";if(e&&!A[e])return n(e,b.self);for(var f in D)O(D[f])&&(b[f]=D[f](b,D.$delegates[f]));return A[c]=b,!b[C]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){z.$current.navigable==b&&j(a,c)||z.transitionTo(b,a,{inherit:!0,location:!1})}]),q(c),b}function s(a){return a.indexOf("*")>-1}function t(a){for(var b=a.split("."),c=z.$current.name.split("."),d=0,e=b.length;d<e;d++)"*"===b[d]&&(c[d]="*");return"**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length==c.length&&c.join("")===b.join("")}function u(a,b){return P(a)&&!N(b)?D[a]:O(b)&&P(a)?(D[a]&&!D.$delegates[a]&&(D.$delegates[a]=D[a]),D[a]=b,this):this}function v(a,b){return Q(a)?b=a:b.name=a,r(b),this}function w(a,e,f,h,j,l,n,q,r){function u(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return n.update(),E;if(!g.retry)return null;if(f.$retry)return n.update(),F;var h=z.transition=e.when(g.retry);return h.then(function(){return h!==z.transition?(a.$broadcast("$stateChangeCancel",b.to,b.toParams,c,d),B):(b.options.$retry=!0,z.transitionTo(b.to,b.toParams,b.options))},function(){return E}),n.update(),h}function v(a,c,d,g,i,l){function m(){var c=[];return S(a.views,function(d,e){var g=d.resolve&&d.resolve!==a.resolve?d.resolve:{};g.$template=[function(){return f.load(e,{view:d,locals:i.globals,params:n,notify:l.notify})||""}],c.push(j.resolve(g,i.globals,i.resolve,a).then(function(c){if(O(d.controllerProvider)||R(d.controllerProvider)){var f=b.extend({},g,i.globals);c.$$controller=h.invoke(d.controllerProvider,null,f)}else c.$$controller=d.controller;c.$$state=a,c.$$controllerAs=d.controllerAs,c.$$resolveAs=d.resolveAs,i[e]=c}))}),e.all(c).then(function(){return i.globals})}var n=d?c:k(a.params.$$keys(),c),o={$stateParams:n};i.resolve=j.resolve(a.resolve,o,i.resolve,a);var p=[i.resolve.then(function(a){i.globals=a})];return g&&p.push(g),e.all(p).then(m).then(function(a){return i})}var w=new Error("transition superseded"),B=p(e.reject(w)),D=p(e.reject(new Error("transition prevented"))),E=p(e.reject(new Error("transition aborted"))),F=p(e.reject(new Error("transition failed")));return y.locals={resolve:null,globals:{$stateParams:{}}},z={params:{},current:y.self,$current:y,transition:null},z.reload=function(a){return z.transitionTo(z.current,l,{reload:a||!0,inherit:!1,notify:!0})},z.go=function(a,b,c){return z.transitionTo(a,b,T({inherit:!0,relative:z.$current},c))},z.transitionTo=function(b,c,f){c=c||{},f=T({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=z.$current,o=z.params,q=j.path,r=m(b,f.relative),s=c["#"];if(!N(r)){var t={to:b,toParams:c,options:f},A=u(t,j.self,o,f);
419if(A)return A;if(b=t.to,c=t.toParams,f=t.options,r=m(b,f.relative),!N(r)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(r[C])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(l,c||{},z.$current,r)),!r.params.$$validates(c))return F;c=r.params.$$values(c),b=r;var E=b.path,G=0,H=E[G],I=y.locals,J=[];if(f.reload){if(P(f.reload)||Q(f.reload)){if(Q(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");var K=f.reload===!0?q[0]:m(f.reload);if(f.reload&&!K)throw new Error("No such reload state '"+(P(f.reload)?f.reload:f.reload.name)+"'");for(;H&&H===q[G]&&H!==K;)I=J[G]=H.locals,G++,H=E[G]}}else for(;H&&H===q[G]&&H.ownParams.$$equals(c,o);)I=J[G]=H.locals,G++,H=E[G];if(x(b,c,j,o,I,f))return s&&(c["#"]=s),z.params=c,U(z.params,l),U(k(b.params.$$keys(),l),b.locals.globals.$stateParams),f.location&&b.navigable&&b.navigable.url&&(n.push(b.navigable.url,c,{$$avoidResync:!0,replace:"replace"===f.location}),n.update(!0)),z.transition=null,e.when(z.current);if(c=k(b.params.$$keys(),c||{}),s&&(c["#"]=s),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,o,f).defaultPrevented)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,o),null==z.transition&&n.update(),D;for(var L=e.when(I),M=G;M<E.length;M++,H=E[M])I=J[M]=d(I),L=v(H,c,H===b,L,I,f);var O=z.transition=L.then(function(){var d,e,g;if(z.transition!==O)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,o),B;for(d=q.length-1;d>=G;d--)g=q[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=G;d<E.length;d++)e=E[d],e.locals=J[d],e.self.onEnter&&h.invoke(e.self.onEnter,e.self,e.locals.globals);return z.transition!==O?(a.$broadcast("$stateChangeCancel",b.self,c,j.self,o),B):(z.$current=b,z.current=b.self,z.params=c,U(z.params,l),z.transition=null,f.location&&b.navigable&&n.push(b.navigable.url,b.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===f.location}),f.notify&&a.$broadcast("$stateChangeSuccess",b.self,c,j.self,o),n.update(!0),z.current)}).then(null,function(d){return d===w?B:z.transition!==O?(a.$broadcast("$stateChangeCancel",b.self,c,j.self,o),B):(z.transition=null,g=a.$broadcast("$stateChangeError",b.self,c,j.self,o,d),g.defaultPrevented||n.update(),e.reject(d))});return p(O),O},z.is=function(a,b,d){d=T({relative:z.$current},d||{});var e=m(a,d.relative);return N(e)?z.$current===e&&(!b||g(b).reduce(function(a,c){var d=e.params[c];return a&&!d||d.type.equals(l[c],b[c])},!0)):c},z.includes=function(a,b,d){if(d=T({relative:z.$current},d||{}),P(a)&&s(a)){if(!t(a))return!1;a=z.$current.name}var e=m(a,d.relative);if(!N(e))return c;if(!N(z.$current.includes[e.name]))return!1;if(!b)return!0;for(var f=g(b),h=0;h<f.length;h++){var i=f[h],j=e.params[i];if(j&&!j.type.equals(l[i],b[i]))return!1}return g(b).reduce(function(a,c){var d=e.params[c];return a&&!d||d.type.equals(l[c],b[c])},!0)},z.href=function(a,b,d){d=T({lossy:!0,inherit:!0,absolute:!1,relative:z.$current},d||{});var e=m(a,d.relative);if(!N(e))return null;d.inherit&&(b=i(l,b||{},z.$current,e));var f=e&&d.lossy?e.navigable:e;return f&&f.url!==c&&null!==f.url?n.href(f.url,k(e.params.$$keys().concat("#"),b||{}),{absolute:d.absolute}):null},z.get=function(a,b){if(0===arguments.length)return o(g(A),function(a){return A[a].self});var c=m(a,b||z.$current);return c&&c.self?c.self:null},z}function x(a,b,c,d,e,f){function g(a,b,c){function d(b){return"search"!=a.params[b].location}var e=a.params.$$keys().filter(d),f=l.apply({}
419,[a.params].concat(e)),g=new W.ParamSet(f);return g.$$equals(b,c)}if(!f.reload&&a===c&&(e===c.locals||a.self.reloadOnSearch===!1&&g(c,d,b)))return!0}var y,z,A={},B={},C="abstract",D={parent:function(a){if(N(a.parent)&&a.parent)return m(a.parent);var b=/^(.+)\.[^.]+$/.exec(a.name);return b?m(b[1]):y},data:function(a){return a.parent&&a.parent.data&&(a.data=a.self.data=d(a.parent.data,a.data)),a.data},url:function(a){var b=a.url,c={params:a.params||{}};if(P(b))return"^"==b.charAt(0)?e.compile(b.substring(1),c):(a.parent.navigable||y).url.concat(b,c);if(!b||e.isMatcher(b))return b;throw new Error("Invalid url '"+b+"' in state '"+a+"'")},navigable:function(a){return a.url?a:a.parent?a.parent.navigable:null},ownParams:function(a){var b=a.url&&a.url.params||new W.ParamSet;return S(a.params||{},function(a,c){b[c]||(b[c]=new W.Param(c,null,a,"config"))}),b},params:function(a){var b=l(a.ownParams,a.ownParams.$$keys());return a.parent&&a.parent.params?T(a.parent.params.$$new(),b):new W.ParamSet},views:function(a){var b={};return S(N(a.views)?a.views:{"":a},function(c,d){d.indexOf("@")<0&&(d+="@"+a.parent.name),c.resolveAs=c.resolveAs||a.resolveAs||"$resolve",b[d]=c}),b},path:function(a){return a.parent?a.parent.path.concat(a):[]},includes:function(a){var b=a.parent?T({},a.parent.includes):{};return b[a.name]=!0,b},$delegates:{}};y=r({name:"",url:"^",views:null,abstract:!0}),y.navigable=null,this.decorator=u,this.state=v,this.$get=w,w.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function y(){function a(a,b){return{load:function(a,c){var d,e={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return c=T(e,c),c.view&&(d=b.fromConfig(c.view,c.params,c.locals)),d}}}this.$get=a,a.$inject=["$rootScope","$templateFactory"]}function z(){var a=!1;this.useAnchorScroll=function(){a=!0},this.$get=["$anchorScroll","$timeout",function(b,c){return a?b:function(a){return c(function(){a[0].scrollIntoView()},0,!1)}}]}function A(a,c,d,e,f){function g(){return c.has?function(a){return c.has(a)?c.get(a):null}:function(a){try{return c.get(a)}catch(a){return null}}}function h(a,c){var d=function(){return{enter:function(a,b,c){b.after(a),c()},leave:function(a,b){a.remove(),b()}}};if(k)return{enter:function(a,c,d){b.version.minor>2?k.enter(a,null,c).then(d):k.enter(a,null,c,d)},leave:function(a,c){b.version.minor>2?k.leave(a).then(c):k.leave(a,c)}};if(j){var e=j&&j(c,a);return{enter:function(a,b,c){e.enter(a,null,b),c()},leave:function(a,b){e.leave(a),b()}}}return d()}var i=g(),j=i("$animator"),k=i("$animate"),l={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(c,g,i){return function(c,g,j){function k(){if(m&&(m.remove(),m=null),o&&(o.$destroy(),o=null),n){var a=n.data("$uiViewAnim");s.leave(n,function(){a.$$animLeave.resolve(),m=null}),m=n,n=null}}function l(h){var l,m=C(c,j,g,e),t=m&&a.$current&&a.$current.locals[m];if(h||t!==p){l=c.$new(),p=a.$current.locals[m],l.$emit("$viewContentLoading",m);var u=i(l,function(a){var e=f.defer(),h=f.defer(),i={$animEnter:e.promise,$animLeave:h.promise,$$animLeave:h};a.data("$uiViewAnim",i),s.enter(a,g,function(){e.resolve(),o&&o.$emit("$viewContentAnimationEnded"),(b.isDefined(r)&&!r||c.$eval(r))&&d(a)}),k()});n=u,o=l,o.$emit("$viewContentLoaded",m),o.$eval(q)}}var m,n,o,p,q=j.onload||"",r=j.autoscroll,s=h(j,c);g.inheritedData("$uiView");c.$on("$stateChangeSuccess",function(){l(!1)}),l(!0)}}};return l}function B(a,c,d,e){return{restrict:"ECA",priority:-400,compile:function(f){var g=f.html();return f.empty?f.empty():f[0].innerHTML=null,function(f,h,i){var j=d.$current,k=C(f,i,h,e),l=j&&j.locals[k];if(!l)return h.html(g),void a(h.contents())(f);h.data("$uiView",{name:k,state:l.$$state}),h.html(l.$template?l.$template:g);var m=b.extend({},l);f[l.$$resolveAs]=m;var n=a(h.contents());if(l.$$controller){l.$scope=f,l.$element=h;var o=c(l.$$controller,l);l.$$controllerAs&&(f[l.$$controllerAs]=o,f[l.$$controllerAs][l.$$resolveAs]=m),O(o.$onInit)&&o.$onInit(),h.data("$ngControllerController",o),h.children().data("$ngControllerController",o)}n(f)}}}}function C(a,b,c,d){var e=d(b.uiView||b.name||"")(a),f=c.inheritedData("$uiView");return e.indexOf("@")>=0?e:e+"@"+(f?f.state.name:"")}function D(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function E(a){var b=a.parent().inheritedData("$uiView");if(b&&b.state&&b.state.name)return b.state}function F(a){var b="[object SVGAnimatedString]"===Object.prototype.toString.call(a.prop("href")),c="FORM"===a[0].nodeName;return{attr:c?"action":b?"xlink:href":"href",isAnchor:"A"===a.prop("tagName").toUpperCase(),clickable:!c}}function G(a,b,c,d,e){return function(f){var g=f.which||f.button,h=e();if(!(g>1||f.ctrlKey||f.metaKey||f.shiftKey||a.attr("target"))){var i=c(function(){b.go(h.state,h.params,h.options)});f.preventDefault();var j=d.isAnchor&&!h.href?1:0;f.preventDefault=function(){j--<=0&&c.cancel(i)}}}}function H(a,b){return{relative:E(a)||b.$current,inherit:!0}}function I(a,c){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(d,e,f,g){var h,i=D(f.uiSref,a.current.name),j={state:i.state,href:null,params:null},k=F(e),l=g[1]||g[0],m=null;j.options=T(H(e,a),f.uiSrefOpts?d.$eval(f.uiSrefOpts):{});var n=function(c){c&&(j.params=b.copy(c)),j.href=a.href(i.state,j.params,j.options),m&&m(),l&&(m=l.$$addStateInfo(i.state,j.params)),null!==j.href&&f.$set(k.attr,j.href)};i.paramExpr&&(d.$watch(i.paramExpr,function(a){a!==j.params&&n(a)},!0),j.params=b.copy(d.$eval(i.paramExpr))),n(),k.clickable&&(h=G(e,a,c,k,function(){return j}),e[e.on?"on":"bind"]("click",h),d.$on("$destroy",function(){e[e.off?"off":"unbind"]("click",h)}))}}}function J(a,b){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(c,d,e,f){function g(b){m.state=b[0],m.params=b[1],m.options=b[2],m.href=a.href(m.state,m.params,m.options),n&&n(),j&&(n=j.$$addStateInfo(m.state,m.params)),m.href&&e.$set(i.attr,m.href)}var h,i=F(d),j=f[1]||f[0],k=[e.uiState,e.uiStateParams||null,e.uiStateOpts||null],l="["+k.map(function(a){return a||"null"}).join(", ")+"]",m={state:null,params:null,options:null,href:null},n=null;c.$watch(l,g,!0),g(c.$eval(l)),i.clickable&&(h=G(d,a,b,i,function(){return m}),d[d.on?"on":"bind"]("click",h),c.$on("$destroy",function(){d[d.off?"off":"unbind"]("click",h)}))}}}function K(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(b,d,e,f){function g(b,c,e){var f=a.get(b,E(d)),g=h(b,c),i={state:f||{name:b},params:c,hash:g};return p.push(i),q[g]=e,function(){var a=p.indexOf(i);a!==-1&&p.splice(a,1)}}function h(a,c){if(!P(a))throw new Error("state should be a string");return Q(c)?a+V(c):(c=b.$eval(c),Q(c)?a+V(c):a)}function i(){for(var a=0;a<p.length;a++)l(p[a].state,p[a].params)?j(d,q[p[a].hash]):k(d,q[p[a].hash]),m(p[a].state,p[a].params)?j(d,n):k(d,n)}function j(a,b){f(function(){a.addClass(b)})}function k(a,b){a.removeClass(b)}function l(b,c){return a.includes(b.name,c)}function m(b,c){return a.is(b.name,c)}var n,o,p=[],q={};n=c(e.uiSrefActiveEq||"",!1)(b);try{o=b.$eval(e.uiSrefActive)}catch(a){}o=o||c(e.uiSrefActive||"",!1)(b),Q(o)&&S(o,function(c,d){if(P(c)){var e=D(c,a.current.name);g(e.state,b.$eval(e.paramExpr),d)}}),this.$$addStateInfo=function(a,b){if(!(Q(o)&&p.length>0)){var c=g(a,b,o);return i(),c}},b.$on("$stateChangeSuccess",i),i()}]}}function L(a){var b=function(b,c){return a.is(b,c)};return b.$stateful=!0,b}function M(a){var b=function(b,c,d){return a.includes(b,c,d)};return b.$stateful=!0,b}
419var N=b.isDefined,O=b.isFunction,P=b.isString,Q=b.isObject,R=b.isArray,S=b.forEach,T=b.extend,U=b.copy,V=b.toJson;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),q.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",q),b.module("ui.router.util").provider("$templateFactory",r);var W;t.prototype.concat=function(a,b){var c={caseInsensitive:W.caseInsensitive(),strict:W.strictMode(),squash:W.defaultSquashPolicy()};return new t(this.sourcePath+a+this.sourceSearch,T(c,b),this)},t.prototype.toString=function(){return this.source},t.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/g,"-")}var d=b(a).split(/-(?!\\)/),e=o(d,b);return o(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var l,m;for(e=0;e<j;e++){for(g=h[e],l=this.params[g],m=d[e+1],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);m&&l.array===!0&&(m=c(m)),N(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}for(;e<i;e++){for(g=h[e],k[g]=this.params[g].value(b[g]),l=this.params[g],m=b[g],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);N(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}return k},t.prototype.parameters=function(a){return N(a)?this.params[a]||null:this.$$paramNames},t.prototype.validates=function(a){return this.params.$$validates(a)},t.prototype.format=function(a){function b(a){return encodeURIComponent(a).replace(/-/g,function(a){return"%5C%"+a.charCo
419deAt(0).toString(16).toUpperCase()})}a=a||{};var c=this.segments,d=this.parameters(),e=this.params;if(!this.validates(a))return null;var f,g=!1,h=c.length-1,i=d.length,j=c[0];for(f=0;f<i;f++){var k=f<h,l=d[f],m=e[l],n=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),n),q=!!p&&m.squash,r=m.type.encode(n);if(k){var s=c[f+1],t=f+1===h;if(q===!1)null!=r&&(j+=R(r)?o(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var u=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(u)[1]}else P(q)&&(j+=q+s);t&&m.squash===!0&&"/"===j.slice(-1)&&(j=j.slice(0,-1))}else{if(null==r||p&&q!==!1)continue;if(R(r)||(r=[r]),0===r.length)continue;r=o(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},u.prototype.is=function(a,b){return!0},u.prototype.encode=function(a,b){return a},u.prototype.decode=function(a,b){return a},u.prototype.equals=function(a,b){return a==b},u.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},u.prototype.pattern=/.*/,u.prototype.toString=function(){return"{Type:"+this.name+"}"},u.prototype.$normalize=function(a){return this.is(a)?a:this.decode(a)},u.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return R(a)?a:N(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){if(R(c)&&0===c.length)return c;c=e(c);var d=o(c,a);return b===!0?0===n(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1; 420for(var g=0;g<d.length;g++)if(!a(d[g],f[g]))return!1;return!0}}this.encode=h(d(a,"encode")),this.decode=h(d(a,"decode")),this.is=h(d(a,"is"),!0),this.equals=i(d(a,"equals")),this.pattern=a.pattern,this.$normalize=h(d(a,"$normalize")),this.name=a.name,this.$arrayMode=b}if(!a)return this;if("auto"===a&&!b)throw new Error("'auto' array mode is for query parameters only");return new d(this,a)},b.module("ui.router.util").provider("$urlMatcherFactory",v),b.module("ui.router.util").run(["$urlMatcherFactory",function(a){}]),w.$inject=["$locationProvider","$urlMatcherFactoryProvider"],b.module("ui.router.router").provider("$urlRouter",w),x.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],b.module("ui.router.state").factory("$stateParams",function(){return{}}).constant("$state.runtime",{autoinject:!0}).provider("$state",x).run(["$injector",function(a){a.get("$state.runtime").autoinject&&a.get("$state")}]),y.$inject=[],b.module("ui.router.state").provider("$view",y),b.module("ui.router.state").provider("$uiViewScroll",z),A.$inject=["$state","$injector","$uiViewScroll","$interpolate","$q"],B.$inject=["$compile","$controller","$state","$interpolate"],b.module("ui.router.state").directive("uiView",A),b.module("ui.router.state").directive("uiView",B),I.$inject=["$state","$timeout"],J.$inject=["$state","$timeout"],K.$inject=["$state","$stateParams","$interpolate"],b.module("ui.router.state").directive("uiSref",I).directive("uiSrefActive",K).directive("uiSrefActiveEq",K).directive("uiState",J),L.$inject=["$state"],M.$inject=["$state"],b.module("ui.router.state").filter("isState",L).filter("includedByState",M)}(window,window.angular);; 421/* 422 AngularJS v1.8.2 423 (c) 2010-2020 Google LLC. http://angularjs.org 424 License: MIT 425*/ 426(function(Y,z){'use strict';function Fa(a,b,c){if(!a)throw Pa("areq",b||"?",c||"required");return a}function Ga(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;Z(a)&&(a=a.join(" "));Z(b)&&(b=b.join(" "));return a+" "+b}function Qa(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function $(a,b,c){var d="";a=Z(a)?a:a&&G(a)&&a.length?a.split(/\s+/):[];s(a,function(a,k){a&&0<a.length&&(d+=0<k?" ":"",d+=c?b+a:a+b)});return d}function Ha(a){if(a instanceof A)switch(a.length){case 0:return a; 427case 1:if(1===a[0].nodeType)return a;break;default:return A(va(a))}if(1===a.nodeType)return A(a)}
vendor: 3,501 bytes, lines 427-434
427function va(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1===c.nodeType)return c}}function Ra(a,b,c){s(b,function(b){a.addClass(b,c)})}function Sa(a,b,c){s(b,function(b){a.removeClass(b,c)})}function aa(a){return function(b,c){c.addClass&&(Ra(a,b,c.addClass),c.addClass=null);c.removeClass&&(Sa(a,b,c.removeClass),c.removeClass=null)}}function pa(a){a=a||{};if(!a.$$prepared){var b=a.domOperation|| 428N;a.domOperation=function(){a.$$domOperationFired=!0;b();b=N};a.$$prepared=!0}return a}function ha(a,b){Ia(a,b);Ja(a,b)}function Ia(a,b){b.from&&(a.css(b.from),b.from=null)}function Ja(a,b){b.to&&(a.css(b.to),b.to=null)}function T(a,b,c){var d=b.options||{};c=c.options||{};var f=(d.addClass||"")+" "+(c.addClass||""),k=(d.removeClass||"")+" "+(c.removeClass||"");a=Ta(a.attr("class"),f,k);c.preparationClasses&&(d.preparationClasses=ba(c.preparationClasses,d.preparationClasses),delete c.preparationClasses); 429f=d.domOperation!==N?d.domOperation:null;wa(d,c);f&&(d.domOperation=f);d.addClass=a.addClass?a.addClass:null;d.removeClass=a.removeClass?a.removeClass:null;b.addClass=d.addClass;b.removeClass=d.removeClass;return d}function Ta(a,b,c){function d(a){G(a)&&(a=a.split(" "));var c={};s(a,function(a){a.length&&(c[a]=!0)});return c}var f={};a=d(a);b=d(b);s(b,function(a,c){f[c]=1});c=d(c);s(c,function(a,c){f[c]=1===f[c]?null:-1});var k={addClass:"",removeClass:""};s(f,function(c,b){var d,f;1===c?(d="addClass", 430f=!a[b]||a[b+"-remove"]):-1===c&&(d="removeClass",f=a[b]||a[b+"-add"]);f&&(k[d].length&&(k[d]+=" "),k[d]+=b)});return k}function K(a){return a instanceof A?a[0]:a}function Ua(a,b,c,d){a="";c&&(a=$(c,"ng-",!0));d.addClass&&(a=ba(a,$(d.addClass,"-add")));d.removeClass&&(a=ba(a,$(d.removeClass,"-remove")));a.length&&(d.preparationClasses=a,b.addClass(a))}function xa(a,b){var c=b?"paused":"",d=ca+"PlayState";ma(a,[d,c]);return[d,c]}function ma(a,b){a.style[b[0]]=b[1]}function ba(a,b){return a?b?a+" "+ 431b:a:b}function Ka(a,b,c){var d=Object.create(null),f=a.getComputedStyle(b)||{};s(c,function(a,c){var b=f[a];if(b){var L=b.charAt(0);if("-"===L||"+"===L||0<=L)b=Va(b);0===b&&(b=null);d[c]=b}});return d}function Va(a){var b=0;a=a.split(/\s*,\s*/);s(a,function(a){"s"===a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function ya(a){return 0===a||null!=a}function La(a,b){var c=M,d=a+"s";b?c+="Duration":d+=" linear all";return[c,d]}function Ma(a,b,c){s(c, 432function(c){a[c]=za(a[c])?a[c]:b.style.getPropertyValue(c)})}var M,Aa,ca,Ba;void 0===Y.ontransitionend&&void 0!==Y.onwebkittransitionend?(M="WebkitTransition",Aa="webkitTransitionEnd transitionend"):(M="transition",Aa="transitionend");void 0===Y.onanimationend&&void 0!==Y.onwebkitanimationend?(ca="WebkitAnimation",Ba="webkitAnimationEnd animationend"):(ca="animation",Ba="animationend");var qa=ca+"Delay",Ca=ca+"Duration",na=M+"Delay",Na=M+"Duration",Pa=z.$$minErr("ng"),ra={blockTransitions:function(a, 433b){var c=b?"-"+b+"s":"";ma(a,[na,c]);return[na,c]}},Wa={transitionDuration:Na,transitionDelay:na,transitionProperty:M+"Property",animationDuration:Ca,animationDelay:qa,animationIterationCount:ca+"IterationCount"},Xa={transitionDuration:Na,transitionDelay:na,animationDuration:Ca,animationDelay:qa},Da,wa,s,Z,za,sa,Ea,ta,G,R,A,N;z.module("ngAnimate",[],function(){N=z.noop;Da=z.copy;wa=z.extend;A=z.element;s=z.forEach;Z=z.isArray;G=z.isString;ta=z.isObject;R=z.isUndefined;za=z.isDefined;Ea=z.isFunction; 434sa=z.isElement}).info({angularVersion:"1.8.2
vendor: 22,610 bytes, lines 434-479
434"}).directive("ngAnimateSwap",["$animate",function(a){return{restrict:"A",transclude:"element",terminal:!0,priority:550,link:function(b,c,d,f,k){var e,Q;b.$watchCollection(d.ngAnimateSwap||d["for"],function(b){e&&a.leave(e);Q&&(Q.$destroy(),Q=null);(b||0===b)&&k(function(b,d){e=b;Q=d;a.enter(b,null,c)})})}}}]).directive("ngAnimateChildren",["$interpolate",function(a){return{link:function(b,c,d){function f(a){c.data("$$ngAnimateChildren","on"===a||"true"=== 435a)}var k=d.ngAnimateChildren;G(k)&&0===k.length?c.data("$$ngAnimateChildren",!0):(f(a(k)(b)),d.$observe("ngAnimateChildren",f))}}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d=d.concat(a);c()}function c(){if(d.length){for(var b=d.shift(),e=0;e<b.length;e++)b[e]();f||a(function(){f||c()})}}var d,f;d=b.queue=[];b.waitUntilQuiet=function(b){f&&f();f=a(function(){f=null;b();c()})};return b}]).provider("$$animateQueue",["$animateProvider",function(a){function b(a){return{addClass:a.addClass, 436removeClass:a.removeClass,from:a.from,to:a.to}}function c(a){if(!a)return null;a=a.split(" ");var b=Object.create(null);s(a,function(a){b[a]=!0});return b}function d(a,b){if(a&&b){var d=c(b);return a.split(" ").some(function(a){return d[a]})}}function f(a,b,c){return e[a].some(function(a){return a(b,c)})}function k(a,b){var c=0<(a.addClass||"").length,d=0<(a.removeClass||"").length;return b?c&&d:c||d}var e=this.rules={skip:[],cancel:[],join:[]};e.join.push(function(a,b){return!a.structural&&k(a)}); 437e.skip.push(function(a,b){return!a.structural&&!k(a)});e.skip.push(function(a,b){return"leave"===b.event&&a.structural});e.skip.push(function(a,b){return b.structural&&2===b.state&&!a.structural});e.cancel.push(function(a,b){return b.structural&&a.structural});e.cancel.push(function(a,b){return 2===b.state&&a.structural});e.cancel.push(function(a,b){if(b.structural)return!1;var c=a.addClass,f=a.removeClass,k=b.addClass,e=b.removeClass;return R(c)&&R(f)||R(k)&&R(e)?!1:d(c,e)||d(f,k)});this.$get=["$$rAF", 438"$rootScope","$rootElement","$document","$$Map","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow","$$isDocumentHidden",function(c,d,e,C,U,oa,H,u,t,I,da){function ia(a){O.delete(a.target)}function v(){var a=!1;return function(b){a?b():d.$$postDigest(function(){a=!0;b()})}}function ua(a,b,c){var g=[],l=m[c];l&&s(l,function(l){Oa.call(l.node,b)?g.push(l.callback):"leave"===c&&Oa.call(l.node,a)&&g.push(l.callback)});return g}function h(a,b,c){var l=va(b);return a.filter(function(a){return!(a.node=== 439l&&(!c||a.callback===c))})}function q(a,J,w){function e(a,b,l,g){u(function(){var a=ua(ia,m,b);a.length?c(function(){s(a,function(a){a(h,l,g)});"close"!==l||m.parentNode||D.off(m)}):"close"!==l||m.parentNode||D.off(m)});a.progress(b,l,g)}function I(a){var b=h,c=n;c.preparationClasses&&(b.removeClass(c.preparationClasses),c.preparationClasses=null);c.activeClasses&&(b.removeClass(c.activeClasses),c.activeClasses=null);W(h,n);ha(h,n);n.domOperation();q.complete(!a)}var n=Da(w),h=Ha(a),m=K(h),ia=m&& 440m.parentNode,n=pa(n),q=new H,u=v();Z(n.addClass)&&(n.addClass=n.addClass.join(" "));n.addClass&&!G(n.addClass)&&(n.addClass=null);Z(n.removeClass)&&(n.removeClass=n.removeClass.join(" "));n.removeClass&&!G(n.removeClass)&&(n.removeClass=null);n.from&&!ta(n.from)&&(n.from=null);n.to&&!ta(n.to)&&(n.to=null);if(!(B&&m&&fa(m,J,w)&&Ya(m,n)))return I(),q;var x=0<=["enter","move","leave"].indexOf(J),r=da(),P=r||O.get(m);w=!P&&y.get(m)||{};var p=!!w.state;P||p&&1===w.state||(P=!E(m,ia,J));if(P)return r&& 441e(q,J,"start",b(n)),I(),r&&e(q,J,"close",b(n)),q;x&&F(m);r={structural:x,element:h,event:J,addClass:n.addClass,removeClass:n.removeClass,close:I,options:n,runner:q};if(p){if(f("skip",r,w)){if(2===w.state)return I(),q;T(h,w,r);return w.runner}if(f("cancel",r,w))if(2===w.state)w.runner.end();else if(w.structural)w.close();else return T(h,w,r),w.runner;else if(f("join",r,w))if(2===w.state)T(h,r,{});else return Ua(t,h,x?J:null,n),J=r.event=w.event,n=T(h,w,r),w.runner}else T(h,r,{});(p=r.structural)|| 442(p="animate"===r.event&&0<Object.keys(r.options.to||{}).length||k(r));if(!p)return I(),g(m),q;var C=(w.counter||0)+1;r.counter=C;l(m,1,r);d.$$postDigest(function(){h=Ha(a);var c=y.get(m),d=!c,c=c||{},t=0<(h.parent()||[]).length&&("animate"===c.event||c.structural||k(c));if(d||c.counter!==C||!t){d&&(W(h,n),ha(h,n));if(d||x&&c.event!==J)n.domOperation(),q.end();t||g(m)}else J=!c.structural&&k(c,!0)?"setClass":c.event,l(m,2),c=oa(h,J,c.options),q.setHost(c),e(q,J,"start",b(n)),c.done(function(a){I(!a); 443(a=y.get(m))&&a.counter===C&&g(m);e(q,J,"close",b(n))})});return q}function F(a){a=a.querySelectorAll("[data-ng-animate]");s(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate"),10),c=y.get(a);if(c)switch(b){case 2:c.runner.end();case 1:y.delete(a)}})}function g(a){a.removeAttribute("data-ng-animate");y.delete(a)}function E(a,b,c){c=C[0].body;var l=K(e),g=a===c||"HTML"===a.nodeName,d=a===l,t=!1,m=O.get(a),h;for((a=A.data(a,"$ngAnimatePin"))&&(b=K(a));b;){d||(d=b===l);if(1!==b.nodeType)break; 444a=y.get(b)||{};if(!t){var f=O.get(b);if(!0===f&&!1!==m){m=!0;break}else!1===f&&(m=!1);t=a.structural}if(R(h)||!0===h)a=A.data(b,"$$ngAnimateChildren"),za(a)&&(h=a);if(t&&!1===h)break;g||(g=b===c);if(g&&d)break;if(!d&&(a=A.data(b,"$ngAnimatePin"))){b=K(a);continue}b=b.parentNode}return(!t||h)&&!0!==m&&d&&g}function l(a,b,c){c=c||{};c.state=b;a.setAttribute("data-ng-animate",b);c=(b=y.get(a))?wa(b,c):c;y.set(a,c)}var y=new U,O=new U,B=null,P=d.$watch(function(){return 0===u.totalPendingRequests},function(a){a&& 445(P(),d.$$postDigest(function(){d.$$postDigest(function(){null===B&&(B=!0)})}))}),m=Object.create(null);U=a.customFilter();var la=a.classNameFilter();I=function(){return!0};var fa=U||I,Ya=la?function(a,b){var c=[a.getAttribute("class"),b.addClass,b.removeClass].join(" ");return la.test(c)}:I,W=aa(t),Oa=Y.Node.prototype.contains||function(a){return this===a||!!(this.compareDocumentPosition(a)&16)},D={on:function(a,b,c){var l=va(b);m[a]=m[a]||[];m[a].push({node:l,callback:c});A(b).on("$destroy",function(){y.get(l)|| 446D.off(a,b,c)})},off:function(a,b,c){if(1!==arguments.length||G(arguments[0])){var l=m[a];l&&(m[a]=1===arguments.length?null:h(l,b,c))}else for(l in b=arguments[0],m)m[l]=h(m[l],b)},pin:function(a,b){Fa(sa(a),"element","not an element");Fa(sa(b),"parentElement","not an element");a.data("$ngAnimatePin",b)},push:function(a,b,c,l){c=c||{};c.domOperation=l;return q(a,b,c)},enabled:function(a,b){var c=arguments.length;if(0===c)b=!!B;else if(sa(a)){var l=K(a);if(1===c)b=!O.get(l);else{if(!O.has(l))A(a).on("$destroy", 447ia);O.set(l,!b)}}else b=B=!!a;return b}};return D}]}]).provider("$$animateCache",function(){var a=0,b=Object.create(null);this.$get=[function(){return{cacheKey:function(b,d,f,k){var e=b.parentNode;b=[e.$$ngAnimateParentKey||(e.$$ngAnimateParentKey=++a),d,b.getAttribute("class")];f&&b.push(f);k&&b.push(k);return b.join(" ")},containsCachedAnimationWithoutDuration:function(a){return(a=b[a])&&!a.isValid||!1},flush:function(){b=Object.create(null)},count:function(a){return(a=b[a])?a.total:0},get:function(a){return(a= 448b[a])&&a.value},put:function(a,d,f){b[a]?(b[a].total++,b[a].value=d):b[a]={total:1,value:d,isValid:f}}}}]}).provider("$$animation",["$animateProvider",function(a){var b=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$Map","$$rAFScheduler","$$animateCache",function(a,d,f,k,e,Q,L){function x(a){function b(a){if(a.processed)return a;a.processed=!0;var d=a.domNode,t=d.parentNode;f.set(d,a);for(var h;t;){if(h=f.get(t)){h.processed||(h=b(h));break}t=t.parentNode}(h|| 449c).children.push(a);return a}var c={children:[]},d,f=new e;for(d=0;d<a.length;d++){var da=a[d];f.set(da.domNode,a[d]={domNode:da.domNode,element:da.element,fn:da.fn,children:[]})}for(d=0;d<a.length;d++)b(a[d]);return function(a){var b=[],c=[],d;for(d=0;d<a.children.length;d++)c.push(a.children[d]);a=c.length;var t=0,f=[];for(d=0;d<c.length;d++){var g=c[d];0>=a&&(a=t,t=0,b.push(f),f=[]);f.push(g);g.children.forEach(function(a){t++;c.push(a)});a--}f.length&&b.push(f);return b}(c)}var C=[],U=aa(a);return function(e, 450H,u){function t(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function I(a){var b=[],c={};s(a,function(a,d){var l=K(a.element),g=0<=["enter","move"].indexOf(a.event),l=a.structural?t(l):[];if(l.length){var f=g?"to":"from";s(l,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][f]={animationID:d,element:A(a)}})}else b.push(a)});var d={},g={};s(c,function(c, 451t){var f=c.from,e=c.to;if(f&&e){var h=a[f.animationID],k=a[e.animationID],E=f.animationID.toString();if(!g[E]){var I=g[E]={structural:!0,beforeStart:function(){h.beforeStart();k.beforeStart()},close:function(){h.close();k.close()},classes:da(h.classes,k.classes),from:h,to:k,anchors:[]};I.classes.length?b.push(I):(b.push(h),b.push(k))}g[E].anchors.push({out:f.element,"in":e.element})}else f=f?f.animationID:e.animationID,e=f.toString(),d[e]||(d[e]=!0,b.push(a[f]))});return b}function da(a,b){a=a.split(" "); 452b=b.split(" ");for(var c=[],d=0;d<a.length;d++){var g=a[d];if("ng-"!==g.substring(0,3))for(var t=0;t<b.length;t++)if(g===b[t]){c.push(g);break}}return c.join(" ")}function ia(a){for(var c=b.length-1;0<=c;c--){var d=f.get(b[c])(a);if(d)return d}}function v(a,b){function c(a){(a=a.data("$$animationRunner"))&&a.setHost(b)}a.from&&a.to?(c(a.from.element),c(a.to.element)):c(a.element)}function ua(){var a=e.data("$$animationRunner");!a||"leave"===H&&u.$$domOperationFired||a.end()}function h(b){e.off("$destroy", 453ua);e.removeData("$$animationRunner");U(e,u);ha(e,u);u.domOperation();E&&a.removeClass(e,E);F.complete(!b)}u=pa(u);var q=0<=["enter","move","leave"].indexOf(H),F=new k({end:function(){h()},cancel:function(){h(!0)}});if(!b.length)return h(),F;var g=Ga(e.attr("class"),Ga(u.addClass,u.removeClass)),E=u.tempClasses;E&&(g+=" "+E,u.tempClasses=null);q&&e.data("$$animatePrepareClasses","ng-"+H+"-prepare");e.data("$$animationRunner",F);C.push({element:e,classes:g,event:H,structural:q,options:u,beforeStart:function(){E= 454(E?E+" ":"")+"ng-animate";a.addClass(e,E);var b=e.data("$$animatePrepareClasses");b&&a.removeClass(e,b)},close:h});e.on("$destroy",ua);if(1<C.length)return F;d.$$postDigest(function(){var b=[];s(C,function(a){a.element.data("$$animationRunner")?b.push(a):a.close()});C.length=0;var d=I(b),g=[];s(d,function(a){var b=a.from?a.from.element:a.element,c=u.addClass,d=L.cacheKey(b[0],a.event,(c?c+" ":"")+"ng-animate",u.removeClass);g.push({element:b,domNode:K(b),fn:function(){var b,c=a.close;if(L.containsCachedAnimationWithoutDuration(d))c(); 455else{a.beforeStart();if((a.anchors?a.from.element||a.to.element:a.element).data("$$animationRunner")){var g=ia(a);g&&(b=g.start)}b?(b=b(),b.done(function(a){c(!a)}),v(a,b)):c()}}})});for(var d=x(g),t=0;t<d.length;t++)for(var f=d[t],e=0;e<f.length;e++){var h=f[e],k=h.element;d[t][e]=h.fn;0===t?k.removeData("$$animatePrepareClasses"):(h=k.data("$$animatePrepareClasses"))&&a.addClass(k,h)}Q(d)});return F}}]}]).provider("$animateCss",["$animateProvider",function(a){this.$get=["$window","$$jqLite","$$AnimateRunner", 456"$timeout","$$animateCache","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(a,c,d,f,k,e,Q,L,x){function C(d,f,e,x){var v,s="stagger-"+e;0<k.count(e)&&(v=k.get(s),v||(f=$(f,"-stagger"),c.addClass(d,f),v=Ka(a,d,x),v.animationDuration=Math.max(v.animationDuration,0),v.transitionDuration=Math.max(v.transitionDuration,0),c.removeClass(d,f),k.put(s,v,!0)));return v||{}}function U(a){u.push(a);L.waitUntilQuiet(function(){k.flush();for(var a=e(),b=0;b<u.length;b++)u[b](a);u.length=0})} 457function z(c,d,f,e){d=k.get(f);d||(d=Ka(a,c,Wa),"infinite"===d.animationIterationCount&&(d.animationIterationCount=1));k.put(f,d,e||0<d.transitionDuration||0<d.animationDuration);c=d;f=c.animationDelay;e=c.transitionDelay;c.maxDelay=f&&e?Math.max(f,e):f||e;c.maxDuration=Math.max(c.animationDuration*c.animationIterationCount,c.transitionDuration);return c}var H=aa(c),u=[];return function(a,b){function e(){v()}function L(){v(!0)}function v(b){if(!(P||la&&m)){P=!0;m=!1;V&&!g.$$skipPreparationClasses&& 458c.removeClass(a,V);ba&&c.removeClass(a,ba);xa(l,!1);ra.blockTransitions(l,!1);s(y,function(a){l.style[a[0]]=""});H(a,g);ha(a,g);Object.keys(E).length&&s(E,function(a,b){a?l.style.setProperty(b,a):l.style.removeProperty(b)});if(g.onDone)g.onDone();w&&w.length&&a.off(w.join(" "),q);var d=a.data("$$animateCss");d&&(f.cancel(d[0].timer),a.removeData("$$animateCss"));fa&&fa.complete(!b)}}function u(a){p.blockTransition&&ra.blockTransitions(l,a);p.blockKeyframeAnimation&&xa(l,!!a)}function h(){fa=new d({end:e, 459cancel:L});U(N);v();return{$$willAnimate:!1,start:function(){return fa},end:e}}function q(a){a.stopPropagation();var b=a.originalEvent||a;b.target===l&&(a=b.$manualTimeStamp||Date.now(),b=parseFloat(b.elapsedTime.toFixed(3)),Math.max(a-J,0)>=G&&b>=D&&(la=!0,v()))}function F(){function b(){if(!P){u(!1);s(y,function(a){l.style[a[0]]=a[1]});H(a,g);c.addClass(a,ba);if(p.recalculateTimingStyles){T=l.getAttribute("class")+" "+V;ka=k.cacheKey(l,ja,g.addClass,g.removeClass);r=z(l,T,ka,!1);ga=r.maxDelay;W= 460Math.max(ga,0);D=r.maxDuration;if(0===D){v();return}p.hasTransitions=0<r.transitionDuration;p.hasAnimations=0<r.animationDuration}p.applyAnimationDelay&&(ga="boolean"!==typeof g.delay&&ya(g.delay)?parseFloat(g.delay):ga,W=Math.max(ga,0),r.animationDelay=ga,ea=[qa,ga+"s"],y.push(ea),l.style[ea[0]]=ea[1]);G=1E3*W;R=1E3*D;if(g.easing){var e,h=g.easing;p.hasTransitions&&(e=M+"TimingFunction",y.push([e,h]),l.style[e]=h);p.hasAnimations&&(e=ca+"TimingFunction",y.push([e,h]),l.style[e]=h)}r.transitionDuration&& 461w.push(Aa);r.animationDuration&&w.push(Ba);J=Date.now();var m=G+1.5*R;e=J+m;var h=a.data("$$animateCss")||[],F=!0;if(h.length){var n=h[0];(F=e>n.expectedEndTime)?f.cancel(n.timer):h.push(v)}F&&(m=f(d,m,!1),h[0]={timer:m,expectedEndTime:e},h.push(v),a.data("$$animateCss",h));if(w.length)a.on(w.join(" "),q);g.to&&(g.cleanupStyles&&Ma(E,l,Object.keys(g.to)),Ja(a,g))}}function d(){var b=a.data("$$animateCss");if(b){for(var c=1;c<b.length;c++)b[c]();a.removeData("$$animateCss")}}if(!P)if(l.parentNode){var e= 462function(a){if(la)m&&a&&(m=!1,v());else if(m=!a,r.animationDuration)if(a=xa(l,m),m)y.push(a);else{var b=y,c=b.indexOf(a);0<=a&&b.splice(c,1)}},h=0<aa&&(r.transitionDuration&&0===X.transitionDuration||r.animationDuration&&0===X.animationDuration)&&Math.max(X.animationDelay,X.transitionDelay);h?f(b,Math.floor(h*aa*1E3),!1):b();A.resume=function(){e(!0)};A.pause=function(){e(!1)}}else v()}var g=b||{};g.$$prepared||(g=pa(Da(g)));var E={},l=K(a);if(!l||!l.parentNode||!x.enabled())return h();var y=[],O= 463a.attr("class"),B=Qa(g),P,m,la,fa,A,W,G,D,R,J,w=[];if(0===g.duration||!Q.animations&&!Q.transitions)return h();var ja=g.event&&Z(g.event)?g.event.join(" "):g.event,Y=ja&&g.structural,n="",S="";Y?n=$(ja,"ng-",!0):ja&&(n=ja);g.addClass&&(S+=$(g.addClass,"-add"));g.removeClass&&(S.length&&(S+=" "),S+=$(g.removeClass,"-remove"));g.applyClassesEarly&&S.length&&H(a,g);var V=[n,S].join(" ").trim(),T=O+" "+V,O=B.to&&0<Object.keys(B.to).length;if(!(0<(g.keyframeStyle||"").length||O||V))return h();var X,ka= 464k.cacheKey(l,ja,g.addClass,g.removeClass);if(k.containsCachedAnimationWithoutDuration(ka))return V=null,h();0<g.stagger?(B=parseFloat(g.stagger),X={transitionDelay:B,animationDelay:B,transitionDuration:0,animationDuration:0}):X=C(l,V,ka,Xa);g.$$skipPreparationClasses||c.addClass(a,V);g.transitionStyle&&(B=[M,g.transitionStyle],ma(l,B),y.push(B));0<=g.duration&&(B=0<l.style[M].length,B=La(g.duration,B),ma(l,B),y.push(B));g.keyframeStyle&&(B=[ca,g.keyframeStyle],ma(l,B),y.push(B));var aa=X?0<=g.staggerIndex? 465g.staggerIndex:k.count(ka):0;(n=0===aa)&&!g.skipBlocking&&ra.blockTransitions(l,9999);var r=z(l,T,ka,!Y),ga=r.maxDelay;W=Math.max(ga,0);D=r.maxDuration;var p={};p.hasTransitions=0<r.transitionDuration;p.hasAnimations=0<r.animationDuration;p.hasTransitionAll=p.hasTransitions&&"all"===r.transitionProperty;p.applyTransitionDuration=O&&(p.hasTransitions&&!p.hasTransitionAll||p.hasAnimations&&!p.hasTransitions);p.applyAnimationDuration=g.duration&&p.hasAnimations;p.applyTransitionDelay=ya(g.delay)&&(p.applyTransitionDuration|| 466p.hasTransitions);p.applyAnimationDelay=ya(g.delay)&&p.hasAnimations;p.recalculateTimingStyles=0<S.length;if(p.applyTransitionDuration||p.applyAnimationDuration)D=g.duration?parseFloat(g.duration):D,p.applyTransitionDuration&&(p.hasTransitions=!0,r.transitionDuration=D,B=0<l.style[M+"Property"].length,y.push(La(D,B))),p.applyAnimationDuration&&(p.hasAnimations=!0,r.animationDuration=D,y.push([Ca,D+"s"]));if(0===D&&!p.recalculateTimingStyles)return h();var ba=$(V,"-active");if(null!=g.delay){var ea; 467"boolean"!==typeof g.delay&&(ea=parseFloat(g.delay),W=Math.max(ea,0));p.applyTransitionDelay&&y.push([na,ea+"s"]);p.applyAnimationDelay&&y.push([qa,ea+"s"])}null==g.duration&&0<r.transitionDuration&&(p.recalculateTimingStyles=p.recalculateTimingStyles||n);G=1E3*W;R=1E3*D;g.skipBlocking||(p.blockTransition=0<r.transitionDuration,p.blockKeyframeAnimation=0<r.animationDuration&&0<X.animationDelay&&0===X.animationDuration);g.from&&(g.cleanupStyles&&Ma(E,l,Object.keys(g.from)),Ia(a,g));p.blockTransition|| 468p.blockKeyframeAnimation?u(D):g.skipBlocking||ra.blockTransitions(l,!1);return{$$willAnimate:!0,end:e,start:function(){if(!P)return A={end:e,cancel:L,resume:null,pause:null},fa=new d(A),U(F),fa}}}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(a){a.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(a,c,d,f,k,e,Q){function L(a){return a.replace(/\bng-\S+\b/g,"")}function x(a,b){G(a)&& 469(a=a.split(" "));G(b)&&(b=b.split(" "));return a.filter(function(a){return-1===b.indexOf(a)}).join(" ")}function C(c,e,f){function k(a){var b={},c=K(a).getBoundingClientRect();s(["width","height","top","left"],function(a){var d=c[a];switch(a){case "top":d+=H.scrollTop;break;case "left":d+=H.scrollLeft}b[a]=Math.floor(d)+"px"});return b}function v(){var c=L(f.attr("class")||""),d=x(c,q),c=x(q,c),d=a(h,{to:k(f),addClass:"ng-anchor-in "+d,removeClass:"ng-anchor-out "+c,delay:!0});return d.$$willAnimate? 470d:null}function C(){h.remove();e.removeClass("ng-animate-shim");f.removeClass("ng-animate-shim")}var h=A(K(e).cloneNode(!0)),q=L(h.attr("class")||"");e.addClass("ng-animate-shim");f.addClass("ng-animate-shim");h.addClass("ng-anchor");u.append(h);var F;c=function(){var c=a(h,{addClass:"ng-anchor-out",delay:!0,from:k(e)});return c.$$willAnimate?c:null}();if(!c&&(F=v(),!F))return C();var g=c||F;return{start:function(){function a(){c&&c.end()}var b,c=g.start();c.done(function(){c=null;if(!F&&(F=v()))return c= 471F.start(),c.done(function(){c=null;C();b.complete()}),c;C();b.complete()});return b=new d({end:a,cancel:a})}}}function z(a,b,c,e){var f=oa(a,N),k=oa(b,N),h=[];s(e,function(a){(a=C(c,a.out,a["in"]))&&h.push(a)});if(f||k||0!==h.length)return{start:function(){function a(){s(b,function(a){a.end()})}var b=[];f&&b.push(f.start());k&&b.push(k.start());s(h,function(a){b.push(a.start())});var c=new d({end:a,cancel:a});d.all(b,function(a){c.complete(a)});return c}}}function oa(c){var d=c.element,e=c.options|| 472{};c.structural&&(e.event=c.event,e.structural=!0,e.applyClassesEarly=!0,"leave"===c.event&&(e.onDone=e.domOperation));e.preparationClasses&&(e.event=ba(e.event,e.preparationClasses));c=a(d,e);return c.$$willAnimate?c:null}if(!k.animations&&!k.transitions)return N;var H=Q[0].body;c=K(f);var u=A(c.parentNode&&11===c.parentNode.nodeType||H.contains(c)?c:H);return function(a){return a.from&&a.to?z(a.from,a.to,a.classes,a.anchors):oa(a)}}]}]).provider("$$animateJs",["$animateProvider",function(a){this.$get= 473["$injector","$$AnimateRunner","$$jqLite",function(b,c,d){function f(c){c=Z(c)?c:c.split(" ");for(var d=[],f={},k=0;k<c.length;k++){var s=c[k],z=a.$$registeredAnimations[s];z&&!f[s]&&(d.push(b.get(z)),f[s]=!0)}return d}var k=aa(d);return function(a,b,d,x){function C(){x.domOperation();k(a,x)}function z(a,b,d,f,e){switch(d){case "animate":b=[b,f.from,f.to,e];break;case "setClass":b=[b,t,I,e];break;case "addClass":b=[b,t,e];break;case "removeClass":b=[b,I,e];break;default:b=[b,e]}b.push(f);if(a=a.apply(a, 474b))if(Ea(a.start)&&(a=a.start()),a instanceof c)a.done(e);else if(Ea(a))return a;return N}function A(a,b,d,e,f){var h=[];s(e,function(e){var l=e[f];l&&h.push(function(){var e,f,h=!1,k=function(a){h||(h=!0,(f||N)(a),e.complete(!a))};e=new c({end:function(){k()},cancel:function(){k(!0)}});f=z(l,a,b,d,function(a){k(!1===a)});return e})});return h}function H(a,b,d,e,f){var h=A(a,b,d,e,f);if(0===h.length){var k,q;"beforeSetClass"===f?(k=A(a,"removeClass",d,e,"beforeRemoveClass"),q=A(a,"addClass",d,e,"beforeAddClass")): 475"setClass"===f&&(k=A(a,"removeClass",d,e,"removeClass"),q=A(a,"addClass",d,e,"addClass"));k&&(h=h.concat(k));q&&(h=h.concat(q))}if(0!==h.length)return function(a){var b=[];h.length&&s(h,function(a){b.push(a())});b.length?c.all(b,a):a();return function(a){s(b,function(b){a?b.cancel():b.end()})}}}var u=!1;3===arguments.length&&ta(d)&&(x=d,d=null);x=pa(x);d||(d=a.attr("class")||"",x.addClass&&(d+=" "+x.addClass),x.removeClass&&(d+=" "+x.removeClass));var t=x.addClass,I=x.removeClass,G=f(d),K,v;if(G.length){var M, 476h;"leave"===b?(h="leave",M="afterLeave"):(h="before"+b.charAt(0).toUpperCase()+b.substr(1),M=b);"enter"!==b&&"move"!==b&&(K=H(a,b,x,G,h));v=H(a,b,x,G,M)}if(K||v){var q;return{$$willAnimate:!0,end:function(){q?q.end():(u=!0,C(),ha(a,x),q=new c,q.complete(!0));return q},start:function(){function b(c){u=!0;C();ha(a,x);q.complete(c)}if(q)return q;q=new c;var d,f=[];K&&f.push(function(a){d=K(a)});f.length?f.push(function(a){C();a(!0)}):C();v&&f.push(function(a){d=v(a)});q.setHost({end:function(){u||((d|| 477N)(void 0),b(void 0))},cancel:function(){u||((d||N)(!0),b(!0))}});c.chain(f,b);return q}}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(a){a.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(a,c){function d(c){return a(c.element,c.event,c.classes,c.options)}return function(a){if(a.from&&a.to){var b=d(a.from),e=d(a.to);if(b||e)return{start:function(){function a(){return function(){s(d,function(a){a.end()})}}var d=[];b&&d.push(b.start());e&& 478d.push(e.start());c.all(d,function(a){f.complete(a)});var f=new c({end:a(),cancel:a()});return f}}}else return d(a)}}]}])})(window,window.angular); 479//# sourceMappingURL=angular-animate.min.js.map
480; 481/* 482 * angular-ui-bootstrap 483 * http://angular-ui.github.io/bootstrap/ 484 485 * Version: 2.5.0 - 2017-01-28 486 * License: MIT 487 */angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){r=!!("horizontal"in g),r?(s={width:""},t={width:"0"}):(s={height:""},t={height:"0"}),d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css(s)}function i(a){return r?{width:a.scrollWidth+"px"}:{height:a.scrollHeight+"px"}}function j(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(n(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",css:{overflow:"hidden"},to:i(f[0])}).start()["finally"](k):a.addClass(f,"in",{css:{overflow:"hidden"},to:i(f[0])}).then(k)},angular.noop)}function k(){f.removeClass("collapsing").addClass("collapse").css(s),o(d)}function l(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(p(d)).then(function(){f.css(i(f[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:t}).start()["finally"](m):a.removeClass(f,"in",{to:t}).then(m)},angular.noop):m()}function m(){f.css(t),f.removeClass("collapsing").addClass("collapse"),q(d)}var n=c(g.expanding),o=c(g.expanded),p=c(g.collapsing),q=c(g.collapsed),r=!1,s={},t={};h(),d.$watch(g.uibCollapse,function(a){a?l():j()})}}}]),angular.module("ui.bootstrap.tabindex",[]).directive("uibTabindexToggle",function(){return{restrict:"A",link:function(a,b,c){c.$observe("disabled",function(a){c.$set("tabindex",a?-1:null)})}}}),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse","ui.bootstrap.tabindex"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){b.addClass("panel"),d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){function a(){return"uib-accordion-header,data-uib-accordion-header,x-uib-accordion-header,uib\\:accordion-header,[uib-accordion-header],[data-uib-accordion-header],[x-uib-accordion-header]"}return{require:"^uibAccordionGroup",link:function(b,c,d,e){b.$watch(function(){return e[d.uibAccordionTransclude]},function(b){if(b){var d=angular.element(c[0].querySelector(a()));d.html(""),d.append(b)}})}}}
487),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$element","$attrs","$interpolate","$timeout",function(a,b,c,d,e){a.closeable=!!c.close,b.addClass("alert"),c.$set("role","alert"),a.closeable&&b.addClass("alert-dismissible");var f=angular.isDefined(c.dismissOnTimeout)?d(c.dismissOnTimeout)(a.$parent):null;f&&e(function(){a.close()},parseInt(f,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,scope:{close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);a&&!angular.isDefined(d.uncheckable)||b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(a){for(var b=0;b<p.length;b++)p[b].slide.active=b===a}function g(c,d,g){if(!s){if(angular.extend(c,{direction:g}),angular.extend(p[r].slide||{},{direction:g}),e.enabled(b)&&!a.$currentTransition&&p[d].element&&o.slides.length>1){p[d].element.data(q,c.direction);var h=o.getCurrentIndex();angular.isNumber(h)&&p[h].element&&p[h].element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",p[d].element,function(b,c){"close"===c&&(a.$currentTransition=null,e.off("addClass",b))})}a.active=c.index,r=c.index,f(d),k()}}function h(a){for(var b=0;b<p.length;b++)if(p[b].slide===a)return b}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null)}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=a.active,s=!1;b.addClass("carousel"),o.addSlide=function(b,c){p.push({slide:b,element:c}),p.sort(function(a,b){return+a.slide.index-+b.slide.index}),(b.index===a.active||1===p.length&&!angular.isNumber(a.active))&&(a.$currentTransition&&(a.$currentTransition=null),r=b.index,a.active=b.index,f(r),o.select(p[h(b)]),1===p.length&&a.play())},o.getCurrentIndex=function(){for(var a=0;a<p.length;a++)if(p[a].slide.index===r)return a},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(p[b],"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(p[b],"prev")},o.removeSlide=function(b){var c=h(b);p.splice(c,1),p.length>0&&r===c?c>=p.length?(r=p.length-1,a.active=r,f(r),o.select(p[p.length-1])):(r=c,a.active=r,f(r),o.select(p[c])):r>c&&(r--,a.active=r),0===p.length&&(r=null,a.active=null)},o.select=a.select=function(b,c){var d=h(b.slide);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b.slide.index===r||a.$currentTransition||g(b.slide,d,c)},a.indexOfSlide=function(a){return+a.slide.index},a.isActive=function(b){return a.active===b.slide.index},a.isPrevDisabled=function(){return 0===a.active&&a.noWrap()},a.isNextDisabled=function(){return a.active===p.length-1&&a.noWrap()},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},b.on("mouseenter",a.pause),b.on("mouseleave",a.play),a.$on("$destroy",function(){s=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}
487),a.$watch("interval",k),a.$watchCollection("slides",j),a.$watch("active",function(a){if(angular.isNumber(a)&&r!==a){for(var b=0;b<p.length;b++)if(p[b].slide.index===a){a=b;break}var c=p[a];c&&(f(a),o.select(p[a]),r=a)}})}]).directive("uibCarousel",function(){return{transclude:!0,controller:"UibCarouselController",controllerAs:"carousel",restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",["$animate",function(a){return{require:"^uibCarousel",restrict:"A",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(b,c,d,e){c.addClass("item"),e.addSlide(b,c),b.$on("$destroy",function(){e.removeSlide(b)}),b.$watch("active",function(b){a[b?"addClass":"removeClass"](c,"active")})}}}]).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter","filterFilter",function(a,b,c,d,e){function f(a){return e(s,{key:a},!0)[0]}function g(a){var b=[],c=a.split(""),e=a.indexOf("'");if(e>-1){var f=!1;a=a.split("");for(var g=e;g<a.length;g++)f?("'"===a[g]&&(g+1<a.length&&"'"===a[g+1]?(a[g+1]="$",c[g+1]=""):(c[g]="",f=!1)),a[g]="$"):"'"===a[g]&&(a[g]="$",c[g]="",f=!0);a=a.join("")}return angular.forEach(s,function(d){var e=a.indexOf(d.key);if(e>-1){a=a.split(""),c[e]="("+d.regex+")",a[e]="$";for(var f=e+1,g=e+d.key.length;g>f;f++)c[f]="",a[f]="$";a=a.join(""),b.push({index:e,key:d.key,apply:d.apply,matcher:d.regex})}}),{regex:new RegExp("^"+c.join("")+"$"),map:d(b,"index")}}function h(a){for(var b,c,d=[],e=0;e<a.length;)if(angular.isNumber(c)){if("'"===a.charAt(e))(e+1>=a.length||"'"!==a.charAt(e+1))&&(d.push(i(a,c,e)),c=null);else if(e===a.length)for(;c<a.length;)b=j(a,c),d.push(b),c=b.endIdx;e++}else"'"!==a.charAt(e)?(b=j(a,e),d.push(b.parser),e=b.endIdx):(c=e,e++);return d}function i(a,b,c){return function(){return a.substr(b+1,c-b-1)}}function j(a,b){for(var c=a.substr(b),d=0;d<s.length;d++)if(new RegExp("^"+s[d].key).test(c)){var e=s[d];return{endIdx:b+e.key.length,parser:e.formatter}}return{endIdx:b+1,parser:function(){return c.charAt(0)}}}function k(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function l(a){return parseInt(a,10)}function m(a,b){return a&&b?q(a,b):a}function n(a,b){return a&&b?q(a,b,!0):a}function o(a,b){a=a.replace(/:/g,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function p(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function q(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=o(b,d);return p(a,c*(e-d))}var r,s,t=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){r=b.id,this.parsers={},this.formatters={},s=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){a=+a,this.year=69>a?a+2e3:a+1900},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}}
487,{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=l(c+d),this.minutes+=l(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}],angular.version.major>=1&&angular.version.minor>4&&s.push({key:"LLLL",regex:b.DATETIME_FORMATS.STANDALONEMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.STANDALONEMONTH.indexOf(a)},formatter:function(a){return c(a,"LLLL")}})},this.init(),this.getParser=function(a){var b=f(a);return b&&b.apply||null},this.overrideParser=function(a,b){var c=f(a);c&&angular.isFunction(b)&&(this.parsers={},c.apply=b)}.bind(this),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==r&&this.init(),this.formatters[c]||(this.formatters[c]=h(c));var d=this.formatters[c];return d.reduce(function(b,c){return b+c(a)},"")},this.parse=function(c,d,e){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(t,"\\$&"),b.id!==r&&this.init(),this.parsers[d]||(this.parsers[d]=g(d,"apply"));var f=this.parsers[d],h=f.regex,i=f.map,j=c.match(h),l=!1;if(j&&j.length){var m,n;angular.isDate(e)&&!isNaN(e.getTime())?m={year:e.getFullYear(),month:e.getMonth(),date:e.getDate(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),milliseconds:e.getMilliseconds()}:(e&&a.warn("dateparser:","baseDate is not a valid date"),m={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var o=1,p=j.length;p>o;o++){var q=i[o-1];"Z"===q.matcher&&(l=!0),q.apply&&q.apply.call(m,j[o])}
487var s=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return k(m.year,m.month,m.date)&&(!angular.isDate(e)||isNaN(e.getTime())||l?(n=new Date(0),s.call(n,m.year,m.month,m.date),u.call(n,m.hours||0,m.minutes||0,m.seconds||0,m.milliseconds||0)):(n=new Date(e),s.call(n,m.year,m.month,m.date),u.call(n,m.hours,m.minutes,m.seconds,m.milliseconds))),n}},this.toTimezone=m,this.fromTimezone=n,this.timezoneToOffset=o,this.addDateMinutes=p,this.convertTimezoneToLocal=q}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",monthColumns:3,ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$element","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(b){a.datepickerMode=b,a.datepickerOptions.datepickerMode=b}function n(b){var c;if(angular.version.minor<6)c=b.$options||a.datepickerOptions.ngModelOptions||i.ngModelOptions||{},c.getOption=function(a){return c[a]};else{var d=b.$options.getOption("timezone")||(a.datepickerOptions.ngModelOptions?a.datepickerOptions.ngModelOptions.timezone:null)||(i.ngModelOptions?i.ngModelOptions.timezone:null);c=b.$options.createChild(i.ngModelOptions).createChild(a.datepickerOptions.ngModelOptions).createChild(b.$options).createChild({timezone:d})}return c}var o=this,p={$setViewValue:angular.noop},q={},r=[];b.addClass("uib-datepicker"),c.$set("role","application"),a.datepickerOptions||(a.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","monthColumns","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(b){switch(b){case"customClass":case"dateDisabled":a[b]=a.datepickerOptions[b]||angular.noop;break;case"datepickerMode":a.datepickerMode=angular.isDefined(a.datepickerOptions.datepickerMode)?a.datepickerOptions.datepickerMode:i.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":o[b]=angular.isDefined(a.datepickerOptions[b])?e(a.datepickerOptions[b])(a.$parent):i[b];break;case"monthColumns":case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":o[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:i[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?o.startingDay=a.datepickerOptions.startingDay:angular.isNumber(i.startingDay)?o.startingDay=i.startingDay:o.startingDay=(f.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.$watch("datepickerOptions."+b,function(a){a?angular.isDate(a)?o[b]=l.fromTimezone(new Date(a),q.getOption("timezone")):(j&&g.warn("Literal date support has been deprecated, please switch to date object usage"),o[b]=new Date(h(a,"medium"))):o[b]=i[b]?l.fromTimezone(new Date(i[b]),q.getOption("timezone")):null,o.refreshView()});break;
487case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){o[b]=a[b]=angular.isDefined(c)?c:a.datepickerOptions[b],("minMode"===b&&o.modes.indexOf(a.datepickerOptions.datepickerMode)<o.modes.indexOf(o[b])||"maxMode"===b&&o.modes.indexOf(a.datepickerOptions.datepickerMode)>o.modes.indexOf(o[b]))&&(a.datepickerMode=o[b],a.datepickerOptions.datepickerMode=o[b])}):o[b]=a[b]=i[b]||null}}),a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(c.disabled)||!1,angular.isDefined(c.ngDisabled)&&r.push(a.$parent.$watch(c.ngDisabled,function(b){a.disabled=b,o.refreshView()})),a.isActive=function(b){return 0===o.compare(b.date,o.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(b){p=b,q=n(p),a.datepickerOptions.initDate?(o.activeDate=l.fromTimezone(a.datepickerOptions.initDate,q.getOption("timezone"))||new Date,a.$watch("datepickerOptions.initDate",function(a){a&&(p.$isEmpty(p.$modelValue)||p.$invalid)&&(o.activeDate=l.fromTimezone(a,q.getOption("timezone")),o.refreshView())})):o.activeDate=new Date;var c=p.$modelValue?new Date(p.$modelValue):new Date;this.activeDate=isNaN(c)?l.fromTimezone(new Date,q.getOption("timezone")):l.fromTimezone(c,q.getOption("timezone")),p.$render=function(){o.render()}},this.render=function(){if(p.$viewValue){var a=new Date(p.$viewValue),b=!isNaN(a);b?this.activeDate=l.fromTimezone(a,q.getOption("timezone")):k||g.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=p.$viewValue?new Date(p.$viewValue):null;b=l.fromTimezone(b,q.getOption("timezone")),p.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=p.$viewValue?new Date(p.$viewValue):null;d=l.fromTimezone(d,q.getOption("timezone"));var e=new Date;e=l.fromTimezone(e,q.getOption("timezone"));var f=this.compare(b,e),g={date:b,label:l.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),past:0>f,current:0===f,future:f>0,customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=g),o.activeDate&&0===this.compare(g.date,o.activeDate)&&(a.activeDt=g),g},this.isDisabled=function(b){return a.disabled||this.minDate&&this.compare(b,this.minDate)<0||this.maxDate&&this.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===o.minMode){var c=p.$viewValue?l.fromTimezone(new Date(p.$viewValue),q.getOption("timezone")):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=l.toTimezone(c,q.getOption("timezone")),p.$setViewValue(c),p.$render()}else o.activeDate=b,m(o.modes[o.modes.indexOf(a.datepickerMode)-1]),a.$emit("uib:datepicker.mode");a.$broadcast("uib:datepicker.focus")},a.move=function(a){var b=o.activeDate.getFullYear()+a*(o.step.years||0),c=o.activeDate.getMonth()+a*(o.step.months||0);o.activeDate.setFullYear(b,c,1),o.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===o.maxMode&&1===b||a.datepickerMode===o.minMode&&-1===b||(m(o.modes[o.modes.indexOf(a.datepickerMode)+b]),a.$emit("uib:datepicker.mode"))},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var s=function(){o.element[0].focus()};a.$on("uib:datepicker.focus",s),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),o.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(o.isDisabled(o.activeDate))return;a.select(o.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(o.handleKeyDown(c,b),o.refreshView()):a.toggleMode("up"===c?1:-1)},b.on("keydown",function(b){a.$apply(function(){a.keydown(b)})}),a.$on("$destroy",function(){for(;r.length;)r.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k}
487);a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,this.monthColumns),a.yearHeaderColspan=this.monthColumns>3?this.monthColumns-2:1},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=this.monthColumns;else if("right"===a)c+=1;else if("down"===a)c+=this.monthColumns;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],restrict:"A",controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"}, 488require:["^uibDatepicker","uibDaypicker"],restrict:"A",controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],restrict:"A",controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],restrict:"A",controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d,e={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},f={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},g=/(HTML|BODY)/;return{getRawNode:function(a){return a.nodeName?a:a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(d)){var f=a.find("body");f.addClass("uib-position-body-scrollbar-measure"),d=b.innerWidth-f[0].clientWidth,d=isFinite(d)?d:0,f.removeClass("uib-position-body-scrollbar-measure")}return d}if(angular.isUndefined(c)){var g=angular.element('<div class="uib-position-scrollbar-measure"></div>');a.find("body").append(g),c=g[0].offsetWidth-g[0].clientWidth,c=isFinite(c)?c:0,g.remove()}return c},scrollbarPadding:function(a){a=this.getRawNode(a);var c=b.getComputedStyle(a),d=this.parseStyle(c.paddingRight),e=this.parseStyle(c.paddingBottom),f=this.scrollParent(a,!1,!0),h=this.scrollbarWidth(g.test(f.tagName));return{scrollbarWidth:h,widthOverflow:f.scrollWidth>f.clientWidth,right:d+h,originalRight:d,heightOverflow:f.scrollHeight>f.clientHeight,bottom:e+h,originalBottom:e}},isScrollable:function(a,c){a=this.getRawNode(a);var d=c?e.hidden:e.normal,f=b.getComputedStyle(a);return d.test(f.overflow+f.overflowY+f.overflowX)},scrollParent:function(c,d,f){c=this.getRawNode(c);var g=d?e.hidden:e.normal,h=a[0].documentElement,i=b.getComputedStyle(c);if(f&&g.test(i.overflow+i.overflowY+i.overflowX))return c;var j="absolute"===i.position,k=c.parentElement||h;if(k===h||"fixed"===i.position)return h;for(;k.parentElement&&k!==h;){var l=b.getComputedStyle(k);if(j&&"static"!==l.position&&(j=!1),!j&&g.test(l.overflow+l.overflowY+l.overflowX))break;k=k.parentElement}return k},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left
488:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=f.auto.test(a);return b&&(a=a.replace(f.auto,"")),a=a.split("-"),a[0]=a[0]||"top",f.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",f.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,e){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=e?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a,e),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(f.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":f.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},adjustTop:function(a,b,c,d){return-1!==a.indexOf("top")&&c!==d?{top:b.top-d+"px"}:void 0},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var e=angular.element(d).hasClass("tooltip-inner"),g=e?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){var h={top:"",bottom:"",left:"",right:""};if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css(h);var i="border-"+c[0]+"-width",j=b.getComputedStyle(g)[i],k="border-";k+=f.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],k+="-radius";var l=b.getComputedStyle(e?d:a)[k];switch(c[0]){case"top":h.bottom=e?"0":"-"+j;break;case"bottom":h.top=e?"0":"-"+j;break;case"left":h.right=e?"0":"-"+j;break;case"right":h.left=e?"0":"-"+j}h[c[1]]=l,angular.element(g).css(h)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$
488window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(b){var c=l.parse(b,x,a.date);if(isNaN(c))for(var d=0;d<J.length;d++)if(c=l.parse(b,J[d],a.date),!isNaN(c))return c;return c}function r(a){if(angular.isNumber(a)&&(a=new Date(a)),!a)return null;if(angular.isDate(a)&&!isNaN(a))return a;if(angular.isString(a)){var b=q(a);if(!isNaN(b))return l.toTimezone(b,H.getOption("timezone"))}return H.getOption("allowInvalid")?a:void 0}function s(a,b){var d=a||b;return c.ngRequired||d?(angular.isNumber(d)&&(d=new Date(d)),d?angular.isDate(d)&&!isNaN(d)?!0:angular.isString(d)?!isNaN(q(d)):!1:!0):!0}function t(c){if(a.isOpen||!a.disabled){var d=I[0],e=b[0].contains(c.target),f=void 0!==d.contains&&d.contains(c.target);!a.isOpen||e||f||a.$apply(function(){a.isOpen=!1})}}function u(c){27===c.which&&a.isOpen?(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!1}),b[0].focus()):40!==c.which||a.isOpen||(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!0}))}function v(){if(a.isOpen){var d=angular.element(I[0].querySelector(".uib-datepicker-popup")),e=c.popupPlacement?c.popupPlacement:m.placement,f=j.positionElements(b,d,e,z);d.css({top:f.top+"px",left:f.left+"px"}),d.hasClass("uib-position-measure")&&d.removeClass("uib-position-measure")}}function w(a){var b;return angular.version.minor<6?(b=angular.isObject(a.$options)?a.$options:{timezone:null},b.getOption=function(a){return b[a]}):b=a.$options,b}var x,y,z,A,B,C,D,E,F,G,H,I,J,K=!1,L=[];this.init=function(e){if(G=e,H=w(G),y=angular.isDefined(c.closeOnDateSelection)?a.$parent.$eval(c.closeOnDateSelection):m.closeOnDateSelection,z=angular.isDefined(c.datepickerAppendToBody)?a.$parent.$eval(c.datepickerAppendToBody):m.appendToBody,A=angular.isDefined(c.onOpenFocus)?a.$parent.$eval(c.onOpenFocus):m.onOpenFocus,B=angular.isDefined(c.datepickerPopupTemplateUrl)?c.datepickerPopupTemplateUrl:m.datepickerPopupTemplateUrl,C=angular.isDefined(c.datepickerTemplateUrl)?c.datepickerTemplateUrl:m.datepickerTemplateUrl,J=angular.isDefined(c.altInputFormats)?a.$parent.$eval(c.altInputFormats):m.altInputFormats,a.showButtonBar=angular.isDefined(c.showButtonBar)?a.$parent.$eval(c.showButtonBar):m.showButtonBar,m.html5Types[c.type]?(x=m.html5Types[c.type],K=!0):(x=c.uibDatepickerPopup||m.datepickerPopup,c.$observe("uibDatepickerPopup",function(a,b){var c=a||m.datepickerPopup;if(c!==x&&(x=c,G.$modelValue=null,!x))throw new Error("uibDatepickerPopup must have a date format specified.")})),!x)throw new Error("uibDatepickerPopup must have a date format specified.");if(K&&c.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");D=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),D.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":B}),E=angular.element(D.children()[0]),E.attr("template-url",C),a.datepickerOptions||(a.datepickerOptions={}),K&&"month"===c.type&&(a.datepickerOptions.datepickerMode="month",a.datepickerOptions.minMode="month"),E.attr("datepicker-options","datepickerOptions"),K?G.$formatters.push(function(b){return a.date=l.fromTimezone(b,H.getOption("timezone")),b}):(G.$$parserName="date",G.$validators.date=s,G.$parsers.unshift(r),G.$formatters.push(function(b){return G.$isEmpty(b)?(a.date=b,b):(angular.isNumber(b)&&(b=new Date(b)),a.date=l.fromTimezone(b,H.getOption("timezone")),l.filter(a.date,x))})),G.$viewChangeListeners.push(function(){a.date=q(G.$viewValue)}),b.on("keydown",u),I=d(D)(a),D.remove(),z?h.find("body").append(I):b.after(I),a.$on("$destroy",function(){for(a.isOpen===!0&&(i.$$phase||a.$apply(function(){a.isOpen=!1})),I.remove(),b.off("keydown",u),h.off("click",t),F&&F.off("scroll",v),angular.element(g).off("resize",v);L.length;)L.shift()()})},a.getText=function(b){return a[b+"Text"]||m[b+"Text"]},a.isDisabled=function(b){"today"===b&&(b=l.fromTimezone(new Date,H.getOption("timezone")));var c={};return angular.forEach(["minDate","maxDate"],function(b){a.datepickerOptions[b]?angular.isDate(a.datepickerOptions[b])?c[b]=new Date(a.datepickerOptions[b]):(p&&e.warn("Literal date support has been deprecated, please switch to date object usage"),c[b]=new Date(k(a.datepickerOptions[b],"medium"))):c[b]=null}),a.datepickerOptions&&c.minDate&&a.compare(b,c.minDate)<0||c.maxDate&&a.compare(b,c.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){a.date=c;var d=a.date?l.filter(a.date,x):null;b.val(d),G.$setViewValue(d),y&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b,c){if(c.stopPropagation(),"today"===b){var d=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate())):(b=l.fromTimezone(d,H.getOption("timezone")),b.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(c){c.stopPropagation(),a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&L.push(a.$parent.$watch(f(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(d){d?a.disabled?a.isOpen=!1:n(function(){v(),A&&a.$broadcast("uib:datepicker.focus"),h.on("click",t);var d=c.popupPlacement?c.popupPlacement:m.placement;z||j.parsePlacement(d)[2]?(F=F||angular.element(j.scrollParent(b)),F&&F.on("scroll",v)):F=null,angular.element(g).on("resize",v)},0,!1):(h.off("click",t),F&&F.off("scroll",v),angular.element(g).off("resize",v))}),a.$on("uib:datepicker.mode",function(){n(v,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{restrict:"A",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.multiMap",[]).factory("$$multiMap",function(){return{createNew:function(){var a={};return{entries:function(){return Object.keys(a).map(function(b){return{key:b,value:a[b]}})},get:function(b){return a[b]},hasKey:function(b){return!!a[b]},keys:function(){return Object.keys(a)},put:function(b,c){a[b]||(a[b]=[]),a[b].push(c)},remove:function(b,c){var d=a[b];if(d){var e=d.indexOf(c);-1!==e&&d.splice(e,1),d.length||delete a[b]}}}}}}),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.multiMap","ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope","$$multiMap",function(a,b,c){var d=null,e=c.createNew();this.isOnlyOpen=function(a,b){var c=e.get(b);if(c){var d=c.reduce(function(b,c){return c.scope===a?c:b},{});if(d)return 1===c.length}return!1},this.open=function(b,c,g){if(d||a.on("click",f),d&&d!==b&&(d.isOpen=!1),d=b,g){var h=e.get(g);if(h){var i=h.map(function(a){return a.scope});-1===i.indexOf(b)&&e.put(g,{scope:b})}else e.put(g,{scope:b})}},this.close=function(b,c,g){if(d===b&&(a.off("click",f),a.off("keydown",this.keybindFilter),d=null),g){var h=e.get(g);if(h){var i=h.reduce(function(a,c){return c.scope===b?c:a},{});i&&e.remove(g,i)}}};
488var f=function(a){if(d&&d.isOpen&&!(a&&"disabled"===d.getAutoClose()||a&&3===a.which)){var c=d.getToggleElement();if(!(a&&c&&c[0].contains(a.target))){var e=d.getDropdownElement();a&&"outsideClick"===d.getAutoClose()&&e&&e[0].contains(a.target)||(d.focusToggleElement(),d.isOpen=!1,b.$$phase||d.$apply())}}};this.keybindFilter=function(a){if(d){var b=d.getDropdownElement(),c=d.getToggleElement(),e=b&&b[0].contains(a.target),g=c&&c[0].contains(a.target);27===a.which?(a.stopPropagation(),d.focusToggleElement(),f()):d.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&d.isOpen&&(e||g)&&(a.preventDefault(),a.stopPropagation(),d.focusDropdownEntry(a.which))}}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){function l(){b.append(o.dropdownMenu)}var m,n,o=this,p=a.$new(),q=e.appendToOpenClass,r=e.openClass,s=angular.noop,t=c.onToggle?d(c.onToggle):angular.noop,u=!1,v=i.find("body");b.addClass("dropdown"),this.init=function(){c.isOpen&&(n=d(c.isOpen),s=n.assign,a.$watch(n,function(a){p.isOpen=!!a})),u=angular.isDefined(c.keyboardNav)},this.toggle=function(a){return p.isOpen=arguments.length?!!a:!p.isOpen,angular.isFunction(s)&&s(p,p.isOpen),p.isOpen},this.isOpen=function(){return p.isOpen},p.getToggleElement=function(){return o.toggleElement},p.getAutoClose=function(){return c.autoClose||"always"},p.getElement=function(){return b},p.isKeynavEnabled=function(){return u},p.focusDropdownEntry=function(a){var c=o.dropdownMenu?angular.element(o.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(o.selectedOption)?o.selectedOption=o.selectedOption===c.length-1?o.selectedOption:o.selectedOption+1:o.selectedOption=0;break;case 38:angular.isNumber(o.selectedOption)?o.selectedOption=0===o.selectedOption?0:o.selectedOption-1:o.selectedOption=c.length-1}c[o.selectedOption].focus()},p.getDropdownElement=function(){return o.dropdownMenu},p.focusToggleElement=function(){o.toggleElement&&o.toggleElement[0].focus()},p.$watch("isOpen",function(e,n){var u=null,w=!1;if(angular.isDefined(c.dropdownAppendTo)){var x=d(c.dropdownAppendTo)(p);x&&(u=angular.element(x))}if(angular.isDefined(c.dropdownAppendToBody)){var y=d(c.dropdownAppendToBody)(p);y!==!1&&(w=!0)}if(w&&!u&&(u=v),u&&o.dropdownMenu&&(e?(u.append(o.dropdownMenu),b.on("$destroy",l)):(b.off("$destroy",l),l())),u&&o.dropdownMenu){var z,A,B,C=h.positionElements(b,o.dropdownMenu,"bottom-left",!0),D=0;if(z={top:C.top+"px",display:e?"block":"none"},A=o.dropdownMenu.hasClass("dropdown-menu-right"),A?(z.left="auto",B=h.scrollbarPadding(u),B.heightOverflow&&B.scrollbarWidth&&(D=B.scrollbarWidth),z.right=window.innerWidth-D-(C.left+b.prop("offsetWidth"))+"px"):(z.left=C.left+"px",z.right="auto"),!w){var E=h.offset(u);z.top=C.top-E.top+"px",A?z.right=window.innerWidth-(C.left-E.left+b.prop("offsetWidth"))+"px":z.left=C.left-E.left+"px"}o.dropdownMenu.css(z)}var F=u?u:b,G=u?q:r,H=F.hasClass(G),I=f.isOnlyOpen(a,u);if(H===!e){var J;J=u?I?"removeClass":"addClass":e?"addClass":"removeClass",g[J](F,G).then(function(){angular.isDefined(e)&&e!==n&&t(a,{open:!!e})})}if(e)o.dropdownMenuTemplateUrl?k(o.dropdownMenuTemplateUrl).then(function(a){m=p.$new(),j(a.trim())(m,function(a){var b=a;o.dropdownMenu.replaceWith(b),o.dropdownMenu=b,i.on("keydown",f.keybindFilter)})}):i.on("keydown",f.keybindFilter),p.focusToggleElement(),f.open(p,b,u);else{if(f.close(p,b,u),o.dropdownMenuTemplateUrl){m&&m.$destroy();var K=angular.element('<ul class="dropdown-menu"></ul>');o.dropdownMenu.replaceWith(K),o.dropdownMenu=K}o.selectedOption=null}angular.isFunction(s)&&s(a,e)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.on("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}
488),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.off("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b===a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b===a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.pop()},length:function(){return a.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.multiMap","ui.bootstrap.stackedMap","ui.bootstrap.position"]).provider("$uibResolve",function(){var a=this;this.resolver=null,this.setResolver=function(a){this.resolver=a},this.$get=["$injector","$q",function(b,c){var d=a.resolver?b.get(a.resolver):null;return{resolve:function(a,e,f,g){if(d)return d.resolve(a,e,f,g);var h=[];return angular.forEach(a,function(a){angular.isFunction(a)||angular.isArray(a)?h.push(c.resolve(b.invoke(a))):angular.isString(a)?h.push(c.resolve(b.get(a))):h.push(c.resolve(a))}),c.all(h).then(function(b){var c={},d=0;return angular.forEach(a,function(a,e){c[e]=b[d++]}),c})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(a,b,c){function d(b,d,e){e.modalInClass&&(a.addClass(d,e.modalInClass),b.$on(c.NOW_CLOSING_EVENT,function(c,f){var g=f();b.modalOptions.animation?a.removeClass(d,e.modalInClass).then(g):g()}))}return{restrict:"A",compile:function(a,b){return a.addClass(b.backdropClass),d}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(a,b,c,d){return{scope:{index:"@"},restrict:"A",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/modal/window.html"},link:function(e,f,g){f.addClass(g.windowTopClass||""),e.size=g.size,e.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!==c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},f.on("click",e.close),e.$isRendered=!0;var h=b.defer();e.$$postDigest(function(){h.resolve()}),h.promise.then(function(){var h=null;g.modalInClass&&(h=c(f,{addClass:g.modalInClass}).start(),e.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();c(f,{removeClass:g.modalInClass}).start().then(d)})),b.when(h).then(function(){var b=a.getTop();if(b&&a.modalRendered(b.key),!d[0].activeElement||!f[0].contains(d[0].activeElement)){var c=f[0].querySelector("[autofocus]");c?c.focus():f[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(a,b){b.modalAnimation&&a.addClass(b.uibModalAnimationClass)}}}).directive("uibModalTransclude",["$animate",function(a){return{link:function(b,c,d,e,f){f(b.$parent,function(b){c.empty(),a.enter(b,c)})}}}]).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap","$uibPosition",function(a,b,c,d,e,f,g,h,i){function j(a){var b="-";return a.replace(E,function(a,c){return(c?b:"")+a.toLowerCase()})}function k(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)}function l(){for(var a=-1,b=x.keys(),c=0;c<b.length;c++)x.get(b[c]).value.backdrop&&(a=c);return a>-1&&A>a&&(a=A),a}function m(a,b){var c=x.get(a).value,d=c.appendTo;x.remove(a),B=x.top(),B&&(A=parseInt(B.value.modalDomEl.attr("index"),10)),p(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||w;y.remove(b,a);var e=y.hasKey(b);d.toggleClass(b,e),!e&&v&&v.heightOverflow&&v.scrollbarWidth&&(v.originalRight?d.css({paddingRight:v.originalRight+"px"}):d.css({paddingRight:""}),v=null),n(!0)},c.closedDeferred),o(),b&&b.focus?b.focus():d.focus&&d.focus()}function n(a){var b;x.length()>0&&(b=x.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function o(){if(t&&-1===l()){var a=u;p(t,u,function(){a=null}),t=void 0,u=void 0}}function p(b,c,d,e){function g(){g.done||(g.done=!0,a.leave(b).then(function(){d&&d(),b.remove(),e&&e.resolve()}),c.$destroy())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(z.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function q(a){if(a.isDefaultPrevented())return a;var b=x.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){z.dismiss(b.key,"escape key press")}));break;case 9:var c=z.loadFocusElementList(b),d=!1;a.shiftKey?(z.isFocusInFirstItem(a,c)||z.isModalFocused(a,b))&&(d=z.focusLastFocusableElement(c)):z.isFocusInLastItem(a,c)&&(d=z.focusFirstFocusableElement(c)),d&&(a.preventDefault(),a.stopPropagation())}}function r(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}function s(){Array.prototype.forEach.call(document.querySelectorAll("["+C+"]"),function(a){var b=parseInt(a.getAttribute(C),10),c=b-1;a.setAttribute(C,c),c||(a.removeAttribute(C),a.removeAttribute("aria-hidden"))})}var t,u,v,w="modal-open",x=h.createNew(),y=g.createNew(),z={NOW_CLOSING_EVENT:"modal.stack.now-closing"},A=0,B=null,C="data-bootstrap-modal-aria-hidden-count",D="a[href], area[href], input
488:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]",E=/[A-Z]/g;return e.$watch(l,function(a){u&&(u.index=a)}),c.on("keydown",q),e.$on("$destroy",function(){c.off("keydown",q)}),z.open=function(b,f){function g(a){function b(a){var b=a.parent()?a.parent().children():[];return Array.prototype.filter.call(b,function(b){return b!==a[0]})}if(a&&"BODY"!==a[0].tagName)return b(a).forEach(function(a){var b="true"===a.getAttribute("aria-hidden"),c=parseInt(a.getAttribute(C),10);c||(c=b?1:0),a.setAttribute(C,c+1),a.setAttribute("aria-hidden","true")}),g(a.parent())}var h=c[0].activeElement,k=f.openedClass||w;n(!1),B=x.top(),x.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),y.put(k,b);var m=f.appendTo,o=l();o>=0&&!t&&(u=e.$new(!0),u.modalOptions=f,u.index=o,t=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>'),t.attr({"class":"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),f.backdropClass&&t.addClass(f.backdropClass),f.animation&&t.attr("modal-animation","true"),d(t)(u),a.enter(t,m),i.isScrollable(m)&&(v=i.scrollbarPadding(m),v.heightOverflow&&v.scrollbarWidth&&m.css({paddingRight:v.right+"px"})));var p;f.component?(p=document.createElement(j(f.component.name)),p=angular.element(p),p.attr({resolve:"$resolve","modal-instance":"$uibModalInstance",close:"$close($value)",dismiss:"$dismiss($value)"})):p=f.content,A=B?parseInt(B.value.modalDomEl.attr("index"),10)+1:0;var q=angular.element('<div uib-modal-window="modal-window"></div>');q.attr({"class":"modal","template-url":f.windowTemplateUrl,"window-top-class":f.windowTopClass,role:"dialog","aria-labelledby":f.ariaLabelledBy,"aria-describedby":f.ariaDescribedBy,size:f.size,index:A,animate:"animate","ng-style":"{'z-index': 1050 + $$topModalIndex*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).append(p),f.windowClass&&q.addClass(f.windowClass),f.animation&&q.attr("modal-animation","true"),m.addClass(k),f.scope&&(f.scope.$$topModalIndex=A),a.enter(d(q)(f.scope),m),x.top().value.modalDomEl=q,x.top().value.modalOpener=h,g(q)},z.close=function(a,b){var c=x.get(a);return s(),c&&r(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),m(a,c.value.modalOpener),!0):!c},z.dismiss=function(a,b){var c=x.get(a);return s(),c&&r(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),m(a,c.value.modalOpener),!0):!c},z.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},z.getTop=function(){return x.top()},z.modalRendered=function(a){var b=x.get(a);b&&b.value.renderDeferred.resolve()},z.focusFirstFocusableElement=function(a){return a.length>0?(a[0].focus(),!0):!1},z.focusLastFocusableElement=function(a){return a.length>0?(a[a.length-1].focus(),!0):!1},z.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},z.isFocusInFirstItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[0]:!1},z.isFocusInLastItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[b.length-1]:!1},z.loadFocusElementList=function(a){if(a){var b=a.value.modalDomEl;if(b&&b.length){var c=b[0].querySelectorAll(D);return c?Array.prototype.filter.call(c,function(a){return k(a)}):c}}},z}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return q}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)}
488,dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.appendTo.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");if(!e.component&&!e.template&&!e.templateUrl)throw new Error("One of component or template or templateUrl options is required.");var q;q=e.component?c.when(g.resolve(e.resolve,{},null,null)):c.all([i(e),g.resolve(e.resolve,{},null,null)]);var r;return r=k=c.all([k]).then(j,j).then(function(a){function c(b,c,d,e){b.$scope=g,b.$scope.$resolve={},d?b.$scope.$uibModalInstance=p:b.$uibModalInstance=p;var f=c?a[1]:a;angular.forEach(f,function(a,c){e&&(b[c]=a),b.$scope.$resolve[c]=a})}var d=e.scope||b,g=d.$new();g.$close=p.close,g.$dismiss=p.dismiss,g.$on("$destroy",function(){g.$$uibDestructionScheduled||g.$dismiss("$uibUnscheduledDestruction")});var i,j,k={scope:g,deferred:l,renderDeferred:o,closedDeferred:n,animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,ariaLabelledBy:e.ariaLabelledBy,ariaDescribedBy:e.ariaDescribedBy,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo},q={},r={};e.component?(c(q,!1,!0,!1),q.name=e.component,k.component=q):e.controller&&(c(r,!0,!1,!0),j=f(e.controller,r,!0,e.controllerAs),e.controllerAs&&e.bindToController&&(i=j.instance,i.$close=g.$close,i.$dismiss=g.$dismiss,angular.extend(i,{$resolve:r.$scope.$resolve},d)),i=j(),angular.isFunction(i.$onInit)&&i.$onInit()),e.component||(k.content=a[0]),h.open(p,k),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===r&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(a,e){b.ngModelCtrl=a,b.config=e,a.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(d.itemsPerPage,function(a){ 489b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=e.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],restrict:"A",controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},link:function(b,c,d,e){c.addClass("pager");var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var n=f(h,m(h),h===a);c.push(n)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var o=f(d-1,"...",!1);c.unshift(o)}if(l){if(3===d){var p=f(2,"2",!1);c.unshift(p)}var q=f(1,"1",!1);c.unshift(q)}}if(b>e){if(!l||b-2>e){var r=f(e+1,"...",!1);c.push(r)}if(l){if(e===b-2){var s=f(b-1,b-1,!1);c.push(s)}var t=f(b,b,!1);c.push(t)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boun
489daryLinkNumbers):e.boundaryLinkNumbers,m=angular.isDefined(b.pageLabel)?function(c){return a.$parent.$eval(b.pageLabel,{$page:c})}:angular.identity;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,b.$set("role","menu"),d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var n=this.render;this.render=function(){n(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],restrict:"A",controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},link:function(a,c,d,e){c.addClass("pagination");var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),b=null)}}var o=m.createNew();return h.on("keyup",n),k.$on("$destroy",function(){h.off("keyup",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="<div "+q+'-popup uib-title="'+r+"title"+s+'" '+(n.useContentExp?'content-exp="contentExp()" ':'content="'+r+"content"+s+'" ')+'origin-scope="origScope" class="uib-position-measure '+k+'" tooltip-animation-class="fade"uib-tooltip-classes ng-class="{ in: isOpen }" ></div>';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){P.isOpen?q():m()}function m(){O&&!a.$eval(d[k+"Enable"])||(u(),x(),P.popupDelay?H||(H=g(r,P.popupDelay,!1)):r())}function q(){s(),P.popupCloseDelay?I||(I=g(t,P.popupCloseDelay,!1)):t()}function r(){return s(),u(),P.content?(v(),void P.$evalAsync(function(){P.isOpen=!0,y(!0),U()})):angular.noop}function s(){H&&(g.cancel(H),H=null),J&&(g.cancel(J),J=null)}function t(){P&&P.$evalAsync(function(){P&&(P.isOpen=!1,y(!1),P.animation?G||(G=g(w,150,!1)):w())})}function u(){I&&(g.cancel(I),I=null),G&&(g.cancel(G),G=null)}function v(){E||(F=P.$new(),E=c(F,function(a){M?h.find("body").append(a):b.after(a)}),o.add(P,{close:t}),z())}function w(){s(),u(),A(),E&&(E.remove(),E=null,K&&g.cancel(K)),o.remove(P),F&&(F.$destroy(),F=null)}function x(){P.title=d[k+"Title"],S?P.content=S(a):P.content=d[e],P.popupClass=d[k+"Class"],P.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=i.parsePlacement(P.placement);L=b[1]?b[0]+"-"+b[1]:b[0];var c=parseInt(d[k+"PopupDelay"],10),f=parseInt(d[k+"PopupCloseDelay"],10);P.popupDelay=isNaN(c)?n.popupDelay:c,P.popupCloseDelay=isNaN(f)?n.popupCloseDelay:f}function y(b){R&&angular.isFunction(R.assign)&&R.assign(a,b)}function z(){T.length=0,S?(T.push(a.$watch(S,function(a){P.content=a,!a&&P.isOpen&&t()})),T.push(F.$watch(function(){Q||(Q=!0,F.$$postDigest(function(){Q=!1,P&&P.isOpen&&U()}))}))):T.push(d.$observe(e,function(a){P.content=a,!a&&P.isOpen?t():U()})),T.push(d.$observe(k+"Title",function(a){P.title=a,P.isOpen&&U()})),T.push(d.$observe(k+"Placement",function(a){P.placement=a?a:n.placement,P.isOpen&&U()}))}function A(){T.length&&(angular.forEach(T,function(a){a()}),T.length=0)}function B(a){P&&P.isOpen&&E&&(b[0].contains(a.target)||E[0].contains(a.target)||q())}
489function C(a){27===a.which&&q()}function D(){var c=[],e=[],f=a.$eval(d[k+"Trigger"]);V(),angular.isObject(f)?(Object.keys(f).forEach(function(a){c.push(a),e.push(f[a])}),N={show:c,hide:e}):N=p(f),"none"!==N.show&&N.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===N.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(N.hide[c],q)),b.on("keypress",C)})}var E,F,G,H,I,J,K,L,M=angular.isDefined(n.appendToBody)?n.appendToBody:!1,N=p(void 0),O=angular.isDefined(d[k+"Enable"]),P=a.$new(!0),Q=!1,R=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,S=n.useContentExp?l(d[e]):!1,T=[],U=function(){E&&E.html()&&(J||(J=g(function(){var a=i.positionElements(b,E,P.placement,M),c=angular.isDefined(E.offsetHeight)?E.offsetHeight:E.prop("offsetHeight"),d=M?i.offset(b):i.position(b);E.css({top:a.top+"px",left:a.left+"px"});var e=a.placement.split("-");E.hasClass(e[0])||(E.removeClass(L.split("-")[0]),E.addClass(e[0])),E.hasClass(n.placementClassPrefix+a.placement)||(E.removeClass(n.placementClassPrefix+L),E.addClass(n.placementClassPrefix+a.placement)),K=g(function(){var a=angular.isDefined(E.offsetHeight)?E.offsetHeight:E.prop("offsetHeight"),b=i.adjustTop(e,d,c,a);b&&E.css(b),K=null},0,!1),E.hasClass("uib-position-measure")?(i.positionArrow(E,a.placement),E.removeClass("uib-position-measure")):L!==a.placement&&i.positionArrow(E,a.placement),L=a.placement,J=null},0,!1)))};P.origScope=a,P.isOpen=!1,P.contentExp=function(){return P.content},d.$observe("disabled",function(a){a&&s(),a&&P.isOpen&&t()}),R&&a.$watch(R,function(a){P&&!a===P.isOpen&&j()});var V=function(){N.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j)),b.off("keypress",C)}),N.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};D();var W=a.$eval(d[k+"Animation"]);P.animation=angular.isDefined(W)?!!W:n.animation;var X,Y=k+"AppendToBody";X=Y in d&&void 0===d[Y]?!0:a.$eval(d[Y]),M=angular.isDefined(X)?X:M,a.$on("$destroy",function(){V(),w(),P=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}b.popupClass&&c.addClass(b.popupClass),b.animation&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{restrict:"A",scope:{uibTitle:"@",contentExp:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&",uibTitle:"@"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){function d(){return angular.isDefined(a.maxParam)?a.maxParam:c.max}var e=this,f=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=d(),this.addBar=function(a,b,c){f||b.css({transition:"none"}),this.bars.push(a),a.max=d(),a.title=c&&angular.isDefined(c.title)?c.title:"progressbar",a.$watch("value",function(b){a.recalculatePercentage()}),a.recalculatePercentage=function(){var b=e.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);b>100&&(a.percent-=b-100)},a.$on("$destroy",function(){b=null,e.removeBar(a)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEac
489h(function(a){a.recalculatePercentage()})},a.$watch("maxParam",function(a){e.bars.forEach(function(a){a.max=d(),a.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop},e=this;this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff,this.enableReset=angular.isDefined(b.enableReset)?a.$parent.$eval(b.enableReset):c.enableReset;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){if(!a.readonly&&b>=0&&b<=a.range.length){var c=e.enableReset&&d.$viewValue===b?0:b;d.$setViewValue(c),d.$render()}},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue,a.title=e.getTitle(a.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],restrict:"A",scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){function b(a){for(var b=0;b<d.tabs.length;b++)if(d.tabs[b].index===a)return b}var c,d=this;d.tabs=[],d.select=function(a,f){if(!e){var g=b(c),h=d.tabs[g];if(h){if(h.tab.onDeselect({$event:f,$selectedIndex:a}),f&&f.isDefaultPrevented())return;h.tab.active=!1}var i=d.tabs[a];i?(i.tab.onSelect({$event:f}),i.tab.active=!0,d.active=i.index,c=i.index):!i&&angular.isDefined(c)&&(d.active=null,c=null)}},d.addTab=function(a){if(d.tabs.push({tab:a,index:a.index}),d.tabs.sort(function(a,b){return a.index>b.index?1:a.index<b.index?-1:0}),a.index===d.active||!angular.isDefined(d.active)&&1===d.tabs.length){var c=b(a.index);d.select(c)}},d.removeTab=function(a){for(var b,c=0;c<d.tabs.length;c++)if(d.tabs[c].tab===a){b=c;break}if(d.tabs[b].index===d.active){var e=b===d.tabs.length-1?b-1:b+1%d.tabs.length;d.select(e)}d.tabs.splice(b,1)},a.$watch("tabset.active",function(a){angular.isDefined(a)&&a!==c&&d.select(b(a))});var e;a.$on("$destroy",function(){e=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{},bindToController:{active:"=?",type:"@"},controller:"UibTabsetController",controllerAs:"tabset",templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tabset.html"},link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tab.html"},transclude:!0,scope:{heading:"@",index:"=?",classes:"@?",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),angular.isUndefined(d.index)&&(e.tabs&&e.tabs.length?b.index=Math.max.apply(null,e.tabs.map(function(a){return a.index}
489))+1:b.index=0),angular.isUndefined(d.classes)&&(b.classes=""),b.select=function(a){if(!b.disabled){for(var c,d=0;d<e.tabs.length;d++)if(e.tabs[d].tab===b){c=d;break}e.select(c,a)}},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase()||"uib:tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude).tab;e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c&&""!==a.hours?(a.showMeridian&&(12===b&&(b=0),a.meridian===y[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes,c=b>=0&&60>b;return c&&""!==a.minutes?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a,b){return null===a?"":angular.isDefined(a)&&a.toString().length<2&&!b?"0"+a:a.toString()}function l(a){m(),x.$setViewValue(new Date(v)),n(a)}function m(){s&&s.$setValidity("hours",!0),t&&t.$setValidity("minutes",!0),u&&u.$setValidity("seconds",!0),x.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(x.$modelValue){var c=v.getHours(),d=v.getMinutes(),e=v.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c,!z),"m"!==b&&(a.minutes=k(d)),a.meridian=v.getHours()<12?y[0]:y[1],"s"!==b&&(a.seconds=k(e)),a.meridian=v.getHours()<12?y[0]:y[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=y[0]}function o(a){v=q(v,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}function r(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}var s,t,u,v=new Date,w=[],x={$setViewValue:angular.noop},y=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS,z=angular.isDefined(c.padHours)?a.$parent.$eval(c.padHours):!0;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){x=b,x.$render=this.render,x.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2);s=e.controller("ngModel"),t=f.controller("ngModel"),u=h.controller("ngModel");var i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var A=g.hourStep;c.hourStep&&w.push(a.$parent.$watch(d(c.hourStep),function(a){A=+a}));var B=g.minuteStep;c.minuteStep&&w.push(a.$parent.$watch(d(c.minuteStep),function(a){B=+a}));var C;w.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);C=isNaN(b)?void 0:b}));var D;w.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);D=isNaN(b)?void 0:b}));var E=!1;c.ngDisabled&&w.push(a.$parent.$watch(d(c.ngDisabled),function(a){E=a})),a.noIncrementHours=function(){var a=p(v,60*A);return E||a>D||v>a&&C>a},a.noDecrementHours=function(){var a=p(v,60*-A);return E||C>a||a>v&&a>D},a.noIncrementMinutes=function(){var a=p(v,B);return E||a>D||v>a&&C>a},a.noDecrementMinutes=function(){var a=p(v,-B);return E||C>a||a>v&&a>D},a.noIncrementSeconds=function(){var a=q(v,F);return E||a>D||v>a&&C>a},a.noDecrementSeconds=function(){var a=q(v,-F);return E||C>a||a>v&&a>D},a.noToggleMeridian=function(){return v.getHours()<12?E||p(v,720)>D:E||p(v,-720)<C};var F=g.secondStep;c.secondStep&&w.push(a.$parent.$watch(d(c.secondStep),function(a){F=+a})),a.showSeconds=g.showSeconds,c.showSeconds&&w.push(a.$parent.$watch(d(c.showSeconds),function(b){a.showSeconds=!!b})),a.showMeridian=g.showMeridian,c.showMeridian&&w.push(a.$parent.$watch(d(c.showMeridian),function(b){if(a.showMeridian=!!b,x.$error.time){var c=h(),d=i();angular.isDefined(c)&&angular.isDefined(d)&&(v.setHours(c),l())}else n()})),this.setupMousewheelEvents=function(b,c,d){var e=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})}
489,this.setupArrowkeyEvents=function(b,c,d){b.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){x.$setViewValue(null),x.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b,s&&s.$setValidity("hours",!1)),angular.isDefined(c)&&(a.invalidMinutes=c,t&&t.$setValidity("minutes",!1)),angular.isDefined(d)&&(a.invalidSeconds=d,u&&u.$setValidity("seconds",!1))};a.updateHours=function(){var a=h(),b=i();x.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(v.setHours(a),v.setMinutes(b),C>v||v>D?e(!0):l("h")):e(!0)},b.on("blur",function(b){x.$setTouched(),r()?m():null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours,!z)})}),a.updateMinutes=function(){var a=i(),b=h();x.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(v.setHours(b),v.setMinutes(a),C>v||v>D?e(void 0,!0):l("m")):e(void 0,!0)},c.on("blur",function(b){x.$setTouched(),r()?m():null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();x.$setDirty(),angular.isDefined(a)?(v.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.on("blur",function(b){r()?m():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=x.$viewValue;isNaN(b)?(x.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(v=b),C>v||v>D?(x.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*A*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-A*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*B)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-B)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(F)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-F)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(v.getHours()<12?60:-60)):a.meridian=a.meridian===y[0]?y[1]:y[0])},a.blur=function(){x.$setTouched()},a.$on("$destroy",function(){for(;w.length;)w.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],restrict:"A",controller:"UibTimepickerController",controllerAs:"timepicker",scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){P.moveInProgress||(P.moveInProgress=!0,P.$digest()),$()}function o(){P.position=F?l.offset(b):l.position(b),P.position.top+=b.prop("offsetHeight")}function p(a){var b;return angular.version.minor<6?(b=a.$options||{},b.getOption=function(a){return b[a]}):b=a.$options,b}var q,r,s=[9,13,27,38,40],t=200,u=a.$eval(c.typeaheadMinLength);u||0===u||(u=1),a.$watch(c.typeaheadMinLength,function(a){u=a||0===a?a:1});var v=a.$eval(c.typeaheadWaitMs)||0,w=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){w=a!==!1});var x,y,z=e(c.typeaheadLoading).assign||angular.noop,A=c.typeaheadShouldSelect?e(c.typeaheadShouldSelect):function(a,b){var c=b.$event;return 13===c.which||9===c.which},B=e(c.typeaheadOnSelect),C=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,D=e(c.typeaheadNoResults).assign||angular.noop,E=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,F=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,G=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,H=a.$eval(c.typeaheadFocusFirst)!==!1,I=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,J=e(c.typeaheadIsOpen).assign||angular.noop,K=a.$eval(c.typeaheadShowHint)||!1,L=e(c.ngModel),M=e(c.ngModel+"($$$p)"),N=function(b,c){return angular.isFunction(L(a))&&r.getOption("getterSetter")?M(b,{$$$p:c}):L.assign(b,c)},O=m.parse(c.uibTypeahead),P=a.$new(),Q=a.$on("$destroy",function(){P.$destroy()});P.$on("$destroy",Q);var R="typeahead-"+P.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":R});var S,T;K&&(S=angular.element("<div></div>"),S.css("position","relative"),b.after(S),T=b.clone(),T.attr("placeholder",""),T.attr("tabindex","-1"),T.val(""),T.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),T.attr("id")&&T.removeAttr("id"),S.append(T),T.after(b));var U=angular.element("<div uib-typeahead-popup></div>");U.attr({id:R,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&U.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&U.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var V=function(){K&&T.val("")},W=function(){P.matches=[],P.activeIdx=-1,b.attr("aria-expanded",!1),V()},X=function(a){return R+"-option-"+a};
489P.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",X(a))});var Y=function(a,b){return P.matches.length>b&&a?a.toUpperCase()===P.matches[b].label.toUpperCase():!1},Z=function(c,d){var e={$viewValue:c};z(a,!0),D(a,!1),f.when(O.source(a,e)).then(function(f){var g=c===q.$viewValue;if(g&&x)if(f&&f.length>0){P.activeIdx=H?0:-1,D(a,!1),P.matches.length=0;for(var h=0;h<f.length;h++)e[O.itemName]=f[h],P.matches.push({id:X(h),label:O.viewMapper(P,e),model:f[h]});if(P.query=c,o(),b.attr("aria-expanded",!0),I&&1===P.matches.length&&Y(c,0)&&(angular.isNumber(P.debounceUpdate)||angular.isObject(P.debounceUpdate)?k(function(){P.select(0,d)},angular.isNumber(P.debounceUpdate)?P.debounceUpdate:P.debounceUpdate["default"]):P.select(0,d)),K){var i=P.matches[0].label;angular.isString(c)&&c.length>0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?T.val(c+i.slice(c.length)):T.val("")}}else W(),D(a,!0);g&&z(a,!1)},function(){W(),z(a,!1),D(a,!0)})};F&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var $=k(function(){P.matches.length&&o(),P.moveInProgress=!1},t);P.moveInProgress=!1,P.query=void 0;var _,aa=function(a){_=g(function(){Z(a)},v)},ba=function(){_&&g.cancel(_)};W(),P.assignIsOpen=function(b){J(a,b)},P.select=function(d,e){var f,h,i={};y=!0,i[O.itemName]=h=P.matches[d].model,f=O.modelMapper(a,i),N(a,f),q.$setValidity("editable",!0),q.$setValidity("parse",!0),B(a,{$item:h,$model:f,$label:O.viewMapper(a,i),$event:e}),W(),P.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(b){if(0!==P.matches.length&&-1!==s.indexOf(b.which)){var c=A(a,{$event:b});if(-1===P.activeIdx&&c||9===b.which&&b.shiftKey)return W(),void P.$digest();b.preventDefault();var d;switch(b.which){case 27:b.stopPropagation(),W(),a.$digest();break;case 38:P.activeIdx=(P.activeIdx>0?P.activeIdx:P.matches.length)-1,P.$digest(),d=U[0].querySelectorAll(".uib-typeahead-match")[P.activeIdx],d.parentNode.scrollTop=d.offsetTop;break;case 40:P.activeIdx=(P.activeIdx+1)%P.matches.length,P.$digest(),d=U[0].querySelectorAll(".uib-typeahead-match")[P.activeIdx], 490d.parentNode.scrollTop=d.offsetTop;break;default:c&&P.$apply(function(){angular.isNumber(P.debounceUpdate)||angular.isObject(P.debounceUpdate)?k(function(){P.select(P.activeIdx,b)},angular.isNumber(P.debounceUpdate)?P.debounceUpdate:P.debounceUpdate["default"]):P.select(P.activeIdx,b)})}}}),b.on("focus",function(a){x=!0,0!==u||q.$viewValue||g(function(){Z(q.$viewValue,a)},0)}),b.on("blur",function(a){C&&P.matches.length&&-1!==P.activeIdx&&!y&&(y=!0,P.$apply(function(){angular.isObject(P.debounceUpdate)&&angular.isNumber(P.debounceUpdate.blur)?k(function(){P.select(P.activeIdx,a)},P.debounceUpdate.blur):P.select(P.activeIdx,a)})),!w&&q.$error.editable&&(q.$setViewValue(),P.$apply(function(){q.$setValidity("editable",!0),q.$setValidity("parse",!0)}),b.val("")),x=!1,y=!1});var ca=function(c){b[0]!==c.target&&3!==c.which&&0!==P.matches.length&&(W(),j.$$phase||a.$digest())};h.on("click",ca),a.$on("$destroy",function(){h.off("click",ca),(F||G)&&da.remove(),F&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),U.remove(),K&&S.remove()});var da=d(U)(P);F?h.find("body").append(da):G?angular.element(G).eq(0).append(da):b.after(da),this.init=function(b){q=b,r=p(q),P.debounceUpdate=e(r.getOption("debounce"))(a),q.$parsers.unshift(function(b){return x=!0,0===u||b&&b.length>=u?v>0?(ba(),aa(b)):Z(b):(z(a,!1),ba(),W()),w?b:b?void q.$setValidity("editable",!1):(q.$setValidity("editable",!0),null)}),q.$formatters.push(function(b){var c,d,e={};return w||q.$setValidity("editable",!0),E?(e.$model=b,E(a,e)):(e[O.itemName]=b,c=O.viewMapper(a,e),e[O.itemName]=void 0,d=O.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","uibTypeahead"],link:function(a,b,c,d){d[1].init(d[0])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"<strong>$&</strong>"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'<div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading" ng-disabled="isDisabled" uib-tabindex-toggle><span uib-accordion-header ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n</div>\n<div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'<div role="tablist" class="panel-group" ng-transclude></div>')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'<button ng-show="closeable" t
490ype="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">×</span>\n <span class="sr-only">Close</span>\n</button>\n<div ng-transclude></div>\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'<div class="carousel-inner" ng-transclude></div>\n<a role="button" href class="left carousel-control" ng-click="prev()" ng-class="{ disabled: isPrevDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n</a>\n<a role="button" href class="right carousel-control" ng-click="next()" ng-class="{ disabled: isNextDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n</a>\n<ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n</ol>\n')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'<div class="text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'<div ng-switch="datepickerMode">\n <div uib-daypicker ng-switch-when="day" tabindex="0" class="uib-daypicker"></div>\n <div uib-monthpicker ng-switch-when="month" tabindex="0" class="uib-monthpicker"></div>\n <div uib-yearpicker ng-switch-when="year" tabindex="0" class="uib-yearpicker"></div>\n</div>\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-weeks" ng-repeat="row in rows track by $index" role="row">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default btn-sm"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n <th colspan="{{::yearHeaderColspan}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === max
490Mode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-months" ng-repeat="row in rows track by $index" role="row">\n <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-years" ng-repeat="row in rows track by $index" role="row">\n <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepickerPopup/popup.html",'<ul role="presentation" class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" class="uib-button-bar">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n </li>\n</ul>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html","<div class=\"modal-dialog {{size ? 'modal-' + size : ''}}\"><div class=\"modal-content\" uib-modal-transclude></div></div>\n")}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'<li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'<li role="menuitem" ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'first\')}}</a></li>\n<li role="menuitem" ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li role="menuitem" ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)" ng-disabled="ngDisabled&&!page.active" uib-tabindex-toggle>{{page.text}}</a></li>\n<li role="menuitem" ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n<li role="menuitem" ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'last\')}}</a></li>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind="content"></div>\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind="content"></div>\n</div>\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n <a href ng-click="select($event)" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane"\n ng-repeat="tab in tabset.tabs"\n ng-class="{active: tabset.active === tab.index}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td> </td>\n <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showSeconds"> </td>\n <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n </td>\n <td class="uib-separator">:</td>\n <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n </td>\n <td ng-show="showSeconds" class="uib-separator">:</td>\n <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n <input type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n </td>\n <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td> </td>\n <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showSeconds"> </td>\n <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'<a href\n tabindex="-1"\n ng-bind-html="match.label | uibTypeaheadHighlight:query"\n ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n <li class="uib-typeahead-match" ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!
490angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!
490angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0});; 491/* 492 AngularJS v1.8.2 493 (c) 2010-2020 Google LLC. http://angularjs.org 494 License: MIT 495*/ 496(function(z,l){'use strict';function q(n){return["$animate",function(u){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(m,f,a,e,r){var b,h,s;if(!n){b=f[0];s=a.ngMessage||a.when;a=a.ngMessageExp||a.whenExp;var k=function(c){h=c?v(c)?c:c.split(/[\s,]+/):null;e.reRender()};a?(k(m.$eval(a)),m.$watchCollection(a,k)):k(s)}var g,t;e.register(b,t={test:function(c){var b=h;c=b?v(b)?0<=b.indexOf(c):b.hasOwnProperty(c):void 0;return c},attach:function(){g|| 497r(function(c,a){u.enter(c,null,f);g=c;var d=g.$$attachId=e.getAttachId();g.on("$destroy",function(){g&&g.$$attachId===d&&(e.deregister(b,n),t.detach());a.$destroy()})})},detach:function(){if(g){var c=g;g=null;u.leave(c)}}},n);m.$on("$destroy",function(){e.deregister(b,n)})}}}]}var x,v,p,y;l.module("ngMessages",[],function(){x=l.forEach;v=l.isArray;p=l.isString;y=l.element}).info({angularVersion:"1.8.2"}).directive("ngMessages",["$animate",function(n){function u(f,a){return p(a)&&0===a.length||m(f.$eval(a))} 498function m(f){return p(f)?f.length:!!f}return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(f,a,e){function r(c,b){for(var d=b,a=[];d&&d!==c;){var e=d.$$ngMessageNode;if(e&&e.length)return k[e];d.childNodes.length&&-1===a.indexOf(d)?(a.push(d),d=d.childNodes[d.childNodes.length-1]):d.previousSibling?d=d.previousSibling:(d=d.parentNode,a.push(d))}}var b=this,h=0,s=0;this.getAttachId=function(){return s++};var k=this.messages={},g,t;this.render=function(c){c=c|| 499{};g=!1;t=c;for(var w=u(a,e.ngMessagesMultiple)||u(a,e.multiple),d=[],r={},h=0,k=b.head,s=!1,l=0;null!=k;){l++;var p=k.message,q=!1;s||x(c,function(b,c){m(b)&&!q&&(h++,p.test(c)&&!r[c]&&(q=r[c]=!0,p.attach()))});q?s=!w:d.push(p);k=k.next}x(d,function(c){c.detach()});c=d.length!==l;(w=b.default&&!c&&0<h)?b.default.attach():b.default&&b.default.detach();c||w?n.setClass(f,"ng-active","ng-inactive"):n.setClass(f,"ng-inactive","ng-active")};a.$watchCollection(e.ngMessages||e["for"],b.render);this.reRender= 500function(){g||(g=!0,a.$evalAsync(function(){g&&t&&b.render(t)}))};this.register=function(c,a,d){if(d)b.default=a;else{d=h.toString();k[d]={message:a};var e=f[0];a=k[d];b.head?(e=r(e,c))?(a.next=e.next,e.next=a):(a.next=b.head,b.head=a):b.head=a;c.$$ngMessageNode=d;h++}b.reRender()};this.deregister=function(a,e){if(e)delete b.default;else{var d=a.$$ngMessageNode;delete a.$$ngMessageNode;var g=k[d];if(g){var h=r(f[0],a);h?h.next=g.next:b.head=g.next}delete k[d]}b.reRender()}}]}}]).directive("ngMessagesInclude", 501["$templateRequest","$document","$compile",function(n,l,m){function f(a,e){var f=m.$$createComment?m.$$createComment("ngMessagesInclude",e):l[0].createComment(" ngMessagesInclude: "+e+" "),f=y(f);a.after(f);a.remove()}return{restrict:"AE",require:"^^ngMessages",link:function(a,e,l){var b=l.ngMessagesInclude||l.src;n(b).then(function(h){a.$$destroyed||(p(h)&&!h.trim()?f(e,b):m(h)(a,function(a){e.after(a);f(e,b)}))})}}}]).directive("ngMessage",q()).directive("ngMessageExp",q()).directive("ngMessageDefault", 502q(!0))})(window,window.angular); 503//# sourceMappingURL=angular-messages.min.js.map 504; 505/* 506 AngularJS v1.8.2 507 (c) 2010-2020 Google LLC. http://angularjs.org 508 License: MIT 509*/ 510(function(s,e){'use strict';function O(e){var g=[];B(g,D).chars(e);return g.join("")}var C=e.$$minErr("$sanitize"),E,g,F,G,H,q,D,I,J,B;e.module("ngSanitize",[]).provider("$sanitize",function(){function h(a,d){return A(a.split(","),d)}function A(a,d){var c={},b;for(b=0;b<a.length;b++)c[d?q(a[b]):a[b]]=!0;return c}function t(a,d){d&&d.length&&g(a,A(d))}function P(a){for(var d={},c=0,b=a.length;c<b;c++){var k=a[c];d[k.name]=k.value}return d}function K(a){return a.replace(/&/g,"&").replace(Q,function(a){var c=
vendor: 4,311 bytes, lines 511-517
511a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(c-55296)+(a-56320)+65536)+";"}).replace(u,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function z(a){for(;a;){if(a.nodeType===s.Node.ELEMENT_NODE)for(var d=a.attributes,c=0,b=d.length;c<b;c++){var k=d[c],f=k.name.toLowerCase();if("xmlns:ns1"===f||0===f.lastIndexOf("ns1:",0))a.removeAttributeNode(k),c--,b--}(d=a.firstChild)&&z(d);a=v("nextSibling",a)}}function v(a,d){var c=d[a];if(c&&I.call(d,c))throw C("elclob", 512d.outerHTML||d.outerText);return c}var y=!1,f=!1;this.$get=["$$sanitizeUri",function(a){y=!0;f&&g(m,l);return function(d){var c=[];J(d,B(c,function(b,c){return!/^unsafe:/.test(a(b,c))}));return c.join("")}}];this.enableSvg=function(a){return H(a)?(f=a,this):f};this.addValidElements=function(a){y||(G(a)&&(a={htmlElements:a}),t(l,a.svgElements),t(r,a.htmlVoidElements),t(m,a.htmlVoidElements),t(m,a.htmlElements));return this};this.addValidAttrs=function(a){y||g(L,A(a,!0));return this};E=e.bind;g=e.extend; 513F=e.forEach;G=e.isArray;H=e.isDefined;q=e.$$lowercase;D=e.noop;J=function(a,d){null===a||void 0===a?a="":"string"!==typeof a&&(a=""+a);var c=M(a);if(!c)return"";var b=5;do{if(0===b)throw C("uinput");b--;a=c.innerHTML;c=M(a)}while(a!==c.innerHTML);for(b=c.firstChild;b;){switch(b.nodeType){case 1:d.start(b.nodeName.toLowerCase(),P(b.attributes));break;case 3:d.chars(b.textContent)}var k;if(!(k=b.firstChild)&&(1===b.nodeType&&d.end(b.nodeName.toLowerCase()),k=v("nextSibling",b),!k))for(;null==k;){b= 514v("parentNode",b);if(b===c)break;k=v("nextSibling",b);1===b.nodeType&&d.end(b.nodeName.toLowerCase())}b=k}for(;b=c.firstChild;)c.removeChild(b)};B=function(a,d){var c=!1,b=E(a,a.push);return{start:function(a,f){a=q(a);!c&&w[a]&&(c=a);c||!0!==m[a]||(b("<"),b(a),F(f,function(c,f){var e=q(f),h="img"===a&&"src"===e||"background"===e;!0!==L[e]||!0===N[e]&&!d(c,h)||(b(" "),b(f),b('="'),b(K(c)),b('"'))}),b(">"))},end:function(a){a=q(a);c||!0!==m[a]||!0===r[a]||(b("</"),b(a),b(">"));a==c&&(c=!1)},chars:function(a){c|| 515b(K(a))}}};I=s.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)};var Q=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=/([^#-~ |!])/g,r=h("area,br,col,hr,img,wbr"),x=h("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),p=h("rp,rt"),n=g({},p,x),x=g({},x,h("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),p=g({},p,h("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")), 516l=h("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=h("script,style"),m=g({},r,x,p,n),N=h("background,cite,href,longdesc,src,xlink:href,xml:base"),n=h("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"), 517p=h("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode
517-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan", 518!0),L=g({},N,p,n),M=function(a,d){function c(b){b="<remove></remove>"+b;try{var c=(new a.DOMParser).parseFromString(b,"text/html").body;c.firstChild.remove();return c}catch(d){}}var b;try{b=!!c("")}catch(f){b=!1}if(b)return c;if(!d||!d.implementation)throw C("noinert");b=d.implementation.createHTMLDocument("inert");var e=(b.documentElement||b.getDocumentElement()).querySelector("body");return function(a){e.innerHTML=a;d.documentMode&&z(e);return e}}(s,s.document)}).info({angularVersion:"1.8.2"}); 519e.module("ngSanitize").filter("linky",["$sanitize",function(h){var g=/((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,t=/^mailto:/i,q=e.$$minErr("linky"),s=e.isDefined,z=e.isFunction,v=e.isObject,y=e.isString;return function(f,e,u){function r(e){e&&l.push(O(e))}function x(f,h){var g,a=p(f);l.push("<a ");for(g in a)l.push(g+'="'+a[g]+'" ');!s(e)||"target"in a||l.push('target="',e,'" ');l.push('href="',f.replace(/"/g,"""),'">');r(h);l.push("</a>")}if(null== 520f||""===f)return f;if(!y(f))throw q("notstring",f);for(var p=z(u)?u:v(u)?function(){return u}:function(){return{}},n=f,l=[],w,m;f=n.match(g);)w=f[0],f[2]||f[4]||(w=(f[3]?"http://":"mailto:")+w),m=f.index,r(n.substr(0,m)),x(w,f[0].replace(t,"")),n=n.substring(m+f[0].length);r(n);return h(l.join(""))}}])})(window,window.angular); 521; 522!function (a, b) { "use strict"; "function" == typeof define && define.amd ? define(["angular"], b) : "object" == typeof exports ? (b(require("angular")), module.exports = "ngStorage") : b(a.angular) }(this, function (a) { "use strict"; function b(a, b) { var c; try { c = a[b] } catch (a) { c = !1 } if (c) { var d = "__" + Math.round(1e7 * Math.random()); try { a[b].setItem(d, d), a[b].removeItem(d, d) } catch (a) { c = !1 } } return c } function c(c) { var d = b(window, c); return function () { var e = "ngStorage-"; this.setKeyPrefix = function (a) { if ("string" != typeof a) throw new TypeError("[ngStorage] - " + c + "Provider.setKeyPrefix() expects a String."); e = a }; var f = a.toJson, g = a.fromJson; this.setSerializer = function (a) { if ("function" != typeof a) throw new TypeError("[ngStorage] - " + c + "Provider.setSerializer expects a function."); f = a }, this.setDeserializer = function (a) { if ("function" != typeof a) throw new TypeError("[ngStorage] - " + c + "Provider.setDeserializer expects a function."); g = a }, this.supported = function () { return !!d }, this.get = function (a) { return d && g(d.getItem(e + a)) }, this.set = function (a, b) { return d && d.setItem(e + a, f(b)) }, this.remove = function (a) { d && d.removeItem(e + a) }, this.$get = ["$rootScope", "$window", "$log", "$timeout", "$document", function (d, h, i, j, k) { var p, q, l = e.length, m = b(h, c), n = m || (i.warn("This browser does not support Web Storage!"), { setItem: a.noop, getItem: a.noop, removeItem: a.noop }), o = { $default: function (b) { for (var c in b) a.isDefined(o[c]) || (o[c] = a.copy(b[c])); return o.$sync(), o }, $reset: function (a, b) { for (var c in o) "$" === c[0] || delete o[c] && n.removeItem(e + c); return b && b(), o.$default(a) }, $sync: function () { for (var c, a = 0, b = n.length; a < b; a++) (c = n.key(a)) && e === c.slice(0, l) && (o[c.slice(l)] = g(n.getItem(c))) }, $apply: function () { var b; if (q = null, !a.equals(o, p)) { b = a.copy(p), a.forEach(o, function (c, d) { a.isDefined(c) && "$" !== d[0] && (n.setItem(e + d, f(c)), delete b[d]) }); for (var c in b) n.removeItem(e + c); p = a.copy(o) } }, $supported: function () { return !!m } }; return o.$sync(), p = a.copy(o), d.$watch(function () { q || (q = j(o.$apply, 100, !1)) }), h.addEventListener && h.addEventListener("storage", function (b) { if (b.key) { var c = k[0]; c.hasFocus && c.hasFocus() || e !== b.key.slice(0, l) || (b.newValue ? o[b.key.slice(l)] = g(b.newValue) : delete o[b.key.slice(l)], p = a.copy(o), d.$apply()) } }), h.addEventListener && h.addEventListener("beforeunload", function () { o.$apply() }), o }] } } return a = a && a.module ? a : window.angular, a.module("ngStorage", []).provider("$localStorage", c("localStorage")).provider("$sessionStorage", c("sessionStorage")) });; 523"use strict";angular.module("com.2fdevs.videogular",["ngSanitize"]).run(["$templateCache",function(a){a.put("vg-templates/vg-media-video","<video></video>"),a.put("vg-templates/vg-media-audio","<audio></audio>"),Function.prototype.bind||(Function.prototype.bind=function(a){if
523("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e})}]),angular.module("com.2fdevs.videogular").constant("VG_STATES",{PLAY:"play",PAUSE:"pause",STOP:"stop"}).constant("VG_VOLUME_KEY","videogularVolume"),angular.module("com.2fdevs.videogular").controller("vgController",["$scope","$window","vgConfigLoader","vgFullscreen","VG_UTILS","VG_STATES","VG_VOLUME_KEY",function(a,b,c,d,e,f,g){var h=null,i=!1,j=!1;this.videogularElement=null,this.clearMedia=function(){this.mediaElement[0].src=""},this.onRouteChange=function(){(void 0===this.clearMediaOnNavigate||this.clearMediaOnNavigate===!0)&&this.clearMedia()},this.onCanPlay=function(b){this.isBuffering=!1,a.$apply(a.vgCanPlay({$event:b}))},this.onVideoReady=function(){this.isReady=!0,this.autoPlay=a.vgAutoPlay,this.playsInline=a.vgPlaysInline,this.nativeFullscreen=a.vgNativeFullscreen||!0,this.cuePoints=a.vgCuePoints,this.clearMediaOnNavigate=a.vgClearMediaOnNavigate||!0,this.currentState=f.STOP,j=!0,e.supportsLocalStorage()&&this.setVolume(parseFloat(b.localStorage.getItem(g)||"1")),a.vgConfig?c.loadConfig(a.vgConfig).then(this.onLoadConfig.bind(this)):a.vgPlayerReady({$API:this})},this.onLoadConfig=function(b){this.config=b,a.vgTheme=this.config.theme,a.vgAutoPlay=this.config.autoPlay,a.vgPlaysInline=this.config.playsInline,a.vgNativeFullscreen=this.config.nativeFullscreen,a.vgCuePoints=this.config.cuePoints,a.vgClearMediaOnNavigate=this.config.clearMediaOnNavigate,a.vgPlayerReady({$API:this})},this.onLoadMetaData=function(a){this.isBuffering=!1,this.onUpdateTime(a)},this.onUpdateTime=function(b){this.currentTime=1e3*b.target.currentTime,b.target.duration!=1/0?(this.totalTime=1e3*b.target.duration,this.timeLeft=1e3*(b.target.duration-b.target.currentTime),this.isLive=!1):this.isLive=!0,this.cuePoints&&this.checkCuePoints(b.target.currentTime),a.vgUpdateTime({$currentTime:b.target.currentTime,$duration:b.target.duration}),a.$apply()},this.checkCuePoints=function(a){for(var b in this.cuePoints)for(var c=0,d=this.cuePoints[b].length;d>c;c++){var e=this.cuePoints[b][c],f=parseInt(a,10),g=parseInt(e.timeLapse.start,10);e.timeLapse.end||(e.timeLapse.end=e.timeLapse.start+1),a<e.timeLapse.end&&(e.$$isCompleted=!1),e.$$isDirty||f!==g||"function"!=typeof e.onEnter||(e.onEnter(a,e.timeLapse,e.params),e.$$isDirty=!0),a>e.timeLapse.start?(a<e.timeLapse.end&&(e.onUpdate&&e.onUpdate(a,e.timeLapse,e.params),e.$$isDirty||"function"!=typeof e.onEnter||e.onEnter(a,e.timeLapse,e.params),e.$$isDirty=!0),a>=e.timeLapse.end&&(e.onComplete&&!e.$$isCompleted&&(e.$$isCompleted=!0,e.onComplete(a,e.timeLapse,e.params)),e.$$isDirty=!1)):(e.onLeave&&e.$$isDirty&&e.onLeave(a,e.timeLapse,e.params),e.$$isDirty=!1)}},this.onPlay=function(){this.setState(f.PLAY),a.$apply()},this.onPause=function(){0==this.mediaElement[0].currentTime?this.setState(f.STOP):this.setState(f.PAUSE),a.$apply()},this.onVolumeChange=function(){this.volume=this.mediaElement[0].volume,a.$apply()},this.onPlaybackChange=function(){this.playback=this.mediaElement[0].playbackRate,a.$apply()},this.onSeeking=function(b){a.vgSeeking({$currentTime:b.target.currentTime,$duration:b.target.duration})},this.onSeeked=function(b){a.vgSeeked({$currentTime:b.target.currentTime,$duration:b.target.duration})},this.seekTime=function(a,b){var c;b?(c=a*this.mediaElement[0].duration/100,this.mediaElement[0].currentTime=c):(c=a,this.mediaElement[0].currentTime=c),this.currentTime=1e3*c},this.playPause=function(){this.mediaElement[0].paused?this.play():this.pause()},this.setState=function(b){return b&&b!=this.currentState&&(a.vgUpdateState({$state:b}),this.currentState=b),this.currentState},this.play=function(){this.mediaElement[0].play(),this.setState(f.PLAY)},this.pause=function(){this.mediaElement[0].pause(),this.setState(f.PAUSE)},this.stop=function(){try{this.mediaElement[0].pause(),this.mediaElement[0].currentTime=0,this.currentTime=0,this.setState(f.STOP)}catch(a){return a}},this.toggleFullScreen=function(){d.isAvailable&&this.nativeFullscreen?this.isFullScreen?e.isMobileDevice()||d.exit():e.isMobileDevice()?e.isiOSDevice()?j?this.enterElementInFullScreen(this.mediaElement[0]):(i=!0,this.play()):this.enterElementInFullScreen(this.mediaElement[0]):this.enterElementInFullScreen(this.videogularElement[0]):(this.isFullScreen?(this.videogularElement.removeClass("fullscreen"),this.videogularElement.css("z-index","auto")):(this.videogularElement.addClass("fullscreen"),this.videogularElement.css("z-index",e.getZIndex())),this.isFullScreen=!this.isFullScreen)},this.enterElementInFullScreen=function(a){d.request(a)},this.changeSource=function(b){a.vgChangeSource({$source:b})},this.setVolume=function(c){c=Math.max(Math.min(c,1),0),a.vgUpdateVolume({$volume:c}),this.mediaElement[0].volume=c,this.volume=c,e.supportsLocalStorage()&&b.localStorage.setItem(g,c.toString())},this.setPlayback=function(b){a.vgUpdatePlayback({$playBack:b}),this.mediaElement[0].playbackRate=b,this.playback=b},this.updateTheme=function(a){var b,c,d=document.getElementsByTagName("link");if(h)for(b=0,c=d.length;c>b;b++)if(d[b].outerHTML.indexOf(h)>=0){d[b].parentNode.removeChild(d[b]);break}if(a){var e=angular.element(document).find("head"),f=!1;for(b=0,c=d.length;c>b&&!(f=d[b].outerHTML.indexOf(a)>=0);b++);f||e.append("<link rel='stylesheet' href='"+a+"'>"),h=a}}
523,this.onStartBuffering=function(b){this.isBuffering=!0,a.$apply()},this.onStartPlaying=function(b){this.isBuffering=!1,a.$apply()},this.onComplete=function(b){a.vgComplete(),this.setState(f.STOP),this.isCompleted=!0,a.$apply()},this.onVideoError=function(b){a.vgError({$event:b})},this.addListeners=function(){this.mediaElement[0].addEventListener("canplay",this.onCanPlay.bind(this),!1),this.mediaElement[0].addEventListener("loadedmetadata",this.onLoadMetaData.bind(this),!1),this.mediaElement[0].addEventListener("waiting",this.onStartBuffering.bind(this),!1),this.mediaElement[0].addEventListener("ended",this.onComplete.bind(this),!1),this.mediaElement[0].addEventListener("playing",this.onStartPlaying.bind(this),!1),this.mediaElement[0].addEventListener("play",this.onPlay.bind(this),!1),this.mediaElement[0].addEventListener("pause",this.onPause.bind(this),!1),this.mediaElement[0].addEventListener("volumechange",this.onVolumeChange.bind(this),!1),this.mediaElement[0].addEventListener("playbackchange",this.onPlaybackChange.bind(this),!1),this.mediaElement[0].addEventListener("timeupdate",this.onUpdateTime.bind(this),!1),this.mediaElement[0].addEventListener("seeking",this.onSeeking.bind(this),!1),this.mediaElement[0].addEventListener("seeked",this.onSeeked.bind(this),!1),this.mediaElement[0].addEventListener("error",this.onVideoError.bind(this),!1)},this.init=function(){this.isReady=!1,this.isCompleted=!1,this.currentTime=0,this.totalTime=0,this.timeLeft=0,this.isLive=!1,this.isFullScreen=!1,this.playback=1,this.isConfig=void 0!=a.vgConfig,d.isAvailable&&(this.isFullScreen=d.isFullScreen()),this.updateTheme(a.vgTheme),this.addBindings(),d.isAvailable&&document.addEventListener(d.onchange,this.onFullScreenChange.bind(this))},this.onUpdateTheme=function(a){this.updateTheme(a)},this.onUpdateAutoPlay=function(a){a&&!this.autoPlay&&(this.autoPlay=a,this.play(this))},this.onUpdatePlaysInline=function(a){this.playsInline=a},this.onUpdateNativeFullscreen=function(a){void 0==a&&(a=!0),this.nativeFullscreen=a},this.onUpdateCuePoints=function(a){this.cuePoints=a,this.checkCuePoints(this.currentTime)},this.onUpdateClearMediaOnNavigate=function(a){this.clearMediaOnNavigate=a},this.addBindings=function(){a.$watch("vgTheme",this.onUpdateTheme.bind(this)),a.$watch("vgAutoPlay",this.onUpdateAutoPlay.bind(this)),a.$watch("vgPlaysInline",this.onUpdatePlaysInline.bind(this)),a.$watch("vgNativeFullscreen",this.onUpdateNativeFullscreen.bind(this)),a.$watch("vgCuePoints",this.onUpdateCuePoints.bind(this)),a.$watch("vgClearMediaOnNavigate",this.onUpdateClearMediaOnNavigate.bind(this))},this.onFullScreenChange=function(b){this.isFullScreen=d.isFullScreen(),a.$apply()},a.$on("$destroy",this.clearMedia.bind(this)),a.$on("$routeChangeStart",this.onRouteChange.bind(this)),this.init()}]),angular.module("com.2fdevs.videogular").directive("vgCrossorigin",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e;a.setCrossorigin=function(a){a?d.mediaElement.attr("crossorigin",a):d.mediaElement.removeAttr("crossorigin")},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setCrossorigin(d.config.crossorigin)}):a.$watch(c.vgCrossorigin,function(b,c){e&&b==c||!b?a.setCrossorigin():(e=b,a.setCrossorigin(e))})}}}}]),angular.module("com.2fdevs.videogular").directive("vgLoop",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e;a.setLoop=function(a){a?d.mediaElement.attr("loop",a):d.mediaElement.removeAttr("loop")},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setLoop(d.config.loop)}):a.$watch(c.vgLoop,function(b,c){e&&b==c||!b?a.setLoop():(e=b,a.setLoop(e))})}}}}]),angular.module("com.2fdevs.videogular").directive("vgMedia",["$timeout","VG_UTILS","VG_STATES",function(a,b,c){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){var c=b.vgType||"video";return b.vgTemplate||"vg-templates/vg-media-"+c},scope:{vgSrc:"=?",vgType:"=?"},link:function(d,e,f,g){var h;f.vgType&&"video"!==f.vgType?f.vgType="audio":f.vgType="video",d.onChangeSource=function(a,b){h&&a==b||!a||(h=a,g.currentState!==c.PLAY&&(g.currentState=c.STOP),g.sources=h,d.changeSource())},d.changeSource=function(){var c="";if(g.mediaElement[0].canPlayType){for(var d=0,e=h.length;e>d;d++)if(c=g.mediaElement[0].canPlayType(h[d].type),"maybe"==c||"probably"==c){g.mediaElement.attr("src",h[d].src),g.mediaElement.attr("type",h[d].type),g.changeSource(h[d]);break}}else g.mediaElement.attr("src",h[0].src),g.mediaElement.attr("type",h[0].type),g.changeSource(h[0]);b.isMobileDevice()&&g.mediaElement[0].load(),a(function(){g.autoPlay&&!b.isMobileDevice()&&g.play()}),""==c&&g.onVideoError()},g.mediaElement=e.find(f.vgType),g.sources=d.vgSrc,g.addListeners(),g.onVideoReady(),d.$w
523atch("vgSrc",d.onChangeSource),d.$watch(function(){return g.sources},d.onChangeSource),d.$watch(function(){return g.playsInline},function(a,b){a?g.mediaElement.attr("webkit-playsinline",""):g.mediaElement.removeAttr("webkit-playsinline")}),g.isConfig&&d.$watch(function(){return g.config},function(){g.config&&(d.vgSrc=g.config.sources)})}}}]),angular.module("com.2fdevs.videogular").directive("vgNativeControls",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e;a.setControls=function(a){a?d.mediaElement.attr("controls",a):d.mediaElement.removeAttr("controls")},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setControls(d.config.controls)}):a.$watch(c.vgNativeControls,function(b,c){e&&b==c||!b?a.setControls():(e=b,a.setControls(e))})}}}}]),angular.module("com.2fdevs.videogular").directive("vgPreload",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e;a.setPreload=function(a){a?d.mediaElement.attr("preload",a):d.mediaElement.removeAttr("preload")},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setPreload(d.config.preload)}):a.$watch(c.vgPreload,function(b,c){e&&b==c||!b?a.setPreload():(e=b,a.setPreload(e))})}}}}]),angular.module("com.2fdevs.videogular").directive("vgTracks",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e,f,g,h=!1;a.onLoadMetaData=function(){h=!0,a.updateTracks()},a.updateTracks=function(){var b=d.mediaElement.children();for(f=0,g=b.length;g>f;f++)b[f].remove&&b[f].remove();if(e)for(f=0,g=e.length;g>f;f++){var c=document.createElement("track");for(var h in e[f])c[h]=e[f][h];c.addEventListener("load",a.onLoadTrack.bind(a,c)),d.mediaElement[0].appendChild(c)}},a.onLoadTrack=function(b){b["default"]?b.mode="showing":b.mode="hidden";for(var c=0,e=d.mediaElement[0].textTracks.length;e>c;c++)b.label==d.mediaElement[0].textTracks[c].label&&(b["default"]?d.mediaElement[0].textTracks[c].mode="showing":d.mediaElement[0].textTracks[c].mode="disabled");b.removeEventListener("load",a.onLoadTrack.bind(a,b))},a.setTracks=function(b){e=b,d.tracks=b,h?a.updateTracks():d.mediaElement[0].addEventListener("loadedmetadata",a.onLoadMetaData.bind(a),!1)},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setTracks(d.config.tracks)}):a.$watch(c.vgTracks,function(b,c){e&&b==c||a.setTracks(b)},!0)}}}}]),angular.module("com.2fdevs.videogular").directive("videogular",[function(){return{restrict:"EA",scope:{vgTheme:"=?",vgAutoPlay:"=?",vgPlaysInline:"=?",vgNativeFullscreen:"=?",vgClearMediaOnNavigate:"=?",vgCuePoints:"=?",vgConfig:"@",vgCanPlay:"&",vgComplete:"&",vgUpdateVolume:"&",vgUpdatePlayback:"&",vgUpdateTime:"&",vgUpdateState:"&",vgPlayerReady:"&",vgChangeSource:"&",vgSeeking:"&",vgSeeked:"&",vgError:"&"},controller:"vgController",controllerAs:"API",link:{pre:function(a,b,c,d){d.videogularElement=angular.element(b)}}}}]),angular.module("com.2fdevs.videogular").service("vgConfigLoader",["$http","$q","$sce",function(a,b,c){this.loadConfig=function(d){var e=b.defer();return a({method:"GET",url:d}).then(function(a){for(var b=a.data,d=0,f=b.sources.length;f>d;d++)b.sources[d].src=c.trustAsResourceUrl(b.sources[d].src);e.resolve(b)},function(){e.reject()}),e.promise}}]),angular.module("com.2fdevs.videogular").service("vgFullscreen",["VG_UTILS",function(a){function b(){var a=!1;return a=c?null!=document[d.element]||c.webkitDisplayingFullscreen:null!=document[d.element]}var c,d=null,e={w3:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",onchange:"fullscreenchange",onerror:"fullscreenerror"},newWebkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},oldWebkit:{enabled:"webkitIsFullScreen",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullScreen",exit:"webkitCancelFullScreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},moz:{enabled:"mozFullScreen",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",onchange:"mozfullscreenchange",onerror:"mozfullscreenerror"},ios:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitEnterFullscreen",exit:"webkitExitFullscreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",onchange:"MSFullscreenChange",onerror:"MSFullscreenError"}};for(var f in e)if(e[f].enabled in document){d=e[f];break}a.isiOSDevice()&&(d=e.ios),this.isAvailable=null!=d,d&&(this.onchange=d.onchange,this.onerror=d.onerror,this.isFullScreen=b,this.exit=function(){document[d.exit]()},this.request=function(a){c=a,c[d.request]()})}]),angular.module("com.2fdevs.videogular").service("VG_UTILS",["$window",function(a){this.fixEventOffset=function(a){var b=navigator.userAgent.match(/Firefox\/(\d+)/i);if(b&&Number.parseInt(b.pop())<39){var c=a.currentTarget.currentStyle||window.getComputedStyle(a.target,null),d=parseInt(c.borderLeftWidth,10),e=parseInt(c.borderTopWidth,10),f=a.currentTarget.getBoundingClientRect(),g=a.clientX-d-f.left,h=a.clientY-e-f.top;a.offsetX=g,a.offsetY=h}return a},this.getZIndex=function(){for(var a,b=1,c=document.getElementsByTagName("*"),d=0,e=c.length;e>d;d++)a=parseInt(window.getComputedStyle(c[d])["z-index"]),a>b&&(b=a+1);return b},this.isMobileDevice=function(){return"undefined"!=typeof window.orientation||-1!==navigator.userAgent.indexOf("IEMobile")},this.isiOSDevice=function(){return navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/iPad/i)},this.supportsLocalStorage=function(){var b="videogular-test-key",c=a.sessionStorage;try{return c.setItem(b,"1"),c.removeItem(b),"localStorage"in a&&null!==a.localStorage}catch(d){return!1}}}]);; 524/** 525 * angular-jquery 526 * @version v0.2.1 - 2013-07-24 527 * @link https://github.com/mgcrea/angular-jquery 528 * @author Olivier Louvignes <[email protected]> 529 * @license MIT License, http://www.opensource.org/licenses/MIT 530 */ 531"use strict"; angular.module("mgcrea.jquery", []).provider("dimensions", function () { this.$get = function () { return this }, this.offset = function () { if (this) { var a = this.getBoundingClientRect(), b = this.ownerDocument.documentElement; return { top: a.top + window.pageYOffset - b.clientTop, left: a.left + window.pageXOffset - b.clientLeft } } }, this.height = function (a) { var b = window.getComputedStyle(this), c = this.offsetHeight; return a ? c += parseFloat(b.marginTop) + parseFloat(b.marginBottom) : c -= parseFloat(b.paddingTop) + parseFloat(b.paddingBottom) + parseFloat(b.borderTopWidth) + parseFloat(b.borderBottomWidth), c }, this.width = function (a) { var b = window.getComputedStyle(this), c = this.offsetWidth; return a ? c += parseFloat(b.marginLeft) + parseFloat(b.marginRight) : c -= parseFloat(b.paddingLeft) + parseFloat(b.paddingRight) + parseFloat(b.borderLeftWidth) + parseFloat(b.borderRightWidth), c } }).constant("debounce", function (a, b) { var c, d; return function () { var e = this, f = arguments, g = function () { c = null, d = a.apply(e, f) }; return clearTimeout(c), c = setTimeout(g, b), d } }).provider("jQuery", ["dimensionsProvider", function (a) { var b = this, c = angular.element; this.fn = angular.extend({}, a), this.$get = function () { return delete b.fn.$get, function (a) { var d = a instanceof HTMLElement ? a : document.querySelectorAll(a); return d = c(d), angular.forEach(b.fn, function (a, b) { d[b] = a.bind(d[0]) }), d } } }
531]);; 532/** 533 * @license videogular v1.4.4 http://videogular.com 534 * Two Fucking Developers http://twofuckingdevelopers.com 535 * License: MIT 536 */ 537/** 538 * @ngdoc directive 539 * @name com.2fdevs.videogular.plugins.overlayplay.directive:vgOverlayPlay 540 * @restrict E 541 * @description 542 * Shows a big play button centered when player is paused or stopped. 543 * 544 * <pre> 545 * <videogular vg-theme="config.theme.url" vg-autoplay="config.autoPlay"> 546 * <vg-media vg-src="sources"></vg-media> 547 * 548 * <vg-overlay-play></vg-overlay-play> 549 * </videogular> 550 * </pre> 551 * 552 */ 553"use strict"; 554angular.module("com.2fdevs.videogular.plugins.overlayplay", []) 555 .run( 556 ["$templateCache", function ($templateCache) { 557 $templateCache.put("vg-templates/vg-overlay-play", 558 '<div class="overlayPlayContainer" ng-click="onClickOverlayPlay()">\ 559 <div class="iconButton" ng-class="overlayPlayIcon"></div>\ 560 </div>'); 561 }] 562 ) 563 .directive("vgOverlayPlay", ["VG_STATES", 564 function (VG_STATES) { 565 return { 566 restrict: "E", 567 require: "^videogular", 568 scope: {}, 569 templateUrl: function (elem, attrs) { 570 return attrs.vgTemplate || 'vg-templates/vg-overlay-play'; 571 }, 572 link: function (scope, elem, attr, API) { 573 scope.onChangeState = function onChangeState(newState) { 574 switch (newState) { 575 case VG_STATES.PLAY: 576 scope.overlayPlayIcon = {}; 577 break; 578 579 case VG_STATES.PAUSE: 580 scope.overlayPlayIcon = {play: true}; 581 break; 582 583 case VG_STATES.STOP: 584 scope.overlayPlayIcon = {play: true}; 585 break; 586 } 587 }; 588 589 scope.onClickOverlayPlay = function onClickOverlayPlay(event) { 590 API.playPause(); 591 }; 592 593 scope.overlayPlayIcon = {play: true}; 594 595 scope.$watch( 596 function () { 597 return API.currentState; 598 }, 599 function (newVal, oldVal) { 600 scope.onChangeState(newVal); 601 } 602 ); 603 } 604 } 605 } 606 ]); 607 608; 609/** 610 * @license videogular v1.4.4 http://videogular.com 611 * Two Fucking Developers http://twofuckingdevelopers.com 612 * License: MIT 613 */ 614/** 615 * @ngdoc directive 616 * @name com.2fdevs.videogular.plugins.controls.directive:vgControls 617 * @restrict E 618 * @description 619 * This directive acts as a container and you will need other directives to control the media. 620 * Inside this directive you can add other directives like vg-play-pause-button and vg-scrub-bar. 621 * 622 * <pre> 623 * <videogular vg-theme="config.theme.url"> 624 * <vg-media vg-src="sources"></vg-media> 625 * 626 * <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'></vg-controls> 627 * </videogular> 628 * </pre> 629 * 630 * @param {boolean=false} vgAutohide Boolean variable or value to activate autohide. 631 * @param {number=2000} vgAutohideTime Number variable or value that represents the time in milliseconds that will wait vgControls until it hides. 632 * 633 * 634 */ 635"use strict"; 636angular.module("com.2fdevs.videogular.plugins.controls", []) 637 .run( 638 ["$templateCache", function ($templateCache) { 639 $templateCache.put("vg-templates/vg-controls", 640 '<div class="controls-container" ng-mousemove="onMouseMove()" ng-class="animationClass" ng-transclude></div>'); 641 }] 642) 643 .directive("vgControls", 644 ["$timeout", "VG_STATES", function ($timeout, VG_STATES) { 645 return { 646 restrict: "E", 647 require: "^videogular", 648 transclude: true, 649 templateUrl: function (elem, attrs) { 650 return attrs.vgTemplate || 'vg-templates/vg-control
650s'; 651 }, 652 scope: { 653 vgAutohide: "=?", 654 vgAutohideTime: "=?" 655 }, 656 link: function (scope, elem, attr, API) { 657 var w = 0; 658 var h = 0; 659 var autoHideTime = 2000; 660 var hideInterval; 661 662 scope.API = API; 663 664 scope.onMouseMove = function onMouseMove() { 665 if (scope.vgAutohide) scope.showControls(); 666 }; 667 668 scope.setAutohide = function setAutohide(value) { 669 if (value && API.currentState == VG_STATES.PLAY) { 670 hideInterval = $timeout(scope.hideControls, autoHideTime); 671 } 672 else { 673 scope.animationClass = ""; 674 $timeout.cancel(hideInterval); 675 scope.showControls(); 676 } 677 }; 678 679 scope.setAutohideTime = function setAutohideTime(value) { 680 autoHideTime = value; 681 }; 682 683 scope.hideControls = function hideControls() { 684 scope.animationClass = "hide-animation"; 685 }; 686 687 scope.showControls = function showControls() { 688 scope.animationClass = "show-animation"; 689 $timeout.cancel(hideInterval); 690 if (scope.vgAutohide && API.currentState == VG_STATES.PLAY) hideInterval = $timeout(scope.hideControls, autoHideTime); 691 }; 692 693 if (API.isConfig) { 694 scope.$watch("API.config", 695 function () { 696 if (scope.API.config) { 697 var ahValue = scope.API.config.plugins.controls.autohide || false; 698 var ahtValue = scope.API.config.plugins.controls.autohideTime || 2000; 699 scope.vgAutohide = ahValue; 700 scope.vgAutohideTime = ahtValue; 701 scope.setAutohideTime(ahtValue); 702 scope.setAutohide(ahValue); 703 } 704 } 705 ); 706 } 707 else { 708 // If vg-autohide has been set 709 if (scope.vgAutohide != undefined) { 710 scope.$watch("vgAutohide", scope.setAutohide); 711 } 712 713 // If vg-autohide-time has been set 714 if (scope.vgAutohideTime != undefined) { 715 scope.$watch("vgAutohideTime", scope.setAutohideTime); 716 } 717 } 718 719 scope.$watch( 720 function () { 721 return API.currentState; 722 }, 723 function (newVal, oldVal) { 724 if (scope.vgAutohide) scope.showControls(); 725 } 726 ); 727 } 728 } 729 }] 730); 731 732/** 733 * @ngdoc directive 734 * @name com.2fdevs.videogular.plugins.controls.directive:vgFullscreenButton 735 * @restrict E 736 * @description 737 * Directive to switch between fullscreen and normal mode. 738 * 739 * <pre> 740 * <videogular vg-theme="config.theme.url"> 741 * <vg-media vg-src="sources"></vg-media> 742 * 743 * <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'> 744 * <vg-fullscreen-button></vg-fullscreen-button> 745 * </vg-controls> 746 * </videogular> 747 * </pre> 748 * 749 */ 750angular.module("com.2fdevs.videogular.plugins.controls") 751 .run( 752 ["$templateCache", function ($templateCache) { 753 $templateCache.put("vg-templates/vg-fullscreen-button", 754 '<button class="iconButton" ng-click="onClickFullScreen()" ng-class="fullscreenIcon" aria-label="Toggle full screen" type="button"> </button>'); 755 }] 756) 757 .directive("vgFullscreenButton", 758 [function () { 759 return { 760 restrict: "E", 761 require: "^videogular", 762 scope: {}, 763 templateUrl: function (elem, attrs) { 764 return attrs.vgTemplate || 'vg-templates/vg-fullscreen-button'; 765 }, 766 link: function (scope, elem, attr, API) { 767 scope.onChangeFullScreen = function onChangeFullScreen(isFullScreen) { 768 scope.fullscreenIcon = {enter: !isFullScreen, exit: isFullScreen}; 769 }; 770 771 scope.onClickFullScreen = function onClickFullScreen() { 772 API.toggleFullScreen(); 773 }; 774 775 scope.fullscreenIcon = {enter: true}; 776 777 scope.$watch( 778 function () { 779 return API.isFullScreen; 780 }, 781 function (newVal, oldVal) { 782 if (newVal != oldVal) { 783 scope.onChangeFullScreen(newVal); 784 } 785 } 786 ); 787 } 788 } 789 }] 790); 791 792/** 793 * @ngdoc directive 794 * @name com.2fdevs.videogular.plugins.controls.directive:vgPlayPauseButton 795 * @restrict E 796 * @description
797 * Adds a button inside vg-controls to play and pause media. 798 * 799 * <pre> 800 * <videogular vg-theme="config.theme.url"> 801 * <vg-media vg-src="sources"></vg-media> 802 * 803 * <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'> 804 * <vg-play-pause-button></vg-play-pause-button> 805 * </vg-controls> 806 * </videogular> 807 * </pre> 808 * 809 */ 810angular.module("com.2fdevs.videogular.plugins.controls") 811 .run( 812 ["$templateCache", function ($templateCache) { 813 $templateCache.put("vg-templates/vg-play-pause-button", 814 '<button class="iconButton" ng-click="onClickPlayPause()" ng-class="playPauseIcon" aria-label="Play/Pause" type="button"></button>'); 815 }] 816) 817 .directive("vgPlayPauseButton", 818 ["VG_STATES", function (VG_STATES) { 819 return { 820 restrict: "E", 821 require: "^videogular", 822 scope: {}, 823 templateUrl: function (elem, attrs) { 824 return attrs.vgTemplate || 'vg-templates/vg-play-pause-button'; 825 }, 826 link: function (scope, elem, attr, API) { 827 scope.setState = function setState(newState) { 828 switch (newState) { 829 case VG_STATES.PLAY: 830 scope.playPauseIcon = {pause: true}; 831 break; 832 833 case VG_STATES.PAUSE: 834 scope.playPauseIcon = {play: true}; 835 break; 836 837 case VG_STATES.STOP: 838 scope.playPauseIcon = {play: true}; 839 break; 840 } 841 }; 842 843 scope.onClickPlayPause = function onClickPlayPause() { 844 API.playPause(); 845 }; 846 847 scope.playPauseIcon = {play: true}; 848 849 scope.$watch( 850 function () { 851 return API.currentState; 852 }, 853 function (newVal, oldVal) { 854 scope.setState(newVal); 855 } 856 ); 857 } 858 } 859 }] 860); 861 862/** 863 * @ngdoc directive 864 * @name com.2fdevs.videogular.plugins.controls.directive:ngPlaybackButton 865 * @restrict E 866 * @description 867 * Directive to display a playback buttom to control the playback rate. 868 * 869 * @param {array} vgSpeeds Bindable array with a list of speed options as strings. Default ['0.5', '1', '1.5', '2'] 870 * <pre> 871 * <videogular vg-theme="config.theme.url"> 872 * <vg-media vg-src="sources"></vg-media> 873 * 874 * <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'> 875 * <vg-playback-button vg-speeds='config.playbackSpeeds'></vg-playback-button> 876 * </vg-controls> 877 * </videogular> 878 * </pre> 879 * 880 */ 881angular.module("com.2fdevs.videogular.plugins.controls") 882 .run( 883 ["$templateCache", function ($templateCache) { 884 $templateCache.put("vg-templates/vg-playback-button", 885 '<button class="playbackValue iconButton" ng-click="onClickPlayback()">{{playback}}x</button>'); 886 }] 887) 888 .directive("vgPlaybackButton", 889 [function () { 890 return { 891 restrict: "E", 892 require: "^videogular", 893 templateUrl: function (elem, attrs) { 894 return attrs.vgTemplate || 'vg-templates/vg-playback-button'; 895 }, 896 scope: { 897 vgSpeeds: '=?' 898 }, 899 link: function (scope, elem, attr, API) { 900 scope.playback = '1'; 901 902 scope.setPlayback = function(playback) { 903 scope.playback = playback; 904 API.setPlayback(parseFloat(playback)); 905 }; 906 907 scope.onClickPlayback = function onClickPlayback() { 908 var playbackOptions = scope.vgSpeeds || ['0.5', '1', '1.5', '2']; 909 var nextPlaybackRate = playbackOptions.indexOf(scope.playback.toString()) + 1; 910 911 if (nextPlaybackRate >= playbackOptions.length) { 912 scope.playback = playbackOptions[0]; 913 } 914 else { 915 scope.playback = playbackOptions[nextPlaybackRate]; 916 } 917 918 scope.setPlayback(scope.playback); 919 }; 920 921 scope.$watch( 922 function () { 923 return API.playback; 924 }, 925 function(newVal, oldVal) { 926 if (newVal != oldVal) { 927 scope.setPlayback(newVal); 928 } 929 } 930 ); 931 } 932 } 933 }] 934); 935 936/** 937 * @ngdoc directive 938 * @name com.2fdevs.videogular.plugins.controls.directive:vgScrubBarBuffer 939 * @restrict E 940 * @description 941 * Layer inside vg-scrub-bar to display the buffer. 942 * 943 * <pre> 944 * <videogular vg-theme="config.theme.url"> 945 * <vg-media vg-src="sources"></vg-media> 946 *
947 * <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'> 948 * <vg-scrub-bar> 949 * <vg-scrub-bar-buffer></vg-scrub-bar-buffer> 950 * </vg-scrub-bar> 951 * </vg-controls> 952 * </videogular> 953 * </pre> 954 * 955 */ 956angular.module("com.2fdevs.videogular.plugins.controls") 957 .directive("vgScrubBarBuffer", 958 [function () { 959 return { 960 restrict: "E", 961 require: "^videogular", 962 link: function (scope, elem, attr, API) { 963 var percentTime = 0; 964 965 scope.onUpdateBuffer = function onUpdateBuffer(newBuffer) { 966 if (typeof newBuffer === 'number' && API.totalTime) { 967 percentTime = 100 * (newBuffer / API.totalTime); 968 elem.css("width", percentTime + "%"); 969 } else { 970 elem.css("width", 0); 971 } 972 }; 973 974 scope.$watch( 975 function () { 976 return API.bufferEnd; 977 }, 978 function (newVal, oldVal) { 979 scope.onUpdateBuffer(newVal); 980 } 981 ); 982 } 983 } 984 }] 985); 986 987/** 988 * @ngdoc directive 989 * @name com.2fdevs.videogular.plugins.controls.directive:vgScrubBarCuePoints 990 * @restrict E 991 * @description 992 * Layer inside vg-scrub-bar to display a cue point timeline. 993 * 994 * <pre> 995 * <videogular vg-theme="config.theme.url"> 996 * <vg-media vg-src="sources"></vg-media> 997 * 998 * <vg-controls> 999 * <vg-scrub-bar> 1000 * <vg-scrub-bar-cue-points vg-cue-points='config.cuePoints[0]'></vg-scrub-bar-cue-points> 1001 * </vg-scrub-bar> 1002 * </vg-controls> 1003 * </videogular> 1004 * </pre> 1005 * 1006 */ 1007angular.module("com.2fdevs.videogular.plugins.controls") 1008 .run(["$templateCache", 1009 function ($templateCache) { 1010 $templateCache.put("vg-templates/vg-scrub-bar-cue-points", 1011 '<div class="cue-point-timeline">' + 1012 '<div ng-repeat="cuePoint in vgCuePoints" class="cue-point" ng-style="cuePoint.$$style"></div>' + 1013 '</div>'); 1014 } 1015 ]) 1016 .directive("vgScrubBarCuePoints", [ 1017 function () { 1018 return { 1019 restrict: "E", 1020 require: "^videogular", 1021 templateUrl: function (elem, attrs) { 1022 return attrs.vgTemplate || 'vg-templates/vg-scrub-bar-cue-points'; 1023 }, 1024 scope: { 1025 "vgCuePoints": "=" 1026 }, 1027 link: function (scope, elem, attr, API) { 1028 scope.onPlayerReady = function onPlayerReady() { 1029 scope.updateCuePoints(scope.vgCuePoints); 1030 }; 1031 scope.updateCuePoints = function onUpdateCuePoints(cuePoints) { 1032 var totalWidth; 1033 1034 if (cuePoints) { 1035 totalWidth = parseInt(elem[0].clientWidth); 1036 1037 for (var i = 0, l = cuePoints.length; i < l; i++) { 1038 var end = (cuePoints[i].timeLapse.end >= 0) ? cuePoints[i].timeLapse.end : cuePoints[i].timeLapse.start + 1; 1039 var cuePointDuration = (end - cuePoints[i].timeLapse.start) * 1000; 1040 var position = (cuePoints[i].timeLapse.start * 100 / (Math.round(API.totalTime / 1000))) + "%"; 1041 var percentWidth = 0; 1042 1043 if (typeof cuePointDuration === 'number' && API.totalTime) { 1044 percentWidth = ((cuePointDuration * 100) / API.totalTime) + "%"; 1045 } 1046 1047 cuePoints[i].$$style = { 1048 width: percentWidth, 1049 left: position 1050 }; 1051 } 1052 } 1053 }; 1054 1055 scope.$watch("vgCuePoints", scope.updateCuePoints); 1056 1057 scope.$watch( 1058 function () { 1059 return API.totalTime; 1060 }, 1061 function (newVal, oldVal) { 1062 if (newVal > 0) scope.onPlayerReady(); 1063 } 1064 ); 1065 } 1066 } 1067 } 1068 ]); 1069 1070/** 1071 * @ngdoc directive 1072 * @name com.2fdevs.videogular.plugins.controls.directive:vgScrubBarCurrentTime 1073 * @restrict E 1074 * @description 1075 * Layer inside vg-scrub-bar to display the current time. 1076 * 1077 * <pre> 1078 * <videogular vg-theme="config.theme.url"> 1079 * <vg-media vg-src="sources"></vg-media> 1080 *
1081 * <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'> 1082 * <vg-scrub-bar> 1083 * <vg-scrub-bar-current-time></vg-scrub-bar-current-time> 1084 * </vg-scrub-bar> 1085 * </vg-controls> 1086 * </videogular> 1087 * </pre> 1088 * 1089 */ 1090angular.module("com.2fdevs.videogular.plugins.controls") 1091 .directive("vgScrubBarCurrentTime", 1092 [function () { 1093 return { 1094 restrict: "E", 1095 require: "^videogular", 1096 link: function (scope, elem, attr, API) { 1097 var percentTime = 0; 1098 1099 scope.onUpdateTime = function onUpdateTime(newCurrentTime) { 1100 if (typeof newCurrentTime === 'number' && API.totalTime) { 1101 percentTime = 100 * (newCurrentTime / API.totalTime); 1102 elem.css("width", percentTime + "%"); 1103 } else { 1104 elem.css("width", 0); 1105 } 1106 }; 1107 1108 scope.$watch( 1109 function () { 1110 return API.currentTime; 1111 }, 1112 function (newVal, oldVal) { 1113 scope.onUpdateTime(newVal); 1114 } 1115 ); 1116 } 1117 } 1118 }] 1119); 1120 1121/** 1122 * @ngdoc directive 1123 * @name com.2fdevs.videogular.plugins.controls.directive:vgScrubBarThumbnails 1124 * @restrict E 1125 * @description 1126 * Layer inside vg-scrub-bar to display thumbnails. 1127 * 1128 * Param thumbnails could be a string url pointing to a strip of thumbnails or an array of objects with the same 1129 * format that you can find in cue points. 1130 * 1131 * **Strip of thumbnails** 1132 * Must be an image with exactly 100 thumbnails. Recommended size per each thumbnail 107x60 1133 * Example of param value: "assets/images/strip-of-thumbnails.jpg" 1134 * 1135 * To create a strip of thumbnails you can use ffmpeg: 1136 * ffmpeg -loglevel panic -y -i app/assets/videos/videogular.mp4 -frames 1 -q:v 1 -vf 1137 * "select=not(mod(n\,29)),scale=-1:60,tile=100x1" app/assets/thumbnails/thumbnail.jpg 1138 * 1139 * **List of thumbnails** 1140 * Array with a list of cue points as images. You can specify start or a lapse with start and end. 1141 * Example of param value: 1142 * 1143 * [ 1144 * { 1145 * "timeLapse": { 1146 * "start": 5 1147 * }, 1148 * params: { 1149 * "thumbnail": "assets/thumbnails/thumbnail-shown-at-second-5.jpg" 1150 * } 1151 * }, 1152 * { 1153 * "timeLapse": { 1154 * "start": 49, 1155 * "end": 60 1156 * }, 1157 * "params": { 1158 * "thumbnail": "assets/thumbnails/thumbnail-shown-between-seconds-49-and-60.jpg" 1159 * } 1160 * } 1161 * ] 1162 * 1163 * <pre> 1164 * <videogular vg-theme="config.theme.url"> 1165 * <vg-media vg-src="sources"></vg-media> 1166 * 1167 * <vg-controls> 1168 * <vg-scrub-bar> 1169 * <vg-scrub-bar-thumbnails vg-thumbnails='config.thumbnails'></vg-scrub-bar-thumbnails> 1170 * </vg-scrub-bar> 1171 * </vg-controls> 1172 * </videogular> 1173 * </pre> 1174 * 1175 */ 1176angular.module("com.2fdevs.videogular.plugins.controls") 1177 .run(["$templateCache", 1178 function ($templateCache) { 1179 $templateCache.put("vg-templates/vg-scrub-bar-thumbnails", 1180 '<div class="vg-thumbnails" ng-show="thumbnails" ng-style="thumbnailContainer">' + 1181 '<div class="image-thumbnail" ng-style="thumbnails"></div>' + 1182 '</div>' + 1183 '<div class="background"></div>' 1184 ); 1185 } 1186 ]) 1187 .directive("vgScrubBarThumbnails", ["VG_UTILS", 1188 function (VG_UTILS) { 1189 return { 1190 restrict: "E", 1191 require: "^videogular", 1192 templateUrl: function (elem, attrs) { 1193 return attrs.vgTemplate || 'vg-templates/vg-scrub-bar-thumbnails'; 1194 }, 1195 scope: { 1196 "vgThumbnails": "=" 1197 }, 1198 link: function (scope, elem, attr, API) { 1199 var thumbnailsWidth = 0; 1200 var thumbWidth = 0; 1201 var slider = elem[0].querySelector(".background"); 1202 var isStrip = (typeof scope.vgThumbnails === "string"); 1203 1204 scope.thumbnails = false;
1205 scope.thumbnailContainer = {}; 1206 1207 scope.getOffset = function getOffset(event) { 1208 var el = event.target, 1209 x = 0; 1210 1211 while (el && !isNaN(el.offsetLeft)) { 1212 x += el.offsetLeft - el.scrollLeft; 1213 el = el.offsetParent; 1214 } 1215 1216 return event.clientX - x; 1217 }; 1218 1219 scope.onLoadThumbnails = function(event) { 1220 thumbnailsWidth = event.currentTarget.naturalWidth; 1221 thumbWidth = thumbnailsWidth / 100; 1222 }; 1223 1224 scope.onLoadThumbnail = function(event) { 1225 thumbWidth = event.currentTarget.naturalWidth; 1226 }; 1227 1228 scope.updateThumbnails = function(second) { 1229 var percentage = Math.round(second * 100 / (API.totalTime / 1000)); 1230 var thPos = (slider.scrollWidth * percentage / 100) - (thumbWidth / 2); 1231 1232 if (isStrip) { 1233 var bgPos = Math.round(thumbnailsWidth * percentage / 100); 1234 1235 scope.thumbnailContainer = { 1236 "width": thumbWidth + "px", 1237 "left": thPos + "px" 1238 }; 1239 1240 scope.thumbnails = { 1241 "background-image": 'url("' + scope.vgThumbnails + '")', 1242 "background-position": -bgPos + "px 0px" 1243 }; 1244 } 1245 else { 1246 var secondsByPixel = API.totalTime / slider.scrollWidth / 1000; 1247 var lapse = { 1248 start: Math.floor(second - (secondsByPixel / 2)), 1249 end: Math.ceil(second) 1250 }; 1251 1252 if (lapse.start < 0) lapse.start = 0; 1253 if (lapse.end > API.totalTime) lapse.end = API.totalTime; 1254 1255 scope.thumbnailContainer = { 1256 "left": thPos + "px" 1257 }; 1258 1259 scope.thumbnails = { 1260 "background-image": 'none' 1261 }; 1262 1263 if (scope.vgThumbnails) { 1264 for (var i=0, l=scope.vgThumbnails.length; i<l; i++) { 1265 var th = scope.vgThumbnails[i]; 1266 1267 if (th.timeLapse.end >= 0) { 1268 if (lapse.start >= th.timeLapse.start && (lapse.end <= th.timeLapse.end || lapse.end <= th.timeLapse.start)) { 1269 scope.thumbnails = { 1270 "background-image": 'url("' + th.params.thumbnail + '")' 1271 }; 1272 break; 1273 } 1274 } 1275 else { 1276 if (th.timeLapse.start >= lapse.start && th.timeLapse.start <= lapse.end) { 1277 scope.thumbnails = { 1278 "background-image": 'url("' + th.params.thumbnail + '")' 1279 }; 1280 break; 1281 } 1282 } 1283 } 1284 } 1285 } 1286 }; 1287 1288 scope.onMouseMove = function($event) { 1289 var second = Math.round($event.offsetX * API.mediaElement[0].duration / slider.scrollWidth); 1290 1291 scope.updateThumbnails(second); 1292 1293 scope.$digest(); 1294 }; 1295 1296 scope.onTouchMove = function($event) { 1297 var touches = $event.touches; 1298 var touchX = scope.getOffset(touches[0]); 1299 var second = Math.round(touchX * API.mediaElement[0].duration / slider.scrollWidth); 1300 1301 scope.updateThumbnails(second); 1302 1303 scope.$digest(); 1304 }; 1305 1306 scope.onMouseLeave = function(event) { 1307 scope.thumbnails = false;
1308 1309 scope.$digest(); 1310 }; 1311 1312 scope.onTouchLeave = function(event) { 1313 scope.thumbnails = false; 1314 1315 scope.$digest(); 1316 }; 1317 1318 scope.onDestroy = function() { 1319 elem.unbind("touchmove", scope.onTouchMove); 1320 elem.unbind("touchleave", scope.onTouchLeave); 1321 elem.unbind("touchend", scope.onTouchLeave); 1322 elem.unbind("mousemove", scope.onMouseMove); 1323 elem.unbind("mouseleave", scope.onMouseLeave); 1324 }; 1325 1326 var thLoader; 1327 if (isStrip) { 1328 thLoader = new Image(); 1329 thLoader.onload = scope.onLoadThumbnails.bind(scope); 1330 thLoader.src = scope.vgThumbnails; 1331 } 1332 else { 1333 thLoader = new Image(); 1334 thLoader.onload = scope.onLoadThumbnail.bind(scope); 1335 thLoader.src = scope.vgThumbnails[0].params.thumbnail; 1336 } 1337 1338 // Touch move is really buggy in Chrome for Android, maybe we could use mouse move that works ok 1339 if (VG_UTILS.isMobileDevice()) { 1340 elem.bind("touchmove", scope.onTouchMove); 1341 elem.bind("touchleave", scope.onTouchLeave); 1342 elem.bind("touchend", scope.onTouchLeave); 1343 } 1344 else { 1345 elem.bind("mousemove", scope.onMouseMove); 1346 elem.bind("mouseleave", scope.onMouseLeave); 1347 } 1348 1349 scope.$on('destroy', scope.onDestroy.bind(scope)); 1350 } 1351 } 1352 } 1353 ]); 1354 1355/** 1356 * @ngdoc directive 1357 * @name com.2fdevs.videogular.plugins.controls.directive:vgScrubBar 1358 * @restrict E 1359 * @description 1360 * Directive to control the time and display other information layers about the progress of the media. 1361 * This directive acts as a container and you can add more layers to display current time, cuepoints, buffer or whatever you need. 1362 * 1363 * <pre> 1364 * <videogular vg-theme="config.theme.url"> 1365 * <vg-media vg-src="sources"></vg-media> 1366 * 1367 * <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'> 1368 * <vg-scrub-bar></vg-scrub-bar> 1369 * </vg-controls> 1370 * </videogular> 1371 * </pre> 1372 * 1373 */ 1374angular.module("com.2fdevs.videogular.plugins.controls") 1375 .run(["$templateCache", 1376 function ($templateCache) { 1377 $templateCache.put("vg-templates/vg-scrub-bar", 1378 '<div role="slider" ' + 1379 'aria-valuemax="{{ariaTime(API.totalTime)}}" ' + 1380 'aria-valuenow="{{ariaTime(API.currentTime)}}" ' + 1381 'aria-valuemin="0" ' + 1382 'aria-label="Time scrub bar" ' + 1383 'tabindex="0" ' + 1384 'ng-keydown="onScrubBarKeyDown($event)">' + 1385 '</div>' + 1386 '<div class="container" ng-transclude></div>' 1387 ); 1388 }] 1389 ) 1390 .directive("vgScrubBar", ["VG_STATES", "VG_UTILS", 1391 function (VG_STATES, VG_UTILS) { 1392 return { 1393 restrict: "E", 1394 require: "^videogular", 1395 transclude: true, 1396 templateUrl: function (elem, attrs) { 1397 return attrs.vgTemplate || 'vg-templates/vg-scrub-bar'; 1398 }, 1399 scope: { 1400 vgThumbnails: "=" 1401 }, 1402 link: function (scope, elem, attr, API) { 1403 var isSeeking = false; 1404 var isPlaying = false; 1405 var isPlayingWhenSeeking = false; 1406 var LEFT = 37; 1407 var RIGHT = 39; 1408 var NUM_PERCENT = 5; 1409 var thumbnailsWidth = 0; 1410 var thumbWidth = 0; 1411 var slider = elem[0].querySelector("div[role=slider]"); 1412 1413 scope.thumbnails = false;
1414 scope.thumbnailContainer = {}; 1415 1416 scope.API = API; 1417 1418 scope.onLoadThumbnails = function(event) { 1419 thumbnailsWidth = event.path[0].naturalWidth; 1420 thumbWidth = thumbnailsWidth / 100; 1421 }; 1422 1423 scope.ariaTime = function (time) { 1424 return Math.round(time / 1000); 1425 }; 1426 1427 scope.getOffset = function getOffset(event) { 1428 var el = event.target, 1429 x = 0; 1430 1431 while (el && !isNaN(el.offsetLeft)) { 1432 x += el.offsetLeft - el.scrollLeft; 1433 el = el.offsetParent; 1434 } 1435 1436 return event.clientX - x; 1437 }; 1438 1439 scope.onScrubBarTouchStart = function onScrubBarTouchStart($event) { 1440 var event = $event.originalEvent || $event; 1441 var touches = event.touches; 1442 var touchX = scope.getOffset(touches[0]); 1443 1444 isSeeking = true; 1445 if (isPlaying) isPlayingWhenSeeking = true; 1446 API.pause(); 1447 API.seekTime(touchX * API.mediaElement[0].duration / slider.scrollWidth); 1448 1449 scope.$digest(); 1450 }; 1451 1452 scope.onScrubBarTouchEnd = function onScrubBarTouchEnd($event) { 1453 var event = $event.originalEvent || $event; 1454 if (isPlayingWhenSeeking) { 1455 isPlayingWhenSeeking = false; 1456 API.play(); 1457 } 1458 isSeeking = false; 1459 1460 scope.$digest(); 1461 }; 1462 1463 scope.onScrubBarTouchMove = function onScrubBarTouchMove($event) { 1464 var event = $event.originalEvent || $event; 1465 var touches = event.touches; 1466 var touchX = scope.getOffset(touches[0]); 1467 1468 if (scope.vgThumbnails && scope.vgThumbnails.length) { 1469 var second = Math.round(touchX * API.mediaElement[0].duration / slider.scrollWidth); 1470 var percentage = Math.round(second * 100 / (API.totalTime / 1000)); 1471 1472 scope.updateThumbnails(percentage); 1473 } 1474 1475 if (isSeeking) { 1476 API.seekTime(touchX * API.mediaElement[0].duration / slider.scrollWidth); 1477 } 1478 1479 scope.$digest(); 1480 }; 1481 1482 scope.onScrubBarTouchLeave = function onScrubBarTouchLeave(event) { 1483 isSeeking = false; 1484 scope.thumbnails = false; 1485 1486 scope.$digest(); 1487 }; 1488 1489 scope.onScrubBarMouseDown = function onScrubBarMouseDown(event) { 1490 event = VG_UTILS.fixEventOffset(event); 1491 1492 isSeeking = true; 1493 if (isPlaying) isPlayingWhenSeeking = true; 1494 API.pause(); 1495 1496 API.seekTime(event.offsetX * API.mediaElement[0].duration / slider.scrollWidth); 1497 1498 scope.$digest(); 1499 }; 1500 1501 scope.onScrubBarMouseUp = function onScrubBarMouseUp(event) { 1502 //event = VG_UTILS.fixEventOffset(event); 1503 1504 if (isPlayingWhenSeeking) { 1505 isPlayingWhenSeeking = false; 1506 API.play(); 1507 } 1508 isSeeking = false; 1509 //API.seekTime(event.offsetX * API.mediaElement[0].duration / slider.scrollWidth); 1510 1511 scope.$digest(); 1512 }; 1513 1514 scope.onScrubBarMouseMove = function onScrubBarMouseMove(event) { 1515 if (scope.vgThumbnails && scope.vgThumbnails.length) { 1516 var second = Math.round(event.offsetX * API.mediaElement[0].duration / slider.scrollWidth); 1517 var percentage = Math.round(second * 100 / (API.totalTime / 1000)); 1518 1519 scope.updateThumbnails(percentage); 1520 } 1521 1522 if (isSeeking) { 1523 event = VG_UTILS.fixEventOffset(event); 1524 API.seekTime(event.offsetX * API.mediaElement[0].duration / slider.scrollWidth); 1525 } 1526 1527 scope.$digest(); 1528 }; 1529 1530 scope.onScrubBarMouseLeave = function onScrubBarMouseLeave(event) { 1531 isSeeking = false;
1532 scope.thumbnails = false; 1533 1534 scope.$digest(); 1535 }; 1536 1537 scope.onScrubBarKeyDown = function onScrubBarKeyDown(event) { 1538 var currentPercent = (API.currentTime / API.totalTime) * 100; 1539 1540 if (event.which === LEFT || event.keyCode === LEFT) { 1541 API.seekTime(currentPercent - NUM_PERCENT, true); 1542 event.preventDefault(); 1543 } 1544 else if (event.which === RIGHT || event.keyCode === RIGHT) { 1545 API.seekTime(currentPercent + NUM_PERCENT, true); 1546 event.preventDefault(); 1547 } 1548 }; 1549 1550 scope.updateThumbnails = function updateThumbnails(percentage) { 1551 var bgPos = Math.round(thumbnailsWidth * percentage / 100); 1552 var thPos = (slider.scrollWidth * percentage / 100) - (thumbWidth / 2); 1553 1554 scope.thumbnailContainer = { 1555 "width": thumbWidth + "px", 1556 "left": thPos + "px" 1557 }; 1558 1559 scope.thumbnails = { 1560 "background-image": 'url("' + scope.vgThumbnails + '")', 1561 "background-position": -bgPos + "px 0px" 1562 }; 1563 }; 1564 1565 scope.setState = function setState(newState) { 1566 if (!isSeeking) { 1567 switch (newState) { 1568 case VG_STATES.PLAY: 1569 isPlaying = true; 1570 break; 1571 1572 case VG_STATES.PAUSE: 1573 isPlaying = false; 1574 break; 1575 1576 case VG_STATES.STOP: 1577 isPlaying = false; 1578 break; 1579 } 1580 } 1581 }; 1582 1583 scope.onDestroy = function() { 1584 elem.unbind("touchstart", scope.onScrubBarTouchStart); 1585 elem.unbind("touchend", scope.onScrubBarTouchEnd); 1586 elem.unbind("touchmove", scope.onScrubBarTouchMove); 1587 elem.unbind("touchleave", scope.onScrubBarTouchLeave); 1588 elem.unbind("mousedown", scope.onScrubBarMouseDown); 1589 elem.unbind("mouseup", scope.onScrubBarMouseUp); 1590 elem.unbind("mousemove", scope.onScrubBarMouseMove); 1591 elem.unbind("mouseleave", scope.onScrubBarMouseLeave); 1592 }; 1593 1594 scope.$watch( 1595 function () { 1596 return API.currentState; 1597 }, 1598 function (newVal, oldVal) { 1599 if (newVal != oldVal) { 1600 scope.setState(newVal); 1601 } 1602 } 1603 ); 1604 1605 if (scope.vgThumbnails) { 1606 var thLoader = new Image(); 1607 thLoader.onload = scope.onLoadThumbnails.bind(scope); 1608 thLoader.src = scope.vgThumbnails; 1609 } 1610 1611 // Touch move is really buggy in Chrome for Android, maybe we could use mouse move that works ok 1612 if (VG_UTILS.isMobileDevice()) { 1613 elem.bind("touchstart", scope.onScrubBarTouchStart); 1614 elem.bind("touchend", scope.onScrubBarTouchEnd); 1615 elem.bind("touchmove", scope.onScrubBarTouchMove); 1616 elem.bind("touchleave", scope.onScrubBarTouchLeave); 1617 } 1618 else { 1619 elem.bind("mousedown", scope.onScrubBarMouseDown); 1620 elem.bind("mouseup", scope.onScrubBarMouseUp); 1621 elem.bind("mousemove", scope.onScrubBarMouseMove); 1622 elem.bind("mouseleave", scope.onScrubBarMouseLeave); 1623 } 1624 1625 scope.$on('destroy', scope.onDestroy.bind(scope)); 1626 } 1627 } 1628 } 1629 ]); 1630 1631/** 1632 * @ngdoc directive 1633 * @name com.2fdevs.videogular.plugins.controls.directive:vgTimeDisplay 1634 * @restrict E 1635 * @description
1636 * Adds a time display inside vg-controls to play and pause media. 1637 * You have three scope variables to show current time, time left and total time. 1638 * 1639 * Those scope variables are in milliseconds, you can add a date filter to show the time as you wish. 1640 * 1641 * <pre> 1642 * <videogular vg-theme="config.theme.url"> 1643 * <vg-media vg-src="sources"></vg-media> 1644 * 1645 * <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'> 1646 * <vg-time-display>{{currentTime | date:'hh:mm'}}</vg-time-display> 1647 * <vg-time-display>{{timeLeft | date:'mm:ss'}}</vg-time-display> 1648 * <vg-time-display>{{totalTime | date:'hh:mm:ss'}}</vg-time-display> 1649 * </vg-controls> 1650 * </videogular> 1651 * </pre> 1652 * 1653 */ 1654angular.module("com.2fdevs.videogular.plugins.controls") 1655 .directive("vgTimeDisplay", 1656 [function () { 1657 return { 1658 require: "^videogular", 1659 restrict: "E", 1660 link: function (scope, elem, attr, API) { 1661 scope.currentTime = API.currentTime; 1662 scope.timeLeft = API.timeLeft; 1663 scope.totalTime = API.totalTime; 1664 scope.isLive = API.isLive; 1665 1666 scope.$watch( 1667 function () { 1668 return API.currentTime; 1669 }, 1670 function (newVal, oldVal) { 1671 scope.currentTime = newVal; 1672 } 1673 ); 1674 1675 scope.$watch( 1676 function () { 1677 return API.timeLeft; 1678 }, 1679 function (newVal, oldVal) { 1680 scope.timeLeft = newVal; 1681 } 1682 ); 1683 1684 scope.$watch( 1685 function () { 1686 return API.totalTime; 1687 }, 1688 function (newVal, oldVal) { 1689 scope.totalTime = newVal; 1690 } 1691 ); 1692 1693 scope.$watch( 1694 function () { 1695 return API.isLive; 1696 }, 1697 function (newVal, oldVal) { 1698 scope.isLive = newVal; 1699 } 1700 ); 1701 } 1702 } 1703 }] 1704); 1705 1706/** 1707 * @ngdoc directive 1708 * @name com.2fdevs.videogular.plugins.controls.directive:vgMuteButton 1709 * @restrict E 1710 * @description 1711 * Directive to display a button to mute volume. 1712 * 1713 * <pre> 1714 * <videogular vg-theme="config.theme.url"> 1715 * <vg-media vg-src="sources"></vg-media> 1716 * 1717 * <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'> 1718 * <vg-volume> 1719 * <vg-mute-button><vg-mute-button> 1720 * </vg-volume> 1721 * </vg-controls> 1722 * </videogular> 1723 * </pre> 1724 * 1725 */ 1726angular.module("com.2fdevs.videogular.plugins.controls") 1727 .run( 1728 ["$templateCache", function ($templateCache) { 1729 $templateCache.put("vg-templates/vg-mute-button", 1730 '<button type="button" class="iconButton" ng-class="muteIcon" ng-click="onClickMute()" ng-focus="onMuteButtonFocus()" ng-blur="onMuteButtonLoseFocus()" ng-mouseleave="onMuteButtonLeave()" ng-keydown="onMuteButtonKeyDown($event)" aria-label="Mute"></button>'); 1731 }] 1732) 1733 .directive("vgMuteButton", 1734 [function () { 1735 return { 1736 restrict: "E", 1737 require: "^videogular", 1738 templateUrl: function (elem, attrs) { 1739 return attrs.vgTemplate || 'vg-templates/vg-mute-button'; 1740 }, 1741 link: function (scope, elem, attr, API) { 1742 var isMuted = false; 1743 var UP = 38; 1744 var DOWN = 40; 1745 var CHANGE_PER_PRESS = 0.05; 1746 1747 scope.onClickMute = function onClickMute() { 1748 if (isMuted) { 1749 scope.currentVolume = scope.defaultVolume; 1750 } 1751 else { 1752 scope.currentVolume = 0; 1753 scope.muteIcon = {mute: true}; 1754 } 1755 1756 isMuted = !isMuted; 1757 1758 API.setVolume(scope.currentVolume); 1759 }; 1760 1761 scope.onMuteButtonFocus = function onMuteButtonFocus() { 1762 scope.volumeVisibility = "visible"; 1763 }; 1764 1765 scope.onMuteButtonLoseFocus = function onMuteButtonLoseFocus() { 1766 scope.volumeVisibility = "hidden"; 1767 }; 1768 1769 scope.onMuteButtonLeave = function onMuteButtonLeave() { 1770 document.activeElement.blur(); 1771 }; 1772 1773 scope.onMuteButtonKeyDown = function onMuteButtonKeyDown(event) { 1774 var currentVolume = (API.volume != null) ? API.volume : 1; 1775 var newVolume; 1776 1777 if (event.which === UP || event.keyCode === UP) { 1778 newVolume = currentVolume + CHANGE_PER_PRESS; 1779 if (newVolume > 1) newVolume = 1; 1780 1781 API.setVolume(newVolume); 1782 event.preventDefault(); 1783 } 1784 else if (event.which === DOWN || event.keyCode === DOWN) { 1785 newVolume = currentVolume - CHANGE_PER_PRESS; 1786 if (newVolume < 0) newVolume = 0; 1787 1788 API.setVolume(newVolume); 1789 event.preventDefault(); 1790 } 1791 }; 1792 1793 scope.onSetVolume = function onSetVolume(newVolume) { 1794 scope.currentVolume = newVolume; 1795 1796 isMuted = (scope.currentVolume === 0); 1797 1798 // if it's not muted we save the default volume 1799 if (!isMuted) { 1800 scope.defaultVolume = newVolume; 1801 } 1802 else { 1803 // if was muted but the user changed the volume 1804 if (newVolume > 0) { 1805 scope.defaultVolume = newVolume; 1806 } 1807 } 1808 1809 var percentValue = Math.round(newVolume * 100); 1810 if (percentValue == 0) { 1811 scope.muteIcon = {mute: true}; 1812 } 1813 else if (percentValue > 0 && percentValue < 25) { 1814 scope.muteIcon = {level0: true}; 1815 } 1816 else if (percentValue >= 25 && percentValue < 50) { 1817 scope.muteIcon = {level1: true}; 1818 } 1819 else if (percentValue >= 50 && percentValue < 75) { 1820 scope.muteIcon = {level2: true}; 1821 } 1822 else if (percentValue >= 75) { 1823 scope.muteIcon = {level3: true}; 1824 } 1825 }; 1826 1827 scope.defaultVolume = 1; 1828 scope.currentVolume = scope.defaultVolume; 1829 scope.muteIcon = {level3: true}; 1830 1831 //Update the mute button on initialization, then watch for changes 1832 scope.onSetVolume(API.volume); 1833 scope.$watch( 1834 function () { 1835 return API.volume; 1836 }, 1837 function (newVal, oldVal) { 1838 if (newVal != oldVal) { 1839 scope.onSetVolume(newVal); 1840 } 1841 } 1842 ); 1843 } 1844 } 1845 }] 1846); 1847 1848/** 1849 * @ngdoc directive 1850 * @name com.2fdevs.videogular.plugins.controls.directive:vgVolumeBar 1851 * @restrict E 1852 * @description 1853 * Directive to display a vertical volume bar to control the volume. 1854 * This directive must be inside vg-volume directive and requires vg-mute-button to be displayed. 1855 * 1856 * <pre> 1857 * <videogular vg-theme="config.theme.url"> 1858 * <vg-media vg-src="sources"></vg-media> 1859 *
1860 * <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'> 1861 * <vg-volume> 1862 * <vg-mute-button><vg-mute-button> 1863 * <vg-volume-bar><vg-volume-bar> 1864 * </vg-volume> 1865 * </vg-controls> 1866 * </videogular> 1867 * </pre> 1868 * 1869 */ 1870angular.module("com.2fdevs.videogular.plugins.controls") 1871 .run( 1872 ["$templateCache", function ($templateCache) { 1873 $templateCache.put("vg-templates/vg-volume-bar", 1874 '<div class="verticalVolumeBar">\ 1875 <div class="volumeBackground" ng-click="onClickVolume($event)" ng-mousedown="onMouseDownVolume()" ng-mouseup="onMouseUpVolume()" ng-mousemove="onMouseMoveVolume($event)" ng-mouseleave="onMouseLeaveVolume()">\ 1876 <div class="volumeValue"></div>\ 1877 <div class="volumeClickArea"></div>\ 1878 </div>\ 1879 </div>'); 1880 }] 1881) 1882 .directive("vgVolumeBar", 1883 ["VG_UTILS", function (VG_UTILS) { 1884 return { 1885 restrict: "E", 1886 require: "^videogular", 1887 templateUrl: function (elem, attrs) { 1888 return attrs.vgTemplate || 'vg-templates/vg-volume-bar'; 1889 }, 1890 link: function (scope, elem, attr, API) { 1891 var isChangingVolume = false; 1892 var volumeBackElem = angular.element(elem[0].getElementsByClassName("volumeBackground")); 1893 var volumeValueElem = angular.element(elem[0].getElementsByClassName("volumeValue")); 1894 1895 scope.onClickVolume = function onClickVolume(event) { 1896 event = VG_UTILS.fixEventOffset(event); 1897 var volumeHeight = parseInt(volumeBackElem.prop("offsetHeight")); 1898 var value = event.offsetY * 100 / volumeHeight; 1899 var volValue = 1 - (value / 100); 1900 1901 API.setVolume(volValue); 1902 }; 1903 1904 scope.onMouseDownVolume = function onMouseDownVolume() { 1905 isChangingVolume = true; 1906 }; 1907 1908 scope.onMouseUpVolume = function onMouseUpVolume() { 1909 isChangingVolume = false; 1910 }; 1911 1912 scope.onMouseLeaveVolume = function onMouseLeaveVolume() { 1913 isChangingVolume = false; 1914 }; 1915 1916 scope.onMouseMoveVolume = function onMouseMoveVolume(event) { 1917 if (isChangingVolume) { 1918 event = VG_UTILS.fixEventOffset(event); 1919 var volumeHeight = parseInt(volumeBackElem.prop("offsetHeight")); 1920 var value = event.offsetY * 100 / volumeHeight; 1921 var volValue = 1 - (value / 100); 1922 1923 API.setVolume(volValue); 1924 } 1925 }; 1926 1927 scope.updateVolumeView = function updateVolumeView(value) { 1928 value = value * 100; 1929 volumeValueElem.css("height", value + "%"); 1930 volumeValueElem.css("top", (100 - value) + "%"); 1931 }; 1932 1933 scope.onChangeVisibility = function onChangeVisibility(value) { 1934 elem.css("visibility", value); 1935 }; 1936 1937 elem.css("visibility", scope.volumeVisibility); 1938 1939 scope.$watch("volumeVisibility", scope.onChangeVisibility); 1940 1941 //Update the volume bar on initialization, then watch for changes 1942 scope.updateVolumeView(API.volume); 1943 scope.$watch( 1944 function () { 1945 return API.volume; 1946 }, 1947 function (newVal, oldVal) { 1948 if (newVal != oldVal) { 1949 scope.updateVolumeView(newVal); 1950 } 1951 } 1952 ); 1953 } 1954 } 1955 }] 1956); 1957 1958/** 1959 * @ngdoc directive 1960 * @name com.2fdevs.videogular.plugins.controls.directive:vgVolume 1961 * @restrict E 1962 * @description 1963 * Directive to control the volume. 1964 * This directive acts as a container and you will need other directives like vg-mutebutton and vg-volumebar to control the volume. 1965 * In mobile will be hided since volume API is disabled for mobile devices. 1966 * 1967 * <pre> 1968 * <videogular vg-theme="config.theme.url"> 1969 * <vg-media vg-src="sources"></vg-media> 1970 *
1971 * <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'> 1972 * <vg-volume></vg-volume> 1973 * </vg-controls> 1974 * </videogular> 1975 * </pre> 1976 * 1977 */ 1978angular.module("com.2fdevs.videogular.plugins.controls") 1979 .directive("vgVolume", 1980 ["VG_UTILS", function (VG_UTILS) { 1981 return { 1982 restrict: "E", 1983 link: function (scope, elem, attr) { 1984 scope.onMouseOverVolume = function onMouseOverVolume() { 1985 scope.$evalAsync(function () { 1986 scope.volumeVisibility = "visible"; 1987 }); 1988 }; 1989 1990 scope.onMouseLeaveVolume = function onMouseLeaveVolume() { 1991 scope.$evalAsync(function () { 1992 scope.volumeVisibility = "hidden"; 1993 }); 1994 }; 1995 1996 scope.onDestroy = function() { 1997 elem.unbind("mouseover", scope.onScrubBarTouchStart); 1998 elem.unbind("mouseleave", scope.onScrubBarTouchEnd); 1999 }; 2000 2001 // We hide volume controls on mobile devices 2002 if (VG_UTILS.isMobileDevice()) { 2003 elem.css("display", "none"); 2004 } 2005 else { 2006 scope.volumeVisibility = "hidden"; 2007 2008 elem.bind("mouseover", scope.onMouseOverVolume); 2009 elem.bind("mouseleave", scope.onMouseLeaveVolume); 2010 } 2011 2012 scope.$on('destroy', scope.onDestroy.bind(scope)); 2013 } 2014 } 2015 }] 2016); 2017 2018/** 2019 * @license videogular v1.4.4 http://videogular.com 2020 * Two Fucking Developers http://twofuckingdevelopers.com 2021 * License: MIT 2022 */ 2023/** 2024 * @ngdoc directive 2025 * @name com.2fdevs.videogular.plugins.poster.directive:vgPoster 2026 * @restrict E 2027 * @description 2028 * Shows an image when player hasn't been played or has been completed a video. 2029 * <pre> 2030 * <videogular vg-theme="config.theme.url" vg-autoplay="config.autoPlay"> 2031 * <vg-media vg-src="sources"></vg-media> 2032 * 2033 * <vg-poster vg-url='config.plugins.poster.url'></vg-poster> 2034 * </videogular> 2035 * </pre> 2036 * 2037 * @param {string} vgUrl String with a scope name variable. URL to an image supported by the img tag. 2038 * **This parameter is required.** 2039 * 2040 * 2041 */ 2042"use strict"; 2043angular.module("com.2fdevs.videogular.plugins.poster", []) 2044 .run( 2045 ["$templateCache", function ($templateCache) { 2046 $templateCache.put("vg-templates/vg-poster", 2047 '<img ng-src="{{vgUrl}}" ng-class="API.currentState" role="presentation" alt="">'); 2048 }] 2049) 2050 .directive("vgPoster", 2051 [function () { 2052 return { 2053 restrict: "E", 2054 require: "^videogular", 2055 scope: { 2056 vgUrl: "=?" 2057 }, 2058 templateUrl: function (elem, attrs) { 2059 return attrs.vgTemplate || 'vg-templates/vg-poster'; 2060 }, 2061 link: function (scope, elem, attr, API) { 2062 scope.API = API; 2063 2064 if (API.isConfig) { 2065 scope.$watch("API.config", 2066 function () { 2067 if (scope.API.config) { 2068 scope.vgUrl = scope.API.config.plugins.poster.url; 2069 } 2070 } 2071 ); 2072 } 2073 } 2074 } 2075 }] 2076);; 2077/*! UIkit 3.3.2 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */ 2078 2079(function (global, factory) { 2080 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 2081 typeof define === 'function' && define.amd ? define('uikit', factory) : 2082 (global = global || self, global.UIkit = factory()); 2083}(this, (function () { 'use strict'; 2084 2085 var objPrototype = Object.prototype; 2086 var hasOwnProperty = objPrototype.hasOwnProperty; 2087 2088 function hasOwn(obj, key) { 2089 return hasOwnProperty.call(obj, key); 2090 } 2091 2092 var hyphenateCache = {}; 2093 var hyphenateRe = /([a-z\d])([A-Z])/g; 2094 2095 function hyphenate(str) { 2096
2097 if (!(str in hyphenateCache)) { 2098 hyphenateCache[str] = str 2099 .replace(hyphenateRe, '$1-$2') 2100 .toLowerCase(); 2101 } 2102 2103 return hyphenateCache[str]; 2104 } 2105 2106 var camelizeRe = /-(\w)/g; 2107 2108 function camelize(str) { 2109 return str.replace(camelizeRe, toUpper); 2110 } 2111 2112 function toUpper(_, c) { 2113 return c ? c.toUpperCase() : ''; 2114 } 2115 2116 function ucfirst(str) { 2117 return str.length ? toUpper(null, str.charAt(0)) + str.slice(1) : ''; 2118 } 2119 2120 var strPrototype = String.prototype; 2121 var startsWithFn = strPrototype.startsWith || function (search) { return this.lastIndexOf(search, 0) === 0; }; 2122 2123 function startsWith(str, search) { 2124 return startsWithFn.call(str, search); 2125 } 2126 2127 var endsWithFn = strPrototype.endsWith || function (search) { return this.substr(-search.length) === search; }; 2128 2129 function endsWith(str, search) { 2130 return endsWithFn.call(str, search); 2131 } 2132 2133 var arrPrototype = Array.prototype; 2134 2135 var includesFn = function (search, i) { return ~this.indexOf(search, i); }; 2136 var includesStr = strPrototype.includes || includesFn; 2137 var includesArray = arrPrototype.includes || includesFn; 2138 2139 function includes(obj, search) { 2140 return obj && (isString(obj) ? includesStr : includesArray).call(obj, search); 2141 } 2142 2143 var findIndexFn = arrPrototype.findIndex || function (predicate) { 2144 var arguments$1 = arguments; 2145 2146 for (var i = 0; i < this.length; i++) { 2147 if (predicate.call(arguments$1[1], this[i], i, this)) { 2148 return i; 2149 } 2150 } 2151 return -1; 2152 }; 2153 2154 function findIndex(array, predicate) { 2155 return findIndexFn.call(array, predicate); 2156 } 2157 2158 var isArray = Array.isArray; 2159 2160 function isFunction(obj) { 2161 return typeof obj === 'function'; 2162 } 2163 2164 function isObject(obj) { 2165 return obj !== null && typeof obj === 'object'; 2166 } 2167 2168 var toString = objPrototype.toString; 2169 function isPlainObject(obj) { 2170 return toString.call(obj) === '[object Object]'; 2171 } 2172 2173 function isWindow(obj) { 2174 return isObject(obj) && obj === obj.window; 2175 } 2176 2177 function isDocument(obj) { 2178 return isObject(obj) && obj.nodeType === 9; 2179 } 2180 2181 function isJQuery(obj) { 2182 return isObject(obj) && !!obj.jquery; 2183 } 2184 2185 function isNode(obj) { 2186 return isObject(obj) && obj.nodeType >= 1; 2187 } 2188 2189 function isElement(obj) { 2190 return isObject(obj) && obj.nodeType === 1; 2191 } 2192 2193 function isNodeCollection(obj) { 2194 return toString.call(obj).match(/^\[object (NodeList|HTMLCollection)\]$/); 2195 } 2196 2197 function isBoolean(value) { 2198 return typeof value === 'boolean'; 2199 } 2200 2201 function isString(value) { 2202 return typeof value === 'string'; 2203 } 2204 2205 function isNumber(value) { 2206 return typeof value === 'number'; 2207 } 2208 2209 function isNumeric(value) { 2210 return isNumber(value) || isString(value) && !isNaN(value - parseFloat(value)); 2211 } 2212 2213 function isEmpty(obj) { 2214 return !(isArray(obj) 2215 ? obj.length 2216 : isObject(obj) 2217 ? Object.keys(obj).length 2218 : false 2219 ); 2220 } 2221 2222 function isUndefined(value) { 2223 return value === void 0; 2224 } 2225 2226 function toBoolean(value) { 2227 return isBoolean(value) 2228 ? value 2229 : value === 'true' || value === '1' || value === '' 2230 ? true 2231 : value === 'false' || value === '0' 2232 ? false 2233 : value; 2234 } 2235 2236 function toNumber(value) { 2237 var number = Number(value); 2238 return !isNaN(number) ? number : false; 2239 } 2240 2241 function toFloat(value) { 2242 return parseFloat(value) || 0; 2243 } 2244 2245 function toNode(element) { 2246 return isNode(element) 2247 ? element 2248 : isNodeCollection(element) || isJQuery(element) 2249 ? element[0] 2250 : isArray(element) 2251 ? toNode(element[0]) 2252 : null; 2253 } 2254 2255 function toNodes(element) { 2256 return isNode(element) 2257 ? [element] 2258 : isNodeCollection(element) 2259 ? arrPrototype.slice.call(element) 2260 : isArray(element)
2261 ? element.map(toNode).filter(Boolean) 2262 : isJQuery(element) 2263 ? element.toArray() 2264 : []; 2265 } 2266 2267 function toWindow(element) { 2268 if (isWindow(element)) { 2269 return element; 2270 } 2271 2272 element = toNode(element); 2273 2274 return element 2275 ? (isDocument(element) 2276 ? element 2277 : element.ownerDocument 2278 ).defaultView 2279 : window; 2280 } 2281 2282 function toList(value) { 2283 return isArray(value) 2284 ? value 2285 : isString(value) 2286 ? value.split(/,(?![^(]*\))/).map(function (value) { return isNumeric(value) 2287 ? toNumber(value) 2288 : toBoolean(value.trim()); }) 2289 : [value]; 2290 } 2291 2292 function toMs(time) { 2293 return !time 2294 ? 0 2295 : endsWith(time, 'ms') 2296 ? toFloat(time) 2297 : toFloat(time) * 1000; 2298 } 2299 2300 function isEqual(value, other) { 2301 return value === other 2302 || isObject(value) 2303 && isObject(other) 2304 && Object.keys(value).length === Object.keys(other).length 2305 && each(value, function (val, key) { return val === other[key]; }); 2306 } 2307 2308 function swap(value, a, b) { 2309 return value.replace(new RegExp((a + "|" + b), 'mg'), function (match) { 2310 return match === a ? b : a; 2311 }); 2312 } 2313 2314 var assign = Object.assign || function (target) { 2315 var args = [], len = arguments.length - 1; 2316 while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; 2317 2318 target = Object(target); 2319 for (var i = 0; i < args.length; i++) { 2320 var source = args[i]; 2321 if (source !== null) { 2322 for (var key in source) { 2323 if (hasOwn(source, key)) { 2324 target[key] = source[key]; 2325 } 2326 } 2327 } 2328 } 2329 return target; 2330 }; 2331 2332 function last(array) { 2333 return array[array.length - 1]; 2334 } 2335 2336 function each(obj, cb) { 2337 for (var key in obj) { 2338 if (false === cb(obj[key], key)) { 2339 return false; 2340 } 2341 } 2342 return true; 2343 } 2344 2345 function sortBy(array, prop) { 2346 return array.sort(function (ref, ref$1) { 2347 var propA = ref[prop]; if ( propA === void 0 ) propA = 0; 2348 var propB = ref$1[prop]; if ( propB === void 0 ) propB = 0; 2349 2350 return propA > propB 2351 ? 1 2352 : propB > propA 2353 ? -1 2354 : 0; 2355 } 2356 ); 2357 } 2358 2359 function uniqueBy(array, prop) { 2360 var seen = new Set(); 2361 return array.filter(function (ref) { 2362 var check = ref[prop]; 2363 2364 return seen.has(check) 2365 ? false 2366 : seen.add(check) || true; 2367 } // IE 11 does not return the Set object 2368 ); 2369 } 2370 2371 function clamp(number, min, max) { 2372 if ( min === void 0 ) min = 0; 2373 if ( max === void 0 ) max = 1; 2374 2375 return Math.min(Math.max(toNumber(number) || 0, min), max); 2376 } 2377 2378 function noop() {} 2379 2380 function intersectRect(r1, r2) { 2381 return r1.left < r2.right && 2382 r1.right > r2.left && 2383 r1.top < r2.bottom && 2384 r1.bottom > r2.top; 2385 } 2386 2387 function pointInRect(point, rect) { 2388 return point.x <= rect.right && 2389 point.x >= rect.left && 2390 point.y <= rect.bottom && 2391 point.y >= rect.top; 2392 } 2393 2394 var Dimensions = { 2395 2396 ratio: function(dimensions, prop, value) { 2397 var obj; 2398 2399 2400 var aProp = prop === 'width' ? 'height' : 'width'; 2401 2402 return ( obj = {}, obj[aProp] = dimensions[prop] ? Math.round(value * dimensions[aProp] / dimensions[prop]) : dimensions[aProp], obj[prop] = value, obj ); 2403 }, 2404 2405 contain: function(dimensions, maxDimensions) { 2406 var this$1 = this; 2407 2408 dimensions = assign({}, dimensions); 2409 2410 each(dimensions, function (_, prop) { return dimensions = dimensions[prop] > maxDimensions[prop] 2411 ? this$1.ratio(dimensions, prop, maxDimensions[prop]) 2412 : dimensions; } 2413 ); 2414 2415 return dimensions; 2416 }, 2417 2418 cover: function(dimensions, maxDimensions) { 2419 var this$1 = this; 2420 2421 dimensions = this.contain(dimensions, maxDimensions); 2422 2423 each(dimensions, function (_, prop) { return dimensions = dimensions[prop] < maxDimensions[prop] 2424 ? this$1.ratio(dimensions, prop, maxDimensions[prop]) 2425 : dimensions; } 2426 ); 2427 2428 return dimensions; 2429 } 2430 2431 }; 2432 2433 function attr(element, name, value) { 2434 2435 if (isObject(name)) { 2436 for (var key in name) { 2437 attr(element, key, name[key]); 2438 } 2439 return; 2440 } 2441 2442 if (isUndefined(value)) { 2443 element = toNode(element); 2444 return element && element.getAttribute(name); 2445 } else { 2446 toNodes(element).forEach(function (element) { 2447 2448 if (isFunction(value)) { 2449 value = value.call(element, attr(element, name)); 2450 } 2451 2452 if (value === null) { 2453 removeAttr(element, name); 2454 } else { 2455 element.setAttribute(name, value); 2456 } 2457 }); 2458 } 2459 2460 } 2461 2462 function hasAttr(element, name) { 2463 return toNodes(element).some(function (element) { return element.hasAttribute(name); }); 2464 } 2465 2466 function removeAttr(element, name) { 2467 element = toNodes(element); 2468 name.split(' ').forEach(function (name) { return element.forEach(function (element) { return element.hasAttribute(name) && element.removeAttribute(name); } 2469 ); } 2470 ); 2471 } 2472 2473 function data(element, attribute) { 2474 for (var i = 0, attrs = [attribute, ("data-" + attribute)]; i < attrs.length; i++) { 2475 if (hasAttr(element, attrs[i])) { 2476 return attr(element, attrs[i]); 2477 } 2478 } 2479 } 2480 2481 /* global DocumentTouch */ 2482 2483 var isIE = /msie|trident/i.test(window.navigator.userAgent); 2484 var isRtl = attr(document.documentElement, 'dir') === 'rtl'; 2485 2486 var hasTouchEvents = 'ontouchstart' in window; 2487 var hasPointerEvents = window.PointerEvent; 2488 var hasTouch = hasTouchEvents 2489 || window.DocumentTouch && document instanceof DocumentTouch 2490 || navigator.maxTouchPoints; // IE >=11 2491 2492 var pointerDown = hasPointerEvents ? 'pointerdown' : hasTouchEvents ? 'touchstart' : 'mousedown'; 2493 var pointerMove = hasPointerEvents ? 'pointermove' : hasTouchEvents ? 'touchmove' : 'mousemove'; 2494 var pointerUp = hasPointerEvents ? 'pointerup' : hasTouchEvents ? 'touchend' : 'mouseup'; 2495 var pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouchEvents ? '' : 'mouseenter'; 2496 var pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouchEvents ? '' : 'mouseleave'; 2497 var pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel'; 2498 2499 function query(selector, context) { 2500 return toNode(selector) || find(selector, getContext(selector, context)); 2501 } 2502 2503 function queryAll(selector, context) { 2504 var nodes = toNodes(selector); 2505 return nodes.length && nodes || findAll(selector, getContext(selector, context)); 2506 } 2507 2508 function getContext(selector, context) { 2509 if ( context === void 0 ) context = document; 2510 2511 return isContextSelector(selector) || isDocument(context) 2512 ? context 2513 : context.ownerDocument; 2514 } 2515 2516 function find(selector, context) { 2517 return toNode(_query(selector, context, 'querySelector')); 2518 } 2519 2520 function findAll(selector, context) { 2521 return toNodes(_query(selector, context, 'querySelectorAll')); 2522 } 2523 2524 function _query(selector, context, queryFn) { 2525 if ( context === void 0 ) context = document; 2526 2527 2528 if (!selector || !isString(selector)) { 2529 return null; 2530 } 2531 2532 selector = selector.replace(contextSanitizeRe, '$1 *'); 2533 2534 var removes; 2535 2536 if (isContextSelector(selector)) { 2537 2538 removes = []; 2539 2540 selector = splitSelector(selector).map(function (selector, i) { 2541 2542 var ctx = context; 2543 2544 if (selector[0] === '!') { 2545 2546 var selectors = selector.substr(1).trim().split(' '); 2547 ctx = closest(parent(context), selectors[0]); 2548 selector = selectors.slice(1).join(' ').trim(); 2549 2550 } 2551 2552 if (selector[0] === '-') { 2553 2554 var selectors$1 = selector.substr(1).trim().split(' '); 2555 var prev = (ctx || context).previousElementSibling; 2556 ctx = matches(prev, selector.substr(1)) ? prev : null; 2557 selector = selectors$1.slice(1).join(' '); 2558 2559 } 2560 2561 if (!ctx) { 2562 return null; 2563 } 2564 2565 if (!ctx.id) { 2566 ctx.id = "uk-" + (Date.now()) + i; 2567 removes.push(function () { return removeAttr(ctx, 'id'); }); 2568 } 2569 2570 return ("#" + (escape(ctx.id)) + " " + selector); 2571 2572 }
2572).filter(Boolean).join(','); 2573 2574 context = document; 2575 2576 } 2577 2578 try { 2579 2580 return context[queryFn](selector); 2581 2582 } catch (e) { 2583 2584 return null; 2585 2586 } finally { 2587 2588 removes && removes.forEach(function (remove) { return remove(); }); 2589 2590 } 2591 2592 } 2593 2594 var contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/; 2595 var contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g; 2596 2597 function isContextSelector(selector) { 2598 return isString(selector) && selector.match(contextSelectorRe); 2599 } 2600 2601 var selectorRe = /.*?[^\\](?:,|$)/g; 2602 2603 function splitSelector(selector) { 2604 return selector.match(selectorRe).map(function (selector) { return selector.replace(/,$/, '').trim(); }); 2605 } 2606 2607 var elProto = Element.prototype; 2608 var matchesFn = elProto.matches || elProto.webkitMatchesSelector || elProto.msMatchesSelector; 2609 2610 function matches(element, selector) { 2611 return toNodes(element).some(function (element) { return matchesFn.call(element, selector); }); 2612 } 2613 2614 var closestFn = elProto.closest || function (selector) { 2615 var ancestor = this; 2616 2617 do { 2618 2619 if (matches(ancestor, selector)) { 2620 return ancestor; 2621 } 2622 2623 } while ((ancestor = parent(ancestor))); 2624 }; 2625 2626 function closest(element, selector) { 2627 2628 if (startsWith(selector, '>')) { 2629 selector = selector.slice(1); 2630 } 2631 2632 return isElement(element) 2633 ? closestFn.call(element, selector) 2634 : toNodes(element).map(function (element) { return closest(element, selector); }).filter(Boolean); 2635 } 2636 2637 function parent(element) { 2638 element = toNode(element); 2639 return element && isElement(element.parentNode) && element.parentNode; 2640 } 2641 2642 function parents(element, selector) { 2643 var elements = []; 2644 2645 while ((element = parent(element))) { 2646 if (!selector || matches(element, selector)) { 2647 elements.push(element); 2648 } 2649 } 2650 2651 return elements; 2652 } 2653 2654 function children(element, selector) { 2655 element = toNode(element); 2656 var children = element ? toNodes(element.children) : []; 2657 return selector ? children.filter(function (element) { return matches(element, selector); }) : children; 2658 } 2659 2660 var escapeFn = window.CSS && CSS.escape || function (css) { return css.replace(/([^\x7f-\uFFFF\w-])/g, function (match) { return ("\\" + match); }); }; 2661 function escape(css) { 2662 return isString(css) ? escapeFn.call(null, css) : ''; 2663 } 2664 2665 var voidElements = { 2666 area: true, 2667 base: true, 2668 br: true, 2669 col: true, 2670 embed: true, 2671 hr: true, 2672 img: true, 2673 input: true, 2674 keygen: true, 2675 link: true, 2676 menuitem: true, 2677 meta: true, 2678 param: true, 2679 source: true, 2680 track: true, 2681 wbr: true 2682 }; 2683 function isVoidElement(element) { 2684 return toNodes(element).some(function (element) { return voidElements[element.tagName.toLowerCase()]; }); 2685 } 2686 2687 function isVisible(element) { 2688 return toNodes(element).some(function (element) { return element.offsetWidth || element.offsetHeight || element.getClientRects().length; }); 2689 } 2690 2691 var selInput = 'input,select,textarea,button'; 2692 function isInput(element) { 2693 return toNodes(element).some(function (element) { return matches(element, selInput); }); 2694 } 2695 2696 function filter(element, selector) { 2697 return toNodes(element).filter(function (element) { return matches(element, selector); }); 2698 } 2699 2700 function within(element, selector) { 2701 return !isString(selector) 2702 ? element === selector || (isDocument(selector) 2703 ? selector.documentElement 2704 : toNode(selector)).contains(toNode(element)) // IE 11 document does not implement contains 2705 : matches(element, selector) || closest(element, selector); 2706 } 2707 2708 function on() { 2709 var args = [], len = arguments.length; 2710 while ( len-- ) args[ len ] = arguments[ len ]; 2711 2712 2713 var ref = getArgs(args); 2714 var targets = ref[0]; 2715 var type = ref[1]; 2716 var selector = ref[2]; 2717 var listener = ref[3]; 2718 var useCapture = ref[4]; 2719 2720 targets = toEventTargets(targets); 2721 2722 if (listener.length > 1) { 2723 listener = detail(listener); 2724 } 2725 2726 if (useCapture && useCapture.self) { 2727 listener = selfFilter(listener); 2728 } 2729 2730 if (selector) { 2731 listener = delegate(targets, selector, listener); 2732 } 2733 2734 useCapture = useCaptureFilter(useCapture); 2735 2736 type.split(' ').forEach(function (type) { return targets.forEac
2736h(function (target) { return target.addEventListener(type, listener, useCapture); } 2737 ); } 2738 ); 2739 return function () { return off(targets, type, listener, useCapture); }; 2740 } 2741 2742 function off(targets, type, listener, useCapture) { 2743 if ( useCapture === void 0 ) useCapture = false; 2744 2745 useCapture = useCaptureFilter(useCapture); 2746 targets = toEventTargets(targets); 2747 type.split(' ').forEach(function (type) { return targets.forEach(function (target) { return target.removeEventListener(type, listener, useCapture); } 2748 ); } 2749 ); 2750 } 2751 2752 function once() { 2753 var args = [], len = arguments.length; 2754 while ( len-- ) args[ len ] = arguments[ len ]; 2755 2756 2757 var ref = getArgs(args); 2758 var element = ref[0]; 2759 var type = ref[1]; 2760 var selector = ref[2]; 2761 var listener = ref[3]; 2762 var useCapture = ref[4]; 2763 var condition = ref[5]; 2764 var off = on(element, type, selector, function (e) { 2765 var result = !condition || condition(e); 2766 if (result) { 2767 off(); 2768 listener(e, result); 2769 } 2770 }, useCapture); 2771 2772 return off; 2773 } 2774 2775 function trigger(targets, event, detail) { 2776 return toEventTargets(targets).reduce(function (notCanceled, target) { return notCanceled && target.dispatchEvent(createEvent(event, true, true, detail)); } 2777 , true); 2778 } 2779 2780 function createEvent(e, bubbles, cancelable, detail) { 2781 if ( bubbles === void 0 ) bubbles = true; 2782 if ( cancelable === void 0 ) cancelable = false; 2783 2784 if (isString(e)) { 2785 var event = document.createEvent('CustomEvent'); // IE 11 2786 event.initCustomEvent(e, bubbles, cancelable, detail); 2787 e = event; 2788 } 2789 2790 return e; 2791 } 2792 2793 function getArgs(args) { 2794 if (isFunction(args[2])) { 2795 args.splice(2, 0, false); 2796 } 2797 return args; 2798 } 2799 2800 function delegate(delegates, selector, listener) { 2801 var this$1 = this; 2802 2803 return function (e) { 2804
2805 delegates.forEach(function (delegate) { 2806 2807 var current = selector[0] === '>' 2808 ? findAll(selector, delegate).reverse().filter(function (element) { return within(e.target, element); })[0] 2809 : closest(e.target, selector); 2810 2811 if (current) { 2812 e.delegate = delegate; 2813 e.current = current; 2814 2815 listener.call(this$1, e); 2816 } 2817 2818 }); 2819 2820 }; 2821 } 2822 2823 function detail(listener) { 2824 return function (e) { return isArray(e.detail) ? listener.apply(void 0, [e].concat(e.detail)) : listener(e); }; 2825 } 2826 2827 function selfFilter(listener) { 2828 return function (e) { 2829 if (e.target === e.currentTarget || e.target === e.current) { 2830 return listener.call(null, e); 2831 } 2832 }; 2833 } 2834 2835 function useCaptureFilter(options) { 2836 return options && isIE && !isBoolean(options) 2837 ? !!options.capture 2838 : options; 2839 } 2840 2841 function isEventTarget(target) { 2842 return target && 'addEventListener' in target; 2843 } 2844 2845 function toEventTarget(target) { 2846 return isEventTarget(target) ? target : toNode(target); 2847 } 2848 2849 function toEventTargets(target) { 2850 return isArray(target) 2851 ? target.map(toEventTarget).filter(Boolean) 2852 : isString(target) 2853 ? findAll(target) 2854 : isEventTarget(target) 2855 ? [target] 2856 : toNodes(target); 2857 } 2858 2859 function isTouch(e) { 2860 return e.pointerType === 'touch' || !!e.touches; 2861 } 2862 2863 function getEventPos(e, prop) { 2864 if ( prop === void 0 ) prop = 'client'; 2865 2866 var touches = e.touches; 2867 var changedTouches = e.changedTouches; 2868 var ref = touches && touches[0] || changedTouches && changedTouches[0] || e; 2869 var x = ref[(prop + "X")]; 2870 var y = ref[(prop + "Y")]; 2871 2872 return {x: x, y: y}; 2873 } 2874 2875 /* global setImmediate */ 2876 2877 var Promise = 'Promise' in window ? window.Promise : PromiseFn; 2878 2879 var Deferred = function() { 2880 var this$1 = this; 2881 2882 this.promise = new Promise(function (resolve, reject) { 2883 this$1.reject = reject; 2884 this$1.resolve = resolve; 2885 }); 2886 }; 2887 2888 /** 2889 * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis) 2890 */ 2891 2892 var RESOLVED = 0; 2893 var REJECTED = 1; 2894 var PENDING = 2; 2895 2896 var async = 'setImmediate' in window ? setImmediate : setTimeout; 2897 2898 function PromiseFn(executor) { 2899 2900 this.state = PENDING; 2901 this.value = undefined; 2902 this.deferred = []; 2903 2904 var promise = this; 2905 2906 try { 2907 executor( 2908 function (x) { 2909 promise.resolve(x); 2910 }, 2911 function (r) { 2912 promise.reject(r); 2913 } 2914 ); 2915 } catch (e) { 2916 promise.reject(e); 2917 } 2918 } 2919 2920 PromiseFn.reject = function (r) { 2921 return new PromiseFn(function (resolve, reject) { 2922 reject(r); 2923 }); 2924 }; 2925 2926 PromiseFn.resolve = function (x) { 2927 return new PromiseFn(function (resolve, reject) { 2928 resolve(x); 2929 }); 2930 }; 2931 2932 PromiseFn.all = function all(iterable) { 2933 return new PromiseFn(function (resolve, reject) { 2934 var result = []; 2935 var count = 0; 2936 2937 if (iterable.length === 0) { 2938 resolve(result); 2939 } 2940 2941 function resolver(i) { 2942 return function (x) { 2943 result[i] = x; 2944 count += 1; 2945 2946 if (count === iterable.length) { 2947 resolve(result); 2948 } 2949 }; 2950 } 2951 2952 for (var i = 0; i < iterable.length; i += 1) { 2953 PromiseFn.resolve(iterable[i]).then(resolver(i), reject); 2954 } 2955 }); 2956 }; 2957 2958 PromiseFn.race = function race(iterable) { 2959 return new PromiseFn(function (resolve, reject) { 2960 for (var i = 0; i < iterable.length; i += 1) { 2961 PromiseFn.resolve(iterable[i]).then(resolve, reject); 2962 } 2963 }); 2964 }; 2965 2966 var p = PromiseFn.prototype; 2967 2968 p.resolve = function resolve(x) { 2969 var promise = this; 2970 2971 if (promise.state === PENDING) { 2972 if (x === promise) { 2973 throw new TypeError('Promise settled with itself.'); 2974 } 2975 2976 var called = false;
2977 2978 try { 2979 var then = x && x.then; 2980 2981 if (x !== null && isObject(x) && isFunction(then)) { 2982 then.call( 2983 x, 2984 function (x) { 2985 if (!called) { 2986 promise.resolve(x); 2987 } 2988 called = true; 2989 }, 2990 function (r) { 2991 if (!called) { 2992 promise.reject(r); 2993 } 2994 called = true; 2995 } 2996 ); 2997 return; 2998 } 2999 } catch (e) { 3000 if (!called) { 3001 promise.reject(e); 3002 } 3003 return; 3004 } 3005 3006 promise.state = RESOLVED; 3007 promise.value = x; 3008 promise.notify(); 3009 } 3010 }; 3011 3012 p.reject = function reject(reason) { 3013 var promise = this; 3014 3015 if (promise.state === PENDING) { 3016 if (reason === promise) { 3017 throw new TypeError('Promise settled with itself.'); 3018 } 3019 3020 promise.state = REJECTED; 3021 promise.value = reason; 3022 promise.notify(); 3023 } 3024 }; 3025 3026 p.notify = function notify() { 3027 var this$1 = this; 3028 3029 async(function () { 3030 if (this$1.state !== PENDING) { 3031 while (this$1.deferred.length) { 3032 var ref = this$1.deferred.shift(); 3033 var onResolved = ref[0]; 3034 var onRejected = ref[1]; 3035 var resolve = ref[2]; 3036 var reject = ref[3]; 3037 3038 try { 3039 if (this$1.state === RESOLVED) { 3040 if (isFunction(onResolved)) { 3041 resolve(onResolved.call(undefined, this$1.value)); 3042 } else { 3043 resolve(this$1.value); 3044 } 3045 } else if (this$1.state === REJECTED) { 3046 if (isFunction(onRejected)) { 3047 resolve(onRejected.call(undefined, this$1.value)); 3048 } else { 3049 reject(this$1.value); 3050 } 3051 } 3052 } catch (e) { 3053 reject(e); 3054 } 3055 } 3056 } 3057 }); 3058 }; 3059 3060 p.then = function then(onResolved, onRejected) { 3061 var this$1 = this; 3062 3063 return new PromiseFn(function (resolve, reject) { 3064 this$1.deferred.push([onResolved, onRejected, resolve, reject]); 3065 this$1.notify(); 3066 }); 3067 }; 3068 3069 p.catch = function (onRejected) { 3070 return this.then(undefined, onRejected); 3071 }; 3072 3073 function ajax(url, options) { 3074 return new Promise(function (resolve, reject) { 3075 3076 var env = assign({ 3077 data: null, 3078 method: 'GET', 3079 headers: {}, 3080 xhr: new XMLHttpRequest(), 3081 beforeSend: noop, 3082 responseType: '' 3083 }, options); 3084 3085 env.beforeSend(env); 3086 3087 var xhr = env.xhr; 3088 3089 for (var prop in env) { 3090 if (prop in xhr) { 3091 try { 3092 3093 xhr[prop] = env[prop]; 3094 3095 } catch (e) {} 3096 } 3097 } 3098 3099 xhr.open(env.method.toUpperCase(), url); 3100 3101 for (var header in env.headers) { 3102 xhr.setRequestHeader(header, env.headers[header]); 3103 } 3104 3105 on(xhr, 'load', function () { 3106 3107 if (xhr.status === 0 || xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) { 3108 resolve(xhr); 3109 } else { 3110 reject(assign(Error(xhr.statusText), { 3111 xhr: xhr, 3112 status: xhr.status 3113 })); 3114 } 3115 3116 }); 3117 3118 on(xhr, 'error', function () { return reject(assign(Error('Network Error'), {xhr: xhr})); }); 3119 on(xhr, 'timeout', function () { return reject(assign(Error('Network Timeout'), {xhr: xhr})); }); 3120 3121 xhr.send(env.data); 3122 }); 3123 } 3124 3125 function getImage(src, srcset, sizes) { 3126 3127 return new Promise(function (resolve, reject) { 3128 var img = new Image(); 3129 3130 img.onerror = reject; 3131 img.onload = function () { return resolve(img); }; 3132 3133 sizes && (img.sizes = sizes); 3134 srcset && (img.srcset = srcset); 3135 img.src = src; 3136 }); 3137 3138 } 3139 3140 function ready(fn) { 3141 3142 if (document.readyState !== 'loading') { 3143 fn(); 3144 return; 3145 } 3146 3147 var unbind = on(document, 'DOMContentLoaded', function () { 3148 unbind(); 3149 fn(); 3150 }); 3151 } 3152 3153 function index(element, ref) { 3154 return ref 3155 ? toNodes(element).indexOf(toNode(ref))
3156 : children(parent(element)).indexOf(element); 3157 } 3158 3159 function getIndex(i, elements, current, finite) { 3160 if ( current === void 0 ) current = 0; 3161 if ( finite === void 0 ) finite = false; 3162 3163 3164 elements = toNodes(elements); 3165 3166 var length = elements.length; 3167 3168 i = isNumeric(i) 3169 ? toNumber(i) 3170 : i === 'next' 3171 ? current + 1 3172 : i === 'previous' 3173 ? current - 1 3174 : index(elements, i); 3175 3176 if (finite) { 3177 return clamp(i, 0, length - 1); 3178 } 3179 3180 i %= length; 3181 3182 return i < 0 ? i + length : i; 3183 } 3184 3185 function empty(element) { 3186 element = $(element); 3187 element.innerHTML = ''; 3188 return element; 3189 } 3190 3191 function html(parent, html) { 3192 parent = $(parent); 3193 return isUndefined(html) 3194 ? parent.innerHTML 3195 : append(parent.hasChildNodes() ? empty(parent) : parent, html); 3196 } 3197 3198 function prepend(parent, element) { 3199 3200 parent = $(parent); 3201 3202 if (!parent.hasChildNodes()) { 3203 return append(parent, element); 3204 } else { 3205 return insertNodes(element, function (element) { return parent.insertBefore(element, parent.firstChild); }); 3206 } 3207 } 3208 3209 function append(parent, element) { 3210 parent = $(parent); 3211 return insertNodes(element, function (element) { return parent.appendChild(element); }); 3212 } 3213 3214 function before(ref, element) { 3215 ref = $(ref); 3216 return insertNodes(element, function (element) { return ref.parentNode.insertBefore(element, ref); }); 3217 } 3218 3219 function after(ref, element) { 3220 ref = $(ref); 3221 return insertNodes(element, function (element) { return ref.nextSibling 3222 ? before(ref.nextSibling, element) 3223 : append(ref.parentNode, element); } 3224 ); 3225 } 3226 3227 function insertNodes(element, fn) { 3228 element = isString(element) ? fragment(element) : element; 3229 return element 3230 ? 'length' in element 3231 ? toNodes(element).map(fn) 3232 : fn(element) 3233 : null; 3234 } 3235 3236 function remove(element) { 3237 toNodes(element).map(function (element) { return element.parentNode && element.parentNode.removeChild(element); }); 3238 } 3239 3240 function wrapAll(element, structure) { 3241 3242 structure = toNode(before(element, structure)); 3243 3244 while (structure.firstChild) { 3245 structure = structure.firstChild; 3246 } 3247 3248 append(structure, element); 3249 3250 return structure; 3251 } 3252 3253 function wrapInner(element, structure) { 3254 return toNodes(toNodes(element).map(function (element) { return element.hasChildNodes ? wrapAll(toNodes(element.childNodes), structure) : append(element, structure); } 3255 )); 3256 } 3257 3258 function unwrap(element) { 3259 toNodes(element) 3260 .map(parent) 3261 .filter(function (value, index, self) { return self.indexOf(value) === index; }) 3262 .forEach(function (parent) { 3263 before(parent, parent.childNodes); 3264 remove(parent); 3265 }); 3266 } 3267 3268 var fragmentRe = /^\s*<(\w+|!)[^>]*>/; 3269 var singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/; 3270 3271 function fragment(html) { 3272 3273 var matches = singleTagRe.exec(html); 3274 if (matches) { 3275 return document.createElement(matches[1]); 3276 } 3277 3278 var container = document.createElement('div'); 3279 if (fragmentRe.test(html)) { 3280 container.insertAdjacentHTML('beforeend', html.trim()); 3281 } else { 3282 container.textContent = html; 3283 } 3284 3285 return container.childNodes.length > 1 ? toNodes(container.childNodes) : container.firstChild; 3286 3287 } 3288 3289 function apply(node, fn) { 3290 3291 if (!isElement(node)) { 3292 return; 3293 } 3294 3295 fn(node); 3296 node = node.firstElementChild; 3297 while (node) { 3298 var next = node.nextElementSibling; 3299 apply(node, fn); 3300 node = next; 3301 } 3302 } 3303 3304 function $(selector, context) { 3305 return !isString(selector) 3306 ? toNode(selector) 3307 : isHtml(selector)
3308 ? toNode(fragment(selector)) 3309 : find(selector, context); 3310 } 3311 3312 function $$(selector, context) { 3313 return !isString(selector) 3314 ? toNodes(selector) 3315 : isHtml(selector) 3316 ? toNodes(fragment(selector)) 3317 : findAll(selector, context); 3318 } 3319 3320 function isHtml(str) { 3321 return str[0] === '<' || str.match(/^\s*</); 3322 } 3323 3324 function addClass(element) { 3325 var args = [], len = arguments.length - 1; 3326 while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; 3327 3328 apply$1(element, args, 'add'); 3329 } 3330 3331 function removeClass(element) { 3332 var args = [], len = arguments.length - 1; 3333 while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; 3334 3335 apply$1(element, args, 'remove'); 3336 } 3337 3338 function removeClasses(element, cls) { 3339 attr(element, 'class', function (value) { return (value || '').replace(new RegExp(("\\b" + cls + "\\b"), 'g'), ''); }); 3340 } 3341 3342 function replaceClass(element) { 3343 var args = [], len = arguments.length - 1; 3344 while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; 3345 3346 args[0] && removeClass(element, args[0]); 3347 args[1] && addClass(element, args[1]); 3348 } 3349 3350 function hasClass(element, cls) { 3351 return cls && toNodes(element).some(function (element) { return element.classList.contains(cls.split(' ')[0]); }); 3352 } 3353 3354 function toggleClass(element) { 3355 var args = [], len = arguments.length - 1; 3356 while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; 3357 3358 3359 if (!args.length) { 3360 return; 3361 } 3362 3363 args = getArgs$1(args); 3364 3365 var force = !isString(last(args)) ? args.pop() : []; // in iOS 9.3 force === undefined evaluates to false 3366 3367 args = args.filter(Boolean); 3368 3369 toNodes(element).forEach(function (ref) { 3370 var classList = ref.classList; 3371 3372 for (var i = 0; i < args.length; i++) { 3373 supports.Force 3374 ? classList.toggle.apply(classList, [args[i]].concat(force)) 3375 : (classList[(!isUndefined(force) ? force : !classList.contains(args[i])) ? 'add' : 'remove'](args[i])); 3376 } 3377 }); 3378 3379 } 3380 3381 function apply$1(element, args, fn) { 3382 args = getArgs$1(args).filter(Boolean); 3383 3384 args.length && toNodes(element).forEach(function (ref) { 3385 var classList = ref.classList; 3386 3387 supports.Multiple 3388 ? classList[fn].apply(classList, args) 3389 : args.forEach(function (cls) { return classList[fn](cls); }); 3390 }); 3391 } 3392 3393 function getArgs$1(args) { 3394 return args.reduce(function (args, arg) { return args.concat.call(args, isString(arg) && includes(arg, ' ') ? arg.trim().split(' ') : arg); } 3395 , []); 3396 } 3397 3398 // IE 11 3399 var supports = { 3400 3401 get Multiple() { 3402 return this.get('_multiple'); 3403 }, 3404 3405 get Force() { 3406 return this.get('_force'); 3407 }, 3408 3409 get: function(key) { 3410 3411 if (!hasOwn(this, key)) { 3412 var ref = document.createElement('_'); 3413 var classList = ref.classList; 3414 classList.add('a', 'b'); 3415 classList.toggle('c', false); 3416 this._multiple = classList.contains('b'); 3417 this._force = !classList.contains('c'); 3418 } 3419 3420 return this[key]; 3421 } 3422 3423 }; 3424 3425 var cssNumber = { 3426 'animation-iteration-count': true, 3427 'column-count': true, 3428 'fill-opacity': true, 3429 'flex-grow': true, 3430 'flex-shrink': true, 3431 'font-weight': true, 3432 'line-height': true, 3433 'opacity': true, 3434 'order': true, 3435 'orphans': true, 3436 'stroke-dasharray': true, 3437 'stroke-dashoffset': true, 3438 'widows': true, 3439 'z-index': true, 3440 'zoom': true 3441 }; 3442 3443 function css(element, property, value) { 3444 3445 return toNodes(element).map(function (element) { 3446 3447 if (isString(property)) { 3448 3449 property = propName(property); 3450 3451 if (isUndefined(value)) { 3452 return getStyle(element, property); 3453 } else if (!value && !isNumber(value)) { 3454 element.style.removeProperty(property); 3455 } else { 3456 element.style[property] = isNumeric(value) && !cssNumber[property] ? (value + "px") : value; 3457 } 3458 3459 } else if (isArray(property)) { 3460 3461 var styles = getStyles(element); 3462 3463 return property.reduce(function (props, property) { 3464 props[property] = styles[propName(property)]; 3465 return props; 3466 }, {}); 3467 3468 } else if (isObject(property)) { 3469 each(property, function (value, property) { return css(element, property, value); }); 3470 } 3471 3472 return element; 3473 3474 })[0]; 3475 3476 } 3477 3478 function getStyles(element, pseudoElt) { 3479 element = toNode(element); 3480 return element.ownerDocument.defaultView.getComputedStyle(element, pseudoElt); 3481 } 3482 3483 function getStyle(element, property, pseudoElt) { 3484 return getStyles(element, pseudoElt)[property]; 3485 } 3486 3487 var vars = {}; 3488 3489 function getCssVar(name) { 3490 3491 var docEl = document.documentElement; 3492 3493 if (!isIE) { 3494 return getStyles(docEl).getPropertyValue(("--uk-" + name)); 3495 } 3496 3497 if (!(name in vars)) { 3498 3499 /* usage in css: .uk-name:before { content:"xyz" } */ 3500 3501 var element = append(docEl, document.createElement('div')); 3502 3503 addClass(element, ("uk-" + name)); 3504 3505 vars[name] = getStyle(element, 'content', ':before').replace(/^["'](.*)["']$/, '$1'); 3506 3507 remove(element); 3508 3509 } 3510 3511 return vars[name]; 3512 3513 } 3514 3515 var cssProps = {}; 3516 3517 function propName(name) { 3518 3519 var ret = cssProps[name]; 3520 if (!ret) { 3521 ret = cssProps[name] = vendorPropName(name) || name; 3522 } 3523 return ret; 3524 } 3525 3526 var cssPrefixes = ['webkit', 'moz', 'ms']; 3527 3528 function vendorPropName(name) { 3529 3530 name = hyphenate(name); 3531 3532 var ref = document.documentElement; 3533 var style = ref.style; 3534 3535 if (name in style) { 3536 return name; 3537 } 3538 3539 var i = cssPrefixes.length, prefixedName; 3540 3541 while (i--) { 3542 prefixedName = "-" + (cssPrefixes[i]) + "-" + name; 3543 if (prefixedName in style) { 3544 return prefixedName; 3545 } 3546 } 3547 } 3548 3549 function transition(element, props, duration, timing) { 3550 if ( duration === void 0 ) duration = 400; 3551 if ( timing === void 0 ) timing = 'linear'; 3552 3553 3554 return Promise.all(toNodes(element).map(function (element) { return new Promise(function (resolve, reject) { 3555 3556 for (var name in props) { 3557 var value = css(element, name); 3558 if (value === '') { 3559 css(element, name, value); 3560 } 3561 } 3562 3563 var timer = setTimeout(function () { return trigger(element, 'transitionend'); }, duration); 3564 3565 once(element, 'transitionend transitioncanceled', function (ref) { 3566 var type = ref.type; 3567 3568 clearTimeout(timer); 3569 removeClass(element, 'uk-transition'); 3570 css(element, { 3571 transitionProperty: '', 3572 transitionDuration: '', 3573 transitionTimingFunction: '' 3574 }); 3575 type === 'transitioncanceled' ? reject() : resolve(); 3576 }, {self: true}); 3577 3578 addClass(element, 'uk-transition'); 3579 css(element, assign({ 3580 transitionProperty: Object.keys(props).map(propName).join(','), 3581 transitionDuration: (duration + "ms"), 3582 transitionTimingFunction: timing 3583 }, props)); 3584 3585 }); } 3586 )); 3587 3588 } 3589 3590 var Transition = { 3591 3592 start: transition, 3593 3594 stop: function(element) { 3595 trigger(element, 'transitionend'); 3596 return Promise.resolve(); 3597 }, 3598 3599 cancel: function(element) { 3600 trigger(element, 'transitioncanceled'); 3601 }, 3602 3603 inProgress: function(element) { 3604 return hasClass(element, 'uk-transition'); 3605 } 3606 3607 }; 3608 3609 var animationPrefix = 'uk-animation-'; 3610 var clsCancelAnimation = 'uk-cancel-animation'; 3611 3612 function animate(element, animation, duration, origin, out) { 3613 var arguments$1 = arguments; 3614 if ( duration === void 0 ) duration = 200; 3615 3616 3617 return Promise.all(toNodes(element).map(function (element) { return new Promise(function (resolve, reject) { 3618 3619 if (hasClass(element, clsCancelAnimation)) { 3620 requestAnimationFrame(function () { return Promise.resolve().then(function () { return animate.apply(void 0, arguments$1).then(resolve, reject); } 3621 ); } 3622 ); 3623 return; 3624 } 3625 3626 var cls = animation + " " + animationPrefix + (out ? 'leave' : 'enter'); 3627 3628 if (startsWith(animation, animationPrefix)) { 3629 3630 if (origin) { 3631 cls += " uk-transform-origin-" + origin; 3632 } 3633 3634 if (out) { 3635 cls += " " + animationPrefix + "reverse"; 3636 } 3637 3638 } 3639 3640 reset(); 3641 3642 once(element, 'animationend animationcancel', function (ref) { 3643 var type = ref.type; 3644 3645 3646 var hasReset = false;
3647 3648 if (type === 'animationcancel') { 3649 reject(); 3650 reset(); 3651 } else { 3652 resolve(); 3653 Promise.resolve().then(function () { 3654 hasReset = true; 3655 reset(); 3656 }); 3657 } 3658 3659 requestAnimationFrame(function () { 3660 if (!hasReset) { 3661 addClass(element, clsCancelAnimation); 3662 3663 requestAnimationFrame(function () { return removeClass(element, clsCancelAnimation); }); 3664 } 3665 }); 3666 3667 }, {self: true}); 3668 3669 css(element, 'animationDuration', (duration + "ms")); 3670 addClass(element, cls); 3671 3672 function reset() { 3673 css(element, 'animationDuration', ''); 3674 removeClasses(element, (animationPrefix + "\\S*")); 3675 } 3676 3677 }); } 3678 )); 3679 3680 } 3681 3682 var inProgress = new RegExp((animationPrefix + "(enter|leave)")); 3683 var Animation = { 3684 3685 in: function(element, animation, duration, origin) { 3686 return animate(element, animation, duration, origin, false); 3687 }, 3688 3689 out: function(element, animation, duration, origin) { 3690 return animate(element, animation, duration, origin, true); 3691 }, 3692 3693 inProgress: function(element) { 3694 return inProgress.test(attr(element, 'class')); 3695 }, 3696 3697 cancel: function(element) { 3698 trigger(element, 'animationcancel'); 3699 } 3700 3701 }; 3702 3703 var dirs = { 3704 width: ['x', 'left', 'right'], 3705 height: ['y', 'top', 'bottom'] 3706 }; 3707 3708 function positionAt(element, target, elAttach, targetAttach, elOffset, targetOffset, flip, boundary) { 3709 3710 elAttach = getPos(elAttach); 3711 targetAttach = getPos(targetAttach); 3712 3713 var flipped = {element: elAttach, target: targetAttach}; 3714 3715 if (!element || !target) { 3716 return flipped; 3717 } 3718 3719 var dim = getDimensions(element); 3720 var targetDim = getDimensions(target); 3721 var position = targetDim; 3722 3723 moveTo(position, elAttach, dim, -1); 3724 moveTo(position, targetAttach, targetDim, 1); 3725 3726 elOffset = getOffsets(elOffset, dim.width, dim.height); 3727 targetOffset = getOffsets(targetOffset, targetDim.width, targetDim.height); 3728 3729 elOffset['x'] += targetOffset['x']; 3730 elOffset['y'] += targetOffset['y']; 3731 3732 position.left += elOffset['x']; 3733 position.top += elOffset['y']; 3734 3735 if (flip) { 3736 3737 var boundaries = [getDimensions(toWindow(element))]; 3738 3739 if (boundary) { 3740 boundaries.unshift(getDimensions(boundary)); 3741 } 3742 3743 each(dirs, function (ref, prop) { 3744 var dir = ref[0]; 3745 var align = ref[1]; 3746 var alignFlip = ref[2]; 3747 3748 3749 if (!(flip === true || includes(flip, dir))) { 3750 return; 3751 } 3752 3753 boundaries.some(function (boundary) { 3754 3755 var elemOffset = elAttach[dir] === align 3756 ? -dim[prop] 3757 : elAttach[dir] === alignFlip 3758 ? dim[prop] 3759 : 0; 3760 3761 var targetOffset = targetAttach[dir] === align 3762 ? targetDim[prop] 3763 : targetAttach[dir] === alignFlip 3764 ? -targetDim[prop] 3765 : 0; 3766 3767 if (position[align] < boundary[align] || position[align] + dim[prop] > boundary[alignFlip]) { 3768 3769 var centerOffset = dim[prop] / 2; 3770 var centerTargetOffset = targetAttach[dir] === 'center' ? -targetDim[prop] / 2 : 0; 3771 3772 return elAttach[dir] === 'center' && ( 3773 apply(centerOffset, centerTargetOffset) 3774 || apply(-centerOffset, -centerTargetOffset) 3775 ) || apply(elemOffset, targetOffset); 3776 3777 } 3778 3779 function apply(elemOffset, targetOffset) { 3780 3781 var newVal = position[align] + elemOffset + targetOffset - elOffset[dir] * 2; 3782 3783 if (newVal >= boundary[align] && newVal + dim[prop] <= boundary[alignFlip]) { 3784 position[align] = newVal; 3785 3786 ['element', 'target'].forEach(function (el) { 3787 flipped[el][dir] = !elemOffset 3788 ? flipped[el][dir] 3789 : flipped[el][dir] === dirs[prop][1] 3790 ? dirs[prop][2] 3791 : dirs[prop][1]; 3792 }); 3793 3794 return true; 3795 } 3796 3797 } 3798 3799 }); 3800 3801 }); 3802 } 3803 3804 offset(element, position); 3805 3806 return flipped; 3807 } 3808 3809 function offset(element, coordinates) { 3810 3811 if (!coordinates) { 3812 return getDimensions(element); 3813 } 3814 3815 var currentOffset = offset(element); 3816 var pos = css(element, 'position'); 3817 3818 ['left', 'top'].forEach(function (prop) { 3819 if (prop in coordinates) { 3820 var value = css(element, prop); 3821 css(element, prop, coordinates[prop] - currentOffset[prop] 3822 + toFloat(pos === 'absolute' && value === 'auto' 3823 ? position(element)[prop] 3824 : value) 3825 ); 3826 } 3827 }); 3828 } 3829 3830 function getDimensions(element) { 3831 3832 if (!element) { 3833 return {}; 3834 } 3835 3836 var ref = toWindow(element); 3837 var top = ref.pageYOffset; 3838 var left = ref.pageXOffset; 3839 3840 if (isWindow(element)) { 3841
3842 var height = element.innerHeight; 3843 var width = element.innerWidth; 3844 3845 return { 3846 top: top, 3847 left: left, 3848 height: height, 3849 width: width, 3850 bottom: top + height, 3851 right: left + width 3852 }; 3853 } 3854 3855 var style, hidden; 3856 3857 if (!isVisible(element) && css(element, 'display') === 'none') { 3858 3859 style = attr(element, 'style'); 3860 hidden = attr(element, 'hidden'); 3861 3862 attr(element, { 3863 style: ((style || '') + ";display:block !important;"), 3864 hidden: null 3865 }); 3866 } 3867 3868 element = toNode(element); 3869 3870 var rect = element.getBoundingClientRect(); 3871 3872 if (!isUndefined(style)) { 3873 attr(element, {style: style, hidden: hidden}); 3874 } 3875 3876 return { 3877 height: rect.height, 3878 width: rect.width, 3879 top: rect.top + top, 3880 left: rect.left + left, 3881 bottom: rect.bottom + top, 3882 right: rect.right + left 3883 }; 3884 } 3885 3886 function position(element, parent) { 3887 3888 parent = parent || toNode(element).offsetParent || toWindow(element).document.documentElement; 3889 3890 var elementOffset = offset(element); 3891 var parentOffset = offset(parent); 3892 3893 return { 3894 top: elementOffset.top - parentOffset.top - toFloat(css(parent, 'borderTopWidth')), 3895 left: elementOffset.left - parentOffset.left - toFloat(css(parent, 'borderLeftWidth')) 3896 }; 3897 } 3898 3899 function offsetPosition(element) { 3900 var offset = [0, 0]; 3901 3902 element = toNode(element); 3903 3904 do { 3905 3906 offset[0] += element.offsetTop; 3907 offset[1] += element.offsetLeft; 3908 3909 if (css(element, 'position') === 'fixed') { 3910 var win = toWindow(element); 3911 offset[0] += win.pageYOffset; 3912 offset[1] += win.pageXOffset; 3913 return offset; 3914 } 3915 3916 } while ((element = element.offsetParent)); 3917 3918 return offset; 3919 } 3920 3921 var height = dimension('height'); 3922 var width = dimension('width'); 3923 3924 function dimension(prop) { 3925 var propName = ucfirst(prop); 3926 return function (element, value) { 3927 3928 if (isUndefined(value)) { 3929 3930 if (isWindow(element)) { 3931 return element[("inner" + propName)]; 3932 } 3933 3934 if (isDocument(element)) { 3935 var doc = element.documentElement; 3936 return Math.max(doc[("offset" + propName)], doc[("scroll" + propName)]); 3937 } 3938 3939 element = toNode(element); 3940 3941 value = css(element, prop); 3942 value = value === 'auto' ? element[("offset" + propName)] : toFloat(value) || 0; 3943 3944 return value - boxModelAdjust(element, prop); 3945 3946 } else { 3947 3948 css(element, prop, !value && value !== 0 3949 ? '' 3950 : +value + boxModelAdjust(element, prop) + 'px' 3951 ); 3952 3953 } 3954 3955 }; 3956 } 3957 3958 function boxModelAdjust(element, prop, sizing) { 3959 if ( sizing === void 0 ) sizing = 'border-box'; 3960 3961 return css(element, 'boxSizing') === sizing 3962 ? dirs[prop].slice(1).map(ucfirst).reduce(function (value, prop) { return value 3963 + toFloat(css(element, ("padding" + prop))) 3964 + toFloat(css(element, ("border" + prop + "Width"))); } 3965 , 0) 3966 : 0; 3967 } 3968 3969 function moveTo(position, attach, dim, factor) { 3970 each(dirs, function (ref, prop) { 3971 var dir = ref[0]; 3972 var align = ref[1]; 3973 var alignFlip = ref[2]; 3974 3975 if (attach[dir] === alignFlip) { 3976 position[align] += dim[prop] * factor; 3977 } else if (attach[dir] === 'center') { 3978 position[align] += dim[prop] * factor / 2; 3979 } 3980 }); 3981 } 3982 3983 function getPos(pos) { 3984 3985 var x = /left|center|right/; 3986 var y = /top|center|bottom/; 3987 3988 pos = (pos || '').split(' '); 3989 3990 if (pos.length === 1) { 3991 pos = x.test(pos[0]) 3992 ? pos.concat(['center']) 3993 : y.test(pos[0]) 3994 ? ['center'].concat(pos) 3995 : ['center', 'center']; 3996 } 3997 3998 return { 3999 x: x.test(pos[0]) ? pos[0] : 'center', 4000 y: y.test(pos[1]) ? pos[1] : 'center' 4001 }; 4002 } 4003 4004 function getOffsets(offsets, width, height) { 4005 4006 var ref = (offsets || '').split(' '); 4007 var x = ref[0]; 4008 var y = ref[1]; 4009 4010 return {
4011 x: x ? toFloat(x) * (endsWith(x, '%') ? width / 100 : 1) : 0, 4012 y: y ? toFloat(y) * (endsWith(y, '%') ? height / 100 : 1) : 0 4013 }; 4014 } 4015 4016 function flipPosition(pos) { 4017 switch (pos) { 4018 case 'left': 4019 return 'right'; 4020 case 'right': 4021 return 'left'; 4022 case 'top': 4023 return 'bottom'; 4024 case 'bottom': 4025 return 'top'; 4026 default: 4027 return pos; 4028 } 4029 } 4030 4031 function toPx(value, property, element) { 4032 if ( property === void 0 ) property = 'width'; 4033 if ( element === void 0 ) element = window; 4034 4035 return isNumeric(value) 4036 ? +value 4037 : endsWith(value, 'vh') 4038 ? percent(height(toWindow(element)), value) 4039 : endsWith(value, 'vw') 4040 ? percent(width(toWindow(element)), value) 4041 : endsWith(value, '%') 4042 ? percent(getDimensions(element)[property], value) 4043 : toFloat(value); 4044 } 4045 4046 function percent(base, value) { 4047 return base * toFloat(value) / 100; 4048 } 4049 4050 /* 4051 Based on: 4052 Copyright (c) 2016 Wilson Page [email protected] 4053 https://github.com/wilsonpage/fastdom 4054 */ 4055 4056 var fastdom = { 4057 4058 reads: [], 4059 writes: [], 4060 4061 read: function(task) { 4062 this.reads.push(task); 4063 scheduleFlush(); 4064 return task; 4065 }, 4066 4067 write: function(task) { 4068 this.writes.push(task); 4069 scheduleFlush(); 4070 return task; 4071 }, 4072 4073 clear: function(task) { 4074 return remove$1(this.reads, task) || remove$1(this.writes, task); 4075 }, 4076 4077 flush: flush 4078 4079 }; 4080 4081 function flush(recursion) { 4082 if ( recursion === void 0 ) recursion = 1; 4083 4084 runTasks(fastdom.reads); 4085 runTasks(fastdom.writes.splice(0, fastdom.writes.length)); 4086 4087 fastdom.scheduled = false; 4088 4089 if (fastdom.reads.length || fastdom.writes.length) { 4090 scheduleFlush(recursion + 1); 4091 } 4092 } 4093 4094 var RECURSION_LIMIT = 5; 4095 function scheduleFlush(recursion) { 4096 if (!fastdom.scheduled) { 4097 fastdom.scheduled = true; 4098 if (recursion > RECURSION_LIMIT) { 4099 throw new Error('Maximum recursion limit reached.'); 4100 } else if (recursion) { 4101 Promise.resolve().then(function () { return flush(recursion); }); 4102 } else { 4103 requestAnimationFrame(function () { return flush(); }); 4104 } 4105 } 4106 } 4107 4108 function runTasks(tasks) { 4109 var task; 4110 while ((task = tasks.shift())) { 4111 task(); 4112 } 4113 } 4114 4115 function remove$1(array, item) { 4116 var index = array.indexOf(item); 4117 return !!~index && !!array.splice(index, 1); 4118 } 4119 4120 function MouseTracker() {} 4121 4122 MouseTracker.prototype = { 4123 4124 positions: [], 4125 4126 init: function() { 4127 var this$1 = this; 4128 4129 4130 this.positions = []; 4131 4132 var position; 4133 this.unbind = on(document, 'mousemove', function (e) { return position = getEventPos(e, 'page'); }); 4134 this.interval = setInterval(function () { 4135 4136 if (!position) { 4137 return; 4138 } 4139 4140 this$1.positions.push(position); 4141 4142 if (this$1.positions.length > 5) { 4143 this$1.positions.shift(); 4144 } 4145 }, 50); 4146 4147 }, 4148 4149 cancel: function() { 4150 this.unbind && this.unbind(); 4151 this.interval && clearInterval(this.interval); 4152 }, 4153 4154 movesTo: function(target) { 4155 4156 if (this.positions.length < 2) { 4157 return false; 4158 } 4159 4160 var p = offset(target); 4161 var left = p.left; 4162 var right = p.right; 4163 var top = p.top; 4164 var bottom = p.bottom; 4165 4166 var ref = this.positions; 4167 var prevPosition = ref[0]; 4168 var position = last(this.positions); 4169 var path = [prevPosition, position]; 4170 4171 if (pointInRect(position, p)) { 4172 return false;
4173 } 4174 4175 var diagonals = [[{x: left, y: top}, {x: right, y: bottom}], [{x: left, y: bottom}, {x: right, y: top}]]; 4176 4177 return diagonals.some(function (diagonal) { 4178 var intersection = intersect(path, diagonal); 4179 return intersection && pointInRect(intersection, p); 4180 }); 4181 } 4182 4183 }; 4184 4185 // Inspired by http://paulbourke.net/geometry/pointlineplane/ 4186 function intersect(ref, ref$1) { 4187 var ref_0 = ref[0]; 4188 var x1 = ref_0.x; 4189 var y1 = ref_0.y; 4190 var ref_1 = ref[1]; 4191 var x2 = ref_1.x; 4192 var y2 = ref_1.y; 4193 var ref$1_0 = ref$1[0]; 4194 var x3 = ref$1_0.x; 4195 var y3 = ref$1_0.y; 4196 var ref$1_1 = ref$1[1]; 4197 var x4 = ref$1_1.x; 4198 var y4 = ref$1_1.y; 4199 4200 4201 var denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1); 4202 4203 // Lines are parallel 4204 if (denominator === 0) { 4205 return false; 4206 } 4207 4208 var ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator; 4209 4210 if (ua < 0) { 4211 return false; 4212 } 4213 4214 // Return a object with the x and y coordinates of the intersection 4215 return {x: x1 + ua * (x2 - x1), y: y1 + ua * (y2 - y1)}; 4216 } 4217 4218 var strats = {}; 4219 4220 strats.events = 4221 strats.created = 4222 strats.beforeConnect = 4223 strats.connected = 4224 strats.beforeDisconnect = 4225 strats.disconnected = 4226 strats.destroy = concatStrat; 4227 4228 // args strategy 4229 strats.args = function (parentVal, childVal) { 4230 return childVal !== false && concatStrat(childVal || parentVal); 4231 }; 4232 4233 // update strategy 4234 strats.update = function (parentVal, childVal) { 4235 return sortBy(concatStrat(parentVal, isFunction(childVal) ? {read: childVal} : childVal), 'order'); 4236 }; 4237 4238 // property strategy 4239 strats.props = function (parentVal, childVal) { 4240 4241 if (isArray(childVal)) { 4242 childVal = childVal.reduce(function (value, key) { 4243 value[key] = String; 4244 return value; 4245 }, {}); 4246 } 4247 4248 return strats.methods(parentVal, childVal); 4249 }; 4250 4251 // extend strategy 4252 strats.computed = 4253 strats.methods = function (parentVal, childVal) { 4254 return childVal 4255 ? parentVal 4256 ? assign({}, parentVal, childVal) 4257 : childVal 4258 : parentVal; 4259 }; 4260 4261 // data strategy 4262 strats.data = function (parentVal, childVal, vm) { 4263 4264 if (!vm) { 4265 4266 if (!childVal) { 4267 return parentVal; 4268 } 4269 4270 if (!parentVal) { 4271 return childVal; 4272 } 4273 4274 return function (vm) { 4275 return mergeFnData(parentVal, childVal, vm); 4276 }; 4277 4278 } 4279 4280 return mergeFnData(parentVal, childVal, vm); 4281 }; 4282 4283 function mergeFnData(parentVal, childVal, vm) { 4284 return strats.computed( 4285 isFunction(parentVal) 4286 ? parentVal.call(vm, vm) 4287 : parentVal, 4288 isFunction(childVal) 4289 ? childVal.call(vm, vm) 4290 : childVal 4291 ); 4292 } 4293 4294 // concat strategy 4295 function concatStrat(parentVal, childVal) { 4296 4297 parentVal = parentVal && !isArray(parentVal) ? [parentVal] : parentVal; 4298 4299 return childVal 4300 ? parentVal 4301 ? parentVal.concat(childVal) 4302 : isArray(childVal) 4303 ? childVal 4304 : [childVal] 4305 : parentVal; 4306 } 4307 4308 // default strategy 4309 function defaultStrat(parentVal, childVal) { 4310 return isUndefined(childVal) ? parentVal : childVal; 4311 } 4312 4313 function mergeOptions(parent, child, vm) { 4314 4315 var options = {}; 4316 4317 if (isFunction(child)) { 4318 child = child.options; 4319 } 4320 4321 if (child.extends) { 4322 parent = mergeOptions(parent, child.extends, vm); 4323 } 4324 4325 if (child.mixins) { 4326 for (var i = 0, l = child.mixins.length; i < l; i++) { 4327 parent = mergeOptions(parent, child.mixins[i], vm); 4328 } 4329 } 4330 4331 for (var key in parent) {
4332 mergeKey(key); 4333 } 4334 4335 for (var key$1 in child) { 4336 if (!hasOwn(parent, key$1)) { 4337 mergeKey(key$1); 4338 } 4339 } 4340 4341 function mergeKey(key) { 4342 options[key] = (strats[key] || defaultStrat)(parent[key], child[key], vm); 4343 } 4344 4345 return options; 4346 } 4347 4348 function parseOptions(options, args) { 4349 var obj; 4350 4351 if ( args === void 0 ) args = []; 4352 4353 try { 4354 4355 return !options 4356 ? {} 4357 : startsWith(options, '{') 4358 ? JSON.parse(options) 4359 : args.length && !includes(options, ':') 4360 ? (( obj = {}, obj[args[0]] = options, obj )) 4361 : options.split(';').reduce(function (options, option) { 4362 var ref = option.split(/:(.*)/); 4363 var key = ref[0]; 4364 var value = ref[1]; 4365 if (key && !isUndefined(value)) { 4366 options[key.trim()] = value.trim(); 4367 } 4368 return options; 4369 }, {}); 4370 4371 } catch (e) { 4372 return {}; 4373 } 4374 4375 } 4376 4377 var id = 0; 4378 4379 var Player = function(el) { 4380 this.id = ++id; 4381 this.el = toNode(el); 4382 }; 4383 4384 Player.prototype.isVideo = function () { 4385 return this.isYoutube() || this.isVimeo() || this.isHTML5(); 4386 }; 4387 4388 Player.prototype.isHTML5 = function () { 4389 return this.el.tagName === 'VIDEO'; 4390 }; 4391 4392 Player.prototype.isIFrame = function () { 4393 return this.el.tagName === 'IFRAME'; 4394 }; 4395 4396 Player.prototype.isYoutube = function () { 4397 return this.isIFrame() && !!this.el.src.match(/\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/); 4398 }; 4399 4400 Player.prototype.isVimeo = function () { 4401 return this.isIFrame() && !!this.el.src.match(/vimeo\.com\/video\/.*/); 4402 }; 4403 4404 Player.prototype.enableApi = function () { 4405 var this$1 = this; 4406 4407 4408 if (this.ready) { 4409 return this.ready; 4410 } 4411 4412 var youtube = this.isYoutube(); 4413 var vimeo = this.isVimeo(); 4414 4415 var poller; 4416 4417 if (youtube || vimeo) { 4418 4419 return this.ready = new Promise(function (resolve) { 4420 4421 once(this$1.el, 'load', function () { 4422 if (youtube) { 4423 var listener = function () { return post(this$1.el, {event: 'listening', id: this$1.id}); }; 4424 poller = setInterval(listener, 100); 4425 listener(); 4426 } 4427 }); 4428 4429 listen(function (data) { return youtube && data.id === this$1.id && data.event === 'onReady' || vimeo && Number(data.player_id) === this$1.id; }) 4430 .then(function () { 4431 resolve(); 4432 poller && clearInterval(poller); 4433 }); 4434 4435 attr(this$1.el, 'src', ("" + (this$1.el.src) + (includes(this$1.el.src, '?') ? '&' : '?') + (youtube ? 'enablejsapi=1' : ("api=1&player_id=" + (this$1.id))))); 4436 4437 }); 4438 4439 } 4440 4441 return Promise.resolve(); 4442 4443 }; 4444 4445 Player.prototype.play = function () { 4446 var this$1 = this; 4447 4448 4449 if (!this.isVideo()) { 4450 return; 4451 } 4452 4453 if (this.isIFrame()) { 4454 this.enableApi().then(function () { return post(this$1.el, {func: 'playVideo', method: 'play'}); }); 4455 } else if (this.isHTML5()) { 4456 try { 4457 var promise = this.el.play(); 4458 4459 if (promise) { 4460 promise.catch(noop); 4461 } 4462 } catch (e) {} 4463 } 4464 }; 4465 4466 Player.prototype.pause = function () { 4467 var this$1 = this; 4468 4469 4470 if (!this.isVideo()) { 4471 return; 4472 } 4473 4474 if (this.isIFrame()) { 4475 this.enableApi().then(function () { return post(this$1.el, {func: 'pauseVideo', method: 'pause'}); }); 4476 } else if (this.isHTML5()) { 4477 this.el.pause(); 4478 } 4479 }; 4480 4481 Player.prototype.mute = function () { 4482 var this$1 = this; 4483 4484 4485 if (!this.isVideo()) { 4486 return; 4487 } 4488 4489 if (this.isIFrame()) { 4490 this.enableApi().then(function () { return post(this$1.el, {func: 'mute', method: 'setVolume', value: 0}); }); 4491 } else if (this.isHTML5()) { 4492 this.el.muted = true; 4493 attr(this.el, 'muted', ''); 4494 } 4495 4496 }; 4497 4498 function post(el, cmd) { 4499 try { 4500 el.contentWindow.postMessage(JSON.stringify(assign({event: 'command'}, cmd)), '*'); 4501 } catch (e) {} 4502 } 4503 4504 function listen(cb) { 4505 4506 return new Promise(function (resolve) { 4507 4508 once(window, 'message', function (_, data) { return resolve(data); }, false, function (ref) { 4509 var data = ref.data; 4510 4511 4512 if (!data || !isString(data)) { 4513 return; 4514 } 4515 4516 try { 4517 data = JSON.parse(data); 4518 } catch (e) { 4519 return; 4520 } 4521 4522 return data && cb(data); 4523 4524 }); 4525 4526 }); 4527 4528 } 4529 4530 function isInView(element, offsetTop, offsetLeft) { 4531 if ( offsetTop === void 0 ) offsetTop = 0; 4532 if ( offsetLeft === void 0 ) offsetLeft = 0; 4533 4534 4535 if (!isVisible(element)) { 4536 return false;
4537 } 4538 4539 var parents = overflowParents(element).concat(element); 4540 4541 for (var i = 0; i < parents.length - 1; i++) { 4542 var ref = offset(getViewport(parents[i])); 4543 var top = ref.top; 4544 var left = ref.left; 4545 var bottom = ref.bottom; 4546 var right = ref.right; 4547 var vp = { 4548 top: top - offsetTop, 4549 left: left - offsetLeft, 4550 bottom: bottom + offsetTop, 4551 right: right + offsetLeft 4552 }; 4553 4554 var client = offset(parents[i + 1]); 4555 4556 if (!intersectRect(client, vp) && !pointInRect({x: client.left, y: client.top}, vp)) { 4557 return false; 4558 } 4559 } 4560 4561 return true; 4562 } 4563 4564 function scrollTop(element, top) { 4565 4566 if (isWindow(element) || isDocument(element)) { 4567 element = getScrollingElement(element); 4568 } else { 4569 element = toNode(element); 4570 } 4571 4572 element.scrollTop = top; 4573 } 4574 4575 function scrollIntoView(element, ref) { 4576 if ( ref === void 0 ) ref = {}; 4577 var duration = ref.duration; if ( duration === void 0 ) duration = 1000; 4578 var offset = ref.offset; if ( offset === void 0 ) offset = 0; 4579 4580 4581 if (!isVisible(element)) { 4582 return; 4583 } 4584 4585 var parents = overflowParents(element).concat(element); 4586 duration /= parents.length - 1; 4587 4588 var promise = Promise.resolve(); 4589 var loop = function ( i ) { 4590 promise = promise.then(function () { return new Promise(function (resolve) { 4591 4592 var scrollElement = parents[i]; 4593 var element = parents[i + 1]; 4594 4595 var scroll = scrollElement.scrollTop; 4596 var top = position(element, getViewport(scrollElement)).top - offset; 4597 4598 var start = Date.now(); 4599 var step = function () { 4600 4601 var percent = ease(clamp((Date.now() - start) / duration)); 4602 4603 scrollTop(scrollElement, scroll + top * percent); 4604 4605 // scroll more if we have not reached our destination 4606 if (percent !== 1) { 4607 requestAnimationFrame(step); 4608 } else { 4609 resolve(); 4610 } 4611 4612 }; 4613 4614 step(); 4615 }); } 4616 ); 4617 }; 4618 4619 for (var i = 0; i < parents.length - 1; i++) loop( i ); 4620 4621 return promise; 4622 4623 function ease(k) { 4624 return 0.5 * (1 - Math.cos(Math.PI * k)); 4625 } 4626 4627 } 4628 4629 function scrolledOver(element, heightOffset) { 4630 if ( heightOffset === void 0 ) heightOffset = 0; 4631 4632 4633 if (!isVisible(element)) { 4634 return 0; 4635 } 4636 4637 var scrollElement = last(scrollParents(element)); 4638 var scrollHeight = scrollElement.scrollHeight; 4639 var scrollTop = scrollElement.scrollTop; 4640 var viewport = getViewport(scrollElement); 4641 var viewportHeight = offset(viewport).height; 4642 var viewportTop = offsetPosition(element)[0] - scrollTop - offsetPosition(scrollElement)[0]; 4643 var viewportDist = Math.min(viewportHeight, viewportTop + scrollTop); 4644 4645 var top = viewportTop - viewportDist; 4646 var dist = Math.min( 4647 offset(element).height + heightOffset + viewportDist, 4648 scrollHeight - (viewportTop + scrollTop), 4649 scrollHeight - viewportHeight 4650 ); 4651 4652 return clamp(-1 * top / dist); 4653 } 4654 4655 function scrollParents(element, overflowRe) { 4656 if ( overflowRe === void 0 ) overflowRe = /auto|scroll/; 4657 4658 var scrollEl = getScrollingElement(element); 4659 var scrollParents = parents(element).filter(function (parent) { return parent === scrollEl 4660 || overflowRe.test(css(parent, 'overflow')) 4661 && parent.scrollHeight > Math.round(offset(parent).height); } 4662 ).reverse(); 4663 return scrollParents.length ? scrollParents : [scrollEl]; 4664 } 4665 4666 function getViewport(scrollElement) { 4667 return scrollElement === getScrollingElement(scrollElement) ? window : scrollElement; 4668 } 4669 4670 function overflowParents(element) { 4671 return scrollParents(element, /auto|scroll|hidden/); 4672 } 4673 4674 function getScrollingElement(element) { 4675 var ref = toWindow(element); 4676 var document = ref.document; 4677 return document.scrollingElement || document.documentElement; 4678 } 4679 4680 var IntersectionObserver = 'IntersectionObserver' in window 4681 ? window.IntersectionObserver 4682 : /*@__PURE__*/(function () { 4683 function IntersectionObserverClass(callback, ref) { 4684 var this$1 = this; 4685 if ( ref === void 0 ) ref = {}; 4686 var rootMargin = ref.rootMargin; if ( rootMargin === void 0 ) rootMargin = '0 0'; 4687 4688 4689 this.targets = []; 4690 4691 var ref$1 = (rootMargin || '0 0').split(' ').map(toFloat); 4692 var offsetTop = ref$1[0]; 4693 var offsetLeft = ref$1[1]; 4694 4695 this.offsetTop = offsetTop; 4696 this.offsetLeft = offsetLeft; 4697 4698 var pending; 4699 this.apply = function () { 4700 4701 if (pending) { 4702 return; 4703 } 4704 4705 pending = requestAnimationFrame(function () { return setTimeout(function () { 4706 var records = this$1.takeRecords(); 4707 4708 if (records.length) { 4709 callback(records, this$1); 4710 } 4711 4712 pending = false;
4713 }); }); 4714 4715 }; 4716 4717 this.off = on(window, 'scroll resize load', this.apply, {passive: true, capture: true}); 4718 4719 } 4720 4721 IntersectionObserverClass.prototype.takeRecords = function () { 4722 var this$1 = this; 4723 4724 return this.targets.filter(function (entry) { 4725 4726 var inView = isInView(entry.target, this$1.offsetTop, this$1.offsetLeft); 4727 4728 if (entry.isIntersecting === null || inView ^ entry.isIntersecting) { 4729 entry.isIntersecting = inView; 4730 return true; 4731 } 4732 4733 }); 4734 }; 4735 4736 IntersectionObserverClass.prototype.observe = function (target) { 4737 this.targets.push({ 4738 target: target, 4739 isIntersecting: null 4740 }); 4741 this.apply(); 4742 }; 4743 4744 IntersectionObserverClass.prototype.disconnect = function () { 4745 this.targets = []; 4746 this.off(); 4747 }; 4748 4749 return IntersectionObserverClass; 4750 }()); 4751 4752 4753 4754 var util = /*#__PURE__*/Object.freeze({ 4755 __proto__: null, 4756 ajax: ajax, 4757 getImage: getImage, 4758 transition: transition, 4759 Transition: Transition, 4760 animate: animate, 4761 Animation: Animation, 4762 attr: attr, 4763 hasAttr: hasAttr, 4764 removeAttr: removeAttr, 4765 data: data, 4766 addClass: addClass, 4767 removeClass: removeClass, 4768 removeClasses: removeClasses, 4769 replaceClass: replaceClass, 4770 hasClass: hasClass, 4771 toggleClass: toggleClass, 4772 positionAt: positionAt, 4773 offset: offset, 4774 position: position, 4775 offsetPosition: offsetPosition, 4776 height: height, 4777 width: width, 4778 boxModelAdjust: boxModelAdjust, 4779 flipPosition: flipPosition, 4780 toPx: toPx, 4781 ready: ready, 4782 index: index, 4783 getIndex: getIndex, 4784 empty: empty, 4785 html: html, 4786 prepend: prepend, 4787 append: append, 4788 before: before, 4789 after: after, 4790 remove: remove, 4791 wrapAll: wrapAll, 4792 wrapInner: wrapInner, 4793 unwrap: unwrap, 4794 fragment: fragment, 4795 apply: apply, 4796 $: $, 4797 $$: $$, 4798 isIE: isIE, 4799 isRtl: isRtl, 4800 hasTouch: hasTouch, 4801 pointerDown: pointerDown, 4802 pointerMove: pointerMove, 4803 pointerUp: pointerUp, 4804 pointerEnter: pointerEnter, 4805 pointerLeave: pointerLeave, 4806 pointerCancel: pointerCancel, 4807 on: on, 4808 off: off, 4809 once: once, 4810 trigger: trigger, 4811 createEvent: createEvent, 4812 toEventTargets: toEventTargets, 4813 isTouch: isTouch, 4814 getEventPos: getEventPos, 4815 fastdom: fastdom, 4816 isVoidElement: isVoidElement, 4817 isVisible: isVisible, 4818 selInput: selInput, 4819 isInput: isInput, 4820 filter: filter, 4821 within: within, 4822 hasOwn: hasOwn, 4823 hyphenate: hyphenate, 4824 camelize: camelize, 4825 ucfirst: ucfirst, 4826 startsWith: startsWith, 4827 endsWith: endsWith, 4828 includes: includes, 4829 findIndex: findIndex, 4830 isArray: isArray, 4831 isFunction: isFunction, 4832 isObject: isObject, 4833 isPlainObject: isPlainObject, 4834 isWindow: isWindow, 4835 isDocument: isDocument, 4836 isJQuery: isJQuery, 4837 isNode: isNode, 4838 isElement: isElement, 4839 isNodeCollection: isNodeCollection, 4840 isBoolean: isBoolean, 4841 isString: isString, 4842 isNumber: isNumber, 4843 isNumeric: isNumeric, 4844 isEmpty: isEmpty, 4845 isUndefined: isUndefined, 4846 toBoolean: toBoolean, 4847 toNumber: toNumber, 4848 toFloat: toFloat, 4849 toNode: toNode, 4850 toNodes: toNodes, 4851 toWindow: toWindow, 4852 toList: toList, 4853 toMs: toMs, 4854 isEqual: isEqual, 4855 swap: swap, 4856 assign: assign, 4857 last: last, 4858 each: each, 4859 sortBy: sortBy, 4860 uniqueBy: uniqueBy, 4861 clamp: clamp, 4862 noop: noop, 4863 intersectRect: intersectRect, 4864 pointInRect: pointInRect, 4865 Dimensions: Dimensions, 4866 MouseTracker: MouseTracker, 4867 mergeOptions: mergeOptions, 4868 parseOptions: parseOptions, 4869 Player: Player, 4870 Promise: Promise, 4871 Deferred: Deferred, 4872 IntersectionObserver: IntersectionObserver, 4873 query: query, 4874 queryAll: queryAll, 4875 find: find, 4876 findAll: findAll, 4877 matches: matches, 4878 closest: closest, 4879 parent: parent, 4880 parents: parents, 4881 children: children, 4882 escape: escape, 4883 css: css, 4884 getStyles: getStyles, 4885 getStyle: getStyle, 4886 getCssVar: getCssVar, 4887 propName: propName, 4888 isInView: isInView, 4889 scrollTop: scrollTop, 4890 scrollIntoView: scrollIntoView, 4891 scrolledOver: scrolledOver, 4892 scrollParents: scrollParents, 4893 getViewport: getViewport 4894 }); 4895 4896 function globalAPI (UIkit) { 4897 4898 var DATA = UIkit.data; 4899 4900 UIkit.use = function (plugin) { 4901 4902 if (plugin.installed) { 4903 return; 4904 } 4905 4906 plugin.call(null, this); 4907 plugin.installed = true; 4908 4909 return this; 4910 }; 4911 4912 UIkit.mixin = function (mixin, component) { 4913 component = (isString(component) ? UIkit.component(component) : component) || this; 4914 component.options = mergeOptions(component.options, mixin); 4915 }; 4916 4917 UIkit.extend = function (options) { 4918 4919 options = options || {}; 4920 4921 var Super = this; 4922 var Sub = function UIkitComponent(options) { 4923 this._init(options); 4924 }; 4925 4926 Sub.prototype = Object.create(Super.prototype); 4927 Sub.prototype.constructor = Sub; 4928 Sub.options = mergeOptions(Super.options, options); 4929 4930 Sub.super = Super; 4931 Sub.extend = Super.extend; 4932 4933 return Sub; 4934 }; 4935 4936 UIkit.update = function (element, e) { 4937 4938 element = element ? toNode(element) : document.body; 4939
4940 parents(element).reverse().forEach(function (element) { return update(element[DATA], e); }); 4941 apply(element, function (element) { return update(element[DATA], e); }); 4942 4943 }; 4944 4945 var container; 4946 Object.defineProperty(UIkit, 'container', { 4947 4948 get: function() { 4949 return container || document.body; 4950 }, 4951 4952 set: function(element) { 4953 container = $(element); 4954 } 4955 4956 }); 4957 4958 function update(data, e) { 4959 4960 if (!data) { 4961 return; 4962 } 4963 4964 for (var name in data) { 4965 if (data[name]._connected) { 4966 data[name]._callUpdate(e); 4967 } 4968 } 4969 4970 } 4971 } 4972 4973 function hooksAPI (UIkit) { 4974 4975 UIkit.prototype._callHook = function (hook) { 4976 var this$1 = this; 4977 4978 4979 var handlers = this.$options[hook]; 4980 4981 if (handlers) { 4982 handlers.forEach(function (handler) { return handler.call(this$1); }); 4983 } 4984 }; 4985 4986 UIkit.prototype._callConnected = function () { 4987 4988 if (this._connected) { 4989 return; 4990 } 4991 4992 this._data = {}; 4993 this._computeds = {}; 4994 this._initProps(); 4995 4996 this._callHook('beforeConnect'); 4997 this._connected = true; 4998 4999 this._initWatches(); 5000 this._initEvents(); 5001 this._initObserver(); 5002 5003 this._callHook('connected'); 5004 this._callUpdate(); 5005 }; 5006 5007 UIkit.prototype._callDisconnected = function () { 5008 5009 if (!this._connected) { 5010 return; 5011 } 5012 5013 this._callHook('beforeDisconnect'); 5014 5015 if (this._observer) { 5016 this._observer.disconnect(); 5017 this._observer = null; 5018 } 5019 5020 this._unbindEvents(); 5021 this._callHook('disconnected'); 5022 5023 this._connected = false; 5024 5025 }; 5026 5027 UIkit.prototype._callUpdate = function (e) { 5028 var this$1 = this; 5029 if ( e === void 0 ) e = 'update'; 5030 5031 5032 var type = e.type || e; 5033 5034 if (includes(['update', 'resize'], type)) { 5035 this._callWatches(); 5036 } 5037 5038 var updates = this.$options.update; 5039 var ref = this._frames; 5040 var reads = ref.reads; 5041 var writes = ref.writes; 5042 5043 if (!updates) { 5044 return; 5045 } 5046 5047 updates.forEach(function (ref, i) { 5048 var read = ref.read; 5049 var write = ref.write; 5050 var events = ref.events; 5051 5052 5053 if (type !== 'update' && !includes(events, type)) { 5054 return; 5055 } 5056 5057 if (read && !includes(fastdom.reads, reads[i])) { 5058 reads[i] = fastdom.read(function () { 5059 5060 var result = this$1._connected && read.call(this$1, this$1._data, type); 5061 5062 if (result === false && write) { 5063 fastdom.clear(writes[i]); 5064 } else if (isPlainObject(result)) { 5065 assign(this$1._data, result); 5066 } 5067 }); 5068 } 5069 5070 if (write && !includes(fastdom.writes, writes[i])) { 5071 writes[i] = fastdom.write(function () { return this$1._connected && write.call(this$1, this$1._data, type); }); 5072 } 5073 5074 }); 5075 5076 }; 5077 5078 } 5079 5080 function stateAPI (UIkit) { 5081 5082 var uid = 0; 5083 5084 UIkit.prototype._init = function (options) { 5085 5086 options = options || {}; 5087 options.data = normalizeData(options, this.constructor.options); 5088 5089 this.$options = mergeOptions(this.constructor.options, options, this); 5090 this.$el = null; 5091 this.$props = {}; 5092 5093 this._frames = {reads: {}, writes: {}}; 5094 this._events = []; 5095 5096 this._uid = uid++; 5097 this._initData(); 5098 this._initMethods(); 5099 this._initComputeds(); 5100 this._callHook('created'); 5101 5102 if (options.el) { 5103 this.$mount(options.el); 5104 } 5105 }; 5106 5107 UIkit.prototype._initData = function () { 5108 5109 var ref = this.$options; 5110 var data = ref.data; if ( data === void 0 ) data = {}; 5111 5112 for (var key in data) { 5113 this.$props[key] = this[key] = data[key]; 5114 } 5115 }; 5116 5117 UIkit.prototype._initMethods = function () { 5118 5119 var ref = this.$options; 5120 var methods = ref.methods; 5121 5122 if (methods) { 5123 for (var key in methods) { 5124 this[key] = methods[key].bind(this); 5125 } 5126 } 5127 }; 5128 5129 UIkit.prototype._initComputeds = function () { 5130 5131 var ref = this.$options; 5132 var computed = ref.computed; 5133 5134 this._computeds = {}; 5135 5136 if (computed) { 5137 for (var key in computed) { 5138 registerComputed(this, key, computed[key]); 5139 } 5140 } 5141 }; 5142 5143 UIkit.prototype._initWatches = function () { 5144 5145 var ref = this.$options; 5146 var computed = ref.computed; 5147 5148 if (computed) { 5149 for (var key in computed) { 5150 var ref$1 = computed[key]; 5151 var watch = ref$1.watch; 5152 var immediate = ref$1.immediate; 5153 if (watch && immediate) { 5154 watch.call(this, this[key]); 5155 } 5156 } 5157 } 5158 }; 5159 5160 UIkit.prototype._callWatches = function () { 5161 5162 var ref = this; 5163 var computed = ref.$options.computed; 5164 var _computeds = ref._computeds; 5165 5166 for (var key in _computeds) { 5167 5168 var value = _computeds[key]; 5169 delete _computeds[key]; 5170 5171 if (computed[key].watch && !isEqual(value, this[key])) { 5172 computed[key].watch.call(this, this[key], value); 5173 } 5174 5175 } 5176 5177 }; 5178 5179 UIkit.prototype._initProps = function (props) { 5180 5181 var key; 5182 5183 props = props || getProps(this.$options, this.$name); 5184 5185 for (key in props) { 5186 if (!isUndefined(props[key])) { 5187 this.$props[key] = props[key]; 5188 } 5189 } 5190 5191 var exclude = [this.$options.computed, this.$options.methods]; 5192 for (key in this.$props) { 5193 if (key in props && notIn(exclude, key)) { 5194 this[key] = this.$props[key]; 5195 } 5196 } 5197 }; 5198 5199 UIkit.prototype._initEvents = function () { 5200 var this$1 = this; 5201 5202 5203 var ref = this.$options; 5204 var events = ref.events; 5205 5206 if (events) { 5207
5208 events.forEach(function (event) { 5209 5210 if (!hasOwn(event, 'handler')) { 5211 for (var key in event) { 5212 registerEvent(this$1, event[key], key); 5213 } 5214 } else { 5215 registerEvent(this$1, event); 5216 } 5217 5218 }); 5219 } 5220 }; 5221 5222 UIkit.prototype._unbindEvents = function () { 5223 this._events.forEach(function (unbind) { return unbind(); }); 5224 this._events = []; 5225 }; 5226 5227 UIkit.prototype._initObserver = function () { 5228 var this$1 = this; 5229 5230 5231 var ref = this.$options; 5232 var attrs = ref.attrs; 5233 var props = ref.props; 5234 var el = ref.el; 5235 if (this._observer || !props || attrs === false) { 5236 return; 5237 } 5238 5239 attrs = isArray(attrs) ? attrs : Object.keys(props); 5240 5241 this._observer = new MutationObserver(function () { 5242 5243 var data = getProps(this$1.$options, this$1.$name); 5244 if (attrs.some(function (key) { return !isUndefined(data[key]) && data[key] !== this$1.$props[key]; })) { 5245 this$1.$reset(); 5246 } 5247 5248 }); 5249 5250 var filter = attrs.map(function (key) { return hyphenate(key); }).concat(this.$name); 5251 5252 this._observer.observe(el, { 5253 attributes: true, 5254 attributeFilter: filter.concat(filter.map(function (key) { return ("data-" + key); })) 5255 }); 5256 }; 5257 5258 function getProps(opts, name) { 5259 5260 var data$1 = {}; 5261 var args = opts.args; if ( args === void 0 ) args = []; 5262 var props = opts.props; if ( props === void 0 ) props = {}; 5263 var el = opts.el; 5264 5265 if (!props) { 5266 return data$1; 5267 } 5268 5269 for (var key in props) { 5270 var prop = hyphenate(key); 5271 var value = data(el, prop); 5272 5273 if (!isUndefined(value)) { 5274 5275 value = props[key] === Boolean && value === '' 5276 ? true 5277 : coerce(props[key], value); 5278 5279 if (prop === 'target' && (!value || startsWith(value, '_'))) { 5280 continue; 5281 } 5282 5283 data$1[key] = value; 5284 } 5285 } 5286 5287 var options = parseOptions(data(el, name), args); 5288 5289 for (var key$1 in options) { 5290 var prop$1 = camelize(key$1); 5291 if (props[prop$1] !== undefined) { 5292 data$1[prop$1] = coerce(props[prop$1], options[key$1]); 5293 } 5294 } 5295 5296 return data$1; 5297 } 5298 5299 function registerComputed(component, key, cb) { 5300 Object.defineProperty(component, key, { 5301 5302 enumerable: true, 5303 5304 get: function() { 5305 5306 var _computeds = component._computeds; 5307 var $props = component.$props; 5308 var $el = component.$el; 5309 5310 if (!hasOwn(_computeds, key)) { 5311 _computeds[key] = (cb.get || cb).call(component, $props, $el); 5312 } 5313 5314 return _computeds[key]; 5315 }, 5316 5317 set: function(value) { 5318 5319 var _computeds = component._computeds; 5320 5321 _computeds[key] = cb.set ? cb.set.call(component, value) : value; 5322 5323 if (isUndefined(_computeds[key])) { 5324 delete _computeds[key]; 5325 } 5326 } 5327 5328 }); 5329 } 5330 5331 function registerEvent(component, event, key) { 5332 5333 if (!isPlainObject(event)) { 5334 event = ({name: key, handler: event}); 5335 } 5336 5337 var name = event.name; 5338 var el = event.el; 5339 var handler = event.handler; 5340 var capture = event.capture; 5341 var passive = event.passive; 5342 var delegate = event.delegate; 5343 var filter = event.filter; 5344 var self = event.self; 5345 el = isFunction(el) 5346 ? el.call(component) 5347 : el || component.$el; 5348 5349 if (isArray(el)) { 5350 el.forEach(function (el) { return registerEvent(component, assign({}, event, {el: el}), key); }); 5351 return; 5352 } 5353 5354 if (!el || filter && !filter.call(component)) { 5355 return; 5356 } 5357 5358 component._events.push( 5359 on( 5360 el, 5361 name, 5362 !delegate 5363 ? null 5364 : isString(delegate) 5365 ? delegate 5366 : delegate.call(component), 5367 isString(handler) ? component[handler] : handler.bind(component), 5368 {passive: passive, capture: capture, self: self} 5369 ) 5370 ); 5371 5372 } 5373 5374 function notIn(options, key) { 5375 return options.every(function (arr) { return !arr || !hasOwn(arr, key); }); 5376 } 5377 5378 function coerce(type, value) { 5379 5380 if (type === Boolean) { 5381 return toBoolean(value); 5382 } else if (type === Number) { 5383 return toNumber(value); 5384 } else if (type === 'list') { 5385 return toList(value); 5386 } 5387 5388 return type ? type(value) : value; 5389 } 5390 5391 function normalizeData(ref, ref$1) { 5392 var data = ref.data; 5393 var el = ref.el; 5394 var args = ref$1.args; 5395 var props = ref$1.props; if ( props === void 0 ) props = {}; 5396 5397 data = isArray(data) 5398 ? !isEmpty(args) 5399 ? data.slice(0, args.length).reduce(function (data, value, index) { 5400 if (isPlainObject(value)) { 5401 assign(data, value); 5402 } else { 5403 data[args[index]] = value; 5404 } 5405 return data; 5406 }, {}) 5407 : undefined 5408 : data; 5409 5410 if (data) { 5411 for (var key in data) { 5412 if (isUndefined(data[key])) { 5413 delete data[key]; 5414 } else { 5415 data[key] = props[key] ? coerce(props[key], data[key]) : data[key]; 5416 } 5417 } 5418 } 5419 5420 return data; 5421 } 5422 } 5423 5424 function instanceAPI (UIkit) { 5425 5426 var DATA = UIkit.data; 5427 5428 UIkit.prototype.$mount = function (el) { 5429 5430 var ref = this.$options; 5431 var name = ref.name; 5432 5433 if (!el[DATA]) { 5434 el[DATA] = {}; 5435 } 5436 5437 if (el[DATA][name]) { 5438 return; 5439 } 5440 5441 el[DATA][name] = this; 5442 5443 this.$el = this.$options.el = this.$options.el || el; 5444 5445 if (within(el, document)) { 5446 this._callConnected(); 5447 } 5448 }; 5449 5450 UIkit.prototype.$reset = function () { 5451 this._callDisconnected(); 5452 this._callConnected(); 5453 }; 5454 5455 UIkit.prototype.$destroy = function (removeEl) { 5456 if ( removeEl === void 0 ) removeEl = false;
5457 5458 5459 var ref = this.$options; 5460 var el = ref.el; 5461 var name = ref.name; 5462 5463 if (el) { 5464 this._callDisconnected(); 5465 } 5466 5467 this._callHook('destroy'); 5468 5469 if (!el || !el[DATA]) { 5470 return; 5471 } 5472 5473 delete el[DATA][name]; 5474 5475 if (!isEmpty(el[DATA])) { 5476 delete el[DATA]; 5477 } 5478 5479 if (removeEl) { 5480 remove(this.$el); 5481 } 5482 }; 5483 5484 UIkit.prototype.$create = function (component, element, data) { 5485 return UIkit[component](element, data); 5486 }; 5487 5488 UIkit.prototype.$update = function (element, e) { 5489 if ( element === void 0 ) element = this.$el; 5490 5491 UIkit.update(element, e); 5492 }; 5493 5494 UIkit.prototype.$getComponent = UIkit.getComponent; 5495 5496 var names = {}; 5497 Object.defineProperties(UIkit.prototype, { 5498 5499 $container: Object.getOwnPropertyDescriptor(UIkit, 'container'), 5500 5501 $name: { 5502 5503 get: function() { 5504 var ref = this.$options; 5505 var name = ref.name; 5506 5507 if (!names[name]) { 5508 names[name] = UIkit.prefix + hyphenate(name); 5509 } 5510 5511 return names[name]; 5512 } 5513 5514 } 5515 5516 }); 5517 5518 } 5519 5520 function componentAPI (UIkit) { 5521 5522 var DATA = UIkit.data; 5523 5524 var components = {}; 5525 5526 UIkit.component = function (name, options) { 5527 5528 var id = hyphenate(name); 5529 5530 name = camelize(id); 5531 5532 if (!options) { 5533 5534 if (isPlainObject(components[name])) { 5535 components[name] = UIkit.extend(components[name]); 5536 } 5537 5538 return components[name]; 5539 5540 } 5541 5542 UIkit[name] = function (element, data) { 5543 var i = arguments.length, argsArray = Array(i); 5544 while ( i-- ) argsArray[i] = arguments[i]; 5545 5546 5547 var component = UIkit.component(name); 5548 5549 return component.options.functional 5550 ? new component({data: isPlainObject(element) ? element : [].concat( argsArray )}) 5551 : !element ? init(element) : $$(element).map(init)[0]; 5552 5553 function init(element) { 5554 5555 var instance = UIkit.getComponent(element, name); 5556 5557 if (instance) { 5558 if (!data) { 5559 return instance; 5560 } else { 5561 instance.$destroy(); 5562 } 5563 } 5564 5565 return new component({el: element, data: data}); 5566 5567 } 5568 5569 }; 5570 5571 var opt = isPlainObject(options) ? assign({}, options) : options.options; 5572 5573 opt.name = name; 5574 5575 if (opt.install) { 5576 opt.install(UIkit, opt, name); 5577 } 5578 5579 if (UIkit._initialized && !opt.functional) { 5580 fastdom.read(function () { return UIkit[name](("[uk-" + id + "],[data-uk-" + id + "]")); }); 5581 } 5582 5583 return components[name] = isPlainObject(options) ? opt : options; 5584 }; 5585 5586 UIkit.getComponents = function (element) { return element && element[DATA] || {}; }; 5587 UIkit.getComponent = function (element, name) { return UIkit.getComponents(element)[name]; }; 5588 5589 UIkit.connect = function (node) { 5590 5591 if (node[DATA]) { 5592 for (var name in node[DATA]) { 5593 node[DATA][name]._callConnected(); 5594 } 5595 } 5596 5597 for (var i = 0; i < node.attributes.length; i++) { 5598 5599 var name$1 = getComponentName(node.attributes[i].name); 5600 5601 if (name$1 && name$1 in components) { 5602 UIkit[name$1](node); 5603 } 5604 5605 } 5606 5607 }; 5608 5609 UIkit.disconnect = function (node) { 5610 for (var name in node[DATA]) { 5611 node[DATA][name]._callDisconnected(); 5612 } 5613 }; 5614 5615 } 5616 5617 function getComponentName(attribute) { 5618 return startsWith(attribute, 'uk-') || startsWith(attribute, 'data-uk-') 5619 ? camelize(attribute.replace('data-uk-', '').replace('uk-', '')) 5620 : false;
5621 } 5622 5623 var UIkit = function (options) { 5624 this._init(options); 5625 }; 5626 5627 UIkit.util = util; 5628 UIkit.data = '__uikit__'; 5629 UIkit.prefix = 'uk-'; 5630 UIkit.options = {}; 5631 UIkit.version = '3.3.2'; 5632 5633 globalAPI(UIkit); 5634 hooksAPI(UIkit); 5635 stateAPI(UIkit); 5636 componentAPI(UIkit); 5637 instanceAPI(UIkit); 5638 5639 function Core (UIkit) { 5640 5641 ready(function () { 5642 5643 UIkit.update(); 5644 on(window, 'load resize', function () { return UIkit.update(null, 'resize'); }); 5645 on(document, 'loadedmetadata load', function (ref) { 5646 var target = ref.target; 5647 5648 return UIkit.update(target, 'resize'); 5649 }, true); 5650 5651 // throttle `scroll` event (Safari triggers multiple `scroll` events per frame) 5652 var pending; 5653 on(window, 'scroll', function (e) { 5654 5655 if (pending) { 5656 return; 5657 } 5658 pending = true; 5659 fastdom.write(function () { return pending = false; }); 5660 5661 UIkit.update(null, e.type); 5662 5663 }, {passive: true, capture: true}); 5664 5665 var started = 0; 5666 on(document, 'animationstart', function (ref) { 5667 var target = ref.target; 5668 5669 if ((css(target, 'animationName') || '').match(/^uk-.*(left|right)/)) { 5670 5671 started++; 5672 css(document.body, 'overflowX', 'hidden'); 5673 setTimeout(function () { 5674 if (!--started) { 5675 css(document.body, 'overflowX', ''); 5676 } 5677 }, toMs(css(target, 'animationDuration')) + 100); 5678 } 5679 }, true); 5680 5681 var off; 5682 on(document, pointerDown, function (e) { 5683 5684 off && off(); 5685 5686 if (!isTouch(e)) { 5687 return; 5688 } 5689 5690 // Handle Swipe Gesture 5691 var pos = getEventPos(e); 5692 var target = 'tagName' in e.target ? e.target : e.target.parentNode; 5693 off = once(document, (pointerUp + " " + pointerCancel), function (e) { 5694 5695 var ref = getEventPos(e); 5696 var x = ref.x; 5697 var y = ref.y; 5698 5699 // swipe 5700 if (target && x && Math.abs(pos.x - x) > 100 || y && Math.abs(pos.y - y) > 100) { 5701 5702 setTimeout(function () { 5703 trigger(target, 'swipe'); 5704 trigger(target, ("swipe" + (swipeDirection(pos.x, pos.y, x, y)))); 5705 }); 5706 5707 } 5708 5709 }); 5710 5711 // Force click event anywhere on iOS < 13 5712 if (pointerDown === 'touchstart') { 5713 css(document.body, 'cursor', 'pointer'); 5714 once(document, (pointerUp + " " + pointerCancel), function () { return setTimeout(function () { return css(document.body, 'cursor', ''); } 5715 , 50); } 5716 ); 5717 } 5718 5719 }, {passive: true}); 5720 5721 }); 5722 5723 } 5724 5725 function swipeDirection(x1, y1, x2, y2) { 5726 return Math.abs(x1 - x2) >= Math.abs(y1 - y2) 5727 ? x1 - x2 > 0 5728 ? 'Left' 5729 : 'Right' 5730 : y1 - y2 > 0 5731 ? 'Up' 5732 : 'Down'; 5733 } 5734 5735 function boot (UIkit) { 5736 5737 var connect = UIkit.connect; 5738 var disconnect = UIkit.disconnect; 5739 5740 if (!('MutationObserver' in window)) { 5741 return; 5742 } 5743 5744 fastdom.read(init); 5745 5746 function init() { 5747 5748 if (document.body) { 5749 apply(document.body, connect); 5750 } 5751 5752 (new MutationObserver(function (mutations) { 5753 var updates = []; 5754 mutations.forEach(function (mutation) { return applyMutation(mutation, updates); }); 5755 updates.forEach(function (el) { return UIkit.update(el); }); 5756 })).observe(document, { 5757 childList: true, 5758 subtree: true, 5759 characterData: true, 5760 attributes: true 5761 }); 5762 5763 UIkit._initialized = true; 5764 } 5765 5766 function applyMutation(mutation, updates) { 5767 5768 var target = mutation.target; 5769 var type = mutation.type; 5770 5771 var update = type !== 'attributes' 5772 ? applyChildList(mutation) 5773 : applyAttribute(mutation); 5774 5775 if (update && !updates.some(function (element) { return element.contains(target); })) { 5776 updates.push(target); 5777 } 5778 5779 } 5780 5781 function applyAttribute(ref) { 5782 var target = ref.target; 5783 var attributeName = ref.attributeName; 5784 5785 5786 if (attributeName === 'href') { 5787 return true; 5788 } 5789 5790 var name = getComponentName(attributeName); 5791 5792 if (!name || !(name in UIkit)) { 5793 return; 5794 } 5795 5796 if (hasAttr(target, attributeName)) { 5797 UIkit[name](target); 5798 return true; 5799 } 5800 5801 var component = UIkit.getComponent(target, name); 5802 5803 if (component) { 5804 component.$destroy(); 5805 return true; 5806 } 5807 5808 } 5809 5810 function applyChildList(ref) { 5811 var addedNodes = ref.addedNodes; 5812 var removedNodes = ref.removedNodes; 5813 5814 5815 for (var i = 0; i < addedNodes.length; i++) { 5816 apply(addedNodes[i], connect); 5817 } 5818 5819 for (var i$1 = 0; i$1 < removedNodes.length; i$1++) { 5820 apply(removedNodes[i$1], disconnect); 5821 } 5822 5823 return true; 5824 } 5825 5826 } 5827 5828 var Class = { 5829 5830 connected: function() { 5831 !hasClass(this.$el, this.$name) && addClass(this.$el, this.$name); 5832 } 5833 5834 }; 5835 5836 var Togglable = { 5837 5838 props: { 5839 cls: Boolean, 5840 animation: 'list', 5841 duration: Number, 5842 origin: String, 5843 transition: String, 5844 queued: Boolean 5845 }, 5846 5847 data: { 5848 cls: false, 5849 animation: [false], 5850 duration: 200, 5851 origin: false, 5852 transition: 'linear', 5853 queued: false, 5854 5855 initProps: { 5856 overflow: '', 5857 height: '', 5858 paddingTop: '', 5859 paddingBottom: '', 5860 marginTop: '', 5861 marginBottom: '' 5862 }, 5863 5864 hideProps: { 5865 overflow: 'hidden', 5866 height: 0, 5867 paddingTop: 0, 5868 paddingBottom: 0, 5869 marginTop: 0, 5870 marginBottom: 0 5871 } 5872 5873 }, 5874 5875 computed: { 5876 5877 hasAnimation: function(ref) { 5878 var animation = ref.animation; 5879 5880 return !!animation[0]; 5881 }, 5882 5883 hasTransition: function(ref) { 5884 var animation = ref.animation; 5885 5886 return this.hasAnimation && animation[0] === true; 5887 } 5888 5889 }, 5890 5891 methods: { 5892 5893 toggleElement: function(targets, show, animate) { 5894 var this$1 = this; 5895 5896 return new Promise(function (resolve) { 5897 5898 targets = toNodes(targets); 5899 5900 var all = function (targets) { return Promise.all(targets.map(function (el) { return this$1._toggleElement(el, show, animate); })); }; 5901 5902 var p; 5903 5904 if (!this$1.queued || !isUndefined(animate) || !isUndefined(show) || !this$1.hasAnimation || targets.length < 2) { 5905 5906 p = all(targets); 5907 5908 } else { 5909 5910 var toggled = targets.filter(function (el) { return this$1.isToggled(el); }); 5911 var untoggled = targets.filter(function (el) { return !includes(toggled, el); }); 5912 var body = document.body; 5913 var scroll = body.scrollTop; 5914 var el = toggled[0]; 5915 var inProgress = Animation.inProgress(el) && hasClass(el, 'uk-animation-leave') 5916 || Transition.inProgress(el) && el.style.height === '0px'; 5917 5918 p = all(toggled); 5919 5920 if (!inProgress) { 5921 p = p.then(function () { 5922 var p = all(untoggled); 5923 body.scrollTop = scroll; 5924 return p; 5925 }); 5926 } 5927 5928 } 5929 5930 p.then(resolve, noop); 5931 5932 }); 5933 }, 5934 5935 toggleNow: function(targets, show) { 5936 return this.toggleElement(targets, show, false); 5937 }, 5938 5939 isToggled: function(el) { 5940 var nodes = toNodes(el || this.$el); 5941 return this.cls 5942 ? hasClass(nodes, this.cls.split(' ')[0]) 5943 : !hasAttr(nodes, 'hidden'); 5944 }, 5945 5946 updateAria: function(el) { 5947 if (this.cls === false) { 5948 attr(el, 'aria-hidden', !this.isToggled(el)); 5949 } 5950 }, 5951 5952 _toggleElement: function(el, show, animate) { 5953 var this$1 = this; 5954 5955 5956 show = isBoolean(show) 5957 ? show 5958 : Animation.inProgress(el) 5959 ? hasClass(el, 'uk-animation-leave') 5960 : Transition.inProgress(el) 5961 ? el.style.height === '0px' 5962 : !this.isToggled(el); 5963 5964 if (!trigger(el, ("before" + (show ? 'show' : 'hide')), [this])) { 5965 return Promise.reject(); 5966 } 5967 5968 var promise = ( 5969 isFunction(animate) 5970 ? animate 5971 : animate === false || !this.hasAnimation 5972 ? this._toggle 5973 : this.hasTransition 5974 ? toggleHeight(this) 5975 : toggleAnimation(this) 5976 )(el, show); 5977 5978 trigger(el, show ? 'show' : 'hide', [this]); 5979 5980 var final = function () { 5981 trigger(el, show ? 'shown' : 'hidden', [this$1]); 5982 this$1.$update(el); 5983 }; 5984 5985 return promise ? promise.then(final) : Promise.resolve(final()); 5986 }, 5987 5988 _toggle: function(el, toggled) { 5989 5990 if (!el) { 5991 return; 5992 } 5993 5994 toggled = Boolean(toggled); 5995 5996 var changed; 5997 if (this.cls) { 5998 changed = includes(this.cls, ' ') || toggled !== hasClass(el, this.cls); 5999 changed && toggleClass(el, this.cls, includes(this.cls, ' ') ? undefined : toggled); 6000 } else { 6001 changed = toggled === hasAttr(el, 'hidden'); 6002 changed && attr(el, 'hidden', !toggled ? '' : null); 6003 } 6004 6005 $$('[autofocus]', el).some(function (el) { return isVisible(el) ? el.focus() || true : el.blur(); }); 6006 6007 this.updateAria(el); 6008 changed && this.$update(el); 6009 } 6010 6011 } 6012 6013 }; 6014 6015 function toggleHeight(ref) { 6016 var isToggled = ref.isToggled; 6017 var duration = ref.duration; 6018 var initProps = ref.initProps; 6019 var hideProps = ref.hideProps; 6020 var transition = ref.transition; 6021 var _toggle = ref._toggle; 6022 6023 return function (el, show) { 6024 6025 var inProgress = Transition.inProgress(el);
6026 var inner = el.hasChildNodes ? toFloat(css(el.firstElementChild, 'marginTop')) + toFloat(css(el.lastElementChild, 'marginBottom')) : 0; 6027 var currentHeight = isVisible(el) ? height(el) + (inProgress ? 0 : inner) : 0; 6028 6029 Transition.cancel(el); 6030 6031 if (!isToggled(el)) { 6032 _toggle(el, true); 6033 } 6034 6035 height(el, ''); 6036 6037 // Update child components first 6038 fastdom.flush(); 6039 6040 var endHeight = height(el) + (inProgress ? 0 : inner); 6041 height(el, currentHeight); 6042 6043 return (show 6044 ? Transition.start(el, assign({}, initProps, {overflow: 'hidden', height: endHeight}), Math.round(duration * (1 - currentHeight / endHeight)), transition) 6045 : Transition.start(el, hideProps, Math.round(duration * (currentHeight / endHeight)), transition).then(function () { return _toggle(el, false); }) 6046 ).then(function () { return css(el, initProps); }); 6047 6048 }; 6049 } 6050 6051 function toggleAnimation(ref) { 6052 var animation = ref.animation; 6053 var duration = ref.duration; 6054 var origin = ref.origin; 6055 var _toggle = ref._toggle; 6056 6057 return function (el, show) { 6058 6059 Animation.cancel(el); 6060 6061 if (show) { 6062 _toggle(el, true); 6063 return Animation.in(el, animation[0], duration, origin); 6064 } 6065 6066 return Animation.out(el, animation[1] || animation[0], duration, origin).then(function () { return _toggle(el, false); }); 6067 }; 6068 } 6069 6070 var Accordion = { 6071 6072 mixins: [Class, Togglable], 6073 6074 props: { 6075 targets: String, 6076 active: null, 6077 collapsible: Boolean, 6078 multiple: Boolean, 6079 toggle: String, 6080 content: String, 6081 transition: String 6082 }, 6083 6084 data: { 6085 targets: '> *', 6086 active: false, 6087 animation: [true], 6088 collapsible: true, 6089 multiple: false, 6090 clsOpen: 'uk-open', 6091 toggle: '> .uk-accordion-title', 6092 content: '> .uk-accordion-content', 6093 transition: 'ease' 6094 }, 6095 6096 computed: { 6097 6098 items: { 6099 6100 get: function(ref, $el) { 6101 var targets = ref.targets; 6102 6103 return $$(targets, $el); 6104 }, 6105 6106 watch: function(items, prev) { 6107 var this$1 = this; 6108 6109 6110 items.forEach(function (el) { return this$1._toggle($(this$1.content, el), hasClass(el, this$1.clsOpen)); }); 6111 6112 if (hasClass(items, this.clsOpen)) { 6113 return; 6114 } 6115 6116 var active = !prev && this.active !== false && items[Number(this.active)] 6117 || !this.collapsible && items[0]; 6118 6119 if (active) { 6120 this.toggle(active, false); 6121 } 6122 6123 }, 6124 6125 immediate: true 6126 6127 } 6128 6129 }, 6130 6131 events: [ 6132 6133 { 6134 6135 name: 'click', 6136 6137 delegate: function() { 6138 return ((this.targets) + " " + (this.$props.toggle)); 6139 }, 6140 6141 handler: function(e) { 6142 e.preventDefault(); 6143 this.toggle(index($$(((this.targets) + " " + (this.$props.toggle)), this.$el), e.current)); 6144 } 6145 6146 } 6147 6148 ], 6149 6150 methods: { 6151 6152 toggle: function(item, animate) { 6153 var this$1 = this; 6154 6155 6156 var index = getIndex(item, this.items); 6157 var active = filter(this.items, ("." + (this.clsOpen))); 6158 6159 item = this.items[index]; 6160 6161 item && [item] 6162 .concat(!this.multiple && !includes(active, item) && active || []) 6163 .forEach(function (el) { 6164 6165 var isItem = el === item; 6166 var state = isItem && !hasClass(el, this$1.clsOpen); 6167 6168 if (!state && isItem && !this$1.collapsible && active.length < 2) { 6169 return; 6170 } 6171 6172 toggleClass(el, this$1.clsOpen, state); 6173 6174 var content = el._wrapper ? el._wrapper.firstElementChild : $(this$1.content, el); 6175 6176 if (!el._wrapper) { 6177 el._wrapper = wrapAll(content, '<div>'); 6178 attr(el._wrapper, 'hidden', state ? '' : null); 6179 } 6180 6181 this$1._toggle(content, true); 6182 this$1.toggleElement(el._wrapper, state, animate).then(function () { 6183 6184 if (hasClass(el, this$1.clsOpen) !== state) { 6185 return; 6186 } 6187 6188 if (!state) { 6189 this$1._toggle(content, false); 6190 } else { 6191 var toggle = $(this$1.$props.toggle, el); 6192 if (animate !== false && !isInView(toggle)) { 6193 scrollIntoView(toggle); 6194 } 6195 } 6196 6197 el._wrapper = null; 6198 unwrap(content); 6199 6200 }); 6201 6202 }); 6203 } 6204 6205 } 6206 6207 }; 6208 6209 var alert = { 6210 6211 mixins: [Class, Togglable], 6212 6213 args: 'animation', 6214 6215 props: { 6216 close: String 6217 }, 6218 6219 data: { 6220 animation: [true], 6221 selClose: '.uk-alert-close', 6222 duration: 150, 6223 hideProps: assign({opacity: 0}, Togglable.data.hideProps) 6224 }, 6225 6226 events: [ 6227 6228 { 6229 6230 name: 'click', 6231 6232 delegate: function() { 6233 return this.selClose; 6234 }, 6235 6236 handler: function(e) { 6237 e.preventDefault(); 6238 this.close(); 6239 } 6240 6241 } 6242 6243 ], 6244 6245 methods: { 6246 6247 close: function() { 6248 var this$1 = this; 6249 6250 this.toggleElement(this.$el).then(function () { return this$1.$destroy(true); }); 6251 } 6252 6253 } 6254 6255 }; 6256 6257 var Video = { 6258 6259 args: 'autoplay', 6260 6261 props: { 6262 automute: Boolean, 6263 autoplay: Boolean 6264 }, 6265 6266 data: { 6267 automute: false, 6268 autoplay: true 6269 }, 6270 6271 computed: { 6272 6273 inView: function(ref) { 6274 var autoplay = ref.autoplay; 6275 6276 return autoplay === 'inview'; 6277 } 6278 6279 }, 6280 6281 connected: function() { 6282 6283 if (this.inView && !hasAttr(this.$el, 'preload')) { 6284 this.$el.preload = 'none'; 6285 } 6286 6287 this.player = new Player(this.$el); 6288 6289 if (this.automute) { 6290 this.player.mute(); 6291 } 6292 6293 }, 6294 6295 update: { 6296 6297 read: function() { 6298 6299 return !this.player 6300 ? false 6301 : { 6302 visible: isVisible(this.$el) && css(this.$el, 'visibility') !== 'hidden', 6303 inView: this.inView && isInView(this.$el) 6304 }; 6305 }, 6306 6307 write: function(ref) { 6308 var visible = ref.visible; 6309 var inView = ref.inView; 6310 6311 6312 if (!visible || this.inView && !inView) { 6313 this.player.pause(); 6314 } else if (this.autoplay === true || this.inView && inView) { 6315 this.player.play(); 6316 } 6317 6318 }, 6319 6320 events: ['resize', 'scroll'] 6321 6322 } 6323 6324 }; 6325 6326 var cover = { 6327 6328 mixins: [Class, Video], 6329 6330 props: { 6331 width: Number, 6332 height: Number 6333 }, 6334 6335 data: { 6336 automute: true 6337 }, 6338 6339 update: { 6340 6341 read: function() { 6342 6343 var el = this.$el; 6344 var ref = getPositionedParent(el) || el.parentNode; 6345 var height = ref.offsetHeight; 6346 var width = ref.offsetWidth; 6347 var dim = Dimensions.cover( 6348 {
6349 width: this.width || el.naturalWidth || el.videoWidth || el.clientWidth, 6350 height: this.height || el.naturalHeight || el.videoHeight || el.clientHeight 6351 }, 6352 { 6353 width: width + (width % 2 ? 1 : 0), 6354 height: height + (height % 2 ? 1 : 0) 6355 } 6356 ); 6357 6358 if (!dim.width || !dim.height) { 6359 return false; 6360 } 6361 6362 return dim; 6363 }, 6364 6365 write: function(ref) { 6366 var height = ref.height; 6367 var width = ref.width; 6368 6369 css(this.$el, {height: height, width: width}); 6370 }, 6371 6372 events: ['resize'] 6373 6374 } 6375 6376 }; 6377 6378 function getPositionedParent(el) { 6379 while ((el = parent(el))) { 6380 if (css(el, 'position') !== 'static') { 6381 return el; 6382 } 6383 } 6384 } 6385 6386 var Position = { 6387 6388 props: { 6389 pos: String, 6390 offset: null, 6391 flip: Boolean, 6392 clsPos: String 6393 }, 6394 6395 data: { 6396 pos: ("bottom-" + (!isRtl ? 'left' : 'right')), 6397 flip: true, 6398 offset: false, 6399 clsPos: '' 6400 }, 6401 6402 computed: { 6403 6404 pos: function(ref) { 6405 var pos = ref.pos; 6406 6407 return (pos + (!includes(pos, '-') ? '-center' : '')).split('-'); 6408 }, 6409 6410 dir: function() { 6411 return this.pos[0]; 6412 }, 6413 6414 align: function() { 6415 return this.pos[1]; 6416 } 6417 6418 }, 6419 6420 methods: { 6421 6422 positionAt: function(element, target, boundary) { 6423 6424 removeClasses(element, ((this.clsPos) + "-(top|bottom|left|right)(-[a-z]+)?")); 6425 css(element, {top: '', left: ''}); 6426 6427 var node; 6428 var ref = this; 6429 var offset$1 = ref.offset; 6430 var axis = this.getAxis(); 6431 6432 if (!isNumeric(offset$1)) { 6433 node = $(offset$1); 6434 offset$1 = node 6435 ? offset(node)[axis === 'x' ? 'left' : 'top'] - offset(target)[axis === 'x' ? 'right' : 'bottom'] 6436 : 0; 6437 } 6438 6439 var ref$1 = positionAt( 6440 element, 6441 target, 6442 axis === 'x' ? ((flipPosition(this.dir)) + " " + (this.align)) : ((this.align) + " " + (flipPosition(this.dir))), 6443 axis === 'x' ? ((this.dir) + " " + (this.align)) : ((this.align) + " " + (this.dir)), 6444 axis === 'x' ? ("" + (this.dir === 'left' ? -offset$1 : offset$1)) : (" " + (this.dir === 'top' ? -offset$1 : offset$1)), 6445 null, 6446 this.flip, 6447 boundary 6448 ).target; 6449 var x = ref$1.x; 6450 var y = ref$1.y; 6451 6452 this.dir = axis === 'x' ? x : y; 6453 this.align = axis === 'x' ? y : x; 6454 6455 toggleClass(element, ((this.clsPos) + "-" + (this.dir) + "-" + (this.align)), this.offset === false); 6456 6457 }, 6458 6459 getAxis: function() { 6460 return this.dir === 'top' || this.dir === 'bottom' ? 'y' : 'x'; 6461 } 6462 6463 } 6464 6465 }; 6466 6467 var active; 6468 6469 var Drop = { 6470 6471 mixins: [Position, Togglable], 6472 6473 args: 'pos', 6474 6475 props: { 6476 mode: 'list', 6477 toggle: Boolean, 6478 boundary: Boolean, 6479 boundaryAlign: Boolean, 6480 delayShow: Number, 6481 delayHide: Number, 6482 clsDrop: String 6483 }, 6484 6485 data: { 6486 mode: ['click', 'hover'], 6487 toggle: '- *', 6488 boundary: window, 6489 boundaryAlign: false, 6490 delayShow: 0, 6491 delayHide: 800, 6492 clsDrop: false, 6493 animation: ['uk-animation-fade'], 6494 cls: 'uk-open' 6495 }, 6496 6497 computed: { 6498 6499 boundary: function(ref, $el) { 6500 var boundary = ref.boundary; 6501 6502 return query(boundary, $el); 6503 }, 6504 6505 clsDrop: function(ref) { 6506 var clsDrop = ref.clsDrop; 6507 6508 return clsDrop || ("uk-" + (this.$options.name)); 6509 }, 6510 6511 clsPos: function() { 6512 return this.clsDrop; 6513 } 6514 6515 }, 6516 6517 created: function() { 6518 this.tracker = new MouseTracker(); 6519 }, 6520 6521 connected: function() { 6522 6523 addClass(this.$el, this.clsDrop); 6524 6525 var ref = this.$props; 6526 var toggle = ref.toggle; 6527 this.toggle = toggle && this.$create('toggle', query(toggle, this.$el), { 6528 target: this.$el, 6529 mode: this.mode 6530 }); 6531 6532 !this.toggle && trigger(this.$el, 'updatearia'); 6533 6534 }, 6535 6536 disconnected: function() { 6537 if (this.isActive()) { 6538 active = null; 6539 } 6540 }, 6541 6542 events: [ 6543 6544 { 6545 6546 name: 'click', 6547 6548 delegate: function() { 6549 return ("." + (this.clsDrop) + "-close"); 6550 }, 6551 6552 handler: function(e) { 6553 e.preventDefault(); 6554 this.hide(false); 6555 } 6556 6557 }, 6558 6559 { 6560 6561 name: 'click', 6562 6563 delegate: function() { 6564 return 'a[href^="#"]'; 6565 }, 6566 6567 handler: function(ref) { 6568 var defaultPrevented = ref.defaultPrevented; 6569 var hash = ref.current.hash; 6570 6571 if (!defaultPrevented && hash && !within(hash, this.$el)) { 6572 this.hide(false); 6573 } 6574 } 6575 6576 }, 6577 6578 { 6579 6580 name: 'beforescroll', 6581 6582 handler: function() { 6583 this.hide(false); 6584 } 6585 6586 }, 6587 6588 { 6589 6590 name: 'toggle', 6591 6592 self: true, 6593 6594 handler: function(e, toggle) { 6595 6596 e.preventDefault(); 6597 6598 if (this.isToggled()) { 6599 this.hide(false); 6600 } else { 6601 this.show(toggle, false); 6602 } 6603 } 6604 6605 }, 6606 6607 { 6608 6609 name: 'toggleshow', 6610 6611 self: true, 6612 6613 handler: function(e, toggle) { 6614 e.preventDefault(); 6615 this.show(toggle); 6616 } 6617 6618 }, 6619 6620 { 6621 6622 name: 'togglehide', 6623 6624 self: true, 6625 6626 handler: function(e) { 6627 e.preventDefault(); 6628 this.hide(); 6629 } 6630 6631 }, 6632 6633 { 6634 6635 name: pointerEnter, 6636 6637 filter: function() { 6638 return includes(this.mode, 'hover'); 6639 }, 6640 6641 handler: function(e) { 6642 if (!isTouch(e)) { 6643 this.clearTimers(); 6644 } 6645 } 6646 6647 }, 6648 6649 { 6650 6651 name: pointerLeave, 6652 6653 filter: function() { 6654 return includes(this.mode, 'hover'); 6655 }, 6656 6657 handler: function(e) { 6658 if (!isTouch(e) && !matches(this.$el, ':hover')) { 6659 this.hide(); 6660 } 6661 } 6662 6663 }, 6664 6665 { 6666 6667 name: 'beforeshow', 6668 6669 self: true, 6670 6671 handler: function() { 6672 this.clearTimers(); 6673 Animation.cancel(this.$el); 6674 this.position(); 6675 } 6676 6677 }, 6678 6679 { 6680 6681 name: 'show', 6682 6683 self: true, 6684 6685 handler: function() { 6686 var this$1 = this; 6687 6688 6689 active = this; 6690 6691 this.tracker.init(); 6692 trigger(this.$el, 'updatearia'); 6693 6694 // If triggered from an click event handler, delay adding the click handler 6695 var off = delayOn(document, 'click', function (ref) { 6696 var defaultPrevented = ref.defaultPrevented; 6697 var target = ref.target; 6698 6699 if (!defaultPrevented && !within(target, this$1.$el) && !(this$1.toggle && within(target, this$1.toggle.$el))) { 6700 this$1.hide(false); 6701 } 6702 }); 6703 6704 once(this.$el, 'hide', off, {self: true}); 6705 } 6706 6707 }, 6708 6709 { 6710 6711 name: 'beforehide', 6712 6713 self: true, 6714 6715 handler: function() { 6716 this.clearTimers(); 6717 } 6718 6719 }, 6720 6721 { 6722 6723 name: 'hide', 6724 6725 handler: function(ref) { 6726 var target = ref.target; 6727 6728 6729 if (this.$el !== target) { 6730 active = active === null && within(target, this.$el) && this.isToggled() ? this
6730: active; 6731 return; 6732 } 6733 6734 active = this.isActive() ? null : active; 6735 trigger(this.$el, 'updatearia'); 6736 this.tracker.cancel(); 6737 } 6738 6739 }, 6740 6741 { 6742 6743 name: 'updatearia', 6744 6745 self: true, 6746 6747 handler: function(e, toggle) { 6748 6749 e.preventDefault(); 6750 6751 this.updateAria(this.$el); 6752 6753 if (toggle || this.toggle) { 6754 attr((toggle || this.toggle).$el, 'aria-expanded', this.isToggled()); 6755 toggleClass(this.toggle.$el, this.cls, this.isToggled()); 6756 } 6757 } 6758 } 6759 6760 ], 6761 6762 update: { 6763 6764 write: function() { 6765 6766 if (this.isToggled() && !Animation.inProgress(this.$el)) { 6767 this.position(); 6768 } 6769 6770 }, 6771 6772 events: ['resize'] 6773 6774 }, 6775 6776 methods: { 6777 6778 show: function(toggle, delay) { 6779 var this$1 = this; 6780 if ( toggle === void 0 ) toggle = this.toggle; 6781 if ( delay === void 0 ) delay = true; 6782 6783 6784 if (this.isToggled() && toggle && this.toggle && toggle.$el !== this.toggle.$el) { 6785 this.hide(false); 6786 } 6787 6788 this.toggle = toggle; 6789 6790 this.clearTimers(); 6791 6792 if (this.isActive()) { 6793 return; 6794 } 6795 6796 if (active) { 6797 6798 if (delay && active.isDelaying) { 6799 this.showTimer = setTimeout(this.show, 10); 6800 return; 6801 } 6802 6803 while (active && !within(this.$el, active.$el)) { 6804 active.hide(false); 6805 } 6806 } 6807 6808 this.showTimer = setTimeout(function () { return !this$1.isToggled() && this$1.toggleElement(this$1.$el, true); }, delay && this.delayShow || 0); 6809 6810 }, 6811 6812 hide: function(delay) { 6813 var this$1 = this; 6814 if ( delay === void 0 ) delay = true; 6815 6816 6817 var hide = function () { return this$1.toggleNow(this$1.$el, false); }; 6818 6819 this.clearTimers(); 6820 6821 this.isDelaying = getPositionedElements(this.$el).some(function (el) { return this$1.tracker.movesTo(el); }); 6822 6823 if (delay && this.isDelaying) { 6824 this.hideTimer = setTimeout(this.hide, 50); 6825 } else if (delay && this.delayHide) { 6826 this.hideTimer = setTimeout(hide, this.delayHide); 6827 } else { 6828 hide(); 6829 } 6830 }, 6831 6832 clearTimers: function() { 6833 clearTimeout(this.showTimer); 6834 clearTimeout(this.hideTimer); 6835 this.showTimer = null; 6836 this.hideTimer = null; 6837 this.isDelaying = false; 6838 }, 6839 6840 isActive: function() { 6841 return active === this; 6842 }, 6843 6844 position: function() { 6845 6846 removeClasses(this.$el, ((this.clsDrop) + "-(stack|boundary)")); 6847 css(this.$el, {top: '', left: '', display: 'block'}); 6848 toggleClass(this.$el, ((this.clsDrop) + "-boundary"), this.boundaryAlign); 6849 6850 var boundary = offset(this.boundary); 6851 var alignTo = this.boundaryAlign ? boundary : offset(this.toggle.$el); 6852 6853 if (this.align === 'justify') { 6854 var prop = this.getAxis() === 'y' ? 'width' : 'height'; 6855 css(this.$el, prop, alignTo[prop]); 6856 } else if (this.$el.offsetWidth > Math.max(boundary.right - alignTo.left, alignTo.right - boundary.left)) { 6857 addClass(this.$el, ((this.clsDrop) + "-stack")); 6858 } 6859 6860 this.positionAt(this.$el, this.boundaryAlign ? this.boundary : this.toggle.$el, this.boundary); 6861 6862 css(this.$el, 'display', ''); 6863 6864 } 6865 6866 } 6867 6868 }; 6869 6870 function getPositionedElements(el) { 6871 var result = []; 6872 apply(el, function (el) { return css(el, 'position') !== 'static' && result.push(el); }); 6873 return result; 6874 } 6875 6876 function delayOn(el, type, fn) { 6877 var off = once(el, type, function () { return off = on(el, type, fn); } 6878 , true); 6879 return function () { return off(); }; 6880 } 6881 6882 var dropdown = { 6883 6884 extends: Drop 6885 6886 }; 6887 6888 var formCustom = { 6889 6890 mixins: [Class], 6891 6892 args: 'target', 6893 6894 props: { 6895 target: Boolean 6896 }, 6897 6898 data: { 6899 target: false 6900 }, 6901 6902 computed: { 6903 6904 input: function(_, $el) { 6905 return $(selInput, $el); 6906 }, 6907 6908 state: function() { 6909 return this.input.nextElementSibling; 6910 }, 6911 6912 target: function(ref, $el) { 6913 var target = ref.target; 6914 6915 return target && (target === true 6916 && this.input.parentNode === $el 6917 && this.input.nextElementSibling 6918 || query(target, $el)); 6919 } 6920 6921 }, 6922 6923 update: function() { 6924 6925 var ref = this; 6926 var target = ref.target; 6927 var input = ref.input; 6928 6929 if (!target) { 6930 return; 6931 } 6932 6933 var option; 6934 var prop = isInput(target) ? 'value' : 'textContent'; 6935 var prev = target[prop]; 6936 var value = input.files && input.files[0] 6937 ? input.files[0].name 6938 : matches(input, 'select') && (option = $$('option', input).filter(function (el) { return el.selected; })[0]) // eslint-disable-line prefer-destructuring 6939 ? option.textContent 6940 : input.value; 6941 6942 if (prev !== value) { 6943 target[prop] = value; 6944 } 6945 6946 }, 6947 6948 events: [ 6949 6950 { 6951 name: 'change', 6952 6953 handler: function() {
6954 this.$update(); 6955 } 6956 }, 6957 6958 { 6959 name: 'reset', 6960 6961 el: function() { 6962 return closest(this.$el, 'form'); 6963 }, 6964 6965 handler: function() { 6966 this.$update(); 6967 } 6968 } 6969 6970 ] 6971 6972 }; 6973 6974 // Deprecated 6975 var gif = { 6976 6977 update: { 6978 6979 read: function(data) { 6980 6981 var inview = isInView(this.$el); 6982 6983 if (!inview || data.isInView === inview) { 6984 return false; 6985 } 6986 6987 data.isInView = inview; 6988 }, 6989 6990 write: function() { 6991 this.$el.src = this.$el.src; 6992 }, 6993 6994 events: ['scroll', 'resize'] 6995 } 6996 6997 }; 6998 6999 var Margin = { 7000 7001 props: { 7002 margin: String, 7003 firstColumn: Boolean 7004 }, 7005 7006 data: { 7007 margin: 'uk-margin-small-top', 7008 firstColumn: 'uk-first-column' 7009 }, 7010 7011 update: { 7012 7013 read: function(data) { 7014 7015 var items = this.$el.children; 7016 var rows = [[]]; 7017 7018 if (!items.length || !isVisible(this.$el)) { 7019 return data.rows = rows; 7020 } 7021 7022 data.rows = getRows(items); 7023 data.stacks = !data.rows.some(function (row) { return row.length > 1; }); 7024 7025 }, 7026 7027 write: function(ref) { 7028 var this$1 = this; 7029 var rows = ref.rows; 7030 7031 7032 rows.forEach(function (row, i) { return row.forEach(function (el, j) { 7033 toggleClass(el, this$1.margin, i !== 0); 7034 toggleClass(el, this$1.firstColumn, j === 0); 7035 }); } 7036 ); 7037 7038 }, 7039 7040 events: ['resize'] 7041 7042 } 7043 7044 }; 7045 7046 function getRows(items) { 7047 var rows = [[]]; 7048 7049 for (var i = 0; i < items.length; i++) { 7050 7051 var el = items[i]; 7052 var dim = getOffset(el); 7053 7054 if (!dim.height) { 7055 continue; 7056 } 7057 7058 for (var j = rows.length - 1; j >= 0; j--) { 7059 7060 var row = rows[j]; 7061 7062 if (!row[0]) { 7063 row.push(el); 7064 break; 7065 } 7066 7067 var leftDim = (void 0); 7068 if (row[0].offsetParent === el.offsetParent) { 7069 leftDim = getOffset(row[0]); 7070 } else { 7071 dim = getOffset(el, true); 7072 leftDim = getOffset(row[0], true); 7073 } 7074 7075 if (dim.top >= leftDim.bottom - 1 && dim.top !== leftDim.top) { 7076 rows.push([el]); 7077 break; 7078 } 7079 7080 if (dim.bottom > leftDim.top) { 7081 7082 if (dim.left < leftDim.left && !isRtl) { 7083 row.unshift(el); 7084 break; 7085 } 7086 7087 row.push(el); 7088 break; 7089 } 7090 7091 if (j === 0) { 7092 rows.unshift([el]); 7093 break; 7094 } 7095 7096 } 7097 7098 } 7099 7100 return rows; 7101 7102 } 7103 7104 function getOffset(element, offset) { 7105 var assign; 7106 7107 if ( offset === void 0 ) offset = false; 7108 7109 var offsetTop = element.offsetTop; 7110 var offsetLeft = element.offsetLeft; 7111 var offsetHeight = element.offsetHeight; 7112 7113 if (offset) { 7114 (assign = offsetPosition(element), offsetTop = assign[0], offsetLeft = assign[1]); 7115 } 7116 7117 return { 7118 top: offsetTop, 7119 left: offsetLeft, 7120 height: offsetHeight, 7121 bottom: offsetTop + offsetHeight 7122 }; 7123 } 7124 7125 var grid = { 7126 7127 extends: Margin, 7128 7129 mixins: [Class], 7130 7131 name: 'grid', 7132 7133 props: { 7134 masonry: Boolean, 7135 parallax: Number 7136 }, 7137 7138 data: { 7139 margin: 'uk-grid-margin', 7140 clsStack: 'uk-grid-stack', 7141 masonry: false, 7142 parallax: 0 7143 }, 7144 7145 computed: { 7146 7147 length: function(_, $el) { 7148 return $el.children.length; 7149 }, 7150 7151 parallax: function(ref) { 7152 var parallax = ref.parallax; 7153 7154 return parallax && this.length ? Math.abs(parallax) : ''; 7155 } 7156 7157 }, 7158 7159 connected: function() { 7160 this.masonry && addClass(this.$el, 'uk-flex-top uk-flex-wrap-top'); 7161 }, 7162 7163 update: [ 7164 7165 { 7166 7167 write: function(ref) { 7168 var stacks = ref.stacks; 7169 7170 toggleClass(this.$el, this.clsStack, stacks); 7171 }, 7172 7173 events: ['resize'] 7174 7175 }, 7176 7177 { 7178 7179 read: function(ref) { 7180 var rows = ref.rows; 7181 7182 7183 if (this.masonry || this.parallax) { 7184 rows = rows.map(function (elements) { return sortBy(elements, 'offsetLeft'); }); 7185 7186 if (isRtl) { 7187 rows.map(function (row) { return row.reverse(); }); 7188 } 7189 7190 } else { 7191 return false;
7192 } 7193 7194 var transitionInProgress = rows.some(function (elements) { return elements.some(Transition.inProgress); }); 7195 var translates = false; 7196 var elHeight = ''; 7197 7198 if (this.masonry && this.length) { 7199 7200 var height = 0; 7201 7202 translates = rows.reduce(function (translates, row, i) { 7203 7204 translates[i] = row.map(function (_, j) { return i === 0 ? 0 : toFloat(translates[i - 1][j]) + (height - toFloat(rows[i - 1][j] && rows[i - 1][j].offsetHeight)); }); 7205 height = row.reduce(function (height, el) { return Math.max(height, el.offsetHeight); }, 0); 7206 7207 return translates; 7208 7209 }, []); 7210 7211 elHeight = maxColumnHeight(rows) + getMarginTop(this.$el, this.margin) * (rows.length - 1); 7212 7213 } 7214 7215 var padding = this.parallax && getPaddingBottom(this.parallax, rows, translates); 7216 7217 return {padding: padding, rows: rows, translates: translates, height: !transitionInProgress ? elHeight : false}; 7218 7219 }, 7220 7221 write: function(ref) { 7222 var stacks = ref.stacks; 7223 var height = ref.height; 7224 var padding = ref.padding; 7225 7226 7227 toggleClass(this.$el, this.clsStack, stacks); 7228 7229 css(this.$el, 'paddingBottom', padding); 7230 height !== false && css(this.$el, 'height', height); 7231 7232 }, 7233 7234 events: ['resize'] 7235 7236 }, 7237 7238 { 7239 7240 read: function(ref) { 7241 var height$1 = ref.height; 7242 7243 return { 7244 scrolled: this.parallax 7245 ? scrolledOver(this.$el, height$1 ? height$1 - height(this.$el) : 0) * this.parallax 7246 : false 7247 }; 7248 }, 7249 7250 write: function(ref) { 7251 var rows = ref.rows; 7252 var scrolled = ref.scrolled; 7253 var translates = ref.translates; 7254 7255 7256 if (scrolled === false && !translates) { 7257 return; 7258 } 7259 7260 rows.forEach(function (row, i) { return row.forEach(function (el, j) { return css(el, 'transform', !scrolled && !translates ? '' : ("translateY(" + ((translates && -translates[i][j]) + (scrolled ? j % 2 ? scrolled : scrolled / 8 : 0)) + "px)")); } 7261 ); } 7262 ); 7263 7264 }, 7265 7266 events: ['scroll', 'resize'] 7267 7268 } 7269 7270 ] 7271 7272 }; 7273 7274 function getPaddingBottom(distance, rows, translates) { 7275 var column = 0; 7276 var max = 0; 7277 var maxScrolled = 0; 7278 for (var i = rows.length - 1; i >= 0; i--) { 7279 for (var j = column; j < rows[i].length; j++) { 7280 var el = rows[i][j]; 7281 var bottom = el.offsetTop + height(el) + (translates && -translates[i][j]); 7282 max = Math.max(max, bottom); 7283 maxScrolled = Math.max(maxScrolled, bottom + (j % 2 ? distance : distance / 8)); 7284 column++; 7285 } 7286 } 7287 return maxScrolled - max; 7288 } 7289 7290 function getMarginTop(root, cls) { 7291 7292 var nodes = children(root); 7293 var ref = nodes.filter(function (el) { return hasClass(el, cls); }); 7294 var node = ref[0]; 7295 7296 return toFloat(node 7297 ? css(node, 'marginTop') 7298 : css(nodes[0], 'paddingLeft')); 7299 } 7300 7301 function maxColumnHeight(rows) { 7302 return Math.max.apply(Math, rows.reduce(function (sum, row) { 7303 row.forEach(function (el, i) { return sum[i] = (sum[i] || 0) + el.offsetHeight; }); 7304 return sum; 7305 }, [])); 7306 } 7307 7308 // IE 11 fix (min-height on a flex container won't apply to its flex items) 7309 var FlexBug = isIE ? { 7310 7311 props: { 7312 selMinHeight: String 7313 }, 7314 7315 data: { 7316 selMinHeight: false, 7317 forceHeight: false 7318 }, 7319 7320 computed: { 7321 7322 elements: function(ref, $el) { 7323 var selMinHeight = ref.selMinHeight; 7324 7325 return selMinHeight ? $$(selMinHeight, $el) : [$el]; 7326 } 7327 7328 }, 7329 7330 update: [ 7331 7332 { 7333 7334 read: function() { 7335 css(this.elements, 'height', ''); 7336 }, 7337 7338 order: -5, 7339 7340 events: ['resize'] 7341 7342 }, 7343 7344 { 7345 7346 write: function() { 7347 var this$1 = this; 7348
7349 this.elements.forEach(function (el) { 7350 var height = toFloat(css(el, 'minHeight')); 7351 if (height && (this$1.forceHeight || Math.round(height + boxModelAdjust(el, 'height', 'content-box')) >= el.offsetHeight)) { 7352 css(el, 'height', height); 7353 } 7354 }); 7355 }, 7356 7357 order: 5, 7358 7359 events: ['resize'] 7360 7361 } 7362 7363 ] 7364 7365 } : {}; 7366 7367 var heightMatch = { 7368 7369 mixins: [FlexBug], 7370 7371 args: 'target', 7372 7373 props: { 7374 target: String, 7375 row: Boolean 7376 }, 7377 7378 data: { 7379 target: '> *', 7380 row: true, 7381 forceHeight: true 7382 }, 7383 7384 computed: { 7385 7386 elements: function(ref, $el) { 7387 var target = ref.target; 7388 7389 return $$(target, $el); 7390 } 7391 7392 }, 7393 7394 update: { 7395 7396 read: function() { 7397 return { 7398 rows: (this.row ? getRows(this.elements) : [this.elements]).map(match) 7399 }; 7400 }, 7401 7402 write: function(ref) { 7403 var rows = ref.rows; 7404 7405 rows.forEach(function (ref) { 7406 var heights = ref.heights; 7407 var elements = ref.elements; 7408 7409 return elements.forEach(function (el, i) { return css(el, 'minHeight', heights[i]); } 7410 ); 7411 } 7412 ); 7413 }, 7414 7415 events: ['resize'] 7416 7417 } 7418 7419 }; 7420 7421 function match(elements) { 7422 var assign; 7423 7424 7425 if (elements.length < 2) { 7426 return {heights: [''], elements: elements}; 7427 } 7428 7429 var ref = getHeights(elements); 7430 var heights = ref.heights; 7431 var max = ref.max; 7432 var hasMinHeight = elements.some(function (el) { return el.style.minHeight; }); 7433 var hasShrunk = elements.some(function (el, i) { return !el.style.minHeight && heights[i] < max; }); 7434 7435 if (hasMinHeight && hasShrunk) { 7436 css(elements, 'minHeight', ''); 7437 ((assign = getHeights(elements), heights = assign.heights, max = assign.max)); 7438 } 7439 7440 heights = elements.map(function (el, i) { return heights[i] === max && toFloat(el.style.minHeight).toFixed(2) !== max.toFixed(2) ? '' : max; } 7441 ); 7442 7443 return {heights: heights, elements: elements}; 7444 } 7445 7446 function getHeights(elements) { 7447 var heights = elements.map(function (el) { return offset(el).height - boxModelAdjust(el, 'height', 'content-box'); }); 7448 var max = Math.max.apply(null, heights); 7449 7450 return {heights: heights, max: max}; 7451 } 7452 7453 var heightViewport = { 7454 7455 mixins: [FlexBug], 7456 7457 props: { 7458 expand: Boolean, 7459 offsetTop: Boolean, 7460 offsetBottom: Boolean, 7461 minHeight: Number 7462 }, 7463 7464 data: { 7465 expand: false, 7466 offsetTop: false, 7467 offsetBottom: false, 7468 minHeight: 0 7469 }, 7470 7471 update: { 7472 7473 read: function(ref) { 7474 var prev = ref.minHeight; 7475 7476 7477 if (!isVisible(this.$el)) { 7478 return false; 7479 } 7480 7481 var minHeight = ''; 7482 var box = boxModelAdjust(this.$el, 'height', 'content-box'); 7483 7484 if (this.expand) { 7485 7486 this.$el.dataset.heightExpand = ''; 7487 7488 if ($('[data-height-expand]') !== this.$el) { 7489 return false; 7490 } 7491 7492 minHeight = height(window) - (offsetHeight(document.documentElement) - offsetHeight(this.$el)) - box || ''; 7493 7494 } else { 7495 7496 // on mobile devices (iOS and Android) window.innerHeight !== 100vh 7497 minHeight = 'calc(100vh'; 7498 7499 if (this.offsetTop) { 7500 7501 var ref$1 = offset(this.$el); 7502 var top = ref$1.top; 7503 minHeight += top > 0 && top < height(window) / 2 ? (" - " + top + "px") : ''; 7504 7505 } 7506 7507 if (this.offsetBottom === true) { 7508 7509 minHeight += " - " + (offsetHeight(this.$el.nextElementSibling)) + "px"; 7510 7511 } else if (isNumeric(this.offsetBottom)) { 7512 7513 minHeight += " - " + (this.offsetBottom) + "vh"; 7514 7515 } else if (this.offsetBottom && endsWith(this.offsetBottom, 'px')) { 7516 7517 minHeight += " - " + (toFloat(this.offsetBottom)) + "px"; 7518 7519 } else if (isString(this.offsetBottom)) { 7520 7521 minHeight += " - " + (offsetHeight(query(this.offsetBottom, this.$el))) + "px"; 7522 7523 } 7524 7525 minHeight += (box ? (" - " + box + "px") : '') + ")"; 7526 7527 } 7528 7529 return {minHeight: minHeight, prev: prev}; 7530 }, 7531 7532 write: function(ref) { 7533 var minHeight = ref.minHeight; 7534 var prev = ref.prev; 7535 7536 7537 css(this.$el, {minHeight: minHeight}); 7538 7539 if (minHeight !== prev) { 7540 this.$update(this.$el, 'resize'); 7541 } 7542
7543 if (this.minHeight && toFloat(css(this.$el, 'minHeight')) < this.minHeight) { 7544 css(this.$el, 'minHeight', this.minHeight); 7545 } 7546 7547 }, 7548 7549 events: ['resize'] 7550 7551 } 7552 7553 }; 7554 7555 function offsetHeight(el) { 7556 return el && offset(el).height || 0; 7557 } 7558 7559 var SVG = { 7560 7561 args: 'src', 7562 7563 props: { 7564 id: Boolean, 7565 icon: String, 7566 src: String, 7567 style: String, 7568 width: Number, 7569 height: Number, 7570 ratio: Number, 7571 class: String, 7572 strokeAnimation: Boolean, 7573 focusable: Boolean, // IE 11 7574 attributes: 'list' 7575 }, 7576 7577 data: { 7578 ratio: 1, 7579 include: ['style', 'class', 'focusable'], 7580 class: '', 7581 strokeAnimation: false 7582 }, 7583 7584 beforeConnect: function() { 7585 var this$1 = this; 7586 var assign; 7587 7588 7589 this.class += ' uk-svg'; 7590 7591 if (!this.icon && includes(this.src, '#')) { 7592 7593 var parts = this.src.split('#'); 7594 7595 if (parts.length > 1) { 7596 (assign = parts, this.src = assign[0], this.icon = assign[1]); 7597 } 7598 } 7599 7600 this.svg = this.getSvg().then(function (el) { 7601 this$1.applyAttributes(el); 7602 return this$1.svgEl = insertSVG(el, this$1.$el); 7603 }, noop); 7604 7605 }, 7606 7607 disconnected: function() { 7608 var this$1 = this; 7609 7610 7611 if (isVoidElement(this.$el)) { 7612 attr(this.$el, 'hidden', null); 7613 } 7614 7615 if (this.svg) { 7616 this.svg.then(function (svg) { return (!this$1._connected || svg !== this$1.svgEl) && remove(svg); }, noop); 7617 } 7618 7619 this.svg = this.svgEl = null; 7620 7621 }, 7622 7623 update: { 7624 7625 read: function() { 7626 return !!(this.strokeAnimation && this.svgEl && isVisible(this.svgEl)); 7627 }, 7628 7629 write: function() { 7630 applyAnimation(this.svgEl); 7631 }, 7632 7633 type: ['resize'] 7634 7635 }, 7636 7637 methods: { 7638 7639 getSvg: function() { 7640 var this$1 = this; 7641 7642 return loadSVG(this.src).then(function (svg) { return parseSVG(svg, this$1.icon) || Promise.reject('SVG not found.'); } 7643 ); 7644 }, 7645 7646 applyAttributes: function(el) { 7647 var this$1 = this; 7648 7649 7650 for (var prop in this.$options.props) { 7651 if (this[prop] && includes(this.include, prop)) { 7652 attr(el, prop, this[prop]); 7653 } 7654 } 7655 7656 for (var attribute in this.attributes) { 7657 var ref = this.attributes[attribute].split(':', 2); 7658 var prop$1 = ref[0]; 7659 var value = ref[1]; 7660 attr(el, prop$1, value); 7661 } 7662 7663 if (!this.id) { 7664 removeAttr(el, 'id'); 7665 } 7666 7667 var props = ['width', 'height']; 7668 var dimensions = [this.width, this.height]; 7669 7670 if (!dimensions.some(function (val) { return val; })) { 7671 dimensions = props.map(function (prop) { return attr(el, prop); }); 7672 } 7673 7674 var viewBox = attr(el, 'viewBox'); 7675 if (viewBox && !dimensions.some(function (val) { return val; })) { 7676 dimensions = viewBox.split(' ').slice(2); 7677 } 7678 7679 dimensions.forEach(function (val, i) { 7680 val = (val | 0) * this$1.ratio; 7681 val && attr(el, props[i], val); 7682 7683 if (val && !dimensions[i ^ 1]) { 7684 removeAttr(el, props[i ^ 1]); 7685 } 7686 }); 7687
7688 attr(el, 'data-svg', this.icon || this.src); 7689 7690 } 7691 7692 } 7693 7694 }; 7695 7696 var svgs = {}; 7697 7698 function loadSVG(src) { 7699 7700 if (svgs[src]) { 7701 return svgs[src]; 7702 } 7703 7704 return svgs[src] = new Promise(function (resolve, reject) { 7705 7706 if (!src) { 7707 reject(); 7708 return; 7709 } 7710 7711 if (startsWith(src, 'data:')) { 7712 resolve(decodeURIComponent(src.split(',')[1])); 7713 } else { 7714 7715 ajax(src).then( 7716 function (xhr) { return resolve(xhr.response); }, 7717 function () { return reject('SVG not found.'); } 7718 ); 7719 7720 } 7721 7722 }); 7723 } 7724 7725 function parseSVG(svg, icon) { 7726 7727 if (icon && includes(svg, '<symbol')) { 7728 svg = parseSymbols(svg, icon) || svg; 7729 } 7730 7731 svg = $(svg.substr(svg.indexOf('<svg'))); 7732 return svg && svg.hasChildNodes() && svg; 7733 } 7734 7735 var symbolRe = /<symbol(.*?id=(['"])(.*?)\2[^]*?<\/)symbol>/g; 7736 var symbols = {}; 7737 7738 function parseSymbols(svg, icon) { 7739 7740 if (!symbols[svg]) { 7741 7742 symbols[svg] = {}; 7743 7744 var match; 7745 while ((match = symbolRe.exec(svg))) { 7746 symbols[svg][match[3]] = "<svg xmlns=\"http://www.w3.org/2000/svg\"" + (match[1]) + "svg>"; 7747 } 7748 7749 symbolRe.lastIndex = 0; 7750 7751 } 7752 7753 return symbols[svg][icon]; 7754 } 7755 7756 function applyAnimation(el) { 7757 7758 var length = getMaxPathLength(el); 7759 7760 if (length) { 7761 el.style.setProperty('--uk-animation-stroke', length); 7762 } 7763 7764 } 7765 7766 function getMaxPathLength(el) { 7767 return Math.ceil(Math.max.apply(Math, $$('[stroke]', el).map(function (stroke) { return stroke.getTotalLength && stroke.getTotalLength() || 0; } 7768 ).concat([0]))); 7769 } 7770 7771 function insertSVG(el, root) { 7772 if (isVoidElement(root) || root.tagName === 'CANVAS') { 7773 7774 attr(root, 'hidden', true); 7775 7776 var next = root.nextElementSibling; 7777 return equals(el, next) 7778 ? next 7779 : after(root, el); 7780 7781 } else { 7782 7783 var last = root.lastElementChild; 7784 return equals(el, last) 7785 ? last 7786 : append(root, el); 7787 7788 } 7789 } 7790 7791 function equals(el, other) { 7792 return attr(el, 'data-svg') === attr(other, 'data-svg'); 7793 } 7794 7795 var closeIcon = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"1\" y1=\"1\" x2=\"13\" y2=\"13\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"13\" y1=\"1\" x2=\"1\" y2=\"13\"/></svg>"; 7796 7797 var closeLarge = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"1\" y1=\"1\" x2=\"19\" y2=\"19\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"19\" y1=\"1\" x2=\"1\" y2=\"19\"/></svg>"; 7798 7799 var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"4\" width=\"1\" height=\"11\"/><rect x=\"4\" y=\"9\" width=\"11\" height=\"1\"/></svg>"; 7800 7801 var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect y=\"9\" width=\"20\" height=\"2\"/><rect y=\"3\" width=\"20\" height=\"2\"/><rect y=\"15\" width=\"20\" height=\"2\"/></svg>"; 7802 7803 var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"19\" y=\"0\" width=\"1\" height=\"40\"/><rect x=\"0\" y=\"19\" width=\"40\" height=\"1\"/></svg>"; 7804 7805 var paginationNext = "<svg width=\"7\" height=\"12\" viewBox=\"0 0 7 12\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"1 1 6 6 1 11\"/></svg>"; 7806 7807 var paginationPrevious = "<svg width=\"7\" height=\"12\" viewBox=\"0 0 7 12\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"6 1 1 6 6 11\"/></svg>"; 7808 7809 var searchIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"9\" cy=\"9\" r=\"7\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M14,14 L18,18 L14,14 Z\"/></svg>"; 7810 7811 var searchLarge = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" cx=\"17.5\" cy=\"17.5\" r=\"16.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" x1=\"38\" y1=\"39\" x2=\"29\" y2=\"30\"/></svg>"; 7812 7813 var searchNavbar = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10.5\" cy=\"10.5\" r=\"9.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"23\" y1=\"23\" x2=\"17\" y2=\"17\"/></svg>"; 7814 7815 var slidenavNext = "<svg width=\"14px\" height=\"24px\" viewBox=\"0 0 14 24\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" points=\"1.225,23 12.775,12 1.225,1 \"/></svg>"; 7816 7817 var slidenavNextLarge = "<svg width=\"25px\" height=\"40px\" viewBox=\"0 0 25 40\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"2\" points=\"4.002,38.547 22.527,20.024 4,1.5 \"/></svg>"; 7818 7819 var slidenavPrevious = "<svg width=\"14px\" height=\"24px\" viewBox=\"0 0 14 24\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" points=\"12.775,1 1.225,12 12.775,23 \"/></svg>"; 7820 7821 var slidenavPreviousLarge = "<svg width=\"25px\" height=\"40px\" viewBox=\"0 0 25 40\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"2\" points=\"20.527,1.5 2,20.024 20.525,38.547 \"/></svg>"; 7822 7823 var spinner = "<svg width=\"30\" height=\"30\" viewBox=\"0 0 30 30\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" cx=\"15\" cy=\"15\" r=\"14\"/></svg>"; 7824 7825 var totop = "<svg width=\"18\" height=\"10\" viewBox=\"0 0 18 10\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"1 9 9 1 17 9 \"/></svg>"; 7826 7827 var parsed = {}; 7828 var icons = { 7829 spinner: spinner, 7830 totop: totop, 7831 marker: marker, 7832 'close-icon': closeIcon, 7833 'close-large': closeLarge, 7834 'navbar-toggle-icon': navbarToggleIcon, 7835 'overlay-icon': overlayIcon, 7836 'pagination-next': paginationNext, 7837 'pagination-previous': paginationPrevious, 7838 'search-icon': searchIcon, 7839 'search-large': searchLarge, 7840 'search-navbar': searchNavbar, 7841 'slidenav-next': slidenavNext, 7842 'slidenav-next-large': slidenavNextLarge, 7843 'slidenav-previous': slidenavPrevious, 7844 'slidenav-previous-large': slidenavPreviousLarge 7845 }; 7846 7847 var Icon = { 7848 7849 install: install, 7850 7851 extends: SVG, 7852 7853 args: 'icon', 7854 7855 props: ['icon'], 7856 7857 data: { 7858 include: ['focusable'] 7859 }, 7860 7861 isIcon: true, 7862 7863 beforeConnect: function() { 7864 addClass(this.$el, 'uk-icon'); 7865 }, 7866 7867 methods: { 7868 7869 getSvg: function() { 7870 7871 var icon = getIcon(applyRtl(this.icon)); 7872 7873 if (!icon) { 7874 return Promise.reject('Icon not found.'); 7875 } 7876 7877 return Promise.resolve(icon); 7878 } 7879 7880 } 7881 7882 }; 7883 7884 var IconComponent = { 7885 7886 args: false, 7887 7888 extends: Icon, 7889 7890 data: function (vm) { return ({ 7891 icon: hyphenate(vm.constructor.options.name) 7892 }); }, 7893 7894 beforeConnect: function() { 7895 addClass(this.$el, this.$name); 7896 } 7897 7898 }; 7899 7900 var Slidenav = { 7901 7902 extends: IconComponent, 7903 7904 beforeConnect: function() { 7905 addClass(this.$el, 'uk-slidenav'); 7906 }, 7907 7908 computed: { 7909 7910 icon: function(ref, $el) { 7911 var icon = ref.icon; 7912 7913 return hasClass($el, 'uk-slidenav-large') 7914 ? (icon + "-large") 7915 : icon; 7916 } 7917 7918 } 7919 7920 }; 7921 7922 var Search = { 7923 7924 extends: IconComponent, 7925 7926 computed: { 7927 7928 icon: function(ref, $el) { 7929 var icon = ref.icon; 7930 7931 return hasClass($el, 'uk-search-icon') && parents($el, '.uk-search-large').length 7932 ? 'search-large' 7933 : parents($el, '.uk-search-navbar').length 7934 ? 'search-navbar' 7935 : icon; 7936 } 7937 7938 } 7939 7940 }; 7941 7942 var Close = { 7943 7944 extends: IconComponent, 7945 7946 computed: { 7947 7948 icon: function() { 7949 return ("close-" + (hasClass(this.$el, 'uk-close-large') ? 'large' : 'icon')); 7950 } 7951 7952 } 7953 7954 }; 7955 7956 var Spinner = { 7957 7958 extends: IconComponent, 7959 7960 connected: function() { 7961 var this$1 = this; 7962 7963 this.svg.then(function (svg) { return this$1.ratio !== 1 && css($('circle', svg), 'strokeWidth', 1 / this$1.ratio); }, noop); 7964 } 7965 7966 }; 7967 7968 function install(UIkit) { 7969 UIkit.icon.add = function (name, svg) { 7970 var obj; 7971 7972 7973 var added = isString(name) ? (( obj = {}, obj[name] = svg, obj )) : name; 7974 each(added, function (svg, name) { 7975 icons[name] = svg; 7976 delete parsed[name]; 7977 }); 7978 7979 if (UIkit._initialized) { 7980 apply(document.body, function (el) { return each(UIkit.getComponents(el), function (cmp) { 7981 cmp.$options.isIcon && cmp.icon in added && cmp.$reset(); 7982 }); } 7983 ); 7984 } 7985 }; 7986 } 7987 7988 function getIcon(icon) { 7989 7990 if (!icons[icon]) { 7991 return null; 7992 } 7993 7994 if (!parsed[icon]) { 7995 parsed[icon] = $(icons[icon].trim()); 7996 } 7997 7998 return parsed[icon].cloneNode(true); 7999 } 8000 8001 function applyRtl(icon) { 8002 return isRtl ? swap(swap(icon, 'left', 'right'), 'previous', 'next') : icon; 8003 } 8004 8005 var img = { 8006 8007 args: 'dataSrc', 8008 8009 props: { 8010 dataSrc: String, 8011 dataSrcset: Boolean, 8012 sizes: String, 8013 width: Number, 8014 height: Number, 8015 offsetTop: String, 8016 offsetLeft: String, 8017 target: String 8018 }, 8019 8020 data: { 8021 dataSrc: '', 8022 dataSrcset: false, 8023 sizes: false, 8024 width: false, 8025 height: false, 8026 offsetTop: '50vh', 8027 offsetLeft: 0, 8028 target: false 8029 }, 8030 8031 computed: { 8032 8033 cacheKey: function(ref) { 8034 var dataSrc = ref.dataSrc; 8035 8036 return ((this.$name) + "." + dataSrc); 8037 }, 8038 8039 width: function(ref) { 8040 var width = ref.width; 8041 var dataWidth = ref.dataWidth; 8042 8043 return width || dataWidth; 8044 }, 8045 8046 height: function(ref) { 8047 var height = ref.height; 8048 var dataHeight = ref.dataHeight; 8049 8050 return height || dataHeight; 8051 }, 8052 8053 sizes: function(ref) { 8054 var sizes = ref.sizes; 8055 var dataSizes = ref.dataSizes; 8056 8057 return sizes || dataSizes; 8058 }, 8059 8060 isImg: function(_, $el) { 8061 return isImg($el); 8062 }, 8063 8064 target: { 8065 8066 get: function(ref) { 8067 var target = ref.target; 8068 8069 return [this.$el].concat(queryAll(target, this.$el)); 8070 }, 8071 8072 watch: function() { 8073 this.observe(); 8074 } 8075 8076 }, 8077 8078 offsetTop: function(ref) { 8079 var offsetTop = ref.offsetTop; 8080 8081 return toPx(offsetTop, 'height'); 8082 }, 8083 8084 offsetLeft: function(ref) { 8085 var offsetLeft = ref.offsetLeft; 8086 8087 return toPx(offsetLeft, 'width'); 8088 } 8089 8090 }, 8091 8092 connected: function() { 8093 8094 if (storage[this.cacheKey]) { 8095 setSrcAttrs(this.$el, storage[this.cacheKey] || this.dataSrc, this.dataSrcset, this.sizes); 8096 } else if (this.isImg && this.width && this.height) { 8097 setSrcAttrs(this.$el, getPlaceholderImage(this.width, this.height, this.sizes)); 8098 } 8099 8100 this.observer = new IntersectionObserver(this.load, { 8101 rootMargin: ((this.offsetTop) + "px " + (this.offsetLeft) + "px") 8102 }); 8103 8104 requestAnimationFrame(this.observe); 8105 8106 }, 8107 8108 disconnected: function() { 8109 this.observer.disconnect(); 8110 }, 8111 8112 update: { 8113 8114 read: function(ref) { 8115 var this$1 = this; 8116 var image = ref.image; 8117 8118 8119 if (!image && document.readyState === 'complete') { 8120 this.load(this.observer.takeRecords()); 8121 } 8122 8123 if (this.isImg) { 8124 return false;
8125 } 8126 8127 image && image.then(function (img) { return img && img.currentSrc !== '' && setSrcAttrs(this$1.$el, currentSrc(img)); }); 8128 8129 }, 8130 8131 write: function(data) { 8132 8133 if (this.dataSrcset && window.devicePixelRatio !== 1) { 8134 8135 var bgSize = css(this.$el, 'backgroundSize'); 8136 if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === data.bgSize) { 8137 data.bgSize = getSourceSize(this.dataSrcset, this.sizes); 8138 css(this.$el, 'backgroundSize', ((data.bgSize) + "px")); 8139 } 8140 8141 } 8142 8143 }, 8144 8145 events: ['resize'] 8146 8147 }, 8148 8149 methods: { 8150 8151 load: function(entries) { 8152 var this$1 = this; 8153 8154 8155 // Old chromium based browsers (UC Browser) did not implement `isIntersecting` 8156 if (!entries.some(function (entry) { return isUndefined(entry.isIntersecting) || entry.isIntersecting; })) { 8157 return; 8158 } 8159 8160 this._data.image = getImage(this.dataSrc, this.dataSrcset, this.sizes).then(function (img) { 8161 8162 setSrcAttrs(this$1.$el, currentSrc(img), img.srcset, img.sizes); 8163 storage[this$1.cacheKey] = currentSrc(img); 8164 return img; 8165 8166 }, noop); 8167 8168 this.observer.disconnect(); 8169 }, 8170 8171 observe: function() { 8172 var this$1 = this; 8173 8174 if (this._connected && !this._data.image) { 8175 this.target.forEach(function (el) { return this$1.observer.observe(el); }); 8176 } 8177 } 8178 8179 } 8180 8181 }; 8182 8183 function setSrcAttrs(el, src, srcset, sizes) { 8184 8185 if (isImg(el)) { 8186 sizes && (el.sizes = sizes); 8187 srcset && (el.srcset = srcset); 8188 src && (el.src = src); 8189 } else if (src) { 8190 8191 var change = !includes(el.style.backgroundImage, src); 8192 if (change) { 8193 css(el, 'backgroundImage', ("url(" + (escape(src)) + ")")); 8194 trigger(el, createEvent('load', false)); 8195 } 8196 8197 } 8198 8199 } 8200 8201 function getPlaceholderImage(width, height, sizes) { 8202 var assign; 8203 8204 8205 if (sizes) { 8206 ((assign = Dimensions.ratio({width: width, height: height}, 'width', toPx(sizesToPixel(sizes))), width = assign.width, height = assign.height)); 8207 } 8208 8209 return ("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"" + width + "\" height=\"" + height + "\"></svg>"); 8210 } 8211 8212 var sizesRe = /\s*(.*?)\s*(\w+|calc\(.*?\))\s*(?:,|$)/g; 8213 function sizesToPixel(sizes) { 8214 var matches; 8215 8216 sizesRe.lastIndex = 0; 8217 8218 while ((matches = sizesRe.exec(sizes))) { 8219 if (!matches[1] || window.matchMedia(matches[1]).matches) { 8220 matches = evaluateSize(matches[2]); 8221 break; 8222 } 8223 } 8224 8225 return matches || '100vw'; 8226 } 8227 8228 var sizeRe = /\d+(?:\w+|%)/g; 8229 var additionRe = /[+-]?(\d+)/g; 8230 function evaluateSize(size) { 8231 return startsWith(size, 'calc') 8232 ? size 8233 .substring(5, size.length - 1) 8234 .replace(sizeRe, function (size) { return toPx(size); }) 8235 .replace(/ /g, '') 8236 .match(additionRe) 8237 .reduce(function (a, b) { return a + +b; }, 0) 8238 : size; 8239 } 8240 8241 var srcSetRe = /\s+\d+w\s*(?:,|$)/g; 8242 function getSourceSize(srcset, sizes) { 8243 var srcSize = toPx(sizesToPixel(sizes)); 8244 var descriptors = (srcset.match(srcSetRe) || []).map(toFloat).sort(function (a, b) { return a - b; }); 8245 8246 return descriptors.filter(function (size) { return size >= srcSize; })[0] || descriptors.pop() || ''; 8247 } 8248 8249 function isImg(el) { 8250 return el.tagName === 'IMG'; 8251 } 8252 8253 function currentSrc(el) { 8254 return el.currentSrc || el.src; 8255 } 8256 8257 var key = '__test__'; 8258 var storage; 8259 8260 // workaround for Safari's private browsing mode and accessing sessionStorage in Blink 8261 try { 8262 storage = window.sessionStorage || {}; 8263 storage[key] = 1; 8264 delete storage[key]; 8265 } catch (e) { 8266 storage = {}; 8267 } 8268 8269 var Media = { 8270 8271 props: { 8272 media: Boolean 8273 }, 8274 8275 data: { 8276 media: false 8277 }, 8278 8279 computed: { 8280 8281 matchMedia: function() { 8282 var media = toMedia(this.media); 8283 return !media || window.matchMedia(media).matches; 8284 } 8285 8286 } 8287 8288 }; 8289 8290 function toMedia(value) { 8291 8292 if (isString(value)) { 8293 if (value[0] === '@') { 8294 var name = "breakpoint-" + (value.substr(1)); 8295 value = toFloat(getCssVar(name)); 8296 } else if (isNaN(value)) { 8297 return value; 8298 } 8299 } 8300 8301 return value && !isNaN(value) ? ("(min-width: " + value + "px)") : false;
8302 } 8303 8304 var leader = { 8305 8306 mixins: [Class, Media], 8307 8308 props: { 8309 fill: String 8310 }, 8311 8312 data: { 8313 fill: '', 8314 clsWrapper: 'uk-leader-fill', 8315 clsHide: 'uk-leader-hide', 8316 attrFill: 'data-fill' 8317 }, 8318 8319 computed: { 8320 8321 fill: function(ref) { 8322 var fill = ref.fill; 8323 8324 return fill || getCssVar('leader-fill-content'); 8325 } 8326 8327 }, 8328 8329 connected: function() { 8330 var assign; 8331 8332 (assign = wrapInner(this.$el, ("<span class=\"" + (this.clsWrapper) + "\">")), this.wrapper = assign[0]); 8333 }, 8334 8335 disconnected: function() { 8336 unwrap(this.wrapper.childNodes); 8337 }, 8338 8339 update: { 8340 8341 read: function(ref) { 8342 var changed = ref.changed; 8343 var width = ref.width; 8344 8345 8346 var prev = width; 8347 8348 width = Math.floor(this.$el.offsetWidth / 2); 8349 8350 return { 8351 width: width, 8352 fill: this.fill, 8353 changed: changed || prev !== width, 8354 hide: !this.matchMedia 8355 }; 8356 }, 8357 8358 write: function(data) { 8359 8360 toggleClass(this.wrapper, this.clsHide, data.hide); 8361 8362 if (data.changed) { 8363 data.changed = false; 8364 attr(this.wrapper, this.attrFill, new Array(data.width).join(data.fill)); 8365 } 8366 8367 }, 8368 8369 events: ['resize'] 8370 8371 } 8372 8373 }; 8374 8375 var Container = { 8376 8377 props: { 8378 container: Boolean 8379 }, 8380 8381 data: { 8382 container: true 8383 }, 8384 8385 computed: { 8386 8387 container: function(ref) { 8388 var container = ref.container; 8389 8390 return container === true && this.$container || container && $(container); 8391 } 8392 8393 } 8394 8395 }; 8396 8397 var active$1 = []; 8398 8399 var Modal = { 8400 8401 mixins: [Class, Container, Togglable], 8402 8403 props: { 8404 selPanel: String, 8405 selClose: String, 8406 escClose: Boolean, 8407 bgClose: Boolean, 8408 stack: Boolean 8409 }, 8410 8411 data: { 8412 cls: 'uk-open', 8413 escClose: true, 8414 bgClose: true, 8415 overlay: true, 8416 stack: false 8417 }, 8418 8419 computed: { 8420 8421 panel: function(ref, $el) { 8422 var selPanel = ref.selPanel; 8423 8424 return $(selPanel, $el); 8425 }, 8426 8427 transitionElement: function() { 8428 return this.panel; 8429 }, 8430 8431 bgClose: function(ref) { 8432 var bgClose = ref.bgClose; 8433 8434 return bgClose && this.panel; 8435 } 8436 8437 }, 8438 8439 beforeDisconnect: function() { 8440 if (this.isToggled()) { 8441 this.toggleNow(this.$el, false); 8442 } 8443 }, 8444 8445 events: [ 8446 8447 { 8448 8449 name: 'click', 8450 8451 delegate: function() { 8452 return this.selClose; 8453 }, 8454 8455 handler: function(e) { 8456 e.preventDefault(); 8457 this.hide(); 8458 } 8459 8460 }, 8461 8462 { 8463 8464 name: 'toggle', 8465 8466 self: true, 8467 8468 handler: function(e) { 8469 8470 if (e.defaultPrevented) { 8471 return; 8472 } 8473 8474 e.preventDefault(); 8475 this.toggle(); 8476 } 8477 8478 }, 8479 8480 { 8481 name: 'beforeshow', 8482 8483 self: true, 8484 8485 handler: function(e) { 8486 8487 if (includes(active$1, this)) { 8488 return false; 8489 } 8490 8491 if (!this.stack && active$1.length) { 8492 Promise.all(active$1.map(function (modal) { return modal.hide(); })).then(this.show); 8493 e.preventDefault(); 8494 } else { 8495 active$1.push(this); 8496 } 8497 } 8498 8499 }, 8500 8501 { 8502 8503 name: 'show', 8504 8505 self: true, 8506 8507 handler: function() { 8508 var this$1 = this; 8509 8510 8511 if (width(window) - width(document) && this.overlay) { 8512 css(document.body, 'overflowY', 'scroll'); 8513 } 8514 8515 addClass(document.documentElement, this.clsPage); 8516 8517 if (this.bgClose) { 8518 once(this.$el, 'hide', delayOn(document, 'click', function (ref) { 8519 var defaultPrevented = ref.defaultPrevented; 8520 var target = ref.target; 8521 8522 var current = last(active$1); 8523 if (!defaultPrevented 8524 && current === this$1 8525 && (!current.overlay || within(target, current.$el)) 8526 && !within(target, current.panel) 8527 ) { 8528 current.hide(); 8529 } 8530 }), {self: true}); 8531 } 8532 8533 if (this.escClose) { 8534 once(this.$el, 'hide', on(document, 'keydown', function (e) { 8535 var current = last(active$1); 8536 if (e.keyCode === 27 && current === this$1) { 8537 e.preventDefault(); 8538 current.hide(); 8539 } 8540 }), {self: true}); 8541 } 8542 } 8543 8544 }, 8545 8546 { 8547 8548 name: 'hidden', 8549 8550 self: true, 8551 8552 handler: function() { 8553 var this$1 = this; 8554 8555 8556 active$1.splice(active$1.indexOf(this), 1); 8557 8558 if (!active$1.length) { 8559 css(document.body, 'overflowY', ''); 8560 } 8561 8562 if (!active$1.some(function (modal) { return modal.clsPage === this$1.clsPage; })) { 8563 removeClass(document.documentElement, this.clsPage); 8564 } 8565 8566 } 8567 8568 } 8569 8570 ], 8571 8572 methods: { 8573 8574 toggle: function() { 8575 return this.isToggled() ? this.hide() : this.show(); 8576 }, 8577 8578 show: function() { 8579 var this$1 = this; 8580 8581 8582 if (this.container && this.$el.parentNode !== this.container) { 8583 append(this.container, this.$el); 8584 return new Promise(function (resolve) { return requestAnimationFrame(function () { return this$1.show().then(resolve); } 8585 ); } 8586 ); 8587 } 8588 8589 return this.toggleElement(this.$el, true, animate$1(this)); 8590 }, 8591 8592 hide: function() { 8593 return this.toggleElement(this.$el, false, animate$1(this)); 8594 } 8595 8596 } 8597 8598 }; 8599 8600 function animate$1(ref) { 8601 var transitionElement = ref.transitionElement; 8602 var _toggle = ref._toggle; 8603 8604 return function (el, show) { return new Promise(function (resolve, reject) { return once(el, 'show hide', function () { 8605 el._reject && el._reject(); 8606 el._reject = reject; 8607 8608 _toggle(el, show); 8609 8610 var off = once(transitionElement, 'transitionstart', function () { 8611 once(transitionElement, 'transitionend transitioncancel', resolve, {self: true}); 8612 clearTimeout(timer); 8613 }, {self: true}); 8614 8615 var timer = setTimeout(function () { 8616 off(); 8617 resolve(); 8618 }, toMs(css(transitionElement, 'transitionDuration'))); 8619 8620 }); } 8621 ); }; 8622 } 8623 8624 var modal = { 8625 8626 install: install$1, 8627 8628 mixins: [Modal], 8629 8630 data: { 8631 clsPage: 'uk-modal-page', 8632 selPanel: '.uk-modal-dialog', 8633 selClose: '.uk-modal-close, .uk-modal-close-default, .uk-modal-close-outside, .uk-modal-close-full' 8634 }, 8635 8636 events: [ 8637 8638 { 8639 name: 'show', 8640 8641 self: true, 8642 8643 handler: function() { 8644 8645 if (hasClass(this.panel, 'uk-margin-auto-vertical')) { 8646 addClass(this.$el, 'uk-flex'); 8647 } else { 8648 css(this.$el, 'display', 'block'); 8649 } 8650 8651 height(this.$el); // force reflow 8652 } 8653 }, 8654 8655 { 8656 name: 'hidden', 8657 8658 self: true, 8659 8660 handler: function() { 8661 8662 css(this.$el, 'display', ''); 8663 removeClass(this.$el, 'uk-flex'); 8664 8665 } 8666 } 8667 8668 ] 8669 8670 }; 8671 8672 function install$1(ref) { 8673 var modal = ref.modal; 8674 8675 8676 modal.dialog = function (content, options) { 8677 8678 var dialog = modal( 8679 ("<div class=\"uk-modal\"> <div class=\"uk-modal-dialog\">" + content + "</div> </div>"), 8680 options 8681 ); 8682 8683 dialog.show(); 8684 8685 on(dialog.$el, 'hidden', function () { return Promise.resolve().then(function () { return dialog.$destroy(true); } 8686 ); }, {self: true} 8687 ); 8688 8689 return dialog; 8690 }; 8691 8692 modal.alert = function (message, options) { 8693 return openDialog( 8694 function (ref) { 8695 var labels = ref.labels; 8696 8697 return ("<div class=\"uk-modal-body\">" + (isString(message) ? message : html(message)) + "</div> <div class=\"uk-modal-footer uk-text-right\"> <button class=\"uk-button uk-button-primary uk-modal-close\" autofocus>" + (labels.ok) + "</button> </div>"); 8698 }, 8699 options, 8700 function (deferred) { return deferred.resolve(); } 8701 ); 8702 }; 8703 8704 modal.confirm = function (message, options) { 8705 return openDialog( 8706 function (ref) { 8707 var labels = ref.labels; 8708 8709 return ("<form> <div class=\"uk-modal-body\">" + (isString(message) ? message : html(message)) + "</div> <div class=\"uk-modal-footer uk-text-right\"> <button class=\"uk-button uk-button-default uk-modal-close\" type=\"button\">" + (labels.cancel) + "</button> <button class=\"uk-button uk-button-primary\" autofocus>" + (labels.ok) + "</button> </div> </form>"); 8710 }, 8711 options, 8712 function (deferred) { return deferred.reject(); } 8713 ); 8714 }; 8715 8716 modal.prompt = function (message, value, options) { 8717 return openDialog( 8718 function (ref) { 8719 var labels = ref.labels; 8720 8721 return ("<form class=\"uk-form-stacked\"> <div class=\"uk-modal-body\"> <label>" + (isString(message) ? message : html(message)) + "</label> <input class=\"uk-input\" value=\"" + (value || '') + "\" autofocus> </div> <div class=\"uk-modal-footer uk-text-right\"> <button class=\"uk-button uk-button-default uk-modal-close\" type=\"button\">" + (labels.cancel) + "</button> <button class=\"uk-button uk-button-primary\">" + (labels.ok) + "</button> </div> </form>"); 8722 }, 8723 options, 8724 function (deferred) { return deferred.resolve(null); }, 8725 function (dialog) { return $('input', dialog.$el).value; } 8726 ); 8727 }; 8728 8729 modal.labels = { 8730 ok: 'Ok', 8731 cancel: 'Cancel' 8732 }; 8733 8734 function openDialog(tmpl, options, hideFn, submitFn) { 8735 8736 options = assign({bgClose: false, escClose: true, labels: modal.labels}, options); 8737 8738 var dialog = modal.dialog(tmpl(options), options); 8739 var deferred = new Deferred(); 8740 8741 var resolved = false;
8742 8743 on(dialog.$el, 'submit', 'form', function (e) { 8744 e.preventDefault(); 8745 deferred.resolve(submitFn && submitFn(dialog)); 8746 resolved = true; 8747 dialog.hide(); 8748 }); 8749 8750 on(dialog.$el, 'hide', function () { return !resolved && hideFn(deferred); }); 8751 8752 return deferred.promise; 8753 } 8754 8755 } 8756 8757 var nav = { 8758 8759 extends: Accordion, 8760 8761 data: { 8762 targets: '> .uk-parent', 8763 toggle: '> a', 8764 content: '> ul' 8765 } 8766 8767 }; 8768 8769 var navbar = { 8770 8771 mixins: [Class, FlexBug], 8772 8773 props: { 8774 dropdown: String, 8775 mode: 'list', 8776 align: String, 8777 offset: Number, 8778 boundary: Boolean, 8779 boundaryAlign: Boolean, 8780 clsDrop: String, 8781 delayShow: Number, 8782 delayHide: Number, 8783 dropbar: Boolean, 8784 dropbarMode: String, 8785 dropbarAnchor: Boolean, 8786 duration: Number 8787 }, 8788 8789 data: { 8790 dropdown: '.uk-navbar-nav > li', 8791 align: !isRtl ? 'left' : 'right', 8792 clsDrop: 'uk-navbar-dropdown', 8793 mode: undefined, 8794 offset: undefined, 8795 delayShow: undefined, 8796 delayHide: undefined, 8797 boundaryAlign: undefined, 8798 flip: 'x', 8799 boundary: true, 8800 dropbar: false, 8801 dropbarMode: 'slide', 8802 dropbarAnchor: false, 8803 duration: 200, 8804 forceHeight: true, 8805 selMinHeight: '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle' 8806 }, 8807 8808 computed: { 8809 8810 boundary: function(ref, $el) { 8811 var boundary = ref.boundary; 8812 var boundaryAlign = ref.boundaryAlign; 8813 8814 return (boundary === true || boundaryAlign) ? $el : boundary; 8815 }, 8816 8817 dropbarAnchor: function(ref, $el) { 8818 var dropbarAnchor = ref.dropbarAnchor; 8819 8820 return query(dropbarAnchor, $el); 8821 }, 8822 8823 pos: function(ref) { 8824 var align = ref.align; 8825 8826 return ("bottom-" + align); 8827 }, 8828 8829 dropbar: { 8830 8831 get: function(ref) { 8832 var dropbar = ref.dropbar; 8833 8834 8835 if (!dropbar) { 8836 return null; 8837 } 8838 8839 dropbar = this._dropbar || query(dropbar, this.$el) || $('+ .uk-navbar-dropbar', this.$el); 8840 8841 return dropbar ? dropbar : (this._dropbar = $('<div></div>')); 8842 8843 }, 8844 8845 watch: function(dropbar) { 8846 addClass(dropbar, 'uk-navbar-dropbar'); 8847 toggleClass(dropbar, 'uk-navbar-dropbar-slide', this.dropbarMode === 'slide'); 8848 }, 8849 8850 immediate: true 8851 8852 }, 8853 8854 dropdowns: { 8855 8856 get: function(ref, $el) { 8857 var dropdown = ref.dropdown; 8858 var clsDrop = ref.clsDrop; 8859 8860 return $$((dropdown + " ." + clsDrop), $el); 8861 }, 8862 8863 watch: function(dropdowns) { 8864 var this$1 = this; 8865 8866 this.$create( 8867 'drop', 8868 dropdowns.filter(function (el) { return !this$1.getDropdown(el); }), 8869 assign({}, this.$props, {boundary: this.boundary, pos: this.pos, offset: this.dropbar || this.offset}) 8870 ); 8871 }, 8872 8873 immediate: true 8874 8875 } 8876 8877 }, 8878 8879 disconnected: function() { 8880 this.dropbar && remove(this.dropbar); 8881 delete this._dropbar; 8882 }, 8883 8884 events: [ 8885 8886 { 8887 name: 'mouseover', 8888 8889 delegate: function() { 8890 return this.dropdown; 8891 }, 8892 8893 handler: function(ref) { 8894 var current = ref.current; 8895 8896 var active = this.getActive(); 8897 if (active && active.toggle && !within(active.toggle.$el, current) && !active.tracker.movesTo(active.$el)) { 8898 active.hide(false); 8899 } 8900 } 8901 8902 }, 8903 8904 { 8905 name: 'mouseleave', 8906 8907 el: function() { 8908 return this.dropbar; 8909 }, 8910 8911 handler: function() { 8912 var active = this.getActive(); 8913 8914 if (active && !this.dropdowns.some(function (el) { return matches(el, ':hover'); })) { 8915 active.hide(); 8916 } 8917 } 8918 }, 8919 8920 { 8921 name: 'beforeshow', 8922 8923 capture: true, 8924 8925 filter: function() { 8926 return this.dropbar; 8927 }, 8928 8929 handler: function() { 8930 8931 if (!this.dropbar.parentNode) { 8932 after(this.dropbarAnchor || this.$el, this.dropbar); 8933 } 8934 8935 } 8936 }, 8937 8938 { 8939 name: 'show', 8940 8941 capture: true, 8942 8943 filter: function() { 8944 return this.dropbar; 8945 }, 8946 8947 handler: function(_, drop) { 8948 8949 var $el = drop.$el; 8950 var dir = drop.dir; 8951 8952 this.clsDrop && addClass($el, ((this.clsDrop) + "-dropbar")); 8953 8954 if (dir === 'bottom') { 8955 this.transitionTo($el.offsetHeight + toFloat(css($el, 'marginTop')) + toFloat(css($el, 'marginBottom')), $el); 8956 } 8957 } 8958 }, 8959 8960 { 8961 name: 'beforehide', 8962 8963 filter: function() { 8964 return this.dropbar; 8965 }, 8966 8967 handler: function(e, ref) { 8968 var $el = ref.$el; 8969 8970 8971 var active = this.getActive(); 8972 8973 if (matches(this.dropbar, ':hover') && active && active.$el === $el) { 8974 e.preventDefault(); 8975 } 8976 } 8977 }, 8978 8979 { 8980 name: 'hide', 8981 8982 filter: function() { 8983 return this.dropbar; 8984 }, 8985 8986 handler: function(_, ref) { 8987 var $el = ref.$el; 8988 8989 8990 var active = this.getActive(); 8991 8992 if (!active || active && active.$el === $el) { 8993 this.transitionTo(0); 8994 } 8995 } 8996 } 8997 8998 ], 8999 9000 methods: { 9001 9002 getActive: function() { 9003 var ref = this.dropdowns.map(this.getDropdown).filter(function (drop) { return drop && drop.isActive(); }); 9004 var active = ref[0]; 9005 return active && includes(active.mode, 'hover') && within(active.toggle.$el, this.$el) && active; 9006 }, 9007 9008 transitionTo: function(newHeight, el) { 9009 var this$1 = this; 9010 9011 9012 var ref = this; 9013 var dropbar = ref.dropbar; 9014 var oldHeight = isVisible(dropbar) ? height(dropbar) : 0; 9015 9016 el = oldHeight < newHeight && el; 9017 9018 css(el, 'clip', ("rect(0," + (el.offsetWidth) + "px," + oldHeight + "px,0
9018)")); 9019 9020 height(dropbar, oldHeight); 9021 9022 Transition.cancel([el, dropbar]); 9023 return Promise.all([ 9024 Transition.start(dropbar, {height: newHeight}, this.duration), 9025 Transition.start(el, {clip: ("rect(0," + (el.offsetWidth) + "px," + newHeight + "px,0)")}, this.duration) 9026 ]) 9027 .catch(noop) 9028 .then(function () { 9029 css(el, {clip: ''}); 9030 this$1.$update(dropbar); 9031 }); 9032 }, 9033 9034 getDropdown: function(el) { 9035 return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown'); 9036 } 9037 9038 } 9039 9040 }; 9041 9042 var offcanvas = { 9043 9044 mixins: [Modal], 9045 9046 args: 'mode', 9047 9048 props: { 9049 mode: String, 9050 flip: Boolean, 9051 overlay: Boolean 9052 }, 9053 9054 data: { 9055 mode: 'slide', 9056 flip: false, 9057 overlay: false, 9058 clsPage: 'uk-offcanvas-page', 9059 clsContainer: 'uk-offcanvas-container', 9060 selPanel: '.uk-offcanvas-bar', 9061 clsFlip: 'uk-offcanvas-flip', 9062 clsContainerAnimation: 'uk-offcanvas-container-animation', 9063 clsSidebarAnimation: 'uk-offcanvas-bar-animation', 9064 clsMode: 'uk-offcanvas', 9065 clsOverlay: 'uk-offcanvas-overlay', 9066 selClose: '.uk-offcanvas-close', 9067 container: false 9068 }, 9069 9070 computed: { 9071 9072 clsFlip: function(ref) { 9073 var flip = ref.flip; 9074 var clsFlip = ref.clsFlip; 9075 9076 return flip ? clsFlip : ''; 9077 }, 9078 9079 clsOverlay: function(ref) { 9080 var overlay = ref.overlay; 9081 var clsOverlay = ref.clsOverlay; 9082 9083 return overlay ? clsOverlay : ''; 9084 }, 9085 9086 clsMode: function(ref) { 9087 var mode = ref.mode; 9088 var clsMode = ref.clsMode; 9089 9090 return (clsMode + "-" + mode); 9091 }, 9092 9093 clsSidebarAnimation: function(ref) { 9094 var mode = ref.mode; 9095 var clsSidebarAnimation = ref.clsSidebarAnimation; 9096 9097 return mode === 'none' || mode === 'reveal' ? '' : clsSidebarAnimation; 9098 }, 9099 9100 clsContainerAnimation: function(ref) { 9101 var mode = ref.mode; 9102 var clsContainerAnimation = ref.clsContainerAnimation; 9103 9104 return mode !== 'push' && mode !== 'reveal' ? '' : clsContainerAnimation; 9105 }, 9106 9107 transitionElement: function(ref) { 9108 var mode = ref.mode; 9109 9110 return mode === 'reveal' ? this.panel.parentNode : this.panel; 9111 } 9112 9113 }, 9114 9115 events: [ 9116 9117 { 9118 9119 name: 'click', 9120 9121 delegate: function() { 9122 return 'a[href^="#"]'; 9123 }, 9124 9125 handler: function(ref) { 9126 var hash = ref.current.hash; 9127 var defaultPrevented = ref.defaultPrevented; 9128 9129 if (!defaultPrevented && hash && $(hash, document.body)) { 9130 this.hide(); 9131 } 9132 } 9133 9134 }, 9135 9136 { 9137 name: 'touchstart', 9138 9139 passive: true, 9140 9141 el: function() { 9142 return this.panel; 9143 }, 9144 9145 handler: function(ref) { 9146 var targetTouches = ref.targetTouches; 9147 9148 9149 if (targetTouches.length === 1) { 9150 this.clientY = targetTouches[0].clientY; 9151 } 9152 9153 } 9154 9155 }, 9156 9157 { 9158 name: 'touchmove', 9159 9160 self: true, 9161 passive: false, 9162 9163 filter: function() { 9164 return this.overlay; 9165 }, 9166 9167 handler: function(e) { 9168 e.cancelable && e.preventDefault(); 9169 } 9170 9171 }, 9172 9173 { 9174 name: 'touchmove', 9175 9176 passive: false, 9177 9178 el: function() { 9179 return this.panel; 9180 }, 9181 9182 handler: function(e) { 9183 9184 if (e.targetTouches.length !== 1) { 9185 return; 9186 } 9187 9188 var clientY = event.targetTouches[0].clientY - this.clientY; 9189 var ref = this.panel; 9190 var scrollTop = ref.scrollTop; 9191 var scrollHeight = ref.scrollHeight; 9192 var clientHeight = ref.clientHeight; 9193 9194 if (clientHeight >= scrollHeight 9195 || scrollTop === 0 && clientY > 0 9196 || scrollHeight - scrollTop <= clientHeight && clientY < 0 9197 ) { 9198 e.cancelable && e.preventDefault(); 9199 } 9200 9201 } 9202 9203 }, 9204 9205 { 9206 name: 'show', 9207 9208 self: true, 9209 9210 handler: function() { 9211 9212 if (this.mode === 'reveal' && !hasClass(this.panel.parentNode, this.clsMode)) { 9213 wrapAll(this.panel, '<div>'); 9214 addClass(this.panel.parentNode, this.clsMode); 9215 } 9216 9217 css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : ''); 9218 addClass(document.body, this.clsContainer, this.clsFlip); 9219 css(document.body, 'touch-action', 'pan-y pinch-zoom'); 9220 css(this.$el, 'display', 'block'); 9221 addClass(this.$el, this.clsOverlay); 9222 addClass(this.panel, this.clsSidebarAnimation, this.mode !== 'reveal' ? this.clsMode : ''); 9223 9224 height(document.body); // force reflow 9225 addClass(document.body, this.clsContainerAnimation); 9226 9227 this.clsContainerAnimation && suppressUserScale(); 9228 9229 9230 } 9231 }, 9232 9233 { 9234 name: 'hide', 9235 9236 self: true, 9237 9238 handler: function() { 9239 removeClass(document.body, this.clsContainerAnimation); 9240 css(document.body, 'touch-action', ''); 9241 } 9242 }, 9243 9244 { 9245 name: 'hidden', 9246 9247 self: true, 9248 9249 handler: function() { 9250 9251 this.clsContainerAnimation && resumeUserScale(); 9252 9253 if (this.mode === 'reveal') { 9254 unwrap(this.panel); 9255 } 9256 9257 removeClass(this.panel, this.clsSidebarAnimation, this.clsMode); 9258 removeClass(this.$el, this.clsOverlay); 9259 css(this.$el, 'display', ''); 9260 removeClass(document.body, this.clsContainer, this.clsFlip); 9261 9262 css(document.documentElement, 'overflowY', ''); 9263 9264 } 9265 }, 9266 9267 { 9268 name: 'swipeLeft swipeRight', 9269 9270 handler: function(e) { 9271 9272 if (this.isToggled() && endsWith(e.type, 'Left') ^ this.flip) { 9273 this.hide(); 9274 } 9275 9276 } 9277 } 9278 9279 ] 9280 9281 }; 9282 9283 // Chrome in responsive mode zooms page upon opening offcanvas 9284 function suppressUserScale() { 9285 getViewport$1().content += ',user-scalable=0'; 9286 } 9287 9288 function resumeUserScale() { 9289 var viewport = getViewport$1(); 9290 viewport.content = viewport.content.replace(/,user-scalable=0$/, ''); 9291 } 9292 9293 function getViewport$1() { 9294 return $('meta[name="viewport"]', document.head) || append(document.head, '<meta name="viewport">'); 9295 } 9296 9297 var overflowAuto = { 9298 9299 mixins: [Class], 9300 9301 props: { 9302 selContainer: String, 9303 selContent: String 9304 }, 9305 9306 data: { 9307 selContainer: '.uk-modal', 9308 selContent: '.uk-modal-dialog' 9309 }, 9310 9311 computed: { 9312 9313 container: function(ref, $el) { 9314 var selContainer = ref.selContainer; 9315 9316 return closest($el, selContainer); 9317 }, 9318 9319 content: function(ref, $el) { 9320 var selContent = ref.selContent; 9321 9322 return closest($el, selContent); 9323 } 9324 9325 }, 9326 9327 connected: function() { 9328 css(this.$el, 'minHeight', 150); 9329 }, 9330 9331 update: { 9332 9333 read: function() { 9334 9335 if (!this.content || !this.container) { 9336 return false;
9337 } 9338 9339 return { 9340 current: toFloat(css(this.$el, 'maxHeight')), 9341 max: Math.max(150, height(this.container) - (offset(this.content).height - height(this.$el))) 9342 }; 9343 }, 9344 9345 write: function(ref) { 9346 var current = ref.current; 9347 var max = ref.max; 9348 9349 css(this.$el, 'maxHeight', max); 9350 if (Math.round(current) !== Math.round(max)) { 9351 trigger(this.$el, 'resize'); 9352 } 9353 }, 9354 9355 events: ['resize'] 9356 9357 } 9358 9359 }; 9360 9361 var responsive = { 9362 9363 props: ['width', 'height'], 9364 9365 connected: function() { 9366 addClass(this.$el, 'uk-responsive-width'); 9367 }, 9368 9369 update: { 9370 9371 read: function() { 9372 return isVisible(this.$el) && this.width && this.height 9373 ? {width: width(this.$el.parentNode), height: this.height} 9374 : false; 9375 }, 9376 9377 write: function(dim) { 9378 height(this.$el, Dimensions.contain({ 9379 height: this.height, 9380 width: this.width 9381 }, dim).height); 9382 }, 9383 9384 events: ['resize'] 9385 9386 } 9387 9388 }; 9389 9390 var scroll = { 9391 9392 props: { 9393 duration: Number, 9394 offset: Number 9395 }, 9396 9397 data: { 9398 duration: 1000, 9399 offset: 0 9400 }, 9401 9402 methods: { 9403 9404 scrollTo: function(el) { 9405 var this$1 = this; 9406 9407 9408 el = el && $(el) || document.body; 9409 9410 if (trigger(this.$el, 'beforescroll', [this, el])) { 9411 scrollIntoView(el, this.$props).then(function () { return trigger(this$1.$el, 'scrolled', [this$1, el]); } 9412 ); 9413 } 9414 9415 } 9416 9417 }, 9418 9419 events: { 9420 9421 click: function(e) { 9422 9423 if (e.defaultPrevented) { 9424 return; 9425 } 9426 9427 e.preventDefault(); 9428 this.scrollTo(escape(decodeURIComponent(this.$el.hash)).substr(1)); 9429 } 9430 9431 } 9432 9433 }; 9434 9435 var scrollspy = { 9436 9437 args: 'cls', 9438 9439 props: { 9440 cls: String, 9441 target: String, 9442 hidden: Boolean, 9443 offsetTop: Number, 9444 offsetLeft: Number, 9445 repeat: Boolean, 9446 delay: Number 9447 }, 9448 9449 data: function () { return ({ 9450 cls: false, 9451 target: false, 9452 hidden: true, 9453 offsetTop: 0, 9454 offsetLeft: 0, 9455 repeat: false, 9456 delay: 0, 9457 inViewClass: 'uk-scrollspy-inview' 9458 }); }, 9459 9460 computed: { 9461 9462 elements: { 9463 9464 get: function(ref, $el) { 9465 var target = ref.target; 9466 9467 return target ? $$(target, $el) : [$el]; 9468 }, 9469 9470 watch: function(elements) { 9471 if (this.hidden) { 9472 css(filter(elements, (":not(." + (this.inViewClass) + ")")), 'visibility', 'hidden'); 9473 } 9474 }, 9475 9476 immediate: true 9477 9478 } 9479 9480 }, 9481 9482 update: [ 9483 9484 { 9485 9486 read: function(ref) { 9487 var this$1 = this; 9488 var update = ref.update; 9489 9490 9491 if (!update) { 9492 return; 9493 } 9494 9495 this.elements.forEach(function (el) { 9496 9497 var state = el._ukScrollspyState; 9498 9499 if (!state) { 9500 state = {cls: data(el, 'uk-scrollspy-class') || this$1.cls}; 9501 } 9502 9503 state.show = isInView(el, this$1.offsetTop, this$1.offsetLeft); 9504 el._ukScrollspyState = state; 9505 9506 }); 9507 9508 }, 9509 9510 write: function(data) { 9511 var this$1 = this; 9512 9513 9514 // Let child components be applied at least once first 9515 if (!data.update) {
9516 this.$update(); 9517 return data.update = true; 9518 } 9519 9520 this.elements.forEach(function (el) { 9521 9522 var state = el._ukScrollspyState; 9523 var toggle = function (inview) { 9524 9525 css(el, 'visibility', !inview && this$1.hidden ? 'hidden' : ''); 9526 9527 toggleClass(el, this$1.inViewClass, inview); 9528 toggleClass(el, state.cls); 9529 9530 trigger(el, inview ? 'inview' : 'outview'); 9531 9532 state.inview = inview; 9533 9534 this$1.$update(el); 9535 9536 }; 9537 9538 if (state.show && !state.inview && !state.queued) { 9539 9540 state.queued = true; 9541 9542 data.promise = (data.promise || Promise.resolve()).then(function () { return new Promise(function (resolve) { return setTimeout(resolve, this$1.delay); } 9543 ); } 9544 ).then(function () { 9545 toggle(true); 9546 setTimeout(function () { return state.queued = false; }, 300); 9547 }); 9548 9549 } else if (!state.show && state.inview && !state.queued && this$1.repeat) { 9550 9551 toggle(false); 9552 9553 } 9554 9555 }); 9556 9557 }, 9558 9559 events: ['scroll', 'resize'] 9560 9561 } 9562 9563 ] 9564 9565 }; 9566 9567 var scrollspyNav = { 9568 9569 props: { 9570 cls: String, 9571 closest: String, 9572 scroll: Boolean, 9573 overflow: Boolean, 9574 offset: Number 9575 }, 9576 9577 data: { 9578 cls: 'uk-active', 9579 closest: false, 9580 scroll: false, 9581 overflow: true, 9582 offset: 0 9583 }, 9584 9585 computed: { 9586 9587 links: { 9588 9589 get: function(_, $el) { 9590 return $$('a[href^="#"]', $el).filter(function (el) { return el.hash; }); 9591 }, 9592 9593 watch: function(links) { 9594 if (this.scroll) { 9595 this.$create('scroll', links, {offset: this.offset || 0}); 9596 } 9597 }, 9598 9599 immediate: true 9600 9601 }, 9602 9603 targets: function() { 9604 return $$(this.links.map(function (el) { return escape(el.hash).substr(1); }).join(',')); 9605 }, 9606 9607 elements: function(ref) { 9608 var selector = ref.closest; 9609 9610 return closest($$(this.targets.map(function (el) { return ("[href=\"#" + (el.id) + "\"]"); }).join(',')), selector || '*'); 9611 } 9612 9613 }, 9614 9615 update: [ 9616 9617 { 9618 9619 read: function() { 9620 var this$1 = this; 9621 9622 9623 var ref = this.targets; 9624 var length = ref.length; 9625 9626 if (!length || !isVisible(this.$el)) { 9627 return false; 9628 } 9629 9630 var scrollElement = last(scrollParents(this.targets[0])); 9631 var scrollTop = scrollElement.scrollTop; 9632 var scrollHeight = scrollElement.scrollHeight; 9633 var viewport = getViewport(scrollElement); 9634 var scroll = scrollTop; 9635 var max = scrollHeight - offset(viewport).height; 9636 var active = false; 9637 9638 if (scroll === max) { 9639 active = length - 1; 9640 } else { 9641 9642 this.targets.every(function (el, i) { 9643 var ref = position(el, viewport); 9644 var top = ref.top; 9645 if (top - this$1.offset <= 0) { 9646 active = i; 9647 return true; 9648 } 9649 }); 9650 9651 if (active === false && this.overflow) { 9652 active = 0; 9653 } 9654 } 9655 9656 return {active: active}; 9657 }, 9658 9659 write: function(ref) { 9660 var active = ref.active; 9661 9662 9663 this.links.forEach(function (el) { return el.blur(); }); 9664 removeClass(this.elements, this.cls); 9665 9666 if (active !== false) { 9667 trigger(this.$el, 'active', [active, addClass(this.elements[active], this.cls)]); 9668 } 9669 9670 }, 9671 9672 events: ['scroll', 'resize'] 9673 9674 } 9675 9676 ] 9677 9678 }; 9679 9680 var sticky = { 9681 9682 mixins: [Class, Media], 9683 9684 props: { 9685 top: null, 9686 bottom: Boolean, 9687 offset: String, 9688 animation: String, 9689 clsActive: String, 9690 clsInactive: String, 9691 clsFixed: String, 9692 clsBelow: String, 9693 selTarget: String, 9694 widthElement: Boolean, 9695 showOnUp: Boolean, 9696 targetOffset: Number 9697 }, 9698 9699 data: { 9700 top: 0, 9701 bottom: false, 9702 offset: 0, 9703 animation: '', 9704 clsActive: 'uk-active', 9705 clsInactive: '', 9706 clsFixed: 'uk-sticky-fixed', 9707 clsBelow: 'uk-sticky-below', 9708 selTarget: '', 9709 widthElement: false, 9710 showOnUp: false, 9711 targetOffset: false 9712 }, 9713 9714 computed: { 9715 9716 offset: function(ref) { 9717 var offset = ref.offset; 9718 9719 return toPx(offset); 9720 }, 9721 9722 selTarget: function(ref, $el) { 9723 var selTarget = ref.selTarget; 9724 9725 return selTarget && $(selTarget, $el) || $el; 9726 }, 9727 9728 widthElement: function(ref, $el) { 9729 var widthElement = ref.widthElement; 9730 9731 return query(widthElement, $el) || this.placeholder; 9732 }, 9733 9734 isActive: { 9735 9736 get: function() { 9737 return hasClass(this.selTarget, this.clsActive); 9738 }, 9739 9740 set: function(value) { 9741 if (value && !this.isActive) { 9742 replaceClass(this.selTarget, this.clsInactive, this.clsActive); 9743 trigger(this.$el, 'active'); 9744 } else if (!value && !hasClass(this.selTarget, this.clsInactive)) { 9745 replaceClass(this.selTarget, this.clsActive, this.clsInactive); 9746 trigger(this.$el, 'inactive'); 9747 } 9748 } 9749 9750 } 9751 9752 }, 9753 9754 connected: function() { 9755 this.placeholder = $('+ .uk-sticky-placeholder', this.$el) || $('<div class="uk-sticky-placeholder"></div>'); 9756 this.isFixed = false;
9757 this.isActive = false; 9758 }, 9759 9760 disconnected: function() { 9761 9762 if (this.isFixed) { 9763 this.hide(); 9764 removeClass(this.selTarget, this.clsInactive); 9765 } 9766 9767 remove(this.placeholder); 9768 this.placeholder = null; 9769 this.widthElement = null; 9770 }, 9771 9772 events: [ 9773 9774 { 9775 9776 name: 'load hashchange popstate', 9777 9778 el: window, 9779 9780 handler: function() { 9781 var this$1 = this; 9782 9783 9784 if (!(this.targetOffset !== false && location.hash && window.pageYOffset > 0)) { 9785 return; 9786 } 9787 9788 var target = $(location.hash); 9789 9790 if (target) { 9791 fastdom.read(function () { 9792 9793 var ref = offset(target); 9794 var top = ref.top; 9795 var elTop = offset(this$1.$el).top; 9796 var elHeight = this$1.$el.offsetHeight; 9797 9798 if (this$1.isFixed && elTop + elHeight >= top && elTop <= top + target.offsetHeight) { 9799 scrollTop(window, top - elHeight - (isNumeric(this$1.targetOffset) ? this$1.targetOffset : 0) - this$1.offset); 9800 } 9801 9802 }); 9803 } 9804 9805 } 9806 9807 } 9808 9809 ], 9810 9811 update: [ 9812 9813 { 9814 9815 read: function(ref, type) { 9816 var height = ref.height; 9817 9818 9819 if (this.isActive && type !== 'update') { 9820 9821 this.hide(); 9822 height = this.$el.offsetHeight; 9823 this.show(); 9824 9825 } 9826 9827 height = !this.isActive ? this.$el.offsetHeight : height; 9828 9829 this.topOffset = offset(this.isFixed ? this.placeholder : this.$el).top; 9830 this.bottomOffset = this.topOffset + height; 9831 9832 var bottom = parseProp('bottom', this); 9833 9834 this.top = Math.max(toFloat(parseProp('top', this)), this.topOffset) - this.offset; 9835 this.bottom = bottom && bottom - height; 9836 this.inactive = !this.matchMedia; 9837 9838 return { 9839 lastScroll: false, 9840 height: height, 9841 margins: css(this.$el, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight']) 9842 }; 9843 }, 9844 9845 write: function(ref) { 9846 var height = ref.height; 9847 var margins = ref.margins; 9848 9849 9850 var ref$1 = this; 9851 var placeholder = ref$1.placeholder; 9852 9853 css(placeholder, assign({height: height}, margins)); 9854 9855 if (!within(placeholder, document)) { 9856 after(this.$el, placeholder); 9857 attr(placeholder, 'hidden', ''); 9858 } 9859 9860 // ensure active/inactive classes are applied 9861 this.isActive = this.isActive; 9862 9863 }, 9864 9865 events: ['resize'] 9866 9867 }, 9868 9869 { 9870 9871 read: function(ref) { 9872 var scroll = ref.scroll; if ( scroll === void 0 ) scroll = 0; 9873 9874 9875 this.width = (isVisible(this.widthElement) ? this.widthElement : this.$el).offsetWidth; 9876 9877 this.scroll = window.pageYOffset; 9878 9879 return { 9880 dir: scroll <= this.scroll ? 'down' : 'up', 9881 scroll: this.scroll, 9882 visible: isVisible(this.$el), 9883 top: offsetPosition(this.placeholder)[0] 9884 }; 9885 }, 9886 9887 write: function(data, type) { 9888 var this$1 = this; 9889 9890 9891 var initTimestamp = data.initTimestamp; if ( initTimestamp === void 0 ) initTimestamp = 0; 9892 var dir = data.dir; 9893 var lastDir = data.lastDir; 9894 var lastScroll = data.lastScroll; 9895 var scroll = data.scroll; 9896 var top = data.top; 9897 var visible = data.visible; 9898 var now = performance.now(); 9899 9900 data.lastScroll = scroll; 9901 9902 if (scroll < 0 || scroll === lastScroll || !visible || this.disabled || this.showOnUp && type !== 'scroll') { 9903 return; 9904 } 9905 9906 if (now - initTimestamp > 300 || dir !== lastDir) { 9907 data.initScroll = scroll; 9908 data.initTimestamp = now; 9909 } 9910 9911 data.lastDir = dir; 9912 9913 if (this.showOnUp && Math.abs(data.initScroll - scroll) <= 30 && Math.abs(lastScroll - scroll) <= 10) { 9914 return; 9915 } 9916 9917 if (this.inactive 9918 || scroll < this.top 9919 || this.showOnUp && (scroll <= this.top || dir === 'down' || dir === 'up' && !this.isFixed && scroll <= this.bottomOffset) 9920 ) { 9921 9922 if (!this.isFixed) { 9923 9924 if (Animation.inProgress(this.$el) && top > scroll) { 9925 Animation.cancel(this.$el); 9926 this.hide(); 9927 } 9928 9929 return; 9930 } 9931 9932 this.isFixed = false;
9933 9934 if (this.animation && scroll > this.topOffset) { 9935 Animation.cancel(this.$el); 9936 Animation.out(this.$el, this.animation).then(function () { return this$1.hide(); }, noop); 9937 } else { 9938 this.hide(); 9939 } 9940 9941 } else if (this.isFixed) { 9942 9943 this.update(); 9944 9945 } else if (this.animation) { 9946 9947 Animation.cancel(this.$el); 9948 this.show(); 9949 Animation.in(this.$el, this.animation).catch(noop); 9950 9951 } else { 9952 this.show(); 9953 } 9954 9955 }, 9956 9957 events: ['resize', 'scroll'] 9958 9959 } 9960 9961 ], 9962 9963 methods: { 9964 9965 show: function() { 9966 9967 this.isFixed = true; 9968 this.update(); 9969 attr(this.placeholder, 'hidden', null); 9970 9971 }, 9972 9973 hide: function() { 9974 9975 this.isActive = false; 9976 removeClass(this.$el, this.clsFixed, this.clsBelow); 9977 css(this.$el, {position: '', top: '', width: ''}); 9978 attr(this.placeholder, 'hidden', ''); 9979 9980 }, 9981 9982 update: function() { 9983 9984 var active = this.top !== 0 || this.scroll > this.top; 9985 var top = Math.max(0, this.offset); 9986 9987 if (this.bottom && this.scroll > this.bottom - this.offset) { 9988 top = this.bottom - this.scroll; 9989 } 9990 9991 css(this.$el, { 9992 position: 'fixed', 9993 top: (top + "px"), 9994 width: this.width 9995 }); 9996 9997 this.isActive = active; 9998 toggleClass(this.$el, this.clsBelow, this.scroll > this.bottomOffset); 9999 addClass(this.$el, this.clsFixed); 10000 10001 } 10002 10003 } 10004 10005 }; 10006 10007 function parseProp(prop, ref) { 10008 var $props = ref.$props; 10009 var $el = ref.$el; 10010 var propOffset = ref[(prop + "Offset")]; 10011 10012 10013 var value = $props[prop]; 10014 10015 if (!value) { 10016 return; 10017 } 10018 10019 if (isNumeric(value) && isString(value) && value.match(/^-?\d/)) { 10020 10021 return propOffset + toPx(value); 10022 10023 } else { 10024 10025 return offset(value === true ? $el.parentNode : query(value, $el)).bottom; 10026 10027 } 10028 } 10029 10030 var Switcher = { 10031 10032 mixins: [Togglable], 10033 10034 args: 'connect', 10035 10036 props: { 10037 connect: String, 10038 toggle: String, 10039 active: Number, 10040 swiping: Boolean 10041 }, 10042 10043 data: { 10044 connect: '~.uk-switcher', 10045 toggle: '> * > :first-child', 10046 active: 0, 10047 swiping: true, 10048 cls: 'uk-active', 10049 clsContainer: 'uk-switcher', 10050 attrItem: 'uk-switcher-item', 10051 queued: true 10052 }, 10053 10054 computed: { 10055 10056 connects: { 10057 10058 get: function(ref, $el) { 10059 var connect = ref.connect; 10060 10061 return queryAll(connect, $el); 10062 }, 10063 10064 watch: function(connects) { 10065 var this$1 = this; 10066 10067 10068 connects.forEach(function (list) { return this$1.updateAria(list.children); }); 10069 10070 if (this.swiping) { 10071 css(connects, 'touch-action', 'pan-y pinch-zoom'); 10072 } 10073 10074 }, 10075 10076 immediate: true 10077 10078 }, 10079 10080 children: { 10081 10082 get: function() { 10083 return toNodes(this.$el.children); 10084 }, 10085 10086 watch: function(children) { 10087 this.show(filter(children, ("." + (this.cls)))[0] || children[this.active] || children[0]); 10088 }, 10089 10090 immediate: true 10091 10092 }, 10093 10094 toggles: function(ref, $el) { 10095 var toggle = ref.toggle; 10096 10097 return $$(toggle, $el); 10098 } 10099 10100 }, 10101 10102 events: [ 10103 10104 { 10105 10106 name: 'click', 10107 10108 delegate: function() { 10109 return ((this.toggle) + ":not(.uk-disabled)"); 10110 }, 10111 10112 handler: function(e) { 10113 e.preventDefault(); 10114 this.show(children(this.$el).filter(function (el) { return within(e.current, el); })[0]); 10115 } 10116 10117 }, 10118 10119 { 10120 name: 'click', 10121 10122 el: function() { 10123 return this.connects; 10124 }, 10125 10126 delegate: function() { 10127 return ("[" + (this.attrItem) + "],[data-" + (this.attrItem) + "]"); 10128 }, 10129 10130 handler: function(e) { 10131 e.preventDefault(); 10132 this.show(data(e.current, this.attrItem)); 10133 } 10134 }, 10135 10136 { 10137 name: 'swipeRight swipeLeft', 10138 10139 filter: function() { 10140 return this.swiping; 10141 }, 10142 10143 el: function() { 10144 return this.connects; 10145 }, 10146 10147 handler: function(ref) { 10148 var type = ref.type; 10149 10150 this.show(endsWith(type, 'Left') ? 'next' : 'previous'); 10151 } 10152 } 10153 10154 ], 10155 10156 methods: { 10157 10158 index: function() { 10159 return !isEmpty(this.connects) ? index(filter(this.connects[0].children, ("." + (this.cls)))[
101590]) : -1; 10160 }, 10161 10162 show: function(item) { 10163 var this$1 = this; 10164 10165 10166 var ref = this; 10167 var children = ref.children; 10168 var length = children.length; 10169 var prev = this.index(); 10170 var hasPrev = prev >= 0; 10171 var dir = item === 'previous' ? -1 : 1; 10172 10173 var toggle, active, next = getIndex(item, children, prev); 10174 10175 for (var i = 0; i < length; i++, next = (next + dir + length) % length) { 10176 if (!matches(this.toggles[next], '.uk-disabled *, .uk-disabled, [disabled]')) { 10177 toggle = this.toggles[next]; 10178 active = children[next]; 10179 break; 10180 } 10181 } 10182 10183 if (!active || prev === next) { 10184 return; 10185 } 10186 10187 removeClass(children, this.cls); 10188 addClass(active, this.cls); 10189 attr(this.toggles, 'aria-expanded', false); 10190 attr(toggle, 'aria-expanded', true); 10191 10192 this.connects.forEach(function (list) { 10193 if (!hasPrev) { 10194 this$1.toggleNow(list.children[next]); 10195 } else { 10196 this$1.toggleElement([list.children[prev], list.children[next]]); 10197 } 10198 }); 10199 10200 } 10201 10202 } 10203 10204 }; 10205 10206 var tab = { 10207 10208 mixins: [Class], 10209 10210 extends: Switcher, 10211 10212 props: { 10213 media: Boolean 10214 }, 10215 10216 data: { 10217 media: 960, 10218 attrItem: 'uk-tab-item' 10219 }, 10220 10221 connected: function() { 10222 10223 var cls = hasClass(this.$el, 'uk-tab-left') 10224 ? 'uk-tab-left' 10225 : hasClass(this.$el, 'uk-tab-right') 10226 ? 'uk-tab-right' 10227 : false; 10228 10229 if (cls) { 10230 this.$create('toggle', this.$el, {cls: cls, mode: 'media', media: this.media}); 10231 } 10232 } 10233 10234 }; 10235 10236 var toggle = { 10237 10238 mixins: [Media, Togglable], 10239 10240 args: 'target', 10241 10242 props: { 10243 href: String, 10244 target: null, 10245 mode: 'list' 10246 }, 10247 10248 data: { 10249 href: false, 10250 target: false, 10251 mode: 'click', 10252 queued: true 10253 }, 10254 10255 computed: { 10256 10257 target: { 10258 10259 get: function(ref, $el) { 10260 var href = ref.href; 10261 var target = ref.target; 10262 10263 target = queryAll(target || href, $el); 10264 return target.length && target || [$el]; 10265 }, 10266 10267 watch: function() { 10268 trigger(this.target, 'updatearia', [this]); 10269 }, 10270 10271 immediate: true 10272 10273 } 10274 10275 }, 10276 10277 events: [ 10278 10279 { 10280 10281 name: (pointerEnter + " " + pointerLeave), 10282 10283 filter: function() { 10284 return includes(this.mode, 'hover'); 10285 }, 10286 10287 handler: function(e) { 10288 if (!isTouch(e)) { 10289 this.toggle(("toggle" + (e.type === pointerEnter ? 'show' : 'hide'))); 10290 } 10291 } 10292 10293 }, 10294 10295 { 10296 10297 name: 'click', 10298 10299 filter: function() { 10300 return includes(this.mode, 'click') || hasTouch && includes(this.mode, 'hover'); 10301 }, 10302 10303 handler: function(e) { 10304 10305 // TODO better isToggled handling 10306 var link; 10307 if (closest(e.target, 'a[href="#"], a[href=""]') 10308 || (link = closest(e.target, 'a[href]')) && ( 10309 this.cls && !hasClass(this.target, this.cls.split(' ')[0]) 10310 || !isVisible(this.target) 10311 || link.hash && matches(this.target, link.hash) 10312 ) 10313 ) { 10314 e.preventDefault(); 10315 } 10316 10317 this.toggle(); 10318 } 10319 10320 } 10321 10322 ], 10323 10324 update: { 10325 10326 read: function() { 10327 return includes(this.mode, 'media') && this.media 10328 ? {match: this.matchMedia} 10329 : false;
10330 }, 10331 10332 write: function(ref) { 10333 var match = ref.match; 10334 10335 10336 var toggled = this.isToggled(this.target); 10337 if (match ? !toggled : toggled) { 10338 this.toggle(); 10339 } 10340 10341 }, 10342 10343 events: ['resize'] 10344 10345 }, 10346 10347 methods: { 10348 10349 toggle: function(type) { 10350 if (trigger(this.target, type || 'toggle', [this])) { 10351 this.toggleElement(this.target); 10352 } 10353 } 10354 10355 } 10356 10357 }; 10358 10359 10360 10361 var coreComponents = /*#__PURE__*/Object.freeze({ 10362 __proto__: null, 10363 Accordion: Accordion, 10364 Alert: alert, 10365 Cover: cover, 10366 Drop: Drop, 10367 Dropdown: dropdown, 10368 FormCustom: formCustom, 10369 Gif: gif, 10370 Grid: grid, 10371 HeightMatch: heightMatch, 10372 HeightViewport: heightViewport, 10373 Icon: Icon, 10374 Img: img, 10375 Leader: leader, 10376 Margin: Margin, 10377 Modal: modal, 10378 Nav: nav, 10379 Navbar: navbar, 10380 Offcanvas: offcanvas, 10381 OverflowAuto: overflowAuto, 10382 Responsive: responsive, 10383 Scroll: scroll, 10384 Scrollspy: scrollspy, 10385 ScrollspyNav: scrollspyNav, 10386 Sticky: sticky, 10387 Svg: SVG, 10388 Switcher: Switcher, 10389 Tab: tab, 10390 Toggle: toggle, 10391 Video: Video, 10392 Close: Close, 10393 Spinner: Spinner, 10394 SlidenavNext: Slidenav, 10395 SlidenavPrevious: Slidenav, 10396 SearchIcon: Search, 10397 Marker: IconComponent, 10398 NavbarToggleIcon: IconComponent, 10399 OverlayIcon: IconComponent, 10400 PaginationNext: IconComponent, 10401 PaginationPrevious: IconComponent, 10402 Totop: IconComponent 10403 }); 10404 10405 var countdown = { 10406 10407 mixins: [Class], 10408 10409 props: { 10410 date: String, 10411 clsWrapper: String 10412 }, 10413 10414 data: { 10415 date: '', 10416 clsWrapper: '.uk-countdown-%unit%' 10417 }, 10418 10419 computed: { 10420 10421 date: function(ref) { 10422 var date = ref.date; 10423 10424 return Date.parse(date); 10425 }, 10426 10427 days: function(ref, $el) { 10428 var clsWrapper = ref.clsWrapper; 10429 10430 return $(clsWrapper.replace('%unit%', 'days'), $el); 10431 }, 10432 10433 hours: function(ref, $el) { 10434 var clsWrapper = ref.clsWrapper; 10435 10436 return $(clsWrapper.replace('%unit%', 'hours'), $el); 10437 }, 10438 10439 minutes: function(ref, $el) { 10440 var clsWrapper = ref.clsWrapper; 10441 10442 return $(clsWrapper.replace('%unit%', 'minutes'), $el); 10443 }, 10444 10445 seconds: function(ref, $el) { 10446 var clsWrapper = ref.clsWrapper; 10447 10448 return $(clsWrapper.replace('%unit%', 'seconds'), $el); 10449 }, 10450 10451 units: function() { 10452 var this$1 = this; 10453 10454 return ['days', 'hours', 'minutes', 'seconds'].filter(function (unit) { return this$1[unit]; }); 10455 } 10456 10457 }, 10458 10459 connected: function() { 10460 this.start(); 10461 }, 10462 10463 disconnected: function() { 10464 var this$1 = this; 10465 10466 this.stop(); 10467 this.units.forEach(function (unit) { return empty(this$1[unit]); }); 10468 }, 10469 10470 events: [ 10471 10472 { 10473 10474 name: 'visibilitychange', 10475 10476 el: document, 10477 10478 handler: function() { 10479 if (document.hidden) { 10480 this.stop(); 10481 } else { 10482 this.start(); 10483 } 10484 } 10485 10486 } 10487 10488 ], 10489 10490 update: { 10491 10492 write: function() { 10493 var this$1 = this; 10494 10495 10496 var timespan = getTimeSpan(this.date); 10497 10498 if (timespan.total <= 0) { 10499 10500 this.stop(); 10501 10502 timespan.days 10503 = timespan.hours 10504 = timespan.minutes 10505 = timespan.seconds 10506 = 0; 10507 } 10508
10509 this.units.forEach(function (unit) { 10510 10511 var digits = String(Math.floor(timespan[unit])); 10512 10513 digits = digits.length < 2 ? ("0" + digits) : digits; 10514 10515 var el = this$1[unit]; 10516 if (el.textContent !== digits) { 10517 digits = digits.split(''); 10518 10519 if (digits.length !== el.children.length) { 10520 html(el, digits.map(function () { return '<span></span>'; }).join('')); 10521 } 10522 10523 digits.forEach(function (digit, i) { return el.children[i].textContent = digit; }); 10524 } 10525 10526 }); 10527 10528 } 10529 10530 }, 10531 10532 methods: { 10533 10534 start: function() { 10535 10536 this.stop(); 10537 10538 if (this.date && this.units.length) { 10539 this.$update(); 10540 this.timer = setInterval(this.$update, 1000); 10541 } 10542 10543 }, 10544 10545 stop: function() { 10546 10547 if (this.timer) { 10548 clearInterval(this.timer); 10549 this.timer = null; 10550 } 10551 10552 } 10553 10554 } 10555 10556 }; 10557 10558 function getTimeSpan(date) { 10559 10560 var total = date - Date.now(); 10561 10562 return { 10563 total: total, 10564 seconds: total / 1000 % 60, 10565 minutes: total / 1000 / 60 % 60, 10566 hours: total / 1000 / 60 / 60 % 24, 10567 days: total / 1000 / 60 / 60 / 24 10568 }; 10569 } 10570 10571 var targetClass = 'uk-animation-target'; 10572 10573 var Animate = { 10574 10575 props: { 10576 animation: Number 10577 }, 10578 10579 data: { 10580 animation: 150 10581 }, 10582 10583 computed: { 10584 10585 target: function() { 10586 return this.$el; 10587 } 10588 10589 }, 10590 10591 methods: { 10592 10593 animate: function(action) { 10594 var this$1 = this; 10595 10596 10597 addStyle(); 10598 10599 var children$1 = children(this.target); 10600 var propsFrom = children$1.map(function (el) { return getProps(el, true); }); 10601 10602 var oldHeight = height(this.target); 10603 var oldScrollY = window.pageYOffset; 10604 10605 action(); 10606 10607 Transition.cancel(this.target); 10608 children$1.forEach(Transition.cancel); 10609 10610 reset(this.target); 10611 this.$update(this.target); 10612 fastdom.flush(); 10613 10614 var newHeight = height(this.target); 10615 10616 children$1 = children$1.concat(children(this.target).filter(function (el) { return !includes(children$1, el); })); 10617 10618 var propsTo = children$1.map(function (el, i) { return el.parentNode && i in propsFrom 10619 ? propsFrom[i] 10620 ? isVisible(el) 10621 ? getPositionWithMargin(el) 10622 : {opacity: 0} 10623 : {opacity: isVisible(el) ? 1 : 0} 10624 : false; } 10625 ); 10626 10627 propsFrom = propsTo.map(function (props, i) { 10628 var from = children$1[i].parentNode === this$1.target 10629 ? propsFrom[i] || getProps(children$1[i]) 10630 : false; 10631 10632 if (from) { 10633 if (!props) { 10634 delete from.opacity; 10635 } else if (!('opacity' in props)) { 10636 var opacity = from.opacity; 10637 10638 if (opacity % 1) { 10639 props.opacity = 1; 10640 } else { 10641 delete from.opacity; 10642 } 10643 } 10644 } 10645 10646 return from; 10647 }); 10648 10649 addClass(this.target, targetClass); 10650 children$1.forEach(function (el, i) { return propsFrom[i] && css(el, propsFrom[i]); }); 10651 css(this.target, 'height', oldHeight); 10652 scrollTop(window, oldScrollY); 10653 10654 return Promise.all(children$1.map(function (el, i) { return propsFrom[i] && propsTo[i] 10655 ? Transition.start(el, propsTo[i], this$1.animation, 'ease') 10656 : Promise.resolve(); } 10657 ).concat(Transition.start(this.target, {height: newHeight}, this.animation, 'ease'))).then(function () {
10658 children$1.forEach(function (el, i) { return css(el, {display: propsTo[i].opacity === 0 ? 'none' : '', zIndex: ''}); }); 10659 reset(this$1.target); 10660 this$1.$update(this$1.target); 10661 fastdom.flush(); // needed for IE11 10662 }, noop); 10663 10664 } 10665 } 10666 }; 10667 10668 function getProps(el, opacity) { 10669 10670 var zIndex = css(el, 'zIndex'); 10671 10672 return isVisible(el) 10673 ? assign({ 10674 display: '', 10675 opacity: opacity ? css(el, 'opacity') : '0', 10676 pointerEvents: 'none', 10677 position: 'absolute', 10678 zIndex: zIndex === 'auto' ? index(el) : zIndex 10679 }, getPositionWithMargin(el)) 10680 : false; 10681 } 10682 10683 function reset(el) { 10684 css(el.children, { 10685 height: '', 10686 left: '', 10687 opacity: '', 10688 pointerEvents: '', 10689 position: '', 10690 top: '', 10691 width: '' 10692 }); 10693 removeClass(el, targetClass); 10694 css(el, 'height', ''); 10695 } 10696 10697 function getPositionWithMargin(el) { 10698 var ref = offset(el); 10699 var height = ref.height; 10700 var width = ref.width; 10701 var ref$1 = position(el); 10702 var top = ref$1.top; 10703 var left = ref$1.left; 10704 10705 return {top: top, left: left, height: height, width: width}; 10706 } 10707 10708 var style; 10709 10710 function addStyle() { 10711 if (style) { 10712 return; 10713 } 10714 style = append(document.head, '<style>').sheet; 10715 style.insertRule( 10716 ("." + targetClass + " > * {\n margin-top: 0 !important;\n transform: none !important;\n }"), 0 10717 ); 10718 } 10719 10720 var filter$1 = { 10721 10722 mixins: [Animate], 10723 10724 args: 'target', 10725 10726 props: { 10727 target: Boolean, 10728 selActive: Boolean 10729 }, 10730 10731 data: { 10732 target: null, 10733 selActive: false, 10734 attrItem: 'uk-filter-control', 10735 cls: 'uk-active', 10736 animation: 250 10737 }, 10738 10739 computed: { 10740 10741 toggles: { 10742 10743 get: function(ref, $el) { 10744 var attrItem = ref.attrItem; 10745 10746 return $$(("[" + (this.attrItem) + "],[data-" + (this.attrItem) + "]"), $el); 10747 }, 10748 10749 watch: function() { 10750 var this$1 = this; 10751 10752 10753 this.updateState(); 10754 10755 if (this.selActive !== false) { 10756 var actives = $$(this.selActive, this.$el); 10757 this.toggles.forEach(function (el) { return toggleClass(el, this$1.cls, includes(actives, el)); }); 10758 } 10759 10760 }, 10761 10762 immediate: true 10763 10764 }, 10765 10766 target: function(ref, $el) { 10767 var target = ref.target; 10768 10769 return $(target, $el); 10770 }, 10771 10772 children: { 10773 10774 get: function() { 10775 return children(this.target); 10776 }, 10777 10778 watch: function(list, old) { 10779 if (!isEqualList(list, old)) { 10780 this.updateState(); 10781 } 10782 } 10783 } 10784 10785 }, 10786 10787 events: [ 10788 10789 { 10790 10791 name: 'click', 10792 10793 delegate: function() { 10794 return ("[" + (this.attrItem) + "],[data-" + (this.attrItem) + "]"); 10795 }, 10796 10797 handler: function(e) { 10798 10799 e.preventDefault(); 10800 this.apply(e.current); 10801 10802 } 10803 10804 } 10805 10806 ], 10807 10808 methods: { 10809 10810 apply: function(el) { 10811 this.setState(mergeState(el, this.attrItem, this.getState())); 10812 }, 10813 10814 getState: function() { 10815 var this$1 = this; 10816 10817 return this.toggles 10818 .filter(function (item) { return hasClass(item, this$1.cls); }) 10819 .reduce(function (state, el) { return mergeState(el, this$1.attrItem, state); }, {filter: {'': ''}, sort: []}); 10820 }, 10821 10822 setState: function(state, animate) { 10823 var this$1 = this; 10824 if ( animate === void 0 ) animate = true; 10825 10826 10827 state = assign({filter: {'': ''}, sort: []}, state); 10828 10829 trigger(this.$el, 'beforeFilter', [this, state]); 10830 10831 var ref = this; 10832 var children = ref.children; 10833
10834 this.toggles.forEach(function (el) { return toggleClass(el, this$1.cls, !!matchFilter(el, this$1.attrItem, state)); }); 10835 10836 var apply = function () { 10837 10838 var selector = getSelector(state); 10839 10840 children.forEach(function (el) { return css(el, 'display', selector && !matches(el, selector) ? 'none' : ''); }); 10841 10842 var ref = state.sort; 10843 var sort = ref[0]; 10844 var order = ref[1]; 10845 10846 if (sort) { 10847 var sorted = sortItems(children, sort, order); 10848 if (!isEqual(sorted, children)) { 10849 sorted.forEach(function (el) { return append(this$1.target, el); }); 10850 } 10851 } 10852 10853 }; 10854 10855 if (animate) { 10856 this.animate(apply).then(function () { return trigger(this$1.$el, 'afterFilter', [this$1]); }); 10857 } else { 10858 apply(); 10859 trigger(this.$el, 'afterFilter', [this]); 10860 } 10861 10862 }, 10863 10864 updateState: function() { 10865 var this$1 = this; 10866 10867 fastdom.write(function () { return this$1.setState(this$1.getState(), false); }); 10868 } 10869 10870 } 10871 10872 }; 10873 10874 function getFilter(el, attr) { 10875 return parseOptions(data(el, attr), ['filter']); 10876 } 10877 10878 function mergeState(el, attr, state) { 10879 10880 var filterBy = getFilter(el, attr); 10881 var filter = filterBy.filter; 10882 var group = filterBy.group; 10883 var sort = filterBy.sort; 10884 var order = filterBy.order; if ( order === void 0 ) order = 'asc'; 10885 10886 if (filter || isUndefined(sort)) { 10887 10888 if (group) { 10889 10890 if (filter) { 10891 delete state.filter['']; 10892 state.filter[group] = filter; 10893 } else { 10894 delete state.filter[group]; 10895 10896 if (isEmpty(state.filter) || '' in state.filter) { 10897 state.filter = {'': filter || ''}; 10898 } 10899 10900 } 10901 10902 } else { 10903 state.filter = {'': filter || ''}; 10904 } 10905 10906 } 10907 10908 if (!isUndefined(sort)) { 10909 state.sort = [sort, order]; 10910 } 10911 10912 return state; 10913 } 10914 10915 function matchFilter(el, attr, ref) { 10916 var stateFilter = ref.filter; if ( stateFilter === void 0 ) stateFilter = {'': ''}; 10917 var ref_sort = ref.sort; 10918 var stateSort = ref_sort[0]; 10919 var stateOrder = ref_sort[1]; 10920 10921 10922 var ref$1 = getFilter(el, attr); 10923 var filter = ref$1.filter; if ( filter === void 0 ) filter = ''; 10924 var group = ref$1.group; if ( group === void 0 ) group = ''; 10925 var sort = ref$1.sort; 10926 var order = ref$1.order; if ( order === void 0 ) order = 'asc'; 10927 10928 return isUndefined(sort) 10929 ? group in stateFilter && filter === stateFilter[group] 10930 || !filter && group && !(group in stateFilter) && !stateFilter[''] 10931 : stateSort === sort && stateOrder === order; 10932 } 10933 10934 function isEqualList(listA, listB) { 10935 return listA.length === listB.length 10936 && listA.every(function (el) { return ~listB.indexOf(el); }); 10937 } 10938 10939 function getSelector(ref) { 10940 var filter = ref.filter; 10941 10942 var selector = ''; 10943 each(filter, function (value) { return selector += value || ''; }); 10944 return selector; 10945 } 10946 10947 function sortItems(nodes, sort, order) { 10948 return assign([], nodes).sort(function (a, b) { return data(a, sort).localeCompare(data(b, sort), undefined, {numeric: true}) * (order === 'asc' || -1); }); 10949 } 10950 10951 var Animations = { 10952 10953 slide: { 10954 10955 show: function(dir) { 10956 return [ 10957 {transform: translate(dir * -100)}, 10958 {transform: translate()} 10959 ]; 10960 }, 10961 10962 percent: function(current) { 10963 return translated(current); 10964 }, 10965 10966 translate: function(percent, dir) { 10967 return [ 10968 {transform: translate(dir * -100 * percent)}
10968, 10969 {transform: translate(dir * 100 * (1 - percent))} 10970 ]; 10971 } 10972 10973 } 10974 10975 }; 10976 10977 function translated(el) { 10978 return Math.abs(css(el, 'transform').split(',')[4] / el.offsetWidth) || 0; 10979 } 10980 10981 function translate(value, unit) { 10982 if ( value === void 0 ) value = 0; 10983 if ( unit === void 0 ) unit = '%'; 10984 10985 value += value ? unit : ''; 10986 return isIE ? ("translateX(" + value + ")") : ("translate3d(" + value + ", 0, 0)"); // currently not translate3d in IE, translate3d within translate3d does not work while transitioning 10987 } 10988 10989 function scale3d(value) { 10990 return ("scale3d(" + value + ", " + value + ", 1)"); 10991 } 10992 10993 var Animations$1 = assign({}, Animations, { 10994 10995 fade: { 10996 10997 show: function() { 10998 return [ 10999 {opacity: 0}, 11000 {opacity: 1} 11001 ]; 11002 }, 11003 11004 percent: function(current) { 11005 return 1 - css(current, 'opacity'); 11006 }, 11007 11008 translate: function(percent) { 11009 return [ 11010 {opacity: 1 - percent}, 11011 {opacity: percent} 11012 ]; 11013 } 11014 11015 }, 11016 11017 scale: { 11018 11019 show: function() { 11020 return [ 11021 {opacity: 0, transform: scale3d(1 - .2)}, 11022 {opacity: 1, transform: scale3d(1)} 11023 ]; 11024 }, 11025 11026 percent: function(current) { 11027 return 1 - css(current, 'opacity'); 11028 }, 11029 11030 translate: function(percent) { 11031 return [ 11032 {opacity: 1 - percent, transform: scale3d(1 - .2 * percent)}, 11033 {opacity: percent, transform: scale3d(1 - .2 + .2 * percent)} 11034 ]; 11035 } 11036 11037 } 11038 11039 }); 11040 11041 function Transitioner(prev, next, dir, ref) { 11042 var animation = ref.animation; 11043 var easing = ref.easing; 11044 11045 11046 var percent = animation.percent; 11047 var translate = animation.translate; 11048 var show = animation.show; if ( show === void 0 ) show = noop; 11049 var props = show(dir); 11050 var deferred = new Deferred(); 11051 11052 return { 11053 11054 dir: dir, 11055 11056 show: function(duration, percent, linear) { 11057 var this$1 = this; 11058 if ( percent === void 0 ) percent = 0; 11059 11060 11061 var timing = linear ? 'linear' : easing; 11062 duration -= Math.round(duration * clamp(percent, -1, 1)); 11063 11064 this.translate(percent); 11065 11066 triggerUpdate(next, 'itemin', {percent: percent, duration: duration, timing: timing, dir: dir}); 11067 triggerUpdate(prev, 'itemout', {percent: 1 - percent, duration: duration, timing: timing, dir: dir}); 11068 11069 Promise.all([ 11070 Transition.start(next, props[1], duration, timing), 11071 Transition.start(prev, props[0], duration, timing) 11072 ]).then(function () { 11073 this$1.reset(); 11074 deferred.resolve(); 11075 }, noop); 11076 11077 return deferred.promise; 11078 }, 11079 11080 stop: function() { 11081 return Transition.stop([next, prev]); 11082 }, 11083 11084 cancel: function() { 11085 Transition.cancel([next, prev]); 11086 }, 11087 11088 reset: function() { 11089 for (var prop in props[0]) { 11090 css([next, prev], prop, ''); 11091 } 11092 }, 11093 11094 forward: function(duration, percent) { 11095 if ( percent === void 0 ) percent = this.percent(); 11096 11097 Transition.cancel([next, prev]); 11098 return this.show(duration, percent, true); 11099 11100 }, 11101 11102 translate: function(percent) { 11103 11104 this.reset(); 11105 11106 var props = translate(percent, dir); 11107 css(next, props[1]); 11108 css(prev, props[0]); 11109 triggerUpdate(next, 'itemtranslatein', {percent: percent, dir: dir}); 11110 triggerUpdate(prev, 'itemtranslateout', {percent: 1 - percent, dir: dir}); 11111 11112 }, 11113 11114 percent: function() { 11115 return percent(prev || next, next, dir); 11116 }, 11117 11118 getDistance: function() { 11119 return prev && prev.offsetWidth; 11120 } 11121 11122 }; 11123 11124 } 11125 11126 function triggerUpdate(el, type, data) { 11127 trigger(el, createEvent(type, false, false, data)); 11128 } 11129 11130 var SliderAutoplay = { 11131 11132 props: { 11133 autoplay: Boolean, 11134 autoplayInterval: Number, 11135 pauseOnHover: Boolean 11136 }, 11137 11138 data: { 11139 autoplay: false, 11140 autoplayInterval: 7000, 11141 pauseOnHover: true 11142 }, 11143 11144 connected: function() { 11145 this.autoplay && this.startAutoplay(); 11146 }, 11147 11148 disconnected: function() { 11149 this.stopAutoplay(); 11150 }, 11151 11152 update: function() { 11153 attr(this.slides, 'tabindex', '-1'); 11154 }, 11155 11156 events: [ 11157 11158 { 11159 11160 name: 'visibilitychange', 11161 11162 el: document, 11163 11164 filter: function() { 11165 return this.autoplay; 11166 }, 11167 11168 handler: function() { 11169 if (document.hidden) { 11170 this.stopAutoplay(); 11171 } else { 11172 this.startAutoplay(); 11173 } 11174 } 11175 11176 } 11177 11178 ], 11179 11180 methods: { 11181 11182 startAutoplay: function() { 11183 var this$1 = this; 11184 11185 11186 this.stopAutoplay(); 11187 11188 this.interval = setInterval( 11189 function () { return (!this$1.draggable || !$(':focus', this$1.$el)) 11190 && (!this$1.pauseOnHover || !matches(this$1.$el, ':hover')) 11191 && !this$1.stack.length 11192 && this$1.show('next'); }, 11193 this.autoplayInterval 11194 ); 11195 11196 }, 11197 11198 stopAutoplay: function() { 11199 this.interval && clearInterval(this.interval); 11200 } 11201 11202 } 11203 11204 }; 11205 11206 var SliderDrag = { 11207 11208 props: { 11209 draggable: Boolean 11210 }, 11211 11212 data: { 11213 draggable: true, 11214 threshold: 10 11215 }, 11216 11217 created: function() { 11218 var this$1 = this; 11219 11220 11221 ['start', 'move', 'end'].forEach(function (key) { 11222 11223 var fn = this$1[key]; 11224 this$1[key] = function (e) { 11225 11226 var pos = getEventPos(e).x * (isRtl ? -1 : 1); 11227 11228 this$1.prevPos = pos !== this$1.pos ? this$1.pos : this$1.prevPos; 11229 this$1.pos = pos; 11230 11231 fn(e); 11232 }; 11233 11234 }); 11235 11236 }, 11237 11238 events: [ 11239 11240 { 11241 11242 name: pointerDown, 11243 11244 delegate: function() { 11245 return this.selSlides; 11246 }, 11247 11248 handler: function(e) { 11249 11250 if (!this.draggable 11251 || !isTouch(e) && hasTextNodesOnly(e.target) 11252 || closest(e.target, selInput) 11253 || e.button > 0 11254 || this.length < 2 11255 ) { 11256 return; 11257 } 11258 11259 this.start(e); 11260 } 11261 11262 }, 11263 11264 { 11265 11266 // Workaround for iOS 11 bug: https://bugs.webkit.org/show_bug.cgi?id=184250 11267 11268 name: 'touchmove', 11269 passive: false, 11270 handler: 'move', 11271 delegate: function() { 11272 return this.selSlides; 11273 } 11274 11275 }, 11276 11277 { 11278 name: 'dragstart', 11279 11280 handler: function(e) { 11281 e.preventDefault(); 11282 } 11283 } 11284 11285 ], 11286 11287 methods: { 11288 11289 start: function() { 11290 var this$1 = this; 11291 11292 11293 this.drag = this.pos; 11294 11295 if (this._transitioner) { 11296 11297 this.percent = this._transitioner.percent(); 11298 this.drag += this._transitioner.getDistance() * this.percent * this.dir; 11299 11300 this._transitioner.cancel(); 11301 this._transitioner.translate(this.percent); 11302 11303 this.dragging = true; 11304 11305 this.stack = []; 11306 11307 } else { 11308 this.prevIndex = this.index; 11309 } 11310 11311 // See above workaround notice 11312 var off = pointerMove !== 'touchmove' 11313 ? on(document, pointerMove, this.move, {passive: false}) 11314 : noop; 11315 this.unbindMove = function () { 11316 off(); 11317 this$1.unbindMove = null; 11318 }; 11319 on(window, 'scroll', this.unbindMove); 11320 on(document, pointerUp, this.end, true); 11321 11322 css(this.list, 'userSelect', 'none'); 11323 11324 }, 11325 11326 move: function(e) { 11327 var this$1 = this; 11328 11329 11330 // See above workaround notice 11331 if (!this.unbindMove) { 11332 return; 11333 } 11334 11335 var distance = this.pos - this.drag; 11336 11337 if (distance === 0 || this.prevPos === this.pos || !this.dragging && Math.abs(distance) < this.threshold) { 11338 return; 11339 } 11340
11341 css(this.list, 'pointerEvents', 'none'); 11342 11343 e.cancelable && e.preventDefault(); 11344 11345 this.dragging = true; 11346 this.dir = (distance < 0 ? 1 : -1); 11347 11348 var ref = this; 11349 var slides = ref.slides; 11350 var ref$1 = this; 11351 var prevIndex = ref$1.prevIndex; 11352 var dis = Math.abs(distance); 11353 var nextIndex = this.getIndex(prevIndex + this.dir, prevIndex); 11354 var width = this._getDistance(prevIndex, nextIndex) || slides[prevIndex].offsetWidth; 11355 11356 while (nextIndex !== prevIndex && dis > width) { 11357 11358 this.drag -= width * this.dir; 11359 11360 prevIndex = nextIndex; 11361 dis -= width; 11362 nextIndex = this.getIndex(prevIndex + this.dir, prevIndex); 11363 width = this._getDistance(prevIndex, nextIndex) || slides[prevIndex].offsetWidth; 11364 11365 } 11366 11367 this.percent = dis / width; 11368 11369 var prev = slides[prevIndex]; 11370 var next = slides[nextIndex]; 11371 var changed = this.index !== nextIndex; 11372 var edge = prevIndex === nextIndex; 11373 11374 var itemShown; 11375 11376 [this.index, this.prevIndex].filter(function (i) { return !includes([nextIndex, prevIndex], i); }).forEach(function (i) { 11377 trigger(slides[i], 'itemhidden', [this$1]); 11378 11379 if (edge) { 11380 itemShown = true; 11381 this$1.prevIndex = prevIndex; 11382 } 11383 11384 }); 11385 11386 if (this.index === prevIndex && this.prevIndex !== prevIndex || itemShown) { 11387 trigger(slides[this.index], 'itemshown', [this]); 11388 } 11389 11390 if (changed) { 11391 this.prevIndex = prevIndex; 11392 this.index = nextIndex; 11393 11394 !edge && trigger(prev, 'beforeitemhide', [this]); 11395 trigger(next, 'beforeitemshow', [this]); 11396 } 11397 11398 this._transitioner = this._translate(Math.abs(this.percent), prev, !edge && next); 11399 11400 if (changed) { 11401 !edge && trigger(prev, 'itemhide', [this]); 11402 trigger(next, 'itemshow', [this]); 11403 } 11404 11405 }, 11406 11407 end: function() { 11408 11409 off(window, 'scroll', this.unbindMove); 11410 this.unbindMove && this.unbindMove(); 11411 off(document, pointerUp, this.end, true); 11412 11413 if (this.dragging) { 11414 11415 this.dragging = null; 11416 11417 if (this.index === this.prevIndex) { 11418 this.percent = 1 - this.percent; 11419 this.dir *= -1; 11420 this._show(false, this.index, true); 11421 this._transitioner = null; 11422 } else { 11423 11424 var dirChange = (isRtl ? this.dir * (isRtl ? 1 : -1) : this.dir) < 0 === this.prevPos > this.pos; 11425 this.index = dirChange ? this.index : this.prevIndex; 11426 11427 if (dirChange) { 11428 this.percent = 1 - this.percent; 11429 } 11430 11431 this.show(this.dir > 0 && !dirChange || this.dir < 0 && dirChange ? 'next' : 'previous', true); 11432 } 11433 11434 } 11435 11436 css(this.list, {userSelect: '', pointerEvents: ''}); 11437 11438 this.drag 11439 = this.percent 11440 = null; 11441 11442 } 11443 11444 } 11445 11446 }; 11447 11448 function hasTextNodesOnly(el) { 11449 return !el.children.length && el.childNodes.length; 11450 } 11451 11452 var SliderNav = { 11453 11454 data: { 11455 selNav: false 11456 }, 11457 11458 computed: { 11459 11460 nav: function(ref, $el) { 11461 var selNav = ref.selNav; 11462 11463 return $(selNav, $el); 11464 }, 11465 11466 selNavItem: function(ref) { 11467 var attrItem = ref.attrItem; 11468 11469 return ("[" + attrItem + "],[data-" + attrItem + "]"); 11470 }, 11471 11472 navItems: function(_, $el) { 11473 return $$(this.selNavItem, $el); 11474 } 11475 11476 }, 11477 11478 update: { 11479 11480 write: function() { 11481 var this$1 = this; 11482 11483 11484 if (this.nav && this.length !== this.nav.children.length) { 11485 html(this.nav, this.slides.map(function (_, i) { return ("<li " + (this$1.attrItem) + "=\"" + i + "\"><a href=\"#\"></a></li>"); }).join('')); 11486 } 11487 11488 toggleClass($$(this.selNavItem, this.$el).concat(this.nav), 'uk-hidden', !this.maxIndex); 11489 11490 this.updateNav(); 11491 11492 }, 11493 11494 events: ['resize'] 11495 11496 }, 11497 11498 events: [ 11499 11500 { 11501 11502 name: 'click', 11503 11504 delegate: function() { 11505 return this.selNavItem; 11506 }, 11507 11508 handler: function(e) { 11509 e.preventDefault(); 11510 this.show(data(e.current, this.attrItem)); 11511 } 11512 11513 }, 11514 11515 { 11516 11517 name: 'itemshow', 11518 handler: 'updateNav' 11519 11520 } 11521 11522 ], 11523 11524 methods: { 11525 11526 updateNav: function() { 11527 var this$1 = this; 11528 11529 11530 var i = this.getValidIndex();
11531 this.navItems.forEach(function (el) { 11532 11533 var cmd = data(el, this$1.attrItem); 11534 11535 toggleClass(el, this$1.clsActive, toNumber(cmd) === i); 11536 toggleClass(el, 'uk-invisible', this$1.finite && (cmd === 'previous' && i === 0 || cmd === 'next' && i >= this$1.maxIndex)); 11537 }); 11538 11539 } 11540 11541 } 11542 11543 }; 11544 11545 var Slider = { 11546 11547 mixins: [SliderAutoplay, SliderDrag, SliderNav], 11548 11549 props: { 11550 clsActivated: Boolean, 11551 easing: String, 11552 index: Number, 11553 finite: Boolean, 11554 velocity: Number, 11555 selSlides: String 11556 }, 11557 11558 data: function () { return ({ 11559 easing: 'ease', 11560 finite: false, 11561 velocity: 1, 11562 index: 0, 11563 prevIndex: -1, 11564 stack: [], 11565 percent: 0, 11566 clsActive: 'uk-active', 11567 clsActivated: false, 11568 Transitioner: false, 11569 transitionOptions: {} 11570 }); }, 11571 11572 connected: function() { 11573 this.prevIndex = -1; 11574 this.index = this.getValidIndex(this.index); 11575 this.stack = []; 11576 }, 11577 11578 disconnected: function() { 11579 removeClass(this.slides, this.clsActive); 11580 }, 11581 11582 computed: { 11583 11584 duration: function(ref, $el) { 11585 var velocity = ref.velocity; 11586 11587 return speedUp($el.offsetWidth / velocity); 11588 }, 11589 11590 list: function(ref, $el) { 11591 var selList = ref.selList; 11592 11593 return $(selList, $el); 11594 }, 11595 11596 maxIndex: function() { 11597 return this.length - 1; 11598 }, 11599 11600 selSlides: function(ref) { 11601 var selList = ref.selList; 11602 var selSlides = ref.selSlides; 11603 11604 return (selList + " " + (selSlides || '> *')); 11605 }, 11606 11607 slides: { 11608 11609 get: function() { 11610 return $$(this.selSlides, this.$el); 11611 }, 11612 11613 watch: function() { 11614 this.$reset(); 11615 } 11616 11617 }, 11618 11619 length: function() { 11620 return this.slides.length; 11621 } 11622 11623 }, 11624 11625 events: { 11626 11627 itemshown: function() { 11628 this.$update(this.list); 11629 } 11630 11631 }, 11632 11633 methods: { 11634 11635 show: function(index, force) { 11636 var this$1 = this; 11637 if ( force === void 0 ) force = false; 11638 11639 11640 if (this.dragging || !this.length) { 11641 return; 11642 } 11643 11644 var ref = this; 11645 var stack = ref.stack; 11646 var queueIndex = force ? 0 : stack.length; 11647 var reset = function () { 11648 stack.splice(queueIndex, 1); 11649 11650 if (stack.length) { 11651 this$1.show(stack.shift(), true); 11652 } 11653 }; 11654 11655 stack[force ? 'unshift' : 'push'](index); 11656 11657 if (!force && stack.length > 1) { 11658 11659 if (stack.length === 2) { 11660 this._transitioner.forward(Math.min(this.duration, 200)); 11661 } 11662 11663 return; 11664 } 11665 11666 var prevIndex = this.index; 11667 var prev = hasClass(this.slides, this.clsActive) && this.slides[prevIndex]; 11668 var nextIndex = this.getIndex(index, this.index); 11669 var next = this.slides[nextIndex]; 11670 11671 if (prev === next) { 11672 reset(); 11673 return; 11674 } 11675 11676 this.dir = getDirection(index, prevIndex); 11677 this.prevIndex = prevIndex; 11678 this.index = nextIndex; 11679 11680 prev && trigger(prev, 'beforeitemhide', [this]); 11681 if (!trigger(next, 'beforeitemshow', [this, prev])) { 11682 this.index = this.prevIndex; 11683 reset(); 11684 return; 11685 } 11686 11687 var promise = this._show(prev, next, force).then(function () { 11688 11689 prev && trigger(prev, 'itemhidden', [this$1]); 11690 trigger(next, 'itemshown', [this$1]); 11691 11692 return new Promise(function (resolve) { 11693 fastdom.write(function () { 11694 stack.shift(); 11695 if (stack.length) { 11696 this$1.show(stack.shift(), true); 11697 } else { 11698 this$1._transitioner = null; 11699 } 11700 resolve(); 11701 }); 11702 }); 11703 11704 }); 11705 11706 prev && trigger(prev, 'itemhide', [this]); 11707 trigger(next, 'itemshow', [this]); 11708 11709 return promise; 11710 11711 }, 11712 11713 getIndex: function(index, prev) { 11714 if ( index === void 0 ) index = this.index; 11715 if ( prev === void 0 ) prev = this.index; 11716 11717 return clamp(getIndex(index, this.slides, prev, this.finite), 0, this.maxIndex); 11718 }, 11719 11720 getValidIndex: function(index, prevIndex) { 11721 if ( index === void 0 ) index = this.index; 11722 if ( prevIndex === void 0 ) prevIndex = this.prevIndex; 11723 11724 return this.getIndex(index, prevIndex); 11725 }, 11726 11727 _show: function(prev, next, force) { 11728 11729 this._transitioner = this._getTransitioner( 11730 prev, 11731 next, 11732 this.dir, 11733 assign({ 11734 easing: force 11735 ? next.offsetWidth < 600 11736 ? 'cubic-bezier(0.25, 0.46, 0.45, 0.94)' /* easeOutQuad */ 11737 : 'cubic-bezier(0.165, 0.84, 0.44, 1)' /* easeOutQuart */ 11738 : this.easing 11739 }, this.transitionOptions) 11740 ); 11741 11742 if (!force && !prev) { 11743 this._translate(1); 11744 return Promise.resolve(); 11745 } 11746 11747 var ref = this.stack; 11748 var length = ref.length; 11749 return this._transitioner[length > 1 ? 'forward' : 'show'](length > 1 ? Math.min(this.duration, 75 + 75 / (length - 1)) : this.duration, this.percent); 11750 11751 }, 11752 11753 _getDistance: function(prev, next) { 11754 return this._getTransitioner(prev, prev !== next && next).getDistance(); 11755 }, 11756 11757 _translate: function(percent, prev, next) { 11758 if ( prev === void 0 ) prev = this.prevIndex; 11759 if ( next === void 0 ) next = this.index; 11760 11761 var transitioner = this._getTransitioner(prev !== next ? prev : false, next); 11762 transitioner.translate(percent); 11763 return transitioner; 11764 }, 11765 11766 _getTransitioner: function(prev, next, dir, options) { 11767 if ( prev === void 0 ) prev = this.prevIndex; 11768 if ( next === void 0 ) next = this.index; 11769 if ( dir === void 0 ) dir = this.dir || 1; 11770 if ( options === void 0 ) options = this.transitionOptions; 11771 11772 return new this.Transitioner( 11773 isNumber(prev) ? this.slides[prev] : prev, 11774 isNumber(next) ? this.slides[next] : next, 11775 dir * (isRtl ? -1 : 1), 11776 options 11777 ); 11778 } 11779 11780 } 11781 11782 }; 11783 11784 function getDirection(index, prevIndex) { 11785 return index === 'next' 11786 ? 1 11787 : index === 'previous' 11788 ? -1 11789 : index < prevIndex 11790 ? -1 11791 : 1; 11792 } 11793 11794 function speedUp(x) { 11795 return .5 * x + 300; // parabola through (400,500; 600,600; 1800,1200) 11796 } 11797 11798 var Slideshow = { 11799 11800 mixins: [Slider], 11801 11802 props: { 11803 animation: String 11804 }, 11805 11806 data: { 11807 animation: 'slide', 11808 clsActivated: 'uk-transition-active', 11809 Animations: Animations, 11810 Transitioner: Transitioner 11811 }, 11812 11813 computed: { 11814 11815 animation: function(ref) { 11816 var animation = ref.animation; 11817 var Animations = ref.Animations; 11818 11819 return assign(animation in Animations ? Animations[animation] : Animations.slide, {name: animation}); 11820 }, 11821 11822 transitionOptions: function() { 11823 return {animation: this.animation}; 11824 } 11825 11826 }, 11827 11828 events: { 11829 11830 'itemshow itemhide itemshown itemhidden': function(ref) { 11831 var target = ref.target; 11832 11833 this.$update(target); 11834 }, 11835 11836 beforeitemshow: function(ref) { 11837 var target = ref.target; 11838 11839 addClass(target, this.clsActive); 11840 }, 11841 11842 itemshown: function(ref) { 11843 var target = ref.target; 11844 11845 addClass(target, this.clsActivated); 11846 }, 11847 11848 itemhidden: function(ref) { 11849 var target = ref.target; 11850 11851 removeClass(target, this.clsActive, this.clsActivated); 11852 } 11853 11854 } 11855 11856 }; 11857 11858 var LightboxPanel = { 11859 11860 mixins: [Container, Modal, Togglable, Slideshow], 11861 11862 functional: true, 11863 11864 props: { 11865 delayControls: Number, 11866 preload: Number, 11867 videoAutoplay: Boolean,
11868 template: String 11869 }, 11870 11871 data: function () { return ({ 11872 preload: 1, 11873 videoAutoplay: false, 11874 delayControls: 3000, 11875 items: [], 11876 cls: 'uk-open', 11877 clsPage: 'uk-lightbox-page', 11878 selList: '.uk-lightbox-items', 11879 attrItem: 'uk-lightbox-item', 11880 selClose: '.uk-close-large', 11881 selCaption: '.uk-lightbox-caption', 11882 pauseOnHover: false, 11883 velocity: 2, 11884 Animations: Animations$1, 11885 template: "<div class=\"uk-lightbox uk-overflow-hidden\"> <ul class=\"uk-lightbox-items\"></ul> <div class=\"uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque\"> <button class=\"uk-lightbox-toolbar-icon uk-close-large\" type=\"button\" uk-close></button> </div> <a class=\"uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade\" href=\"#\" uk-slidenav-previous uk-lightbox-item=\"previous\"></a> <a class=\"uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade\" href=\"#\" uk-slidenav-next uk-lightbox-item=\"next\"></a> <div class=\"uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-sli
11885de-bottom uk-transition-opaque\"></div> </div>" 11886 }); }, 11887 11888 created: function() { 11889 11890 var $el = $(this.template); 11891 var list = $(this.selList, $el); 11892 this.items.forEach(function () { return append(list, '<li></li>'); }); 11893 11894 this.$mount(append(this.container, $el)); 11895 11896 }, 11897 11898 computed: { 11899 11900 caption: function(ref, $el) { 11901 var selCaption = ref.selCaption; 11902 11903 return $('.uk-lightbox-caption', $el); 11904 } 11905 11906 }, 11907 11908 events: [ 11909 11910 { 11911 11912 name: (pointerMove + " " + pointerDown + " keydown"), 11913 11914 handler: 'showControls' 11915 11916 }, 11917 11918 { 11919 11920 name: 'click', 11921 11922 self: true, 11923 11924 delegate: function() { 11925 return this.selSlides; 11926 }, 11927 11928 handler: function(e) { 11929 11930 if (e.defaultPrevented) { 11931 return; 11932 } 11933 11934 this.hide(); 11935 } 11936 11937 }, 11938 11939 { 11940 11941 name: 'shown', 11942 11943 self: true, 11944 11945 handler: function() { 11946 this.showControls(); 11947 } 11948 11949 }, 11950 11951 { 11952 11953 name: 'hide', 11954 11955 self: true, 11956 11957 handler: function() { 11958 11959 this.hideControls(); 11960 11961 removeClass(this.slides, this.clsActive); 11962 Transition.stop(this.slides); 11963 11964 } 11965 }, 11966 11967 { 11968 11969 name: 'hidden', 11970 11971 self: true, 11972 11973 handler: function() { 11974 this.$destroy(true); 11975 } 11976 11977 }, 11978 11979 { 11980 11981 name: 'keyup', 11982 11983 el: document, 11984 11985 handler: function(e) { 11986 11987 if (!this.isToggled(this.$el) || !this.draggable) { 11988 return; 11989 } 11990 11991 switch (e.keyCode) { 11992 case 37: 11993 this.show('previous'); 11994 break; 11995 case 39: 11996 this.show('next'); 11997 break; 11998 } 11999 } 12000 }, 12001 12002 { 12003 12004 name: 'beforeitemshow', 12005 12006 handler: function(e) { 12007 12008 if (this.isToggled()) { 12009 return; 12010 } 12011 12012 this.draggable = false; 12013 12014 e.preventDefault(); 12015 12016 this.toggleNow(this.$el, true); 12017 12018 this.animation = Animations$1['scale']; 12019 removeClass(e.target, this.clsActive); 12020 this.stack.splice(1, 0, this.index); 12021 12022 } 12023 12024 }, 12025 12026 { 12027 12028 name: 'itemshow', 12029 12030 handler: function(ref) { 12031 var target = ref.target; 12032 12033 12034 var i = index(target); 12035 var ref$1 = this.getItem(i); 12036 var caption = ref$1.caption; 12037
12038 css(this.caption, 'display', caption ? '' : 'none'); 12039 html(this.caption, caption); 12040 12041 for (var j = 0; j <= this.preload; j++) { 12042 this.loadItem(this.getIndex(i + j)); 12043 this.loadItem(this.getIndex(i - j)); 12044 } 12045 12046 } 12047 12048 }, 12049 12050 { 12051 12052 name: 'itemshown', 12053 12054 handler: function() { 12055 this.draggable = this.$props.draggable; 12056 } 12057 12058 }, 12059 12060 { 12061 12062 name: 'itemload', 12063 12064 handler: function(_, item) { 12065 var this$1 = this; 12066 12067 12068 var source = item.source; 12069 var type = item.type; 12070 var alt = item.alt; 12071 12072 this.setItem(item, '<span uk-spinner></span>'); 12073 12074 if (!source) { 12075 return; 12076 } 12077 12078 var matches; 12079 12080 // Image 12081 if (type === 'image' || source.match(/\.(jpe?g|png|gif|svg|webp)($|\?)/i)) { 12082 12083 getImage(source).then( 12084 function (img) { return this$1.setItem(item, ("<img width=\"" + (img.width) + "\" height=\"" + (img.height) + "\" src=\"" + source + "\" alt=\"" + (alt ? alt : '') + "\">")); }, 12085 function () { return this$1.setError(item); } 12086 ); 12087 12088 // Video 12089 } else if (type === 'video' || source.match(/\.(mp4|webm|ogv)($|\?)/i)) { 12090 12091 var video = $(("<video controls playsinline" + (item.poster ? (" poster=\"" + (item.poster) + "\"") : '') + " uk-video=\"" + (this.videoAutoplay) + "\"></video>")); 12092 attr(video, 'src', source); 12093 12094 once(video, 'error loadedmetadata', function (type) { 12095 if (type === 'error') { 12096 this$1.setError(item); 12097 } else { 12098 attr(video, {width: video.videoWidth, height: video.videoHeight}); 12099 this$1.setItem(item, video); 12100 } 12101 }); 12102 12103 // Iframe 12104 } else if (type === 'iframe' || source.match(/\.(html|php)($|\?)/i)) { 12105 12106 this.setItem(item, ("<iframe class=\"uk-lightbox-iframe\" src=\"" + source + "\" frameborder=\"0\" allowfullscreen></iframe>")); 12107 12108 // YouTube 12109 } else if ((matches = source.match(/\/\/.*?youtube(-nocookie)?\.[a-z]+\/watch\?v=([^&\s]+)/) || source.match(/()youtu\.be\/(.*)/))) { 12110 12111 var id = matches[2]; 12112 var setIframe = function (width, height) { 12113 if ( width === void 0 ) width = 640; 12114 if ( height === void 0 ) height = 450; 12115 12116 return this$1.setItem(item, getIframe(("https://www.youtube" + (matches[1] || '') + ".com/embed/" + id), width, height, this$1.videoAutoplay)); 12117 }; 12118 12119 getImage(("https://img.youtube.com/vi/" + id + "/maxresdefault.jpg")).then( 12120 function (ref) { 12121 var width = ref.width; 12122 var height = ref.height; 12123 12124 // YouTube default 404 thumb, fall back to low resolution 12125 if (width === 120 && height === 90) { 12126 getImage(("https://img.youtube.com/vi/" + id + "/0.jpg")).then( 12127 function (ref) { 12128 var width = ref.width; 12129 var height = ref.height; 12130 12131 return setIframe(width, height); 12132 }, 12133 setIframe 12134 ); 12135 } else { 12136 setIframe(width, height); 12137 } 12138 }, 12139 setIframe 12140 ); 12141 12142 // Vimeo 12143 } else if ((matches = source.match(/(\/\/.*?)vimeo\.[a-z]+\/([0-9]+).*?/))) { 12144 12145 ajax(("https://vimeo.com/api/oembed.json?maxwidth=1920&url=" + (encodeURI(source))), {responseType: 'json', withCredentials: false}) 12146 .then( 12147 function (ref) { 12148 var ref_response = ref.response; 12149 var height = ref_response.height; 12150 var width = ref_response.width; 12151 12152 return this$1.setItem(item, getIframe(("https://player.vimeo.com/video/" + (matches[2])), width, height, this$1.videoAutoplay)); 12153 }, 12154 function () { return this$1.setError(item); } 12155 ); 12156 12157 } 12158 12159 } 12160 12161 } 12162 12163 ], 12164 12165 methods: { 12166 12167 loadItem: function(index) { 12168 if ( index === void 0 ) index = this.index; 12169 12170 12171 var item = this.getItem(index); 12172 12173 if (item.content) { 12174 return; 12175 } 12176 12177 trigger(this.$el, 'itemload', [item]); 12178 }, 12179 12180 getItem: function(index) { 12181 if ( index === void 0 ) index = this.index; 12182 12183 return this.items[index] || {}; 12184 }, 12185 12186 setItem: function(item, content) { 12187 assign(item, {content: content}); 12188 var el = html(this.slides[this.items.indexOf(item)], content); 12189 trigger(this.$el, 'itemloaded', [this, el]); 12190 this.$update(el); 12191 }, 12192 12193 setError: function(item) { 12194 this.setItem(item, '<span uk-icon="icon: bolt; ratio: 2"></span>'); 12195 }, 12196 12197 showControls: function() { 12198 12199 clearTimeout(this.controlsTimer); 12200 this.controlsTimer = setTimeout(this.hideControls, this.delayControls); 12201 12202 addClass(this.$el, 'uk-active', 'uk-transition-active'); 12203 12204 }, 12205 12206 hideControls: function() { 12207 removeClass(this.$el, 'uk-active', 'uk-transition-active'); 12208 } 12209 12210 } 12211 12212 }; 12213 12214 function getIframe(src, width, height, autoplay) { 12215 return ("<iframe src=\"" + src + "\" width=\"" + width + "\" height=\"" + height + "\" style=\"max-width: 100%; box-sizing: border-box;\" frameborder=\"0\" allowfullscreen uk-video=\"autoplay: " + autoplay + "\" uk-responsive></iframe>"); 12216 } 12217 12218 var lightbox = { 12219 12220 install: install$2, 12221 12222 props: {toggle: String}, 12223 12224 data: {toggle: 'a'}, 12225 12226 computed: { 12227 12228 toggles: { 12229 12230 get: function(ref, $el) { 12231 var toggle = ref.toggle; 12232 12233 return $$(toggle, $el); 12234 }, 12235 12236 watch: function() { 12237 this.hide(); 12238 } 12239 12240 } 12241 12242 }, 12243 12244 disconnected: function() { 12245 this.hide(); 12246 }, 12247 12248 events: [ 12249 12250 { 12251 12252 name: 'click', 12253 12254 delegate: function() { 12255 return ((this.toggle) + ":not(.uk-disabled)"); 12256 }, 12257 12258 handler: function(e) { 12259 e.preventDefault(); 12260 this.show(e.current); 12261 } 12262 12263 } 12264 12265 ], 12266 12267 methods: { 12268 12269 show: function(index) { 12270 var this$1 = this; 12271 12272 12273 var items = uniqueBy(this.toggles.map(toItem), 'source'); 12274 12275 if (isElement(index)) { 12276 var ref = toItem(index); 12277 var source = ref.source; 12278 index = findIndex(items, function (ref) { 12279 var src = ref.source; 12280 12281 return source === src; 12282 }); 12283 } 12284 12285 this.panel = this.panel || this.$create('lightboxPanel', assign({}, this.$props, {items: items})); 12286 12287 on(this.panel.$el, 'hidden', function () { return this$1.panel = false; }); 12288 12289 return this.panel.show(index); 12290 12291 }, 12292 12293 hide: function() { 12294 12295 return this.panel && this.panel.hide(); 12296 12297 } 12298 12299 } 12300 12301 }; 12302 12303 function install$2(UIkit, Lightbox) { 12304 12305 if (!UIkit.lightboxPanel) { 12306 UIkit.component('lightboxPanel', LightboxPanel); 12307 } 12308 12309 assign( 12310 Lightbox.props, 12311 UIkit.component('lightboxPanel').options.props 12312 ); 12313 12314 } 12315 12316 function toItem(el) { 12317 return ['href', 'caption', 'type', 'poster', 'alt'].reduce(function (obj, attr) { 12318 obj[attr === 'href' ? 'source' : attr] = data(el, attr); 12319 return obj; 12320 }, {}); 12321 } 12322 12323 var obj; 12324 12325 var containers = {}; 12326 12327 var notification = { 12328 12329 functional: true, 12330 12331 args: ['message', 'status'], 12332 12333 data: { 12334 message: '', 12335 status: '', 12336 timeout: 5000, 12337 group: null, 12338 pos: 'top-center', 12339 clsClose: 'uk-notification-close', 12340 clsMsg: 'uk-notification-message' 12341 }, 12342 12343 install: install$3, 12344 12345 computed: { 12346 12347 marginProp: function(ref) { 12348 var pos = ref.pos; 12349 12350 return ("margin" + (startsWith(pos, 'top') ? 'Top' : 'Bottom')); 12351 }, 12352 12353 startProps: function() { 12354 var obj; 12355 12356 return ( obj = {opacity: 0}, obj[this.marginProp] = -this.$el.offsetHeight, obj ); 12357 } 12358 12359 }, 12360 12361 created: function() { 12362 12363 if (!containers[this.pos]) { 12364 containers[this.pos] = append(this.$container, ("<div class=\"uk-notification uk-notification-" + (this.pos) + "\"></div>")); 12365 } 12366 12367 var container = css(containers[this.pos], 'display', 'block'); 12368 12369 this.$mount(append(container, 12370 ("<div class=\"" + (this.clsMsg) + (this.status ? (" " + (this.clsMsg) + "-" + (this.status)) : '') + "\"> <a href=\"#\" class=\"" + (this.clsClose) + "\" data-uk-close></a> <div>" + (this.message) + "</div> </div>") 12371 )); 12372 12373 }, 12374 12375 connected: function() { 12376 var this$1 = this; 12377 var obj; 12378 12379 12380 var margin = toFloat(css(this.$el, this.marginProp)); 12381 Transition.start( 12382 css(this.$el, this.startProps), 12383 ( obj = {opacity: 1}, obj[this.marginProp] = margin, obj ) 12384 ).then(function () { 12385 if (this$1.timeout) { 12386 this$1.timer = setTimeout(this$1.close, this$1.timeout); 12387 } 12388 }); 12389 12390 }, 12391 12392 events: ( obj = { 12393 12394 click: function(e) { 12395 if (closest(e.target, 'a[href="#"],a[href=""]')) { 12396 e.preventDefault(); 12397 } 12398 this.close(); 12399 } 12400 12401 }, obj[pointerEnter] = function () { 12402 if (this.timer) { 12403 clearTimeout(this.timer); 12404 } 12405 }, obj[pointerLeave] = function () { 12406 if (this.timeout) { 12407 this.timer = setTimeout(this.close, this.timeout); 12408 } 12409 }, obj ), 12410 12411 methods: { 12412 12413 close: function(immediate) { 12414 var this$1 = this; 12415 12416 12417 var removeFn = function () { 12418 12419 trigger(this$1.$el, 'close', [this$1]); 12420 remove(this$1.$el); 12421 12422 if (!containers[this$1.pos].children.length) { 12423 css(containers[this$1.pos], 'display', 'none'); 12424 } 12425 12426 }; 12427 12428 if (this.timer) { 12429 clearTimeout(this.timer); 12430 } 12431 12432 if (immediate) { 12433 removeFn(); 12434 } else { 12435 Transition.start(this.$el, this.startProps).then(removeFn); 12436 } 12437 } 12438 12439 } 12440 12441 }; 12442 12443 function install$3(UIkit) { 12444 UIkit.notification.closeAll = function (group, immediate) { 12445 apply(document.body, function (el) { 12446 var notification = UIkit.getComponent(el, 'notification'); 12447 if (notification && (!group || group === notification.group)) { 12448 notification.close(immediate); 12449 } 12450 }); 12451 }; 12452 } 12453 12454 var props = ['x', 'y', 'bgx', 'bgy', 'rotate', 'scale', 'color', 'backgroundColor', 'borderColor', 'opacity', 'blur', 'hue', 'grayscale', 'invert', 'saturate', 'sepia', 'fopacity', 'stroke']; 12455 12456 var Parallax = { 12457 12458 mixins: [Media], 12459
12460 props: props.reduce(function (props, prop) { 12461 props[prop] = 'list'; 12462 return props; 12463 }, {}), 12464 12465 data: props.reduce(function (data, prop) { 12466 data[prop] = undefined; 12467 return data; 12468 }, {}), 12469 12470 computed: { 12471 12472 props: function(properties, $el) { 12473 var this$1 = this; 12474 12475 12476 return props.reduce(function (props, prop) { 12477 12478 if (isUndefined(properties[prop])) { 12479 return props; 12480 } 12481 12482 var isColor = prop.match(/color/i); 12483 var isCssProp = isColor || prop === 'opacity'; 12484 12485 var pos, bgPos, diff; 12486 var steps = properties[prop].slice(0); 12487 12488 if (isCssProp) { 12489 css($el, prop, ''); 12490 } 12491 12492 if (steps.length < 2) { 12493 steps.unshift((prop === 'scale' 12494 ? 1 12495 : isCssProp 12496 ? css($el, prop) 12497 : 0) || 0); 12498 } 12499 12500 var unit = getUnit(steps); 12501 12502 if (isColor) { 12503 12504 var ref = $el.style; 12505 var color = ref.color; 12506 steps = steps.map(function (step) { return parseColor($el, step); }); 12507 $el.style.color = color; 12508 12509 } else if (startsWith(prop, 'bg')) { 12510 12511 var attr = prop === 'bgy' ? 'height' : 'width'; 12512 steps = steps.map(function (step) { return toPx(step, attr, this$1.$el); }); 12513 12514 css($el, ("background-position-" + (prop[2])), ''); 12515 bgPos = css($el, 'backgroundPosition').split(' ')[prop[2] === 'x' ? 0 : 1]; // IE 11 can't read background-position-[x|y] 12516 12517 if (this$1.covers) { 12518 12519 var min = Math.min.apply(Math, steps); 12520 var max = Math.max.apply(Math, steps); 12521 var down = steps.indexOf(min) < steps.indexOf(max); 12522 12523 diff = max - min; 12524 12525 steps = steps.map(function (step) { return step - (down ? min : max); }); 12526 pos = (down ? -diff : 0) + "px"; 12527 12528 } else { 12529 12530 pos = bgPos; 12531 12532 } 12533 12534 } else { 12535 12536 steps = steps.map(toFloat); 12537 12538 } 12539 12540 if (prop === 'stroke') { 12541 12542 if (!steps.some(function (step) { return step; })) { 12543 return props; 12544 } 12545 12546 var length = getMaxPathLength(this$1.$el); 12547 css($el, 'strokeDasharray', length); 12548 12549 if (unit === '%') { 12550 steps = steps.map(function (step) { return step * length / 100; }); 12551 } 12552 12553 steps = steps.reverse(); 12554 12555 prop = 'strokeDashoffset'; 12556 } 12557 12558 props[prop] = {steps: steps, unit: unit, pos: pos, bgPos: bgPos, diff: diff}; 12559 12560 return props; 12561 12562 }, {}); 12563 12564 }, 12565 12566 bgProps: function() { 12567 var this$1 = this; 12568 12569 return ['bgx', 'bgy'].filter(function (bg) { return bg in this$1.props; }); 12570 }, 12571 12572 covers: function(_, $el) { 12573 return covers($el); 12574 } 12575 12576 }, 12577 12578 disconnected: function() { 12579 delete this._image; 12580 }, 12581 12582 update: { 12583 12584 read: function(data) { 12585 var this$1 = this; 12586 12587 12588 data.active = this.matchMedia; 12589 12590 if (!data.active) { 12591 return; 12592 } 12593 12594 if (!data.image && this.covers && this.bgProps.length) { 12595 var src = css(this.$el, 'backgroundImage').replace(/^none|url\(["']?(.+?)["']?\)$/, '$1'); 12596 12597 if (src) { 12598 var img = new Image(); 12599 img.src = src; 12600 data.image = img; 12601
12602 if (!img.naturalWidth) { 12603 img.onload = function () { return this$1.$update(); }; 12604 } 12605 } 12606 12607 } 12608 12609 var image = data.image; 12610 12611 if (!image || !image.naturalWidth) { 12612 return; 12613 } 12614 12615 var dimEl = { 12616 width: this.$el.offsetWidth, 12617 height: this.$el.offsetHeight 12618 }; 12619 var dimImage = { 12620 width: image.naturalWidth, 12621 height: image.naturalHeight 12622 }; 12623 12624 var dim = Dimensions.cover(dimImage, dimEl); 12625 12626 this.bgProps.forEach(function (prop) { 12627 12628 var ref = this$1.props[prop]; 12629 var diff = ref.diff; 12630 var bgPos = ref.bgPos; 12631 var steps = ref.steps; 12632 var attr = prop === 'bgy' ? 'height' : 'width'; 12633 var span = dim[attr] - dimEl[attr]; 12634 12635 if (span < diff) { 12636 dimEl[attr] = dim[attr] + diff - span; 12637 } else if (span > diff) { 12638 12639 var posPercentage = dimEl[attr] / toPx(bgPos, attr, this$1.$el); 12640 12641 if (posPercentage) { 12642 this$1.props[prop].steps = steps.map(function (step) { return step - (span - diff) / posPercentage; }); 12643 } 12644 } 12645 12646 dim = Dimensions.cover(dimImage, dimEl); 12647 }); 12648 12649 data.dim = dim; 12650 }, 12651 12652 write: function(ref) { 12653 var dim = ref.dim; 12654 var active = ref.active; 12655 12656 12657 if (!active) { 12658 css(this.$el, {backgroundSize: '', backgroundRepeat: ''}); 12659 return; 12660 } 12661 12662 dim && css(this.$el, { 12663 backgroundSize: ((dim.width) + "px " + (dim.height) + "px"), 12664 backgroundRepeat: 'no-repeat' 12665 }); 12666 12667 }, 12668 12669 events: ['resize'] 12670 12671 }, 12672 12673 methods: { 12674 12675 reset: function() { 12676 var this$1 = this; 12677 12678 each(this.getCss(0), function (_, prop) { return css(this$1.$el, prop, ''); }); 12679 }, 12680 12681 getCss: function(percent) { 12682 12683 var ref = this; 12684 var props = ref.props; 12685 return Object.keys(props).reduce(function (css, prop) { 12686 12687 var ref = props[prop]; 12688 var steps = ref.steps; 12689 var unit = ref.unit; 12690 var pos = ref.pos; 12691 var value = getValue(steps, percent); 12692 12693 switch (prop) { 12694 12695 // transforms 12696 case 'x': 12697 case 'y': { 12698 unit = unit || 'px'; 12699 css.transform += " translate" + (ucfirst(prop)) + "(" + (toFloat(value).toFixed(unit === 'px' ? 0 : 2)) + unit + ")"; 12700 break; 12701 } 12702 case 'rotate': 12703 unit = unit || 'deg'; 12704 css.transform += " rotate(" + (value + unit) + ")"; 12705 break; 12706 case 'scale': 12707 css.transform += " scale(" + value + ")"; 12708 break; 12709 12710 // bg image 12711 case 'bgy': 12712 case 'bgx': 12713 css[("background-position-" + (prop[2]))] = "calc(" + pos + " + " + value + "px)"; 12714 break; 12715 12716 // color 12717 case 'color': 12718 case 'backgroundColor': 12719 case 'borderColor': { 12720 12721 var ref$1 = getStep(steps, percent); 12722 var start = ref$1[0]; 12723 var end = ref$1[1]; 12724 var p = ref$1[2]; 12725 12726 css[prop] = "rgba(" + (start.map(function (value, i) { 12727 value = value + p * (end[i] - value);
12728 return i === 3 ? toFloat(value) : parseInt(value, 10); 12729 }).join(',')) + ")"; 12730 break; 12731 } 12732 // CSS Filter 12733 case 'blur': 12734 unit = unit || 'px'; 12735 css.filter += " blur(" + (value + unit) + ")"; 12736 break; 12737 case 'hue': 12738 unit = unit || 'deg'; 12739 css.filter += " hue-rotate(" + (value + unit) + ")"; 12740 break; 12741 case 'fopacity': 12742 unit = unit || '%'; 12743 css.filter += " opacity(" + (value + unit) + ")"; 12744 break; 12745 case 'grayscale': 12746 case 'invert': 12747 case 'saturate': 12748 case 'sepia': 12749 unit = unit || '%'; 12750 css.filter += " " + prop + "(" + (value + unit) + ")"; 12751 break; 12752 default: 12753 css[prop] = value; 12754 } 12755 12756 return css; 12757 12758 }, {transform: '', filter: ''}); 12759 12760 } 12761 12762 } 12763 12764 }; 12765 12766 function parseColor(el, color) { 12767 return css(css(el, 'color', color), 'color') 12768 .split(/[(),]/g) 12769 .slice(1, -1) 12770 .concat(1) 12771 .slice(0, 4) 12772 .map(toFloat); 12773 } 12774 12775 function getStep(steps, percent) { 12776 var count = steps.length - 1; 12777 var index = Math.min(Math.floor(count * percent), count - 1); 12778 var step = steps.slice(index, index + 2); 12779 12780 step.push(percent === 1 ? 1 : percent % (1 / count) * count); 12781 12782 return step; 12783 } 12784 12785 function getValue(steps, percent, digits) { 12786 if ( digits === void 0 ) digits = 2; 12787 12788 var ref = getStep(steps, percent); 12789 var start = ref[0]; 12790 var end = ref[1]; 12791 var p = ref[2]; 12792 return (isNumber(start) 12793 ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) 12794 : +end 12795 ).toFixed(digits); 12796 } 12797 12798 function getUnit(steps) { 12799 return steps.reduce(function (unit, step) { return isString(step) && step.replace(/-|\d/g, '').trim() || unit; }, ''); 12800 } 12801 12802 function covers(el) { 12803 var ref = el.style; 12804 var backgroundSize = ref.backgroundSize; 12805 var covers = css(css(el, 'backgroundSize', ''), 'backgroundSize') === 'cover'; 12806 el.style.backgroundSize = backgroundSize; 12807 return covers; 12808 } 12809 12810 var parallax = { 12811 12812 mixins: [Parallax], 12813 12814 props: { 12815 target: String, 12816 viewport: Number, 12817 easing: Number 12818 }, 12819 12820 data: { 12821 target: false, 12822 viewport: 1, 12823 easing: 1 12824 }, 12825 12826 computed: { 12827 12828 target: function(ref, $el) { 12829 var target = ref.target; 12830 12831 return getOffsetElement(target && query(target, $el) || $el); 12832 } 12833 12834 }, 12835 12836 update: { 12837 12838 read: function(ref, type) { 12839 var percent = ref.percent; 12840 var active = ref.active; 12841 12842 12843 if (type !== 'scroll') { 12844 percent = false; 12845 } 12846 12847 if (!active) { 12848 return; 12849 } 12850 12851 var prev = percent; 12852 percent = ease(scrolledOver(this.target) / (this.viewport || 1), this.easing); 12853 12854 return { 12855 percent: percent, 12856 style: prev !== percent ? this.getCss(percent) : false 12857 }; 12858 }, 12859 12860 write: function(ref) { 12861 var style = ref.style; 12862 var active = ref.active; 12863 12864 12865 if (!active) { 12866 this.reset(); 12867 return; 12868 } 12869 12870 style && css(this.$el, style); 12871 12872 }, 12873 12874 events: ['scroll', 'resize'] 12875 } 12876 12877 }; 12878 12879 function ease(percent, easing) { 12880 return clamp(percent * (1 - (easing - easing * percent))); 12881 } 12882 12883 // SVG elements do not inherit from HTMLElement 12884 function getOffsetElement(el) { 12885 return el 12886 ? 'offsetTop' in el 12887 ? el 12888 : getOffsetElement(el.parentNode) 12889 : document.body; 12890 } 12891 12892 var SliderReactive = { 12893 12894 update: { 12895 12896 write: function() { 12897 12898 if (this.stack.length || this.dragging) { 12899 return; 12900 } 12901 12902 var index = this.getValidIndex(this.index); 12903 12904 if (!~this.prevIndex || this.index !== index) { 12905 this.show(index); 12906 } 12907 12908 }, 12909 12910 events: ['resize'] 12911 12912 } 12913 12914 }; 12915 12916 function Transitioner$1 (prev, next, dir, ref) { 12917 var center = ref.center; 12918 var easing = ref.easing; 12919 var list = ref.list; 12920 12921 12922 var deferred = new Deferred(); 12923 12924 var from = prev 12925 ? getLeft(prev, list, center) 12926 : getLeft(next, list, center) + offset(next).width * dir; 12927 var to = next 12928 ? getLeft(next, list, center) 12929 : from + offset(prev).width * dir * (isRtl ? -1 : 1); 12930 12931 return { 12932 12933 dir: dir, 12934 12935 show: function(duration, percent, linear) { 12936 if ( percent === void 0 ) percent = 0; 12937 12938 12939 var timing = linear ? 'linear' : easing; 12940 duration -= Math.round(duration * clamp(percent, -1, 1)); 12941 12942 this.translate(percent); 12943 12944 prev && this.updateTranslates(); 12945 percent = prev ? percent : clamp(percent, 0, 1); 12946 triggerUpdate$1(this.getItemIn(), 'itemin', {percent: percent, duration: duration, timing: timing, dir: dir}); 12947 prev && triggerUpdate$1(this.getItemIn(true), 'itemout', {percent: 1 - percent, duration: duration, timing: timing, dir: dir}); 12948 12949 Transition 12950 .start(list, {transform: translate(-to * (isRtl ? -1 : 1), 'px')}, duration, timing) 12951 .then(deferred.resolve, noop); 12952 12953 return deferred.promise; 12954 12955 }, 12956 12957 stop: function() { 12958 return Transition.stop(list); 12959 }, 12960 12961 cancel: function() { 12962 Transition.cancel(list); 12963 }, 12964 12965 reset: function() {
12966 css(list, 'transform', ''); 12967 }, 12968 12969 forward: function(duration, percent) { 12970 if ( percent === void 0 ) percent = this.percent(); 12971 12972 Transition.cancel(list); 12973 return this.show(duration, percent, true); 12974 }, 12975 12976 translate: function(percent) { 12977 12978 var distance = this.getDistance() * dir * (isRtl ? -1 : 1); 12979 12980 css(list, 'transform', translate(clamp( 12981 -to + (distance - distance * percent), 12982 -getWidth(list), 12983 offset(list).width 12984 ) * (isRtl ? -1 : 1), 'px')); 12985 12986 this.updateTranslates(); 12987 12988 if (prev) { 12989 percent = clamp(percent, -1, 1); 12990 triggerUpdate$1(this.getItemIn(), 'itemtranslatein', {percent: percent, dir: dir}); 12991 triggerUpdate$1(this.getItemIn(true), 'itemtranslateout', {percent: 1 - percent, dir: dir}); 12992 } 12993 12994 }, 12995 12996 percent: function() { 12997 return Math.abs((css(list, 'transform').split(',')[4] * (isRtl ? -1 : 1) + from) / (to - from)); 12998 }, 12999 13000 getDistance: function() { 13001 return Math.abs(to - from); 13002 }, 13003 13004 getItemIn: function(out) { 13005 if ( out === void 0 ) out = false; 13006 13007 13008 var actives = this.getActives(); 13009 var all = sortBy(slides(list), 'offsetLeft'); 13010 var i = index(all, actives[dir * (out ? -1 : 1) > 0 ? actives.length - 1 : 0]); 13011 13012 return ~i && all[i + (prev && !out ? dir : 0)]; 13013 13014 }, 13015 13016 getActives: function() { 13017 13018 var left = getLeft(prev || next, list, center); 13019 13020 return sortBy(slides(list).filter(function (slide) { 13021 var slideLeft = getElLeft(slide, list); 13022 return slideLeft >= left && slideLeft + offset(slide).width <= offset(list).width + left; 13023 }), 'offsetLeft'); 13024 13025 }, 13026 13027 updateTranslates: function() { 13028 13029 var actives = this.getActives(); 13030 13031 slides(list).forEach(function (slide) { 13032 var isActive = includes(actives, slide); 13033 13034 triggerUpdate$1(slide, ("itemtranslate" + (isActive ? 'in' : 'out')), { 13035 percent: isActive ? 1 : 0, 13036 dir: slide.offsetLeft <= next.offsetLeft ? 1 : -1 13037 }); 13038 }); 13039 } 13040 13041 }; 13042 13043 } 13044 13045 function getLeft(el, list, center) { 13046 13047 var left = getElLeft(el, list); 13048 13049 return center 13050 ? left - centerEl(el, list) 13051 : Math.min(left, getMax(list)); 13052 13053 } 13054 13055 function getMax(list) { 13056 return Math.max(0, getWidth(list) - offset(list).width); 13057 } 13058 13059 function getWidth(list) { 13060 return slides(list).reduce(function (right, el) { return offset(el).width + right; }, 0); 13061 } 13062 13063 function getMaxWidth(list) { 13064 return slides(list).reduce(function (right, el) { return Math.max(right, offset(el).width); }, 0); 13065 } 13066 13067 function centerEl(el, list) { 13068 return offset(list).width / 2 - offset(el).width / 2; 13069 } 13070 13071 function getElLeft(el, list) { 13072 return (position(el).left + (isRtl ? offset(el).width - offset(list).width : 0)) * (isRtl ? -1 : 1); 13073 } 13074 13075 function triggerUpdate$1(el, type, data) { 13076 trigger(el, createEvent(type, false, false, data)); 13077 } 13078 13079 function slides(list) { 13080 return children(list); 13081 } 13082 13083 var slider = { 13084 13085 mixins: [Class, Slider, SliderReactive], 13086 13087 props: { 13088 center: Boolean, 13089 sets: Boolean 13090 }, 13091 13092 data: { 13093 center: false, 13094 sets: false, 13095 attrItem: 'uk-slider-item', 13096 selList: '.uk-slider-items', 13097 selNav: '.uk-slider-nav', 13098 clsContainer: 'uk-slider-container', 13099 Transitioner: Transitioner$1 13100 }, 13101 13102 computed: { 13103 13104 avgWidth: function() { 13105 return getWidth(this.list) / this.length; 13106 }, 13107 13108 finite: function(ref) { 13109 var finite = ref.finite; 13110 13111 return finite || Math.ceil(getWidth(this.list)) < offset(this.list).width + getMaxWidth(this.list) + this.center; 13112 }, 13113 13114 maxIndex: function() { 13115 13116 if (!this.finite || this.center && !this.sets) { 13117 return this.length - 1; 13118 } 13119 13120 if (this.center) { 13121 return last(this.sets); 13122 } 13123 13124 css(this.slides, 'order', ''); 13125 13126 var max = getMax(this.list); 13127 var i = this.length; 13128 13129 while (i--) { 13130 if (getElLeft(this.list.children[i], this.list) < max) { 13131 return Math.min(i + 1, this.length - 1); 13132 } 13133 } 13134 13135 return 0; 13136 }, 13137 13138 sets: function(ref) { 13139 var this$1 = this; 13140 var sets = ref.sets; 13141 13142 13143 var width = offset(this.list).width / (this.center ? 2 : 1); 13144 13145 var left = 0; 13146 var leftCenter = width; 13147 var slideLeft = 0; 13148 13149 sets = sets && this.slides.reduce(function (sets, slide, i) { 13150 13151 var ref = offset(slide); 13152 var slideWidth = ref.width; 13153 var slideRight = slideLeft + slideWidth; 13154 13155 if (slideRight > left) { 13156 13157 if (!this$1.center && i > this$1.maxIndex) { 13158 i = this$1.maxIndex; 13159 } 13160 13161 if (!includes(sets, i)) { 13162 13163 var cmp = this$1.slides[i + 1]; 13164 if (this$1.center && cmp && slideWidth < leftCenter - offset(cmp).width / 2) { 13165 leftCenter -= slideWidth; 13166 } else { 13167 leftCenter = width; 13168 sets.push(i); 13169 left = slideLeft + width + (this$1.center ? slideWidth / 2 : 0); 13170 } 13171 13172 } 13173 } 13174 13175 slideLeft += slideWidth; 13176 13177 return sets; 13178 13179 }, []); 13180
13181 return !isEmpty(sets) && sets; 13182 13183 }, 13184 13185 transitionOptions: function() { 13186 return { 13187 center: this.center, 13188 list: this.list 13189 }; 13190 } 13191 13192 }, 13193 13194 connected: function() { 13195 toggleClass(this.$el, this.clsContainer, !$(("." + (this.clsContainer)), this.$el)); 13196 }, 13197 13198 update: { 13199 13200 write: function() { 13201 var this$1 = this; 13202 13203 13204 $$(("[" + (this.attrItem) + "],[data-" + (this.attrItem) + "]"), this.$el).forEach(function (el) { 13205 var index = data(el, this$1.attrItem); 13206 this$1.maxIndex && toggleClass(el, 'uk-hidden', isNumeric(index) && (this$1.sets && !includes(this$1.sets, toFloat(index)) || index > this$1.maxIndex)); 13207 }); 13208 13209 if (this.length && !this.dragging && !this.stack.length) { 13210 this._translate(1); 13211 } 13212 13213 }, 13214 13215 events: ['resize'] 13216 13217 }, 13218 13219 events: { 13220 13221 beforeitemshow: function(e) { 13222 13223 if (!this.dragging && this.sets && this.stack.length < 2 && !includes(this.sets, this.index)) { 13224 this.index = this.getValidIndex(); 13225 } 13226 13227 var diff = Math.abs( 13228 this.index 13229 - this.prevIndex 13230 + (this.dir > 0 && this.index < this.prevIndex || this.dir < 0 && this.index > this.prevIndex ? (this.maxIndex + 1) * this.dir : 0) 13231 ); 13232 13233 if (!this.dragging && diff > 1) { 13234 13235 for (var i = 0; i < diff; i++) { 13236 this.stack.splice(1, 0, this.dir > 0 ? 'next' : 'previous'); 13237 } 13238 13239 e.preventDefault(); 13240 return; 13241 } 13242 13243 this.duration = speedUp(this.avgWidth / this.velocity) 13244 * (offset( 13245 this.dir < 0 || !this.slides[this.prevIndex] 13246 ? this.slides[this.index] 13247 : this.slides[this.prevIndex] 13248 ).width / this.avgWidth); 13249 13250 this.reorder(); 13251 13252 }, 13253 13254 itemshow: function() { 13255 !isUndefined(this.prevIndex) && addClass(this._getTransitioner().getItemIn(), this.clsActive); 13256 }, 13257 13258 itemshown: function() { 13259 var this$1 = this; 13260 13261 var actives = this._getTransitioner(this.index).getActives(); 13262 this.slides.forEach(function (slide) { return toggleClass(slide, this$1.clsActive, includes(actives, slide)); }); 13263 (!this.sets || includes(this.sets, toFloat(this.index))) && this.slides.forEach(function (slide) { return toggleClass(slide, this$1.clsActivated, includes(actives, slide)); }); 13264 } 13265 13266 }, 13267 13268 methods: { 13269 13270 reorder: function() { 13271 var this$1 = this; 13272 13273 13274 css(this.slides, 'order', ''); 13275 13276 if (this.finite) { 13277 return; 13278 } 13279 13280 var index = this.dir > 0 && this.slides[this.prevIndex] ? this.prevIndex : this.index; 13281 13282 this.slides.forEach(function (slide, i) { return css(slide, 'order', this$1.dir > 0 && i < index 13283 ? 1 13284 : this$1.dir < 0 && i >= this$1.index 13285 ? -1 13286 : '' 13287 ); } 13288 ); 13289 13290 if (!this.center) { 13291 return; 13292 } 13293 13294 var next = this.slides[index]; 13295 var width = offset(this.list).width / 2 - offset(next).width / 2; 13296 var j = 0; 13297 13298 while (width > 0) { 13299 var slideIndex = this.getIndex(--j + index, index); 13300 var slide = this.slides[slideIndex]; 13301 13302 css(slide, 'order', slideIndex > index ? -2 : -1); 13303 width -= offset(slide).width; 13304 } 13305 13306 }, 13307 13308 getValidIndex: function(index, prevIndex) { 13309 if ( index === void 0 ) index = this.index; 13310 if ( prevIndex === void 0 ) prevIndex = this.prevIndex; 13311 13312 13313 index = this.getIndex(index, prevIndex); 13314 13315 if (!this.sets) { 13316 return index; 13317 } 13318 13319 var prev; 13320 13321 do { 13322 13323 if (includes(this.sets, index)) { 13324 return index; 13325 } 13326 13327 prev = index; 13328 index = this.getIndex(index + this.dir, prevIndex); 13329 13330 } while (index !== prev); 13331 13332 return index; 13333 } 13334 13335 } 13336 13337 }; 13338 13339 var sliderParallax = { 13340 13341 mixins: [Parallax], 13342 13343 data: { 13344 selItem: '!li' 13345 }, 13346 13347 computed: { 13348 13349 item: function(ref, $el) { 13350 var selItem = ref.selItem; 13351 13352 return query(selItem, $el); 13353 } 13354 13355 }, 13356 13357 events: [ 13358 13359 { 13360 13361 name: 'itemshown', 13362 13363 self: true, 13364 13365 el: function() { 13366 return this.item; 13367 }, 13368 13369 handler: function() { 13370 css(this.$el, this.getCss(.5)); 13371 } 13372 13373 }, 13374 13375 { 13376 name: 'itemin itemout', 13377 13378 self: true, 13379 13380 el: function() { 13381 return this.item; 13382 }, 13383 13384 handler: function(ref) { 13385 var type = ref.type; 13386 var ref_detail = ref.detail; 13387 var percent = ref_detail.percent; 13388 var duration = ref_detail.duration; 13389 var timing = ref_detail.timing; 13390 var dir = ref_detail.dir; 13391 13392 13393 Transition.cancel(this.$el); 13394 css(this.$el, this.getCss(getCurrent(type, dir, percent))); 13395 13396 Transition.start(this.$el, this.getCss(isIn(type) 13397 ? .5 13398 : dir > 0 13399 ? 1 13400 : 0
13401 ), duration, timing).catch(noop); 13402 13403 } 13404 }, 13405 13406 { 13407 name: 'transitioncanceled transitionend', 13408 13409 self: true, 13410 13411 el: function() { 13412 return this.item; 13413 }, 13414 13415 handler: function() { 13416 Transition.cancel(this.$el); 13417 } 13418 13419 }, 13420 13421 { 13422 name: 'itemtranslatein itemtranslateout', 13423 13424 self: true, 13425 13426 el: function() { 13427 return this.item; 13428 }, 13429 13430 handler: function(ref) { 13431 var type = ref.type; 13432 var ref_detail = ref.detail; 13433 var percent = ref_detail.percent; 13434 var dir = ref_detail.dir; 13435 13436 Transition.cancel(this.$el); 13437 css(this.$el, this.getCss(getCurrent(type, dir, percent))); 13438 } 13439 } 13440 13441 ] 13442 13443 }; 13444 13445 function isIn(type) { 13446 return endsWith(type, 'in'); 13447 } 13448 13449 function getCurrent(type, dir, percent) { 13450 13451 percent /= 2; 13452 13453 return !isIn(type) 13454 ? dir < 0 13455 ? percent 13456 : 1 - percent 13457 : dir < 0 13458 ? 1 - percent 13459 : percent; 13460 } 13461 13462 var Animations$2 = assign({}, Animations, { 13463 13464 fade: { 13465 13466 show: function() { 13467 return [ 13468 {opacity: 0, zIndex: 0}, 13469 {zIndex: -1} 13470 ]; 13471 }, 13472 13473 percent: function(current) { 13474 return 1 - css(current, 'opacity'); 13475 }, 13476 13477 translate: function(percent) { 13478 return [ 13479 {opacity: 1 - percent, zIndex: 0}, 13480 {zIndex: -1} 13481 ]; 13482 } 13483 13484 }, 13485 13486 scale: { 13487 13488 show: function() { 13489 return [ 13490 {opacity: 0, transform: scale3d(1 + .5), zIndex: 0}, 13491 {zIndex: -1} 13492 ]; 13493 }, 13494 13495 percent: function(current) { 13496 return 1 - css(current, 'opacity'); 13497 }, 13498 13499 translate: function(percent) { 13500 return [ 13501 {opacity: 1 - percent, transform: scale3d(1 + .5 * percent), zIndex: 0}, 13502 {zIndex: -1} 13503 ]; 13504 } 13505 13506 }, 13507 13508 pull: { 13509 13510 show: function(dir) { 13511 return dir < 0 13512 ? [ 13513 {transform: translate(30), zIndex: -1}, 13514 {transform: translate(), zIndex: 0} 13515 ] 13516 : [ 13517 {transform: translate(-100), zIndex: 0}, 13518 {transform: translate(), zIndex: -1} 13519 ]; 13520 }, 13521 13522 percent: function(current, next, dir) { 13523 return dir < 0 13524 ? 1 - translated(next) 13525 : translated(current); 13526 }, 13527 13528 translate: function(percent, dir) { 13529 return dir < 0 13530 ? [ 13531 {transform: translate(30 * percent), zIndex: -1}, 13532 {transform: translate(-100 * (1 - percent)), zIndex: 0} 13533 ] 13534 : [ 13535 {transform: translate(-percent * 100), zIndex: 0}, 13536 {transform: translate(30 * (1 - percent)), zIndex: -1} 13537 ]; 13538 } 13539 13540 }, 13541 13542 push: { 13543 13544 show: function(dir) { 13545 return dir < 0 13546 ? [ 13547 {transform: translate(100), zIndex: 0}, 13548 {transform: translate(), zIndex: -1} 13549 ] 13550 : [ 13551 {transform: translate(-30), zIndex: -1}, 13552 {transform: translate(), zIndex: 0} 13553 ]; 13554 }, 13555 13556 percent: function(current, next, dir) { 13557 return dir > 0 13558 ? 1 - translated(next) 13559 : translated(current); 13560 }, 13561 13562 translate: function(percent, dir) { 13563 return dir < 0 13564 ? [ 13565 {transform: translate(percent * 100), zIndex: 0}, 13566 {transform: translate(-30 * (1 - percent)), zIndex: -1} 13567 ] 13568 : [ 13569 {transform: translate(-30 * percent), zIndex: -1}, 13570 {transform: translate(100 * (1 - percent)), zIndex: 0} 13571 ]; 13572 } 13573 13574 } 13575 13576 }); 13577 13578 var slideshow = { 13579 13580 mixins: [Class, Slideshow, SliderReactive], 13581 13582 props: { 13583 ratio: String, 13584 minHeight: Number, 13585 maxHeight: Number 13586 }, 13587 13588 data: { 13589 ratio: '16:9', 13590 minHeight: false, 13591 maxHeight: false, 13592 selList: '.uk-slideshow-items', 13593 attrItem: 'uk-slideshow-item', 13594 selNav: '.uk-slideshow-nav', 13595 Animations: Animations$2 13596 }, 13597 13598 update: { 13599 13600 read: function() { 13601 13602 var ref = this.ratio.split(':').map(Number); 13603 var width = ref[0]; 13604 var height = ref[1]; 13605 13606 height = height * this.list.offsetWidth / width || 0; 13607 13608 if (this.minHeight) { 13609 height = Math.max(this.minHeight, height); 13610 } 13611 13612 if (this.maxHeight) { 13613 height = Math.min(this.maxHeight, height); 13614 } 13615 13616 return {height: height - boxModelAdjust(this.list, 'height', 'content-box')}; 13617 }, 13618 13619 write: function(ref) { 13620 var height = ref.height; 13621 13622 height > 0 && css(this.list, 'minHeight', height); 13623 }, 13624 13625 events: ['resize'] 13626 13627 } 13628 13629 }; 13630 13631 var sortable = { 13632 13633 mixins: [Class, Animate], 13634 13635 props: { 13636 group: String, 13637 threshold: Number, 13638 clsItem: String, 13639 clsPlaceholder: String, 13640 clsDrag: String, 13641 clsDragState: String, 13642 clsBase: String, 13643 clsNoDrag: String, 13644 clsEmpty: String, 13645 clsCustom: String, 13646 handle: String 13647 }, 13648 13649 data: { 13650 group: false, 13651 threshold: 5, 13652 clsItem: 'uk-sortable-item', 13653 clsPlaceholder: 'uk-sortable-placeholder', 13654 clsDrag: 'uk-sortable-drag', 13655 clsDragState: 'uk-drag', 13656 clsBase: 'uk-sortable', 13657 clsNoDrag: 'uk-sortable-nodrag', 13658 clsEmpty: 'uk-sortable-empty', 13659 clsCustom: '', 13660 handle: false, 13661 pos: {} 13662 }, 13663 13664 created: function() { 13665 var this$1 = this; 13666 13667 ['init', 'start', 'move', 'end'].forEach(function (key) { 13668 var fn = this$1[key]; 13669 this$1[key] = function (e) { 13670 this$1.scrollY = window.pageYOffset; 13671 assign(this$1.pos, getEventPos(e, 'page')); 13672 13673 fn(e); 13674 }; 13675 }); 13676 }, 13677 13678 events: { 13679 13680 name: pointerDown, 13681 passive: false, 13682 handler: 'init' 13683 13684 }, 13685 13686 update: { 13687 13688 write: function() { 13689 13690 if (this.clsEmpty) { 13691 toggleClass(this.$el, this.clsEmpty, isEmpty(this.$el.children)); 13692 } 13693 13694 css(this.handle ? $$(this.handle, this.$el) : this.$el.children, {touchAction: 'none', userSelect: 'none'}); 13695 13696 if (this.drag) { 13697 13698 // clamp to viewport 13699 var ref = offset(window); 13700 var right = ref.right; 13701 var bottom = ref.bottom; 13702 offset(this.drag, { 13703 top: clamp(this.pos.y + this.origin.top, 0, bottom - this.drag.offsetHeight), 13704 left: clamp(this.pos.x + this.origin.left, 0, right - this.drag.offsetWidth) 13705 }); 13706 13707 } 13708 13709 } 13710 13711 }, 13712 13713 methods: { 13714 13715 init: function(e) { 13716 13717 var target = e.target; 13718 var button = e.button; 13719 var defaultPrevented = e.defaultPrevented; 13720 var ref = children(this.$el).filter(function (el) { return within(target, el); }); 13721 var placeholder = ref[0]; 13722 13723 if (!placeholder 13724 || defaultPrevented 13725 || button > 0 13726 || isInput(target) 13727 || within(target, ("." + (this.clsNoDrag))) 13728 || this.handle && !within(target, this.handle) 13729 ) { 13730 return; 13731 } 13732 13733 e.preventDefault(); 13734 13735 this.touched = [this]; 13736 this.placeholder = placeholder; 13737 this.origin = assign({target: target, index: index(placeholder)}, this.pos); 13738 13739 on(document, pointerMove, this.move); 13740 on(document, pointerUp, this.end); 13741 on(window, 'scroll', this.scroll); 13742 13743 if (!this.threshold) { 13744 this.start(e); 13745 } 13746 13747 }, 13748 13749 start: function(e) { 13750 13751 this.drag = appendDrag(this.$container, this.placeholder); 13752 13753 var ref = offset(this.placeholder); 13754 var left = ref.left; 13755 var top = ref.top; 13756 assign(this.origin, {left: left - this.pos.x, top: top - this.pos.y}); 13757 13758 addClass(this.drag, this.clsDrag, this.clsCustom); 13759 addClass(this.placeholder, this.clsPlaceholder); 13760 addClass(this.$el.children, this.clsItem); 13761 addClass(document.documentElement, this.clsDragState); 13762 13763 trigger(this.$el, 'start', [this, this.placeholder]); 13764 13765 trackScroll(this.pos); 13766 13767 this.move(e); 13768 }, 13769 13770 move: function(e) { 13771 13772 if (!this.drag) { 13773 13774 if (Math.abs(this.pos.x - this.origin.x) > this.threshold || Math.abs(this.pos.y - this.origin.y) > this.threshold) { 13775 this.start(e); 13776 } 13777 13778 return; 13779 } 13780
13781 this.$update(); 13782 13783 var target = e.type === 'mousemove' ? e.target : document.elementFromPoint(this.pos.x - window.pageXOffset, this.pos.y - window.pageYOffset); 13784 13785 var sortable = this.getSortable(target); 13786 var previous = this.getSortable(this.placeholder); 13787 var move = sortable !== previous; 13788 13789 if (!sortable || within(target, this.placeholder) || move && (!sortable.group || sortable.group !== previous.group)) { 13790 return; 13791 } 13792 13793 target = sortable.$el === target.parentNode && target || children(sortable.$el).filter(function (element) { return within(target, element); })[0]; 13794 13795 if (move) { 13796 previous.remove(this.placeholder); 13797 } else if (!target) { 13798 return; 13799 } 13800 13801 sortable.insert(this.placeholder, target); 13802 13803 if (!includes(this.touched, sortable)) { 13804 this.touched.push(sortable); 13805 } 13806 13807 }, 13808 13809 end: function(e) { 13810 13811 off(document, pointerMove, this.move); 13812 off(document, pointerUp, this.end); 13813 off(window, 'scroll', this.scroll); 13814 13815 if (!this.drag) { 13816 if (e.type === 'touchend') { 13817 e.target.click(); 13818 } 13819 13820 return; 13821 } 13822 13823 untrackScroll(); 13824 13825 var sortable = this.getSortable(this.placeholder); 13826 13827 if (this === sortable) { 13828 if (this.origin.index !== index(this.placeholder)) { 13829 trigger(this.$el, 'moved', [this, this.placeholder]); 13830 } 13831 } else { 13832 trigger(sortable.$el, 'added', [sortable, this.placeholder]); 13833 trigger(this.$el, 'removed', [this, this.placeholder]); 13834 } 13835 13836 trigger(this.$el, 'stop', [this, this.placeholder]); 13837 13838 remove(this.drag); 13839 this.drag = null; 13840 13841 var classes = this.touched.map(function (sortable) { return ((sortable.clsPlaceholder) + " " + (sortable.clsItem)); }).join(' '); 13842 this.touched.forEach(function (sortable) { return removeClass(sortable.$el.children, classes); }); 13843 13844 removeClass(document.documentElement, this.clsDragState); 13845 13846 }, 13847 13848 scroll: function() { 13849 var scroll = window.pageYOffset; 13850 if (scroll !== this.scrollY) { 13851 this.pos.y += scroll - this.scrollY; 13852 this.scrollY = scroll; 13853 this.$update(); 13854 } 13855 }, 13856 13857 insert: function(element, target) { 13858 var this$1 = this; 13859 13860 13861 addClass(this.$el.children, this.clsItem); 13862 13863 var insert = function () { 13864 13865 if (target) { 13866 13867 if (!within(element, this$1.$el) || isPredecessor(element, target)) { 13868 before(target, element); 13869 } else { 13870 after(target, element); 13871 } 13872 13873 } else { 13874 append(this$1.$el, element); 13875 } 13876 13877 }; 13878 13879 if (this.animation) { 13880 this.animate(insert); 13881 } else { 13882 insert(); 13883 } 13884 13885 }, 13886 13887 remove: function(element) { 13888 13889 if (!within(element, this.$el)) { 13890 return; 13891 } 13892 13893 css(this.handle ? $$(this.handle, element) : element, {touchAction: '', userSelect: ''}); 13894 13895 if (this.animation) { 13896 this.animate(function () { return remove(element); }); 13897 } else { 13898 remove(element); 13899 } 13900 13901 }, 13902 13903 getSortable: function(element) { 13904 return element && (this.$getComponent(element, 'sortable') || this.get
13904Sortable(element.parentNode)); 13905 } 13906 13907 } 13908 13909 }; 13910 13911 function isPredecessor(element, target) { 13912 return element.parentNode === target.parentNode && index(element) > index(target); 13913 } 13914 13915 var trackTimer; 13916 function trackScroll(pos) { 13917 13918 trackTimer = setInterval(function () { 13919 13920 var x = pos.x; 13921 var y = pos.y; 13922 scrollParents(document.elementFromPoint(x - window.pageXOffset, y - window.pageYOffset)).some(function (scrollEl) { 13923 13924 var scroll = scrollEl.scrollTop; 13925 var scrollHeight = scrollEl.scrollHeight; 13926 13927 var ref = offset(getViewport(scrollEl)); 13928 var top = ref.top; 13929 var bottom = ref.bottom; 13930 var height = ref.height; 13931 13932 if (top < y && top + 30 > y) { 13933 scroll -= 5; 13934 } else if (bottom > y && bottom - 30 < y) { 13935 scroll += 5; 13936 } else { 13937 return; 13938 } 13939 13940 if (scroll > 0 && scroll < scrollHeight - height) { 13941 scrollTop(scrollEl, scroll); 13942 return true; 13943 } 13944 13945 }); 13946 13947 }, 15); 13948 13949 } 13950 13951 function untrackScroll() { 13952 clearInterval(trackTimer); 13953 } 13954 13955 function appendDrag(container, element) { 13956 var clone = append(container, element.outerHTML.replace(/(^<)li|li(\/>$)/g, '$1div$2')); 13957 13958 css(clone, assign({ 13959 boxSizing: 'border-box', 13960 width: element.offsetWidth, 13961 height: element.offsetHeight, 13962 overflow: 'hidden' 13963 }, css(element, ['paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom']))); 13964 13965 height(clone.firstElementChild, height(element.firstElementChild)); 13966 13967 return clone; 13968 } 13969 13970 var obj$1; 13971 13972 var actives = []; 13973 13974 var tooltip = { 13975 13976 mixins: [Container, Togglable, Position], 13977 13978 args: 'title', 13979 13980 props: { 13981 delay: Number, 13982 title: String 13983 }, 13984 13985 data: { 13986 pos: 'top', 13987 title: '', 13988 delay: 0, 13989 animation: ['uk-animation-scale-up'], 13990 duration: 100, 13991 cls: 'uk-active', 13992 clsPos: 'uk-tooltip' 13993 }, 13994 13995 beforeConnect: function() { 13996 this._hasTitle = hasAttr(this.$el, 'title'); 13997 attr(this.$el, {title: '', 'aria-expanded': false}); 13998 }, 13999 14000 disconnected: function() { 14001 this.hide(); 14002 attr(this.$el, {title: this._hasTitle ? this.title : null, 'aria-expanded': null}); 14003 }, 14004 14005 methods: { 14006 14007 show: function() { 14008 var this$1 = this; 14009 14010 14011 if (this.isActive() || !this.title) { 14012 return; 14013 } 14014 14015 actives.forEach(function (active) { return active.hide(); }); 14016 actives.push(this); 14017 14018 this._unbind = on(document, pointerUp, function (e) { return !within(e.target, this$1.$el) && this$1.hide(); }); 14019 14020 clearTimeout(this.showTimer); 14021 this.showTimer = setTimeout(function () { 14022 this$1._show(); 14023 this$1.hideTimer = setInterval(function () { 14024 14025 if (!isVisible(this$1.$el)) { 14026 this$1.hide(); 14027 } 14028 14029 }, 150); 14030 }, this.delay); 14031 }, 14032 14033 hide: function() { 14034 14035 if (!this.isActive() || matches(this.$el, 'input:focus')) { 14036 return; 14037 } 14038 14039 actives.splice(actives.indexOf(this), 1); 14040 14041 clearTimeout(this.showTimer); 14042 clearInterval(this.hideTimer); 14043 attr(this.$el, 'aria-expanded', false); 14044 this.toggleElement(this.tooltip, false); 14045 this.tooltip && remove(this.tooltip); 14046 this.tooltip = false; 14047 this._unbind(); 14048 14049 }, 14050 14051 _show: function() { 14052 14053 this.tooltip = append(this.container, 14054 ("<div class=\"" + (this.clsPos) + "\" aria-expanded=\"true\" aria-hidden> <div class=\"" + (this.clsPos) + "-inner\">" + (this.title) + "</div> </div>") 14055 ); 14056 14057 this.positionAt(this.tooltip, this.$el); 14058 14059 this.origin = this.getAxis() === 'y' 14060 ? ((flipPosition(this.dir)) + "-" + (this.align)) 14061 : ((this.align) + "-" + (flipPosition(this.dir))); 14062 14063 this.toggleElement(this.tooltip, true); 14064 14065 }, 14066 14067 isActive: function() { 14068 return includes(actives, this); 14069 } 14070 14071 }, 14072 14073 events: ( obj$1 = { 14074 14075 focus: 'show', 14076 blur: 'hide' 14077 14078 }, obj$1[(pointerEnter + " " + pointerLeave)] = function (e) { 14079 if (isTouch(e)) { 14080 return; 14081 } 14082 e.type === pointerEnter 14083 ? this.show() 14084 : this.hide(); 14085 }, obj$1[pointerDown] = function (e) { 14086 if (!isTouch(e)) { 14087 return; 14088 } 14089 this.isActive() 14090 ? this.hide() 14091 : this.show(); 14092 }, obj$1 ) 14093 14094 }; 14095 14096 var upload = { 14097 14098 props: { 14099 allow: String, 14100 clsDragover: String, 14101 concurrent: Number, 14102 maxSize: Number, 14103 method: String, 14104 mime: String, 14105 msgInvalidMime: String, 14106 msgInvalidName: String, 14107 msgInvalidSize: String, 14108 multiple: Boolean, 14109 name: String, 14110 params: Object, 14111 type: String, 14112 url: String 14113 }, 14114 14115 data: { 14116 allow: false, 14117 clsDragover: 'uk-dragover', 14118 concurrent: 1, 14119 maxSize: 0, 14120 method: 'POST', 14121 mime: false, 14122 msgInvalidMime: 'Invalid File Type: %s', 14123 msgInvalidName: 'Invalid File Name: %s', 14124 msgInvalidSize: 'Invalid File Size: %s Kilobytes Max', 14125 multiple: false, 14126 name: 'files[]', 14127 params: {}, 14128 type: '', 14129 url: '', 14130 abort: noop, 14131 beforeAll: noop, 14132 beforeSend: noop, 14133 complete: noop, 14134 completeAll: noop, 14135 error: noop, 14136 fail: noop, 14137 load: noop, 14138 loadEnd: noop, 14139 loadStart: noop, 14140 progress: noop 14141 }, 14142 14143 events: { 14144 14145 change: function(e) { 14146 14147 if (!matches(e.target, 'input[type="file"]')) { 14148 return; 14149 } 14150 14151 e.preventDefault(); 14152 14153 if (e.target.files) { 14154 this.upload(e.target.files); 14155 } 14156 14157 e.target.value = ''; 14158 }, 14159 14160 drop: function(e) { 14161 stop(e); 14162 14163 var transfer = e.dataTransfer; 14164 14165 if (!transfer || !transfer.files) { 14166 return; 14167 } 14168 14169 removeClass(this.$el, this.clsDragover); 14170 14171 this.upload(transfer.files); 14172 }, 14173 14174 dragenter: function(e) { 14175 stop(e); 14176 }, 14177 14178 dragover: function(e) { 14179 stop(e); 14180 addClass(this.$el, this.clsDragover); 14181 }, 14182 14183 dragleave: function(e) { 14184 stop(e); 14185 removeClass(this.$el, this.clsDragover); 14186 } 14187 14188 }, 14189 14190 methods: { 14191 14192 upload: function(files) { 14193 var this$1 = this; 14194 14195 14196 if (!files.length) { 14197 return; 14198 } 14199 14200 trigger(this.$el, 'upload', [files]); 14201 14202 for (var i = 0; i < files.length; i++) { 14203 14204 if (this.maxSize && this.maxSize * 1000 < files[i].size) { 14205 this.fail(this.msgInvalidSize.replace('%s', this.maxSize)); 14206 return; 14207 } 14208 14209 if (this.allow && !match$1(this.allow, files[i].name)) { 14210 this.fail(this.msgInvalidName.replace('%s', this.allow)); 14211 return; 14212 } 14213 14214 if (this.mime && !match$1(this.mime, files[i].type)) { 14215 this.fail(this.msgInvalidMime.replace('%s', this.mime)); 14216 return; 14217 } 14218 14219 } 14220 14221 if (!this.multiple) { 14222 files = [files[0]]; 14223 } 14224 14225 this.beforeAll(this, files); 14226 14227 var chunks = chunk(files, this.concurrent); 14228 var upload = function (files) { 14229 14230 var data = new FormData(); 14231
14232 files.forEach(function (file) { return data.append(this$1.name, file); }); 14233 14234 for (var key in this$1.params) { 14235 data.append(key, this$1.params[key]); 14236 } 14237 14238 ajax(this$1.url, { 14239 data: data, 14240 method: this$1.method, 14241 responseType: this$1.type, 14242 beforeSend: function (env) { 14243 14244 var xhr = env.xhr; 14245 xhr.upload && on(xhr.upload, 'progress', this$1.progress); 14246 ['loadStart', 'load', 'loadEnd', 'abort'].forEach(function (type) { return on(xhr, type.toLowerCase(), this$1[type]); } 14247 ); 14248 14249 this$1.beforeSend(env); 14250 14251 } 14252 }).then( 14253 function (xhr) { 14254 14255 this$1.complete(xhr); 14256 14257 if (chunks.length) { 14258 upload(chunks.shift()); 14259 } else { 14260 this$1.completeAll(xhr); 14261 } 14262 14263 }, 14264 function (e) { return this$1.error(e); } 14265 ); 14266 14267 }; 14268 14269 upload(chunks.shift()); 14270 14271 } 14272 14273 } 14274 14275 }; 14276 14277 function match$1(pattern, path) { 14278 return path.match(new RegExp(("^" + (pattern.replace(/\//g, '\\/').replace(/\*\*/g, '(\\/[^\\/]+)*').replace(/\*/g, '[^\\/]+').replace(/((?!\\))\?/g, '$1.')) + "$"), 'i')); 14279 } 14280 14281 function chunk(files, size) { 14282 var chunks = []; 14283 for (var i = 0; i < files.length; i += size) { 14284 var chunk = []; 14285 for (var j = 0; j < size; j++) { 14286 chunk.push(files[i + j]); 14287 } 14288 chunks.push(chunk); 14289 } 14290 return chunks; 14291 } 14292 14293 function stop(e) { 14294 e.preventDefault(); 14295 e.stopPropagation(); 14296 } 14297 14298 14299 14300 var components = /*#__PURE__*/Object.freeze({ 14301 __proto__: null, 14302 Countdown: countdown, 14303 Filter: filter$1, 14304 Lightbox: lightbox, 14305 LightboxPanel: LightboxPanel, 14306 Notification: notification, 14307 Parallax: parallax, 14308 Slider: slider, 14309 SliderParallax: sliderParallax, 14310 Slideshow: slideshow, 14311 SlideshowParallax: sliderParallax, 14312 Sortable: sortable, 14313 Tooltip: tooltip, 14314 Upload: upload 14315 }); 14316 14317 // register components 14318 each(coreComponents, register); 14319 each(components, register); 14320 14321 // core functionality 14322 UIkit.use(Core); 14323 14324 boot(UIkit); 14325 14326 function register(component, name) { 14327 UIkit.component(name, component); 14328 } 14329 14330 return UIkit; 14331 14332}))); 14333; 14334/*! UIkit 3.3.3 | https://www.getuikit.com | (c) 2014 - 2020 YOOtheme | MIT License */ 14335 14336(function (global, factory) { 14337 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 14338 typeof define === 'function' && define.amd ? define('uikiticons', factory) : 14339 (global = global || self, global.UIkitIcons = factory()); 14340}(this, (function () { 'use strict'; 14341 14342 function plugin(UIkit) { 14343 14344 if (plugin.installed) { 14345 return; 14346 } 14347 14348 UIkit.icon.add({ 14349 "352": "<svg width=\"339\" height=\"339\" viewBox=\"0 0 339 339\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><g fill-rule=\"nonzero\" stroke=\"none\" stroke-width=\"1\" fill=\"none\">
14349<path d=\"M283.35 238.25a32.18 32.18 0 0 0-22.82-9.46 32.18 32.18 0 0 0-22.83 9.46 32.28 32.28 0 0 0 0-45.65 32.18 32.18 0 0 0 22.83 9.45c8.26 0 16.52-3.15 22.82-9.45a32.17 32.17 0 0 0-9.45 22.82c0 8.26 3.15 16.52 9.45 22.83\" fill=\"#D000D6\" opacity=\".62\"/><path d=\"M329 192.6a32.18 32.18 0 0 0-22.82-9.46 32.17 32.17 0 0 0-22.83 9.46 32.28 32.28 0 0 0 0-45.65 32.17 32.17 0 0 0 22.83 9.45c8.26 0 16.52-3.15 22.82-9.45a32.28 32.28 0 0 0 0 45.65\" fill=\"#D000D6\" opacity=\".62\"/><path d=\"M192.05 146.95a32.18 32.18 0 0 0-22.82-9.46 32.18 32.18 0 0 0-22.72 9.35 32.28 32.28 0 0 0 0-45.44 32.18 32.18 0 0 0 22.72 9.35c8.26 0 16.52-3.15 22.82-9.45a32.28 32.28 0 0 0 0 45.65\" fill=\"#F07\" opacity=\".57\"/><path d=\"M192.05 55.65a32.18 32.18 0 0 0-22.82-9.46 32.18 32.18 0 0 0-22.72 9.35 32.28 32.28 0 0 0-.1-45.54 32.18 32.18 0 0 0 22.82 9.45c8.26 0 16.52-3.15 22.82-9.45a32.28 32.28 0 0 0 0 45.65\" fill=\"#F07\" opacity=\".57\"/><path d=\"M329 238.25a32.28 32.28 0 1 0-45.65 0 32.28 32.28 0 0 1 0 45.65c1.58-1.58 1.58-1.58 0 0a32.28 32.28 0 1 0 45.65 0 32.28 32.28 0 0 1 0-45.65\" fill=\"#007AFF\"/><path d=\"M283.35 101.3c-1.77 1.77-1.77 1.77 0 0a32.28 32.28 0 0 1-45.65 0c-1.57-1.58-1.57-1.58 0 0a32.28 32.28 0 0 1 45.65-45.65c1.58 1.57 1.58 1.57 0 0a32.28 32.28 0 0 1 0 45.65c1.58-1.58 1.58-1.58 0 0M329 55.65A32.28 32.28 0 1 0 283.35 10c-1.77 1.77-1.77 1.77 0 0a32.28 32.28 0 0 1-45.65 0c1.58 1.57 1.58 1.57 0 0a32.28 32.28 0 1 0-45.65 45.65 32.28 32.28 0 0 1 0 45.65 32.28 32.28 0 0 0 0 45.65 32.28 32.28 0 0 1 .02 45.63l-.03.02a32.28 32.28 0 1 0 45.65 0c-9.46-9.45-9.44-9.46.01 0a32.28 32.28 0 0 1 45.65-45.65A32.28 32.28 0 1 0 329 101.3a32.28 32.28 0 0 1 0-45.65\" fill=\"#D000D6\"/><path d=\"M146.4 55.65A32.28 32.28 0 1 0 100.75 10a32.28 32.28 0 0 1-45.65 0 32.28 32.28 0 1 0 0 45.65 32.28 32.28 0 0 1 45.65 45.65 32.28 32.28 0 1 0 45.65 0 32.28 32.28 0 0 1 0-45.65\" fill=\"#F07\"/></g></svg>", 14350 "500px": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg
vendor: 3,152 bytes, lines 14350-14351
14350\"><path d=\"M9.624,11.866c-0.141,0.132,0.479,0.658,0.662,0.418c0.051-0.046,0.607-0.61,0.662-0.664c0,0,0.738,0.719,0.814,0.719 c0.1,0,0.207-0.055,0.322-0.17c0.27-0.269,0.135-0.416,0.066-0.495l-0.631-0.616l0.658-0.668c0.146-0.156,0.021-0.314-0.1-0.449 c-0.182-0.18-0.359-0.226-0.471-0.125l-0.656,0.654l-0.654-0.654c-0.033-0.034-0.08-0.045-0.124-0.045 c-0.079,0-0.191,0.068-0.307,0.181c-0.202,0.202-0.247,0.351-0.133,0.462l0.665,0.665L9.624,11.866z\"/><path d=\"M11.066,2.884c-1.061,0-2.185,0.248-3.011,0.604c-0.087,0.034-0.141,0.106-0.15,0.205C7.893,3.784,7.919,3.909,7.982,4.066 c0.05,0.136,0.187,0.474,0.452,0.372c0.844-0.326,1.779-0.507,2.633-0.507c0.963,0,1.9,0.191,2.781,0.564 c0.695,0.292,1.357,0.719,2.078,1.34c0.051,0.044,0.105,0.068,0.164,0.068c0.143,0,0.273-0.137,0.389-0.271 c0.191-0.214,0.324-0.395,0.135-0.575c-0.686-0.654-1.436-1.138-2.363-1.533C13.24,3.097,12.168,2.884,11.066,2.884z\"/><path d=\"M16.43,15.747c-0.092-0.028-0.242,0.05-0.309,0.119l0,0c-0.652,0.652-1.42,1.169-2.268,1.521 c-0.877,0.371-1.814,0.551-2.779,0.551c-0.961,0-1.896-0.189-2.775-0.564c-0.848-0.36-1.612-0.879-2.268-1.53 c-0.682-0.688-1.196-1.455-1.529-2.268c-0.325-0.799-0.471-1.643-0.471-1.643c-0.045-0.24-0.258-0.249-0.567-0.203 c-0.128,0.021-0.519,0.079-0.483,0.36v0.01c0.105,0.644,0.289,1.284,0.545,1.895c0.417,0.969,1.002,1.849,1.756,2.604 c0.757,0.754,1.636,1.34,2.604,1.757C8.901,18.785,9.97,19,11.088,19c1.104,0,2.186-0.215,3.188-0.645 c1.838-0.896,2.604-1.757,2.604-1.757c0.182-0.204,0.227-0.317-0.1-0.643C16.779,15.956,16.525,15.774,16.43,15.747z\"/><path d=\"M5.633,13.287c0.293,0.71,0.723,1.341,1.262,1.882c0.54,0.54,1.172,0.971,1.882,1.264c0.731,0.303,1.509,0.461,2.298,0.461 c0.801,0,1.578-0.158,2.297-0.461c0.711-0.293,1.344-0.724,1.883-1.264c0.543-0.541,0.971-1.172,1.264-1.882 c0.314-0.721,0.463-1.5,0.463-2.298c0-0.79-0.148-1.569-0.463-2.289c-0.293-0.699-0.721-1.329-1.264-1.881 c-0.539-0.541-1.172-0.959-1.867-1.263c-0.721-0.303-1.5-0.461-2.299-0.461c-0.802,0-1.613,0.159-2.322,0.461 c-0.577,0.25-1.544,0.867-2.119,1.454v0.012V2.108h8.16C15.1,2.104,15.1,1.69,15.1,1.552C15.1,1.417,15.1,1,14.809,1H5.915 C5.676,1,5.527,1.192,5.527,1.384v6.84c0,0.214,0.273,0.372,0.529,0.428c0.5,0.105,0.614-0.056,0.737-0.224l0,0 c0.18-0.273,0.776-0.884,0.787-0.894c0.901-0.905,2.117-1.408,3.416-1.408c1.285,0,2.5,0.501,3.412,1.408 c0.914,0.914,1.408,2.122,1.408,3.405c0,1.288-0.508,2.496-1.408,3.405c-0.9,0.896-2.152,1.406-3.438,1.406 c-0.877,0-1.711-0.229-2.433-0.671v-4.158c0-0.553,0.237-1.151,0.643-1.614c0.462-0.519,1.094-0.799,1.782-0.799 c0.664,0,1.293,0.253,1.758,0.715c0.459,0.459,0.709,1.071,0.709,1.723c0,1.385-1.094,2.468-2.488,2.468 c-0.273,0-0.769-0.121-0.781-0.125c-0.281-0.087-0.405,0.306-0.438,0.436c-0.159,0.496,0.079,0.585,0.123,0.607 c0.452,0.137,0.743,0.157,1.129,0.157c1.973,0,3.572-1.6,3.572-3.57c0-1.964-1.6-3.552-3.572-3.552c-0.97,0-1.872,0.36-2.546,1.038 c-0.656,0.631-1.027,1.487-1.027,2.322v3.438v-0.011c-0.372-0.42-0.732-1.041-0.981-1.682c-0.102-0.248-0.315-0.202-0.607-0.113 c-0.135,0.035-0.519,0.157-0.44,0.439C5.372,12.799,5.577,13.164,5.633,13.287z\"/></svg>", 14351 "album": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"
14351 xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"5\" y=\"2\" width=\"10\" height=\"1\"/><rect x=\"3\" y=\"4\" width=\"14\" height=\"1\"/><rect fill=\"none\" stroke=\"#000\" x=\"1.5\" y=\"6.5\" width=\"17\" height=\"11\"/></svg>", 14352 "arrow-down": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"10.5,16.08 5.63,10.66 6.37,10 10.5,14.58 14.63,10 15.37,10.66\"/><line fill=\"none\" stroke=\"#000\" x1=\"10.5\" y1=\"4\" x2=\"10.5\" y2=\"15\"/></svg>", 14353 "arrow-left": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" points=\"10 14 5 9.5 10 5\"/><line fill=\"none\" stroke=\"#000\" x1=\"16\" y1=\"9.5\" x2=\"5\" y2=\"9.52\"/></svg>", 14354 "arrow-right": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" points=\"10 5 15 9.5 10 14\"/><line fill=\"none\" stroke=\"#000\" x1=\"4\" y1=\"9.5\" x2=\"15\" y2=\"9.5\"/></svg>", 14355 "arrow-up": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"10.5,4 15.37,9.4 14.63,10.08 10.5,5.49 6.37,10.08 5.63,9.4\"/><line fill=\"none\" stroke=\"#000\" x1=\"10.5\" y1=\"16\" x2=\"10.5\" y2=\"5\"/></svg>", 14356 "ban": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10\" cy=\"10\" r=\"9\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"4\" y1=\"3.5\" x2=\"16\" y2=\"16.5\"/></svg>", 14357 "behance": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.5,10.6c-0.4-0.5-0.9-0.9-1.6-1.1c1.7-1,2.2-3.2,0.7-4.7C7.8,4,6.3,4,5.2,4C3.5,4,1.7,4,0,4v12c1.7,0,3.4,0,5.2,0 c1,0,2.1,0,3.1-0.5C10.2,14.6,10.5,12.3,9.5,10.6L9.5,10.6z M5.6,6.1c1.8,0,1.8,2.7-0.1,2.7c-1,0-2,0-2.9,0V6.1H5.6z M2.6,13.8v-3.1 c1.1,0,2.1,0,3.2,0c2.1,0,2.1,3.2,0.1,3.2L2.6,13.8z\"/><path d=\"M19.9,10.9C19.7,9.2,18.7,7.6,17,7c-4.2-1.3-7.3,3.4-5.3,7.1c0.9,1.7,2.8,2.3,4.7,2.1c1.7-0.2,2.9-1.3,3.4-2.9h-2.2 c-0.4,1.3-2.4,1.5-3.5,0.6c-0.4-0.4-0.6-1.1-0.6-1.7H20C20,11.7,19.9,10.9,19.9,10.9z M13.5,10.6c0-1.6,2.3-2.7,3.5-1.4 c0.4,0.4,0.5,0.9,0.6,1.4H13.5L13.5,10.6z\"/><rect x=\"13\" y=\"4\" width=\"5\" height=\"1.4\"/></svg>", 14358 "bell": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M17,15.5 L3,15.5 C2.99,14.61 3.79,13.34 4.1,12.51 C4.58,11.3 4.72,10.35 5.19,7.01 C5.54,4.53 5.89,3.2 7.28,2.16 C8.13,1.56 9.37,1.5 9.81,1.5 L9.96,1.5 C9.96,1.5 11.62,1.41 12.67,2.17 C14.08,3.2 14.42,4.54 14.77,7.02 C15.26,10.35 15.4,11.31 15.87,12.52 C16.2,13.34 17.01,14.61 17,15.5 L17,15.5 Z\"/><path fill=\"none\" stroke=\"#000\" d=\"M12.39,16 C12.39,17.37 11.35,18.43 9.91,18.43 C8.48,18.43 7.42,17.37 7.42,16\"/></svg>", 14359 "bold": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5,15.3 C5.66,15.3 5.9,15 5.9,14.53 L5.9,5.5 C5.9,4.92 5.56,4.7 5,4.7 L5,4 L8.95,4 C12.6,4 13.7,5.37 13.7,6.9 C13.7,7.87 13.14,9.17 10.86,9.59 L10.86,9.7 C13.25,9.86 14.29,11.28 14.3,12.54 C14.3,14.47 12.94,16 9,16 L5,16 L5,15.3 Z M9,9.3 C11.19,9.3 11.8,8.5 11.85,7 C11.85,5.65 11.3,4.8 9,4.8 L7.67,4.8 L7.67,9.3 L9,9.3 Z M9.185,15.22 C11.97,15 12.39,14 12.4,12.58 C12.4,11.
1435915 11.39,10 9,10 L7.67,10 L7.67,15 L9.18,15 Z\"/></svg>", 14360 "bolt": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4.74,20 L7.73,12 L3,12 L15.43,1 L12.32,9 L17.02,9 L4.74,20 L4.74,20 L4.74,20 Z M9.18,11 L7.1,16.39 L14.47,10 L10.86,10 L12.99,4.67 L5.61,11 L9.18,11 L9.18,11 L9.18,11 Z\"/></svg>", 14361 "bookmark": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon fill=\"none\" stroke=\"#000\" points=\"5.5 1.5 15.5 1.5 15.5 17.5 10.5 12.5 5.5 17.5\"/></svg>", 14362 "calendar": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 2,3 2,17 18,17 18,3 2,3 Z M 17,16 3,16 3,8 17,8 17,16 Z M 17,7 3,7 3,4 17,4 17,7 Z\"/><rect width=\"1\" height=\"3\" x=\"6\" y=\"2\"/><rect width=\"1\" height=\"3\" x=\"13\" y=\"2\"/></svg>", 14363 "camera": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10\" cy=\"10.8\" r=\"3.8\"/><path fill=\"none\" stroke=\"#000\" d=\"M1,4.5 C0.7,4.5 0.5,4.7 0.5,5 L0.5,17 C0.5,17.3 0.7,17.5 1,17.5 L19,17.5 C19.3,17.5 19.5,17.3 19.5,17 L19.5,5 C19.5,4.7 19.3,4.5 19,4.5 L13.5,4.5 L13.5,2.9 C13.5,2.6 13.3,2.5 13,2.5 L7,2.5 C6.7,2.5 6.5,2.6 6.5,2.9 L6.5,4.5 L1,4.5 L1,4.5 Z\"/></svg>", 14364 "cart": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"7.3\" cy=\"17.3\" r=\"1.4\"/><circle cx=\"13.3\" cy=\"17.3\" r=\"1.4\"/><polyline fill=\"none\" stroke=\"#000\" points=\"0 2 3.2 4 5.3 12.5 16 12.5 18 6.5 8 6.5\"/></svg>", 14365 "check": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"4,10 8,15 17,4\"/></svg>", 14366 "chevron-double-left": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.03\" points=\"10 14 6 10 10 6\"/><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.03\" points=\"14 14 10 10 14 6\"/></svg>", 14367 "chevron-double-right": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.03\" points=\"10 6 14 10 10 14\"/><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.03\" points=\"6 6 10 10 6 14\"/></svg>", 14368 "chevron-down": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.03\" points=\"16 7 10 13 4 7\"/></svg>", 14369 "chevron-left": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.03\" points=\"13 16 7 10 13 4\"/></svg>", 14370 "chevron-right": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.03\" points=\"7 4 13 10 7 16\"/></svg>", 14371 "chevron-up": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.03\" points=\"4 13 10 7 16 13\"/></svg>", 14372 "clock": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10\" cy=\"10\" r=\"9\"/><rect x=\"9\" y=\"4\" width=\"1\" height=\"7\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M13.018,14.197 L9.445,10.625\"/></svg>", 14373 "close": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.06\" d=\"M16,16 L4,4\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.06\" d=\"M16,4 L4,16\"/></svg>", 14374 "cloud-download": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M6.5,14.61 L3.75,14.61 C1.96,14.61 0.5,13.17 0.5,11.39 C0.5,9.76 1.72,8.41 3.3,8.2 C3.38,5.31 5.75,3 8.68,3 C11.19,3 13.3
143741,4.71 13.89,7.02 C14.39,6.8 14.93,6.68 15.5,6.68 C17.71,6.68 19.5,8.45 19.5,10.64 C19.5,12.83 17.71,14.6 15.5,14.6 L12.5,14.6\"/><polyline fill=\"none\" stroke=\"#000\" points=\"11.75 16 9.5 18.25 7.25 16\"/><path fill=\"none\" stroke=\"#000\" d=\"M9.5,18 L9.5,9.5\"/></svg>", 14375 "cloud-upload": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M6.5,14.61 L3.75,14.61 C1.96,14.61 0.5,13.17 0.5,11.39 C0.5,9.76 1.72,8.41 3.31,8.2 C3.38,5.31 5.75,3 8.68,3 C11.19,3 13.31,4.71 13.89,7.02 C14.39,6.8 14.93,6.68 15.5,6.68 C17.71,6.68 19.5,8.45 19.5,10.64 C19.5,12.83 17.71,14.6 15.5,14.6 L12.5,14.6\"/><polyline fill=\"none\" stroke=\"#000\" points=\"7.25 11.75 9.5 9.5 11.75 11.75\"/><path fill=\"none\" stroke=\"#000\" d=\"M9.5,18 L9.5,9.5\"/></svg>", 14376 "code": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.01\" points=\"13,4 19,10 13,16\"/><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.01\" points=\"7,4 1,10 7,16\"/></svg>", 14377 "cog": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" cx=\"9.997\" cy=\"10\" r=\"3.31\"/><path fill=\"none\" stroke=\"#000\" d=\"M18.488,12.285 L16.205,16.237 C15.322,15.496 14.185,15.281 13.303,15.791 C12.428,16.289 12.047,17.373 12.246,18.5 L7.735,18.5 C7.938,17.374 7.553,16.299 6.684,15.791 C5.801,15.27 4.655,15.492 3.773,16.237 L1.5,12.285 C2.573,11.871 3.317,10.999 3.317,9.991 C3.305,8.98 2.573,8.121 1.5,7.716 L3.765,3.784 C4.645,4.516 5.794,4.738 6.687,4.232 C7.555,3.722 7.939,2.637 7.735,1.5 L12.263,1.5 C12.072,2.637 12.441,3.71 13.314,4.22 C14.206,4.73 15.343,4.516 16.225,3.794 L18.487,7.714 C17.404,8.117 16.661,8.988 16.67,10.009 C16.672,11.018 17.415,11.88 18.488,12.285 L18.488,12.285 Z\"/></svg>", 14378 "comment": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6,18.71 L6,14 L1,14 L1,1 L19,1 L19,14 L10.71,14 L6,18.71 L6,18.71 Z M2,13 L7,13 L7,16.29 L10.29,13 L18,13 L18,2 L2,2 L2,13 L2,13 Z\"/></svg>", 14379 "commenting": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon fill=\"none\" stroke=\"#000\" points=\"1.5,1.5 18.5,1.5 18.5,13.5 10.5,13.5 6.5,17.5 6.5,13.5 1.5,13.5\"/><circle cx=\"10\" cy=\"8\" r=\"1\"/><circle cx=\"6\" cy=\"8\" r=\"1\"/><circle cx=\"14\" cy=\"8\" r=\"1\"/></svg>", 14380 "comments": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" points=\"2 0.5 19.5 0.5 19.5 13\"/><path d=\"M5,19.71 L5,15 L0,15 L0,2 L18,2 L18,15 L9.71,15 L5,19.71 L5,19.71 L5,19.71 Z M1,14 L6,14 L6,17.29 L9.29,14 L17,14 L17,3 L1,3 L1,14 L1,14 L1,14 Z\"/></svg>", 14381 "copy": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect fill=\"none\" stroke=\"#000\" x=\"3.5\" y=\"2.5\" width=\"12\" height=\"16\"/><polyline fill=\"none\" stroke=\"#000\" points=\"5 0.5 17.5 0.5 17.5 17\"/></svg>", 14382 "credit-card": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect fill=\"none\" stroke=\"#000\" x=\"1.5\" y=\"4.5\" width=\"17\" height=\"12\"/><rect x=\"1\" y=\"7\" width=\"18\" height=\"3\"/></svg>", 14383 "database": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><ellipse fill=\"none\" stroke=\"#000\" cx=\"10\" cy=\"4.64\" rx=\"7.5\" ry=\"3.14\"/><path fill=\"none\" stroke=\"#000\" d=\"M17.5,8.11 C17.5,9.85 14.14,11.25 10,11.25 C5.86,11.25 2.5,9.84 2.5,8.11\"/><path fill=\"none\" stroke=\"#000\" d=\"M17.5,11.25 C17.5,12.99 14.14,14.39 10,14.39 C5.86,14.39 2.5,12.98 2.5,11.25\"/><path fill=\"none\" stroke=\"#000\" d=\"M17.49,4.64 L17.5,14.36 C17.5,16.1 14.14,17.5 10,17.5 C5.86,17.5 2.5,16.09 2.5,14.36 L2.5,4.64\"/></svg>", 14384 "desktop": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"8\" y=\"15\" width=\"1\" height=\"2\"/><rect x=\"11\" y=\"15\" width=\"1\" height=\"2\"/><rect x=\"5\" y=\"16\" width=\"10\" height=\"1\"/><rect fill=\"none\" stroke=\"#000\" x=\"1.5\" y=\"3.5\" width=\"17\" height=\"11\"/></svg>", 14385 "download": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" points=\"14,10 9.5,14.5 5,10\"/><rect x=\"3\" y=\"17\" width=\"13\" height=\"1\"/><line fill=\"none\" stroke=\"#000\" x1=\"9.5\" y1=\"13.91\" x2=\"9.5\" y2=\"3\"/></svg>", 14386 "dribbble": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" d=\"M1.3,8.9c0,0,5,0.1,8.6-1c1.4-0.4,2.6-0.9,4-1.9 c1.4-1.1,2.5-2.5,2.5-2.5\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" d=\"M3.9,16.6c0,0,1.7-2.8,3.5-4.2 c1.8-1.3,4-2,5.7-2.2C16,10,19,10.6,19,10.6\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" d=\"M6.9,1.6c0,0,3.3,4.6,4.2,6.8 c0.4,0.9,1.3,3.1,1.9,5.2c0.6,2,0.9,4.4,0.9,4.4\"/><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" cx=\"10\" cy=\"10\" r=\"9\"/></svg>", 14387 "etsy": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><path d=\"M8,4.26C8,4.07,8,4,8.31,4h4.46c.79,0,1.22.67,1.53,1.91l.25,1h.76c.14-2.82.26-4,.26-4S13.65,3,12.52,3H6.81L3.75,2.92v.84l1,.2c.73.11.9.27,1,1,0,0,.06,2,.06,5.17s-.06,5.14-.06,5.14c0,.59-.23.81-1,.94l-1,.2v.84l3.06-.1h5.11c1.15,0,3.82.1,3.82.1,0-.7.45-3.88.51-4.22h-.73l-.76,1.69a2.25,2.25,0,0,1-2.45,1.47H9.4c-1,0-1.44-.4-1.44-1.24V10.44s2.16,0,2.86.06c.55,0,.85.19,1.06,1l.23,1H13L12.9,9.94,13,7.41h-.85l-.28,1.13c-.16.74-.28.84-1,1-1,.1-2.89.09-2.89.09Z\"/></svg>", 14388 "expand": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"13 2 18 2 18 7 17 7 17 3 13 3\"/><polygon points=\"2 13 3 13 3 17 7 17 7 18 2 18\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M11,9 L17,3\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M3,17 L9,11\"/></svg>", 14389 "facebook": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11,10h2.6l0.4-3H11V5.3c0-0.9,0.2-1.5,1.5-1.5H14V1.1c-0.3,0-1-0.1-2.1-0.1C9.6,1,8,2.4,8,5v2H5.5v3H8v8h3V10z\"/></svg>", 14390 "file-edit": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" d=\"M18.65,1.68 C18.41,1.45 18.109,1.33 17.81,1.33 C17.499,1.33 17.209,1.45 16.98,1.68 L8.92,9.76 L8,12.33 L10.55,11.41 L18.651,3.34 C19.12,2.87 19.12,2.15 18.65,1.68 L18.65,1.68 L18.65,1.68 Z\"/><polyline fill=\"none\" stroke=\"#000\" points=\"16.5 8.482 16.5 18.5 3.5 18.5 3.5 1.5 14.211 1.5\"/></svg>", 14391 "file-pdf": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect fill=\"none\" stroke=\"#000\" width=\"13\" height=\"17\" x=\"3.5\" y=\"1.5\"/><path d=\"M14.65 11.67c-.48.3-1.37-.19-1.79-.37a4.65 4.65 0 0 1 1.49.06c.35.1.36.28.3.31zm-6.3.06l.43-.79a14.7 14.7 0 0 0 .75-1.64 5.48 5.48 0 0 0 1.25 1.55l.2.15a16.36 16.36 0 0 0-2.63.73zM9.5 5.32c.2 0 .32.5.32.97a1.99 1.99 0 0 1-.23 1.04 5.05 5.05 0 0 1-.17-1.3s0-.71.08-.71zm-3.9 9a4.35 4.35 0 0 1 1.21-1.46l.24-.22a4.35 4.35 0 0 1-1.46 1.68zm9.23-3.3a2.05 2.05 0 0 0-1.32-.3 11.07 11.07 0 0 0-1.58.11 4.09 4.09 0 0 1-.74-.5 5.39 5.39 0 0 1-1.32-2.06 10.37 10.37 0 0 0 .28-2.62 1.83 1.83 0 0 0-.07-.25.57.57 0 0 0-.52-.4H9.4a.59.59 0 0 0-.6.38 6.95 6.95 0 0 0 .37 3.14c-.26.63-1 2.12-1 2.12-.3.58-.57 1.08-.82 1.5l-.8.44A3.11 3.11 0 0 0 5 14.16a.39.39 0 0 0 .15.42l.24.13c1.15.56 2.28-1.74 2.66-2.42a23.1 23.1 0 0 1 3.59-.85 4.56 4.56 0 0 0 2.91.8.5.5 0 0 0 .3-.21 1.1 1.1 0 0 0 .12-.75.84.84 0 0 0-.14-.25z\"/></svg>", 14392 "file-text": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect fill=\"none\" stroke=\"#000\" width=\"13\" height=\"17\" x=\"3.5\" y=\"1.5\"/><line fill=\"none\" stroke=\"#000\" x1=\"6\" x2=\"12\" y1=\"12.5\" y2=\"12.5\"/><line fill=\"none\" stroke=\"#000\" x1=\"6\" x2=\"14\" y1=\"8.5\" y2=\"8.5\"/><line fill=\"none\" stroke=\"#000\" x1=\"6\" x2=\"14\" y1=\"6.5\" y2=\"6.5\"/><line fill=\"none\" stroke=\"#000\" x1=\"6\" x2=\"14\" y1=\"10.5\" y2=\"10.5\"/></svg>", 14393 "file": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect fill=\"none\" stroke=\"#000\" x=\"3.5\" y=\"1.5\" width=\"13\" height=\"17\"/></svg>", 14394 "flickr": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"5.5\" cy=\"9.5\" r=\"3.5\"/><circle cx=\"14.5\" cy=\"9.5\" r=\"3.5\"/></svg>", 14395 "folder": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon fill=\"none\" stroke=\"#000\" points=\"9.5 5.5 8.5 3.5 1.5 3.5 1.5 16.5 18.5 16.5 18.5 5.5\"/></svg>", 14396 "forward": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2.47,13.11 C4.02,10.02 6.27,7.85 9.04,6.61 C9.48,6.41 10.27,6.13 11,5.91 L11,2 L18.89,9 L11,16 L11,12.13 C9.25,12.47 7.58,13.19 6.02,14.25 C3.03,16.28 1.63,18.54 1.63,18.54 C1.63,18.54 1.38,15.28 2.47,13.11 L2.47,13.11 Z M5.3,13.53 C6.92,12.4 9.04,11.4 12,10.92 L12,13.63 L17.36,9 L12,4.25 L12,6.8 C11.71,6.86 10.86,7.02 9.67,7.49 C6.79,8.65 4.58,10.96 3.49,13.08 C3.18,13.7 2.68,14.87 2.49,16 C3.28,15.05 4.4,14.15 5.3,13.53 L5.3,13.53 Z\"/></svg>", 14397 "foursquare": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15.23,2 C15.96,2 16.4,2.41 16.5,2.86 C16.57,3.15 16.56,3.44 16.51,3.73 C16.46,4.04 14.86,11.72 14.75,12.03 C14.56,12.56 14.16,12.82 13.61,12.83 C13.03,12.84 11.09,12.51 10.69,13 C10.38,13.38 7.79,16.39 6.81,17.53 C6.61,17.76 6.4,17.96 6.08,17.99 C5.68,18.04 5.29,17.87 5.17,17.45 C5.12,17.28 5.1,17.09 5.1,16.91 C5.1,12.4 4.86,7.81 5.11,3.31 C5.17,2.5 5.81,2.12 6.53,2 L15.23,2 L15.23,2 Z M9.76,11.42 C9.94,11.19 10.17,11.1 10.45,11.1 L12.86,11.1 C13.12,11.1 13.31,10.94 13.36,10.69 C13.37,10.64 13.62,9.41 13.74,8.83 C13.81,8.52 13.53,8.28 13.27,8.28 C12.35,8.29 11.42,8.28 10.5,8.28 C9.84,8.28 9.83,7.69 9.82,7.21 C9.8,6.85 10.13,6.55 10.5,6.55 C11.59,6.56 12.67,6.55 13.76,6.55 C14.03,6.55 14.23,6.4 14.28,6.14 C14.34,5.87 14.67,4.29 14.67,4.29 C14.67,4.29 14.82,3.74 14.19,3.74 L7.34,3.74 C7,3.75 6.84,4.02 6.84,4.33 C6.84,7.58 6.85,14.95 6.85,14.99 C6.87,15 8.89,12.51 9.76,11.42 L9.76,11.42 Z\"/></svg>", 14398 "future": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline points=\"19 2 18 2 18 6 14 6 14 7 19 7 19 2\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M18,6.548 C16.709,3.29 13.354,1 9.6,1 C4.6,1 0.6,5 0.6,10 C0.6,15 4.6,19 9.6,19 C14.6,19 18.6,15 18.6,10\"/><rect x=\"9\" y=\"4\" width=\"1\" height=\"7\"/><path d=\"M13.018,14.197 L9.445,10.625\" fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\"/></svg>", 14399 "git-branch": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" cx=\"7\" cy=\"3\" r=\"2\"/><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" cx=\"14\" cy=\"6\" r=\"2\"/><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" cx=\"7\" cy=\"17\" r=\"2\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"2\" d=\"M14,8 C14,10.41 12.43,10.87 10.56,11.25 C9.09,11.54 7,12.06 7,15 L7,5\"/></svg>", 14400 "git-fork": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" cx=\"5.79\" cy=\"2.79\" r=\"1.79\"/><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" cx=\"14.19\" cy=\"2.79\" r=\"1.79\"/><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" cx=\"10.03\" cy=\"16.79\" r=\"1.79\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"2\" d=\"M5.79,4.57 L5.79,6.56 C5.79,9.19 10.03,10.22 10.03,13.31 C10.03,14.86 10.04,14.55 10.04,14.55 C10.04,14.37 10.04,14.86 10.04,13.31 C10.04,10.22 14.2,9.19 14.2,6.56 L14.2,4.57\"/></svg>", 14401 "github-alt": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10,0.5 C4.75,0.5 0.5,4.76 0.5,10.01 C0.5,15.26 4.75,19.51 10,19.51 C15.24,19.51 19.5,15.26 19.5,10.01 C19.5,4.76 15.25,0.5 10,0.5 L10,0.5 Z M12.81,17.69 C12.81,17.69 12.81,17.7 12.79,17.69 C12.47,17.75 12.35,17.59 12.35,17.36 L12.35,16.17 C12.35,15.45 12.09,14.92 11.58,14.56 C12.2,14.51 12.77,14.39 13.26,14.21 C13.87,13.98 14.36,13.69 14.74,13.29 C15.42,12.59 15.76,11.55 15.76,10.17 C15.76,9.25 15.45,8.46 14.83,7.8 C15.1,7.08 15.07,6.29 14.75,5.44 L14.51,5.42 C14.34,5.4 14.06,5.46 13.67,5.61 C13.25,5.78 12.79,6.03 12.31,6.35 C11.55,6.16 10.81,6.05 10.09,6.05 C9.36,6.05 8.61,6.15 7.88,6.35 C7.28,5.96 6.75,5.68 6.26,5.54 C6.07,5.47 5.9,5.44 5.78,5.44 L5.42,5.44 C5.06,6.29 5.04,7.08 5.32,7.8 C4.7,8.46 4.4,9.25 4.4,10.17 C4.4,11.94 4.96,13.16 6.08,13.84 C6.53,14.13 7.05,14.32 7.69,14.43 C8.03,14.5 8.32,14.54 8.55,14.55 C8.07,14.89 7.82,15.42 7.82,16.16 L7.82,17.51 C7.8,17.69 7.7,17.8 7.51,17.8 C4.21,16.74 1.82,13.65 1.82,10.01 C1.82,5.5 5.49,1.83 10,1.83 C14.5,1.83 18.17,5.5 18.17,10.01 C18.18,13.53 15.94,16.54 12.81,17.69 L12.81,17.69 Z\"/></svg>", 14402 "github": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10,1 C5.03,1 1,5.03 1,10 C1,13.98 3.58,17.35 7.16,18.54 C7.61,18.62 7.77,18.34 7.77,18.11 C7.77,17.9 7.76,17.33 7.76,16.58 C5.26,17.12 4.73,15.37 4.73,15.37 C4.32,14.33 3.73,14.05 3.73,14.05 C2.91,13.5 3.79,13.5 3.79,13.5 C4.69,13.56 5.17,14.43 5.17,14.43 C5.97,15.8 7.28,15.41 7.79,15.18 C7.87,14.6 8.1,14.2 8.36,13.98 C6.36,13.75 4.26,12.98 4.26,9.53 C4.26,8.55 4.61,7.74 5.19,7.11 C5.1,6.88 4.79,5.97 5.28,4.73 C5.28,4.73 6.04,4.49 7.75,5.65 C8.47,5.45 9.24,5.35 10,5.35 C10.76,5.35 11.53,5.45 12.25,5.65 C13.97,4.48 14.72,4.73 14.72,4.73 C15.21,5.97 14.9,6.88 14.81,7.11 C15.39,7.74 15.73,8.54 15.73,9.53 C15.73,12.99 13.63,13.75 11.62,13.97 C11.94,14.25 12.23,14.8 12.23,15.64 C12.23,16.84 12.22,17.81 12.22,18.11 C12.22,18.35 12.38,18.63 12.84,18.54 C16.42,17.35 19,13.98 19,10 C19,5.03 14.97,1 10,1 L10,1 Z\"/></svg>", 14403 "gitter": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"3.5\" y=\"1\" width=\"1.531\" height=\"11.471\"/><rect x=\"7.324\" y=\"4.059\" width=\"1.529\" height=\"15.294\"/><rect x=\"11.148\" y=\"4.059\" width=\"1.527\" height=\"15.294\"/><rect x=\"14.971\" y=\"4.059\" width=\"1.529\" height=\"8.412\"/></svg>", 14404 "google-plus": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.9,9c0,2.7-0.6,5-3.2,6.3c-3.7,1.8-8.1,0.2-9.4-3.6C-1.1,7.6,1.9,3.3,6.1,3c1.7-0.1,3.2,0.3,4.6,1.3 c0.1,0.1,0.3,0.2,0.4,0.4c-0.5,0.5-1.2,1-1.7,1.6c-1-0.8-2.1-1.1-3.5-0.9C5,5.6,4.2,6,3.6,6.7c-1.3,1.3-1.5,3.4-0.5,5 c1,1.7,2.6,2.3,4.6,1.9c1.4-0.3,2.4-1.2,2.6-2.6H6.9V9H12.9z\"/><polygon points=\"20,9 20,11 18,11 18,13 16,13 16,11 14,11 14,9 16,9 16,7 18,7 18,9\"/></svg>", 14405 "google": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.86,9.09 C18.46,12.12 17.14,16.05 13.81,17.56 C9.45,19.53 4.13,17.68 2.47,12.87 C0.68,7.68 4.22,2.42 9.5,2.03 C11.57,1.88 13.42,2.37 15.05,3.65 C15.22,3.78 15.37,3.93 15.61,4.14 C14.9,4.81 14.23,5.45 13.5,6.14 C12.27,5.08 10.84,4.72 9.28,4.98 C8.12,5.17 7.16,5.76 6.37,6.63 C4.88,8.27 4.62,10.86 5.76,12.82 C6.95,14.87 9.17,15.8 11.57,15.25 C13.27,14.87 14.76,13.33 14.89,11.75 L10.51,11.75 L10.51,9.09 L17.86,9.09 L17.86,9.09 Z\"/></svg>", 14406 "grid": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"2\" y=\"2\" width=\"3\" height=\"3\"/><rect x=\"8\" y=\"2\" width=\"3\" height=\"3\"/><rect x=\"14\" y=\"2\" width=\"3\" height=\"3\"/><rect x=\"2\" y=\"8\" width=\"3\" height=\"3\"/><rect x=\"8\" y=\"8\" width=\"3\" height=\"3\"/><rect x=\"14\" y=\"8\" width=\"3\" height=\"3\"/
14406><rect x=\"2\" y=\"14\" width=\"3\" height=\"3\"/><rect x=\"8\" y=\"14\" width=\"3\" height=\"3\"/><rect x=\"14\" y=\"14\" width=\"3\" height=\"3\"/></svg>", 14407 "happy": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"13\" cy=\"7\" r=\"1\"/><circle cx=\"7\" cy=\"7\" r=\"1\"/><circle fill=\"none\" stroke=\"#000\" cx=\"10\" cy=\"10\" r=\"8.5\"/><path fill=\"none\" stroke=\"#000\" d=\"M14.6,11.4 C13.9,13.3 12.1,14.5 10,14.5 C7.9,14.5 6.1,13.3 5.4,11.4\"/></svg>", 14408 "hashtag": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15.431,8 L15.661,7 L12.911,7 L13.831,3 L12.901,3 L11.98,7 L9.29,7 L10.21,3 L9.281,3 L8.361,7 L5.23,7 L5,8 L8.13,8 L7.21,12 L4.23,12 L4,13 L6.98,13 L6.061,17 L6.991,17 L7.911,13 L10.601,13 L9.681,17 L10.611,17 L11.531,13 L14.431,13 L14.661,12 L11.76,12 L12.681,8 L15.431,8 Z M10.831,12 L8.141,12 L9.061,8 L11.75,8 L10.831,12 Z\"/></svg>", 14409 "heart": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.03\" d=\"M10,4 C10,4 8.1,2 5.74,2 C3.38,2 1,3.5
144095 1,6.73 C1,8.84 2.67,10.44 2.67,10.44 L10,18 L17.33,10.44 C17.33,10.44 19,8.84 19,6.73 C19,3.55 16.62,2 14.26,2 C11.9,2 10,4 10,4 L10,4 Z\"/></svg>", 14410 "history": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"#000\" points=\"1 2 2 2 2 6 6 6 6 7 1 7 1 2\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M2.1,6.548 C3.391,3.29 6.746,1 10.5,1 C15.5,1 19.5,5 19.5,10 C19.5,15 15.5,19 10.5,19 C5.5,19 1.5,15 1.5,10\"/><rect x=\"9\" y=\"4\" width=\"1\" height=\"7\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M13.018,14.197 L9.445,10.625\"/></svg>", 14411 "home": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"18.65 11.35 10 2.71 1.35 11.35 0.65 10.65 10 1.29 19.35 10.65\"/><polygon points=\"15 4 18 4 18 7 17 7 17 5 15 5\"/><polygon points=\"3 11 4 11 4 18 7 18 7 12 12 12 12 18 16 18 16 11 17 11 17 19 11 19 11 13 8 13 8 19 3 19\"/></svg>", 14412 "image": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"16.1\" cy=\"6.1\" r=\"1.1\"/><rect fill=\"none\" stroke=\"#000\" x=\".5\" y=\"2.5\" width=\"19\" height=\"15\"/><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.01\" points=\"4,13 8,9 13,14\"/><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.01\" points=\"11,12 12.5,10.5 16,14\"/></svg>", 14413 "info": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z\"/><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10\" cy=\"10\" r=\"9\"/></svg>", 14414 "instagram": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13.55,1H6.46C3.45,1,1,3.44,1,6.44v7.12c0,3,2.45,5.44,5.46,5.44h7.08c3.02,0,5.46-2.44,5.46-5.44V6.44 C19.01,3.44,16.56,1,13.55,1z M17.5,14c0,1.93-1.57,3.5-3.5,3.5H6c-1.93,0-3.5-1.57-3.5-3.5V6c0-1.93,1.57-3.5,3.5-3.5h8 c1.93,0,3.5,1.57,3.5,3.5V14z\"/><circle cx=\"14.87\" cy=\"5.26\" r=\"1.09\"/><path d=\"M10.03,5.45c-2.55,0-4.63,2.06-4.63,4.6c0,2.55,2.07,4.61,4.63,4.61c2.56,0,4.63-2.061,4.63-4.61 C14.65,7.51,12.58,5.45,10.03,5.45L10.03,5.45L10.03,5.45z M10.08,13c-1.66,0-3-1.34-3-2.99c0-1.65,1.34-2.99,3-2.99s3,1.34,3,2.99 C13.08,11.66,11.74,13,10.08,13L10.08,13L10.08,13z\"/></svg>", 14415 "italic": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.63,5.48 L10.15,14.52 C10,15.08 10.37,15.25 11.92,15.3 L11.72,16 L6,16 L6.2,15.31 C7.78,15.26 8.19,15.09 8.34,14.53 L10.82,5.49 C10.97,4.92 10.63,4.76 9.09,4.71 L9.28,4 L15,4 L14.81,4.69 C13.23,4.75 12.78,4.91 12.63,5.48 L12.63,5.48 Z\"/></svg>", 14416 "joomla": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.8,13.4l1.7-1.7L5.9,8c-0.6-0.5-0.6-1.5,0-2c0.6-0.6,1.4-0.6,2,0l1.7-1.7c-1-1-2.3-1.3-3.6-1C5.8,2.2,4.8,1.4,3.7,1.4 c-1.3,0-2.3,1-2.3,2.3c0,1.1,0.8,2,1.8,2.3c-0.4,1.3-0.1,2.8,1,3.8L7.8,13.4L7.8,13.4z\"/><path d=\"M10.2,4.3c1-1,2.5-1.4,3.8-1c0.2-1.1,1.1-2,2.3-2c1.3,0,2.3,1,2.3,2.3c0,1.2-0.9,2.2-2,2.3c0.4,1.3,0,2.8-1,3.8L13.9,8 c0.6-0.5,0.6-1.5,0-2c-0.5-0.6-1.5-0.6-2,0L8.2,9.7L6.5,8\"/><path d=\"M14.1,16.8c-1.3,0.4-2.8,0.1-3.8-1l1.7-1.7c0.6,0.6,1.5,0.6,2,0c0.5-0.6,0.6-1.5,0-2l-3.7-3.7L12,6.7l3.7,3.7 c1,1,1.3,2.4,1,3.6c1.1,0.2,2,1.1,2,2.3c0,1.3-1,2.3-2.3,2.3C15.2,18.6,14.3,17.8,14.1,16.8\"/><path d=\"M13.2,12.2l-3.7,3.7c-1,1-2.4,1.3-3.6,1c-0.2,1-1.2,1.8-2.2,1.8c-1.3,0-2.3-1-2.3-2.3c0-1.1,0.8-2,1.8-2.3 c-0.3-1.3,0-2.7,1-3.7l1.7,1.7c-0.6,0.6-0.6,1.5,0,2c0.6,0.6,1.4,0.6,2,0l3.7-3.7\"/></svg>", 14417 "laptop": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect y=\"16\" width=\"20\" height=\"1\"/><rect fill=\"none\" stroke=\"#000\" x=\"2.5\" y=\"4.5\" width=\"15\" height=\"10\"/></svg>", 14418 "lifesaver": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10,0.5 C4.76,0.5 0.5,4.76 0.5,10 C0.5,15.24 4.76,19.5 10,19.5 C15.24,19.5 19.5,15.24 19.5,10 C19.5,4.76 15.24,0.5 10,0.5 L10,0.5 Z M10,1.5 C11.49,1.5 12.89,1.88 14.11,2.56 L11.85,4.82 C11.27,4.61 10.65,4.5 10,4.5 C9.21,4.5 8.47,4.67 7.79,4.96 L5.58,2.75 C6.87,1.95 8.38,1.5 10,1.5 L10,1.5 Z M4.96,7.8 C4.67,8.48 4.5,9.21 4.5,10 C4.5,10.65 4.61,11.27 4.83,11.85 L2.56,14.11 C1.88,12.89 1.5,11.49 1.5,10 C1.5,8.38 1.95,6.87 2.75,5.58 L4.96,7.79 L4.96,7.8 L4.96,7.8 Z M10,18.5 C8.25,18.5 6.62,17.97 5.27,17.06 L7.46,14.87 C8.22,15.27 9.08,15.5 10,15.5 C10.79,15.5 11.53,15.33 12.21,15.04 L14.42,17.25 C13.13,18.05 11.62,18.5 10,18.5 L10,18.5 Z M10,14.5 C7.52,14.5 5.5,12.48 5.5,10 C5.5,7.52 7.52,5.5 10,5.5 C12.48,5.5 14.5,7.52 14.5,10 C14.5,12.48 12.48,14.5 10,14.5 L10,14.5 Z M15.04,12.21 C15.33,11.53 15.5,10.79 15.5,10 C15.5,9.08 15.27,8.22 14.87,7.46 L17.06,5.27 C17.97,6.62 18.5,8.25 18.5,10 C18.5,11.62 18.05,13.13 17.25,14.42 L15.04,12.21 L15.04,12.21 Z\"/></svg>", 14419 "link": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M7.925,11.875 L11.925,7.975\"/></svg>", 14420 "linkedin": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.77,17.89 L5.77,7.17 L2.21,7.17 L2.21,17.89 L5.77,17.89 L5.77,17.89 Z M3.99,5.71 C5.23,5.71 6.01,4.89 6.01,3.86 C5.99,2.8 5.24,2 4.02,2 C2.8,2 2,2.8 2,3.85 C2,4.88 2.77,5.7 3.97,5.7 L3.99,5.7 L3.99,5.71 L3.99,5.71 Z\"/><path d=\"M7.75,17.89 L11.31,17.89 L11.31,11.9 C11.31,11.58 11.33,11.26 11.43,11.03 C11.69,10.39 12.27,9.73 13.26,9.73 C14.55,9.73 15.06,10.71 15.06,12.15 L15.06,17.89 L18.62,17.89 L18.62,11.74 C18.62,8.45 16.86,6.92 14.52,6.92 C12.6,6.92 11.75,7.99 11.28,8.73 L11.3,8.73 L11.3,7.17 L7.75,7.17 C7.79,8.17 7.75,17.89 7.75,17.89 L7.75,17.89 L7.75,17.89 Z\"/></svg>", 14421 "list": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"6\" y=\"4\" width=\"12\" height=\"1\"/><rect x=\"6\" y=\"9\" width=\"12\" height=\"1\"/><rect x=\"6\" y=\"14\" width=\"12\" height=\"1\"/><rect x=\"2\" y=\"4\" width=\"2\" height=\"1\"/><rect x=\"2\" y=\"9\" width=\"2\" height=\"1\"/><rect x=\"2\" y=\"14\" width=\"2\" height=\"1\"/></svg>", 14422 "location": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.01\" d=\"M10,0.5 C6.41,0.5 3.5,3.39 3.5,6.98 C3.5,11.83 10,19 10,19 C10,
1442219 16.5,11.83 16.5,6.98 C16.5,3.39 13.59,0.5 10,0.5 L10,0.5 Z\"/><circle fill=\"none\" stroke=\"#000\" cx=\"10\" cy=\"6.8\" r=\"2.3\"/></svg>", 14423 "lock": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect fill=\"none\" stroke=\"#000\" height=\"10\" width=\"13\" y=\"8.5\" x=\"3.5\"/><path fill=\"none\" stroke=\"#000\" d=\"M6.5,8 L6.5,4.88 C6.5,3.01 8.07,1.5 10,1.5 C11.93,1.5 13.5,3.01 13.5,4.88 L13.5,8\"/></svg>", 14424 "mail": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" points=\"1.4,6.5 10,11 18.6,6.5\"/><path d=\"M 1,4 1,16 19,16 19,4 1,4 Z M 18,15 2,15 2,5 18,5 18,15 Z\"/></svg>", 14425 "menu": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"2\" y=\"4\" width=\"16\" height=\"1\"/><rect x=\"2\" y=\"9\" width=\"16\" height=\"1\"/><rect x=\"2\" y=\"14\" width=\"16\" height=\"1\"/></svg>", 14426 "microphone": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" x1=\"10\" x2=\"10\" y1=\"16.44\" y2=\"18.5\"/><line fill=\"none\" stroke=\"#000\" x1=\"7\" x2=\"13\" y1=\"18.5\" y2=\"18.5\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M13.5 4.89v5.87a3.5 3.5 0 0 1-7 0V4.89a3.5 3.5 0 0 1 7 0z\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M15.5 10.36V11a5.5 5.5 0 0 1-11 0v-.6\"/></svg>", 14427 "minus-circle": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"9.5\" cy=\"9.5\" r=\"9\"/><line fill=\"none\" stroke=\"#000\" x1=\"5\" y1=\"9.5\" x2=\"14\" y2=\"9.5\"/></svg>", 14428 "minus": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect height=\"1\" width=\"18\" y=\"9\" x=\"1\"/></svg>", 14429 "more-vertical": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"10\" cy=\"3\" r=\"2\"/><circle cx=\"10\" cy=\"10\" r=\"2\"/><circle cx=\"10\" cy=\"17\" r=\"2\"/></svg>", 14430 "more": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"3\" cy=\"10\" r=\"2\"/><circle cx=\"10\" cy=\"10\" r=\"2\"/><circle cx=\"17\" cy=\"10\" r=\"2\"/></svg>", 14431 "move": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"4,5 1,5 1,9 2,9 2,6 4,6\"/><polygon points=\"1,16 2,16 2,18 4,18 4,19 1,19\"/><polygon points=\"14,16 14,19 11,19 11,18 13,18 13,16\"/><rect fill=\"none\" stroke=\"#000\" x=\"5.5\" y=\"1.5\" width=\"13\" height=\"13\"/><rect x=\"1\" y=\"11\" width=\"1\" height=\"3\"/><rect x=\"6\" y=\"18\" width=\"3\" height=\"1\"/></svg>", 14432 "nut": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon fill=\"none\" stroke=\"#000\" points=\"2.5,5.7 10,1.3 17.5,5.7 17.5,14.3 10,18.7 2.5,14.3\"/><circle fill=\"none\" stroke=\"#000\" cx=\"10\" cy=\"10\" r=\"3.5\"/></svg>", 14433 "pagekit": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"3,1 17,1 17,16 10,16 10,13 14,13 14,4 6,4 6,16 10,16 10,19 3,19\"/></svg>", 14434 "paint-bucket": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.21,1 L0,11.21 L8.1,19.31 L18.31,9.1 L10.21,1 L10.21,1 Z M16.89,9.1 L15,11 L1.7,11 L10.21,2.42 L16.89,9.1 Z\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M6.42,2.33 L11.7,7.61\"/><path d=\"M18.49,12 C18.49,12 20,14.06 20,15.36 C20,16.28 19.24,17 18.49,17 L18.49,17 C17.74,17 17,16.28 17,15.36 C17,14.06 18.49,12 18.49,12 L18.49,12 Z\"/></svg>", 14435 "pencil": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" d=\"M17.25,6.01 L7.12,16.1 L3.82,17.2 L5.02,13.9 L15.12,3.88 C15.71,3.29 16.66,3.29 17.25,3.88 C17.83,4.47 17.83,5.42 17.25,6.01 L17.25,6.01 Z\"/><path fill=\"none\" stroke=\"#000\" d=\"M15.98,7.268 L13.851,5.148\"/></svg>", 14436 "phone-landscape": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" d=\"M17,5.5 C17.8,5.5 18.5,6.2 18.5,7 L18.5,14 C18.5,14.8 17.8,15.5 17,15.5 L3,15.5 C2.2,15.5 1.5,14.8 1.5,14 L1.5,7 C1.5,6.2 2.2,5.5 3,5.5 L17,5.5 L17,5.5 L17,5.5 Z\"/><circle cx=\"3.8\" cy=\"10.5\" r=\".8\"/></svg>", 14437 "phone": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" d=\"M15.5,17 C15.5,17.8 14.8,18.5 14,18.5 L7,18.5 C6.2,18.5 5.5,17.8 5.5,17 L5.5,3 C5.5,2.2 6.2,1.5 7,1.5 L14,1.5 C14.8,1.5 15.5,2.2 15.5,3 L15.5,17 L15.5,17 L15.5,17 Z\"/><circle cx=\"10.5\" cy=\"16.5\" r=\".8\"/></svg>", 14438 "pinterest": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.21,1 C5.5,1 3,4.16 3,7.61 C3,9.21 3.85,11.2 5.22,11.84 C5.43,11.94 5.54,11.89 5.58,11.69 C5.62,11.54 5.8,10.8 5.88,10.45 C5.91,10.34 5.89,10.24 5.8,10.14 C5.36,9.59 5,8.58 5,7.65 C5,5.24 6.82,2.91 9.93,2.91 C12.61,2.91 14.49,4.74 14.49,7.35 C14.49,10.3 13,12.35 11.06,12.35 C9.99,12.35 9.19,11.47 9.44,10.38 C9.75,9.08 10.35,7.68 10.35,6.75 C10.35,5.91 9.9,5.21 8.97,5.21 C7.87,5.21 6.99,6.34 6.99,7.86 C6.99,8.83 7.32,9.48 7.32,9.48 C7.32,9.48 6.24,14.06 6.04,14.91 C5.7,16.35 6.08,18.7 6.12,18.9 C6.14,19.01 6.26,19.05 6.33,18.95 C6.44,18.81 7.74,16.85 8.11,15.44 C8.24,14.93 8.79,12.84 8.79,12.84 C9.15,13.52 10.19,14.09 11.29,14.09 C14.58,14.09 16.96,11.
1443806 16.96,7.3 C16.94,3.7 14,1 10.21,1\"/></svg>", 14439 "play-circle": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"8.5 7 13.5 10 8.5 13\"/><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10\" cy=\"10\" r=\"9\"/></svg>", 14440 "play": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon fill=\"none\" stroke=\"#000\" points=\"6.5,5 14.5,10 6.5,15\"/></svg>", 14441 "plus-circle": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"9.5\" cy=\"9.5\" r=\"9\"/><line fill=\"none\" stroke=\"#000\" x1=\"9.5\" y1=\"5\" x2=\"9.5\" y2=\"14\"/><line fill=\"none\" stroke=\"#000\" x1=\"5\" y1=\"9.5\" x2=\"14\" y2=\"9.5\"/></svg>", 14442 "plus": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"1\" width=\"1\" height=\"17\"/><rect x=\"1\" y=\"9\" width=\"17\" height=\"1\"/></svg>", 14443 "print": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" points=\"4.5 13.5 1.5 13.5 1.5 6.5 18.5 6.5 18.5 13.5 15.5 13.5\"/><polyline fill=\"none\" stroke=\"#000\" points=\"15.5 6.5 15.5 2.5 4.5 2.5 4.5 6.5\"/><rect fill=\"none\" stroke=\"#000\" width=\"11\" height=\"6\" x=\"4.5\" y=\"11.5\"/><rect width=\"8\" height=\"1\" x=\"6\" y=\"13\"/><rect width=\"8\" height=\"1\" x=\"6\" y=\"15\"/></svg>", 14444 "pull": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"6.85,8 9.5,10.6 12.15,8 12.85,8.7 9.5,12 6.15,8.7\"/><line fill=\"none\" stroke=\"#000\" x1=\"9.5\" y1=\"11\" x2=\"9.5\" y2=\"2\"/><polyline fill=\"none\" stroke=\"#000\" points=\"6,5.5 3.5,5.5 3.5,18.5 15.5,18.5 15.5,5.5 13,5.5\"/></svg>", 14445 "push": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"12.15,4 9.5,1.4 6.85,4 6.15,3.3 9.5,0 12.85,3.3\"/><line fill=\"none\" stroke=\"#000\" x1=\"9.5\" y1=\"10\" x2=\"9.5\" y2=\"1\"/><polyline fill=\"none\" stroke=\"#000\" points=\"6 5.5 3.5 5.5 3.5 18.5 15.5 18.5 15.5 5.5 13 5.5\"/></svg>", 14446 "question": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10\" cy=\"10\" r=\"9\"/><circle cx=\"10.44\" cy=\"14.42\" r=\"1.05\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" d=\"M8.17,7.79 C8.17,4.75 12.72,4.73 12.72,7.72 C12.72,8.67 11.81,9.15 11.23,9.75 C10.75,10.24 10.51,10.73 10.45,11.4 C10.44,11.53 10.43,11.64 10.43,11.75\"/></svg>", 14447 "quote-right": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.27,7.79 C17.27,9.45 16.97,10.43 15.99,12.02 C14.98,13.64 13,15.23 11.56,15.97 L11.1,15.08 C12.34,14.2 13.14,13.51 14.02,11.82 C14.27,11.34 14.41,10.92 14.49,10.54 C14.3,10.58 14.09,10.6 13.88,10.6 C12.06,10.6 10.59,9.12 10.59,7.3 C10.59,5.48 12.06,4 13.88,4 C15.39,4 16.67,5.02 17.05,6.42 C17.19,6.82 17.27,7.27 17.27,7.79 L17.27,7.79 Z\"/><path d=\"M8.68,7.79 C8.68,9.45 8.38,10.43 7.4,12.02 C6.39,13.64 4.41,15.23 2.97,15.97 L2.51,15.08 C3.75,14.2 4.55,13.51 5.43,11.82 C5.68,11.34 5.82,10.92 5.9,10.54 C5.71,10.58 5.5,10.6 5.29,10.6 C3.47,10.6 2,9.12 2,7.3 C2,5.48 3.47,4 5.29,4 C6.8,4 8.08,5.02 8.46,6.42 C8.6,6.82 8.68,7.27 8.68,7.79 L8.68,7.79 Z\"/></svg>", 14448 "receiver": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.01\" d=\"M6.189,13.611C8.134,15.525 11.097,18.239 13.867,18.257C16.47,18.275 18.2,16.241 18.2,16.241L14.509,12.551L11.539,13.639L6.189,8.29L7.313,5.355L3.76,1.8C3.76,1.8 1.732,3.537 1.7,6.092C1.667,8.809 4.347,11.738 6.189,13.611\"/></svg>", 14449 "reddit": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M19 9.05a2.56 2.56 0 0 0-2.56-2.56 2.59 2.59 0 0 0-1.88.82 10.63 10.63 0 0 0-4.14-1v-.08c.58-1.62 1.58-3.89 2.7-4.1.38-.08.77.12 1.19.57a1.15 1.15 0 0 0-.06.37 1.48 1.48 0 1 0 1.51-1.45 1.43 1.43 0 0 0-.76.19A2.29 2.29 0 0 0 12.91 1c-2.11.43-3.39 4.38-3.63 5.19 0 0 0 .11-.06.11a10.65 10.65 0 0 0-3.75 1A2.56 2.56 0 0 0 1 9.05a2.42 2.42 0 0 0 .72 1.76A5.18 5.18 0 0 0 1.24 13c0 3.66 3.92 6.64 8.73 6.64s8.74-3 8.74-6.64a5.23 5.23 0 0 0-.46-2.13A2.58 2.58 0 0 0 19 9.05zm-16.88 0a1.44 1.44 0 0 1 2.27-1.19 7.68 7.68 0 0 0-2.07 1.91 1.33 1.33 0 0 1-.2-.72zM10 18.4c-4.17 0-7.55-2.4-7.55-5.4S5.83 7.53 10 7.53 17.5 10 17.5 13s-3.38 5.4-7.5 5.4zm7.69-8.61a7.62 7.62 0 0 0-2.09-1.91 1.41 1.41 0 0 1 .84-.28 1.47 1.47 0 0 1 1.44 1.45 1.34 1.34 0 0 1-.21.72z\"/><path d=\"M6.69 12.58a1.39 1.39 0 1 1 1.39-1.39 1.38 1.38 0 0 1-1.38 1.39z\"/><path d=\"M14.26 11.2a1.39 1.39 0 1 1-1.39-1.39 1.39 1.39 0 0 1 1.39 1.39z\"/><path d=\"M13.09 14.88a.54.54 0 0 1-.09.77 5.3 5.3 0 0 1-3.26 1.19 5.61 5.61 0 0 1-3.4-1.22.55.55 0 1 1 .73-.83 4.09 4.09 0 0 0 5.25 0 .56.56 0 0 1 .77.09z\"/></svg>", 14450 "refresh": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5\"/><polyline fill=\"none\" stroke=\"#000\" points=\"9.9 2 12.79 4.89 9.79 7.9\"/>
14450</svg>", 14451 "reply": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.7,13.11 C16.12,10.02 13.84,7.85 11.02,6.61 C10.57,6.41 9.75,6.13 9,5.91 L9,2 L1,9 L9,16 L9,12.13 C10.78,12.47 12.5,13.19 14.09,14.25 C17.13,16.28 18.56,18.54 18.56,18.54 C18.56,18.54 18.81,15.28 17.7,13.11 L17.7,13.11 Z M14.82,13.53 C13.17,12.4 11.01,11.4 8,10.92 L8,13.63 L2.55,9 L8,4.25 L8,6.8 C8.3,6.86 9.16,7.02 10.37,7.49 C13.3,8.65 15.54,10.96 16.65,13.08 C16.97,13.7 17.48,14.86 17.68,16 C16.87,15.05 15.73,14.15 14.82,13.53 L14.82,13.53 Z\"/></svg>", 14452 "rss": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"3.12\" cy=\"16.8\" r=\"1.85\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M1.5,8.2 C1.78,8.18 2.06,8.16 2.35,8.16 C7.57,8.16 11.81,12.37 11.81,17.57 C11.81,17.89 11.79,18.19 11.76,18.5\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M1.5,2.52 C1.78,2.51 2.06,2.5 2.35,2.5 C10.72,2.5 17.5,9.24 17.5,17.57 C17.5,17.89 17.49,18.19 17.47,18.5\"/></svg>", 14453 "search": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"9\" cy=\"9\" r=\"7\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M14,14 L18,18 L14,14 Z\"/></svg>", 14454 "server": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"3\" y=\"3\" width=\"1\" height=\"2\"/><rect x=\"5\" y=\"3\" width=\"1\" height=\"2\"/><rect x=\"7\" y=\"3\" width=\"1\" height=\"2\"/><rect x=\"16\" y=\"3\" width=\"1\" height=\"1\"/><rect x=\"16\" y=\"10\" width=\"1\" height=\"1\"/><circle fill=\"none\" stroke=\"#000\" cx=\"9.9\" cy=\"17.4\" r=\"1.4\"/><rect x=\"3\" y=\"10\" width=\"1\" height=\"2\"/><rect x=\"5\" y=\"10\" width=\"1\" height=\"2\"/><rect x=\"9.5\" y=\"14\" width=\"1\" height=\"2\"/><rect x=\"3\" y=\"17\" width=\"6\" height=\"1\"/><rect x=\"11\" y=\"17\" width=\"6\" height=\"1\"/><rect fill=\"none\" stroke=\"#000\" x=\"1.5\" y=\"1.5\" width=\"17\" height=\"5\"/><rect fill=\"none\" stroke=\"#000\" x=\"1.5\" y=\"8.5\" width=\"17\" height=\"5\"/></svg>", 14455 "settings": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><ellipse fill=\"none\" stroke=\"#000\" cx=\"6.11\" cy=\"3.55\" rx=\"2.11\" ry=\"2.15\"/><ellipse fill=\"none\" stroke=\"#000\" cx=\"6.11\" cy=\"15.55\" rx=\"2.11\" ry=\"2.15\"/><circle fill=\"none\" stroke=\"#000\" cx=\"13.15\" cy=\"9.55\" r=\"2.15\"/><rect x=\"1\" y=\"3\" width=\"3\" height=\"1\"/><rect x=\"10\" y=\"3\" width=\"8\" height=\"1\"/><rect x=\"1\" y=\"9\" width=\"8\" height=\"1\"/><rect x=\"15\" y=\"9\" width=\"3\" height=\"1\"/><rect x=\"1\" y=\"15\" width=\"3\" height=\"1\"/><rect x=\"10\" y=\"15\" width=\"8\" height=\"1\"/></svg>", 14456 "shrink": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"11 4 12 4 12 8 16 8 16 9 11 9\"/><polygon points=\"4 11 9 11 9 16 8 16 8 12 4 12\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M12,8 L18,2\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M2,18 L8,12\"/></svg>", 14457 "sign-in": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"7 2 17 2 17 17 7 17 7 16 16 16 16 3 7 3\"/><polygon points=\"9.1 13.4 8.5 12.8 11.28 10 4 10 4 9 11.28 9 8.5 6.2 9.1 5.62 13 9.5\"/></svg>", 14458 "sign-out": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"13.1 13.4 12.5 12.8 15.28 10 8 10 8 9 15.28 9 12.5 6.2 13.1 5.62 17 9.5\"/><polygon points=\"13 2 3 2 3 17 13 17 13 16 4 16 4 3 13 3\"/></svg>", 14459 "social": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"13.4\" y1=\"14\" x2=\"6.3\" y2=\"10.7\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"13.5\" y1=\"5.5\" x2=\"6.5\" y2=\"8.8\"/><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"15.5\" cy=\"4.6\" r=\"2.3\"/><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"15.5\" cy=\"14.8\" r=\"2.3\"/><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"4.5\" cy=\"9.8\" r=\"2.3\"/></svg>", 14460 "soundcloud": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.2,9.4c-0.4,0-0.8,0.1-1.101,0.2c-0.199-2.5-2.399-4.5-5-4.5c-0.6,0-1.2,0.1-1.7,0.3C9.2,5.5,9.1,5.6,9.1,5.6V15h8
14460c1.601,0,2.801-1.2,2.801-2.8C20,10.7,18.7,9.4,17.2,9.4L17.2,9.4z\"/><rect x=\"6\" y=\"6.5\" width=\"1.5\" height=\"8.5\"/><rect x=\"3\" y=\"8\" width=\"1.5\" height=\"7\"/><rect y=\"10\" width=\"1.5\" height=\"5\"/></svg>", 14461 "star": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon fill=\"none\" stroke=\"#000\" stroke-width=\"1.01\" points=\"10 2 12.63 7.27 18.5 8.12 14.25 12.22 15.25 18 10 15.27 4.75 18 5.75 12.22 1.5 8.12 7.37 7.27\"/></svg>", 14462 "strikethrough": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6,13.02 L6.65,13.02 C7.64,15.16 8.86,16.12 10.41,16.12 C12.22,16.12 12.92,14.93 12.92,13.89 C12.92,12.55 11.99,12.03 9.74,11.23 C8.05,10.64 6.23,10.11 6.23,7.83 C6.23,5.5 8.09,4.09 10.4,4.09 C11.44,4.09 12.13,4.31 12.72,4.54 L13.33,4 L13.81,4 L13.81,7.59 L13.16,7.59 C12.55,5.88 11.52,4.89 10.07,4.89 C8.84,4.89 7.89,5.69 7.89,7.03 C7.89,8.29 8.89,8.78 10.88,9.45 C12.57,10.03 14.38,10.6 14.38,12.91 C14.38,14.75 13.27,16.93 10.18,16.93 C9.18,16.93 8.17,16.69 7.46,16.39 L6.52,17 L6,17 L6,13.02 L6,13.02 Z\"/><rect x=\"3\" y=\"10\" width=\"15\" height=\"1\"/></svg>", 14463 "table": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"1\" y=\"3\" width=\"18\" height=\"1\"/><rect x=\"1\" y=\"7\" width=\"18\" height=\"1\"/><rect x=\"1\" y=\"11\" width=\"18\" height=\"1\"/><rect x=\"1\" y=\"15\" width=\"18\" height=\"1\"/></svg>", 14464 "tablet-landscape": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" d=\"M1.5,5 C1.5,4.2 2.2,3.5 3,3.5 L17,3.5 C17.8,3.5 18.5,4.2 18.5,5 L18.5,16 C18.5,16.8 17.8,17.5 17,17.5 L3,17.5 C2.2,17.5 1.5,16.8 1.5,16 L1.5,5 L1.5,5 L1.5,5 Z\"/><circle cx=\"3.7\" cy=\"10.5\" r=\".8\"/></svg>", 14465 "tablet": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" d=\"M5,18.5 C4.2,18.5 3.5,17.8 3.5,17 L3.5,3 C3.5,2.2 4.2,1.5 5,1.5 L16,1.5 C16.8,1.5 17.5,2.2 17.5,3 L17.5,17 C17.5,17.8 16.8,18.5 16,18.5 L5,18.5 L5,18.5 L5,18.5 Z\"/><circle cx=\"10.5\" cy=\"16.3\" r=\".8\"/></svg>", 14466 "tag": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M17.5,3.71 L17.5,7.72 C17.5,7.96 17.4,8.2 17.21,8.39 L8.39,17.2 C7.99,17.6 7.33,17.6 6.93,17.2 L2.8,13.07 C2.4,12.67 2.4,12.01 2.8,11.61 L11.61,2.8 C11.81,2.6 12.08,2.5 12.34,2.5 L16.19,2.5 C16.52,2.5 16.86,2.63 17.11,2.88 C17.35,3.11 17.48,3.4 17.5,3.71 L17.5,3.71 Z\"/><circle cx=\"14\" cy=\"6\" r=\"1\"/></svg>", 14467 "thumbnails": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect fill=\"none\" stroke=\"#000\" x=\"3.5\" y=\"3.5\" width=\"5\" height=\"5\"/><rect fill=\"none\" stroke=\"#000\" x=\"11.5\" y=\"3.5\" width=\"5\" height=\"5\"/><rect fill=\"none\" stroke=\"#000\" x=\"11.5\" y=\"11.5\" width=\"5\" height=\"5\"/><rect fill=\"none\" stroke=\"#000\" x=\"3.5\" y=\"11.5\" width=\"5\" height=\"5\"/></svg>", 14468 "trash": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" points=\"6.5 3 6.5 1.5 13.5 1.5 13.5 3\"/><polyline fill=\"none\" stroke=\"#000\" points=\"4.5 4 4.5 18.5 15.5 18.5 15.5 4\"/><rect x=\"8\" y=\"7\" width=\"1\" height=\"9\"/><rect x=\"11\" y=\"7\" width=\"1\" height=\"9\"/><rect x=\"2\" y=\"3\" width=\"16\" height=\"1\"/></svg>", 14469 "triangle-down": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"5 7 15 7 10 12\"/></svg>", 14470 "triangle-left": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"12 5 7 10 12 15\"/></svg>", 14471 "triangle-right": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"8 5 13 10 8 15\"/></svg>", 14472 "triangle-up": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"5 13 10 8 15 13\"/></svg>", 14473 "tripadvisor": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M19.021,7.866C19.256,6.862,20,5.854,20,5.854h-3.346C14.781,4.641,12.504,4,9.98,4C7.363,4,4.999,4.651,3.135,5.876H0\tc0,0,0.738,0.987,0.976,1.988c-0.611,0.837-0.973,1.852-0.973,2.964c0,2.763,2.249,5.009,5.011,5.
14473009\tc1.576,0,2.976-0.737,3.901-1.879l1.063,1.599l1.075-1.615c0.475,0.611,1.1,1.111,1.838,1.451c1.213,0.547,2.574,0.612,3.825,0.15\tc2.589-0.963,3.913-3.852,2.964-6.439c-0.175-0.463-0.4-0.876-0.675-1.238H19.021z M16.38,14.594\tc-1.002,0.371-2.088,0.328-3.06-0.119c-0.688-0.317-1.252-0.817-1.657-1.438c-0.164-0.25-0.313-0.52-0.417-0.811\tc-0.124-0.328-0.186-0.668-0.217-1.014c-0.063-0.689,0.037-1.396,0.339-2.043c0.448-0.971,1.251-1.71,2.25-2.079\tc2.075-0.765,4.375,0.3,5.14,2.366c0.762,2.066-0.301,4.37-2.363,5.134L16.38,14.594L16.38,14.594z M8.322,13.066\tc-0.72,1.059-1.935,1.76-3.309,1.76c-2.207,0-4.001-1.797-4.001-3.996c0-2.203,1.795-4.002,4.001-4.002\tc2.204,0,3.999,1.8,3.999,4.002c0,0.137-0.024,0.261-0.04,0.396c-0.067,0.678-0.284,1.313-0.648,1.853v-0.013H8.322z M2.472,10.775\tc0,1.367,1.112,2.479,2.476,2.479c1.363,0,2.472-1.11,2.472-2.479c0-1.359-1.11-2.468-2.472-2.468\tC3.584,8.306,2.473,9.416,2.472,10.775L2.472,10.775z M12.514,10.775c0,1.367,1.104,2.479,2.471,2.479\tc1.363,0,2.474-1.108,2.474-2.479c0-1.359-1.11-2.468-2.474-2.468c-1.364,0-2.477,1.109-2.477,2.468H12.514z M3.324,10.775\tc0-0.893,0.726-1.618,1.614-1.618c0.889,0,1.625,0.727,1.625,1.618c0,0.898-0.725,1.627-1.625,1.627\tc-0.901,0-1.625-0.729-1.625-1.627H3.324z M13.354,10.775c0-0.893,0.726-1.618,1.627-1.618c0.886,0,1.61,0.727,1.61,1.618\tc0,0.898-0.726,1.627-1.626,1.627s-1.625-0.729-1.625-1.627H13.354z M9.977,4.875c1.798,0,3.425,0.324,4.849,0.968\tc-0.535,0.015-1.061,0.108-1.586,0.3c-1.264,0.463-2.264,1.388-2.815,2.604c-0.262,0.551-0.398,1.133-0.448,1.72\tC9.79,7.905,7.677,5.873,5.076,5.82C6.501,5.208,8.153,4.875,9.94,4.875H9.977z\"/></svg>", 14474 "tumblr": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.885,8.598c0,0,0,3.393,0,4.996c0,0.282,0,0.66,0.094,0.942c0.377,1.509,1.131,2.545,2.545,3.11 c1.319,0.472,2.356,0.472,3.676,0c0.565-0.188,1.132-0.659,1.132-0.659l-0.849-2.263c0,0-1.036,0.378-1.603,0.283 c-0.565-0.094-1.226-0.66-1.226-1.508c0-1.603,0-4.902,0-4.902h2.828V5.771h-2.828V2H8.205c0,0-0.094,0.66-0.188,0.942 C7.828,3.791,7.262,4.733,6.603,5.394C5.848,6.147,5,6.43,5,6.43v2.168H6.885z\"/></svg>", 14475 "tv": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"7\" y=\"16\" width=\"6\" height=\"1\"/><rect fill=\"none\" stroke=\"#000\" x=\".5\" y=\"3.5\" width=\"19\" height=\"11\"/></svg>", 14476 "twitter": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M19,4.74 C18.339,5.029 17.626,5.229 16.881,5.32 C17.644,4.86 18.227,4.139 18.503,3.28 C17.79,3.7 17.001,4.009 16.159,4.17 C15.485,3.45 14.526,3 13.464,3 C11.423,3 9.771,4.66 9.771,6.7 C9.771,6.99 9.804,7.269 9.868,7.539 C6.795,7.38 4.076,5.919 2.254,3.679 C1.936,4.219 1.754,4.86 1.754,5.539 C1.754,6.82 2.405,7.95 3.397,8.61 C2.79,8.589 2.22,8.429 1.723,8.149 L1.723,8.189 C1.723,9.978 2.997,11.478 4.686,11.82 C4.376,11.899 4.049,11.939 3.713,11.939 C3.475,11.939 3.245,11.919 3.018,11.88 C3.49,13.349 4.852,14.419 6.469,14.449 C5.205,15.429 3.612,16.019 1.882,16.019 C1.583,16.019 1.29,16.009 1,15.969 C2.635,17.019 4.576,17.629 6.662,17.629 C13.454,17.629 17.17,12 17.17,7.129 C17.17,6.969 17.166,6.809 17.157,6.649 C17.879,6.129 18.504,5.478 19,4.74\"/></svg>", 14477 "uikit": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"14.4,3.1 11.3,5.1 15,7.3 15,12.9 10,15.7 5,12.9 5,8.5 2,6.8 2,14.8 9.9,19.5 18,14.8 18,5.3\"/><polygon points=\"9.8,4.2 6.7,2.4 9.8,0.4 12.9,2.3\"/></svg>", 14478 "unlock": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect fill=\"none\" stroke=\"#000\" x=\"3.5\" y=\"8.5\" width=\"13\" height=\"10\"/><path fill=\"none\" stroke=\"#000\" d=\"M6.5,8.5 L6.5,4.9 C6.5,3 8.1,1.5 10,1.5 C11.9,1.5 13.5,3 13.5,4.9\"/></svg>", 14479 "upload": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" points=\"5 8 9.5 3.5 14 8\"/><rect x=\"3\" y=\"17\" width=\"13\" height=\"1\"/><line fill=\"none\" stroke=\"#000\" x1=\"9.5\" y1=\"15\" x2=\"9.5\" y2=\"4\"/></svg>", 14480 "user": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"9.9\" cy=\"6.4\" r=\"4.4\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M1.5,19 C2.3,14.5 5.8,11.2 10,11.2 C14.2,11.2 17.7,14.6 18.5,19.2\"/></svg>", 14481 "users": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"7.7\" cy=\"8.6\" r=\"3.5\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1\"/></svg>", 14482 "video-camera": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><polygon fill=\"none\" stroke=\"#000\" points=\"17.5 6.9 17.5 13.1 13.5 10.4 13.5 14.5 2.5 14.5 2.5 5.5 13.5 5.5 13.5 9.6 17.5 6.9\"/></svg>", 14483 "vimeo": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2.065,7.59C1.84,7.367,1.654,7.082,1.468,6.838c-0.332-0.42-0.137-0.411,0.274-0.772c1.026-0.9
144831,2.004-1.896,3.127-2.688 c1.017-0.713,2.365-1.173,3.286-0.039c0.849,1.045,0.869,2.629,1.084,3.891c0.215,1.309,0.421,2.648,0.88,3.901 c0.127,0.352,0.37,1.018,0.81,1.074c0.567,0.078,1.145-0.917,1.408-1.289c0.684-0.987,1.611-2.317,1.494-3.587 c-0.115-1.349-1.572-1.095-2.482-0.773c0.146-1.514,1.555-3.216,2.912-3.792c1.439-0.597,3.579-0.587,4.302,1.036 c0.772,1.759,0.078,3.802-0.763,5.396c-0.918,1.731-2.1,3.333-3.363,4.829c-1.114,1.329-2.432,2.787-4.093,3.422 c-1.897,0.723-3.021-0.686-3.667-2.318c-0.705-1.777-1.056-3.771-1.565-5.621C4.898,8.726,4.644,7.836,4.136,7.191 C3.473,6.358,2.72,7.141,2.065,7.59C1.977,7.502,2.115,7.551,2.065,7.59L2.065,7.59z\"/></svg>", 14484 "warning": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"10\" cy=\"14\" r=\"1\"/><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10\" cy=\"10\" r=\"9\"/><path d=\"M10.97,7.72 C10.85,9.54 10.56,11.29 10.56,11.29 C10.51,11.87 10.27,12 9.99,12 C9.69,12 9.49,11.87 9.43,11.29 C9.43,11.29 9.16,9.54 9.03,7.72 C8.96,6.54 9.03,6 9.03,6 C9.03,5.45 9.46,5.02 9.99,5 C10.53,5.01 10.97,5.44 10.97,6 C10.97,6 11.04,6.54 10.97,7.72 L10.97,7.72 Z\"/></svg>", 14485 "whatsapp": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M16.7,3.3c-1.8-1.8-4.1-2.8-6.7-2.8c-5.2,0-9.4,4.2-9.4,9.4c0,1.7,0.4,3.3,1.3,4.7l-1.3,4.9l5-1.3c1.4,0.8,2.9,1.2,4.5,1.2 l0,0l0,0c5.2,0,9.4-4.2,9.4-9.4C19.5,7.4,18.5,5,16.7,3.3 M10.1,17.7L10.1,17.7c-1.4,0-2.8-0.4-4-1.1l-0.3-0.2l-3,0.8l0.8-2.9 l-0.2-0.3c-0.8-1.2-1.2-2.7-1.2-4.2c0-4.3,3.5-7.8,7.8-7.8c2.1,0,4.1,0.8,5.5,2.3c1.5,1.5,2.3,3.4,2.3,5.5 C17.9,14.2,14.4,17.7,10.1,17.7 M14.4,11.9c-0.2-0.1-1.4-0.7-1.6-0.8c-0.2-0.1-0.4-0.1-0.5,0.1c-0.2,0.2-0.6,0.8-0.8,0.9 c-0.1,0.2-0.3,0.2-0.5,0.1c-0.2-0.1-1-0.4-1.9-1.2c-0.7-0.6-1.2-1.4-1.3-1.6c-0.1-0.2,0-0.4,0.1-0.5C8,8.8,8.1,8.7,8.2,8.5 c0.1-0.1,0.2-0.2,0.2-0.4c0.1-0.2,0-0.3,0-0.4C8.4,7.6,7.9,6.5,7.7,6C7.5,5.5,7.3,5.6,7.2,5.6c-0.1,0-0.3,0-0.4,0 c-0.2,0-0.4,0.1-0.6,0.3c-0.2,0.2-0.8,0.8-0.8,2c0,1.2,0.8,2.3,1,2.4c0.1,0.2,1.7,2.5,4,3.5c0.6,0.2,1,0.4,1.3,0.5 c0.6,0.2,1.1,0.2,1.5,0.1c0.5-0.1,1.4-0.6,1.6-1.1c0.2-0.5,0.2-1,0.1-1.1C14.8,12.1,14.6,12,14.4,11.9\"/>
14485</svg>", 14486 "wordpress": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10,0.5c-5.2,0-9.5,4.3-9.5,9.5s4.3,9.5,9.5,9.5c5.2,0,9.5-4.3,9.5-9.5S15.2,0.5,10,0.5L10,0.5L10,0.5z M15.6,3.9h-0.1 c-0.8,0-1.4,0.7-1.4,1.5c0,0.7,0.4,1.3,0.8,1.9c0.3,0.6,0.7,1.3,0.7,2.3c0,0.7-0.3,1.5-0.6,2.7L14.1,15l-3-8.9 c0.5,0,0.9-0.1,0.9-0.1C12.5,6,12.5,5.3,12,5.4c0,0-1.3,0.1-2.2,0.1C9,5.5,7.7,5.4,7.7,5.4C7.2,5.3,7.2,6,7.6,6c0,0,0.4,0.1,0.9,0.1 l1.3,3.5L8,15L5,6.1C5.5,6.1,5.9,6,5.9,6C6.4,6,6.3,5.3,5.9,5.4c0,0-1.3,0.1-2.2,0.1c-0.2,0-0.3,0-0.5,0c1.5-2.2,4-3.7,6.9-3.7 C12.2,1.7,14.1,2.6,15.6,3.9L15.6,3.9L15.6,3.9z M2.5,6.6l3.9,10.8c-2.7-1.3-4.6-4.2-4.6-7.4C1.8,8.8,2,7.6,2.5,6.6L2.5,6.6L2.5,6.6 z M10.2,10.7l2.5,6.9c0,0,0,0.1,0.1,0.1C11.9,18,11,18.2,10,18.2c-0.8,0-1.6-0.1-2.3-0.3L10.2,10.7L10.2,10.7L10.2,10.7z M14.2,17.1 l2.5-7.3c0.5-1.2,0.6-2.1,0.6-2.9c0-0.3,0-0.6-0.1-0.8c0.6,1.2,1,2.5,1,4C18.3,13,16.6,15.7,14.2,17.1L14.2,17.1L14.2,17.1z\"/></svg>", 14487 "world": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"#000\" d=\"M1,10.5 L19,10.5\"/><path fill=\"none\" stroke=\"#000\" d=\"M2.35,15.5 L17.65,15.5\"/><path fill=\"none\" stroke=\"#000\" d=\"M2.35,5.5 L17.523,5.5\"/><path fill=\"none\" stroke=\"#000\" d=\"M10,19.46 L9.98,19.46 C7.31,17.33 5.61,14.141 5.61,10.58 C5.61,7.02 7.33,3.83 10,1.7 C10.01,1.7 9.99,1.7 10,1.7 L10,1.7 C12.67,3.83 14.4,7.02 14.4,10.58 C14.4,14.141 12.67,17.33 10,19.46 L10,19.46 L10,19.46 L10,19.46 Z\"/><circle fill=\"none\" stroke=\"#000\" cx=\"10\" cy=\"10.5\" r=\"9\"/></svg>", 14488 "xing": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4.4,4.56 C4.24,4.56 4.11,4.61 4.05,4.72 C3.98,4.83 3.99,4.97 4.07,5.12 L5.82,8.16 L5.82,8.17 L3.06,13.04 C2.99,13.18 2.99,13.33 3.06,13.44 C3.12,13.55 3.24,13.62 3.4,13.62 L6,13.62 C6.39,13.62 6.57,13.36 6.71,13.12 C6.71,13.12 9.41,8.35 9.51,8.16 C9.49,8.14 7.72,5.04 7.72,5.04 C7.58,4.81 7.39,4.56 6.99,4.56 L4.4,4.56 L4.4,4.56 Z\"/><path d=\"M15.3,1 C14.91,1 14.74,1.25 14.6,1.5 C14.6,1.5 9.01,11.42 8.82,11.74 C8.83,11.76 12.51,18.51 12.51,18.51 C12.64,18.74 12.84,19 13.23,19 L15.82,19 C15.98,19 16.1,18.94 16.16,18.83 C16.23,18.72 16.23,18.57 16.16,18.43 L12.5,11.74 L12.5,11.72 L18.25,1.56 C18.32,1.42 18.32,1.27 18.25,1.16 C18.21,1.06 18.08,1 17.93,1 L15.3,1 L15.3,1 Z\"/></svg>", 14489 "yelp": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.175,14.971c-0.112,0.77-1.686,2.767-2.406,3.054c-0.246,0.1-0.487,0.076-0.675-0.069\tc-0.122-0.096-2.446-3.859-2.446-3.859c-0.194-0.293-0.157-0.682,0.083-0.978c0.234-0.284,0.581-0.393,0.881-0.276\tc0.016,0.01,4.21,1.394,4.332,1.482c0.178,0.148,0.263,0.379,0.225,0.646L17.175,14.971L17.175,14.971z M11.464,10.789\tc-0.203-0.307-0.199-0.666,0.009-0.916c0,0,2.625-3.574,2.745-3.657c0.203-0.135,0.452-0.141,0.69-0.025\tc0.691,0.335,2.085,2.405,2.167,3.199v0.027c0.024,0.271-0.082,0.491-0.273,0.623c-0.132,0.083-4.43,1.155-4.43,1.155\tc-0.322,0.096-0.68-0.06-0.882-0.381L11.464,10.789z M9.475,9.563C9.32,9.609,8.848,9.757,8.269,8.817c0,0-3.916-6.16-4.007-6.351\tc-0.057-0.212,0.011-0.455,0.202-0.65C5.047,1.211,8.21,0.327,9.037,0.529c0.27,0.069,0.457,0.238,0.522,0.479\tc0.047,0.266,0.433,5.982,0.488,7.264C10.098,9.368,9.629,9.517,9.475,9.563z M9.927,19.066c-0.083,0.225-0.273,0.373-0.54,0.421\tc-0.762,0.13-3.15-0.751-3.647-1.342c-0.096-0.131-0.155-0.262-0.167-0.394c-0.011-0.095,0-0.189,0.036-0.272\tc0.061-0.155,2.917-3.538,2.917-3.538c0.214-0.272,0.595-0.355,0.952-0.213c0.345,0.13,0.56,0.428,0.536,0.749\tC10.014,14.479,9.977,18.923,9.927,19.066z M3.495,13.912c-0.235-0.009-0.444-0.148-0.568-0.382c-0.089-0.17-0.151-0.453-0.19-0.794\tC2.63,11.701,2.761,10.144,3.07,9.648c0.145-0.226,0.357-0.345,0.592-0.336c0.154,0,4.255,1.667,4.255,1.667\tc0.321,0.118,0.521,0.453,0.5,0.833c-0.023,0.37-0.236,0.655-0.551,0.738L3.495,13.912z\"/></svg>", 14490 "youtube": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15,4.1c1,0.1,2.3,0,3,0.8c0.8,0.8,0.9,2.1,0.9,3.1C19,9.2,19,10.9,19,12c-0.1,1.1,0,2.4-0.5,3.4c-0.5,1.1-1.4,1.5-2.5,1.6 c-1.2,0.1-8.6,0.1-11,0c-1.1-0.1-2.4-0.1-3.2-1c-0.7-0.8-0.7-2-0.8-3C1,11.8,1,10.1,1,8.9c0-1.1,0-2.4,0.5-3.4C2,4.5,3,4.3,4.1,4.2 C5.3,4.1,12.6,4,15,4.1z M8,7.5v6l5.5-3L8,7.5z\"/></svg>", 14491 "account": "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
14491<path d=\"M7.02139 0C3.40487 0 0.469727 2.93515 0.469727 6.55167C0.469727 10.1682 3.40487 13.1033 7.02139 13.1033C10.6379 13.1033 13.5731 10.1682 13.5731 6.55167C13.5731 2.93515 10.6379 0 7.02139 0ZM7.02139 1.9655C8.10897 1.9655 8.98689 2.84342 8.98689 3.931C8.98689 5.01858 8.10897 5.8965 7.02139 5.8965C5.93382 5.8965 5.05589 5.01858 5.05589 3.931C5.05589 2.84342 5.93382 1.9655 7.02139 1.9655ZM7.02139 11.2689C6.24296 11.2689 5.47663 11.0762 4.79073 10.7081C4.10483 10.34 3.52069 9.80791 3.09039 9.15923C3.11005 7.85545 5.71106 7.14131 7.02139 7.14131C8.32517 7.14131 10.9327 7.85545 10.9524 9.15923C10.5221 9.80791 9.93795 10.34 9.25205 10.7081C8.56615 11.0762 7.79982 11.2689 7.02139 11.2689Z\" fill=\"#fff\"/></svg>" 14492 }); 14493 14494 } 14495 14496 if (typeof window !== 'undefined' && window.UIkit) { 14497 window.UIkit.use(plugin); 14498 } 14499 14500 return plugin; 14501 14502}))); 14503; 14504/* ng-infinite-scroll - v1.0.0 - 2013-02-23 */ 14505var mod;mod=angular.module("infinite-scroll",[]),mod.directive("infiniteScroll",["$rootScope","$window","$timeout",function(i,n,e){return{link:function(t,l,o){var r,c,f,a;return n=angular.element(n),f=0,null!=o.infiniteScrollDistance&&t.$watch(o.infiniteScrollDistance,function(i){return f=parseInt(i,10)}),a=!0,r=!1,null!=o.infiniteScrollDisabled&&t.$watch(o.infiniteScrollDisabled,function(i){return a=!i,a&&r?(r=!1,c()):void 0}),c=function(){var e,c,u,d;return d=n.height()+n.scrollTop(),e=l.offset().top+l.height(),c=e-d,u=n.height()*f>=c,u&&a?i.$$phase?t.$eval(o.infiniteScroll):t.$apply(o.infiniteScroll):u?r=!0:void 0},n.on("scroll",c),t.$on("$destroy",function(){return n.off("scroll",c)}),e(function(){return o.infiniteScrollImmediateCheck?t.$eval(o.infiniteScrollImmediateCheck)?c():void 0:c()},0)}}}]);; 14506angular.module('rmModules', []);; 14507angular.module('rmModules') 14508 .factory('entriesFactory', ['$http', 'sharedProperties', '$q', function ($http, sharedProperties, $q) { 14509 var urlBase = appSettings.WebApiUrl; 14510 var dataFactory = {}; 14511 14512 // GET 14513 dataFactory.getMediaTypes = function (propid) { 14514 return $http.get(urlBase + '/category/' + propid); 14515 }; 14516 14517 dataFactory.getFilterOptions = function (propid) { 14518 return $http.get(urlBase + '/entry/GetFilterOptionData/' + propid, sharedProperties.AuthenticationHeader()); 14519 }; 14520 14521 dataFactory.getFilterCategoryOptions = function (data) { 14522 return $http.post(urlBase + '/entry/GetFilterCategoryOptionData/', { "data": data }, sharedProperties.AuthenticationHeader()); 14523 }; 14524 14525 dataFactory.getAuditEntryListAdmin = function (payload) { 14526 return $http.post(urlBase + '/entry/GetAuditEntryListForAdmin/', payload, sharedProperties.AuthenticationHeader()); 14527 }; 14528 14529 dataFactory.saveAuditEntryListAdmin = function (payload) { 14530 return $http.post(urlBase + '/entry/SaveAuditEntryListForAdmin/', payload, sharedProperties.AuthenticationHeader()); 14531 }; 14532 14533 dataFactory.getNoLoadReasons = function () { 14534 return $http.get(urlBase + '/entry/GetNoLoadReasons/', sharedProperties.AuthenticationHeader()); 14535 }; 14536 14537 // GET Ranking Data 14538 dataFactory.getRankingData = function (payload) { 14539 return $http.post(urlBase + '/entry/GetRankingData/', payload, sharedProperties.AuthenticationHeader()); 14540 }; 14541 14542 dataFactory.getExecutiveRankingData = function (payload) { 14543 return $http.post(urlBase + '/entry/GetExecutiveRankingData/', payload, sharedProperties.AuthenticationHeader()); 14544 }; 14545 dataFactory.getPVRankingData = function (payload) { 14546 return $http.post(urlBase + '/entry/GetPVRankingData/', payload, sharedProperties.AuthenticationHeader()); 14547 }; 14548 // Entries Home data 14549 dataFactory.getSubmissionsForHome = function (payload) { 14550 return $http.post(urlBase + '/entry/GetSubmissionsForHome/', payload, sharedProperties.AuthenticationHeader()); 14551 } 14552 14553 // 14554 dataFactory.getWelcomeData = function (propid) {
14555 return $http.get(urlBase + '/entry/GetWelcomeData/' + propid, sharedProperties.AuthenticationHeader()); 14556 } 14557 14558 // Entries Home data 14559 dataFactory.getSubmission = function (id) { 14560 return $http.get(urlBase + '/entry/GetSubmission/' + id, sharedProperties.AuthenticationHeader()); 14561 } 14562 14563 // POST 14564 dataFactory.updatePieceFromDashboard = function (data) { 14565 return $http.post(urlBase + '/entry/UpdateSubmissionFromHome', data, sharedProperties.AuthenticationHeader()); 14566 }; 14567 14568 // POST 14569 dataFactory.updatePieceURLsFromDashboard = function (data) { 14570 return $http.post(urlBase + '/entry/UpdateSubmissionPodcastURLs', data, sharedProperties.AuthenticationHeader()); 14571 }; 14572 14573 dataFactory.updatePieceURLs = function (data) { 14574 return $http.post(urlBase + '/entry/UpdatePieceURLs', data, sharedProperties.AuthenticationHeader()); 14575 }; 14576 14577 // POST 14578 dataFactory.insertSubmission = function (submission) { 14579 return $http.post(urlBase + '/entry', submission, sharedProperties.AuthenticationHeader()); 14580 }; 14581 14582 // POST Ranking Data 14583 dataFactory.updateRankingData = function (payload) { 14584 return $http.post(urlBase + '/entry/UpdateRankingData/', payload, sharedProperties.AuthenticationHeader()); 14585 }; 14586 14587 // POST Ranking Data 14588 dataFactory.updateExecutiveRankingData = function (payload) { 14589 return $http.post(urlBase + '/entry/UpdateExecutiveRankingData/', payload, sharedProperties.AuthenticationHeader()); 14590 }; 14591 14592 dataFactory.updatePVRankingData = function (payload) { 14593 return $http.post(urlBase + '/entry/UpdatePVRankingData/', payload, sharedProperties.AuthenticationHeader()); 14594 }; 14595 14596 dataFactory.getEntryListAdmin = function (settings) { 14597 return $http.post(urlBase + '/entry/GetEntryListForAdmin', settings, sharedProperties.AuthenticationHeader()); 14598 }; 14599 14600 // get "Piece" for Piece Detail Page 14601 dataFactory.getPiece = function (pieceID) { 14602 return $http.post(urlBase + '/entry/GetPiece', { "pieceID": pieceID }, sharedProperties.AuthenticationHeader()); 14603 }; 14604 14605 // save changes to "Piece" 14606 dataFactory.savePiece = function (piece) { 14607 return $http.post(urlBase + '/entry/SavePiece', piece, sharedProperties.AuthenticationHeader()); 14608 }; 14609 14610 // get Entry Detail for Admin Entry Detail page 14611 dataFactory.getAdminEntryDetail = function (entryID) { 14612 return $http.get(urlBase + '/entry/GetAdminEntryDetail/' + entryID, sharedProperties.AuthenticationHeader()); 14613 }; 14614 14615 // save changes to EntryDetail 14616 dataFactory.saveAdminEntryDetail = function (entryDetail) { 14617 return $http.post(urlBase + '/entry/SaveAdminEntryDetail', entryDetail, sharedProperties.AuthenticationHeader()); 14618 }; 14619 14620 // Post retrieve category recommendations 14621 dataFactory.getCategoryRecommendations = function (categoryRecommendationRequest) { 14622 return $http.post(urlBase + '/CategoryRecommendation/GetRecommendationsForEntryForm', categoryRecommendationRequest); 14623 }; 14624 dataFactory.getSubmissionForOrder = function (id) { 14625 return $http.get(urlBase + '/entry/GetSubmissionForOrder/' + id, sharedProperties.AuthenticationHeader()); 14626 }; 14627 14628 // DELETE 14629 dataFactory.deleteEntry = function (entryID) { 14630 return $http.delete(urlBase + '/entry/DeleteEntry/' + entryID, sharedProperties.AuthenticationHeader()); 14631 }; 14632 14633 dataFactory.refundEntry = function (entryID) { 14634 return $http.post(urlBase + '/entry/RefundEntry/' + entryID, null, sharedProperties.AuthenticationHeader()); 14635 }; 14636 14637 dataFactory.getOrdersForProperty = function (props) { 14638 return $http.post(urlBase + '/Order/GetOrdersForProperty', props, sharedProperties.AuthenticationHeader()); 14639 }; 14640 14641 dataFactory.getOrdersForPropertyExport = function (props) { 14642 return $http.post(urlBase + '/Order/GetOrdersForPropertyExport', props, sharedProperties.AuthenticationHeader()); 14643 }; 14644 14645 dataFactory.bulkProcessPieces = function (props) { 14646 return $http.post(urlBase + '/entry/BulkProcessPieces/', props, sharedProperties.AuthenticationHeader()); 14647 }; 14648 14649 dataFactory.getEntriesOffList = function(props) { 14650 return $http.post(urlBase + '/entry/GetEntriesOffList/', props, sharedProperties.AuthenticationHeader()); 14651 }; 14652 14653 dataFactory.clearEntryOff= function(props) { 14654 return $http.post(urlBase + '/entry/ClearEntryOff/', props, sharedProperties.AuthenticationHeader()); 14655 }; 14656 14657 dataFactory.updateEntryOffStatus= function(props) { 14658 return $http.post(urlBase + '/entry/UpdateEntryOffStatus/', props, sharedProperties.AuthenticationHeader()); 14659 }; 14660 14661 dataFactory.mergeSubmissions = function (props) { 14662 return $http.post(urlBase + '/entry/MergeSubmissions/', props, sharedProperties.AuthenticationHeader()); 14663 }; 14664 14665 // update piecefile list for piece with upload later (or mailitem in the future) 14666 dataFactory.updatePieceFileList = function (props, isAdmin) { 14667 return $http.post(urlBase + '/entry/UpdateFileList' + (isAdm
14667in ? 'Admin' : ''), props, sharedProperties.AuthenticationHeader()); 14668 }; 14669 14670 dataFactory.pieceIsForShortlistVideo = function (pieceID) { 14671 return $http.get(urlBase + '/entry/PieceIsForShortlistVideo/' + pieceID, sharedProperties.AuthenticationHeader()); 14672 }; 14673 14674 dataFactory.pieceIsForShortlistArtwork = function (pieceID) { 14675 return $http.get(urlBase + '/entry/PieceIsForShortlistArtwork/' + pieceID, sharedProperties.AuthenticationHeader()); 14676 }; 14677 14678 dataFactory.pieceIsForShortlistPodcast = function (pieceID) { 14679 return $http.get(urlBase + '/entry/PieceIsForShortlistPodcast/' + pieceID, sharedProperties.AuthenticationHeader()); 14680 }; 14681 14682 dataFactory.pieceIsForAdvertisement = function (pieceID) { 14683 return $http.get(urlBase + '/entry/PieceIsForShortlistAdvertisement/' + pieceID, sharedProperties.AuthenticationHeader()); 14684 }; 14685 14686 dataFactory.sendEntryOffEmail = function (paramtr) { 14687 return $http.post(urlBase + '/entry/SendEntryOffEmail', paramtr, sharedProperties.AuthenticationHeader()); 14688 }; 14689 dataFactory.saveSelectedFilters = function (paramtr) { 14690 return $http.post(urlBase + '/entry/SaveSelectedFilters', paramtr, sharedProperties.AuthenticationHeader()); 14691 } 14692 dataFactory.getSavedFilters = function (propertyID) { 14693 return $http.get(urlBase + '/entry/GetSavedFilters/' + propertyID, sharedProperties.AuthenticationHeader()); 14694 } 14695 dataFactory.deleteSavedFilters = function (paramtr) { 14696 return $http.post(urlBase + '/entry/DeleteSelectedFilters', paramtr, sharedProperties.AuthenticationHeader()); 14697 } 14698 14699 dataFactory.updateEventWinnerStatus = function (props) { 14700 return $http.post(urlBase + '/entry/UpdateEntryWinnerStatus', props, sharedProperties.AuthenticationHeader()); 14701 }; 14702 14703 dataFactory.getPieceLengths = function (propertyID) { 14704 return $http.get(urlBase + '/entry/GetPieceLengths/' + propertyID); 14705 }; 14706 14707 dataFactory.getPieceCategoryOptions = function (catId) { 14708 return $http.get(urlBase + '/entry/GetPieceCategoryOptions/' + catId); 14709 }; 14710 14711 dataFactory.getPiecePartners = function () { 14712 return $http.get(urlBase + '/entry/GetPiecePartners', sharedProperties.AuthenticationHeader()); 14713 }; 14714 14715 dataFactory.getPieceCompanySize = function () { 14716 return $http.get(urlBase + '/entry/GetPieceCompanySize'); 14717 }; 14718 14719 dataFactory.getGalleryPiece = function (pieceID) { 14720 return $http.get(urlBase + '/entry/GetGalleryPiece/' + pieceID); 14721 }; 14722 14723 return dataFactory; 14724 }]); 14725; 14726angular.module('rmModules') 14727 .factory('userFactory', ['$http', 'sharedProperties', function ($http, sharedProperties) { 14728 14729 var urlBase = appSettings.WebApiUrl; 14730 var dataFactory = {}; 14731 14732 // GET 14733 dataFactory.getUser = function (userid) { 14734 return $http.get(urlBase + '/user/' + userid, sharedProperties.AuthenticationHeader()); 14735 }; 14736 14737 dataFactory.getUserAdmin = function (userid) { 14738 return $http.get(urlBase + '/user/administrative/' + userid, sharedProperties.AuthenticationHeader()); 14739 }; 14740 14741 dataFactory.getUserEntrant = function (propertyId, userid) { 14742 return $http.get(urlBase + '/user/entrant/' + propertyId + '/' + userid, sharedProperties.AuthenticationHeader()); 14743 }; 14744 14745 dataFactory.getUserEntrantAddtlDetails = function (propertyId, userid) { 14746 return $http.get(urlBase + '/user/entrant/GetAddtlDetails/' + propertyId + '/' + userid, sharedProperties.AuthenticationHeader()); 14747 }; 14748 14749 dataFactory.unSubscribeEntrant = function (propertyId, userid) { 14750 return $http.get(urlBase + '/user/entrant/UnSubscribe/' + propertyId + '/' + userid, sharedProperties.AuthenticationHeader()); 14751 }; 14752 14753 dataFactory.manualSubscribeEntrant = function (propertyId, userid) { 14754 return $http.get(urlBase + '/user/entrant/ManualSubscribe/' + propertyId + '/' + userid, sharedProperties.AuthenticationHeader()); 14755 }; 14756 14757 dataFactory.getCurrentReviewer = function () { 14758 return $http.get(urlBase + '/Reviewer/GetCurrentReviewerDetails/', sharedProperties.AuthenticationHeader()); 14759 } 14760 14761 // POST 14762 dataFactory.insertUser = function (user) { 14763 return $http.post(urlBase + '/Account/Register', user, sharedProperties.AuthenticationHeader()); 14764 }; 14765 14766 dataFactory.insertUserOauth = function (user) { 14767 return $http.post(urlBase + '/Account/RegisterOauth', user, sharedProperties.AuthenticationHeader()); 14768 }; 14769 14770 dataFactory.verifyOAuth = function (data, provider) { 14771 return $http.post(urlBase + '/Account/Authorize', { Code: data, Provider: provider }); 14772 }; 14773 14774 dataFactory.assignOAuth = function (data, provider) { 14775 return $http.post(urlBase + '/Account/AssignExternalLogin', { Co
14775de: data, Provider: provider }, sharedProperties.AuthenticationHeader()); 14776 }; 14777 14778 dataFactory.login = function (email, password, propertyID, appID) { 14779 var data = "grant_type=password&username=" + encodeURIComponent(email + (propertyID ? '_' + propertyID : '')) + "&password=" + encodeURIComponent(password) + (appID ? "&app_id=" + appID : ""); 14780 var updatedUrl = urlBase.substring(0, urlBase.lastIndexOf("api")) + 'Token'; 14781 return $http.post(updatedUrl, data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' } }); 14782 }; 14783 14784 dataFactory.saveAdminUser = function (user) { 14785 return $http.post(urlBase + '/user/administrative', user, sharedProperties.AuthenticationHeader()); 14786 }; 14787 14788 dataFactory.saveCurrentReviewer = function (user) { 14789 return $http.post(urlBase + '/Reviewer/SaveReviewer', user, sharedProperties.AuthenticationHeader()); 14790 }; 14791 14792 dataFactory.saveNewReviewer = function (user) { 14793 return $http.post(urlBase + '/Reviewer/SaveNewReviewer', user, sharedProperties.AuthenticationHeader()); 14794 }; 14795 14796 // for admins 14797 dataFactory.saveEntrantUser = function (user) { 14798 return $http.post(urlBase + '/user/entrant', user, sharedProperties.AuthenticationHeader()); 14799 }; 14800 14801 // for entrants 14802 dataFactory.saveEntrantDetails = function (user) { 14803 return $http.post(urlBase + '/user/entrant/save', user, sharedProperties.AuthenticationHeader()); 14804 }; 14805 14806 dataFactory.unBlockUserRequestType = function (userRequestType) { 14807 return $http.post(urlBase + '/user/entrant/UnBlockRequestType', userRequestType, sharedProperties.AuthenticationHeader()); 14808 }; 14809 dataFactory.getContact = function () { 14810 return $http.post(urlBase + '/Account/ContactInfo', null, sharedProperties.AuthenticationHeader()); 14811 }; 14812 14813 dataFactory.getStripeUserData = function () { 14814 return $http.get(urlBase + '/User/GetStripePortalInfo', sharedProperties.AuthenticationHeader()); 14815 }; 14816 14817 dataFactory.isJudge = function (entryPropertyID) { 14818 return $http.post(urlBase + '/Account/JudgeInfo', { 'entryPropertyID': entryPropertyID || -1 }, sharedProperties.AuthenticationHeader()); 14819 }; 14820 14821 dataFactory.logout = function () { 14822 return $http.post(urlBase + '/Account/Logout', null, sharedProperties.AuthenticationHeader()); 14823 }; 14824 14825 dataFactory.getUserStatus = function () { 14826 return $http.get(urlBase + "/Account/userstatus", sharedProperties.AuthenticationHeader()); 14827 } 14828 14829 dataFactory.getSubStatus = function (propertyId) { 14830 return $http.get(urlBase + "/user/entrant/GetCurrentSubscription/" + propertyId, sharedProperties.AuthenticationHeader()); 14831 } 14832 14833 dataFactory.unSubscribe = function (propertyId) { 14834 return $http.get(urlBase + "/user/entrant/UnSubscribe/" + propertyId, sharedProperties.AuthenticationHeader()); 14835 } 14836 14837 dataFactory.getUserList = function () { 14838 return $http.get(urlBase + "/user/administrative/list", sharedProperties.AuthenticationHeader()); 14839 } 14840 14841 // DELETE 14842 dataFactory.deleteUser = function (userid) { 14843 return $http.delete(urlBase + "/user/administrative/" + userid, sharedProperties.AuthenticationHeader()); 14844 } 14845 14846 dataFactory.getEntrantList = function (filters) { 14847 return $http.post(urlBase + "/user/entrant/list", filters, sharedProperties.AuthenticationHeader()); 14848 } 14849 14850 dataFactory.forgotPassword = function (email, propertyid, reminder, appTypeID) { 14851 var data = { Email: email, PropertyID: propertyid, AppTypeID: appTypeID }; 14852 if (reminder == true) { 14853 data.IsReminder = true; 14854 } 14855 return $http.post(urlBase + "/Account/ForgotPassword", data); 14856 } 14857 14858 dataFactory.resetPassword = function (email, propertyid, code, password, confirmPassword) { 14859 return $http.post(urlBase + "/Account/ResetPassword", { Email: email, PropertyID: propertyid, Code: code, Password: password, ConfirmPassword: confirmPassword }, sharedProperties.AuthenticationHeader()); 14860 } 14861 14862 dataFactory.updateEntrantFiles = function (data) {
14863 return $http.post(urlBase + '/user/UpdateEntrantFiles/', data, sharedProperties.AuthenticationHeader()); 14864 }; 14865 14866 dataFactory.getSubmittedEntrants = function (data) { 14867 return $http.post(urlBase + '/user/GetSubmittedEntrants/', data, sharedProperties.AuthenticationHeader()); 14868 }; 14869 14870 dataFactory.getSubmittedOrgs = function (data) { 14871 return $http.post(urlBase + '/user/GetSubmittedOrgs/', data, sharedProperties.AuthenticationHeader()); 14872 }; 14873 14874 return dataFactory; 14875 }]);; 14876angular.module('rmModules') 14877 .factory('mediaTypesFactory', ['$http', 'sharedProperties', function ($http, sharedProperties) { 14878 var urlBase = appSettings.WebApiUrl; 14879 14880 return { 14881 getMediaTypes: function (seasonId) { 14882 return $http.get(urlBase + '/category/GetMediaTypes/' + seasonId, sharedProperties.AuthenticationHeader()); 14883 }, 14884 14885 getCategoryTypes: function (mediaTypeId) { 14886 return $http.get(urlBase + '/category/GetCategoryTypes/' + mediaTypeId, sharedProperties.AuthenticationHeader()); 14887 }, 14888 getPVCategoryTypes: function (mediaTypeID, propID) { 14889 return $http.post(urlBase + '/category/GetPVCategoryTypes/', '{ mediaTypeID:' + mediaTypeID + ',propID:' + propID + '}', sharedProperties.AuthenticationHeader()); 14890 }, 14891 getGalleryMediaTypesAndCategories: function () { 14892 return $http.post(urlBase + '/category/GetGalleryMediaTypesAndCategories/'); 14893 }, 14894 getGalleryCategory: function (categoryGalleryID) { 14895 return $http.get(urlBase + '/category/GetGalleryCategory/' + categoryGalleryID); 14896 } 14897 , 14898 getCategoryGalleryYearsGrouping: function (data) { 14899 return $http.post(urlBase + '/category/GetCategoryGalleryYearsGrouping/', data); 14900 }, 14901 getGalleryCategories: function (data) { 14902 return $http.post(urlBase + '/category/GetGalleryCategories/', data); 14903 } 14904 } 14905 14906 }]);; 14907angular.module('rmModules') 14908 .factory('seasonFactory', ['$http', 'sharedProperties', function ($http, sharedProperties) { 14909 14910 var urlBase = appSettings.WebApiUrl; 14911 var dataFactory = {}; 14912 14913 // GET property details 14914 dataFactory.getCurrentDetailsByProperty = function (propid) { 14915 return $http.get(urlBase + '/season/GetCurrentSeasonsByPropertyID/' + propid); 14916 }; 14917 14918 dataFactory.getSubscriptionsByProperty = function (propid) { 14919 return $http.get(urlBase + '/season/GetCurrentSeasonEntrySubscriptions/' + propid); 14920 }; 14921 14922 dataFactory.getSeasonsByPropertyID = function (propid) { 14923 return $http.get(urlBase + '/season/GetSeasonsByPropertyID/' + propid, sharedProperties.AuthenticationHeader()); 14924 }; 14925 14926 dataFactory.saveSeason = function (season) { 14927 return $http.post(urlBase + '/season/Save', season, sharedProperties.AuthenticationHeader()); 14928 } 14929 14930 dataFactory.cloneCategories = function (data) { 14931 return $http.post(urlBase + '/season/CloneCategories', data, sharedProperties.AuthenticationHeader()); 14932 } 14933 14934 dataFactory.cloneReviewersCategories = function (data) { 14935 return $http.post(urlBase + '/season/CloneReviewersCategoriesFromPriorSeason', data, sharedProperties.AuthenticationHeader()); 14936 } 14937 14938 dataFactory.cloneReviewersExecCategories = function (data) { 14939 return $http.post(urlBase + '/season/CloneReviewersExecCategoriesFromPriorSeason', data, sharedProperties.AuthenticationHeader()); 14940 } 14941 14942 dataFactory.cloneGroups = function (data) { 14943 return $http.post(urlBase + '/season/CloneGroups', data, sharedProperties.AuthenticationHeader()); 14944 } 14945 14946 dataFactory.cloneSubs = function (data) { 14947 return $http.post(urlBase + '/season/CloneSubs', data, sharedProperties.AuthenticationHeader()); 14948 } 14949 14950 dataFactory.cloneReviewers = function (data) { 14951 return $http.post(urlBase + '/season/CloneReviewers', data, sharedProperties.AuthenticationHeader()); 14952 } 14953 14954 dataFactory.cloneDifferenceReviewers = function (data) { 14955 return $http.post(urlBase + '/season/CloneDifferenceReviewers', data, sharedProperties.AuthenticationHeader()); 14956 } 14957 14958 dataFactory.cloneRecommendations = function (data) { 14959 return $http.post(urlBase + '/season/CloneRecommendations', data, sharedProperties.AuthenticationHeader()); 14960 } 14961 dataFactory.cloneProducts = function (data) { 14962 return $http.post(urlBase + '/season/CloneProducts', data, sharedProperties.AuthenticationHeader()); 14963 } 14964 14965 dataFactory.getSeason = function (seasonID) { 14966 return $http.get(urlBase + '/season/' + seasonID, sharedProperties.AuthenticationHeader()); 14967 } 14968 14969 dataFactory.getGalleryYears = function () { 14970 return $http.get(urlBase + '/season/GetForGalleryFilters'); 14971 } 14972 14973 return dataFactory; 14974 }]);; 14975angular.module('rmModules') 14976 .factory('propertyFactory', ['$http', 'sharedProperties', function ($http, sharedProperties) { 14977 14978 var urlBase = appSettings.WebApiUrl; 14979 var dataFactory = {}; 14980 14981 // GET property details 14982 dataFactory.getPropertyDetails = function(propid) { 14983 return $http.get(urlBase + '/property/' + propid); 14984 }; 14985 14986 dataFactory.getNonJudgingProperties = function () { 14987 return $http.get(urlBase + '/property/GetNonJudgingProperties', sharedProperties.AuthenticationHeader()); 14988 }; 14989 14990 dataFactory.getAllProperties = function () { 14991 return $http.get(urlBase + '/property/GetAllProperties', sharedProperties.AuthenticationHeader()); 14992 }; 14993 14994 dataFactory.getPropertyGroups = function (payload) { 14995 return $http.post(urlBase + '/Property/GetPropertyGroups', payload, sharedProperties.AuthenticationHeader()); 14996 }; 14997 14998 dataFactory.updatePropertyGroups = function (payload) { 14999 return $http.post(urlBase + '/Property/UpdatePropertyGroups', payload, sharedProperties.AuthenticationHeader()); 15000 }; 15001 15002 dataFactory.getDashboardsForProperty = function (propertyID) { 15003 return $http.get(urlBase + '/property/getDashboardsForProperty/' + propertyID, sharedProperties.AuthenticationHeader()); 15004 }; 15005 15006 dataFactory.getDashboardsForEntries = function ( pageSettings) { 15007 15008 return $http.post(urlBase + '/property/GetDashboardsForEntries', pageSettings, sharedProperties.AuthenticationHeader()); 15009 }; 15010 15011 dataFactory.getTicketSalesForProperty = function (propertyID) { 15012 return $http.get(urlBase + '/ecommerce/GetPropertyTicketSales/' + propertyID, sharedProperties.AuthenticationHeader()); 15013 }; 15014 dataFactory.getActiveEntryPropertyForSpecialAchievements = function (includeRecommendations, judgingPropertyID, entryPropertyID) { 15015 return $http.get(urlBase + '/property/GetActiveEntryPropertyForSpecialAchievements/' + includeRecommendations + "/" + judgingPropertyID + (entryPropertyID ? ("/" + entryPropertyID) : ""), sharedProperties.AuthenticationHeader()); 15016 } 15017 15018 return dataFactory;
15019 }]);; 15020angular.module('rmModules') 15021 .factory('searchFactory', ['$http', 'sharedProperties', function ($http, sharedProperties) { 15022 15023 var urlBase = appSettings.WebApiUrl; 15024 var dataFactory = {}; 15025 15026 // GET search data 15027 dataFactory.search = function(data) { 15028 return $http.post(urlBase + '/search/search', data); 15029 }; 15030 15031 // GET claims for userId using search es 15032 dataFactory.getClaims = function (userId) { 15033 return $http.get(urlBase + '/search/GetClaims/' + userId, sharedProperties.AuthenticationHeader()); 15034 }; 15035 15036 dataFactory.getUserHasCredits = function (userId) { 15037 return $http.get(urlBase + '/search/UserHasCredits/' + userId, sharedProperties.AuthenticationHeader()); 15038 }; 15039 15040 dataFactory.ensureClaimForUser = function (userId) { 15041 return $http.post(urlBase + '/search/EnsureClaimForUser', { userId: userId }, sharedProperties.AuthenticationHeader()); 15042 }; 15043 15044 dataFactory.getFullProfile = function (userId) { 15045 return $http.get(urlBase + '/search/GetFullProfile/' + userId, sharedProperties.AuthenticationHeader()); 15046 }; 15047 15048 dataFactory.saveClaims = function (data) { 15049 return $http.post(urlBase + '/search/SaveClaims', data, sharedProperties.AuthenticationHeader()); 15050 }; 15051 15052 dataFactory.unpublishClaim = function () { 15053 return $http.post(urlBase + '/search/UnpublishClaim', null, sharedProperties.AuthenticationHeader()); 15054 }; 15055 15056 dataFactory.saveComplains = function (data) { 15057 return $http.post(urlBase + '/search/SaveComplains', data, sharedProperties.AuthenticationHeader()); 15058 }; 15059 15060 return dataFactory; 15061 }]);; 15062angular.module('rmModules') 15063 .factory('specialAchievementFactory', ['$http', function ($http) { 15064 15065 var urlBase = appSettings.WebApiUrl; 15066 var dataFactory = {}; 15067 15068 dataFactory.getGallerySpecialAchievement = function(data) { 15069 return $http.get(urlBase + '/SpecialAchievement/GetGallerySpecialAchievement/' + data); 15070 }; 15071 15072 return dataFactory; 15073 }]);; 15074angular.module('rmModules') 15075 .factory('analyticsFactory', ['$http', 'sharedProperties', function ($http, sharedProperties) { 15076 15077 var urlBase = appSettings.WebApiUrl; 15078 var dataFactory = {}; 15079 15080 dataFactory.track = function(data) { 15081 return $http.post(urlBase + '/Analytic/Track/', data, sharedProperties.AuthenticationHeader()); 15082 }; 15083 15084 return dataFactory; 15085 }]);; 15086angular.module('rmModules') 15087 .factory('cmsFactory', ['$http', 'sharedProperties', function ($http, sharedProperties) { 15088 15089 var urlBase = appSettings.WebApiUrl; 15090 var dataFactory = {}; 15091 15092 dataFactory.getCMSAppTypes = function (data) { 15093 return $http.get(urlBase + '/CMS/GetCMSAppTypes/'+data.PropertyID, sharedProperties.AuthenticationHeader()); 15094 }; 15095 15096 dataFactory.getCMSAppTypeContent = function (data) { 15097 return $http.get(urlBase + '/CMS/GetCMSAppTypeContent/' + data.CMSAppTypeID, sharedProperties.AuthenticationHeader()); 15098 }; 15099 15100 dataFactory.saveCMSRegionContent = function (data) { 15101 return $http.post(urlBase + '/CMS/SaveCMSRegionContent/', data, sharedProperties.AuthenticationHeader()); 15102 }; 15103 15104 dataFactory.getCMSAppTypeContents = function (data) { 15105 return $http.post(urlBase + '/CMS/GetCMSAppTypeContents/', data); 15106 }; 15107 15108 return dataFactory; 15109 }]);; 15110angular.module('rmModules') 15111 .service('sharedProperties', ['$rootScope', '$location', 'appType', function ($rootScope, $location, appType) { 15112 var properties = []; 15113 var tokenKey = "tokenKey"; 15114 var profile = "userprofile"; 15115 var APlusAccess = "aplusOnly"; 15116 var MagellanAccess = "MagellanOnly"; 15117 var TimeAccess = "TimeOnly"; 15118 var extendedFlag = "extended"; 15119 15120 var getStorageItem = function (key) { 15121 return localStorage.getItem(key) || sessionStorage.getItem(key); 15122 }; 15123 15124 var removeStorageItem = function (key) { 15125 sessionStorage.removeItem(key); 15126 localStorage.removeItem(key); 15127 }; 15128 15129 function getStripeProperties() { 15130 return [1,3,4,5,8,9,14,15,17,19]; 15131 } 15132 15133 function getHonorsEnhancementProperties() { 15134 return [8,9,4,5,14,15,17]; 15135 } 15136 15137 function getFieldMaxLength(propertyId, fieldName, mediaType) { 15138 switch (fieldName) { 15139 case "ResultsEvaluation": 15140 if (propertyId == 19) 15141 return 1000; 15142 else 15143 return 300; 15144 break; 15145 case "ProjectSummary": 15146 if (propertyId == 19 && mediaType == 'Company') 15147 return 1000; 15148 else if (propertyId == 19 && mediaType == 'Inventions') 15149 return 300; 15150 else 15151 return 500; 15152 break; 15153 case "Objectives": 15154 if (propertyId == 19) 15155 return 1000; 15156 else 15157 return 300; 15158 break; 15159 case "CompanyEffortsDiversity": 15160 if (propertyId == 19) 15161 return 1000; 15162 else 15163 return 300; 15164 break; 15165 case "CompanyEffortsSustainability": 15166 if (propertyId == 19) 15167 return 1000; 15168 else 15169 return 300; 15170 break; 15171 default: 15172 return 300; 15173 } 15174 } 15175 15176 return { 15177 15178 GetStripeProperties: getStripeProperties, 15179 GetHonorsEnhancementProperties: getHonorsEnhancementProperties, 15180 getFieldMaxLength: getFieldMaxLength, 15181 titleCase: function titleCase(str) { 15182 if (!str) 15183 return ''; 15184 str = str.toLowerCase().split(' '); 15185 for (var i = 0; i < str.length; i++) { 15186 str[i] = str[i].charAt(0).toUpperCase() + str[i].slice(1); 15187 } 15188 return str.join(' '); 15189 }, 15190 clearLocalStorage: function (type) { 15191 //Also defined in exceptionhandler.js - since including sharedProperties causes EPIC FAIL 15192 15193 if (type === 'entries') { 15194 //get the token data 15195 var tkn = localStorage.getItem(tokenKey); 15196 var tknGuest = localStorage.getItem(tokenKey + "_guest"); 15197 15198 //clear storage 15199 localStorage.clear(); 15200 15201 //reset the token data 15202 if (tkn != null) { localStorage.setItem(tokenKey, tkn); } 15203 if (tknGuest != null) { localStorage.setItem(tokenKey + "_guest", tknGuest); } 15204 } 15205 }, 15206 getProperty: function (key) { 15207 return properties[key]; 15208 }, 15209 setProperty: function (key, value) { 15210 properties[key] = value; 15211 }, 15212 SetAccessLimited: function (site, data) { 15213 if (site == "APlus") { 15214 localStorage.setItem(APlusAccess, data); 15215 } else if (site == "Magellan") { 15216 localStorage.setItem(MagellanAccess, data); 15217 } else if (site == "Time") { 15218 localStorage.setItem(TimeAccess, data); 15219 } 15220 }, 15221 GetAccessLimited: function () { 15222 var access = "" 15223 if (localStorage.getItem(APlusAccess) === 'true') 15224 access += "APlus,"; 15225 if (localStorage.getItem(MagellanAccess) === 'true') 15226 access += "Magellan,"; 15227 if (localStorage.getItem(TimeAccess) === 'true') 15228 access += "Time,"; 15229 15230 return access; 15231 }, 15232 GetGlobalAccess: function () { 15233 if (localStorage.getItem(TimeAccess) === 'true') 15234 return false; 15235 return true; 15236 }, 15237 loginPVUser: function (data) { 15238 $rootScope.$broadcast('loginPVUser', data); 15239 }, 15240 logoutPVUser: function (data) { 15241 $rootScope.$broadcast('logoutPVUser', data); 15242 }, 15243 updateUser: function (user) { 15244 $rootScope.$broadcast('updateUser', { data: user }); 15245 }, 15246 IsWebbyOrLovie: function () { 15247 if (appType == 'admin') return false; 15248 return ([1, 3].indexOf(properties["propertyDetails"].PropertyID)) > -1; 15249 }, 15250 TokenKey: tokenKey, 15251 AuthenticationHeader: function () { 15252 var propID = appType != 'admin' ? properties["propertyDetails"].PropertyID : 0; 15253 var hasGuestAccounts = propID == 1 || propID == 3 || propID == 19; 15254 return { headers: { 'Authorization': 'Bearer ' + (getStorageItem(tokenKey) || (hasGuestAccounts ? getStorageItem(tokenKey + "_guest") : null)) } }; 15255 }, 15256 HasToken: function () { return (getStorageItem(tokenKey) ? true : false); }, 15257 HasGuestToken: function () { 15258 var propID = appType != 'admin' ? properties["propertyDetails"].PropertyID : 0; 15259 var hasGuestAccounts = propID == 1 || propID == 3 || propID == 19; 15260 return (hasGuestAccounts && getStorageItem(tokenKey + "_guest") ? true : false); 15261 }, 15262 RemoveToken: function () { removeStorageItem(tokenKey); removeStorageItem(tokenKey + "_guest"); removeStorageItem(profile); }, 15263 SetToken: function (data, isGuest) { localStorage.setItem(tokenKey + (isGuest ? "_guest" : ""), data); }, 15264 RemoveProfile: function () { removeStorageItem(profile); }, 15265 SetProfile: function (data) { localStorage.setItem(profile, data); }, 15266 GetProfile: function () { return getStorageItem(profile); }, 15267 SetExtended: function (data) { localStorage.setItem(extendedFlag, data); }, 15268 GetExtended: function () { return getStorageItem(extendedFlag); }, 15269 RemoveExtended: function () { removeStorageItem(extendedFlag); }, 15270 GetSessionStorage: function (key) { getStorageItem(key); }, 15271 SetSessionStorage: function (key, data) { sessionStorage.setItem(key, data); }, 15272 RemoveSessionStorage: function (key) { sessionStorage.removeItem(key); }, 15273 ShowThenHideArea: function (identifier, scroll) { 15274 if (scroll) { 15275 $('html, body').animate({ 15276 scrollTop: $("body").offset().top 15277 }, 1000); 15278 } 15279 $(identifier).show('slow', function () { 15280 timerForShowSuccessAlert = setTimeout(function () { 15281 $(identifier).slideUp(500, function () { 15282 $(this).hide(); 15283 }); 15284 }, 3000); 15285 }) 15286 }, 15287 DateFormats: { 15288 dateOnly: 'shortDate', 15289 dateTime: 'M/d/yyyy hh:mm a', 15290 timeOnly: 'h:mm a' 15291 }, 15292 FormatForLoginCallback: function () { 15293 if (!arguments || arguments.length == 0) { return null; } 15294 var response = { 15295 Broadcast: arguments[0] 15296 }; 15297 if (arguments.length > 1) { 15298 response['fn'] = arguments[1]; 15299 } 15300 if (arguments.length > 2) { 15301 var args = Array.prototype.slice.call(arguments); 15302 //remove first 2 items 15303 args.shift(); 15304 args.shift(); 15305 response['Params'] = args; 15306 } 15307 15308 return response; 15309 }, 15310 GetPaymentStatusName: function (paymentStatusID) { 15311 switch (paymentStatusID) { 15312 15313 case 2: 15314 return "Authorization Pending"; 15315 break; 15316 case 3: 15317 return "Authorization Declined"; 15318 break; 15319 case 4: 15320 return "Authorized"; 15321 break; 15322 case 5: 15323 return "Paid"; 15324 break; 15325 case 6: 15326 return "Partially Refunded"; 15327 break; 15328 case 7: 15329 return "Refunded"; 15330 break; 15331 default:
15332 return "Unpaid"; 15333 break; 15334 } 15335 }, 15336 TwitterRankedDictionary: [ 15337 "Proud citizens of the Internet, show us what democracy looks like and VOTE for [[TITLE]]! Theyâre currently in [[RANK]] place ð³ DO IT: &&LINK&& #[[CALLOUT]]", 15338 "Big flex, [[TITLE]] is [[RANK]] place in #[[AWARD]]. RT + VOTE: &&LINK&&", 15339 "ð [[TITLE]] ð is ð in ð [[RANK]]ðplaceð I voted and they need YOU to vote too: &&LINK&& #[[CALLOUT]]", 15340 "Canât wait to hear [[TITLE]]âs #5WordSpeech ð¤©! Theyâre in [[RANK]] place, VOTE: &&LINK&& #[[CALLOUT]]", 15341 "âï¸ Hereâs the mf tea: [[TITLE]] is in [[RANK]] place in #[[AWARD]] & they need your votes to WIN: &&LINK&&", 15342 "ð£ [[TITLE]] is in [[RANK]] place and so close to joining the #[[CALLOUT]] Winners Circle. RT + VOTE: &&LINK&&", 15343 "ð [[TITLE]] is in [[RANK]] place in #[[AWARD]], and they canât win without your votes. Period. VOTE: &&LINK&&", 15344 "FACT: [[TITLE]] is in [[RANK]] place in #[[AWARD]]. FACT: They canât win without your vote ð &&LINK&&", 15345 "You + [[TITLE]] = #[[AWARD]] VICTORY ð. Theyâre currently in [[RANK]] place. VOTE RN: &&LINK&&", 15346 "Look out, [[TITLE]] is going straight to the top â¬ï¸, now in [[RANK]] place! &&LINK&& ð¯ #[[CALLOUT]]", 15347 "ã( ^.^)ãCheering for [[TITLE]] in [[RANK]] place in #[[AWARD]]! RT + VOTE: &&LINK&&ã½(^ã^)丿" 15348 ], 15349 TwitterNonRankedDictionary: [ 15350 "âï¸ Hereâs the mf tea: #[[AWARD]] ends TODAY and [[TITLE]] needs your votes to win! RT & VOTE: &&LINK&&", 15351 "If [[TITLE]] doesnât win a [[AWARD]] & you didnât vote, thatâs on YOU. Voting ends TODAY. Do your part ð &&LINK&& #[[CALLOUT]]", 15352 "My vote ðââï¸ + yours ðââï¸ = #[[AWARD]] glory for [[TITLE]]. VOTING ENDS TODAY: &&LINK&& #[[CALLOUT]]", 15353 "Proud citizens of the Internet, show us what democracy looks like and VOTE for [[TITLE]]! Todayâs the last day. ð³ DO IT: &&LINK&& #[[CALLOUT]]" 15354 ], 15355 TwitterLovieRankedDictionary: [ 15356 "ATTENTION: [[TITLE]] in [[RANK]] place in @lovieawards People's Lovie! ð Rally the troops & VOTE: &&LINK&& #Lovies", 15357 "Look out, [[TITLE]] is going straight to the top â¬ï¸ Now in [[RANK]] place in People's @lovieawards! &&LINK&& #Lovies", 15358 "ð [[TITLE]] ð is in [[RANK]] place in People's @lovieawards! I voted and they need YOU to vote too: &&LINK&& #Lovies", 15359 "Help [[TITLE]] get to Peopleâs Lovie VICTORY. They're in [[RANK]] place. VOTE NOW: &&LINK&& #Lovies", 15360 "Help me push [[TITLE]] over the top! Theyâre in [[RANK]] place, VOTE: &&LINK&& #Lovies", 15361 "ð¨ [[TITLE]] is now in [[RANK]] place in the Peopleâs @lovieawards ð¨ VOTE VOTE VOTE: &&LINK&& #Lovies", 15362 "ð [[TITLE]] is in [[RANK]] place and so close to joining the #Lovies Winners Circle. RT + VOTE: &&LINK&&", 15363 "ã( .)ãCheering for [[TITLE]] in [[RANK]] place for Peopleâs Lovie! RT + VOTE: &&LINK&&ã½(ã)丿#Lovies", 15364 ".[[TITLE]] is on ð¥! They're [[RANK]] place in People's Lovie voting. Give âem some â¤ï¸ + VOTE: &&LINK&& #Lovies", 15365 "I just voted for [[TITLE]] in the People's @lovieawards and you should too. Vote now! &&LINK&& #Lovies" 15366 ], 15367 TwitterLovieNonRankedDictionary: [ 15368 "Get your clicking fingers ready! Help [[TITLE]] win a People's Lovie Award. Voting ends TODAY &&LINK&& #Lovies", 15369 "My vote + yours = People's Lovie glory for [[TITLE]]. Vote now! &&LINK&& #Lovies", 15370 "My vote + yours = People's Lovie glory for [[TITLE]]. VOTING ENDS TODAY: &&LINK&& #Lovies", 15371 "Proud citizens of the Internet, do your civic duty and vote for [[TITLE]] Last day! DO IT: &&LINK&& #Lovies" 15372 ], 15373 TwitterAnthemRankedDictionary: [ 15374 "ATTENTION: [[TITLE]] is in [[RANK]] place to win an Anthem Community Voice Award! ð Rally the troops to celebrate now!: &&LINK&& #AnthemAwards" 15375 ], 15376 TwitterAnthemNonRankedDictionary: [ 15377 "Help [[TITLE]] win an Anthem Community Voice Award! Join me in celebrating their work! &&LINK&& #AnthemAwards", 15378 "Celebrate changemakers with the Anthem Awards and support [[TITLE]] to win a Community Voice Award: &&LINK&& #AnthemAwards", 15379 "Show your support for game-changing impact work! Help [[TITLE]] win an Anthem Community Voice Award. &&LINK&& #AnthemAwards",
15380 "My support + yours = Anthem Community Voice glory for [[TITLE]]. Celebrate now! &&LINK&& #AnthemAwards", 15381 "TODAY is the last day to show support for [[TITLE]]. Join the Anthem Awards Celebration: &&LINK&& #AnthemAwards", 15382 "Itâs time to celebrate! Help [[TITLE]] win an Anthem Community Voice Award. The celebration window ends TODAY &&LINK&& #AnthemAwards" 15383 ], 15384 GetPVTwitterMessage: function (entry, link, isLastDay) { 15385 var twitter_callout = ""; 15386 var award_name = ""; 15387 switch (properties["propertyDetails"].PropertyID) { 15388 case 8: 15389 twitter_callout = "Tellys"; 15390 award_name = "People's Telly"; 15391 break; 15392 case 7: 15393 twitter_callout = "@architizer A+Awards"; 15394 award_name = "Popular Choice"; 15395 break; 15396 case 3: 15397 twitter_callout = "Lovie"; 15398 award_name = "People's Lovie"; 15399 break; 15400 case 1: 15401 twitter_callout = "Webbys"; 15402 award_name = "Webbys Peopleâs Voice"; 15403 break; 15404 case 14: 15405 twitter_callout = "Anthem Community Voice"; 15406 award_name = "Anthem Community Voice"; 15407 break; 15408 case 15: 15409 twitter_callout = "@signalawards Listenerâs Choice #signalawards"; 15410 award_name = "Listenerâs Choice"; 15411 break; 15412 case 17: 15413 twitter_callout = "#collisionaudiencechoice"; 15414 break; 15415 default: 15416 twitter_callout = ""; 15417 break; 15418 } 15419 15420 var message = ""; 15421 if (properties["propertyDetails"].PropertyID != 1 && properties["propertyDetails"].PropertyID != 3 && properties["propertyDetails"].PropertyID != 8 && properties["propertyDetails"].PropertyID != 14 && properties["propertyDetails"].PropertyID != 15) { 15422 message = isLastDay ? (entry.TwitterName ? "@" + entry.TwitterName.replace('@', '') : entry.Title) + " is competing in the " + twitter_callout + ". Let's help them win a Popular Choice Award!! &&LINK&&" : 15423 (entry.TwitterName ? "@" + entry.TwitterName.replace('@', '') : entry.Title) + " is now in " + this.getOrdinal(entry.CurrentRank, true) + " place for the " + twitter_callout + ". RT + VOTE: &&LINK&&"; 15424 } 15425 else if (properties["propertyDetails"].PropertyID == 8) { 15426 message = isLastDay ? (entry.TwitterName ? "@" + entry.TwitterName.replace('@', '') : entry.Title) + " is competing in the " + twitter_callout + ". Let's help them win a " + award_name + " Awards!! &&LINK&&" : 15427 (entry.TwitterName ? "@" + entry.TwitterName.replace('@', '') : entry.Title) + " is now ready to be rated in the " + award_name + " Awards. RT + VOTE: &&LINK&&"; 15428 } 15429 else if (properties["propertyDetails"].PropertyID == 3) { 15430 message = isLastDay ? this.TwitterLovieNonRankedDictionary[Math.floor(Math.random() * this.TwitterLovieNonRankedDictionary.length)] : this.TwitterLovieRankedDictionary[Math.floor(Math.random() * this.TwitterLovieRankedDictionary.length)]; 15431 message = message.replace("[[TITLE]]", entry.TwitterName ? "@" + entry.TwitterName.replace('@', '') : entry.Title).replace(/\[\[CALLOUT\]\]/g, twitter_callout).replace(/\[\[RANK\]\]/g, this.getOrdinal(entry.CurrentRank, true)).replace(/\[\[AWARD\]\]/g, award_name); 15432 } 15433 else if (properties["propertyDetails"].PropertyID == 14) { 15434 message = isLastDay ? this.TwitterAnthemNonRankedDictionary[Math.floor(Math.random() * this.TwitterAnthemNonRankedDictionary.length)] : this.TwitterAnthemRankedDictionary[Math.floor(Math.random() * this.TwitterAnthemRankedDictionary.length)];
15435 message = message.replace("[[TITLE]]", entry.TwitterName ? "@" + entry.TwitterName.replace('@', '') : entry.Title).replace(/\[\[CALLOUT\]\]/g, twitter_callout).replace(/\[\[RANK\]\]/g, this.getOrdinal(entry.CurrentRank, true)).replace(/\[\[AWARD\]\]/g, award_name); 15436 } 15437 else if (properties["propertyDetails"].PropertyID == 15) { 15438 message = isLastDay ? (entry.TwitterName ? "@" + entry.TwitterName.replace('@', '') : entry.Title) + " is competing in the " + twitter_callout + ". Let's help them win a " + award_name + " Award!! &&LINK&&" : 15439 (entry.TwitterName ? "@" + entry.TwitterName.replace('@', '') : entry.Title) + " is now in " + this.getOrdinal(entry.CurrentRank, true) + " place " + twitter_callout + ". RT + VOTE: &&LINK&&"; 15440 } 15441 else { // Webbys random message 15442 message = isLastDay ? this.TwitterNonRankedDictionary[Math.floor(Math.random() * this.TwitterNonRankedDictionary.length)] : this.TwitterRankedDictionary[Math.floor(Math.random() * this.TwitterRankedDictionary.length)]; 15443 message = message.replace("[[TITLE]]", entry.TwitterName ? "@" + entry.TwitterName.replace('@', '') : entry.Title).replace(/\[\[CALLOUT\]\]/g, twitter_callout).replace(/\[\[RANK\]\]/g, this.getOrdinal(entry.CurrentRank, true)).replace(/\[\[AWARD\]\]/g, award_name); 15444 } 15445 // we have to build the link into the message and it must be encoded properly 15446 message = encodeURI(message).replace("&&LINK&&", link).replace(/#/g, '%23').replace(/\+/g, '%2B').replace(/&/g, '%26'); 15447 15448 return message; 15449 }, 15450 FacebookOGDictionary: [ 15451 { Title: "Webby Peopleâs Voice needs YOU", Description: "The Internet canât be stopped and neither can [[TITLE]]. Vote with me and bring them to Webbys victory." }, 15452 { Title: "Love the Internet more than pizza? Us too.", Description: "I think [[TITLE]] is the best of the Internet. Vote with me for The 22nd Annual Webby People's Voice Awards!" }, 15453 { Title: "Citizens of the Internet, itâs time to vote.", Description: "Letâs help [[TITLE]] win in the 22nd Annual Webby Peopleâs Voice Awards. Vote with me." }, 15454 { Title: "Get your clicking fingers ready.", Description: "I think [[TITLE]] is slaying the Internet. Letâs help them win a Webby People's Voice Award!" }, 15455 { Title: "Your click counts!", Description: "I just voted for [[TITLE]] to win a Webby Peopleâs Voice Award. You should too." }, 15456 { Title: "Oh, itâs on.", Description: "I just voted for [[TITLE]] in the 22nd Annual Webby Peopleâs Voice Awards. You should too, if you know whatâs good." } 15457 ], 15458 FacebookLovieOGDictionary: [ 15459 { Title: "The Peopleâs Lovie Awards Needs You", Description: "I just voted for [[TITLE]] to win a Peopleâs Lovie Award. You should too." } 15460 ], 15461 FacebookAnthemOGDictionary: [ 15462 { Title: "The Anthem Awards Needs You", Description: "Itâs time to celebrate! Help [[TITLE]] win an Anthem Community Voice Award." } 15463 ], 15464 GetPVFacebookMessage: function (entry, isLastDay) { 15465 var facebook_callout = ""; 15466 var award_name = ""; 15467 var obj = {}; 15468 switch (properties["propertyDetails"].PropertyID) { 15469 case 8: 15470 facebook_callout = "@tellyawards"; 15471 award_name = "People's Telly"; 15472 break; 15473 case 7: 15474 facebook_callout = "@architizer A+Awards"; 15475 award_name = "Popular Choice"; 15476 break; 15477 case 3: 15478 facebook_callout = "@lovieawards"; 15479 award_name = "People's Lovie"; 15480 break; 15481 case 1: 15482 facebook_callout = "@webbyawards"; 15483 award_name = "Peopleâs Voice"; 15484 break; 15485 case 14: 15486 facebook_callout = "Anthem Community Voice"; 15487 award_name = "Anthem Community Voice"; 15488 break; 15489 case 15: 15490 facebook_callout = "@signalawards Listenerâs Choice #signalawards"; 15491 award_name = "Listenerâs Choice"; 15492 break; 15493 case 17: 15494 facebook_callout = "#collisionaudiencechoice"; 15495 break; 15496 default: 15497 break; 15498 } 15499 var message = ""; 15500 if (properties["propertyDetails"].PropertyID != 1 && properties["propertyDetails"].PropertyID != 3 && properties["propertyDetails"].PropertyID != 8 && properties["propertyDetails"].PropertyID != 14 && properties["propertyDetails"].PropertyID != 15) { 15501 message = isLastDay ? entry.Title + " is competing in the " + facebook_callout + ". Let's help them win a " + award_name + " Award!!" : 15502 entry.Title + " is now in " + this.getOrdinal(entry.CurrentRank, true) + " place for the " + facebook_callout + ". Letâs help them win a " + award_name + " Award!!"; 15503 } 15504 if (properties["propertyDetails"].PropertyID == 8) { 15505 message = isLastDay ? entry.Title + " is competing in the " + facebook_callout + ". Let's help them win a " + award_name + " Award!!" : 15506 "You can now show your love for " + entry.Title + " in the Peopleâs " + facebook_callout + ". Letâs help them win a " + award_name + " Award! Go vote now!"; 15507 } 15508 else if (properties["propertyDetails"].PropertyID == 3) { 15509 obj = this.FacebookLovieOGDictionary[0]; 15510 obj.Description = obj.Description.replace("[[TITLE]]", entry.Title); 15511 } 15512 else if (properties["propertyDetails"].PropertyID == 14) { 15513 obj = this.FacebookAnthemOGDictionary[0]; 15514 obj.Description = obj.Description.replace("[[TITLE]]", entry.Title); 15515 } 15516 else if (properties["propertyDetails"].PropertyID == 15) { 15517 message = isLastDay ? entry.Title + " is competing in the " + facebook_callout + ". Let's help them win a " + award_name + " Award!!" : 15518 entry.Title + " is now in " + this.getOrdinal(entry.CurrentRank, true) + " place for the " + facebook_callout + ". Letâs help them win a " + award_name + " Award!!"; 15519 } 15520 else { // Webbys random Title and Description override for FB feed. no message? 15521 obj = this.FacebookOGDictionary[Math.floor(Math.random() * this.FacebookOGDictionary.length)];
15522 obj.Description = obj.Description.replace("[[TITLE]]", entry.AgencyName); 15523 } 15524 obj.message = message; 15525 return obj; 15526 }, 15527 SubscriptionSet: function (id, bool) { 15528 localStorage.setItem("Subscription" + id, bool); 15529 }, 15530 SubscriptionChecked: function (id) { 15531 return localStorage.getItem("Subscription" + id) === "true"; 15532 }, 15533 15534 WebbySubscriptionSet: function (id, bool) { 15535 localStorage.setItem("WebbySubscription" + id, bool); 15536 }, 15537 WebbySubscriptionChecked: function (id) { 15538 return localStorage.getItem("WebbySubscription" + id) === "true"; 15539 }, 15540 15541 DownloadFile: function (orderID, specificFileName, specificFunction) { 15542 //FROM: http://stackoverflow.com/questions/24080018/download-file-from-an-asp-net-web-api-method-using-angularjs 15543 // Based on an implementation here: web.student.tuwien.ac.at/~e0427417/jsdownload.html 15544 var checkoutFileDownloadError = ""; 15545 var debug = false; 15546 // Use an arraybuffer 15547 specificFunction(orderID) 15548 .success(function (data, status, headers) { 15549 var octetStreamMime = 'application/octet-stream'; 15550 var success = false; 15551 //Get the headers 15552 headers = headers(); 15553 15554 // Get the filename from the x-filename header or default to "download.pdf" 15555 var filename = specificFileName || headers['x-filename'] || 'download.pdf'; 15556 15557 // Determine the content type from the header or default to "application/octet-stream" 15558 var contentType = headers['content-type'] || octetStreamMime; 15559 15560 try { 15561 // Try using msSaveBlob if supported 15562 if (debug) console.log("Trying saveBlob method ..."); 15563 var blob = new Blob([data], { type: contentType }); 15564 if (navigator.msSaveBlob) 15565 navigator.msSaveBlob(blob, filename); 15566 else { 15567 // Try using other saveBlob implementations, if available 15568 var saveBlob = navigator.webkitSaveBlob || navigator.mozSaveBlob || navigator.saveBlob; 15569 if (saveBlob === undefined) throw "Not supported"; 15570 saveBlob(blob, filename); 15571 } 15572 if (debug) console.log("saveBlob succeeded"); 15573 success = true; 15574 } catch (ex) { 15575 if (debug) console.log("saveBlob method failed with the following exception:"); 15576 if (debug) console.log(ex); 15577 } 15578 15579 if (!success) { 15580 // Get the blob url creator 15581 var urlCreator = window.URL || window.webkitURL || window.mozURL || window.msURL; 15582 if (urlCreator) { 15583 // Try to use a download link 15584 var link = document.createElement('a'); 15585 if ('download' in link) { 15586 // Try to simulate a click 15587 try { 15588 // Prepare a blob URL 15589 if (debug) console.log("Trying download link method with simulated click ..."); 15590 var blob = new Blob([data], { type: contentType }); 15591 var url = urlCreator.createObjectURL(blob); 15592 link.setAttribute('href', url); 15593 15594 // Set the download attribute (Supported in Chrome 14+ / Firefox 20+) 15595 link.setAttribute("download", filename); 15596 15597 // Simulate clicking the download link 15598 var event = document.createEvent('MouseEvents'); 15599 event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null); 15600 link.dispatchEvent(event); 15601 if (debug) console.log("Download link method with simulated click succeeded"); 15602 success = true; 15603 15604 } catch (ex) { 15605 if (debug) console.log("Download link method with simulated click failed with the following exception:"); 15606 if (debug) console.log(ex); 15607 } 15608 } 15609 15610 if (!success) { 15611 // Fallback to window.location method 15612 try { 15613 // Prepare a blob URL 15614 // Use application/octet-stream when using window.location to force download 15615 if (debug) console.log("Trying download link method with window.location ..."); 15616 var blob = new Blob([data], { type: octetStreamMime }); 15617 var url = urlCreator.createObjectURL(blob); 15618 window.location = url; 15619 if (debug) console.log("Download link method with window.location succeeded"); 15620 success = true; 15621 } catch (ex) { 15622 if (debug) console.log("Download link method with window.location failed with the following exception:"); 15623 if (debug) console.log(ex); 15624 } 15625 } 15626 15627 } 15628 } 15629 15630 if (!success) { 15631 // Fallback to window.open method 15632 if (debug) console.log("No methods worked for saving the arraybuffer, using last resort window.open"); 15633 window.open(httpPath, '_blank', ''); 15634 } 15635 }) 15636 .error(function (data, status) { 15637 if (debug) console.log("Request failed with status: " + status); 15638 15639 // Optionally write the error out to scope 15640 return checkoutFileDownloadError = "Unable to download file."; 15641 }); 15642 15643 }, 15644 DownloadCSV: function (res, filename) { 15645 var result = _.get(res, 'data', {}); 15646 var blob = new Blob(["\ufeff", result.Data], { type: 'text/csv' }); 15647 15648 urlCreator = window.URL || window.webkitURL || window.mozURL || window.msURL; 15649 var dataUrl = urlCreator.createObjectURL(blob); 15650 15651 if (navigator.msSaveBlob) { 15652 navigator.msSaveBlob(blob, filename); 15653 } 15654 15655 var element = document.createElement('a'); 15656 15657 element.setAttribute('href', dataUrl); 15658 element.setAttribute('download', filename); 15659 element.setAttribute('target', '_blank'); 15660 15661 if (document.createEvent) { 15662 var event = document.createEvent('MouseEvents'); 15663 event.initEvent('click', true, true); 15664 element.dispatchEvent(event); 15665 } else { 15666 element.click(); 15667 } 15668 }, 15669 FilterRawQueryStringItems: function (paramStartsWith) { 15670 if (!paramStartsWith) { 15671 return ""; 15672 } 15673 15674 var qs = $location.search(); 15675 var newString = ""; 15676 _.each(qs, function (value, key) { 15677 if (key.toLowerCase().trim().substring(0, paramStartsWith.trim().length) === paramStartsWith.trim().toLowerCase()) { 15678 newString = (newString ? newString + "&" : "") + (key + "=" + value); 15679 } 15680 }); 15681 return newString; 15682 }, 15683 GetQueryStringItem: function (param) { 15684 var qs = $location.search(); 15685 var newObject = {}; 15686 _.each(qs, function (value, key) {
15687 newObject[key.toLowerCase()] = value; 15688 }); 15689 if (param in newObject) { 15690 return newObject[param]; 15691 } 15692 return ''; 15693 }, 15694 GetQueryStringItems: function (filterObj) { 15695 var qs = $location.search(); 15696 var newObject = {}; 15697 _.each(qs, function (value, key) { 15698 newObject[key.toLowerCase()] = value; 15699 }); 15700 for (var param in filterObj) { 15701 if (param.toLowerCase() in newObject) { 15702 filterObj[param] = newObject[param.toLowerCase()]; 15703 } 15704 } 15705 return filterObj; 15706 }, 15707 GetNonBangQueryStringItem: function (param) { 15708 var qsobject = document.location.search.replace(/(^\?)/, '').split("&").map(function (n) { 15709 return n = n.split("="), 15710 this[n[0]] = n[1], 15711 this; 15712 }.bind({}))[0]; 15713 15714 if (qsobject) { 15715 return qsobject[param]; 15716 } 15717 return null; 15718 }, 15719 errorHandler: function (err, ctrlScope, displayError) { 15720 var errorObj = _.get(err, 'resObj', err); 15721 var errorMessagesProp = _.get(err, 'errorProperty', 'statusText'); 15722 var errorMessages = errorObj[errorMessagesProp]; 15723 var errorMessagesResult = (_.isArray(errorMessages)) ? errorMessages : [errorMessages]; 15724 ctrlScope.errorMessage = errorMessagesResult; 15725 displayError(); 15726 return err; 15727 }, 15728 getEntryMappingByID: function (mappingContainer, entryPropertyID) { 15729 if (!mappingContainer) return null; 15730 15731 return mappingContainer[entryPropertyID]; 15732 }, 15733 getEntryIDByMapping: function (mappingContainer, entryPropertyMapping) { 15734 if (!mappingContainer) return null; 15735 15736 return mappingContainer[entryPropertyMapping]; 15737 }, 15738 isCurrentSeason: function (seasonObj) { 15739 var get = _.partial(_.get, seasonObj); 15740 var startDate = new Date(get('StartDate')); 15741 var endDate = new Date(get('EndDate')); 15742 var today = new Date(); 15743 return today >= startDate && today <= endDate; 15744 }, 15745 getOrdinal: function (num, concat) { 15746 var suf = "th"; 15747 var check = num % 100; 15748 if (check < 10 || check > 20) { 15749 switch (num % 10) { 15750 case 1: 15751 suf = "st"; 15752 break; 15753 case 2: 15754 suf = "nd"; 15755 break; 15756 case 3: 15757 suf = "rd"; 15758 break; 15759 } 15760 } 15761 if (concat) { 15762 return num + suf; 15763 } else { 15764 return { num: num, suf: suf }; 15765 } 15766 }, 15767 Status: { 15768 Global: { 15769 Active: 1, 15770 Inactive: 7, 15771 NeedsUpdated: 8, 15772 New: 5, 15773 RIP: 9, 15774 GroupActive: 4 15775 }, 15776 Property: { 15777 AssignmentFulfilled: 6, 15778 Scheduled: 2, 15779 TemporarilyInactive: 11, 15780 Unscheduled: 10 15781 }, 15782 Review: { 15783 Active: 3 15784 } 15785 }, 15786 NoLoadReasons: { 15787 No_Download_By_Region: 1, 15788 Incompatible_With_Device: 2, 15789 URL_Broken: 3, 15790 No_Username_Provided: 4, 15791 Other: 5 15792 }, 15793 IsSocialURL: function (url) { 15794 if (url) { 15795 var socialPatterns = [ 15796 'http(s)?://(.*\.)?twitter\.com\/*\/?', 15797 'http(s)?:\/\/([\w]+\.)?linkedin\.com\/*\/?', 15798 'http(s)?:\/\/(www\.)?(facebook|fb)\.com\/*\/?', 15799 'http(s)?:\/\/(www\.)?instagram\.com\/*\/?', 15800 'http(s)?:\/\/plus\.google\.com\/*\/?', 15801 'http(s)?://(.*\.)?pinterest\.com\/*\/?']; 15802 for (var u = 0; u < socialPatterns.length; u++) { 15803 if (url.match(new RegExp(socialPatterns[u]))) { 15804 return true; 15805 } 15806 } 15807 } 15808 return false; 15809 } 15810 }; 15811 }]) 15812 .directive('checkBox', function () { 15813 return { 15814 scope: { 15815 ctrlBind: '=?ctrlBind', 15816 batchFn: '=?batchFn' 15817 }, 15818 restrict: 'E', 15819 link: function (scope, element, attributes) { 15820 scope.label = attributes['label'] || ''; 15821 }, 15822 template: [ 15823 '<span class="checkbox">', 15824 '<label class="inline">', 15825 '<input type="checkbox" ng-model="ctrlBind" ng-click="batchFn(ctrlBind)" /><span></span> {{label}}', 15826 '</label>', 15827 '</span>' 15828 ].join('') 15829 } 15830 }) 15831 .directive('pagination', function () { 15832 return { 15833 scope: { 15834 setPage: '&', 15835 currentPage: '=', 15836 totalPages: '=', 15837 noResults: '=' 15838 }, 15839 restrict: 'E', 15840 template: [ 15841 '<div class="pagination" ng-hide="noResults">', 15842 '<button class="btn btn-link" type="button" ng-click="setPage({newPage: 1})" ng-disabled="currentPage < 2">', 15843 '<i class="iconic iconic-arrow-thick-left-fill-large-acute iconic-sm"></i><i class="iconic iconic-arrow-thick-left-fill-large-acute iconic-sm"></i>', 15844 '</button>', 15845 '<button class="btn btn-link" type="button" ng-click="setPage({newPage: currentPage - 1 })" ng-disabled="currentPage < 2">', 15846 '<i class="iconic iconic-arrow-thick-left-fill-large-acute iconic-sm"></i>', 15847 '</button>', 15848 '<span>Page {{currentPage || 1}} of {{totalPages || 1}}</span>', 15849 '<button class="btn btn-link" type="button" ng-click="setPage({newPage: currentPage + 1})" ng-disabled="currentPage >= totalPages">', 15850 '<i class="iconic iconic-arrow-thick-right-fill-large-acute iconic-sm"></i>', 15851 '</button>', 15852 '<button class="btn btn-link" type="button" ng-click="setPage({newPage: totalPages})" ng-disabled="currentPage >= totalPages">', 15853 '<i class="iconic iconic-arrow-thick-right-fill-large-acute iconic-sm"></i><i class="iconic iconic-arrow-thick-right-fill-large-acute iconic-sm"></i>', 15854 '</button>', 15855 '</div>' 15856 ].join('') 15857 } 15858 });; 15859angular.module('rmModules').factory('pageMetaHelper', function () { 15860 function toPlainMetaText(text, maxLength) { 15861 if (!text) { 15862 return text; 15863 } 15864 maxLength = maxLength || 300; 15865 var plain = text.replace(/<[^>]*>/g, ' ').replace(/\s+/g, ' ').trim(); 15866 if (plain.length > maxLength) { 15867 plain = plain.substring(0, maxLength).replace(/\s+\S*$/, '') + '\u2026'; 15868 } 15869 return plain; 15870 } 15871 15872 return { 15873 formatCategoryListingTitle: function (categoryTypeName, categoryName, year) { 15874 return categoryTypeName + ' \u2014 ' + categoryName + ' | ' + year + ' Webby Awards Winners'; 15875 }, 15876 formatMediaTypeListingTitle: function (mediaTypeName, year) { 15877 return mediaTypeName + ' | ' + year + ' Webby Awards Winners'; 15878 }, 15879 formatLandingTitle: function (year) { 15880 return 'Webby Gallery + Index | ' + year + ' Webby Awards Winners'; 15881 }, 15882 formatCategoryListingDescription: function (categoryTypeName, categoryName, year, apiDescription) { 15883 if (apiDescription) { 15884 return toPlainMetaText(apiDescription); 15885 } 15886 return 'Browse ' + year + ' Webby Award Winners, Nominees, and Honorees in ' + categoryTypeName + ' \u2014 ' + categoryName + '.'; 15887 }, 15888 formatMediaTypeListingDescription: function (mediaTypeName, year, apiDescription) { 15889 if (apiDescription) { 15890 return toPlainMetaText(apiDescription); 15891 } 15892 return 'Browse ' + year + ' Webby Award Winners, Nominees, and Honorees in ' + mediaTypeName + '.'; 15893 }, 15894 formatLandingDescription: function (year) { 15895 return 'Discover the best of the Internet. Browse ' + year + ' Webby Award Winners, Nominees, and Honorees in the Webby Gallery + Index.'; 15896 }, 15897 formatPieceDetailTitle: function (title, year, awardLabel) { 15898 var parts = [title]; 15899 if (awardLabel) { 15900 parts.push(awardLabel.replace(/,\s*$/, '').trim()); 15901 } 15902 parts.push(year + ' The Webby Awards'); 15903 return parts.join(' | '); 15904 }, 15905 formatPieceDetailDescription: function (opts) { 15906 var text = opts.title; 15907 if (opts.organization) { 15908 text += ' by ' + opts.organization; 15909 } 15910 text += '.'; 15911 if (opts.awardLabel && opts.categoryType && opts.category) { 15912 text += ' ' + opts.awardLabel.replace(/,\s*$/, '').trim() + ' in ' + opts.categoryType + ' \u2014 ' + opts.category + ', ' + opts.year + ' Webby Awards.'; 15913 } else if (opts.awardLabel) { 15914 text += ' ' + opts.awardLabel.replace(/,\s*$/, '').trim() + ', ' + opts.year + ' Webby Awards.'; 15915 } 15916 return text; 15917 }, 15918 formatSpecialAchievementDetailTitle: function (title, achievementType, year) { 15919 return title + ' | ' + achievementType + ' | ' + year + ' The Webby Awards'; 15920 }, 15921 formatSpecialAchievementDetailDescription: function (detail, year) { 15922 if (detail.Description) { 15923 return toPlainMetaText(detail.Description); 15924 } 15925 if (detail.AchievementType && detail.AchievementType.De
15925scription) { 15926 return toPlainMetaText(detail.AchievementType.Description); 15927 } 15928 var achievementType = detail.AchievementType ? detail.AchievementType.Name : 'Special Achievement'; 15929 return detail.Title + ' \u2014 ' + achievementType + ', ' + year + ' Webby Awards Special Achievement.'; 15930 }, 15931 getPrimaryEntry: function (detailData) { 15932 if (!detailData || !detailData.Entries || !detailData.Entries.length) { 15933 return null; 15934 } 15935 return _.find(detailData.Entries, 'Winner') 15936 || _.find(detailData.Entries, 'PublicVotingWinner') 15937 || _.find(detailData.Entries, 'Nominee') 15938 || _.find(detailData.Entries, 'Honoree') 15939 || detailData.Entries[0]; 15940 } 15941 }; 15942}); 15943; 15944angular.module('rmModules').factory('pageMetaFactory', ['$location', function ($location) { 15945 var DEFAULT_OG_IMAGE = 'https://www.webbyawards.com/wp-content/uploads/sites/4/2014/10/trophies1.jpg'; 15946 var DEFAULT_TITLE = 'The Webby Awards'; 15947 var DEFAULT_DESCRIPTION = 'Welcome to The Webby Awards Gallery.'; 15948 15949 var pageObj = { 15950 title: DEFAULT_TITLE, 15951 description: DEFAULT_DESCRIPTION, 15952 canonicalLink: '', 15953 image: DEFAULT_OG_IMAGE 15954 }; 15955 15956 function setMetaContent(attrType, key, content) { 15957 var selector = attrType === 'property' 15958 ? 'meta[property="' + key + '"]' 15959 : 'meta[name="' + key + '"]'; 15960 var node = document.querySelector(selector); 15961 15962 if (!node && content) { 15963 node = document.createElement('meta'); 15964 if (attrType === 'property') { 15965 node.setAttribute('property', key); 15966 } else { 15967 node.setAttribute('name', key); 15968 } 15969 document.head.appendChild(node); 15970 } 15971 15972 if (node) { 15973 node.setAttribute('content', content || ''); 15974 } 15975 } 15976 15977 function updateDomMeta() { 15978 if (pageObj.title) { 15979 document.title = pageObj.title; 15980 } 15981 15982 setMetaContent('name', 'description', pageObj.description); 15983 setMetaContent('property', 'og:title', pageObj.title); 15984 setMetaContent('property', 'og:description', pageObj.description); 15985 setMetaContent('property', 'og:url', pageObj.canonicalLink); 15986 setMetaContent('property', 'og:image', pageObj.image); 15987 setMetaContent('name', 'twitter:card', 'summary_large_image'); 15988 setMetaContent('name', 'twitter:title', pageObj.title); 15989 setMetaContent('name', 'twitter:description', pageObj.description); 15990 setMetaContent('property', 'twitter:image', pageObj.image); 15991 setMetaContent('name', 'twitter:image', pageObj.image); 15992 setMetaContent('name', 'twitter:image:alt', pageObj.description); 15993 15994 var canonical = document.querySelector('link[rel="canonical"]'); 15995 if (canonical && pageObj.canonicalLink) { 15996 canonical.setAttribute('href', pageObj.canonicalLink); 15997 } 15998 } 15999 16000 pageObj.clearTitle = function () { 16001 pageObj.title = DEFAULT_TITLE; 16002 updateDomMeta(); 16003 }; 16004 16005 pageObj.clearDescription = function () { 16006 pageObj.description = DEFAULT_DESCRIPTION; 16007 updateDomMeta(); 16008 }; 16009 16010 pageObj.clearMeta = function () { 16011 pageObj.title = DEFAULT_TITLE; 16012 pageObj.description = DEFAULT_DESCRIPTION; 16013 pageObj.image = DEFAULT_OG_IMAGE; 16014 updateDomMeta(); 16015 }; 16016 16017 pageObj.setTitle = function (title) { 16018 pageObj.title = title + ' | The Webby Awards'; 16019 updateDomMeta(); 16020 }; 16021 16022 pageObj.setPageTitle = function (title) { 16023 pageObj.title = title; 16024 updateDomMeta(); 16025 }; 16026 16027 pageObj.setDescription = function (description) { 16028 pageObj.description = description; 16029 updateDomMeta(); 16030 }; 16031 16032 pageObj.setCanonical = function () { 16033 var currentUrl = $location.absUrl(); 16034 if (currentUrl) { 16035 pageObj.canonicalLink = currentUrl.split('?')[0]; 16036 updateDomMeta(); 16037 } 16038 }; 16039 16040 pageObj.setImage = function (imageUrl) { 16041 pageObj.image = imageUrl || DEFAULT_OG_IMAGE; 16042 updateDomMeta(); 16043 }; 16044 16045 pageObj.applyMeta = function (options) { 16046 options = options || {}; 16047 16048 if (options.title) { 16049 pageObj.title = options.title; 16050 } 16051 if (options.description) { 16052 pageObj.description = options.description; 16053 } 16054 if (options.image) { 16055 pageObj.image = options.image; 16056 } 16057 if (options.url) { 16058 pageObj.canonicalLink = options.url.split('?')[0]; 16059 } else { 16060 var currentUrl = $location.absUrl(); 16061 if (currentUrl) { 16062 pageObj.canonicalLink = currentUrl.split('?')[0]; 16063 } 16064 } 16065 16066 updateDomMeta(); 16067 16068 if (options.markReady !== false) { 16069 pageObj.markReady(); 16070 } 16071 }; 16072 16073 pageObj.resetPrerenderReady = function () { 16074 window.prerenderReady = false;
16075 }; 16076 16077 pageObj.markReady = function () { 16078 window.prerenderReady = true; 16079 }; 16080 16081 return pageObj; 16082}]); 16083; 16084angular.module('rmModules') 16085 .factory('analyticsService', ['sharedProperties', 'analyticsFactory', function (sharedProperties, analyticsFactory) { 16086 var dataFactory = {}; 16087 16088 dataFactory.enums = { 16089 actions: { 16090 view: 1 16091 }, 16092 content: { 16093 galleryPiece: 1, 16094 galleryAch: 2 16095 } 16096 }; 16097 16098 dataFactory.trackContent = function (data) { 16099 if (sharedProperties.HasToken()) 16100 return analyticsFactory.track(data); 16101 return; 16102 }; 16103 16104 return dataFactory; 16105 }]);; 16106var galleryApp = angular.module('galleryApp', ['ngMessages', 'ui.router', 'ui.bootstrap', 'ui.bootstrap.modal', 'rmModules', 'angulartics', 'angulartics.google.tagmanager', 'angulartics.google.analytics', 'angulartics.gtag', 'angulartics.facebook.pixel', 'angulartics.segment', 'ngAnimate', 'ngStorage', 'com.2fdevs.videogular', 'com.2fdevs.videogular.plugins.overlayplay', 'com.2fdevs.videogular.plugins.controls', 'com.2fdevs.videogular.plugins.poster', 'ngSanitize', 'infinite-scroll']); 16107 16108galleryApp.constant("appType", "gallery"); 16109 16110galleryApp.filter('trustUrl', ['$sce', function ($sce) { 16111 return function (url) { 16112 return $sce.trustAsResourceUrl(url); 16113 }; 16114}]); 16115 16116galleryApp.config(['$stateProvider', '$urlRouterProvider', '$urlMatcherFactoryProvider', '$animateProvider', '$locationProvider', '$analyticsProvider', function ($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider, $animateProvider, $locationProvider, $analyticsProvider) { 16117 $animateProvider.classNameFilter(/has-animation/); 16118 $urlMatcherFactoryProvider.caseInsensitive(true); 16119 $urlMatcherFactoryProvider.strictMode(false); 16120 $urlRouterProvider.otherwise("/winners"); 16121 $locationProvider.html5Mode(true); 16122 16123 $stateProvider 16124 .state('search', { 16125 abstract: true, 16126 url: "/winners", 16127 templateUrl: "/Gallery/Search_Wrapper" 16128 // controller: "searchController" 16129 }) 16130 .state('styleguide', { 16131 url: "/style-guide", 16132 templateUrl: "/Gallery/StyleGuide" 16133 }) 16134 .state('search.base', { 16135 url: "", 16136 templateUrl: "/Gallery/Search_Landing" 16137 }) 16138 .state('search.base.signup', { 16139 url: "^/sign-up" 16140 }) 16141 .state('search.base.signin', { 16142 url: "^/sign-in" 16143 }) 16144 .state('claimsHomePage', { 16145 url: "/claim-your-credits", 16146 templateUrl: "/Gallery/Claims_HomePage", 16147 controller: "claimsController", 16148 }) 16149 .state('claims', { 16150 url: "/claims", 16151 templateUrl: "/Gallery/Claims_Listing_Pieces", 16152 controller: "claimsController", 16153 }) 16154 .state('search.category', { 16155 url: "/{mediaTypeName}/{categoryTypeName}/{categoryName}?{years}&{awards}&{sort}", 16156 templateUrl: "/Gallery/Search_Listing_Category", 16157 params: { 16158 selectYear: null, 16159 scrollToListing: null 16160 } 16161 }) 16162 .state('search.mediatype', { 16163 url: "/{mediaTypeName}?{years}&{awards}&{categories}&{sort}", 16164 templateUrl: "/Gallery/Search_Listing_MediaType", 16165 params: { 16166 scrollToListing: null 16167 } 16168 }) 16169 .state('globalsearch', { 16170 url: "/search?{years}&{awards}&{categories}&{sort}&{mediaTypes}&{searchTerm}", 16171 templateUrl: "/Gallery/Search_Universal" 16172 }) 16173 .state('winner', { 16174 abstract: true, 16175 url: "/winner", 16176 templateUrl: "/Gallery/Claims_User_Page" 16177 // controller: "searchController" 16178 }) 16179 .state('winner.claim', { 16180 url: "/{userId}", 16181 templateUrl: "/Gallery/Claims_User_Page", 16182 }) 16183 .state('resetpassword', { 16184 url: "/reset-password", 16185 templateUrl: "/Gallery/ResetPassword", 16186 controller: "passwordController", 16187 reloadOnSearch: false 16188 }) 16189 .state('piecedetails', { 16190 url: "/{year}/{mediaTypeName}/{categoryTypeName}/{categoryName}/{itemidentifier}/{itemTitle}", 16191 templateUrl: "/Gallery/PieceDetails" 16192 }) 16193 .state('sadetails', { 16194 url: "/{year}/specialachievement/{itemidentifier}/{itemTitle}", 16195 templateUrl: "/Gallery/PieceDetails" 16196 }) 16197 .state('dashboard', { 16198 abstract: true, 16199 url: "/dashboard", 16200 templateUrl: "/Gallery/Account" 16201 // controller: "userDashboardController" 16202 }) 16203 .state('dashboard.base', { 16204 url: "" 16205 }) 16206 .state('dashboard.profile', { 16207 url: "/profile", 16208 templateUrl: "/Gallery/Account_Profile" 16209 }) 16210 .state('dashboard.list', { 16211 url: "/saved", 16212 templateUrl: "/Gallery/UserDashboard_Saved" 16213 // TODO: maybe? controller: "userDashboardController" 16214 }) 16215 .state('home', { 16216 url: "/winners" 16217 }) 16218 .state('404', { 16219 url: '/not-found', 16220 templateUrl: "/Gallery/Error_404" 16221 }); 16222}]); 16223 16224galleryApp.directive('fallbackSrc', function () { 16225 var fallbackSrc = { 16226 link: function postLink(scope, iElement, iAttrs) { 16227 iElement.bind('error', function () { 16228 angular.element(this).attr("src", iAttrs.fallbackSrc); 16229 }); 16230 } 16231 } 16232 return fallbackSrc; 16233}); 16234 16235 16236galleryApp.filter('truncate', function () { 16237 return function (toTruncate, numCharacters) { 16238 if (isNaN(numCharacters) || numCharacters <= 0) return toTruncate; 16239 if (toTruncate && toTruncate.length > numCharacters) { 16240 toTruncate = toTruncate.substring(0, numCharacters); 16241 16242 var lastspace = toTruncate.lastIndexOf(' '); 16243 //get last space 16244 if (lastspace !== -1) { 16245 numCharacters = toTruncate.substring(0, lastspace); 16246 } 16247 return toTruncate + 'â¦'; 16248 } 16249 return toTruncate; 16250 } 16251}); 16252 16253galleryApp.directive('cardTypePiece', function () { 16254 return { 16255 restrict: 'E', 16256 scope: { 16257 data: '=cardData', 16258 currentCategory: '=', 16259 mediaTypeUrl: '@', 16260 categoryTypeUrl: '@', 16261 categoryUrl: '@', 16262 mediaTypes: '=' 16263 }, 16264 templateUrl: '/Gallery/CardTypePiece', 16265 link: function (scope, element) { 16266 if (scope && scope.currentCategory) { 16267 if (scope.currentCategory.MediaType) { 16268 scope.mediaType = scope.currentCategory.MediaType; 16269 } else { 16270 scope.mediaType = scope.currentCategory; 16271 } 16272 } 16273 16274 Object.defineProperty(scope, 'URLTitle', { 16275 get: function () { 16276 return (scope.data && scope.data.Title ? encodeURI(scope.data.Title.toLowerCase().replace(/[^\w\s]/gi, '').replace(/\s/g, '-')) : ''); 16277 } 16278 }); 16279 // setup award level output 16280 Object.defineProperty(scope, 'AwardList', { 16281 get: function () { 16282 return (scope.data.Awards && scope.data.Awards.length > 0 ? scope.data.Awards.join(', ') : ''); 16283 } 16284 }); 16285 16286 Object.defineProperty(scope, 'Image', { 16287 get: function () { 16288 if (!scope.data.ImageUrl && scope.data.SeasonId) {
16289 return (appSettings.CF ? appSettings.CF : appSettings.S3) + '1/' + scope.data.SeasonId + '/Entry_Uploads/' + scope.data.ItemId + '-thumb.jpg'; 16290 } 16291 return scope.data.ImageUrl || '/content/img/no-image-gallery.png'; 16292 } 16293 }); 16294 16295 scope.validateURL = function (url) { 16296 if (!(/^https?:\/\//.test(url))) { 16297 if (url.length != 0) { 16298 url = "http://" + url; 16299 } 16300 } 16301 return url; 16302 }; 16303 16304 if (!scope.categoryUrl && scope.data && scope.data.Categories && scope.currentCategory && scope.mediaTypes) { 16305 var mediaType = _.find(scope.mediaTypes, function (mt) { 16306 return scope.data.MediaTypeId == mt.Id; 16307 }); 16308 if (mediaType) { 16309 if (!scope.mediaTypeUrl) { 16310 scope.mediaTypeUrl = mediaType.Url; 16311 } 16312 if (!scope.mediaType || Object.keys(scope.mediaType)) { 16313 scope.mediaType = mediaType; 16314 } 16315 for (var t = 0; t < mediaType.Children.length; t++) { 16316 var pieceCategory = _.find(mediaType.Children[t].Children, function (cat) { 16317 return cat.Id == scope.data.Categories[0].CategoryId; 16318 }); 16319 16320 if (pieceCategory) { 16321 scope.categoryUrl = pieceCategory.Url; 16322 scope.categoryTypeUrl = mediaType.Children[t].Url; 16323 break; 16324 } 16325 } 16326 } 16327 } 16328 } 16329 }; 16330}); 16331 16332galleryApp.directive('userCardTypePiece', function () { 16333 return { 16334 restrict: 'E', 16335 scope: { 16336 data: '=cardData', 16337 currentCategory: '=', 16338 mediaTypeUrl: '@', 16339 categoryTypeUrl: '@', 16340 categoryUrl: '@', 16341 mediaTypes: '=' 16342 }, 16343 templateUrl: '/Gallery/UserCardTypePiece', 16344 link: function (scope, element) { 16345 if (scope && scope.currentCategory) { 16346 if (scope.currentCategory.MediaType) { 16347 scope.mediaType = scope.currentCategory.MediaType; 16348 } else { 16349 scope.mediaType = scope.currentCategory; 16350 } 16351 } 16352 16353 Object.defineProperty(scope, 'URLTitle', { 16354 get: function () { 16355 return (scope.data && scope.data.Title ? encodeURI(scope.data.Title.toLowerCase().replace(/[^\w\s]/gi, '').replace(/\s/g, '-')) : ''); 16356 } 16357 }); 16358 // setup award level output 16359 Object.defineProperty(scope, 'AwardList', { 16360 get: function () { 16361 return (scope.data.Awards && scope.data.Awards.length > 0 ? scope.data.Awards.join(', ') : ''); 16362 } 16363 }); 16364 16365 Object.defineProperty(scope, 'Image', { 16366 get: function () { 16367 if (!scope.data.ImageUrl && scope.data.SeasonId) { 16368 return (appSettings.CF ? appSettings.CF : appSettings.S3) + '1/' + scope.data.SeasonId + '/Entry_Uploads/' + scope.data.ItemId + '-thumb.jpg'; 16369 } 16370 return scope.data.ImageUrl || '/content/img/no-image-gallery.png'; 16371 } 16372 }); 16373 16374 Object.defineProperty(scope, 'URL', { 16375 get: function () { 16376 var namePieces = scope.data.Title.split(' '); 16377 var idPieces = scope.data.Id.slice(3).split('-'); 16378 return idPieces[0] + '-' + namePieces[0].split('-')[0].toLowerCase() + '-' + namePieces[namePieces.length - 1].split('-')[0].toLowerCase(); 16379 } 16380 }); 16381 16382 scope.validateURL = function (url) { 16383 if (!(/^https?:\/\//.test(url))) { 16384 if (url.length != 0) { 16385 url = "http://" + url; 16386 } 16387 } 16388 return url; 16389 }; 16390 16391 if (!scope.categoryUrl && scope.data && scope.data.Categories && scope.currentCategory && scope.mediaTypes) { 16392 var mediaType = _.find(scope.mediaTypes, function (mt) { 16393 return scope.data.MediaTypeId == mt.Id; 16394 }); 16395 if (mediaType) { 16396 if (!scope.mediaTypeUrl) { 16397 scope.mediaTypeUrl = mediaType.Url; 16398 } 16399 if (!scope.mediaType || Object.keys(scope.mediaType)) { 16400 scope.mediaType = mediaType; 16401 } 16402 for (var t = 0; t < mediaType.Children.length; t++) { 16403 var pieceCategory = _.find(mediaType.Children[t].Children, function (cat) { 16404 return cat.Id == scope.data.Categories[0].CategoryId; 16405 }); 16406 16407 if (pieceCategory) { 16408 scope.categoryUrl = pieceCategory.Url; 16409 scope.categoryTypeUrl = mediaType.Children[t].Url; 16410 break; 16411 } 16412 } 16413 } 16414 } 16415 } 16416 }; 16417}); 16418 16419galleryApp.directive('claimCardTypePiece', function () { 16420 return { 16421 restrict: 'E', 16422 scope: { 16423 data: '=cardData', 16424 currentCategory: '=', 16425 mediaTypeUrl: '@', 16426 categoryTypeUrl: '@', 16427 categoryUrl: '@', 16428 mediaTypes: '=', 16429 name: '@', 16430 }, 16431 templateUrl: '/Gallery/ClaimCardTypePiece', 16432 link: function (scope, element) { 16433 if (scope && scope.currentCategory) { 16434 if (scope.currentCategory.MediaType) { 16435 scope.mediaType = scope.currentCategory.MediaType; 16436 } else { 16437 scope.mediaType = scope.currentCategory; 16438 } 16439 } 16440 16441 Object.defineProperty(scope, 'URLTitle', { 16442 get: function () { 16443 return (scope.data && scope.data.Title ? encodeURI(scope.data.Title.toLowerCase().replace(/[^\w\s]/gi, '').replace(/\s/g, '-')) : ''); 16444 } 16445 }); 16446 // setup award level output 16447 Object.defineProperty(scope, 'AwardList', { 16448 get: function () { 16449 return (scope.data.Awards && scope.data.Awards.length > 0 ? scope.data.Awards.join(', ') : ''); 16450 } 16451 }); 16452 16453 Object.defineProperty(scope, 'Image', { 16454 get: function () { 16455 if (!scope.data.ImageUrl && scope.data.SeasonId) {
16456 return (appSettings.CF ? appSettings.CF : appSettings.S3) + '1/' + scope.data.SeasonId + '/Entry_Uploads/' + scope.data.ItemId + '-thumb.jpg'; 16457 } 16458 return scope.data.ImageUrl || '/content/img/no-image-gallery.png'; 16459 } 16460 }); 16461 16462 Object.defineProperty(scope, 'Profession', { 16463 get: function () { 16464 if (scope.data.Credits) { 16465 var credit = scope.data.Credits.find(function (c) { 16466 return (c.FirstName + " " + c.LastName).toLowerCase() === scope.name.toLowerCase(); 16467 }); 16468 16469 return credit ? credit.Title : null; 16470 } 16471 } 16472 }); 16473 16474 scope.validateURL = function (url) { 16475 if (!(/^https?:\/\//.test(url))) { 16476 if (url.length != 0) { 16477 url = "http://" + url; 16478 } 16479 } 16480 return url; 16481 }; 16482 16483 // Get claimColor for the border bar based on MediaTypeId 16484 Object.defineProperty(scope, 'claimColor', { 16485 get: function () { 16486 if (scope.data && scope.data.MediaTypeId) { 16487 // Try to get from parent scope's mediaTypeClaimColorMap 16488 var parentScope = scope.$parent; 16489 while (parentScope) { 16490 if (parentScope.mediaTypeClaimColorMap && parentScope.mediaTypeClaimColorMap[scope.data.MediaTypeId]) { 16491 return parentScope.mediaTypeClaimColorMap[scope.data.MediaTypeId]; 16492 } 16493 parentScope = parentScope.$parent; 16494 } 16495 } 16496 return null; 16497 } 16498 }); 16499 16500 if (!scope.categoryUrl && scope.data && scope.data.Categories && scope.currentCategory && scope.mediaTypes) { 16501 var mediaType = _.find(scope.mediaTypes, function (mt) { 16502 return scope.data.MediaTypeId == mt.Id; 16503 }); 16504 if (mediaType) { 16505 if (!scope.mediaTypeUrl) { 16506 scope.mediaTypeUrl = mediaType.Url; 16507 } 16508 if (!scope.mediaType || Object.keys(scope.mediaType)) { 16509 scope.mediaType = mediaType; 16510 } 16511 for (var t = 0; t < mediaType.Children.length; t++) { 16512 var pieceCategory = _.find(mediaType.Children[t].Children, function (cat) { 16513 return cat.Id == scope.data.Categories[0].CategoryId; 16514 }); 16515 16516 if (pieceCategory) { 16517 scope.categoryUrl = pieceCategory.Url; 16518 scope.categoryTypeUrl = mediaType.Children[t].Url; 16519 break; 16520 } 16521 } 16522 } 16523 } 16524 } 16525 }; 16526}); 16527 16528galleryApp.directive('claimUserCardTypePiece', function () { 16529 return { 16530 restrict: 'E', 16531 scope: { 16532 data: '=cardData', 16533 currentCategory: '=', 16534 mediaTypeUrl: '@', 16535 categoryTypeUrl: '@', 16536 categoryUrl: '@', 16537 mediaTypes: '=' 16538 }, 16539 templateUrl: '/Gallery/ClaimUserCardTypePiece', 16540 link: function (scope, element) { 16541 if (scope && scope.currentCategory) { 16542 if (scope.currentCategory.MediaType) { 16543 scope.mediaType = scope.currentCategory.MediaType; 16544 } else { 16545 scope.mediaType = scope.currentCategory; 16546 } 16547 } 16548 16549 Object.defineProperty(scope, 'URLTitle', { 16550 get: function () { 16551 return (scope.data && scope.data.Title ? encodeURI(scope.data.Title.toLowerCase().replace(/[^\w\s]/gi, '').replace(/\s/g, '-')) : ''); 16552 } 16553 }); 16554 // setup award level output 16555 Object.defineProperty(scope, 'AwardList', { 16556 get: function () { 16557 return (scope.data.Awards && scope.data.Awards.length > 0 ? scope.data.Awards.join(', ') : ''); 16558 } 16559 }); 16560 16561 Object.defineProperty(scope, 'Image', { 16562 get: function () { 16563 if (!scope.data.ImageUrl && scope.data.SeasonId) {
16564 return (appSettings.CF ? appSettings.CF : appSettings.S3) + '1/' + scope.data.SeasonId + '/Entry_Uploads/' + scope.data.ItemId + '-thumb.jpg'; 16565 } 16566 return scope.data.ImageUrl || '/content/img/no-image-gallery.png'; 16567 } 16568 }); 16569 16570 scope.validateURL = function (url) { 16571 if (!(/^https?:\/\//.test(url))) { 16572 if (url.length != 0) { 16573 url = "http://" + url; 16574 } 16575 } 16576 return url; 16577 }; 16578 16579 // Get claimColor for the border bar based on MediaTypeId 16580 Object.defineProperty(scope, 'claimColor', { 16581 get: function () { 16582 if (scope.data && scope.data.MediaTypeId) { 16583 // Try to get from parent scope's mediaTypeClaimColorMap 16584 var parentScope = scope.$parent; 16585 while (parentScope) { 16586 if (parentScope.mediaTypeClaimColorMap && parentScope.mediaTypeClaimColorMap[scope.data.MediaTypeId]) { 16587 return parentScope.mediaTypeClaimColorMap[scope.data.MediaTypeId]; 16588 } 16589 parentScope = parentScope.$parent; 16590 } 16591 } 16592 return null; 16593 } 16594 }); 16595 16596 if (!scope.categoryUrl && scope.data && scope.data.Categories && scope.currentCategory && scope.mediaTypes) { 16597 var mediaType = _.find(scope.mediaTypes, function (mt) { 16598 return scope.data.MediaTypeId == mt.Id; 16599 }); 16600 if (mediaType) { 16601 if (!scope.mediaTypeUrl) { 16602 scope.mediaTypeUrl = mediaType.Url; 16603 } 16604 if (!scope.mediaType || Object.keys(scope.mediaType)) { 16605 scope.mediaType = mediaType; 16606 } 16607 for (var t = 0; t < mediaType.Children.length; t++) { 16608 var pieceCategory = _.find(mediaType.Children[t].Children, function (cat) { 16609 return cat.Id == scope.data.Categories[0].CategoryId; 16610 }); 16611 16612 if (pieceCategory) { 16613 scope.categoryUrl = pieceCategory.Url; 16614 scope.categoryTypeUrl = mediaType.Children[t].Url; 16615 break; 16616 } 16617 } 16618 } 16619 } 16620 } 16621 }; 16622}); 16623 16624galleryApp.directive('mediatypeFeature', function () { 16625 return { 16626 restrict: 'E', 16627 templateUrl: '/Gallery/MediaTypeFeature', 16628 }; 16629}); 16630 16631galleryApp.directive('promo', function () { 16632 return { 16633 restrict: 'E', 16634 scope: { 16635 size: '@', 16636 promoClass: '@', 16637 imageUrl: '@', 16638 titleText: '@', 16639 titleTextNextLine: '@', 16640 subTitle: '@', 16641 subTitleBottom: '@', 16642 buttonText: '@', 16643 buttonUrl: '@', 16644 buttonUrlExternal: '@', 16645 brandSvg: '@', 16646 brandImage: '@', 16647 buttonClick: '&' 16648 }, 16649 templateUrl: '/Gallery/Promo' 16650 }; 16651}); 16652 16653galleryApp.directive('ngBindHtmlCompile', ['$compile', '$parse', function ($compile, $parse) { 16654 return { 16655 link: function (scope, element, attr) { 16656 var parsed = $parse(attr.ngBindHtmlCompile); 16657 function getStringValue() { return (parsed(scope) || '').toString(); } 16658 scope.$watch(getStringValue, function (val) { 16659 element.html(val); 16660 if (!!attr.compileTags) { 16661 $compile(element[0].querySelectorAll(attr.compileTags))(scope); 16662 } else { 16663 $compile(element, null, -9999)(scope); 16664 } 16665 }); 16666 } 16667 } 16668}]); 16669 16670galleryApp.directive('carousel', function ($timeout) { 16671 return { 16672 restrict: 'E', 16673 scope: { 16674 links: '=' 16675 }, 16676 templateUrl: 'carousel.html', 16677 link: function (scope, element) { 16678 $timeout(function () { 16679 $('.carousel-indicators li', element).first().addClass('active'); 16680 $('.carousel-inner .item', element).first().addClass('active'); 16681 }); 16682 16683 scope.isImgExt = function (filename) { 16684 return isImageExtension(filename); 16685 }; 16686 16687 scope.isVideoExt = function (filename) { 16688 return isVideoExtension(filename); 16689 }; 16690 16691 //TODO: Determine where to centralize this for the project 16692 function isVideoExtension(filename) { 16693 if (!filename) return false;
16694 16695 var fileExt = filename.split('.').pop(); 16696 fileExt = fileExt.toLowerCase(); 16697 16698 if (fileExt == 'mov' || fileExt == 'mpg' || fileExt == 'flv' || fileExt == 'mp4' || fileExt == 'wmv' || fileExt == 'webm' || fileExt == 'avi') { 16699 return true; 16700 } else { 16701 return false; 16702 } 16703 }; 16704 16705 //TODO: Determine where to centralize this for the project 16706 function isImageExtension(filename) { 16707 if (!filename) return false; 16708 16709 var fileParts = filename.split('.'); 16710 if (fileParts.length < 2) return false; 16711 16712 var fileExt = fileParts[fileParts.length - 1]; 16713 var pos = fileExt.indexOf('?'); 16714 if (pos < 0) { 16715 //good to go 16716 } 16717 else if (pos >= 0 && pos < 3) { 16718 //not a full extension 16719 return false; 16720 } 16721 else if (pos > 2) { 16722 fileExt = fileExt.substring(0, pos); 16723 } 16724 16725 fileExt = fileExt.toLowerCase(); 16726 if (fileExt == 'jpg' || fileExt == 'png' || fileExt == 'jpeg' || fileExt == 'gif' || fileExt == 'bmp') { 16727 return true; 16728 } else { 16729 return false; 16730 } 16731 } 16732 16733 } 16734 } 16735}); 16736 16737galleryApp.directive("compareTo", function () { 16738 return { 16739 require: "ngModel", 16740 scope: { 16741 otherModelValue: "=compareTo" 16742 }, 16743 link: function (scope, element, attributes, ngModel) { 16744 16745 ngModel.$validators.compareTo = function (modelValue) { 16746 //account for null or undefined 16747 if (!modelValue && !scope.otherModelValue) return true; 16748 return modelValue === scope.otherModelValue; 16749 }; 16750 16751 scope.$watch("otherModelValue", function () { 16752 ngModel.$validate(); 16753 }); 16754 } 16755 }; 16756}); 16757 16758 16759galleryApp.run(['$state', '$rootScope', 'sharedProperties', '$window', '$analytics', '$location', function ($state, $rootScope, sharedProperties, $window, $analytics, $location) { 16760 $rootScope.$state = $state; 16761 if (initialPropertyData) { 16762 sharedProperties.setProperty("propertyDetails", initialPropertyData); 16763 initialPropertyData = null; 16764 } 16765 16766 $rootScope.log = function (msg) { 16767 console.debug(msg); 16768 } 16769 16770 $rootScope.$on('$stateChangeStart', function (evt, to, params) { 16771 if (to.redirectTo) { 16772 evt.preventDefault(); 16773 $state.go(to.redirectTo, params, { location: 'replace' }) 16774 } else if (propertyID == 1) { 16775 // 16776 } 16777 }); 16778}]); 16779; 16780angular.module('rmModules').controller('baseSharedController', ['$scope', 'sharedProperties', '$state', 'userFactory', 'appType', '$rootScope', '$localStorage', 16781 function ($scope, sharedProperties, $state, userFactory, appType, $rootScope, $localStorage) { 16782 $scope.propertyDetails = null; 16783 $scope.getSpinnerClass = function (pid) { 16784 if ([1, 3, 5, 7, 8].indexOf(pid) > -1) { 16785 return 'loading-spinner-white' 16786 } else { 16787 return 'loading-spinner' 16788 } 16789 }; 16790 16791 $scope.resetStorage = function () { 16792 $localStorage.$reset(); 16793 }; 16794 16795 $scope.HasToken = function () { 16796 return sharedProperties.HasToken(); 16797 }; 16798 16799 $scope.HasGuestToken = function () { 16800 return sharedProperties.HasGuestToken(); 16801 }; 16802 16803 $scope.$on('propertyData', function (event, data) { 16804 checkForProperty(); 16805 }); 16806 $scope.copyrightYear = moment().year(); 16807 var checkForProperty = function () { 16808 $scope.propertyDetails = sharedProperties.getProperty("propertyDetails") || {}; 16809 if ($scope.propertyDetails && $scope.propertyDetails.UrlNonEntrySite && !$scope.propertyDetails.UrlNonEntrySiteNoProtocol) { 16810 $scope.propertyDetails.UrlNonEntrySiteNoProtocol = $scope.propertyDetails.UrlNonEntrySite.substr($scope.propertyDetails.UrlNonEntrySite.indexOf('://') + 3); 16811 if ($scope.propertyDetails.UrlNonEntrySiteNoProtocol.substr($scope.propertyDetails.UrlNonEntrySiteNoProtocol.length - 1) === '/') { 16812 $scope.propertyDetails.UrlNonEntrySiteNoProtocol = $scope.propertyDetails.UrlNonEntrySiteNoProtocol.substr(0, $scope.propertyDetails.UrlNonEntrySiteNoProtocol.length - 1); 16813 } 16814 } 16815 }; 16816 if (appType === 'frontend') { 16817 $scope.baseLogOut = function () { 16818 $rootScope.$broadcast('baseLogOut'); 16819 }; 16820 16821 $scope.baseLogin = function () { 16822 $rootScope.$broadcast('baseLogin'); 16823 }; 16824 16825 //TODO: Adjust for mode5 setting 16826 $scope.loginMode = [4, 5, 6, 8, 9, 14, 15, 17].indexOf(propertyID) > -1 ? 5 : 0; 16827 16828 $scope.loginThenDash = function () { 16829 $rootScope.$broadcast('loginThenDash'); 16830 }; 16831 16832 } else if (appType === 'judging') { 16833 $scope.entryPropertyTitle = null; 16834 $scope.entryPropertySeasonTitle = null; 16835 $scope.showNoLoadMessage = false;
16836 $scope.submittedEntryMessage = { 16837 Show: false 16838 }; 16839 $scope.errorMessage = []; 16840 16841 var getCompletionPercentage = function (completed, required) { 16842 var eCompleted = parseInt(completed | 0); 16843 var eRequired = parseInt(required | 0); 16844 var perc = ""; 16845 16846 if (isNaN(eCompleted) || isNaN(eRequired) || eRequired == 0) { 16847 perc = " "; 16848 } else { 16849 perc = ((eCompleted / eRequired) * 100).toFixed(0); 16850 } 16851 16852 return perc; 16853 } 16854 16855 $scope.handleJudgingSetup = function (data) { 16856 if (data) { 16857 if (data.Type == 'entryproperty') { $scope.entryPropertyTitle = data.Data; } 16858 else if (data.Type == 'entryseason') { $scope.entryPropertySeasonTitle = data.Data; } 16859 else if (data.Type == 'submitNoLoad') { $scope.showNoLoadMessage = true; } 16860 else if (data.Type == 'entrypropertycss') { $scope.entryPropertyCssClass = data.Data; } 16861 else if (data.Type == 'submitSuccess') { 16862 $scope.submittedEntryMessage.Show = true; 16863 $scope.submittedEntryMessage.ReviewsCompleted = data.ReviewsCompleted; 16864 $scope.submittedEntryMessage.ReviewsRequired = data.ReviewsRequired; 16865 $scope.submittedEntryMessage.Percentage = getCompletionPercentage(data.ReviewsCompleted, data.ReviewsRequired) 16866 } 16867 else if (data.Type == 'submitReset') { resetEntryMessages(); } 16868 else if (data.Type == 'headerError') { 16869 $scope.errorMessage = data.Errors; 16870 sharedProperties.ShowThenHideArea("#entryListErrors", true); 16871 } 16872 } 16873 else { 16874 resetJudging(); 16875 } 16876 }; 16877 16878 var resetEntryMessages = function () { 16879 $scope.showNoLoadMessage = false; 16880 $scope.submittedEntryMessage = { 16881 Show: false 16882 }; 16883 }; 16884 16885 var resetJudging = function () { 16886 $scope.entryPropertyTitle = null; 16887 $scope.entryPropertySeasonTitle = null; 16888 resetEntryMessages(); 16889 }; 16890 16891 var logOutJudging = function () { 16892 userFactory.logout() 16893 .success(function () { 16894 sharedProperties.RemoveToken(); 16895 $state.go('login'); 16896 }) 16897 .error(function (error) { 16898 alert(error); 16899 }); 16900 }; 16901 16902 $scope.logOutJudging = function () { 16903 logOutJudging(); 16904 }; 16905 16906 var verifyLoggedInUser_Judge = function (entryPropertyName, afterloggedinDelegate) { 16907 if (!$scope.HasToken()) { 16908 if ($state.current.name === 'login' || $state.current.name === 'login-redirect' || $state.current.name === 'forgotpassword' || $state.current.name === 'resetpassword') { 16909 return; 16910 } 16911 else if ($state.includes('entry.*')) { 16912 return redirectToLoginWithEntryOnLoginSuccess(entryPropertyName); 16913 } 16914 else { 16915 return $state.go('login'); 16916 } 16917 } 16918 16919 var tempPropertyID = entryPropertyName ? sharedProperties.getEntryIDByMapping(entryPropMap, entryPropertyName) : -1; 16920 16921 userFactory.isJudge(tempPropertyID) 16922 .success(function (data) { 16923 if (data && data.ValidAccount) { 16924 if (afterloggedinDelegate) { 16925 afterloggedinDelegate(data); 16926 } 16927 } else { 16928 if ($state.current.name.includes('entry.*')) { 16929 redirectToLoginWithEntryOnLoginSuccess(entryPropertyName); 16930 } 16931 else { 16932 sharedProperties.RemoveToken(); 16933 $state.go('login'); 16934 } 16935 } 16936 }) 16937 .error(function (error) { 16938 sharedProperties.RemoveToken(); 16939 $state.go('login'); 16940 }); 16941 }; 16942 16943 var redirectToLoginWithEntryOnLoginSuccess = function (entryPropertyName) { 16944 if (entryPropertyName) { 16945 $state.go('login', { rt: entryPropertyName }); 16946 } 16947 else { 16948 $state.go('login'); 16949 } 16950 }; 16951 16952 $scope.verifyLoggedInUser_Judge = function (entryPropertyName, afterloggedinDelegate) { 16953 verifyLoggedInUser_Judge(entryPropertyName, afterloggedinDelegate); 16954 }; 16955 16956 $scope.handleStateChangeBaseJudge = function (event, toState, toParams, fromState, fromParams, options) { 16957 $('html, body').scrollTop($("body").offset().top); 16958 16959 if (!toState.module || (toState.module !== 'entry' && toState.module !== 'executiveentry')) {
16960 resetJudging(); 16961 } 16962 else if (toState.name !== 'entry.Load') { 16963 resetEntryMessages(); 16964 } 16965 }; 16966 16967 $scope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams, options) { 16968 $scope.handleStateChangeBaseJudge(event, toState, toParams, fromState, fromParams, options); 16969 }); 16970 16971 $scope.logOutJudge = function () { 16972 userFactory.logout() 16973 .success(function () { 16974 sharedProperties.RemoveToken(); 16975 16976 //clear out submission 16977 $rootScope.$broadcast('logout'); 16978 $state.go('login'); 16979 }) 16980 .error(function (error) { 16981 $scope.status = error; 16982 }); 16983 }; 16984 } 16985 16986 checkForProperty(); 16987 16988 $scope.spellings = [ 16989 'organization', //0 16990 'check', //1 16991 'honor', //2 16992 'recognize', //3 16993 'humor', //4 16994 'categorize', //5 16995 'center', //6 16996 'prioritization', //7 16997 'normalize', //8 16998 'catalyze', //9 16999 'customize', //10 17000 'favorite', //11 17001 'program', //12 17002 'zip', //13 17003 'personalize', //14 17004 'personalization', //15 17005 'customizable', //16 17006 'familiarize', //17 17007 'finalize', //18 17008 ]; 17009 17010 var updateSpellings = function () { 17011 $scope.spellings = ['organisation', 'cheque', 'honour', 'recognise', 'humour', 'categorise', 'centre', 'prioritisation', 'normalise', 'catalyse', 'customise', 'favourite', 'programme', 'post', 'personalise', 'personalisation', 'customisable', 'familiarise', 'finalise', ]; 17012 }; 17013 17014 if ($scope.propertyDetails.PropertyID === 3) { // Loveys (3) 17015 updateSpellings(); 17016 } 17017 17018 $scope.capitalizeWord = function(string) { 17019 return string[0].toUpperCase() + string.slice(1); 17020 } 17021 } 17022]);; 17023angular.module('rmModules').controller('loadingController', [ 17024 '$scope', 17025 'sharedProperties', 17026 '$state', 17027 '$rootScope', 17028 '$http', 17029 'appType', 17030 function ($scope, sharedProperties, $state, $rootScope, $http, appType) { 17031 $scope.hasPendingRequests = function () { 17032 var validLoad = false; 17033 if ($http.pendingRequests.length > 0) { 17034 // Adjusted so pvsummarystatus is not counted towards pending for spinner purposes 17035 if 17036 ( 17037 ((appType == "admin" && $http.pendingRequests[0].url.indexOf("/PV/FinalizePVSummaryDataGetStatus") === -1) || 17038 ( 17039 appType != "admin" && 17040 ($http.pendingRequests[0].url != "http://wmg-url-checker.herokuapp.com/" && $http.pendingRequests[0].url.indexOf("urlChecker") === -1) 17041 )) && !IsSmoothingLazy() 17042 ) { 17043 validLoad = true; 17044 } 17045 } 17046 return validLoad; 17047 }; 17048 17049 function IsSmoothingLazy() { 17050 return (appType == "admin" && $http.pendingRequests[0].url.indexOf("/entry/GetRankingData") >= 0 && $http.pendingRequests[0].data && $http.pendingRequests[0].data.Data && $http.pendingRequests[0].data.Data.PageNumber && $http.pendingRequests[0].data.Data.PageNumber > 1); 17051 } 17052 17053 $scope.isSpinnerInvoked = function () { 17054 return invokeSpinner; 17055 }; 17056 }]);; 17057angular.module('rmModules').controller('claimsController', [ 17058 '$scope', 17059 'sharedProperties', 17060 '$location', 17061 '$document', 17062 '$state', 17063 '$uibModal', 17064 '$rootScope', 17065 'searchFactory', 17066 'userFactory', 17067 'mediaTypesFactory', 17068 '$q', 17069 '$timeout', 17070 function ($scope, sharedProperties, $location, $document, $state, $uibModal, $rootScope, searchFactory, userFactory, mediaTypesFactory, $q, $timeout) { 17071 $scope.showSuccess = false; 17072 $scope.showCodeMissing = false; 17073 $scope.resetInfo = {}; 17074 $scope.statusReset = null; 17075 17076 $scope.linkedinError = null; 17077 $scope.mediaTypeClaimColorMap = {}; 17078 $scope.checkingPublishedPage = false;
17079 17080 // Define profile getter to access user profile from sharedProperties 17081 Object.defineProperty($scope, 'profile', { 17082 get: function () { 17083 return JSON.parse(sharedProperties.GetProfile()) || {}; 17084 } 17085 }); 17086 17087 $scope.form = {}; 17088 17089 $scope.form.submitted = false; 17090 17091 $scope.form.model = { 17092 firstName: '', 17093 lastName: '', 17094 issue: '', 17095 email: '' 17096 }; 17097 17098 $scope.form.submit = function (form) { 17099 if (form.$invalid) return; 17100 var userId = $scope.profile.userId; 17101 17102 var data = { 17103 userID: userId, firstName: $scope.form.model.firstName, lastName: $scope.form.model.lastName, 17104 issue: $scope.form.model.issue, email: $scope.form.model.email 17105 }; 17106 17107 searchFactory.saveComplains(data) 17108 .then(function (response) { 17109 if (!response.data || !response.data.Success) { 17110 } 17111 }, function (response) { 17112 alert(response.data); 17113 }); 17114 17115 $scope.form.submitted = true; 17116 }; 17117 17118 var params = $location.search(); 17119 if (params.linkedin === "nameMismatch") { 17120 $scope.linkedinError = "Your LinkedIn name does not match your profile name. Please update your profile or use the correct LinkedIn account."; 17121 } 17122 17123 $scope.scrollNext = function (currentSectionId) { 17124 var current = $document[0].getElementById(currentSectionId); 17125 if (!current) return; 17126 17127 var sections = Array.prototype.slice.call( 17128 $document[0].querySelectorAll('[data-section]') 17129 ); 17130 17131 var idx = sections.indexOf(current); 17132 if (idx < 0) return; 17133 17134 var next = sections[idx + 1]; 17135 if (!next) return; 17136 17137 $scope.smoothScrollTo(next); 17138 }; 17139 17140 $scope.smoothScrollTo = function (element) { 17141 if (element && element.scrollIntoView) { 17142 try { 17143 element.scrollIntoView({ behavior: 'smooth', block: 'start' }); 17144 return; 17145 } catch (e) { } 17146 } 17147 17148 $timeout(function () { 17149 var top = element.getBoundingClientRect().top + ($window.pageYOffset || $document[0].documentElement.scrollTop || 0); 17150 $window.scrollTo(0, top); 17151 }, 0); 17152 }; 17153 17154 $scope.onClaimCredits = function () { 17155 $scope.checkingPublishedPage = true; 17156 if (!sharedProperties.HasToken()) { 17157 var modalInstance = $scope.claimLoginDialog(); 17158 if (modalInstance && modalInstance.opened) { 17159 modalInstance.opened.then(function () { 17160 $scope.checkingPublishedPage = false; 17161 }); 17162 } else { 17163 $scope.checkingPublishedPage = false; 17164 } 17165 } 17166 else { 17167 // Logged in - check LinkedIn status 17168 var hideSpinnerWhenModalOpens = function () { $scope.checkingPublishedPage = false; }; 17169 userFactory.getContact() 17170 .then(function (response) { 17171 var userData = response.data || response; 17172 var linkedInVerified = userData.LinkedInVerified || false; 17173 17174 if (linkedInVerified) { 17175 // Logged in AND confirmed LinkedIn - go to claims page (step 3) 17176 $scope.checkingPublishedPage = false; 17177 $state.go('claims'); 17178 } else { 17179 // Logged in AND not confirmed LinkedIn - check for claims, then show LinkedIn or no-claims modal 17180 openLinkedInModalIfHasClaims(undefined, undefined, hideSpinnerWhenModalOpens); 17181 } 17182 }, function (error) { 17183 // On error, still check for claims before showing LinkedIn modal 17184 openLinkedInModalIfHasClaims(undefined, undefined, hideSpinnerWhenModalOpens); 17185 }); 17186 } 17187 }; 17188 17189 $scope.activeSection = "s1"; 17190 17191 window.addEventListener("scroll", detectActiveSection); 17192 window.addEventListener("load", detectActiveSection); 17193 17194 function detectActiveSection() { 17195 var sections = $document[0].querySelectorAll("[data-section]"); 17196 var current = null; 17197 17198 for (var i = 0; i < sections.length; i++) { 17199 var rect = sections[i].getBoundingClientRect(); 17200 17201 if (rect.bottom <= 0) continue; 17202 17203 if (rect.top >= -200 && rect.top < window.innerHeight * 0.5) { 17204 current = sections[i]; 17205 break; 17206 } 17207 17208 if (!current && rect.bottom > 0) { 17209 current = sections[i]; 17210 } 17211 } 17212 17213 if (current) { 17214 $scope.$applyAsync(function () { 17215 $scope.activeSection = current.id; 17216 }); 17217 } 17218 } 17219 17220 $scope.logOut = function () { 17221 var currentState = $state.current ? $state.current.name : ''; 17222 var isOnClaimsPage = currentState === 'claims'; 17223 sharedProperties.RemoveToken(); 17224 if (isOnClaimsPage) { 17225 userFactory.logout() 17226 .then(function () { 17227 }) 17228 .catch(function (response) { 17229 if (response && response.data) { 17230 console.log('Logout error:', response.data); 17231 } 17232 }); 17233 window.location.replace('/claim-your-credits'); 17234 return; 17235 } 17236 userFactory.logout() 17237 .then(function () { 17238 if (currentState.includes('dashboard')) { 17239 $state.go('home').catch(function(err) { 17240 }); 17241 } 17242 }) 17243 .catch(function (response) { 17244 // Handle logout errors 17245 if (response && response.data) { 17246 alert(response.data); 17247 } 17248 }); 17249 }; 17250 17251 $scope.$on('logout', function() { 17252 var currentState = $state.current ? $state.current.name : ''; 17253 var isOnClaimsPage = currentState === 'claims'; 17254 if (isOnClaimsPage) { 17255 window.location.replace('/claim-your-credits'); 17256 } 17257 }); 17258 17259 $scope.claimFirstStepDialog = function (opts, successCallbackArgs, onModalOpened) { 17260 var activeEl = $document[0].activeElement; 17261 if (activeEl && activeEl !== $document[0].body) { 17262 activeEl.blur(); 17263 } 17264 var opts = opts || {}; 17265 var modalData = function () { 17266 return null; 17267 }; 17268 17269 //prevent close by clicking outside of modal 17270 opts.backdrop = 'static'; 17271 17272 var defaults = { 17273 templateUrl: "/Gallery/ClaimsFirstStepModal", 17274 controller: ClaimsFirstStepDialogCtrl, 17275 scope: $scope, 17276 windowClass: 'claims-first-step-modal', 17277 resolve: { 17278 data: modalData, 17279 options: opts, 17280 successCallbackArgs: successCallbackArgs 17281 } 17282 }; 17283 17284 var combined = _.merge({}, defaults, opts); 17285 17286 var modalInstance = $uibModal.open(combined); 17287 if (onModalOpened && modalInstance.opened) { 17288 modalInstance.opened.then(onModalOpened); 17289 } 17290 17291 modalInstance.result.catch(function () { /* user dismissed modal */ }); 17292 return modalInstance; 17293 }; 17294 17295 $scope.claimLoginDialog = function (opts, successCallbackArgs, changeState) { 17296 $scope.showCloseBtn = true; 17297 var opts = opts || {}; 17298 var modalData = function () { 17299 return null; 17300 }; 17301 17302 //prevent close by clicking outside of modal 17303 opts.backdrop = 'static'; 17304 17305 var defaults = { 17306 templateUrl: "/Gallery/ClaimsLoginModal", 17307 controller: ClaimsLoginDialogCtrl, 17308 scope: $scope, 17309 size: 'lg', 17310 windowClass: 'claim-login-modal', 17311 resolve: { 17312 data: modalData, 17313 options: opts, 17314 successCallbackArgs: successCallbackArgs 17315 } 17316 }; 17317 17318 var combined = _.merge({}, defaults, opts); 17319 17320 var modalInstance = $uibModal.open(combined); 17321 modalInstance.result.catch(function () { /* user dismissed modal */ }); 17322 if (changeState) { 17323 modalInstance.closed.then(function () { 17324 if (sharedProperties.HasToken()) { 17325 $state.go(changeState); 17326 } 17327 }); 17328 } 17329 return modalInstance; 17330 }; 17331 17332 $scope.registrationDialog = function (opts, successCallbackArgs) { 17333 $scope.showCloseBtn = true; 17334 var opts = opts || {}; 17335 opts.fromClaims = true; 17336 if (successCallbackArgs) { 17337 successCallbackArgs.fromClaims = true; 17338 } else { 17339 successCallbackArgs = { fromClaims: true }; 17340 } 17341 17342 var modalData = function () { 17343 return null; 17344 }; 17345 17346 opts.backdrop = 'static'; 17347 17348 var defaults = { 17349 templateUrl: "/Gallery/RegisterModal", 17350 controller: RegistrationDialogCtrl, 17351 scope: $scope, 17352 size: 'lg', 17353 windowClass: 'claim-register-modal register-modal', 17354 resolve: { 17355 data: modalData, 17356 options: opts, 17357 successCallbackArgs: successCallbackArgs 17358 } 17359 }; 17360 17361 var combined = _.merge({}, defaults, opts); 17362 17363 var modalInstance = $uibModal.open(combined); 17364 modalInstance.result.catch(function () { /* user dismissed modal */ }); 17365 }; 17366 17367 $scope.forgotDialog = function (opts, successCallbackArgs) { 17368 var opts = opts || {}; 17369 var modalData = function () { 17370 return null; 17371 }; 17372 17373 opts.backdrop = 'static'; 17374 17375 var defaults = { 17376 templateUrl: "/Gallery/ForgotModal", 17377 controller: ForgotDialogCtrl, 17378 scope: $scope, 17379 windowClass: 'forgot-modal', 17380 resolve: { 17381 data: modalData, 17382 options: opts, 17383 successCallbackArgs: successCallbackArgs 17384 } 17385 }; 17386 17387 var combined = _.merge({}, defaults, opts); 17388 var modalInstance = $uibModal.open(combined); 17389 modalInstance.result.catch(function () { /* user dismissed modal */ }); 17390 }; 17391 17392 $scope.claimNoClaimsDialog = function (onModalOpened) { 17393 var activeEl = $document[0].activeElement; 17394 if (activeEl && activeEl !== $document[0].body) { 17395 activeEl.blur(); 17396 } 17397 var defaults = { 17398 templateUrl: "/Gallery/ClaimsNoClaimsModal", 17399 controller: function ($scope, $uibModalInstance) { 17400 $scope.$dismiss = function () { $uibModalInstance.dismiss('cancel'); }; 17401 }, 17402 scope: $scope, 17403 windowClass: 'claims-no-claims-modal' 17404 }; 17405 $timeout(function () { 17406 var modalInstance = $uibModal.open(defaults); 17407 if (onModalOpened && modalInstance.opened) { 17408 modalInstance.opened.then(onModalOpened); 17409 } 17410 modalInstance.rendered.then(function () { 17411 $timeout(function () { 17412 var okBtn = document.getElementById('claims-no-claims-ok'); 17413 if (okBtn) { okBtn.focus(); } 17414 }, 50); 17415 }); 17416 modalInstance.result.catch(function () { /* user dismissed modal */ }); 17417 }, 0); 17418 }; 17419 17420 function openLinkedInModalIfHasClaims(opts, successCallbackArgs, onModalOpened) { 17421 var profile = $scope.profile; 17422 if (!profile || !profile.userId) { 17423 $scope.claimNoClaimsDialog(onModalOpened); 17424 return; 17425 } 17426 searchFactory.getUserHasCredits(profile.userId) 17427 .then(function (response) { 17428 if (response.data) { 17429 // Create/upsert the claim in the DB before opening the LinkedIn modal 17430 searchFactory.ensureClaimForUser(profile.userId) 17431 .then(function () { 17432 $scope.claimFirstStepDialog(opts || {}, successCallbackArgs, onModalOpened); 17433 }, function () { 17434 $scope.checkingPublishedPage = false;
17435 $scope.claimFirstStepDialog(opts || {}, successCallbackArgs, onModalOpened); 17436 }); 17437 } else { 17438 $scope.claimNoClaimsDialog(onModalOpened); 17439 } 17440 }, function () { 17441 $scope.claimNoClaimsDialog(onModalOpened); 17442 }); 17443 } 17444 17445 function loadClaimColorMapping() { 17446 return $q(function (resolve, reject) { 17447 // If already loaded and has data, resolve immediately 17448 if ($scope.mediaTypeClaimColorMap && Object.keys($scope.mediaTypeClaimColorMap).length > 0) { 17449 resolve($scope.mediaTypeClaimColorMap); 17450 return; 17451 } 17452 17453 mediaTypesFactory.getGalleryMediaTypesAndCategories() 17454 .then(function (response) { 17455 var claimColorMap = response.data ? (response.data.ClaimColorMap || response.data.claimColorMap) : null; 17456 if (response.data && claimColorMap) { 17457 $scope.mediaTypeClaimColorMap = claimColorMap; 17458 resolve(claimColorMap); 17459 } else { 17460 // Initialize empty map if not found 17461 $scope.mediaTypeClaimColorMap = $scope.mediaTypeClaimColorMap || {}; 17462 resolve($scope.mediaTypeClaimColorMap); 17463 } 17464 }, function (error) { 17465 // Initialize empty map on error 17466 $scope.mediaTypeClaimColorMap = $scope.mediaTypeClaimColorMap || {}; 17467 resolve($scope.mediaTypeClaimColorMap); 17468 }); 17469 }); 17470 } 17471 17472 var getClaimsForUser = function () { 17473 if (!sharedProperties.HasToken()) { 17474 return; 17475 } 17476 var profile = $scope.profile; 17477 if (!profile || !profile.userId) { 17478 return; 17479 } 17480 // Ensure ClaimColor mapping is loaded before processing results 17481 loadClaimColorMapping().then(function () { 17482 var params = $location.search(); 17483 var currentState = $state.current ? $state.current.name : ''; 17484 17485 if (params.linkedin === "success" || currentState === "claims") { 17486 $scope.pageNumber = 1; 17487 17488 searchFactory.getClaims(profile.userId) 17489 .then(function (response) { 17490 if (!response.data || !response.data.Success) { 17491 alert(response.data.Message); 17492 return; 17493 } 17494 formatSearchResultsForGrid(response.data.Data); 17495 }, function (response) { 17496 alert(response.data); 17497 }); 17498 } 17499 }); 17500 }; 17501 17502 function formatSearchResultsForGrid(data) { 17503 if ($scope.pageNumber == 1) { 17504 $scope.searchResultsData = { 17505 Grid: true, 17506 Data: data 17507 }; 17508 } 17509 var tempSearchResults = _.map(data, function (card) { 17510 card.isClaimed = card.isClaimed || false; 17511 return card; 17512 }); 17513 17514 if ($scope.pageNumber == 1) { 17515 $scope.searchResultsData.Data = tempSearchResults; 17516 } 17517 else { 17518 $scope.searchResultsData.Data = $scope.searchResultsData.Data.concat(tempSearchResults); 17519 } 17520 } 17521 17522 $scope.toggleClaim = function (card) { 17523 card.isClaimed = !card.isClaimed; 17524 }; 17525 17526 $scope.claimAll = function () { 17527 if (!$scope.searchResultsData || !$scope.searchResultsData.Data) return; 17528 17529 var cards = $scope.searchResultsData.Data; 17530 17531 var allClaimed = cards.every(function (card) { 17532 return card.isClaimed === true; 17533 }); 17534 17535 cards.forEach(function (card) { 17536 card.isClaimed = !allClaimed; 17537 }); 17538 }; 17539 17540 $scope.areAllClaimed = function () { 17541 if (!$scope.searchResultsData || !$scope.searchResultsData.Data) return; 17542 17543 var returnValue = true; 17544 var hitOneFalse = false;
17545 17546 $scope.searchResultsData.Data.forEach(function (card) { 17547 if (card.isClaimed == false) { 17548 hitOneFalse = true; 17549 } 17550 }); 17551 17552 if (hitOneFalse) 17553 return false; 17554 return returnValue; 17555 }; 17556 17557 $scope.fullName = function () { 17558 return $scope.profile.firstname + ' ' + $scope.profile.lastname 17559 } 17560 17561 $scope.getNbOfClaims = function () { 17562 if (!$scope.searchResultsData || !$scope.searchResultsData.Data) return; 17563 17564 var claimed = 0 17565 17566 $scope.searchResultsData.Data.forEach(function (card) { 17567 if (card.isClaimed == true) { 17568 claimed++; 17569 } 17570 }); 17571 17572 return claimed; 17573 }; 17574 17575 $scope.verifyAndPublish = function () { 17576 if (!$scope.searchResultsData || !$scope.searchResultsData.Data) return; 17577 17578 var claimedCards = $scope.searchResultsData.Data.filter(function (card) { 17579 return card.isClaimed; 17580 }); 17581 17582 var idsString = claimedCards.map(x => x.ItemId).join(','); 17583 var userId = $scope.profile.userId; 17584 17585 var data = { userID: userId, piecesIds: idsString }; 17586 17587 searchFactory.saveClaims(data) 17588 .then(function (response) { 17589 if (!response.data || !response.data.Success) { 17590 // alert(response.data.Message); 17591 // return; 17592 } 17593 17594 var userProfileId = userId.split('-')[0] + '-' + $scope.profile.firstname.split(' ')[0].split('-')[0].toLowerCase() + '-' + $scope.profile.lastname.split(' ')[0].split('-')[0].toLowerCase(); 17595 $state.go('winner.claim', { userId: userProfileId }); 17596 17597 }, function (response) { 17598 alert(response.data); 17599 }); 17600 17601 }; 17602 17603 $scope.confirmDialog = function (data, opts, successCallbackArgs, changeState) { 17604 $scope.showCloseBtn = true; 17605 var opts = opts || {}; 17606 17607 var modalData = function () { 17608 return { 17609 data: data, 17610 profile: $scope.profile 17611 } 17612 }; 17613 17614 //prevent close by clicking outside of modal 17615 opts.backdrop = 'static'; 17616 17617 var defaults = { 17618 templateUrl: "/Gallery/ClaimsConfirmStepModal", 17619 controller: ConfirmDialogCtrl, 17620 scope: $scope, 17621 windowClass: 'claims-first-step-modal', 17622 resolve: { 17623 data: modalData, 17624 options: opts, 17625 successCallbackArgs: successCallbackArgs 17626 } 17627 }; 17628 17629 var combined = _.merge({}, defaults, opts); 17630 17631 var modalInstance = $uibModal.open(combined); 17632 modalInstance.result.catch(function () { /* user dismissed modal */ }); 17633 }; 17634 17635 // Function to check if user has published page and redirect 17636 var checkAndRedirectIfPublished = function (showSpinner) { 17637 if (!sharedProperties.HasToken()) { 17638 $scope.checkingPublishedPage = false; 17639 return; 17640 } 17641 17642 // Check if we're on the claim-your-credits page (check both state and URL) 17643 var currentState = $state.current ? $state.current.name : ''; 17644 var currentPath = $location.path(); 17645 17646 var isOnClaimsPage = (currentState === 'claimsHomePage' || currentState === 'claims') || 17647 (currentPath === '/claim-your-credits' || currentPath.indexOf('/claim-your-credits') === 0); 17648 17649 if (!isOnClaimsPage) { 17650 $scope.checkingPublishedPage = false; 17651 return; 17652 } 17653 17654 if (showSpinner) { 17655 $scope.checkingPublishedPage = true; 17656 } 17657 17658 userFactory.getContact() 17659 .then(function (response) { 17660 // Handle both response.data (if wrapped) and direct response 17661 var userData = response.data || response; 17662 17663 if (userData && userData.Claimed === true) { 17664 // User has claimed their credits, redirect to their page 17665 var userId = userData.UserId; 17666 var firstName = userData.FirstName || ''; 17667 var lastName = userData.LastName || ''; 17668 17669 if (userId && firstName && lastName) { 17670 var userProfileId = userId.split('-')[0] + '-' + 17671 firstName.split(' ')[0].split('-')[0].toLowerCase() + '-' + 17672 lastName.split(' ')[0].split('-')[0].toLowerCase(); 17673 17674 $state.go('winner.claim', { userId: userProfileId }); 17675 } else { 17676 if (showSpinner) $scope.checkingPublishedPage = false;
17677 } 17678 } else { 17679 if (showSpinner) $scope.checkingPublishedPage = false; 17680 } 17681 }, function (error) { 17682 if (showSpinner) $scope.checkingPublishedPage = false; 17683 }); 17684 }; 17685 17686 // Check on page load with multiple attempts to ensure state is ready (no spinner on load) 17687 $timeout(function () { 17688 checkAndRedirectIfPublished(false); 17689 }, 100); 17690 17691 $timeout(function () { 17692 checkAndRedirectIfPublished(false); 17693 }, 500); 17694 17695 // Listen for user login/update - show spinner when checking after user action 17696 $scope.$on('updateUser', function (event, data) { 17697 $timeout(function () { 17698 checkAndRedirectIfPublished(true); 17699 }, 100); 17700 }); 17701 17702 $rootScope.$on('locationChangeSuccess', function () { 17703 getClaimsForUser(); 17704 }); 17705 17706 17707 var handleStateChanges = function (stateChangeType, event, toState, toParams, fromState, fromParams, options) { 17708 if (toState.name == "claims" && !sharedProperties.HasToken()) { 17709 $state.go('claimsHomePage'); 17710 return; 17711 } 17712 if (toState.name == "claims") { 17713 getClaimsForUser(); 17714 } 17715 if (toState.name == "claimsHomePage" || toState.name == "claims") { 17716 // Check if user has published page when landing on claim-your-credits page (no spinner on load) 17717 $timeout(function () { 17718 checkAndRedirectIfPublished(false); 17719 }, 100); 17720 } 17721 } 17722 17723 $scope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams, options) { 17724 handleStateChanges('$stateChangeSuccess', event, toState, toParams, fromState, fromParams, options); 17725 }); 17726 17727 $scope.$on('$locationChangeSuccess', function (event) { 17728 getClaimsForUser(); 17729 }); 17730 $rootScope.$on('openLinkedInModal', function (event, data) { 17731 if (data) { 17732 openLinkedInModalIfHasClaims(data.options || {}, data.successCallbackArgs); 17733 } 17734 }); 17735}]); 17736 17737var ConfirmDialogCtrl = ['$scope', '$rootScope', '$uibModalInstance', 'sharedProperties', '$state', 'userFactory', '$window', 'data', 'options', 'successCallbackArgs', '$analytics', 'searchFactory', function ($scope, $rootScope, $uibModalInstance, sharedProperties, $state, userFactory, $window, data, options, successCallbackArgs, $analytics, searchFactory) { 17738 17739 $scope.data = data.data; 17740 $scope.profile = data.profile; 17741 17742 $scope.sendToProfile = function () { 17743 17744 var idsString = $scope.data.map(x => x.ItemId).join(','); 17745 var userId = $scope.profile.userId; 17746 17747 var data = { userID: userId, piecesIds: idsString }; 17748 17749 searchFactory.saveClaims(data) 17750 .then(function (response) { 17751 if (!response.data || !response.data.Success) { 17752 // alert(response.data.Message); 17753 // return; 17754 } 17755 $uibModalInstance.dismiss('cancel'); 17756 17757 var userProfileId = userId.split('-')[0] + '-' + $scope.profile.firstname.split(' ')[0].split('-')[0].toLowerCase() + '-' + $scope.profile.lastname.split(' ')[0].split('-')[0].toLowerCase(); 17758 $state.go('winner.claim', { userId: userProfileId }); 17759 17760 }, function (response) { 17761 alert(response.data); 17762 }); 17763 17764 17765 }; 17766 17767 $scope.getImageUrl = function (card) { 17768 if (!card.ImageUrl && card.SeasonId) { 17769 return (appSettings.CF ? appSettings.CF : appSettings.S3) + '1/' + card.SeasonId + '/Entry_Uploads/' + card.ItemId + '-thumb.jpg'; 17770 } 17771 return card.ImageUrl || '/content/img/no-image-gallery.png'; 17772 } 17773 17774 $scope.getProfession = function (card) { 17775 if (card.Credits) { 17776 var profileEmail = ($scope.profile.email || $scope.profile.Email || '').trim().toLowerCase(); 17777 var credit = card.Credits.find(function (c) { 17778 var nameMatch = (c.FirstName + " " + c.LastName).toLowerCase() === ($scope.profile.firstname + " " + $scope.profile.lastname).toLowerCase(); 17779 var emailMatch = profileEmail && c.Email && (String(c.Email).trim().toLowerCase() === profileEmail); 17780 return nameMatch || emailMatch; 17781 }); 17782 17783 return credit ? credit.Title : null; 17784 } 17785 } 17786 17787 $scope.cancel = function () { 17788 $uibModalInstance.dismiss('cancel'); 17789 }; 17790}]; 17791 17792var ClaimsLoginDialogCtrl = ['$scope', '$rootScope', '$uibModal', '$uibModalInstance', 'sharedProperties', 'userFactory', '$window', 'options', 'successCallbackArgs', '$analytics', '$state', function ($scope, $rootScope, $uibModal, $uibModalInstance, sharedProperties, userFactory, $window, options, successCallbackArgs, $analytics, $state) { 17793 $scope.statusLogin; 17794 $scope.loginSubmitted = false;
17795 $scope.keepSpinning = false; 17796 17797 function getError(error) { 17798 if (error && error.data) return error.data; 17799 return { 'error_description': 'An unspecified error occurred.' }; 17800 } 17801 17802 $scope.login = function () { 17803 //reset error 17804 $scope.statusLogin = undefined; 17805 17806 var params = { 17807 Email: $scope.user.Email, 17808 Password: $scope.user.Password, 17809 PropertyID: sharedProperties.getProperty("propertyDetails").PropertyID, 17810 AppTypeID: 1 17811 }; 17812 17813 $scope.keepSpinning = true; 17814 userFactory.login(params.Email, params.Password, params.PropertyID, params.AppTypeID) 17815 .then(function (response) { 17816 sharedProperties.SetToken(response.data.access_token); 17817 $analytics.setAlias(params.Email); 17818 $analytics.setUsername(params.Email); 17819 $analytics.setUserProperties(response.data); 17820 userFactory.getContact() 17821 .then(function (response) { 17822 $scope.keepSpinning = false; 17823 sharedProperties.updateUser(response.data); 17824 17825 $uibModalInstance.dismiss('cancel'); 17826 var userData = response.data || response; 17827 17828 var linkedInVerified = userData.LinkedInVerified || userData.linkedInVerified || false; 17829 var claimed = userData.Claimed === true || userData.claimed === true; 17830 17831 // Already claimed with profile -> go to their claim page 17832 if (userData && claimed) { 17833 var userId = userData.UserId; 17834 var firstName = userData.FirstName || ''; 17835 var lastName = userData.LastName || ''; 17836 if (userId && firstName && lastName) { 17837 var userProfileId = userId.split('-')[0] + '-' + 17838 firstName.split(' ')[0].split('-')[0].toLowerCase() + '-' + 17839 lastName.split(' ')[0].split('-')[0].toLowerCase(); 17840 $state.go('winner.claim', { userId: userProfileId }); 17841 return; 17842 } 17843 } 17844 17845 // Already LinkedIn verified -> go to claims listing 17846 if (linkedInVerified) { 17847 $state.go('claims'); 17848 return; 17849 } 17850 17851 // Not verified -> show LinkedIn modal (CanClaim can be false for new users with no Claims row yet). 17852 // Use $evalAsync on rootScope so this runs next digest and isn't cancelled when login modal scope is destroyed. 17853 var payload = { options: options || {}, successCallbackArgs: successCallbackArgs }; 17854 $rootScope.$evalAsync(function () { 17855 $rootScope.$broadcast('openLinkedInModal', payload); 17856 }); 17857 if (successCallbackArgs) { 17858 $rootScope.$broadcast(successCallbackArgs.Broadcast, successCallbackArgs); 17859 } 17860 }, function (response) { 17861 $scope.keepSpinning = false; 17862 $scope.statusLogin = getError(response.data); 17863 }); 17864 }, function (response) { 17865 $scope.keepSpinning = false; 17866 $scope.statusLogin = response.data; 17867 }); 17868 }; 17869 17870 $scope.register = function () { 17871 $uibModalInstance.dismiss('cancel'); 17872 var regOpts = _.merge({}, options || {}, { windowClass: 'claim-register-modal register-modal', fromClaims: true }); 17873 var sca = successCallbackArgs ? _.merge({}, successCallbackArgs, { fromClaims: true }) : { fromClaims: true }; 17874 $scope.registrationDialog(regOpts, sca); 17875 }; 17876 17877 $scope.forgot = function () { 17878 $uibModalInstance.dismiss('cancel'); 17879 var forgotOpts = _.merge({}, options || {}, { windowClass: 'claim-forgot-modal forgot-modal' }); 17880 $scope.forgotDialog(forgotOpts, successCallbackArgs); 17881 }; 17882 17883 $scope.cancel = function () { 17884 $uibModalInstance.dismiss('cancel'); 17885 }; 17886}]; 17887 17888var ClaimsFirstStepDialogCtrl = ['$scope', '$rootScope', '$http', '$uibModalInstance', 'sharedProperties', 'userFactory', 'options', 'successCallbackArgs', function ($scope, $rootScope, $http, $uibModalInstance, sharedProperties, userFactory, options, successCallbackArgs) { 17889 $scope.statusForgot; 17890 $scope.showSuccess = false;
17891 17892 function getError(error) { 17893 if (error && error.data) return { 'error_description': error.data }; 17894 if (error && error.Message) return { 'error_description': error.Message }; 17895 return { 'error_description': 'An unspecified error occurred.' }; 17896 } 17897 17898 $scope.cancel = function () { 17899 $uibModalInstance.dismiss('cancel'); 17900 }; 17901 17902 $scope.startLinkedIn = function () { 17903 var returnUrl = window.location.origin + "/claims"; 17904 17905 var config = sharedProperties.AuthenticationHeader(); 17906 17907 config.params = { returnUrl: returnUrl }; 17908 17909 $http.get(appSettings.WebApiUrl + "/Account/LinkedInStartUrl", config) 17910 .then(function (response) { 17911 var linkedInUrl = response.data.url || response.data; 17912 window.location.href = linkedInUrl; 17913 }, function (error) { 17914 console.error("Failed to start LinkedIn auth", error); 17915 }); 17916 }; 17917}];; 17918galleryApp.controller('galleryController', ['$scope', '$sce', '$rootScope', 'userFactory', 'sharedProperties', '$state', '$stateParams', '$uibModal', '$uibModalStack', '$interval', '$filter', '$window', 'propertyFactory', 'mediaTypesFactory', 'entriesFactory', 'seasonFactory', 'searchFactory', 'specialAchievementFactory', '$analytics', '$timeout', '$location', '$q', '$sessionStorage', '$localStorage', 'pageMetaFactory', 'pageMetaHelper', 'analyticsService', 'cmsFactory', 17919 function ($scope, $sce, $rootScope, userFactory, sharedProperties, $state, $stateParams, $uibModal, $uibModalStack, $interval, $filter, $window, propertyFactory, mediaTypesFactory, entriesFactory, seasonFactory, searchFactory, specialAchievementFactory, $analytics, $timeout, $location, $q, $sessionStorage, $localStorage, pageMetaFactory, pageMetaHelper, analyticsService, cmsFactory) { 17920 $scope.currentUser = {}; 17921 $scope.currentFromUrl = {}; 17922 $scope.mediaTypes = null; 17923 $scope.searchFilterType = 'checkbox'; 17924 $scope.searchResultsData = {}; 17925 $scope.searchIsStateZero = false; 17926 $scope.currentDetailData = {}; 17927 $scope.currentCategory = {}; 17928 $scope.currentMenuMediaType = -1; 17929 $scope.currentCategoryYearGroupings = []; 17930 $scope.categoriesInfo = []; 17931 $scope.videoTheme = "content/css/vendor/videogular.css"; 17932 $scope.pageNumber = 1; 17933 $scope.stopLazyLoad = false; 17934 $scope.searchTerm = ""; 17935 $scope.pageMetaInfo = pageMetaFactory; 17936 $scope.mediaTypeClaimColorMap = {}; 17937 17938 Object.defineProperty($scope, 'loggedIn', { 17939 get: function () { 17940 return sharedProperties.HasToken(); 17941 } 17942 }); 17943 17944 Object.defineProperty($scope, 'mediatypeFeatureData', { 17945 get: function () { 17946 if ($scope.currentCategory.CssClass === "pseudo-websites") { 17947 return { "GalleryUrl": "https://winners.webbyawards.com/2025/websites-and-mobile-sites/general-desktop-mobile-sites/entertainment/339814/lady-gaga--a-digital-home-for-a-global-pop-icon", "Id": "p_339814", "Type": "piece", "MediaTypeId": 7, "ItemId": 339814, "Year": 2025, "SeasonId": 157, "SpecialAchievement": false, "Title": "Lady Gaga â A Digital Home for a Global Pop Icon", "ImageUrl": "https://assets.recogmedia.net/1/157/Entry_Uploads/339814-thumb.jpg", "MediaType": "Websites and Mobile Sites", "Organization": "Morningview, Commerce-UI & Yung Studio", "OrganizationUrl": "https://commerce-ui.com/", "Categories": [{ "CategoryTypeId": 42, "CategoryType": "General Desktop & Mobile Sites", "CategoryId": 610, "Category": "Entertainment", "IsWinner": true, "IsNominee": false, "IsHonoree": false, "IsPVWinner": false }, { "CategoryTypeId": 42, "CategoryType": "General Desktop & Mobile Sites", "CategoryId": 634, "Category": "Music", "IsWinner": false, "IsNominee": true, "IsHonoree": false, "IsPVWinner": false }], "Credits": null, "Partner": null, "Awards": ["Webby Winner", "Nominee"], "CategoryIds": null, "DateCreated": "2025-01-01T00:00:00", "ItemUrl": null, "ItemSubhead": null, "WinnerRank": 1, "DisplayOrder": null }; 17948 } 17949 if ($scope.currentCategory.CssClass === "pseudo-video") { 17950 return { "GalleryUrl": "https://winners.webbyawards.com/2025/video-film/branded-entertainment/long-form/323469/shot-on-iphone--midnight", "Id": "p_323469", "Type": "piece", "MediaTypeId": 6, "ItemId": 323469, "Year": 2025, "SeasonId": 157, "SpecialAchievement": false, "Title": "Shot on iPhone - Midnight", "ImageUrl": "https://assets.recogmedia.net/1/157/Entry_Uploads/323469-thumb.jpg", "MediaType": "Video & Film", "Organization": "TBWA\\ Media Arts Lab", "OrganizationUrl": "http://www.mediaartslab.com/", "Categories": [{ "CategoryTypeId": 36, "CategoryType": "Branded Entertainment", "CategoryId": 743, "Category": "Long Form", "IsWinner": true, "IsNominee": false, "IsHonoree": false, "IsPVWinner": false }], "Credits": null, "Partner": null, "Awards": ["Webby Winner"], "CategoryIds": null, "DateCreated": "2025-01-01T00:00:00", "ItemUrl": null, "ItemSubhead": null, "WinnerRank": 1, "DisplayOrder": null }; 17951 } 17952 if ($scope.currentCategory.CssClass === "pseudo-ads") { 17953 return { "GalleryUrl": "https://winners.webbyawards.com/2025/advertising-media-pr/branded-content/health-wellness-
17953pharmaceutical/340426/michael-cerave-thumb.jpg", "Id": "p_340426", "Type": "piece", "MediaTypeId": 1, "ItemId": 340426, "Year": 2025, "SeasonId": 157, "SpecialAchievement": false, "Title": "Michael CeraVe", "ImageUrl": "https://assets.recogmedia.net/1/157/Entry_Uploads/340426-thumb.jpg", "MediaType": "Advertising, Media & PR", "Organization": "Ogilvy New York", "OrganizationUrl": "https://www.ogilvy.com/", "Categories": [{ "CategoryTypeId": 9, "CategoryType": "Branded Content", "CategoryId": 61, "Category": "Health, Wellness & Pharmaceutical", "IsWinner": true, "IsNominee": false, "IsHonoree": false, "IsPVWinner": false }], "Credits": null, "Partner": null, "Awards": ["Webby Winner"], "CategoryIds": null, "DateCreated": "2025-01-01T00:00:00", "ItemUrl": null, "ItemSubhead": null, "WinnerRank": 1, "DisplayOrder": null }; 17954 } 17955 if ($scope.currentCategory.CssClass === "pseudo-apps") { 17956 return { "GalleryUrl": "https://winners.webbyawards.com/2025/apps-software/app-features/best-visual-design-aesthetic/332962/strava--year-in-sport", "Id": "p_332962", "Type": "piece", "MediaTypeId": 2, "ItemId": 332962, "Year": 2025, "SeasonId": 157, "SpecialAchievement": false, "Title": "Strava - Year in Sport", "ImageUrl": "https://assets.recogmedia.net/1/157/Entry_Uploads/332962-thumb.jpg", "MediaType": "Apps & Software", "Organization": "HELLO MONDAY/DEPT®", "OrganizationUrl": "https://www.deptagency.com/", "Categories": [{ "CategoryTypeId": 16, "CategoryType": "App Features", "CategoryId": 159, "Category": "Best Visual Design - Aesthetic", "IsWinner": true, "IsNominee": false, "IsHonoree": false, "IsPVWinner": false }], "Credits": null, "Partner": null, "Awards": ["Webby Winner"], "CategoryIds": null, "DateCreated": "2025-01-01T00:00:00", "ItemUrl": null, "ItemSubhead": null, "WinnerRank": 1, "DisplayOrder": null }; 17957 } 17958 if ($scope.currentCategory.CssClass === "pseudo-social") { 17959 return { "GalleryUrl": "https://winners.webbyawards.com/2025/social/social-video-short-form/music-performance/332321/benson-boone-socials", "Id": "p_332321", "Type": "piece", "MediaTypeId": 5, "ItemId": 332321, "Year": 2025, "SeasonId": 157, "SpecialAchievement": false, "Title": "Benson Boone Socials", "ImageUrl": "https://assets.recogmedia.net/1/157/Entry_Uploads/332321-thumb.jpg", "MediaType": "Social", "Organization": "Warner Records", "OrganizationUrl": "http://Warnerrecords.com", "Categories": [{ "CategoryTypeId": 35, "CategoryType": "Social Video Short Form", "CategoryId": 704, "Category": "Music & Performance", "IsWinner": true, "IsNominee": false, "IsHonoree": false, "IsPVWinner": false }], "Credits": null, "Partner": null, "Awards": ["Webby Winner"], "CategoryIds": null, "DateCreated": "2025-01-01T00:00:00", "ItemUrl": null, "ItemSubhead": null, "WinnerRank": 1, "DisplayOrder": null }; 17960 } 17961 if ($scope.currentCategory.CssClass === "pseudo-podcast") { 17962 return { "GalleryUrl": "https://winners.webbyawards.com/2025/podcasts/limited-series-specials/documentary-limited-series-specials/340314/hysterical", "Id": "p_340314", "Type": "piece", "MediaTypeId": 4, "ItemId": 340314, "Year": 2025, "SeasonId": 157, "SpecialAchievement": false, "Title": "Hysterical", "ImageUrl": "https://assets.recogmedia.net/1/157/Entry_Uploads/340314-thumb.jpg", "MediaType": "Podcasts", "Organization": "Wondery, Pineapple Street Studios", "OrganizationUrl": "", "Categories": [{ "CategoryTypeId": 31, "CategoryType": "Limited-Series & Specials", "CategoryId": 354, "Category": "Documentary (Limited-Series & Specials)", "IsWinner": true, "IsNominee": false, "IsHonoree": false, "IsPVWinner": false }, { "CategoryTypeId": 29, "CategoryType": "Features", "CategoryId": 331, "Category": "Best Writing", "IsWinner": true, "IsNominee": false, "IsHonoree": false, "IsPVWinner": false }], "Credits": null, "Partner": null, "Awards": ["Webby Winner"], "CategoryIds": null, "DateCreated": "2025-01-01T00:00:00", "ItemUrl": null, "ItemSubhead": null, "WinnerRank": 1, "DisplayOrder": null }; 17963 } 17964 if ($scope.currentCategory.CssClass === "pseudo-games") { 17965 return { "GalleryUrl": "https://winners.webbyawards.com/2025/creators/individual-creator/news-politics/334187/garrison-hayes-black-power-and-politics", "Id": "p_334187", "Type": "piece", "MediaTypeId": 3, "ItemId": 334187, "Year": 2025, "SeasonId": 157, "SpecialAchievement": false, "Title": "Garrison Hayes: Black Power and Politics", "ImageUrl": "https://assets.recogmedia.net/1/157/Entry_Uploads/334187-thumb.jpg", "MediaType": "Creators", "Organization": "Mother Jones", "OrganizationUrl": "http://motherjones.com", "Categories": [{ "CategoryTypeId": 27, "CategoryType": "Individual Creator", "CategoryId": 1171, "Category": "News & Politics", "IsWinner": true, "IsNominee": false, "IsHonoree": false, "IsPVWinner": false }], "Credits": null, "Partner": null, "Awards": ["Webby Winner"], "CategoryIds": null, "DateCreated": "2025-01-01T00:00:00", "ItemUrl": null, "ItemSubhead": null, "WinnerRank": 1, "DisplayOrder": null }; 17966 } 17967 if ($scope.currentCategory.CssClass === "pseudo-virtual") { 17968 return { "GalleryUrl": "https://winners.webbyawards.com/2025/ai-immersive-games/games-general/independent-creator/335988/balatro", "Id": "p_335988", "Type": "piece", "MediaTypeId": 674, "ItemId": 335988, "Year": 2025, "SeasonId": 157, "SpecialAchievement": false, "Title": "Balatro", "ImageUrl": "https://assets.recogmedia.net/1/157/Entry_Uploads/335988-thumb.jpg", "MediaType": "AI, Immersive & Games", "Organization": "Playstack", "OrganizationUrl": "https://playstack.com/", "Categories": [{ "CategoryTypeId": 678, "CategoryType": "Games General", "CategoryId": 1141, "Category": "Independent Creator", "IsWinner": true, "IsNominee": false, "IsHonoree": false, "IsPVWinner": false }, { "CategoryTypeId": 678, "CategoryType": "Games General", "CategoryId": 1145, "Category": "Strategy & Simulation", "IsWinner": true, "IsNominee": false, "IsHonoree": false, "IsPVWinner": false }, { "CategoryTypeId": 678, "CategoryType": "Games General", "CategoryId": 1144, "Category": "Puzzle, Trivia, Card & Word Games", "IsWinner": true, "IsNominee": false, "IsHonoree": false, "IsPVWinner": false }], "Credits": null, "Partner": null, "Awards": ["Webby Winner"], "CategoryIds": null, "DateCreated": "2025-01-01T00:00:00", "ItemUrl": null, "ItemSubhead": null, "WinnerRank": 1, "DisplayOrder": null }; 17969 } 17970 if ($scope.currentCategory.CssClass === "pseudo-special") { 17971 return { "GalleryUrl": "https://winners.webbyawards.com/2026/specialachievement/471/druski", "Id": "sa_471", "Type": "special", "MediaTypeId": -1, "ItemId": 471, "Year": 2026, "SeasonId": null, "SpecialAchievement": true, "Title": "Druski", "ImageUrl": "https://recognitionmedia-production.s3.amazonaws.com/1/SpecialAchievement/5498d7d3-a8d5-4f30-a61a-d2b432a43f7b.png", "MediaType": "Special Achievement", "Organization": null, "OrganizationUrl": null, "Categories": [{ "CategoryTypeId": 0, "CategoryType": null, "CategoryId": 4, "Category": "Webby Best Actor", "IsWinner": false, "IsNominee": false, "IsHonoree": false, "IsPVWinner": false }], "Credits": null, "Partner": null, "Awards": null, "CategoryIds": null, "DateCreated": "2026-01-01T00:00:00", "ItemUrl": null, "ItemSubhead": null, "WinnerRank": null, "DisplayOrder": 3 }; 17972 } 17973 } 17974 }); 17975 17976 //Object.defineProperty($scope, 'searchFilterType', { 17977 // get: function () { 17978 // return $scope.loggedIn ? 'checkbox' : 'radio'; 17979 // } 17980 //}); 17981 17982 17983 $scope.searchSelected = { 17984 years: [], 17985 categories: [], 17986 awards: [], 17987 mediaTypes: [], 17988 sort: [] 17989 }; 17990 17991 $scope.getCardLayoutClass = function (index, total) {
17992 if (total === 1) return 'uk-width-1-1 is-solo'; 17993 17994 if (total === 2) return 'uk-width-1-1'; 17995 17996 if (total === 3) return (index === 0) ? 'uk-width-1-1' : 'uk-width-1-2@s'; 17997 17998 return ''; 17999 }; 18000 18001 $scope.totalFilters = $scope.searchSelected.years.length + $scope.searchSelected.awards.length + $scope.searchSelected.categories.length; 18002 18003 $scope.searchFilterData = { 18004 yearList: [], 18005 categoryList: [], 18006 awardLevelList: ['Webby Winner', "People's Voice Winner", 'Nominee', 'Honoree'], 18007 sortList: [ 18008 { name: "Most relevant", key: null }, 18009 { name: "Oldest", key: "Year Asc" }, 18010 { name: "Newest", key: "Year Desc" }, 18011 { name: "Title", key: "Title" }, 18012 { name: "Entrant", key: "Organization" }, 18013 { name: "Individual", key: "User" }, 18014 ] 18015 }; 18016 18017 var awardsConstant = { 18018 IsWinner: { 18019 Name: 'Webby Winner', 18020 Priority: 1 18021 }, 18022 IsPVWinner: { 18023 Name: "People's Voice Winner", 18024 Priority: 2 18025 }, 18026 IsNominee: { 18027 Name: 'Nominee', 18028 Priority: 3 18029 }, 18030 IsHonoree: { 18031 Name: 'Honoree', 18032 Priority: 4 18033 }, 18034 getPriority: function (data) { 18035 if (!data) { return 100; } 18036 if (data.IsWinner) { return this.IsWinner.Priority; } 18037 if (data.IsPVWinner) { return this.IsPVWinner.Priority; } 18038 if (data.IsNominee) { return this.IsNominee.Priority; } 18039 if (data.IsHonoree) { return this.IsHonoree.Priority; } 18040 return 100; 18041 }, 18042 determineWhichAwardsToShow: function (awardList) { 18043 if (!awardList || awardList.length == 0) { 18044 return { 18045 IsWinner: true, 18046 IsPVWinner: true, 18047 IsNominee: true, 18048 IsHonoree: true, 18049 IsForBothTypeWinner: true 18050 }; 18051 } 18052 18053 var whichAwardsToShow = { 18054 IsWinner: false, 18055 IsPVWinner: false, 18056 IsNominee: false, 18057 IsHonoree: false 18058 }; 18059 18060 for (var a = 0; a < awardList.length; a++) { 18061 if (awardList[a] == this.IsPVWinner.Name) { 18062 whichAwardsToShow['IsPVWinner'] = true; 18063 } 18064 else if (awardList[a] == this.IsWinner.Name) { 18065 whichAwardsToShow['IsWinner'] = true; 18066 } 18067 else { 18068 whichAwardsToShow['Is' + awardList[a]] = true; 18069 } 18070 } 18071 18072 whichAwardsToShow.IsForBothTypeWinner = whichAwardsToShow.IsWinner && whichAwardsToShow.IsPVWinner; 18073 return whichAwardsToShow; 18074 }, 18075 setupPieceAwardListForNonGrid: function (data) { 18076 var list = []; 18077 if (data.IsWinner) list.push(this.IsWinner.Name); 18078 if (data.IsPVWinner) list.push(this.IsPVWinner.Name); 18079 if (data.IsNominee) list.push(this.IsNominee.Name); 18080 if (data.IsHonoree) list.push(this.IsHonoree.Name); 18081 18082 return list; 18083 } 18084 } 18085 18086 function scrollToTop() { 18087 $('html, body').scrollTop($("body").offset().top); 18088 } 18089 18090 Object.defineProperty($scope, 'profile', { 18091 get: function () { 18092 return JSON.parse(sharedProperties.GetProfile()) || {}; 18093 } 18094 }); 18095 18096 $scope.$on('updateUser', function (event, data) { 18097 $scope.LoggedInEmail = data.data.Email; 18098 var userDetails = { "userId": data.data.UserId,"email": data.data.Email, "firstname": data.data.FirstName, "lastname": data.data.LastName, "organization": data.data.Organization, "title": data.data.Title, "organizationUrl": data.data.OrganizationUrl }; 18099 sharedProperties.SetProfile(JSON.stringify(userDetails)); 18100 updateProfile(); 18101 if ($state.current.name === 'winner.claim' && $scope.claimerProfile && data.data) { 18102 $scope.isOwnClaimPage = (data.data.UserId === $scope.claimerProfile.UserId); 18103 } 18104 }); 18105 18106 function updateProfile() { 18107 $scope.updateProfile = angular.copy($scope.profile); 18108 } 18109 $scope.scrollToListing = function (cssClass) { 18110 setTimeout(function () { 18111 var y; 18112 18113 y = $("." + cssClass).offset().top; 18114 18115 $('html, body').animate({ 18116 scrollTop: y 18117 }, 500); 18118 }, 150); 18119 } 18120 18121 $scope.getMediaTypeForMenu = function (name, placement) { 18122 var placement = placement || false; 18123 $scope.currentMenuMediaType = _.findIndex($scope.mediaTypes, { Name: name }); 18124 if (placement == 'sidebar') { 18125 $('#catContent').addClass('uk-open uk-animation-fade uk-animation-fast'); 18126 $('body').addClass('remove-scroll'); 18127 $('.mediatype-nav').removeClass(function (index, className) { 18128 return (className.match(/(^|\s)pseudo-\S+/g) || []).join(' '); 18129 }); 18130 $('.mediatype-nav').addClass($scope.mediaTypes[$scope.currentMenuMediaType].CssClass); 18131 } 18132 }; 18133 18134 $scope.resetMenu = function () { 18135 $scope.currentMenuMediaType = -1 18136 }; 18137 18138 function resetSelectedFilters() { 18139 if (!($scope.pastState && $scope.pastState.fromState && ($scope.pastState.fromState.name == 'piecedetails' 18140 || $scope.pastState.fromState.name == 'sadetails'))) { 18141 $scope.searchSelected = { 18142 years: [], 18143 categories: [], 18144 awards: [], 18145 mediaTypes: [], 18146 sort: [] 18147 }; 18148 } 18149 } 18150 18151 $scope.resetFilters = function () { 18152 resetSelectedFilters(); 18153 } 18154 18155 18156 function getSeasonYears() { 18157 return seasonFactory.getGalleryYears() 18158 .then(function (response) { 18159 if (response.data && response.data.Success) { 18160 $scope.searchFilterData.yearList = response.data.Data; 18161 if ((!($scope.pastState && $scope.pastState.fromState && ($scope.pastState.fromState.name == 'piecedetails' 18162 || $scope.pastState.fromState.name == 'sadetails')) && !($state.current && $state.current.name === 'globalsearch')) || ((!$scope.searchSelected.years || $scope.searchSelected.years.length <= 0) && !($state.current && $state.current.name === 'globalsearch'))) { 18163 if ($stateParams.selectYear) { 18164 $scope.searchSelected.years = [$stateParams.selectYear.toString()]; 18165 } else { 18166 $scope.searchSelected.years = [$scope.searchFilterData.yearList[0]]; 18167 } 18168 } 18169 } 18170 else { 18171 // TODO: Error 18172 } 18173 }, function (response) { 18174 // TODO: Error 18175 }); 18176 } 18177 18178 function setupFilterData() { 18179 return $q(function (resolve, reject) { 18180 // reset selected 18181 resetSelectedFilters(); 18182 18183 // Ensure ClaimColor mapping is loaded 18184 loadClaimColorMapping().then(function () { 18185 // Get Years - setup selected item 18186 getSeasonYears().then(function () { 18187 var stateParams = angular.copy($stateParams); 18188 setFilterParams(stateParams); 18189 getCategoryGalleryYearsGrouping().then(function () { 18190 resolve(); 18191 if (!($scope.pastState && $scope.pastState.fromState && ($scope.pastState.fromState.name == 'piecedetails' 18192 || $scope.pastState.fromState.name == 'sadetails'))) { 18193 // TODO: Setup Category List to show 18194 updateCategoryFilterActiveStatus(); 18195 } 18196 }); 18197 }); 18198 }); 18199 }); 18200 } 18201 18202 function setFilterParams(stateParams) { 18203 //need to reduce and reuse 18204 if (stateParams.years) { 18205 var yearsIndex = stateParams.years.split(','); 18206 if (yearsIndex && yearsIndex.length > 0) { 18207 $scope.searchSelected.years = []; 18208 for (var i = 0; i < yearsIndex.length; i++) { 18209 var selectedItem = $scope.searchFilterData.yearList[parseInt(yearsIndex[i])]; 18210 if (selectedItem && $scope.searchSelected.years.indexOf(selectedItem) < 0) { 18211 $scope.searchSelected.years.push(selectedItem); 18212 } 18213 } 18214 } 18215 } 18216 if (stateParams.awards) { 18217 var awardsIndex = stateParams.awards.split(','); 18218 if (awardsIndex && awardsIndex.length > 0) { 18219 $scope.searchSelected.awards = []; 18220 for (var t = 0; t < awardsIndex.length; t++) { 18221 var selectedAwardItem = $scope.searchFilterData.awardLevelList[parseInt(awardsIndex[t])]; 18222 if (selectedAwardItem && $scope.searchSelected.awards.indexOf(selectedAwardItem) < 0) { 18223 $scope.searchSelected.awards.push(selectedAwardItem); 18224 } 18225 } 18226 } 18227 } 18228 if (stateParams.sort) { 18229 var sortIndex = stateParams.sort.split(','); 18230 if (sortIndex && sortIndex.length > 0) { 18231 $scope.searchSelected.sort = []; 18232 for (var k = 0; k < sortIndex.length; k++) { 18233 var selectedSortItem = $scope.searchFilterData.sortList[parseInt(sortIndex[k])]; 18234 if (selectedSortItem && $scope.searchSelected.sort.indexOf(selectedSortItem) < 0) { 18235 $scope.searchSelected.sort.push(selectedSortItem); 18236 } 18237 } 18238 } 18239 } 18240 if (stateParams.categories) { 18241 var catsIndex = stateParams.categories.split(','); 18242 if (catsIndex && catsIndex.length > 0) { 18243 $scope.searchSelected.categories = []; 18244 for (var m = 0; m < catsIndex.length; m++) { 18245 var categoriesList = []; 18246 $scope.searchFilterData.categoryList.map(function (item) { c
18246ategoriesList = categoriesList.concat(item.Children); }); 18247 var selectedCatItem = _.filter(categoriesList, function (item) { 18248 return item.Id == catsIndex[m]; 18249 }); 18250 if (selectedCatItem && selectedCatItem[0] && $scope.searchSelected.categories.indexOf(selectedCatItem[0]) < 0) { 18251 $scope.searchSelected.categories.push(selectedCatItem[0]); 18252 } 18253 } 18254 } 18255 } 18256 if (stateParams.mediaTypes) { 18257 var medIndex = stateParams.mediaTypes.split(','); 18258 if (medIndex && medIndex.length > 0) { 18259 $scope.searchSelected.mediaTypes = []; 18260 for (var l = 0; l < medIndex.length; l++) { 18261 var selectedMedItem = _.filter($scope.mediaTypes, function (item) { 18262 return item.Id == medIndex[l]; 18263 }); 18264 if (selectedMedItem && selectedMedItem[0] && $scope.searchSelected.categories.indexOf(selectedMedItem[0]) < 0) { 18265 $scope.searchSelected.mediaTypes.push(selectedMedItem[0]); 18266 } 18267 } 18268 } 18269 } 18270 if (stateParams.searchTerm) { 18271 $scope.searchTerm = stateParams.searchTerm; 18272 } 18273 } 18274 18275 function initializeCategoryLanding() { 18276 var stateParams = angular.copy($stateParams); 18277 setupFilterData().then(function () { 18278 setupCurrentCategoryFromUrl().then(function () { 18279 setFilterParams(stateParams); 18280 if ($state && $state.current && $state.current.name === "globalsearch") { 18281 searchUniversal(); 18282 } 18283 else { 18284 searchPieces(); 18285 } 18286 }); 18287 }); 18288 18289 if (!$scope.currentCategory.Id) { 18290 // TODO: Handle if nothing found / assigned 18291 } 18292 } 18293 18294 function getSelectedYear() { 18295 if ($scope.searchSelected.years && $scope.searchSelected.years.length > 0) { 18296 return $scope.searchSelected.years[0].toString(); 18297 } 18298 if ($scope.searchFilterData.yearList && $scope.searchFilterData.yearList.length > 0) { 18299 return $scope.searchFilterData.yearList[0].toString(); 18300 } 18301 if ($scope.currentFromUrl && $scope.currentFromUrl.year) { 18302 return $scope.currentFromUrl.year.toString(); 18303 } 18304 return new Date().getFullYear().toString(); 18305 } 18306 18307 function applySearchListingMeta(markReady) { 18308 var stateName = $state.current && $state.current.name; 18309 var year = getSelectedYear(); 18310 var title; 18311 var description; 18312 18313 if (stateName === 'search.category' && $scope.currentCategory && $scope.currentCategory.CategoryType) { 18314 title = pageMetaHelper.formatCategoryListingTitle( 18315 $scope.currentCategory.CategoryType.Name, 18316 $scope.currentCategory.Name, 18317 year 18318 ); 18319 description = pageMetaHelper.formatCategoryListingDescription( 18320 $scope.currentCategory.CategoryType.Name, 18321 $scope.currentCategory.Name, 18322 year, 18323 $scope.currentCategory.Description 18324 ); 18325 } else if (stateName === 'search.mediatype' && $scope.currentCategory && $scope.currentCategory.Name) { 18326 title = pageMetaHelper.formatMediaTypeListingTitle($scope.currentCategory.Name, year); 18327 description = pageMetaHelper.formatMediaTypeListingDescription( 18328 $scope.currentCategory.Name, 18329 year, 18330 $scope.currentCategory.Description 18331 ); 18332 } else { 18333 return; 18334 } 18335 18336 $scope.pageMetaInfo.applyMeta({ 18337 title: title, 18338 description: description, 18339 markReady: markReady 18340 }); 18341 } 18342 18343 function applyDetailPageMeta() { 18344 var detail = $scope.currentDetailData; 18345 if (!detail || !detail.Title) { 18346 return; 18347 } 18348 18349 var year = ($scope.currentFromUrl && $scope.currentFromUrl.year) 18350 || detail.Year 18351 || getSelectedYear(); 18352 var image = $scope.GetPieceImage(detail); 18353 if (!image || image.indexOf('undefined') >= 0) { 18354 image = null; 18355 } 18356 18357 var title; 18358 var description; 18359 18360 if (detail.Type === 'spa') { 18361 title = pageMetaHelper.formatSpecialAchievementDetailTitle( 18362 detail.Title, 18363 detail.AchievementType ? detail.AchievementType.Name : 'Special Achievement', 18364 year 18365 ); 18366 description = pageMetaHelper.formatSpecialAchievementDetailDescription(detail, year); 18367 } else { 18368 var entry = pageMetaHelper.getPrimaryEntry(detail); 18369 var awardLabel = ($scope.getWinnerCountLabels() || 'Webby Winner').trim(); 18370 title = pageMetaHelper.formatPieceDetailTitle(detail.Title, year, awardLabel); 18371 description = pageMetaHelper.formatPieceDetailDescription({ 18372 title: detail.Title, 18373 organization: detail.Organization, 18374 categoryType: entry ? entry.CategoryType : null, 18375 category: entry ? entry.Category : null, 18376 awardLabel: awardLabel, 18377 year: year 18378 }); 18379 } 18380 18381 var metaOptions = { 18382 title: title, 18383 description: description, 18384 markReady: true 18385 }; 18386 if (image) { 18387 metaOptions.image = image; 18388 } 18389 $scope.pageMetaInfo.applyMeta(metaOptions); 18390 } 18391 18392 function applyLandingMeta(markReady) { 18393 seasonFactory.getGalleryYears() 18394 .then(function (response) { 18395 var year = getSelectedYear(); 18396 if (response.data && response.data.Success && response.data.Data && response.data.Data.length > 0) { 18397 year = response.data.Data[0].toString(); 18398 } 18399 18400 $scope.pageMetaInfo.applyMeta({ 18401 title: pageMetaHelper.formatLandingTitle(year), 18402 description: pageMetaHelper.formatLandingDescription(year), 18403 markReady: markReady 18404 }); 18405 }, function () { 18406 var year = getSelectedYear(); 18407 $scope.pageMetaInfo.applyMeta({ 18408 title: pageMetaHelper.formatLandingTitle(year), 18409 description: pageMetaHelper.formatLandingDescription(year), 18410 markReady: markReady 18411 }); 18412 }); 18413 } 18414 18415 function retrieveCategoryDetail(categoryId) { 18416 mediaTypesFactory.getGalleryCategory(categoryId) 18417 .then(function (response) { 18418 if (response.data && response.data.Success) { 18419 if (response.data.Data) { 18420 $scope.currentCategory.Description = response.data.Data.Description; 18421 } 18422 } 18423 18424 applySearchListingMeta(true); 18425 18426 if ($scope.currentCategory.MediaType) { 18427 addBreadcrumbStructuredData([{ 18428 Name: $scope.currentCategory.MediaType.Name, 18429 UrlPath: "/winners/" + $scope.currentFromUrl.mediaTypeName 18430 }, { 18431 Name: $scope.currentCategory.Name, 18432 UrlPath: "/winners/" + $scope.currentFromUrl.mediaTypeName + "/" + $scope.currentFromUrl.categoryTypeName + "/" + $scope.currentFromUrl.categoryName 18433 } 18434 ]); 18435 } else { 18436 addBreadcrumbStructuredData([{ 18437 Name: $scope.currentCategory.Name, 18438 UrlPath: "/winners/" + $scope.currentFromUrl.mediaTypeName 18439 } 18440 ]); 18441 } 18442 }, function (response) { 18443 applySearchListingMeta(true); 18444 }); 18445 } 18446 18447 function addBreadcrumbStructuredData(items) { 18448 var structuredDataScript = document.createElement('script'); 18449 structuredDataScript.setAttribute('type', 'application/ld+json'); 18450 structuredDataScript.textContent = JSON.stringify({ 18451 "@context": "https://schema.org", 18452 "@type": "BreadcrumbList", 18453 "itemListElement": items.map((item, index) => { 18454 return { 18455 "@type": "ListItem", 18456 "position": index + 1, 18457 "name": item.Name, 18458 "item": window.location.protocol + "//" + window.location.host + item.UrlPath 18459 } 18460 }) 18461 }, null, 4); 18462 18463 document.body.appendChild(structuredDataScript); 18464 } 18465 18466 function setupCurrentCategoryFromUrl() { 18467 return $q(function (resolve, reject) { 18468 $scope.currentCategory = {}; 18469 if (!$scope.currentFromUrl.mediaTypeName) { 18470 resolve(); 18471 return; 18472 } 18473 var mediaType = _.find($scope.mediaTypes, { Url: $scope.currentFromUrl.mediaTypeName }); 18474 if ($scope.currentFromUrl.categoryName) { 18475 var catType = _.find(mediaType.Children, { Url: $scope.currentFromUrl.categoryTypeName }); 18476 if (catType) { 18477 var cat = _.find(catType.Children, { Url: $scope.currentFromUrl.categoryName, CatType: catType.Name }); 18478 if (cat) { 18479 $scope.currentCategory = { 18480 Id: cat.Id, 18481 Name: cat.Name, 18482 CssClass: mediaType.CssClass, 18483 CategoryType: { Name: catType.Name, Url: catType.Url } 18484 }; 18485 } 18486 else { 18487 cat = _.find(catType.Children, { Url: $scope.currentFromUrl.categoryName }); 18488 if (cat) { 18489 $scope.currentCategory = { 18490 Id: cat.Id, 18491 Name: cat.Name, 18492 CssClass: mediaType.CssClass, 18493 CategoryType: { Name: catType.Name, Url: catType.Url } 18494 }; 18495 } 18496 } 18497 } 18498 18499 if ($scope.currentCategory && $scope.currentCategory.Id) { 18500 $scope.currentCategory.MediaType = { Id: mediaType.Id, Name: mediaType.Name, CssClass: mediaType.CssClass, Url: mediaType.Url }; 18501 } 18502 resolve(); 18503 } else if (mediaType) { 18504 $scope.currentCategory = { Id: mediaType.Id, Name: mediaType.Name, CssClass: mediaType.CssClass }; 18505 resolve(); 18506 } 18507 18508 if ($scope.currentCategory && $scope.currentCategory.Id) { 18509 retrieveCategoryDetail($scope.currentCategory.Id); 18510 } else { 18511 // TODO: Handle incorrect category or media type - show toast? 18512 18513 // redirect 18514 if (mediaType) { 18515 $state.go('search.mediatype', { mediaTypeName: mediaType.Url }); 18516 } else { 18517 $state.go('home'); 18518 } 18519 } 18520 }); 18521 } 18522 18523 function loadClaimColorMapping() { 18524 return $q(function (resolve, reject) { 18525 // If already loaded and has data, resolve immediately 18526 if ($scope.mediaTypeClaimColorMap && Object.keys($scope.mediaTypeClaimColorMap).length > 0) { 18527 resolve($scope.mediaTypeClaimColorMap); 18528 return; 18529 } 18530 18531 mediaTypesFactory.getGalleryMediaTypesAndCategories() 18532 .then(function (response) { 18533 var claimColorMap = response.data ? (response.data.ClaimColorMap || response.data.claimColorMap) : null; 18534 if (response.data && claimColorMap) { 18535 $scope.mediaTypeClaimColorMap = claimColorMap; 18536 resolve(claimColorMap); 18537 } else { 18538 // Initialize empty map if not found 18539 $scope.mediaTypeClaimColorMap = $scope.mediaTypeClaimColorMap || {}; 18540 resolve($scope.mediaTypeClaimColorMap); 18541 } 18542 }, function (error) { 18543 // Initialize empty map on error 18544 $scope.mediaTypeClaimColorMap = $scope.mediaTypeClaimColorMap || {}; 18545 resolve($scope.mediaTypeClaimColorMap); 18546 }); 18547 }); 18548 } 18549 18550 function retrieveMediaAndCategories() { 18551 mediaTypesFactory.getGalleryMediaTypesAndCategories() 18552 .then(function (response) { 18553 if (response.data && response.data.Success) { 18554 $scope.mediaTypes = response.data.Data; 18555 if (response.data.ClaimColorMap) { 18556 $scope.mediaTypeClaimColorMap = response.data.ClaimColorMap; 18557 } 18558 18559 initializeCategoryLanding(); 18560 } 18561 else { 18562 // TODO: Error 18563 } 18564 }, function (response) { 18565 // TODO: Error 18566 }); 18567 } 18568 18569 function loadPieceData(itemId) {
18570 entriesFactory.getGalleryPiece(itemId) 18571 .then(function (response) { 18572 if (response.data && response.data.Success) { 18573 var winnersSorted = _.concat(_.filter(response.data.Data.entries, 'Winner'), 18574 _.filter(response.data.Data.entries, 'PublicVotingWinner'), 18575 _.filter(response.data.Data.entries, 'Nominee'), 18576 _.filter(response.data.Data.entries, 'Honoree')); 18577 response.data.Data.entries = _.uniq(winnersSorted); 18578 $scope.currentDetailData = response.data.Data; 18579 updateVideoFileRef($scope.currentDetailData); 18580 if ($scope.currentDetailData) { 18581 getCategoriesInfo($scope.currentDetailData.CategoryIDs); 18582 if ($scope.currentDetailData.Url) { 18583 $scope.currentDetailData.Url = $scope.currentDetailData.Url.split("|")[0]; 18584 } 18585 loadSpeechVideo(); 18586 } 18587 applyDetailPageMeta(); 18588 analyticsService.trackContent({ 18589 'analyticActionID': analyticsService.enums.actions.view, 18590 'analyticContentID': analyticsService.enums.content.galleryPiece, 18591 'contentDataID': itemId 18592 }); 18593 18594 mediaTypesFactory.getGalleryMediaTypesAndCategories() 18595 .then(function (response) { 18596 if (response.data && response.data.Success) { 18597 if (response.data.ClaimColorMap) { 18598 $scope.mediaTypeClaimColorMap = response.data.ClaimColorMap; 18599 } 18600 18601 var mediaType = _.find(response.data.Data, { Url: $scope.currentFromUrl.mediaTypeName }); 18602 var catType = _.find(mediaType.Children, { Url: $scope.currentFromUrl.categoryTypeName }); 18603 var cat = _.find(catType.Children, { Url: $scope.currentFromUrl.categoryName, CatType: catType.Name }); 18604 18605 addBreadcrumbStructuredData([{ 18606 Name: mediaType.Name, 18607 UrlPath: "/winners/" + mediaType.Url 18608 }, { 18609 Name: cat.Name, 18610 UrlPath: "/winners/" + mediaType.Url + "/" + catType.Url + "/" + cat.Url 18611 }, { 18612 Name: $scope.currentDetailData.Title, 18613 UrlPath: $location.path() 18614 } 18615 ]); 18616 18617 } 18618 }); 18619 } else { 18620 // TODO: Error 18621 $state.go('404'); 18622 } 18623 }); 18624 } 18625 18626 function loadAchievementData(itemId) { 18627 specialAchievementFactory.getGallerySpecialAchievement(itemId) 18628 .then(function (response) { 18629 if (response.data && response.data.Success) { 18630 $scope.currentDetailData = response.data.Data; 18631 loadSpeechVideo(); 18632 $scope.categoriesInfo = []; 18633 applyDetailPageMeta(); 18634 analyticsService.trackContent({ 18635 'analyticActionID': analyticsService.enums.actions.view, 18636 'analyticContentID': analyticsService.enums.content.galleryAch, 18637 'contentDataID': itemId 18638 }); 18639 } 18640 else { 18641 // TODO: Error 18642 } 18643 }, function (response) { 18644 // TODO: Error 18645 }); 18646 } 18647 18648 function loadSpeechVideo() { 18649 $scope.speechVideoFile = null; 18650 if ($scope.currentDetailData.SpeechUrl) { 18651 if ($scope.currentDetailData.SpeechUrl.endsWith(".mp4")) 18652 $scope.speechVideoFile = [{ src: $scope.currentDetailData.SpeechUrl, type: 'video/mp4' }]; 18653 } 18654 } 18655 18656 function SetSearchParams(whichList) { 18657 if ($scope.searchSelected[whichList] && $scope.searchSelected[whichList].length > 0) { 18658 var paramValue = ''; 18659 var listName = ''; 18660 if (whichList == 'years') { 18661 listName = 'yearList'; 18662 } 18663 else if (whichList == 'awards') { 18664 listName = 'awardLevelList'; 18665 } 18666 else if (whichList == 'categories') { 18667 listName = 'categoryList'; 18668 } 18669 else if (whichList == 'sort') { 18670 listName = 'sortList';
18671 } 18672 18673 for (var i = 0; i < $scope.searchSelected[whichList].length; i++){ 18674 paramValue = paramValue + (whichList == 'categories' || whichList == 'mediaTypes' ? $scope.searchSelected[whichList][i].Id : $scope.searchFilterData[listName].indexOf($scope.searchSelected[whichList][i])) + ','; 18675 } 18676 $stateParams[whichList] = paramValue.trim().replace(/,\s*$/, ""); 18677 } 18678 else if(whichList == "searchTerm"){ 18679 $stateParams[whichList] = $scope[whichList]; 18680 } 18681 else { 18682 $stateParams[whichList] = null; 18683 } 18684 if ($state.current && $state.current.name) { 18685 $state.transitionTo($state.current.name, $stateParams, { location: true, notify: false }); 18686 } 18687 } 18688 18689 // Toggle selection for a given fruit by name 18690 $scope.toggleSearchSelected = function toggleSelection(whichList, item, isUniversal, singleSelection) { 18691 var idx = $scope.searchSelected[whichList].indexOf(item); 18692 if ($scope.loggedIn) { 18693 // Is currently selected 18694 if (idx > -1) { 18695 $scope.searchSelected[whichList].splice(idx, 1); 18696 } 18697 18698 // Is newly selected 18699 else { 18700 if (singleSelection) { 18701 $scope.searchSelected[whichList] = []; 18702 $scope.searchSelected[whichList].push(item); 18703 } 18704 else { 18705 $scope.searchSelected[whichList].push(item); 18706 } 18707 } 18708 } else { 18709 if (idx > -1) { 18710 $scope.searchSelected[whichList].splice(idx, 1); 18711 } 18712 else { 18713 //activateAccountPromotion(whichList, item); 18714 $scope.searchSelected[whichList] = [item]; 18715 } 18716 } 18717 if ($scope.searchSelected.mediaTypes && $scope.searchSelected.mediaTypes.length > 1) { 18718 $scope.searchSelected.categories = []; 18719 } 18720 if (whichList == "years" || whichList == "mediaTypes") { 18721 getCategoryGalleryYearsGrouping().then(function () { 18722 updateCategoryActiveStatus(); 18723 updateCategoryFilterActiveStatus(); 18724 }); 18725 } 18726 if ((!$scope.searchSelected.years || $scope.searchSelected.years.length <= 1) && !isUniversal && $scope.currentCategory.Id != -1) { 18727 $scope.searchSelected.sort = []; 18728 } 18729 $scope.pageNumber = 1; 18730 $scope.stopLazyLoad = false; 18731 _.debounce($scope['searchMenu'], 500)(isUniversal); 18732 }; 18733 18734 $scope.isToggleRestricted = function (whichList) { 18735 return (!$scope.loggedIn && $scope.searchSelected[whichList] && $scope.searchSelected[whichList].length > 0); 18736 }; 18737 18738 function activateAccountPromotion(whichList, item) { 18739 if (whichList !== "sort" && item && $scope.searchSelected[whichList] && $scope.searchSelected[whichList].length > 0 && !$scope.loggedIn && !$sessionStorage.loginModalSeen) { 18740 $scope.registrationDialog(); 18741 $sessionStorage.loginModalSeen = true; 18742 } 18743 } 18744 18745 $scope.beginSearch = function (isUniversal) { 18746 beginSearch(isUniversal, 1000); 18747 }; 18748 18749 function beginSearch(isUniversal, debounce) { 18750 $scope.pageNumber = 1; 18751 $scope.stopLazyLoad = false; 18752 $scope.searchTerm = $("#searchInput").val(); 18753 $scope.searchMenu(isUniversal); 18754 } 18755 18756 function formatSearchResultsForMediaTypeLanding(data, selectedAwards) { 18757 // get list of categories - currently using the list of them from the drop-down 18758 var tempSearchResults = ($scope.pageNumber == 1 ? [] : $scope.searchResultsData.Data); 18759 18760 var whichAwardsToShow = awardsConstant.determineWhichAwardsToShow(selectedAwards); 18761 18762 // TODO: Setup Category items - possibly refactor this 18763 var mediaType = _.find($scope.mediaTypes, { Url: $scope.currentFromUrl.mediaTypeName }); 18764 if ($scope.pageNumber == 1) { 18765 $scope.searchResultsData = { 18766 Grid: false, 18767 MTUrl: mediaType.Url, 18768 Data: [], 18769 Year: $scope.searchSelected.years[0], 18770 AwardLevels: whichAwardsToShow, 18771 AwardPriority: awardsConstant.getPriority(whichAwardsToShow) 18772 }; 18773 18774 if (mediaType && mediaType.Children && mediaType.Children.length > 0) { 18775 var allCatIds = []; 18776 _.forEach(mediaType.Children, function (item, index) { 18777 _.forEach(item.Children, function (child, index) { 18778 var addIt = true; 18779 if ($scope.searchSelected.categories && $scope.searchSelected.categories.length > 0) { 18780 var foundIt = _.find($scope.searchSelected.categories, function (filterItem) { 18781 return filterItem.Id && filterItem.Id == child.Id; 18782 }); 18783 if (!foundIt) { addIt = false; } 18784 } 18785 if (addIt) { 18786 tempSearchResults.push({ Name: child.Name, Id: child.Id, CTUrl: item.Url, CUrl: child.Url }); 18787 allCatIds.push(child.Id); 18788 } 18789 }); 18790 }); 18791 if (allCatIds && allCatIds.length > 0) { 18792 mediaTypesFactory.getGalleryCategories({ 'categoryGalleryIDs': allCatIds }) 18793 .then(function (response) { 18794 if (response.data && response.data.Success) { 18795 var catsInfo = response.data.Data; 18796 for (var g = 0; g < tempSearchResults.length; g++) { 18797 var catInfo = _.find(catsInfo, function (item) { 18798 return item.CategoryGalleryGroupID == tempSearchResults[g].Id; 18799 }); 18800 if (catInfo) 18801 tempSearchResults[g].Description = catInfo.Description; 18802 } 18803 } 18804 else { 18805 // TODO: Error 18806 } 18807 }, function (response) { 18808 // TODO: Error 18809 }); 18810 } 18811 } 18812 18813 18814 // sort the categories 18815 tempSearchResults = _.orderBy(tempSearchResults, ['Name', 'Id'], ['asc', 'asc']); 18816 } 18817 18818 for (var p = data.length - 1; p >= 0; p--) { 18819 for (var c = 0; c < data[p].Categories.length; c++) { 18820 var catId = _.findIndex(tempSearchResults, function (item) { return item.Id == data[p].Categories[c].CategoryId; }); 18821 if (catId < 0) { continue; }
18822 else if (!tempSearchResults[catId].Pieces) { 18823 tempSearchResults[catId].Pieces = []; 18824 // setup getter properties to return pieces for display 18825 Object.defineProperty(tempSearchResults[catId], 'Winners', { 18826 get: function () { 18827 return _.orderBy(_.filter(this.Pieces, function (item) { return item.IsWinner || item.IsPVWinner; }), ['IsWinner', 'Title'], ['desc', 'asc']); 18828 } 18829 }); 18830 Object.defineProperty(tempSearchResults[catId], 'WinnersOnly', { 18831 get: function () { 18832 return _.orderBy(_.filter(this.Pieces, function (item) { return item.IsWinner; }), ['Title'], ['asc']); 18833 } 18834 }); 18835 Object.defineProperty(tempSearchResults[catId], 'PVWinnersOnly', { 18836 get: function () { 18837 return _.orderBy(_.filter(this.Pieces, function (item) { return item.IsPVWinner; }), ['Title'], ['asc']); 18838 } 18839 }); 18840 Object.defineProperty(tempSearchResults[catId], 'Nominees', { 18841 get: function () { 18842 return _.orderBy(_.filter(this.Pieces, 'IsNominee'), ['Title'], ['asc']); 18843 } 18844 }); 18845 Object.defineProperty(tempSearchResults[catId], 'Honorees', { 18846 get: function () { 18847 return _.orderBy(_.filter(this.Pieces, 'IsHonoree'), ['Title'], ['asc']); 18848 } 18849 }); 18850 } 18851 // add "new" piece object if it has any same award level on category 18852 var currentC = data[p].Categories[c]; 18853 if ( 18854 !( 18855 (currentC.IsWinner && whichAwardsToShow.IsWinner) 18856 || (currentC.IsPVWinner && whichAwardsToShow.IsPVWinner) 18857 || (currentC.IsNominee && whichAwardsToShow.IsNominee) 18858 || (currentC.IsHonoree && whichAwardsToShow.IsHonoree) 18859 ) 18860 ) { 18861 continue; 18862 } 18863 tempSearchResults[catId].Pieces.push( 18864 Object.assign 18865 ( 18866 {}, 18867 data[p], 18868 { 18869 Categories: data[p].Categories, 18870 IsWinner: data[p].Categories[c].IsWinner, 18871 IsPVWinner: data[p].Categories[c].IsPVWinner, 18872 IsNominee: data[p].Categories[c].IsNominee, 18873 IsHonoree: data[p].Categories[c].IsHonoree 18874 } 18875 ) 18876 ); 18877 // flag category as having pieces 18878 tempSearchResults[catId].HasPiece = true; 18879 } 18880 // remove piece from data list 18881 data.pop(); 18882 } 18883 18884 // remove categories not flagged as having pieces 18885 /*tempSearchResults = _.filter(tempSearchResults, function (item) { 18886 return item.HasPiece; 18887 });*/ 18888 18889 $scope.searchResultsData.Data = tempSearchResults; 18890 } 18891 18892 function formatSearchResultsForCategoryLanding(data, selectedAwards) { 18893 var selectedYear = parseInt($scope.searchSelected.years[0] || $scope.searchFilterData.yearList[0]); 18894 var whichAwardsToShow = awardsConstant.determineWhichAwardsToShow(selectedAwards); 18895 if ($scope.pageNumber == 1) { 18896 $scope.searchResultsData = { 18897 Grid: false, 18898 SelectedYear: selectedYear, 18899 Data: [], 18900 AwardLevels: whichAwardsToShow 18901 }; 18902 } 18903 18904 var tempSearchResults = []; 18905 if ($scope.pageNumber == 1) { 18906 tempSearchResults.push({ Year: selectedYear, isMain: true }); 18907 tempSearchResults.push({ Year: selectedYear - 1 }); 18908 tempSearchResults.push({ Year: selectedYear - 2 }); 18909 } 18910 18911 for (var p = data.length - 1; p >= 0; p--) { 18912 var yearIndex = selectedYear - data[p].Year; 18913 if (!tempSearchResults[yearIndex].Pieces) { 18914 tempSearchResults[yearIndex].Pieces = []; 18915 if (yearIndex == 0) { 18916 // setup getter properties to return pieces for display 18917 Object.defineProperty(tempSearchResults[yearIndex], 'Winners', { 18918 get: function () { 18919 return _.orderBy(_.filter(this.Pieces, function (item) { return item.IsWinner || item.IsPVWinner; }), ['IsWinner', 'Title'], ['desc', 'asc']); 18920 } 18921 }); 18922 Object.defineProperty(tempSearchResults[yearIndex], 'Nominees', { 18923 get: function () { 18924 return _.orderBy(_.filter(this.Pieces, 'IsNominee'), ['Title'], ['asc']); 18925 } 18926 }); 18927 Object.defineProperty(tempSearchResults[yearIndex], 'Honorees', { 18928 get: function () { 18929 return _.orderBy(_.filter(this.Pieces, 'IsHonoree'), ['Title'], ['asc']); 18930 } 18931 }); 18932 } else { 18933 Object.defineProperty(tempSearchResults[yearIndex], 'WinnersAndNominees', { 18934 get: function () { 18935 return _.orderBy(_.filter(this.Pieces, function (item) { return item.IsWinner || item.IsPVWinner || item.IsNominee; }), ['IsWinner', 'IsPVWinner', 'Title'], ['desc', 'desc', 'asc']); 18936 } 18937 }); 18938 } 18939 } 18940 // find specific category on piece data 18941 var catId = _.findIndex(data[p].Categories, function (item) { return item.CategoryId == $scope.currentCategory.Id; }); 18942 if (catId < 0) { continue; } 18943 // add "new" piece object if it has any same award level on category 18944 var currentC = data[p].Categories[catId]; 18945 if ( 18946 !( 18947 (currentC.IsWinner && whichAwardsToShow.IsWinner) 18948 || (currentC.IsPVWinner && whichAwardsToShow.IsPVWinner) 18949 || (currentC.IsNominee && whichAwardsToShow.IsNominee) 18950 || (currentC.IsHonoree && whichAwardsToShow.IsHonoree) 18951 ) 18952 ) { 18953 continue; 18954 } 18955 tempSearchResults[yearIndex].Pieces.push( 18956 Object.assign 18957 ( 18958 {}, 18959 data[p], 18960 { 18961 Categories: data[p].Categories, 18962 IsWinner: data[p].Categories[catId].IsWinner, 18963 IsPVWinner: data[p].Categories[catId].IsPVWinner, 18964 IsNominee: data[p].Categories[catId].IsNominee, 18965 IsHonoree: data[p].Categories[catId].IsHonoree 18966 } 18967 ) 18968 ); 18969 18970 // remove piece from data list 18971 data.pop(); 18972 } 18973 if ($scope.pageNumber == 1) { 18974 $scope.searchResultsData.Data = tempSearchResults; 18975 } 18976 else { 18977 $scope.searchResultsData.Data = $scope.searchResultsData.Data.concat(tempSearchResults); 18978 } 18979 } 18980 18981 $scope.selectedMediaTypes = {}; 18982 $scope.mediaTypes = []; 18983 $scope.totalCount = 0; 18984 $scope.showMediaTypeFilter = false;
18985 18986 $scope.onMediaTypesChanged = function () { 18987 // if you ever need to debug: 18988 console.log('selectedMediaTypes:', angular.copy($scope.selectedMediaTypes)); 18989 }; 18990 18991 $scope.resetMediaTypes = function ($event) { 18992 if ($event) $event.preventDefault(); 18993 $scope.selectedMediaTypes = {}; // clears all checks => "All" 18994 }; 18995 18996 $scope.mediaTypeFilter = function (card) { 18997 if (!card) return false; 18998 18999 // get selected keys (only those set to true) 19000 const selected = $scope.selectedMediaTypes || {}; 19001 const selectedKeys = Object.keys(selected).filter(k => selected[k]); 19002 19003 // if none selected => All 19004 if (selectedKeys.length === 0) return true; 19005 19006 return selected[card.MediaType] === true; 19007 }; 19008 19009 $scope.hasAnyMediaTypeSelected = function () { 19010 return Object.keys($scope.selectedMediaTypes || {}) 19011 .some(k => !!$scope.selectedMediaTypes[k]); 19012 }; 19013 19014 function resetSearchResultsForGrid(data) { 19015 if ($scope.pageNumber == 1) { 19016 $scope.searchResultsData = { 19017 Grid: true, 19018 Data: data 19019 }; 19020 } 19021 var tempSearchResults = _.map(data); 19022 19023 $scope.searchResultsData.Data = tempSearchResults; 19024 19025 const items = ($scope.searchResultsData && $scope.searchResultsData.Data) || []; 19026 $scope.totalCount = items.length; 19027 19028 const counts = {}; 19029 items.forEach(i => { 19030 const mt = (i.MediaType || '').trim(); 19031 if (!mt) return; 19032 counts[mt] = (counts[mt] || 0) + 1; 19033 }); 19034 19035 $scope.mediaTypes = Object.keys(counts) 19036 .map(name => { 19037 // Find the MediaTypeId for this name from the items 19038 const item = items.find(i => (i.MediaType || '').trim() === name); 19039 const mediaTypeId = item ? item.MediaTypeId : null; 19040 // Look up ClaimColor from the dictionary using MediaTypeId 19041 const claimColor = mediaTypeId && $scope.mediaTypeClaimColorMap[mediaTypeId] 19042 ? $scope.mediaTypeClaimColorMap[mediaTypeId] 19043 : null; 19044 const filterData = { 19045 name: name, 19046 count: counts[name], 19047 claimColor: claimColor 19048 }; 19049 return filterData; 19050 }) 19051 .sort((a, b) => a.name.localeCompare(b.name)); 19052 19053 $scope.showMediaTypeFilter = $scope.mediaTypes.length >= 2 && items.length > 2; 19054 19055 $scope.selectedMediaTypes = {}; 19056 } 19057 19058 19059 function formatSearchResultsForGrid(data) { 19060 if ($scope.pageNumber == 1) { 19061 $scope.searchResultsData = { 19062 Grid: true, 19063 Data: data 19064 }; 19065 } 19066 var tempSearchResults = _.map(data); 19067 19068 if ($scope.pageNumber == 1) { 19069 $scope.searchResultsData.Data = tempSearchResults; 19070 } 19071 else { 19072 $scope.searchResultsData.Data = $scope.searchResultsData.Data.concat(tempSearchResults); 19073 } 19074 } 19075 19076 function searchPieces() { 19077 if (!($state.current.name == 'search.category' || $state.current.name == 'search.mediatype')) 19078 return; 19079 var forcedMultipleYears = false; 19080 var data = { PageNumber: $scope.pageNumber }; 19081 if ($scope.currentCategory.Id == -1) { 19082 // is for special achievement 19083 data.SpecialAchievementType = true; 19084 } else { 19085 data.PieceType = true; 19086 data.awards = $scope.searchSelected.awards; 19087 data.categories = _.map($scope.searchSelected.categories, function (item) { 19088 return item.Id; 19089 }); 19090 } 19091 data.years = _.map($scope.searchSelected.years); 19092 data.Sort = ($scope.searchSelected.sort && $scope.searchSelected.sort.length > 0 ? $scope.searchSelected.sort[0].key : null); 19093 // Setup for mediatype / extra years if needed 19094 if ($scope.currentCategory.MediaType) { 19095 // on a category 19096 data.MediaType = [$scope.currentCategory.MediaType.Id]; 19097 // if single year for a category 19098 if (data.years.length == 1 || (!data.years || data.years.length <= 0)) { 19099 forcedMultipleYears = true; 19100 var selectedYear = parseInt($scope.searchSelected.years[0] || $scope.searchFilterData.yearList[0]); 19101 data.years.push(selectedYear - 1); 19102 data.years.push(selectedYear - 2); 19103 data.categories = [$scope.currentCategory.Id]; 19104 } 19105 } else { 19106 data.MediaType = [$scope.currentCategory.Id]; 19107 } 19108 19109 if ((data.years && data.years.length > 1 && !forcedMultipleYears) || data.SpecialAchievementType) { 19110 data.ByEntries = false;
19111 } 19112 else if ($scope.currentFromUrl.categoryName) { 19113 data.ByEntries = true; 19114 } else if ($scope.currentFromUrl.mediaTypeName) { 19115 data.ByEntries = true; 19116 } else { 19117 data.ByEntries = false; 19118 } 19119 19120 if (!$scope.stopLazyLoad) { 19121 searchFactory.search(data) 19122 .then(function (response) { 19123 if (!response.data || !response.data.Success) { 19124 // TODO: Do something for error 19125 alert(response.data.Message); 19126 return; 19127 } 19128 $scope.isInLazyProcess = false; 19129 if ($scope.pageNumber > 1 && (!response.data.Data || response.data.Data.length <= 0)) { 19130 $scope.stopLazyLoad = true; 19131 } 19132 // TODO: format depending on the filters and type 19133 if ((data.years && data.years.length > 1 && !forcedMultipleYears) || data.SpecialAchievementType) { 19134 // Just write out piece in grid list 19135 formatSearchResultsForGrid(response.data.Data); 19136 } 19137 else if ($scope.currentFromUrl.categoryName) { 19138 // Format for category landing page structure 19139 formatSearchResultsForCategoryLanding(response.data.Data, $scope.searchSelected.awards); 19140 } else if ($scope.currentFromUrl.mediaTypeName) { 19141 // Format for media type landing page structure for 1 year 19142 formatSearchResultsForMediaTypeLanding(response.data.Data, $scope.searchSelected.awards); 19143 } else { 19144 // Just write out piece in grid list 19145 formatSearchResultsForGrid(response.data.Data); 19146 } 19147 }, function (response) { 19148 alert(response.data); 19149 }); 19150 } 19151 } 19152 19153 function searchUniversal() { 19154 if ($state.current.name != 'globalsearch') 19155 return; 19156 var data = { PageNumber: $scope.pageNumber, Search: $scope.searchTerm }; 19157 data.PieceType = true; 19158 data.SpecialAchievementType = true; 19159 data.FeatureType = true; 19160 data.UserType = true; 19161 data.awards = $scope.searchSelected.awards; 19162 data.categories = _.map($scope.searchSelected.categories, function (item) { 19163 return item.Id; 19164 }); 19165 data.years = _.map($scope.searchSelected.years); 19166 data.MediaType = _.map($scope.searchSelected.mediaTypes, function (item) { 19167 return item.Id; 19168 }); 19169 data.Sort = ($scope.searchSelected.sort && $scope.searchSelected.sort.length > 0 ? $scope.searchSelected.sort[0].key : null); 19170 19171 // TODO: Setup for mediatype - for pieces / special achievement - might setup in db / ES like SpecialAchievement (specific #) 19172 if ($scope.searchSelected.mediaTypeId) { 19173 data.MediaType = $scope.searchSelected.mediaTypeId; 19174 } 19175 if (data.Search || (data.awards && data.awards.length > 0) || (data.categories && data.categories.length > 0) 19176 || (data.years && data.years.length > 0) || (data.MediaType && data.MediaType.length > 0) || data.Sort) { 19177 data.stateZero = false; 19178 } 19179 else { 19180 data.stateZero = true; 19181 } 19182 if (!$scope.stopLazyLoad) { 19183 searchFactory.search(data) 19184 .then(function (response) { 19185 if (!response.data || !response.data.Success) { 19186 // TODO: Do something for error 19187 alert(response.data.Message); 19188 return; 19189 } 19190 $scope.isInLazyProcess = false;
19191 $scope.searchIsStateZero = data.stateZero; 19192 if ($scope.pageNumber > 1 && (!response.data.Data || response.data.Data.length <= 0)) { 19193 $scope.stopLazyLoad = true; 19194 } 19195 formatSearchResultsForGrid(response.data.Data); 19196 }, function (response) { 19197 alert(response.data); 19198 }); 19199 } 19200 } 19201 19202 $scope.searchMenu = function (isUniversal) { 19203 if (isUniversal) { searchUniversal(); } 19204 else { searchPieces(); } 19205 }; 19206 19207 $scope.searchMenuLazyLoad = function (isUniversal) { 19208 if ($scope.searchResultsData && $scope.searchResultsData.Data && $scope.searchResultsData.Data.length > 0 19209 && ((_.find($scope.searchResultsData.Data, function (item) { return item.Winners || item.Nominees || item.Honorees; }) 19210 && !$scope.searchResultsData.Grid) || $scope.searchResultsData.Grid) 19211 && !$scope.isInLazyProcess && ($state.current.name == 'search.mediatype' || $state.current.name == 'search.category' || $state.current.name == 'globalsearch')) { 19212 $scope.isInLazyProcess = true; 19213 $scope.pageNumber = $scope.pageNumber + 1; 19214 if (isUniversal) { searchUniversal(); } 19215 else { searchPieces(); } 19216 } 19217 }; 19218 19219 19220 $scope.categoryViewAll = function (year) { 19221 $scope.pageNumber = 1; 19222 $scope.stopLazyLoad = false; 19223 $scope.searchSelected.years = [year.toString()]; 19224 $scope.searchSelected.awards = []; 19225 $scope.searchSelected.sort = []; 19226 searchPieces(); 19227 $scope.scrollToListing("filters-area"); 19228 }; 19229 19230 $scope.$watchCollection(function () { 19231 return $scope.searchSelected.awards; 19232 }, function (newVal, oldVal) { 19233 if (newVal != oldVal) { 19234 SetSearchParams('awards'); 19235 } 19236 }); 19237 19238 $scope.$watchCollection(function () { 19239 return $scope.searchSelected.years; 19240 }, function (newVal, oldVal) { 19241 if (newVal != oldVal) { 19242 SetSearchParams('years'); 19243 if ($state.current && ($state.current.name === 'search.category' || $state.current.name === 'search.mediatype')) { 19244 applySearchListingMeta(false); 19245 } 19246 } 19247 }); 19248 19249 $scope.$watchCollection(function () { 19250 return $scope.searchSelected.sort; 19251 }, function (newVal, oldVal) { 19252 if (newVal != oldVal) { 19253 SetSearchParams('sort'); 19254 } 19255 }); 19256 19257 $scope.$watchCollection(function () { 19258 return $scope.searchSelected.categories; 19259 }, function (newVal, oldVal) { 19260 if (newVal != oldVal) { 19261 SetSearchParams('categories'); 19262 } 19263 }); 19264 19265 $scope.$watchCollection(function () { 19266 return $scope.searchSelected.mediaTypes; 19267 }, function (newVal, oldVal) { 19268 if (newVal != oldVal) { 19269 SetSearchParams('mediaTypes'); 19270 } 19271 }); 19272 19273 $scope.$watchCollection(function () { 19274 return $scope.searchTerm; 19275 }, function (newVal, oldVal) { 19276 if (newVal != oldVal) { 19277 SetSearchParams('searchTerm'); 19278 } 19279 }); 19280 19281 $rootScope.$on("$stateChangeSuccess", function (event, toState, toParams, fromState, fromParams) { 19282 $scope.currentFromUrl = { 19283 year: $stateParams.year, 19284 mediaTypeName: $stateParams.mediaTypeName, 19285 categoryTypeName: $stateParams.categoryTypeName, 19286 categoryName: $stateParams.categoryName, 19287 itemid: $stateParams.itemidentifier, 19288 userId: $stateParams.userId 19289 }; 19290 $scope.pageMetaInfo.resetPrerenderReady(); 19291 $scope.pageMetaInfo.clearMeta(); 19292 $scope.pageMetaInfo.setCanonical(); 19293 19294 $scope.pastState = { "fromState": fromState, "fromParams": fromParams }; 19295 $scope.hideTopbar = (toState.name == 'globalsearch'); 19296 $scope.hideHeader = (toState.name == 'piecedetails' || toState.name == 'sadetails' || toState.name == 'globalsearch'); 19297 $scope.showFilter = (toState.name == 'search.category' || toState.name == 'search.mediatype' || toState.name == 'winner'); 19298 19299 //Scroll to top 19300 if (toParams.scrollToListing) 19301 $scope.scrollToListing("filters-area"); 19302 else 19303 scrollToTop(); 19304 19305 if (toState.name == 'search.base.signup' && !$scope.loggedIn) { 19306 $scope.registrationDialog(); 19307 } 19308 else if (toState.name == 'search.base.signin' && !$scope.loggedIn) { 19309 $scope.loginDialog(); 19310 } 19311 19312 if (toState.name == 'globalsearch' && fromState.name && (fromState.name != 'piecedetails' && fromState.name != 'sadetails')) { 19313 $sessionStorage.globalFromState = { state: fromState, params: fromParams }; 19314 } 19315 19316 if (toState.name === 'globalsearch') { 19317 $scope.pageMetaInfo.applyMeta({ 19318 title: 'Universal Search | The Webby Awards', 19319 description: 'Search the Webby Gallery + Index for Winners, Nominees, and Honorees.', 19320 markReady: true 19321 }); 19322 } 19323 19324 if (toState.name === 'search.base') { 19325 applyLandingMeta(true); 19326 } 19327 19328 if (toState.name == 'piecedetails') { 19329 loadPieceData($scope.currentFromUrl.itemid); 19330 } else if (toState.name == 'sadetails') { 19331 loadAchievementData($scope.currentFromUrl.itemid); 19332 } else if (toState.name.includes('search')) { 19333 $scope.pageNumber = 1; 19334 $scope.stopLazyLoad = false;
19335 $scope.searchResultsData = {}; 19336 $scope.currentDetailData = {}; 19337 if (!$scope.mediaTypes || $scope.mediaTypes.length == 0) { 19338 retrieveMediaAndCategories(); 19339 } else { 19340 if (!$scope.mediaTypeClaimColorMap || Object.keys($scope.mediaTypeClaimColorMap).length === 0) { 19341 loadClaimColorMapping(); 19342 } 19343 initializeCategoryLanding(); 19344 } 19345 } 19346 else if (toState.name == 'dashboard.profile') { 19347 updateProfile(); 19348 } 19349 19350 if (toState.name.includes('dashboard')) { 19351 if (!$scope.loggedIn) { 19352 //$state.go('404'); 19353 $scope.loginDialog(); 19354 } 19355 } 19356 19357 if (toState.name == 'winner.claim') { 19358 GetClaimerUserProfile($scope.currentFromUrl.userId); 19359 } 19360 19361 var structuredDataScript = document.querySelector("script[type='application/ld+json']"); 19362 if (structuredDataScript !== null && structuredDataScript !== undefined) { 19363 structuredDataScript.remove(); 19364 } 19365 GetCMSContent(); 19366 }); 19367 19368 function GetClaimerUserProfile(userId) { 19369 $scope.isOwnClaimPage = false; 19370 // Set loading state 19371 $scope.loadingProfile = true; 19372 $scope.loadingCards = true; 19373 19374 // Ensure ClaimColor mapping is loaded before processing results 19375 loadClaimColorMapping().then(function () { 19376 searchFactory.getFullProfile(userId) 19377 .then(function (response) { 19378 if (!response.data || !response.data.Success) { 19379 alert(response.data.Message); 19380 $scope.loadingProfile = false; 19381 $scope.loadingCards = false; 19382 return; 19383 } 19384 $scope.claimerProfile = response.data.Data; 19385 resetSearchResultsForGrid(response.data.Data.Items); 19386 $scope.loadingProfile = false; 19387 $scope.loadingCards = false; 19388 if (sharedProperties.HasToken() && $scope.claimerProfile && $scope.claimerProfile.UserId) { 19389 userFactory.getContact().then(function (contactResp) { 19390 var contact = contactResp.data || contactResp; 19391 $scope.isOwnClaimPage = contact && contact.UserId && contact.UserId === $scope.claimerProfile.UserId; 19392 }); 19393 } 19394 }, function (response) { 19395 alert(response.data); 19396 $scope.loadingProfile = false; 19397 $scope.loadingCards = false; 19398 }); 19399 }); 19400 } 19401 19402 $scope.openUnpublishModal = function () { 19403 var modalInstance = $uibModal.open({ 19404 templateUrl: "/Gallery/ClaimsUnpublishModal", 19405 controller: 'UnpublishClaimModalCtrl', 19406 windowClass: 'claims-unpublish-modal-window', 19407 backdrop: false 19408 }); 19409 modalInstance.result.catch(function () { /* user dismissed */ }); 19410 }; 19411 19412 $scope.getRandomHeader = (function () { 19413 var index = Math.floor(Math.random() * 4) + 1; 19414 return `content/img/Webby30_web_1440x360_${index}.png`; 19415 })(); 19416 19417 function GetCMSContent() { 19418 if (!sharedProperties) 19419 return; 19420 19421 cmsFactory.getCMSAppTypeContents({ AppName: "Gallery", PropertyID: sharedProperties.getProperty("propertyDetails").PropertyID }) 19422 .then(function (response) { 19423 if (response && response.data) 19424 $scope.galleryCMSContent = response.data; 19425 }, function (response) { 19426 // TODO: Error 19427 }); 19428 } 19429 19430 $scope.getCMSContentByRegion = function (regionName, isDirective) { 19431 if ($scope.galleryCMSContent && $scope.galleryCMSContent.length > 0) { 19432 var cmsContent = $scope.galleryCMSContent.filter(function (contentItem) { 19433 return contentItem.ContentRegionName.toLowerCase().trim() == regionName.toLowerCase().trim(); 19434 }); 19435 if (cmsContent && cmsContent.length > 0) 19436 return (isDirective ? cmsContent[0].Content : $sce.trustAsHtml(cmsContent[0].Content)); 19437 } 19438 return; 19439 }; 19440 19441 $scope.newsLetterSubscribe = function (isValid) { 19442 // TODO: Uncomment form and set this up 19443 // TODO: May setup form as separate controller 19444 // TODO: Need to determine which ID to use, since PV netted signup uses different ids than entries netted 19445 $scope.newsFormSubmitted = true; 19446 //if (isValid) { 19447 // $scope.keepSpinning = true; 19448 // publicVoteFactory.subscribe({ SubscriptionID: nettedSub.SubscriptionIdentifier, PropertyID: $scope.propertyDetails.PropertyID, Email: $scope.newsLetter.Email }).success(function () { 19449 // $scope.showNewsForm = false;
19450 // setTimeout(function () { 19451 // $uibModalInstance.dismiss('cancel'); 19452 // }, 3000); 19453 // }) 19454 // .error(function () { }) 19455 // .then(function () { $scope.keepSpinning = false; }); 19456 //} 19457 }; 19458 19459 $scope.logOut = function () { 19460 userFactory.logout() 19461 .then(function () { 19462 sharedProperties.RemoveToken(); 19463 $scope.isOwnClaimPage = false; 19464 if ($state && $state.current && $state.current.name.includes('dashboard')) { 19465 $state.go('home'); 19466 } 19467 }, function (response) { 19468 alert(response.data); 19469 }); 19470 }; 19471 19472 $scope.loginDialog = function (opts, successCallbackArgs, changeState) { 19473 $scope.showCloseBtn = true; 19474 var opts = opts || {}; 19475 var modalData = function () { 19476 return null; 19477 }; 19478 19479 //prevent close by clicking outside of modal 19480 opts.backdrop = 'static'; 19481 19482 if ($location.path() == "/claim-your-credits") { 19483 var defaults = { 19484 templateUrl: "/Gallery/ClaimsLoginModal", 19485 controller: ClaimsLoginDialogCtrl, 19486 scope: $scope, 19487 size: 'lg', 19488 windowClass: 'claim-login-modal', 19489 resolve: { 19490 data: modalData, 19491 options: opts, 19492 successCallbackArgs: successCallbackArgs 19493 } 19494 }; 19495 } 19496 else { 19497 var defaults = { 19498 templateUrl: "/Gallery/LoginModal", 19499 controller: LoginDialogCtrl, 19500 scope: $scope, 19501 size: 'lg', 19502 windowClass: 'login-modal', 19503 resolve: { 19504 data: modalData, 19505 options: opts, 19506 successCallbackArgs: successCallbackArgs 19507 } 19508 }; 19509 } 19510 19511 var combined = _.merge({}, defaults, opts); 19512 19513 if (changeState) { 19514 var modalInstance = $uibModal.open(combined).closed.then(function () { 19515 if (sharedProperties.HasToken()) { 19516 $state.go(changeState); 19517 } 19518 }); 19519 } else { 19520 var modalInstance = $uibModal.open(combined); 19521 } 19522 19523 UIkit.modal('#sign-up-modal').hide(); // Hiding Sign-up modal if user opens Join/Log-in modal elsewhere on page. 19524 }; 19525 19526 $scope.registrationDialog = function (opts, successCallbackArgs) { 19527 $scope.showCloseBtn = true; 19528 var opts = opts || {}; 19529 var modalData = function () { 19530 return null; 19531 }; 19532 19533 //prevent close by clicking outside of modal 19534 opts.backdrop = 'static'; 19535 19536 var defaults = { 19537 templateUrl: "/Gallery/RegisterModal", 19538 controller: RegistrationDialogCtrl, 19539 scope: $scope, 19540 size: 'lg', 19541 windowClass: 'register-modal', 19542 resolve: { 19543 data: modalData, 19544 options: opts, 19545 successCallbackArgs: successCallbackArgs 19546 } 19547 }; 19548 19549 var combined = _.merge({}, defaults, opts); 19550 19551 var modalInstance = $uibModal.open(combined); 19552 }; 19553 19554 $scope.forgotDialog = function (opts, successCallbackArgs) { 19555 var opts = opts || {}; 19556 var modalData = function () { 19557 return null; 19558 }; 19559 19560 //prevent close by clicking outside of modal 19561 opts.backdrop = 'static'; 19562 19563 var defaults = { 19564 templateUrl: "/Gallery/ForgotModal", 19565 controller: ForgotDialogCtrl, 19566 scope: $scope, 19567 windowClass: 'forgot-modal', 19568 resolve: { 19569 data: modalData, 19570 options: opts, 19571 successCallbackArgs: successCallbackArgs 19572 } 19573 }; 19574 19575 var combined = _.merge({}, defaults, opts); 19576 19577 var modalInstance = $uibModal.open(combined); 19578 }; 19579 19580 $scope.validateURL = function (url) { 19581 if (!(/^https?:\/\//.test(url))) { 19582 if (url.length != 0) { 19583 url = "http://" + url; 19584 } 19585 } 19586 return url; 19587 }; 19588 19589 function getCategoryGalleryYearsGrouping() { 19590 return mediaTypesFactory.getCategoryGalleryYearsGrouping({ 'years': $scope.searchSelected.years }) 19591 .then(function (response) { 19592 if (response.data && response.data.Success) { 19593 $scope.currentCategoryYearGroupings = response.data.Data; 19594 updateCategoryActiveStatus(); 19595 } 19596 else { 19597 // TODO: Error 19598 } 19599 }, function (response) { 19600 // TODO: Error 19601 }); 19602 } 19603 19604 function updateCategoryActiveStatus() { 19605 for (var y = 0; y < $scope.mediaTypes.length; y++) { 19606 for (var u = 0; u < $scope.mediaTypes[y].Children.length; u++) { 19607 for (var h = 0; h < $scope.mediaTypes[y].Children[u].Children.length; h++) { 19608 $scope.mediaTypes[y].Children[u].Children[h].isActive = ($scope.currentCategoryYearGroupings.indexOf($scope.mediaTypes[y].Children[u].Children[h].Id) >= 0); 19609 } 19610 } 19611 } 19612 } 19613 19614 function updateCategoryFilterActiveStatus() { 19615 var mediaType = _.find($scope.mediaTypes, { Url: $scope.currentFromUrl.mediaTypeName }); 19616 if (!mediaType && $scope.searchSelected.mediaTypes && $scope.searchSelected.mediaTypes.length == 1) { 19617 mediaType = _.find($scope.mediaTypes, { Id: $scope.searchSelected.mediaTypes[0].Id }); 19618 } 19619 $scope.searchFilterData.categoryList = []; 19620 var tempCategoryList = []; 19621 var tempCategoryToSelect = null; 19622 if (mediaType && mediaType.Children && mediaType.Children.length > 0) { 19623 _.forEach(mediaType.Children, function (item, index) { 19624 var tempChildrenList = []; 19625 _.forEach(item.Children, function (child, index) { 19626 tempChildrenList.push({ Name: child.Name, Id: child.Id, isActive: child.isActive }); 19627 if ($scope.currentFromUrl.categoryName && child.Url == $scope.currentFromUrl.categoryName) { 19628 tempCategoryToSelect = { Name: child.Name, Id: child.Id, isActive: child.isActive }; 19629 } 19630 }); 19631 19632 tempCategoryList.push({ 19633 Name: item.Name, 19634 Type: 'CT', 19635 isActive: !!_.find(item.Children, function (cat) { 19636 return ($scope.currentCategoryYearGroupings.indexOf(cat.Id) >= 0); 19637 }), 19638 Children: tempChildrenList, 19639 }); 19640 }); 19641 $scope.searchFilterData.categoryList = tempCategoryList; 19642 if (tempCategoryToSelect) { 19643 $scope.searchSelected.categories = [tempCategoryToSelect]; 19644 } 19645 else { 19646 _.remove($scope.searchSelected.categories, function (ssc) { 19647 var found = false;
19648 for (var g = 0; g < $scope.searchFilterData.categoryList.length; g++) { 19649 if (ssc.Id == $scope.searchFilterData.categoryList[g].Id && $scope.searchFilterData.categoryList[g].isActive) { 19650 found = true; 19651 break; 19652 } 19653 } 19654 return !found; 19655 }); 19656 } 19657 } 19658 } 19659 19660 $scope.isCategorySelected = function (item) { 19661 return !!_.find($scope.searchSelected.categories, function (ssc) { 19662 return ssc.Id == item.Id; 19663 }); 19664 }; 19665 19666 $scope.GetPieceImage = function (piece) { 19667 19668 if (!piece.MainImage) { 19669 imgSrc = (appSettings.CF ? appSettings.CF : appSettings.S3) + '1/' + piece.SeasonID + '/Entry_Uploads/' + piece.PieceID + '-thumb.jpg'; 19670 } 19671 else { 19672 imgSrc = piece.MainImage; 19673 } 19674 return imgSrc; 19675 }; 19676 19677 function getCategoriesInfo(categoryGalleryIDs) { 19678 $scope.categoriesInfo = []; 19679 mediaTypesFactory.getGalleryCategories({ 'categoryGalleryIDs': categoryGalleryIDs }) 19680 .then(function (response) { 19681 if (response.data && response.data.Success) { 19682 $scope.categoriesInfo = response.data.Data; 19683 } 19684 else { 19685 // TODO: Error 19686 } 19687 }, function (response) { 19688 // TODO: Error 19689 }); 19690 } 19691 19692 $scope.goBack = function () { 19693 if ($state && $state.current && $state.current.name == "globalsearch") { 19694 if ($sessionStorage.globalFromState) 19695 $state.go($sessionStorage.globalFromState.state, $sessionStorage.globalFromState.params); 19696 else { 19697 $state.go("search.base"); 19698 } 19699 } 19700 else if ($scope.pastState && $scope.pastState.fromParams && $scope.pastState.fromState && $scope.pastState.fromState.name) { 19701 $scope.pastState.fromParams.scrollToListing = true; 19702 $state.go($scope.pastState.fromState, $scope.pastState.fromParams); 19703 } 19704 else if (_.isEmpty($scope.currentFromUrl)) { 19705 $scope.currentFromUrl.scrollToListing = true; 19706 $state.go('search.category', $scope.currentFromUrl); 19707 } 19708 else { 19709 $state.go("search.base"); 19710 } 19711 }; 19712 19713 $scope.getWinnerCountLabels = function () { 19714 var text = ""; 19715 var winnerCount = 0; 19716 var nomineeCount = 0; 19717 var honoreeCount = 0; 19718 var regWinnerCount = 0; 19719 var pvWinnerCount = 0; 19720 if ($scope.currentDetailData) { 19721 var entries = $scope.currentDetailData.Entries; 19722 if (entries) { 19723 for (var h = 0; h < entries.length; h++) { 19724 if (entries[h].Winner) { 19725 winnerCount = winnerCount + 1; 19726 regWinnerCount = regWinnerCount + 1; 19727 } 19728 if (entries[h].PublicVotingWinner) { 19729 winnerCount = winnerCount + 1; 19730 pvWinnerCount = pvWinnerCount + 1; 19731 } 19732 if (entries[h].Nominee) { 19733 nomineeCount = nomineeCount + 1; 19734 } 19735 if (entries[h].Honoree) { 19736 honoreeCount = honoreeCount + 1; 19737 } 19738 } 19739 if (winnerCount > 1) { 19740 text += winnerCount + " Wins, "; 19741 } 19742 else if (winnerCount == 1) { 19743 if (regWinnerCount) { 19744 text += " Webby Winner, "; 19745 } 19746 else if (pvWinnerCount) { 19747 text += " People's Voice Winner, "; 19748 } 19749 } 19750 19751 if (nomineeCount > 1) { 19752 text += nomineeCount + " Nominations, "; 19753 } 19754 else if (nomineeCount == 1) { 19755 text += " Nominee, "; 19756 } 19757 19758 if (honoreeCount > 1) { 19759 text += honoreeCount + " Honors, "; 19760 } 19761 else if (honoreeCount == 1) { 19762 text += " Honoree, "; 19763 } 19764 } 19765 } 19766 return (text ? text.slice(0, text.length - 2) : text); 19767 }; 19768 19769 $scope.currentPageUrl = window.location.href; 19770 19771 $scope.hasFiles = function () { 19772 return ($scope.currentDetailData.Files && $scope.currentDetailData.Files.length > 0) || 19773 ($scope.currentDetailData.AudioFiles && $scope.currentDetailData.AudioFiles.length > 0); 19774 }; 19775 19776 function getFiles() { 19777 if ($scope.currentDetailData.AudioFiles && $scope.currentDetailData.AudioFiles.length > 0) 19778 $scope.videoFile = [{ src: $scope.currentDetailData.AudioFiles[0].UploadFile, type: 'audio/mpeg' }]; 19779 else if ($scope.currentDetailData.Files && $scope.currentDetailData.Files.length > 0) 19780 $scope.videoFile = [{ src: $scope.currentDetailData.Files[0].UploadFile, type: 'video/mp4' }]; 19781 } 19782 19783 function getFileWithoutExtension(filename) { 19784 return filename.substring(0, filename.lastIndexOf(".")); 19785 } 19786 19787 function updateVideoFileRef(currentPiece) { 19788 if (currentPiece && currentPiece.Files) { 19789 for (var t = 0; t < currentPiece.Files.length; t++) { 19790 if (currentPiece.Files[t].UploadFile.toLowerCase().indexOf("/tobeencoded/") > -1) { 19791 currentPiece.Files[t].UploadFile = getFileWithoutExtension(currentPiece.Files[t].UploadFile.replace("/ToBeEncoded/", "/Encoded/video/")) + '_mp4_480p.mp4'; 19792 } 19793 } 19794 getFiles(); 19795 } 19796 } 19797 19798 $scope.submitDetails = function (isValid) { 19799 if (isValid) { 19800 $scope.submitted = false;
19801 $scope.updateProfile.PropertyID = sharedProperties.getProperty("propertyDetails").PropertyID; 19802 $scope.updateProfile.AppTypeID = 1; 19803 $analytics.eventTrack('Update Profile Details - User Dashboard'); 19804 userFactory.saveEntrantDetails($scope.updateProfile) 19805 .then(function (response) { 19806 if (response.data && response.data.Success) { 19807 $scope.showSuccess = true; 19808 sharedProperties.updateUser({ 19809 Email: $scope.updateProfile.email, 19810 FirstName: $scope.updateProfile.firstname, 19811 LastName: $scope.updateProfile.lastname, 19812 Organization: $scope.updateProfile.organization, 19813 OrganizationUrl: $scope.updateProfile.organizationUrl, 19814 Title: $scope.updateProfile.title 19815 }); 19816 $scope.statusUpdate = null; 19817 } else { 19818 if (response.data.Message) { $scope.statusUpdate = [response.data.Message]; } 19819 else if (response.data.Errors && response.data.Errors.length > 0) { $scope.statusUpdate = response.data.Errors; } 19820 else { $scope.statusUpdate = ["There was an error saving."]; } 19821 } 19822 }, function (response) { 19823 $scope.statusUpdate = ["There was an error saving."]; 19824 }); 19825 19826 } else { 19827 $scope.submitted = true; 19828 } 19829 19830 }; 19831 19832 $scope.addHttp = function (event) { 19833 var el = event.target, 19834 url = el.value; 19835 if (!(/^https?:\/\//.test(url))) { 19836 if (url.length != 0) { 19837 url = "http://" + url; 19838 } 19839 } 19840 $scope.updateProfile.organizationUrl = url; 19841 }; 19842 19843 $scope.collapse = function () { 19844 this.props.isExpanded = !this.props.isExpanded; 19845 this.anchorProps.label = this.props.isExpanded ? 'Cancel Password Update' : 'Update Password'; 19846 this.anchorProps.class = this.props.isExpanded ? '' : 'collapsed'; 19847 $scope.updateProfile.Password = null; 19848 $scope.updateProfile.ConfirmPassword = null; 19849 }; 19850 19851 function resetStorageItems() { 19852 $sessionStorage.globalFromState = null; 19853 } 19854 19855 function checkPromotionModal() { 19856 if (!$localStorage.promoModalSeen && !$scope.loggedIn && $location.path() !== '/claim-your-credits') { 19857 UIkit.modal('#sign-up-modal', { clsPage: 'sign-up-modal-active', clsPanel: 'sign-up-modal-content' }).show(); 19858 $localStorage.promoModalSeen = true; 19859 } 19860 } 19861 19862 $scope.titleCase = sharedProperties.titleCase; 19863 19864 resetStorageItems(); 19865 checkPromotionModal(); 19866 } 19867 ]); 19868 19869galleryApp.filter('medGridFilter', function () { 19870 return function (items) { 19871 if (!items) 19872 return; 19873 var newItems = []; 19874 for (var o = 0; o < items.length; o++) { 19875 if (items[o].Winners || items[o].Nominees || items[o].Honorees) { 19876 newItems.push(items[o]); 19877 } 19878 } 19879 return newItems; 19880 }; 19881}); 19882 19883galleryApp.filter('medTypeChildFilter', function () { 19884 return function (items) { 19885 if (!items) 19886 return; 19887 var newItems = []; 19888 for (var o = 0; o < items.length; o++) { 19889 if (items[o].Id == -1) { 19890 newItems.push(items[o]); 19891 } 19892 else { 19893 for (var k = 0; k < items[o].Children.length; k++) { 19894 if (_.find(items[o].Children[k].Children, { isActive: true })) { 19895 newItems.push(items[o]); 19896 break; 19897 } 19898 } 19899 } 19900 } 19901 return newItems; 19902 }; 19903}); 19904 19905galleryApp.filter('catTypeChildFilter', function () { 19906 return function (items) { 19907 if (!items) 19908 return; 19909 var newItems = []; 19910 for (var o = 0; o < items.length; o++) { 19911 if (_.find(items[o].Children, { isActive: true })) { 19912 newItems.push(items[o]); 19913 } 19914 } 19915 return newItems; 19916 }; 19917}); 19918 19919galleryApp.controller('UnpublishClaimModalCtrl', ['$scope', '$uibModalInstance', 'searchFactory', '$state', 'userFactory', 'sharedProperties', function ($scope, $uibModalInstance, searchFactory, $state, userFactory, sharedProperties) { 19920 $scope.unpublishing = false;
19921 $scope.confirm = function () { 19922 $scope.unpublishing = true; 19923 searchFactory.unpublishClaim() 19924 .then(function (response) { 19925 var ok = (response.data && response.data.Success) || (response.data === undefined && response.Success); 19926 if (!ok) { 19927 $scope.unpublishing = false; 19928 alert((response.data && response.data.Message) || (response.data && response.data.Errors && response.data.Errors[0]) || 'Failed to unpublish.'); 19929 return; 19930 } 19931 $uibModalInstance.close(); 19932 userFactory.getContact().then(function (contactResp) { 19933 var contact = contactResp.data || contactResp; 19934 if (contact) sharedProperties.updateUser(contact); 19935 }); 19936 $state.go('claimsHomePage'); 19937 }, function (err) { 19938 $scope.unpublishing = false; 19939 var msg = (err.data && err.data.Message) || (err.data && err.data.Errors && err.data.Errors[0]) || (err.data && err.data.error_description) || 'Failed to unpublish.'; 19940 alert(msg); 19941 }); 19942 }; 19943}]); 19944 19945var LoginDialogCtrl = ['$scope', '$rootScope', '$uibModalInstance', 'sharedProperties', 'userFactory', '$window', 'options', 'successCallbackArgs', '$analytics', function ($scope, $rootScope, $uibModalInstance, sharedProperties, userFactory, $window, options, successCallbackArgs, $analytics) { 19946 $scope.statusLogin; 19947 $scope.loginSubmitted = false; 19948 $scope.keepSpinning = false; 19949 19950 function getError(error) { 19951 if (error && error.data) return error.data; 19952 return { 'error_description': 'An unspecified error occurred.' }; 19953 } 19954 19955 $scope.login = function () { 19956 //reset error 19957 $scope.statusLogin = undefined; 19958 19959 var params = { 19960 Email: $scope.user.Email, 19961 Password: $scope.user.Password, 19962 PropertyID: sharedProperties.getProperty("propertyDetails").PropertyID, 19963 AppTypeID: 1 19964 }; 19965 19966 $scope.keepSpinning = true; 19967 userFactory.login(params.Email, params.Password, params.PropertyID, params.AppTypeID) 19968 .then(function (response) { 19969 sharedProperties.SetToken(response.data.access_token); 19970 $analytics.setAlias(params.Email); 19971 $analytics.setUsername(params.Email); 19972 $analytics.setUserProperties(response.data); 19973 userFactory.getContact() 19974 .then(function (response) { 19975 $scope.keepSpinning = false; 19976 sharedProperties.updateUser(response.data); 19977 19978 $uibModalInstance.dismiss('cancel'); 19979 if (successCallbackArgs) { 19980 $rootScope.$broadcast(successCallbackArgs.Broadcast, successCallbackArgs); 19981 } 19982 }, function (response) { 19983 $scope.keepSpinning = false; 19984 $scope.statusLogin = getError(response.data); 19985 }); 19986 }, function (response) { 19987 $scope.keepSpinning = false; 19988 $scope.statusLogin = response.data; 19989 }); 19990 }; 19991 19992 $scope.register = function () { 19993 $uibModalInstance.dismiss('cancel'); 19994 $scope.registrationDialog(options, successCallbackArgs); 19995 }; 19996 19997 $scope.forgot = function () { 19998 $uibModalInstance.dismiss('cancel'); 19999 $scope.forgotDialog(options, successCallbackArgs); 20000 }; 20001 20002 $scope.cancel = function () { 20003 $uibModalInstance.dismiss('cancel'); 20004 }; 20005}]; 20006 20007var RegistrationDialogCtrl = ['$scope', '$rootScope', '$uibModalInstance', 'sharedProperties', 'userFactory', '$window', 'options', 'successCallbackArgs', '$analytics', '$state', function ($scope, $rootScope, $uibModalInstance, sharedProperties, userFactory, $window, options, successCallbackArgs, $analytics, $state) { 20008 $scope.statusRegistration; 20009 $scope.registerSubmitted = false; 20010 20011 $scope.save = function (isValid) { 20012 $scope.statusRegistrationOAuth; 20013 $scope.registerSubmitted = false;
20014 if (!isValid) { 20015 $scope.registerSubmitted = true; 20016 return; 20017 } 20018 20019 //reset error 20020 $scope.statusRegistration; 20021 20022 if (!sharedProperties.HasToken() && sharedProperties.getProperty('propertyDetails').CaptchaSiteKey) { 20023 grecaptcha.ready(function () { 20024 grecaptcha.execute(sharedProperties.getProperty('propertyDetails').CaptchaSiteKey, { action: 'submit' }).then(function (token) { 20025 var params = { 20026 FirstName: $scope.loginUser.FirstName, 20027 LastName: $scope.loginUser.LastName, 20028 Email: $scope.loginUser.Email, 20029 Password: $scope.loginUser.Password, 20030 ConfirmPassword: $scope.loginUser.PasswordConfirm, 20031 PropertyID: sharedProperties.getProperty("propertyDetails").PropertyID, 20032 ProvidedConsent: $scope.loginUser.ProvidedConsent, 20033 Title: $scope.loginUser.Title, 20034 Organization: $scope.loginUser.Organization, 20035 OrganizationUrl: $scope.loginUser.OrganizationUrl, 20036 AppTypeID: 1, 20037 CaptchaResponse: token 20038 }; 20039 $scope.keepSpinning = true; 20040 20041 userFactory.insertUser(params)// register user from contact info 20042 .then(function () { 20043 //login the user 20044 userFactory.login(params.Email, params.Password, params.PropertyID, params.AppTypeID) 20045 .then(function (response) { 20046 $analytics.setAlias(params.Email); 20047 $analytics.setUsername(params.Email); 20048 $analytics.setUserProperties(response.data); 20049 $scope.keepSpinning = false; 20050 $scope.submitNewUser = {}; 20051 sharedProperties.SetToken(response.data.access_token, false); 20052 userFactory.getContact() 20053 .then(function (response) { 20054 $scope.keepSpinning = false; 20055 sharedProperties.updateUser(response.data); 20056 20057 $uibModalInstance.dismiss('cancel'); 20058 20059 var userData = response.data || response; 20060 var fromClaims = (options && options.fromClaims) || (successCallbackArgs && successCallbackArgs.fromClaims); 20061 if (fromClaims && userData) { 20062 var linkedInVerified = userData.LinkedInVerified || userData.linkedInVerified || false; 20063 var claimed = userData.Claimed === true || userData.claimed === true; 20064 if (claimed) { 20065 var userId = userData.UserId, firstName = userData.FirstName || '', lastName = userData.LastName || ''; 20066 if (userId && firstName && lastName) { 20067 var userProfileId = userId.split('-')[0] + '-' + firstName.split(' ')[0].split('-')[0].toLowerCase() + '-' + lastName.split(' ')[0].split('-')[0].toLowerCase(); 20068 $state.go('winner.claim', { userId: userProfileId }); 20069 if (successCallbackArgs) { $rootScope.$broadcast(successCallbackArgs.Broadcast, successCallbackArgs); } 20070 return; 20071 } 20072 } 20073 if (linkedInVerified) { 20074 $state.go('claims'); 20075 if (successCallbackArgs) { $rootScope.$broadcast(successCallbackArgs.Broadcast, successCallbackArgs); } 20076 return; 20077 } 20078 $rootScope.$evalAsync(function () { 20079 $rootScope.$broadcast('openLinkedInModal', { options: options || {}, successCallbackArgs: successCallbackArgs }); 20080 }); 20081 } 20082 if (successCallbackArgs) { 20083 $rootScope.$broadcast(successCallbackArgs.Broadcast, successCallbackArgs); 20084 } 20085 }, function (response) { 20086 $scope.keepSpinning = false;
20087 $scope.statusLogin = getError(response.data); 20088 }); 20089 $uibModalInstance.dismiss('cancel'); 20090 }, function (response) { 20091 $scope.errorMessage = response.data; 20092 $scope.keepSpinning = false; 20093 }); 20094 }, function (response) { 20095 if (response.data.ModelState[""].length == 1 && response.data.ModelState[""][0] == 'Name ' + params.Email.toLowerCase() + ' is already taken.') { 20096 response.data.ModelState[""][0] = response.data.ModelState[""][0] + " Login using that email or choose a different email."; 20097 } 20098 $scope.statusRegistration = response.data.ModelState[""]; 20099 sharedProperties.ShowThenHideArea("#errors"); 20100 $scope.keepSpinning = false; 20101 }); 20102 }); 20103 }); 20104 } 20105 else { 20106 var params = { 20107 FirstName: $scope.loginUser.FirstName, 20108 LastName: $scope.loginUser.LastName, 20109 Email: $scope.loginUser.Email, 20110 Password: $scope.loginUser.Password, 20111 ConfirmPassword: $scope.loginUser.PasswordConfirm, 20112 PropertyID: sharedProperties.getProperty("propertyDetails").PropertyID, 20113 ProvidedConsent: $scope.loginUser.ProvidedConsent, 20114 Title: $scope.loginUser.Title, 20115 Organization: $scope.loginUser.Organization, 20116 OrganizationUrl: $scope.loginUser.OrganizationUrl, 20117 AppTypeID: 1, 20118 //Title: $scope.loginUser.Title, 20119 //Organization: $scope.loginUser.Organization, 20120 }; 20121 $scope.keepSpinning = true; 20122 20123 userFactory.insertUser(params)// register user from contact info 20124 .then(function () { 20125 //login the user 20126 userFactory.login(params.Email, params.Password, params.PropertyID, params.AppTypeID) 20127 .then(function (response) { 20128 $analytics.setAlias(params.Email); 20129 $analytics.setUsername(params.Email); 20130 $analytics.setUserProperties(response.data); 20131 $scope.keepSpinning = false; 20132 $scope.submitNewUser = {}; 20133 sharedProperties.SetToken(response.data.access_token, false); 20134 userFactory.getContact() 20135 .then(function (response) { 20136 $scope.keepSpinning = false; 20137 sharedProperties.updateUser(response.data); 20138 20139 $uibModalInstance.dismiss('cancel'); 20140 20141 var userData = response.data || response; 20142 var fromClaims = (options && options.fromClaims) || (successCallbackArgs && successCallbackArgs.fromClaims); 20143 if (fromClaims && userData) { 20144 var linkedInVerified = userData.LinkedInVerified || userData.linkedInVerified || false; 20145 var claimed = userData.Claimed === true || userData.claimed === true; 20146 if (claimed) { 20147 var userId = userData.UserId, firstName = userData.FirstName || '', lastName = userData.LastName || ''; 20148 if (userId && firstName && lastName) { 20149 var userProfileId = userId.split('-')[0] + '-' + firstName.split(' ')[0].split('-')[0].toLowerCase() + '-' + lastName.split(' ')[0].split('-')[0].toLowerCase(); 20150 $state.go('winner.claim', { userId: userProfileId }); 20151 if (successCallbackArgs) { $rootScope.$broadcast(successCallbackArgs.Broadcast, successCallbackArgs); } 20152 return; 20153 } 20154 } 20155 if (linkedInVerified) { 20156 $state.go('claims'); 20157 if (successCallbackArgs) { $rootScope.$broadcast(successCallbackArgs.Broadcast, successCallbackArgs); } 20158 return; 20159 } 20160 $rootScope.$evalAsync(function () { 20161 $rootScope.$broadcast('openLinkedInModal', { options: options || {}, successCallbackArgs: successCallbackArgs }); 20162 }); 20163 } 20164 if (successCallbackArgs) { 20165 $rootScope.$broadcast(successCallbackArgs.Broadcast, successCallbackArgs); 20166 } 20167 }, function (response) { 20168 $scope.keepSpinning = false;
20169 $scope.statusLogin = getError(response.data); 20170 }); 20171 $uibModalInstance.dismiss('cancel'); 20172 }, function (response) { 20173 $scope.errorMessage = response.data; 20174 $scope.keepSpinning = false; 20175 }); 20176 }, function (response) { 20177 if (response.data.ModelState[""].length == 1 && response.data.ModelState[""][0] == 'Name ' + params.Email.toLowerCase() + ' is already taken.') { 20178 response.data.ModelState[""][0] = response.data.ModelState[""][0] + " Login using that email or choose a different email."; 20179 } 20180 $scope.statusRegistration = response.data.ModelState[""]; 20181 sharedProperties.ShowThenHideArea("#errors"); 20182 $scope.keepSpinning = false; 20183 }); 20184 } 20185 }; 20186 20187 $scope.login = function () { 20188 $uibModalInstance.dismiss('cancel', successCallbackArgs); 20189 $scope.loginDialog(options, successCallbackArgs); 20190 } 20191 20192 $scope.cancel = function () { 20193 $uibModalInstance.dismiss('cancel'); 20194 }; 20195 20196 $scope.addHttp = function (event) { 20197 var el = event.target, 20198 url = el.value; 20199 if (!(/^https?:\/\//.test(url))) { 20200 if (url.length != 0) { 20201 url = "http://" + url; 20202 } 20203 } 20204 $scope.loginUser.OrganizationUrl = url; 20205 }; 20206}]; 20207 20208 20209var ForgotDialogCtrl = ['$scope', '$rootScope', '$uibModalInstance', 'sharedProperties', 'userFactory', 'options', 'successCallbackArgs', function ($scope, $rootScope, $uibModalInstance, sharedProperties, userFactory, options, successCallbackArgs) { 20210 $scope.statusForgot; 20211 $scope.showSuccess = false; 20212 20213 function getError(error) { 20214 if (error && error.data) return { 'error_description': error.data }; 20215 if (error && error.Message) return { 'error_description': error.Message }; 20216 return { 'error_description': 'An unspecified error occurred.' }; 20217 } 20218 20219 20220 $scope.resetPassword = function (isValid) { 20221 //reset error 20222 $scope.statusForgot = undefined; 20223 $scope.showSuccess = false; 20224 $scope.keepSpinning = true; 20225 20226 var params = { 20227 Email: $scope.user.Email, 20228 PropertyID: sharedProperties.getProperty("propertyDetails").PropertyID, 20229 AppTypeID: 1 20230 }; 20231 20232 userFactory.forgotPassword(params.Email, params.PropertyID, null, params.AppTypeID) 20233 .then(function (response) { 20234 //show success screen 20235 $scope.showSuccess = true; 20236 //$uibModalInstance.dismiss('cancel'); 20237 $scope.keepSpinning = false; 20238 }, function (response) { 20239 $scope.statusForgot = getError(response.data); 20240 $scope.keepSpinning = false; 20241 }); 20242 }; 20243 20244 $scope.login = function () { 20245 $uibModalInstance.dismiss('cancel'); 20246 $scope.loginDialog(options, successCallbackArgs); 20247 } 20248 20249 $scope.cancel = function () { 20250 $uibModalInstance.dismiss('cancel'); 20251 }; 20252 20253}]; 20254 20255galleryApp.directive('scHover', scHoverDirective); 20256 20257function scHoverDirective($timeout) { 20258 return { 20259 link: function (scope, element, attrs, modelCtrl) { 20260 var inTimeout = false; 20261 var hoverDelay = parseInt(attrs.scHoverDelay, 10) || 1000; 20262 20263 element.on('mouseover', function () { 20264 inTimeout = true; 20265 $timeout(function () { 20266 if (inTimeout) { 20267 scope.$eval(attrs.scHover); 20268 inTimeout = false; 20269 } 20270 }, hoverDelay); 20271 }); 20272 20273 element.on('mouseleave', function () { 20274 inTimeout = false; 20275 scope.$apply(function () { 20276 scope.$eval(attrs.scHoverEnd); 20277 }); 20278 }); 20279 } 20280 } 20281} 20282; 20283angular.module('rmModules').controller('passwordController', [ 20284 '$scope', 20285 'sharedProperties', 20286 '$state', 20287 '$rootScope', 20288 'userFactory', 20289 'appType', 20290 function ($scope, sharedProperties, $state, $rootScope, userFactory, appType) { 20291 $scope.showSuccess = false;
20292 $scope.showCodeMissing = false; 20293 $scope.resetInfo = {}; 20294 $scope.statusReset = null; 20295 20296 $scope.updatePassword = function () { 20297 $scope.keepSpinning = true; 20298 20299 var tempPropertyID = -1; 20300 if (appType == 'admin') { tempPropertyID = 0; } 20301 else if (propertyID) { 20302 tempPropertyID = propertyID; 20303 } 20304 else if (tempPropertyID < 1) { 20305 var property = sharedProperties.getProperty("propertyDetails"); 20306 if (property) { 20307 tempPropertyID = property.PropertyID; 20308 } 20309 else 20310 { 20311 tempPropertyID = -1; 20312 } 20313 } 20314 $scope.statusReset = null; 20315 20316 userFactory.resetPassword 20317 ( 20318 $scope.resetInfo.Email, 20319 tempPropertyID || 0, 20320 sharedProperties.GetQueryStringItem('code'), 20321 $scope.resetInfo.Password, 20322 $scope.resetInfo.ConfirmPassword 20323 ) 20324 .then(function (response) { 20325 $scope.keepSpinning = false; 20326 setupSuccessAndLink(); 20327 }, function (response) { 20328 if (response.data && response.data.ModelState[""] && response.data.ModelState[""].length > 0) { 20329 $scope.statusReset = response.data.ModelState[""]; 20330 } 20331 else { 20332 $scope.statusReset = ['An unspecified error occurred. Make sure your password is in the correct format and the email specified is the one you registered with.']; 20333 } 20334 $scope.keepSpinning = false; 20335 }); 20336 }; 20337 20338 var setupSuccessAndLink = function () { 20339 $scope.showSuccess = true; 20340 }; 20341 20342 var updateQueryCheck = function () { 20343 $scope.showCodeMissing = sharedProperties.GetQueryStringItem('code') ? false : true; 20344 }; 20345 20346 $rootScope.$on('locationChangeSuccess', function () { 20347 updateQueryCheck(); 20348 }); 20349 20350 20351 var handleStateChanges = function (stateChangeType, event, toState, toParams, fromState, fromParams, options) { 20352 if (toState.name == "resetpassword") { 20353 updateQueryCheck(); 20354 } 20355 } 20356 20357 $scope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams, options) { 20358 handleStateChanges('$stateChangeSuccess', event, toState, toParams, fromState, fromParams, options); 20359 }); 20360 20361 $scope.$on('$locationChangeSuccess', function (event) { 20362 updateQueryCheck(); 20363 }); 20364}]);; 20365/** 20366 * @license Angulartics 20367 * (c) 2013 Luis Farzati http://luisfarzati.github.io/angulartics 20368 * License: MIT 20369 */ 20370!function (a, b) { 20371 "use strict"; function c() { 20372 // General buffering handler 20373 function b(a) { return function () { k.waitForVendorCount && (m[a] || (m[a] = []), m[a].push(arguments)) } } 20374 // As handlers are installed by plugins, they get pushed into a list and invoked in order. 20375 function c(b, c, d) { return n[b] || (n[b] = []), n[b].push(c), o[c] = d, function () { if (!this.settings.optOut) { var c = Array.prototype.slice.apply(arguments); return this.$inject(["$q", a.bind(this, function (d) { return d.all(n[b].map(function (b) { var e = o[b] || {}; if (e.async) { var f = d.defer(), g = a.copy(c); return g.unshift(f.resolve), b.apply(this, g), f.promise } return d.when(b.apply(this, c)) }, this)) })]) } } } 20376 // Will run setTimeout if delay is > 0 20377 // Runs immediately if no delay to make sure cache/buffer is flushed before anything else. 20378 // Plugins should take care to register handlers by order of precedence. 20379 function d(a, b) { b ? setTimeout(a, b) : a() } 20380 // General function to register plugin handlers. Flushes buffers immediately upon registration according to the specified delay. 20381 function e(b, e, f) {
20382 // Do not add a handler if developerMode is true 20383 if (!j.developerMode) { p[b] = c(b, e, f); var g = j[b], h = g ? g.bufferFlushDelay : null, i = null !== h ? h : j.bufferFlushDelay; a.forEach(m[b], function (a, b) { d(function () { e.apply(this, a) }, b * i) }) } 20384 } function f(a) { return a.replace(/^./, function (a) { return a.toUpperCase() }) } 20385 // Adds to the provider a 'register#{handlerName}' function that manages multiple plugins and buffer flushing. 20386 function g(a) { var d = "register" + f(a); q[d] = function (b, c) { e(a, b, c) }, p[a] = c(a, b(a)) } function h(b, c, d) { a.forEach(c, d); for (var e in b) i[e] = b[e] } var i = this, j = { 20387 pageTracking: { autoTrackFirstPage: !0, autoTrackVirtualPages: !0, trackRelativePath: !1, trackRoutes: !0, trackStates: !0, autoBasePath: !1, basePath: "", excludedRoutes: [] }, eventTracking: {}, bufferFlushDelay: 1e3,// Support only one configuration for buffer flush delay to simplify buffering 20388 trackExceptions: !1, optOut: !1, developerMode: !1 20389 }, l = ["pageTrack", "eventTrack", "exceptionTrack", "transactionTrack", "setAlias", "setUsername", "setUserProperties", "setUserPropertiesOnce", "setSuperProperties", "setSuperPropertiesOnce", "incrementProperty", "userTimings", "clearCookies"], m = {}, n = {}, o = {}, p = { settings: j }; 20390 // Opt in and opt out functions 20391 p.setOptOut = function (a) { this.settings.optOut = a, s() }, p.getOptOut = function () { return this.settings.optOut }; var q = { $get: ["$injector", function (a) { return r(a) }], api: p, settings: j, virtualPageviews: function (a) { this.settings.pageTracking.autoTrackVirtualPages = a }, trackStates: function (a) { this.settings.pageTracking.trackStates = a }, trackRoutes: function (a) { this.settings.pageTracking.trackRoutes = a }, excludeRoutes: function (a) { this.settings.pageTracking.excludedRoutes = a }, firstPageview: function (a) { this.settings.pageTracking.autoTrackFirstPage = a }, withBase: function (b) { this.settings.pageTracking.basePath = b ? a.element(document).find("base").attr("href") : "" }, withAutoBase: function (a) { this.settings.pageTracking.autoBasePath = a }, trackExceptions: function (a) { this.settings.trackExceptions = a }, developerMode: function (a) { this.settings.developerMode = a } }, r = function (b) { return a.extend(p, { $inject: b.invoke }) }, s = function () { h(q, l, g) }; 20392 // Initial register 20393 h(q, l, g) 20394 } function d(b, c, d, e) { 20395 function f(a) { for (var b = 0; b < d.settings.pageTracking.excludedRoutes.length; b++) { var c = d.settings.pageTracking.excludedRoutes[b]; if (c instanceof RegExp && c.test(a) || a.indexOf(c) > -1) return !0 } return !1 } function g(a, b) { f(a) || d.pageTrack(a, b) } d.settings.pageTracking.autoTrackFirstPage && e.invoke(["$location", function (a) {/* Only track the 'first page' if there are no routes or states on the page */ 20396 var b = !0; if (e.has("$route")) { var f = e.get("$route"); if (f) for (var h in f.routes) { b = !1; break } else null === f && (b = !1) } else if (e.has("$state")) { var i = e.get("$state"); for (var j in i.get()) { b = !1; break } } if (b) if (d.settings.pageTracking.autoBasePath && (d.settings.pageTracking.basePath = c.location.pathname), d.settings.pageTracking.trackRelativePath) { var k = d.settings.pageTracking.basePath + a.url(); g(k, a) } else g(a.absUrl(), a) 20397 }]), d.settings.pageTracking.autoTrackVirtualPages && e.invoke(["$location", function (a) { 20398 d.settings.pageTracking.autoBasePath && (/* Add the full route to the base. */ 20399 d.settings.pageTracking.basePath = c.location.pathname + "#"); var f = !0; if (d.settings.pageTracking.trackRoutes && e.has("$route")) { var h = e.get("$route"); if (h) for (var i in h.routes) { f = !1; break } else null === h && (f = !1); b.$on("$routeChangeSuccess", function (b, c) { if (!c || !(c.$$route || c).redirectTo) { var e = d.settings.pageTracking.basePath + a.url(); g(e, a) } }) } d.settings.pageTracking.trackStates && (e.has("$state") && !e.has("$transitions") && (f = !1, b.$on("$stateChangeSuccess", function (b, c) { var e = d.settings.pageTracking.basePath + a.url(); g(e, a) })), e.has("$state") && e.has("$transitions") && (f = !1, e.invoke(["$transitions", function (b) { 20400 b.onSuccess({}, function (b) { 20401 var c = b.options(); 20402 // only track for transitions that would have triggered $stateChangeSuccess 20403 if (c.notify) { var e = d.settings.pageTracking.basePath + a.url(); g(e, a) } 20404 }) 20405 }]))), f && b.$on("$locationChangeSuccess", function (b, c) { if (!c || !(c.$$route || c).redirectTo) if (d.settings.pageTracking.trackRelativePath) { var e = d.settings.pageTracking.basePath + a.url(); g(e, a) } else g(a.absUrl(), a) }) 20406 }]), d.settings.developerMode && a.forEach(d, function (a, b) { "function" == typeof a && (d[b] = function () { }) }) 20407 } function e(b) { 20408 return { 20409 restrict: "A", link: function (c, d, e) { 20410 var f = e.analyticsOn || "click", g = {}; a.forEach(e.$attr, function (a, b) { i(b) && (g[j(b)] = e[b], e.$observe(b, function (a) { g[j(b)] = a })) }
20410), a.element(d[0]).bind(f, function (f) { 20411 var i = e.analyticsEvent || h(d[0]); g.eventType = f.type, e.analyticsIf && !c.$eval(e.analyticsIf) || ( 20412 // Allow components to pass through an expression that gets merged on to the event properties 20413 // eg. analytics-properites='myComponentScope.someConfigExpression.$analyticsProperties' 20414 e.analyticsProperties && a.extend(g, c.$eval(e.analyticsProperties)), b.eventTrack(i, g)) 20415 }) 20416 } 20417 } 20418 } function f(a) { a.decorator("$exceptionHandler", ["$delegate", "$injector", function (a, b) { return function (c, d) { var e = a(c, d), f = b.get("$analytics"); return f.settings.trackExceptions && f.exceptionTrack(c, d), e } }]) } function g(a) { return ["a:", "button:", "button:button", "button:submit", "input:button", "input:submit"].indexOf(a.tagName.toLowerCase() + ":" + (a.type || "")) >= 0 } function h(a) { return g(a) ? a.innerText || a.value : a.id || a.name || a.tagName } function i(a) { return "analytics" === a.substr(0, 9) && ["On", "Event", "If", "Properties", "EventType"].indexOf(a.substr(9)) === -1 } function j(a) { 20419 var b = a.slice(9);// slice off the 'analytics' prefix 20420 // slice off the 'analytics' prefix 20421 return "undefined" != typeof b && null !== b && b.length > 0 ? b.substring(0, 1).toLowerCase() + b.substring(1) : b 20422 } var k = window.angulartics || (window.angulartics = {}); k.waitForVendorCount = 0, k.waitForVendorApi = function (a, b, c, d, e) { e || k.waitForVendorCount++, d || (d = c, c = void 0), !Object.prototype.hasOwnProperty.call(window, a) || void 0 !== c && void 0 === window[a][c] ? setTimeout(function () { k.waitForVendorApi(a, b, c, d, !0) }, b) : (k.waitForVendorCount--, d(window[a])) },/** 20423 * @ngdoc overview 20424 * @name angulartics 20425 */ 20426 a.module("angulartics", []).provider("$analytics", c).run(["$rootScope", "$window", "$analytics", "$injector", d]).directive("analyticsOn", ["$analytics", e]).config(["$provide", f]) 20427}(angular); 20428 20429 20430/** 20431 * @license Angulartics 20432 * (c) 2014 Luis Farzati http://luisfarzati.github.io/angulartics 20433 * License: MIT 20434 */ 20435(function (angular) { 20436 'use strict'; 20437 20438 /** 20439 * @ngdoc overview 20440 * @name angulartics.debug 20441 * Enables analytics debugging to console 20442 */ 20443 angular.module('angulartics.debug', ['angulartics']) 20444 .config(['$analyticsProvider', function ($analyticsProvider) { 20445 20446 $analyticsProvider.registerPageTrack(function (path) { 20447 console.log('Page tracking: ', path); 20448 }); 20449 20450 /** 20451 * Track Event 20452 * @name eventTrack 20453 */ 20454 $analyticsProvider.registerEventTrack(function (action, properties) { 20455 console.log("Event tracking: ", action, properties); 20456 }); 20457 20458 /** 20459 * Track Transaction 20460 * @name transactionTrack 20461 */ 20462 $analyticsProvider.registerTransactionTrack(function (action, properties) { 20463 console.log("Transaction tracking: ", action, properties); 20464 }); 20465 20466 }]); 20467})(angular);; 20468! function (window, angular, undefined) { 20469 "use strict"; 20470 angular.module("angulartics.google.analytics", ["angulartics"]).config(["$analyticsProvider", function ($analyticsProvider) { 20471 function detectUniversalAnalytics() { 20472 var gaNamespace = window.GoogleAnalyticsObject; 20473 return gaNamespace && window[gaNamespace] 20474 } 20475 20476 function detectClassicAnalytics() { 20477 return !angular.isUndefined(window._gaq) 20478 } 20479 20480 function dimensionsAndMetrics(properties) { 20481 var key, customData = {}; 20482 for (key in properties) key.indexOf("dimension") && key.indexOf("metric") || (customData[key] = properties[key]); 20483 return customData 20484 } 20485 $analyticsProvider.settings.pageTracking.trackRelativePath = !0, $analyticsProvider.settings.ga = { 20486 additionalAccountNames: undefined, 20487 additionalAccountHitTypes: { 20488 pageview: !0, 20489 event: !0, 20490 exception: !1, 20491 ecommerce: !1, 20492 userTiming: !1, 20493 setUserProperties: !1, 20494 userId: !1 20495 }, 20496 disableEventTracking: null, 20497 disablePageTracking: null, 20498 enhancedEcommerce: !1, 20499 transport: null, 20500 userId: null 20501 }
20501, $analyticsProvider.registerPageTrack(function (path, properties) { 20502 properties = properties || {}, $analyticsProvider.settings.ga.disablePageTracking || dispatchToGa("pageview", "send", angular.extend({}, properties, { 20503 hitType: "pageview", 20504 page: path 20505 })) 20506 }), $analyticsProvider.registerEventTrack(function (action, properties) { 20507 if (!$analyticsProvider.settings.ga.disableEventTracking && (action || action + "" == "0")) { 20508 if (properties = properties || {}, properties.category = properties.category || "Event", properties.value) { 20509 var parsed = parseInt(properties.value, 10); 20510 properties.value = isNaN(parsed) ? 0 : parsed 20511 } 20512 angular.isFunction(properties.hitCallback) || (properties.hitCallback = null), properties.nonInteraction = properties.nonInteraction || properties.noninteraction, dispatchToGa("event", "send", angular.extend({}, properties, { 20513 hitType: "event", 20514 eventCategory: properties.category, 20515 eventAction: action, 20516 eventLabel: properties.label, 20517 eventValue: properties.value, 20518 nonInteraction: properties.nonInteraction, 20519 page: properties.page || window.location.hash.substring(1) || window.location.pathname, 20520 hitCallback: properties.hitCallback 20521 })) 20522 } 20523 }), $analyticsProvider.registerExceptionTrack(function (error, cause) { 20524 dispatchToGa("exception", "send", { 20525 hitType: "event", 20526 eventCategory: "Exceptions", 20527 eventAction: error.toString(), 20528 eventLabel: error.stack, 20529 nonInteraction: !0, 20530 page: window.location.hash.substring(1) || window.location.pathname, 20531 isException: !0 20532 }) 20533 }), $analyticsProvider.registerSetUsername(function (userId) { 20534 $analyticsProvider.settings.ga.userId = userId 20535 }), $analyticsProvider.registerSetUserProperties(function (properties) { 20536 properties && dispatchToGa("setUserProperties", "set", dimensionsAndMetrics(properties)) 20537 }), $analyticsProvider.registerUserTimings(function (properties) { 20538 return !angular.isObject(properties) || angular.isArray(properties) ? console.log("Required argument properties is missing or not an object") : (angular.forEach(["timingCategory", "timingVar", "timingValue"], function (prop) { 20539 if (angular.isUndefined(properties[prop])) return console.log("Argument properties missing required property " + prop) 20540 }), void dispatchToGa("userTiming", "send", { 20541 hitType: "timing", 20542 timingCategory: properties.timingCategory, 20543 timingVar: properties.timingVar, 20544 timingValue: properties.timingValue, 20545 timingLabel: properties.timingLabel, 20546 optSampleRate: properties.optSampleRate, 20547 page: properties.page || window.location.hash.substring(1) || window.location.pathname 20548 })) 20549 }), $analyticsProvider.registerTransactionTrack(function (transaction) { 20550 var product, i, transactionToSend; 20551 transactionToSend = angular.copy(transaction); 20552 delete transactionToSend.products; 20553 if (dispatchToGa("ecommerce", "require", "ecommerce"), dispatchToGa("ecommerce", "ecommerce:addTransaction", transactionToSend), transaction.products) 20554 for (i = 0; i < transaction.products.length; i++) { 20555 product = transaction.products[i], 20556 product.sku = transaction.products[i].sku || product.id, 20557 product.id = transaction.products[i].id || transaction.id, 20558 dispatchToGa("ecommerce", "ecommerce:addItem", transaction.products[i]); 20559 } 20560 transaction.currencyCode && dispatchToGa("ecommerce", "_set", transaction.currencyCode), dispatchToGa("ecommerce", "ecommerce:send", angular.copy(transactionToSend)) 20561 }); 20562 var dispatchToGa = function () { 20563 function dispatchToUniversal_(command, fieldsObj, shouldCopyHit) { 20564 var uaCommand, pluginName, userId = $analyticsProvider.settings.ga.userId;
20565 if ("require" === command && "ecommerce" === fieldsObj) return pluginName = fieldsObj, $analyticsProvider.settings.ga.enhancedEcommerce && (pluginName = "ec"), applyUniversalCall_([command, pluginName], shouldCopyHit); 20566 if (userId && angular.isObject(fieldsObj) && (fieldsObj.userId = userId), $analyticsProvider.settings.ga.transport && (fieldsObj.transport = $analyticsProvider.settings.ga.transport), command.indexOf("ecommerce:") > -1 && $analyticsProvider.settings.ga.enhancedEcommerce) switch (command) { 20567 case "ecommerce:addTransaction": 20568 command = ["ec:setAction", "purchase"]; 20569 break; 20570 case "ecommerce:addItem": 20571 command = "ec:addProduct", fieldsObj.id = fieldsObj.sku; 20572 break; 20573 case "ecommerce:send": 20574 command = "send", fieldsObj.hitType = "event", fieldsObj.eventCategory = "Angulartics Enhanced Ecommerce", fieldsObj.eventAction = "Purchase", fieldsObj.nonInteraction = !0 20575 } 20576 uaCommand = command instanceof Array ? command.concat(fieldsObj) : [command, fieldsObj], applyUniversalCall_(uaCommand, shouldCopyHit) 20577 } 20578 20579 function applyUniversalCall_(commandArray, shouldCopyHit) { 20580 var commandClone, userId = $analyticsProvider.settings.ga.userId, 20581 gaNamespace = window.GoogleAnalyticsObject; 20582 window[gaNamespace].apply(this, commandArray), shouldCopyHit && (commandClone = angular.copy(commandArray), userId && !$analyticsProvider.settings.ga.additionalAccountHitTypes.userId && commandClone[2] && "object" == typeof commandClone[2] && delete commandClone[2].userId, angular.forEach($analyticsProvider.settings.ga.additionalAccountNames, function (accountName) { 20583 commandClone[0] = accountName + "." + commandClone[0], window[gaNamespace].apply(this, commandClone) 20584 })) 20585 } 20586 20587 function dispatchToClassic_(command, fieldsObj, shouldCopyHit) { 20588 if ("set" === command) return console.log('Classic Analytics does not support the "set" command or Custom Dimensions. Command ignored.'); 20589 var classicCommand; 20590 if ("send" === command) switch (fieldsObj.hitType) { 20591 case "pageview": 20592 classicCommand = ["_trackPageview", fieldsObj.page]; 20593 break; 20594 case "event": 20595 classicCommand = ["_trackEvent", fieldsObj.category, fieldsObj.action, fieldsObj.label, fieldsObj.value, fieldsObj.nonInteraction]; 20596 break; 20597 case "timing": 20598 classicCommand = ["_trackTiming", fieldsObj.timingCategory, fieldsObj.timingVar, fieldsObj.timingValue, fieldsObj.timingLabel, fieldsObj.optSampleRate] 20599 } 20600 return "ecommerce:addTransaction" === command && (classicCommand = ["_addTrans", fieldsObj.id, fieldsObj.affiliation, fieldsObj.revenue, fieldsObj.tax, fieldsObj.shipping, fieldsObj.billingCity, fieldsObj.billingRegion, fieldsObj.billingCountry]), "ecommerce:addItem" === command && (classicCommand = ["_addItem", fieldsObj.id, fieldsObj.sku, fieldsObj.name, fieldsObj.category, fieldsObj.price, fieldsObj.quantity]), "_set" === command && (classicCommand = ["_set", "currencyCode", fieldsObj]), "ecommerce:send" === command && (classicCommand = ["_trackTrans"]), classicCommand ? (window._gaq.pu
20600sh(classicCommand), void (shouldCopyHit && angular.forEach($analyticsProvider.settings.ga.additionalAccountNames, function (accountName) { 20601 var classicCommandClone = [].slice.call(classicCommand); 20602 classicCommandClone[0] = accountName + "." + classicCommandClone[0], window._gaq.push(classicCommandClone) 20603 }))) : console.log("Unable to find command " + command + " or fieldsObj missing required properties. Command ignored.") 20604 } 20605 var handler; 20606 return detectClassicAnalytics() && (handler = dispatchToClassic_), detectUniversalAnalytics() && (handler = dispatchToUniversal_), handler ? function (method, command, fieldsObj) { 20607 var shouldCopyHit = $analyticsProvider.settings.ga.additionalAccountHitTypes[method]; 20608 handler(command, fieldsObj, shouldCopyHit) 20609 } : angular.noop 20610 }() 20611 }]) 20612}(window, window.angular); 20613//# sourceMappingURL=../dist/angulartics-ga.min.js.mapa; 20614!function(window,angular,undefined){"use strict";angular.module("angulartics.facebook.pixel",["angulartics"]).config(["$analyticsProvider",function($analyticsProvider){$analyticsProvider.settings.pageTracking.trackRelativePath=!0,$analyticsProvider.registerPageTrack(function(path){window.fbq&&fbq("track","PageView")}
20614),$analyticsProvider.registerEventTrack(function(action,properties){properties=properties||{};var eventList=["ViewContent","Search","AddToCart","AddToWishlist","InitiateCheckout","AddPaymentInfo","Purchase","Lead","CompleteRegistration"];window.fbq&&(-1===eventList.indexOf(action)?fbq("trackCustom",action,properties):fbq("track",action,properties))})}])}(window,window.angular); 20615//# sourceMappingURL=../dist/angulartics-facebook-pixel.min.js.map; 20616 /** 20617 * @license Angulartics v0.19.2 20618 * (c) 2013 Luis Farzati http://luisfarzati.github.io/angulartics 20619 * Google Tag Manager Plugin Contributed by http://github.com/danrowe49 20620 * License: MIT 20621 */ 20622 20623 (function (angular) { 20624 'use strict'; 20625 20626 20627 /** 20628 * @ngdoc overview 20629 * @name angulartics.google.analytics 20630 * Enables analytics support for Google Tag Manager (http://google.com/tagmanager) 20631 */ 20632 20633 angular.module('angulartics.google.tagmanager', ['angulartics']) 20634 .config(['$analyticsProvider', function ($analyticsProvider) { 20635 20636 $analyticsProvider.settings.ga = { 20637 userId: null 20638 }; 20639 20640 /** 20641 * Send content views to the dataLayer 20642 * 20643 * @param {string} path Required 'content name' (string) describes the content loaded 20644 */ 20645 20646 $analyticsProvider.registerPageTrack(function (path) { 20647 var dataLayer = window.dataLayer = window.dataLayer || []; 20648 dataLayer.push({ 20649 'event': 'content-view', 20650 'content-name': path, 20651 'userId': $analyticsProvider.settings.ga.userId 20652 }); 20653 }); 20654 20655 /** 20656 * Send interactions to the dataLayer, i.e. for event tracking in Google Analytics 20657 * @name eventTrack 20658 * 20659 * @param {string} action Required 'action' (string) associated with the event 20660 * @param {object} properties Comprised of the mandatory field 'category' (string) and optional fields 'label' (string), 'value' (integer) and 'noninteraction' (boolean) 20661 */ 20662 20663 $analyticsProvider.registerEventTrack(eventTrack); 20664 20665 function eventTrack(action, properties) { 20666 var dataLayer = window.dataLayer = window.dataLayer || []; 20667 properties = properties || {}; 20668 dataLayer.push({ 20669 'event': properties.event || 'interaction', 20670 'target': properties.category, 20671 'action': action, 20672 'target-properties': properties.label, 20673 'value': properties.value, 20674 'interaction-type': properties.noninteraction, 20675 'userId': $analyticsProvider.settings.ga.userId 20676 }); 20677 20678 } 20679 20680 /** 20681 * Send exceptions to the dataLayer, reusing the existing Event Tracking tag in GTM 20682 * @name exceptionTrack 20683 * 20684 * @param {object} error An Error object to track: error.toString() used for event 'action', error.stack used for event 'label'. 20685 * @param {object} cause The cause of the error given from $exceptionHandler, not used 20686 */ 20687 20688 $analyticsProvider.registerExceptionTrack(function (error, cause) { 20689 20690 eventTrack(error.toString(), { 20691 'category': 'Exceptions', 20692 'label': error.stack 20693 }); 20694 20695 }); 20696 20697 /** 20698 * Set userId for use with Universal Analytics User ID feature 20699 * @name setUsername 20700 * 20701 * @param {string} userId Required 'userId' value (string) used to identify user cross-device in Google Analytics 20702 */ 20703 20704 $analyticsProvider.registerSetUsername(function (userId) { 20705 $analyticsProvider.settings.ga.userId = userId; 20706 }); 20707 20708 }]); 20709 20710 })(angular); 20711; 20712 (function (angular) { 20713 'use strict'; 20714 angular.module('angulartics.gtag', ['angulartics']) 20715 .config(['$analyticsProvider', function ($analyticsProvider) { 20716 $analyticsProvider.registerPageTrack(function (path) { 20717 var googleTagFunc = window.gtag || null; 20718 if (googleTagFunc) { 20719 googleTagFunc('event', 'page_view', {page_path: path}); 20720 } 20721 }); 20722 20723 $analyticsProvider.registerEventTrack(eventTrack); 20724 20725 function eventTrack(action, properties) { 20726 var googleTagFunc = window.gtag || null; 20727 if (googleTagFunc) { 20728 if (properties) { 20729 googleTagFunc('event', action, { 20730 'event_category': properties.category, 20731 'event_label': properties.label, 20732 'value': properties.value 20733 }); 20734 } 20735 else { 20736 googleTagFunc('event', action); 20737 } 20738 } 20739 } 20740 20741 $analyticsProvider.registerTransactionTrack(transactionTrack); 20742 20743 function transactionTrack(transaction) { 20744 var googleTagFunc = window.gtag || null; 20745 if (googleTagFunc) { 20746 if (transaction) { 20747 googleTagFunc('event', 'purchase', { 20748 transaction_id: transaction.id, 20749 value: transaction.revenue, 20750 tax: transaction.tax, 20751 items: transaction.products, 20752 currency: transaction.currency 20753 }); 20754 } 20755 } 20756 } 20757 20758 $analyticsProvider.registerExceptionTrack(function (error, cause) { 20759 eventTrack(error.toString(), { 20760 'category': 'Exceptions', 20761 'label': error.stack 20762 }); 20763 20764 }); 20765 }]); 20766 20767 })(angular); 20768; 20769(function (window, angular, undefined) { 20770 'use strict'; 20771 20772 /** 20773 * @ngdoc overview 20774 * @name angulartics.segment 20775 * Enables analytics support for Segment (http://segment.com) 20776 */ 20777 angular.module('angulartics.segment', ['angulartics']) 20778 .config(['$analyticsProvider', function ($analyticsProvider) { 20779 20780 // This allows users to load their segment library async, queue events, 20781 // and send them whenever the script is ready 20782 angulartics.waitForVendorApi("analytics", 1000, "initialized", registerHandlers); 20783 20784 function registerHandlers() { 20785 // https://segment.com/docs/libraries/analytics.js/#page 20786 // analytics.page([category], [name], [properties], [options], [callback]); 20787 // TODO : Support optional parameters where the parameter order and type changes their meaning 20788 // e.g. 20789 // (string) is (name) 20790 // (string, string) is (category, name) 20791 // (string, object) is (name, properties) 20792 $analyticsProvider.registerPageTrack(function (path, properties) { 20793 try { 20794 // only pass `path`, segment script will automatically populate properties 20795 analytics.page(path); 20796 } catch (e) { 20797 if (!(e instanceof ReferenceError)) { 20798 throw e; 20799 } 20800 } 20801 }); 20802 20803 // https://segment.com/docs/libraries/analytics.js/#track 20804 // analytics.track(event, [properties], [options], [callback]); 20805 $analyticsProvider.registerEventTrack(function (event, properties, options, callback) { 20806 try { 20807 analytics.track(event, properties, options, callback); 20808 } catch (e) { 20809 if (!(e instanceof ReferenceError)) { 20810 throw e; 20811 } 20812 } 20813 }); 20814 20815 /** 20816 * Send exceptions to segment 20817 * @name exceptionTrack 20818 * 20819 * @param {object} error An Error object to track: error.toString() used for event 'action', error.stack used for event 'label'. 20820 * @param {object} cause The cause of the error given from $exceptionHandler, not used 20821 */ 20822 $analyticsProvider.registerExceptionTrack(function (error, cause) { 20823 try { 20824 analytics.track(error.toString(), { 20825 category: 'Exceptions', 20826 label: error.stack, 20827 }); 20828 } catch (e) { 20829 if (!(e instanceof ReferenceError)) { 20830 throw e; 20831 } 20832 } 20833 }); 20834 // https://segment.com/docs/libraries/analytics.js/#identify 20835 // analytics.identify([userId], [traits], [options], [callback]); 20836 $analyticsProvider.registerSetUsername(function (userId) { 20837 try { 20838 analytics.identify(userId); 20839 } catch (e) { 20840 if (!(e instanceof ReferenceError)) { 20841 throw e; 20842 } 20843 } 20844 }); 20845 20846 // https://segment.com/docs/libraries/analytics.js/#identify 20847 // analytics.identify([userId], [traits], [options], [callback]); 20848 $analyticsProvider.registerSetUserProperties(function (traits, options, callback) { 20849 try { 20850 analytics.identify(traits, options, callback); 20851 } catch (e) { 20852 if (!(e instanceof ReferenceError)) { 20853 throw e; 20854 } 20855 } 20856 }); 20857 20858 // https://segment.com/docs/libraries/analytics.js/#identify 20859 // analytics.identify([userId], [traits], [options], [callback]); 20860 $analyticsProvider.registerSetUserPropertiesOnce(function (userId, traits, options, callback) { 20861 try { 20862 analytics.identify(userId, traits, options, callback); 20863 } catch (e) { 20864 if (!(e instanceof ReferenceError)) { 20865 throw e; 20866 } 20867 } 20868 }); 20869 20870 // https://segment.com/docs/libraries/analytics.js/#alias 20871 // analytics.alias(userId, previousId, options, callback); 20872 $analyticsProvider.registerSetAlias(function (userId, previousId, options, callback) { 20873 try { 20874 analytics.alias(userId, previousId, options, callback); 20875 } catch (e) { 20876 if (!(e instanceof ReferenceError)) { 20877 throw e; 20878 } 20879 } 20880 }); 20881 } 20882 20883 }]); 20884 20885})(window, window.angular);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.