Files
Grav-Admin-Plugin/themes/grav/js/admin.min.js

30 lines
535 KiB
JavaScript
Raw Normal View History

var Grav=webpackJsonpGrav([0],[function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=r(i),o=n(2),s=r(o),l=n(342),u=r(l),c=n(343),f=r(c),d=n(363),p=r(d),h=n(368),m=r(h),v=n(457),g=r(v),y=n(604),_=r(y);n(611),n(621);var b=n(622),w=n(331),x=r(w),k=n(358),S=r(k);n(623),n(624),n(636),n(637),n(638);var C=n(640),E=r(C);u.default.start(),e.setInterval(function(){y.Instance.update(),C.Instance.scroller.update()},150),(0,a.default)(e).on("sidebar_state._grav",function(){Object.keys(p.default.Chart.Instances).forEach(function(e){setTimeout(function(){return p.default.Chart.Instances[e].chart.update()},10)})}),t.default={GPM:{GPM:s.default,Instance:o.Instance},KeepAlive:u.default,Dashboard:p.default,Pages:m.default,Forms:g.default,Scrollbar:{Scrollbar:_.default,Instance:y.Instance},Updates:{Updates:f.default,Notifications:c.Notifications,Feed:c.Feed,Instance:c.Instance},Sidebar:{Sidebar:E.default,Instance:C.Instance},MediaFilter:{MediaFilter:b.Filter,Instance:b.Instance},Utils:{request:S.default,toastr:x.default}}}).call(t,function(){return this}())},,function(e,t,n){(function(e){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(330),l=n(335),u=n(341),c=function(t){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"getUpdates";r(this,n);var t=i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.payload={},t.raw={},t.action=e,t}return a(n,t),o(n,[{key:"setPayload",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.payload=e,this.emit("payload",e),this}},{key:"setAction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"getUpdates";return this.action=e,this.emit("action",e),this}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0},r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=new FormData;i.append("admin-nonce",l.config.admin_nonce),r&&i.append("flush",!0),this.emit("fetching",this),e(l.config.base_url_relative+"/update.json/task"+l.config.param_sep+"getUpdates",{credentials:"same-origin",method:"post",body:i}).then(function(e){return t.raw=e,e}).then(s.parseStatus).then(s.parseJSON).then(function(e){return t.response(e)}).then(function(e){return n(e,t.raw)}).then(function(e){return t.emit("fetched",t.payload,t.raw,t)}).catch(s.userFeedbackError)})},{key:"response",value:function(e){return this.payload=e,e}}]),n}(u.EventEmitter);t.default=c;t.Instance=new c}).call(t,n(3))},function(e,t,n){(function(t,n){(function(){!function(e){"use strict";function n(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function i(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return y.iterable&&(t[Symbol.iterator]=function(){return t}),t}function a(e){this.map={},e instanceof a?e.forEach(function(e,t){this.append(t,e)},this):A
2018-12-04 14:54:20 -08:00
n*=4503599627370496,t=52-t,t>0){for(d(0,n),r=u;r>=7;)d(1e7,0),r-=7;for(d(m(10,r,1),0),r=t-1;r>=23;)p(1<<23),r-=23;p(1<<r),d(1,1),p(2),y=h()}else d(0,n),d(1<<-t,0),y=h()+o.call(f,u);return u>0?(s=y.length,y=g+(s<=u?"0."+o.call(f,u-s)+y:y.slice(0,s-u)+"."+y.slice(s-u))):y=g+y,y}})},function(e,t,n){var r=n(37);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){"use strict";var r=n(41),i=n(38);e.exports=function(e){var t=String(i(this)),n="",a=r(e);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(11),i=n(10),a=n(92),o=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==o.call(1,void 0)})||!i(function(){o.call({})})),"Number",{toPrecision:function(e){var t=a(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(t):o.call(t,e)}})},function(e,t,n){var r=n(11);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(11),i=n(7).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(11);r(r.S,"Number",{isInteger:n(98)})},function(e,t,n){var r=n(16),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){var r=n(11);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(11),i=n(98),a=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&a(e)<=9007199254740991}})},function(e,t,n){var r=n(11);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(11);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(11),i=n(88);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(11),i=n(84);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(11),i=n(106),a=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+a(e-1)*a(e+1))}})},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?e<0?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=n(11),a=Math.asinh;i(i.S+i.F*!(a&&1/a(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(11),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(11),i=n(110);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){var r=n(11);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(11),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(11),i=n(114);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(11);r(r.S,"Math",{fround:n(116)})},function(e,t,n){var r=n(110),i=Math.pow,a=i(2,-52),o=i(2,-23),s=i(2,127)*(2-o),l=i(2,-126),u=function(e){return e+1/a-1/a};e.exports=Math.fround||function(e){var t,n,i=Math.abs(e),c=r(e);return i<l?c*u(i/l/o)*l*o:(t=(1+o/a)*i,n=t-(t-i),n>s||n!=n?c*(1/0):c*n)}},function(e,t,n){var r=n(11),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,a=0,o=0,s=arguments.length,l=0;o<s;)n=i(arguments[o++]),l<n?(r=l/n,a=a*r*r+1,l=n):n>0?(r=n/l,a+=r*r):a+=n;return l===1/0?1/0:l*Math.sqrt(a)}})},function(e,t,n){var r=n(11),i=Math.imul;r(r.S+r.F*n(10)(function(){return i(4294967295,5)!=-5||2!=i.length}),"Math",{imul:function(e,t){var n=65535,r=+e,i=+t,a=n&r,o=n&i;return 0|a*o+((n&r>>>16)*o+a*(n&i>>>16)<<16>>>0)}})},function(e,t,n){var r=n(11);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(11);r(r.S,"Math",{log1p:n(106)})},function(e,t,n){var r=
return l.def(f(this,d),e,t)}},_=e.exports=n(222)(d,g,y,l,!0,!0);c(function(){return 7!=(new _).set((Object.freeze||Object)(v),7).get(v)})&&(r=l.getConstructor(g,d),s(r.prototype,y),o.NEED=!0,i(["delete","has","get","set"],function(e){var t=_.prototype,n=t[e];a(t,e,function(t,i){if(u(t)&&!h(t)){this._f||(this._f=new r);var a=this._f[e](t,i);return"set"==e?this:a}return n.call(this,t,i)})}))},function(e,t,n){"use strict";var r=n(218),i=n(25).getWeak,a=n(15),o=n(16),s=n(209),l=n(210),u=n(176),c=n(8),f=n(221),d=u(5),p=u(6),h=0,m=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},g=function(e,t){return d(e.a,function(e){return e[0]===t})};v.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=p(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,a){var u=e(function(e,r){s(e,u,t,"_i"),e._t=t,e._i=h++,e._l=void 0,void 0!=r&&l(r,n,e[a],e)});return r(u.prototype,{delete:function(e){if(!o(e))return!1;var n=i(e);return n===!0?m(f(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!o(e))return!1;var n=i(e);return n===!0?m(f(this,t)).has(e):n&&c(n,this._i)}}),u},def:function(e,t,n){var r=i(a(t),!0);return r===!0?m(e).set(t,n):r[e._i]=n,e},ufstore:m}},function(e,t,n){"use strict";var r=n(225),i=n(221),a="WeakSet";n(222)(a,function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(i(this,a),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(11),i=n(228),a=n(229),o=n(15),s=n(42),l=n(40),u=n(16),c=n(7).ArrayBuffer,f=n(211),d=a.ArrayBuffer,p=a.DataView,h=i.ABV&&c.isView,m=d.prototype.slice,v=i.VIEW,g="ArrayBuffer";r(r.G+r.W+r.F*(c!==d),{ArrayBuffer:d}),r(r.S+r.F*!i.CONSTR,g,{isView:function(e){return h&&h(e)||u(e)&&v in e}}),r(r.P+r.U+r.F*n(10)(function(){return!new d(2).slice(1,void 0).byteLength}),g,{slice:function(e,t){if(void 0!==m&&void 0===t)return m.call(o(this),e);for(var n=o(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),a=new(f(this,d))(l(i-r)),u=new p(this),c=new p(a),h=0;r<i;)c.setUint8(h++,u.getUint8(r++));return a}}),n(196)(g)},function(e,t,n){for(var r,i=n(7),a=n(13),o=n(22),s=o("typed_array"),l=o("view"),u=!(!i.ArrayBuffer||!i.DataView),c=u,f=0,d=9,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<d;)(r=i[p[f++]])?(a(r.prototype,s,!0),a(r.prototype,l,!0)):c=!1;e.exports={ABV:u,CONSTR:c,TYPED:s,VIEW:l}},function(e,t,n){"use strict";function r(e,t,n){var r,i,a,o=new Array(n),s=8*n-t-1,l=(1<<s)-1,u=l>>1,c=23===t?U(2,-24)-U(2,-77):0,f=0,d=e<0||0===e&&1/e<0?1:0;for(e=q(e),e!=e||e===F?(i=e!=e?1:0,r=l):(r=V(B(e)/G),e*(a=U(2,-r))<1&&(r--,a*=2),e+=r+u>=1?c/a:c*U(2,1-u),e*a>=2&&(r++,a/=2),r+u>=l?(i=0,r=l):r+u>=1?(i=(e*a-1)*U(2,t),r+=u):(i=e*U(2,u-1)*U(2,t),r=0));t>=8;o[f++]=255&i,i/=256,t-=8);for(r=r<<t|i,s+=t;s>0;o[f++]=255&r,r/=256,s-=8);return o[--f]|=128*d,o}function i(e,t,n){var r,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,l=n-1,u=e[l--],c=127&u;for(u>>=7;s>0;c=256*c+e[l],l--,s-=8);for(r=c&(1<<-s)-1,c>>=-s,s+=t;s>0;r=256*r+e[l],l--,s-=8);if(0===c)c=1-o;else{if(c===a)return r?NaN:u?-F:F;r+=U(2,t),c-=o}return(u?-1:1)*r*U(2,c-t)}function a(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function o(e){return[255&e]}function s(e){return[255&e,e>>8&255]}function l(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function u(e){return r(e,52,8)}function c(e){return r(e,23,4)}function f(e,t,n){E(e[T],t,{get:function(){return this[n]}})}function d(e,t,n,r){var i=+n,a=S(i);if(a+t>e[Y])throw N(j);var o=e[K]._b,s=a+e[J],l=o.slice(s,s+t);return r?l:l.reverse()}function p(e,t,n,r,i,a){var o=+n,s=S(o);if(s+t>e[Y])throw N(j);for(var l=e[K]._b,u=s+e[J],c=r(+i),f=0;f<t;f++)l[u+f]=c[a?f:t-f-1]}var h=n(7),m=n(9),v=n(27),g=n(228),y=n(13),_=n(218),b=n(10),w=n(209),x=n(41),k=n(40),S=n(230),C=n(52).f,E=n(14).f,A=n(192),I=n(28),M="ArrayBuffer",O="DataView",T="prototype",P="Wrong length!",j="Wrong index!",D=h[M
t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,O):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,O)}function d(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function p(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(d,this),this.reset(!0)}function m(e){if(e){var t=e[w];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(_.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:v}}function v(){return{value:g,done:!0}}var g,y=Object.prototype,_=y.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},w=b.iterator||"@@iterator",x=b.asyncIterator||"@@asyncIterator",k=b.toStringTag||"@@toStringTag",S="object"==typeof e,C=t.regeneratorRuntime;if(C)return void(S&&(e.exports=C));C=t.regeneratorRuntime=S?e.exports:{},C.wrap=r;var E="suspendedStart",A="suspendedYield",I="executing",M="completed",O={},T={};T[w]=function(){return this};var P=Object.getPrototypeOf,j=P&&P(P(m([])));j&&j!==y&&_.call(j,w)&&(T=j);var D=s.prototype=a.prototype=Object.create(T);o.prototype=D.constructor=s,s.constructor=o,s[k]=o.displayName="GeneratorFunction",C.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},C.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,k in e||(e[k]="GeneratorFunction")),e.prototype=Object.create(D),e},C.awrap=function(e){return{__await:e}},l(u.prototype),u.prototype[x]=function(){return this},C.AsyncIterator=u,C.async=function(e,t,n,i){var a=new u(r(e,t,n,i));return C.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},l(D),D[k]="Generator",D[w]=function(){return this},D.toString=function(){return"[object Generator]"},C.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},C.values=m,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(p),!e)for(var t in this)"t"===t.charAt(0)&&_.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=_.call(i,"catchLoc"),s=_.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&_.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,O):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),O},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),O}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tr
e.removeAttr("disabled").find("> .fa").removeClass("fa-refresh fa-spin").addClass("fa-cloud-download")})})},function(e,t,n){(function(e){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}var r=n(1),i=t(r),a=n(358),o=t(a),s=(0,i.default)('input[type="radio"][name="channel-switch"]');s&&s.on("change",function(t){var n=(0,i.default)(t.target),r=""+n.parent("[data-url]").data("url");(0,o.default)(r,{method:"post",body:{task:"gpmRelease",release:n.val()}},function(t){t.reload&&e.location.reload()})})}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(364),a=r(i),o=n(366);n(367),t.default={Chart:{Chart:a.default,UpdatesChart:i.UpdatesChart,Instances:i.Instances},Cache:o.Instance}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instances=t.UpdatesChart=t.defaults=void 0;var s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;if(void 0!==o)return o.call(r)},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),f=n(365),d=r(f),p=n(335),h=n(2),m=n(343),v=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,g=t.defaults={data:{series:[100,0]},options:{Pie:{donut:!0,donutWidth:10,startAngle:0,total:100,showLabel:!1,height:150,chartPadding:5},Bar:{height:164,chartPadding:v?10:5,axisX:{showGrid:!1,labelOffset:{x:0,y:0}},axisY:{offset:15,showLabel:!0,showGrid:!0,labelOffset:{x:5,y:5},scaleMinSpace:v?10:20}}}},y=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(o(this,e),this.element=(0,c.default)(t)||[],this.element[0]){var a=(this.element.data("chart-type")||"pie").toLowerCase();this.type=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase(),r=Object.assign({},g.options[this.type],r),i=Object.assign({},g.data,i),Object.assign(this,{options:r,data:i}),this.chart=d.default[this.type](this.element.find(".ct-chart").empty()[0],this.data,this.options),this.chart.on("created",function(){n.element.find(".hidden").removeClass("hidden"),n.element.find(".ct-label").each(function(e,t){t=(0,c.default)(t);var n=t.html().replace("&lt;","<").replace("&gt;",">");t.html(n)})})}}return l(e,[{key:"updateData",value:function(e){Object.assign(this.data,e),this.chart.update(this.data)}}]),e}();t.default=y;var _=t.UpdatesChart=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o(this,t);var a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));return a.chart.on("draw",function(e){return a.draw(e)}),h.Instance.on("fetched",function(e){if(e.payload){var t=e.payload.grav,n=100*(e.payload.resources.total+(t.isUpdatable?1:0))/(e.payload.installed+(t.isUpdatable?1:0)),r=100-n;a.updateData({series:[r,n]}),e.payload.resources.total&&m.Instance.maintenance("show")}}),a}return a(t,e),l(t,[{key:"draw",value:function(e){if(!e.index){var t=p.translations.PLUGIN_ADMIN[100===e.value?"FULLY_UPDATED":"UPDATES_AVAILA
l.default)(i).data("remodal")].open(),r.on("confirmation",i,o),r.on("cancellation",i,s)};var g={timeout:0,thumbnailWidth:200,thumbnailHeight:150,addRemoveLinks:!1,dictDefaultMessage:m.translations.PLUGIN_ADMIN.DROP_FILES_HERE_TO_UPLOAD.replace(/&lt;/g,"<").replace(/&gt;/g,">"),dictRemoveFileConfirmation:"[placeholder]",previewTemplate:('\n <div class="dz-preview dz-file-preview dz-no-editor">\n <div class="dz-details">\n <div class="dz-filename"><span data-dz-name></span></div>\n <div class="dz-size" data-dz-size></div>\n <img data-dz-thumbnail />\n </div>\n <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n <div class="dz-success-mark"><span>✔</span></div>\n <div class="dz-error-mark"><span>✘</span></div>\n <div class="dz-error-message"><span data-dz-errormessage></span></div>\n <a class="dz-unset" title="'+m.translations.PLUGIN_ADMIN.UNSET+'" href="#" data-dz-unset>'+m.translations.PLUGIN_ADMIN.UNSET+'</a>\n <a class="dz-remove" title="'+m.translations.PLUGIN_ADMIN.DELETE+'" href="javascript:undefined;" data-dz-remove>'+m.translations.PLUGIN_ADMIN.DELETE+'</a>\n <a class="dz-metadata" title="'+m.translations.PLUGIN_ADMIN.METADATA+'" href="#" target="_blank" data-dz-metadata>'+m.translations.PLUGIN_ADMIN.METADATA+'</a>\n <a class="dz-view" title="'+m.translations.PLUGIN_ADMIN.VIEW+'" href="#" target="_blank" data-dz-view>'+m.translations.PLUGIN_ADMIN.VIEW+"</a>\n </div>").trim()};e.EXIF=d.default;var y=function(e,t,n){var r=n.resolution;return r?void setTimeout(function(){var i="";return r.min&&Object.keys(r.min).forEach(function(t){r.min[t]&&e[t]<r.min[t]&&(i+=m.translations.PLUGIN_FORM.RESOLUTION_MIN.replace(/{{attr}}/g,t).replace(/{{min}}/g,r.min[t]))}),n.resizeWidth||n.resizeHeight||r.max&&Object.keys(r.max).forEach(function(t){r.max[t]&&e[t]>r.max[t]&&(i+=m.translations.PLUGIN_FORM.RESOLUTION_MAX.replace(/{{attr}}/g,t).replace(/{{max}}/g,r.max[t]))}),i?t(i):t()},50):t()},_=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.container,a=void 0===r?".dropzone.files-upload":r,o=n.options,s=void 0===o?{}:o;i(this,t),this.container=(0,l.default)(a),this.container.length&&(this.urls={},this.options=Object.assign({},v,g,{klass:this,url:this.container.data("file-url-add")||m.config.current_url,acceptedFiles:this.container.data("media-types"),init:this.initDropzone},this.container.data("dropzone-options"),s),this.options=Object.assign({},this.options,{accept:function(e,t){y(e,t,this.options)}}),this.dropzone=new c.default(a,this.options),this.dropzone.on("complete",this.onDropzoneComplete.bind(this)),this.dropzone.on("success",this.onDropzoneSuccess.bind(this)),this.dropzone.on("removedfile",this.onDropzoneRemovedFile.bind(this)),this.dropzone.on("sending",this.onDropzoneSending.bind(this)),this.dropzone.on("error",this.onDropzoneError.bind(this)),this.container.on("mouseenter","[data-dz-view]",function(t){var n=JSON.parse(e.container.find('[name][type="hidden"]').val()||"{}"),r=(0,l.default)(t.currentTarget),i=r.parent(".dz-preview").find(".dz-filename"),a=encodeURI(i.text()),o=Object.keys(n).filter(function(e){return n[e].name===a}).shift();r.attr("href",m.config.base_url_simple+"/"+o)}),(0,l.default)(this.dropzone.element).find("[data-dz-unset]").hide())}return o(t,[{key:"initDropzone",value:function(){var e=this,t=this.options.klass.container.find("[data-file]"),n=this;t.length&&(t.each(function(t,r){r=(0,l.default)(r);var i=r.data("file"),a={name:i.name,size:i.size,type:i.type,status:c.default.ADDED,accepted:!0,url:e.options.url,removeUrl:i.remove};n.files.push(a),n.options.addedfile.call(n,a),a.type.match(/^image\//)&&(console.log("mock"),n.options.thumbnail.call(n,a,i.path),n.createThumbnailFromUrl(a,i.path)),r.remove()}),(0,l.default)(n.element).find("[data-dz-unset]").hide())}},{key:"getURI",value:function(){return this.container.data("mediaUri")||""}},{key:"onDropzoneSending",value:function(e
e.textarea;u({name:"bold",replace:"**$1$cur**",codemirror:t,button:n})}}},{italic:{identifier:"italic",title:o.translations.PLUGIN_ADMIN.ITALIC,label:'<i class="fa fa-fw fa-italic"></i>',modes:["gfm","markdown"],shortcut:["Ctrl-I","Cmd-I"],action:function(e){var t=e.codemirror,n=e.button;e.textarea;u({name:"italic",replace:"_$1$cur_",codemirror:t,button:n})}}},{strike:{identifier:"strike",title:o.translations.PLUGIN_ADMIN.STRIKETHROUGH,label:'<i class="fa fa-fw fa-strikethrough"></i>',modes:["gfm","markdown"],action:function(e){var t=e.codemirror,n=e.button;e.textarea;u({name:"strike",replace:"~~$1$cur~~",codemirror:t,button:n})}}},{delimiter:{identifier:"delimiter",title:o.translations.PLUGIN_ADMIN.SUMMARY_DELIMITER,label:'<i class="fa fa-fw fa-minus"></i>',modes:["gfm","markdown"],action:function(e){var t=e.codemirror,n=e.button;e.textarea;u({name:"delimiter",replace:o.config.site.delimiter+"$1",codemirror:t,button:n,mode:"replaceLine"})}}},{link:{identifier:"link",title:o.translations.PLUGIN_ADMIN.LINK,label:'<i class="fa fa-fw fa-link"></i>',modes:["gfm","markdown"],shortcut:["Ctrl-K","Cmd-K"],action:function(e){var t=e.codemirror,n=e.button;e.textarea;u({name:"link",replace:"[$1]($cur)",codemirror:t,button:n})}}},{image:{identifier:"image",title:o.translations.PLUGIN_ADMIN.IMAGE,label:'<i class="fa fa-fw fa-picture-o"></i>',modes:["gfm","markdown"],action:function(e){var t=e.codemirror,n=e.button;e.textarea;u({name:"image",replace:"![$1](http://$cur)",codemirror:t,button:n})}}},{blockquote:{identifier:"blockquote",title:o.translations.PLUGIN_ADMIN.BLOCKQUOTE,label:'<i class="fa fa-fw fa-quote-right"></i>',modes:["gfm","markdown"],action:function(e){var t=e.codemirror,n=e.button;e.textarea;u({name:"blockquote",replace:"> $1",codemirror:t,button:n,mode:"replaceLine"})}}},{listUl:{identifier:"listUl",title:o.translations.PLUGIN_ADMIN.UNORDERED_LIST,label:'<i class="fa fa-fw fa-list-ul"></i>',modes:["gfm","markdown"],action:function(e){var t=e.codemirror,n=e.button;e.textarea;u({name:"listUl",replace:"* $1",codemirror:t,button:n,mode:"replaceLine"})}}},{listOl:{identifier:"listOl",title:o.translations.PLUGIN_ADMIN.ORDERED_LIST,label:'<i class="fa fa-fw fa-list-ol"></i>',modes:["gfm","markdown"],action:function(e){var t=e.codemirror,n=e.button;e.textarea;u({name:"listOl",replace:". $1",codemirror:t,button:n,mode:"replaceLine",runner:function(e,n){var r=t.getLineNumber(e),i=t.getLine(r-1)||"",a=i.match(/^(\d+)\./),o=1+(a?Number(a[1]):0);return""+o+n}})}}}],states:[{code:{identifier:"editor",title:o.translations.PLUGIN_ADMIN.EDITOR,label:'<i class="fa fa-fw fa-code"></i>',action:function(e){var t=(e.codemirror,e.button),n=e.textarea,r=e.ui;"editor"===n.data("grav-editor-mode")&&t.addClass("editor-active"),t.on("click.states.editor",function(){t.siblings().removeClass("editor-active"),t.addClass("editor-active"),n.data("grav-editor-mode","editor");var e=n.data("grav-editor-preview-container"),i=n.parent(".grav-editor-content");i.addClass("is-active"),r.navigation.find(".grav-editor-actions").css("visibility","visible"),e&&e.removeClass("is-active")})}}},{preview:{identifier:"preview",title:o.translations.PLUGIN_ADMIN.PREVIEW,label:'<i class="fa fa-fw fa-eye"></i>',modes:["gfm","markdown"],action:function(e){var t=(e.codemirror,e.button),n=e.textarea,r=e.ui;"preview"===n.data("grav-editor-mode")&&t.addClass("editor-active"),t.on("click.states.preview",function(){var e=n.data("grav-editor-preview-container"),i=n.parent(".grav-editor-content");t.siblings().removeClass("editor-active"),t.addClass("editor-active"),n.data("grav-editor-mode","preview"),e||(e=(0,a.default)('<div class="grav-editor-preview" />'),i.after(e),n.data("grav-editor-preview-container",e)),e.css({height:i.height()}),e.addClass("is-active"),i.removeClass("is-active"),r.navigation.find(".grav-editor-actions").css("visibility","hidden");var s=n.data("grav-urlpreview")+"/task"+o.config.param_sep+"processmarkdown",u=n.closest("form").serializeArray(),c={};u.map(function(e){c[e.name]=e.value}),(0,l.default)(s,{method:"post",body:c},function(t){return e.html(t.pr
null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,r.gitHubSpice!==!1)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:i},s={taskLists:!0,strikethrough:!0,emoji:!0};for(var l in r)s[l]=r[l];return s.name="markdown",e.overlayMode(e.getMode(n,s),o)},"markdown"),e.defineMIME("text/x-gfm","gfm")})},function(e,t,n){!function(e){e(n(393),n(433),n(434))}(function(e){"use strict";e.defineMode("markdown",function(t,n){function r(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}function i(e,t,n){return t.f=t.inline=n,n(e,t)}function a(e,t,n){return t.f=t.block=n,n(e,t)}function o(e){return!e||!/\S/.test(e.string)}function s(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==u){var n=w;if(!n){var r=e.innerMode(b,t.htmlState);n="xml"==r.mode.name&&null===r.state.tagStart&&!r.state.context&&r.state.tokenize.isInText}n&&(t.f=p,t.block=l,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function l(t,a){var s=t.column()===a.indentation,l=o(a.prevLine.stream),u=a.indentedCode,d=a.prevLine.hr,p=a.list!==!1,h=(a.listStack[a.listStack.length-1]||0)+3;a.indentedCode=!1;var m=a.indentation;if(null===a.indentationDiff&&(a.indentationDiff=a.indentation,p)){for(a.em=!1,a.strong=!1,a.code=!1,a.strikethrough=!1,a.list=null;m<a.listStack[a.listStack.length-1];)a.listStack.pop(),a.listStack.length?a.indentation=a.listStack[a.listStack.length-1]:a.list=!1;a.list!==!1&&(a.indentationDiff=m-a.listStack[a.listStack.length-1])}var v=!(l||d||a.prevLine.header||p&&u||a.prevLine.fencedCodeEnd),y=(a.list===!1||d||l)&&a.indentation<=h&&t.match(S),_=null;if(a.indentationDiff>=4&&(u||a.prevLine.fencedCodeEnd||a.prevLine.header||l))return t.skipToEnd(),a.indentedCode=!0,x.code;if(t.eatSpace())return null;if(s&&a.indentation<=h&&(_=t.match(A))&&_[1].length<=6)return a.quote=0,a.header=_[1].length,a.thisLine.header=!0,n.highlightFormatting&&(a.formatting="header"),a.f=a.inline,f(a);if(a.indentation<=h&&t.eat(">"))return a.quote=s?1:a.quote+1,n.highlightFormatting&&(a.formatting="quote"),t.eatSpace(),f(a);if(!y&&!a.setext&&s&&a.indentation<=h&&(_=t.match(C))){var b=_[1]?"ol":"ul";return a.indentation=m+t.current().length,a.list=!0,a.quote=0,a.listStack.push(a.indentation),n.taskLists&&t.match(E,!1)&&(a.taskList=!0),a.f=a.inline,n.highlightFormatting&&(a.formatting=["list","list-"+b]),f(a)}return s&&a.indentation<=h&&(_=t.match(O,!0))?(a.quote=0,a.fencedEndRE=new RegExp(_[1]+"+ *$"),a.localMode=n.fencedCodeBlockHighlighting&&r(_[2]),a.localMode&&(a.localState=e.startState(a.localMode)),a.f=a.block=c,n.highlightFormatting&&(a.formatting="code-block"),a.code=-1,f(a)):a.setext||!(v&&p||a.quote||a.list!==!1||a.code||y||T.test(t.string))&&(_=t.lookAhead(1))&&(_=_.match(I))?(a.setext?(a.header=a.setext,a.setext=0,t.skipToEnd(),n.highlightFormatting&&(a.formatting="header")):(a.header="="==_[0].charAt(0)?1:2,a.setext=a.header),a.thisLine.header=!0,a.f=a.inline,f(a)):y?(t.skipToEnd(),a.hr=!0,a.thisLine.hr=!0,x.hr):"["===t.peek()?i(t,a,g):i(t,a,a.inline)}function u(t,n){var r=b.token(t,n.htmlState);if(!w){var i=e.innerMode(b,n.htmlState);("xml"==i.mode.name&&null===i.state.tagStart&&!i.state.context&&i.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=p,n.block=l,n.htmlState=null)}return r}function c(e,t){var r=t.listStack[t.listStack.length-1]||0,i=t.indentation<r,o=r+3;if(t.fencedEndRE&&t.indentation<=o&&(i||e.match(t.fencedEndRE))){n.highlightFormatting&&(t.formatting="code-block");var s;return i||(s=f(t)),t.localMode=t.localState=null,t.block=l,t.f=p,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd
2018-12-04 14:54:20 -08:00
streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<e.start)&&(i.streamSeen=e,i.basePos=i.overlayPos=e.start),e.start==i.basePos&&(i.baseCur=t.token(e,i.base),i.basePos=e.pos),e.start==i.overlayPos&&(e.pos=e.start,i.overlayCur=n.token(e,i.overlay),i.overlayPos=e.pos),e.pos=Math.min(i.basePos,i.overlayPos),null==i.overlayCur?i.baseCur:null!=i.baseCur&&i.overlay.combineTokens||r&&null==i.overlay.combineTokens?i.baseCur+" "+i.overlayCur:i.overlayCur},indent:t.indent&&function(e,n){return t.indent(e.base,n)},electricChars:t.electricChars,innerMode:function(e){return{state:e.base,mode:t}},blankLine:function(e){var i,a;return t.blankLine&&(i=t.blankLine(e.base)),n.blankLine&&(a=n.blankLine(e.overlay)),null==a?i:r&&null!=i?i+" "+a:a}}}})},function(e,t,n){!function(e){e(n(393),n(433),n(437),n(430))}(function(e){"use strict";function t(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}function n(e){var t=l[e];return t?t:l[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function r(e,t){var r=e.match(n(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function a(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],a=i.length-1;a>=0;a--)r.unshift(i[a])}function o(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(!i[0]||i[1].test(r(t,i[0])))return i[2]}}var s={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},l={};e.defineMode("htmlmixed",function(n,r){function l(r,a){var s,f=u.token(r,a.htmlState),d=/\btag\b/.test(f);if(d&&!/[<>\s\/]/.test(r.current())&&(s=a.htmlState.tagName&&a.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(s))a.inTag=s+" ";else if(a.inTag&&d&&/>$/.test(r.current())){var p=/^([\S]+) (.*)/.exec(a.inTag);a.inTag=null;var h=">"==r.current()&&o(c[p[1]],p[2]),m=e.getMode(n,h),v=i(p[1],!0),g=i(p[1],!1);a.token=function(e,n){return e.match(v,!1)?(n.token=l,n.localState=n.localMode=null,null):t(e,g,n.localMode.token(e,n.localState))},a.localMode=m,a.localState=e.startState(m,u.indent(a.htmlState,""))}else a.inTag&&(a.inTag+=r.current(),r.eol()&&(a.inTag+=" "));return f}var u=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:r.multilineTagIndentFactor,multilineTagIndentPastTag:r.multilineTagIndentPastTag}),c={},f=r&&r.tags,d=r&&r.scriptTypes;if(a(s,c),f&&a(f,c),d)for(var p=d.length-1;p>=0;p--)c.script.unshift(["type",d[p].matches,d[p].mode]);return{startState:function(){var t=e.startState(u);return{token:l,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(u,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?u.indent(t.htmlState,n):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||u}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},function(e,t,n){!function(e){e(n(393))}(function(e){"use strict";e.defineMode("javascript",function(t,n){function r(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function i(e,t,n){return Re=e,qe=n,t}function a(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=o(n),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return i("number","number");if("."==n&&e.match(".."))return i("spread","meta");if(/[\[\]{}\(\),;\:\.]/.
n.php.context.prev||(n.php=null),"meta"):a.token(t,n.curState);if(t.match(/^<\?\w*/))return n.curMode=a,n.php||(n.php=e.startState(a,i.indent(n.html,""))),n.curState=n.php,"meta";if('"'==n.pending||"'"==n.pending){for(;!t.eol()&&t.next()!=n.pending;);var o="string"}else if(n.pending&&t.pos<n.pending.end){t.pos=n.pending.end;var o=n.pending.style}else var o=i.token(t,n.curState);n.pending&&(n.pending=null);var s,l=t.current(),u=l.search(/<\?/);return u!=-1&&("string"==o&&(s=l.match(/[\'\"]$/))&&!/\?>/.test(l)?n.pending=s[0]:n.pending={end:t.pos,style:o},t.backUp(l.length-u)),o}var i=e.getMode(t,n&&n.htmlMode||"text/html"),a=e.getMode(t,l);return{startState:function(){var t=e.startState(i),r=n.startOpen?e.startState(a):null;return{html:t,php:r,curMode:n.startOpen?a:i,curState:n.startOpen?r:t,pending:null}},copyState:function(t){var n,r=t.html,o=e.copyState(i,r),s=t.php,l=s&&e.copyState(a,s);return n=t.curMode==i?o:l,{html:o,php:l,curMode:t.curMode,curState:n,pending:t.pending}},token:r,indent:function(e,t){return e.curMode!=a&&/^\s*<\//.test(t)||e.curMode==a&&/^\?>/.test(t)?i.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",l)})},function(e,t,n){!function(e){e(n(393))}(function(e){"use strict";function t(e,t,n,r,i,a){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=i,this.prev=a}function n(e,n,r,i){var a=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(a=e.context.indented),e.context=new t(a,n,r,i,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function i(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function a(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function o(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}function s(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}function l(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=l;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function u(e,t){return"type"==t.prevToken&&"type"}function c(e){return e.eatWhile(/[\w\.']/),"number"}function f(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var n=e.match(/"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=h,h(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function d(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function p(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function h(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),r=e.match(new RegExp(".*?\\)"+n+'"'));return r?t.tokenize=null:e.skipToEnd(),"string"}function m(t,n){function r(e){if(e)for(var t in e)e.hasOwnProperty(t)&&i.push(t)}"string"==typeof t&&(t=[t]);var i=[];r(n.keywords),r(n.types),r(n.builtin),r(n.atoms),i.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],i));for(var a=0;a<t.length;++a)e.defineMIME(t[a],n)}function v(e,t){for(var n=!1;!e.eol();){if(!n&&e.match('"""')){t.tokenize=null;break}n="\\"==e.next()&&!n}return"string"}function g(e){return function(t,n){for(var r;r=t.next();){if("*"==r&&t.eat("/")){if(1==e){n.tokenize=null;break}return n.tokenize=g(e-1),n.tokenize(t,n)}if("/"==r&&t.eat("*"))return n.tokenize=g(e+1),n.tokenize(t,n)}return"comment"}}function y(e){return function(t,n){for(var r,i=!1,a=!1;!t.eol();){if(!e&&!i&&t.match('"')){a=!0;break}if(e&&t.match('"""')){a=!0;break}r=t.next(),!i&&"$"==r&&t.match("{")&&t.skipTo("}"),i=!i&&"\\"==r&&!e}return!a&&e||(n.tokenize=null),"string"}}function _(e){
2018-12-04 14:54:20 -08:00
for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",a),e.removeLineClass(e.state.activeLines[t],"background",o),e.removeLineClass(e.state.activeLines[t],"gutter",s)}function n(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function r(e,r){for(var i=[],l=0;l<r.length;l++){var u=r[l],c=e.getOption("styleActiveLine");if("object"==typeof c&&c.nonEmpty?u.anchor.line==u.head.line:u.empty()){var f=e.getLineHandleVisualStart(u.head.line);i[i.length-1]!=f&&i.push(f)}}n(e.state.activeLines,i)||e.operation(function(){t(e);for(var n=0;n<i.length;n++)e.addLineClass(i[n],"wrap",a),e.addLineClass(i[n],"background",o),e.addLineClass(i[n],"gutter",s);e.state.activeLines=i})}function i(e,t){r(e,t.ranges)}var a="CodeMirror-activeline",o="CodeMirror-activeline-background",s="CodeMirror-activeline-gutter";e.defineOption("styleActiveLine",!1,function(n,a,o){var s=o!=e.Init&&o;a!=s&&(s&&(n.off("beforeSelectionChange",i),t(n),delete n.state.activeLines),a&&(n.state.activeLines=[],r(n,n.listSelections()),n.on("beforeSelectionChange",i)))})})},function(e,t,n){!function(e){e(n(393))}(function(e){"use strict";function t(t,n){function r(t){return i.parentNode?(i.style.top=Math.max(0,t.clientY-i.offsetHeight-5)+"px",void(i.style.left=t.clientX+5+"px")):e.off(document,"mousemove",r)}var i=document.createElement("div");return i.className="CodeMirror-lint-tooltip",i.appendChild(n.cloneNode(!0)),document.body.appendChild(i),e.on(document,"mousemove",r),r(t),null!=i.style.opacity&&(i.style.opacity=1),i}function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(e){e.parentNode&&(null==e.style.opacity&&n(e),e.style.opacity=0,setTimeout(function(){n(e)},600))}function i(n,i,a){function o(){e.off(a,"mouseout",o),s&&(r(s),s=null)}var s=t(n,i),l=setInterval(function(){if(s)for(var e=a;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){o();break}}if(!s)return clearInterval(l)},400);e.on(a,"mouseout",o)}function a(e,t,n){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){g(e,t)},this.waitingFor=0}function o(e,t){return t instanceof Function?{getAnnotations:t}:(t&&t!==!0||(t={}),t)}function s(e){var t=e.state.lint;t.hasGutter&&e.clearGutter(y);for(var n=0;n<t.marked.length;++n)t.marked[n].clear();t.marked.length=0}function l(t,n,r,a){var o=document.createElement("div"),s=o;return o.className="CodeMirror-lint-marker-"+n,r&&(s=o.appendChild(document.createElement("div")),s.className="CodeMirror-lint-marker-multiple"),0!=a&&e.on(s,"mouseover",function(e){i(e,t,s)}),o}function u(e,t){return"error"==e?e:t}function c(e){for(var t=[],n=0;n<e.length;++n){var r=e[n],i=r.from.line;(t[i]||(t[i]=[])).push(r)}return t}function f(e){var t=e.severity;t||(t="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message-"+t,"undefined"!=typeof e.messageHTML?n.innerHTML=e.messageHTML:n.appendChild(document.createTextNode(e.message)),n}function d(t,n,r){function i(){o=-1,t.off("change",i)}var a=t.state.lint,o=++a.waitingFor;t.on("change",i),n(t.getValue(),function(n,r){t.off("change",i),a.waitingFor==o&&(r&&n instanceof e&&(n=r),t.operation(function(){h(t,n)}))},r,t)}function p(t){var n=t.state.lint,r=n.options,i=r.options||r,a=r.getAnnotations||t.getHelper(e.Pos(0,0),"lint");if(a)if(r.async||a.async)d(t,a,i);else{var o=a(t.getValue(),i,t);if(!o)return;o.then?o.then(function(e){t.operation(function(){h(t,e)})}):t.operation(function(){h(t,o)})}}function h(e,t){s(e);for(var n=e.state.lint,r=n.options,i=c(t),a=0;a<i.length;++a){var o=i[a];if(o){for(var d=null,p=n.hasGutter&&document.createDocumentFragment(),h=0;h<o.length;++h){var m=o[h],v=m.severity;v||(v="error"),d=u(d,v),r.formatAnnotation&&(m=r.formatAnnotation(m)),n.hasGutter&&p.appendChild(f(m)),m.to&&n.marked.push(e.markText(m.from,m.to,{className:"CodeMirror-lint-mark-"+v,__annotation:m}))}n.hasGutter&&e.setGutterMarker(a,y,l(p,d,o.length>1,n.options.tooltips))}}r.onUpdateLinting&&r.onUpdateLinting(t,i,e)}function m(e){var t=e.state.l
var y=f>>>g&vn;v=v.array[y]=We(v.array[y],r)}v.array[f>>>hn&vn]=h}if(s<a&&(m=m&&m.removeAfter(r,0,s)),o>=p)o-=p,s-=p,l=hn,u=null,m=m&&m.removeBefore(r,0,o);else if(o>i||p<f){for(c=0;u;){var _=o>>>l&vn;if(_!==p>>>l&vn)break;_&&(c+=(1<<l)*_),l-=hn,u=u.array[_]}u&&o>i&&(u=u.removeBefore(r,l,o-c)),u&&p<f&&(u=u.removeAfter(r,l,p-c)),c&&(o-=c,s-=c)}return e.__ownerID?(e.size=s-o,e._origin=o,e._capacity=s,e._level=l,e._root=u,e._tail=m,e.__hash=void 0,e.__altered=!0,e):Be(o,s,l,u,m)}function Je(e,t,n){for(var i=[],o=0,s=0;s<n.length;s++){var l=n[s],u=r(l);u.size>o&&(o=u.size),a(l)||(u=u.map(function(e){return H(e)})),i.push(u)}return o>e.size&&(e=e.setSize(o)),je(e,t,i)}function Xe(e){return e<mn?0:e-1>>>hn<<hn}function Qe(e){return null===e||void 0===e?tt():Ze(e)?e:tt().withMutations(function(t){var r=n(e);ce(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function Ze(e){return de(e)&&u(e)}function et(e,t,n,r){var i=Object.create(Qe.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function tt(){return Xn||(Xn=et(xe(),Ge()))}function nt(e,t,n){var r,i,a=e._map,o=e._list,s=a.get(t),l=void 0!==s;if(n===gn){if(!l)return e;o.size>=mn&&o.size>=2*a.size?(i=o.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=a.remove(t),i=s===o.size-1?o.pop():o.set(s,void 0))}else if(l){if(n===o.get(s)[1])return e;r=a,i=o.set(s,[t,n])}else r=a.set(t,o.size),i=o.set(o.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):et(r,i)}function rt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function it(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function st(e){var t=It(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Mt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return t(n,e,r)!==!1},n)},t.__iteratorUncached=function(t,n){if(t===xn){var r=e.__iterator(t,n);return new w(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===wn?bn:wn,n)},t}function lt(e,t,n){var r=It(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var a=e.get(r,gn);return a===gn?i:t.call(n,a,r,e)},r.__iterateUncached=function(r,i){var a=this;return e.__iterate(function(e,i,o){return r(t.call(n,e,i,o),i,a)!==!1},i)},r.__iteratorUncached=function(r,i){var a=e.__iterator(xn,i);return new w(function(){var i=a.next();if(i.done)return i;var o=i.value,s=o[0];return x(r,s,t.call(n,o[1],s,e),i)})},r}function ut(e,t){var n=It(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=st(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Mt,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function ct(e,t,n,r){var i=It(e);return r&&(i.has=function(r){var i=e.get(r,gn);return i!==gn&&!!t.call(n,i,r,e)},i.get=function(r,i){var a=e.get(r,gn);return a!==gn&&t.call(n,a,r,e)?a:i}),i.__iterateUncached=function(i,a){var o=this,s=0;return e.__iterate(function(e,a,l){if(t.call(n,e,a,l))return s++,i(e,r?a:s-1,o)},a),s},i.__iteratorUncached=function(i,a){var o=e.__iterator(xn,a),s=0;return new w(function(){for(;;){var a=o.next();if(a.done)return a;var l=a.value,u=l[0],c=l[1];if(t.call(n,c,u,e))return x(i,r?u:s++,c,a)}})},i}function ft(e,t,n){var r=fe().asMutable();return e.__iterate(function(i,a){r.update(t.call(n,i,a,e),0,function(e){return e+1})}),r.asImmutable()}function dt(e,t,n){var r=o(e),i=(u(e)?Qe():fe()).asMutable();e.__iterate(f
},Nt.prototype.union=function(){var e=ln.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n<e.length;n++)i(e[n]).forEach(function(e){return t.add(e)})}):this.constructor(e[0])},Nt.prototype.intersect=function(){var e=ln.call(arguments,0);if(0===e.length)return this;e=e.map(function(e){return i(e)});var t=this;return this.withMutations(function(n){t.forEach(function(t){e.every(function(e){return e.includes(t)})||n.remove(t)})})},Nt.prototype.subtract=function(){var e=ln.call(arguments,0);if(0===e.length)return this;e=e.map(function(e){return i(e)});var t=this;return this.withMutations(function(n){t.forEach(function(t){e.some(function(e){return e.includes(t)})&&n.remove(t)})})},Nt.prototype.merge=function(){return this.union.apply(this,arguments)},Nt.prototype.mergeWith=function(e){var t=ln.call(arguments,1);return this.union.apply(this,t)},Nt.prototype.sort=function(e){return Vt(bt(this,e))},Nt.prototype.sortBy=function(e,t){return Vt(bt(this,t,e))},Nt.prototype.wasAltered=function(){return this._map.wasAltered()},Nt.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t,r){return e(r,r,n)},t)},Nt.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},Nt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},Nt.isSet=Ft;var Zn="@@__IMMUTABLE_SET__@@",er=Nt.prototype;er[Zn]=!0,er[pn]=er.remove,er.mergeDeep=er.merge,er.mergeDeepWith=er.mergeWith,er.withMutations=Vn.withMutations,er.asMutable=Vn.asMutable,er.asImmutable=Vn.asImmutable,er.__empty=Ut,er.__make=qt;var tr;e(Vt,Nt),Vt.of=function(){return this(arguments)},Vt.fromKeys=function(e){return this(n(e).keySeq())},Vt.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Vt.isOrderedSet=Bt;var nr=Vt.prototype;nr[dn]=!0,nr.__empty=Ht,nr.__make=Gt;var rr;e($t,ne),$t.of=function(){return this(arguments)},$t.prototype.toString=function(){return this.__toString("Stack [","]")},$t.prototype.get=function(e,t){var n=this._head;for(e=m(this,e);n&&e--;)n=n.next;return n?n.value:t},$t.prototype.peek=function(){return this._head&&this._head.value},$t.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Kt(e,t)},$t.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;ce(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Kt(t,n)},$t.prototype.pop=function(){return this.slice(1)},$t.prototype.unshift=function(){return this.push.apply(this,arguments)},$t.prototype.unshiftAll=function(e){return this.pushAll(e)},$t.prototype.shift=function(){return this.pop.apply(this,arguments)},$t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Yt()},$t.prototype.slice=function(e,t){if(g(e,t,this.size))return this;var n=y(e,this.size),r=_(t,this.size);if(r!==this.size)return ne.prototype.slice.call(this,e,t);for(var i=this.size-n,a=this._head;n--;)a=a.next;return this.__ownerID?(this.size=i,this._head=a,this.__hash=void 0,this.__altered=!0,this):Kt(i,a)},$t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Kt(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},$t.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&e(r.value,n++,this)!==!1;)r=r.next;return n},$t.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new w(function(){if(r){var t=r.value;return r=r.next,x(e,n++,t)}return k()})},$t.isStack
n=(0,s.default)(n),n.data("collection-sort")||n[0].hasAttribute("data-collection-nosort")||n.data("collection-sort",new u.default(n.get(0),{forceFallback:!1,handle:".collection-sort",animation:150,onUpdate:function(){return t.reindex(n)}}))}),this._updateActionsStateBasedOnMinMax(e)}},{key:"addItem",value:function(e){var t=(0,s.default)(e.currentTarget),n=t.data("action-add")||"bottom",r=(0,s.default)(t.closest('[data-type="collection"]')),i=(0,s.default)(r.find('> [data-collection-template="new"]').data("collection-template-html"));this._updateActionsStateBasedOnMinMax(r);var a=r.closest('[data-type="collection"]').find("> ul > [data-collection-item]"),o=r.data("max");if(!("undefined"!=typeof o&&a.length>=o)){r.find("> [data-collection-holder]")["top"===n?"prepend":"append"](i),this.reindex(r),a=r.closest('[data-type="collection"]').find("> ul > [data-collection-item]");var l=r.closest('[data-type="collection"]').find('[data-action-add="top"]'),u=r.closest('[data-type="collection"]').find('[data-action="sort"]');a.length&&(l.length&&l.parent().removeClass("hidden"),u.length&&a.length>1&&u.removeClass("hidden")),(0,s.default)('[data-grav-field="toggleable"] input[type="checkbox"]').trigger("change")}}},{key:"removeItem",value:function(e){var t=(0,s.default)(e.currentTarget),n=t.closest("[data-collection-item]"),r=(0,s.default)(t.closest('[data-type="collection"]')),i=r.closest('[data-type="collection"]').find("> ul > [data-collection-item]"),a=r.data("min");if(!("undefined"!=typeof a&&i.length<=a)){n.remove(),this.reindex(r),i=r.closest('[data-type="collection"]').find("> ul > [data-collection-item]");var o=r.closest('[data-type="collection"]').find('[data-action-add="top"]'),l=r.closest('[data-type="collection"]').find('[data-action="sort"]');i.length||o.length&&o.parent().addClass("hidden"),l.length&&i.length<=1&&l.addClass("hidden"),this._updateActionsStateBasedOnMinMax(r)}}},{key:"collapseItems",value:function(e){var t=(0,s.default)(e.currentTarget),n=(0,s.default)(t.closest('[data-type="collection"]')).find('> ul > [data-collection-item] > .item-actions [data-action="collapse"]');n.click()}},{key:"collapseItem",value:function(e){var t=(0,s.default)(e.currentTarget),n=t.closest("[data-collection-item]");t.attr("data-action","expand").removeClass("fa-chevron-circle-down").addClass("fa-chevron-circle-right"),n.addClass("collection-collapsed")}},{key:"expandItems",value:function(e){var t=(0,s.default)(e.currentTarget),n=(0,s.default)(t.closest('[data-type="collection"]')).find('> ul > [data-collection-item] > .item-actions [data-action="expand"]');n.click()}},{key:"expandItem",value:function(e){var t=(0,s.default)(e.currentTarget),n=t.closest("[data-collection-item]");t.attr("data-action","collapse").removeClass("fa-chevron-circle-right").addClass("fa-chevron-circle-down"),n.removeClass("collection-collapsed")}},{key:"sortItems",value:function(e){var t=(0,s.default)(e.currentTarget),n=t.data("action-sort"),r=t.data("action-sort-dir")||"asc",i=(0,s.default)(t.closest('[data-type="collection"]')),a=i.closest('[data-type="collection"]').find("> ul > [data-collection-item]");a.sort(function(e,t){var i=(0,s.default)(e).find('[name$="['+n+']"]'),a=(0,s.default)(t).find('[name$="['+n+']"]'),o=void 0;return o="asc"===r?i.val()<a.val()?-1:i.val()>a.val()?1:0:i.val()>a.val()?-1:i.val()<a.val()?1:0}).each(function(e,t){(0,s.default)(t).parent().append(t)}),this.reindex(i)}},{key:"observeKey",value:function(e){var t=(0,s.default)(e.target),n=t.val(),r=t.closest("[data-collection-key]");r.data("collection-key-backup",r.data("collection-key")).data("collection-key",n),this.reindex(null,r)}},{key:"reindex",value:function(e,t){t=t||(0,s.default)(e).closest('[data-type="collection"]').find("> ul > [data-collection-item]"),t.each(function(e,t){t=(0,s.default)(t);var n=t.find("[data-key-observe]"),r=n.val(),i=n.length,a=t.data("collection-key-backup");t.attr("data-collection-key",i?r:e),["name","data-grav-field-name","for","id","data-grav-file-settings"].forEach(function(e){t.find("["+e+"], [_"+e+"]").each(function(){var t=(0,s.default)(
* gemini-scrollbar
* @version 1.5.3
* @link http://noeldelgado.github.io/gemini-scrollbar/
* @license MIT
*/
2018-12-04 14:54:20 -08:00
!function(){function t(){var e,t=document.createElement("div");return t.style.position="absolute",t.style.top="-9999px",t.style.width="100px",t.style.height="100px",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t),e=t.offsetWidth-t.clientWidth,document.body.removeChild(t),e}function n(e,t){return e.classList?t.forEach(function(t){e.classList.add(t)}):void(e.className+=" "+t.join(" "))}function r(e,t){return e.classList?t.forEach(function(t){e.classList.remove(t)}):void(e.className=e.className.replace(new RegExp("(^|\\b)"+t.join("|")+"(\\b|$)","gi")," "))}function i(){var e=navigator.userAgent.toLowerCase();return e.indexOf("msie")!==-1||e.indexOf("trident")!==-1||e.indexOf(" edge/")!==-1}function a(e){this.element=null,this.autoshow=!1,this.createElements=!0,this.forceGemini=!1,this.onResize=null,this.minThumbSize=20,Object.keys(e||{}).forEach(function(t){this[t]=e[t]},this),o=t(),s=0===o&&this.forceGemini===!1,this._cache={events:{}},this._created=!1,this._cursorDown=!1,this._prevPageX=0,this._prevPageY=0,this._document=null,this._viewElement=this.element,this._scrollbarVerticalElement=null,this._thumbVerticalElement=null,this._scrollbarHorizontalElement=null,this._scrollbarHorizontalElement=null}var o,s,l;l={element:"gm-scrollbar-container",verticalScrollbar:"gm-scrollbar -vertical",horizontalScrollbar:"gm-scrollbar -horizontal",thumb:"thumb",view:"gm-scroll-view",autoshow:"gm-autoshow",disable:"gm-scrollbar-disable-selection",prevented:"gm-prevented",resizeTrigger:"gm-resize-trigger"},a.prototype.create=function(){if(s){if(n(this.element,[l.prevented]),this.onResize){if(this.createElements===!0){for(this._viewElement=document.createElement("div");this.element.childNodes.length>0;)this._viewElement.appendChild(this.element.childNodes[0]);this.element.appendChild(this._viewElement)}else this._viewElement=this.element.querySelector("."+l.view);n(this.element,[l.element]),n(this._viewElement,[l.view]),this._createResizeTrigger()}return this}if(this._created===!0)return console.warn("calling on a already-created object"),this;if(this.autoshow&&n(this.element,[l.autoshow]),this._document=document,this.createElements===!0){for(this._viewElement=document.createElement("div"),this._scrollbarVerticalElement=document.createElement("div"),this._thumbVerticalElement=document.createElement("div"),this._scrollbarHorizontalElement=document.createElement("div"),this._thumbHorizontalElement=document.createElement("div");this.element.childNodes.length>0;)this._viewElement.appendChild(this.element.childNodes[0]);this._scrollbarVerticalElement.appendChild(this._thumbVerticalElement),this._scrollbarHorizontalElement.appendChild(this._thumbHorizontalElement),this.element.appendChild(this._scrollbarVerticalElement),this.element.appendChild(this._scrollbarHorizontalElement),this.element.appendChild(this._viewElement)}else this._viewElement=this.element.querySelector("."+l.view),this._scrollbarVerticalElement=this.element.querySelector("."+l.verticalScrollbar.split(" ").join(".")),this._thumbVerticalElement=this._scrollbarVerticalElement.querySelector("."+l.thumb),this._scrollbarHorizontalElement=this.element.querySelector("."+l.horizontalScrollbar.split(" ").join(".")),this._thumbHorizontalElement=this._scrollbarHorizontalElement.querySelector("."+l.thumb);return n(this.element,[l.element]),n(this._viewElement,[l.view]),n(this._scrollbarVerticalElement,l.verticalScrollbar.split(/\s/)),n(this._scrollbarHorizontalElement,l.horizontalScrollbar.split(/\s/)),n(this._thumbVerticalElement,[l.thumb]),n(this._thumbHorizontalElement,[l.thumb]),this._scrollbarVerticalElement.style.display="",this._scrollbarHorizontalElement.style.display="",this._createResizeTrigger(),this._created=!0,this._bindEvents().update()},a.prototype._createResizeTrigger=function(){var e=document.createElement("object");n(e,[l.resizeTrigger]),e.type="text/html",e.setAttribute("tabindex","-1");var t=this._resizeHandler.bind(this);e.onload=function(){var n=e.contentDocument.defaultView;n.addEventListener("resize",t)},i()||(e.data="about:b
e||h.trigger("cron:change",d.getCron()))}),k.push(o),o}var i,a,o,s,l,u,c,f=!1,d=this,p=this,h=e('<span class="jqCron-container"></span>'),m=e('<span class="jqCron-blocks"></span>'),v=e('<span class="jqCron-period"></span>'),g=e('<span class="jqCron-dom"></span>'),y=e('<span class="jqCron-month"></span>'),_=e('<span class="jqCron-mins"></span>'),b=e('<span class="jqCron-dow"></span>'),w=e('<span class="jqCron-time"></span>'),x=e('<span class="jqCron-cross">&#10008;</span>'),k=[];this.disable=function(){h.addClass("disable"),t.disable=!0,d.closeSelectors()},this.isDisabled=function(){return 1==t.disable},this.enable=function(){h.removeClass("disable"),t.disable=!1},this.getCron=function(){var e=i.getValue(),t=["*","*","*","*","*"];return"hour"==e&&(t[0]=a.getCronValue()),"day"!=e&&"week"!=e&&"month"!=e&&"year"!=e||(t[0]=s.getCronValue(),t[1]=o.getCronValue()),"month"!=e&&"year"!=e||(t[2]=u.getCronValue()),"year"==e&&(t[3]=c.getCronValue()),"week"==e&&(t[4]=l.getCronValue()),t.join(" ")},this.setCron=function(e){if(e)try{e=e.replace(/\s+/g," ").replace(/^ +/,"").replace(/ +$/,"");var t=e.replace(/[^\* ]/g,"-").replace(/-+/g,"-").replace(/ +/g,""),n=e.split(" ");5!=n.length&&d.error(d.getText("error2")),"*****"==t?i.setValue("minute"):"-****"==t?(i.setValue("hour"),a.setCronValue(n[0]),s.setCronValue(n[0])):"***"==t.substring(2,t.length)?(i.setValue("day"),a.setCronValue(n[0]),s.setCronValue(n[0]),o.setCronValue(n[1])):"-**"==t.substring(2,t.length)?(i.setValue("month"),a.setCronValue(n[0]),s.setCronValue(n[0]),o.setCronValue(n[1]),u.setCronValue(n[2])):"**-"==t.substring(2,t.length)?(i.setValue("week"),a.setCronValue(n[0]),s.setCronValue(n[0]),o.setCronValue(n[1]),l.setCronValue(n[4])):"-*"==t.substring(3,t.length)?(i.setValue("year"),a.setCronValue(n[0]),s.setCronValue(n[0]),o.setCronValue(n[1]),u.setCronValue(n[2]),c.setCronValue(n[3])):d.error(d.getText("error4")),d.clearError()}catch(e){}},this.closeSelectors=function(){for(var e=k.length;e--;)k[e].close()},this.getId=function(){return p.attr("id")},this.getText=function(e){var n=t.texts[t.lang][e]||null;return"string"==typeof n&&n.match("<b")&&(n=n.replace(/(<b *\/>)/gi,'</span><b /><span class="jqCron-text">'),n='<span class="jqCron-text">'+n+"</span>"),n},this.getHumanText=function(){var t=[];return h.find("> span > span:visible").find(".jqCron-text, .jqCron-selector > span").each(function(){var n=e(this).text().replace(/\s+$/g,"").replace(/^\s+/g,"");n&&t.push(n)}),t.join(" ").replace(/\s:\s/g,":")},this.getSettings=function(){return t},this.error=function(e){throw console&&console.error("[jqCron Error] "+e),h.addClass("jqCron-error").attr("title",e),e},this.clearError=function(){h.attr("title","").removeClass("jqCron-error")},this.clear=function(){u.setValue([]),l.setValue([]),a.setValue([]),c.setValue([]),o.setValue([]),s.setValue([]),d.triggerChange()},this.init=function(){var n,S,C;if(!f){for(t=jqCronMergeSettings(t),t.jquery_element||d.error(d.getText("error3")),p=t.jquery_element,p.append(h),h.data("id",t.id),h.data("jqCron",d),h.append(m),t.no_reset_button||h.append(x),!t.disable||h.addClass("disable"),m.append(v),/^(ko)$/i.test(t.lang)?m.append(y,g):m.append(g,y),m.append(_),m.append(b),m.append(w),x.click(function(){d.isDisabled()||d.clear()}),h.bind("cron:change",function(e,n){t.bind_to&&(t.bind_method.set&&t.bind_method.set(t.bind_to,n),d.clearError())}),v.append(d.getText("text_period")),i=r(v,!1,"period"),t.enabled_minute&&i.add("minute",d.getText("name_minute")),t.enabled_hour&&i.add("hour",d.getText("name_hour")),t.enabled_day&&i.add("day",d.getText("name_day")),t.enabled_week&&i.add("week",d.getText("name_week")),t.enabled_month&&i.add("month",d.getText("name_month")),t.enabled_year&&i.add("year",d.getText("name_year")),i.$.bind("selector:change",function(e,t){g.hide(),y.hide(),_.hide(),b.hide(),w.hide(),"hour"==t?_.show():"day"==t?w.show():"week"==t?(b.show(),w.show()):"month"==t?(g.show(),w.show()):"year"==t&&(g.show(),y.show(),w.show())}),i.setValue(t.default_period),_.append(d.getText("text_mins")),a=r(_,t.multiple_mins,"minutes"),n=0,C=t.minute
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
2018-10-08 16:43:17 -07:00
* @version v4.2.5+7f2b526d
*/
!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function r(e){return"function"==typeof e}function i(e){H=e}function a(e){$=e}function o(){return function(){return t.nextTick(f)}}function s(){return"undefined"!=typeof G?function(){G(f)}:c()}function l(){var e=0,t=new Y(f),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function u(){var e=new MessageChannel;return e.port1.onmessage=f,function(){return e.port2.postMessage(0)}}function c(){var e=setTimeout;return function(){return e(f,1)}}function f(){for(var e=0;e<B;e+=2){var t=Q[e],n=Q[e+1];t(n),Q[e]=void 0,Q[e+1]=void 0}B=0}function d(){try{var e=Function("return this")().require("vertx");return G=e.runOnLoop||e.runOnContext,s()}catch(e){return c()}}function p(e,t){var n=this,r=new this.constructor(m);void 0===r[ee]&&j(r);var i=n._state;if(i){var a=arguments[i-1];$(function(){return O(i,r,a,n._result)})}else A(n,r,e,t);return r}function h(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(m);return k(n,e),n}function m(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function y(e){try{return e.then}catch(e){return ie.error=e,ie}}function _(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function b(e,t,n){$(function(e){var r=!1,i=_(n,t,function(n){r||(r=!0,t!==n?k(e,n):C(e,n))},function(t){r||(r=!0,E(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&i&&(r=!0,E(e,i))},e)}function w(e,t){t._state===ne?C(e,t._result):t._state===re?E(e,t._result):A(t,void 0,function(t){return k(e,t)},function(t){return E(e,t)})}function x(e,t,n){t.constructor===e.constructor&&n===p&&t.constructor.resolve===h?w(e,t):n===ie?(E(e,ie.error),ie.error=null):void 0===n?C(e,t):r(n)?b(e,t,n):C(e,t)}function k(t,n){t===n?E(t,v()):e(n)?x(t,n,y(n)):C(t,n)}function S(e){e._onerror&&e._onerror(e._result),I(e)}function C(e,t){e._state===te&&(e._result=t,e._state=ne,0!==e._subscribers.length&&$(I,e))}function E(e,t){e._state===te&&(e._state=re,e._result=t,$(S,e))}function A(e,t,n,r){var i=e._subscribers,a=i.length;e._onerror=null,i[a]=t,i[a+ne]=n,i[a+re]=r,0===a&&e._state&&$(I,e)}function I(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,i=void 0,a=e._result,o=0;o<t.length;o+=3)r=t[o],i=t[o+n],r?O(n,r,i,a):i(a);e._subscribers.length=0}}function M(e,t){try{return e(t)}catch(e){return ie.error=e,ie}}function O(e,t,n,i){var a=r(n),o=void 0,s=void 0,l=void 0,u=void 0;if(a){if(o=M(n,i),o===ie?(u=!0,s=o.error,o.error=null):l=!0,t===o)return void E(t,g())}else o=i,l=!0;t._state!==te||(a&&l?k(t,o):u?E(t,s):e===ne?C(t,o):e===re&&E(t,o))}function T(e,t){try{t(function(t){k(e,t)},function(t){E(e,t)})}catch(t){E(e,t)}}function P(){return ae++}function j(e){e[ee]=ae++,e._state=void 0,e._result=void 0,e._subscribers=[]}function D(){return new Error("Array Methods must be provided an Array")}function z(e){return new oe(this,e).promise}function L(e){var t=this;return new t(V(e)?function(n,r){for(var i=e.length,a=0;a<i;a++)t.resolve(e[a]).then(n,r)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function N(e){var t=this,n=new t(m);return E(n,e),n}function F(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function R(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function q(){var e=void 0;if("undefined"!=typeof n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=se}var U=void 0;U=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.cal
null!=i&&d(i),g(n,{__mapKeysData__:u("c",e=[]),__mapValuesData__:u("c",t=[])}),i?(p(i,function(n){var r=l(n)[0];n=n[1],a.call(e,r)===-1&&(e.push(r),t.push(n))},n),n):n},m&&(o&&o(r,Map),r.prototype=Object.create(Map.prototype,{constructor:u(r)})),c(g(r.prototype,{clear:u(function(){this.__mapKeysData__.length&&(i.call(this.__mapKeysData__),i.call(this.__mapValuesData__),this.emit("_clear"))}),delete:u(function(e){var t=a.call(this.__mapKeysData__,e);return t!==-1&&(this.__mapKeysData__.splice(t,1),this.__mapValuesData__.splice(t,1),this.emit("_delete",t,e),!0)}),entries:u(function(){return new h(this,"key+value")}),forEach:u(function(e){var t,n,r=arguments[1];for(s(e),t=this.entries(),n=t._next();void 0!==n;)v.call(e,r,this.__mapValuesData__[n],this.__mapKeysData__[n],this),n=t._next()}),get:u(function(e){var t=a.call(this.__mapKeysData__,e);if(t!==-1)return this.__mapValuesData__[t]}),has:u(function(e){return a.call(this.__mapKeysData__,e)!==-1}),keys:u(function(){return new h(this,"key")}),set:u(function(e,t){var n,r=a.call(this.__mapKeysData__,e);return r===-1&&(r=this.__mapKeysData__.push(e)-1,n=!0),this.__mapValuesData__[r]=t,n&&this.emit("_add",r,e),this}),size:u.gs(function(){return this.__mapKeysData__.length}),values:u(function(){return new h(this,"value")}),toString:u(function(){return"[object Map]"})})),Object.defineProperty(r.prototype,f.iterator,u(function(){return this.entries()})),Object.defineProperty(r.prototype,f.toStringTag,u("c","Map"))},function(e,t,n){"use strict";var r=n(645);e.exports=function(){return r(this).length=0,this}},function(e,t,n){"use strict";var r=n(646);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";var r=n(647)();e.exports=function(e){return e!==r&&null!==e}},function(e,t){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(649),i=n(652),a=n(645),o=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,l=Math.abs,u=Math.floor;e.exports=function(e){var t,n,c,f;if(!r(e))return o.apply(this,arguments);for(n=i(a(this).length),c=arguments[1],c=isNaN(c)?0:c>=0?u(c):i(this.length)-u(l(c)),t=c;t<n;++t)if(s.call(this,t)&&(f=this[t],r(f)))return t;return-1}},function(e,t,n){"use strict";e.exports=n(650)()?Number.isNaN:n(651)},function(e,t){"use strict";e.exports=function(){var e=Number.isNaN;return"function"==typeof e&&(!e({})&&e(NaN)&&!e(34))}},function(e,t){"use strict";e.exports=function(e){return e!==e}},function(e,t,n){"use strict";var r=n(653),i=Math.max;e.exports=function(e){return i(0,r(e))}},function(e,t,n){"use strict";var r=n(654),i=Math.abs,a=Math.floor;e.exports=function(e){return isNaN(e)?0:(e=Number(e),0!==e&&isFinite(e)?r(e)*a(i(e)):e)}},function(e,t,n){"use strict";e.exports=n(655)()?Math.sign:n(656)},function(e,t){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&e(-20)===-1)}},function(e,t){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,n){"use strict";e.exports=n(658)()?Object.setPrototypeOf:n(659)},function(e,t){"use strict";var n=Object.create,r=Object.getPrototypeOf,i={};e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||n;return"function"==typeof e&&r(e(t(null),i))===i}},function(e,t,n){"use strict";var r,i=n(660),a=n(645),o=Object.prototype.isPrototypeOf,s=Object.defineProperty,l={configurable:!0,enumerable:!1,writable:!0,value:void 0};r=function(e,t){if(a(e),null===t||i(t))return e;throw new TypeError("Prototype must be null or an object")},e.exports=function(e){var t,n;return e?(2===e.level?e.set?(n=e.set,t=function(e,t){return n.call(r(e,t),t),e}):t=function(e,t){return r(e,t).__proto__=t,e}:t=function e(t,n){var i;return r(t,n),i=o.call(e.nullPolyfill,t),i&&delete e.nullPolyfill.__proto__,null===n&&(n=e.nullPolyfill),t.__proto__=n,i&&s(e.nullPolyfill,"__proto__",l),t},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e,t=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__pro
2016-02-05 12:37:48 -08:00
//# sourceMappingURL=admin.min.js.map