@appbaseio/reactivesearch-vue 3.0.0-rc.6.1 → 3.0.0-rc.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +938 -721
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/MultiDropdownList.js +1 -1
- package/dist/cjs/{Pagination-58a0cf3f.js → Pagination-bcf8af5f.js} +1 -1
- package/dist/cjs/ReactiveGoogleMap.js +2 -2
- package/dist/cjs/ReactiveList.js +2 -2
- package/dist/cjs/SelectedFilters.js +1 -1
- package/dist/cjs/SingleDropdownList.js +1 -1
- package/dist/cjs/ToggleButton.js +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/{install-7fb595b8.js → install-a3eedd27.js} +30 -13
- package/dist/cjs/install.js +3 -3
- package/dist/cjs/version.js +1 -1
- package/dist/es/MultiDropdownList.js +1 -1
- package/dist/es/{Pagination-ae401c33.js → Pagination-50fc3ef5.js} +1 -1
- package/dist/es/ReactiveGoogleMap.js +2 -2
- package/dist/es/ReactiveList.js +2 -2
- package/dist/es/SelectedFilters.js +1 -1
- package/dist/es/SingleDropdownList.js +1 -1
- package/dist/es/ToggleButton.js +1 -1
- package/dist/es/index.js +4 -4
- package/dist/es/{install-3f345819.js → install-25b06215.js} +30 -13
- package/dist/es/install.js +3 -3
- package/dist/es/version.js +1 -1
- package/package.json +89 -89
- package/dist/cjs/{Button-9e179864.js → Button-f96a0570.js} +2 -2
- package/dist/es/{Button-c2ff5178.js → Button-5c2cf399.js} +2 -2
|
@@ -7305,6 +7305,13 @@
|
|
|
7305
7305
|
}, props[component].componentType === constants$1.componentTypes.searchBox));
|
|
7306
7306
|
}
|
|
7307
7307
|
} else if (response.AIAnswer) {
|
|
7308
|
+
if (response.AIAnswer.error) {
|
|
7309
|
+
dispatch((0, misc.setAIResponseError)(component, {
|
|
7310
|
+
message: response.AIAnswer.error
|
|
7311
|
+
}));
|
|
7312
|
+
dispatch((0, misc.setLoading)(component, false));
|
|
7313
|
+
return;
|
|
7314
|
+
}
|
|
7308
7315
|
var input = response.AIAnswer;
|
|
7309
7316
|
var finalResponse = {
|
|
7310
7317
|
answer: {
|
|
@@ -9478,8 +9485,18 @@
|
|
|
9478
9485
|
function t(e, t) {
|
|
9479
9486
|
for (var n = 0; n < t.length; n++) {
|
|
9480
9487
|
var r = t[n];
|
|
9481
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
9488
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, "symbol" == typeof (i = function (e, t) {
|
|
9489
|
+
if ("object" != typeof e || null === e) return e;
|
|
9490
|
+
var n = e[Symbol.toPrimitive];
|
|
9491
|
+
if (void 0 !== n) {
|
|
9492
|
+
var r = n.call(e, "string");
|
|
9493
|
+
if ("object" != typeof r) return r;
|
|
9494
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9495
|
+
}
|
|
9496
|
+
return String(e);
|
|
9497
|
+
}(r.key)) ? i : String(i), r);
|
|
9482
9498
|
}
|
|
9499
|
+
var i;
|
|
9483
9500
|
}
|
|
9484
9501
|
function n(e, n, r) {
|
|
9485
9502
|
return n && t(e.prototype, n), r && t(e, r), Object.defineProperty(e, "prototype", {
|
|
@@ -9520,26 +9537,26 @@
|
|
|
9520
9537
|
l = Object.prototype,
|
|
9521
9538
|
c = l.toString,
|
|
9522
9539
|
s = l.hasOwnProperty,
|
|
9523
|
-
|
|
9524
|
-
function
|
|
9540
|
+
v = /^\s*function (\w+)/;
|
|
9541
|
+
function d(e) {
|
|
9525
9542
|
var t,
|
|
9526
9543
|
n = null !== (t = null == e ? void 0 : e.type) && void 0 !== t ? t : e;
|
|
9527
9544
|
if (n) {
|
|
9528
|
-
var r = n.toString().match(
|
|
9545
|
+
var r = n.toString().match(v);
|
|
9529
9546
|
return r ? r[1] : "";
|
|
9530
9547
|
}
|
|
9531
9548
|
return "";
|
|
9532
9549
|
}
|
|
9533
|
-
var
|
|
9534
|
-
|
|
9550
|
+
var y = isPlainObject$1,
|
|
9551
|
+
p = function p(e) {
|
|
9535
9552
|
return e;
|
|
9536
9553
|
},
|
|
9537
|
-
h =
|
|
9554
|
+
h = p;
|
|
9538
9555
|
{
|
|
9539
9556
|
var b = "undefined" != typeof console;
|
|
9540
9557
|
h = b ? function (e, t) {
|
|
9541
9558
|
void 0 === t && (t = a.logLevel), !1 === a.silent && console[t]("[VueTypes warn]: " + e);
|
|
9542
|
-
} :
|
|
9559
|
+
} : p;
|
|
9543
9560
|
}
|
|
9544
9561
|
var g = function g(e, t) {
|
|
9545
9562
|
return s.call(e, t);
|
|
@@ -9554,10 +9571,10 @@
|
|
|
9554
9571
|
return "[object Function]" === c.call(e);
|
|
9555
9572
|
},
|
|
9556
9573
|
_ = function _(e, t) {
|
|
9557
|
-
return
|
|
9574
|
+
return y(e) && g(e, "_vueTypes_name") && (!t || e._vueTypes_name === t);
|
|
9558
9575
|
},
|
|
9559
9576
|
T = function T(e) {
|
|
9560
|
-
return
|
|
9577
|
+
return y(e) && (g(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function (t) {
|
|
9561
9578
|
return g(e, t);
|
|
9562
9579
|
}));
|
|
9563
9580
|
};
|
|
@@ -9566,25 +9583,25 @@
|
|
|
9566
9583
|
value: e
|
|
9567
9584
|
});
|
|
9568
9585
|
}
|
|
9569
|
-
function
|
|
9586
|
+
function P(e, t, n) {
|
|
9570
9587
|
var r;
|
|
9571
9588
|
void 0 === n && (n = !1);
|
|
9572
9589
|
var i = !0,
|
|
9573
9590
|
o = "";
|
|
9574
|
-
r =
|
|
9591
|
+
r = y(e) ? e : {
|
|
9575
9592
|
type: e
|
|
9576
9593
|
};
|
|
9577
9594
|
var u = _(r) ? r._vueTypes_name + " - " : "";
|
|
9578
9595
|
if (T(r) && null !== r.type) {
|
|
9579
9596
|
if (void 0 === r.type || !0 === r.type) return i;
|
|
9580
|
-
if (!r.required &&
|
|
9597
|
+
if (!r.required && null == t) return i;
|
|
9581
9598
|
m(r.type) ? (i = r.type.some(function (e) {
|
|
9582
|
-
return !0 ===
|
|
9599
|
+
return !0 === P(e, t, !0);
|
|
9583
9600
|
}), o = r.type.map(function (e) {
|
|
9584
|
-
return
|
|
9585
|
-
}).join(" or ")) : i = "Array" === (o =
|
|
9601
|
+
return d(e);
|
|
9602
|
+
}).join(" or ")) : i = "Array" === (o = d(r)) ? m(t) : "Object" === o ? y(t) : "String" === o || "Number" === o || "Boolean" === o || "Function" === o ? function (e) {
|
|
9586
9603
|
if (null == e) return "";
|
|
9587
|
-
var t = e.constructor.toString().match(
|
|
9604
|
+
var t = e.constructor.toString().match(v);
|
|
9588
9605
|
return t ? t[1] : "";
|
|
9589
9606
|
}(t) === o : t instanceof r.type;
|
|
9590
9607
|
}
|
|
@@ -9604,7 +9621,7 @@
|
|
|
9604
9621
|
}
|
|
9605
9622
|
return i;
|
|
9606
9623
|
}
|
|
9607
|
-
function
|
|
9624
|
+
function k(e, t) {
|
|
9608
9625
|
var n = Object.defineProperties(t, {
|
|
9609
9626
|
_vueTypes_name: {
|
|
9610
9627
|
value: e,
|
|
@@ -9617,9 +9634,9 @@
|
|
|
9617
9634
|
},
|
|
9618
9635
|
def: {
|
|
9619
9636
|
value: function value(e) {
|
|
9620
|
-
return void 0 === e ? this.type === Boolean || Array.isArray(this.type) && this.type.includes(Boolean) ? void (this["default"] = void 0) : (g(this, "default") && delete this["default"], this) : j(e) || !0 ===
|
|
9637
|
+
return void 0 === e ? this.type === Boolean || Array.isArray(this.type) && this.type.includes(Boolean) ? void (this["default"] = void 0) : (g(this, "default") && delete this["default"], this) : j(e) || !0 === P(this, e, !0) ? (this["default"] = m(e) ? function () {
|
|
9621
9638
|
return [].concat(e);
|
|
9622
|
-
} :
|
|
9639
|
+
} : y(e) ? function () {
|
|
9623
9640
|
return Object.assign({}, e);
|
|
9624
9641
|
} : e, this) : (h(this._vueTypes_name + ' - invalid default value: "' + e + '"'), this);
|
|
9625
9642
|
}
|
|
@@ -9629,28 +9646,28 @@
|
|
|
9629
9646
|
return j(r) && (n.validator = w(r, n)), n;
|
|
9630
9647
|
}
|
|
9631
9648
|
function x(e, t) {
|
|
9632
|
-
var n =
|
|
9649
|
+
var n = k(e, t);
|
|
9633
9650
|
return Object.defineProperty(n, "validate", {
|
|
9634
9651
|
value: function value(e) {
|
|
9635
9652
|
return j(this.validator) && h(this._vueTypes_name + " - calling .validate() will overwrite the current custom validator function. Validator info:\n" + JSON.stringify(this)), this.validator = w(e, this), this;
|
|
9636
9653
|
}
|
|
9637
9654
|
});
|
|
9638
9655
|
}
|
|
9639
|
-
function
|
|
9656
|
+
function S(e, t, n) {
|
|
9640
9657
|
var r,
|
|
9641
9658
|
i,
|
|
9642
9659
|
o = (r = t, i = {}, Object.getOwnPropertyNames(r).forEach(function (e) {
|
|
9643
9660
|
i[e] = Object.getOwnPropertyDescriptor(r, e);
|
|
9644
9661
|
}), Object.defineProperties({}, i));
|
|
9645
|
-
if (o._vueTypes_name = e, !
|
|
9662
|
+
if (o._vueTypes_name = e, !y(n)) return o;
|
|
9646
9663
|
var a,
|
|
9647
9664
|
l,
|
|
9648
9665
|
c = n.validator,
|
|
9649
9666
|
s = u(n, f);
|
|
9650
9667
|
if (j(c)) {
|
|
9651
|
-
var
|
|
9652
|
-
|
|
9653
|
-
return
|
|
9668
|
+
var v = o.validator;
|
|
9669
|
+
v && (v = null !== (l = (a = v).__original) && void 0 !== l ? l : a), o.validator = w(v ? function (e) {
|
|
9670
|
+
return v.call(this, e) && c.call(this, e);
|
|
9654
9671
|
} : c, o);
|
|
9655
9672
|
}
|
|
9656
9673
|
return Object.assign(o, s);
|
|
@@ -9658,7 +9675,7 @@
|
|
|
9658
9675
|
function E(e) {
|
|
9659
9676
|
return e.replace(/^(?!\s*$)/gm, " ");
|
|
9660
9677
|
}
|
|
9661
|
-
var
|
|
9678
|
+
var A = function A() {
|
|
9662
9679
|
return x("any", {});
|
|
9663
9680
|
},
|
|
9664
9681
|
N = function N() {
|
|
@@ -9692,7 +9709,7 @@
|
|
|
9692
9709
|
});
|
|
9693
9710
|
},
|
|
9694
9711
|
F = function F() {
|
|
9695
|
-
return
|
|
9712
|
+
return k("integer", {
|
|
9696
9713
|
type: Number,
|
|
9697
9714
|
validator: function validator(e) {
|
|
9698
9715
|
var t = O(e);
|
|
@@ -9701,7 +9718,7 @@
|
|
|
9701
9718
|
});
|
|
9702
9719
|
},
|
|
9703
9720
|
Y = function Y() {
|
|
9704
|
-
return
|
|
9721
|
+
return k("symbol", {
|
|
9705
9722
|
validator: function validator(e) {
|
|
9706
9723
|
var t = "symbol" == typeof e;
|
|
9707
9724
|
return !1 === t && h('symbol - invalid value "' + e + '"'), t;
|
|
@@ -9721,7 +9738,7 @@
|
|
|
9721
9738
|
};
|
|
9722
9739
|
function J(e, t) {
|
|
9723
9740
|
if (void 0 === t && (t = "custom validation failed"), "function" != typeof e) throw new TypeError("[VueTypes error]: You must provide a function as argument");
|
|
9724
|
-
return
|
|
9741
|
+
return k(e.name || "<<anonymous function>>", {
|
|
9725
9742
|
type: null,
|
|
9726
9743
|
validator: function validator(n) {
|
|
9727
9744
|
var r = e(n);
|
|
@@ -9750,7 +9767,7 @@
|
|
|
9750
9767
|
}, []);
|
|
9751
9768
|
r.length > 0 && (n.type = r);
|
|
9752
9769
|
}
|
|
9753
|
-
return
|
|
9770
|
+
return k("oneOf", n);
|
|
9754
9771
|
}
|
|
9755
9772
|
function R(e) {
|
|
9756
9773
|
if (!m(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
|
|
@@ -9776,12 +9793,12 @@
|
|
|
9776
9793
|
return r.indexOf(e) === t;
|
|
9777
9794
|
});
|
|
9778
9795
|
var u = !1 === n && r.length > 0 ? r : null;
|
|
9779
|
-
return
|
|
9796
|
+
return k("oneOfType", t ? {
|
|
9780
9797
|
type: u,
|
|
9781
9798
|
validator: function validator(t) {
|
|
9782
9799
|
var n = [],
|
|
9783
9800
|
r = e.some(function (e) {
|
|
9784
|
-
var r =
|
|
9801
|
+
var r = P(e, t, !0);
|
|
9785
9802
|
return "string" == typeof r && n.push(r), !0 === r;
|
|
9786
9803
|
});
|
|
9787
9804
|
return r || h("oneOfType - provided value does not match any of the " + n.length + " passed-in validators:\n" + E(n.join("\n"))), r;
|
|
@@ -9791,29 +9808,29 @@
|
|
|
9791
9808
|
});
|
|
9792
9809
|
}
|
|
9793
9810
|
function U(e) {
|
|
9794
|
-
return
|
|
9811
|
+
return k("arrayOf", {
|
|
9795
9812
|
type: Array,
|
|
9796
9813
|
validator: function validator(t) {
|
|
9797
9814
|
var n = "",
|
|
9798
9815
|
r = t.every(function (t) {
|
|
9799
|
-
return !0 === (n =
|
|
9816
|
+
return !0 === (n = P(e, t, !0));
|
|
9800
9817
|
});
|
|
9801
9818
|
return r || h("arrayOf - value validation error:\n" + E(n)), r;
|
|
9802
9819
|
}
|
|
9803
9820
|
});
|
|
9804
9821
|
}
|
|
9805
9822
|
function $(e) {
|
|
9806
|
-
return
|
|
9823
|
+
return k("instanceOf", {
|
|
9807
9824
|
type: e
|
|
9808
9825
|
});
|
|
9809
9826
|
}
|
|
9810
9827
|
function z(e) {
|
|
9811
|
-
return
|
|
9828
|
+
return k("objectOf", {
|
|
9812
9829
|
type: Object,
|
|
9813
9830
|
validator: function validator(t) {
|
|
9814
9831
|
var n = "",
|
|
9815
9832
|
r = Object.keys(t).every(function (r) {
|
|
9816
|
-
return !0 === (n =
|
|
9833
|
+
return !0 === (n = P(e, t[r], !0));
|
|
9817
9834
|
});
|
|
9818
9835
|
return r || h("objectOf - value validation error:\n" + E(n)), r;
|
|
9819
9836
|
}
|
|
@@ -9825,11 +9842,11 @@
|
|
|
9825
9842
|
var n;
|
|
9826
9843
|
return !(null === (n = e[t]) || void 0 === n || !n.required);
|
|
9827
9844
|
}),
|
|
9828
|
-
r =
|
|
9845
|
+
r = k("shape", {
|
|
9829
9846
|
type: Object,
|
|
9830
9847
|
validator: function validator(r) {
|
|
9831
9848
|
var i = this;
|
|
9832
|
-
if (!
|
|
9849
|
+
if (!y(r)) return !1;
|
|
9833
9850
|
var o = Object.keys(r);
|
|
9834
9851
|
if (n.length > 0 && n.some(function (e) {
|
|
9835
9852
|
return -1 === o.indexOf(e);
|
|
@@ -9841,7 +9858,7 @@
|
|
|
9841
9858
|
}
|
|
9842
9859
|
return o.every(function (n) {
|
|
9843
9860
|
if (-1 === t.indexOf(n)) return !0 === i._vueTypes_isLoose || (h('shape - shape definition does not include a "' + n + '" property. Allowed keys: "' + t.join('", "') + '".'), !1);
|
|
9844
|
-
var o =
|
|
9861
|
+
var o = P(e[n], r[n], !0);
|
|
9845
9862
|
return "string" == typeof o && h('shape - "' + n + '" property validation error:\n ' + E(o)), !0 === o;
|
|
9846
9863
|
});
|
|
9847
9864
|
}
|
|
@@ -9876,18 +9893,18 @@
|
|
|
9876
9893
|
c = f.type;
|
|
9877
9894
|
return _(c) ? (delete f.type, Object.defineProperty(this, n, a ? {
|
|
9878
9895
|
get: function get() {
|
|
9879
|
-
return
|
|
9896
|
+
return S(n, c, f);
|
|
9880
9897
|
}
|
|
9881
9898
|
} : {
|
|
9882
9899
|
value: function value() {
|
|
9883
9900
|
var e,
|
|
9884
|
-
t =
|
|
9901
|
+
t = S(n, c, f);
|
|
9885
9902
|
return t.validator && (t.validator = (e = t.validator).bind.apply(e, [t].concat([].slice.call(arguments)))), t;
|
|
9886
9903
|
}
|
|
9887
9904
|
})) : (l = a ? {
|
|
9888
9905
|
get: function get() {
|
|
9889
9906
|
var e = Object.assign({}, f);
|
|
9890
|
-
return i ? x(n, e) :
|
|
9907
|
+
return i ? x(n, e) : k(n, e);
|
|
9891
9908
|
},
|
|
9892
9909
|
enumerable: !0
|
|
9893
9910
|
} : {
|
|
@@ -9895,14 +9912,14 @@
|
|
|
9895
9912
|
var e,
|
|
9896
9913
|
t,
|
|
9897
9914
|
r = Object.assign({}, f);
|
|
9898
|
-
return e = i ? x(n, r) :
|
|
9915
|
+
return e = i ? x(n, r) : k(n, r), r.validator && (e.validator = (t = r.validator).bind.apply(t, [e].concat([].slice.call(arguments)))), e;
|
|
9899
9916
|
},
|
|
9900
9917
|
enumerable: !0
|
|
9901
9918
|
}, Object.defineProperty(this, n, l));
|
|
9902
9919
|
}, n(e, null, [{
|
|
9903
9920
|
key: "any",
|
|
9904
9921
|
get: function get() {
|
|
9905
|
-
return
|
|
9922
|
+
return A();
|
|
9906
9923
|
}
|
|
9907
9924
|
}, {
|
|
9908
9925
|
key: "func",
|
|
@@ -9952,10 +9969,10 @@
|
|
|
9952
9969
|
}]), e;
|
|
9953
9970
|
}(), e.defaults = {}, e.sensibleDefaults = void 0, e.config = a, e.custom = J, e.oneOf = M, e.instanceOf = $, e.oneOfType = R, e.arrayOf = U, e.objectOf = z, e.shape = C, e.utils = {
|
|
9954
9971
|
validate: function validate(e, t) {
|
|
9955
|
-
return !0 ===
|
|
9972
|
+
return !0 === P(t, e, !0);
|
|
9956
9973
|
},
|
|
9957
9974
|
toType: function toType(e, t, n) {
|
|
9958
|
-
return void 0 === n && (n = !1), n ? x(e, t) :
|
|
9975
|
+
return void 0 === n && (n = !1), n ? x(e, t) : k(e, t);
|
|
9959
9976
|
}
|
|
9960
9977
|
}, e;
|
|
9961
9978
|
}();
|
|
@@ -10126,7 +10143,7 @@
|
|
|
10126
10143
|
return StyleSheet;
|
|
10127
10144
|
}();
|
|
10128
10145
|
|
|
10129
|
-
var e="-ms-";var r$1="-moz-";var a$1="-webkit-";var n$1="comm";var c$1="rule";var s$1="decl";var i$1="@import";var h$1="@keyframes";var $$1=Math.abs;var k$1=String.fromCharCode;var
|
|
10146
|
+
var e="-ms-";var r$1="-moz-";var a$1="-webkit-";var n$1="comm";var c$1="rule";var s$1="decl";var i$1="@import";var h$1="@keyframes";var $$1="@layer";var g$1=Math.abs;var k$1=String.fromCharCode;var m$1=Object.assign;function x$1(e,r){return O$1(e,0)^45?(((r<<2^O$1(e,0))<<2^O$1(e,1))<<2^O$1(e,2))<<2^O$1(e,3):0}function y$1(e){return e.trim()}function j$1(e,r){return (e=r.exec(e))?e[0]:e}function z$1(e,r,a){return e.replace(r,a)}function C$1(e,r){return e.indexOf(r)}function O$1(e,r){return e.charCodeAt(r)|0}function A$1(e,r,a){return e.slice(r,a)}function M$1(e){return e.length}function S$1(e){return e.length}function q$1(e,r){return r.push(e),e}function B$1(e,r){return e.map(r).join("")}var D$1=1;var E$1=1;var F$1=0;var G$1=0;var H$1=0;var I$1="";function J$1(e,r,a,n,c,s,t){return {value:e,root:r,parent:a,type:n,props:c,children:s,line:D$1,column:E$1,length:t,return:""}}function K$1(e,r){return m$1(J$1("",null,null,"",null,null,0),e,{length:-e.length},r)}function L$1(){return H$1}function N$1(){H$1=G$1>0?O$1(I$1,--G$1):0;if(E$1--,H$1===10)E$1=1,D$1--;return H$1}function P$1(){H$1=G$1<F$1?O$1(I$1,G$1++):0;if(E$1++,H$1===10)E$1=1,D$1++;return H$1}function Q$1(){return O$1(I$1,G$1)}function R$1(){return G$1}function T$1(e,r){return A$1(I$1,e,r)}function U$1(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function V$1(e){return D$1=E$1=1,F$1=M$1(I$1=e),G$1=0,[]}function W(e){return I$1="",e}function X(e){return y$1(T$1(G$1-1,re(e===91?e+2:e===40?e+1:e)))}function Z(e){while(H$1=Q$1())if(H$1<33)P$1();else break;return U$1(e)>2||U$1(H$1)>3?"":" "}function ee(e,r){while(--r&&P$1())if(H$1<48||H$1>102||H$1>57&&H$1<65||H$1>70&&H$1<97)break;return T$1(e,R$1()+(r<6&&Q$1()==32&&P$1()==32))}function re(e){while(P$1())switch(H$1){case e:return G$1;case 34:case 39:if(e!==34&&e!==39)re(H$1);break;case 40:if(e===41)re(e);break;case 92:P$1();break}return G$1}function ae(e,r){while(P$1())if(e+H$1===47+10)break;else if(e+H$1===42+42&&Q$1()===47)break;return "/*"+T$1(r,G$1-1)+"*"+k$1(e===47?e:P$1())}function ne(e){while(!U$1(Q$1()))P$1();return T$1(e,G$1)}function ce(e){return W(se("",null,null,null,[""],e=V$1(e),0,[0],e))}function se(e,r,a,n,c,s,t,u,i){var f=0;var o=0;var l=t;var v=0;var p=0;var h=0;var b=1;var w=1;var d=1;var $=0;var g="";var m=c;var x=s;var y=n;var j=g;while(w)switch(h=$,$=P$1()){case 40:if(h!=108&&O$1(j,l-1)==58){if(C$1(j+=z$1(X($),"&","&\f"),"&\f")!=-1)d=-1;break}case 34:case 39:case 91:j+=X($);break;case 9:case 10:case 13:case 32:j+=Z(h);break;case 92:j+=ee(R$1()-1,7);continue;case 47:switch(Q$1()){case 42:case 47:q$1(ue(ae(P$1(),R$1()),r,a),i);break;default:j+="/";}break;case 123*b:u[f++]=M$1(j)*d;case 125*b:case 59:case 0:switch($){case 0:case 125:w=0;case 59+o:if(d==-1)j=z$1(j,/\f/g,"");if(p>0&&M$1(j)-l)q$1(p>32?ie(j+";",n,a,l-1):ie(z$1(j," ","")+";",n,a,l-2),i);break;case 59:j+=";";default:q$1(y=te(j,r,a,f,o,c,u,g,m=[],x=[],l),s);if($===123)if(o===0)se(j,r,y,y,m,s,l,u,x);else switch(v===99&&O$1(j,3)===110?100:v){case 100:case 108:case 109:case 115:se(e,y,y,n&&q$1(te(e,y,y,0,0,c,u,g,c,m=[],l),x),c,x,l,u,n?m:x);break;default:se(j,y,y,y,[""],x,0,u,x);}}f=o=p=0,b=d=1,g=j="",l=t;break;case 58:l=1+M$1(j),p=h;default:if(b<1)if($==123)--b;else if($==125&&b++==0&&N$1()==125)continue;switch(j+=k$1($),$*b){case 38:d=o>0?1:(j+="\f",-1);break;case 44:u[f++]=(M$1(j)-1)*d,d=1;break;case 64:if(Q$1()===45)j+=X(P$1());v=Q$1(),o=l=M$1(g=j+=ne(R$1())),$++;break;case 45:if(h===45&&M$1(j)==2)b=0;}}return s}function te(e,r,a,n,s,t,u,i,f,o,l){var v=s-1;var p=s===0?t:[""];var h=S$1(p);for(var b=0,w=0,d=0;b<n;++b)for(var $=0,k=A$1(e,v+1,v=g$1(w=u[b])),m=e;$<h;++$)if(m=y$1(w>0?p[$]+" "+k:z$1(k,/&\f/g,p[$])))f[d++]=m;return J$1(e,r,a,s===0?c$1:i,f,o,l)}function ue(e,r,a){return J$1(e,r,a,n$1,k$1(L$1()),A$1(e,2,-2),0)}function ie(e,r,a,n){return J$1(e,r,a,s$1,A$1(e,0,n),A$1(e,n+1,-1),n)}function oe(e,r){var a="";var n=S$1(e);for(var c=0;c<n;c++)a+=r(e[c],c,e,r)||"";return a}function le(e,r,a,t){switch(e.type){case $$1:if(e.children.length)break;case i$1:case s$1:return e.return=e.return||e.value;case n$1:return "";case h$1:return e.return=e.value+"{"+oe(e.children,t)+"}";case c$1:e.value=e.props.join(",");}return M$1(a=oe(e.children,t))?e.return=e.value+"{"+a+"}":""}function ve(e){var r=S$1(e);return function(a,n,c,s){var t="";for(var u=0;u<r;u++)t+=e[u](a,n,c,s)||"";return t}}
|
|
10130
10147
|
|
|
10131
10148
|
function memoize(fn) {
|
|
10132
10149
|
var cache = Object.create(null);
|
|
@@ -10141,43 +10158,43 @@
|
|
|
10141
10158
|
var character = 0;
|
|
10142
10159
|
while (true) {
|
|
10143
10160
|
previous = character;
|
|
10144
|
-
character =
|
|
10161
|
+
character = Q$1(); // &\f
|
|
10145
10162
|
|
|
10146
10163
|
if (previous === 38 && character === 12) {
|
|
10147
10164
|
points[index] = 1;
|
|
10148
10165
|
}
|
|
10149
|
-
if (
|
|
10166
|
+
if (U$1(character)) {
|
|
10150
10167
|
break;
|
|
10151
10168
|
}
|
|
10152
|
-
|
|
10169
|
+
P$1();
|
|
10153
10170
|
}
|
|
10154
|
-
return
|
|
10171
|
+
return T$1(begin, G$1);
|
|
10155
10172
|
};
|
|
10156
10173
|
var toRules = function toRules(parsed, points) {
|
|
10157
10174
|
// pretend we've started with a comma
|
|
10158
10175
|
var index = -1;
|
|
10159
10176
|
var character = 44;
|
|
10160
10177
|
do {
|
|
10161
|
-
switch (
|
|
10178
|
+
switch (U$1(character)) {
|
|
10162
10179
|
case 0:
|
|
10163
10180
|
// &\f
|
|
10164
|
-
if (character === 38 &&
|
|
10181
|
+
if (character === 38 && Q$1() === 12) {
|
|
10165
10182
|
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
|
|
10166
10183
|
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
|
|
10167
10184
|
// and when it should just concatenate the outer and inner selectors
|
|
10168
10185
|
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
|
|
10169
10186
|
points[index] = 1;
|
|
10170
10187
|
}
|
|
10171
|
-
parsed[index] += identifierWithPointTracking(
|
|
10188
|
+
parsed[index] += identifierWithPointTracking(G$1 - 1, points, index);
|
|
10172
10189
|
break;
|
|
10173
10190
|
case 2:
|
|
10174
|
-
parsed[index] +=
|
|
10191
|
+
parsed[index] += X(character);
|
|
10175
10192
|
break;
|
|
10176
10193
|
case 4:
|
|
10177
10194
|
// comma
|
|
10178
10195
|
if (character === 44) {
|
|
10179
10196
|
// colon
|
|
10180
|
-
parsed[++index] =
|
|
10197
|
+
parsed[++index] = Q$1() === 58 ? '&\f' : '';
|
|
10181
10198
|
points[index] = parsed[index].length;
|
|
10182
10199
|
break;
|
|
10183
10200
|
}
|
|
@@ -10187,11 +10204,11 @@
|
|
|
10187
10204
|
default:
|
|
10188
10205
|
parsed[index] += k$1(character);
|
|
10189
10206
|
}
|
|
10190
|
-
} while (character =
|
|
10207
|
+
} while (character = P$1());
|
|
10191
10208
|
return parsed;
|
|
10192
10209
|
};
|
|
10193
10210
|
var getRules = function getRules(value, points) {
|
|
10194
|
-
return
|
|
10211
|
+
return W(toRules(V$1(value), points));
|
|
10195
10212
|
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
|
|
10196
10213
|
|
|
10197
10214
|
var fixedElements = /* #__PURE__ */new WeakMap();
|
|
@@ -10252,7 +10269,7 @@
|
|
|
10252
10269
|
if (element.type !== 'rule' || cache.compat) return;
|
|
10253
10270
|
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
|
10254
10271
|
if (unsafePseudoClasses) {
|
|
10255
|
-
var isNested = element.parent
|
|
10272
|
+
var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
|
|
10256
10273
|
//
|
|
10257
10274
|
// considering this input:
|
|
10258
10275
|
// .a {
|
|
@@ -10268,7 +10285,7 @@
|
|
|
10268
10285
|
// .b {}
|
|
10269
10286
|
// }
|
|
10270
10287
|
|
|
10271
|
-
var commentContainer = isNested ?
|
|
10288
|
+
var commentContainer = isNested ? element.parent.children :
|
|
10272
10289
|
// global rule at the root level
|
|
10273
10290
|
children;
|
|
10274
10291
|
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
|
@@ -10342,7 +10359,7 @@
|
|
|
10342
10359
|
/* eslint-disable no-fallthrough */
|
|
10343
10360
|
|
|
10344
10361
|
function prefix(value, length) {
|
|
10345
|
-
switch (
|
|
10362
|
+
switch (x$1(value, length)) {
|
|
10346
10363
|
// color-adjust
|
|
10347
10364
|
case 5103:
|
|
10348
10365
|
return a$1 + 'print-' + value + value;
|
|
@@ -10397,51 +10414,51 @@
|
|
|
10397
10414
|
// align-items
|
|
10398
10415
|
|
|
10399
10416
|
case 5187:
|
|
10400
|
-
return a$1 + value +
|
|
10417
|
+
return a$1 + value + z$1(value, /(\w+).+(:[^]+)/, a$1 + 'box-$1$2' + e + 'flex-$1$2') + value;
|
|
10401
10418
|
// align-self
|
|
10402
10419
|
|
|
10403
10420
|
case 5443:
|
|
10404
|
-
return a$1 + value + e + 'flex-item-' +
|
|
10421
|
+
return a$1 + value + e + 'flex-item-' + z$1(value, /flex-|-self/, '') + value;
|
|
10405
10422
|
// align-content
|
|
10406
10423
|
|
|
10407
10424
|
case 4675:
|
|
10408
|
-
return a$1 + value + e + 'flex-line-pack' +
|
|
10425
|
+
return a$1 + value + e + 'flex-line-pack' + z$1(value, /align-content|flex-|-self/, '') + value;
|
|
10409
10426
|
// flex-shrink
|
|
10410
10427
|
|
|
10411
10428
|
case 5548:
|
|
10412
|
-
return a$1 + value + e +
|
|
10429
|
+
return a$1 + value + e + z$1(value, 'shrink', 'negative') + value;
|
|
10413
10430
|
// flex-basis
|
|
10414
10431
|
|
|
10415
10432
|
case 5292:
|
|
10416
|
-
return a$1 + value + e +
|
|
10433
|
+
return a$1 + value + e + z$1(value, 'basis', 'preferred-size') + value;
|
|
10417
10434
|
// flex-grow
|
|
10418
10435
|
|
|
10419
10436
|
case 6060:
|
|
10420
|
-
return a$1 + 'box-' +
|
|
10437
|
+
return a$1 + 'box-' + z$1(value, '-grow', '') + a$1 + value + e + z$1(value, 'grow', 'positive') + value;
|
|
10421
10438
|
// transition
|
|
10422
10439
|
|
|
10423
10440
|
case 4554:
|
|
10424
|
-
return a$1 +
|
|
10441
|
+
return a$1 + z$1(value, /([^-])(transform)/g, '$1' + a$1 + '$2') + value;
|
|
10425
10442
|
// cursor
|
|
10426
10443
|
|
|
10427
10444
|
case 6187:
|
|
10428
|
-
return
|
|
10445
|
+
return z$1(z$1(z$1(value, /(zoom-|grab)/, a$1 + '$1'), /(image-set)/, a$1 + '$1'), value, '') + value;
|
|
10429
10446
|
// background, background-image
|
|
10430
10447
|
|
|
10431
10448
|
case 5495:
|
|
10432
10449
|
case 3959:
|
|
10433
|
-
return
|
|
10450
|
+
return z$1(value, /(image-set\([^]*)/, a$1 + '$1' + '$`$1');
|
|
10434
10451
|
// justify-content
|
|
10435
10452
|
|
|
10436
10453
|
case 4968:
|
|
10437
|
-
return
|
|
10454
|
+
return z$1(z$1(value, /(.+:)(flex-)?(.*)/, a$1 + 'box-pack:$3' + e + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + a$1 + value + value;
|
|
10438
10455
|
// (margin|padding)-inline-(start|end)
|
|
10439
10456
|
|
|
10440
10457
|
case 4095:
|
|
10441
10458
|
case 3583:
|
|
10442
10459
|
case 4068:
|
|
10443
10460
|
case 2532:
|
|
10444
|
-
return
|
|
10461
|
+
return z$1(value, /(.+)-inline(.+)/, a$1 + '$1$2') + value;
|
|
10445
10462
|
// (min|max)?(width|height|inline-size|block-size)
|
|
10446
10463
|
|
|
10447
10464
|
case 8116:
|
|
@@ -10457,54 +10474,54 @@
|
|
|
10457
10474
|
case 5021:
|
|
10458
10475
|
case 4765:
|
|
10459
10476
|
// stretch, max-content, min-content, fill-available
|
|
10460
|
-
if (
|
|
10477
|
+
if (M$1(value) - 1 - length > 6) switch (O$1(value, length + 1)) {
|
|
10461
10478
|
// (m)ax-content, (m)in-content
|
|
10462
10479
|
case 109:
|
|
10463
10480
|
// -
|
|
10464
|
-
if (
|
|
10481
|
+
if (O$1(value, length + 4) !== 45) break;
|
|
10465
10482
|
// (f)ill-available, (f)it-content
|
|
10466
10483
|
|
|
10467
10484
|
case 102:
|
|
10468
|
-
return
|
|
10485
|
+
return z$1(value, /(.+:)(.+)-([^]+)/, '$1' + a$1 + '$2-$3' + '$1' + r$1 + (O$1(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
10469
10486
|
// (s)tretch
|
|
10470
10487
|
|
|
10471
10488
|
case 115:
|
|
10472
|
-
return ~
|
|
10489
|
+
return ~C$1(value, 'stretch') ? prefix(z$1(value, 'stretch', 'fill-available'), length) + value : value;
|
|
10473
10490
|
}
|
|
10474
10491
|
break;
|
|
10475
10492
|
// position: sticky
|
|
10476
10493
|
|
|
10477
10494
|
case 4949:
|
|
10478
10495
|
// (s)ticky?
|
|
10479
|
-
if (
|
|
10496
|
+
if (O$1(value, length + 1) !== 115) break;
|
|
10480
10497
|
// display: (flex|inline-flex)
|
|
10481
10498
|
|
|
10482
10499
|
case 6444:
|
|
10483
|
-
switch (
|
|
10500
|
+
switch (O$1(value, M$1(value) - 3 - (~C$1(value, '!important') && 10))) {
|
|
10484
10501
|
// stic(k)y
|
|
10485
10502
|
case 107:
|
|
10486
|
-
return
|
|
10503
|
+
return z$1(value, ':', ':' + a$1) + value;
|
|
10487
10504
|
// (inline-)?fl(e)x
|
|
10488
10505
|
|
|
10489
10506
|
case 101:
|
|
10490
|
-
return
|
|
10507
|
+
return z$1(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + a$1 + (O$1(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + a$1 + '$2$3' + '$1' + e + '$2box$3') + value;
|
|
10491
10508
|
}
|
|
10492
10509
|
break;
|
|
10493
10510
|
// writing-mode
|
|
10494
10511
|
|
|
10495
10512
|
case 5936:
|
|
10496
|
-
switch (
|
|
10513
|
+
switch (O$1(value, length + 11)) {
|
|
10497
10514
|
// vertical-l(r)
|
|
10498
10515
|
case 114:
|
|
10499
|
-
return a$1 + value + e +
|
|
10516
|
+
return a$1 + value + e + z$1(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
10500
10517
|
// vertical-r(l)
|
|
10501
10518
|
|
|
10502
10519
|
case 108:
|
|
10503
|
-
return a$1 + value + e +
|
|
10520
|
+
return a$1 + value + e + z$1(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
10504
10521
|
// horizontal(-)tb
|
|
10505
10522
|
|
|
10506
10523
|
case 45:
|
|
10507
|
-
return a$1 + value + e +
|
|
10524
|
+
return a$1 + value + e + z$1(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
10508
10525
|
}
|
|
10509
10526
|
return a$1 + value + e + value + value;
|
|
10510
10527
|
}
|
|
@@ -10516,27 +10533,27 @@
|
|
|
10516
10533
|
element["return"] = prefix(element.value, element.length);
|
|
10517
10534
|
break;
|
|
10518
10535
|
case h$1:
|
|
10519
|
-
return
|
|
10520
|
-
value:
|
|
10536
|
+
return oe([K$1(element, {
|
|
10537
|
+
value: z$1(element.value, '@', '@' + a$1)
|
|
10521
10538
|
})], callback);
|
|
10522
10539
|
case c$1:
|
|
10523
|
-
if (element.length) return
|
|
10524
|
-
switch (
|
|
10540
|
+
if (element.length) return B$1(element.props, function (value) {
|
|
10541
|
+
switch (j$1(value, /(::plac\w+|:read-\w+)/)) {
|
|
10525
10542
|
// :read-(only|write)
|
|
10526
10543
|
case ':read-only':
|
|
10527
10544
|
case ':read-write':
|
|
10528
|
-
return
|
|
10529
|
-
props: [
|
|
10545
|
+
return oe([K$1(element, {
|
|
10546
|
+
props: [z$1(value, /:(read-\w+)/, ':' + r$1 + '$1')]
|
|
10530
10547
|
})], callback);
|
|
10531
10548
|
// :placeholder
|
|
10532
10549
|
|
|
10533
10550
|
case '::placeholder':
|
|
10534
|
-
return
|
|
10535
|
-
props: [
|
|
10536
|
-
}),
|
|
10537
|
-
props: [
|
|
10538
|
-
}),
|
|
10539
|
-
props: [
|
|
10551
|
+
return oe([K$1(element, {
|
|
10552
|
+
props: [z$1(value, /:(plac\w+)/, ':' + a$1 + 'input-$1')]
|
|
10553
|
+
}), K$1(element, {
|
|
10554
|
+
props: [z$1(value, /:(plac\w+)/, ':' + r$1 + '$1')]
|
|
10555
|
+
}), K$1(element, {
|
|
10556
|
+
props: [z$1(value, /:(plac\w+)/, e + 'input-$1')]
|
|
10540
10557
|
})], callback);
|
|
10541
10558
|
}
|
|
10542
10559
|
return '';
|
|
@@ -10605,7 +10622,7 @@
|
|
|
10605
10622
|
}
|
|
10606
10623
|
{
|
|
10607
10624
|
var currentSheet;
|
|
10608
|
-
var finalizingPlugins = [
|
|
10625
|
+
var finalizingPlugins = [le, function (element) {
|
|
10609
10626
|
if (!element.root) {
|
|
10610
10627
|
if (element["return"]) {
|
|
10611
10628
|
currentSheet.insert(element["return"]);
|
|
@@ -10616,9 +10633,9 @@
|
|
|
10616
10633
|
}
|
|
10617
10634
|
}
|
|
10618
10635
|
} ];
|
|
10619
|
-
var serializer =
|
|
10636
|
+
var serializer = ve(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
10620
10637
|
var stylis = function stylis(styles) {
|
|
10621
|
-
return
|
|
10638
|
+
return oe(ce(styles), serializer);
|
|
10622
10639
|
};
|
|
10623
10640
|
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
10624
10641
|
currentSheet = sheet;
|
|
@@ -10689,7 +10706,7 @@
|
|
|
10689
10706
|
if (cache.inserted[serialized.name] === undefined) {
|
|
10690
10707
|
var current = serialized;
|
|
10691
10708
|
do {
|
|
10692
|
-
|
|
10709
|
+
cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
10693
10710
|
current = current.next;
|
|
10694
10711
|
} while (current !== undefined);
|
|
10695
10712
|
}
|
|
@@ -10740,6 +10757,7 @@
|
|
|
10740
10757
|
|
|
10741
10758
|
var unitlessKeys = {
|
|
10742
10759
|
animationIterationCount: 1,
|
|
10760
|
+
aspectRatio: 1,
|
|
10743
10761
|
borderImageOutset: 1,
|
|
10744
10762
|
borderImageSlice: 1,
|
|
10745
10763
|
borderImageWidth: 1,
|
|
@@ -11287,43 +11305,43 @@
|
|
|
11287
11305
|
var character = 0;
|
|
11288
11306
|
while (true) {
|
|
11289
11307
|
previous = character;
|
|
11290
|
-
character =
|
|
11308
|
+
character = Q$1(); // &\f
|
|
11291
11309
|
|
|
11292
11310
|
if (previous === 38 && character === 12) {
|
|
11293
11311
|
points[index] = 1;
|
|
11294
11312
|
}
|
|
11295
|
-
if (
|
|
11313
|
+
if (U$1(character)) {
|
|
11296
11314
|
break;
|
|
11297
11315
|
}
|
|
11298
|
-
|
|
11316
|
+
P$1();
|
|
11299
11317
|
}
|
|
11300
|
-
return
|
|
11318
|
+
return T$1(begin, G$1);
|
|
11301
11319
|
};
|
|
11302
11320
|
var toRules$1 = function toRules(parsed, points) {
|
|
11303
11321
|
// pretend we've started with a comma
|
|
11304
11322
|
var index = -1;
|
|
11305
11323
|
var character = 44;
|
|
11306
11324
|
do {
|
|
11307
|
-
switch (
|
|
11325
|
+
switch (U$1(character)) {
|
|
11308
11326
|
case 0:
|
|
11309
11327
|
// &\f
|
|
11310
|
-
if (character === 38 &&
|
|
11328
|
+
if (character === 38 && Q$1() === 12) {
|
|
11311
11329
|
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
|
|
11312
11330
|
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
|
|
11313
11331
|
// and when it should just concatenate the outer and inner selectors
|
|
11314
11332
|
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
|
|
11315
11333
|
points[index] = 1;
|
|
11316
11334
|
}
|
|
11317
|
-
parsed[index] += identifierWithPointTracking$1(
|
|
11335
|
+
parsed[index] += identifierWithPointTracking$1(G$1 - 1, points, index);
|
|
11318
11336
|
break;
|
|
11319
11337
|
case 2:
|
|
11320
|
-
parsed[index] +=
|
|
11338
|
+
parsed[index] += X(character);
|
|
11321
11339
|
break;
|
|
11322
11340
|
case 4:
|
|
11323
11341
|
// comma
|
|
11324
11342
|
if (character === 44) {
|
|
11325
11343
|
// colon
|
|
11326
|
-
parsed[++index] =
|
|
11344
|
+
parsed[++index] = Q$1() === 58 ? '&\f' : '';
|
|
11327
11345
|
points[index] = parsed[index].length;
|
|
11328
11346
|
break;
|
|
11329
11347
|
}
|
|
@@ -11333,11 +11351,11 @@
|
|
|
11333
11351
|
default:
|
|
11334
11352
|
parsed[index] += k$1(character);
|
|
11335
11353
|
}
|
|
11336
|
-
} while (character =
|
|
11354
|
+
} while (character = P$1());
|
|
11337
11355
|
return parsed;
|
|
11338
11356
|
};
|
|
11339
11357
|
var getRules$1 = function getRules(value, points) {
|
|
11340
|
-
return
|
|
11358
|
+
return W(toRules$1(V$1(value), points));
|
|
11341
11359
|
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
|
|
11342
11360
|
|
|
11343
11361
|
var fixedElements$1 = /* #__PURE__ */new WeakMap();
|
|
@@ -11398,7 +11416,7 @@
|
|
|
11398
11416
|
if (element.type !== 'rule' || cache.compat) return;
|
|
11399
11417
|
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
|
11400
11418
|
if (unsafePseudoClasses) {
|
|
11401
|
-
var isNested = element.parent
|
|
11419
|
+
var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
|
|
11402
11420
|
//
|
|
11403
11421
|
// considering this input:
|
|
11404
11422
|
// .a {
|
|
@@ -11414,7 +11432,7 @@
|
|
|
11414
11432
|
// .b {}
|
|
11415
11433
|
// }
|
|
11416
11434
|
|
|
11417
|
-
var commentContainer = isNested ?
|
|
11435
|
+
var commentContainer = isNested ? element.parent.children :
|
|
11418
11436
|
// global rule at the root level
|
|
11419
11437
|
children;
|
|
11420
11438
|
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
|
@@ -11488,7 +11506,7 @@
|
|
|
11488
11506
|
/* eslint-disable no-fallthrough */
|
|
11489
11507
|
|
|
11490
11508
|
function prefix$1(value, length) {
|
|
11491
|
-
switch (
|
|
11509
|
+
switch (x$1(value, length)) {
|
|
11492
11510
|
// color-adjust
|
|
11493
11511
|
case 5103:
|
|
11494
11512
|
return a$1 + 'print-' + value + value;
|
|
@@ -11543,51 +11561,51 @@
|
|
|
11543
11561
|
// align-items
|
|
11544
11562
|
|
|
11545
11563
|
case 5187:
|
|
11546
|
-
return a$1 + value +
|
|
11564
|
+
return a$1 + value + z$1(value, /(\w+).+(:[^]+)/, a$1 + 'box-$1$2' + e + 'flex-$1$2') + value;
|
|
11547
11565
|
// align-self
|
|
11548
11566
|
|
|
11549
11567
|
case 5443:
|
|
11550
|
-
return a$1 + value + e + 'flex-item-' +
|
|
11568
|
+
return a$1 + value + e + 'flex-item-' + z$1(value, /flex-|-self/, '') + value;
|
|
11551
11569
|
// align-content
|
|
11552
11570
|
|
|
11553
11571
|
case 4675:
|
|
11554
|
-
return a$1 + value + e + 'flex-line-pack' +
|
|
11572
|
+
return a$1 + value + e + 'flex-line-pack' + z$1(value, /align-content|flex-|-self/, '') + value;
|
|
11555
11573
|
// flex-shrink
|
|
11556
11574
|
|
|
11557
11575
|
case 5548:
|
|
11558
|
-
return a$1 + value + e +
|
|
11576
|
+
return a$1 + value + e + z$1(value, 'shrink', 'negative') + value;
|
|
11559
11577
|
// flex-basis
|
|
11560
11578
|
|
|
11561
11579
|
case 5292:
|
|
11562
|
-
return a$1 + value + e +
|
|
11580
|
+
return a$1 + value + e + z$1(value, 'basis', 'preferred-size') + value;
|
|
11563
11581
|
// flex-grow
|
|
11564
11582
|
|
|
11565
11583
|
case 6060:
|
|
11566
|
-
return a$1 + 'box-' +
|
|
11584
|
+
return a$1 + 'box-' + z$1(value, '-grow', '') + a$1 + value + e + z$1(value, 'grow', 'positive') + value;
|
|
11567
11585
|
// transition
|
|
11568
11586
|
|
|
11569
11587
|
case 4554:
|
|
11570
|
-
return a$1 +
|
|
11588
|
+
return a$1 + z$1(value, /([^-])(transform)/g, '$1' + a$1 + '$2') + value;
|
|
11571
11589
|
// cursor
|
|
11572
11590
|
|
|
11573
11591
|
case 6187:
|
|
11574
|
-
return
|
|
11592
|
+
return z$1(z$1(z$1(value, /(zoom-|grab)/, a$1 + '$1'), /(image-set)/, a$1 + '$1'), value, '') + value;
|
|
11575
11593
|
// background, background-image
|
|
11576
11594
|
|
|
11577
11595
|
case 5495:
|
|
11578
11596
|
case 3959:
|
|
11579
|
-
return
|
|
11597
|
+
return z$1(value, /(image-set\([^]*)/, a$1 + '$1' + '$`$1');
|
|
11580
11598
|
// justify-content
|
|
11581
11599
|
|
|
11582
11600
|
case 4968:
|
|
11583
|
-
return
|
|
11601
|
+
return z$1(z$1(value, /(.+:)(flex-)?(.*)/, a$1 + 'box-pack:$3' + e + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + a$1 + value + value;
|
|
11584
11602
|
// (margin|padding)-inline-(start|end)
|
|
11585
11603
|
|
|
11586
11604
|
case 4095:
|
|
11587
11605
|
case 3583:
|
|
11588
11606
|
case 4068:
|
|
11589
11607
|
case 2532:
|
|
11590
|
-
return
|
|
11608
|
+
return z$1(value, /(.+)-inline(.+)/, a$1 + '$1$2') + value;
|
|
11591
11609
|
// (min|max)?(width|height|inline-size|block-size)
|
|
11592
11610
|
|
|
11593
11611
|
case 8116:
|
|
@@ -11603,54 +11621,54 @@
|
|
|
11603
11621
|
case 5021:
|
|
11604
11622
|
case 4765:
|
|
11605
11623
|
// stretch, max-content, min-content, fill-available
|
|
11606
|
-
if (
|
|
11624
|
+
if (M$1(value) - 1 - length > 6) switch (O$1(value, length + 1)) {
|
|
11607
11625
|
// (m)ax-content, (m)in-content
|
|
11608
11626
|
case 109:
|
|
11609
11627
|
// -
|
|
11610
|
-
if (
|
|
11628
|
+
if (O$1(value, length + 4) !== 45) break;
|
|
11611
11629
|
// (f)ill-available, (f)it-content
|
|
11612
11630
|
|
|
11613
11631
|
case 102:
|
|
11614
|
-
return
|
|
11632
|
+
return z$1(value, /(.+:)(.+)-([^]+)/, '$1' + a$1 + '$2-$3' + '$1' + r$1 + (O$1(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
11615
11633
|
// (s)tretch
|
|
11616
11634
|
|
|
11617
11635
|
case 115:
|
|
11618
|
-
return ~
|
|
11636
|
+
return ~C$1(value, 'stretch') ? prefix$1(z$1(value, 'stretch', 'fill-available'), length) + value : value;
|
|
11619
11637
|
}
|
|
11620
11638
|
break;
|
|
11621
11639
|
// position: sticky
|
|
11622
11640
|
|
|
11623
11641
|
case 4949:
|
|
11624
11642
|
// (s)ticky?
|
|
11625
|
-
if (
|
|
11643
|
+
if (O$1(value, length + 1) !== 115) break;
|
|
11626
11644
|
// display: (flex|inline-flex)
|
|
11627
11645
|
|
|
11628
11646
|
case 6444:
|
|
11629
|
-
switch (
|
|
11647
|
+
switch (O$1(value, M$1(value) - 3 - (~C$1(value, '!important') && 10))) {
|
|
11630
11648
|
// stic(k)y
|
|
11631
11649
|
case 107:
|
|
11632
|
-
return
|
|
11650
|
+
return z$1(value, ':', ':' + a$1) + value;
|
|
11633
11651
|
// (inline-)?fl(e)x
|
|
11634
11652
|
|
|
11635
11653
|
case 101:
|
|
11636
|
-
return
|
|
11654
|
+
return z$1(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + a$1 + (O$1(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + a$1 + '$2$3' + '$1' + e + '$2box$3') + value;
|
|
11637
11655
|
}
|
|
11638
11656
|
break;
|
|
11639
11657
|
// writing-mode
|
|
11640
11658
|
|
|
11641
11659
|
case 5936:
|
|
11642
|
-
switch (
|
|
11660
|
+
switch (O$1(value, length + 11)) {
|
|
11643
11661
|
// vertical-l(r)
|
|
11644
11662
|
case 114:
|
|
11645
|
-
return a$1 + value + e +
|
|
11663
|
+
return a$1 + value + e + z$1(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
11646
11664
|
// vertical-r(l)
|
|
11647
11665
|
|
|
11648
11666
|
case 108:
|
|
11649
|
-
return a$1 + value + e +
|
|
11667
|
+
return a$1 + value + e + z$1(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
11650
11668
|
// horizontal(-)tb
|
|
11651
11669
|
|
|
11652
11670
|
case 45:
|
|
11653
|
-
return a$1 + value + e +
|
|
11671
|
+
return a$1 + value + e + z$1(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
11654
11672
|
}
|
|
11655
11673
|
return a$1 + value + e + value + value;
|
|
11656
11674
|
}
|
|
@@ -11662,27 +11680,27 @@
|
|
|
11662
11680
|
element["return"] = prefix$1(element.value, element.length);
|
|
11663
11681
|
break;
|
|
11664
11682
|
case h$1:
|
|
11665
|
-
return
|
|
11666
|
-
value:
|
|
11683
|
+
return oe([K$1(element, {
|
|
11684
|
+
value: z$1(element.value, '@', '@' + a$1)
|
|
11667
11685
|
})], callback);
|
|
11668
11686
|
case c$1:
|
|
11669
|
-
if (element.length) return
|
|
11670
|
-
switch (
|
|
11687
|
+
if (element.length) return B$1(element.props, function (value) {
|
|
11688
|
+
switch (j$1(value, /(::plac\w+|:read-\w+)/)) {
|
|
11671
11689
|
// :read-(only|write)
|
|
11672
11690
|
case ':read-only':
|
|
11673
11691
|
case ':read-write':
|
|
11674
|
-
return
|
|
11675
|
-
props: [
|
|
11692
|
+
return oe([K$1(element, {
|
|
11693
|
+
props: [z$1(value, /:(read-\w+)/, ':' + r$1 + '$1')]
|
|
11676
11694
|
})], callback);
|
|
11677
11695
|
// :placeholder
|
|
11678
11696
|
|
|
11679
11697
|
case '::placeholder':
|
|
11680
|
-
return
|
|
11681
|
-
props: [
|
|
11682
|
-
}),
|
|
11683
|
-
props: [
|
|
11684
|
-
}),
|
|
11685
|
-
props: [
|
|
11698
|
+
return oe([K$1(element, {
|
|
11699
|
+
props: [z$1(value, /:(plac\w+)/, ':' + a$1 + 'input-$1')]
|
|
11700
|
+
}), K$1(element, {
|
|
11701
|
+
props: [z$1(value, /:(plac\w+)/, ':' + r$1 + '$1')]
|
|
11702
|
+
}), K$1(element, {
|
|
11703
|
+
props: [z$1(value, /:(plac\w+)/, e + 'input-$1')]
|
|
11686
11704
|
})], callback);
|
|
11687
11705
|
}
|
|
11688
11706
|
return '';
|
|
@@ -11751,7 +11769,7 @@
|
|
|
11751
11769
|
}
|
|
11752
11770
|
{
|
|
11753
11771
|
var currentSheet;
|
|
11754
|
-
var finalizingPlugins = [
|
|
11772
|
+
var finalizingPlugins = [le, function (element) {
|
|
11755
11773
|
if (!element.root) {
|
|
11756
11774
|
if (element["return"]) {
|
|
11757
11775
|
currentSheet.insert(element["return"]);
|
|
@@ -11762,9 +11780,9 @@
|
|
|
11762
11780
|
}
|
|
11763
11781
|
}
|
|
11764
11782
|
} ];
|
|
11765
|
-
var serializer =
|
|
11783
|
+
var serializer = ve(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
11766
11784
|
var stylis = function stylis(styles) {
|
|
11767
|
-
return
|
|
11785
|
+
return oe(ce(styles), serializer);
|
|
11768
11786
|
};
|
|
11769
11787
|
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
11770
11788
|
currentSheet = sheet;
|
|
@@ -11845,6 +11863,7 @@
|
|
|
11845
11863
|
|
|
11846
11864
|
var unitlessKeys$1 = {
|
|
11847
11865
|
animationIterationCount: 1,
|
|
11866
|
+
aspectRatio: 1,
|
|
11848
11867
|
borderImageOutset: 1,
|
|
11849
11868
|
borderImageSlice: 1,
|
|
11850
11869
|
borderImageWidth: 1,
|
|
@@ -12181,7 +12200,7 @@
|
|
|
12181
12200
|
if (cache.inserted[serialized.name] === undefined) {
|
|
12182
12201
|
var current = serialized;
|
|
12183
12202
|
do {
|
|
12184
|
-
|
|
12203
|
+
cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
12185
12204
|
current = current.next;
|
|
12186
12205
|
} while (current !== undefined);
|
|
12187
12206
|
}
|
|
@@ -13062,12 +13081,12 @@
|
|
|
13062
13081
|
return theme.colors && theme.colors.primaryColor ? "0 0 0 2px " + rgba(theme.colors.primaryColor, 0.3) : '';
|
|
13063
13082
|
}, function (props) {
|
|
13064
13083
|
return props.info ? info : null;
|
|
13065
|
-
}, function (props) {
|
|
13066
|
-
return props.primary ? primary : null;
|
|
13067
13084
|
}, function (props) {
|
|
13068
13085
|
return props.disabled ? disabled : null;
|
|
13069
13086
|
}, function (props) {
|
|
13070
13087
|
return props.large && large;
|
|
13088
|
+
}, function (props) {
|
|
13089
|
+
return props.primary ? primary : null;
|
|
13071
13090
|
});
|
|
13072
13091
|
var loadMoreContainer = css({
|
|
13073
13092
|
margin: '5px 0',
|
|
@@ -17539,10 +17558,10 @@
|
|
|
17539
17558
|
};
|
|
17540
17559
|
|
|
17541
17560
|
/**!
|
|
17542
|
-
* hotkeys-js v3.10.
|
|
17561
|
+
* hotkeys-js v3.10.2
|
|
17543
17562
|
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
|
|
17544
17563
|
*
|
|
17545
|
-
* Copyright (c)
|
|
17564
|
+
* Copyright (c) 2023 kenny wong <wowohoo@qq.com>
|
|
17546
17565
|
* http://jaywcjlove.github.io/hotkeys
|
|
17547
17566
|
* Licensed under the MIT license
|
|
17548
17567
|
*/
|
|
@@ -24800,7 +24819,7 @@
|
|
|
24800
24819
|
var enterButton = _ref.enterButton;
|
|
24801
24820
|
return enterButton && "\n\t\t border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\t";
|
|
24802
24821
|
});
|
|
24803
|
-
var SendButton = styled(Button)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n\tborder: none;\n\tcolor: #ffffff;\n\tcursor: pointer;\n\tfont-size: 16px;\n\tmargin-left: 8px;\n\toutline: none;\n\tpadding: 10px;\n\ttext-align: center;\n"])));
|
|
24822
|
+
var SendButton = styled(Button)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n\tborder: none;\n\tcolor: #ffffff;\n\tcursor: pointer;\n\tfont-size: 16px;\n\tmargin-left: 8px;\n\toutline: none;\n\tpadding: 10px;\n\ttext-align: center;\n\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t}\n"])));
|
|
24804
24823
|
var AIFeedbackContainer = styled('div')(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n\t.--feedback-svgs-wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t\tgap: 5px;\n\n\t\tsvg {\n\t\t\tcursor: pointer;\n\t\t\ttransition: all ease-in 0.1s;\n\t\t\t&.selected {\n\t\t\t\ttransform: scale(1.1);\n\t\t\t\tcursor: default;\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\ttransform: scale(1.1);\n\t\t\t}\n\t\t}\n\t}\n\n\t.--feedback-input-wrapper {\n\t\tdisplay: flex;\n\t\tgap: 7px;\n\t}\n"])));
|
|
24805
24824
|
|
|
24806
24825
|
var _templateObject$k, _templateObject2$8, _templateObject3$6, _templateObject4$3, _templateObject5$3, _templateObject6$2, _templateObject7$1;
|
|
@@ -26436,6 +26455,9 @@
|
|
|
26436
26455
|
},
|
|
26437
26456
|
shouldShowComponent: function shouldShowComponent() {
|
|
26438
26457
|
return this.showComponent;
|
|
26458
|
+
},
|
|
26459
|
+
errorMessageForMissingSessionId: function errorMessageForMissingSessionId() {
|
|
26460
|
+
return "AISessionId for " + this.$props.componentId + " is missing! AIAnswer component requires an AISessionId to function. Try reloading the App.";
|
|
26439
26461
|
}
|
|
26440
26462
|
},
|
|
26441
26463
|
props: {
|
|
@@ -26493,9 +26515,15 @@
|
|
|
26493
26515
|
finalMessages.push.apply(finalMessages, messagesHistory.filter(function (msg) {
|
|
26494
26516
|
return msg.role !== constants_7$1.SYSTEM;
|
|
26495
26517
|
}));
|
|
26518
|
+
} else if (response && response.answer && response.answer.text) {
|
|
26519
|
+
finalMessages.push({
|
|
26520
|
+
role: constants_7$1.ASSISTANT,
|
|
26521
|
+
content: response.answer.text
|
|
26522
|
+
});
|
|
26523
|
+
this.error = {
|
|
26524
|
+
message: this.errorMessageForMissingSessionId
|
|
26525
|
+
};
|
|
26496
26526
|
}
|
|
26497
|
-
// fresh response
|
|
26498
|
-
if (response && response.answer) ;
|
|
26499
26527
|
this.messages = finalMessages;
|
|
26500
26528
|
} else if (!newVal && !this.error) {
|
|
26501
26529
|
this.messages = [];
|
|
@@ -26514,7 +26542,7 @@
|
|
|
26514
26542
|
this.$emit('on-data', {
|
|
26515
26543
|
data: this.messages,
|
|
26516
26544
|
rawData: this.$props.rawData,
|
|
26517
|
-
loading: newVal || this
|
|
26545
|
+
loading: newVal || this.isLoading,
|
|
26518
26546
|
error: this.$props.AIResponseError
|
|
26519
26547
|
});
|
|
26520
26548
|
},
|
|
@@ -26523,7 +26551,7 @@
|
|
|
26523
26551
|
this.$emit('on-data', {
|
|
26524
26552
|
data: this.messages,
|
|
26525
26553
|
rawData: this.$props.rawData,
|
|
26526
|
-
loading: newVal || this
|
|
26554
|
+
loading: newVal || this.isAIResponseLoading,
|
|
26527
26555
|
error: this.$props.AIResponseError
|
|
26528
26556
|
});
|
|
26529
26557
|
},
|
|
@@ -26535,10 +26563,17 @@
|
|
|
26535
26563
|
AIResponseError: function AIResponseError(newVal) {
|
|
26536
26564
|
this.error = newVal;
|
|
26537
26565
|
this.AISessionId = ((helper_2(constants_8$1) || {})[this.$props.componentId] || {}).sessionId || null;
|
|
26566
|
+
if (this.error && !this.AISessionId) {
|
|
26567
|
+
var errorMessage = this.errorMessageForMissingSessionId;
|
|
26568
|
+
this.error = {
|
|
26569
|
+
message: errorMessage
|
|
26570
|
+
};
|
|
26571
|
+
console.error(errorMessage);
|
|
26572
|
+
}
|
|
26538
26573
|
this.$emit('on-data', {
|
|
26539
26574
|
data: this.messages,
|
|
26540
26575
|
rawData: this.$props.rawData,
|
|
26541
|
-
loading: this
|
|
26576
|
+
loading: this.isAIResponseLoading || this.isLoading,
|
|
26542
26577
|
error: newVal
|
|
26543
26578
|
});
|
|
26544
26579
|
},
|
|
@@ -26583,9 +26618,9 @@
|
|
|
26583
26618
|
}]);
|
|
26584
26619
|
this.getAIResponse(this.AISessionId, this.componentId, text);
|
|
26585
26620
|
} else {
|
|
26586
|
-
console.error(
|
|
26621
|
+
console.error(this.errorMessageForMissingSessionId);
|
|
26587
26622
|
this.error = {
|
|
26588
|
-
message: "AISessionId for " + this.$props.componentId + " is missing! AIAnswer component requires an
|
|
26623
|
+
message: "AISessionId for " + this.$props.componentId + " is missing! AIAnswer component requires an AISessionId to function. Trying reloading the App."
|
|
26589
26624
|
};
|
|
26590
26625
|
}
|
|
26591
26626
|
this.inputMessage = '';
|
|
@@ -26599,7 +26634,7 @@
|
|
|
26599
26634
|
this.getAIResponse(this.AISessionId, this.componentId, lastUserRequestMessage);
|
|
26600
26635
|
this.inputMessage = '';
|
|
26601
26636
|
} else {
|
|
26602
|
-
console.error("AISessionId for " + this.componentId + " is missing! AIAnswer component requires an
|
|
26637
|
+
console.error("AISessionId for " + this.componentId + " is missing! AIAnswer component requires an AISessionId to function. Try reloading the App.");
|
|
26603
26638
|
}
|
|
26604
26639
|
}
|
|
26605
26640
|
},
|
|
@@ -26682,7 +26717,7 @@
|
|
|
26682
26717
|
"positionType": "absolute"
|
|
26683
26718
|
}, {
|
|
26684
26719
|
"default": function _default() {
|
|
26685
|
-
return [_this2.shouldMicRender(showVoiceInput) && vue.createVNode(Mic, {
|
|
26720
|
+
return [!_this2.isLoadingState && _this2.AISessionId && _this2.shouldMicRender(showVoiceInput) && vue.createVNode(Mic, {
|
|
26686
26721
|
"getInstance": getMicInstance,
|
|
26687
26722
|
"render": renderMic,
|
|
26688
26723
|
"handleResult": _this2.handleVoiceResults,
|
|
@@ -26727,7 +26762,8 @@
|
|
|
26727
26762
|
"tabIndex": 0,
|
|
26728
26763
|
"onClick": _this3.handleSendMessage,
|
|
26729
26764
|
"onKeyPress": _this3.handleKeyPress,
|
|
26730
|
-
"class": "enter-btn " + helper_31(innerClass, 'ai-enter-button')
|
|
26765
|
+
"class": "enter-btn " + helper_31(innerClass, 'ai-enter-button'),
|
|
26766
|
+
"disabled": _this3.isLoadingState || !_this3.AISessionId
|
|
26731
26767
|
}, {
|
|
26732
26768
|
"default": function _default() {
|
|
26733
26769
|
return [vue.createTextVNode("Send")];
|
|
@@ -26886,7 +26922,7 @@
|
|
|
26886
26922
|
"showIcon": props.showIcon,
|
|
26887
26923
|
"iconPosition": props.iconPosition,
|
|
26888
26924
|
"themePreset": _this4.themePreset,
|
|
26889
|
-
"disabled": _this4.isLoadingState,
|
|
26925
|
+
"disabled": _this4.isLoadingState || !_this4.AISessionId,
|
|
26890
26926
|
"class": helper_31(props.innerClass, 'ai-input') || null
|
|
26891
26927
|
}, null), ' ', _this4.renderIcons()];
|
|
26892
26928
|
}
|
|
@@ -34250,7 +34286,7 @@
|
|
|
34250
34286
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
34251
34287
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
34252
34288
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
34253
|
-
|
|
34289
|
+
console.log('sdfsd');
|
|
34254
34290
|
})
|
|
34255
34291
|
}, [vue.renderSlot(_ctx.$slots, "default")]);
|
|
34256
34292
|
}
|
|
@@ -34288,14 +34324,252 @@
|
|
|
34288
34324
|
return a !== a && b !== b;
|
|
34289
34325
|
};
|
|
34290
34326
|
|
|
34291
|
-
|
|
34327
|
+
var ARRAY_TYPES = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];
|
|
34328
|
+
|
|
34329
|
+
/** @typedef {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor} TypedArrayConstructor */
|
|
34330
|
+
|
|
34331
|
+
var VERSION = 1; // serialized format version
|
|
34332
|
+
var HEADER_SIZE = 8;
|
|
34333
|
+
var KDBush = /*#__PURE__*/function () {
|
|
34334
|
+
/**
|
|
34335
|
+
* Creates an index from raw `ArrayBuffer` data.
|
|
34336
|
+
* @param {ArrayBuffer} data
|
|
34337
|
+
*/
|
|
34338
|
+
KDBush.from = function from(data) {
|
|
34339
|
+
if (!(data instanceof ArrayBuffer)) {
|
|
34340
|
+
throw new Error('Data must be an instance of ArrayBuffer.');
|
|
34341
|
+
}
|
|
34342
|
+
var _Uint8Array = new Uint8Array(data, 0, 2),
|
|
34343
|
+
magic = _Uint8Array[0],
|
|
34344
|
+
versionAndType = _Uint8Array[1];
|
|
34345
|
+
if (magic !== 0xdb) {
|
|
34346
|
+
throw new Error('Data does not appear to be in a KDBush format.');
|
|
34347
|
+
}
|
|
34348
|
+
var version = versionAndType >> 4;
|
|
34349
|
+
if (version !== VERSION) {
|
|
34350
|
+
throw new Error("Got v" + version + " data when expected v" + VERSION + ".");
|
|
34351
|
+
}
|
|
34352
|
+
var ArrayType = ARRAY_TYPES[versionAndType & 0x0f];
|
|
34353
|
+
if (!ArrayType) {
|
|
34354
|
+
throw new Error('Unrecognized array type.');
|
|
34355
|
+
}
|
|
34356
|
+
var _Uint16Array = new Uint16Array(data, 2, 1),
|
|
34357
|
+
nodeSize = _Uint16Array[0];
|
|
34358
|
+
var _Uint32Array = new Uint32Array(data, 4, 1),
|
|
34359
|
+
numItems = _Uint32Array[0];
|
|
34360
|
+
return new KDBush(numItems, nodeSize, ArrayType, data);
|
|
34361
|
+
}
|
|
34362
|
+
|
|
34363
|
+
/**
|
|
34364
|
+
* Creates an index that will hold a given number of items.
|
|
34365
|
+
* @param {number} numItems
|
|
34366
|
+
* @param {number} [nodeSize=64] Size of the KD-tree node (64 by default).
|
|
34367
|
+
* @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).
|
|
34368
|
+
* @param {ArrayBuffer} [data] (For internal use only)
|
|
34369
|
+
*/;
|
|
34370
|
+
function KDBush(numItems, nodeSize, ArrayType, data) {
|
|
34371
|
+
if (nodeSize === void 0) {
|
|
34372
|
+
nodeSize = 64;
|
|
34373
|
+
}
|
|
34374
|
+
if (ArrayType === void 0) {
|
|
34375
|
+
ArrayType = Float64Array;
|
|
34376
|
+
}
|
|
34377
|
+
if (isNaN(numItems) || numItems < 0) throw new Error("Unpexpected numItems value: " + numItems + ".");
|
|
34378
|
+
this.numItems = +numItems;
|
|
34379
|
+
this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);
|
|
34380
|
+
this.ArrayType = ArrayType;
|
|
34381
|
+
this.IndexArrayType = numItems < 65536 ? Uint16Array : Uint32Array;
|
|
34382
|
+
var arrayTypeIndex = ARRAY_TYPES.indexOf(this.ArrayType);
|
|
34383
|
+
var coordsByteSize = numItems * 2 * this.ArrayType.BYTES_PER_ELEMENT;
|
|
34384
|
+
var idsByteSize = numItems * this.IndexArrayType.BYTES_PER_ELEMENT;
|
|
34385
|
+
var padCoords = (8 - idsByteSize % 8) % 8;
|
|
34386
|
+
if (arrayTypeIndex < 0) {
|
|
34387
|
+
throw new Error("Unexpected typed array class: " + ArrayType + ".");
|
|
34388
|
+
}
|
|
34389
|
+
if (data && data instanceof ArrayBuffer) {
|
|
34390
|
+
// reconstruct an index from a buffer
|
|
34391
|
+
this.data = data;
|
|
34392
|
+
this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);
|
|
34393
|
+
this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);
|
|
34394
|
+
this._pos = numItems * 2;
|
|
34395
|
+
this._finished = true;
|
|
34396
|
+
} else {
|
|
34397
|
+
// initialize a new index
|
|
34398
|
+
this.data = new ArrayBuffer(HEADER_SIZE + coordsByteSize + idsByteSize + padCoords);
|
|
34399
|
+
this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);
|
|
34400
|
+
this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);
|
|
34401
|
+
this._pos = 0;
|
|
34402
|
+
this._finished = false;
|
|
34403
|
+
|
|
34404
|
+
// set header
|
|
34405
|
+
new Uint8Array(this.data, 0, 2).set([0xdb, (VERSION << 4) + arrayTypeIndex]);
|
|
34406
|
+
new Uint16Array(this.data, 2, 1)[0] = nodeSize;
|
|
34407
|
+
new Uint32Array(this.data, 4, 1)[0] = numItems;
|
|
34408
|
+
}
|
|
34409
|
+
}
|
|
34410
|
+
|
|
34411
|
+
/**
|
|
34412
|
+
* Add a point to the index.
|
|
34413
|
+
* @param {number} x
|
|
34414
|
+
* @param {number} y
|
|
34415
|
+
* @returns {number} An incremental index associated with the added item (starting from `0`).
|
|
34416
|
+
*/
|
|
34417
|
+
var _proto = KDBush.prototype;
|
|
34418
|
+
_proto.add = function add(x, y) {
|
|
34419
|
+
var index = this._pos >> 1;
|
|
34420
|
+
this.ids[index] = index;
|
|
34421
|
+
this.coords[this._pos++] = x;
|
|
34422
|
+
this.coords[this._pos++] = y;
|
|
34423
|
+
return index;
|
|
34424
|
+
}
|
|
34425
|
+
|
|
34426
|
+
/**
|
|
34427
|
+
* Perform indexing of the added points.
|
|
34428
|
+
*/;
|
|
34429
|
+
_proto.finish = function finish() {
|
|
34430
|
+
var numAdded = this._pos >> 1;
|
|
34431
|
+
if (numAdded !== this.numItems) {
|
|
34432
|
+
throw new Error("Added " + numAdded + " items when expected " + this.numItems + ".");
|
|
34433
|
+
}
|
|
34434
|
+
// kd-sort both arrays for efficient search
|
|
34435
|
+
sort(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0);
|
|
34436
|
+
this._finished = true;
|
|
34437
|
+
return this;
|
|
34438
|
+
}
|
|
34439
|
+
|
|
34440
|
+
/**
|
|
34441
|
+
* Search the index for items within a given bounding box.
|
|
34442
|
+
* @param {number} minX
|
|
34443
|
+
* @param {number} minY
|
|
34444
|
+
* @param {number} maxX
|
|
34445
|
+
* @param {number} maxY
|
|
34446
|
+
* @returns {number[]} An array of indices correponding to the found items.
|
|
34447
|
+
*/;
|
|
34448
|
+
_proto.range = function range(minX, minY, maxX, maxY) {
|
|
34449
|
+
if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');
|
|
34450
|
+
var ids = this.ids,
|
|
34451
|
+
coords = this.coords,
|
|
34452
|
+
nodeSize = this.nodeSize;
|
|
34453
|
+
var stack = [0, ids.length - 1, 0];
|
|
34454
|
+
var result = [];
|
|
34455
|
+
|
|
34456
|
+
// recursively search for items in range in the kd-sorted arrays
|
|
34457
|
+
while (stack.length) {
|
|
34458
|
+
var axis = stack.pop() || 0;
|
|
34459
|
+
var right = stack.pop() || 0;
|
|
34460
|
+
var left = stack.pop() || 0;
|
|
34461
|
+
|
|
34462
|
+
// if we reached "tree node", search linearly
|
|
34463
|
+
if (right - left <= nodeSize) {
|
|
34464
|
+
for (var i = left; i <= right; i++) {
|
|
34465
|
+
var _x = coords[2 * i];
|
|
34466
|
+
var _y = coords[2 * i + 1];
|
|
34467
|
+
if (_x >= minX && _x <= maxX && _y >= minY && _y <= maxY) result.push(ids[i]);
|
|
34468
|
+
}
|
|
34469
|
+
continue;
|
|
34470
|
+
}
|
|
34471
|
+
|
|
34472
|
+
// otherwise find the middle index
|
|
34473
|
+
var m = left + right >> 1;
|
|
34474
|
+
|
|
34475
|
+
// include the middle item if it's in range
|
|
34476
|
+
var x = coords[2 * m];
|
|
34477
|
+
var y = coords[2 * m + 1];
|
|
34478
|
+
if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);
|
|
34479
|
+
|
|
34480
|
+
// queue search in halves that intersect the query
|
|
34481
|
+
if (axis === 0 ? minX <= x : minY <= y) {
|
|
34482
|
+
stack.push(left);
|
|
34483
|
+
stack.push(m - 1);
|
|
34484
|
+
stack.push(1 - axis);
|
|
34485
|
+
}
|
|
34486
|
+
if (axis === 0 ? maxX >= x : maxY >= y) {
|
|
34487
|
+
stack.push(m + 1);
|
|
34488
|
+
stack.push(right);
|
|
34489
|
+
stack.push(1 - axis);
|
|
34490
|
+
}
|
|
34491
|
+
}
|
|
34492
|
+
return result;
|
|
34493
|
+
}
|
|
34494
|
+
|
|
34495
|
+
/**
|
|
34496
|
+
* Search the index for items within a given radius.
|
|
34497
|
+
* @param {number} qx
|
|
34498
|
+
* @param {number} qy
|
|
34499
|
+
* @param {number} r Query radius.
|
|
34500
|
+
* @returns {number[]} An array of indices correponding to the found items.
|
|
34501
|
+
*/;
|
|
34502
|
+
_proto.within = function within(qx, qy, r) {
|
|
34503
|
+
if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');
|
|
34504
|
+
var ids = this.ids,
|
|
34505
|
+
coords = this.coords,
|
|
34506
|
+
nodeSize = this.nodeSize;
|
|
34507
|
+
var stack = [0, ids.length - 1, 0];
|
|
34508
|
+
var result = [];
|
|
34509
|
+
var r2 = r * r;
|
|
34510
|
+
|
|
34511
|
+
// recursively search for items within radius in the kd-sorted arrays
|
|
34512
|
+
while (stack.length) {
|
|
34513
|
+
var axis = stack.pop() || 0;
|
|
34514
|
+
var right = stack.pop() || 0;
|
|
34515
|
+
var left = stack.pop() || 0;
|
|
34516
|
+
|
|
34517
|
+
// if we reached "tree node", search linearly
|
|
34518
|
+
if (right - left <= nodeSize) {
|
|
34519
|
+
for (var i = left; i <= right; i++) {
|
|
34520
|
+
if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);
|
|
34521
|
+
}
|
|
34522
|
+
continue;
|
|
34523
|
+
}
|
|
34524
|
+
|
|
34525
|
+
// otherwise find the middle index
|
|
34526
|
+
var m = left + right >> 1;
|
|
34527
|
+
|
|
34528
|
+
// include the middle item if it's in range
|
|
34529
|
+
var x = coords[2 * m];
|
|
34530
|
+
var y = coords[2 * m + 1];
|
|
34531
|
+
if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);
|
|
34532
|
+
|
|
34533
|
+
// queue search in halves that intersect the query
|
|
34534
|
+
if (axis === 0 ? qx - r <= x : qy - r <= y) {
|
|
34535
|
+
stack.push(left);
|
|
34536
|
+
stack.push(m - 1);
|
|
34537
|
+
stack.push(1 - axis);
|
|
34538
|
+
}
|
|
34539
|
+
if (axis === 0 ? qx + r >= x : qy + r >= y) {
|
|
34540
|
+
stack.push(m + 1);
|
|
34541
|
+
stack.push(right);
|
|
34542
|
+
stack.push(1 - axis);
|
|
34543
|
+
}
|
|
34544
|
+
}
|
|
34545
|
+
return result;
|
|
34546
|
+
};
|
|
34547
|
+
return KDBush;
|
|
34548
|
+
}();
|
|
34549
|
+
function sort(ids, coords, nodeSize, left, right, axis) {
|
|
34292
34550
|
if (right - left <= nodeSize) return;
|
|
34293
|
-
var m = left + right >> 1;
|
|
34294
|
-
|
|
34295
|
-
|
|
34296
|
-
|
|
34551
|
+
var m = left + right >> 1; // middle index
|
|
34552
|
+
|
|
34553
|
+
// sort ids and coords around the middle index so that the halves lie
|
|
34554
|
+
// either left/right or top/bottom correspondingly (taking turns)
|
|
34555
|
+
select(ids, coords, m, left, right, axis);
|
|
34556
|
+
|
|
34557
|
+
// recursively kd-sort first half and second half on the opposite axis
|
|
34558
|
+
sort(ids, coords, nodeSize, left, m - 1, 1 - axis);
|
|
34559
|
+
sort(ids, coords, nodeSize, m + 1, right, 1 - axis);
|
|
34297
34560
|
}
|
|
34298
|
-
|
|
34561
|
+
|
|
34562
|
+
/**
|
|
34563
|
+
* Custom Floyd-Rivest selection algorithm: sort ids and coords so that
|
|
34564
|
+
* [left..k-1] items are smaller than k-th item (on either x or y axis)
|
|
34565
|
+
* @param {Uint16Array | Uint32Array} ids
|
|
34566
|
+
* @param {InstanceType<TypedArrayConstructor>} coords
|
|
34567
|
+
* @param {number} k
|
|
34568
|
+
* @param {number} left
|
|
34569
|
+
* @param {number} right
|
|
34570
|
+
* @param {number} axis
|
|
34571
|
+
*/
|
|
34572
|
+
function select(ids, coords, k, left, right, axis) {
|
|
34299
34573
|
while (right > left) {
|
|
34300
34574
|
if (right - left > 600) {
|
|
34301
34575
|
var n = right - left + 1;
|
|
@@ -34305,21 +34579,21 @@
|
|
|
34305
34579
|
var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);
|
|
34306
34580
|
var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));
|
|
34307
34581
|
var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));
|
|
34308
|
-
select(ids, coords, k, newLeft, newRight,
|
|
34582
|
+
select(ids, coords, k, newLeft, newRight, axis);
|
|
34309
34583
|
}
|
|
34310
|
-
var t = coords[2 * k +
|
|
34584
|
+
var t = coords[2 * k + axis];
|
|
34311
34585
|
var i = left;
|
|
34312
34586
|
var j = right;
|
|
34313
34587
|
swapItem(ids, coords, left, k);
|
|
34314
|
-
if (coords[2 * right +
|
|
34588
|
+
if (coords[2 * right + axis] > t) swapItem(ids, coords, left, right);
|
|
34315
34589
|
while (i < j) {
|
|
34316
34590
|
swapItem(ids, coords, i, j);
|
|
34317
34591
|
i++;
|
|
34318
34592
|
j--;
|
|
34319
|
-
while (coords[2 * i +
|
|
34320
|
-
while (coords[2 * j +
|
|
34593
|
+
while (coords[2 * i + axis] < t) i++;
|
|
34594
|
+
while (coords[2 * j + axis] > t) j--;
|
|
34321
34595
|
}
|
|
34322
|
-
if (coords[2 * left +
|
|
34596
|
+
if (coords[2 * left + axis] === t) swapItem(ids, coords, left, j);else {
|
|
34323
34597
|
j++;
|
|
34324
34598
|
swapItem(ids, coords, j, right);
|
|
34325
34599
|
}
|
|
@@ -34327,132 +34601,42 @@
|
|
|
34327
34601
|
if (k <= j) right = j - 1;
|
|
34328
34602
|
}
|
|
34329
34603
|
}
|
|
34604
|
+
|
|
34605
|
+
/**
|
|
34606
|
+
* @param {Uint16Array | Uint32Array} ids
|
|
34607
|
+
* @param {InstanceType<TypedArrayConstructor>} coords
|
|
34608
|
+
* @param {number} i
|
|
34609
|
+
* @param {number} j
|
|
34610
|
+
*/
|
|
34330
34611
|
function swapItem(ids, coords, i, j) {
|
|
34331
34612
|
swap(ids, i, j);
|
|
34332
34613
|
swap(coords, 2 * i, 2 * j);
|
|
34333
34614
|
swap(coords, 2 * i + 1, 2 * j + 1);
|
|
34334
34615
|
}
|
|
34616
|
+
|
|
34617
|
+
/**
|
|
34618
|
+
* @param {InstanceType<TypedArrayConstructor>} arr
|
|
34619
|
+
* @param {number} i
|
|
34620
|
+
* @param {number} j
|
|
34621
|
+
*/
|
|
34335
34622
|
function swap(arr, i, j) {
|
|
34336
34623
|
var tmp = arr[i];
|
|
34337
34624
|
arr[i] = arr[j];
|
|
34338
34625
|
arr[j] = tmp;
|
|
34339
34626
|
}
|
|
34340
34627
|
|
|
34341
|
-
|
|
34342
|
-
|
|
34343
|
-
|
|
34344
|
-
|
|
34345
|
-
|
|
34346
|
-
|
|
34347
|
-
var right = stack.pop();
|
|
34348
|
-
var left = stack.pop();
|
|
34349
|
-
if (right - left <= nodeSize) {
|
|
34350
|
-
for (var i = left; i <= right; i++) {
|
|
34351
|
-
x = coords[2 * i];
|
|
34352
|
-
y = coords[2 * i + 1];
|
|
34353
|
-
if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);
|
|
34354
|
-
}
|
|
34355
|
-
continue;
|
|
34356
|
-
}
|
|
34357
|
-
var m = Math.floor((left + right) / 2);
|
|
34358
|
-
x = coords[2 * m];
|
|
34359
|
-
y = coords[2 * m + 1];
|
|
34360
|
-
if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);
|
|
34361
|
-
var nextAxis = (axis + 1) % 2;
|
|
34362
|
-
if (axis === 0 ? minX <= x : minY <= y) {
|
|
34363
|
-
stack.push(left);
|
|
34364
|
-
stack.push(m - 1);
|
|
34365
|
-
stack.push(nextAxis);
|
|
34366
|
-
}
|
|
34367
|
-
if (axis === 0 ? maxX >= x : maxY >= y) {
|
|
34368
|
-
stack.push(m + 1);
|
|
34369
|
-
stack.push(right);
|
|
34370
|
-
stack.push(nextAxis);
|
|
34371
|
-
}
|
|
34372
|
-
}
|
|
34373
|
-
return result;
|
|
34374
|
-
}
|
|
34375
|
-
|
|
34376
|
-
function within(ids, coords, qx, qy, r, nodeSize) {
|
|
34377
|
-
var stack = [0, ids.length - 1, 0];
|
|
34378
|
-
var result = [];
|
|
34379
|
-
var r2 = r * r;
|
|
34380
|
-
while (stack.length) {
|
|
34381
|
-
var axis = stack.pop();
|
|
34382
|
-
var right = stack.pop();
|
|
34383
|
-
var left = stack.pop();
|
|
34384
|
-
if (right - left <= nodeSize) {
|
|
34385
|
-
for (var i = left; i <= right; i++) {
|
|
34386
|
-
if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);
|
|
34387
|
-
}
|
|
34388
|
-
continue;
|
|
34389
|
-
}
|
|
34390
|
-
var m = Math.floor((left + right) / 2);
|
|
34391
|
-
var x = coords[2 * m];
|
|
34392
|
-
var y = coords[2 * m + 1];
|
|
34393
|
-
if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);
|
|
34394
|
-
var nextAxis = (axis + 1) % 2;
|
|
34395
|
-
if (axis === 0 ? qx - r <= x : qy - r <= y) {
|
|
34396
|
-
stack.push(left);
|
|
34397
|
-
stack.push(m - 1);
|
|
34398
|
-
stack.push(nextAxis);
|
|
34399
|
-
}
|
|
34400
|
-
if (axis === 0 ? qx + r >= x : qy + r >= y) {
|
|
34401
|
-
stack.push(m + 1);
|
|
34402
|
-
stack.push(right);
|
|
34403
|
-
stack.push(nextAxis);
|
|
34404
|
-
}
|
|
34405
|
-
}
|
|
34406
|
-
return result;
|
|
34407
|
-
}
|
|
34628
|
+
/**
|
|
34629
|
+
* @param {number} ax
|
|
34630
|
+
* @param {number} ay
|
|
34631
|
+
* @param {number} bx
|
|
34632
|
+
* @param {number} by
|
|
34633
|
+
*/
|
|
34408
34634
|
function sqDist(ax, ay, bx, by) {
|
|
34409
34635
|
var dx = ax - bx;
|
|
34410
34636
|
var dy = ay - by;
|
|
34411
34637
|
return dx * dx + dy * dy;
|
|
34412
34638
|
}
|
|
34413
34639
|
|
|
34414
|
-
var defaultGetX = function defaultGetX(p) {
|
|
34415
|
-
return p[0];
|
|
34416
|
-
};
|
|
34417
|
-
var defaultGetY = function defaultGetY(p) {
|
|
34418
|
-
return p[1];
|
|
34419
|
-
};
|
|
34420
|
-
var KDBush = /*#__PURE__*/function () {
|
|
34421
|
-
function KDBush(points, getX, getY, nodeSize, ArrayType) {
|
|
34422
|
-
if (getX === void 0) {
|
|
34423
|
-
getX = defaultGetX;
|
|
34424
|
-
}
|
|
34425
|
-
if (getY === void 0) {
|
|
34426
|
-
getY = defaultGetY;
|
|
34427
|
-
}
|
|
34428
|
-
if (nodeSize === void 0) {
|
|
34429
|
-
nodeSize = 64;
|
|
34430
|
-
}
|
|
34431
|
-
if (ArrayType === void 0) {
|
|
34432
|
-
ArrayType = Float64Array;
|
|
34433
|
-
}
|
|
34434
|
-
this.nodeSize = nodeSize;
|
|
34435
|
-
this.points = points;
|
|
34436
|
-
var IndexArrayType = points.length < 65536 ? Uint16Array : Uint32Array;
|
|
34437
|
-
var ids = this.ids = new IndexArrayType(points.length);
|
|
34438
|
-
var coords = this.coords = new ArrayType(points.length * 2);
|
|
34439
|
-
for (var i = 0; i < points.length; i++) {
|
|
34440
|
-
ids[i] = i;
|
|
34441
|
-
coords[2 * i] = getX(points[i]);
|
|
34442
|
-
coords[2 * i + 1] = getY(points[i]);
|
|
34443
|
-
}
|
|
34444
|
-
sortKD(ids, coords, nodeSize, 0, ids.length - 1, 0);
|
|
34445
|
-
}
|
|
34446
|
-
var _proto = KDBush.prototype;
|
|
34447
|
-
_proto.range = function range$1(minX, minY, maxX, maxY) {
|
|
34448
|
-
return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);
|
|
34449
|
-
};
|
|
34450
|
-
_proto.within = function within$1(x, y, r) {
|
|
34451
|
-
return within(this.ids, this.coords, x, y, r, this.nodeSize);
|
|
34452
|
-
};
|
|
34453
|
-
return KDBush;
|
|
34454
|
-
}();
|
|
34455
|
-
|
|
34456
34640
|
var defaultOptions = {
|
|
34457
34641
|
minZoom: 0,
|
|
34458
34642
|
// min zoom to generate clusters on
|
|
@@ -34487,30 +34671,55 @@
|
|
|
34487
34671
|
return tmp[0];
|
|
34488
34672
|
};
|
|
34489
34673
|
}(new Float32Array(1));
|
|
34674
|
+
var OFFSET_ZOOM = 2;
|
|
34675
|
+
var OFFSET_ID = 3;
|
|
34676
|
+
var OFFSET_PARENT = 4;
|
|
34677
|
+
var OFFSET_NUM = 5;
|
|
34678
|
+
var OFFSET_PROP = 6;
|
|
34490
34679
|
var Supercluster = /*#__PURE__*/function () {
|
|
34491
34680
|
function Supercluster(options) {
|
|
34492
|
-
this.options =
|
|
34681
|
+
this.options = Object.assign(Object.create(defaultOptions), options);
|
|
34493
34682
|
this.trees = new Array(this.options.maxZoom + 1);
|
|
34683
|
+
this.stride = this.options.reduce ? 7 : 6;
|
|
34684
|
+
this.clusterProps = [];
|
|
34494
34685
|
}
|
|
34495
34686
|
var _proto = Supercluster.prototype;
|
|
34496
34687
|
_proto.load = function load(points) {
|
|
34497
34688
|
var _this$options = this.options,
|
|
34498
34689
|
log = _this$options.log,
|
|
34499
34690
|
minZoom = _this$options.minZoom,
|
|
34500
|
-
maxZoom = _this$options.maxZoom
|
|
34501
|
-
nodeSize = _this$options.nodeSize;
|
|
34691
|
+
maxZoom = _this$options.maxZoom;
|
|
34502
34692
|
if (log) console.time('total time');
|
|
34503
34693
|
var timerId = "prepare " + points.length + " points";
|
|
34504
34694
|
if (log) console.time(timerId);
|
|
34505
34695
|
this.points = points;
|
|
34506
34696
|
|
|
34507
34697
|
// generate a cluster object for each point and index input points into a KD-tree
|
|
34508
|
-
var
|
|
34698
|
+
var data = [];
|
|
34509
34699
|
for (var i = 0; i < points.length; i++) {
|
|
34510
|
-
|
|
34511
|
-
|
|
34700
|
+
var p = points[i];
|
|
34701
|
+
if (!p.geometry) continue;
|
|
34702
|
+
var _p$geometry$coordinat = p.geometry.coordinates,
|
|
34703
|
+
lng = _p$geometry$coordinat[0],
|
|
34704
|
+
lat = _p$geometry$coordinat[1];
|
|
34705
|
+
var x = fround(lngX(lng));
|
|
34706
|
+
var y = fround(latY(lat));
|
|
34707
|
+
// store internal point/cluster data in flat numeric arrays for performance
|
|
34708
|
+
data.push(x, y,
|
|
34709
|
+
// projected point coordinates
|
|
34710
|
+
Infinity,
|
|
34711
|
+
// the last zoom the point was processed at
|
|
34712
|
+
i,
|
|
34713
|
+
// index of the source feature in the original input array
|
|
34714
|
+
-1,
|
|
34715
|
+
// parent cluster id
|
|
34716
|
+
1 // number of points in a cluster
|
|
34717
|
+
);
|
|
34718
|
+
|
|
34719
|
+
if (this.options.reduce) data.push(0); // noop
|
|
34512
34720
|
}
|
|
34513
|
-
|
|
34721
|
+
|
|
34722
|
+
var tree = this.trees[maxZoom + 1] = this._createTree(data);
|
|
34514
34723
|
if (log) console.timeEnd(timerId);
|
|
34515
34724
|
|
|
34516
34725
|
// cluster points on max zoom, then cluster the results on previous zoom, etc.;
|
|
@@ -34519,9 +34728,8 @@
|
|
|
34519
34728
|
var now = +Date.now();
|
|
34520
34729
|
|
|
34521
34730
|
// create a new set of clusters for the zoom and index them with a KD-tree
|
|
34522
|
-
|
|
34523
|
-
|
|
34524
|
-
if (log) console.log('z%d: %d clusters in %dms', z, clusters.length, +Date.now() - now);
|
|
34731
|
+
tree = this.trees[z] = this._createTree(this._cluster(tree, z));
|
|
34732
|
+
if (log) console.log('z%d: %d clusters in %dms', z, tree.numItems, +Date.now() - now);
|
|
34525
34733
|
}
|
|
34526
34734
|
if (log) console.timeEnd('total time');
|
|
34527
34735
|
return this;
|
|
@@ -34541,11 +34749,12 @@
|
|
|
34541
34749
|
}
|
|
34542
34750
|
var tree = this.trees[this._limitZoom(zoom)];
|
|
34543
34751
|
var ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat));
|
|
34752
|
+
var data = tree.data;
|
|
34544
34753
|
var clusters = [];
|
|
34545
34754
|
for (var _iterator = _createForOfIteratorHelperLoose(ids), _step; !(_step = _iterator()).done;) {
|
|
34546
34755
|
var id = _step.value;
|
|
34547
|
-
var
|
|
34548
|
-
clusters.push(
|
|
34756
|
+
var k = this.stride * id;
|
|
34757
|
+
clusters.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);
|
|
34549
34758
|
}
|
|
34550
34759
|
return clusters;
|
|
34551
34760
|
};
|
|
@@ -34553,18 +34762,20 @@
|
|
|
34553
34762
|
var originId = this._getOriginId(clusterId);
|
|
34554
34763
|
var originZoom = this._getOriginZoom(clusterId);
|
|
34555
34764
|
var errorMsg = 'No cluster with the specified id.';
|
|
34556
|
-
var
|
|
34557
|
-
if (!
|
|
34558
|
-
var
|
|
34559
|
-
if (
|
|
34765
|
+
var tree = this.trees[originZoom];
|
|
34766
|
+
if (!tree) throw new Error(errorMsg);
|
|
34767
|
+
var data = tree.data;
|
|
34768
|
+
if (originId * this.stride >= data.length) throw new Error(errorMsg);
|
|
34560
34769
|
var r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1));
|
|
34561
|
-
var
|
|
34770
|
+
var x = data[originId * this.stride];
|
|
34771
|
+
var y = data[originId * this.stride + 1];
|
|
34772
|
+
var ids = tree.within(x, y, r);
|
|
34562
34773
|
var children = [];
|
|
34563
34774
|
for (var _iterator2 = _createForOfIteratorHelperLoose(ids), _step2; !(_step2 = _iterator2()).done;) {
|
|
34564
34775
|
var id = _step2.value;
|
|
34565
|
-
var
|
|
34566
|
-
if (
|
|
34567
|
-
children.push(
|
|
34776
|
+
var k = id * this.stride;
|
|
34777
|
+
if (data[k + OFFSET_PARENT] === clusterId) {
|
|
34778
|
+
children.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);
|
|
34568
34779
|
}
|
|
34569
34780
|
}
|
|
34570
34781
|
if (children.length === 0) throw new Error(errorMsg);
|
|
@@ -34589,12 +34800,12 @@
|
|
|
34589
34800
|
var tile = {
|
|
34590
34801
|
features: []
|
|
34591
34802
|
};
|
|
34592
|
-
this._addTileFeatures(tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom), tree.
|
|
34803
|
+
this._addTileFeatures(tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom), tree.data, x, y, z2, tile);
|
|
34593
34804
|
if (x === 0) {
|
|
34594
|
-
this._addTileFeatures(tree.range(1 - p / z2, top, 1, bottom), tree.
|
|
34805
|
+
this._addTileFeatures(tree.range(1 - p / z2, top, 1, bottom), tree.data, z2, y, z2, tile);
|
|
34595
34806
|
}
|
|
34596
34807
|
if (x === z2 - 1) {
|
|
34597
|
-
this._addTileFeatures(tree.range(0, top, p / z2, bottom), tree.
|
|
34808
|
+
this._addTileFeatures(tree.range(0, top, p / z2, bottom), tree.data, -1, y, z2, tile);
|
|
34598
34809
|
}
|
|
34599
34810
|
return tile.features.length ? tile : null;
|
|
34600
34811
|
};
|
|
@@ -34633,23 +34844,33 @@
|
|
|
34633
34844
|
}
|
|
34634
34845
|
return skipped;
|
|
34635
34846
|
};
|
|
34636
|
-
_proto.
|
|
34847
|
+
_proto._createTree = function _createTree(data) {
|
|
34848
|
+
var tree = new KDBush(data.length / this.stride | 0, this.options.nodeSize, Float32Array);
|
|
34849
|
+
for (var i = 0; i < data.length; i += this.stride) tree.add(data[i], data[i + 1]);
|
|
34850
|
+
tree.finish();
|
|
34851
|
+
tree.data = data;
|
|
34852
|
+
return tree;
|
|
34853
|
+
};
|
|
34854
|
+
_proto._addTileFeatures = function _addTileFeatures(ids, data, x, y, z2, tile) {
|
|
34637
34855
|
for (var _iterator4 = _createForOfIteratorHelperLoose(ids), _step4; !(_step4 = _iterator4()).done;) {
|
|
34638
34856
|
var i = _step4.value;
|
|
34639
|
-
var
|
|
34640
|
-
var isCluster =
|
|
34857
|
+
var k = i * this.stride;
|
|
34858
|
+
var isCluster = data[k + OFFSET_NUM] > 1;
|
|
34641
34859
|
var tags = void 0,
|
|
34642
34860
|
px = void 0,
|
|
34643
34861
|
py = void 0;
|
|
34644
34862
|
if (isCluster) {
|
|
34645
|
-
tags = getClusterProperties(
|
|
34646
|
-
px =
|
|
34647
|
-
py =
|
|
34863
|
+
tags = getClusterProperties(data, k, this.clusterProps);
|
|
34864
|
+
px = data[k];
|
|
34865
|
+
py = data[k + 1];
|
|
34648
34866
|
} else {
|
|
34649
|
-
var p = this.points[
|
|
34867
|
+
var p = this.points[data[k + OFFSET_ID]];
|
|
34650
34868
|
tags = p.properties;
|
|
34651
|
-
|
|
34652
|
-
|
|
34869
|
+
var _p$geometry$coordinat2 = p.geometry.coordinates,
|
|
34870
|
+
lng = _p$geometry$coordinat2[0],
|
|
34871
|
+
lat = _p$geometry$coordinat2[1];
|
|
34872
|
+
px = lngX(lng);
|
|
34873
|
+
py = latY(lat);
|
|
34653
34874
|
}
|
|
34654
34875
|
var f = {
|
|
34655
34876
|
type: 1,
|
|
@@ -34659,14 +34880,12 @@
|
|
|
34659
34880
|
|
|
34660
34881
|
// assign id
|
|
34661
34882
|
var id = void 0;
|
|
34662
|
-
if (isCluster) {
|
|
34663
|
-
id
|
|
34664
|
-
|
|
34665
|
-
|
|
34666
|
-
id = c.index;
|
|
34667
|
-
} else if (this.points[c.index].id) {
|
|
34883
|
+
if (isCluster || this.options.generateId) {
|
|
34884
|
+
// optionally generate id for points
|
|
34885
|
+
id = data[k + OFFSET_ID];
|
|
34886
|
+
} else {
|
|
34668
34887
|
// keep id if already assigned
|
|
34669
|
-
id = this.points[
|
|
34888
|
+
id = this.points[data[k + OFFSET_ID]].id;
|
|
34670
34889
|
}
|
|
34671
34890
|
if (id !== undefined) f.id = id;
|
|
34672
34891
|
tile.features.push(f);
|
|
@@ -34675,76 +34894,84 @@
|
|
|
34675
34894
|
_proto._limitZoom = function _limitZoom(z) {
|
|
34676
34895
|
return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));
|
|
34677
34896
|
};
|
|
34678
|
-
_proto._cluster = function _cluster(
|
|
34679
|
-
var clusters = [];
|
|
34897
|
+
_proto._cluster = function _cluster(tree, zoom) {
|
|
34680
34898
|
var _this$options3 = this.options,
|
|
34681
34899
|
radius = _this$options3.radius,
|
|
34682
34900
|
extent = _this$options3.extent,
|
|
34683
34901
|
reduce = _this$options3.reduce,
|
|
34684
34902
|
minPoints = _this$options3.minPoints;
|
|
34685
34903
|
var r = radius / (extent * Math.pow(2, zoom));
|
|
34904
|
+
var data = tree.data;
|
|
34905
|
+
var nextData = [];
|
|
34906
|
+
var stride = this.stride;
|
|
34686
34907
|
|
|
34687
34908
|
// loop through each point
|
|
34688
|
-
for (var i = 0; i <
|
|
34689
|
-
var p = points[i];
|
|
34909
|
+
for (var i = 0; i < data.length; i += stride) {
|
|
34690
34910
|
// if we've already visited the point at this zoom level, skip it
|
|
34691
|
-
if (
|
|
34692
|
-
|
|
34911
|
+
if (data[i + OFFSET_ZOOM] <= zoom) continue;
|
|
34912
|
+
data[i + OFFSET_ZOOM] = zoom;
|
|
34693
34913
|
|
|
34694
34914
|
// find all nearby points
|
|
34695
|
-
var
|
|
34696
|
-
var
|
|
34697
|
-
var
|
|
34915
|
+
var x = data[i];
|
|
34916
|
+
var y = data[i + 1];
|
|
34917
|
+
var neighborIds = tree.within(data[i], data[i + 1], r);
|
|
34918
|
+
var numPointsOrigin = data[i + OFFSET_NUM];
|
|
34698
34919
|
var numPoints = numPointsOrigin;
|
|
34699
34920
|
|
|
34700
34921
|
// count the number of points in a potential cluster
|
|
34701
34922
|
for (var _iterator5 = _createForOfIteratorHelperLoose(neighborIds), _step5; !(_step5 = _iterator5()).done;) {
|
|
34702
34923
|
var _neighborId2 = _step5.value;
|
|
34703
|
-
var
|
|
34924
|
+
var _k2 = _neighborId2 * stride;
|
|
34704
34925
|
// filter out neighbors that are already processed
|
|
34705
|
-
if (
|
|
34926
|
+
if (data[_k2 + OFFSET_ZOOM] > zoom) numPoints += data[_k2 + OFFSET_NUM];
|
|
34706
34927
|
}
|
|
34707
34928
|
|
|
34708
34929
|
// if there were neighbors to merge, and there are enough points to form a cluster
|
|
34709
34930
|
if (numPoints > numPointsOrigin && numPoints >= minPoints) {
|
|
34710
|
-
var wx =
|
|
34711
|
-
var wy =
|
|
34712
|
-
var clusterProperties =
|
|
34931
|
+
var wx = x * numPointsOrigin;
|
|
34932
|
+
var wy = y * numPointsOrigin;
|
|
34933
|
+
var clusterProperties = void 0;
|
|
34934
|
+
var clusterPropIndex = -1;
|
|
34713
34935
|
|
|
34714
34936
|
// encode both zoom and point index on which the cluster originated -- offset by total length of features
|
|
34715
|
-
var id = (i << 5) + (zoom + 1) + this.points.length;
|
|
34937
|
+
var id = ((i / stride | 0) << 5) + (zoom + 1) + this.points.length;
|
|
34716
34938
|
for (var _iterator6 = _createForOfIteratorHelperLoose(neighborIds), _step6; !(_step6 = _iterator6()).done;) {
|
|
34717
34939
|
var neighborId = _step6.value;
|
|
34718
|
-
var
|
|
34719
|
-
if (
|
|
34720
|
-
|
|
34721
|
-
|
|
34722
|
-
var numPoints2 =
|
|
34723
|
-
wx +=
|
|
34724
|
-
wy +=
|
|
34725
|
-
|
|
34940
|
+
var k = neighborId * stride;
|
|
34941
|
+
if (data[k + OFFSET_ZOOM] <= zoom) continue;
|
|
34942
|
+
data[k + OFFSET_ZOOM] = zoom; // save the zoom (so it doesn't get processed twice)
|
|
34943
|
+
|
|
34944
|
+
var numPoints2 = data[k + OFFSET_NUM];
|
|
34945
|
+
wx += data[k] * numPoints2; // accumulate coordinates for calculating weighted center
|
|
34946
|
+
wy += data[k + 1] * numPoints2;
|
|
34947
|
+
data[k + OFFSET_PARENT] = id;
|
|
34726
34948
|
if (reduce) {
|
|
34727
|
-
if (!clusterProperties)
|
|
34728
|
-
|
|
34949
|
+
if (!clusterProperties) {
|
|
34950
|
+
clusterProperties = this._map(data, i, true);
|
|
34951
|
+
clusterPropIndex = this.clusterProps.length;
|
|
34952
|
+
this.clusterProps.push(clusterProperties);
|
|
34953
|
+
}
|
|
34954
|
+
reduce(clusterProperties, this._map(data, k));
|
|
34729
34955
|
}
|
|
34730
34956
|
}
|
|
34731
|
-
|
|
34732
|
-
|
|
34957
|
+
data[i + OFFSET_PARENT] = id;
|
|
34958
|
+
nextData.push(wx / numPoints, wy / numPoints, Infinity, id, -1, numPoints);
|
|
34959
|
+
if (reduce) nextData.push(clusterPropIndex);
|
|
34733
34960
|
} else {
|
|
34734
34961
|
// left points as unclustered
|
|
34735
|
-
|
|
34962
|
+
for (var j = 0; j < stride; j++) nextData.push(data[i + j]);
|
|
34736
34963
|
if (numPoints > 1) {
|
|
34737
34964
|
for (var _iterator7 = _createForOfIteratorHelperLoose(neighborIds), _step7; !(_step7 = _iterator7()).done;) {
|
|
34738
34965
|
var _neighborId = _step7.value;
|
|
34739
|
-
var
|
|
34740
|
-
if (
|
|
34741
|
-
|
|
34742
|
-
|
|
34966
|
+
var _k = _neighborId * stride;
|
|
34967
|
+
if (data[_k + OFFSET_ZOOM] <= zoom) continue;
|
|
34968
|
+
data[_k + OFFSET_ZOOM] = zoom;
|
|
34969
|
+
for (var _j = 0; _j < stride; _j++) nextData.push(data[_k + _j]);
|
|
34743
34970
|
}
|
|
34744
34971
|
}
|
|
34745
34972
|
}
|
|
34746
34973
|
}
|
|
34747
|
-
return
|
|
34974
|
+
return nextData;
|
|
34748
34975
|
}
|
|
34749
34976
|
|
|
34750
34977
|
// get index of the point from which the cluster originated
|
|
@@ -34758,64 +34985,36 @@
|
|
|
34758
34985
|
_proto._getOriginZoom = function _getOriginZoom(clusterId) {
|
|
34759
34986
|
return (clusterId - this.points.length) % 32;
|
|
34760
34987
|
};
|
|
34761
|
-
_proto._map = function _map(
|
|
34762
|
-
if (
|
|
34763
|
-
|
|
34988
|
+
_proto._map = function _map(data, i, clone) {
|
|
34989
|
+
if (data[i + OFFSET_NUM] > 1) {
|
|
34990
|
+
var props = this.clusterProps[data[i + OFFSET_PROP]];
|
|
34991
|
+
return clone ? Object.assign({}, props) : props;
|
|
34764
34992
|
}
|
|
34765
|
-
var original = this.points[
|
|
34993
|
+
var original = this.points[data[i + OFFSET_ID]].properties;
|
|
34766
34994
|
var result = this.options.map(original);
|
|
34767
|
-
return clone && result === original ?
|
|
34995
|
+
return clone && result === original ? Object.assign({}, result) : result;
|
|
34768
34996
|
};
|
|
34769
34997
|
return Supercluster;
|
|
34770
34998
|
}();
|
|
34771
|
-
function
|
|
34772
|
-
return {
|
|
34773
|
-
x: fround(x),
|
|
34774
|
-
// weighted cluster center; round for consistency with Float32Array index
|
|
34775
|
-
y: fround(y),
|
|
34776
|
-
zoom: Infinity,
|
|
34777
|
-
// the last zoom the cluster was processed at
|
|
34778
|
-
id: id,
|
|
34779
|
-
// encodes index of the first child of the cluster and its zoom level
|
|
34780
|
-
parentId: -1,
|
|
34781
|
-
// parent cluster id
|
|
34782
|
-
numPoints: numPoints,
|
|
34783
|
-
properties: properties
|
|
34784
|
-
};
|
|
34785
|
-
}
|
|
34786
|
-
function createPointCluster(p, id) {
|
|
34787
|
-
var _p$geometry$coordinat = p.geometry.coordinates,
|
|
34788
|
-
x = _p$geometry$coordinat[0],
|
|
34789
|
-
y = _p$geometry$coordinat[1];
|
|
34790
|
-
return {
|
|
34791
|
-
x: fround(lngX(x)),
|
|
34792
|
-
// projected point coordinates
|
|
34793
|
-
y: fround(latY(y)),
|
|
34794
|
-
zoom: Infinity,
|
|
34795
|
-
// the last zoom the point was processed at
|
|
34796
|
-
index: id,
|
|
34797
|
-
// index of the source feature in the original input array,
|
|
34798
|
-
parentId: -1 // parent cluster id
|
|
34799
|
-
};
|
|
34800
|
-
}
|
|
34801
|
-
|
|
34802
|
-
function getClusterJSON(cluster) {
|
|
34999
|
+
function getClusterJSON(data, i, clusterProps) {
|
|
34803
35000
|
return {
|
|
34804
35001
|
type: 'Feature',
|
|
34805
|
-
id:
|
|
34806
|
-
properties: getClusterProperties(
|
|
35002
|
+
id: data[i + OFFSET_ID],
|
|
35003
|
+
properties: getClusterProperties(data, i, clusterProps),
|
|
34807
35004
|
geometry: {
|
|
34808
35005
|
type: 'Point',
|
|
34809
|
-
coordinates: [xLng(
|
|
35006
|
+
coordinates: [xLng(data[i]), yLat(data[i + 1])]
|
|
34810
35007
|
}
|
|
34811
35008
|
};
|
|
34812
35009
|
}
|
|
34813
|
-
function getClusterProperties(
|
|
34814
|
-
var count =
|
|
35010
|
+
function getClusterProperties(data, i, clusterProps) {
|
|
35011
|
+
var count = data[i + OFFSET_NUM];
|
|
34815
35012
|
var abbrev = count >= 10000 ? Math.round(count / 1000) + "k" : count >= 1000 ? Math.round(count / 100) / 10 + "k" : count;
|
|
34816
|
-
|
|
35013
|
+
var propIndex = data[i + OFFSET_PROP];
|
|
35014
|
+
var properties = propIndex === -1 ? {} : Object.assign({}, clusterProps[propIndex]);
|
|
35015
|
+
return Object.assign(properties, {
|
|
34817
35016
|
cluster: true,
|
|
34818
|
-
cluster_id:
|
|
35017
|
+
cluster_id: data[i + OFFSET_ID],
|
|
34819
35018
|
point_count: count,
|
|
34820
35019
|
point_count_abbreviated: abbrev
|
|
34821
35020
|
});
|
|
@@ -34839,16 +35038,6 @@
|
|
|
34839
35038
|
var y2 = (180 - y * 360) * Math.PI / 180;
|
|
34840
35039
|
return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90;
|
|
34841
35040
|
}
|
|
34842
|
-
function extend(dest, src) {
|
|
34843
|
-
for (var id in src) dest[id] = src[id];
|
|
34844
|
-
return dest;
|
|
34845
|
-
}
|
|
34846
|
-
function getX(p) {
|
|
34847
|
-
return p.x;
|
|
34848
|
-
}
|
|
34849
|
-
function getY(p) {
|
|
34850
|
-
return p.y;
|
|
34851
|
-
}
|
|
34852
35041
|
|
|
34853
35042
|
/*! *****************************************************************************
|
|
34854
35043
|
Copyright (c) Microsoft Corporation.
|
|
@@ -34874,6 +35063,64 @@
|
|
|
34874
35063
|
return t;
|
|
34875
35064
|
}
|
|
34876
35065
|
|
|
35066
|
+
/**
|
|
35067
|
+
* Copyright 2023 Google LLC
|
|
35068
|
+
*
|
|
35069
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
35070
|
+
* you may not use this file except in compliance with the License.
|
|
35071
|
+
* You may obtain a copy of the License at
|
|
35072
|
+
*
|
|
35073
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
35074
|
+
*
|
|
35075
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
35076
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
35077
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
35078
|
+
* See the License for the specific language governing permissions and
|
|
35079
|
+
* limitations under the License.
|
|
35080
|
+
*/
|
|
35081
|
+
var MarkerUtils = /*#__PURE__*/function () {
|
|
35082
|
+
function MarkerUtils() {}
|
|
35083
|
+
MarkerUtils.isAdvancedMarker = function isAdvancedMarker(marker) {
|
|
35084
|
+
return google.maps.marker && marker instanceof google.maps.marker.AdvancedMarkerElement;
|
|
35085
|
+
};
|
|
35086
|
+
MarkerUtils.setMap = function setMap(marker, map) {
|
|
35087
|
+
if (this.isAdvancedMarker(marker)) {
|
|
35088
|
+
marker.map = map;
|
|
35089
|
+
} else {
|
|
35090
|
+
marker.setMap(map);
|
|
35091
|
+
}
|
|
35092
|
+
};
|
|
35093
|
+
MarkerUtils.getPosition = function getPosition(marker) {
|
|
35094
|
+
// SuperClusterAlgorithm.calculate expects a LatLng instance so we fake it for Adv Markers
|
|
35095
|
+
if (this.isAdvancedMarker(marker)) {
|
|
35096
|
+
if (marker.position) {
|
|
35097
|
+
if (marker.position instanceof google.maps.LatLng) {
|
|
35098
|
+
return marker.position;
|
|
35099
|
+
}
|
|
35100
|
+
// since we can't cast to LatLngLiteral for reasons =(
|
|
35101
|
+
if (marker.position.lat && marker.position.lng) {
|
|
35102
|
+
return new google.maps.LatLng(marker.position.lat, marker.position.lng);
|
|
35103
|
+
}
|
|
35104
|
+
}
|
|
35105
|
+
return new google.maps.LatLng(null);
|
|
35106
|
+
}
|
|
35107
|
+
return marker.getPosition();
|
|
35108
|
+
};
|
|
35109
|
+
MarkerUtils.getVisible = function getVisible(marker) {
|
|
35110
|
+
if (this.isAdvancedMarker(marker)) {
|
|
35111
|
+
/**
|
|
35112
|
+
* Always return true for Advanced Markers because the clusterer
|
|
35113
|
+
* uses getVisible as a way to count legacy markers not as an actual
|
|
35114
|
+
* indicator of visibility for some reason. Even when markers are hidden
|
|
35115
|
+
* Marker.getVisible returns `true` and this is used to set the marker count
|
|
35116
|
+
* on the cluster. See the behavior of Cluster.count
|
|
35117
|
+
*/
|
|
35118
|
+
return true;
|
|
35119
|
+
}
|
|
35120
|
+
return marker.getVisible();
|
|
35121
|
+
};
|
|
35122
|
+
return MarkerUtils;
|
|
35123
|
+
}();
|
|
34877
35124
|
/**
|
|
34878
35125
|
* Copyright 2021 Google LLC
|
|
34879
35126
|
*
|
|
@@ -34914,8 +35161,8 @@
|
|
|
34914
35161
|
*/;
|
|
34915
35162
|
_proto["delete"] = function _delete() {
|
|
34916
35163
|
if (this.marker) {
|
|
34917
|
-
this.marker
|
|
34918
|
-
|
|
35164
|
+
MarkerUtils.setMap(this.marker, null);
|
|
35165
|
+
this.marker = undefined;
|
|
34919
35166
|
}
|
|
34920
35167
|
this.markers.length = 0;
|
|
34921
35168
|
};
|
|
@@ -34923,11 +35170,14 @@
|
|
|
34923
35170
|
key: "bounds",
|
|
34924
35171
|
get: function get() {
|
|
34925
35172
|
if (this.markers.length === 0 && !this._position) {
|
|
34926
|
-
return
|
|
35173
|
+
return;
|
|
34927
35174
|
}
|
|
34928
|
-
|
|
34929
|
-
|
|
34930
|
-
|
|
35175
|
+
var bounds = new google.maps.LatLngBounds(this._position, this._position);
|
|
35176
|
+
for (var _iterator = _createForOfIteratorHelperLoose(this.markers), _step; !(_step = _iterator()).done;) {
|
|
35177
|
+
var marker = _step.value;
|
|
35178
|
+
bounds.extend(MarkerUtils.getPosition(marker));
|
|
35179
|
+
}
|
|
35180
|
+
return bounds;
|
|
34931
35181
|
}
|
|
34932
35182
|
}, {
|
|
34933
35183
|
key: "position",
|
|
@@ -34941,7 +35191,7 @@
|
|
|
34941
35191
|
key: "count",
|
|
34942
35192
|
get: function get() {
|
|
34943
35193
|
return this.markers.filter(function (m) {
|
|
34944
|
-
return
|
|
35194
|
+
return MarkerUtils.getVisible(m);
|
|
34945
35195
|
}).length;
|
|
34946
35196
|
}
|
|
34947
35197
|
}]);
|
|
@@ -34979,7 +35229,7 @@
|
|
|
34979
35229
|
* ```typescript
|
|
34980
35230
|
* cluster({markers, map}: AlgorithmInput): Cluster[] {
|
|
34981
35231
|
* if (shouldBypassClustering(map)) {
|
|
34982
|
-
* return this.noop({markers
|
|
35232
|
+
* return this.noop({markers})
|
|
34983
35233
|
* }
|
|
34984
35234
|
* }
|
|
34985
35235
|
* ```
|
|
@@ -34997,7 +35247,7 @@
|
|
|
34997
35247
|
var _noop = function _noop(markers) {
|
|
34998
35248
|
var clusters = markers.map(function (marker) {
|
|
34999
35249
|
return new Cluster({
|
|
35000
|
-
position:
|
|
35250
|
+
position: MarkerUtils.getPosition(marker),
|
|
35001
35251
|
markers: [marker]
|
|
35002
35252
|
});
|
|
35003
35253
|
});
|
|
@@ -35046,16 +35296,21 @@
|
|
|
35046
35296
|
var _proto6 = SuperClusterAlgorithm.prototype;
|
|
35047
35297
|
_proto6.calculate = function calculate(input) {
|
|
35048
35298
|
var changed = false;
|
|
35299
|
+
var state = {
|
|
35300
|
+
zoom: input.map.getZoom()
|
|
35301
|
+
};
|
|
35049
35302
|
if (!fastDeepEqual(input.markers, this.markers)) {
|
|
35050
35303
|
changed = true;
|
|
35051
35304
|
// TODO use proxy to avoid copy?
|
|
35052
35305
|
this.markers = [].concat(input.markers);
|
|
35053
35306
|
var points = this.markers.map(function (marker) {
|
|
35307
|
+
var position = MarkerUtils.getPosition(marker);
|
|
35308
|
+
var coordinates = [position.lng(), position.lat()];
|
|
35054
35309
|
return {
|
|
35055
35310
|
type: "Feature",
|
|
35056
35311
|
geometry: {
|
|
35057
35312
|
type: "Point",
|
|
35058
|
-
coordinates:
|
|
35313
|
+
coordinates: coordinates
|
|
35059
35314
|
},
|
|
35060
35315
|
properties: {
|
|
35061
35316
|
marker: marker
|
|
@@ -35064,12 +35319,9 @@
|
|
|
35064
35319
|
});
|
|
35065
35320
|
this.superCluster.load(points);
|
|
35066
35321
|
}
|
|
35067
|
-
var state = {
|
|
35068
|
-
zoom: input.map.getZoom()
|
|
35069
|
-
};
|
|
35070
35322
|
if (!changed) {
|
|
35071
|
-
if (this.state.zoom
|
|
35072
|
-
changed =
|
|
35323
|
+
if (this.state.zoom <= this.maxZoom || state.zoom <= this.maxZoom) {
|
|
35324
|
+
changed = !fastDeepEqual(this.state, state);
|
|
35073
35325
|
}
|
|
35074
35326
|
}
|
|
35075
35327
|
this.state = state;
|
|
@@ -35082,8 +35334,11 @@
|
|
|
35082
35334
|
};
|
|
35083
35335
|
};
|
|
35084
35336
|
_proto6.cluster = function cluster(_ref10) {
|
|
35337
|
+
var _this5 = this;
|
|
35085
35338
|
var map = _ref10.map;
|
|
35086
|
-
return this.superCluster.getClusters([-180, -90, 180, 90], Math.round(map.getZoom())).map(
|
|
35339
|
+
return this.superCluster.getClusters([-180, -90, 180, 90], Math.round(map.getZoom())).map(function (feature) {
|
|
35340
|
+
return _this5.transformCluster(feature);
|
|
35341
|
+
});
|
|
35087
35342
|
};
|
|
35088
35343
|
_proto6.transformCluster = function transformCluster(_ref11) {
|
|
35089
35344
|
var _ref11$geometry$coord = _ref11.geometry.coordinates,
|
|
@@ -35095,18 +35350,17 @@
|
|
|
35095
35350
|
markers: this.superCluster.getLeaves(properties.cluster_id, Infinity).map(function (leaf) {
|
|
35096
35351
|
return leaf.properties.marker;
|
|
35097
35352
|
}),
|
|
35098
|
-
position:
|
|
35353
|
+
position: {
|
|
35099
35354
|
lat: lat,
|
|
35100
35355
|
lng: lng
|
|
35101
|
-
}
|
|
35102
|
-
});
|
|
35103
|
-
} else {
|
|
35104
|
-
var marker = properties.marker;
|
|
35105
|
-
return new Cluster({
|
|
35106
|
-
markers: [marker],
|
|
35107
|
-
position: marker.getPosition()
|
|
35356
|
+
}
|
|
35108
35357
|
});
|
|
35109
35358
|
}
|
|
35359
|
+
var marker = properties.marker;
|
|
35360
|
+
return new Cluster({
|
|
35361
|
+
markers: [marker],
|
|
35362
|
+
position: MarkerUtils.getPosition(marker)
|
|
35363
|
+
});
|
|
35110
35364
|
};
|
|
35111
35365
|
return SuperClusterAlgorithm;
|
|
35112
35366
|
}(AbstractAlgorithm);
|
|
@@ -35189,29 +35443,57 @@
|
|
|
35189
35443
|
* });
|
|
35190
35444
|
* ```
|
|
35191
35445
|
*/
|
|
35192
|
-
_proto7.render = function render(_ref12, stats) {
|
|
35446
|
+
_proto7.render = function render(_ref12, stats, map) {
|
|
35193
35447
|
var count = _ref12.count,
|
|
35194
35448
|
position = _ref12.position;
|
|
35195
35449
|
// change color if this cluster has more markers than the mean cluster
|
|
35196
35450
|
var color = count > Math.max(10, stats.clusters.markers.mean) ? "#ff0000" : "#0000ff";
|
|
35197
35451
|
// create svg url with fill color
|
|
35198
|
-
var svg =
|
|
35199
|
-
|
|
35200
|
-
|
|
35452
|
+
var svg = "<svg fill=\"" + color + "\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\">\n <circle cx=\"120\" cy=\"120\" opacity=\".6\" r=\"70\" />\n <circle cx=\"120\" cy=\"120\" opacity=\".3\" r=\"90\" />\n <circle cx=\"120\" cy=\"120\" opacity=\".2\" r=\"110\" />\n </svg>";
|
|
35453
|
+
var title = "Cluster of " + count + " markers",
|
|
35454
|
+
// adjust zIndex to be above other markers
|
|
35455
|
+
zIndex = Number(google.maps.Marker.MAX_ZINDEX) + count;
|
|
35456
|
+
if (google.maps.marker && map.getMapCapabilities().isAdvancedMarkersAvailable) {
|
|
35457
|
+
// create cluster SVG element
|
|
35458
|
+
var div = document.createElement("div");
|
|
35459
|
+
div.innerHTML = svg;
|
|
35460
|
+
var svgEl = div.firstElementChild;
|
|
35461
|
+
svgEl.setAttribute("width", "50");
|
|
35462
|
+
svgEl.setAttribute("height", "50");
|
|
35463
|
+
// create and append marker label to SVG
|
|
35464
|
+
var label = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
35465
|
+
label.setAttribute("x", "50%");
|
|
35466
|
+
label.setAttribute("y", "50%");
|
|
35467
|
+
label.setAttribute("style", "fill: #FFF");
|
|
35468
|
+
label.setAttribute("text-anchor", "middle");
|
|
35469
|
+
label.setAttribute("font-size", "50");
|
|
35470
|
+
label.setAttribute("dominant-baseline", "middle");
|
|
35471
|
+
label.appendChild(document.createTextNode("" + count));
|
|
35472
|
+
svgEl.appendChild(label);
|
|
35473
|
+
var _clusterOptions = {
|
|
35474
|
+
map: map,
|
|
35475
|
+
position: position,
|
|
35476
|
+
zIndex: zIndex,
|
|
35477
|
+
title: title,
|
|
35478
|
+
content: div.firstElementChild
|
|
35479
|
+
};
|
|
35480
|
+
return new google.maps.marker.AdvancedMarkerElement(_clusterOptions);
|
|
35481
|
+
}
|
|
35482
|
+
var clusterOptions = {
|
|
35201
35483
|
position: position,
|
|
35484
|
+
zIndex: zIndex,
|
|
35485
|
+
title: title,
|
|
35202
35486
|
icon: {
|
|
35203
|
-
url: "data:image/svg+xml;base64," + svg,
|
|
35487
|
+
url: "data:image/svg+xml;base64," + window.btoa(svg),
|
|
35204
35488
|
scaledSize: new google.maps.Size(45, 45)
|
|
35205
35489
|
},
|
|
35206
35490
|
label: {
|
|
35207
35491
|
text: String(count),
|
|
35208
35492
|
color: "rgba(255,255,255,0.9)",
|
|
35209
35493
|
fontSize: "12px"
|
|
35210
|
-
}
|
|
35211
|
-
|
|
35212
|
-
|
|
35213
|
-
zIndex: Number(google.maps.Marker.MAX_ZINDEX) + count
|
|
35214
|
-
});
|
|
35494
|
+
}
|
|
35495
|
+
};
|
|
35496
|
+
return new google.maps.Marker(clusterOptions);
|
|
35215
35497
|
};
|
|
35216
35498
|
return DefaultRenderer;
|
|
35217
35499
|
}();
|
|
@@ -35238,7 +35520,7 @@
|
|
|
35238
35520
|
* @ignore
|
|
35239
35521
|
*/
|
|
35240
35522
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35241
|
-
function extend
|
|
35523
|
+
function extend(type1, type2) {
|
|
35242
35524
|
/* istanbul ignore next */
|
|
35243
35525
|
// eslint-disable-next-line prefer-const
|
|
35244
35526
|
for (var property in type2.prototype) {
|
|
@@ -35254,7 +35536,7 @@
|
|
|
35254
35536
|
// because it might not always be available when the code is defined so we
|
|
35255
35537
|
// look for it at the last possible moment. If it doesn't exist now then
|
|
35256
35538
|
// there is no point going ahead :)
|
|
35257
|
-
extend
|
|
35539
|
+
extend(OverlayViewSafe, google.maps.OverlayView);
|
|
35258
35540
|
};
|
|
35259
35541
|
/**
|
|
35260
35542
|
* Copyright 2021 Google LLC
|
|
@@ -35288,26 +35570,28 @@
|
|
|
35288
35570
|
var MarkerClusterer = /*#__PURE__*/function (_OverlayViewSafe) {
|
|
35289
35571
|
_inheritsLoose(MarkerClusterer, _OverlayViewSafe);
|
|
35290
35572
|
function MarkerClusterer(_ref13) {
|
|
35291
|
-
var
|
|
35573
|
+
var _this6;
|
|
35292
35574
|
var map = _ref13.map,
|
|
35293
35575
|
_ref13$markers = _ref13.markers,
|
|
35294
35576
|
markers = _ref13$markers === void 0 ? [] : _ref13$markers,
|
|
35577
|
+
_ref13$algorithmOptio = _ref13.algorithmOptions,
|
|
35578
|
+
algorithmOptions = _ref13$algorithmOptio === void 0 ? {} : _ref13$algorithmOptio,
|
|
35295
35579
|
_ref13$algorithm = _ref13.algorithm,
|
|
35296
|
-
algorithm = _ref13$algorithm === void 0 ? new SuperClusterAlgorithm(
|
|
35580
|
+
algorithm = _ref13$algorithm === void 0 ? new SuperClusterAlgorithm(algorithmOptions) : _ref13$algorithm,
|
|
35297
35581
|
_ref13$renderer = _ref13.renderer,
|
|
35298
35582
|
renderer = _ref13$renderer === void 0 ? new DefaultRenderer() : _ref13$renderer,
|
|
35299
35583
|
_ref13$onClusterClick = _ref13.onClusterClick,
|
|
35300
35584
|
onClusterClick = _ref13$onClusterClick === void 0 ? defaultOnClusterClickHandler : _ref13$onClusterClick;
|
|
35301
|
-
|
|
35302
|
-
|
|
35303
|
-
|
|
35304
|
-
|
|
35305
|
-
|
|
35306
|
-
|
|
35585
|
+
_this6 = _OverlayViewSafe.call(this) || this;
|
|
35586
|
+
_this6.markers = [].concat(markers);
|
|
35587
|
+
_this6.clusters = [];
|
|
35588
|
+
_this6.algorithm = algorithm;
|
|
35589
|
+
_this6.renderer = renderer;
|
|
35590
|
+
_this6.onClusterClick = onClusterClick;
|
|
35307
35591
|
if (map) {
|
|
35308
|
-
|
|
35592
|
+
_this6.setMap(map);
|
|
35309
35593
|
}
|
|
35310
|
-
return
|
|
35594
|
+
return _this6;
|
|
35311
35595
|
}
|
|
35312
35596
|
var _proto8 = MarkerClusterer.prototype;
|
|
35313
35597
|
_proto8.addMarker = function addMarker(marker, noDraw) {
|
|
@@ -35320,9 +35604,9 @@
|
|
|
35320
35604
|
}
|
|
35321
35605
|
};
|
|
35322
35606
|
_proto8.addMarkers = function addMarkers(markers, noDraw) {
|
|
35323
|
-
var
|
|
35607
|
+
var _this7 = this;
|
|
35324
35608
|
markers.forEach(function (marker) {
|
|
35325
|
-
|
|
35609
|
+
_this7.addMarker(marker, true);
|
|
35326
35610
|
});
|
|
35327
35611
|
if (!noDraw) {
|
|
35328
35612
|
this.render();
|
|
@@ -35334,7 +35618,7 @@
|
|
|
35334
35618
|
// Marker is not in our list of markers, so do nothing:
|
|
35335
35619
|
return false;
|
|
35336
35620
|
}
|
|
35337
|
-
|
|
35621
|
+
MarkerUtils.setMap(marker, null);
|
|
35338
35622
|
this.markers.splice(index, 1); // Remove the marker from the list of managed markers
|
|
35339
35623
|
if (!noDraw) {
|
|
35340
35624
|
this.render();
|
|
@@ -35342,10 +35626,10 @@
|
|
|
35342
35626
|
return true;
|
|
35343
35627
|
};
|
|
35344
35628
|
_proto8.removeMarkers = function removeMarkers(markers, noDraw) {
|
|
35345
|
-
var
|
|
35629
|
+
var _this8 = this;
|
|
35346
35630
|
var removed = false;
|
|
35347
35631
|
markers.forEach(function (marker) {
|
|
35348
|
-
removed =
|
|
35632
|
+
removed = _this8.removeMarker(marker, true) || removed;
|
|
35349
35633
|
});
|
|
35350
35634
|
if (removed && !noDraw) {
|
|
35351
35635
|
this.render();
|
|
@@ -35363,7 +35647,7 @@
|
|
|
35363
35647
|
*/;
|
|
35364
35648
|
_proto8.render = function render() {
|
|
35365
35649
|
var map = this.getMap();
|
|
35366
|
-
if (map instanceof google.maps.Map &&
|
|
35650
|
+
if (map instanceof google.maps.Map && map.getProjection()) {
|
|
35367
35651
|
google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_BEGIN, this);
|
|
35368
35652
|
var _this$algorithm$calcu = this.algorithm.calculate({
|
|
35369
35653
|
markers: this.markers,
|
|
@@ -35393,7 +35677,7 @@
|
|
|
35393
35677
|
};
|
|
35394
35678
|
_proto8.reset = function reset() {
|
|
35395
35679
|
this.markers.forEach(function (marker) {
|
|
35396
|
-
return
|
|
35680
|
+
return MarkerUtils.setMap(marker, null);
|
|
35397
35681
|
});
|
|
35398
35682
|
this.clusters.forEach(function (cluster) {
|
|
35399
35683
|
return cluster["delete"]();
|
|
@@ -35401,7 +35685,7 @@
|
|
|
35401
35685
|
this.clusters = [];
|
|
35402
35686
|
};
|
|
35403
35687
|
_proto8.renderClusters = function renderClusters() {
|
|
35404
|
-
var
|
|
35688
|
+
var _this9 = this;
|
|
35405
35689
|
// generate stats to pass to renderers
|
|
35406
35690
|
var stats = new ClusterStats(this.markers, this.clusters);
|
|
35407
35691
|
var map = this.getMap();
|
|
@@ -35409,16 +35693,16 @@
|
|
|
35409
35693
|
if (cluster.markers.length === 1) {
|
|
35410
35694
|
cluster.marker = cluster.markers[0];
|
|
35411
35695
|
} else {
|
|
35412
|
-
cluster.marker =
|
|
35413
|
-
if (
|
|
35696
|
+
cluster.marker = _this9.renderer.render(cluster, stats, map);
|
|
35697
|
+
if (_this9.onClusterClick) {
|
|
35414
35698
|
cluster.marker.addListener("click", /* istanbul ignore next */
|
|
35415
35699
|
function (event) {
|
|
35416
|
-
google.maps.event.trigger(
|
|
35417
|
-
|
|
35700
|
+
google.maps.event.trigger(_this9, MarkerClustererEvents.CLUSTER_CLICK, cluster);
|
|
35701
|
+
_this9.onClusterClick(event, cluster, map);
|
|
35418
35702
|
});
|
|
35419
35703
|
}
|
|
35420
35704
|
}
|
|
35421
|
-
cluster.marker
|
|
35705
|
+
MarkerUtils.setMap(cluster.marker, map);
|
|
35422
35706
|
});
|
|
35423
35707
|
};
|
|
35424
35708
|
return MarkerClusterer;
|
|
@@ -38669,16 +38953,9 @@
|
|
|
38669
38953
|
ReactiveGoogleMap.componentType = constants_1$1.reactiveMap;
|
|
38670
38954
|
|
|
38671
38955
|
var _PatchFlagNames, _slotFlagsText;
|
|
38672
|
-
/**
|
|
38673
|
-
* Make a map and return a function for checking if a key
|
|
38674
|
-
* is in that map.
|
|
38675
|
-
* IMPORTANT: all calls of this function must be prefixed with
|
|
38676
|
-
* \/\*#\_\_PURE\_\_\*\/
|
|
38677
|
-
* So that rollup can tree-shake them if necessary.
|
|
38678
|
-
*/
|
|
38679
38956
|
function makeMap(str, expectsLowerCase) {
|
|
38680
|
-
var map = Object.create(null);
|
|
38681
|
-
var list = str.split(
|
|
38957
|
+
var map = /* @__PURE__ */Object.create(null);
|
|
38958
|
+
var list = str.split(",");
|
|
38682
38959
|
for (var i = 0; i < list.length; i++) {
|
|
38683
38960
|
map[list[i]] = true;
|
|
38684
38961
|
}
|
|
@@ -38688,16 +38965,43 @@
|
|
|
38688
38965
|
return !!map[val];
|
|
38689
38966
|
};
|
|
38690
38967
|
}
|
|
38691
|
-
|
|
38692
|
-
|
|
38693
|
-
|
|
38694
|
-
|
|
38695
|
-
var
|
|
38696
|
-
|
|
38697
|
-
|
|
38698
|
-
|
|
38699
|
-
|
|
38700
|
-
|
|
38968
|
+
var EMPTY_OBJ = Object.freeze({}) ;
|
|
38969
|
+
var EMPTY_ARR = Object.freeze([]) ;
|
|
38970
|
+
var NOOP = function NOOP() {};
|
|
38971
|
+
var onRE = /^on[^a-z]/;
|
|
38972
|
+
var isOn = function isOn(key) {
|
|
38973
|
+
return onRE.test(key);
|
|
38974
|
+
};
|
|
38975
|
+
var isArray = Array.isArray;
|
|
38976
|
+
var isFunction$1 = function isFunction(val) {
|
|
38977
|
+
return typeof val === "function";
|
|
38978
|
+
};
|
|
38979
|
+
var isString = function isString(val) {
|
|
38980
|
+
return typeof val === "string";
|
|
38981
|
+
};
|
|
38982
|
+
var isObject$1 = function isObject(val) {
|
|
38983
|
+
return val !== null && typeof val === "object";
|
|
38984
|
+
};
|
|
38985
|
+
var isPromise = function isPromise(val) {
|
|
38986
|
+
return isObject$1(val) && isFunction$1(val.then) && isFunction$1(val["catch"]);
|
|
38987
|
+
};
|
|
38988
|
+
var cacheStringFunction = function cacheStringFunction(fn) {
|
|
38989
|
+
var cache = /* @__PURE__ */Object.create(null);
|
|
38990
|
+
return function (str) {
|
|
38991
|
+
var hit = cache[str];
|
|
38992
|
+
return hit || (cache[str] = fn(str));
|
|
38993
|
+
};
|
|
38994
|
+
};
|
|
38995
|
+
var hyphenateRE = /\B([A-Z])/g;
|
|
38996
|
+
var hyphenate = cacheStringFunction(function (str) {
|
|
38997
|
+
return str.replace(hyphenateRE, "-$1").toLowerCase();
|
|
38998
|
+
});
|
|
38999
|
+
var _globalThis;
|
|
39000
|
+
var getGlobalThis = function getGlobalThis() {
|
|
39001
|
+
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global$1 !== "undefined" ? global$1 : {});
|
|
39002
|
+
};
|
|
39003
|
+
var PatchFlagNames = (_PatchFlagNames = {}, _PatchFlagNames[1] = "TEXT", _PatchFlagNames[2] = "CLASS", _PatchFlagNames[4] = "STYLE", _PatchFlagNames[8] = "PROPS", _PatchFlagNames[16] = "FULL_PROPS", _PatchFlagNames[32] = "HYDRATE_EVENTS", _PatchFlagNames[64] = "STABLE_FRAGMENT", _PatchFlagNames[128] = "KEYED_FRAGMENT", _PatchFlagNames[256] = "UNKEYED_FRAGMENT", _PatchFlagNames[512] = "NEED_PATCH", _PatchFlagNames[1024] = "DYNAMIC_SLOTS", _PatchFlagNames[2048] = "DEV_ROOT_FRAGMENT", _PatchFlagNames[-1] = "HOISTED", _PatchFlagNames[-2] = "BAIL", _PatchFlagNames);
|
|
39004
|
+
var slotFlagsText = (_slotFlagsText = {}, _slotFlagsText[1] = "STABLE", _slotFlagsText[2] = "DYNAMIC", _slotFlagsText[3] = "FORWARDED", _slotFlagsText);
|
|
38701
39005
|
function normalizeStyle(value) {
|
|
38702
39006
|
if (isArray(value)) {
|
|
38703
39007
|
var res = {};
|
|
@@ -38719,10 +39023,10 @@
|
|
|
38719
39023
|
}
|
|
38720
39024
|
var listDelimiterRE = /;(?![^(]*\))/g;
|
|
38721
39025
|
var propertyDelimiterRE = /:([^]+)/;
|
|
38722
|
-
var styleCommentRE = /\/\*[
|
|
39026
|
+
var styleCommentRE = /\/\*[^]*?\*\//g;
|
|
38723
39027
|
function parseStringStyle(cssText) {
|
|
38724
39028
|
var ret = {};
|
|
38725
|
-
cssText.replace(styleCommentRE,
|
|
39029
|
+
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach(function (item) {
|
|
38726
39030
|
if (item) {
|
|
38727
39031
|
var tmp = item.split(propertyDelimiterRE);
|
|
38728
39032
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -38731,76 +39035,47 @@
|
|
|
38731
39035
|
return ret;
|
|
38732
39036
|
}
|
|
38733
39037
|
function stringifyStyle(styles) {
|
|
38734
|
-
var ret =
|
|
39038
|
+
var ret = "";
|
|
38735
39039
|
if (!styles || isString(styles)) {
|
|
38736
39040
|
return ret;
|
|
38737
39041
|
}
|
|
38738
39042
|
for (var key in styles) {
|
|
38739
39043
|
var value = styles[key];
|
|
38740
39044
|
var normalizedKey = key.startsWith("--") ? key : hyphenate(key);
|
|
38741
|
-
if (isString(value) || typeof value ===
|
|
38742
|
-
// only render valid values
|
|
39045
|
+
if (isString(value) || typeof value === "number") {
|
|
38743
39046
|
ret += normalizedKey + ":" + value + ";";
|
|
38744
39047
|
}
|
|
38745
39048
|
}
|
|
38746
39049
|
return ret;
|
|
38747
39050
|
}
|
|
38748
39051
|
function normalizeClass(value) {
|
|
38749
|
-
var res =
|
|
39052
|
+
var res = "";
|
|
38750
39053
|
if (isString(value)) {
|
|
38751
39054
|
res = value;
|
|
38752
39055
|
} else if (isArray(value)) {
|
|
38753
39056
|
for (var i = 0; i < value.length; i++) {
|
|
38754
39057
|
var normalized = normalizeClass(value[i]);
|
|
38755
39058
|
if (normalized) {
|
|
38756
|
-
res += normalized +
|
|
39059
|
+
res += normalized + " ";
|
|
38757
39060
|
}
|
|
38758
39061
|
}
|
|
38759
39062
|
} else if (isObject$1(value)) {
|
|
38760
39063
|
for (var name in value) {
|
|
38761
39064
|
if (value[name]) {
|
|
38762
|
-
res += name +
|
|
39065
|
+
res += name + " ";
|
|
38763
39066
|
}
|
|
38764
39067
|
}
|
|
38765
39068
|
}
|
|
38766
39069
|
return res.trim();
|
|
38767
39070
|
}
|
|
38768
|
-
|
|
38769
|
-
var
|
|
38770
|
-
var
|
|
38771
|
-
|
|
38772
|
-
* Compiler only.
|
|
38773
|
-
* Do NOT use in runtime code paths unless behind `("development" !== 'production')` flag.
|
|
38774
|
-
*/
|
|
38775
|
-
var isSVGTag = /*#__PURE__*/makeMap(SVG_TAGS);
|
|
38776
|
-
/**
|
|
38777
|
-
* Compiler only.
|
|
38778
|
-
* Do NOT use in runtime code paths unless behind `("development" !== 'production')` flag.
|
|
38779
|
-
*/
|
|
38780
|
-
var isVoidTag = /*#__PURE__*/makeMap(VOID_TAGS);
|
|
38781
|
-
|
|
38782
|
-
/**
|
|
38783
|
-
* On the client we only need to offer special cases for boolean attributes that
|
|
38784
|
-
* have different names from their corresponding dom properties:
|
|
38785
|
-
* - itemscope -> N/A
|
|
38786
|
-
* - allowfullscreen -> allowFullscreen
|
|
38787
|
-
* - formnovalidate -> formNoValidate
|
|
38788
|
-
* - ismap -> isMap
|
|
38789
|
-
* - nomodule -> noModule
|
|
38790
|
-
* - novalidate -> noValidate
|
|
38791
|
-
* - readonly -> readOnly
|
|
38792
|
-
*/
|
|
39071
|
+
var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
|
|
39072
|
+
var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
|
|
39073
|
+
var isSVGTag = /* @__PURE__ */makeMap(SVG_TAGS);
|
|
39074
|
+
var isVoidTag = /* @__PURE__ */makeMap(VOID_TAGS);
|
|
38793
39075
|
var specialBooleanAttrs = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";
|
|
38794
|
-
|
|
38795
|
-
* The full list is needed during SSR to produce the correct initial markup.
|
|
38796
|
-
*/
|
|
38797
|
-
var isBooleanAttr = /*#__PURE__*/makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,hidden," + "loop,open,required,reversed,scoped,seamless," + "checked,muted,multiple,selected");
|
|
38798
|
-
/**
|
|
38799
|
-
* Boolean attributes should be included if the value is truthy or ''.
|
|
38800
|
-
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
38801
|
-
*/
|
|
39076
|
+
var isBooleanAttr = /* @__PURE__ */makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
|
|
38802
39077
|
function includeBooleanAttr(value) {
|
|
38803
|
-
return !!value || value ===
|
|
39078
|
+
return !!value || value === "";
|
|
38804
39079
|
}
|
|
38805
39080
|
var unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
|
|
38806
39081
|
var attrValidationCache = {};
|
|
@@ -38815,43 +39090,38 @@
|
|
|
38815
39090
|
return attrValidationCache[name] = !isUnsafe;
|
|
38816
39091
|
}
|
|
38817
39092
|
var propsToAttrMap = {
|
|
38818
|
-
acceptCharset:
|
|
38819
|
-
className:
|
|
38820
|
-
htmlFor:
|
|
38821
|
-
httpEquiv:
|
|
39093
|
+
acceptCharset: "accept-charset",
|
|
39094
|
+
className: "class",
|
|
39095
|
+
htmlFor: "for",
|
|
39096
|
+
httpEquiv: "http-equiv"
|
|
38822
39097
|
};
|
|
38823
39098
|
var escapeRE = /["'&<>]/;
|
|
38824
39099
|
function escapeHtml$1(string) {
|
|
38825
|
-
var str =
|
|
39100
|
+
var str = "" + string;
|
|
38826
39101
|
var match = escapeRE.exec(str);
|
|
38827
39102
|
if (!match) {
|
|
38828
39103
|
return str;
|
|
38829
39104
|
}
|
|
38830
|
-
var html =
|
|
39105
|
+
var html = "";
|
|
38831
39106
|
var escaped;
|
|
38832
39107
|
var index;
|
|
38833
39108
|
var lastIndex = 0;
|
|
38834
39109
|
for (index = match.index; index < str.length; index++) {
|
|
38835
39110
|
switch (str.charCodeAt(index)) {
|
|
38836
39111
|
case 34:
|
|
38837
|
-
|
|
38838
|
-
escaped = '"';
|
|
39112
|
+
escaped = """;
|
|
38839
39113
|
break;
|
|
38840
39114
|
case 38:
|
|
38841
|
-
|
|
38842
|
-
escaped = '&';
|
|
39115
|
+
escaped = "&";
|
|
38843
39116
|
break;
|
|
38844
39117
|
case 39:
|
|
38845
|
-
|
|
38846
|
-
escaped = ''';
|
|
39118
|
+
escaped = "'";
|
|
38847
39119
|
break;
|
|
38848
39120
|
case 60:
|
|
38849
|
-
|
|
38850
|
-
escaped = '<';
|
|
39121
|
+
escaped = "<";
|
|
38851
39122
|
break;
|
|
38852
39123
|
case 62:
|
|
38853
|
-
|
|
38854
|
-
escaped = '>';
|
|
39124
|
+
escaped = ">";
|
|
38855
39125
|
break;
|
|
38856
39126
|
default:
|
|
38857
39127
|
continue;
|
|
@@ -38864,60 +39134,23 @@
|
|
|
38864
39134
|
}
|
|
38865
39135
|
return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
|
|
38866
39136
|
}
|
|
38867
|
-
// https://www.w3.org/TR/html52/syntax.html#comments
|
|
38868
39137
|
var commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
|
|
38869
39138
|
function escapeHtmlComment(src) {
|
|
38870
|
-
return src.replace(commentStripRE,
|
|
39139
|
+
return src.replace(commentStripRE, "");
|
|
38871
39140
|
}
|
|
38872
|
-
var EMPTY_OBJ = Object.freeze({}) ;
|
|
38873
|
-
var EMPTY_ARR = Object.freeze([]) ;
|
|
38874
|
-
var NOOP = function NOOP() {};
|
|
38875
|
-
var onRE = /^on[^a-z]/;
|
|
38876
|
-
var isOn = function isOn(key) {
|
|
38877
|
-
return onRE.test(key);
|
|
38878
|
-
};
|
|
38879
|
-
var isArray = Array.isArray;
|
|
38880
|
-
var isFunction$1 = function isFunction(val) {
|
|
38881
|
-
return typeof val === 'function';
|
|
38882
|
-
};
|
|
38883
|
-
var isString = function isString(val) {
|
|
38884
|
-
return typeof val === 'string';
|
|
38885
|
-
};
|
|
38886
|
-
var isObject$1 = function isObject(val) {
|
|
38887
|
-
return val !== null && typeof val === 'object';
|
|
38888
|
-
};
|
|
38889
|
-
var isPromise = function isPromise(val) {
|
|
38890
|
-
return isObject$1(val) && isFunction$1(val.then) && isFunction$1(val["catch"]);
|
|
38891
|
-
};
|
|
38892
|
-
var cacheStringFunction = function cacheStringFunction(fn) {
|
|
38893
|
-
var cache = Object.create(null);
|
|
38894
|
-
return function (str) {
|
|
38895
|
-
var hit = cache[str];
|
|
38896
|
-
return hit || (cache[str] = fn(str));
|
|
38897
|
-
};
|
|
38898
|
-
};
|
|
38899
|
-
var hyphenateRE = /\B([A-Z])/g;
|
|
38900
|
-
/**
|
|
38901
|
-
* @private
|
|
38902
|
-
*/
|
|
38903
|
-
var hyphenate = cacheStringFunction(function (str) {
|
|
38904
|
-
return str.replace(hyphenateRE, '-$1').toLowerCase();
|
|
38905
|
-
});
|
|
38906
39141
|
|
|
38907
39142
|
var _ErrorTypeStrings;
|
|
38908
|
-
|
|
38909
|
-
// leading comma for empty string ""
|
|
38910
39143
|
var shouldIgnoreProp = makeMap(",key,ref,innerHTML,textContent,ref_key,ref_for");
|
|
38911
39144
|
function ssrRenderAttrs(props, tag) {
|
|
38912
|
-
var ret =
|
|
39145
|
+
var ret = "";
|
|
38913
39146
|
for (var key in props) {
|
|
38914
|
-
if (shouldIgnoreProp(key) || isOn(key) || tag ===
|
|
39147
|
+
if (shouldIgnoreProp(key) || isOn(key) || tag === "textarea" && key === "value") {
|
|
38915
39148
|
continue;
|
|
38916
39149
|
}
|
|
38917
39150
|
var value = props[key];
|
|
38918
|
-
if (key ===
|
|
39151
|
+
if (key === "class") {
|
|
38919
39152
|
ret += " class=\"" + ssrRenderClass(value) + "\"";
|
|
38920
|
-
} else if (key ===
|
|
39153
|
+
} else if (key === "style") {
|
|
38921
39154
|
ret += " style=\"" + ssrRenderStyle(value) + "\"";
|
|
38922
39155
|
} else {
|
|
38923
39156
|
ret += ssrRenderDynamicAttr(key, value, tag);
|
|
@@ -38925,17 +39158,15 @@
|
|
|
38925
39158
|
}
|
|
38926
39159
|
return ret;
|
|
38927
39160
|
}
|
|
38928
|
-
// render an attr with dynamic (unknown) key.
|
|
38929
39161
|
function ssrRenderDynamicAttr(key, value, tag) {
|
|
38930
39162
|
if (!isRenderableValue(value)) {
|
|
38931
39163
|
return "";
|
|
38932
39164
|
}
|
|
38933
|
-
var attrKey = tag && (tag.indexOf(
|
|
38934
|
-
: propsToAttrMap[key] || key.toLowerCase();
|
|
39165
|
+
var attrKey = tag && (tag.indexOf("-") > 0 || isSVGTag(tag)) ? key : propsToAttrMap[key] || key.toLowerCase();
|
|
38935
39166
|
if (isBooleanAttr(attrKey)) {
|
|
38936
39167
|
return includeBooleanAttr(value) ? " " + attrKey : "";
|
|
38937
39168
|
} else if (isSSRSafeAttrName(attrKey)) {
|
|
38938
|
-
return value ===
|
|
39169
|
+
return value === "" ? " " + attrKey : " " + attrKey + "=\"" + escapeHtml$1(value) + "\"";
|
|
38939
39170
|
} else {
|
|
38940
39171
|
console.warn("[@vue/server-renderer] Skipped rendering unsafe attribute name: " + attrKey);
|
|
38941
39172
|
return "";
|
|
@@ -38946,14 +39177,14 @@
|
|
|
38946
39177
|
return false;
|
|
38947
39178
|
}
|
|
38948
39179
|
var type = typeof value;
|
|
38949
|
-
return type ===
|
|
39180
|
+
return type === "string" || type === "number" || type === "boolean";
|
|
38950
39181
|
}
|
|
38951
39182
|
function ssrRenderClass(raw) {
|
|
38952
39183
|
return escapeHtml$1(normalizeClass(raw));
|
|
38953
39184
|
}
|
|
38954
39185
|
function ssrRenderStyle(raw) {
|
|
38955
39186
|
if (!raw) {
|
|
38956
|
-
return
|
|
39187
|
+
return "";
|
|
38957
39188
|
}
|
|
38958
39189
|
if (isString(raw)) {
|
|
38959
39190
|
return escapeHtml$1(raw);
|
|
@@ -38961,18 +39192,11 @@
|
|
|
38961
39192
|
var styles = normalizeStyle(raw);
|
|
38962
39193
|
return escapeHtml$1(stringifyStyle(styles));
|
|
38963
39194
|
}
|
|
38964
|
-
function ssrCompile(template, instance) {
|
|
38965
|
-
{
|
|
38966
|
-
throw new Error("On-the-fly template compilation is not supported in the ESM build of " + "@vue/server-renderer. All templates must be pre-compiled into " + "render functions.");
|
|
38967
|
-
}
|
|
38968
|
-
}
|
|
38969
39195
|
function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) {
|
|
38970
|
-
parentPush(
|
|
39196
|
+
parentPush("<!--teleport start-->");
|
|
38971
39197
|
var context = parentComponent.appContext.provides[vue.ssrContextKey];
|
|
38972
39198
|
var teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {});
|
|
38973
39199
|
var targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []);
|
|
38974
|
-
// record current index of the target buffer to handle nested teleports
|
|
38975
|
-
// since the parent needs to be rendered before the child
|
|
38976
39200
|
var bufferIndex = targetBuffer.length;
|
|
38977
39201
|
var teleportContent;
|
|
38978
39202
|
if (disabled) {
|
|
@@ -38987,25 +39211,34 @@
|
|
|
38987
39211
|
teleportContent = getBuffer();
|
|
38988
39212
|
}
|
|
38989
39213
|
targetBuffer.splice(bufferIndex, 0, teleportContent);
|
|
38990
|
-
parentPush(
|
|
39214
|
+
parentPush("<!--teleport end-->");
|
|
39215
|
+
}
|
|
39216
|
+
var ErrorTypeStrings = (_ErrorTypeStrings = {}, _ErrorTypeStrings["sp"] = "serverPrefetch hook", _ErrorTypeStrings["bc"] = "beforeCreate hook", _ErrorTypeStrings["c"] = "created hook", _ErrorTypeStrings["bm"] = "beforeMount hook", _ErrorTypeStrings["m"] = "mounted hook", _ErrorTypeStrings["bu"] = "beforeUpdate hook", _ErrorTypeStrings["u"] = "updated", _ErrorTypeStrings["bum"] = "beforeUnmount hook", _ErrorTypeStrings["um"] = "unmounted hook", _ErrorTypeStrings["a"] = "activated hook", _ErrorTypeStrings["da"] = "deactivated hook", _ErrorTypeStrings["ec"] = "errorCaptured hook", _ErrorTypeStrings["rtc"] = "renderTracked hook", _ErrorTypeStrings["rtg"] = "renderTriggered hook", _ErrorTypeStrings[0] = "setup function", _ErrorTypeStrings[1] = "render function", _ErrorTypeStrings[2] = "watcher getter", _ErrorTypeStrings[3] = "watcher callback", _ErrorTypeStrings[4] = "watcher cleanup function", _ErrorTypeStrings[5] = "native event handler", _ErrorTypeStrings[6] = "component event handler", _ErrorTypeStrings[7] = "vnode hook", _ErrorTypeStrings[8] = "directive hook", _ErrorTypeStrings[9] = "transition hook", _ErrorTypeStrings[10] = "app errorHandler", _ErrorTypeStrings[11] = "app warnHandler", _ErrorTypeStrings[12] = "ref function", _ErrorTypeStrings[13] = "async component loader", _ErrorTypeStrings[14] = "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core", _ErrorTypeStrings);
|
|
39217
|
+
var globalCurrentInstanceSetters;
|
|
39218
|
+
var settersKey = "__VUE_INSTANCE_SETTERS__";
|
|
39219
|
+
{
|
|
39220
|
+
if (!(globalCurrentInstanceSetters = getGlobalThis()[settersKey])) {
|
|
39221
|
+
globalCurrentInstanceSetters = getGlobalThis()[settersKey] = [];
|
|
39222
|
+
}
|
|
39223
|
+
globalCurrentInstanceSetters.push(function (i) {
|
|
39224
|
+
return i;
|
|
39225
|
+
});
|
|
39226
|
+
}
|
|
39227
|
+
function ssrCompile(template, instance) {
|
|
39228
|
+
{
|
|
39229
|
+
throw new Error("On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.");
|
|
39230
|
+
}
|
|
38991
39231
|
}
|
|
38992
39232
|
var createComponentInstance = vue.ssrUtils.createComponentInstance,
|
|
38993
39233
|
setCurrentRenderingInstance = vue.ssrUtils.setCurrentRenderingInstance,
|
|
38994
39234
|
setupComponent = vue.ssrUtils.setupComponent,
|
|
38995
39235
|
renderComponentRoot = vue.ssrUtils.renderComponentRoot,
|
|
38996
39236
|
normalizeVNode = vue.ssrUtils.normalizeVNode;
|
|
38997
|
-
// Each component has a buffer array.
|
|
38998
|
-
// A buffer array can contain one of the following:
|
|
38999
|
-
// - plain string
|
|
39000
|
-
// - A resolved buffer (recursive arrays of strings that can be unrolled
|
|
39001
|
-
// synchronously)
|
|
39002
|
-
// - An async buffer (a Promise that resolves to a resolved buffer)
|
|
39003
39237
|
function createBuffer() {
|
|
39004
39238
|
var appendable = false;
|
|
39005
39239
|
var buffer = [];
|
|
39006
39240
|
return {
|
|
39007
39241
|
getBuffer: function getBuffer() {
|
|
39008
|
-
// Return static buffer and await on items during unroll stage
|
|
39009
39242
|
return buffer;
|
|
39010
39243
|
},
|
|
39011
39244
|
push: function push(item) {
|
|
@@ -39017,8 +39250,6 @@
|
|
|
39017
39250
|
}
|
|
39018
39251
|
appendable = isStringItem;
|
|
39019
39252
|
if (isPromise(item) || isArray(item) && item.hasAsync) {
|
|
39020
|
-
// promise, or child buffer with async, mark as async.
|
|
39021
|
-
// this allows skipping unnecessary await ticks during unroll stage
|
|
39022
39253
|
buffer.hasAsync = true;
|
|
39023
39254
|
}
|
|
39024
39255
|
}
|
|
@@ -39029,9 +39260,11 @@
|
|
|
39029
39260
|
parentComponent = null;
|
|
39030
39261
|
}
|
|
39031
39262
|
var instance = createComponentInstance(vnode, parentComponent, null);
|
|
39032
|
-
var res = setupComponent(instance, true
|
|
39263
|
+
var res = setupComponent(instance, true
|
|
39264
|
+
/* isSSR */);
|
|
39265
|
+
|
|
39033
39266
|
var hasAsyncSetup = isPromise(res);
|
|
39034
|
-
var prefetches = instance.sp;
|
|
39267
|
+
var prefetches = instance.sp;
|
|
39035
39268
|
if (hasAsyncSetup || prefetches) {
|
|
39036
39269
|
var p = hasAsyncSetup ? res : Promise.resolve();
|
|
39037
39270
|
if (prefetches) {
|
|
@@ -39039,9 +39272,7 @@
|
|
|
39039
39272
|
return Promise.all(prefetches.map(function (prefetch) {
|
|
39040
39273
|
return prefetch.call(instance.proxy);
|
|
39041
39274
|
}));
|
|
39042
|
-
})
|
|
39043
|
-
// Note: error display is already done by the wrapped lifecycle hook function.
|
|
39044
|
-
["catch"](function () {});
|
|
39275
|
+
})["catch"](function () {});
|
|
39045
39276
|
}
|
|
39046
39277
|
return p.then(function () {
|
|
39047
39278
|
return renderComponentSubTree(instance, slotScopeId);
|
|
@@ -39057,8 +39288,6 @@
|
|
|
39057
39288
|
push = _createBuffer2.push;
|
|
39058
39289
|
if (isFunction$1(comp)) {
|
|
39059
39290
|
var root = renderComponentRoot(instance);
|
|
39060
|
-
// #5817 scope ID attrs not falling through if functional component doesn't
|
|
39061
|
-
// have props
|
|
39062
39291
|
if (!comp.props) {
|
|
39063
39292
|
for (var key in instance.attrs) {
|
|
39064
39293
|
if (key.startsWith("data-v-")) {
|
|
@@ -39071,17 +39300,13 @@
|
|
|
39071
39300
|
if ((!instance.render || instance.render === NOOP) && !instance.ssrRender && !comp.ssrRender && isString(comp.template)) {
|
|
39072
39301
|
comp.ssrRender = ssrCompile(comp.template);
|
|
39073
39302
|
}
|
|
39074
|
-
// perf: enable caching of computed getters during render
|
|
39075
|
-
// since there cannot be state mutations during render.
|
|
39076
39303
|
for (var _iterator = _createForOfIteratorHelperLoose(instance.scope.effects), _step; !(_step = _iterator()).done;) {
|
|
39077
39304
|
var e = _step.value;
|
|
39078
39305
|
if (e.computed) e.computed._cacheable = true;
|
|
39079
39306
|
}
|
|
39080
39307
|
var ssrRender = instance.ssrRender || comp.ssrRender;
|
|
39081
39308
|
if (ssrRender) {
|
|
39082
|
-
|
|
39083
|
-
// resolve fallthrough attrs
|
|
39084
|
-
var attrs = instance.inheritAttrs !== false ? instance.attrs : undefined;
|
|
39309
|
+
var attrs = instance.inheritAttrs !== false ? instance.attrs : void 0;
|
|
39085
39310
|
var hasCloned = false;
|
|
39086
39311
|
var cur = instance;
|
|
39087
39312
|
while (true) {
|
|
@@ -39091,12 +39316,10 @@
|
|
|
39091
39316
|
attrs = _extends({}, attrs);
|
|
39092
39317
|
hasCloned = true;
|
|
39093
39318
|
}
|
|
39094
|
-
attrs[scopeId] =
|
|
39319
|
+
attrs[scopeId] = "";
|
|
39095
39320
|
}
|
|
39096
39321
|
var parent = cur.parent;
|
|
39097
39322
|
if (parent && parent.subTree && parent.subTree === cur.vnode) {
|
|
39098
|
-
// parent is a non-SSR compiled component and is rendering this
|
|
39099
|
-
// component as root. inherit its scopeId if present.
|
|
39100
39323
|
cur = parent;
|
|
39101
39324
|
} else {
|
|
39102
39325
|
break;
|
|
@@ -39104,9 +39327,8 @@
|
|
|
39104
39327
|
}
|
|
39105
39328
|
if (slotScopeId) {
|
|
39106
39329
|
if (!hasCloned) attrs = _extends({}, attrs);
|
|
39107
|
-
attrs[slotScopeId.trim()] =
|
|
39330
|
+
attrs[slotScopeId.trim()] = "";
|
|
39108
39331
|
}
|
|
39109
|
-
// set current rendering instance for asset resolution
|
|
39110
39332
|
var prev = setCurrentRenderingInstance(instance);
|
|
39111
39333
|
try {
|
|
39112
39334
|
ssrRender(instance.proxy, push, instance, attrs,
|
|
@@ -39141,23 +39363,23 @@
|
|
|
39141
39363
|
break;
|
|
39142
39364
|
case vue.Fragment:
|
|
39143
39365
|
if (vnode.slotScopeIds) {
|
|
39144
|
-
slotScopeId = (slotScopeId ? slotScopeId +
|
|
39366
|
+
slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" ");
|
|
39145
39367
|
}
|
|
39146
|
-
push("<!--[-->");
|
|
39368
|
+
push("<!--[-->");
|
|
39147
39369
|
renderVNodeChildren(push, children, parentComponent, slotScopeId);
|
|
39148
|
-
push("<!--]-->");
|
|
39370
|
+
push("<!--]-->");
|
|
39149
39371
|
break;
|
|
39150
39372
|
default:
|
|
39151
|
-
if (shapeFlag & 1
|
|
39373
|
+
if (shapeFlag & 1) {
|
|
39152
39374
|
renderElementVNode(push, vnode, parentComponent, slotScopeId);
|
|
39153
|
-
} else if (shapeFlag & 6
|
|
39375
|
+
} else if (shapeFlag & 6) {
|
|
39154
39376
|
push(renderComponentVNode(vnode, parentComponent, slotScopeId));
|
|
39155
|
-
} else if (shapeFlag & 64
|
|
39377
|
+
} else if (shapeFlag & 64) {
|
|
39156
39378
|
renderTeleportVNode(push, vnode, parentComponent, slotScopeId);
|
|
39157
|
-
} else if (shapeFlag & 128
|
|
39379
|
+
} else if (shapeFlag & 128) {
|
|
39158
39380
|
renderVNode(push, vnode.ssContent, parentComponent, slotScopeId);
|
|
39159
39381
|
} else {
|
|
39160
|
-
vue.warn(
|
|
39382
|
+
vue.warn("[@vue/server-renderer] Invalid VNode type:", type, "(" + typeof type + ")");
|
|
39161
39383
|
}
|
|
39162
39384
|
}
|
|
39163
39385
|
}
|
|
@@ -39183,7 +39405,6 @@
|
|
|
39183
39405
|
if (scopeId) {
|
|
39184
39406
|
openTag += " " + scopeId;
|
|
39185
39407
|
}
|
|
39186
|
-
// inherit parent chain scope id if this is the root node
|
|
39187
39408
|
var curParent = parentComponent;
|
|
39188
39409
|
var curVnode = vnode;
|
|
39189
39410
|
while (curParent && curVnode === curParent.subTree) {
|
|
@@ -39206,15 +39427,15 @@
|
|
|
39206
39427
|
} else if (props.textContent) {
|
|
39207
39428
|
hasChildrenOverride = true;
|
|
39208
39429
|
push(escapeHtml$1(props.textContent));
|
|
39209
|
-
} else if (tag ===
|
|
39430
|
+
} else if (tag === "textarea" && props.value) {
|
|
39210
39431
|
hasChildrenOverride = true;
|
|
39211
39432
|
push(escapeHtml$1(props.value));
|
|
39212
39433
|
}
|
|
39213
39434
|
}
|
|
39214
39435
|
if (!hasChildrenOverride) {
|
|
39215
|
-
if (shapeFlag & 8
|
|
39436
|
+
if (shapeFlag & 8) {
|
|
39216
39437
|
push(escapeHtml$1(children));
|
|
39217
|
-
} else if (shapeFlag & 16
|
|
39438
|
+
} else if (shapeFlag & 16) {
|
|
39218
39439
|
renderVNodeChildren(push, children, parentComponent, slotScopeId);
|
|
39219
39440
|
}
|
|
39220
39441
|
}
|
|
@@ -39246,119 +39467,116 @@
|
|
|
39246
39467
|
vue.warn("[@vue/server-renderer] Teleport target must be a query selector string.");
|
|
39247
39468
|
return [];
|
|
39248
39469
|
}
|
|
39249
|
-
ssrRenderTeleport(push, function (
|
|
39250
|
-
renderVNodeChildren(
|
|
39251
|
-
}, target, disabled || disabled ===
|
|
39470
|
+
ssrRenderTeleport(push, function (push2) {
|
|
39471
|
+
renderVNodeChildren(push2, vnode.children, parentComponent, slotScopeId);
|
|
39472
|
+
}, target, disabled || disabled === "", parentComponent);
|
|
39252
39473
|
}
|
|
39253
|
-
var isVNode = vue.ssrUtils.isVNode;
|
|
39254
|
-
function unrollBuffer(
|
|
39255
|
-
return _unrollBuffer
|
|
39474
|
+
var isVNode$1 = vue.ssrUtils.isVNode;
|
|
39475
|
+
function unrollBuffer$1(_x3) {
|
|
39476
|
+
return _unrollBuffer$.apply(this, arguments);
|
|
39256
39477
|
}
|
|
39257
|
-
function _unrollBuffer() {
|
|
39258
|
-
_unrollBuffer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
39478
|
+
function _unrollBuffer$() {
|
|
39479
|
+
_unrollBuffer$ = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(buffer) {
|
|
39259
39480
|
var ret, i, item;
|
|
39260
|
-
return _regeneratorRuntime().wrap(function
|
|
39261
|
-
while (1) switch (
|
|
39481
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
39482
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
39262
39483
|
case 0:
|
|
39263
39484
|
if (!buffer.hasAsync) {
|
|
39264
|
-
|
|
39485
|
+
_context3.next = 23;
|
|
39265
39486
|
break;
|
|
39266
39487
|
}
|
|
39267
|
-
ret =
|
|
39488
|
+
ret = "";
|
|
39268
39489
|
i = 0;
|
|
39269
39490
|
case 3:
|
|
39270
39491
|
if (!(i < buffer.length)) {
|
|
39271
|
-
|
|
39492
|
+
_context3.next = 20;
|
|
39272
39493
|
break;
|
|
39273
39494
|
}
|
|
39274
39495
|
item = buffer[i];
|
|
39275
39496
|
if (!isPromise(item)) {
|
|
39276
|
-
|
|
39497
|
+
_context3.next = 9;
|
|
39277
39498
|
break;
|
|
39278
39499
|
}
|
|
39279
|
-
|
|
39500
|
+
_context3.next = 8;
|
|
39280
39501
|
return item;
|
|
39281
39502
|
case 8:
|
|
39282
|
-
item =
|
|
39503
|
+
item = _context3.sent;
|
|
39283
39504
|
case 9:
|
|
39284
39505
|
if (!isString(item)) {
|
|
39285
|
-
|
|
39506
|
+
_context3.next = 13;
|
|
39286
39507
|
break;
|
|
39287
39508
|
}
|
|
39288
39509
|
ret += item;
|
|
39289
|
-
|
|
39510
|
+
_context3.next = 17;
|
|
39290
39511
|
break;
|
|
39291
39512
|
case 13:
|
|
39292
|
-
|
|
39293
|
-
|
|
39294
|
-
return unrollBuffer(item);
|
|
39513
|
+
_context3.t0 = ret;
|
|
39514
|
+
_context3.next = 16;
|
|
39515
|
+
return unrollBuffer$1(item);
|
|
39295
39516
|
case 16:
|
|
39296
|
-
ret =
|
|
39517
|
+
ret = _context3.t0 += _context3.sent;
|
|
39297
39518
|
case 17:
|
|
39298
39519
|
i++;
|
|
39299
|
-
|
|
39520
|
+
_context3.next = 3;
|
|
39300
39521
|
break;
|
|
39301
39522
|
case 20:
|
|
39302
|
-
return
|
|
39523
|
+
return _context3.abrupt("return", ret);
|
|
39303
39524
|
case 23:
|
|
39304
|
-
return
|
|
39525
|
+
return _context3.abrupt("return", unrollBufferSync$1(buffer));
|
|
39305
39526
|
case 24:
|
|
39306
39527
|
case "end":
|
|
39307
|
-
return
|
|
39528
|
+
return _context3.stop();
|
|
39308
39529
|
}
|
|
39309
|
-
},
|
|
39530
|
+
}, _callee3);
|
|
39310
39531
|
}));
|
|
39311
|
-
return _unrollBuffer
|
|
39532
|
+
return _unrollBuffer$.apply(this, arguments);
|
|
39312
39533
|
}
|
|
39313
|
-
function unrollBufferSync(buffer) {
|
|
39314
|
-
var ret =
|
|
39534
|
+
function unrollBufferSync$1(buffer) {
|
|
39535
|
+
var ret = "";
|
|
39315
39536
|
for (var i = 0; i < buffer.length; i++) {
|
|
39316
39537
|
var item = buffer[i];
|
|
39317
39538
|
if (isString(item)) {
|
|
39318
39539
|
ret += item;
|
|
39319
39540
|
} else {
|
|
39320
|
-
|
|
39321
|
-
ret += unrollBufferSync(item);
|
|
39541
|
+
ret += unrollBufferSync$1(item);
|
|
39322
39542
|
}
|
|
39323
39543
|
}
|
|
39324
39544
|
return ret;
|
|
39325
39545
|
}
|
|
39326
|
-
function renderToString(
|
|
39546
|
+
function renderToString(_x4, _x5) {
|
|
39327
39547
|
return _renderToString.apply(this, arguments);
|
|
39328
39548
|
}
|
|
39329
39549
|
function _renderToString() {
|
|
39330
|
-
_renderToString = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
39550
|
+
_renderToString = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(input, context) {
|
|
39331
39551
|
var vnode, buffer, result, _iterator3, _step3, unwatch;
|
|
39332
|
-
return _regeneratorRuntime().wrap(function
|
|
39333
|
-
while (1) switch (
|
|
39552
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
39553
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
39334
39554
|
case 0:
|
|
39335
39555
|
if (context === void 0) {
|
|
39336
39556
|
context = {};
|
|
39337
39557
|
}
|
|
39338
|
-
if (!isVNode(input)) {
|
|
39339
|
-
|
|
39558
|
+
if (!isVNode$1(input)) {
|
|
39559
|
+
_context4.next = 3;
|
|
39340
39560
|
break;
|
|
39341
39561
|
}
|
|
39342
|
-
return
|
|
39562
|
+
return _context4.abrupt("return", renderToString(vue.createApp({
|
|
39343
39563
|
render: function render() {
|
|
39344
39564
|
return input;
|
|
39345
39565
|
}
|
|
39346
39566
|
}), context));
|
|
39347
39567
|
case 3:
|
|
39348
|
-
// rendering an app
|
|
39349
39568
|
vnode = vue.createVNode(input._component, input._props);
|
|
39350
39569
|
vnode.appContext = input._context;
|
|
39351
|
-
// provide the ssr context to the tree
|
|
39352
39570
|
input.provide(vue.ssrContextKey, context);
|
|
39353
|
-
|
|
39571
|
+
_context4.next = 8;
|
|
39354
39572
|
return renderComponentVNode(vnode);
|
|
39355
39573
|
case 8:
|
|
39356
|
-
buffer =
|
|
39357
|
-
|
|
39358
|
-
return unrollBuffer(buffer);
|
|
39574
|
+
buffer = _context4.sent;
|
|
39575
|
+
_context4.next = 11;
|
|
39576
|
+
return unrollBuffer$1(buffer);
|
|
39359
39577
|
case 11:
|
|
39360
|
-
result =
|
|
39361
|
-
|
|
39578
|
+
result = _context4.sent;
|
|
39579
|
+
_context4.next = 14;
|
|
39362
39580
|
return resolveTeleports(context);
|
|
39363
39581
|
case 14:
|
|
39364
39582
|
if (context.__watcherHandles) {
|
|
@@ -39367,57 +39585,56 @@
|
|
|
39367
39585
|
unwatch();
|
|
39368
39586
|
}
|
|
39369
39587
|
}
|
|
39370
|
-
return
|
|
39588
|
+
return _context4.abrupt("return", result);
|
|
39371
39589
|
case 16:
|
|
39372
39590
|
case "end":
|
|
39373
|
-
return
|
|
39591
|
+
return _context4.stop();
|
|
39374
39592
|
}
|
|
39375
|
-
},
|
|
39593
|
+
}, _callee4);
|
|
39376
39594
|
}));
|
|
39377
39595
|
return _renderToString.apply(this, arguments);
|
|
39378
39596
|
}
|
|
39379
|
-
function resolveTeleports(
|
|
39597
|
+
function resolveTeleports(_x6) {
|
|
39380
39598
|
return _resolveTeleports.apply(this, arguments);
|
|
39381
39599
|
}
|
|
39382
39600
|
function _resolveTeleports() {
|
|
39383
|
-
_resolveTeleports = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
39601
|
+
_resolveTeleports = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(context) {
|
|
39384
39602
|
var key;
|
|
39385
|
-
return _regeneratorRuntime().wrap(function
|
|
39386
|
-
while (1) switch (
|
|
39603
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
39604
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
39387
39605
|
case 0:
|
|
39388
39606
|
if (!context.__teleportBuffers) {
|
|
39389
|
-
|
|
39607
|
+
_context5.next = 14;
|
|
39390
39608
|
break;
|
|
39391
39609
|
}
|
|
39392
39610
|
context.teleports = context.teleports || {};
|
|
39393
|
-
|
|
39611
|
+
_context5.t0 = _regeneratorRuntime().keys(context.__teleportBuffers);
|
|
39394
39612
|
case 3:
|
|
39395
|
-
if ((
|
|
39396
|
-
|
|
39613
|
+
if ((_context5.t1 = _context5.t0()).done) {
|
|
39614
|
+
_context5.next = 14;
|
|
39397
39615
|
break;
|
|
39398
39616
|
}
|
|
39399
|
-
key =
|
|
39400
|
-
|
|
39401
|
-
|
|
39617
|
+
key = _context5.t1.value;
|
|
39618
|
+
_context5.t2 = unrollBuffer$1;
|
|
39619
|
+
_context5.next = 8;
|
|
39402
39620
|
return Promise.all([context.__teleportBuffers[key]]);
|
|
39403
39621
|
case 8:
|
|
39404
|
-
|
|
39405
|
-
|
|
39406
|
-
return (0,
|
|
39622
|
+
_context5.t3 = _context5.sent;
|
|
39623
|
+
_context5.next = 11;
|
|
39624
|
+
return (0, _context5.t2)(_context5.t3);
|
|
39407
39625
|
case 11:
|
|
39408
|
-
context.teleports[key] =
|
|
39409
|
-
|
|
39626
|
+
context.teleports[key] = _context5.sent;
|
|
39627
|
+
_context5.next = 3;
|
|
39410
39628
|
break;
|
|
39411
39629
|
case 14:
|
|
39412
39630
|
case "end":
|
|
39413
|
-
return
|
|
39631
|
+
return _context5.stop();
|
|
39414
39632
|
}
|
|
39415
|
-
},
|
|
39633
|
+
}, _callee5);
|
|
39416
39634
|
}));
|
|
39417
39635
|
return _resolveTeleports.apply(this, arguments);
|
|
39418
39636
|
}
|
|
39419
|
-
var isVNode
|
|
39420
|
-
var ErrorTypeStrings = (_ErrorTypeStrings = {}, _ErrorTypeStrings["sp" /* LifecycleHooks.SERVER_PREFETCH */] = 'serverPrefetch hook', _ErrorTypeStrings["bc" /* LifecycleHooks.BEFORE_CREATE */] = 'beforeCreate hook', _ErrorTypeStrings["c" /* LifecycleHooks.CREATED */] = 'created hook', _ErrorTypeStrings["bm" /* LifecycleHooks.BEFORE_MOUNT */] = 'beforeMount hook', _ErrorTypeStrings["m" /* LifecycleHooks.MOUNTED */] = 'mounted hook', _ErrorTypeStrings["bu" /* LifecycleHooks.BEFORE_UPDATE */] = 'beforeUpdate hook', _ErrorTypeStrings["u" /* LifecycleHooks.UPDATED */] = 'updated', _ErrorTypeStrings["bum" /* LifecycleHooks.BEFORE_UNMOUNT */] = 'beforeUnmount hook', _ErrorTypeStrings["um" /* LifecycleHooks.UNMOUNTED */] = 'unmounted hook', _ErrorTypeStrings["a" /* LifecycleHooks.ACTIVATED */] = 'activated hook', _ErrorTypeStrings["da" /* LifecycleHooks.DEACTIVATED */] = 'deactivated hook', _ErrorTypeStrings["ec" /* LifecycleHooks.ERROR_CAPTURED */] = 'errorCaptured hook', _ErrorTypeStrings["rtc" /* LifecycleHooks.RENDER_TRACKED */] = 'renderTracked hook', _ErrorTypeStrings["rtg" /* LifecycleHooks.RENDER_TRIGGERED */] = 'renderTriggered hook', _ErrorTypeStrings[0 /* ErrorCodes.SETUP_FUNCTION */] = 'setup function', _ErrorTypeStrings[1 /* ErrorCodes.RENDER_FUNCTION */] = 'render function', _ErrorTypeStrings[2 /* ErrorCodes.WATCH_GETTER */] = 'watcher getter', _ErrorTypeStrings[3 /* ErrorCodes.WATCH_CALLBACK */] = 'watcher callback', _ErrorTypeStrings[4 /* ErrorCodes.WATCH_CLEANUP */] = 'watcher cleanup function', _ErrorTypeStrings[5 /* ErrorCodes.NATIVE_EVENT_HANDLER */] = 'native event handler', _ErrorTypeStrings[6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */] = 'component event handler', _ErrorTypeStrings[7 /* ErrorCodes.VNODE_HOOK */] = 'vnode hook', _ErrorTypeStrings[8 /* ErrorCodes.DIRECTIVE_HOOK */] = 'directive hook', _ErrorTypeStrings[9 /* ErrorCodes.TRANSITION_HOOK */] = 'transition hook', _ErrorTypeStrings[10 /* ErrorCodes.APP_ERROR_HANDLER */] = 'app errorHandler', _ErrorTypeStrings[11 /* ErrorCodes.APP_WARN_HANDLER */] = 'app warnHandler', _ErrorTypeStrings[12 /* ErrorCodes.FUNCTION_REF */] = 'ref function', _ErrorTypeStrings[13 /* ErrorCodes.ASYNC_COMPONENT_LOADER */] = 'async component loader', _ErrorTypeStrings[14 /* ErrorCodes.SCHEDULER */] = 'scheduler flush. This is likely a Vue internals bug. ' + 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core', _ErrorTypeStrings);
|
|
39637
|
+
var isVNode = vue.ssrUtils.isVNode;
|
|
39421
39638
|
vue.initDirectivesForSSR();
|
|
39422
39639
|
|
|
39423
39640
|
var server = createCommonjsModule(function (module, exports) {
|
|
@@ -39724,7 +39941,7 @@
|
|
|
39724
39941
|
}, queryString, renderFunction);
|
|
39725
39942
|
}
|
|
39726
39943
|
|
|
39727
|
-
var version = "3.0.0-rc.6.
|
|
39944
|
+
var version = "3.0.0-rc.6.2";
|
|
39728
39945
|
|
|
39729
39946
|
var components = [RLConnected, ResultCard, ResultList, ReactiveBase, SBConnected, ListConnected, ListConnected$1, RangeConnected$1, RangeConnected$2, RangeConnected$3, RangeConnected, RcConnected, RcConnected$1, RcConnected$2, TBConnected, ListConnected$2, ListConnected$3, StateProviderConnected, RangeConnected$4, TreeListConnected, AIConnected];
|
|
39730
39947
|
function install$1 (Vue) {
|