fix(es/minifier): Don't inline a callable expression if it's used as a reference (#5118)

This commit is contained in:
Donny/강동윤 2022-07-06 12:53:11 +09:00 committed by GitHub
parent 9f64f5d8a0
commit 0e4a03ccc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
70 changed files with 90322 additions and 2148 deletions

View File

@ -1,8 +1,8 @@
var a;
var a, b = function() {};
module.exports = ((a = function() {
"use strict";
function a() {}
return a.prototype.it = function() {
this.bb = new a.MyA();
}, a;
}()).MyA = function() {}, a);
}()).MyA = b, a);

View File

@ -6,6 +6,9 @@ var clodule = function() {
}
return clodule.fn = function(id) {}, clodule;
}();
(clodule || (clodule = {})).fn = function(x, y) {
!function(clodule) {
var fn = function(x, y) {
return x;
};
};
clodule.fn = fn;
}(clodule || (clodule = {}));

View File

@ -6,6 +6,9 @@ var clodule = function() {
}
return clodule.fn = function(id) {}, clodule;
}();
(clodule || (clodule = {})).fn = function(x, y) {
!function(clodule) {
var fn = function(x, y) {
return x;
};
};
clodule.fn = fn;
}(clodule || (clodule = {}));

View File

@ -11,9 +11,12 @@ var A, Point = function() {
};
}, Point;
}();
(Point || (Point = {})).Origin = function() {
!function(Point) {
var Origin = function() {
return null;
}, function(A) {
};
Point.Origin = Origin;
}(Point || (Point = {})), function(A) {
var Point = function() {
"use strict";
function Point(x, y) {

View File

@ -1,19 +1,19 @@
var A;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
!function(A) {
var Point = function() {
"use strict";
_class_call_check(this, Point);
};
A.Point = Point;
var Line = function(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.Line = Line, A.fromOrigin = function(p) {
var fromOrigin = function(p) {
return new Line({
x: 0,
y: 0
}, p);
}, Point = function() {
"use strict";
_class_call_check(this, Point);
};
A.Point = Point;
var Line = function Line(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.Line = Line, A.fromOrigin = fromOrigin;
}(A || (A = {}));

View File

@ -1,17 +1,17 @@
var A;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
!function(A) {
var Point = function() {
"use strict";
_class_call_check(this, Point);
}, Line = function(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.Line = Line, A.fromOrigin = function(p) {
var fromOrigin = function(p) {
return new Line({
x: 0,
y: 0
}, p);
}, Point = function() {
"use strict";
_class_call_check(this, Point);
}, Line = function Line(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.Line = Line, A.fromOrigin = fromOrigin;
}(A || (A = {}));

View File

@ -1,19 +1,19 @@
var A;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
!function(A) {
var Point = function() {
"use strict";
_class_call_check(this, Point);
};
A.Point = Point;
var Line = function(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.fromOrigin = function(p) {
var fromOrigin = function(p) {
return new Line({
x: 0,
y: 0
}, p);
}, Point = function() {
"use strict";
_class_call_check(this, Point);
};
A.Point = Point;
var Line = function Line(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.fromOrigin = fromOrigin;
}(A || (A = {}));

View File

@ -1,10 +1,13 @@
var A, B;
(A || (A = {})).Point = function() {
!function(A) {
var Point = function() {
return {
x: 0,
y: 0
};
}, function(A) {
};
A.Point = Point;
}(A || (A = {})), function(A) {
(A.Point || (A.Point = {})).Origin = {
x: 0,
y: 0

View File

@ -1,10 +1,13 @@
var A, B;
(A || (A = {})).Point = function() {
!function(A) {
var Point = function() {
return {
x: 0,
y: 0
};
}, function(B) {
};
A.Point = Point;
}(A || (A = {})), function(B) {
(B.Point || (B.Point = {})).Origin = {
x: 0,
y: 0

View File

@ -4,12 +4,15 @@ var A, B;
x: 0,
y: 0
};
}(A || (A = {})), (A || (A = {})).Point = function() {
}(A || (A = {})), function(A) {
var Point = function() {
return {
x: 0,
y: 0
};
}, function(B) {
};
A.Point = Point;
}(A || (A = {})), function(B) {
var Point = function() {
return {
x: 0,

View File

@ -1,8 +1,9 @@
var A;
!function(A) {
A.fn = function(s) {
var fn = function(s) {
return !0;
}, A.fng = function(s) {
}, fng = function(s) {
return null;
};
A.fn = fn, A.fng = fng;
}(A || (A = {})), A.fn, A.fng, A.fn2, A.fng2;

View File

@ -1,8 +1,9 @@
var donkey = function(ast) {
return ast;
};
function funky(declaration) {
return !1;
}
module.exports = function(ast) {
return ast;
}, module.exports.funky = funky;
module.exports = donkey, module.exports.funky = funky;
var funky = require("./commonJSAliasedExport").funky;
funky(1);

View File

@ -7,11 +7,11 @@ var M, C = function() {
_class_call_check(this, D);
};
!function(M) {
var A = function() {
var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict";
_class_call_check(this, A);
};
M.A = A, M.F2 = function(x) {
return x.toString();
};
M.A = A, M.F2 = F2;
}(M || (M = {})), new C(), new C(), new D(), new C(), new M.A();

View File

@ -7,19 +7,19 @@ var M, N, C = function() {
_class_call_check(this, D);
};
!function(M) {
var A = function() {
var _$F2 = function(x) {
return x.toString();
}, A = function() {
"use strict";
_class_call_check(this, A);
};
M.A = A, M.F2 = function(x) {
return x.toString();
};
M.A = A, M.F2 = _$F2;
}(M || (M = {})), function(N) {
var A = function() {
var _$F2 = function(x) {
return x.toString();
}, A = function() {
"use strict";
_class_call_check(this, A);
};
N.A = A, N.F2 = function(x) {
return x.toString();
};
N.A = A, N.F2 = _$F2;
}(N || (N = {})), new D(), new D(), new C(), new C(), new N.A();

View File

@ -7,11 +7,11 @@ var M, C = function() {
_class_call_check(this, D);
};
!function(M) {
var A = function() {
var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict";
_class_call_check(this, A);
};
M.A = A, M.F2 = function(x) {
return x.toString();
};
M.A = A, M.F2 = F2;
}(M || (M = {})), new C(), new C(), new D(), new M.A(), M.F2;

View File

@ -1,11 +1,13 @@
!function(Foo) {
Foo.a = function() {
var a = function() {
return 5;
}, Foo.b = !0;
};
Foo.a = a, Foo.b = !0;
}(Foo || (Foo = {})), function(Foo) {
Foo.c = function(a) {
var c = function(a) {
return a;
}, (Foo.Test || (Foo.Test = {})).answer = 42;
};
Foo.c = c, (Foo.Test || (Foo.Test = {})).answer = 42;
}(Foo || (Foo = {}));
var Foo, foo = require("./foo_0");
foo.a(), foo.b && (foo.Test.answer = foo.c(42)), module.exports = Foo;

View File

@ -1,10 +1,14 @@
var A, B, C, D, E, F;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
(A || (A = {})).x = 12, B || (B = {}), C || (C = {}), (D || (D = {})).yes = function() {
(A || (A = {})).x = 12, B || (B = {}), C || (C = {}), function(D) {
var yes = function() {
return !0;
}, function(E) {
(Color = E.Color || (E.Color = {}))[Color.Red = 0] = "Red", E.fn = function() {};
var Color, C = function() {
};
D.yes = yes;
}(D || (D = {})), function(E) {
var Color, fn = function() {};
(Color = E.Color || (E.Color = {}))[Color.Red = 0] = "Red", E.fn = fn;
var C = function() {
"use strict";
_class_call_check(this, C);
};

View File

@ -17,13 +17,13 @@ var M, C = function() {
_class_call_check(this, D);
};
for(!function(M) {
var A = function() {
var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict";
_class_call_check(this, A);
};
M.A = A, M.F2 = function(x) {
return x.toString();
};
M.A = A, M.F2 = F2;
}(M || (M = {}));;);
for(;;);
for(;;);

View File

@ -7,13 +7,13 @@ var M, C = function() {
_class_call_check(this, D);
};
for(!function(M) {
var A = function() {
var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict";
_class_call_check(this, A);
};
M.A = A, M.F2 = function(x) {
return x.toString();
};
M.A = A, M.F2 = F2;
}(M || (M = {}));;);
for(;;);
for(;;);

View File

@ -17,21 +17,21 @@ var M, N, C = function() {
_class_call_check(this, D);
};
for(!function(M) {
var A = function() {
var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict";
_class_call_check(this, A);
};
M.A = A, M.F2 = function(x) {
return x.toString();
};
M.A = A, M.F2 = F2;
}(M || (M = {})), function(N) {
var A = function() {
var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict";
_class_call_check(this, A);
};
N.A = A, N.F2 = function(x) {
return x.toString();
};
N.A = A, N.F2 = F2;
}(N || (N = {}));;);
for(;;);
for(;;);

View File

@ -1,4 +1,7 @@
var C, D, E;
C || (C = {}), D || (D = {}), (E || (E = {})).xDist = function(x) {
C || (C = {}), D || (D = {}), function(E) {
var xDist = function(x) {
return 0 - x.x;
};
};
E.xDist = xDist;
}(E || (E = {}));

View File

@ -7,8 +7,8 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
};
A.Point = Point, A.Origin = new Point(0, 0);
}(A || (A = {})), C || (C = {}), D || (D = {}), new A.Point(1, 1), function(E) {
var a = A;
E.xDist = function(x) {
var xDist = function(x) {
return a.Origin.x - x.x;
};
}, a = A;
E.xDist = xDist;
}(E || (E = {}));

View File

@ -17,11 +17,11 @@ var M, C = function() {
_class_call_check(this, D);
};
!function(M) {
var A = function() {
var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict";
_class_call_check(this, A);
};
M.A = A, M.F2 = function(x) {
return x.toString();
};
M.A = A, M.F2 = F2;
}(M || (M = {})), new C(), new D(), new C(), new C2(), new C(), new C2(), new D(), new D(), M.A;

View File

@ -31,7 +31,9 @@ import _create_super from "@swc/helpers/src/_create_super.mjs";
_class_call_check(this, A1);
}, (Color1 = Color || (Color = {}))[Color1.Blue = 0] = "Blue", Color1[Color1.Red = 1] = "Red";
}(A || (A = {})), function(Y) {
var A = function() {
var F = function(s) {
return 2;
}, A = function() {
"use strict";
_class_call_check(this, A);
};
@ -63,9 +65,7 @@ import _create_super from "@swc/helpers/src/_create_super.mjs";
Y.BB = BB, Y.Module || (Y.Module = {}), A1 = function() {
"use strict";
_class_call_check(this, A1);
}, (Color = Y.Color || (Y.Color = {}))[Color.Blue = 0] = "Blue", Color[Color.Red = 1] = "Red", Y.x = 12, Y.F = function(s) {
return 2;
}, Y.array = null, Y.fn = function(s) {
}, (Color = Y.Color || (Y.Color = {}))[Color.Blue = 0] = "Blue", Color[Color.Red = 1] = "Red", Y.x = 12, Y.F = F, Y.array = null, Y.fn = function(s) {
return "hello " + s;
}, Y.ol = {
s: "hello",

View File

@ -9,6 +9,4 @@ function error(message) {
cb();
}(()=>{
throw Error();
}), function(cb) {
cb();
}(()=>error("Error callback"));
}), error("Error callback");

View File

@ -30,8 +30,4 @@ var C = function() {
cb();
}(function() {
throw Error();
}), function(cb) {
cb();
}(function() {
return error("Error callback");
});
}), error("Error callback");

View File

@ -3,9 +3,9 @@ function foo(f) {
}
var g = function(x) {
return x + "blah";
}, x = function() {
return g;
};
foo(g), foo(function() {
return g;
}), foo(function() {
return g;
});
}), foo(x);

View File

@ -2,10 +2,10 @@ export var CompilerDiagnostics;
!function(CompilerDiagnostics) {
var Alert = function(output) {
diagnosticWriter && diagnosticWriter.Alert(output);
}, debug = CompilerDiagnostics.debug = !1, diagnosticWriter = CompilerDiagnostics.diagnosticWriter = null;
CompilerDiagnostics.analysisPass = 0, CompilerDiagnostics.Alert = Alert, CompilerDiagnostics.debugPrint = function(s) {
}, debugPrint = function(s) {
debug && Alert(s);
}, CompilerDiagnostics.assert = function(condition, s) {
}, assert = function(condition, s) {
debug && !condition && Alert(s);
};
}, debug = CompilerDiagnostics.debug = !1, diagnosticWriter = CompilerDiagnostics.diagnosticWriter = null;
CompilerDiagnostics.analysisPass = 0, CompilerDiagnostics.Alert = Alert, CompilerDiagnostics.debugPrint = debugPrint, CompilerDiagnostics.assert = assert;
}(CompilerDiagnostics || (CompilerDiagnostics = {}));

View File

@ -239,12 +239,12 @@ var TypeScript;
var bestOffset = 0, pre = (cur, parent, walker)=>(TypeScript.isValidAstNode(cur) && (cur.minChar <= position && (bestOffset = max(bestOffset, cur.minChar)), (cur.minChar > position || cur.limChar < bestOffset) && (walker.options.goChildren = !1)), cur);
return TypeScript.getAstWalkerFactory().walk(script, pre), bestOffset;
}, TypeScript1.walkAST = function(ast, callback) {
var path = new AstPath();
TypeScript.getAstWalkerFactory().walk(ast, function(cur, parent, walker) {
var pre = function(cur, parent, walker) {
var path = walker.state;
return path.push(cur), callback(path, walker), cur;
}, function(cur, parent, walker) {
}, post = function(cur, parent, walker) {
return walker.state.pop(), cur;
}, null, path);
}, path = new AstPath();
TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path);
};
}(TypeScript || (TypeScript = {}));

View File

@ -5,6 +5,8 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
return null === items || 0 === items.length ? null : items[items.length - 1];
}, max = function(a, b) {
return a >= b ? a : b;
}, min = function(a, b) {
return a <= b ? a : b;
}, isValidAstNode = function(ast) {
return null !== ast && -1 !== ast.minChar && -1 !== ast.limChar;
}, getAstPathToPosition = function(script, pos) {
@ -31,17 +33,15 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
};
return TypeScript.getAstWalkerFactory().walk(script, pre), bestOffset;
}, walkAST = function(ast, callback) {
var path = new AstPath();
TypeScript.getAstWalkerFactory().walk(ast, function(cur, parent, walker) {
var pre = function(cur, parent, walker) {
var path = walker.state;
return path.push(cur), callback(path, walker), cur;
}, function(cur, parent, walker) {
}, post = function(cur, parent, walker) {
return walker.state.pop(), cur;
}, null, path);
};
TypeScript1.lastOf = lastOf, TypeScript1.max = max, TypeScript1.min = function(a, b) {
return a <= b ? a : b;
}, path = new AstPath();
TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path);
};
TypeScript1.lastOf = lastOf, TypeScript1.max = max, TypeScript1.min = min;
var AstPath = function() {
"use strict";
function AstPath() {

View File

@ -1,6 +1,51 @@
var TypeScript;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
!function(TypeScript) {
var timeFunction = function(logger, funcDescription, func) {
var start = +new Date(), result = func(), end = +new Date();
return logger.log(funcDescription + " completed in " + (end - start) + " msec"), result;
}, stringToLiteral = function(value, length) {
var result = "", addChar = function(index) {
var ch = value.charCodeAt(index);
switch(ch){
case 0x09:
result += "\\t";
break;
case 0x0a:
result += "\\n";
break;
case 0x0b:
result += "\\v";
break;
case 0x0c:
result += "\\f";
break;
case 0x0d:
result += "\\r";
break;
case 0x22:
result += '\\"';
break;
case 0x27:
result += "\\'";
break;
case 0x5c:
result += "\\";
break;
default:
result += value.charAt(index);
}
};
if (value.length > length) {
for(var mid = length >> 1, i = 0; i < mid; i++)addChar(i);
result += "(...)";
for(var i = value.length - mid; i < value.length; i++)addChar(i);
} else {
length = value.length;
for(var i = 0; i < length; i++)addChar(i);
}
return result;
};
!function(CompilerDiagnostics) {
var debug = CompilerDiagnostics.debug = !1, diagnosticWriter = CompilerDiagnostics.diagnosticWriter = null;
function Alert(output) {
@ -72,49 +117,5 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
this.logContents.push(s);
}, BufferedLogger;
}();
TypeScript.BufferedLogger = BufferedLogger, TypeScript.timeFunction = function(logger, funcDescription, func) {
var start = +new Date(), result = func(), end = +new Date();
return logger.log(funcDescription + " completed in " + (end - start) + " msec"), result;
}, TypeScript.stringToLiteral = function(value, length) {
var result = "", addChar = function(index) {
var ch = value.charCodeAt(index);
switch(ch){
case 0x09:
result += "\\t";
break;
case 0x0a:
result += "\\n";
break;
case 0x0b:
result += "\\v";
break;
case 0x0c:
result += "\\f";
break;
case 0x0d:
result += "\\r";
break;
case 0x22:
result += '\\"';
break;
case 0x27:
result += "\\'";
break;
case 0x5c:
result += "\\";
break;
default:
result += value.charAt(index);
}
};
if (value.length > length) {
for(var mid = length >> 1, i = 0; i < mid; i++)addChar(i);
result += "(...)";
for(var i = value.length - mid; i < value.length; i++)addChar(i);
} else {
length = value.length;
for(var i = 0; i < length; i++)addChar(i);
}
return result;
};
TypeScript.BufferedLogger = BufferedLogger, TypeScript.timeFunction = timeFunction, TypeScript.stringToLiteral = stringToLiteral;
}(TypeScript || (TypeScript = {}));

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,12 @@
var TypeScript;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
!function(TypeScript) {
var PrintContext = function() {
var prePrintAST = function(ast, parent, walker) {
var pc = walker.state;
return ast.print(pc), pc.increaseIndent(), ast;
}, postPrintAST = function(ast, parent, walker) {
return walker.state.decreaseIndent(), ast;
}, PrintContext = function() {
"use strict";
function PrintContext(outfile, parser) {
_class_call_check(this, PrintContext), this.outfile = outfile, this.parser = parser, this.builder = "", this.indent1 = " ", this.indentStrings = [], this.indentAmt = 0;
@ -26,10 +31,5 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
this.builder += s, this.outfile.WriteLine(this.builder), this.builder = "";
}, PrintContext;
}();
TypeScript.PrintContext = PrintContext, TypeScript.prePrintAST = function(ast, parent, walker) {
var pc = walker.state;
return ast.print(pc), pc.increaseIndent(), ast;
}, TypeScript.postPrintAST = function(ast, parent, walker) {
return walker.state.decreaseIndent(), ast;
};
TypeScript.PrintContext = PrintContext, TypeScript.prePrintAST = prePrintAST, TypeScript.postPrintAST = postPrintAST;
}(TypeScript || (TypeScript = {}));

View File

@ -4,6 +4,11 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
var preFindMemberScope = function(ast, parent, walker) {
var memScope = walker.state;
return hasFlag(ast.flags, memScope.matchFlag) && (memScope.pos < 0 || memScope.pos == ast.limChar) && (memScope.ast = ast, null == ast.type && memScope.pos >= 0 && memScope.flow.inScopeTypeCheck(ast, memScope.scope), memScope.type = ast.type, memScope.options.stopWalk()), ast;
}, pushTypeCollectionScope = function(container, valueMembers, ambientValueMembers, enclosedTypes, ambientEnclosedTypes, context, thisType, classType, moduleDecl) {
var builder = new SymbolScopeBuilder(valueMembers, ambientValueMembers, enclosedTypes, ambientEnclosedTypes, null, container), chain = new ScopeChain(container, context.scopeChain, builder);
chain.thisType = thisType, chain.classType = classType, chain.moduleDecl = moduleDecl, context.scopeChain = chain;
}, popTypeCollectionScope = function(context) {
context.scopeChain = context.scopeChain.previous;
}, preFindEnclosingScope = function(ast, parent, walker) {
var context = walker.state, minChar = ast.minChar, limChar = ast.limChar;
if (ast.nodeType == NodeType.Script && context.pos > limChar && (limChar = context.pos), minChar <= context.pos && limChar >= context.pos) {
@ -85,10 +90,5 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
return this.scriptFragment;
}, EnclosingScopeContext;
}();
TypeScript1.EnclosingScopeContext = EnclosingScopeContext, TypeScript1.preFindMemberScope = preFindMemberScope, TypeScript1.pushTypeCollectionScope = function(container, valueMembers, ambientValueMembers, enclosedTypes, ambientEnclosedTypes, context, thisType, classType, moduleDecl) {
var builder = new SymbolScopeBuilder(valueMembers, ambientValueMembers, enclosedTypes, ambientEnclosedTypes, null, container), chain = new ScopeChain(container, context.scopeChain, builder);
chain.thisType = thisType, chain.classType = classType, chain.moduleDecl = moduleDecl, context.scopeChain = chain;
}, TypeScript1.popTypeCollectionScope = function(context) {
context.scopeChain = context.scopeChain.previous;
}, TypeScript1.preFindEnclosingScope = preFindEnclosingScope, TypeScript1.findEnclosingScopeAt = findEnclosingScopeAt;
TypeScript1.EnclosingScopeContext = EnclosingScopeContext, TypeScript1.preFindMemberScope = preFindMemberScope, TypeScript1.pushTypeCollectionScope = pushTypeCollectionScope, TypeScript1.popTypeCollectionScope = popTypeCollectionScope, TypeScript1.preFindEnclosingScope = preFindEnclosingScope, TypeScript1.findEnclosingScopeAt = findEnclosingScopeAt;
}(TypeScript || (TypeScript = {}));

View File

@ -2,9 +2,12 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
import _inherits from "@swc/helpers/src/_inherits.mjs";
import _type_of from "@swc/helpers/src/_type_of.mjs";
import _create_super from "@swc/helpers/src/_create_super.mjs";
(M || (M = {})).fn = function(x) {
!function(M) {
var fn = function(x) {
return "";
}, void 0 === x || _type_of(x), void 0 === M || _type_of(M), M.fn(1);
};
M.fn = fn;
}(M || (M = {})), void 0 === x || _type_of(x), void 0 === M || _type_of(M), M.fn(1);
var M, x, C = function() {
"use strict";
_class_call_check(this, C);

View File

@ -8,11 +8,11 @@ var M, C = function() {
_class_call_check(this, D);
};
throw !function(M) {
var A = function() {
var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict";
_class_call_check(this, A);
};
M.A = A, M.F2 = function(x) {
return x.toString();
};
M.A = A, M.F2 = F2;
}(M || (M = {})), 9.9;

View File

@ -29,10 +29,10 @@ ExpandoArrow.prop = 2, ExpandoArrow.m = function(n) {
};
return nested.total = n + 1000000, nested;
}).also = -1, ExpandoMerge.p1 = 111, (ExpandoMerge || (ExpandoMerge = {})).p2 = 222, (ExpandoMerge || (ExpandoMerge = {})).p3 = 333, ExpandoMerge.p1, ExpandoMerge.p2, ExpandoMerge.p3, ExpandoMerge(1), function(Ns) {
var ExpandoNamespace = function() {};
ExpandoNamespace.p6 = 42, Ns.foo = function() {
var ExpandoNamespace = function() {}, foo = function() {
return ExpandoNamespace;
};
ExpandoNamespace.p6 = 42, Ns.foo = foo;
}(Ns || (Ns = {}));
var ExpandoExpr2 = function(n) {
return n.toString();

View File

@ -1,6 +1,8 @@
var y = void 0;
!function(something, haveValue, haveY) {
return something === y ? haveY(y) : haveValue(something);
}(Math.random() > 0.5 ? 'hey!' : void 0, (text)=>'string', (y)=>'other one'), null.toUpperCase(), pigify(mbp).oinks, pigify(mbp).walks, f1('a'), f2('a', 'b'), Object.assign(()=>{}, {
func () {}
}(Math.random() > 0.5 ? 'hey!' : void 0, (text)=>'string', (y)=>'other one'), null.toUpperCase(), pigify(mbp).oinks, pigify(mbp).walks, f1('a'), f2('a', 'b');
const func = ()=>{};
Object.assign(()=>{}, {
func
});

View File

@ -48,23 +48,60 @@ export default function o(c) {
for(var e, f, g = 0, h = b.length, i = c.length; g < h;){
if (d >= i) return -1;
if (37 === (e = b.charCodeAt(g++))) {
if (!(f = aQ[(e = b.charAt(g++)) in p ? b.charAt(g++) : e]) || (d = f(a, c, d)) < 0) return -1;
if (!(f = a8[(e = b.charAt(g++)) in p ? b.charAt(g++) : e]) || (d = f(a, c, d)) < 0) return -1;
} else if (e != c.charCodeAt(d++)) return -1;
}
return d;
}, j = c.dateTime, k = c.date, o = c.time, q = c.periods, r = c.days, s = c.shortDays, t = c.months, u = c.shortMonths, aa = v(q), au = w(q), aG = v(r), aH = w(r), aI = v(s), aJ = w(s), aK = v(t), aL = w(t), aM = v(u), aN = w(u), aO = {
a: function(a) {
return s[a.getDay()];
},
A: function(a) {
return r[a.getDay()];
},
b: function(a) {
return u[a.getMonth()];
},
B: function(a) {
return t[a.getMonth()];
},
}, j = function(a, b, c) {
var d = aY.exec(b.slice(c));
return d ? (a.p = aZ.get(d[0].toLowerCase()), c + d[0].length) : -1;
}, k = function(a, b, c) {
var d = a0.exec(b.slice(c));
return d ? (a.w = a1.get(d[0].toLowerCase()), c + d[0].length) : -1;
}, o = function(a, b, c) {
var d = a$.exec(b.slice(c));
return d ? (a.w = a_.get(d[0].toLowerCase()), c + d[0].length) : -1;
}, q = function(a, b, c) {
var d = a4.exec(b.slice(c));
return d ? (a.m = a5.get(d[0].toLowerCase()), c + d[0].length) : -1;
}, r = function(a, b, c) {
var d = a2.exec(b.slice(c));
return d ? (a.m = a3.get(d[0].toLowerCase()), c + d[0].length) : -1;
}, s = function(a, b, c) {
return h(a, aQ, b, c);
}, t = function(a, b, c) {
return h(a, aR, b, c);
}, u = function(a, b, c) {
return h(a, aS, b, c);
}, aa = function(a) {
return aV[a.getDay()];
}, au = function(a) {
return aU[a.getDay()];
}, aG = function(a) {
return aX[a.getMonth()];
}, aH = function(a) {
return aW[a.getMonth()];
}, aI = function(a) {
return aT[+(a.getHours() >= 12)];
}, aJ = function(a) {
return 1 + ~~(a.getMonth() / 3);
}, aK = function(a) {
return aV[a.getUTCDay()];
}, aL = function(a) {
return aU[a.getUTCDay()];
}, aM = function(a) {
return aX[a.getUTCMonth()];
}, aN = function(a) {
return aW[a.getUTCMonth()];
}, aO = function(a) {
return aT[+(a.getUTCHours() >= 12)];
}, aP = function(a) {
return 1 + ~~(a.getUTCMonth() / 3);
}, aQ = c.dateTime, aR = c.date, aS = c.time, aT = c.periods, aU = c.days, aV = c.shortDays, aW = c.months, aX = c.shortMonths, aY = v(aT), aZ = w(aT), a$ = v(aU), a_ = w(aU), a0 = v(aV), a1 = w(aV), a2 = v(aW), a3 = w(aW), a4 = v(aX), a5 = w(aX), a6 = {
a: aa,
A: au,
b: aG,
B: aH,
c: null,
d: R,
e: R,
@ -77,12 +114,8 @@ export default function o(c) {
L: V,
m: X,
M: Y,
p: function(a) {
return q[+(a.getHours() >= 12)];
},
q: function(a) {
return 1 + ~~(a.getMonth() / 3);
},
p: aI,
q: aJ,
Q: aE,
s: aF,
S: Z,
@ -97,19 +130,11 @@ export default function o(c) {
Y: ag,
Z: ai,
"%": aD
}, aP = {
a: function(a) {
return s[a.getUTCDay()];
},
A: function(a) {
return r[a.getUTCDay()];
},
b: function(a) {
return u[a.getUTCMonth()];
},
B: function(a) {
return t[a.getUTCMonth()];
},
}, a7 = {
a: aK,
A: aL,
b: aM,
B: aN,
c: null,
d: aj,
e: aj,
@ -122,12 +147,8 @@ export default function o(c) {
L: an,
m: ap,
M: aq,
p: function(a) {
return q[+(a.getUTCHours() >= 12)];
},
q: function(a) {
return 1 + ~~(a.getUTCMonth() / 3);
},
p: aO,
q: aP,
Q: aE,
s: aF,
S: ar,
@ -142,26 +163,12 @@ export default function o(c) {
Y: aA,
Z: aC,
"%": aD
}, aQ = {
a: function(a, b, c) {
var d = aI.exec(b.slice(c));
return d ? (a.w = aJ.get(d[0].toLowerCase()), c + d[0].length) : -1;
},
A: function(a, b, c) {
var d = aG.exec(b.slice(c));
return d ? (a.w = aH.get(d[0].toLowerCase()), c + d[0].length) : -1;
},
b: function(a, b, c) {
var d = aM.exec(b.slice(c));
return d ? (a.m = aN.get(d[0].toLowerCase()), c + d[0].length) : -1;
},
B: function(a, b, c) {
var d = aK.exec(b.slice(c));
return d ? (a.m = aL.get(d[0].toLowerCase()), c + d[0].length) : -1;
},
c: function(a, b, c) {
return h(a, j, b, c);
},
}, a8 = {
a: k,
A: o,
b: q,
B: r,
c: s,
d: H,
e: H,
f: N,
@ -173,10 +180,7 @@ export default function o(c) {
L: M,
m: G,
M: K,
p: function(a, b, c) {
var d = aa.exec(b.slice(c));
return d ? (a.p = au.get(d[0].toLowerCase()), c + d[0].length) : -1;
},
p: j,
q: F,
Q: P,
s: Q,
@ -186,20 +190,16 @@ export default function o(c) {
V: A,
w: x,
W: B,
x: function(a, b, c) {
return h(a, k, b, c);
},
X: function(a, b, c) {
return h(a, o, b, c);
},
x: t,
X: u,
y: D,
Y: C,
Z: E,
"%": O
};
return aO.x = e(k, aO), aO.X = e(o, aO), aO.c = e(j, aO), aP.x = e(k, aP), aP.X = e(o, aP), aP.c = e(j, aP), {
return a6.x = e(aR, a6), a6.X = e(aS, a6), a6.c = e(aQ, a6), a7.x = e(aR, a7), a7.X = e(aS, a7), a7.c = e(aQ, a7), {
format: function(a) {
var b = e(a += "", aO);
var b = e(a += "", a6);
return b.toString = function() {
return a;
}, b;
@ -211,7 +211,7 @@ export default function o(c) {
}, b;
},
utcFormat: function(a) {
var b = e(a += "", aP);
var b = e(a += "", a7);
return b.toString = function() {
return a;
}, b;

View File

@ -69,67 +69,67 @@ var a, b = require("@firebase/util"), c = require("tslib"), d = require("@fireba
}, a;
}(), i = ((a = {})["no-app"] = "No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()", a["invalid-app-argument"] = "firebase.{$appName}() takes either no argument or a Firebase App instance.", a), j = new b.ErrorFactory("app-compat", "Firebase", i);
function k() {
var a, d, e, f, i = (a = h, d = function(a) {
if (a = a || g._DEFAULT_ENTRY_NAME, !b.contains(e, a)) throw j.create("no-app", {
var a, d, e, f, i, l, m, n, o = function(a) {
b.deepExtend(p, a);
}, p = (a = h, d = function(a) {
delete m[a];
}, e = function(a) {
if (a = a || g._DEFAULT_ENTRY_NAME, !b.contains(m, a)) throw j.create("no-app", {
appName: a
});
return e[a];
}, e = {}, (f = {
return m[a];
}, f = function() {
return Object.keys(m).map(function(a) {
return m[a];
});
}, i = function(c) {
var d = c.name, f = d.replace("-compat", "");
if (g._registerComponent(c) && "PUBLIC" === c.type) {
var h = function(a) {
if (void 0 === a && (a = e()), "function" != typeof a[f]) throw j.create("invalid-app-argument", {
appName: d
});
return a[f]();
};
void 0 !== c.serviceProps && b.deepExtend(h, c.serviceProps), n[f] = h, a.prototype[f] = function() {
for(var a = [], b = 0; b < arguments.length; b++)a[b] = arguments[b];
return this._getService.bind(this, d).apply(this, c.multipleInstances ? a : []);
};
}
return "PUBLIC" === c.type ? n[f] : null;
}, l = function(a, b) {
return "serverAuth" === b ? null : b;
}, m = {}, (n = {
__esModule: !0,
initializeApp: function(c, d) {
void 0 === d && (d = {});
var h = g.initializeApp(c, d);
if (b.contains(e, h.name)) return e[h.name];
var i = new a(h, f);
return e[h.name] = i, i;
var e = g.initializeApp(c, d);
if (b.contains(m, e.name)) return m[e.name];
var f = new a(e, n);
return m[e.name] = f, f;
},
app: d,
app: e,
registerVersion: g.registerVersion,
setLogLevel: g.setLogLevel,
onLog: g.onLog,
apps: null,
SDK_VERSION: g.SDK_VERSION,
INTERNAL: {
registerComponent: function(c) {
var e = c.name, h = e.replace("-compat", "");
if (g._registerComponent(c) && "PUBLIC" === c.type) {
var i = function(a) {
if (void 0 === a && (a = d()), "function" != typeof a[h]) throw j.create("invalid-app-argument", {
appName: e
});
return a[h]();
};
void 0 !== c.serviceProps && b.deepExtend(i, c.serviceProps), f[h] = i, a.prototype[h] = function() {
for(var a = [], b = 0; b < arguments.length; b++)a[b] = arguments[b];
return this._getService.bind(this, e).apply(this, c.multipleInstances ? a : []);
};
}
return "PUBLIC" === c.type ? f[h] : null;
},
removeApp: function(a) {
delete e[a];
},
useAsService: function(a, b) {
return "serverAuth" === b ? null : b;
},
registerComponent: i,
removeApp: d,
useAsService: l,
modularAPIs: g
}
}).default = f, Object.defineProperty(f, "apps", {
get: function() {
return Object.keys(e).map(function(a) {
return e[a];
});
}
}), d.App = a, f);
return i.INTERNAL = c.__assign(c.__assign({}, i.INTERNAL), {
}).default = n, Object.defineProperty(n, "apps", {
get: f
}), e.App = a, n);
return p.INTERNAL = c.__assign(c.__assign({}, p.INTERNAL), {
createFirebaseNamespace: k,
extendNamespace: function(a) {
b.deepExtend(i, a);
},
extendNamespace: o,
createSubscribe: b.createSubscribe,
ErrorFactory: b.ErrorFactory,
deepExtend: b.deepExtend
}), i;
}), p;
}
var l = k(), m = new f.Logger("@firebase/app-compat");
if (b.isBrowser() && void 0 !== self.firebase) {

View File

@ -28,27 +28,33 @@ var m = function(a) {
return c && !d ? -1 : !c && d ? 1 : 0;
};
export default function r(i) {
var j = i.indexName, k = i.initialState, r = i.searchClient, t = i.resultsState, u = i.stalledSearchDelay, v = function(a) {
return K.getWidgets().filter(function(a) {
var j = i.indexName, k = i.initialState, r = i.searchClient, t = i.resultsState, u = i.stalledSearchDelay, v = function() {
R = !0;
}, w = function(a) {
l(a), M.setClient(a), A();
}, x = function() {
M.clearCache(), A();
}, y = function(a) {
return U.getWidgets().filter(function(a) {
return Boolean(a.getMetadata);
}).map(function(b) {
return b.getMetadata(a);
});
}, w = function() {
var d = K.getWidgets().filter(function(a) {
}, z = function() {
var d = U.getWidgets().filter(function(a) {
return Boolean(a.getSearchParameters);
}).filter(function(a) {
return !m(a) && !o(a);
}).reduce(function(a, b) {
return b.getSearchParameters(a);
}, J), e = K.getWidgets().filter(function(a) {
}, T), e = U.getWidgets().filter(function(a) {
return Boolean(a.getSearchParameters);
}).filter(function(a) {
var b = m(a) && n(a, j), c = o(a) && p(a, j);
return b || c;
}).sort(q).reduce(function(a, b) {
return b.getSearchParameters(a);
}, d), f = K.getWidgets().filter(function(a) {
}, d), f = U.getWidgets().filter(function(a) {
return Boolean(a.getSearchParameters);
}).filter(function(a) {
var b = m(a) && !n(a, j), c = o(a) && !p(a, j);
@ -68,49 +74,61 @@ export default function r(i) {
mainParameters: e,
derivedParameters: g
};
}, x = function() {
if (!H) {
var a = w(C.state), b = a.mainParameters, c = a.derivedParameters;
C.derivedHelpers.slice().forEach(function(a) {
}, A = function() {
if (!R) {
var a = z(M.state), b = a.mainParameters, c = a.derivedParameters;
M.derivedHelpers.slice().forEach(function(a) {
a.detach();
}), c.forEach(function(a) {
var b = a.indexId, c = a.parameters, d = C.derive(function() {
var b = a.indexId, c = a.parameters, d = M.derive(function() {
return c;
});
d.on("result", y({
d.on("result", B({
indexId: b
})).on("error", z);
}), C.setState(b), C.search();
})).on("error", C);
}), M.setState(b), M.search();
}
}, y = function(e) {
}, B = function(e) {
var f = e.indexId;
return function(e) {
var g = L.getState(), h = !C.derivedHelpers.length, i = g.results ? g.results : {};
var g = V.getState(), h = !M.derivedHelpers.length, i = g.results ? g.results : {};
i = !h && i.getFacetByName ? {} : i, i = h ? e.results : c(b({}, i), a({}, f, e.results));
var j = L.getState(), k = j.isSearchStalled;
C.hasPendingRequests() || (clearTimeout(I), I = null, k = !1), j.resultsFacetValues;
var j = V.getState(), k = j.isSearchStalled;
M.hasPendingRequests() || (clearTimeout(S), S = null, k = !1), j.resultsFacetValues;
var l = d(j, [
"resultsFacetValues"
]);
L.setState(c(b({}, l), {
V.setState(c(b({}, l), {
results: i,
isSearchStalled: k,
searching: !1,
error: null
}));
};
}, z = function(a) {
var e = a.error, f = L.getState(), g = f.isSearchStalled;
C.hasPendingRequests() || (clearTimeout(I), g = !1), f.resultsFacetValues;
}, C = function(a) {
var e = a.error, f = V.getState(), g = f.isSearchStalled;
M.hasPendingRequests() || (clearTimeout(S), g = !1), f.resultsFacetValues;
var h = d(f, [
"resultsFacetValues"
]);
L.setState(c(b({}, h), {
V.setState(c(b({}, h), {
isSearchStalled: g,
error: e,
searching: !1
}));
}, A = function(d, e) {
}, D = function() {
if (!S) {
var a;
S = setTimeout(function() {
var a = V.getState(), e = (a.resultsFacetValues, d(a, [
"resultsFacetValues"
]));
V.setState(c(b({}, e), {
isSearchStalled: !0
}));
}, u);
}
}, E = function(d, e) {
if (d.transporter) {
d.transporter.responsesCache.set({
method: "search",
@ -146,7 +164,7 @@ export default function r(i) {
return a.concat(b.rawResults);
}, [])
})));
}, B = function(d, e) {
}, F = function(d, e) {
if (d.transporter) {
d.transporter.responsesCache.set({
method: "search",
@ -174,29 +192,58 @@ export default function r(i) {
d.cache = c(b({}, d.cache), a({}, f, JSON.stringify({
results: e.rawResults
})));
}, C = f(r, j, b({}, h));
l(r), C.on("search", function() {
if (!I) {
var a;
I = setTimeout(function() {
var a = L.getState(), e = (a.resultsFacetValues, d(a, [
"resultsFacetValues"
]));
L.setState(c(b({}, e), {
isSearchStalled: !0
}));
}, u);
}
}).on("result", y({
indexId: j
})).on("error", z);
var D, E, F, G, H = !1, I = null, J = C.state, K = g(function() {
var a = v(L.getState().widgets);
L.setState(c(b({}, L.getState()), {
}, G = function() {
var a = y(V.getState().widgets);
V.setState(c(b({}, V.getState()), {
metadata: a,
searching: !0
})), x();
})), A();
}, H = function(a) {
var b = V.getState().widgets;
return U.getWidgets().filter(function(a) {
return Boolean(a.transitionState);
}).reduce(function(a, c) {
return c.transitionState(b, a);
}, a);
}, I = function(a) {
var d = y(a);
V.setState(c(b({}, V.getState()), {
widgets: a,
metadata: d,
searching: !0
})), A();
}, J = function(d) {
var e = d.facetName, f = d.query, g = d.maxFacetHits;
V.setState(c(b({}, V.getState()), {
searchingForFacetValues: !0
})), M.searchForFacetValues(e, f, Math.max(1, Math.min(void 0 === g ? 10 : g, 100))).then(function(d) {
var g;
V.setState(c(b({}, V.getState()), {
error: null,
searchingForFacetValues: !1,
resultsFacetValues: c(b({}, V.getState().resultsFacetValues), (a(g = {}, e, d.facetHits), a(g, "query", f), g))
}));
}, function(a) {
V.setState(c(b({}, V.getState()), {
searchingForFacetValues: !1,
error: a
}));
}).catch(function(a) {
setTimeout(function() {
throw a;
});
});
}, K = function(a) {
T = T.setIndex(a);
}, L = function() {
return V.getState().metadata.reduce(function(a, b) {
return void 0 !== b.id ? a.concat(b.id) : a;
}, []);
}, M = f(r, j, b({}, h));
l(r), M.on("search", D).on("result", B({
indexId: j
})).on("error", C);
var N, O, P, Q, R = !1, S = null, T = M.state, U = g(G);
!function(a, d) {
if (d && (a.transporter && !a._cacheHydrated || a._useCache && "function" == typeof a.addAlgoliaAgent)) {
if (a.transporter && !a._cacheHydrated) {
@ -232,96 +279,49 @@ export default function r(i) {
};
}
if (Array.isArray(d.results)) {
A(a, d.results);
E(a, d.results);
return;
}
B(a, d);
F(a, d);
}
}(r, t);
var L = (F = E = {
var V = (P = O = {
widgets: void 0 === k ? {} : k,
metadata: s(t),
results: (D = t) ? Array.isArray(D.results) ? D.results.reduce(function(d, e) {
results: (N = t) ? Array.isArray(N.results) ? N.results.reduce(function(d, e) {
return c(b({}, d), a({}, e._internalIndexId, new f.SearchResults(new f.SearchParameters(e.state), e.rawResults)));
}, {}) : new f.SearchResults(new f.SearchParameters(D.state), D.rawResults) : null,
}, {}) : new f.SearchResults(new f.SearchParameters(N.state), N.rawResults) : null,
error: null,
searching: !1,
isSearchStalled: !0,
searchingForFacetValues: !1
}, G = [], {
}, Q = [], {
getState: function() {
return F;
return P;
},
setState: function(a) {
F = a, G.forEach(function(a) {
P = a, Q.forEach(function(a) {
return a();
});
},
subscribe: function(a) {
return G.push(a), function() {
G.splice(G.indexOf(a), 1);
return Q.push(a), function() {
Q.splice(Q.indexOf(a), 1);
};
}
});
return {
store: L,
widgetsManager: K,
getWidgetsIds: function() {
return L.getState().metadata.reduce(function(a, b) {
return void 0 !== b.id ? a.concat(b.id) : a;
}, []);
},
getSearchParameters: w,
onSearchForFacetValues: function(d) {
var e = d.facetName, f = d.query, g = d.maxFacetHits;
L.setState(c(b({}, L.getState()), {
searchingForFacetValues: !0
})), C.searchForFacetValues(e, f, Math.max(1, Math.min(void 0 === g ? 10 : g, 100))).then(function(d) {
var g;
L.setState(c(b({}, L.getState()), {
error: null,
searchingForFacetValues: !1,
resultsFacetValues: c(b({}, L.getState().resultsFacetValues), (a(g = {}, e, d.facetHits), a(g, "query", f), g))
}));
}, function(a) {
L.setState(c(b({}, L.getState()), {
searchingForFacetValues: !1,
error: a
}));
}).catch(function(a) {
setTimeout(function() {
throw a;
});
});
},
onExternalStateUpdate: function(a) {
var d = v(a);
L.setState(c(b({}, L.getState()), {
widgets: a,
metadata: d,
searching: !0
})), x();
},
transitionState: function(a) {
var b = L.getState().widgets;
return K.getWidgets().filter(function(a) {
return Boolean(a.transitionState);
}).reduce(function(a, c) {
return c.transitionState(b, a);
}, a);
},
updateClient: function(a) {
l(a), C.setClient(a), x();
},
updateIndex: function(a) {
J = J.setIndex(a);
},
clearCache: function() {
C.clearCache(), x();
},
skipSearch: function() {
H = !0;
}
store: V,
widgetsManager: U,
getWidgetsIds: L,
getSearchParameters: z,
onSearchForFacetValues: J,
onExternalStateUpdate: I,
transitionState: H,
updateClient: w,
updateIndex: K,
clearCache: x,
skipSearch: v
};
};
function s(a) {

View File

@ -258,6 +258,8 @@ where
if v_usage.reassigned() {
return;
}
} else {
return;
}
}
}
@ -272,6 +274,8 @@ where
if v_usage.reassigned() {
return;
}
} else {
return;
}
}
}
@ -297,6 +301,12 @@ where
}
}
if !usage.used_as_callee {
if let Expr::Fn(..) | Expr::Arrow(..) = &**init {
return;
}
}
if usage.used_as_arg && !usage.is_fn_local {
if let Expr::Fn(..) | Expr::Arrow(..) = &**init {
return;

View File

@ -9,6 +9,7 @@ createCommonjsModule(function(module, exports) {
}), createCommonjsModule(function(module) {
module.exports = {
findConfig: function(from) {
var resolved;
return function(dir) {
throw Error("");
};

View File

@ -67,8 +67,7 @@
alignItems: "center",
margin: "100px 0",
color: "#ed3131"
};
exports.default = function(param) {
}, ErrorBoundaryFallback = function(param) {
var error, componentStack, componentStack1 = param.componentStack, error1 = param.error;
return _jsxRuntime.jsxs("div", {
style: style,
@ -100,6 +99,7 @@
]
});
};
exports.default = ErrorBoundaryFallback;
},
11179: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
@ -164,22 +164,22 @@
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = void 0;
var swcHelpers = __webpack_require__(547), _runtime = swcHelpers.interopRequireDefault(__webpack_require__(66902)), _runtime1 = swcHelpers.interopRequireDefault(__webpack_require__(2526)), _runtime2 = swcHelpers.interopRequireDefault(__webpack_require__(8900));
exports.default = function(runtime) {
var swcHelpers = __webpack_require__(547), _runtime = swcHelpers.interopRequireDefault(__webpack_require__(66902)), _runtime1 = swcHelpers.interopRequireDefault(__webpack_require__(2526)), _runtime2 = swcHelpers.interopRequireDefault(__webpack_require__(8900)), _default = function(runtime) {
runtime.loadModule(_runtime.default), runtime.loadModule(_runtime1.default), runtime.loadModule(_runtime2.default);
};
exports.default = _default;
},
98565: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = void 0;
var _runtime = __webpack_require__(547).interopRequireDefault(__webpack_require__(53380));
exports.default = function(appConfig) {
var _runtime = __webpack_require__(547).interopRequireDefault(__webpack_require__(53380)), _default = function(appConfig) {
_runtime.default({
appConfig: appConfig
});
};
exports.default = _default;
},
8000: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
@ -219,17 +219,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = void 0, exports.default = function(param) {
}), exports.default = void 0;
var module = function(param) {
var addProvider = param.addProvider, appConfig = param.appConfig;
appConfig.app && appConfig.app.addProvider && addProvider(appConfig.app.addProvider);
};
exports.default = module;
},
45440: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Provider = exports.withAuth = exports.useAuth = void 0;
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _react = __webpack_require__(59301), Context = _react.createContext(null), useAuth = function() {
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _react = __webpack_require__(59301), Context = _react.createContext(null), Provider = function(param) {
var _value = param.value, children = param.children, ref = _react.useState(void 0 === _value ? {} : _value), state = ref[0], setState = ref[1], updateState = function(param) {
setState(swcHelpers.objectSpread({}, state, void 0 === param ? {} : param));
};
return _jsxRuntime.jsx(Context.Provider, {
value: [
state,
updateState
],
children: children
});
}, useAuth = function() {
return _react.useContext(Context);
};
exports.useAuth = useAuth, exports.withAuth = function(Component) {
@ -240,36 +253,23 @@
setAuth: setAuth
}));
};
}, exports.Provider = function(param) {
var _value = param.value, children = param.children, ref = _react.useState(void 0 === _value ? {} : _value), state = ref[0], setState = ref[1];
return _jsxRuntime.jsx(Context.Provider, {
value: [
state,
function(param) {
setState(swcHelpers.objectSpread({}, state, void 0 === param ? {} : param));
}
],
children: children
});
};
}, exports.Provider = Provider;
},
8900: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = void 0;
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _auth = __webpack_require__(45440);
exports.default = function(param) {
var authConfig, context = param.context, appConfig = param.appConfig, addProvider = param.addProvider, wrapperPageComponent = param.wrapperPageComponent, initialData = context && context.initialData ? context.initialData : {}, initialAuth = initialData.auth || {}, authConfig1 = appConfig.auth || {};
addProvider(function(param) {
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _auth = __webpack_require__(45440), _default = function(param) {
var authConfig, context = param.context, appConfig = param.appConfig, addProvider = param.addProvider, wrapperPageComponent = param.wrapperPageComponent, initialData = context && context.initialData ? context.initialData : {}, initialAuth = initialData.auth || {}, authConfig1 = appConfig.auth || {}, AuthStoreProvider = function(param) {
var children = param.children;
return _jsxRuntime.jsx(_auth.Provider, {
value: initialAuth,
children: children
});
}), wrapperPageComponent((authConfig = authConfig1, function(PageComponent) {
var _pageConfig = PageComponent.pageConfig, pageConfig = void 0 === _pageConfig ? {} : _pageConfig;
return _auth.withAuth(function(props) {
};
addProvider(AuthStoreProvider), wrapperPageComponent((authConfig = authConfig1, function(PageComponent) {
var _pageConfig = PageComponent.pageConfig, pageConfig = void 0 === _pageConfig ? {} : _pageConfig, AuthWrappedComponent = function(props) {
var auth = props.auth, rest = (props.setAuth, swcHelpers.objectWithoutProperties(props, [
"auth",
"setAuth",
@ -278,9 +278,11 @@
return Array.isArray(pageConfigAuth) && pageConfigAuth.length && !Object.keys(auth).filter(function(item) {
return !!pageConfigAuth.includes(item) && auth[item];
}).length ? authConfig.NoAuthFallback ? "function" == typeof authConfig.NoAuthFallback ? _jsxRuntime.jsx(authConfig.NoAuthFallback, {}) : authConfig.NoAuthFallback : null : _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, rest));
});
};
return _auth.withAuth(AuthWrappedComponent);
}));
};
exports.default = _default;
},
1481: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
@ -289,21 +291,33 @@
}), exports.default = void 0;
var _runtime = __webpack_require__(56128), DEFAULE_CONFIG = {}, axiosInstance = {
default: _runtime.axios.create(DEFAULE_CONFIG)
};
exports.default = function(instanceName) {
}, _default = function(instanceName) {
if (instanceName) {
if (axiosInstance[instanceName]) return axiosInstance;
axiosInstance[instanceName] = _runtime.axios.create(DEFAULE_CONFIG);
}
return axiosInstance;
};
exports.default = _default;
},
53380: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = void 0;
var swcHelpers = __webpack_require__(547), _createAxiosInstance = swcHelpers.interopRequireDefault(__webpack_require__(1481));
var swcHelpers = __webpack_require__(547), _createAxiosInstance = swcHelpers.interopRequireDefault(__webpack_require__(1481)), module = function(param) {
var appConfig = param.appConfig;
if (appConfig.request) {
var tmp = appConfig.request, requestConfig = void 0 === tmp ? {} : tmp;
"[object Array]" === Object.prototype.toString.call(requestConfig) ? requestConfig.forEach(function(requestItem) {
var instanceName = requestItem.instanceName ? requestItem.instanceName : "default";
if (instanceName) {
var axiosInstance = _createAxiosInstance.default(instanceName)[instanceName];
setAxiosInstance(requestItem, axiosInstance);
}
}) : setAxiosInstance(requestConfig, _createAxiosInstance.default().default);
}
};
function setAxiosInstance(requestConfig, axiosInstance) {
var _interceptors = requestConfig.interceptors, interceptors = void 0 === _interceptors ? {} : _interceptors, requestOptions = swcHelpers.objectWithoutProperties(requestConfig, [
"interceptors"
@ -320,19 +334,7 @@
return Promise.reject(error);
});
}
exports.default = function(param) {
var appConfig = param.appConfig;
if (appConfig.request) {
var tmp = appConfig.request, requestConfig = void 0 === tmp ? {} : tmp;
"[object Array]" === Object.prototype.toString.call(requestConfig) ? requestConfig.forEach(function(requestItem) {
var instanceName = requestItem.instanceName ? requestItem.instanceName : "default";
if (instanceName) {
var axiosInstance = _createAxiosInstance.default(instanceName)[instanceName];
setAxiosInstance(requestItem, axiosInstance);
}
}) : setAxiosInstance(requestConfig, _createAxiosInstance.default().default);
}
};
exports.default = module;
},
2526: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
@ -340,23 +342,21 @@
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = void 0;
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _errorBoundary = swcHelpers.interopRequireDefault(__webpack_require__(11179)), _routes = swcHelpers.interopRequireDefault(__webpack_require__(72791)), _router = __webpack_require__(37447), _formatRoutes = swcHelpers.interopRequireWildcard(__webpack_require__(14710));
exports.default = function(param) {
var setRenderApp = param.setRenderApp, appConfig = param.appConfig, modifyRoutes = param.modifyRoutes, wrapperPageComponent = param.wrapperPageComponent, modifyRoutesComponent = param.modifyRoutesComponent, buildConfig = param.buildConfig, context = param.context, applyRuntimeAPI = param.applyRuntimeAPI, tmp = appConfig.router, appConfigRouter = void 0 === tmp ? {} : tmp, _app = appConfig.app, app = void 0 === _app ? {} : _app, ErrorBoundaryFallback = app.ErrorBoundaryFallback, onErrorBoundaryHandler = app.onErrorBoundaryHandler, _parseSearchParams = app.parseSearchParams, parseSearchParams = void 0 === _parseSearchParams || _parseSearchParams;
wrapperPageComponent(function(PageComponent) {
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _errorBoundary = swcHelpers.interopRequireDefault(__webpack_require__(11179)), _routes = swcHelpers.interopRequireDefault(__webpack_require__(72791)), _router = __webpack_require__(37447), _formatRoutes = swcHelpers.interopRequireWildcard(__webpack_require__(14710)), module = function(param) {
var setRenderApp = param.setRenderApp, appConfig = param.appConfig, modifyRoutes = param.modifyRoutes, wrapperPageComponent = param.wrapperPageComponent, modifyRoutesComponent = param.modifyRoutesComponent, buildConfig = param.buildConfig, context = param.context, applyRuntimeAPI = param.applyRuntimeAPI, tmp = appConfig.router, appConfigRouter = void 0 === tmp ? {} : tmp, _app = appConfig.app, app = void 0 === _app ? {} : _app, ErrorBoundaryFallback = app.ErrorBoundaryFallback, onErrorBoundaryHandler = app.onErrorBoundaryHandler, _parseSearchParams = app.parseSearchParams, parseSearchParams = void 0 === _parseSearchParams || _parseSearchParams, WrappedPageComponent = function(PageComponent) {
return function(props) {
var searchParams = parseSearchParams && applyRuntimeAPI("getSearchParams");
return _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, Object.assign({}, props, {
searchParams: searchParams
})));
};
}), modifyRoutes(function() {
};
wrapperPageComponent(WrappedPageComponent), modifyRoutes(function() {
return _formatRoutes.default(appConfigRouter.routes || _routes.default, "");
}), modifyRoutesComponent(function() {
return _router.Routes;
});
var wrapperPageFn = process.env.__IS_SERVER__ ? _formatRoutes.wrapperPageWithSSR(context) : _formatRoutes.wrapperPageWithCSR();
wrapperPageComponent(wrapperPageFn), wrapperPageComponent(function(PageComponent) {
var wrapperPageErrorBoundary = function(PageComponent) {
var _pageConfig = PageComponent.pageConfig, pageConfig = void 0 === _pageConfig ? {} : _pageConfig;
return function(props) {
return pageConfig.errorBoundary ? _jsxRuntime.jsx(_errorBoundary.default, {
@ -365,9 +365,9 @@
children: _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, props))
}) : _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, props));
};
}), appConfigRouter.modifyRoutes && modifyRoutes(appConfigRouter.modifyRoutes);
var lazy = buildConfig && buildConfig.router && buildConfig.router.lazy;
setRenderApp(function(routes, RoutesComponent, param) {
}, wrapperPageFn = process.env.__IS_SERVER__ ? _formatRoutes.wrapperPageWithSSR(context) : _formatRoutes.wrapperPageWithCSR();
wrapperPageComponent(wrapperPageFn), wrapperPageComponent(wrapperPageErrorBoundary), appConfigRouter.modifyRoutes && modifyRoutes(appConfigRouter.modifyRoutes);
var lazy = buildConfig && buildConfig.router && buildConfig.router.lazy, renderRouter = function(routes, RoutesComponent, param) {
var customRouterProps = void 0 === param ? {} : param;
return function() {
var routerProps = swcHelpers.objectSpread({}, appConfigRouter, {
@ -393,8 +393,10 @@
}) : null
}));
};
});
};
setRenderApp(renderRouter);
};
exports.default = module;
},
37447: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
@ -576,7 +578,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = void 0, exports.default = function() {
}), exports.default = void 0;
var _default = function() {
for(var _len = arguments.length, strArray = Array(_len), _key = 0; _key < _len; _key++)strArray[_key] = arguments[_key];
if (0 === strArray.length) return "";
var resultArray = [], filterStrArray = strArray.filter(function(str) {
@ -588,14 +591,14 @@
index > 0 && (routePath = routePath.replace(/^[/]+/, "")), routePath = index < filterStrArray.length - 1 ? routePath.replace(/[/]+$/, "") : routePath.replace(/[/]+$/, "/"), resultArray.push(routePath);
}), resultArray.join("/");
};
exports.default = _default;
},
56905: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = void 0;
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _indexModuleScss = swcHelpers.interopRequireDefault(__webpack_require__(89704));
exports.default = function() {
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _indexModuleScss = swcHelpers.interopRequireDefault(__webpack_require__(89704)), Guide = function() {
return _jsxRuntime.jsxs("div", {
className: _indexModuleScss.default.container,
children: [
@ -630,16 +633,17 @@
]
});
};
exports.default = Guide;
},
43361: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = void 0;
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _guide = swcHelpers.interopRequireDefault(__webpack_require__(56905));
exports.default = function() {
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _guide = swcHelpers.interopRequireDefault(__webpack_require__(56905)), Home = function() {
return console.log(1), _jsxRuntime.jsx(_guide.default, {});
};
exports.default = Home;
},
72791: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
@ -742,11 +746,11 @@
});
};
return Component.displayName && (LoadableWithChunkExtractor.displayName = Component.displayName + "WithChunkExtractor"), LoadableWithChunkExtractor;
}, identity = function(v) {
return v;
};
function createLoadable(_ref) {
var _ref$defaultResolveCo = _ref.defaultResolveComponent, defaultResolveComponent = void 0 === _ref$defaultResolveCo ? function(v) {
return v;
} : _ref$defaultResolveCo, _render = _ref.render, onLoad = _ref.onLoad;
var _ref$defaultResolveCo = _ref.defaultResolveComponent, defaultResolveComponent = void 0 === _ref$defaultResolveCo ? identity : _ref$defaultResolveCo, _render = _ref.render, onLoad = _ref.onLoad;
function loadable(loadableConstructor, options) {
void 0 === options && (options = {});
var ctor, ctor1 = "function" == typeof (ctor = loadableConstructor) ? {
@ -1208,11 +1212,11 @@
void 0 !== element.descriptor.get ? other.descriptor.get = element.descriptor.get : other.descriptor.set = element.descriptor.set;
}
function _coalesceClassElements(elements) {
for(var newElements = [], i = 0; i < elements.length; i++){
var other, element = elements[i];
if ("method" === element.kind && (other = newElements.find(function(other) {
for(var newElements = [], isSameElement = function(other) {
return "method" === other.kind && other.key === element.key && other.placement === element.placement;
}))) {
}, i = 0; i < elements.length; i++){
var other, element = elements[i];
if ("method" === element.kind && (other = newElements.find(isSameElement))) {
if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {
if (_hasDecorators(element) || _hasDecorators(other)) throw ReferenceError("Duplicated methods (" + element.key + ") can't be decorated.");
other.descriptor = element.descriptor;
@ -2693,10 +2697,46 @@
}, BigIntArrayConstructorsList = {
BigInt64Array: 8,
BigUint64Array: 8
}, isView = function(it) {
if (!isObject(it)) return !1;
var klass = classof(it);
return "DataView" === klass || has(TypedArrayConstructorsList, klass) || has(BigIntArrayConstructorsList, klass);
}, isTypedArray = function(it) {
if (!isObject(it)) return !1;
var klass = classof(it);
return has(TypedArrayConstructorsList, klass) || has(BigIntArrayConstructorsList, klass);
}, aTypedArray = function(it) {
if (isTypedArray(it)) return it;
throw TypeError("Target is not a typed array");
}, aTypedArrayConstructor = function(C) {
if (isCallable(C) && (!setPrototypeOf || isPrototypeOf.call(TypedArray, C))) return C;
throw TypeError(tryToString(C) + " is not a typed array constructor");
}, exportTypedArrayMethod = function(KEY, property, forced) {
if (DESCRIPTORS) {
if (forced) for(var ARRAY in TypedArrayConstructorsList){
var TypedArrayConstructor = global[ARRAY];
if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) try {
delete TypedArrayConstructor.prototype[KEY];
} catch (error) {}
}
(!TypedArrayPrototype[KEY] || forced) && redefine(TypedArrayPrototype, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
}
}, exportTypedArrayStaticMethod = function(KEY, property, forced) {
var ARRAY, TypedArrayConstructor;
if (DESCRIPTORS) {
if (setPrototypeOf) {
if (forced) {
for(ARRAY in TypedArrayConstructorsList)if ((TypedArrayConstructor = global[ARRAY]) && has(TypedArrayConstructor, KEY)) try {
delete TypedArrayConstructor[KEY];
} catch (error) {}
}
if (TypedArray[KEY] && !forced) return;
try {
return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
} catch (error1) {}
}
for(ARRAY in TypedArrayConstructorsList)(TypedArrayConstructor = global[ARRAY]) && (!TypedArrayConstructor[KEY] || forced) && redefine(TypedArrayConstructor, KEY, property);
}
};
for(NAME in TypedArrayConstructorsList)(Prototype = (Constructor = global[NAME]) && Constructor.prototype) ? createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor) : NATIVE_ARRAY_BUFFER_VIEWS = !1;
for(NAME in BigIntArrayConstructorsList)(Prototype = (Constructor = global[NAME]) && Constructor.prototype) && createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
@ -2713,47 +2753,11 @@
NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,
TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
aTypedArray: function(it) {
if (isTypedArray(it)) return it;
throw TypeError("Target is not a typed array");
},
aTypedArrayConstructor: function(C) {
if (isCallable(C) && (!setPrototypeOf || isPrototypeOf.call(TypedArray, C))) return C;
throw TypeError(tryToString(C) + " is not a typed array constructor");
},
exportTypedArrayMethod: function(KEY, property, forced) {
if (DESCRIPTORS) {
if (forced) for(var ARRAY in TypedArrayConstructorsList){
var TypedArrayConstructor = global[ARRAY];
if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) try {
delete TypedArrayConstructor.prototype[KEY];
} catch (error) {}
}
(!TypedArrayPrototype[KEY] || forced) && redefine(TypedArrayPrototype, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
}
},
exportTypedArrayStaticMethod: function(KEY, property, forced) {
var ARRAY, TypedArrayConstructor;
if (DESCRIPTORS) {
if (setPrototypeOf) {
if (forced) {
for(ARRAY in TypedArrayConstructorsList)if ((TypedArrayConstructor = global[ARRAY]) && has(TypedArrayConstructor, KEY)) try {
delete TypedArrayConstructor[KEY];
} catch (error) {}
}
if (TypedArray[KEY] && !forced) return;
try {
return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
} catch (error1) {}
}
for(ARRAY in TypedArrayConstructorsList)(TypedArrayConstructor = global[ARRAY]) && (!TypedArrayConstructor[KEY] || forced) && redefine(TypedArrayConstructor, KEY, property);
}
},
isView: function(it) {
if (!isObject(it)) return !1;
var klass = classof(it);
return "DataView" === klass || has(TypedArrayConstructorsList, klass) || has(BigIntArrayConstructorsList, klass);
},
aTypedArray: aTypedArray,
aTypedArrayConstructor: aTypedArrayConstructor,
exportTypedArrayMethod: exportTypedArrayMethod,
exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
isView: isView,
isTypedArray: isTypedArray,
TypedArray: TypedArray,
TypedArrayPrototype: TypedArrayPrototype
@ -3412,14 +3416,14 @@
},
10536: function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var IteratorPrototype = __webpack_require__(65400).IteratorPrototype, create = __webpack_require__(18255), createPropertyDescriptor = __webpack_require__(93608), setToStringTag = __webpack_require__(77875), Iterators = __webpack_require__(25463);
var IteratorPrototype = __webpack_require__(65400).IteratorPrototype, create = __webpack_require__(18255), createPropertyDescriptor = __webpack_require__(93608), setToStringTag = __webpack_require__(77875), Iterators = __webpack_require__(25463), returnThis = function() {
return this;
};
module.exports = function(IteratorConstructor, NAME, next) {
var TO_STRING_TAG = NAME + " Iterator";
return IteratorConstructor.prototype = create(IteratorPrototype, {
next: createPropertyDescriptor(1, next)
}), setToStringTag(IteratorConstructor, TO_STRING_TAG, !1, !0), Iterators[TO_STRING_TAG] = function() {
return this;
}, IteratorConstructor;
}), setToStringTag(IteratorConstructor, TO_STRING_TAG, !1, !0), Iterators[TO_STRING_TAG] = returnThis, IteratorConstructor;
};
},
48181: function(module, __unused_webpack_exports, __webpack_require__) {
@ -3859,15 +3863,12 @@
});
},
43571: function(module) {
var abs = Math.abs, pow = Math.pow, floor = Math.floor, log = Math.log, LN2 = Math.LN2;
module.exports = {
pack: function(number, mantissaLength, bytes) {
var abs = Math.abs, pow = Math.pow, floor = Math.floor, log = Math.log, LN2 = Math.LN2, pack = function(number, mantissaLength, bytes) {
var exponent, mantissa, c, buffer = Array(bytes), exponentLength = 8 * bytes - mantissaLength - 1, eMax = (1 << exponentLength) - 1, eBias = eMax >> 1, rt = 23 === mantissaLength ? pow(2, -24) - pow(2, -77) : 0, sign = number < 0 || 0 === number && 1 / number < 0 ? 1 : 0, index = 0;
for((number = abs(number)) != number || number === 1 / 0 ? (mantissa = number != number ? 1 : 0, exponent = eMax) : (exponent = floor(log(number) / LN2), number * (c = pow(2, -exponent)) < 1 && (exponent--, c *= 2), exponent + eBias >= 1 ? number += rt / c : number += rt * pow(2, 1 - eBias), number * c >= 2 && (exponent++, c /= 2), exponent + eBias >= eMax ? (mantissa = 0, exponent = eMax) : exponent + eBias >= 1 ? (mantissa = (number * c - 1) * pow(2, mantissaLength), exponent += eBias) : (mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength), exponent = 0)); mantissaLength >= 8; buffer[index++] = 255 & mantissa, mantissa /= 256, mantissaLength -= 8);
for(exponent = exponent << mantissaLength | mantissa, exponentLength += mantissaLength; exponentLength > 0; buffer[index++] = 255 & exponent, exponent /= 256, exponentLength -= 8);
return buffer[--index] |= 128 * sign, buffer;
},
unpack: function(buffer, mantissaLength) {
}, unpack = function(buffer, mantissaLength) {
var mantissa, bytes = buffer.length, exponentLength = 8 * bytes - mantissaLength - 1, eMax = (1 << exponentLength) - 1, eBias = eMax >> 1, nBits = exponentLength - 7, index = bytes - 1, sign = buffer[index--], exponent = 127 & sign;
for(sign >>= 7; nBits > 0; exponent = 256 * exponent + buffer[index], index--, nBits -= 8);
for(mantissa = exponent & (1 << -nBits) - 1, exponent >>= -nBits, nBits += mantissaLength; nBits > 0; mantissa = 256 * mantissa + buffer[index], index--, nBits -= 8);
@ -3877,7 +3878,10 @@
mantissa += pow(2, mantissaLength), exponent -= eBias;
}
return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
}
};
module.exports = {
pack: pack,
unpack: unpack
};
},
51478: function(module, __unused_webpack_exports, __webpack_require__) {
@ -3911,8 +3915,24 @@
weakData: {}
}
});
}, meta = module.exports = {
enable: function() {
}, fastKey = function(it, create) {
if (!isObject(it)) return "symbol" == typeof it ? it : ("string" == typeof it ? "S" : "P") + it;
if (!has(it, METADATA)) {
if (!isExtensible(it)) return "F";
if (!create) return "E";
setMetadata(it);
}
return it[METADATA].objectID;
}, getWeakData = function(it, create) {
if (!has(it, METADATA)) {
if (!isExtensible(it)) return !0;
if (!create) return !1;
setMetadata(it);
}
return it[METADATA].weakData;
}, onFreeze = function(it) {
return FREEZING && REQUIRED && isExtensible(it) && !has(it, METADATA) && setMetadata(it), it;
}, enable = function() {
meta.enable = function() {}, REQUIRED = !0;
var getOwnPropertyNames = getOwnPropertyNamesModule.f, splice = [].splice, test = {};
test[METADATA] = 1, getOwnPropertyNames(test).length && (getOwnPropertyNamesModule.f = function(it) {
@ -3928,32 +3948,24 @@
}, {
getOwnPropertyNames: getOwnPropertyNamesExternalModule.f
}));
},
fastKey: function(it, create) {
if (!isObject(it)) return "symbol" == typeof it ? it : ("string" == typeof it ? "S" : "P") + it;
if (!has(it, METADATA)) {
if (!isExtensible(it)) return "F";
if (!create) return "E";
setMetadata(it);
}
return it[METADATA].objectID;
},
getWeakData: function(it, create) {
if (!has(it, METADATA)) {
if (!isExtensible(it)) return !0;
if (!create) return !1;
setMetadata(it);
}
return it[METADATA].weakData;
},
onFreeze: function(it) {
return FREEZING && REQUIRED && isExtensible(it) && !has(it, METADATA) && setMetadata(it), it;
}
}, meta = module.exports = {
enable: enable,
fastKey: fastKey,
getWeakData: getWeakData,
onFreeze: onFreeze
};
hiddenKeys[METADATA] = !0;
},
44670: function(module, __unused_webpack_exports, __webpack_require__) {
var set, get, has, NATIVE_WEAK_MAP = __webpack_require__(83165), global = __webpack_require__(19514), isObject = __webpack_require__(39817), createNonEnumerableProperty = __webpack_require__(48181), objectHas = __webpack_require__(1521), shared = __webpack_require__(88986), sharedKey = __webpack_require__(16735), hiddenKeys = __webpack_require__(38276), OBJECT_ALREADY_INITIALIZED = "Object already initialized", WeakMap1 = global.WeakMap;
var set, get, has, NATIVE_WEAK_MAP = __webpack_require__(83165), global = __webpack_require__(19514), isObject = __webpack_require__(39817), createNonEnumerableProperty = __webpack_require__(48181), objectHas = __webpack_require__(1521), shared = __webpack_require__(88986), sharedKey = __webpack_require__(16735), hiddenKeys = __webpack_require__(38276), OBJECT_ALREADY_INITIALIZED = "Object already initialized", WeakMap1 = global.WeakMap, enforce = function(it) {
return has(it) ? get(it) : set(it, {});
}, getterFor = function(TYPE) {
return function(it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) throw TypeError("Incompatible receiver, " + TYPE + " required");
return state;
};
};
if (NATIVE_WEAK_MAP || shared.state) {
var store = shared.state || (shared.state = new WeakMap1()), wmget = store.get, wmhas = store.has, wmset = store.set;
set = function(it, metadata) {
@ -3979,16 +3991,8 @@
set: set,
get: get,
has: has,
enforce: function(it) {
return has(it) ? get(it) : set(it, {});
},
getterFor: function(TYPE) {
return function(it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) throw TypeError("Incompatible receiver, " + TYPE + " required");
return state;
};
}
enforce: enforce,
getterFor: getterFor
};
},
58011: function(module, __unused_webpack_exports, __webpack_require__) {
@ -4016,13 +4020,7 @@
} catch (error) {
return !1;
}
};
module.exports = !construct || fails(function() {
var called;
return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function() {
called = !0;
}) || called;
}) ? function(argument) {
}, isConstructorLegacy = function(argument) {
if (!isCallable(argument)) return !1;
switch(classof(argument)){
case "AsyncFunction":
@ -4031,7 +4029,13 @@
return !1;
}
return INCORRECT_TO_STRING || !!exec.call(constructorRegExp, inspectSource(argument));
} : isConstructorModern;
};
module.exports = !construct || fails(function() {
var called;
return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function() {
called = !0;
}) || called;
}) ? isConstructorLegacy : isConstructorModern;
},
69518: function(module, __unused_webpack_exports, __webpack_require__) {
var has = __webpack_require__(1521);
@ -7779,6 +7783,8 @@
return $forEach(keys, function(key) {
(!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) && $defineProperty(O, key, properties[key]);
}), O;
}, $create = function(O, Properties) {
return void 0 === Properties ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
}, $propertyIsEnumerable = function(V) {
var P = toPropertyKey(V), enumerable = nativePropertyIsEnumerable.call(this, P);
return (!(this === ObjectPrototype && has(AllSymbols, P)) || !!has(ObjectPrototypeSymbols, P)) && (!(enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P]) || enumerable);
@ -7857,9 +7863,7 @@
forced: !NATIVE_SYMBOL,
sham: !DESCRIPTORS
}, {
create: function(O, Properties) {
return void 0 === Properties ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
},
create: $create,
defineProperty: $defineProperty,
defineProperties: $defineProperties,
getOwnPropertyDescriptor: $getOwnPropertyDescriptor

View File

@ -1,4 +1,4 @@
export default ((adler, buf, len, pos)=>{
const adler32 = (adler, buf, len, pos)=>{
let s1 = 0xffff & adler | 0, s2 = adler >>> 16 & 0xffff | 0, n = 0;
for(; 0 !== len;){
n = len > 2000 ? 2000 : len, len -= n;
@ -7,4 +7,5 @@ export default ((adler, buf, len, pos)=>{
s1 %= 65521, s2 %= 65521;
}
return s1 | s2 << 16 | 0;
});
};
export default adler32;

View File

@ -817,7 +817,7 @@
prefetched[href + "%" + as + (curLocale ? "%" + curLocale : "")] = !0;
}
}
exports.default = function(props) {
var _default = function(props) {
var child, p = !1 !== props.prefetch, router = _router1.useRouter(), ref2 = _react.default.useMemo(function() {
var ref = _slicedToArray(_router.resolveHref(router, props.href, !0), 2), resolvedHref = ref[0], resolvedAs = ref[1];
return {
@ -872,6 +872,7 @@
}
return _react.default.cloneElement(child, childProps);
};
exports.default = _default;
},
7190: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";

View File

@ -2414,15 +2414,15 @@
[LogLevel.INFO]: "info",
[LogLevel.WARN]: "warn",
[LogLevel.ERROR]: "error"
};
class Logger {
constructor(name){
this.name = name, this._logLevel = defaultLogLevel, this._logHandler = (instance, logType, ...args)=>{
}, defaultLogHandler = (instance, logType, ...args)=>{
if (logType < instance.logLevel) return;
const now = new Date().toISOString(), method = ConsoleMethod[logType];
if (method) console[method](`[${now}] ${instance.name}:`, ...args);
else throw Error(`Attempted to log a message with an invalid logType (value: ${logType})`);
}, this._userLogHandler = null, [].push(this);
};
class Logger {
constructor(name){
this.name = name, this._logLevel = defaultLogLevel, this._logHandler = defaultLogHandler, this._userLogHandler = null, [].push(this);
}
get logLevel() {
return this._logLevel;

View File

@ -878,7 +878,9 @@
for(i = 1, res = moments[0]; i < moments.length; ++i)(!moments[i].isValid() || moments[i][fn](res)) && (res = moments[i]);
return res;
}
var ordering = [
var now = function() {
return Date.now ? Date.now() : +new Date();
}, ordering = [
"year",
"quarter",
"month",
@ -1837,9 +1839,7 @@
}, hooks.max = function() {
var args = [].slice.call(arguments, 0);
return pickBy("isAfter", args);
}, hooks.now = function() {
return Date.now ? Date.now() : +new Date();
}, hooks.utc = createUTC, hooks.unix = function(input) {
}, hooks.now = now, hooks.utc = createUTC, hooks.unix = function(input) {
return createLocal(1000 * input);
}, hooks.months = function(format, index) {
return listMonthsImpl(format, index, "months");

View File

@ -772,8 +772,7 @@
"containerProps",
"children",
"style",
];
exports.ZP = function(props) {
], CountUp = function(props) {
var className = props.className, redraw = props.redraw, containerProps = props.containerProps, children = props.children, style = props.style, useCountUpProps = _objectWithoutProperties(props, _excluded), containerRef = React__default.default.useRef(null), isInitializedRef = React__default.default.useRef(!1), _useCountUp = useCountUp(_objectSpread2(_objectSpread2({}, useCountUpProps), {}, {
ref: containerRef,
startOnMount: "function" != typeof children || 0 === props.delay,
@ -833,6 +832,7 @@
style: style
}, containerProps));
};
exports.ZP = CountUp;
}
},
]);

View File

@ -24,7 +24,13 @@ var _obj, isMultiIndexContext = function(widget) {
return isFirstWidgetIndex && !isSecondWidgetIndex ? -1 : !isFirstWidgetIndex && isSecondWidgetIndex ? 1 : 0;
};
export default function createInstantSearchManager(param) {
var indexName = param.indexName, _initialState = param.initialState, searchClient = param.searchClient, resultsState = param.resultsState, stalledSearchDelay = param.stalledSearchDelay, getMetadata = function(state) {
var indexName = param.indexName, _initialState = param.initialState, searchClient = param.searchClient, resultsState = param.resultsState, stalledSearchDelay = param.stalledSearchDelay, skipSearch = function() {
skip = !0;
}, updateClient = function(client) {
addAlgoliaAgents(client), helper.setClient(client), search();
}, clearCache = function() {
helper.clearCache(), search();
}, getMetadata = function(state) {
return widgetsManager.getWidgets().filter(function(widget) {
return Boolean(widget.getMetadata);
}).map(function(widget) {
@ -106,6 +112,15 @@ export default function createInstantSearchManager(param) {
error: error,
searching: !1
}));
}, handleNewSearch = function() {
stalledSearchTimer || (stalledSearchTimer = setTimeout(function() {
var _ref = store.getState(), partialState = (_ref.resultsFacetValues, swcHelpers.objectWithoutProperties(_ref, [
"resultsFacetValues",
]));
store.setState(swcHelpers.objectSpread({}, partialState, {
isSearchStalled: !0
}));
}, stalledSearchDelay));
}, hydrateSearchClientWithMultiIndexRequest = function(client, results) {
if (client.transporter) {
client.transporter.responsesCache.set({
@ -170,26 +185,57 @@ export default function createInstantSearchManager(param) {
client.cache = swcHelpers.objectSpread({}, client.cache, swcHelpers.defineProperty({}, key, JSON.stringify({
results: results.rawResults
})));
}, helper = algoliasearchHelper(searchClient, indexName, swcHelpers.objectSpread({}, HIGHLIGHT_TAGS));
addAlgoliaAgents(searchClient), helper.on("search", function() {
stalledSearchTimer || (stalledSearchTimer = setTimeout(function() {
var _ref = store.getState(), partialState = (_ref.resultsFacetValues, swcHelpers.objectWithoutProperties(_ref, [
"resultsFacetValues",
]));
store.setState(swcHelpers.objectSpread({}, partialState, {
isSearchStalled: !0
}));
}, stalledSearchDelay));
}).on("result", handleSearchSuccess({
indexId: indexName
})).on("error", handleSearchError);
var results, state, listeners, skip = !1, stalledSearchTimer = null, initialSearchParameters = helper.state, widgetsManager = createWidgetsManager(function() {
}, onWidgetsUpdate = function() {
var metadata = getMetadata(store.getState().widgets);
store.setState(swcHelpers.objectSpread({}, store.getState(), {
metadata: metadata,
searching: !0
})), search();
}, transitionState = function(nextSearchState) {
var searchState = store.getState().widgets;
return widgetsManager.getWidgets().filter(function(widget) {
return Boolean(widget.transitionState);
}).reduce(function(res, widget) {
return widget.transitionState(searchState, res);
}, nextSearchState);
}, onExternalStateUpdate = function(nextSearchState) {
var metadata = getMetadata(nextSearchState);
store.setState(swcHelpers.objectSpread({}, store.getState(), {
widgets: nextSearchState,
metadata: metadata,
searching: !0
})), search();
}, onSearchForFacetValues = function(param) {
var facetName = param.facetName, query = param.query, _maxFacetHits = param.maxFacetHits;
store.setState(swcHelpers.objectSpread({}, store.getState(), {
searchingForFacetValues: !0
})), helper.searchForFacetValues(facetName, query, Math.max(1, Math.min(void 0 === _maxFacetHits ? 10 : _maxFacetHits, 100))).then(function(content) {
store.setState(swcHelpers.objectSpread({}, store.getState(), {
error: null,
searchingForFacetValues: !1,
resultsFacetValues: swcHelpers.objectSpread({}, store.getState().resultsFacetValues, (_obj = {}, swcHelpers.defineProperty(_obj, facetName, content.facetHits), swcHelpers.defineProperty(_obj, "query", query), _obj))
}));
}, function(error) {
store.setState(swcHelpers.objectSpread({}, store.getState(), {
searchingForFacetValues: !1,
error: error
}));
}).catch(function(error) {
setTimeout(function() {
throw error;
});
});
}, updateIndex = function(newIndex) {
initialSearchParameters = initialSearchParameters.setIndex(newIndex);
}, getWidgetsIds = function() {
return store.getState().metadata.reduce(function(res, meta) {
return void 0 !== meta.id ? res.concat(meta.id) : res;
}, []);
}, helper = algoliasearchHelper(searchClient, indexName, swcHelpers.objectSpread({}, HIGHLIGHT_TAGS));
addAlgoliaAgents(searchClient), helper.on("search", handleNewSearch).on("result", handleSearchSuccess({
indexId: indexName
})).on("error", handleSearchError);
var results, state, listeners, skip = !1, stalledSearchTimer = null, initialSearchParameters = helper.state, widgetsManager = createWidgetsManager(onWidgetsUpdate);
!function(client, results) {
if (results && (client.transporter && !client._cacheHydrated || client._useCache && "function" == typeof client.addAlgoliaAgent)) {
if (client.transporter && !client._cacheHydrated) {
@ -259,61 +305,15 @@ export default function createInstantSearchManager(param) {
return {
store: store,
widgetsManager: widgetsManager,
getWidgetsIds: function() {
return store.getState().metadata.reduce(function(res, meta) {
return void 0 !== meta.id ? res.concat(meta.id) : res;
}, []);
},
getWidgetsIds: getWidgetsIds,
getSearchParameters: getSearchParameters,
onSearchForFacetValues: function(param) {
var facetName = param.facetName, query = param.query, _maxFacetHits = param.maxFacetHits;
store.setState(swcHelpers.objectSpread({}, store.getState(), {
searchingForFacetValues: !0
})), helper.searchForFacetValues(facetName, query, Math.max(1, Math.min(void 0 === _maxFacetHits ? 10 : _maxFacetHits, 100))).then(function(content) {
store.setState(swcHelpers.objectSpread({}, store.getState(), {
error: null,
searchingForFacetValues: !1,
resultsFacetValues: swcHelpers.objectSpread({}, store.getState().resultsFacetValues, (_obj = {}, swcHelpers.defineProperty(_obj, facetName, content.facetHits), swcHelpers.defineProperty(_obj, "query", query), _obj))
}));
}, function(error) {
store.setState(swcHelpers.objectSpread({}, store.getState(), {
searchingForFacetValues: !1,
error: error
}));
}).catch(function(error) {
setTimeout(function() {
throw error;
});
});
},
onExternalStateUpdate: function(nextSearchState) {
var metadata = getMetadata(nextSearchState);
store.setState(swcHelpers.objectSpread({}, store.getState(), {
widgets: nextSearchState,
metadata: metadata,
searching: !0
})), search();
},
transitionState: function(nextSearchState) {
var searchState = store.getState().widgets;
return widgetsManager.getWidgets().filter(function(widget) {
return Boolean(widget.transitionState);
}).reduce(function(res, widget) {
return widget.transitionState(searchState, res);
}, nextSearchState);
},
updateClient: function(client) {
addAlgoliaAgents(client), helper.setClient(client), search();
},
updateIndex: function(newIndex) {
initialSearchParameters = initialSearchParameters.setIndex(newIndex);
},
clearCache: function() {
helper.clearCache(), search();
},
skipSearch: function() {
skip = !0;
}
onSearchForFacetValues: onSearchForFacetValues,
onExternalStateUpdate: onExternalStateUpdate,
transitionState: transitionState,
updateClient: updateClient,
updateIndex: updateIndex,
clearCache: clearCache,
skipSearch: skipSearch
};
};
function hydrateMetadata(resultsState) {

View File

@ -2148,12 +2148,12 @@
this.members = members;
};
function mapChildren(oldChildren, newLocal, mapping, node, offset, oldOffset, options) {
for(var children = oldChildren.slice(), i = 0; i < mapping.maps.length; i++)mapping.maps[i].forEach(function(oldStart, oldEnd, newStart, newEnd) {
for(var children = oldChildren.slice(), shift = function(oldStart, oldEnd, newStart, newEnd) {
for(var i = 0; i < children.length; i += 3){
var end = children[i + 1], dSize = void 0;
-1 != end && !(oldStart > end + oldOffset) && (oldEnd >= children[i] + oldOffset ? children[i + 1] = -1 : newStart >= offset && (dSize = newEnd - newStart - (oldEnd - oldStart)) && (children[i] += dSize, children[i + 1] += dSize));
}
});
}, i = 0; i < mapping.maps.length; i++)mapping.maps[i].forEach(shift);
for(var mustRebuild = !1, i$1 = 0; i$1 < children.length; i$1 += 3)if (-1 == children[i$1 + 1]) {
var from = mapping.map(oldChildren[i$1] + oldOffset), fromLocal = from - offset;
if (fromLocal < 0 || fromLocal >= node.content.size) {

View File

@ -7,9 +7,17 @@
5215: function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
for(var browserApi, videojs$1, FakeWeakMap, _supportsPassive, EVENT_MAP, canPlayType, Vhs$1, global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8908), global_window__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__), global_document__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9144), global_document__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(global_document__WEBPACK_IMPORTED_MODULE_1__), _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(7462), _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(7326), _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(4578), safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5974), safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_2__), keycode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7537), keycode__WEBPACK_IMPORTED_MODULE_3___default = __webpack_require__.n(keycode__WEBPACK_IMPORTED_MODULE_3__), _videojs_xhr__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9603), _videojs_xhr__WEBPACK_IMPORTED_MODULE_4___default = __webpack_require__.n(_videojs_xhr__WEBPACK_IMPORTED_MODULE_4__), videojs_vtt_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3407), videojs_vtt_js__WEBPACK_IMPORTED_MODULE_5___default = __webpack_require__.n(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_5__), _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(8852), _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(136), _videojs_vhs_utils_es_resolve_url_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(779), m3u8_parser__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9323), _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2260), _videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(8485), mpd_parser__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(973), mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(4221), mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_10___default = __webpack_require__.n(mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_10__), _videojs_vhs_utils_es_id3_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8925), _videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(6185), _videojs_vhs_utils_es_byte_helpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(562), mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(1489), version$5 = "7.17.0", hooks_ = {}, hooks = function(type, fn) {
return hooks_[type] = hooks_[type] || [], fn && (hooks_[type] = hooks_[type].concat(fn)), hooks_[type];
}, hook = function(type, fn) {
hooks(type, fn);
}, removeHook = function(type, fn) {
var index = hooks(type).indexOf(fn);
return !(index <= -1) && (hooks_[type] = hooks_[type].slice(), hooks_[type].splice(index, 1), !0);
}, hookOnce = function(type, fn) {
hooks(type, [].concat(fn).map(function(original) {
return function wrapper() {
return removeHook(type, wrapper), original.apply(void 0, arguments);
};
}));
}, FullscreenApi = {
prefixed: !0
}, apiMap = [
@ -568,15 +576,15 @@
};
}, debounce = function(func, wait, immediate, context) {
void 0 === context && (context = global_window__WEBPACK_IMPORTED_MODULE_0___default());
var timeout, debounced = function() {
var timeout, cancel = function() {
context.clearTimeout(timeout), timeout = null;
}, debounced = function() {
var self1 = this, args = arguments, _later = function() {
timeout = null, _later = null, immediate || func.apply(self1, args);
};
!timeout && immediate && func.apply(self1, args), context.clearTimeout(timeout), timeout = context.setTimeout(_later, wait);
};
return debounced.cancel = function() {
context.clearTimeout(timeout), timeout = null;
}, debounced;
return debounced.cancel = cancel, debounced;
}, EventTarget$2 = function() {};
EventTarget$2.prototype.allowedEvents_ = {}, EventTarget$2.prototype.on = function(type, fn) {
var ael = this.addEventListener;
@ -1600,10 +1608,10 @@
("metadata" === settings.kind || "chapters" === settings.kind) && (mode = "hidden"), (_this = _Track.call(this, settings) || this).tech_ = settings.tech, _this.cues_ = [], _this.activeCues_ = [], _this.preload_ = !1 !== _this.tech_.preloadTextTracks;
var cues = new TextTrackCueList(_this.cues_), activeCues = new TextTrackCueList(_this.activeCues_), changed = !1, timeupdateHandler = bind((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), function() {
!(!this.tech_.isReady_ || this.tech_.isDisposed()) && (this.activeCues = this.activeCues, changed && (this.trigger("cuechange"), changed = !1));
});
return _this.tech_.one("dispose", function() {
}), disposeHandler = function() {
_this.tech_.off("timeupdate", timeupdateHandler);
}), "disabled" !== mode && _this.tech_.on("timeupdate", timeupdateHandler), Object.defineProperties((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), {
};
return _this.tech_.one("dispose", disposeHandler), "disabled" !== mode && _this.tech_.on("timeupdate", timeupdateHandler), Object.defineProperties((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), {
default: {
get: function() {
return default_;
@ -5517,10 +5525,10 @@
}, _proto.handleTechWaiting_ = function() {
var _this8 = this;
this.addClass("vjs-waiting"), this.trigger("waiting");
var timeWhenWaiting = this.currentTime();
this.on("timeupdate", function timeUpdateListener() {
var timeWhenWaiting = this.currentTime(), timeUpdateListener = function timeUpdateListener() {
timeWhenWaiting !== _this8.currentTime() && (_this8.removeClass("vjs-waiting"), _this8.off("timeupdate", timeUpdateListener));
});
};
this.on("timeupdate", timeUpdateListener);
}, _proto.handleTechCanPlay_ = function() {
this.removeClass("vjs-waiting"), this.trigger("canplay");
}, _proto.handleTechCanPlayThrough_ = function() {
@ -6020,14 +6028,14 @@
}), this.userActivity_ = !1, this.removeClass("vjs-user-active"), this.addClass("vjs-user-inactive"), this.trigger("userinactive");
}
}, _proto.listenForUserActivity_ = function() {
var mouseInProgress, lastMoveX, lastMoveY, inactivityTimeout, handleActivity = bind(this, this.reportUserActivity), handleMouseUpAndMouseLeave = function(event) {
var mouseInProgress, lastMoveX, lastMoveY, inactivityTimeout, handleActivity = bind(this, this.reportUserActivity), handleMouseMove = function(e) {
(e.screenX !== lastMoveX || e.screenY !== lastMoveY) && (lastMoveX = e.screenX, lastMoveY = e.screenY, handleActivity());
}, handleMouseDown = function() {
handleActivity(), this.clearInterval(mouseInProgress), mouseInProgress = this.setInterval(handleActivity, 250);
}, handleMouseUpAndMouseLeave = function(event) {
handleActivity(), this.clearInterval(mouseInProgress);
};
this.on("mousedown", function() {
handleActivity(), this.clearInterval(mouseInProgress), mouseInProgress = this.setInterval(handleActivity, 250);
}), this.on("mousemove", function(e) {
(e.screenX !== lastMoveX || e.screenY !== lastMoveY) && (lastMoveX = e.screenX, lastMoveY = e.screenY, handleActivity());
}), this.on("mouseup", handleMouseUpAndMouseLeave), this.on("mouseleave", handleMouseUpAndMouseLeave);
this.on("mousedown", handleMouseDown), this.on("mousemove", handleMouseMove), this.on("mouseup", handleMouseUpAndMouseLeave), this.on("mouseleave", handleMouseUpAndMouseLeave);
var controlBar = this.getChild("controlBar");
!controlBar || IS_IOS || IS_ANDROID || (controlBar.on("mouseenter", function(event) {
0 !== this.player().options_.inactivityTimeout && (this.player().cache_.inactivityTimeout = this.player().options_.inactivityTimeout), this.player().options_.inactivityTimeout = 0;
@ -6307,7 +6315,14 @@
}, Player.prototype.hasPlugin = function(name) {
return !!pluginExists(name);
};
var normalizeId = function(id) {
var extend = function(superClass, subClassMethods) {
void 0 === subClassMethods && (subClassMethods = {});
var subClass = function() {
superClass.apply(this, arguments);
}, methods = {};
for(var name in "object" == typeof subClassMethods ? (subClassMethods.constructor !== Object.prototype.constructor && (subClass = subClassMethods.constructor), methods = subClassMethods) : "function" == typeof subClassMethods && (subClass = subClassMethods), (0, _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_19__.Z)(subClass, superClass), superClass && (subClass.super_ = superClass), methods)methods.hasOwnProperty(name) && (subClass.prototype[name] = methods[name]);
return subClass;
}, normalizeId = function(id) {
return 0 === id.indexOf("#") ? id.slice(1) : id;
};
function videojs(id, options, ready) {
@ -6326,15 +6341,7 @@
return hookFunction(player);
}), player;
}
if (videojs.hooks_ = hooks_, videojs.hooks = hooks, videojs.hook = function(type, fn) {
hooks(type, fn);
}, videojs.hookOnce = function(type, fn) {
hooks(type, [].concat(fn).map(function(original) {
return function wrapper() {
return removeHook(type, wrapper), original.apply(void 0, arguments);
};
}));
}, videojs.removeHook = removeHook, !0 !== global_window__WEBPACK_IMPORTED_MODULE_0___default().VIDEOJS_NO_DYNAMIC_STYLE && isReal()) {
if (videojs.hooks_ = hooks_, videojs.hooks = hooks, videojs.hook = hook, videojs.hookOnce = hookOnce, videojs.removeHook = removeHook, !0 !== global_window__WEBPACK_IMPORTED_MODULE_0___default().VIDEOJS_NO_DYNAMIC_STYLE && isReal()) {
var style = $(".vjs-styles-defaults");
if (!style) {
style = createStyleElement("vjs-styles-defaults");
@ -6371,14 +6378,7 @@
value: TERMINATOR,
writeable: !1,
enumerable: !0
}), videojs.browser = browser, videojs.TOUCH_ENABLED = TOUCH_ENABLED, videojs.extend = function(superClass, subClassMethods) {
void 0 === subClassMethods && (subClassMethods = {});
var subClass = function() {
superClass.apply(this, arguments);
}, methods = {};
for(var name in "object" == typeof subClassMethods ? (subClassMethods.constructor !== Object.prototype.constructor && (subClass = subClassMethods.constructor), methods = subClassMethods) : "function" == typeof subClassMethods && (subClass = subClassMethods), (0, _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_19__.Z)(subClass, superClass), superClass && (subClass.super_ = superClass), methods)methods.hasOwnProperty(name) && (subClass.prototype[name] = methods[name]);
return subClass;
}, videojs.mergeOptions = mergeOptions$3, videojs.bind = bind, videojs.registerPlugin = Plugin.registerPlugin, videojs.deregisterPlugin = Plugin.deregisterPlugin, videojs.plugin = function(name, plugin) {
}), videojs.browser = browser, videojs.TOUCH_ENABLED = TOUCH_ENABLED, videojs.extend = extend, videojs.mergeOptions = mergeOptions$3, videojs.bind = bind, videojs.registerPlugin = Plugin.registerPlugin, videojs.deregisterPlugin = Plugin.deregisterPlugin, videojs.plugin = function(name, plugin) {
return log$1.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"), Plugin.registerPlugin(name, plugin);
}, videojs.getPlugins = Plugin.getPlugins, videojs.getPlugin = Plugin.getPlugin, videojs.getPluginVersion = Plugin.getPluginVersion, videojs.addLanguage = function(code, data) {
var _mergeOptions;
@ -6608,56 +6608,10 @@
expired = expired || 0;
var lastSegmentEndTime = intervalDuration(playlist, playlist.mediaSequence + playlist.segments.length, expired);
return useSafeLiveEnd && (liveEdgePadding = "number" == typeof liveEdgePadding ? liveEdgePadding : liveEdgeDelay(null, playlist), lastSegmentEndTime -= liveEdgePadding), Math.max(0, lastSegmentEndTime);
}, isBlacklisted = function(playlist) {
return playlist.excludeUntil && playlist.excludeUntil > Date.now();
}, isIncompatible = function(playlist) {
return playlist.excludeUntil && playlist.excludeUntil === 1 / 0;
}, isEnabled = function(playlist) {
var blacklisted = isBlacklisted(playlist);
return !playlist.disabled && !blacklisted;
}, hasAttribute = function(attr, playlist) {
return playlist.attributes && playlist.attributes[attr];
}, isLowestEnabledRendition = function(master, media) {
if (1 === master.playlists.length) return !0;
var currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;
return 0 === master.playlists.filter(function(playlist) {
return !!isEnabled(playlist) && (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;
}).length;
}, playlistMatch = function(a, b) {
return (!!a || !!b) && (!!a || !b) && (!a || !!b) && (a === b || !!a.id && !!b.id && a.id === b.id || !!a.resolvedUri && !!b.resolvedUri && a.resolvedUri === b.resolvedUri || !!a.uri && !!b.uri && a.uri === b.uri);
}, someAudioVariant = function(master, callback) {
var AUDIO = master && master.mediaGroups && master.mediaGroups.AUDIO || {}, found = !1;
for(var groupName in AUDIO){
for(var label in AUDIO[groupName])if (found = callback(AUDIO[groupName][label])) break;
if (found) break;
}
return !!found;
}, isAudioOnly = function(master) {
if (!master || !master.playlists || !master.playlists.length) return someAudioVariant(master, function(variant) {
return variant.playlists && variant.playlists.length || variant.uri;
});
for(var i = 0; i < master.playlists.length; i++){
var _ret = function(i) {
var playlist = master.playlists[i], CODECS = playlist.attributes && playlist.attributes.CODECS;
return CODECS && CODECS.split(",").every(function(c) {
return (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.KL)(c);
}) ? "continue" : someAudioVariant(master, function(variant) {
return playlistMatch(playlist, variant);
}) ? "continue" : {
v: !1
};
}(i);
if ("continue" !== _ret && "object" == typeof _ret) return _ret.v;
}
return !0;
}, Playlist = {
liveEdgeDelay: liveEdgeDelay,
duration: duration,
seekable: function(playlist, expired, liveEdgePadding) {
}, seekable = function(playlist, expired, liveEdgePadding) {
var seekableEnd = playlistEnd(playlist, expired, !0, liveEdgePadding);
return null === seekableEnd ? createTimeRange() : createTimeRange(expired || 0, seekableEnd);
},
getMediaInfoForTime: function(_ref4) {
}, getMediaInfoForTime = function(_ref4) {
for(var playlist = _ref4.playlist, currentTime = _ref4.currentTime, startingSegmentIndex = _ref4.startingSegmentIndex, startingPartIndex = _ref4.startingPartIndex, startTime = _ref4.startTime, experimentalExactManifestTimings = _ref4.experimentalExactManifestTimings, time = currentTime - startTime, partsAndSegments = getPartsAndSegments(playlist), startIndex = 0, i = 0; i < partsAndSegments.length; i++){
var partAndSegment = partsAndSegments[i];
if (startingSegmentIndex === partAndSegment.segmentIndex && ("number" != typeof startingPartIndex || "number" != typeof partAndSegment.partIndex || startingPartIndex === partAndSegment.partIndex)) {
@ -6717,7 +6671,55 @@
partIndex: partsAndSegments[partsAndSegments.length - 1].partIndex,
startTime: currentTime
};
},
}, isBlacklisted = function(playlist) {
return playlist.excludeUntil && playlist.excludeUntil > Date.now();
}, isIncompatible = function(playlist) {
return playlist.excludeUntil && playlist.excludeUntil === 1 / 0;
}, isEnabled = function(playlist) {
var blacklisted = isBlacklisted(playlist);
return !playlist.disabled && !blacklisted;
}, hasAttribute = function(attr, playlist) {
return playlist.attributes && playlist.attributes[attr];
}, estimateSegmentRequestTime = function(segmentDuration, bandwidth, playlist, bytesReceived) {
return (void 0 === bytesReceived && (bytesReceived = 0), hasAttribute("BANDWIDTH", playlist)) ? (segmentDuration * playlist.attributes.BANDWIDTH - 8 * bytesReceived) / bandwidth : NaN;
}, isLowestEnabledRendition = function(master, media) {
if (1 === master.playlists.length) return !0;
var currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;
return 0 === master.playlists.filter(function(playlist) {
return !!isEnabled(playlist) && (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;
}).length;
}, playlistMatch = function(a, b) {
return (!!a || !!b) && (!!a || !b) && (!a || !!b) && (a === b || !!a.id && !!b.id && a.id === b.id || !!a.resolvedUri && !!b.resolvedUri && a.resolvedUri === b.resolvedUri || !!a.uri && !!b.uri && a.uri === b.uri);
}, someAudioVariant = function(master, callback) {
var AUDIO = master && master.mediaGroups && master.mediaGroups.AUDIO || {}, found = !1;
for(var groupName in AUDIO){
for(var label in AUDIO[groupName])if (found = callback(AUDIO[groupName][label])) break;
if (found) break;
}
return !!found;
}, isAudioOnly = function(master) {
if (!master || !master.playlists || !master.playlists.length) return someAudioVariant(master, function(variant) {
return variant.playlists && variant.playlists.length || variant.uri;
});
for(var i = 0; i < master.playlists.length; i++){
var _ret = function(i) {
var playlist = master.playlists[i], CODECS = playlist.attributes && playlist.attributes.CODECS;
return CODECS && CODECS.split(",").every(function(c) {
return (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.KL)(c);
}) ? "continue" : someAudioVariant(master, function(variant) {
return playlistMatch(playlist, variant);
}) ? "continue" : {
v: !1
};
}(i);
if ("continue" !== _ret && "object" == typeof _ret) return _ret.v;
}
return !0;
}, Playlist = {
liveEdgeDelay: liveEdgeDelay,
duration: duration,
seekable: seekable,
getMediaInfoForTime: getMediaInfoForTime,
isEnabled: isEnabled,
isDisabled: function(playlist) {
return playlist.disabled;
@ -6730,9 +6732,7 @@
return !1;
},
hasAttribute: hasAttribute,
estimateSegmentRequestTime: function(segmentDuration, bandwidth, playlist, bytesReceived) {
return (void 0 === bytesReceived && (bytesReceived = 0), hasAttribute("BANDWIDTH", playlist)) ? (segmentDuration * playlist.attributes.BANDWIDTH - 8 * bytesReceived) / bandwidth : NaN;
},
estimateSegmentRequestTime: estimateSegmentRequestTime,
isLowestEnabledRendition: isLowestEnabledRendition,
isAudioOnly: isAudioOnly,
playlistMatch: playlistMatch,
@ -7157,15 +7157,15 @@
}, hexDump = function(data) {
for(var hex, ascii, bytes = Array.prototype.slice.call(data), result = "", j = 0; j < bytes.length / 16; j++)hex = bytes.slice(16 * j, 16 * j + 16).map(formatHexString).join(""), ascii = bytes.slice(16 * j, 16 * j + 16).map(formatAsciiString).join(""), result += hex + " " + ascii + "\n";
return result;
}, tagDump = function(_ref) {
return hexDump(_ref.bytes);
}, utils = Object.freeze({
__proto__: null,
createTransferableMessage: createTransferableMessage,
initSegmentId: initSegmentId,
segmentKeyId: segmentKeyId,
hexDump: hexDump,
tagDump: function(_ref) {
return hexDump(_ref.bytes);
},
tagDump: tagDump,
textRanges: function(ranges) {
var range, i, i1, result = "";
for(i1 = 0; i1 < ranges.length; i1++)result += (range = ranges, i = i1, range.start(i) + "-" + range.end(i) + " ");
@ -7267,10 +7267,10 @@
callback: callback
});
}));
var seekToTime = segment.start + mediaOffset;
tech.one("seeked", function() {
var seekToTime = segment.start + mediaOffset, seekedCallback = function() {
return callback(null, tech.currentTime());
}), pauseAfterSeek && tech.pause(), seekTo(seekToTime);
};
tech.one("seeked", seekedCallback), pauseAfterSeek && tech.pause(), seekTo(seekToTime);
}, callbackOnCompleted = function(request, cb) {
if (4 === request.readyState) return cb();
}, containerRequest = function(uri, xhr, cb) {
@ -9930,6 +9930,24 @@
var i, result = "";
for(i = start; i < end; i++)result += "%" + ("00" + bytes[i].toString(16)).slice(-2);
return result;
}, parseAacTimestamp = function(packet) {
var frameStart, frameSize, frame;
frameStart = 10, 0x40 & packet[5] && (frameStart += 4, frameStart += parseSyncSafeInteger(packet.subarray(10, 14)));
do {
if ((frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8))) < 1) break;
if ("PRIV" === String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3])) {
frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);
for(var i = 0; i < frame.byteLength; i++)if (0 === frame[i]) {
if ("com.apple.streaming.transportStreamTimestamp" === unescape(percentEncode(frame, 0, i))) {
var d = frame.subarray(i + 1), size = (0x01 & d[3]) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;
return size *= 4, size += 0x03 & d[7];
}
break;
}
}
frameStart += 10, frameStart += frameSize;
}while (frameStart < packet.byteLength)
return null;
}, utils = {
isLikelyAacData: function(data) {
var offset = function getId3Offset(data, offset) {
@ -9955,25 +9973,7 @@
}
return null;
},
parseAacTimestamp: function(packet) {
var frameStart, frameSize, frame;
frameStart = 10, 0x40 & packet[5] && (frameStart += 4, frameStart += parseSyncSafeInteger(packet.subarray(10, 14)));
do {
if ((frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8))) < 1) break;
if ("PRIV" === String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3])) {
frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);
for(var i = 0; i < frame.byteLength; i++)if (0 === frame[i]) {
if ("com.apple.streaming.transportStreamTimestamp" === unescape(percentEncode(frame, 0, i))) {
var d = frame.subarray(i + 1), size = (0x01 & d[3]) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;
return size *= 4, size += 0x03 & d[7];
}
break;
}
}
frameStart += 10, frameStart += frameSize;
}while (frameStart < packet.byteLength)
return null;
}
parseAacTimestamp: parseAacTimestamp
};
(_AacStream = function() {
var everything = new Uint8Array(), timeStamp = 0;
@ -10572,6 +10572,40 @@
}, parseAdaptionField = function(packet) {
var offset = 0;
return (0x30 & packet[3]) >>> 4 > 0x01 && (offset += packet[4] + 1), offset;
}, parseType = function(packet, pmtPid) {
var pid = parsePid(packet);
return 0 === pid ? "pat" : pid === pmtPid ? "pmt" : pmtPid ? "pes" : null;
}, parsePat = function(packet) {
var pusi = parsePayloadUnitStartIndicator(packet), offset = 4 + parseAdaptionField(packet);
return pusi && (offset += packet[offset] + 1), (0x1f & packet[offset + 10]) << 8 | packet[offset + 11];
}, parsePmt = function(packet) {
var tableEnd, programInfoLength, programMapTable = {}, pusi = parsePayloadUnitStartIndicator(packet), payloadOffset = 4 + parseAdaptionField(packet);
if (pusi && (payloadOffset += packet[payloadOffset] + 1), 0x01 & packet[payloadOffset + 5]) {
tableEnd = 3 + ((0x0f & packet[payloadOffset + 1]) << 8 | packet[payloadOffset + 2]) - 4, programInfoLength = (0x0f & packet[payloadOffset + 10]) << 8 | packet[payloadOffset + 11];
for(var offset = 12 + programInfoLength; offset < tableEnd;){
var i = payloadOffset + offset;
programMapTable[(0x1f & packet[i + 1]) << 8 | packet[i + 2]] = packet[i], offset += ((0x0f & packet[i + 3]) << 8 | packet[i + 4]) + 5;
}
return programMapTable;
}
}, parsePesType = function(packet, programMapTable) {
var type = programMapTable[parsePid(packet)];
switch(type){
case streamTypes.H264_STREAM_TYPE:
return "video";
case streamTypes.ADTS_STREAM_TYPE:
return "audio";
case streamTypes.METADATA_STREAM_TYPE:
return "timed-metadata";
default:
return null;
}
}, parsePesTime = function(packet) {
if (!parsePayloadUnitStartIndicator(packet)) return null;
var ptsDtsFlags, offset = 4 + parseAdaptionField(packet);
if (offset >= packet.byteLength) return null;
var pes = null;
return 0xc0 & (ptsDtsFlags = packet[offset + 7]) && ((pes = {}).pts = (0x0e & packet[offset + 9]) << 27 | (0xff & packet[offset + 10]) << 20 | (0xfe & packet[offset + 11]) << 12 | (0xff & packet[offset + 12]) << 5 | (0xfe & packet[offset + 13]) >>> 3, pes.pts *= 4, pes.pts += (0x06 & packet[offset + 13]) >>> 1, pes.dts = pes.pts, 0x40 & ptsDtsFlags && (pes.dts = (0x0e & packet[offset + 14]) << 27 | (0xff & packet[offset + 15]) << 20 | (0xfe & packet[offset + 16]) << 12 | (0xff & packet[offset + 17]) << 5 | (0xfe & packet[offset + 18]) >>> 3, pes.dts *= 4, pes.dts += (0x06 & packet[offset + 18]) >>> 1)), pes;
}, parseNalUnitType = function(type) {
switch(type){
case 0x05:
@ -10587,49 +10621,7 @@
default:
return null;
}
}, handleRollover = timestampRolloverStream.handleRollover, probe = {};
probe.ts = {
parseType: function(packet, pmtPid) {
var pid = parsePid(packet);
return 0 === pid ? "pat" : pid === pmtPid ? "pmt" : pmtPid ? "pes" : null;
},
parsePat: function(packet) {
var pusi = parsePayloadUnitStartIndicator(packet), offset = 4 + parseAdaptionField(packet);
return pusi && (offset += packet[offset] + 1), (0x1f & packet[offset + 10]) << 8 | packet[offset + 11];
},
parsePmt: function(packet) {
var tableEnd, programInfoLength, programMapTable = {}, pusi = parsePayloadUnitStartIndicator(packet), payloadOffset = 4 + parseAdaptionField(packet);
if (pusi && (payloadOffset += packet[payloadOffset] + 1), 0x01 & packet[payloadOffset + 5]) {
tableEnd = 3 + ((0x0f & packet[payloadOffset + 1]) << 8 | packet[payloadOffset + 2]) - 4, programInfoLength = (0x0f & packet[payloadOffset + 10]) << 8 | packet[payloadOffset + 11];
for(var offset = 12 + programInfoLength; offset < tableEnd;){
var i = payloadOffset + offset;
programMapTable[(0x1f & packet[i + 1]) << 8 | packet[i + 2]] = packet[i], offset += ((0x0f & packet[i + 3]) << 8 | packet[i + 4]) + 5;
}
return programMapTable;
}
},
parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,
parsePesType: function(packet, programMapTable) {
var type = programMapTable[parsePid(packet)];
switch(type){
case streamTypes.H264_STREAM_TYPE:
return "video";
case streamTypes.ADTS_STREAM_TYPE:
return "audio";
case streamTypes.METADATA_STREAM_TYPE:
return "timed-metadata";
default:
return null;
}
},
parsePesTime: function(packet) {
if (!parsePayloadUnitStartIndicator(packet)) return null;
var ptsDtsFlags, offset = 4 + parseAdaptionField(packet);
if (offset >= packet.byteLength) return null;
var pes = null;
return 0xc0 & (ptsDtsFlags = packet[offset + 7]) && ((pes = {}).pts = (0x0e & packet[offset + 9]) << 27 | (0xff & packet[offset + 10]) << 20 | (0xfe & packet[offset + 11]) << 12 | (0xff & packet[offset + 12]) << 5 | (0xfe & packet[offset + 13]) >>> 3, pes.pts *= 4, pes.pts += (0x06 & packet[offset + 13]) >>> 1, pes.dts = pes.pts, 0x40 & ptsDtsFlags && (pes.dts = (0x0e & packet[offset + 14]) << 27 | (0xff & packet[offset + 15]) << 20 | (0xfe & packet[offset + 16]) << 12 | (0xff & packet[offset + 17]) << 5 | (0xfe & packet[offset + 18]) >>> 3, pes.dts *= 4, pes.dts += (0x06 & packet[offset + 18]) >>> 1)), pes;
},
videoPacketContainsKeyFrame: function(packet) {
}, videoPacketContainsKeyFrame = function(packet) {
for(var offset = 4 + parseAdaptionField(packet), frameBuffer = packet.subarray(offset), frameI = 0, frameSyncPoint = 0, foundKeyFrame = !1; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++)if (1 === frameBuffer[frameSyncPoint + 2]) {
frameI = frameSyncPoint + 5;
break;
@ -10660,7 +10652,15 @@
frameI += 3;
}
return frameBuffer = frameBuffer.subarray(frameSyncPoint), frameI -= frameSyncPoint, frameSyncPoint = 0, frameBuffer && frameBuffer.byteLength > 3 && "slice_layer_without_partitioning_rbsp_idr" === parseNalUnitType(0x1f & frameBuffer[frameSyncPoint + 3]) && (foundKeyFrame = !0), foundKeyFrame;
}
}, handleRollover = timestampRolloverStream.handleRollover, probe = {};
probe.ts = {
parseType: parseType,
parsePat: parsePat,
parsePmt: parsePmt,
parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,
parsePesType: parsePesType,
parsePesTime: parsePesTime,
videoPacketContainsKeyFrame: videoPacketContainsKeyFrame
}, probe.aac = utils;
var ONE_SECOND_IN_TS = clock.ONE_SECOND_IN_TS, MP2T_PACKET_LENGTH = 188, parsePsi_ = function(bytes, pmt) {
for(var packet, startIndex = 0, endIndex = MP2T_PACKET_LENGTH; endIndex < bytes.byteLength;){
@ -11008,15 +11008,15 @@
}, processTransmux = function(options) {
var transmuxer = options.transmuxer, bytes = options.bytes, audioAppendStart = options.audioAppendStart, gopsToAlignWith = options.gopsToAlignWith, remux = options.remux, onData = options.onData, onTrackInfo = options.onTrackInfo, onAudioTimingInfo = options.onAudioTimingInfo, onVideoTimingInfo = options.onVideoTimingInfo, onVideoSegmentTimingInfo = options.onVideoSegmentTimingInfo, onAudioSegmentTimingInfo = options.onAudioSegmentTimingInfo, onId3 = options.onId3, onCaptions = options.onCaptions, onDone = options.onDone, onEndedTimeline = options.onEndedTimeline, onTransmuxerLog = options.onTransmuxerLog, isEndOfTimeline = options.isEndOfTimeline, transmuxedData = {
buffer: []
}, waitForEndedTimelineEvent = isEndOfTimeline;
if (transmuxer.onmessage = function(event) {
}, waitForEndedTimelineEvent = isEndOfTimeline, handleMessage = function(event) {
transmuxer.currentTransmux === options && ("data" === event.data.action && handleData_(event, transmuxedData, onData), "trackinfo" === event.data.action && onTrackInfo(event.data.trackInfo), "gopInfo" === event.data.action && handleGopInfo_(event, transmuxedData), "audioTimingInfo" === event.data.action && onAudioTimingInfo(event.data.audioTimingInfo), "videoTimingInfo" === event.data.action && onVideoTimingInfo(event.data.videoTimingInfo), "videoSegmentTimingInfo" === event.data.action && onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo), "audioSegmentTimingInfo" === event.data.action && onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo), "id3Frame" === event.data.action && onId3([
event.data.id3Frame
], event.data.id3Frame.dispatchType), "caption" === event.data.action && onCaptions(event.data.caption), "endedtimeline" === event.data.action && (waitForEndedTimelineEvent = !1, onEndedTimeline()), "log" === event.data.action && onTransmuxerLog(event.data.log), "transmuxed" !== event.data.type || waitForEndedTimelineEvent || (transmuxer.onmessage = null, handleDone_({
transmuxedData: transmuxedData,
callback: onDone
}), dequeue(transmuxer)));
}, audioAppendStart && transmuxer.postMessage({
};
if (transmuxer.onmessage = handleMessage, audioAppendStart && transmuxer.postMessage({
action: "setAudioAppendStart",
appendStart: audioAppendStart
}), Array.isArray(gopsToAlignWith) && transmuxer.postMessage({
@ -11053,21 +11053,17 @@
return;
}
transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action));
}, reset = function(transmuxer) {
enqueueAction("reset", transmuxer);
}, endTimeline = function(transmuxer) {
enqueueAction("endTimeline", transmuxer);
}, transmux = function(options) {
if (!options.transmuxer.currentTransmux) {
options.transmuxer.currentTransmux = options, processTransmux(options);
return;
}
options.transmuxer.transmuxQueue.push(options);
}, segmentTransmuxer = {
reset: function(transmuxer) {
enqueueAction("reset", transmuxer);
},
endTimeline: function(transmuxer) {
enqueueAction("endTimeline", transmuxer);
},
transmux: transmux,
createTransmuxer: function(options) {
}, createTransmuxer = function(options) {
var transmuxer = new TransmuxWorker();
transmuxer.currentTransmux = null, transmuxer.transmuxQueue = [];
var term = transmuxer.terminate;
@ -11077,16 +11073,20 @@
action: "init",
options: options
}), transmuxer;
}
}, segmentTransmuxer = {
reset: reset,
endTimeline: endTimeline,
transmux: transmux,
createTransmuxer: createTransmuxer
}, workerCallback = function(options) {
var transmuxer = options.transmuxer, endAction = options.endAction || options.action, callback = options.callback, message = (0, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_15__.Z)({}, options, {
endAction: null,
transmuxer: null,
callback: null
});
if (transmuxer.addEventListener("message", function listenForEndEvent(event) {
}), listenForEndEvent = function listenForEndEvent(event) {
event.data.action === endAction && (transmuxer.removeEventListener("message", listenForEndEvent), event.data.data && (event.data.data = new Uint8Array(event.data.data, options.byteOffset || 0, options.byteLength || event.data.data.byteLength), options.data && (options.data = event.data.data)), callback(event.data));
}), options.data) {
};
if (transmuxer.addEventListener("message", listenForEndEvent), options.data) {
var isArrayBuffer = options.data instanceof ArrayBuffer;
message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset, message.byteLength = options.data.byteLength;
var transfers = [
@ -11323,14 +11323,14 @@
onTransmuxerLog: onTransmuxerLog
});
}, decrypt = function(_ref7, callback) {
var keyBytes, id = _ref7.id, key = _ref7.key, encryptedBytes = _ref7.encryptedBytes, decryptionWorker = _ref7.decryptionWorker;
decryptionWorker.addEventListener("message", function decryptionHandler(event) {
var keyBytes, id = _ref7.id, key = _ref7.key, encryptedBytes = _ref7.encryptedBytes, decryptionWorker = _ref7.decryptionWorker, decryptionHandler = function decryptionHandler(event) {
if (event.data.source === id) {
decryptionWorker.removeEventListener("message", decryptionHandler);
var decrypted = event.data.decrypted;
callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));
}
}), keyBytes = key.bytes.slice ? key.bytes.slice() : new Uint32Array(Array.prototype.slice.call(key.bytes)), decryptionWorker.postMessage(createTransferableMessage({
};
decryptionWorker.addEventListener("message", decryptionHandler), keyBytes = key.bytes.slice ? key.bytes.slice() : new Uint32Array(Array.prototype.slice.call(key.bytes)), decryptionWorker.postMessage(createTransferableMessage({
source: id,
encrypted: encryptedBytes,
key: keyBytes,
@ -11561,6 +11561,9 @@
}, comparePlaylistBandwidth = function(left, right) {
var leftBandwidth, rightBandwidth;
return left.attributes.BANDWIDTH && (leftBandwidth = left.attributes.BANDWIDTH), leftBandwidth = leftBandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, right.attributes.BANDWIDTH && (rightBandwidth = right.attributes.BANDWIDTH), rightBandwidth = rightBandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, leftBandwidth - rightBandwidth;
}, comparePlaylistResolution = function(left, right) {
var leftWidth, rightWidth;
return (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width && (leftWidth = left.attributes.RESOLUTION.width), leftWidth = leftWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, right.attributes.RESOLUTION && right.attributes.RESOLUTION.width && (rightWidth = right.attributes.RESOLUTION.width), rightWidth = rightWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) ? left.attributes.BANDWIDTH - right.attributes.BANDWIDTH : leftWidth - rightWidth;
}, simpleSelector = function(master, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions, masterPlaylistController) {
if (master) {
var resolutionPlusOneList, resolutionPlusOneSmallest, resolutionPlusOneRep, leastPixelDiffRep, options = {
@ -11640,6 +11643,13 @@
}, lastBandwidthSelector = function() {
var pixelRatio = this.useDevicePixelRatio && global_window__WEBPACK_IMPORTED_MODULE_0___default().devicePixelRatio || 1;
return simpleSelector(this.playlists.master, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), "width"), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), "height"), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.masterPlaylistController_);
}, movingAverageBandwidthSelector = function(decay) {
var average = -1, lastSystemBandwidth = -1;
if (decay < 0 || decay > 1) throw Error("Moving average bandwidth decay must be between 0 and 1.");
return function() {
var pixelRatio = this.useDevicePixelRatio && global_window__WEBPACK_IMPORTED_MODULE_0___default().devicePixelRatio || 1;
return average < 0 && (average = this.systemBandwidth, lastSystemBandwidth = this.systemBandwidth), this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth && (average = decay * this.systemBandwidth + (1 - decay) * average, lastSystemBandwidth = this.systemBandwidth), simpleSelector(this.playlists.master, average, parseInt(safeGetComputedStyle(this.tech_.el(), "width"), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), "height"), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.masterPlaylistController_);
};
}, minRebufferMaxBandwidthSelector = function(settings) {
var master = settings.master, currentTime = settings.currentTime, bandwidth = settings.bandwidth, duration = settings.duration, segmentDuration = settings.segmentDuration, timeUntilRebuffer = settings.timeUntilRebuffer, currentTimeline = settings.currentTimeline, syncController = settings.syncController, compatiblePlaylists = master.playlists.filter(function(playlist) {
return !Playlist.isIncompatible(playlist);
@ -11661,6 +11671,13 @@
}), noRebufferingPlaylists.length) ? noRebufferingPlaylists[0] : (stableSort(rebufferingEstimates, function(a, b) {
return a.rebufferingImpact - b.rebufferingImpact;
}), rebufferingEstimates[0] || null);
}, lowestBitrateCompatibleVariantSelector = function() {
var _this = this, playlists = this.playlists.master.playlists.filter(Playlist.isEnabled);
return stableSort(playlists, function(a, b) {
return comparePlaylistBandwidth(a, b);
}), playlists.filter(function(playlist) {
return !!codecsForPlaylist(_this.playlists.master, playlist).video;
})[0] || null;
}, concatSegments = function(segmentObj) {
var tempBuffer, offset = 0;
return segmentObj.bytes && (tempBuffer = new Uint8Array(segmentObj.bytes), segmentObj.segments.forEach(function(segment) {
@ -13774,7 +13791,9 @@
"mediaTransferDuration",
"mediaBytesTransferred",
"mediaAppends",
], shouldSwitchToMedia = function(_ref) {
], sumLoaderStat = function(stat) {
return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];
}, shouldSwitchToMedia = function(_ref) {
var currentPlaylist = _ref.currentPlaylist, buffered = _ref.buffered, currentTime = _ref.currentTime, nextPlaylist = _ref.nextPlaylist, bufferLowWaterLine = _ref.bufferLowWaterLine, bufferHighWaterLine = _ref.bufferHighWaterLine, duration = _ref.duration, experimentalBufferBasedABR = _ref.experimentalBufferBasedABR, log = _ref.log;
if (!nextPlaylist) return videojs.log.warn("We received no playlist to switch to. Please check your stream."), !1;
var sharedLogLine = "allowing switch " + (currentPlaylist && currentPlaylist.id || "null") + " -> " + nextPlaylist.id;
@ -13855,9 +13874,7 @@
}), _this.tech_.on("play", function() {
return _this.startABRTimer_();
})), loaderStats.forEach(function(stat) {
_this[stat + "_"] = (function(stat) {
return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];
}).bind((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), stat);
_this[stat + "_"] = sumLoaderStat.bind((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), stat);
}), _this.logger_ = logger("MPC"), _this.triggeredFmp4Usage = !1, "none" === _this.tech_.preload() ? (_this.loadOnPlay_ = function() {
_this.loadOnPlay_ = null, _this.masterPlaylistLoader_.load();
}, _this.tech_.one("play", _this.loadOnPlay_)) : _this.masterPlaylistLoader_.load(), _this.timeToLoadedData__ = -1, _this.mainAppendsToLoadedData__ = -1, _this.audioAppendsToLoadedData__ = -1;
@ -14640,37 +14657,22 @@
return lastCalled = Date.now(), localOptions.getSource.call(player, setSource);
}, cleanupEvents = function cleanupEvents() {
player.off("loadedmetadata", loadedMetadataHandler), player.off("error", errorHandler), player.off("dispose", cleanupEvents);
};
player.on("error", errorHandler), player.on("dispose", cleanupEvents), player.reloadSourceOnError = function(newOptions) {
}, reinitPlugin = function(newOptions) {
cleanupEvents(), initPlugin(player, newOptions);
};
player.on("error", errorHandler), player.on("dispose", cleanupEvents), player.reloadSourceOnError = reinitPlugin;
}, reloadSourceOnError = function(options) {
initPlugin(this, options);
}, version$4 = "2.12.0", Vhs = {
PlaylistLoader: PlaylistLoader,
Playlist: Playlist,
utils: utils,
STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,
INITIAL_PLAYLIST_SELECTOR: function() {
var _this = this, playlists = this.playlists.master.playlists.filter(Playlist.isEnabled);
return stableSort(playlists, function(a, b) {
return comparePlaylistBandwidth(a, b);
}), playlists.filter(function(playlist) {
return !!codecsForPlaylist(_this.playlists.master, playlist).video;
})[0] || null;
},
INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,
lastBandwidthSelector: lastBandwidthSelector,
movingAverageBandwidthSelector: function(decay) {
var average = -1, lastSystemBandwidth = -1;
if (decay < 0 || decay > 1) throw Error("Moving average bandwidth decay must be between 0 and 1.");
return function() {
var pixelRatio = this.useDevicePixelRatio && global_window__WEBPACK_IMPORTED_MODULE_0___default().devicePixelRatio || 1;
return average < 0 && (average = this.systemBandwidth, lastSystemBandwidth = this.systemBandwidth), this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth && (average = decay * this.systemBandwidth + (1 - decay) * average, lastSystemBandwidth = this.systemBandwidth), simpleSelector(this.playlists.master, average, parseInt(safeGetComputedStyle(this.tech_.el(), "width"), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), "height"), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.masterPlaylistController_);
};
},
movingAverageBandwidthSelector: movingAverageBandwidthSelector,
comparePlaylistBandwidth: comparePlaylistBandwidth,
comparePlaylistResolution: function(left, right) {
var leftWidth, rightWidth;
return (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width && (leftWidth = left.attributes.RESOLUTION.width), leftWidth = leftWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, right.attributes.RESOLUTION && right.attributes.RESOLUTION.width && (rightWidth = right.attributes.RESOLUTION.width), rightWidth = rightWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) ? left.attributes.BANDWIDTH - right.attributes.BANDWIDTH : leftWidth - rightWidth;
},
comparePlaylistResolution: comparePlaylistResolution,
xhr: xhrFactory()
};
Object.keys(Config).forEach(function(prop) {
@ -15210,9 +15212,7 @@
return videojs.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."), Vhs;
},
configurable: !0
}), videojs.use || (videojs.registerComponent("Hls", Vhs), videojs.registerComponent("Vhs", Vhs)), videojs.options.vhs = videojs.options.vhs || {}, videojs.options.hls = videojs.options.hls || {}, videojs.getPlugin && videojs.getPlugin("reloadSourceOnError") || (videojs.registerPlugin || videojs.plugin)("reloadSourceOnError", function(options) {
initPlugin(this, options);
}), __webpack_exports__.Z = videojs;
}), videojs.use || (videojs.registerComponent("Hls", Vhs), videojs.registerComponent("Vhs", Vhs)), videojs.options.vhs = videojs.options.vhs || {}, videojs.options.hls = videojs.options.hls || {}, videojs.getPlugin && videojs.getPlugin("reloadSourceOnError") || (videojs.registerPlugin || videojs.plugin)("reloadSourceOnError", reloadSourceOnError), __webpack_exports__.Z = videojs;
}
},
]);

View File

@ -774,8 +774,7 @@
},
779: function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
var url_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9945), url_toolkit__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_0__), global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8908), global_window__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__), DEFAULT_LOCATION = "http://example.com";
__webpack_exports__.Z = function(baseUrl, relativeUrl) {
var url_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9945), url_toolkit__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_0__), global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8908), global_window__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__), DEFAULT_LOCATION = "http://example.com", resolveUrl = function(baseUrl, relativeUrl) {
if (/^[a-z]+:/i.test(relativeUrl)) return relativeUrl;
/^data:/.test(baseUrl) && (baseUrl = global_window__WEBPACK_IMPORTED_MODULE_1___default().location && global_window__WEBPACK_IMPORTED_MODULE_1___default().location.href || "");
var nativeURL = "function" == typeof global_window__WEBPACK_IMPORTED_MODULE_1___default().URL, protocolLess = /^\/\//.test(baseUrl), removeLocation = !global_window__WEBPACK_IMPORTED_MODULE_1___default().location && !/\/\//i.test(baseUrl);
@ -785,11 +784,11 @@
}
return url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL(baseUrl, relativeUrl);
};
__webpack_exports__.Z = resolveUrl;
},
3490: function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var window1 = __webpack_require__(8908);
module.exports = function(callback, decodeResponseBody) {
var window1 = __webpack_require__(8908), httpResponseHandler = function(callback, decodeResponseBody) {
return void 0 === decodeResponseBody && (decodeResponseBody = !1), function(err, response, responseBody) {
if (err) {
callback(err);
@ -799,10 +798,7 @@
var cause = responseBody;
if (decodeResponseBody) {
if (window1.TextDecoder) {
var contentTypeHeader, charset = (void 0 === (contentTypeHeader = response.headers && response.headers["content-type"]) && (contentTypeHeader = ""), contentTypeHeader.toLowerCase().split(";").reduce(function(charset, contentType) {
var _contentType$split = contentType.split("="), type = _contentType$split[0], value = _contentType$split[1];
return "charset" === type.trim() ? value.trim() : charset;
}, "utf-8"));
var charset = getCharset(response.headers && response.headers["content-type"]);
try {
cause = new TextDecoder(charset).decode(responseBody);
} catch (e) {}
@ -816,6 +812,13 @@
callback(null, responseBody);
};
};
function getCharset(contentTypeHeader) {
return void 0 === contentTypeHeader && (contentTypeHeader = ""), contentTypeHeader.toLowerCase().split(";").reduce(function(charset, contentType) {
var _contentType$split = contentType.split("="), type = _contentType$split[0], value = _contentType$split[1];
return "charset" === type.trim() ? value.trim() : charset;
}, "utf-8");
}
module.exports = httpResponseHandler;
},
9603: function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
@ -2679,10 +2682,10 @@
}), !0;
});
}, _proto.addTagMapper = function(_ref2) {
var expression = _ref2.expression, map = _ref2.map;
this.tagMappers.push(function(line) {
var expression = _ref2.expression, map = _ref2.map, mapFn = function(line) {
return expression.test(line) ? map(line) : line;
});
};
this.tagMappers.push(mapFn);
}, ParseStream;
}(Stream), camelCase = function(str) {
return str.toLowerCase().replace(/-(\w)/g, function(a) {
@ -3634,7 +3637,7 @@
};
},
4221: function(module) {
module.exports = function(data) {
var parseSidx = function(data) {
var view = new DataView(data.buffer, data.byteOffset, data.byteLength), result = {
version: data[0],
flags: new Uint8Array(data.subarray(1, 4)),
@ -3654,6 +3657,7 @@
});
return result;
};
module.exports = parseSidx;
},
1489: function(module) {
var secondsToVideoTs, secondsToAudioTs, videoTsToSeconds, audioTsToSeconds, audioTsToVideoTs, videoTsToAudioTs, metadataTsToSeconds;
@ -3699,7 +3703,7 @@
});
var jsx_runtime = __webpack_require__(5893), react = __webpack_require__(7294), Home_module = __webpack_require__(214), Home_module_default = __webpack_require__.n(Home_module), video_es = __webpack_require__(5215);
__webpack_require__(3512);
var components_VideoJS = function(props) {
var VideoJS = function(props) {
var videoRef = react.useRef(null), playerRef = react.useRef(null), options = props.options, onReady = props.onReady;
return react.useEffect(function() {
if (!playerRef.current) {
@ -3726,9 +3730,15 @@
className: "video-js vjs-big-play-centered"
})
});
};
}, components_VideoJS = VideoJS;
function Home() {
var playerRef = (0, react.useRef)(null);
var playerRef = (0, react.useRef)(null), handlePlayerReady = function(player) {
playerRef.current = player, player.on("waiting", function() {
console.log("player is waiting");
}), player.on("dispose", function() {
console.log("player will dispose");
});
};
return (0, jsx_runtime.jsx)("div", {
className: Home_module_default().container,
children: (0, jsx_runtime.jsx)("main", {
@ -3746,13 +3756,7 @@
},
]
},
onReady: function(player) {
playerRef.current = player, player.on("waiting", function() {
console.log("player is waiting");
}), player.on("dispose", function() {
console.log("player will dispose");
});
}
onReady: handlePlayerReady
})
})
});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -546,7 +546,9 @@
"module"
], function(require, exports, module) {
"use strict";
var Range = function(startRow, startColumn, endRow, endColumn) {
var comparePoints = function(p1, p2) {
return p1.row - p2.row || p1.column - p2.column;
}, Range = function(startRow, startColumn, endRow, endColumn) {
this.start = {
row: startRow,
column: startColumn
@ -640,9 +642,7 @@
};
}).call(Range.prototype), Range.fromPoints = function(start, end) {
return new Range(start.row, start.column, end.row, end.column);
}, Range.comparePoints = function(p1, p2) {
return p1.row - p2.row || p1.column - p2.column;
}, Range.comparePoints = function(p1, p2) {
}, Range.comparePoints = comparePoints, Range.comparePoints = function(p1, p2) {
return p1.row - p2.row || p1.column - p2.column;
}, exports.Range = Range;
}), ace.define("ace/lib/lang", [
@ -759,8 +759,7 @@
"ace/lib/keys",
], function(require, exports, module) {
"use strict";
var event = require("../lib/event"), useragent = require("../lib/useragent"), dom = require("../lib/dom"), lang = require("../lib/lang"), clipboard = require("../clipboard"), BROKEN_SETDATA = useragent.isChrome < 18, USE_IE_MIME_TYPE = useragent.isIE, HAS_FOCUS_ARGS = useragent.isChrome > 63, KEYS = require("../lib/keys"), MODS = KEYS.KEY_MODS, isIOS = useragent.isIOS, valueResetRegex = isIOS ? /\s/ : /\n/, isMobile = useragent.isMobile;
exports.TextInput = function(parentNode, host) {
var event = require("../lib/event"), useragent = require("../lib/useragent"), dom = require("../lib/dom"), lang = require("../lib/lang"), clipboard = require("../clipboard"), BROKEN_SETDATA = useragent.isChrome < 18, USE_IE_MIME_TYPE = useragent.isIE, HAS_FOCUS_ARGS = useragent.isChrome > 63, KEYS = require("../lib/keys"), MODS = KEYS.KEY_MODS, isIOS = useragent.isIOS, valueResetRegex = isIOS ? /\s/ : /\n/, isMobile = useragent.isMobile, TextInput = function(parentNode, host) {
var closeTimeout, text = dom.createElement("textarea");
text.className = "ace_text-input", text.setAttribute("wrap", "off"), text.setAttribute("autocorrect", "off"), text.setAttribute("autocapitalize", "off"), text.setAttribute("spellcheck", !1), text.style.opacity = "0", parentNode.insertBefore(text, parentNode.firstChild);
var copied = !1, pasted = !1, inComposition = !1, sendingText = !1, tempStyle = "";
@ -840,7 +839,15 @@
}
};
this.resetSelection = resetSelection, isFocused && host.onFocus();
var inputHandler = null;
var onSelect = function(e) {
if (!inComposition) {
if (copied) copied = !1;
else {
var text1;
0 === (text1 = text).selectionStart && text1.selectionEnd >= lastValue.length && text1.value === lastValue && lastValue && text1.selectionEnd !== lastSelectionEnd ? (host.selectAll(), resetSelection()) : isMobile && text.selectionStart != lastSelectionStart && resetSelection();
}
}
}, inputHandler = null;
this.setInputHandler = function(cb) {
inputHandler = cb;
}, this.getInputHandler = function() {
@ -896,15 +903,7 @@
var data = handleClipboardData(e);
clipboard.pasteCancelled() || ("string" == typeof data ? (data && host.onPaste(data, e), useragent.isIE && setTimeout(resetSelection), event.preventDefault(e)) : (text.value = "", pasted = !0));
};
event.addCommandKeyListener(text, host.onCommandKey.bind(host), host), event.addListener(text, "select", function(e) {
if (!inComposition) {
if (copied) copied = !1;
else {
var text1;
0 === (text1 = text).selectionStart && text1.selectionEnd >= lastValue.length && text1.value === lastValue && lastValue && text1.selectionEnd !== lastSelectionEnd ? (host.selectAll(), resetSelection()) : isMobile && text.selectionStart != lastSelectionStart && resetSelection();
}
}
}, host), event.addListener(text, "input", onInput, host), event.addListener(text, "cut", onCut, host), event.addListener(text, "copy", onCopy, host), event.addListener(text, "paste", onPaste, host), "oncut" in text && "oncopy" in text && "onpaste" in text || event.addListener(parentNode, "keydown", function(e) {
event.addCommandKeyListener(text, host.onCommandKey.bind(host), host), event.addListener(text, "select", onSelect, host), event.addListener(text, "input", onInput, host), event.addListener(text, "cut", onCut, host), event.addListener(text, "copy", onCopy, host), event.addListener(text, "paste", onPaste, host), "oncut" in text && "oncopy" in text && "onpaste" in text || event.addListener(parentNode, "keydown", function(e) {
if ((!useragent.isMac || e.metaKey) && e.ctrlKey) switch(e.keyCode){
case 67:
onCopy(e);
@ -916,7 +915,13 @@
onCut(e);
}
}, host);
var onCompositionUpdate = function() {
var onCompositionStart = function(e) {
if (!inComposition && host.onCompositionStart && !host.$readOnly && (inComposition = {}, !commandMode)) {
e.data && (inComposition.useTextareaForIME = !1), setTimeout(onCompositionUpdate, 0), host._signal("compositionStart"), host.on("mousedown", cancelComposition);
var range = host.getSelectionRange();
range.end.row = range.start.row, range.end.column = range.start.column, inComposition.markerRange = range, inComposition.selectionStart = lastSelectionStart, host.onCompositionStart(inComposition), inComposition.useTextareaForIME ? (lastValue = text.value = "", lastSelectionStart = 0, lastSelectionEnd = 0) : (text.msGetInputContext && (inComposition.context = text.msGetInputContext()), text.getInputContext && (inComposition.context = text.getInputContext()));
}
}, onCompositionUpdate = function() {
if (inComposition && host.onCompositionUpdate && !host.$readOnly) {
if (commandMode) return cancelComposition();
inComposition.useTextareaForIME ? host.onCompositionUpdate(text.value) : (sendText(text.value), inComposition.markerRange && (inComposition.context && (inComposition.markerRange.start.column = inComposition.selectionStart = inComposition.context.compositionStartOffset), inComposition.markerRange.end.column = inComposition.markerRange.start.column + lastSelectionEnd - inComposition.selectionStart + lastRestoreEnd));
@ -933,13 +938,7 @@
tempStyle && (text.style.cssText = tempStyle, tempStyle = ""), host.renderer.$isMousePressed = !1, host.renderer.$keepTextAreaAtCursor && host.renderer.$moveTextAreaToCursor();
}, 0);
}
event.addListener(text, "compositionstart", function(e) {
if (!inComposition && host.onCompositionStart && !host.$readOnly && (inComposition = {}, !commandMode)) {
e.data && (inComposition.useTextareaForIME = !1), setTimeout(onCompositionUpdate, 0), host._signal("compositionStart"), host.on("mousedown", cancelComposition);
var range = host.getSelectionRange();
range.end.row = range.start.row, range.end.column = range.start.column, inComposition.markerRange = range, inComposition.selectionStart = lastSelectionStart, host.onCompositionStart(inComposition), inComposition.useTextareaForIME ? (lastValue = text.value = "", lastSelectionStart = 0, lastSelectionEnd = 0) : (text.msGetInputContext && (inComposition.context = text.msGetInputContext()), text.getInputContext && (inComposition.context = text.getInputContext()));
}
}, host), event.addListener(text, "compositionupdate", onCompositionUpdate, host), event.addListener(text, "keyup", function(e) {
event.addListener(text, "compositionstart", onCompositionStart, host), event.addListener(text, "compositionupdate", onCompositionUpdate, host), event.addListener(text, "keyup", function(e) {
27 == e.keyCode && text.value.length < text.selectionStart && (inComposition || (lastValue = text.value), lastSelectionStart = lastSelectionEnd = -1, resetSelection()), syncComposition();
}, host), event.addListener(text, "keydown", syncComposition, host), event.addListener(text, "compositionend", onCompositionEnd, host), this.getElement = function() {
return text;
@ -985,7 +984,8 @@
}, document.addEventListener("selectionchange", detectArrowKeys), host1.on("destroy", function() {
document.removeEventListener("selectionchange", detectArrowKeys);
}));
}, exports.$setUserAgentForTests = function(_isMobile, _isIOS) {
};
exports.TextInput = TextInput, exports.$setUserAgentForTests = function(_isMobile, _isIOS) {
isMobile = _isMobile, isIOS = _isIOS;
};
}), ace.define("ace/mouse/default_handlers", [
@ -3073,7 +3073,13 @@
this.$embeds || (this.$embeds = []), this.$embeds.push(prefix);
}, this.getEmbeds = function() {
return this.$embeds;
}, this.normalizeRules = function() {
};
var pushState = function(currentState, stack) {
return ("start" != currentState || stack.length) && stack.unshift(this.nextState, currentState), this.nextState;
}, popState = function(currentState, stack) {
return stack.shift(), stack.shift() || "start";
};
this.normalizeRules = function() {
var id = 0, rules = this.$rules;
function processState(key) {
var state = rules[key];
@ -3091,12 +3097,8 @@
if (next && Array.isArray(next)) {
var stateName = rule.stateName;
!stateName && ("string" != typeof (stateName = rule.token) && (stateName = stateName[0] || ""), rules[stateName] && (stateName += id++)), rules[stateName] = next, rule.next = stateName, processState(stateName);
} else "pop" == next && (rule.next = function(currentState, stack) {
return stack.shift(), stack.shift() || "start";
});
if (rule.push && (rule.nextState = rule.next || rule.push, rule.next = function(currentState, stack) {
return ("start" != currentState || stack.length) && stack.unshift(this.nextState, currentState), this.nextState;
}, delete rule.push), rule.rules) for(var r in rule.rules)rules[r] ? rules[r].push && rules[r].push.apply(rules[r], rule.rules[r]) : rules[r] = rule.rules[r];
} else "pop" == next && (rule.next = popState);
if (rule.push && (rule.nextState = rule.next || rule.push, rule.next = pushState, delete rule.push), rule.rules) for(var r in rule.rules)rules[r] ? rules[r].push && rules[r].push.apply(rules[r], rule.rules[r]) : rules[r] = rule.rules[r];
var includeName = "string" == typeof rule ? rule : rule.include;
if (includeName && (toInsert = Array.isArray(includeName) ? includeName.map(function(x) {
return rules[x];
@ -11167,7 +11169,8 @@ margin: 0 10px;\
data: q
}));
};
}).call(WorkerClient.prototype), exports.UIWorkerClient = function(topLevelNamespaces, mod, classname) {
}).call(WorkerClient.prototype);
var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
var main = null, emitSync = !1, sender = Object.create(EventEmitter), messageBuffer = [], workerClient = new WorkerClient({
messageBuffer: messageBuffer,
terminate: function() {},
@ -11204,7 +11207,8 @@ margin: 0 10px;\
], function(Main) {
for(main = new Main[classname](sender); messageBuffer.length;)processNext();
}), workerClient;
}, exports.WorkerClient = WorkerClient, exports.createWorker = createWorker;
};
exports.UIWorkerClient = UIWorkerClient, exports.WorkerClient = WorkerClient, exports.createWorker = createWorker;
}), ace.define("ace/placeholder", [
"require",
"exports",

File diff suppressed because it is too large Load Diff

View File

@ -3457,7 +3457,20 @@
},
9996: function(module) {
"use strict";
var isMergeableObject = function(value) {
return isNonNullObject(value) && !isSpecial(value);
};
function isNonNullObject(value) {
return !!value && "object" == typeof value;
}
function isSpecial(value) {
var stringValue = Object.prototype.toString.call(value);
return "[object RegExp]" === stringValue || "[object Date]" === stringValue || isReactElement(value);
}
var REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol.for ? Symbol.for("react.element") : 0xeac7;
function isReactElement(value) {
return value.$$typeof === REACT_ELEMENT_TYPE;
}
function cloneUnlessOtherwiseSpecified(value, options) {
return !1 !== options.clone && options.isMergeableObject(value) ? deepmerge(Array.isArray(value) ? [] : {}, value, options) : value;
}
@ -3480,10 +3493,7 @@
}
}
function deepmerge(target, source, options) {
(options = options || {}).arrayMerge = options.arrayMerge || defaultArrayMerge, options.isMergeableObject = options.isMergeableObject || function(value) {
var value1, value2, stringValue;
return !!(value1 = value) && "object" == typeof value1 && (value2 = value, !("[object RegExp]" === (stringValue = Object.prototype.toString.call(value2)) || "[object Date]" === stringValue || value2.$$typeof === REACT_ELEMENT_TYPE));
}, options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
(options = options || {}).arrayMerge = options.arrayMerge || defaultArrayMerge, options.isMergeableObject = options.isMergeableObject || isMergeableObject, options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
var target1, source1, options1, destination, sourceIsArray = Array.isArray(source), targetIsArray = Array.isArray(target);
return sourceIsArray !== targetIsArray ? cloneUnlessOtherwiseSpecified(source, options) : sourceIsArray ? options.arrayMerge(target, source, options) : (target1 = target, source1 = source, destination = {}, (options1 = options).isMergeableObject(target1) && getKeys(target1).forEach(function(key) {
destination[key] = cloneUnlessOtherwiseSpecified(target1[key], options1);
@ -5237,14 +5247,14 @@
return parsers.forEach(function(parser) {
parser && parser.config && object_assign_default()(config, parser.config);
}), createParser(config);
}, getWidth = function(n, scale) {
var n1;
return get(scale, n, "number" != typeof (n1 = n) || isNaN(n1) || n > 1 ? n : 100 * n + "%");
}, layout = system({
width: {
property: "width",
scale: "sizes",
transform: function(n, scale) {
var n1;
return get(scale, n, "number" != typeof (n1 = n) || isNaN(n1) || n > 1 ? n : 100 * n + "%");
}
transform: getWidth
},
height: {
property: "height",
@ -5902,7 +5912,9 @@
}), alias && (config[alias] = config[prop]);
var parse = createParser(config);
return parse;
}, cjs = __webpack_require__(9996), cjs_default = __webpack_require__.n(cjs), lib_esm_sx = (props)=>css_dist_index_esm(props.sx);
}, cjs = __webpack_require__(9996), cjs_default = __webpack_require__.n(cjs);
const sx = (props)=>css_dist_index_esm(props.sx);
var lib_esm_sx = sx;
const Box = styled_components_browser_esm.div.withConfig({
displayName: "Box",
componentId: "sc-1gh2r6s-0"
@ -6359,7 +6371,11 @@
}
}), TYPOGRAPHY = constants_compose(typography, whiteSpace);
constants_compose(border, shadow);
const CounterLabel = styled_components_browser_esm.span.withConfig({
const colorStyles = ({ scheme , ...props })=>({
color: "secondary" === scheme ? constants_get("colors.fg.default")(props) : "primary" === scheme ? constants_get("colors.fg.onEmphasis")(props) : constants_get("colors.fg.default")(props)
}), bgStyles = ({ scheme , ...props })=>({
backgroundColor: "secondary" === scheme ? constants_get("colors.neutral.muted")(props) : "primary" === scheme ? constants_get("colors.neutral.emphasis")(props) : constants_get("colors.neutral.muted")(props)
}), CounterLabel = styled_components_browser_esm.span.withConfig({
displayName: "CounterLabel",
componentId: "sc-13ceqbg-0"
})([
@ -6370,11 +6386,7 @@
";",
";&:empty{display:none;}",
";",
], constants_get("fontSizes.0"), constants_get("fontWeights.bold"), constants_get("lineHeights.condensedUltra"), ({ scheme , ...props })=>({
color: "secondary" === scheme ? constants_get("colors.fg.default")(props) : "primary" === scheme ? constants_get("colors.fg.onEmphasis")(props) : constants_get("colors.fg.default")(props)
}), ({ scheme , ...props })=>({
backgroundColor: "secondary" === scheme ? constants_get("colors.neutral.muted")(props) : "primary" === scheme ? constants_get("colors.neutral.emphasis")(props) : constants_get("colors.neutral.muted")(props)
}), lib_esm_sx);
], constants_get("fontSizes.0"), constants_get("fontWeights.bold"), constants_get("lineHeights.condensedUltra"), colorStyles, bgStyles, lib_esm_sx);
var lib_esm_CounterLabel = CounterLabel;
function ButtonCounter_extends() {
return (ButtonCounter_extends = Object.assign || function(target) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{5301:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return c(5075)},])},5075:function(a,b,c){"use strict";c.r(b);var d=c(5893),e=c(7294),f=c(6785),g=c(214),h=c.n(g);function i(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}b.default=function(){var a=(0,e.useState)({width:800,height:600,latitude:37.7577,longitude:-122.4376,zoom:8})[0];return(0,d.jsx)("div",{className:h().container,children:(0,d.jsx)(f.ZP,function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{},d=Object.keys(c);"function"==typeof Object.getOwnPropertySymbols&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(a){return Object.getOwnPropertyDescriptor(c,a).enumerable}))),d.forEach(function(b){i(a,b,c[b])})}return a}({},a,{mapStyle:"mapbox://styles/mapbox/dark-v10",mapboxApiAccessToken:"pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiY2p0MG01MXRqMW45cjQzb2R6b2ptc3J4MSJ9.zA2W0IkI0c6KaAhJfk9bWg"}))})}},214:function(a){a.exports={container:"Home_container__bCOhY",main:"Home_main__nLjiQ",footer:"Home_footer____T7K",title:"Home_title__T09hD",description:"Home_description__41Owk",code:"Home_code__suPER",grid:"Home_grid__GxQ85",card:"Home_card___LpL1",logo:"Home_logo__27_tb"}}},function(a){a.O(0,[634,785,774,888,179],function(){return a(a.s=5301)}),_N_E=a.O()},])
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{5301:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return c(5075)},])},5075:function(a,b,c){"use strict";c.r(b);var d=c(5893),e=c(7294),f=c(6785),g=c(214),h=c.n(g);function i(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var j=function(){var a=(0,e.useState)({width:800,height:600,latitude:37.7577,longitude:-122.4376,zoom:8})[0];return(0,d.jsx)("div",{className:h().container,children:(0,d.jsx)(f.ZP,function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{},d=Object.keys(c);"function"==typeof Object.getOwnPropertySymbols&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(a){return Object.getOwnPropertyDescriptor(c,a).enumerable}))),d.forEach(function(b){i(a,b,c[b])})}return a}({},a,{mapStyle:"mapbox://styles/mapbox/dark-v10",mapboxApiAccessToken:"pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiY2p0MG01MXRqMW45cjQzb2R6b2ptc3J4MSJ9.zA2W0IkI0c6KaAhJfk9bWg"}))})};b.default=j},214:function(a){a.exports={container:"Home_container__bCOhY",main:"Home_main__nLjiQ",footer:"Home_footer____T7K",title:"Home_title__T09hD",description:"Home_description__41Owk",code:"Home_code__suPER",grid:"Home_grid__GxQ85",card:"Home_card___LpL1",logo:"Home_logo__27_tb"}}},function(a){a.O(0,[634,785,774,888,179],function(){return a(a.s=5301)}),_N_E=a.O()},])

View File

@ -2666,17 +2666,7 @@
}), result.promise;
}
};
};
function defaultCallback(value) {
return value;
}
function defaultErrback(reason) {
return reject(reason);
}
return {
defer: defer,
reject: reject,
when: function(value, callback, errback, progressback) {
}, when = function(value, callback, errback, progressback) {
var done, result = defer(), wrappedCallback = function(value) {
try {
return (isFunction(callback) ? callback : defaultCallback)(value);
@ -2705,7 +2695,17 @@
done || result.notify(wrappedProgressback(progress));
});
}), result.promise;
},
};
function defaultCallback(value) {
return value;
}
function defaultErrback(reason) {
return reject(reason);
}
return {
defer: defer,
reject: reject,
when: when,
all: function(promises) {
var deferred = defer(), counter = 0, results = isArray(promises) ? [] : {};
return forEach(promises, function(promise, key) {
@ -3747,22 +3747,35 @@
return {
require: "ngModel",
link: function(scope, element, attr, ctrl) {
var match = /\/(.*)\//.exec(attr.ngList), separator = match && RegExp(match[1]) || attr.ngList || ",";
ctrl.$parsers.push(function(viewValue) {
var match = /\/(.*)\//.exec(attr.ngList), separator = match && RegExp(match[1]) || attr.ngList || ",", parse = function(viewValue) {
if (!isUndefined(viewValue)) {
var list = [];
return viewValue && forEach(viewValue.split(separator), function(value) {
value && list.push(trim(value));
}), list;
}
}), ctrl.$formatters.push(function(value) {
};
ctrl.$parsers.push(parse), ctrl.$formatters.push(function(value) {
if (isArray(value)) return value.join(", ");
}), ctrl.$isEmpty = function(value) {
return !value || !value.length;
};
}
};
}, CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/, ngBindDirective = ngDirective(function(scope, element, attr) {
}, CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/, ngValueDirective = function() {
return {
priority: 100,
compile: function(tpl, tplAttr) {
return CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue) ? function(scope, elm, attr) {
attr.$set("value", scope.$eval(attr.ngValue));
} : function(scope, elm, attr) {
scope.$watch(attr.ngValue, function(value) {
attr.$set("value", value);
});
};
}
};
}, ngBindDirective = ngDirective(function(scope, element, attr) {
element.addClass("ng-binding").data("$binding", attr.ngBind), scope.$watch(attr.ngBind, function(value) {
element.text(value == undefined ? "" : value);
});
@ -4459,20 +4472,7 @@
ngChange: ngChangeDirective,
required: requiredDirective,
ngRequired: requiredDirective,
ngValue: function() {
return {
priority: 100,
compile: function(tpl, tplAttr) {
return CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue) ? function(scope, elm, attr) {
attr.$set("value", scope.$eval(attr.ngValue));
} : function(scope, elm, attr) {
scope.$watch(attr.ngValue, function(value) {
attr.$set("value", value);
});
};
}
};
}
ngValue: ngValueDirective
}).directive({
ngInclude: ngIncludeFillContentDirective
}).directive(ngAttributeAliasDirectives).directive(ngEventDirectives), $provide.provider({

View File

@ -645,7 +645,8 @@
location.replace(href + "#" + fragment);
} else location.hash = "#" + fragment;
}
}), Backbone.history = new History(), Model.extend = Collection.extend = Router.extend = View.extend = History.extend = function(protoProps, staticProps) {
}), Backbone.history = new History();
var extend = function(protoProps, staticProps) {
var child, parent = this;
child = protoProps && _.has(protoProps, "constructor") ? protoProps.constructor : function() {
return parent.apply(this, arguments);
@ -655,6 +656,7 @@
};
return Surrogate.prototype = parent.prototype, child.prototype = new Surrogate(), protoProps && _.extend(child.prototype, protoProps), child.__super__ = parent.prototype, child;
};
Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;
var urlError = function() {
throw Error('A "url" property or function must be specified');
}, wrapError = function(model, options) {

View File

@ -533,10 +533,10 @@
},
dequeue: function(elem, type) {
type = type || "fx";
var queue = jQuery.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks(elem, type);
"inprogress" === fn && (fn = queue.shift(), startLength--), hooks.cur = fn, fn && ("fx" === type && queue.unshift("inprogress"), delete hooks.stop, fn.call(elem, function() {
var queue = jQuery.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks(elem, type), next = function() {
jQuery.dequeue(elem, type);
}, hooks)), !startLength && hooks && hooks.empty.fire();
};
"inprogress" === fn && (fn = queue.shift(), startLength--), hooks.cur = fn, fn && ("fx" === type && queue.unshift("inprogress"), delete hooks.stop, fn.call(elem, next, hooks)), !startLength && hooks && hooks.empty.fire();
},
_queueHooks: function(elem, type) {
var key = type + "queueHooks";

View File

@ -5,7 +5,7 @@
return factory($, root, doc), $.mobile;
}) : factory(root.jQuery, root, doc);
}(this, document, function(jQuery, window, document1, undefined) {
var $, $1, nsNormalizeDict, oldFind, rbrace, jqmDataRE, $2, window1, compensateToolbars, $3, undefined1, uuid, slice, _cleanData, $4, rcapitals, replaceFunction, $5, doc, bool, docElem, refNode, fakeBody, div, $6, support, $7, self, $win, dummyFnToInitNavigate, $8, undefined2, path, $base, dialogHashKey, $9, undefined3, $10, path1, initialHref, $11, loc, $12, undefined4, props, testElement, vendorPrefixes, $13, heldCall, curr, diff, handler, lastCall, $14, baseElement, base, $15, undefined5, originalWidget, keepNativeFactoryDefault, orig, $16, undefined6, pageTransitionQueue, isPageTransitioning, $17, window2, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, undefined7, rInitialLetter, iconposClass, $31, $32, $33, $34, $35, $36, meta, initialContent, disabledZoom, enabledZoom, disabledInitially, $37, $38, undefined8, rDividerListItem, origDefaultFilterCallback;
var $, $1, nsNormalizeDict, oldFind, rbrace, jqmDataRE, $2, window1, compensateToolbars, $3, undefined1, uuid, slice, _cleanData, $4, rcapitals, replaceFunction, $5, doc, bool, docElem, refNode, fakeBody, div, $6, support, $7, self, $win, dummyFnToInitNavigate, $8, undefined2, path, $base, dialogHashKey, $9, undefined3, $10, path1, initialHref, $11, loc, $12, undefined4, props, testElement, vendorPrefixes, $13, heldCall, curr, diff, handler, lastCall, $14, baseElement, base, $15, undefined5, originalWidget, keepNativeFactoryDefault, orig, $16, undefined6, pageTransitionQueue, isPageTransitioning, $17, window2, $18, $19, $20, defaultGetMaxScrollForTransition, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, undefined7, rInitialLetter, iconposClass, $31, $32, $33, $34, $35, $36, meta, initialContent, disabledZoom, enabledZoom, disabledInitially, $37, $38, undefined8, rDividerListItem, origDefaultFilterCallback;
jQuery.mobile = {}, function($, window, undefined) {
$.extend($.mobile, {
version: "1.4.2",
@ -323,18 +323,19 @@
_proto: $3.extend({}, prototype),
_childConstructors: []
}), basePrototype = new base(), basePrototype.options = $3.widget.extend({}, basePrototype.options), $3.each(prototype, function(prop, value) {
var _super, _superApply;
if (!$3.isFunction(value)) {
proxiedPrototype[prop] = value;
return;
}
proxiedPrototype[prop] = function() {
var returnValue, __super = this._super, __superApply = this._superApply;
return this._super = function() {
proxiedPrototype[prop] = (_super = function() {
return base.prototype[prop].apply(this, arguments);
}, this._superApply = function(args) {
}, _superApply = function(args) {
return base.prototype[prop].apply(this, args);
}, returnValue = value.apply(this, arguments), this._super = __super, this._superApply = __superApply, returnValue;
};
}, function() {
var returnValue, __super = this._super, __superApply = this._superApply;
return this._super = _super, this._superApply = _superApply, returnValue = value.apply(this, arguments), this._super = __super, this._superApply = __superApply, returnValue;
});
}), constructor.prototype = $3.widget.extend(basePrototype, {
widgetEventPrefix: existingConstructor && basePrototype.widgetEventPrefix || name
}, proxiedPrototype, {
@ -1804,14 +1805,14 @@
beforeStartOut: function(screenHeight, reverseClass, none) {
this.doneOut(screenHeight, reverseClass, none);
}
}), $20 = jQuery, $20.mobile.transitionHandlers = {
}), $20 = jQuery, defaultGetMaxScrollForTransition = function() {
return 3 * $20.mobile.getScreenHeight();
}, $20.mobile.transitionHandlers = {
sequential: $20.mobile.SerialTransition,
simultaneous: $20.mobile.ConcurrentTransition
}, $20.mobile.defaultTransitionHandler = $20.mobile.transitionHandlers.sequential, $20.mobile.transitionFallbacks = {}, $20.mobile._maybeDegradeTransition = function(transition) {
return transition && !$20.support.cssTransform3d && $20.mobile.transitionFallbacks[transition] && (transition = $20.mobile.transitionFallbacks[transition]), transition;
}, $20.mobile.getMaxScrollForTransition = $20.mobile.getMaxScrollForTransition || function() {
return 3 * $20.mobile.getScreenHeight();
}, $21 = jQuery, $21.mobile.transitionFallbacks.flip = "fade", $22 = jQuery, $22.mobile.transitionFallbacks.flow = "fade", $23 = jQuery, $23.mobile.transitionFallbacks.pop = "fade", $24 = jQuery, $24.mobile.transitionHandlers.slide = $24.mobile.transitionHandlers.simultaneous, $24.mobile.transitionFallbacks.slide = "fade", $25 = jQuery, $25.mobile.transitionFallbacks.slidedown = "fade", $26 = jQuery, $26.mobile.transitionFallbacks.slidefade = "fade", $27 = jQuery, $27.mobile.transitionFallbacks.slideup = "fade", $28 = jQuery, $28.mobile.transitionFallbacks.turn = "fade", $29 = jQuery, $29.mobile.degradeInputs = {
}, $20.mobile.getMaxScrollForTransition = $20.mobile.getMaxScrollForTransition || defaultGetMaxScrollForTransition, $21 = jQuery, $21.mobile.transitionFallbacks.flip = "fade", $22 = jQuery, $22.mobile.transitionFallbacks.flow = "fade", $23 = jQuery, $23.mobile.transitionFallbacks.pop = "fade", $24 = jQuery, $24.mobile.transitionHandlers.slide = $24.mobile.transitionHandlers.simultaneous, $24.mobile.transitionFallbacks.slide = "fade", $25 = jQuery, $25.mobile.transitionFallbacks.slidedown = "fade", $26 = jQuery, $26.mobile.transitionFallbacks.slidefade = "fade", $27 = jQuery, $27.mobile.transitionFallbacks.slideup = "fade", $28 = jQuery, $28.mobile.transitionFallbacks.turn = "fade", $29 = jQuery, $29.mobile.degradeInputs = {
color: !1,
date: !1,
datetime: !1,

View File

@ -607,6 +607,20 @@
try {
Object.freeze({});
} catch (e) {}
var cloneElement$1 = function(element, props, children) {
for(var newElement = cloneElement.apply(this, arguments), i = 2; i < arguments.length; i++)validateChildKeys(arguments[i], newElement.type);
return validatePropTypes(newElement), newElement;
}, createFactory = function(type) {
var validatedFactory = createElementWithValidation.bind(null, type);
return validatedFactory.type = type, didWarnAboutDeprecatedCreateFactory || (didWarnAboutDeprecatedCreateFactory = !0, warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(validatedFactory, "type", {
enumerable: !1,
get: function() {
return warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
value: type
}), type;
}
}), validatedFactory;
};
exports.Children = {
map: mapChildren,
forEach: function(children, forEachFunc, forEachContext) {
@ -629,10 +643,7 @@
if (!isValidElement(children)) throw Error("React.Children.only expected to receive a single React element child.");
return children;
}
}, exports.Component = Component, exports.PureComponent = PureComponent, exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals, exports.cloneElement = function(element, props, children) {
for(var newElement = cloneElement.apply(this, arguments), i = 2; i < arguments.length; i++)validateChildKeys(arguments[i], newElement.type);
return validatePropTypes(newElement), newElement;
}, exports.createContext = function(defaultValue, calculateChangedBits) {
}, exports.Component = Component, exports.PureComponent = PureComponent, exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals, exports.cloneElement = cloneElement$1, exports.createContext = function(defaultValue, calculateChangedBits) {
void 0 === calculateChangedBits ? calculateChangedBits = null : null !== calculateChangedBits && "function" != typeof calculateChangedBits && error("createContext: Expected the optional second argument to be a function. Instead received: %s", calculateChangedBits);
var context = {
$$typeof: REACT_CONTEXT_TYPE,
@ -699,17 +710,7 @@
}
}
}), context.Consumer = Consumer, context._currentRenderer = null, context._currentRenderer2 = null, context;
}, exports.createElement = createElementWithValidation, exports.createFactory = function(type) {
var validatedFactory = createElementWithValidation.bind(null, type);
return validatedFactory.type = type, didWarnAboutDeprecatedCreateFactory || (didWarnAboutDeprecatedCreateFactory = !0, warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(validatedFactory, "type", {
enumerable: !1,
get: function() {
return warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
value: type
}), type;
}
}), validatedFactory;
}, exports.createRef = function() {
}, exports.createElement = createElementWithValidation, exports.createFactory = createFactory, exports.createRef = function() {
var refObject = {
current: null
};

View File

@ -4270,7 +4270,7 @@
ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function(fiber, instance) {
!didWarnAboutUnsafeLifecycles.has(fiber.type) && ("function" == typeof instance.componentWillMount && !0 !== instance.componentWillMount.__suppressDeprecationWarning && pendingComponentWillMountWarnings.push(fiber), 1 & fiber.mode && "function" == typeof instance.UNSAFE_componentWillMount && pendingUNSAFE_ComponentWillMountWarnings.push(fiber), "function" == typeof instance.componentWillReceiveProps && !0 !== instance.componentWillReceiveProps.__suppressDeprecationWarning && pendingComponentWillReceivePropsWarnings.push(fiber), 1 & fiber.mode && "function" == typeof instance.UNSAFE_componentWillReceiveProps && pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber), "function" == typeof instance.componentWillUpdate && !0 !== instance.componentWillUpdate.__suppressDeprecationWarning && pendingComponentWillUpdateWarnings.push(fiber), 1 & fiber.mode && "function" == typeof instance.UNSAFE_componentWillUpdate && pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber));
}, ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function() {
var sortedNames, _sortedNames, _sortedNames2, _sortedNames3, _sortedNames4, _sortedNames5, componentWillMountUniqueNames = new Set();
var componentWillMountUniqueNames = new Set();
pendingComponentWillMountWarnings.length > 0 && (pendingComponentWillMountWarnings.forEach(function(fiber) {
componentWillMountUniqueNames.add(getComponentName(fiber.type) || "Component"), didWarnAboutUnsafeLifecycles.add(fiber.type);
}), pendingComponentWillMountWarnings = []);
@ -4294,22 +4294,28 @@
if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0 && (pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function(fiber) {
UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || "Component"), didWarnAboutUnsafeLifecycles.add(fiber.type);
}), pendingUNSAFE_ComponentWillUpdateWarnings = []), UNSAFE_componentWillMountUniqueNames.size > 0) {
error("Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s", setToSortedString(UNSAFE_componentWillMountUniqueNames));
var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
error("Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s", sortedNames);
}
if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
error("Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n\nPlease update the following components: %s", setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames));
var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
error("Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n\nPlease update the following components: %s", _sortedNames);
}
if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
error("Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s", setToSortedString(UNSAFE_componentWillUpdateUniqueNames));
var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
error("Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s", _sortedNames2);
}
if (componentWillMountUniqueNames.size > 0) {
warn("componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", setToSortedString(componentWillMountUniqueNames));
var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);
warn("componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", _sortedNames3);
}
if (componentWillReceivePropsUniqueNames.size > 0) {
warn("componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", setToSortedString(componentWillReceivePropsUniqueNames));
var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);
warn("componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", _sortedNames4);
}
if (componentWillUpdateUniqueNames.size > 0) {
warn("componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", setToSortedString(componentWillUpdateUniqueNames));
var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);
warn("componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", _sortedNames5);
}
};
var pendingLegacyContextWarning = new Map(), didWarnAboutLegacyContext = new Set();
@ -5475,7 +5481,7 @@
source,
subscribe
]), dispatcher.useEffect(function() {
var unsubscribe = subscribe(source._source, function() {
var handleChange = function() {
var latestGetSnapshot = refs.getSnapshot, latestSetSnapshot = refs.setSnapshot;
try {
latestSetSnapshot(latestGetSnapshot(source._source));
@ -5486,7 +5492,7 @@
throw error;
});
}
});
}, unsubscribe = subscribe(source._source, handleChange);
return "function" != typeof unsubscribe && error("Mutable source subscribe function must return an unsubscribe function."), unsubscribe;
}, [
source,
@ -8882,7 +8888,9 @@
function detachFiberAfterEffects(fiber) {
fiber.sibling = null, fiber.stateNode = null;
}
var resolveFamily = null, failedBoundaries = null;
var resolveFamily = null, failedBoundaries = null, setRefreshHandler = function(handler) {
resolveFamily = handler;
};
function resolveFunctionForHotReloading(type) {
if (null === resolveFamily) return type;
var family = resolveFamily(type);
@ -8938,6 +8946,18 @@
function markFailedErrorBoundaryForHotReloading(fiber) {
null !== resolveFamily && "function" == typeof WeakSet && (null === failedBoundaries && (failedBoundaries = new WeakSet()), failedBoundaries.add(fiber));
}
var scheduleRefresh = function(root, update) {
if (null !== resolveFamily) {
var staleFamilies = update.staleFamilies, updatedFamilies = update.updatedFamilies;
flushPassiveEffects(), flushSync(function() {
scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
});
}
}, scheduleRoot = function(root, element) {
root.context === emptyContextObject && (flushPassiveEffects(), flushSync(function() {
updateContainer(element, root, null, null);
}));
};
function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
var alternate = fiber.alternate, child = fiber.child, sibling = fiber.sibling, tag = fiber.tag, type = fiber.type, candidateType = null;
switch(tag){
@ -8957,6 +8977,12 @@
}
null !== failedBoundaries && (failedBoundaries.has(fiber) || null !== alternate && failedBoundaries.has(alternate)) && (needsRemount = !0), needsRemount && (fiber._debugNeedsRemount = !0), (needsRemount || needsRender) && scheduleUpdateOnFiber(fiber, SyncLane, -1), null === child || needsRemount || scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies), null !== sibling && scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
}
var findHostInstancesForRefresh = function(root, families) {
var hostInstances = new Set(), types = new Set(families.map(function(family) {
return family.current;
}));
return findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances), hostInstances;
};
function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
var child = fiber.child, sibling = fiber.sibling, tag = fiber.tag, type = fiber.type, candidateType = null;
switch(tag){
@ -9545,28 +9571,10 @@
return null === hostFiber ? null : hostFiber.stateNode;
},
findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,
findHostInstancesForRefresh: function(root, families) {
var hostInstances = new Set(), types = new Set(families.map(function(family) {
return family.current;
}));
return findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances), hostInstances;
},
scheduleRefresh: function(root, update) {
if (null !== resolveFamily) {
var staleFamilies = update.staleFamilies, updatedFamilies = update.updatedFamilies;
flushPassiveEffects(), flushSync(function() {
scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
});
}
},
scheduleRoot: function(root, element) {
root.context === emptyContextObject && (flushPassiveEffects(), flushSync(function() {
updateContainer(element, root, null, null);
}));
},
setRefreshHandler: function(handler) {
resolveFamily = handler;
},
findHostInstancesForRefresh: findHostInstancesForRefresh,
scheduleRefresh: scheduleRefresh,
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools
}) && canUseDOM && window.top === window.self && (navigator.userAgent.indexOf("Chrome") > -1 && -1 === navigator.userAgent.indexOf("Edge") || navigator.userAgent.indexOf("Firefox") > -1)) {
var protocol = window.location.protocol;

15
scripts/cargo/patch-section.sh Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -eu
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
function toLine {
arr=(${1//\\\t/ })
dir="$(dirname ${arr[1]})"
echo "${arr[0]} = { path = '$dir' }"
}
export -f toLine
$SCRIPT_DIR/list-crates.sh | jq '[.name, .manifest_path] | @tsv' | xargs -L 1 -I {} bash -c 'toLine "$@"' _ {}