bookstack/public/js/common.js

9 lines
266 KiB
JavaScript
Raw Normal View History

2016-01-01 01:26:22 +08:00
!function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){!function(e,t,n){"use strict";function r(e,t,n){if(!e)throw ngMinErr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function i(e,t){return e||t?e?t?(q(e)&&(e=e.join(" ")),q(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function o(e){var t={};return e&&(e.to||e.from)&&(t.to=e.to,t.from=e.from),t}function a(e,t,n){var r="";return e=q(e)?e:e&&H(e)&&e.length?e.split(/\s+/):[],U(e,function(e,i){e&&e.length>0&&(r+=i>0?" ":"",r+=n?t+e:e+t)}),r}function s(e,t){var n=e.indexOf(t);t>=0&&e.splice(n,1)}function u(e){if(e instanceof V)switch(e.length){case 0:return[];case 1:if(e[0].nodeType===Y)return e;break;default:return V(l(e))}return e.nodeType===Y?V(e):void 0}function l(e){if(!e[0])return e;for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType==Y)return n}}function c(e,t,n){U(t,function(t){e.addClass(t,n)})}function f(e,t,n){U(t,function(t){e.removeClass(t,n)})}function p(e){return function(t,n){n.addClass&&(c(e,t,n.addClass),n.addClass=null),n.removeClass&&(f(e,t,n.removeClass),n.removeClass=null)}}function d(e){if(e=e||{},!e.$$prepared){var t=e.domOperation||L;e.domOperation=function(){e.$$domOperationFired=!0,t(),t=L},e.$$prepared=!0}return e}function h(e,t){m(e,t),v(e,t)}function m(e,t){t.from&&(e.css(t.from),t.from=null)}function v(e,t){t.to&&(e.css(t.to),t.to=null)}function g(e,t,n){var r=(t.addClass||"")+" "+(n.addClass||""),i=(t.removeClass||"")+" "+(n.removeClass||""),o=$(e.attr("class"),r,i);n.preparationClasses&&(t.preparationClasses=k(n.preparationClasses,t.preparationClasses),delete n.preparationClasses);var a=t.domOperation!==L?t.domOperation:null;return z(t,n),a&&(t.domOperation=a),o.addClass?t.addClass=o.addClass:t.addClass=null,o.removeClass?t.removeClass=o.removeClass:t.removeClass=null,t}function $(e,t,n){function r(e){H(e)&&(e=e.split(" "));var t={};return U(e,function(e){e.length&&(t[e]=!0)}),t}var i=1,o=-1,a={};e=r(e),t=r(t),U(t,function(e,t){a[t]=i}),n=r(n),U(n,function(e,t){a[t]=a[t]===i?null:o});var s={addClass:"",removeClass:""};return U(a,function(t,n){var r,a;t===i?(r="addClass",a=!e[n]):t===o&&(r="removeClass",a=e[n]),a&&(s[r].length&&(s[r]+=" "),s[r]+=n)}),s}function y(e){return e instanceof t.element?e[0]:e}function b(e,t,n){var r="";t&&(r=a(t,K,!0)),n.addClass&&(r=k(r,a(n.addClass,X))),n.removeClass&&(r=k(r,a(n.removeClass,J))),r.length&&(n.preparationClasses=r,e.addClass(r))}function w(e,t){t.preparationClasses&&(e.removeClass(t.preparationClasses),t.preparationClasses=null),t.activeClasses&&(e.removeClass(t.activeClasses),t.activeClasses=null)}function x(e,t){var n=t?"-"+t+"s":"";return E(e,[he,n]),[he,n]}function C(e,t){var n=t?"paused":"",r=_+ce;return E(e,[r,n]),[r,n]}function E(e,t){var n=t[0],r=t[1];e.style[n]=r}function k(e,t){return e?t?e+" "+t:e:t}function S(e){return[de,e+"s"]}function A(e,t){var n=t?pe:he;return[n,e+"s"]}function T(e,t,n){var r=Object.create(null),i=e.getComputedStyle(t)||{};return U(n,function(e,t){var n=i[e];if(n){var o=n.charAt(0);("-"===o||"+"===o||o>=0)&&(n=D(n)),0===n&&(n=null),r[t]=n}}),r}function D(e){var t=0,n=e.split(/\s*,\s*/);return U(n,function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,t=t?Math.max(e,t):e}),t}function O(e){return 0===e||null!=e}function F(e,t){var n=I,r=e+"s";return t?n+=oe:r+=" linear all",[n,r]}function M(){var e=Object.create(null);return{flush:function(){e=Object.create(null)},count:function(t){var n=e[t];return n?n.total:0},get:function(t){var n=e[t];return n&&n.value},put:function(t,n){e[t]?e[t].total++:e[t]={total:1,value:n}}}}function N(e,t,n){U(n,function(n){e[n]=G(e[n])?e[n]:t.style.getPropertyValue(n)})}var I,j,_,P,L=t.noop,R=t.copy,z=t.
i(e),i(">")),e==r&&(r=!1)},chars:function(e){r||i(u(e))}}}function c(e){if(e.nodeType===Node.ELEMENT_NODE)for(var t=e.attributes,n=0,r=t.length;r>n;n++){var i=t[n],o=i.name.toLowerCase();("xmlns:ns1"===o||0===o.indexOf("ns1:"))&&(e.removeAttributeNode(i),n--,r--)}var a=e.firstChild;a&&c(a),a=e.nextSibling,a&&c(a)}var f,p=t.$$minErr("$sanitize"),d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,h=/([^\#-~ |!])/g,m=o("area,br,col,hr,img,wbr"),v=o("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),g=o("rp,rt"),$=t.extend({},g,v),y=t.extend({},v,o("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")),b=t.extend({},g,o("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")),w=o("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"),x=o("script,style"),C=t.extend({},m,y,b,$),E=o("background,cite,href,longdesc,src,usemap,xlink:href"),k=o("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"),S=o("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-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",!0),A=t.extend({},E,S,k);!function(e){var t;if(!e.document||!e.document.implementation)throw p("noinert","Can't create an inert html document");t=e.document.implementation.createHTMLDocument("inert");var n=t.documentElement||t.getDocumentElement(),r=n.getElementsByTagName("body");if(1===r.length)f=r[0];else{var i=t.createElement("html");f=t.createElement("body"),i.appendChild(f),t.appendChild(i)}}(e),t.module("ngSanitize",[]).provider("$sanitize",r),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,r=/^mailto:/i;return function(o,a,s){function u(e){e&&h.push(i(e))}function l(e,n){var r;if(h.push("<a "),t.isFunction(s)&&(s=s(e)),t.isObject(s))for(r in s)h.push(r+'="'+s[r]+'" ');else s={};!t.isDefined(a)||"target"in s||h.push('target="',a,'" '),h.push('href="',e.replace(/"/g,"&quot;"),'">'),u(n),h.push("</a>")}if(!o)return o;for(var c,f,p,d=o,h=[];c=d.match(n);)f=c[0],c[2]||c[4]||(f=(c[3]?"http://":"mailto:")+f),p=c.index,u(d.substr(0,p)),l(f,c[0].replace(r,"")),d=d.substring(p+c[0].length);return u(d),e(h.join(""))}}])}(window,window.angular)},{}],6:[function(e,t,n){e("./angular-sanitize"),t.exports="ngSanitize"},{"./angular-sanitize":5}],7:[function(e,t,n){!function(e,t,n){"use strict";function r(e,
u)for(var f in u)c.data("$"+f+"Controller",u[f].instance);return N.$$addScopeInfo(c,t),n&&n(c,t),a&&a(t,c,c,o),c}}function I(e){var t=e&&e[0];return t&&"foreignobject"!==L(t)&&t.toString().match(/SVG/)?"svg":"html"}function j(e,t,r,i,o,a){function s(e,r,i,o){var a,s,u,l,c,f,p,d,v;if(h){var g=r.length;for(v=new Array(g),c=0;c<m.length;c+=3)p=m[c],v[p]=r[p]}else v=r;for(c=0,f=m.length;f>c;)u=v[m[c++]],a=m[c++],s=m[c++],a?(a.scope?(l=e.$new(),N.$$addScopeInfo(Nr(u),l)):l=e,d=a.transcludeOnThisElement?_(e,a.transclude,o):!a.templateOnThisElement&&o?o:!o&&t?_(e,t):null,a(s,l,u,i,d)):s&&s(e,u.childNodes,n,o)}for(var u,l,c,f,p,d,h,m=[],v=0;v<e.length;v++)u=new pe,l=P(e[v],[],u,0===v?i:n,o),c=l.length?B(l,e[v],u,t,r,null,[],[],a):null,c&&c.scope&&N.$$addScopeClass(u.$$element),p=c&&c.terminal||!(f=e[v].childNodes)||!f.length?null:j(f,c?(c.transcludeOnThisElement||!c.templateOnThisElement)&&c.transclude:t),(c||p)&&(m.push(v,c,p),d=!0,h=h||c),a=null;return d?s:null}function _(e,t,n){var r=function(r,i,o,a,s){return r||(r=e.$new(!1,s),r.$$transcluded=!0),t(r,i,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:a})},i=r.$$slots=ve();for(var o in t.$$slots)t.$$slots[o]?i[o]=_(e,t.$$slots[o],n):i[o]=null;return r}function P(e,t,n,r,i){var o,a,s=e.nodeType,u=n.$attr;switch(s){case Kr:G(t,dt(L(e)),"E",r,i);for(var l,c,f,h,m,v,g=e.attributes,$=0,y=g&&g.length;y>$;$++){var b=!1,x=!1;l=g[$],c=l.name,m=Wr(l.value),h=dt(c),(v=ge.test(h))&&(c=c.replace(zi,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var E=h.match($e);E&&Z(E[1])&&(b=c,x=c.substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),f=dt(c.toLowerCase()),u[f]=c,(v||!n.hasOwnProperty(f))&&(n[f]=m,Be(e,f)&&(n[f]=!0)),re(e,t,m,f,v),G(t,f,"A",r,i,b,x)}if(a=e.className,w(a)&&(a=a.animVal),C(a)&&""!==a)for(;o=d.exec(a);)f=dt(o[2]),G(t,f,"C",r,i)&&(n[f]=Wr(o[3])),a=a.substr(o.index+o[0].length);break;case ti:if(11===Mr)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===ti;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);ee(t,e.nodeValue);break;case ni:try{o=p.exec(e.nodeValue),o&&(f=dt(o[1]),G(t,f,"M",r,i)&&(n[f]=Wr(o[2])))}catch(k){}}return t.sort(X),t}function z(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Ri("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==Kr&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return Nr(r)}function V(e,t,n){return function(r,i,o,a,s){return i=z(i[0],t,n),e(r,i,o,a,s)}}function q(e,t,n,r,i,o){if(e)return N(t,n,r,i,o);var a;return function(){return a||(a=N(t,n,r,i,o),t=n=o=null),a.apply(this,arguments)}}function B(e,r,a,s,l,c,f,p,d){function h(e,t,n,r){e&&(n&&(e=V(e,n,r)),e.require=$.require,e.directiveName=b,(M===$||$.$$isolateScope)&&(e=oe(e,{isolateScope:!0})),f.push(e)),t&&(n&&(t=V(t,n,r)),t.require=$.require,t.directiveName=b,(M===$||$.$$isolateScope)&&(t=oe(t,{isolateScope:!0})),p.push(t))}function m(e,t,n,r){var i;if(C(t)){var o=t.match(x),a=t.substring(o[0].length),s=o[1]||o[3],u="?"===o[2];if("^^"===s?n=n.parent():(i=r&&r[a],i=i&&i.instance),!i){var l="$"+a+"Controller";i=s?n.inheritedData(l):n.data(l)}if(!i&&!u)throw Ri("ctreq","Controller '{0}', required by directive '{1}', can't be found!",a,e)}else if(Hr(t)){i=[];for(var c=0,f=t.length;f>c;c++)i[c]=m(e,t[c],n,r)}return i||null}function v(e,t,n,r,i,o){var a=ve();for(var s in r){var l=r[s],c={$scope:l===M||l.$$isolateScope?i:o,$element:e,$attrs:t,$transclude:n},f=l.controller;"@"==f&&(f=t[l.name]);var p=u(f,c,!0,l.controllerAs);a[l.name]=p,U||e.data("$"+l.name+"Controller",p.instance)}return a}function g(e,t,i,o,s){function u(e,t,r,i){var o;if(D(e)||(i=r,r=t,t=e,e=n),U&&(o=h),r||(r=U?$.parent():$),!i)return s(e,t,o,r,T);var a=s.$$slots[i];if(a)return a(e,t,o,r,T);if(y(a))throw Ri("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',i,J($))}var l,c,d,h,g,$,b,w,x;r===i?(b=a,$=a.$$element):($=Nr(i),b=new pe($,a)),d=t,M?c=t.$new(!0):O&&(d=t.$par
e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case lo.LogicalExpression:on(e.left,t),on(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case lo.ConditionalExpression:on(e.test,t),on(e.alternate,t),on(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case lo.Identifier:e.constant=!1,e.toWatch=[e];break;case lo.MemberExpression:on(e.object,t),e.computed&&on(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case lo.CallExpression:n=e.filter?rn(t,e.callee.name):!1,r=[],o(e.arguments,function(e){on(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=e.filter&&rn(t,e.callee.name)?r:[e];break;case lo.AssignmentExpression:on(e.left,t),on(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case lo.ArrayExpression:n=!0,r=[],o(e.elements,function(e){on(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=r;break;case lo.ObjectExpression:n=!0,r=[],o(e.properties,function(e){on(e.value,t),n=n&&e.value.constant,e.value.constant||r.push.apply(r,e.value.toWatch)}),e.constant=n,e.toWatch=r;break;case lo.ThisExpression:e.constant=!1,e.toWatch=[];break;case lo.LocalsExpression:e.constant=!1,e.toWatch=[]}}function an(e){if(1==e.length){var t=e[0].expression,r=t.toWatch;return 1!==r.length?r:r[0]!==t?r:n}}function sn(e){return e.type===lo.Identifier||e.type===lo.MemberExpression}function un(e){return 1===e.body.length&&sn(e.body[0].expression)?{type:lo.AssignmentExpression,left:e.body[0].expression,right:{type:lo.NGValueParameter},operator:"="}:void 0}function ln(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===lo.Literal||e.body[0].expression.type===lo.ArrayExpression||e.body[0].expression.type===lo.ObjectExpression)}function cn(e){return e.constant}function fn(e,t){this.astBuilder=e,this.$filter=t}function pn(e,t){this.astBuilder=e,this.$filter=t}function dn(e){return"constructor"==e}function hn(e){return S(e.valueOf)?e.valueOf():fo.call(e)}function mn(){var e=ve(),t=ve();this.$get=["$filter",function(r){function i(e,t){return null==e||null==t?e===t:"object"==typeof e&&(e=hn(e),"object"==typeof e)?!1:e===t||e!==e&&t!==t}function a(e,t,r,o,a){var s,u=o.inputs;if(1===u.length){var l=i;return u=u[0],e.$watch(function(e){var t=u(e);return i(t,l)||(s=o(e,n,n,[t]),l=t&&hn(t)),s},t,r,a)}for(var c=[],f=[],p=0,d=u.length;d>p;p++)c[p]=i,f[p]=null;return e.$watch(function(e){for(var t=!1,r=0,a=u.length;a>r;r++){var l=u[r](e);(t||(t=!i(l,c[r])))&&(f[r]=l,c[r]=l&&hn(l))}return t&&(s=o(e,n,n,f)),s},t,r,a)}function s(e,t,n,r){var i,o;return i=e.$watch(function(e){return r(e)},function(e,n,r){o=e,S(t)&&t.apply(this,arguments),b(e)&&r.$$postDigest(function(){b(o)&&i()})},n)}function u(e,t,n,r){function i(e){var t=!0;return o(e,function(e){b(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return r(e)},function(e,n,r){s=e,S(t)&&t.call(this,e,n,r),i(e)&&r.$$postDigest(function(){i(s)&&a()})},n)}function l(e,t,n,r){var i;return i=e.$watch(function(e){return i(),r(e)},t,n)}function c(e,t){if(!t)return e;var n=e.$$watchDelegate,r=!1,i=n!==u&&n!==s,o=i?function(n,i,o,a){var s=r&&a?a[0]:e(n,i,o,a);return t(s,n,i)}:function(n,r,i,o){var a=e(n,r,i,o),s=t(a,n,r);return b(a)?s:a};return e.$$watchDelegate&&e.$$watchDelegate!==a?o.$$watchDelegate=e.$$watchDelegate:t.$stateful||(o.$$watchDelegate=a,r=!e.inputs,o.inputs=e.inputs?e.inputs:[e]),o}var f=Zr().noUnsafeEval,p={csp:f,expensiveChecks:!1},d={csp:f,expensiveChecks:!0};return function(n,i,o){var f,h,v;switch(typeof n){case"string":n=n.trim(),v=n;var g=o?t:e;if(f=g[v],!f){":"===n.charAt(0)&&":"===n.charAt(1)&&(h=!0,n=n.substring(2));var $=o?d:p,y=new uo($),b=new co(y,r,$);f=b.parse(n),f.constant?f.$$watchDelegate=l:h?f.$$watchDelegate=f.literal?u:s:f.inputs&&(f.$$watchDelegate=a),g[v]=f}return c(f,i);case"function":return c(n,i);default:return c(m,i)}}}]}function vn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){retu
},r.$observe("max",function(e){b(e)&&!E(e)&&(e=parseFloat(e,10)),u=E(e)&&!isNaN(e)?e:n,i.$validate()})}}function vr(e,t,n,r,i,o){cr(e,t,n,r,i,o),ur(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||No.test(n)}}function gr(e,t,n,r,i,o){cr(e,t,n,r,i,o),ur(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||Io.test(n)}}function $r(e,t,n,r){y(n.name)&&t.attr("name",u());var i=function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)};t.on("click",i),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function yr(e,t,n,r,i){var o;if(b(r)){if(o=e(r),!o.constant)throw va("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return o(t)}return i}function br(e,t,n,r,i,o,a,s){var u=yr(s,e,"ngTrueValue",n.ngTrueValue,!0),l=yr(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){r.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e===!1},r.$formatters.push(function(e){return U(e,u)}),r.$parsers.push(function(e){return e?u:l})}function wr(e,t){return e="ngClass"+e,["$animate",function(n){function r(e,t){var n=[];e:for(var r=0;r<e.length;r++){for(var i=e[r],o=0;o<t.length;o++)if(i==t[o])continue e;n.push(i)}return n}function i(e){var t=[];return Hr(e)?(o(e,function(e){t=t.concat(i(e))}),t):C(e)?e.split(" "):w(e)?(o(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t):e}return{restrict:"AC",link:function(a,s,u){function l(e){var t=f(e,1);u.$addClass(t)}function c(e){var t=f(e,-1);u.$removeClass(t)}function f(e,t){var n=s.data("$classCounts")||ve(),r=[];return o(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&r.push(e))}),s.data("$classCounts",n),r.join(" ")}function p(e,t){var i=r(t,e),o=r(e,t);i=f(i,1),o=f(o,-1),i&&i.length&&n.addClass(s,i),o&&o.length&&n.removeClass(s,o)}function d(e){if(t===!0||a.$index%2===t){var n=i(e||[]);if(h){if(!U(e,h)){var r=i(h);p(r,n)}}else l(n)}h=V(e)}var h;a.$watch(u[e],d,!0),u.$observe("class",function(t){d(a.$eval(u[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,r){var o=1&n;if(o!==(1&r)){var s=i(a.$eval(u[e]));o===t?l(s):c(s)}})}}}]}function xr(e){function t(e,t,u){y(t)?r("$pending",e,u):i("$pending",e,u),N(t)?t?(f(s.$error,e,u),c(s.$$success,e,u)):(c(s.$error,e,u),f(s.$$success,e,u)):(f(s.$error,e,u),f(s.$$success,e,u)),s.$pending?(o(da,!0),s.$valid=s.$invalid=n,a("",null)):(o(da,!1),s.$valid=Cr(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var l;l=s.$pending&&s.$pending[e]?n:s.$error[e]?!1:s.$$success[e]?!0:null,a(e,l),s.$$parentForm.$setValidity(e,l,s)}function r(e,t,n){s[e]||(s[e]={}),c(s[e],t,n)}function i(e,t,r){s[e]&&f(s[e],t,r),Cr(s[e])&&(s[e]=n)}function o(e,t){t&&!l[e]?(p.addClass(u,e),l[e]=!0):!t&&l[e]&&(p.removeClass(u,e),l[e]=!1)}function a(e,t){e=e?"-"+le(e,"-"):"",o(sa+e,t===!0),o(ua+e,t===!1)}var s=e.ctrl,u=e.$element,l={},c=e.set,f=e.unset,p=e.$animate;l[ua]=!(l[sa]=u.hasClass(sa)),s.$setValidity=t}function Cr(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function Er(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}var kr=/^\/(.+)\/([a-z]*)$/,Sr="validity",Ar=function(e){return C(e)?e.toLowerCase():e},Tr=Object.prototype.hasOwnProperty,Dr=function(e){return C(e)?e.toUpperCase():e},Or=function(e){return C(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Fr=function(e){return C(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(Ar=Or,Dr=Fr);var Mr,Nr,Ir,jr,_r=[].slice,Pr=[].splice,Lr=[].push,Rr=Object.prototype.toString,zr=Object.getPrototypeOf,Vr=r("ng"),Ur=e.angular||(e.angular={}),qr=0;Mr=t.documentMode,m.$inject=[],v.$inject=[];var Hr=Array.isArray,Br=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Wr=function(e){return C(e)?e.trim():e},Gr=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Zr=function(){function e(){try{return new Function("
i("l");break;case lo.NGValueParameter:this.assign(t,"v"),i("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),r[n]},assign:function(e,t){return e?(this.current().body.push(e,"=",t,";"),e):void 0},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(e===!0)t();else{var r=this.current().body;r.push("if(",e,"){"),t(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){return e+"."+t},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},addEnsureSafeAssignContext:function(e){this.current().body.push(this.ensureSafeAssignContext(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},getStringValue:function(e){this.assign(e,"getStringValue("+e+",text)")},ensureSafeAssignContext:function(e){return"ensureSafeAssignContext("+e+",text)"},lazyRecurse:function(e,t,n,r,i,o){var a=this;return function(){a.recurse(e,t,n,r,i,o)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(C(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(E(e))return e.toString();if(e===!0)return"true";if(e===!1)return"false";if(null===e)return"null";if("undefined"==typeof e)return"undefined";throw no("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},pn.prototype={compile:function(e,t){var n=this,r=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,on(r,n.$filter);var i,a;(i=un(r))&&(a=this.recurse(i));var s,u=an(r.body);u&&(s=[],o(u,function(e,t){var r=n.recurse(e);e.input=r,s.push(r),e.watchId=t}));var l=[];o(r.body,function(e){l.push(n.recurse(e.expression))});var c=0===r.body.length?function(){}:1===r.body.length?l[0]:function(e,t){var n;return o(l,function(r){n=r(e,t)}),n};return a&&(c.assign=function(e,t,n){return a(e,n,t)}),s&&(c.inputs=s),c.literal=ln(r),c.constant=cn(r),c},recurse:function(e,t,r){var i,a,s,u=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case lo.Literal:return this.value(e.value,t);case lo.UnaryExpression:return a=this.recurse(e.argument),this["unary"+e.operator](a,t);case lo.BinaryExpression:return i=this.recurse(e.left),a=this.recurse(e.right),this["binary"+e.operator](i,a,t);case lo.LogicalExpression:return i=this.recurse(e.left),a=this.recurse(e.right),this["binary"+e.operator](i,a,t);case lo.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case lo.Identifier:return Yt(e.name,u.expression),u.identifier(e.name,u.expensiveChecks||dn(e.name),t,r,u.expression);case lo.MemberExpression:return i=this.recurse(e.object,!1,!!r),e.computed||(Yt(e.property.name,u.expression),a=e.property.name),e.computed&&(a=this.recurse(e.property)),e.computed?this.computedMember(i,a,t,r,u.expression):this.nonComputedMember(i,a,u.expensiveChecks,t,r,u.expression);case lo.CallExpression:return s=[],o(e.arguments,function(e){s.push(u.recu
}),o.removeUnknownOption=function(){o.unknownOption.parent()&&o.unknownOption.remove()},o.readValue=function(){return o.removeUnknownOption(),e.val()},o.writeValue=function(t){o.hasOption(t)?(o.removeUnknownOption(),e.val(t),""===t&&o.emptyOption.prop("selected",!0)):null==t&&o.emptyOption?(o.removeUnknownOption(),e.val("")):o.renderUnknownOption(t)},o.addOption=function(e,t){de(e,'"option value"'),""===e&&(o.emptyOption=t);var n=a.get(e)||0;a.put(e,n+1),o.ngModelCtrl.$render(),Er(t)},o.removeOption=function(e){var t=a.get(e);t&&(1===t?(a.remove(e),""===e&&(o.emptyOption=n)):a.put(e,t-1))},o.hasOption=function(e){return!!a.get(e)},o.registerOption=function(e,t,n,r,i){if(r){var a;n.$observe("value",function(e){b(a)&&o.removeOption(a),a=e,o.addOption(e,t)})}else i?e.$watch(i,function(e,r){n.$set("value",e),r!==e&&o.removeOption(r),o.addOption(e,t)}):o.addOption(n.value,t);t.on("$destroy",function(){o.removeOption(n.value),o.ngModelCtrl.$render()})}}],za=function(){function e(e,t,n,r){var i=r[1];if(i){var a=r[0];if(a.ngModelCtrl=i,i.$render=function(){a.writeValue(i.$viewValue)},t.on("change",function(){e.$apply(function(){i.$setViewValue(a.readValue())})}),n.multiple){a.readValue=function(){var e=[];return o(t.find("option"),function(t){t.selected&&e.push(t.value)}),e},a.writeValue=function(e){var n=new Je(e);o(t.find("option"),function(e){e.selected=b(n.get(e.value))})};var s,u=NaN;e.$watch(function(){u!==i.$viewValue||U(s,i.$viewValue)||(s=V(i.$viewValue),i.$render()),u=i.$viewValue}),i.$isEmpty=function(e){return!e||0===e.length}}}}return{restrict:"E",require:["select","?ngModel"],controller:Ra,priority:1,link:{pre:e}}},Va=["$interpolate",function(e){return{restrict:"E",priority:100,compile:function(t,n){if(b(n.value))var r=e(n.value,!0);else{var i=e(t.text(),!0);i||n.$set("value",t.text())}return function(e,t,n){var o="$selectController",a=t.parent(),s=a.data(o)||a.parent().data(o);s&&s.registerOption(e,t,n,r,i)}}}}],Ua=g({restrict:"E",terminal:!1}),qa=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}},Ha=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,i,o){if(o){var a,s=i.ngPattern||i.pattern;i.$observe("pattern",function(e){if(C(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,J(t));a=e||n,o.$validate()}),o.$validators.pattern=function(e,t){return o.$isEmpty(t)||y(a)||a.test(t)}}}}},Ba=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=d(e);i=isNaN(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return 0>i||r.$isEmpty(t)||t.length<=i}}}}},Wa=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=d(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};return e.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(ce(),be(Ur),Ur.module("ngLocale",[],["$provide",function(e){function t(e){e+="";var t=e.indexOf(".");return-1==t?0:e.length-t-1}function r(e,r){var i=r;n===i&&(i=Math.min(t(e),3));var o=Math.pow(10,i),a=(e*o|0)%o;return{v:i,f:a}}var i={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,
return p}}(this),x.onload=function(n){return function(r){var i;if(e[0].status!==t.CANCELED&&4===x.readyState){if($=x.responseText,x.getResponseHeader("content-type")&&~x.getResponseHeader("content-type").indexOf("application/json"))try{$=JSON.parse($)}catch(o){r=o,$="Invalid JSON response from server."}return y(),200<=(i=x.status)&&300>i?n._finished(e,$,r):a()}}}(this),x.onerror=function(n){return function(){return e[0].status!==t.CANCELED?a():void 0}}(this),g=null!=(M=x.upload)?M:x,g.onprogress=y,l={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&r(l,this.options.headers);for(s in l)u=l[s],u&&x.setRequestHeader(s,u);if(o=new FormData,this.options.params){N=this.options.params;for(h in N)w=N[h],o.append(h,w)}for(E=0,T=e.length;T>E;E++)n=e[E],this.emit("sending",n,x,o);if(this.options.uploadMultiple&&this.emit("sendingmultiple",e,x,o),"FORM"===this.element.tagName)for(I=this.element.querySelectorAll("input, textarea, select, button"),k=0,D=I.length;D>k;k++)if(f=I[k],p=f.getAttribute("name"),d=f.getAttribute("type"),"SELECT"===f.tagName&&f.hasAttribute("multiple"))for(j=f.options,S=0,O=j.length;O>S;S++)v=j[S],v.selected&&o.append(p,v.value);else(!d||"checkbox"!==(_=d.toLowerCase())&&"radio"!==_||f.checked)&&o.append(p,f.value);for(c=F=0,P=e.length-1;P>=0?P>=F:F>=P;c=P>=0?++F:--F)o.append(this._getParamName(c),e[c],e[c].name);return this.submitRequest(x,o,e)},t.prototype.submitRequest=function(e,t,n){return e.send(t)},t.prototype._finished=function(e,n,r){var i,o,a;for(o=0,a=e.length;a>o;o++)i=e[o],i.status=t.SUCCESS,this.emit("success",i,n,r),this.emit("complete",i);return this.options.uploadMultiple&&(this.emit("successmultiple",e,n,r),this.emit("completemultiple",e)),this.options.autoProcessQueue?this.processQueue():void 0},t.prototype._errorProcessing=function(e,n,r){var i,o,a;for(o=0,a=e.length;a>o;o++)i=e[o],i.status=t.ERROR,this.emit("error",i,n,r),this.emit("complete",i);return this.options.uploadMultiple&&(this.emit("errormultiple",e,n,r),this.emit("completemultiple",e)),this.options.autoProcessQueue?this.processQueue():void 0},t}(n),e.version="4.2.0",e.options={},e.optionsForElement=function(t){return t.getAttribute("id")?e.options[r(t.getAttribute("id"))]:void 0},e.instances=[],e.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},e.autoDiscover=!0,e.discover=function(){var t,n,r,i,o,a;for(document.querySelectorAll?r=document.querySelectorAll(".dropzone"):(r=[],t=function(e){var t,n,i,o;for(o=[],n=0,i=e.length;i>n;n++)t=e[n],/(^| )dropzone($| )/.test(t.className)?o.push(r.push(t)):o.push(void 0);return o},t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))),a=[],i=0,o=r.length;o>i;i++)n=r[i],e.optionsForElement(n)!==!1?a.push(new e(n)):a.push(void 0);return a},e.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],e.isBrowserSupported=function(){var t,n,r,i,o;if(t=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(o=e.blacklistedBrowsers,r=0,i=o.length;i>r;r++)n=o[r],n.test(navigator.userAgent)&&(t=!1);else t=!1;else t=!1;return t},u=function(e,t){var n,r,i,o;for(o=[],r=0,i=e.length;i>r;r++)n=e[r],n!==t&&o.push(n);return o},r=function(e){return e.replace(/[\-_](\w)/g,function(e){return e.charAt(1).toUpperCase()})},e.createElement=function(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.childNodes[0]},e.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},e.getElement=function(e,t){var n;if("string"==typeof e?n=document.querySelector(e):null!=e.nodeType&&(n=e),null==n)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector or a plain HTML el
-1===n.indexOf(e[t])&&n.push(e[t])}return this},at=function(e){var t=Ye[this.id];if(!t)return this;var n,r=t.elements;e="undefined"==typeof e?r.slice(0):ft(e);for(var i=e.length;i--;)if(C.call(e,i)&&e[i]&&1===e[i].nodeType){for(n=0;-1!==(n=r.indexOf(e[i],n));)r.splice(n,1);var o=Je[e[i].zcClippingId];if(o){for(n=0;-1!==(n=o.indexOf(this.id,n));)o.splice(n,1);0===o.length&&(J.autoActivate===!0&&dt(e[i]),delete e[i].zcClippingId)}}return this},st=function(){var e=Ye[this.id];return e&&e.elements?e.elements.slice(0):[]},ut=function(){Ye[this.id]&&(this.unclip(),this.off(),delete Ye[this.id])},lt=function(e){if(!e||!e.type)return!1;if(e.client&&e.client!==this)return!1;var t=Ye[this.id],n=t&&t.elements,r=!!n&&n.length>0,i=!e.target||r&&-1!==n.indexOf(e.target),o=e.relatedTarget&&r&&-1!==n.indexOf(e.relatedTarget),a=e.client&&e.client===this;return t&&(i||o||a)?!0:!1},ct=function(e){var t=Ye[this.id];if("object"==typeof e&&e&&e.type&&t){var n=$e(e),r=t&&t.handlers["*"]||[],i=t&&t.handlers[e.type]||[],o=r.concat(i);if(o&&o.length){var s,u,l,c,f,p=this;for(s=0,u=o.length;u>s;s++)l=o[s],c=p,"string"==typeof l&&"function"==typeof a[l]&&(l=a[l]),"object"==typeof l&&l&&"function"==typeof l.handleEvent&&(c=l,l=l.handleEvent),"function"==typeof l&&(f=A({},e),ye(l,c,[f],n))}}},ft=function(e){return"string"==typeof e&&(e=[]),"number"!=typeof e.length?[e]:e},pt=function(e){if(e&&1===e.nodeType){var t=function(e){(e||(e=a.event))&&("js"!==e._source&&(e.stopImmediatePropagation(),e.preventDefault()),delete e._source)},n=function(n){(n||(n=a.event))&&(t(n),Ze.focus(e))};e.addEventListener("mouseover",n,!1),e.addEventListener("mouseout",t,!1),e.addEventListener("mouseenter",t,!1),e.addEventListener("mouseleave",t,!1),e.addEventListener("mousemove",t,!1),Ke[e.zcClippingId]={mouseover:n,mouseout:t,mouseenter:t,mouseleave:t,mousemove:t}}},dt=function(e){if(e&&1===e.nodeType){var t=Ke[e.zcClippingId];if("object"==typeof t&&t){for(var n,r,i=["move","leave","enter","out","over"],o=0,a=i.length;a>o;o++)n="mouse"+i[o],r=t[n],"function"==typeof r&&e.removeEventListener(n,r,!1);delete Ke[e.zcClippingId]}}};Ze._createClient=function(){et.apply(this,S(arguments))},Ze.prototype.on=function(){return tt.apply(this,S(arguments))},Ze.prototype.off=function(){return nt.apply(this,S(arguments))},Ze.prototype.handlers=function(){return rt.apply(this,S(arguments))},Ze.prototype.emit=function(){return it.apply(this,S(arguments))},Ze.prototype.clip=function(){return ot.apply(this,S(arguments))},Ze.prototype.unclip=function(){return at.apply(this,S(arguments))},Ze.prototype.elements=function(){return st.apply(this,S(arguments))},Ze.prototype.destroy=function(){return ut.apply(this,S(arguments))},Ze.prototype.setText=function(e){if(!Ye[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ze.setData("text/plain",e),this},Ze.prototype.setHtml=function(e){if(!Ye[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ze.setData("text/html",e),this},Ze.prototype.setRichText=function(e){if(!Ye[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ze.setData("application/rtf",e),this},Ze.prototype.setData=function(){if(!Ye[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ze.setData.apply(this,S(arguments)),this},Ze.prototype.clearData=function(){if(!Ye[this.id])throw new Error("Attempted to clear pending clipboard data from a destroyed ZeroClipboard client instance");return Ze.clearData.apply(this,S(arguments)),this},Ze.prototype.getData=function(){if(!Ye[this.id])throw new Error("Attempted to get pending clipboard data from a destroyed ZeroClipboard client instance");return Ze.getData.apply(this,S(arguments))},"function"==typeof define&&define.amd?define(function(){return Ze}):"object"==typeof t&&t&&"object"==typeof t.exports&&t.exports?t.exports=Ze:e.ZeroClipboard=Ze}(function(){return this||windo