mirror of
https://github.com/plausible/analytics.git
synced 2024-12-26 02:55:02 +03:00
31 lines
20 KiB
JavaScript
31 lines
20 KiB
JavaScript
|
/**!
|
||
|
|
||
|
@license
|
||
|
handlebars v4.7.7
|
||
|
|
||
|
Copyright (C) 2011-2019 by Yehuda Katz
|
||
|
|
||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
|
of this software and associated documentation files (the "Software"), to deal
|
||
|
in the Software without restriction, including without limitation the rights
|
||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
|
copies of the Software, and to permit persons to whom the Software is
|
||
|
furnished to do so, subject to the following conditions:
|
||
|
|
||
|
The above copyright notice and this permission notice shall be included in
|
||
|
all copies or substantial portions of the Software.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||
|
THE SOFTWARE.
|
||
|
|
||
|
*/(function(r,e){typeof exports=="object"&&typeof module=="object"?module.exports=e():typeof define=="function"&&define.amd?define([],e):typeof exports=="object"?exports.Handlebars=e():r.Handlebars=e()})(this,function(){return function(u){var r={};function e(n){if(r[n])return r[n].exports;var t=r[n]={exports:{},id:n,loaded:!1};return u[n].call(t.exports,t,t.exports,e),t.loaded=!0,t.exports}return e.m=u,e.c=r,e.p="",e(0)}([function(u,r,e){"use strict";var n=e(1).default,t=e(2).default;r.__esModule=!0;var f=e(3),a=n(f),i=e(36),l=t(i),h=e(5),v=t(h),P=e(4),H=n(P),C=e(37),E=n(C),I=e(43),o=t(I);function g(){var y=new a.HandlebarsEnvironment;return H.extend(y,a),y.SafeString=l.default,y.Exception=v.default,y.Utils=H,y.escapeExpression=H.escapeExpression,y.VM=E,y.template=function(p){return E.template(p,y)},y}var w=g();w.create=g,o.default(w),w.default=w,r.default=w,u.exports=r.default},function(u,r){"use strict";r.default=function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n},r.__esModule=!0},function(u,r){"use strict";r.default=function(e){return e&&e.__esModule?e:{default:e}},r.__esModule=!0},function(u,r,e){"use strict";var n=e(2).default;r.__esModule=!0,r.HandlebarsEnvironment=g;var t=e(4),f=e(5),a=n(f),i=e(9),l=e(29),h=e(31),v=n(h),P=e(32),H="4.7.7";r.VERSION=H;var C=8;r.COMPILER_REVISION=C;var E=7;r.LAST_COMPATIBLE_COMPILER_REVISION=E;var I={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};r.REVISION_CHANGES=I;var o="[object Object]";function g(y,p,R){this.helpers=y||{},this.partials=p||{},this.decorators=R||{},i.registerDefaultHelpers(this),l.registerDefaultDecorators(this)}g.prototype={constructor:g,logger:v.default,log:v.default.log,registerHelper:function(p,R){if(t.toString.call(p)===o){if(R)throw new a.default("Arg not supported with multiple helpers");t.extend(this.helpers,p)}else this.helpers[p]=R},unregisterHelper:function(p){delete this.helpers[p]},registerPartial:function(p,R){if(t.toString.call(p)===o)t.extend(this.partials,p);else{if(typeof R>"u")throw new a.default('Attempting to register a partial called "'+p+'" as undefined');this.partials[p]=R}},unregisterPartial:function(p){delete this.partials[p]},registerDecorator:function(p,R){if(t.toString.call(p)===o){if(R)throw new a.default("Arg not supported with multiple decorators");t.extend(this.decorators,p)}else this.decorators[p]=R},unregisterDecorator:function(p){delete this.decorators[p]},resetLoggedPropertyAccesses:function(){P.resetLoggedProperties()}};var w=v.default.log;r.log=w,r.createFrame=t.createFrame,r.logger=v.default},function(u,r){"use strict";r.__esModule=!0,r.extend=a,r.indexOf=v,r.escapeExpression=P,r.isEmpty=H,r.createFrame=C,r.blockParams=E,r.appendContextPath=I;var e={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},n=/[&<>"'`=]/g,t=/[&<>"'`=]/;function f(o){return e[o]}function a(o){for(var g=1;g<arguments.length;g++)for(var w in arguments[g])Object.prototype.hasOwnProperty.call(arguments[g],w)&&(o[w]=arguments[g][w]);return o}var i=Object.prototype.toString;r.toString=i;var l=function(g){return typeof g=="function"};l(/x/)&&(r.isFunction=l=function(o){return typeof o=="function"&&i.call(o)==="[object Function]"}),r.isFunction=l;var h=Array.isArray||function(o){return o&&typeof o=="object"?i.call(o)==="[object Array]":!1};r.isArray=h;function v(o,g){for(var w=0,y=o.length;w<y;w++)if(o[w]===g)return w;return-1}function P(o){if(typeof o!="string"){if(o&&o.toHTML)return o.toHTML();if(o==null)return"";if(!o)return o+"";o=""+o}return t.test(o)?o.replace(n,f):o}function H(o){return!o&&o!==0?!0:!!(h(o)&&o.length===0)}function C(o){var g=a({},o);return g._parent=o,g}function E(o,g){return o.path=g,o}function I(o,g){return(o?o+".":"")+g}},function(u,r,e){"use strict";var n=e(6).default;r.__esModule=!0;var t=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function f(a,i){var l=i&&i.l
|
||
|
You can add a runtime option to disable the check or this warning:
|
||
|
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function E(){t(h).forEach(function(I){delete h[I]})}},function(u,r,e){u.exports={default:e(34),__esModule:!0}},function(u,r,e){var n=e(8);u.exports=function(f,a){return n.create(f,a)}},function(u,r,e){"use strict";var n=e(33).default;r.__esModule=!0,r.createNewLookupObject=f;var t=e(4);function f(){for(var a=arguments.length,i=Array(a),l=0;l<a;l++)i[l]=arguments[l];return t.extend.apply(void 0,[n(null)].concat(i))}},function(u,r){"use strict";r.__esModule=!0;function e(n){this.string=n}e.prototype.toString=e.prototype.toHTML=function(){return""+this.string},r.default=e,u.exports=r.default},function(u,r,e){"use strict";var n=e(38).default,t=e(12).default,f=e(1).default,a=e(2).default;r.__esModule=!0,r.checkRevision=I,r.template=o,r.wrapProgram=g,r.resolvePartial=w,r.invokePartial=y,r.noop=p;var i=e(4),l=f(i),h=e(5),v=a(h),P=e(3),H=e(9),C=e(42),E=e(32);function I(c){var O=c&&c[0]||1,M=P.COMPILER_REVISION;if(!(O>=P.LAST_COMPATIBLE_COMPILER_REVISION&&O<=P.COMPILER_REVISION))if(O<P.LAST_COMPATIBLE_COMPILER_REVISION){var x=P.REVISION_CHANGES[M],L=P.REVISION_CHANGES[O];throw new v.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+x+") or downgrade your runtime to an older version ("+L+").")}else throw new v.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+c[1]+").")}function o(c,O){if(!O)throw new v.default("No environment passed to template");if(!c||!c.main)throw new v.default("Unknown template object: "+typeof c);c.main.decorator=c.main_d,O.VM.checkRevision(c.compiler);var M=c.compiler&&c.compiler[0]===7;function x(m,s,d){d.hash&&(s=l.extend({},s,d.hash),d.ids&&(d.ids[0]=!0)),m=O.VM.resolvePartial.call(this,m,s,d);var A=l.extend({},d,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),D=O.VM.invokePartial.call(this,m,s,A);if(D==null&&O.compile&&(d.partials[d.name]=O.compile(m,c.compilerOptions,O),D=d.partials[d.name](s,A)),D!=null){if(d.indent){for(var T=D.split(`
|
||
|
`),j=0,V=T.length;j<V&&!(!T[j]&&j+1===V);j++)T[j]=d.indent+T[j];D=T.join(`
|
||
|
`)}return D}else throw new v.default("The partial "+d.name+" could not be compiled when running in runtime-only mode")}var L={strict:function(s,d,A){if(!s||!(d in s))throw new v.default('"'+d+'" not defined in '+s,{loc:A});return L.lookupProperty(s,d)},lookupProperty:function(s,d){var A=s[d];if(A==null||Object.prototype.hasOwnProperty.call(s,d)||E.resultIsAllowed(A,L.protoAccessControl,d))return A},lookup:function(s,d){for(var A=s.length,D=0;D<A;D++){var T=s[D]&&L.lookupProperty(s[D],d);if(T!=null)return s[D][d]}},lambda:function(s,d){return typeof s=="function"?s.call(d):s},escapeExpression:l.escapeExpression,invokePartial:x,fn:function(s){var d=c[s];return d.decorator=c[s+"_d"],d},programs:[],program:function(s,d,A,D,T){var j=this.programs[s],V=this.fn(s);return d||T||D||A?j=g(this,s,V,d,A,D,T):j||(j=this.programs[s]=g(this,s,V)),j},data:function(s,d){for(;s&&d--;)s=s._parent;return s},mergeIfNeeded:function(s,d){var A=s||d;return s&&d&&s!==d&&(A=l.extend({},d,s)),A},nullContext:n({}),noop:O.VM.noop,compilerInfo:c.compiler};function S(m){var s=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=s.data;S._setup(s),!s.partial&&c.useData&&(d=R(m,d));var A=void 0,D=c.useBlockParams?[]:void 0;c.useDepths&&(s.depths?A=m!=s.depths[0]?[m].concat(s.depths):s.depths:A=[m]);function T(j){return""+c.main(L,j,L.helpers,L.partials,d,D,A)}return T=N(c.main,T,L,s.depths||[],d,D),T(m,s)}return S.isTop=!0,S._setup=function(m){if(m.partial)L.protoAccessControl=m.protoAccessControl,L.helpers=m.helpers,L.partials=m.partials,L.decorators=m.decorators,L.hooks=m.hooks;else{var s=l.extend({},O.helpers,m.helpers);b(s,L),L.helpers=s,c.usePartial&&(L.partials=L.mergeIfNeeded(m.partials,O.partials)),(c.usePartial||c.useDecorators)&&(L.decorators=l.extend({},O.decorators,m.decorators)),L.hooks={},L.protoAccessControl=E.createProtoAccessControl(m);var d=m.allowCallsToHelperMissing||M;H.moveHelperToHooks(L,"helperMissing",d),H.moveHelperToHooks(L,"blockHelperMissing",d)}},S._child=function(m,s,d,A){if(c.useBlockParams&&!d)throw new v.default("must pass block params");if(c.useDepths&&!A)throw new v.default("must pass parent depths");return g(L,m,c[m],s,0,d,A)},S}function g(c,O,M,x,L,S,m){function s(d){var A=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],D=m;return m&&d!=m[0]&&!(d===c.nullContext&&m[0]===null)&&(D=[d].concat(m)),M(c,d,c.helpers,c.partials,A.data||x,S&&[A.blockParams].concat(S),D)}return s=N(M,s,c,m,x,S),s.program=O,s.depth=m?m.length:0,s.blockParams=L||0,s}function w(c,O,M){return c?!c.call&&!M.name&&(M.name=c,c=M.partials[c]):M.name==="@partial-block"?c=M.data["partial-block"]:c=M.partials[M.name],c}function y(c,O,M){var x=M.data&&M.data["partial-block"];M.partial=!0,M.ids&&(M.data.contextPath=M.ids[0]||M.data.contextPath);var L=void 0;if(M.fn&&M.fn!==p&&function(){M.data=P.createFrame(M.data);var S=M.fn;L=M.data["partial-block"]=function(s){var d=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return d.data=P.createFrame(d.data),d.data["partial-block"]=x,S(s,d)},S.partials&&(M.partials=l.extend({},M.partials,S.partials))}(),c===void 0&&L&&(c=L),c===void 0)throw new v.default("The partial "+M.name+" could not be found");if(c instanceof Function)return c(O,M)}function p(){return""}function R(c,O){return(!O||!("root"in O))&&(O=O?P.createFrame(O):{},O.root=c),O}function N(c,O,M,x,L,S){if(c.decorator){var m={};O=c.decorator(O,m,M,x&&x[0],L,S,x),l.extend(O,m)}return O}function b(c,O){t(c).forEach(function(M){var x=c[M];c[M]=F(x,O)})}function F(c,O){var M=O.lookupProperty;return C.wrapHelper(c,function(x){return l.extend({lookupProperty:M},x)})}},function(u,r,e){u.exports={default:e(39),__esModule:!0}},function(u,r,e){e(40),u.exports=e(20).Object.seal},function(u,r,e){var n=e(41);e(17)("seal",function(t){return function(a){return t&&n(a)?t(a):a}})},function(u,r){u.exports=function(e){return typeof e=="object"?e!==null:typeof e=="function"}},function(u,r){"use strict";r.__esModule=!0,r.wrapHelper=e;function e(n,t){if(typeof n!="function")return n;var f=function(){var i=arguments[arguments.length-1];return arg
|