@kosatyi/ejs 0.0.104 → 0.0.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/worker.js +228 -285
- package/dist/umd/worker.js +228 -285
- package/dist/umd/worker.min.js +3 -1
- package/package.json +2 -2
package/dist/cjs/worker.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
function _OverloadYield(e, d) {
|
|
4
|
+
this.v = e, this.k = d;
|
|
5
|
+
}
|
|
3
6
|
function _assertClassBrand(e, t, n) {
|
|
4
7
|
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
5
8
|
throw new TypeError("Private element is not present on this object");
|
|
@@ -117,306 +120,178 @@ function _possibleConstructorReturn(t, e) {
|
|
|
117
120
|
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
118
121
|
return _assertThisInitialized(t);
|
|
119
122
|
}
|
|
120
|
-
function
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
123
|
+
function _regenerator() {
|
|
124
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
125
|
+
var e,
|
|
126
|
+
t,
|
|
127
|
+
r = "function" == typeof Symbol ? Symbol : {},
|
|
128
|
+
n = r.iterator || "@@iterator",
|
|
129
|
+
o = r.toStringTag || "@@toStringTag";
|
|
130
|
+
function i(r, n, o, i) {
|
|
131
|
+
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
132
|
+
u = Object.create(c.prototype);
|
|
133
|
+
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
134
|
+
var i,
|
|
135
|
+
c,
|
|
136
|
+
u,
|
|
137
|
+
f = 0,
|
|
138
|
+
p = o || [],
|
|
139
|
+
y = !1,
|
|
140
|
+
G = {
|
|
141
|
+
p: 0,
|
|
142
|
+
n: 0,
|
|
143
|
+
v: e,
|
|
144
|
+
a: d,
|
|
145
|
+
f: d.bind(e, 4),
|
|
146
|
+
d: function (t, r) {
|
|
147
|
+
return i = t, c = 0, u = e, G.n = r, a;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
function d(r, n) {
|
|
151
|
+
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
152
|
+
var o,
|
|
153
|
+
i = p[t],
|
|
154
|
+
d = G.p,
|
|
155
|
+
l = i[2];
|
|
156
|
+
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
|
|
157
|
+
}
|
|
158
|
+
if (o || r > 1) return a;
|
|
159
|
+
throw y = !0, n;
|
|
160
|
+
}
|
|
161
|
+
return function (o, p, l) {
|
|
162
|
+
if (f > 1) throw TypeError("Generator is already running");
|
|
163
|
+
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
|
|
164
|
+
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
|
|
165
|
+
try {
|
|
166
|
+
if (f = 2, i) {
|
|
167
|
+
if (c || (o = "next"), t = i[o]) {
|
|
168
|
+
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
|
|
169
|
+
if (!t.done) return t;
|
|
170
|
+
u = t.value, c < 2 && (c = 0);
|
|
171
|
+
} else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
|
|
172
|
+
i = e;
|
|
173
|
+
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
|
|
174
|
+
} catch (t) {
|
|
175
|
+
i = e, c = 1, u = t;
|
|
176
|
+
} finally {
|
|
177
|
+
f = 1;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return {
|
|
181
|
+
value: t,
|
|
182
|
+
done: y
|
|
183
|
+
};
|
|
168
184
|
};
|
|
169
|
-
}
|
|
185
|
+
}(r, o, i), !0), u;
|
|
170
186
|
}
|
|
171
|
-
|
|
172
|
-
var h = "suspendedStart",
|
|
173
|
-
l = "suspendedYield",
|
|
174
|
-
f = "executing",
|
|
175
|
-
s = "completed",
|
|
176
|
-
y = {};
|
|
187
|
+
var a = {};
|
|
177
188
|
function Generator() {}
|
|
178
189
|
function GeneratorFunction() {}
|
|
179
190
|
function GeneratorFunctionPrototype() {}
|
|
180
|
-
|
|
181
|
-
|
|
191
|
+
t = Object.getPrototypeOf;
|
|
192
|
+
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
193
|
+
return this;
|
|
194
|
+
}), t),
|
|
195
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
196
|
+
function f(e) {
|
|
197
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
198
|
+
}
|
|
199
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
|
|
182
200
|
return this;
|
|
201
|
+
}), _regeneratorDefine(u, "toString", function () {
|
|
202
|
+
return "[object Generator]";
|
|
203
|
+
}), (_regenerator = function () {
|
|
204
|
+
return {
|
|
205
|
+
w: i,
|
|
206
|
+
m: f
|
|
207
|
+
};
|
|
208
|
+
})();
|
|
209
|
+
}
|
|
210
|
+
function _regeneratorAsync(n, e, r, t, o) {
|
|
211
|
+
var a = _regeneratorAsyncGen(n, e, r, t, o);
|
|
212
|
+
return a.next().then(function (n) {
|
|
213
|
+
return n.done ? n.value : a.next();
|
|
183
214
|
});
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
215
|
+
}
|
|
216
|
+
function _regeneratorAsyncGen(r, e, t, o, n) {
|
|
217
|
+
return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise);
|
|
218
|
+
}
|
|
219
|
+
function _regeneratorAsyncIterator(t, e) {
|
|
220
|
+
function n(r, o, i, f) {
|
|
221
|
+
try {
|
|
222
|
+
var c = t[r](o),
|
|
223
|
+
u = c.value;
|
|
224
|
+
return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) {
|
|
225
|
+
n("next", t, i, f);
|
|
226
|
+
}, function (t) {
|
|
227
|
+
n("throw", t, i, f);
|
|
228
|
+
}) : e.resolve(u).then(function (t) {
|
|
229
|
+
c.value = t, i(c);
|
|
230
|
+
}, function (t) {
|
|
231
|
+
return n("throw", t, i, f);
|
|
192
232
|
});
|
|
193
|
-
})
|
|
233
|
+
} catch (t) {
|
|
234
|
+
f(t);
|
|
235
|
+
}
|
|
194
236
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}, function (t) {
|
|
204
|
-
invoke("throw", t, i, a);
|
|
205
|
-
}) : e.resolve(h).then(function (t) {
|
|
206
|
-
u.value = t, i(u);
|
|
207
|
-
}, function (t) {
|
|
208
|
-
return invoke("throw", t, i, a);
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
a(c.arg);
|
|
237
|
+
var r;
|
|
238
|
+
this.next || (_regeneratorDefine(_regeneratorAsyncIterator.prototype), _regeneratorDefine(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
|
|
239
|
+
return this;
|
|
240
|
+
})), _regeneratorDefine(this, "_invoke", function (t, o, i) {
|
|
241
|
+
function f() {
|
|
242
|
+
return new e(function (e, r) {
|
|
243
|
+
n(t, i, e, r);
|
|
244
|
+
});
|
|
212
245
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
});
|
|
246
|
+
return r = r ? r.then(f, f) : f();
|
|
247
|
+
}, !0);
|
|
248
|
+
}
|
|
249
|
+
function _regeneratorDefine(e, r, n, t) {
|
|
250
|
+
var i = Object.defineProperty;
|
|
251
|
+
try {
|
|
252
|
+
i({}, "", {});
|
|
253
|
+
} catch (e) {
|
|
254
|
+
i = 0;
|
|
224
255
|
}
|
|
225
|
-
function
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
256
|
+
_regeneratorDefine = function (e, r, n, t) {
|
|
257
|
+
function o(r, n) {
|
|
258
|
+
_regeneratorDefine(e, r, function (e) {
|
|
259
|
+
return this._invoke(r, n, e);
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
r ? i ? i(e, r, {
|
|
263
|
+
value: n,
|
|
264
|
+
enumerable: !t,
|
|
265
|
+
configurable: !t,
|
|
266
|
+
writable: !t
|
|
267
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
268
|
+
}, _regeneratorDefine(e, r, n, t);
|
|
269
|
+
}
|
|
270
|
+
function _regeneratorKeys(e) {
|
|
271
|
+
var n = Object(e),
|
|
272
|
+
r = [];
|
|
273
|
+
for (var t in n) r.unshift(t);
|
|
274
|
+
return function e() {
|
|
275
|
+
for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
|
|
276
|
+
return e.done = !0, e;
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
function _regeneratorValues(e) {
|
|
280
|
+
if (null != e) {
|
|
281
|
+
var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
|
|
282
|
+
r = 0;
|
|
283
|
+
if (t) return t.call(e);
|
|
284
|
+
if ("function" == typeof e.next) return e;
|
|
285
|
+
if (!isNaN(e.length)) return {
|
|
286
|
+
next: function () {
|
|
287
|
+
return e && r >= e.length && (e = void 0), {
|
|
288
|
+
value: e && e[r++],
|
|
289
|
+
done: !e
|
|
234
290
|
};
|
|
235
291
|
}
|
|
236
|
-
for (n.method = i, n.arg = a;;) {
|
|
237
|
-
var c = n.delegate;
|
|
238
|
-
if (c) {
|
|
239
|
-
var u = maybeInvokeDelegate(c, n);
|
|
240
|
-
if (u) {
|
|
241
|
-
if (u === y) continue;
|
|
242
|
-
return u;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
246
|
-
if (o === h) throw o = s, n.arg;
|
|
247
|
-
n.dispatchException(n.arg);
|
|
248
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
249
|
-
o = f;
|
|
250
|
-
var p = tryCatch(e, r, n);
|
|
251
|
-
if ("normal" === p.type) {
|
|
252
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
253
|
-
return {
|
|
254
|
-
value: p.arg,
|
|
255
|
-
done: n.done
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
259
|
-
}
|
|
260
292
|
};
|
|
261
293
|
}
|
|
262
|
-
|
|
263
|
-
var n = r.method,
|
|
264
|
-
o = e.iterator[n];
|
|
265
|
-
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
266
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
267
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
268
|
-
var a = i.arg;
|
|
269
|
-
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
270
|
-
}
|
|
271
|
-
function pushTryEntry(t) {
|
|
272
|
-
var e = {
|
|
273
|
-
tryLoc: t[0]
|
|
274
|
-
};
|
|
275
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
276
|
-
}
|
|
277
|
-
function resetTryEntry(t) {
|
|
278
|
-
var e = t.completion || {};
|
|
279
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
280
|
-
}
|
|
281
|
-
function Context(t) {
|
|
282
|
-
this.tryEntries = [{
|
|
283
|
-
tryLoc: "root"
|
|
284
|
-
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
285
|
-
}
|
|
286
|
-
function values(e) {
|
|
287
|
-
if (e || "" === e) {
|
|
288
|
-
var r = e[a];
|
|
289
|
-
if (r) return r.call(e);
|
|
290
|
-
if ("function" == typeof e.next) return e;
|
|
291
|
-
if (!isNaN(e.length)) {
|
|
292
|
-
var o = -1,
|
|
293
|
-
i = function next() {
|
|
294
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
295
|
-
return next.value = t, next.done = !0, next;
|
|
296
|
-
};
|
|
297
|
-
return i.next = i;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
throw new TypeError(typeof e + " is not iterable");
|
|
301
|
-
}
|
|
302
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
303
|
-
value: GeneratorFunctionPrototype,
|
|
304
|
-
configurable: !0
|
|
305
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
306
|
-
value: GeneratorFunction,
|
|
307
|
-
configurable: !0
|
|
308
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
309
|
-
var e = "function" == typeof t && t.constructor;
|
|
310
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
311
|
-
}, e.mark = function (t) {
|
|
312
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
313
|
-
}, e.awrap = function (t) {
|
|
314
|
-
return {
|
|
315
|
-
__await: t
|
|
316
|
-
};
|
|
317
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
318
|
-
return this;
|
|
319
|
-
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
320
|
-
void 0 === i && (i = Promise);
|
|
321
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
322
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
323
|
-
return t.done ? t.value : a.next();
|
|
324
|
-
});
|
|
325
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
326
|
-
return this;
|
|
327
|
-
}), define(g, "toString", function () {
|
|
328
|
-
return "[object Generator]";
|
|
329
|
-
}), e.keys = function (t) {
|
|
330
|
-
var e = Object(t),
|
|
331
|
-
r = [];
|
|
332
|
-
for (var n in e) r.push(n);
|
|
333
|
-
return r.reverse(), function next() {
|
|
334
|
-
for (; r.length;) {
|
|
335
|
-
var t = r.pop();
|
|
336
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
|
337
|
-
}
|
|
338
|
-
return next.done = !0, next;
|
|
339
|
-
};
|
|
340
|
-
}, e.values = values, Context.prototype = {
|
|
341
|
-
constructor: Context,
|
|
342
|
-
reset: function (e) {
|
|
343
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
344
|
-
},
|
|
345
|
-
stop: function () {
|
|
346
|
-
this.done = !0;
|
|
347
|
-
var t = this.tryEntries[0].completion;
|
|
348
|
-
if ("throw" === t.type) throw t.arg;
|
|
349
|
-
return this.rval;
|
|
350
|
-
},
|
|
351
|
-
dispatchException: function (e) {
|
|
352
|
-
if (this.done) throw e;
|
|
353
|
-
var r = this;
|
|
354
|
-
function handle(n, o) {
|
|
355
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
356
|
-
}
|
|
357
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
358
|
-
var i = this.tryEntries[o],
|
|
359
|
-
a = i.completion;
|
|
360
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
361
|
-
if (i.tryLoc <= this.prev) {
|
|
362
|
-
var c = n.call(i, "catchLoc"),
|
|
363
|
-
u = n.call(i, "finallyLoc");
|
|
364
|
-
if (c && u) {
|
|
365
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
366
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
367
|
-
} else if (c) {
|
|
368
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
369
|
-
} else {
|
|
370
|
-
if (!u) throw Error("try statement without catch or finally");
|
|
371
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
},
|
|
376
|
-
abrupt: function (t, e) {
|
|
377
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
378
|
-
var o = this.tryEntries[r];
|
|
379
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
380
|
-
var i = o;
|
|
381
|
-
break;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
385
|
-
var a = i ? i.completion : {};
|
|
386
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
387
|
-
},
|
|
388
|
-
complete: function (t, e) {
|
|
389
|
-
if ("throw" === t.type) throw t.arg;
|
|
390
|
-
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
391
|
-
},
|
|
392
|
-
finish: function (t) {
|
|
393
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
394
|
-
var r = this.tryEntries[e];
|
|
395
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
396
|
-
}
|
|
397
|
-
},
|
|
398
|
-
catch: function (t) {
|
|
399
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
400
|
-
var r = this.tryEntries[e];
|
|
401
|
-
if (r.tryLoc === t) {
|
|
402
|
-
var n = r.completion;
|
|
403
|
-
if ("throw" === n.type) {
|
|
404
|
-
var o = n.arg;
|
|
405
|
-
resetTryEntry(r);
|
|
406
|
-
}
|
|
407
|
-
return o;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
throw Error("illegal catch attempt");
|
|
411
|
-
},
|
|
412
|
-
delegateYield: function (e, r, n) {
|
|
413
|
-
return this.delegate = {
|
|
414
|
-
iterator: values(e),
|
|
415
|
-
resultName: r,
|
|
416
|
-
nextLoc: n
|
|
417
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
418
|
-
}
|
|
419
|
-
}, e;
|
|
294
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
420
295
|
}
|
|
421
296
|
function _setPrototypeOf(t, e) {
|
|
422
297
|
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
@@ -459,6 +334,74 @@ function _wrapNativeSuper(t) {
|
|
|
459
334
|
}), _setPrototypeOf(Wrapper, t);
|
|
460
335
|
}, _wrapNativeSuper(t);
|
|
461
336
|
}
|
|
337
|
+
function _regeneratorRuntime() {
|
|
338
|
+
|
|
339
|
+
var r = _regenerator(),
|
|
340
|
+
e = r.m(_regeneratorRuntime),
|
|
341
|
+
t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
|
|
342
|
+
function n(r) {
|
|
343
|
+
var e = "function" == typeof r && r.constructor;
|
|
344
|
+
return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
|
|
345
|
+
}
|
|
346
|
+
var o = {
|
|
347
|
+
throw: 1,
|
|
348
|
+
return: 2,
|
|
349
|
+
break: 3,
|
|
350
|
+
continue: 3
|
|
351
|
+
};
|
|
352
|
+
function a(r) {
|
|
353
|
+
var e, t;
|
|
354
|
+
return function (n) {
|
|
355
|
+
e || (e = {
|
|
356
|
+
stop: function () {
|
|
357
|
+
return t(n.a, 2);
|
|
358
|
+
},
|
|
359
|
+
catch: function () {
|
|
360
|
+
return n.v;
|
|
361
|
+
},
|
|
362
|
+
abrupt: function (r, e) {
|
|
363
|
+
return t(n.a, o[r], e);
|
|
364
|
+
},
|
|
365
|
+
delegateYield: function (r, o, a) {
|
|
366
|
+
return e.resultName = o, t(n.d, _regeneratorValues(r), a);
|
|
367
|
+
},
|
|
368
|
+
finish: function (r) {
|
|
369
|
+
return t(n.f, r);
|
|
370
|
+
}
|
|
371
|
+
}, t = function (r, t, o) {
|
|
372
|
+
n.p = e.prev, n.n = e.next;
|
|
373
|
+
try {
|
|
374
|
+
return r(t, o);
|
|
375
|
+
} finally {
|
|
376
|
+
e.next = n.n;
|
|
377
|
+
}
|
|
378
|
+
}), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
|
|
379
|
+
try {
|
|
380
|
+
return r.call(this, e);
|
|
381
|
+
} finally {
|
|
382
|
+
n.p = e.prev, n.n = e.next;
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
return (_regeneratorRuntime = function () {
|
|
387
|
+
return {
|
|
388
|
+
wrap: function (e, t, n, o) {
|
|
389
|
+
return r.w(a(e), t, n, o && o.reverse());
|
|
390
|
+
},
|
|
391
|
+
isGeneratorFunction: n,
|
|
392
|
+
mark: r.m,
|
|
393
|
+
awrap: function (r, e) {
|
|
394
|
+
return new _OverloadYield(r, e);
|
|
395
|
+
},
|
|
396
|
+
AsyncIterator: _regeneratorAsyncIterator,
|
|
397
|
+
async: function (r, e, t, o, u) {
|
|
398
|
+
return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u);
|
|
399
|
+
},
|
|
400
|
+
keys: _regeneratorKeys,
|
|
401
|
+
values: _regeneratorValues
|
|
402
|
+
};
|
|
403
|
+
})();
|
|
404
|
+
}
|
|
462
405
|
|
|
463
406
|
var typeProp = function typeProp() {
|
|
464
407
|
var args = [].slice.call(arguments);
|
package/dist/umd/worker.js
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ejs = {}));
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
+
function _OverloadYield(e, d) {
|
|
8
|
+
this.v = e, this.k = d;
|
|
9
|
+
}
|
|
7
10
|
function _assertClassBrand(e, t, n) {
|
|
8
11
|
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
9
12
|
throw new TypeError("Private element is not present on this object");
|
|
@@ -121,306 +124,178 @@
|
|
|
121
124
|
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
122
125
|
return _assertThisInitialized(t);
|
|
123
126
|
}
|
|
124
|
-
function
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
127
|
+
function _regenerator() {
|
|
128
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
129
|
+
var e,
|
|
130
|
+
t,
|
|
131
|
+
r = "function" == typeof Symbol ? Symbol : {},
|
|
132
|
+
n = r.iterator || "@@iterator",
|
|
133
|
+
o = r.toStringTag || "@@toStringTag";
|
|
134
|
+
function i(r, n, o, i) {
|
|
135
|
+
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
136
|
+
u = Object.create(c.prototype);
|
|
137
|
+
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
138
|
+
var i,
|
|
139
|
+
c,
|
|
140
|
+
u,
|
|
141
|
+
f = 0,
|
|
142
|
+
p = o || [],
|
|
143
|
+
y = !1,
|
|
144
|
+
G = {
|
|
145
|
+
p: 0,
|
|
146
|
+
n: 0,
|
|
147
|
+
v: e,
|
|
148
|
+
a: d,
|
|
149
|
+
f: d.bind(e, 4),
|
|
150
|
+
d: function (t, r) {
|
|
151
|
+
return i = t, c = 0, u = e, G.n = r, a;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
function d(r, n) {
|
|
155
|
+
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
156
|
+
var o,
|
|
157
|
+
i = p[t],
|
|
158
|
+
d = G.p,
|
|
159
|
+
l = i[2];
|
|
160
|
+
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
|
|
161
|
+
}
|
|
162
|
+
if (o || r > 1) return a;
|
|
163
|
+
throw y = !0, n;
|
|
164
|
+
}
|
|
165
|
+
return function (o, p, l) {
|
|
166
|
+
if (f > 1) throw TypeError("Generator is already running");
|
|
167
|
+
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
|
|
168
|
+
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
|
|
169
|
+
try {
|
|
170
|
+
if (f = 2, i) {
|
|
171
|
+
if (c || (o = "next"), t = i[o]) {
|
|
172
|
+
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
|
|
173
|
+
if (!t.done) return t;
|
|
174
|
+
u = t.value, c < 2 && (c = 0);
|
|
175
|
+
} else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
|
|
176
|
+
i = e;
|
|
177
|
+
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
|
|
178
|
+
} catch (t) {
|
|
179
|
+
i = e, c = 1, u = t;
|
|
180
|
+
} finally {
|
|
181
|
+
f = 1;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
value: t,
|
|
186
|
+
done: y
|
|
187
|
+
};
|
|
172
188
|
};
|
|
173
|
-
}
|
|
189
|
+
}(r, o, i), !0), u;
|
|
174
190
|
}
|
|
175
|
-
|
|
176
|
-
var h = "suspendedStart",
|
|
177
|
-
l = "suspendedYield",
|
|
178
|
-
f = "executing",
|
|
179
|
-
s = "completed",
|
|
180
|
-
y = {};
|
|
191
|
+
var a = {};
|
|
181
192
|
function Generator() {}
|
|
182
193
|
function GeneratorFunction() {}
|
|
183
194
|
function GeneratorFunctionPrototype() {}
|
|
184
|
-
|
|
185
|
-
|
|
195
|
+
t = Object.getPrototypeOf;
|
|
196
|
+
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
197
|
+
return this;
|
|
198
|
+
}), t),
|
|
199
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
200
|
+
function f(e) {
|
|
201
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
202
|
+
}
|
|
203
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
|
|
186
204
|
return this;
|
|
205
|
+
}), _regeneratorDefine(u, "toString", function () {
|
|
206
|
+
return "[object Generator]";
|
|
207
|
+
}), (_regenerator = function () {
|
|
208
|
+
return {
|
|
209
|
+
w: i,
|
|
210
|
+
m: f
|
|
211
|
+
};
|
|
212
|
+
})();
|
|
213
|
+
}
|
|
214
|
+
function _regeneratorAsync(n, e, r, t, o) {
|
|
215
|
+
var a = _regeneratorAsyncGen(n, e, r, t, o);
|
|
216
|
+
return a.next().then(function (n) {
|
|
217
|
+
return n.done ? n.value : a.next();
|
|
187
218
|
});
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
219
|
+
}
|
|
220
|
+
function _regeneratorAsyncGen(r, e, t, o, n) {
|
|
221
|
+
return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise);
|
|
222
|
+
}
|
|
223
|
+
function _regeneratorAsyncIterator(t, e) {
|
|
224
|
+
function n(r, o, i, f) {
|
|
225
|
+
try {
|
|
226
|
+
var c = t[r](o),
|
|
227
|
+
u = c.value;
|
|
228
|
+
return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) {
|
|
229
|
+
n("next", t, i, f);
|
|
230
|
+
}, function (t) {
|
|
231
|
+
n("throw", t, i, f);
|
|
232
|
+
}) : e.resolve(u).then(function (t) {
|
|
233
|
+
c.value = t, i(c);
|
|
234
|
+
}, function (t) {
|
|
235
|
+
return n("throw", t, i, f);
|
|
196
236
|
});
|
|
197
|
-
})
|
|
237
|
+
} catch (t) {
|
|
238
|
+
f(t);
|
|
239
|
+
}
|
|
198
240
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
}, function (t) {
|
|
208
|
-
invoke("throw", t, i, a);
|
|
209
|
-
}) : e.resolve(h).then(function (t) {
|
|
210
|
-
u.value = t, i(u);
|
|
211
|
-
}, function (t) {
|
|
212
|
-
return invoke("throw", t, i, a);
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
a(c.arg);
|
|
241
|
+
var r;
|
|
242
|
+
this.next || (_regeneratorDefine(_regeneratorAsyncIterator.prototype), _regeneratorDefine(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
|
|
243
|
+
return this;
|
|
244
|
+
})), _regeneratorDefine(this, "_invoke", function (t, o, i) {
|
|
245
|
+
function f() {
|
|
246
|
+
return new e(function (e, r) {
|
|
247
|
+
n(t, i, e, r);
|
|
248
|
+
});
|
|
216
249
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
});
|
|
250
|
+
return r = r ? r.then(f, f) : f();
|
|
251
|
+
}, !0);
|
|
252
|
+
}
|
|
253
|
+
function _regeneratorDefine(e, r, n, t) {
|
|
254
|
+
var i = Object.defineProperty;
|
|
255
|
+
try {
|
|
256
|
+
i({}, "", {});
|
|
257
|
+
} catch (e) {
|
|
258
|
+
i = 0;
|
|
228
259
|
}
|
|
229
|
-
function
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
260
|
+
_regeneratorDefine = function (e, r, n, t) {
|
|
261
|
+
function o(r, n) {
|
|
262
|
+
_regeneratorDefine(e, r, function (e) {
|
|
263
|
+
return this._invoke(r, n, e);
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
r ? i ? i(e, r, {
|
|
267
|
+
value: n,
|
|
268
|
+
enumerable: !t,
|
|
269
|
+
configurable: !t,
|
|
270
|
+
writable: !t
|
|
271
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
272
|
+
}, _regeneratorDefine(e, r, n, t);
|
|
273
|
+
}
|
|
274
|
+
function _regeneratorKeys(e) {
|
|
275
|
+
var n = Object(e),
|
|
276
|
+
r = [];
|
|
277
|
+
for (var t in n) r.unshift(t);
|
|
278
|
+
return function e() {
|
|
279
|
+
for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
|
|
280
|
+
return e.done = !0, e;
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function _regeneratorValues(e) {
|
|
284
|
+
if (null != e) {
|
|
285
|
+
var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
|
|
286
|
+
r = 0;
|
|
287
|
+
if (t) return t.call(e);
|
|
288
|
+
if ("function" == typeof e.next) return e;
|
|
289
|
+
if (!isNaN(e.length)) return {
|
|
290
|
+
next: function () {
|
|
291
|
+
return e && r >= e.length && (e = void 0), {
|
|
292
|
+
value: e && e[r++],
|
|
293
|
+
done: !e
|
|
238
294
|
};
|
|
239
295
|
}
|
|
240
|
-
for (n.method = i, n.arg = a;;) {
|
|
241
|
-
var c = n.delegate;
|
|
242
|
-
if (c) {
|
|
243
|
-
var u = maybeInvokeDelegate(c, n);
|
|
244
|
-
if (u) {
|
|
245
|
-
if (u === y) continue;
|
|
246
|
-
return u;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
250
|
-
if (o === h) throw o = s, n.arg;
|
|
251
|
-
n.dispatchException(n.arg);
|
|
252
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
253
|
-
o = f;
|
|
254
|
-
var p = tryCatch(e, r, n);
|
|
255
|
-
if ("normal" === p.type) {
|
|
256
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
257
|
-
return {
|
|
258
|
-
value: p.arg,
|
|
259
|
-
done: n.done
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
263
|
-
}
|
|
264
296
|
};
|
|
265
297
|
}
|
|
266
|
-
|
|
267
|
-
var n = r.method,
|
|
268
|
-
o = e.iterator[n];
|
|
269
|
-
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
270
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
271
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
272
|
-
var a = i.arg;
|
|
273
|
-
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
274
|
-
}
|
|
275
|
-
function pushTryEntry(t) {
|
|
276
|
-
var e = {
|
|
277
|
-
tryLoc: t[0]
|
|
278
|
-
};
|
|
279
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
280
|
-
}
|
|
281
|
-
function resetTryEntry(t) {
|
|
282
|
-
var e = t.completion || {};
|
|
283
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
284
|
-
}
|
|
285
|
-
function Context(t) {
|
|
286
|
-
this.tryEntries = [{
|
|
287
|
-
tryLoc: "root"
|
|
288
|
-
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
289
|
-
}
|
|
290
|
-
function values(e) {
|
|
291
|
-
if (e || "" === e) {
|
|
292
|
-
var r = e[a];
|
|
293
|
-
if (r) return r.call(e);
|
|
294
|
-
if ("function" == typeof e.next) return e;
|
|
295
|
-
if (!isNaN(e.length)) {
|
|
296
|
-
var o = -1,
|
|
297
|
-
i = function next() {
|
|
298
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
299
|
-
return next.value = t, next.done = !0, next;
|
|
300
|
-
};
|
|
301
|
-
return i.next = i;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
throw new TypeError(typeof e + " is not iterable");
|
|
305
|
-
}
|
|
306
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
307
|
-
value: GeneratorFunctionPrototype,
|
|
308
|
-
configurable: !0
|
|
309
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
310
|
-
value: GeneratorFunction,
|
|
311
|
-
configurable: !0
|
|
312
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
313
|
-
var e = "function" == typeof t && t.constructor;
|
|
314
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
315
|
-
}, e.mark = function (t) {
|
|
316
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
317
|
-
}, e.awrap = function (t) {
|
|
318
|
-
return {
|
|
319
|
-
__await: t
|
|
320
|
-
};
|
|
321
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
322
|
-
return this;
|
|
323
|
-
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
324
|
-
void 0 === i && (i = Promise);
|
|
325
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
326
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
327
|
-
return t.done ? t.value : a.next();
|
|
328
|
-
});
|
|
329
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
330
|
-
return this;
|
|
331
|
-
}), define(g, "toString", function () {
|
|
332
|
-
return "[object Generator]";
|
|
333
|
-
}), e.keys = function (t) {
|
|
334
|
-
var e = Object(t),
|
|
335
|
-
r = [];
|
|
336
|
-
for (var n in e) r.push(n);
|
|
337
|
-
return r.reverse(), function next() {
|
|
338
|
-
for (; r.length;) {
|
|
339
|
-
var t = r.pop();
|
|
340
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
|
341
|
-
}
|
|
342
|
-
return next.done = !0, next;
|
|
343
|
-
};
|
|
344
|
-
}, e.values = values, Context.prototype = {
|
|
345
|
-
constructor: Context,
|
|
346
|
-
reset: function (e) {
|
|
347
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
348
|
-
},
|
|
349
|
-
stop: function () {
|
|
350
|
-
this.done = !0;
|
|
351
|
-
var t = this.tryEntries[0].completion;
|
|
352
|
-
if ("throw" === t.type) throw t.arg;
|
|
353
|
-
return this.rval;
|
|
354
|
-
},
|
|
355
|
-
dispatchException: function (e) {
|
|
356
|
-
if (this.done) throw e;
|
|
357
|
-
var r = this;
|
|
358
|
-
function handle(n, o) {
|
|
359
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
360
|
-
}
|
|
361
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
362
|
-
var i = this.tryEntries[o],
|
|
363
|
-
a = i.completion;
|
|
364
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
365
|
-
if (i.tryLoc <= this.prev) {
|
|
366
|
-
var c = n.call(i, "catchLoc"),
|
|
367
|
-
u = n.call(i, "finallyLoc");
|
|
368
|
-
if (c && u) {
|
|
369
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
370
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
371
|
-
} else if (c) {
|
|
372
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
373
|
-
} else {
|
|
374
|
-
if (!u) throw Error("try statement without catch or finally");
|
|
375
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
abrupt: function (t, e) {
|
|
381
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
382
|
-
var o = this.tryEntries[r];
|
|
383
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
384
|
-
var i = o;
|
|
385
|
-
break;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
389
|
-
var a = i ? i.completion : {};
|
|
390
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
391
|
-
},
|
|
392
|
-
complete: function (t, e) {
|
|
393
|
-
if ("throw" === t.type) throw t.arg;
|
|
394
|
-
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
395
|
-
},
|
|
396
|
-
finish: function (t) {
|
|
397
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
398
|
-
var r = this.tryEntries[e];
|
|
399
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
|
-
catch: function (t) {
|
|
403
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
404
|
-
var r = this.tryEntries[e];
|
|
405
|
-
if (r.tryLoc === t) {
|
|
406
|
-
var n = r.completion;
|
|
407
|
-
if ("throw" === n.type) {
|
|
408
|
-
var o = n.arg;
|
|
409
|
-
resetTryEntry(r);
|
|
410
|
-
}
|
|
411
|
-
return o;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
throw Error("illegal catch attempt");
|
|
415
|
-
},
|
|
416
|
-
delegateYield: function (e, r, n) {
|
|
417
|
-
return this.delegate = {
|
|
418
|
-
iterator: values(e),
|
|
419
|
-
resultName: r,
|
|
420
|
-
nextLoc: n
|
|
421
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
422
|
-
}
|
|
423
|
-
}, e;
|
|
298
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
424
299
|
}
|
|
425
300
|
function _setPrototypeOf(t, e) {
|
|
426
301
|
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
@@ -463,6 +338,74 @@
|
|
|
463
338
|
}), _setPrototypeOf(Wrapper, t);
|
|
464
339
|
}, _wrapNativeSuper(t);
|
|
465
340
|
}
|
|
341
|
+
function _regeneratorRuntime() {
|
|
342
|
+
|
|
343
|
+
var r = _regenerator(),
|
|
344
|
+
e = r.m(_regeneratorRuntime),
|
|
345
|
+
t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
|
|
346
|
+
function n(r) {
|
|
347
|
+
var e = "function" == typeof r && r.constructor;
|
|
348
|
+
return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
|
|
349
|
+
}
|
|
350
|
+
var o = {
|
|
351
|
+
throw: 1,
|
|
352
|
+
return: 2,
|
|
353
|
+
break: 3,
|
|
354
|
+
continue: 3
|
|
355
|
+
};
|
|
356
|
+
function a(r) {
|
|
357
|
+
var e, t;
|
|
358
|
+
return function (n) {
|
|
359
|
+
e || (e = {
|
|
360
|
+
stop: function () {
|
|
361
|
+
return t(n.a, 2);
|
|
362
|
+
},
|
|
363
|
+
catch: function () {
|
|
364
|
+
return n.v;
|
|
365
|
+
},
|
|
366
|
+
abrupt: function (r, e) {
|
|
367
|
+
return t(n.a, o[r], e);
|
|
368
|
+
},
|
|
369
|
+
delegateYield: function (r, o, a) {
|
|
370
|
+
return e.resultName = o, t(n.d, _regeneratorValues(r), a);
|
|
371
|
+
},
|
|
372
|
+
finish: function (r) {
|
|
373
|
+
return t(n.f, r);
|
|
374
|
+
}
|
|
375
|
+
}, t = function (r, t, o) {
|
|
376
|
+
n.p = e.prev, n.n = e.next;
|
|
377
|
+
try {
|
|
378
|
+
return r(t, o);
|
|
379
|
+
} finally {
|
|
380
|
+
e.next = n.n;
|
|
381
|
+
}
|
|
382
|
+
}), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
|
|
383
|
+
try {
|
|
384
|
+
return r.call(this, e);
|
|
385
|
+
} finally {
|
|
386
|
+
n.p = e.prev, n.n = e.next;
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
return (_regeneratorRuntime = function () {
|
|
391
|
+
return {
|
|
392
|
+
wrap: function (e, t, n, o) {
|
|
393
|
+
return r.w(a(e), t, n, o && o.reverse());
|
|
394
|
+
},
|
|
395
|
+
isGeneratorFunction: n,
|
|
396
|
+
mark: r.m,
|
|
397
|
+
awrap: function (r, e) {
|
|
398
|
+
return new _OverloadYield(r, e);
|
|
399
|
+
},
|
|
400
|
+
AsyncIterator: _regeneratorAsyncIterator,
|
|
401
|
+
async: function (r, e, t, o, u) {
|
|
402
|
+
return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u);
|
|
403
|
+
},
|
|
404
|
+
keys: _regeneratorKeys,
|
|
405
|
+
values: _regeneratorValues
|
|
406
|
+
};
|
|
407
|
+
})();
|
|
408
|
+
}
|
|
466
409
|
|
|
467
410
|
var typeProp = function typeProp() {
|
|
468
411
|
var args = [].slice.call(arguments);
|
package/dist/umd/worker.min.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ejs={})}(this,(function(t){"use strict";function e(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function n(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}function r(t,e,n){return e=l(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,v()?Reflect.construct(e,n||[],l(t).constructor):e.apply(t,n))}function o(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,n){return t.get(e(t,n))}function a(t,e,n){o(t,e),e.set(t,n)}function c(t,n,r){return t.set(e(t,n),r),r}function s(t,e){o(t,e),e.add(t)}function h(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,g(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t,e,n){return(e=g(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}function y(){y=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,u=Object.create(i.prototype),a=new F(r||[]);return o(u,"_invoke",{value:L(t,n,a)}),u}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var l="suspendedStart",p="suspendedYield",v="executing",d="completed",g={};function m(){}function w(){}function b(){}var E={};s(E,u,(function(){return this}));var j=Object.getPrototypeOf,k=j&&j(j(W([])));k&&k!==n&&r.call(k,u)&&(E=k);var O=b.prototype=m.prototype=Object.create(E);function x(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,u,a){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,h=s.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(h).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function L(e,n,r){var o=l;return function(i,u){if(o===v)throw Error("Generator is already running");if(o===d){if("throw"===i)throw u;return{value:t,done:!0}}for(r.method=i,r.arg=u;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===l)throw o=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=v;var s=f(e,n,r);if("normal"===s.type){if(o=r.done?d:p,s.arg===g)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=d,r.method="throw",r.arg=s.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var u=i.arg;return u?u.done?(n[e.resultName]=u.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function W(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(typeof e+" is not iterable")}return w.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},x(P.prototype),s(P.prototype,a,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var u=new P(h(t,n,r,o),i);return e.isGeneratorFunction(n)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},x(O),s(O,c,"Generator"),s(O,u,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=W,F.prototype={constructor:F,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return a.type="throw",a.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=r.call(u,"catchLoc"),s=r.call(u,"finallyLoc");if(c&&s){if(this.prev<u.catchLoc)return o(u.catchLoc,!0);if(this.prev<u.finallyLoc)return o(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return o(u.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return o(u.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;M(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:W(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function g(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:e+""}function m(t){var e="function"==typeof Map?new Map:void 0;return m=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(v())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&d(o,n.prototype),o}(t,arguments,l(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),d(n,t)},m(t)}var w=function(){var t=[].slice.call(arguments),e=t.shift();return t.filter(e).pop()},b=function(t){return Array.isArray(t)},E=function(t){return"function"==typeof t},j=function(t){return"string"==typeof t},k=function(t){return"boolean"==typeof t},O=function(t){return void 0===t},x="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0),P={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},L={"&":"&","<":"<",">":">",'"':""","'":"'"},S=function(t){return new RegExp(["[",Object.keys(t).join(""),"]"].join(""),"g")},T=S(L),M=S(P),F=function(){return(""+(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")).replace(T,(function(t){return L[t]}))},W=function(t,e){var n=t;return null==n?"":!0===Boolean(e)?F(n):n},_=function(t,e){if(!1===function(t,e){return Boolean(t instanceof e)}(t,e))throw new TypeError("".concat(t," in not instance of ").concat(e))},N=function(t,e,n){for(var r=t,o=String(e).split("."),i=o.pop(),u=0;u<o.length;u++){var a=o[u];if(E(r.toJSON)&&(r=r.toJSON()),n&&!1===r.hasOwnProperty(a)){r={};break}r=r[a]=r[a]||{}}return E(r.toJSON)&&(r=r.toJSON()),[r,i]},B=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.filter((function(t){return t})).reduce((function(t,e){return Object.assign(t,e)}),t)},R=function(){},C=function(t,e){var n;for(n in t)$(t,n)&&e(t[n],n,t)},A=function(t,e){return function(t,e){var n=t instanceof Array,r=n?[]:{};return C(t,(function(t,o,i){var u=e(t,o,i);!1===O(u)&&(n?r.push(u):r[o]=u)})),r}(t,(function(t,n){if(-1===e.indexOf(n))return t}))},$=function(t,e){return t&&t.hasOwnProperty(e)},U={export:"ejsPrecompiled",cache:!0,chokidar:null,path:"views",resolver:function(t,e){return Promise.resolve(["resolver is not defined",t,e].join(" "))},extension:"ejs",rmWhitespace:!0,withObject:!0,globalHelpers:[],vars:{SCOPE:"ejs",COMPONENT:"ui",ELEMENT:"el",EXTEND:"$$e",BUFFER:"$$a",LAYOUT:"$$l",BLOCKS:"$$b",MACRO:"$$m",SAFE:"$$v"},token:{start:"<%",end:"%>",regex:"([\\s\\S]+?)"}},q=function(t,e){B(t,{path:w(j,U.path,t.path,e.path),export:w(j,U.export,t.export,e.export),resolver:w(E,U.resolver,t.resolver,e.resolver),extension:w(j,U.extension,t.extension,e.extension),withObject:w(k,U.withObject,t.withObject,e.withObject),rmWhitespace:w(k,U.rmWhitespace,t.rmWhitespace,e.rmWhitespace),cache:w(k,U.cache,t.cache,e.cache),token:B({},U.token,t.token,e.token),vars:B({},U.vars,t.vars,e.vars),globalHelpers:w(b,U.globalHelpers,t.globalHelpers,e.globalHelpers)})},H="undefined"!=typeof globalThis?globalThis:window||self,G=new WeakMap,J=new WeakMap,Y=function(){return h((function t(e){i(this,t),a(this,G,!0),a(this,J,{}),this.configure(e)}),[{key:"load",value:function(t){u(G,this)&&B(u(J,this),t||{})}},{key:"get",value:function(t){if(u(G,this))return u(J,this)[t]}},{key:"set",value:function(t,e){u(G,this)&&(u(J,this)[t]=e)}},{key:"exist",value:function(t){if(u(G,this))return $(u(J,this),t)}},{key:"clear",value:function(){c(J,this,{})}},{key:"remove",value:function(t){delete u(J,this)[t]}},{key:"resolve",value:function(t){return Promise.resolve(this.get(t))}},{key:"configure",value:function(t){c(G,this,t.cache),!1===x&&this.load(H[t.export])}}])}(),D=new WeakMap,I=new WeakMap,K=function(){return h((function t(e){i(this,t),a(this,D,{}),a(this,I,[{symbol:"-",format:function(t){return"')\n".concat(this.BUFFER,"(").concat(this.SAFE,"(").concat(t,",1))\n").concat(this.BUFFER,"('")}},{symbol:"=",format:function(t){return"')\n".concat(this.BUFFER,"(").concat(this.SAFE,"(").concat(t,"))\n").concat(this.BUFFER,"('")}},{symbol:"#",format:function(t){return"')\n/**".concat(t,"**/\n").concat(this.BUFFER,"('")}},{symbol:"",format:function(t){return"')\n".concat(t.trim(),"\n").concat(this.BUFFER,"('")}}]),this.configure(e)}),[{key:"configure",value:function(t){var e=this;u(D,this).withObject=t.withObject,u(D,this).rmWhitespace=t.rmWhitespace,u(D,this).token=t.token,u(D,this).vars=t.vars,u(D,this).globalHelpers=t.globalHelpers,u(D,this).matches=[],u(D,this).formats=[],u(D,this).slurp={match:"[s\t\n]*",start:[u(D,this).token.start,"_"],end:["_",u(D,this).token.end]},u(I,this).forEach((function(t){u(D,e).matches.push(u(D,e).token.start.concat(t.symbol).concat(u(D,e).token.regex).concat(u(D,e).token.end)),u(D,e).formats.push(t.format.bind(u(D,e).vars))})),u(D,this).regex=new RegExp(u(D,this).matches.join("|").concat("|$"),"g"),u(D,this).slurpStart=new RegExp([u(D,this).slurp.match,u(D,this).slurp.start.join("")].join(""),"gm"),u(D,this).slurpEnd=new RegExp([u(D,this).slurp.end.join(""),u(D,this).slurp.match].join(""),"gm")}},{key:"compile",value:function(t,e){var n=this,r=u(D,this).vars,o=r.SCOPE,i=r.SAFE,a=r.BUFFER,c=r.COMPONENT,s=r.ELEMENT,h=u(D,this).globalHelpers;u(D,this).rmWhitespace&&(t=String(t).replace(/[\r\n]+/g,"\n").replace(/^\s+|\s+$/gm,"")),t=String(t).replace(u(D,this).slurpStart,u(D,this).token.start).replace(u(D,this).slurpEnd,u(D,this).token.end);var f,l,p,v="".concat(a,"('");f=u(D,this).regex,l=function(e,r,o){v+=(""+t.slice(r,o)).replace(M,(function(t){return"\\"+P[t]})),e.forEach((function(t,e){t&&(v+=u(D,n).formats[e](t))}))},p=0,t.replace(f,(function(){var t=[].slice.call(arguments,0,-1),e=t.pop(),n=t.shift();return l(t,p,e),p=e+n.length,n})),v="try{".concat(v+="');","}catch(e){return ").concat(a,".error(e)}"),u(D,this).withObject&&(v="with(".concat(o,"){").concat(v,"}")),v="".concat(a,".start();").concat(v,"return ").concat(a,".end();"),v+="\n//# sourceURL=".concat(e);var y=null,d=[o,c,s,a,i].concat(h);try{(y=Function.apply(null,d.concat(v))).source="(function(".concat(d.join(","),"){\n").concat(v,"\n});")}catch(t){throw t.filename=e,t.source=v,t}return y}}])}(),V=new WeakMap,X=new WeakMap,z=new WeakMap,Q=new WeakMap,Z=new WeakSet,tt=function(){return h((function t(e,n,r){i(this,t),s(this,Z),a(this,V,void 0),a(this,X,void 0),a(this,z,void 0),a(this,Q,void 0),_(n,Y),_(r,K),c(X,this,n),c(z,this,r),this.configure(e)}),[{key:"configure",value:function(t){c(V,this,t.path),E(t.resolver)&&c(Q,this,t.resolver)}},{key:"get",value:function(t){var n=this;return u(X,this).exist(t)?u(X,this).resolve(t):e(Z,this,et).call(this,t).then((function(r){return e(Z,n,nt).call(n,t,e(Z,n,rt).call(n,r,t))}))}}])}();function et(t){return u(Q,this).call(this,u(V,this),t)}function nt(t,e){return u(X,this).set(t,e),e}function rt(t,e){return E(t)?t:u(z,this).compile(t,e)}var ot=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],it=" ",ut='"',at="/",ct="<",st=">",ht=function(t,e,n){var r=[],o=-1===ot.indexOf(t),i=function(t,e){var n=[];return C(t,(function(t,r,o){var i=e(t,r,o);!1===O(i)&&n.push(i)})),n}(e,(function(t,e){if(null!=t)return[F(e),[ut,F(t),ut].join("")].join("=")})).join(it);return r.push([ct,t,it,i,st].join("")),n&&o&&r.push(n instanceof Array?n.join(""):n),o&&r.push([ct,at,t,st].join("")),r.join("")},ft=function(t){function e(t){var n;return i(this,e),f(n=r(this,e),"code",0),n.message=t,n}return p(e,t),h(e,[{key:"getCode",value:function(){return this.code}},{key:"getMessage",value:function(){return this.message}},{key:"toString",value:function(){return this.getMessage()}}])}(m(Error)),lt=function(t){function e(){var t;i(this,e);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return f(t=r(this,e,[].concat(o)),"code",404),t}return p(e,t),h(e)}(ft),pt=function(t){function e(){var t;i(this,e);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return f(t=r(this,e,[].concat(o)),"code",500),t}return p(e,t),h(e)}(ft);function vt(t){return Promise.all(t||[]).then((function(t){return t.join("")})).catch((function(t){return t}))}function yt(){var t=[],e=[],n=function(t){e.push(t)};return n.start=function(){e=[]},n.backup=function(){t.push(e.concat()),e=[]},n.restore=function(){var n=e.concat();return e=t.pop(),vt(n)},n.error=function(t){return e=t,Promise.reject(new pt(e.message));var e},n.end=function(){return vt(e)},n}var dt=Symbol("ContextScope.parentTemplate"),gt=new WeakMap,mt=function(){return h((function t(e,n){i(this,t),a(this,gt,void 0),this.configure(e,n)}),[{key:"create",value:function(t){return new(u(gt,this))(t)}},{key:"configure",value:function(t,e){c(gt,this,function(t,e){var n=t.vars,r=n.BLOCKS,o=n.MACRO,i=n.EXTEND,u=n.LAYOUT,a=n.BUFFER,c=n.SAFE,s=n.SCOPE,h=n.COMPONENT,f=n.ELEMENT;function l(t){this[dt]=null,this[r]={},this[o]={},Object.assign(this,A(t,[s,a,c,h,f]))}return Object.assign(l.prototype,e),Object.defineProperty(l.prototype,a,{value:yt()}),Object.defineProperty(l.prototype,r,{value:{},writable:!0}),Object.defineProperty(l.prototype,o,{value:{},writable:!0}),Object.defineProperty(l.prototype,u,{value:!1,writable:!0}),Object.defineProperty(l.prototype,i,{value:!1,writable:!0}),Object.defineProperty(l.prototype,dt,{value:null,writable:!0}),Object.defineProperties(l.prototype,{setParentTemplate:{value:function(t){return this[dt]=t,this}},getParentTemplate:{value:function(){return this[dt]}},useSafeValue:{get:function(){return W}},useComponent:{get:function(){return E(this[h])?this[h].bind(this):function(){throw new Error("".concat(h," must be a function"))}}},useElement:{get:function(){return E(this[f])?this[f].bind(this):function(){throw new Error("".concat(f," must be a function"))}}},getMacro:{value:function(){return this[o]}},getBuffer:{value:function(){return this[a]}},getBlocks:{value:function(){return this[r]}},setExtend:{value:function(t){return this[i]=t,this}},getExtend:{value:function(){return this[i]}},setLayout:{value:function(t){return this[u]=t,this}},getLayout:{value:function(){return this[u]}},clone:{value:function(t){var e=[u,i,a];return!0===t&&e.push(r),A(this,e)}},extend:{value:function(t){this.setExtend(!0),this.setLayout(t)}},echo:{value:function(t){var e=this.getBuffer();[].slice.call(arguments).forEach(e)}},fn:{value:function(t){var e=this.getBuffer(),n=this;return function(){if(E(t))return e.backup(),e(t.apply(n,arguments)),e.restore()}}},macro:{value:function(t,e){var n=this.getMacro(),r=this.fn(e),o=this;n[t]=function(){return o.echo(r.apply(void 0,arguments))}}},call:{value:function(t){var e=this.getMacro()[t],n=[].slice.call(arguments,1);if(E(e))return e.apply(e,n)}},block:{value:function(t,e){var n=this,r=this.getBlocks();if(r[t]=r[t]||[],r[t].push(this.fn(e)),!this.getExtend()){var o=Object.assign([],r[t]),i=function(){return o.shift()},u=function(){var t=i();return t?function(){n.echo(t(u()))}:R};this.echo(i()(u()))}}},hasBlock:{value:function(t){return this.getBlocks().hasOwnProperty(t)}},include:{value:function(t,e,n){var r=!1===n?{}:this.clone(!0),o=B(r,e||{}),i=this.render(t,o);this.echo(i)}},use:{value:function(t,e){var n=this;this.echo(Promise.resolve(this.require(t)).then((function(t){var r=n.getMacro();C(t,(function(t,n){r[[e,n].join(".")]=t}))})))}},async:{value:function(t,e){this.echo(Promise.resolve(t).then(e))}},get:{value:function(t,e){var n=N(this,t,!0),r=n.shift(),o=n.pop();return $(r,o)?r[o]:e}},set:{value:function(t,e){var n=N(this,t,!1),r=n.shift(),o=n.pop();return this.getParentTemplate()&&$(r,o)?r[o]:r[o]=e}},each:{value:function(t,e){j(t)&&(t=this.get(t,[])),C(t,e)},writable:!0},el:{value:function(t,e,n){n=E(n)?this.fn(n)():n,this.echo(Promise.resolve(n).then((function(n){return ht(t,e,n)})))},writable:!0},ui:{value:function(t){},writable:!0}}),l}(t,e))}},{key:"helpers",value:function(t){B(u(gt,this).prototype,t||{})}}])}(),wt=new WeakMap,bt=new WeakMap,Et=new WeakMap,jt=new WeakMap,kt=new WeakMap,Ot=new WeakMap,xt=new WeakSet,Pt=function(){return h((function t(e){i(this,t),s(this,xt),a(this,wt,{}),a(this,bt,{}),a(this,Et,void 0),a(this,jt,void 0),a(this,kt,void 0),a(this,Ot,void 0),q(u(wt,this),e||{}),c(Et,this,new mt(u(wt,this),u(bt,this))),c(jt,this,new K(u(wt,this))),c(kt,this,new Y(u(wt,this))),c(Ot,this,new tt(u(wt,this),u(kt,this),u(jt,this))),function(t){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((function(e){e in t&&(t[e]=t[e].bind(t))}))}(this,["configure","create","render","require","context","preload","compile","helpers"]),this.helpers({require:this.require,render:this.render})}),[{key:"configure",value:function(t){return q(u(wt,this),t||{}),u(Et,this).configure(u(wt,this),u(bt,this)),u(jt,this).configure(u(wt,this)),u(kt,this).configure(u(wt,this)),u(Ot,this).configure(u(wt,this)),u(wt,this)}},{key:"filePath",value:function(t){return function(t,e){var n=t.split(".").pop();return n!==e&&(t=[t,e].join(".")),t}(t,u(wt,this).extension)}},{key:"require",value:function(t){var n=this.context({});return e(xt,this,Lt).call(this,this.filePath(t),n).then((function(){return n.getMacro()}))}},{key:"render",value:function(t,n){var r=this.context(n);return e(xt,this,Lt).call(this,this.filePath(t),r).then(this.outputContent(t,r))}},{key:"outputContent",value:function(t,e){var n=this;return function(r){return e.getExtend()?(e.setExtend(!1),n.renderLayout(e.getLayout(),e,t)):r}}},{key:"renderLayout",value:function(t,n,r){var o=this.context(n);return r&&o.setParentTemplate(r),e(xt,this,Lt).call(this,this.filePath(t),o).then(this.outputContent(t,o))}},{key:"helpers",value:function(t){u(Et,this).helpers(B(u(bt,this),t))}},{key:"context",value:function(t){return u(Et,this).create(t)}},{key:"compile",value:function(t,e){return u(jt,this).compile(t,e)}},{key:"preload",value:function(t){return u(kt,this).load(t||{})}},{key:"create",value:function(t){return new this.constructor(t)}}])}();function Lt(t,e){var n=u(wt,this).globalHelpers,r=[e,e.useComponent,e.useElement,e.getBuffer(),e.useSafeValue],o=n.filter((function(t){return E(e[t])})).map((function(t){return e[t].bind(e)}));return u(Ot,this).get(t).then((function(t){return t.apply(e,r.concat(o))}))}var St={},Tt=function(t,e){return(t=URL.parse(t)).protocol=e?"https:":"http:",t.origin},Mt=new Pt({cache:!1,withObject:!1,resolver:function(t,e){return new Promise((function(t,n){E(St[e])?t(St[e]):n(new lt("template ".concat(e," not found")))}))}}),Ft=Mt.render,Wt=Mt.context,_t=Mt.helpers,Nt=Mt.configure;function Bt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(St,t)}var Rt=Bt;function Ct(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.templates,r=void 0===e?{}:e,o=t.version,i=t.secure,u=void 0===i||i;return Bt(r),function(){var t,e=(t=y().mark((function t(e,n){return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.data=Wt({}),e.data.set("version",o),e.data.set("origin",Tt(e.req.url,u)),e.data.set("path",e.req.path),e.data.set("query",e.req.query()),e.ejs=function(t,n){return Ft(t,Object.assign({param:e.req.param()},e.data,n))},e.helpers=function(t){return _t(t)},e.render=function(t,n){return e.html(e.ejs(t,n))},t.next=10,n();case 10:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(o,i){var u=t.apply(e,r);function a(t){n(u,o,i,a,c,"next",t)}function c(t){n(u,o,i,a,c,"throw",t)}a(void 0)}))});return function(t,n){return e.apply(this,arguments)}}()}var At=Ct;t.TemplateError=ft,t.TemplateNotFound=lt,t.TemplateSyntaxError=pt,t.configure=Nt,t.context=Wt,t.helpers=_t,t.render=Ft,t.setRenderer=At,t.setTemplates=Rt,t.useRenderer=Ct,t.useTemplates=Bt}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ejs={})}(this,(function(t){"use strict";function e(t,e){this.v=t,this.k=e}function n(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function r(t,e,n,r,o,i,u){try{var c=t[i](u),a=c.value}catch(t){return void n(t)}c.done?e(a):Promise.resolve(a).then(r,o)}function o(t,e,n){return e=p(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,y()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function i(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){return t.get(n(t,e))}function a(t,e,n){i(t,e),e.set(t,n)}function s(t,e,r){return t.set(n(t,e),r),r}function f(t,e){i(t,e),e.add(t)}function l(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,E(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t,e,n){return(e=E(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O(t,e)}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}function d(){
|
|
2
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
3
|
+
var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var a=r&&r.prototype instanceof c?r:c,s=Object.create(a.prototype);return w(s,"_invoke",function(n,r,o){var i,c,a,s=0,f=o||[],l=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return i=e,c=0,a=t,h.n=n,u}};function p(n,r){for(c=n,a=r,e=0;!l&&s&&!o&&e<f.length;e++){var o,i=f[e],p=h.p,v=i[2];n>3?(o=v===r)&&(a=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=n<2&&p<i[1])?(c=0,h.v=r,h.n=i[1]):p<v&&(o=n<3||i[0]>r||r>v)&&(i[4]=n,i[5]=r,h.n=v,c=0))}if(o||n>1)return u;throw l=!0,r}return function(o,f,v){if(s>1)throw TypeError("Generator is already running");for(l&&1===f&&p(f,v),c=f,a=v;(e=c<2?t:a)||!l;){i||(c?c<3?(c>1&&(h.n=-1),p(c,a)):h.n=a:h.v=a);try{if(s=2,i){if(c||(o="next"),e=i[o]){if(!(e=e.call(i,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,c<2&&(c=0)}else 1===c&&(e=i.return)&&e.call(i),c<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=t}else if((e=(l=h.n<0)?a:n.call(r,h))!==u)break}catch(e){i=t,c=1,a=e}finally{s=1}}return{value:e,done:l}}}(n,o,i),!0),s}var u={};function c(){}function a(){}function s(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(w(e={},r,(function(){return this})),e),l=s.prototype=c.prototype=Object.create(f);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,w(t,o,"GeneratorFunction")),t.prototype=Object.create(l),t}return a.prototype=s,w(l,"constructor",s),w(s,"constructor",a),a.displayName="GeneratorFunction",w(s,o,"GeneratorFunction"),w(l),w(l,o,"Generator"),w(l,r,(function(){return this})),w(l,"toString",(function(){return"[object Generator]"})),(d=function(){return{w:i,m:h}})()}function b(t,e,n,r,o){var i=g(t,e,n,r,o);return i.next().then((function(t){return t.done?t.value:i.next()}))}function g(t,e,n,r,o){return new m(d().w(t,e,n,r),o||Promise)}function m(t,n){function r(o,i,u,c){try{var a=t[o](i),s=a.value;return s instanceof e?n.resolve(s.v).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):n.resolve(s).then((function(t){a.value=t,u(a)}),(function(t){return r("throw",t,u,c)}))}catch(t){c(t)}}var o;this.next||(w(m.prototype),w(m.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),w(this,"_invoke",(function(t,e,i){function u(){return new n((function(e,n){r(t,i,e,n)}))}return o=o?o.then(u,u):u()}),!0)}function w(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}w=function(t,e,n,r){function i(e,n){w(t,e,(function(t){return this._invoke(e,n,t)}))}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},w(t,e,n,r)}function k(t){var e=Object(t),n=[];for(var r in e)n.unshift(r);return function t(){for(;n.length;)if((r=n.pop())in e)return t.value=r,t.done=!1,t;return t.done=!0,t}}function j(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(typeof t+" is not iterable")}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}function E(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:e+""}function x(t){var e="function"==typeof Map?new Map:void 0;return x=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(y())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&O(o,n.prototype),o}(t,arguments,p(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),O(n,t)},x(t)}function P(){var t=d(),n=t.m(P),r=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function o(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===r||"GeneratorFunction"===(e.displayName||e.name))}var i={throw:1,return:2,break:3,continue:3};function u(t){var e,n;return function(r){e||(e={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(t,e){return n(r.a,i[t],e)},delegateYield:function(t,o,i){return e.resultName=o,n(r.d,j(t),i)},finish:function(t){return n(r.f,t)}},n=function(t,n,o){r.p=e.prev,r.n=e.next;try{return t(n,o)}finally{e.next=r.n}}),e.resultName&&(e[e.resultName]=r.v,e.resultName=void 0),e.sent=r.v,e.next=r.n;try{return t.call(this,e)}finally{r.p=e.prev,r.n=e.next}}}return(P=function(){return{wrap:function(e,n,r,o){return t.w(u(e),n,r,o&&o.reverse())},isGeneratorFunction:o,mark:t.m,awrap:function(t,n){return new e(t,n)},AsyncIterator:m,async:function(t,e,n,r,i){return(o(e)?g:b)(u(t),e,n,r,i)},keys:k,values:j}})()}var S=function(){var t=[].slice.call(arguments),e=t.shift();return t.filter(e).pop()},T=function(t){return Array.isArray(t)},M=function(t){return"function"==typeof t},F=function(t){return"string"==typeof t},W=function(t){return"boolean"==typeof t},N=function(t){return void 0===t},B="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0),R={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},_={"&":"&","<":"<",">":">",'"':""","'":"'"},C=function(t){return new RegExp(["[",Object.keys(t).join(""),"]"].join(""),"g")},A=C(_),L=C(R),$=function(){return(""+(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")).replace(A,(function(t){return _[t]}))},U=function(t,e){var n=t;return null==n?"":!0===Boolean(e)?$(n):n},q=function(t,e){if(!1===function(t,e){return Boolean(t instanceof e)}(t,e))throw new TypeError("".concat(t," in not instance of ").concat(e))},H=function(t,e,n){for(var r=t,o=String(e).split("."),i=o.pop(),u=0;u<o.length;u++){var c=o[u];if(M(r.toJSON)&&(r=r.toJSON()),n&&!1===r.hasOwnProperty(c)){r={};break}r=r[c]=r[c]||{}}return M(r.toJSON)&&(r=r.toJSON()),[r,i]},G=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.filter((function(t){return t})).reduce((function(t,e){return Object.assign(t,e)}),t)},J=function(){},D=function(t,e){var n;for(n in t)Y(t,n)&&e(t[n],n,t)},I=function(t,e){return function(t,e){var n=t instanceof Array,r=n?[]:{};return D(t,(function(t,o,i){var u=e(t,o,i);!1===N(u)&&(n?r.push(u):r[o]=u)})),r}(t,(function(t,n){if(-1===e.indexOf(n))return t}))},Y=function(t,e){return t&&t.hasOwnProperty(e)},K={export:"ejsPrecompiled",cache:!0,chokidar:null,path:"views",resolver:function(t,e){return Promise.resolve(["resolver is not defined",t,e].join(" "))},extension:"ejs",rmWhitespace:!0,withObject:!0,globalHelpers:[],vars:{SCOPE:"ejs",COMPONENT:"ui",ELEMENT:"el",EXTEND:"$$e",BUFFER:"$$a",LAYOUT:"$$l",BLOCKS:"$$b",MACRO:"$$m",SAFE:"$$v"},token:{start:"<%",end:"%>",regex:"([\\s\\S]+?)"}},V=function(t,e){G(t,{path:S(F,K.path,t.path,e.path),export:S(F,K.export,t.export,e.export),resolver:S(M,K.resolver,t.resolver,e.resolver),extension:S(F,K.extension,t.extension,e.extension),withObject:S(W,K.withObject,t.withObject,e.withObject),rmWhitespace:S(W,K.rmWhitespace,t.rmWhitespace,e.rmWhitespace),cache:S(W,K.cache,t.cache,e.cache),token:G({},K.token,t.token,e.token),vars:G({},K.vars,t.vars,e.vars),globalHelpers:S(T,K.globalHelpers,t.globalHelpers,e.globalHelpers)})},X="undefined"!=typeof globalThis?globalThis:window||self,z=new WeakMap,Q=new WeakMap,Z=function(){return l((function t(e){u(this,t),a(this,z,!0),a(this,Q,{}),this.configure(e)}),[{key:"load",value:function(t){c(z,this)&&G(c(Q,this),t||{})}},{key:"get",value:function(t){if(c(z,this))return c(Q,this)[t]}},{key:"set",value:function(t,e){c(z,this)&&(c(Q,this)[t]=e)}},{key:"exist",value:function(t){if(c(z,this))return Y(c(Q,this),t)}},{key:"clear",value:function(){s(Q,this,{})}},{key:"remove",value:function(t){delete c(Q,this)[t]}},{key:"resolve",value:function(t){return Promise.resolve(this.get(t))}},{key:"configure",value:function(t){s(z,this,t.cache),!1===B&&this.load(X[t.export])}}])}(),tt=new WeakMap,et=new WeakMap,nt=function(){return l((function t(e){u(this,t),a(this,tt,{}),a(this,et,[{symbol:"-",format:function(t){return"')\n".concat(this.BUFFER,"(").concat(this.SAFE,"(").concat(t,",1))\n").concat(this.BUFFER,"('")}},{symbol:"=",format:function(t){return"')\n".concat(this.BUFFER,"(").concat(this.SAFE,"(").concat(t,"))\n").concat(this.BUFFER,"('")}},{symbol:"#",format:function(t){return"')\n/**".concat(t,"**/\n").concat(this.BUFFER,"('")}},{symbol:"",format:function(t){return"')\n".concat(t.trim(),"\n").concat(this.BUFFER,"('")}}]),this.configure(e)}),[{key:"configure",value:function(t){var e=this;c(tt,this).withObject=t.withObject,c(tt,this).rmWhitespace=t.rmWhitespace,c(tt,this).token=t.token,c(tt,this).vars=t.vars,c(tt,this).globalHelpers=t.globalHelpers,c(tt,this).matches=[],c(tt,this).formats=[],c(tt,this).slurp={match:"[s\t\n]*",start:[c(tt,this).token.start,"_"],end:["_",c(tt,this).token.end]},c(et,this).forEach((function(t){c(tt,e).matches.push(c(tt,e).token.start.concat(t.symbol).concat(c(tt,e).token.regex).concat(c(tt,e).token.end)),c(tt,e).formats.push(t.format.bind(c(tt,e).vars))})),c(tt,this).regex=new RegExp(c(tt,this).matches.join("|").concat("|$"),"g"),c(tt,this).slurpStart=new RegExp([c(tt,this).slurp.match,c(tt,this).slurp.start.join("")].join(""),"gm"),c(tt,this).slurpEnd=new RegExp([c(tt,this).slurp.end.join(""),c(tt,this).slurp.match].join(""),"gm")}},{key:"compile",value:function(t,e){var n=this,r=c(tt,this).vars,o=r.SCOPE,i=r.SAFE,u=r.BUFFER,a=r.COMPONENT,s=r.ELEMENT,f=c(tt,this).globalHelpers;c(tt,this).rmWhitespace&&(t=String(t).replace(/[\r\n]+/g,"\n").replace(/^\s+|\s+$/gm,"")),t=String(t).replace(c(tt,this).slurpStart,c(tt,this).token.start).replace(c(tt,this).slurpEnd,c(tt,this).token.end);var l,h,p,v="".concat(u,"('");l=c(tt,this).regex,h=function(e,r,o){v+=(""+t.slice(r,o)).replace(L,(function(t){return"\\"+R[t]})),e.forEach((function(t,e){t&&(v+=c(tt,n).formats[e](t))}))},p=0,t.replace(l,(function(){var t=[].slice.call(arguments,0,-1),e=t.pop(),n=t.shift();return h(t,p,e),p=e+n.length,n})),v="try{".concat(v+="');","}catch(e){return ").concat(u,".error(e)}"),c(tt,this).withObject&&(v="with(".concat(o,"){").concat(v,"}")),v="".concat(u,".start();").concat(v,"return ").concat(u,".end();"),v+="\n//# sourceURL=".concat(e);var y=null,d=[o,a,s,u,i].concat(f);try{(y=Function.apply(null,d.concat(v))).source="(function(".concat(d.join(","),"){\n").concat(v,"\n});")}catch(t){throw t.filename=e,t.source=v,t}return y}}])}(),rt=new WeakMap,ot=new WeakMap,it=new WeakMap,ut=new WeakMap,ct=new WeakSet,at=function(){return l((function t(e,n,r){u(this,t),f(this,ct),a(this,rt,void 0),a(this,ot,void 0),a(this,it,void 0),a(this,ut,void 0),q(n,Z),q(r,nt),s(ot,this,n),s(it,this,r),this.configure(e)}),[{key:"configure",value:function(t){s(rt,this,t.path),M(t.resolver)&&s(ut,this,t.resolver)}},{key:"get",value:function(t){var e=this;return c(ot,this).exist(t)?c(ot,this).resolve(t):n(ct,this,st).call(this,t).then((function(r){return n(ct,e,ft).call(e,t,n(ct,e,lt).call(e,r,t))}))}}])}();function st(t){return c(ut,this).call(this,c(rt,this),t)}function ft(t,e){return c(ot,this).set(t,e),e}function lt(t,e){return M(t)?t:c(it,this).compile(t,e)}var ht=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],pt=" ",vt='"',yt="/",dt="<",bt=">",gt=function(t,e,n){var r=[],o=-1===ht.indexOf(t),i=function(t,e){var n=[];return D(t,(function(t,r,o){var i=e(t,r,o);!1===N(i)&&n.push(i)})),n}(e,(function(t,e){if(null!=t)return[$(e),[vt,$(t),vt].join("")].join("=")})).join(pt);return r.push([dt,t,pt,i,bt].join("")),n&&o&&r.push(n instanceof Array?n.join(""):n),o&&r.push([dt,yt,t,bt].join("")),r.join("")},mt=function(t){function e(t){var n;return u(this,e),h(n=o(this,e),"code",0),n.message=t,n}return v(e,t),l(e,[{key:"getCode",value:function(){return this.code}},{key:"getMessage",value:function(){return this.message}},{key:"toString",value:function(){return this.getMessage()}}])}(x(Error)),wt=function(t){function e(){var t;u(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return h(t=o(this,e,[].concat(r)),"code",404),t}return v(e,t),l(e)}(mt),kt=function(t){function e(){var t;u(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return h(t=o(this,e,[].concat(r)),"code",500),t}return v(e,t),l(e)}(mt);function jt(t){return Promise.all(t||[]).then((function(t){return t.join("")})).catch((function(t){return t}))}function Ot(){var t=[],e=[],n=function(t){e.push(t)};return n.start=function(){e=[]},n.backup=function(){t.push(e.concat()),e=[]},n.restore=function(){var n=e.concat();return e=t.pop(),jt(n)},n.error=function(t){return e=t,Promise.reject(new kt(e.message));var e},n.end=function(){return jt(e)},n}var Et=Symbol("ContextScope.parentTemplate"),xt=new WeakMap,Pt=function(){return l((function t(e,n){u(this,t),a(this,xt,void 0),this.configure(e,n)}),[{key:"create",value:function(t){return new(c(xt,this))(t)}},{key:"configure",value:function(t,e){s(xt,this,function(t,e){var n=t.vars,r=n.BLOCKS,o=n.MACRO,i=n.EXTEND,u=n.LAYOUT,c=n.BUFFER,a=n.SAFE,s=n.SCOPE,f=n.COMPONENT,l=n.ELEMENT;function h(t){this[Et]=null,this[r]={},this[o]={},Object.assign(this,I(t,[s,c,a,f,l]))}return Object.assign(h.prototype,e),Object.defineProperty(h.prototype,c,{value:Ot()}),Object.defineProperty(h.prototype,r,{value:{},writable:!0}),Object.defineProperty(h.prototype,o,{value:{},writable:!0}),Object.defineProperty(h.prototype,u,{value:!1,writable:!0}),Object.defineProperty(h.prototype,i,{value:!1,writable:!0}),Object.defineProperty(h.prototype,Et,{value:null,writable:!0}),Object.defineProperties(h.prototype,{setParentTemplate:{value:function(t){return this[Et]=t,this}},getParentTemplate:{value:function(){return this[Et]}},useSafeValue:{get:function(){return U}},useComponent:{get:function(){return M(this[f])?this[f].bind(this):function(){throw new Error("".concat(f," must be a function"))}}},useElement:{get:function(){return M(this[l])?this[l].bind(this):function(){throw new Error("".concat(l," must be a function"))}}},getMacro:{value:function(){return this[o]}},getBuffer:{value:function(){return this[c]}},getBlocks:{value:function(){return this[r]}},setExtend:{value:function(t){return this[i]=t,this}},getExtend:{value:function(){return this[i]}},setLayout:{value:function(t){return this[u]=t,this}},getLayout:{value:function(){return this[u]}},clone:{value:function(t){var e=[u,i,c];return!0===t&&e.push(r),I(this,e)}},extend:{value:function(t){this.setExtend(!0),this.setLayout(t)}},echo:{value:function(t){var e=this.getBuffer();[].slice.call(arguments).forEach(e)}},fn:{value:function(t){var e=this.getBuffer(),n=this;return function(){if(M(t))return e.backup(),e(t.apply(n,arguments)),e.restore()}}},macro:{value:function(t,e){var n=this.getMacro(),r=this.fn(e),o=this;n[t]=function(){return o.echo(r.apply(void 0,arguments))}}},call:{value:function(t){var e=this.getMacro()[t],n=[].slice.call(arguments,1);if(M(e))return e.apply(e,n)}},block:{value:function(t,e){var n=this,r=this.getBlocks();if(r[t]=r[t]||[],r[t].push(this.fn(e)),!this.getExtend()){var o=Object.assign([],r[t]),i=function(){return o.shift()},u=function(){var t=i();return t?function(){n.echo(t(u()))}:J};this.echo(i()(u()))}}},hasBlock:{value:function(t){return this.getBlocks().hasOwnProperty(t)}},include:{value:function(t,e,n){var r=!1===n?{}:this.clone(!0),o=G(r,e||{}),i=this.render(t,o);this.echo(i)}},use:{value:function(t,e){var n=this;this.echo(Promise.resolve(this.require(t)).then((function(t){var r=n.getMacro();D(t,(function(t,n){r[[e,n].join(".")]=t}))})))}},async:{value:function(t,e){this.echo(Promise.resolve(t).then(e))}},get:{value:function(t,e){var n=H(this,t,!0),r=n.shift(),o=n.pop();return Y(r,o)?r[o]:e}},set:{value:function(t,e){var n=H(this,t,!1),r=n.shift(),o=n.pop();return this.getParentTemplate()&&Y(r,o)?r[o]:r[o]=e}},each:{value:function(t,e){F(t)&&(t=this.get(t,[])),D(t,e)},writable:!0},el:{value:function(t,e,n){n=M(n)?this.fn(n)():n,this.echo(Promise.resolve(n).then((function(n){return gt(t,e,n)})))},writable:!0},ui:{value:function(t){},writable:!0}}),h}(t,e))}},{key:"helpers",value:function(t){G(c(xt,this).prototype,t||{})}}])}(),St=new WeakMap,Tt=new WeakMap,Mt=new WeakMap,Ft=new WeakMap,Wt=new WeakMap,Nt=new WeakMap,Bt=new WeakSet,Rt=function(){return l((function t(e){u(this,t),f(this,Bt),a(this,St,{}),a(this,Tt,{}),a(this,Mt,void 0),a(this,Ft,void 0),a(this,Wt,void 0),a(this,Nt,void 0),V(c(St,this),e||{}),s(Mt,this,new Pt(c(St,this),c(Tt,this))),s(Ft,this,new nt(c(St,this))),s(Wt,this,new Z(c(St,this))),s(Nt,this,new at(c(St,this),c(Wt,this),c(Ft,this))),function(t){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((function(e){e in t&&(t[e]=t[e].bind(t))}))}(this,["configure","create","render","require","context","preload","compile","helpers"]),this.helpers({require:this.require,render:this.render})}),[{key:"configure",value:function(t){return V(c(St,this),t||{}),c(Mt,this).configure(c(St,this),c(Tt,this)),c(Ft,this).configure(c(St,this)),c(Wt,this).configure(c(St,this)),c(Nt,this).configure(c(St,this)),c(St,this)}},{key:"filePath",value:function(t){return function(t,e){var n=t.split(".").pop();return n!==e&&(t=[t,e].join(".")),t}(t,c(St,this).extension)}},{key:"require",value:function(t){var e=this.context({});return n(Bt,this,_t).call(this,this.filePath(t),e).then((function(){return e.getMacro()}))}},{key:"render",value:function(t,e){var r=this.context(e);return n(Bt,this,_t).call(this,this.filePath(t),r).then(this.outputContent(t,r))}},{key:"outputContent",value:function(t,e){var n=this;return function(r){return e.getExtend()?(e.setExtend(!1),n.renderLayout(e.getLayout(),e,t)):r}}},{key:"renderLayout",value:function(t,e,r){var o=this.context(e);return r&&o.setParentTemplate(r),n(Bt,this,_t).call(this,this.filePath(t),o).then(this.outputContent(t,o))}},{key:"helpers",value:function(t){c(Mt,this).helpers(G(c(Tt,this),t))}},{key:"context",value:function(t){return c(Mt,this).create(t)}},{key:"compile",value:function(t,e){return c(Ft,this).compile(t,e)}},{key:"preload",value:function(t){return c(Wt,this).load(t||{})}},{key:"create",value:function(t){return new this.constructor(t)}}])}();function _t(t,e){var n=c(St,this).globalHelpers,r=[e,e.useComponent,e.useElement,e.getBuffer(),e.useSafeValue],o=n.filter((function(t){return M(e[t])})).map((function(t){return e[t].bind(e)}));return c(Nt,this).get(t).then((function(t){return t.apply(e,r.concat(o))}))}var Ct={},At=function(t,e){return(t=URL.parse(t)).protocol=e?"https:":"http:",t.origin},Lt=new Rt({cache:!1,withObject:!1,resolver:function(t,e){return new Promise((function(t,n){M(Ct[e])?t(Ct[e]):n(new wt("template ".concat(e," not found")))}))}}),$t=Lt.render,Ut=Lt.context,qt=Lt.helpers,Ht=Lt.configure;function Gt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(Ct,t)}var Jt=Gt;function Dt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.templates,n=void 0===e?{}:e,o=t.version,i=t.secure,u=void 0===i||i;return Gt(n),function(){var t,e=(t=P().mark((function t(e,n){return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.data=Ut({}),e.data.set("version",o),e.data.set("origin",At(e.req.url,u)),e.data.set("path",e.req.path),e.data.set("query",e.req.query()),e.ejs=function(t,n){return $t(t,Object.assign({param:e.req.param()},e.data,n))},e.helpers=function(t){return qt(t)},e.render=function(t,n){return e.html(e.ejs(t,n))},t.next=10,n();case 10:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(o,i){var u=t.apply(e,n);function c(t){r(u,o,i,c,a,"next",t)}function a(t){r(u,o,i,c,a,"throw",t)}c(void 0)}))});return function(t,n){return e.apply(this,arguments)}}()}var It=Dt;t.TemplateError=mt,t.TemplateNotFound=wt,t.TemplateSyntaxError=kt,t.configure=Ht,t.context=Ut,t.helpers=qt,t.render=$t,t.setRenderer=It,t.setTemplates=Jt,t.useRenderer=Dt,t.useTemplates=Gt}));
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "EJS Templates",
|
|
4
4
|
"homepage": "https://github.com/kosatyi/ejs",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.105",
|
|
7
7
|
"main": "dist/cjs/index.js",
|
|
8
8
|
"module": "dist/esm/index.js",
|
|
9
9
|
"browser": "dist/umd/browser.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"ejs-template-engine"
|
|
62
62
|
],
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"glob": "11.x",
|
|
64
|
+
"glob": "11.x || 12.x || 13.x",
|
|
65
65
|
"process.argv": "1.x",
|
|
66
66
|
"glob-watcher": "6.x"
|
|
67
67
|
},
|